2011-05-01 02:50:00 -04:00
|
|
|
/* picoc external interface. This should be the only header you need to use if
|
|
|
|
* you're using picoc as a library. Internal details are in interpreter.h */
|
2008-10-12 20:53:28 -04:00
|
|
|
#ifndef PICOC_H
|
|
|
|
#define PICOC_H
|
|
|
|
|
2011-02-15 17:47:28 -05:00
|
|
|
/* picoc version number */
|
|
|
|
#ifdef VER
|
2011-05-01 02:50:00 -04:00
|
|
|
#define PICOC_VERSION "v2.2 beta r" VER /* VER is the subversion version number, obtained via the Makefile */
|
2011-02-15 17:47:28 -05:00
|
|
|
#else
|
2011-05-01 02:50:00 -04:00
|
|
|
#define PICOC_VERSION "v2.2"
|
2011-02-15 17:47:28 -05:00
|
|
|
#endif
|
|
|
|
|
2008-10-12 20:53:28 -04:00
|
|
|
/* handy definitions */
|
|
|
|
#ifndef TRUE
|
|
|
|
#define TRUE 1
|
|
|
|
#define FALSE 0
|
|
|
|
#endif
|
|
|
|
|
2012-09-22 01:11:44 -04:00
|
|
|
#include "interpreter.h"
|
|
|
|
|
2008-10-12 20:53:28 -04:00
|
|
|
|
2011-10-05 06:57:24 -04:00
|
|
|
#if defined(UNIX_HOST) || defined(WIN32)
|
2011-02-17 21:16:51 -05:00
|
|
|
#include <setjmp.h>
|
|
|
|
|
|
|
|
/* mark where to end the program for platforms which require this */
|
|
|
|
extern jmp_buf PicocExitBuf;
|
|
|
|
|
|
|
|
/* this has to be a macro, otherwise errors will occur due to the stack being corrupt */
|
|
|
|
#define PicocPlatformSetExitPoint() setjmp(PicocExitBuf)
|
|
|
|
#endif
|
|
|
|
|
2011-02-18 17:59:12 -05:00
|
|
|
#ifdef SURVEYOR_HOST
|
|
|
|
/* mark where to end the program for platforms which require this */
|
|
|
|
extern int PicocExitBuf[];
|
|
|
|
|
|
|
|
#define PicocPlatformSetExitPoint() setjmp(PicocExitBuf)
|
|
|
|
#endif
|
2011-02-17 21:16:51 -05:00
|
|
|
|
2008-10-12 20:53:28 -04:00
|
|
|
/* parse.c */
|
2012-09-22 01:11:44 -04:00
|
|
|
void PicocParse(Picoc *pc, const char *FileName, const char *Source, int SourceLen, int RunIt, int CleanupNow, int CleanupSource, int EnableDebugger);
|
|
|
|
void PicocParseInteractive(Picoc *pc);
|
2009-02-24 06:16:37 -05:00
|
|
|
|
2009-04-23 21:02:25 -04:00
|
|
|
/* platform.c */
|
2012-09-22 01:11:44 -04:00
|
|
|
void PicocCallMain(Picoc *pc, int argc, char **argv);
|
|
|
|
void PicocInitialise(Picoc *pc, int StackSize);
|
|
|
|
void PicocCleanup(Picoc *pc);
|
|
|
|
void PicocPlatformScanFile(Picoc *pc, const char *FileName);
|
2010-06-13 07:05:24 -04:00
|
|
|
|
2011-02-17 02:11:20 -05:00
|
|
|
/* include.c */
|
2012-09-22 01:11:44 -04:00
|
|
|
void PicocIncludeAllSystemHeaders(Picoc *pc);
|
2010-07-03 17:07:47 -04:00
|
|
|
|
2009-01-23 06:34:12 -05:00
|
|
|
#endif /* PICOC_H */
|