[BACK]Return to diff.c CVS log [TXT][DIR] Up to [local] / src / usr.bin / diff

Diff for /src/usr.bin/diff/diff.c between version 1.32 and 1.33

version 1.32, 2003/07/21 23:02:35 version 1.33, 2003/07/22 01:16:01
Line 39 
Line 39 
   
 #include "diff.h"  #include "diff.h"
   
 int      aflag, bflag, iflag, lflag, Nflag, Pflag, rflag, sflag, tflag, wflag;  int      aflag, bflag, iflag, lflag, Nflag, Pflag, rflag, sflag, tflag, Tflag,
            wflag;
 int      format, context, status;  int      format, context, status;
 char    *start, *ifdefname, *diffargs;  char    *start, *ifdefname, *diffargs, *label;
 struct stat stb1, stb2;  struct stat stb1, stb2;
 struct excludes *excludes_list;  struct excludes *excludes_list;
   
 #define OPTIONS "abC:cD:efhilnNPqrS:stU:uwX:x:"  #define OPTIONS "abC:cD:efhiL:lnNPqrS:sTtU:uwX:x:"
 static struct option longopts[] = {  static struct option longopts[] = {
         { "text",                       no_argument,            0,      'a' },          { "text",                       no_argument,            0,      'a' },
         { "ignore-space-change",        no_argument,            0,      'b' },          { "ignore-space-change",        no_argument,            0,      'b' },
Line 55 
Line 56 
         { "forward-ed",                 no_argument,            0,      'f' },          { "forward-ed",                 no_argument,            0,      'f' },
         { "ignore-case",                no_argument,            0,      'i' },          { "ignore-case",                no_argument,            0,      'i' },
         { "paginate",                   no_argument,            0,      'l' },          { "paginate",                   no_argument,            0,      'l' },
           { "label",                      required_argument,      0,      'L' },
         { "new-file",                   no_argument,            0,      'N' },          { "new-file",                   no_argument,            0,      'N' },
         { "rcs",                        no_argument,            0,      'n' },          { "rcs",                        no_argument,            0,      'n' },
         { "unidirectional-new-file",    no_argument,            0,      'P' },          { "unidirectional-new-file",    no_argument,            0,      'P' },
Line 63 
Line 65 
         { "report-identical-files",     no_argument,            0,      's' },          { "report-identical-files",     no_argument,            0,      's' },
         { "starting-file",              required_argument,      0,      'S' },          { "starting-file",              required_argument,      0,      'S' },
         { "expand-tabs",                no_argument,            0,      't' },          { "expand-tabs",                no_argument,            0,      't' },
           { "intial-tab",                 no_argument,            0,      'T' },
         { "unified",                    optional_argument,      0,      'U' },          { "unified",                    optional_argument,      0,      'U' },
         { "ignore-all-space",           no_argument,            0,      'w' },          { "ignore-all-space",           no_argument,            0,      'w' },
         { "exclude",                    required_argument,      0,      'x' },          { "exclude",                    required_argument,      0,      'x' },
Line 119 
Line 122 
                 case 'i':                  case 'i':
                         iflag = 1;                          iflag = 1;
                         break;                          break;
                   case 'L':
                           label = optarg;
                           break;
                 case 'l':                  case 'l':
                         lflag = 1;                          lflag = 1;
                         signal(SIGPIPE, SIG_IGN);                          signal(SIGPIPE, SIG_IGN);
Line 144 
Line 150 
                 case 's':                  case 's':
                         sflag = 1;                          sflag = 1;
                         break;                          break;
                   case 'T':
                           Tflag = 1;
                           break;
                 case 't':                  case 't':
                         tflag = 1;                          tflag = 1;
                         break;                          break;
Line 351 
Line 360 
 usage(void)  usage(void)
 {  {
         (void)fprintf(stderr,          (void)fprintf(stderr,
             "usage: diff [-biqtw] [-c | -e | -f | -n | -u ] file1 file2\n"              "usage: diff [-bilqtTw] [-c | -e | -f | -n | -u] [-L label] file1 file2\n"
             "       diff [-biqtw] -C number file1 file2\n"              "       diff [-bilqtTw] [-L label] -C number file1 file2\n"
             "       diff [-biqtw] -D string file1 file2\n"              "       diff [-bilqtw] -D string file1 file2\n"
             "       diff [-biqtw] -U number file1 file2\n"              "       diff [-bilqtTw] [-L label] -U number file1 file2\n"
             "       diff [-biNPqwt] [-c | -e | -f | -n | -u ] [-r] [-s] [-S name]"              "       diff [-bilNPqwtT] [-c | -e | -f | -n | -u ] [-L label] [-r] [-s] [-S name]\n"
             " [-X file]\n            [-x pattern] dir1 dir2\n");              "            [-X file] [-x pattern] dir1 dir2\n");
   
         exit(2);          exit(2);
 }  }

Legend:
Removed from v.1.32  
changed lines
  Added in v.1.33