static void usage(const char* message) { if (*message=='-') zipfs_fprintf(zipfs_stderr,"%s: unrecognized option " LUA_QS "\n",progname,message); else zipfs_fprintf(zipfs_stderr,"%s: %s\n",progname,message); zipfs_fprintf(zipfs_stderr, "usage: %s [options] [filenames].\n" "Available options are:\n" " - process zipfs_stdin\n" " -l list\n" " -o name output to file " LUA_QL("name") " (default is \"%s\")\n" " -p parse only\n" " -s strip debug information\n" " -v show version information\n" " -- stop handling options\n", progname,Output); exit(EXIT_FAILURE); }
static void print_usage (void) { zipfs_fprintf(zipfs_stderr, "usage: %s [options] [script [args]].\n" "Available options are:\n" " -e stat execute string " LUA_QL("stat") "\n" " -l name require library " LUA_QL("name") "\n" " -i enter interactive mode after executing " LUA_QL("script") "\n" " -v show version information\n" " -- stop handling options\n" " - execute zipfs_stdin and stop handling options\n" , progname); zipfs_fflush(zipfs_stderr); }
static void l_message (const char *pname, const char *msg) { if (pname) zipfs_fprintf(zipfs_stderr, "%s: ", pname); zipfs_fprintf(zipfs_stderr, "%s\n", msg); zipfs_fflush(zipfs_stderr); }
static void cannot(const char* what) { zipfs_fprintf(zipfs_stderr,"%s: cannot %s %s: %s\n",progname,what,output,strerror(errno)); exit(EXIT_FAILURE); }
static void fatal(const char* message) { zipfs_fprintf(zipfs_stderr,"%s: %s\n",progname,message); exit(EXIT_FAILURE); }