I suppose I should have mentioned that the diff was against cvs-1.10.8/src/diff.c
Sorry for any confusion.

reattached for context.
Todd Denniston wrote:
> 
> Larry Jones wrote:
> >
<SNIP>
> >
> > I'd start by comparing the options lists in src/diff.c, diff/diff.c, and
> > the rcsdiff man page.  And if you do decide to do it, please change the
> > diff_usage message (in src/diff.c) to document all of the options rather
> > than deferring to "rcsdiff-options".  (And, although I haven't looked, I
> > suspect a similar change ought to be made to the Cederqvist manual.)
> >
> > -Larry Jones
> >
> > Pitiful.  Just pitiful. -- Calvin
> Thanks for the pointers, and I love those C&H comments especially when they hit the 
>context :).
> 
> - I have not looked at changing Cederqvist, I hate doing documentation but love to 
>have it. :)
> - I have updated the diff_usage message.
> note: I looked through and tried to remove any option that did not show up in the
> getopt_long call or in longopts[], but I could have missed one.
> 
> - from what I remember I think people on the list have suggested changing the 
>following line
>     "(The most popular is -c for context diffs but there are many more).\n"
> to indicate that to generate patches the -u option was there i.e.
>     "(The most popular is -c for context diffs and -u for patches).\n"
> but as I could not find you or Greg indicating as such I did not change it.
> 
> -I have done some local testing of various  options and could not find that I had 
>broken anything so this
> should be good.(crosses fingers and grabs the asbestos)
> 

--
--- diff.c      2000/04/01 00:27:55     1.1
+++ diff.c      2000/04/01 00:39:24
@@ -64,6 +64,7 @@
 /* FIXME: should be documenting all the options here.  They don't
    perfectly match rcsdiff options (for example, we always support
    --ifdef and --context, but rcsdiff only does if diff does).  */
+/*should this FIXME comment go away now? -- Todd*/
 static const char *const diff_usage[] =
 {
     "Usage: %s %s [-lNR] [rcsdiff-options]\n",
@@ -76,8 +77,67 @@
     "\t-r rev1\tDiff revision for rev1 against working file.\n",
     "\t-r rev2\tDiff rev1/date1 against rev2.\n",
     "\t--ifdef=arg\tOutput diffs in ifdef format.\n",
-    "(consult the documentation for your diff program for rcsdiff-options.\n",
-    "The most popular is -c for context diffs but there are many more).\n",
+    "  rcsdiff-options are as follows:\n",
+
+"\t-i  --ignore-case  Consider upper- and lower-case to be the same.\n",
+"\t-w  --ignore-all-space  Ignore all white space.\n",
+"\t-b  --ignore-space-change  Ignore changes in the amount of white space.\n",
+"\t-B  --ignore-blank-lines  Ignore changes whose lines are all blank.\n",
+"\t-I RE  --ignore-matching-lines=RE  Ignore changes whose lines all match RE.\n",
+"\t--binary  Read and write data in binary mode.\n",/*it is in the longopts
+                                                     i do not know if it 
+                                                     works*/
+"\t-a  --text  Treat all files as text.\n\n",
+"\t-c  -C NUM  --context[=NUM]  Output NUM (default 2) lines of copied context.\n",
+"\t-u  -U NUM  --unified[=NUM]  Output NUM (default 2) lines of unified context.\n",
+"\t  -NUM  Use NUM context lines.\n",
+"\t  -L LABEL  --label LABEL  Use LABEL instead of file name.\n",
+"\t  -p  --show-c-function  Show which C function each change is in.\n",
+"\t  -F RE  --show-function-line=RE  Show the most recent line matching RE.\n",
+"\t-e  --ed  Output an ed script.\n",
+"\t-n  --rcs  Output an RCS format diff.\n",
+"\t-y  --side-by-side  Output in two columns.\n",
+"\t  --width=NUM  Output at most NUM (default 130) characters per line.\n",
+"\t  --left-column  Output only the left column of common lines.\n",
+"\t  --suppress-common-lines  Do not output common lines.\n",
+"\t-DNAME  --ifdef=NAME  Output merged file to show `#ifdef NAME' diffs.\n",
+"\t--GTYPE-group-format=GFMT  Similar, but format GTYPE input groups with GFMT.\n",
+"\t--line-format=LFMT  Similar, but format all input lines with LFMT.\n",
+"\t--LTYPE-line-format=LFMT  Similar, but format LTYPE input lines with LFMT.\n",
+"\t  LTYPE is `old', `new', or `unchanged'.  GTYPE is LTYPE or `changed'.\n",
+"\t  GFMT may contain:\n",
+"\t    %<  lines from FILE1\n",
+"\t    %>  lines from FILE2\n",
+"\t    %=  lines common to FILE1 and FILE2\n",
+"\t    %[-][WIDTH][.[PREC]]{doxX}LETTER  printf-style spec for LETTER\n",
+"\t      LETTERs are as follows for new group, lower case for old group:\n",
+"\t        F  first line number\n",
+"\t        L  last line number\n",
+"\t        N  number of lines = L-F+1\n",
+"\t        E  F-1\n",
+"\t        M  L+1\n",
+"\t  LFMT may contain:\n",
+"\t    %L  contents of line\n",
+"\t    %l  contents of line, excluding any trailing newline\n",
+"\t    %[-][WIDTH][.[PREC]]{doxX}n  printf-style spec for input line number\n",
+"\t  Either GFMT or LFMT may contain:\n",
+"\t    %%  %\n",
+"\t    %c'C'  the single character C\n",
+"\t    %c'\\OOO'  the character with octal code OOO\n\n",
+"\t-l  --paginate  Pass the output through `pr' to paginate it.\n",
+"\t-t  --expand-tabs  Expand tabs to spaces in output.\n",
+/* "\t-T  --initial-tab  Make tabs line up by prepending a tab.\n\n", */
+    /* there is a conflict between -T in diff(the above) and rcsdiff
+       (Preserve the modification time on the RCS file...) 
+       we could do either but as it is a conflict we do neither. --Todd*/
+"\t-N  --new-file  Treat absent files as empty.\n",
+"\t-s  --report-identical-files  Report when two files are the same.\n",
+"\t--horizon-lines=NUM  Keep NUM lines of the common prefix and suffix.\n",
+"\t-d  --minimal  Try hard to find a smaller set of changes.\n",
+"\t-H  --speed-large-files  Assume large files and many scattered small changes.\n\n",
+
+    "\n",
+    "(The most popular is -c for context diffs but there are many more).\n",
     "(Specify the --help global option for a list of other help options)\n",
     NULL
 };
@@ -138,7 +198,7 @@
     {"report-identical-files", 0, 0, 's'},
     {"expand-tabs", 0, 0, 't'},
     {"ignore-all-space", 0, 0, 'w'},
-    {"side-by-side", 0, 0, 147},
+    {"side-by-side", 0, 0, 'y'}, 
     {"unified", 2, 0, 146},
     {"left-column", 0, 0, 129},
     {"suppress-common-lines", 0, 0, 130},
@@ -185,6 +245,9 @@
    anything.)  For the purposes of producing output, CVS diff appears
    mostly to ignore -q.  Maybe this should be fixed, but I think it's
    a larger issue than the changes included here.  */
+/* the -y option was not used by rcsdiff, only passed to diff.
+   -y: have diff output side by side differences.
+   the other options are noted correctly. -- Todd*/
 
 static void strcat_and_allocate PROTO ((char **, size_t *, const char *));
 
@@ -246,7 +309,7 @@
 
     optind = 0;
     while ((c = getopt_long (argc, argv,
-              "+abcdefhilnpstuw0123456789BHNRC:D:F:I:L:U:V:W:k:r:",
+              "+abcdefhilnpstuyw0123456789BHNRC:D:F:I:L:U:V:W:k:r:",
                             longopts, &option_index)) != -1)
     {
        switch (c)
@@ -255,7 +318,7 @@
            case 'h': case 'i': case 'n': case 'p': case 's': case 't':
            case 'u': case 'w': case '0': case '1': case '2':
            case '3': case '4': case '5': case '6': case '7': case '8':
-           case '9': case 'B': case 'H':
+           case '9': case 'B': case 'H': case 'y':
                (void) sprintf (tmp, " -%c", (char) c);
                strcat_and_allocate (&opts, &opts_allocated, tmp);
                break;
@@ -283,7 +346,7 @@
            case 129: case 130:           case 132: case 133: case 134:
            case 135: case 136: case 137: case 138: case 139: case 140:
            case 141: case 142: case 143: case 144: case 145: case 146:
-           case 147: case 148:
+           case 148:
                strcat_and_allocate (&opts, &opts_allocated, " --");
                strcat_and_allocate (&opts, &opts_allocated,
                                     longopts[option_index].name);

Reply via email to