Lines 100-105
Link Here
|
100 |
}; |
100 |
}; |
101 |
|
101 |
|
102 |
void usage(void) __dead2; |
102 |
void usage(void) __dead2; |
|
|
103 |
void conflicting_format(void) __dead2; |
103 |
void push_excludes(char *); |
104 |
void push_excludes(char *); |
104 |
void push_ignore_pats(char *); |
105 |
void push_ignore_pats(char *); |
105 |
void read_excludes_file(char *file); |
106 |
void read_excludes_file(char *file); |
Lines 141-146
Link Here
|
141 |
break; |
142 |
break; |
142 |
case 'C': |
143 |
case 'C': |
143 |
case 'c': |
144 |
case 'c': |
|
|
145 |
if (diff_format != D_NORMAL) |
146 |
conflicting_format(); |
144 |
cflag = 1; |
147 |
cflag = 1; |
145 |
diff_format = D_CONTEXT; |
148 |
diff_format = D_CONTEXT; |
146 |
if (optarg != NULL) { |
149 |
if (optarg != NULL) { |
Lines 154-166
Link Here
|
154 |
dflags |= D_MINIMAL; |
157 |
dflags |= D_MINIMAL; |
155 |
break; |
158 |
break; |
156 |
case 'D': |
159 |
case 'D': |
|
|
160 |
if (diff_format != D_NORMAL) |
161 |
conflicting_format(); |
157 |
diff_format = D_IFDEF; |
162 |
diff_format = D_IFDEF; |
158 |
ifdefname = optarg; |
163 |
ifdefname = optarg; |
159 |
break; |
164 |
break; |
160 |
case 'e': |
165 |
case 'e': |
|
|
166 |
if (diff_format != D_NORMAL) |
167 |
conflicting_format(); |
161 |
diff_format = D_EDIT; |
168 |
diff_format = D_EDIT; |
162 |
break; |
169 |
break; |
163 |
case 'f': |
170 |
case 'f': |
|
|
171 |
if (diff_format != D_NORMAL) |
172 |
conflicting_format(); |
164 |
diff_format = D_REVERSE; |
173 |
diff_format = D_REVERSE; |
165 |
break; |
174 |
break; |
166 |
case 'H': |
175 |
case 'H': |
Lines 193-202
Link Here
|
193 |
Nflag = 1; |
202 |
Nflag = 1; |
194 |
break; |
203 |
break; |
195 |
case 'n': |
204 |
case 'n': |
|
|
205 |
if (diff_format != D_NORMAL) |
206 |
conflicting_format(); |
196 |
diff_format = D_NREVERSE; |
207 |
diff_format = D_NREVERSE; |
197 |
break; |
208 |
break; |
198 |
case 'p': |
209 |
case 'p': |
199 |
if (diff_format == 0) |
210 |
if (diff_format == D_NORMAL) |
200 |
diff_format = D_CONTEXT; |
211 |
diff_format = D_CONTEXT; |
201 |
dflags |= D_PROTOTYPE; |
212 |
dflags |= D_PROTOTYPE; |
202 |
break; |
213 |
break; |
Lines 207-212
Link Here
|
207 |
rflag = 1; |
218 |
rflag = 1; |
208 |
break; |
219 |
break; |
209 |
case 'q': |
220 |
case 'q': |
|
|
221 |
if (diff_format != D_NORMAL) |
222 |
conflicting_format(); |
210 |
diff_format = D_BRIEF; |
223 |
diff_format = D_BRIEF; |
211 |
break; |
224 |
break; |
212 |
case 'S': |
225 |
case 'S': |
Lines 223-228
Link Here
|
223 |
break; |
236 |
break; |
224 |
case 'U': |
237 |
case 'U': |
225 |
case 'u': |
238 |
case 'u': |
|
|
239 |
if (diff_format != D_NORMAL) |
240 |
conflicting_format(); |
226 |
diff_format = D_UNIFIED; |
241 |
diff_format = D_UNIFIED; |
227 |
if (optarg != NULL) { |
242 |
if (optarg != NULL) { |
228 |
l = strtol(optarg, &ep, 10); |
243 |
l = strtol(optarg, &ep, 10); |
Lines 249-257
Link Here
|
249 |
push_excludes(optarg); |
264 |
push_excludes(optarg); |
250 |
break; |
265 |
break; |
251 |
case 'y': |
266 |
case 'y': |
|
|
267 |
if (diff_format != D_NORMAL) |
268 |
conflicting_format(); |
252 |
diff_format = D_SIDEBYSIDE; |
269 |
diff_format = D_SIDEBYSIDE; |
253 |
break; |
270 |
break; |
254 |
case OPT_CHANGED_GROUP_FORMAT: |
271 |
case OPT_CHANGED_GROUP_FORMAT: |
|
|
272 |
if (diff_format != D_NORMAL) |
273 |
conflicting_format(); |
255 |
diff_format = D_GFORMAT; |
274 |
diff_format = D_GFORMAT; |
256 |
group_format = optarg; |
275 |
group_format = optarg; |
257 |
break; |
276 |
break; |
Lines 491-493
Link Here
|
491 |
|
510 |
|
492 |
exit(2); |
511 |
exit(2); |
493 |
} |
512 |
} |
|
|
513 |
|
514 |
void |
515 |
conflicting_format(void) |
516 |
{ |
517 |
fprintf(stderr, "error: conflicting output format options.\n"); |
518 |
usage(); |
519 |
} |