version 1.5, 2002/08/23 03:26:16 |
version 1.8, 2003/05/24 07:22:19 |
|
|
/* $OpenXM: OpenXM/src/asir-contrib/packages/doc/gentexi.c,v 1.4 2002/08/08 08:56:32 takayama Exp $ */ |
/* $OpenXM: OpenXM/src/asir-contrib/packages/doc/gentexi.c,v 1.7 2002/10/23 01:14:16 takayama Exp $ */ |
|
|
#include <stdio.h> |
#include <stdio.h> |
int Debug = 0; |
int Debug = 0; |
Line 117 genInclude(char *name) { |
|
Line 117 genInclude(char *name) { |
|
sprintf(fname,"tmp/%s-auto-%s.texi",name,Lang); |
sprintf(fname,"tmp/%s-auto-%s.texi",name,Lang); |
fp = fopen(fname,"r"); |
fp = fopen(fname,"r"); |
if (fp == NULL) { |
if (fp == NULL) { |
fprintf(stderr,"No file %s\n",fname); |
/* fprintf(stderr,"No file %s\n",fname); */ |
return 0; |
return 0; |
} |
} |
while ((c=fgetc(fp)) != EOF) { |
while ((c=fgetc(fp)) != EOF) { |
Line 239 char *getCategory(char *key) { |
|
Line 239 char *getCategory(char *key) { |
|
char *s; |
char *s; |
s = str(key); |
s = str(key); |
for (i=0; i<strlen(s); i++) { |
for (i=0; i<strlen(s); i++) { |
if (s[i] == '_') { |
if ((s[i] == '_') || s[i] == '.') { |
s[i] = 0; |
s[i] = 0; |
return s; |
return s; |
} |
} |
Line 252 char *getCategory2(char *key) { |
|
Line 252 char *getCategory2(char *key) { |
|
int count; |
int count; |
s = str(key); |
s = str(key); |
for (i=0; i<strlen(s); i++) { |
for (i=0; i<strlen(s); i++) { |
if (s[i] == '_') count++; |
if ((s[i] == '_') || (s[i] == '.')) count++; |
if (count == 2) { |
if (count == 2) { |
s[i] = 0; return s; |
s[i] = 0; return s; |
} |
} |
Line 276 struct item *getItem() { |
|
Line 276 struct item *getItem() { |
|
if (strcmp(key,"begin:") == 0) break; |
if (strcmp(key,"begin:") == 0) break; |
}while (p >= 0); |
}while (p >= 0); |
if (p < 0) { |
if (p < 0) { |
fprintf(stderr,"gentexi: End of input file.\n"); |
/* fprintf(stderr,"gentexi: End of input file.\n"); */ |
return NULL; |
return NULL; |
} |
} |
p = nextToken(key,LIMIT); |
p = nextToken(key,LIMIT); |
Line 382 struct item *getItem() { |
|
Line 382 struct item *getItem() { |
|
} |
} |
} |
} |
}else{ |
}else{ |
fprintf(stderr,"Unknown keyword << %s >> at %s\n",key, it->name); |
fprintf(stderr,"Warning: unknown keyword << %s >> at %s. Ignored.\n",key, it->name); |
exit(10); |
p = nextToken(key,LIMIT); |
} |
} |
}while (p >= 0); |
}while (p >= 0); |
|
|