version 1.1, 1999/10/08 02:12:05 |
version 1.5, 2020/10/06 11:33:47 |
|
|
|
/* $OpenXM: OpenXM/src/kan96xx/plugin/cmotagToName.c,v 1.4 2005/07/03 11:08:54 ohara Exp $ */ |
#include <stdio.h> |
#include <stdio.h> |
|
#include <stdlib.h> |
|
#include <string.h> |
#include "cmotag.h" |
#include "cmotag.h" |
#define BSIZE 1024 |
#define BSIZE 1024 |
|
|
main() { |
void main() { |
FILE *fp; |
FILE *fp; |
char s[BSIZE]; |
char s[BSIZE]; |
int i, start; |
int i, start; |
|
|
for (i=start=0; i<BSIZE-10; i++) { |
for (i=start=0; i<BSIZE-10; i++) { |
if (s[i] == '\0') goto aa ; |
if (s[i] == '\0') goto aa ; |
if (s[i] == '#') { |
if (s[i] == '#') { |
s[i+7] = '\0'; |
s[i+7] = '\0'; |
if (strcmp(&(s[i+1]),"define") != 0) goto aa ; |
if (strcmp(&(s[i+1]),"define") != 0) goto aa ; |
start = i+8; |
start = i+8; |
break; |
break; |
} |
} |
} |
} |
i = start; |
i = start; |
|
|
printf("} else if (p == %s) {\n",a); |
printf("} else if (p == %s) {\n",a); |
printf(" return(\"%s\");\n",a); |
printf(" return(\"%s\");\n",a); |
|
|
aa: ; |
aa: ; |
} |
} |
printf("} else { return(\"Unknown tag\"); }\n"); |
printf("} else { return(\"Unknown tag\"); }\n"); |
printf("}\n"); |
printf("}\n"); |