Rev 6884 | Rev 6967 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed
Rev 6884 | Rev 6961 | ||
---|---|---|---|
Line 45... | Line 45... | ||
45 | }; |
45 | }; |
46 | #define allangcnt 8 |
46 | #define allangcnt 8 |
47 | char ignore[MAX_LANGS][MAX_LINELEN+1]; |
47 | char ignore[MAX_LANGS][MAX_LINELEN+1]; |
48 | char mlistfile[MAX_LANGS][256]; |
48 | char mlistfile[MAX_LANGS][256]; |
49 | int langcnt; |
49 | int langcnt; |
50 | FILE *langf, *titf, *descf, *weightf, *robotf, *indf, *listf, *addrf, *serialf, *authorf, *versionf; |
50 | FILE *langf, *titf, *descf, *weightf, *robotf, *indf, *listf, *addrf, *serialf, *authorf, *versionf, *remf; |
51 | 51 | ||
52 | struct cat { |
52 | struct cat { |
53 | char *name; |
53 | char *name; |
54 | char typ; |
54 | char typ; |
55 | } cat[]={ |
55 | } cat[]={ |
Line 743... | Line 743... | ||
743 | 743 | ||
744 | if(sheet_index(serial)) return; |
744 | if(sheet_index(serial)) return; |
745 | fprintf(listf,"%s\n",mod[serial].name+3); |
745 | fprintf(listf,"%s\n",mod[serial].name+3); |
746 | fprintf(titf,"%d:%s\n",serial,sindbuf[s_title]); |
746 | fprintf(titf,"%d:%s\n",serial,sindbuf[s_title]); |
747 | fprintf(descf,"%d:%s\n",serial,sindbuf[s_description]); |
747 | fprintf(descf,"%d:%s\n",serial,sindbuf[s_description]); |
- | 748 | fprintf(remf,"%d:%s\n",serial,sindbuf[s_remark]); |
|
- | 749 | ||
748 | entrycount=dentrycount; dicbuf=ddicbuf; |
750 | entrycount=dentrycount; dicbuf=ddicbuf; |
749 | memmove(entry,dentry,dentrycount*sizeof(entry[0])); |
751 | memmove(entry,dentry,dentrycount*sizeof(entry[0])); |
750 | unknown_type=unk_leave; |
752 | unknown_type=unk_leave; |
751 | for(i=0;i<trcnt;i++) { |
753 | for(i=0;i<trcnt;i++) { |
752 | detag(sindbuf[trlist[i]]); |
754 | detag(sindbuf[trlist[i]]); |
Line 763... | Line 765... | ||
763 | suffix_translate(sindbuf[trlist[i]]); |
765 | suffix_translate(sindbuf[trlist[i]]); |
764 | translate(sindbuf[trlist[i]]); |
766 | translate(sindbuf[trlist[i]]); |
765 | } |
767 | } |
766 | taken[0]=0; takenlen=tweight=0; |
768 | taken[0]=0; takenlen=tweight=0; |
767 | ovlstrcpy(buf,sindbuf[s_title]); towords(buf); |
769 | ovlstrcpy(buf,sindbuf[s_title]); towords(buf); |
768 | for(p1=find_word_start(buf);*p1; |
770 | for(p1=find_word_start(buf);*p1; |
769 | p1=find_word_start(p2)) { |
771 | p1=find_word_start(p2)) { |
770 | p2=find_word_end(p1); if(*p2) *p2++=0; |
772 | p2=find_word_end(p1); if(*p2) *p2++=0; |
771 | sappenditem(p1,lind,serial,4); |
773 | sappenditem(p1,lind,serial,4); |
772 | } |
774 | } |
773 | snprintf(buf,sizeof(buf),"%s %s %s %s", |
775 | snprintf(buf,sizeof(buf),"%s %s %s %s", |
774 | sindbuf[s_description],sindbuf[s_keywords], |
776 | sindbuf[s_description],sindbuf[s_keywords], |
775 | sindbuf[s_domain],sindbuf[s_remark]); |
777 | sindbuf[s_domain],sindbuf[s_remark]); |
776 | towords(buf); |
778 | towords(buf); |
777 | for(p1=find_word_start(buf);*p1; |
779 | for(p1=find_word_start(buf);*p1; |
Line 805... | Line 807... | ||
805 | } |
807 | } |
806 | 808 | ||
807 | void sheets(void) |
809 | void sheets(void) |
808 | { |
810 | { |
809 | int i,j; |
811 | int i,j; |
810 | char mdic[MAX_LINELEN+1], sdic[MAX_LINELEN+1], gdic[MAX_LINELEN+1]; |
812 | char mdic[MAX_LINELEN+1], sdic[MAX_LINELEN+1], gdic[MAX_LINELEN+1], ddic[MAX_LINELEN+1]; |
811 | char buf[MAX_LINELEN+1]; |
813 | char buf[MAX_LINELEN+1]; |
812 | 814 | ||
813 | for(j=0;j<langcnt;j++) { |
815 | for(j=0;j<langcnt;j++) { |
814 | snprintf(buf,sizeof(buf),"%s/index/title.%s",sheetdir,lang[j]); |
816 | snprintf(buf,sizeof(buf),"%s/index/title.%s",sheetdir,lang[j]); |
815 | titf=fopen(buf,"w"); |
817 | titf=fopen(buf,"w"); |
Line 821... | Line 823... | ||
821 | listf=fopen(buf,"w"); |
823 | listf=fopen(buf,"w"); |
822 | snprintf(buf,sizeof(buf),"%s/index/weight.%s",sheetdir,lang[j]); |
824 | snprintf(buf,sizeof(buf),"%s/index/weight.%s",sheetdir,lang[j]); |
823 | weightf=fopen(buf,"w"); |
825 | weightf=fopen(buf,"w"); |
824 | snprintf(buf,sizeof(buf),"%s/index/addr.%s",sheetdir,lang[j]); |
826 | snprintf(buf,sizeof(buf),"%s/index/addr.%s",sheetdir,lang[j]); |
825 | addrf=fopen(buf,"w"); |
827 | addrf=fopen(buf,"w"); |
- | 828 | snprintf(buf,sizeof(buf),"%s/index/remark.%s",sheetdir,lang[j]); |
|
- | 829 | remf=fopen(buf,"w"); |
|
826 | snprintf(buf,sizeof(buf),"%s/index/serial.%s",sheetdir,lang[j]); |
830 | snprintf(buf,sizeof(buf),"%s/index/serial.%s",sheetdir,lang[j]); |
827 | serialf=fopen(buf,"w"); |
831 | serialf=fopen(buf,"w"); |
828 | snprintf(mdic,sizeof(mdic),"%s/%s.%s",dicdir,maindic,lang[j]); |
832 | snprintf(mdic,sizeof(mdic),"%s/%s.%s",dicdir,maindic,lang[j]); |
829 | snprintf(sdic,sizeof(sdic),"%s/%s.%s",dicdir,suffixdic,lang[j]); |
833 | snprintf(sdic,sizeof(sdic),"%s/%s.%s",dicdir,suffixdic,lang[j]); |
830 | snprintf(gdic,sizeof(gdic),"%s/%s.%s",dicdir,groupdic,lang[j]); |
834 | snprintf(gdic,sizeof(gdic),"%s/%s.%s",dicdir,groupdic,lang[j]); |
- | 835 | snprintf(ddic,sizeof(ddic),"%s/%s.%s",dicdir,domaindic,lang[j]); |
|
831 | suffix_dic(sdic); prepare_dic(gdic); |
836 | suffix_dic(sdic); prepare_dic(gdic); |
832 | gdicbuf=dicbuf; gentrycount=entrycount; |
837 | gdicbuf=dicbuf; gentrycount=entrycount; |
833 | memmove(gentry,entry,gentrycount*sizeof(entry[0])); |
838 | memmove(gentry,entry,gentrycount*sizeof(entry[0])); |
834 | prepare_dic(mdic); |
839 | prepare_dic(mdic); |
835 | mdicbuf=dicbuf; mentrycount=entrycount; |
840 | mdicbuf=dicbuf; mentrycount=entrycount; |
Line 842... | Line 847... | ||
842 | onesheet(i,j); |
847 | onesheet(i,j); |
843 | } |
848 | } |
844 | if(mentrycount>0) free(mdicbuf); |
849 | if(mentrycount>0) free(mdicbuf); |
845 | if(gentrycount>0) free(gdicbuf); |
850 | if(gentrycount>0) free(gdicbuf); |
846 | if(suffixcnt>0) free(sufbuf); |
851 | if(suffixcnt>0) free(sufbuf); |
- | 852 | if(dentrycount>0) free(ddicbuf); |
|
847 | fclose(titf); fclose(descf); fclose(indf); fclose(listf); |
853 | fclose(titf); fclose(descf); fclose(indf); fclose(listf); |
848 | fclose(weightf); fclose(addrf); fclose(serialf); |
854 | fclose(weightf); fclose(addrf); fclose(serialf); |
849 | } |
855 | } |
850 | } |
856 | } |
851 | 857 |