bad option -> exit(1)

This commit is contained in:
tTh 2023-05-29 09:06:57 +02:00
parent 58e782de84
commit cc647b43b4
13 changed files with 13 additions and 0 deletions

View File

@ -74,6 +74,7 @@ while ((opt = getopt(argc, argv, "gho:svx")) != -1) {
case 's': rescale = 1; break;
case 'v': verbosity++; break;
case 'x': experiment++; break;
default: exit(1);
}
}

View File

@ -53,6 +53,7 @@ while ((opt = getopt(argc, argv, "p:hv")) != -1) {
case 'p': plane = optarg[0]; break;
case 'v': verbosity++; break;
case 'h': help(1); exit(1);
default: exit(1);
}
}

View File

@ -80,6 +80,7 @@ while ((opt = getopt(argc, argv, "ghv")) != -1) {
case 'g': to_gray = 1; break;
case 'v': verbosity++; break;
case 'h': help(1); exit(1);
default: exit(1);
}
}

View File

@ -98,6 +98,7 @@ while ((opt = getopt(argc, argv, "ghv")) != -1) {
case 'g': to_gray = 1; break;
case 'v': verbosity++; break;
case 'h': help(1); exit(1);
default: exit(1);
}
}

View File

@ -166,6 +166,7 @@ while ((opt = getopt(argc, argv, "f:hn:s:v")) != -1) {
case 'h': help(1); exit(1);
case 's': steps = atoi(optarg); break;
case 'n': norm_val = atof(optarg); break;
default: exit(1);
}
}

View File

@ -81,6 +81,7 @@ while ((opt = getopt(argc, argv, "ghv")) != -1) {
case 'g': to_gray = 1; break;
case 'v': verbosity++; break;
case 'h': help(1); exit(1);
default: exit(1);
}
}

View File

@ -88,6 +88,7 @@ while ((opt = getopt(argc, argv, "ho:vx")) != -1) {
case 'o': output_file = optarg; break;
case 'v': verbosity++; break;
case 'x': experiment++; break;
default: exit(1);
}
}

View File

@ -311,6 +311,7 @@ while ((opt = getopt(argc, argv, "hk:lvx")) != -1) {
case 'l': list_of_effects(); exit(0);
case 'v': verbosity++; break;
case 'x': break;
default: exit(1);
}
}

View File

@ -70,6 +70,7 @@ while ((opt = getopt(argc, argv, "ghv")) != -1) {
case 'g': grayed = 1; break;
case 'h': help(0); break;
case 'v': verbosity++; break;
default: exit(1);
}
}

View File

@ -113,6 +113,7 @@ while ((opt = getopt(argc, argv, "hv")) != -1) {
switch(opt) {
case 'h': help(); break;
case 'v': verbosity++; break;
default: exit(1);
}
}

View File

@ -118,6 +118,7 @@ while ((opt = getopt(argc, argv, "hk:v")) != -1) {
case 'h': help(0); break;
case 'k': global_fvalue = atof(optarg); break;
case 'v': verbosity++; break;
default: exit(1);
}
}

View File

@ -117,6 +117,7 @@ while ((opt = getopt(argc, argv, "hk:Lmt:v")) != -1) {
break;
case 'L': list_types(); break;
case 'v': verbosity++; break;
default: exit(1);
}
}

View File

@ -34,6 +34,7 @@ while ((opt = getopt(argc, argv, "hv")) != -1) {
switch(opt) {
case 'v': verbosity++; break;
case 'h': help(1); exit(1);
default: exit(1);
}
}