4 #define ARG_ERR_MSG "Wrong argument. Aborting…\n"
7 #include <JavascriptCore/JavascriptCore.h>//-framework JavaScriptCoreオプションを使用の事
9 #include <JavaScriptCore/JavascriptCore.h>
13 static JSValueRef jsGlobalPrint(
18 const JSObjectRef args[],
20 static JSValueRef jsGlobalScan(
25 const JSObjectRef args[],
27 static JSValueRef jsGlobalF_Open(
32 const JSObjectRef args[],
34 static JSValueRef jsGlobalExec(
39 const JSObjectRef args[],
42 static JSValueRef jsGlobalTest(
47 const JSObjectRef args[],
50 static JSValueRef jsGlobalCaller(
55 const JSObjectRef args[],
57 static JSValueRef jsGlobalExit(
62 const JSObjectRef args[],
65 extern int interpreter(char* code);
66 extern void functionWrapper(JSGlobalContextRef ctx, JSObjectRef jobjGlobal, char* name, JSObjectCallAsFunctionCallback jsGlobalFunction);
67 extern void classWrapper(JSGlobalContextRef ctx, JSObjectRef jobjGlobal, char* name, JSObjectRef* classObject, JSObjectCallAsConstructorCallback callAsConstructor);
68 extern int dialogtest( int argc, char **argv );
71 char* loadFile(const char* fileName);
72 char* execCmd(const char* cmd);
73 void callJsFunction(JSContextRef ctx, const char* func);
74 void functionLoader(JSGlobalContextRef ctx, JSObjectRef parentObj);
75 static JSValueRef makeException(JSGlobalContextRef ctx, char* ename);