forked from zsaleeba/picoc
-
Notifications
You must be signed in to change notification settings - Fork 0
/
platform_ffox.c
51 lines (42 loc) · 1014 Bytes
/
platform_ffox.c
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
50
#include "../interpreter.h"
/* deallocate any storage */
void PlatformCleanup()
{
}
/* get a line of interactive input */
char *PlatformGetLine(char *Buf, int MaxLen)
{
// XXX - unimplemented so far
return NULL;
}
/* get a character of interactive input */
int PlatformGetCharacter()
{
// XXX - unimplemented so far
return 0;
}
/* write a character to the console */
void PlatformPutc(unsigned char OutCh, union OutputStreamInfo *Stream)
{
// XXX - unimplemented so far
}
/* read a file into memory */
char *PlatformReadFile(const char *FileName)
{
// XXX - unimplemented so far
return NULL;
}
/* read and scan a file for definitions */
void PlatformScanFile(const char *FileName)
{
char *SourceStr = PlatformReadFile(FileName);
Parse(FileName, SourceStr, strlen(SourceStr), TRUE);
//free(SourceStr);
}
/* mark where to end the program for platforms which require this */
jmp_buf ExitBuf;
/* exit the program */
void PlatformExit()
{
longjmp(ExitBuf, 1);
}