Subversion Repositories wimsdev

Rev

Rev 9091 | Rev 11124 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 9091 Rev 9092
Line 34... Line 34...
34
char *groupdic=     "sys/wgrp/wgrp";
34
char *groupdic=     "sys/wgrp/wgrp";
35
char *suffixdic=    "sys/suffix";
35
char *suffixdic=    "sys/suffix";
36
char *domaindic=    "sys/domaindic";
36
char *domaindic=    "sys/domaindic";
37
char *ignoredic=    "sys/indignore";
37
char *ignoredic=    "sys/indignore";
38
char *conffile=     "log/wims.conf";
38
char *conffile=     "log/wims.conf";
39
char *mlistbase=    "list";
39
char *mlistbase=    "lists";
40
 
40
 
41
char lang[MAX_LANGS][4]={
41
char lang[MAX_LANGS][4]={
42
    "en","fr","cn","es","it","nl","si","ca","pt"
42
    "en","fr","cn","es","it","nl","si","ca","pt"
43
};
43
};
44
#define DEFAULT_LANGCNT    6
44
#define DEFAULT_LANGCNT    6
Line 284... Line 284...
284
    descf=fopen(buf,"w");
284
    descf=fopen(buf,"w");
285
    snprintf(buf,sizeof(buf),"%s/author",outdir);
285
    snprintf(buf,sizeof(buf),"%s/author",outdir);
286
    authorf=fopen(buf,"w");
286
    authorf=fopen(buf,"w");
287
    snprintf(buf,sizeof(buf),"%s/version",outdir);
287
    snprintf(buf,sizeof(buf),"%s/version",outdir);
288
    versionf=fopen(buf,"w");
288
    versionf=fopen(buf,"w");
289
    snprintf(buf,sizeof(buf),"%s/lists/robot.phtml",outdir);
289
    snprintf(buf,sizeof(buf),"%s/%s/robot.phtml",outdir,mlistbase);
290
    robotf=fopen(buf,"w");
290
    robotf=fopen(buf,"w");
291
    fclose(addrf); fclose(serialf);
291
    fclose(addrf); fclose(serialf);
292
    if(!robotf || !versionf || !authorf || !descf || !titf || !langf) {
292
    if(!robotf || !versionf || !authorf || !descf || !titf || !langf) {
293
      fprintf(stderr,"modind: error creating output files.\n");
293
      fprintf(stderr,"modind: error creating output files.\n");
294
      exit(1);
294
      exit(1);
Line 495... Line 495...
495
      categories[catcnt++]=cat[0].typ;
495
      categories[catcnt++]=cat[0].typ;
496
/*  write module's name in the category.language files, for instance lists/X.fr
496
/*  write module's name in the category.language files, for instance lists/X.fr
497
 * for french exercises
497
 * for french exercises
498
 */
498
 */
499
    for(i=0;i<catcnt;i++) {
499
    for(i=0;i<catcnt;i++) {
500
      snprintf(buf,sizeof(buf),"%s/lists/%c.%s",
500
      snprintf(buf,sizeof(buf),"%s/%s/%c.%s",
501
         outdir,categories[i],lang[lind]);
501
         outdir,mlistbase,categories[i],lang[lind]);
502
      f=fopen(buf,"a");
502
      f=fopen(buf,"a");
503
      if(f!=NULL) {fprintf(f,"%s\n",name); fclose(f);}
503
      if(f!=NULL) {fprintf(f,"%s\n",name); fclose(f);}
504
    }
504
    }
505
/*   add serial number and language (resp.title, ...) to corresponding file  */
505
/*   add serial number and language (resp.title, ...) to corresponding file  */
506
    fprintf(langf,"%d:%s\n",serial,module_language);
506
    fprintf(langf,"%d:%s\n",serial,module_language);