kolibrios/programs/develop/kosjs/kosjs.c
maxcodehack 91ae0dee0b kosjs: replace libmujs.a with sources; if argc = 0, see "usage"
git-svn-id: svn://kolibrios.org@8456 a494cfbc-eb01-0410-851d-a64ba20cac60
2020-12-20 08:45:42 +00:00

19 lines
278 B
C
Executable File

#include <stdio.h>
#include <stdlib.h>
#include <mujs.h>
#include <import.h>
int main(int argc, char **argv)
{
if (argc == 1) {
printf("usage: %s [program.js]\n", argv[0]);
} else {
import_functions();
js_dofile(J, argv[1]);
js_freestate (J);
}
exit(0);
}