0fc32f5bc7
C standard library modules neater. git-svn-id: http://picoc.googlecode.com/svn/trunk@427 21eae674-98b7-11dd-bd71-f92a316d2d60
26 lines
615 B
C
26 lines
615 B
C
#include "../picoc.h"
|
|
|
|
void PlatformLibraryInit()
|
|
{
|
|
}
|
|
|
|
void Ctest (struct ParseState *Parser, struct Value *ReturnValue, struct Value **Param, int NumArgs)
|
|
{
|
|
printf("test(%d)\n", Param[0]->Val->Integer);
|
|
Param[0]->Val->Integer = 1234;
|
|
}
|
|
|
|
void Clineno (struct ParseState *Parser, struct Value *ReturnValue, struct Value **Param, int NumArgs)
|
|
{
|
|
ReturnValue->Val->Integer = Parser->Line;
|
|
}
|
|
|
|
/* list of all library functions and their prototypes */
|
|
struct LibraryFunction PlatformLibrary[] =
|
|
{
|
|
{ Ctest, "void test(int);" },
|
|
{ Clineno, "int lineno();" },
|
|
{ NULL, NULL }
|
|
};
|
|
|