Rev 12248 | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed
Rev 12248 | Rev 13318 | ||
---|---|---|---|
Line 31... | Line 31... | ||
31 | #include "suffix.h" |
31 | #include "suffix.h" |
32 | 32 | ||
33 | char *inpbuf, outbuf[2*(MAX_LINELEN+1)]; |
33 | char *inpbuf, outbuf[2*(MAX_LINELEN+1)]; |
34 | char *dicbuf; |
34 | char *dicbuf; |
35 | struct entry { |
35 | struct entry { |
36 |
|
36 | unsigned char *original, *replace; |
37 |
|
37 | int olen,earlier; |
38 | } entry[entrylim]; |
38 | } entry[entrylim]; |
39 | int entrycount; |
39 | int entrycount; |
40 | 40 | ||
41 | enum { |
41 | enum { |
42 |
|
42 | unk_delete, unk_leave, unk_replace |
43 | }; |
43 | }; |
44 | 44 | ||
45 | int has_digits=0; |
45 | int has_digits=0; |
46 | int unknown_type=unk_delete; |
46 | int unknown_type=unk_delete; |
47 | int nocase=0,leaveline=0,fromfile=0; |
47 | int nocase=0,leaveline=0,fromfile=0; |
Line 141... | Line 141... | ||
141 | if(strncmp(fname,buf,strlen(buf))!=0) escape(); |
141 | if(strncmp(fname,buf,strlen(buf))!=0) escape(); |
142 | } |
142 | } |
143 | else escape(); |
143 | else escape(); |
144 | } |
144 | } |
145 | else { |
145 | else { |
146 |
|
146 | p1=getenv("untrust"); if(p1 && strstr(p1,"yes")) escape(); |
147 | } |
147 | } |
148 | } |
148 | } |
149 | /* replace escape() by return if there is some suffix dictionary, */ |
149 | /* replace escape() by return if there is some suffix dictionary, */ |
150 | 150 | ||
151 | dicf=fopen(fname,"r"); if(dicf==NULL) return; |
151 | dicf=fopen(fname,"r"); if(dicf==NULL) return; |