MCPcopy Create free account
hub / github.com/DFHack/dfhack / print_usage

Function print_usage

depends/lua/src/lua.c:130–148  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

128
129
130static 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/*

Callers 1

pmainFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected