diff --git a/main.c b/main.c index 86fa5df..2ababc8 100644 --- a/main.c +++ b/main.c @@ -30,6 +30,7 @@ void usage(int status) printf(" or: %s [options]\n\n", PROGRAM_NAME); fputs(" -s enable shell creation mode\n", stdout); fputs(" -S enable shell creation mode as a full project\n", stdout); + fputs(" -i ignore estruct.h and prompt for all\n", stdout); fputs(" --help display this help and exit\n", stdout); fputs(" --version output version information and exit\n", stdout); @@ -38,8 +39,8 @@ void usage(int status) int main(int argc, char **argv) { - int S = 0; - int mode = -1; + int i = 0; + int shell_mode = 0; char *package = NULL; if (argc < 2) @@ -56,14 +57,12 @@ int main(int argc, char **argv) version(); exit(EXIT_SUCCESS); } - else if (strcmp(argv[i], "-s") == 0) { - S = 1; - mode = SINGLE; - } - else if (strcmp(argv[i], "-S") == 0) { - S = 1; - mode = FULL; - } + else if (strcmp(argv[i], "-s") == 0) + shell_mode = SINGLE; + else if (strcmp(argv[i], "-S") == 0) + shell_mode = FULL; + else if (strcmp(argv[i], "-i") == 0) + i = 1; else die("unknown option"); } @@ -74,8 +73,8 @@ int main(int argc, char **argv) if (!package) die("no package name provided"); - if (S == SINGLE || S == FULL) - makeshell(package, mode); + if (shell_mode) + makeshell(package, shell_mode); else makeproj(package);