| 60 | |
| 61 | |
| 62 | static void print_usage (const char *badoption) { |
| 63 | lua_writestringerror("%s: ", progname); |
| 64 | if (badoption[1] == 'e' || badoption[1] == 'l') |
| 65 | lua_writestringerror("'%s' needs argument\n", badoption); |
| 66 | else |
| 67 | lua_writestringerror("unrecognized option '%s'\n", badoption); |
| 68 | lua_writestringerror( |
| 69 | "usage: %s [options] [script [args]]\n" |
| 70 | "Available options are:\n" |
| 71 | " -e stat execute string 'stat'\n" |
| 72 | " -i enter interactive mode after executing 'script'\n" |
| 73 | " -l name require library 'name' into global 'name'\n" |
| 74 | " -v show version information\n" |
| 75 | " -E ignore environment variables\n" |
| 76 | " -W turn warnings on\n" |
| 77 | " -- stop handling options\n" |
| 78 | " - stop handling options and execute stdin\n" |
| 79 | , |
| 80 | progname); |
| 81 | } |
| 82 | |
| 83 | |
| 84 | /* |