4 #define ARG_ERR_MSG "Wrong argument. Aborting…\n"
6 #include <JavascriptCore/JavascriptCore.h>//-framework JavaScriptCoreオプションを使用の事
9 static JSValueRef jsGlobalPrint(
14 const JSObjectRef args[],
16 static JSValueRef jsGlobalScan(
21 const JSObjectRef args[],
23 static JSValueRef jsGlobalF_Open(
28 const JSObjectRef args[],
30 static JSValueRef jsGlobalExec(
35 const JSObjectRef args[],
38 static JSValueRef jsGlobalTest(
43 const JSObjectRef args[],
46 static JSValueRef jsGlobalCaller(
51 const JSObjectRef args[],
53 static JSValueRef jsGlobalExit(
58 const JSObjectRef args[],
61 extern int interpreter(char* code);
62 extern void functionWrapper(JSGlobalContextRef ctx, JSObjectRef jobjGlobal, char* name, JSObjectCallAsFunctionCallback jsGlobalFunction);
63 extern void classWrapper(JSGlobalContextRef ctx, JSObjectRef jobjGlobal, char* name, JSObjectRef* classObject);
64 extern int dialogtest( int argc, char **argv );
67 char* loadFile(const char* fileName);
68 char* execCmd(const char* cmd);
69 void callJsFunction(JSContextRef ctx, const char* func);
70 void functionLoader(JSGlobalContextRef ctx, JSObjectRef parentObj);
71 static JSValueRef makeException(JSGlobalContextRef ctx, char* ename);