View | Details | Raw Unified | Return to bug 250015
Collapse All | Expand All

(-)b/usr.bin/diff/diff.c (-11 / +2 lines)
Lines 210-226 main(int argc, char **argv) Link Here
210
			diff_format = D_NREVERSE;
210
			diff_format = D_NREVERSE;
211
			break;
211
			break;
212
		case 'p':
212
		case 'p':
213
			/*
214
			 * If it's not unset and it's not set to context or
215
			 * unified, we'll error out here as a conflicting
216
			 * format.  If it's unset, we'll go ahead and set it to
217
			 * context.
218
			 */
219
			if (FORMAT_MISMATCHED(D_CONTEXT) &&
220
			    FORMAT_MISMATCHED(D_UNIFIED))
221
				conflicting_format();
222
			if (diff_format == D_UNSET)
223
				diff_format = D_CONTEXT;
224
			dflags |= D_PROTOTYPE;
213
			dflags |= D_PROTOTYPE;
225
			break;
214
			break;
226
		case 'P':
215
		case 'P':
Lines 320-325 main(int argc, char **argv) Link Here
320
		newarg = optind != prevoptind;
309
		newarg = optind != prevoptind;
321
		prevoptind = optind;
310
		prevoptind = optind;
322
	}
311
	}
312
	if (diff_format == D_UNSET && (dflags & D_PROTOTYPE) != 0)
313
		diff_format = D_CONTEXT;
323
	if (diff_format == D_UNSET)
314
	if (diff_format == D_UNSET)
324
		diff_format = D_NORMAL;
315
		diff_format = D_NORMAL;
325
	argc -= optind;
316
	argc -= optind;

Return to bug 250015