X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/2bda0e173844e8e0f8acf4e8ad8b5c26e5c6fe5d..884470b12ee25b20796bfef11a9bfa5fb1e1511c:/src/common/doslex.c diff --git a/src/common/doslex.c b/src/common/doslex.c index 67e789afba..08572e333c 100644 --- a/src/common/doslex.c +++ b/src/common/doslex.c @@ -21,7 +21,19 @@ #ifdef __cplusplus #include + +#ifdef __SALFORDC__ +#include +#include +#else #include +#endif + +#ifdef __cplusplus +static int yyinput() +#else +static int input() +#endif /* use prototypes in function declarations */ #define YY_USE_PROTOS @@ -520,7 +532,7 @@ do_action: /* this label is used only to access EOF actions */ case 1: # line 60 "lexer.l" -{yylval.s = strdup(yytext); Return(INTEGER);} +{yylval.s = strdup((const char*) yytext); Return(INTEGER);} YY_BREAK case 2: # line 62 "lexer.l" @@ -528,18 +540,18 @@ Return(EXP); YY_BREAK case 3: # line 64 "lexer.l" -{yylval.s = strdup(yytext); Return(WORD);} +{yylval.s = strdup((const char*) yytext); Return(WORD);} YY_BREAK case 4: # line 66 "lexer.l" -{int len = strlen(yytext); +{int len = strlen((const char*) yytext); yytext[len-1] = 0; - yylval.s = strdup(yytext+1); + yylval.s = strdup((const char*) (yytext+1)); Return(WORD);} YY_BREAK case 5: # line 71 "lexer.l" -{yylval.s = strdup(yytext); Return(STRING);} +{yylval.s = strdup((const char*) yytext); Return(STRING);} YY_BREAK case 6: # line 73 "lexer.l" @@ -1180,7 +1192,7 @@ void LexFromString(char *buffer) { lex_read_from_string = 1; lex_buffer = buffer; - lex_buffer_length = strlen(buffer); + lex_buffer_length = strlen((const char*) buffer); lex_string_ptr = 0; /* Don't know why this is necessary, but otherwise * lex only works _once_!