MCPcopy Create free account
hub / github.com/Serial-Studio/Serial-Studio / print_usage

Function print_usage

lib/lua/src/lua.c:83–103  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

81
82
83static void print_usage (const char *badoption) {
84 lua_writestringerror("%s: ", progname);
85 if (badoption[1] == 'e' || badoption[1] == 'l')
86 lua_writestringerror("'%s' needs argument\n", badoption);
87 else
88 lua_writestringerror("unrecognized option '%s'\n", badoption);
89 lua_writestringerror(
90 "usage: %s [options] [script [args]]\n"
91 "Available options are:\n"
92 " -e stat execute string 'stat'\n"
93 " -i enter interactive mode after executing 'script'\n"
94 " -l mod require library 'mod' into global 'mod'\n"
95 " -l g=mod require library 'mod' into global 'g'\n"
96 " -v show version information\n"
97 " -E ignore environment variables\n"
98 " -W turn warnings on\n"
99 " -- stop handling options\n"
100 " - stop handling options and execute stdin\n"
101 ,
102 progname);
103}
104
105
106/*

Callers 1

pmainFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected