2011-10-05 06:57:24 -04:00
|
|
|
#include "../interpreter.h"
|
|
|
|
|
2013-02-23 18:12:47 -05:00
|
|
|
void MsvcSetupFunc()
|
|
|
|
{
|
|
|
|
}
|
|
|
|
|
|
|
|
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)
|
2011-10-05 06:57:24 -04:00
|
|
|
{
|
2013-02-23 18:12:47 -05:00
|
|
|
ReturnValue->Val->Integer = Parser->Line;
|
2011-10-05 06:57:24 -04:00
|
|
|
}
|
2013-02-23 18:12:47 -05:00
|
|
|
|
|
|
|
/* list of all library functions and their prototypes */
|
|
|
|
struct LibraryFunction MsvcFunctions[] =
|
|
|
|
{
|
|
|
|
{ CTest, "void Test(int);" },
|
|
|
|
{ CLineNo, "int LineNo();" },
|
|
|
|
{ NULL, NULL }
|
|
|
|
};
|
|
|
|
|
|
|
|
void PlatformLibraryInit(Picoc *pc)
|
|
|
|
{
|
|
|
|
IncludeRegister(pc, "picoc_msvc.h", &MsvcSetupFunc, &MsvcFunctions[0], NULL);
|
|
|
|
}
|
|
|
|
|