Fixed test program for Surveyor
git-svn-id: http://picoc.googlecode.com/svn/trunk@122 21eae674-98b7-11dd-bd71-f92a316d2d60
This commit is contained in:
parent
6ce1662475
commit
9f8770047f
15
picoc.c
15
picoc.c
|
@ -30,15 +30,20 @@ int main(int argc, char **argv)
|
||||||
}
|
}
|
||||||
#else
|
#else
|
||||||
# ifdef SURVEYOR_HOST
|
# ifdef SURVEYOR_HOST
|
||||||
static char *SourceStr = "\
|
static char *SourceStr = "\n\
|
||||||
printf(\"This is a test program\n\");\
|
int Count;\n\
|
||||||
for (Count = 1; Count <= 10; Count++)\
|
\n\
|
||||||
printf(\"%d\n\");\
|
printf(\"This is a test program\n\");\n\
|
||||||
|
for (Count = 1; Count <= 10; Count++)\n\
|
||||||
|
printf(\"%d\n\", Count);\n\
|
||||||
";
|
";
|
||||||
|
|
||||||
int main(int argc, char **argv)
|
int picoc()
|
||||||
{
|
{
|
||||||
Initialise();
|
Initialise();
|
||||||
|
if (PlatformSetExitPoint())
|
||||||
|
return 1;
|
||||||
|
|
||||||
Parse("test.c", SourceStr, strlen(SourceStr), TRUE);
|
Parse("test.c", SourceStr, strlen(SourceStr), TRUE);
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
|
@ -2,9 +2,6 @@
|
||||||
#ifndef PLATFORM_H
|
#ifndef PLATFORM_H
|
||||||
#define PLATFORM_H
|
#define PLATFORM_H
|
||||||
|
|
||||||
/* common includes */
|
|
||||||
#include <stdarg.h>
|
|
||||||
|
|
||||||
/* configurable options */
|
/* configurable options */
|
||||||
#define UNIX_HOST /* select your host type */
|
#define UNIX_HOST /* select your host type */
|
||||||
#undef FLYINGFOX_HOST
|
#undef FLYINGFOX_HOST
|
||||||
|
@ -31,6 +28,7 @@
|
||||||
#include <sys/types.h>
|
#include <sys/types.h>
|
||||||
#include <sys/stat.h>
|
#include <sys/stat.h>
|
||||||
#include <unistd.h>
|
#include <unistd.h>
|
||||||
|
#include <stdarg.h>
|
||||||
#ifndef NO_FP
|
#ifndef NO_FP
|
||||||
#include <math.h>
|
#include <math.h>
|
||||||
#endif
|
#endif
|
||||||
|
|
Loading…
Reference in a new issue