Rev 8161 | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed
| Rev 8161 | Rev 8195 | ||
|---|---|---|---|
| Line 74... | Line 74... | ||
| 74 | FILE *dicf; |
74 | FILE *dicf; |
| 75 | char *p1, *p2, *pp; |
75 | char *p1, *p2, *pp; |
| 76 | char tbuf[256], buf[MAX_LINELEN+1]; |
76 | char tbuf[256], buf[MAX_LINELEN+1]; |
| 77 | long int flen; |
77 | long int flen; |
| 78 | 78 | ||
| 79 | if(diccnt>=MAX_DICS) |
79 | if(diccnt>=MAX_DICS) sym_error("too_many_dictionaries"); |
| 80 | thisdic=dic+diccnt; diccnt++; |
80 | thisdic=dic+diccnt; diccnt++; |
| 81 | thisdic->len=0; |
81 | thisdic->len=0; |
| 82 | thisdic->start=entrycount; |
82 | thisdic->start=entrycount; |
| 83 | snprintf(thisdic->name,sizeof(thisdic->name),"%s",fname); |
83 | snprintf(thisdic->name,sizeof(thisdic->name),"%s",fname); |
| 84 | dicf=fopen(mkfname(NULL,"%s/%s",styledir,fname),"r"); if(dicf==NULL) return NULL; |
84 | dicf=fopen(mkfname(NULL,"%s/%s",styledir,fname),"r"); if(dicf==NULL) return NULL; |
| Line 95... | Line 95... | ||
| 95 | strip_trailing_spaces(p1); strip_trailing_spaces(pp); |
95 | strip_trailing_spaces(p1); strip_trailing_spaces(pp); |
| 96 | singlespace(p1); |
96 | singlespace(p1); |
| 97 | p1=find_word_start(p1); pp=find_word_start(pp); |
97 | p1=find_word_start(p1); pp=find_word_start(pp); |
| 98 | if(*p1==0) continue; |
98 | if(*p1==0) continue; |
| 99 | if(i>entrycount && compare(entry+i-1,p1)>0) |
99 | if(i>entrycount && compare(entry+i-1,p1)>0) |
| 100 |
|
100 | sym_error("unsorted_dictionary %s: %s > %s.\n", |
| 101 | fname,entry[i-1].original,p1); |
101 | fname,entry[i-1].original,p1); |
| 102 | if(i>entrycount && strcmp((char*)entry[i-1].original,p1)==0) |
102 | if(i>entrycount && strcmp((char*)entry[i-1].original,p1)==0) |
| 103 |
|
103 | sym_error("duplication_in_dictionary %s: %s.\n", |
| 104 | fname,p1); |
104 | fname,p1); |
| 105 | entry[i].original=(unsigned char*)p1; |
105 | entry[i].original=(unsigned char*)p1; |
| 106 | entry[i].replace=(unsigned char*)pp; |
106 | entry[i].replace=(unsigned char*)pp; |
| 107 | entry[i].olen=l=strlen(p1); entry[i].earlier=-1; |
107 | entry[i].olen=l=strlen(p1); entry[i].earlier=-1; |
| 108 | if(i>0) { |
108 | if(i>0) { |