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; struct ValueType *ParamType;
char *ParamIdentifier; char *ParamIdentifier;
enum LexToken Token; enum LexToken Token = TokenNone;
struct ParseState ParamParser; struct ParseState ParamParser;
struct Value *FuncValue; struct Value *FuncValue;
struct Value *OldFuncValue; struct Value *OldFuncValue;

13
picoc.c
View file

@ -128,23 +128,23 @@ int main(int argc, char **argv)
#else #else
# ifdef SURVEYOR_HOST # ifdef SURVEYOR_HOST
int picoc(char *SourceStr) int picoc(char *SourceStr)
{ {
unsigned int i; char *pos;
unsigned int sl;
Initialise(HEAP_SIZE); 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; ExitBuf[40] = 0;
PlatformSetExitPoint(); PlatformSetExitPoint();
if (ExitBuf[40]) { if (ExitBuf[40]) {
@ -155,6 +155,7 @@ int picoc(char *SourceStr)
if (SourceStr) if (SourceStr)
Parse("nofile", SourceStr, strlen(SourceStr), TRUE, TRUE, FALSE); Parse("nofile", SourceStr, strlen(SourceStr), TRUE, TRUE, FALSE);
ParseInteractive(); ParseInteractive();
Cleanup(); Cleanup();
return ExitValue; return ExitValue;

View file

@ -36,7 +36,7 @@ void PlatformLibraryInit()
VariableDefinePlatformVar(NULL, "cxmax", &IntType, (union AnyValue *)&Cxmax, FALSE); VariableDefinePlatformVar(NULL, "cxmax", &IntType, (union AnyValue *)&Cxmax, FALSE);
VariableDefinePlatformVar(NULL, "cymin", &IntType, (union AnyValue *)&Cymin, FALSE); VariableDefinePlatformVar(NULL, "cymin", &IntType, (union AnyValue *)&Cymin, FALSE);
VariableDefinePlatformVar(NULL, "cymax", &IntType, (union AnyValue *)&Cymax, 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 void Csignal(struct ParseState *Parser, struct Value *ReturnValue, struct Value **Param, int NumArgs) // check for kbhit, return t or nil