=================================================================== RCS file: /home/cvs/OpenXM/src/util/oxlistlocalf.c,v retrieving revision 1.1 retrieving revision 1.3 diff -u -p -r1.1 -r1.3 --- OpenXM/src/util/oxlistlocalf.c 2014/03/25 07:08:25 1.1 +++ OpenXM/src/util/oxlistlocalf.c 2020/10/03 08:24:14 1.3 @@ -1,11 +1,27 @@ -/* $OpenXM$ */ +/* $OpenXM: OpenXM/src/util/oxlistlocalf.c,v 1.2 2015/10/13 06:18:26 takayama Exp $ */ #include #include #include #include #include +#include #include "oxlistlocalf.h" +int readcomment(); +int readcomment2(); +char *readstring(); +int readchar(); +void putchar0(int c); +void printf0(char *s); +void printf1(char *s); +int isReserved(char *s); +int shouldReplace(char *s); +int fsgetc(FILE *fp); + + + + + objectp KClval; int Replace = 0; int Linenumber = 0; @@ -353,7 +369,7 @@ int KClex() { } -readcomment() { +int readcomment() { int c; while (1) { c = fsgetc(Inop); @@ -368,7 +384,7 @@ readcomment() { } } -readcomment2() { +int readcomment2() { int c; while (1) { c = fsgetc(Inop); @@ -428,7 +444,7 @@ char *readstring() { } -readchar() { +int readchar() { int c; if (Replace) putchar0('\''); c = fsgetc(Inop); /* 'c.' '\.c' */ @@ -455,29 +471,25 @@ readchar() { return(c); } -putchar0(c) - int c; +void putchar0(int c) { if (c > 0) putchar(c); } -printf0(s) - char *s; +void printf0(char *s) { int i = 0; while (s[i] != '\0') putchar0(s[i++]); } -printf1(s) - char *s; +void printf1(char *s) { int i = 0; /* putchar0('K'); */ /* do your own replacement */ while (s[i] != '\0') putchar0(s[i++]); } -isReserved(s) - char *s; +int isReserved(char *s) { char *r[] = {"auto","break","case","char","const","continue", "default","do","double","else","enum","extern", @@ -513,8 +525,7 @@ isReserved(s) } -shouldReplace(s) - char *s; +int shouldReplace(char *s) { char *r[] = {"dummy"}; int n = 1;