Fixed compile on cygwin
git-svn-id: http://picoc.googlecode.com/svn/trunk@446 21eae674-98b7-11dd-bd71-f92a316d2d60
This commit is contained in:
parent
08b08595f4
commit
06acdabc6f
|
@ -396,17 +396,17 @@ void StdioTmpfile(struct ParseState *Parser, struct Value *ReturnValue, struct V
|
|||
|
||||
void StdioClearerr(struct ParseState *Parser, struct Value *ReturnValue, struct Value **Param, int NumArgs)
|
||||
{
|
||||
clearerr(Param[0]->Val->Pointer);
|
||||
clearerr((FILE *)Param[0]->Val->Pointer);
|
||||
}
|
||||
|
||||
void StdioFeof(struct ParseState *Parser, struct Value *ReturnValue, struct Value **Param, int NumArgs)
|
||||
{
|
||||
ReturnValue->Val->Integer = feof(Param[0]->Val->Pointer);
|
||||
ReturnValue->Val->Integer = feof((FILE *)Param[0]->Val->Pointer);
|
||||
}
|
||||
|
||||
void StdioFerror(struct ParseState *Parser, struct Value *ReturnValue, struct Value **Param, int NumArgs)
|
||||
{
|
||||
ReturnValue->Val->Integer = ferror(Param[0]->Val->Pointer);
|
||||
ReturnValue->Val->Integer = ferror((FILE *)Param[0]->Val->Pointer);
|
||||
}
|
||||
|
||||
void StdioFileno(struct ParseState *Parser, struct Value *ReturnValue, struct Value **Param, int NumArgs)
|
||||
|
|
8
lex.c
8
lex.c
|
@ -205,7 +205,7 @@ enum LexToken LexGetWord(struct LexState *Lexer, struct Value *Value)
|
|||
|
||||
do {
|
||||
LEXER_INC(Lexer);
|
||||
} while (Lexer->Pos != Lexer->End && isCident(*Lexer->Pos));
|
||||
} while (Lexer->Pos != Lexer->End && isCident((int)*Lexer->Pos));
|
||||
|
||||
Value->Typ = NULL;
|
||||
Value->Val->Identifier = TableStrRegister2(StartPos, Lexer->Pos - StartPos);
|
||||
|
@ -367,7 +367,7 @@ enum LexToken LexScanGetToken(struct LexState *Lexer, struct Value **Value)
|
|||
do
|
||||
{
|
||||
*Value = &LexValue;
|
||||
while (Lexer->Pos != Lexer->End && isspace(*Lexer->Pos))
|
||||
while (Lexer->Pos != Lexer->End && isspace((int)*Lexer->Pos))
|
||||
{
|
||||
if (*Lexer->Pos == '\n')
|
||||
{
|
||||
|
@ -387,10 +387,10 @@ enum LexToken LexScanGetToken(struct LexState *Lexer, struct Value **Value)
|
|||
return TokenEOF;
|
||||
|
||||
ThisChar = *Lexer->Pos;
|
||||
if (isCidstart(ThisChar))
|
||||
if (isCidstart((int)ThisChar))
|
||||
return LexGetWord(Lexer, *Value);
|
||||
|
||||
if (isdigit(ThisChar))
|
||||
if (isdigit((int)ThisChar))
|
||||
return LexGetNumber(Lexer, *Value);
|
||||
|
||||
NextChar = (Lexer->Pos+1 != Lexer->End) ? *(Lexer->Pos+1) : 0;
|
||||
|
|
|
@ -9,9 +9,9 @@ printf("%s\n", a);
|
|||
strncpy(a, "gosh", 2);
|
||||
printf("%s\n", a);
|
||||
|
||||
printf("%d\n", strcmp(a, "apple"));
|
||||
printf("%d\n", strcmp(a, "goere"));
|
||||
printf("%d\n", strcmp(a, "zebra"));
|
||||
printf("%d\n", strcmp(a, "apple") > 0);
|
||||
printf("%d\n", strcmp(a, "goere") > 0);
|
||||
printf("%d\n", strcmp(a, "zebra") < 0);
|
||||
|
||||
printf("%d\n", strlen(a));
|
||||
|
||||
|
@ -33,7 +33,7 @@ printf("%s\n", a);
|
|||
memcpy(&a[2], a, 2);
|
||||
printf("%s\n", a);
|
||||
|
||||
printf("%d\n", memcmp(a, "apple", 4));
|
||||
printf("%d\n", memcmp(a, "grgr", 4));
|
||||
printf("%d\n", memcmp(a, "zebra", 4));
|
||||
printf("%d\n", memcmp(a, "apple", 4) > 0);
|
||||
printf("%d\n", memcmp(a, "grgr", 4) == 0);
|
||||
printf("%d\n", memcmp(a, "zebra", 4) < 0);
|
||||
|
||||
|
|
|
@ -2,7 +2,7 @@ hello
|
|||
gollo
|
||||
1
|
||||
1
|
||||
-1
|
||||
1
|
||||
5
|
||||
gollo!
|
||||
1
|
||||
|
@ -15,5 +15,5 @@ lo!
|
|||
grrrr!
|
||||
grgrr!
|
||||
1
|
||||
0
|
||||
-1
|
||||
1
|
||||
1
|
||||
|
|
Loading…
Reference in a new issue