Command line arguments, err messages, help; remove Proxy functions from JS
This commit is contained in:
@@ -1059,7 +1059,8 @@ JSValue duk_cmd(JSContext *js, JSValueConst this, int argc, JSValueConst *argv)
|
||||
break;
|
||||
|
||||
case 124:
|
||||
pack_engine();
|
||||
str = JS_ToCString(js, argv[1]);
|
||||
pack_engine(str);
|
||||
break;
|
||||
|
||||
case 125:
|
||||
|
||||
@@ -254,18 +254,18 @@ static int ftw_pack(const char *path, const struct stat *sb, int flag)
|
||||
return 0;
|
||||
}
|
||||
|
||||
void pack_engine()
|
||||
void pack_engine(const char *fname)
|
||||
{
|
||||
int fd;
|
||||
char *key, *va;
|
||||
unsigned klen, vlen;
|
||||
fd = open("test.cdb", O_RDWR|O_CREAT);
|
||||
fd = open(fname, O_RDWR|O_CREAT);
|
||||
cdb_make_start(&cdbm, fd);
|
||||
ftw(".", ftw_pack, 20);
|
||||
cdb_make_finish(&cdbm);
|
||||
}
|
||||
#else
|
||||
void pack_engine(){
|
||||
void pack_engine(const char *fname){
|
||||
YughError("Cannot pack engine on a web build.");
|
||||
}
|
||||
#endif
|
||||
|
||||
@@ -20,6 +20,6 @@ unsigned char *slurp_file(const char *filename, long *size);
|
||||
char *slurp_text(const char *filename);
|
||||
int slurp_write(const char *txt, const char *filename);
|
||||
|
||||
void pack_engine();
|
||||
void pack_engine(const char *fname);
|
||||
|
||||
#endif
|
||||
|
||||
@@ -146,6 +146,8 @@ static char **args;
|
||||
|
||||
void c_init() {
|
||||
render_init();
|
||||
|
||||
script_evalf("initialize();");
|
||||
}
|
||||
|
||||
int frame_fps() {
|
||||
|
||||
Reference in New Issue
Block a user