Skip to content
Snippets Groups Projects
Commit 6751ec5c authored by Rob Swindell's avatar Rob Swindell :speech_balloon:
Browse files

Apply Deuce's feedback on the usage/syntax help output.

Also change the wording of the -D option to be more descriptive.
parent dd6684a2
No related branches found
No related tags found
1 merge request!463MRC mods by Codefenix (2024-10-20)
Pipeline #1259 passed
...@@ -105,8 +105,11 @@ void usage() ...@@ -105,8 +105,11 @@ void usage()
{ {
banner(stdout); banner(stdout);
fprintf(stdout, "\nusage: " PROG_NAME_LC " [-opts] [[path/]module[.js] or -r js-expression] [args]\n" fprintf(stdout, "\nusage: " PROG_NAME_LC " [-opts] [[path/]module[.js] [args]\n"
" or: " PROG_NAME_LC " [-opts] -r js-expression [args]\n"
" or: " PROG_NAME_LC " -v\n"
"\navailable opts:\n\n" "\navailable opts:\n\n"
" -r<expression> run (compile and execute) JavaScript expression\n"
#ifdef JSDOOR #ifdef JSDOOR
" -c<ctrl_dir> specify path to CTRL directory\n" " -c<ctrl_dir> specify path to CTRL directory\n"
#else #else
...@@ -144,7 +147,7 @@ void usage() ...@@ -144,7 +147,7 @@ void usage()
" -l loop until intentionally terminated\n" " -l loop until intentionally terminated\n"
" -p wait for keypress (pause) on exit\n" " -p wait for keypress (pause) on exit\n"
" -! wait for keypress (pause) on error\n" " -! wait for keypress (pause) on error\n"
" -D debugs the script\n" " -D load the script into an interactive debugger\n"
,JAVASCRIPT_MAX_BYTES ,JAVASCRIPT_MAX_BYTES
,JAVASCRIPT_TIME_LIMIT ,JAVASCRIPT_TIME_LIMIT
,JAVASCRIPT_YIELD_INTERVAL ,JAVASCRIPT_YIELD_INTERVAL
...@@ -1385,7 +1388,7 @@ int main(int argc, char **argv, char** env) ...@@ -1385,7 +1388,7 @@ int main(int argc, char **argv, char** env)
umask(umask_val); umask(umask_val);
if(module==NULL && js_buf==NULL && isatty(fileno(stdin))) { if(module==NULL && js_buf==NULL && isatty(fileno(stdin))) {
fprintf(stderr,"\n!Module name not specified\n"); fprintf(stderr,"\n!No JavaScirpt module-name or expression specified\n");
usage(); usage();
return(do_bail(1)); return(do_bail(1));
} }
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment