Lines 1121-1172
Link Here
|
1121 |
} |
1121 |
} |
1122 |
|
1122 |
|
1123 |
|
1123 |
|
1124 |
static void do_options(c,op) |
1124 |
static void do_options(argc,argv) |
1125 |
int c; |
1125 |
int argc; |
1126 |
char *op[]; |
1126 |
char *argv[]; |
1127 |
{ |
1127 |
{ |
1128 |
int i; |
1128 |
int c; |
1129 |
|
1129 |
|
1130 |
if (c > 1) |
1130 |
while ((c = getopt(argc, argv, "bcs")) != -1) { |
1131 |
{ |
1131 |
switch (c) { |
1132 |
for (i=1; i<c; i++) |
1132 |
case 'b': |
1133 |
{ |
1133 |
if (salvo == 1) |
1134 |
switch(op[i][0]) |
|
|
1135 |
{ |
1136 |
default: |
1137 |
case '?': |
1138 |
usage(); |
1139 |
break; |
1140 |
case '-': |
1141 |
switch(op[i][1]) |
1142 |
{ |
1134 |
{ |
1143 |
case 'b': |
1135 |
(void) fprintf(stderr, |
|
|
1136 |
"Bad Arg: -b and -s are mutually exclusive\n"); |
1137 |
exit(1); |
1138 |
} |
1139 |
else |
1144 |
blitz = 1; |
1140 |
blitz = 1; |
1145 |
if (salvo == 1) |
1141 |
break; |
1146 |
{ |
1142 |
case 's': |
1147 |
(void) fprintf(stderr, |
1143 |
if (blitz == 1) |
1148 |
"Bad Arg: -b and -s are mutually exclusive\n"); |
1144 |
{ |
1149 |
exit(1); |
|
|
1150 |
} |
1151 |
break; |
1152 |
case 's': |
1153 |
salvo = 1; |
1154 |
if (blitz == 1) |
1155 |
{ |
1156 |
(void) fprintf(stderr, |
1157 |
"Bad Arg: -s and -b are mutually exclusive\n"); |
1158 |
exit(1); |
1159 |
} |
1160 |
break; |
1161 |
case 'c': |
1162 |
closepack = 1; |
1163 |
break; |
1164 |
default: |
1165 |
(void) fprintf(stderr, |
1145 |
(void) fprintf(stderr, |
1166 |
"Bad arg: type \"%s ?\" for usage message\n", op[0]); |
1146 |
"Bad Arg: -s and -b are mutually exclusive\n"); |
1167 |
exit(1); |
1147 |
exit(1); |
1168 |
} |
1148 |
} |
1169 |
} |
1149 |
else |
|
|
1150 |
salvo = 1; |
1151 |
break; |
1152 |
case 'c': |
1153 |
closepack = 1; |
1154 |
break; |
1155 |
case '?': |
1156 |
default: |
1157 |
usage(); |
1158 |
break; |
1170 |
} |
1159 |
} |
1171 |
} |
1160 |
} |
1172 |
} |
1161 |
} |