summaryrefslogtreecommitdiffstats
path: root/contrib/diff/src/diff.c
diff options
context:
space:
mode:
authorobrien <obrien@FreeBSD.org>2012-08-17 18:20:38 +0000
committerobrien <obrien@FreeBSD.org>2012-08-17 18:20:38 +0000
commita941b72fdcab943e0f1e1808f5006a4bcaefca52 (patch)
tree616bba1a4cc7a708e0aaea3712968c5fe7b4fd6f /contrib/diff/src/diff.c
parentb45a39ac78c3f73e5a6b942853a315637798663d (diff)
downloadFreeBSD-src-a941b72fdcab943e0f1e1808f5006a4bcaefca52.zip
FreeBSD-src-a941b72fdcab943e0f1e1808f5006a4bcaefca52.tar.gz
Catch up with the subversion conversion and apply these build-time patches.
Diffstat (limited to 'contrib/diff/src/diff.c')
-rw-r--r--contrib/diff/src/diff.c14
1 files changed, 9 insertions, 5 deletions
diff --git a/contrib/diff/src/diff.c b/contrib/diff/src/diff.c
index a975107..b54ba04 100644
--- a/contrib/diff/src/diff.c
+++ b/contrib/diff/src/diff.c
@@ -137,7 +137,7 @@ exclude_options (void)
}
static char const shortopts[] =
-"0123456789abBcC:dD:eEfF:hHiI:lL:nNpPqrsS:tTuU:vwW:x:X:y";
+"0123456789abBcC:dD:eEfF:hHiI:lL:nNopPqrsS:tTuU:vwW:x:X:y";
/* Values for long options that do not have single-letter equivalents. */
enum
@@ -265,14 +265,15 @@ main (int argc, char **argv)
initialize_main (&argc, &argv);
program_name = argv[0];
setlocale (LC_ALL, "");
- bindtextdomain (PACKAGE, LOCALEDIR);
textdomain (PACKAGE);
c_stack_action (0);
function_regexp_list.buf = &function_regexp;
ignore_regexp_list.buf = &ignore_regexp;
- re_set_syntax (RE_SYNTAX_GREP | RE_NO_POSIX_BACKTRACKING);
+ re_set_syntax (RE_SYNTAX_GREP);
excluded = new_exclude ();
+ prepend_default_options (getenv ("DIFF_OPTIONS"), &argc, &argv);
+
/* Decode the options. */
while ((c = getopt_long (argc, argv, shortopts, longopts, 0)) != -1)
@@ -428,6 +429,11 @@ main (int argc, char **argv)
new_file = true;
break;
+ case 'o':
+ /* Output in the old tradition style. */
+ specify_style (OUTPUT_NORMAL);
+ break;
+
case 'p':
show_c_function = true;
add_regexp (&function_regexp_list, "^[[:alpha:]$_]");
@@ -983,8 +989,6 @@ specify_style (enum output_style style)
{
if (output_style != style)
{
- if (output_style != OUTPUT_UNSPECIFIED)
- try_help ("conflicting output style options", 0);
output_style = style;
}
}
OpenPOWER on IntegriCloud