MSVC library implementation submitted by kevingarceau.
Issue #175 git-svn-id: http://picoc.googlecode.com/svn/trunk@587 21eae674-98b7-11dd-bd71-f92a316d2d60
This commit is contained in:
parent
3350152693
commit
44dee0da92
|
@ -1,5 +1,30 @@
|
||||||
#include "../interpreter.h"
|
#include "../interpreter.h"
|
||||||
|
|
||||||
void PlatformLibraryInit()
|
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)
|
||||||
|
{
|
||||||
|
ReturnValue->Val->Integer = Parser->Line;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* 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);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue