Rev 8100 | Rev 8149 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed
Rev 8100 | Rev 8123 | ||
---|---|---|---|
Line 26... | Line 26... | ||
26 | /* separation character */ |
26 | /* separation character */ |
27 | char sepchar=':', grpchar=0; |
27 | char sepchar=':', grpchar=0; |
28 | 28 | ||
29 | /***************** Nothing should need change hereafter *****************/ |
29 | /***************** Nothing should need change hereafter *****************/ |
30 | 30 | ||
- | 31 | #include "suffix.h" |
|
31 | #include "../wims.h" |
32 | #include "../wims.h" |
32 | #include "../Lib/libwims.h" |
33 | #include "../Lib/libwims.h" |
33 | - | ||
34 | 34 | ||
35 | char inpbuf[MAX_LINELEN+1], outbuf[2*MAX_LINELEN+2]; |
35 | char inpbuf[MAX_LINELEN+1], outbuf[2*MAX_LINELEN+2]; |
36 | char *dicbuf; |
36 | char *dicbuf; |
37 | char dicname[1024], suffixname[1024]; |
37 | char dicname[1024], suffixname[1024]; |
38 | 38 | ||
Line 62... | Line 62... | ||
62 | return p; |
62 | return p; |
63 | } |
63 | } |
64 | */ |
64 | */ |
65 | /* Strips leading spaces */ |
65 | /* Strips leading spaces */ |
66 | /*char *find_word_start(char *p) |
66 | /*char *find_word_start(char *p) |
67 | { |
67 | { |
68 | int i; |
68 | int i; |
69 | for(i=0; isspace(*p) && i<MAX_LINELEN; p++,i++); |
69 | for(i=0; isspace(*p) && i<MAX_LINELEN; p++,i++); |
70 | return p; |
70 | return p; |
71 | } |
71 | } |
72 | */ |
72 | */ |
Line 78... | Line 78... | ||
78 | for(pp=p+strlen(p)-1; pp>=p && isspace(*pp); *(pp--)=0); |
78 | for(pp=p+strlen(p)-1; pp>=p && isspace(*pp); *(pp--)=0); |
79 | return pp; |
79 | return pp; |
80 | } |
80 | } |
81 | 81 | ||
82 | int compare(const void *s1, const void *s2) |
82 | int compare(const void *s1, const void *s2) |
83 | { |
83 | { |
84 | const struct entry *p1, *p2; |
84 | const struct entry *p1, *p2; |
85 | p1=s1; p2=s2; |
85 | p1=s1; p2=s2; |
86 | if(nocase) return strcasecmp(p1->original,p2->original); |
86 | if(nocase) return strcasecmp(p1->original,p2->original); |
87 | else return strcmp(p1->original,p2->original); |
87 | else return strcmp(p1->original,p2->original); |
88 | } |
88 | } |
Line 159... | Line 159... | ||
159 | if(*p1==0) continue; |
159 | if(*p1==0) continue; |
160 | entry[i].original=p1; entry[i].replace=pp; i++; |
160 | entry[i].original=p1; entry[i].replace=pp; i++; |
161 | } |
161 | } |
162 | entrycount=i; |
162 | entrycount=i; |
163 | } |
163 | } |
164 | - | ||
165 | #include "suffix.c" |
- | |
166 | 164 | ||
167 | void output(void) |
165 | void output(void) |
168 | { |
166 | { |
169 | int i; |
167 | int i; |
170 | FILE *f; |
168 | FILE *f; |