[brlcad-commits] SF.net SVN: brlcad:[48115] brlcad/trunk/src/other/perplex
Open Source Solid Modeling CAD
Brought to you by:
brlcad
From: <br...@us...> - 2011-12-21 20:29:02
|
Revision: 48115 http://brlcad.svn.sourceforge.net/brlcad/?rev=48115&view=rev Author: brlcad Date: 2011-12-21 20:28:55 +0000 (Wed, 21 Dec 2011) Log Message: ----------- fgetc() returns an int, not a char so capture the EOF return value being cast through unsigned char as an int instead of a char (255) Modified Paths: -------------- brlcad/trunk/src/other/perplex/parser.y brlcad/trunk/src/other/perplex/perplex.cpp brlcad/trunk/src/other/perplex/scanner.re brlcad/trunk/src/other/perplex/scanner_template.c Modified: brlcad/trunk/src/other/perplex/parser.y =================================================================== --- brlcad/trunk/src/other/perplex/parser.y 2011-12-21 20:27:30 UTC (rev 48114) +++ brlcad/trunk/src/other/perplex/parser.y 2011-12-21 20:28:55 UTC (rev 48115) @@ -8,7 +8,7 @@ static void writeHeader(FILE *templateFile, FILE *headerFile) { - char c; + int c; while ((c = fgetc(templateFile)) != EOF) { if (c == '%') { if ((c = fgetc(templateFile)) == '%') { @@ -48,7 +48,7 @@ FILE *templateFile = appData->scanner_template; FILE *headerFile = appData->header; FILE *outFile = appData->out; - char c; + int c; /* write header file from template */ if (headerFile != NULL) { Modified: brlcad/trunk/src/other/perplex/perplex.cpp =================================================================== --- brlcad/trunk/src/other/perplex/perplex.cpp 2011-12-21 20:27:30 UTC (rev 48114) +++ brlcad/trunk/src/other/perplex/perplex.cpp 2011-12-21 20:28:55 UTC (rev 48115) @@ -95,7 +95,7 @@ int main(int argc, char *argv[]) { - char c; + int c; int tokenID; int opt_ind = 1; char *opt_arg = NULL; Modified: brlcad/trunk/src/other/perplex/scanner.re =================================================================== --- brlcad/trunk/src/other/perplex/scanner.re 2011-12-21 20:27:30 UTC (rev 48114) +++ brlcad/trunk/src/other/perplex/scanner.re 2011-12-21 20:28:55 UTC (rev 48115) @@ -336,7 +336,7 @@ struct Buf *buf; FILE *in; size_t i; - char c; + int c; char *bufStart; size_t markerOffset, tokenStartOffset, cursorOffset; Modified: brlcad/trunk/src/other/perplex/scanner_template.c =================================================================== --- brlcad/trunk/src/other/perplex/scanner_template.c 2011-12-21 20:27:30 UTC (rev 48114) +++ brlcad/trunk/src/other/perplex/scanner_template.c 2011-12-21 20:28:55 UTC (rev 48115) @@ -430,7 +430,7 @@ struct Buf *buf; FILE *in; size_t i; - char c; + int c; char *bufStart; size_t markerOffset, tokenStartOffset, cursorOffset; This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |