]> CyberLeo.Net >> Repos - FreeBSD/releng/9.2.git/blob - gnu/usr.bin/diff/diff.c.diff
- Copy stable/9 to releng/9.2 as part of the 9.2-RELEASE cycle.
[FreeBSD/releng/9.2.git] / gnu / usr.bin / diff / diff.c.diff
1 $FreeBSD$
2 --- diff.c.orig 2004-04-12 15:44:35.000000000 +0800
3 +++ diff.c      2007-06-15 14:51:05.506679851 +0800
4 @@ -137,7 +137,7 @@
5  }
6  \f
7  static char const shortopts[] =
8 -"0123456789abBcC:dD:eEfF:hHiI:lL:nNpPqrsS:tTuU:vwW:x:X:y";
9 +"0123456789abBcC:dD:eEfF:hHiI:lL:nNopPqrsS:tTuU:vwW:x:X:y";
10  
11  /* Values for long options that do not have single-letter equivalents.  */
12  enum
13 @@ -265,14 +265,15 @@
14    initialize_main (&argc, &argv);
15    program_name = argv[0];
16    setlocale (LC_ALL, "");
17 -  bindtextdomain (PACKAGE, LOCALEDIR);
18    textdomain (PACKAGE);
19    c_stack_action (0);
20    function_regexp_list.buf = &function_regexp;
21    ignore_regexp_list.buf = &ignore_regexp;
22 -  re_set_syntax (RE_SYNTAX_GREP | RE_NO_POSIX_BACKTRACKING);
23 +  re_set_syntax (RE_SYNTAX_GREP);
24    excluded = new_exclude ();
25  
26 +  prepend_default_options (getenv ("DIFF_OPTIONS"), &argc, &argv);
27 +
28    /* Decode the options.  */
29  
30    while ((c = getopt_long (argc, argv, shortopts, longopts, 0)) != -1)
31 @@ -428,6 +429,11 @@
32           new_file = true;
33           break;
34  
35 +       case 'o':
36 +         /* Output in the old tradition style.  */
37 +         specify_style (OUTPUT_NORMAL);
38 +         break;
39 +
40         case 'p':
41           show_c_function = true;
42           add_regexp (&function_regexp_list, "^[[:alpha:]$_]");
43 @@ -983,8 +989,6 @@
44  {
45    if (output_style != style)
46      {
47 -      if (output_style != OUTPUT_UNSPECIFIED)
48 -       try_help ("conflicting output style options", 0);
49        output_style = style;
50      }
51  }