| 128 | |
| 129 | |
| 130 | static void print_usage (const char *badoption) { |
| 131 | lua_writestringerror("%s: ", progname); |
| 132 | if (badoption[1] == 'e' || badoption[1] == 'l') |
| 133 | lua_writestringerror("'%s' needs argument\n", badoption); |
| 134 | else |
| 135 | lua_writestringerror("unrecognized option '%s'\n", badoption); |
| 136 | lua_writestringerror( |
| 137 | "usage: %s [options] [script [args]]\n" |
| 138 | "Available options are:\n" |
| 139 | " -e stat execute string 'stat'\n" |
| 140 | " -i enter interactive mode after executing 'script'\n" |
| 141 | " -l name require library 'name' into global 'name'\n" |
| 142 | " -v show version information\n" |
| 143 | " -E ignore environment variables\n" |
| 144 | " -- stop handling options\n" |
| 145 | " - stop handling options and execute stdin\n" |
| 146 | , |
| 147 | progname); |
| 148 | } |
| 149 | |
| 150 | |
| 151 | /* |