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
|
|
|
|
|
2015-06-17 17:34:26 -04:00
|
|
|
|
2011-02-15 17:47:28 -05:00
|
|
|
/* picoc version number */
|
|
|
|
#ifdef VER
|
2015-06-17 04:51:29 -04:00
|
|
|
/* VER is the git hash number, obtained via the Makefile */
|
|
|
|
#define PICOC_VERSION TAG " r" VER
|
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
|
|
|
|
|
2012-09-22 01:11:44 -04:00
|
|
|
#include "interpreter.h"
|
|
|
|
|
2015-06-17 17:34:26 -04:00
|
|
|
/* this has to be a macro, otherwise errors will occur due to
|
|
|
|
the stack being corrupt */
|
2012-09-23 04:13:05 -04:00
|
|
|
#define PicocPlatformSetExitPoint(pc) setjmp((pc)->PicocExitBuf)
|
2015-06-17 17:34:26 -04:00
|
|
|
|
2011-02-17 21:16:51 -05:00
|
|
|
|
2008-10-12 20:53:28 -04:00
|
|
|
/* parse.c */
|
2015-06-17 04:51:29 -04:00
|
|
|
extern void PicocParse(Picoc *pc, const char *FileName, const char *Source,
|
|
|
|
int SourceLen, int RunIt, int CleanupNow, int CleanupSource, int EnableDebugger);
|
2015-06-07 02:28:10 -04:00
|
|
|
extern void PicocParseInteractive(Picoc *pc);
|
2009-02-24 06:16:37 -05:00
|
|
|
|
2009-04-23 21:02:25 -04:00
|
|
|
/* platform.c */
|
2015-06-07 02:28:10 -04:00
|
|
|
extern void PicocCallMain(Picoc *pc, int argc, char **argv);
|
|
|
|
extern void PicocInitialise(Picoc *pc, int StackSize);
|
|
|
|
extern void PicocCleanup(Picoc *pc);
|
|
|
|
extern 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 */
|
2015-06-07 02:28:10 -04:00
|
|
|
extern void PicocIncludeAllSystemHeaders(Picoc *pc);
|
2010-07-03 17:07:47 -04:00
|
|
|
|
2009-01-23 06:34:12 -05:00
|
|
|
#endif /* PICOC_H */
|