forked from zsaleeba/picoc
-
Notifications
You must be signed in to change notification settings - Fork 0
/
picoc.h
49 lines (37 loc) · 1.37 KB
/
picoc.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
/* 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 */
#ifndef PICOC_H
#define PICOC_H
/* picoc version number */
#ifdef VER
#define PICOC_VERSION "v2.2 beta r" VER /* VER is the subversion version number, obtained via the Makefile */
#else
#define PICOC_VERSION "v2.2"
#endif
/* handy definitions */
#ifndef TRUE
#define TRUE 1
#define FALSE 0
#endif
#include "interpreter.h"
#if defined(UNIX_HOST) || defined(WIN32)
#include <setjmp.h>
/* this has to be a macro, otherwise errors will occur due to the stack being corrupt */
#define PicocPlatformSetExitPoint(pc) setjmp((pc)->PicocExitBuf)
#endif
#ifdef SURVEYOR_HOST
/* mark where to end the program for platforms which require this */
extern int PicocExitBuf[];
#define PicocPlatformSetExitPoint(pc) setjmp((pc)->PicocExitBuf)
#endif
/* parse.c */
void PicocParse(Picoc *pc, const char *FileName, const char *Source, int SourceLen, int RunIt, int CleanupNow, int CleanupSource, int EnableDebugger);
void PicocParseInteractive(Picoc *pc);
/* platform.c */
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);
/* include.c */
void PicocIncludeAllSystemHeaders(Picoc *pc);
#endif /* PICOC_H */