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:
parent
8ed04e3729
commit
88cf377659
2
parse.c
2
parse.c
|
@ -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;
|
||||||
|
|
23
picoc.c
23
picoc.c
|
@ -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;
|
{
|
||||||
unsigned int sl;
|
char *pos;
|
||||||
|
|
||||||
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]) {
|
||||||
|
@ -152,9 +152,10 @@ int picoc(char *SourceStr)
|
||||||
Cleanup();
|
Cleanup();
|
||||||
return ExitValue;
|
return ExitValue;
|
||||||
}
|
}
|
||||||
|
|
||||||
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;
|
||||||
|
|
|
@ -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
|
||||||
|
|
Loading…
Reference in a new issue