Changes for a clean compile on the SRV

git-svn-id: http://picoc.googlecode.com/svn/trunk@537 21eae674-98b7-11dd-bd71-f92a316d2d60
This commit is contained in:
zik.saleeba 2011-02-15 21:06:47 +00:00
parent 8ed04e3729
commit 88cf377659
3 changed files with 14 additions and 13 deletions

View file

@ -68,7 +68,7 @@ struct Value *ParseFunctionDefinition(struct ParseState *Parser, struct ValueTyp
{
struct ValueType *ParamType;
char *ParamIdentifier;
enum LexToken Token;
enum LexToken Token = TokenNone;
struct ParseState ParamParser;
struct Value *FuncValue;
struct Value *OldFuncValue;

23
picoc.c
View file

@ -128,23 +128,23 @@ int main(int argc, char **argv)
#else
# ifdef SURVEYOR_HOST
int picoc(char *SourceStr)
{
unsigned int i;
unsigned int sl;
{
char *pos;
Initialise(HEAP_SIZE);
sl = strlen(SourceStr);
if (SourceStr)
if (SourceStr)
{
for (i = 0; i < sl; i++)
for (pos = SourceStr; *pos != 0; pos++)
{
if (SourceStr[i] == 0x1A)
if (*pos == 0x1a)
{
SourceStr[i] = 0x20;
*pos = 0x20;
}
}
}
ExitBuf[40] = 0;
PlatformSetExitPoint();
if (ExitBuf[40]) {
@ -152,9 +152,10 @@ int picoc(char *SourceStr)
Cleanup();
return ExitValue;
}
if (SourceStr)
if (SourceStr)
Parse("nofile", SourceStr, strlen(SourceStr), TRUE, TRUE, FALSE);
ParseInteractive();
Cleanup();
return ExitValue;

View file

@ -36,7 +36,7 @@ void PlatformLibraryInit()
VariableDefinePlatformVar(NULL, "cxmax", &IntType, (union AnyValue *)&Cxmax, FALSE);
VariableDefinePlatformVar(NULL, "cymin", &IntType, (union AnyValue *)&Cymin, FALSE);
VariableDefinePlatformVar(NULL, "cymax", &IntType, (union AnyValue *)&Cymax, FALSE);
LibraryInit(&GlobalTable, "platform library", &PlatformLibrary);
LibraryInit(&GlobalTable, "platform library", &PlatformLibrary[0]);
}
void Csignal(struct ParseState *Parser, struct Value *ReturnValue, struct Value **Param, int NumArgs) // check for kbhit, return t or nil