18,7 → 18,10 |
/* Versatile translation according to a dictionary */ |
|
/*************** Customization: change values hereafter ****************/ |
|
#include "suffix.h" |
#include "../Lib/libwims.h" |
#include "../wimsdef.h" |
#include "translator_.h" |
/* limit of dictionary entries */ |
#define entrylim 32768 |
/* limit of dictionary length */ |
29,16 → 32,10 |
|
char inpbuf[MAX_LINELEN+1], outbuf[2*MAX_LINELEN+2]; |
char *dicbuf; |
struct entry { |
unsigned char *original, *replace; |
int olen,earlier; |
} entry[entrylim]; |
struct entry entry[entrylim]; |
int entrycount; |
int entry_size=sizeof(entry); |
|
enum { |
unk_delete, unk_leave, unk_replace |
}; |
|
int has_digits=0; |
int unknown_type=unk_delete; |
int nocase=0,leaveline=0; |
112,8 → 109,6 |
} |
} |
|
#include "suffix.c" |
|
/* Prepare dictionary */ |
void prepare_dic(char *fname) |
{ |