[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.39 and 1.40

version 1.39, 2003/09/06 05:25:22 version 1.40, 2003/09/07 18:16:02
Line 46 
Line 46 
 struct stat stb1, stb2;  struct stat stb1, stb2;
 struct excludes *excludes_list;  struct excludes *excludes_list;
   
 #define OPTIONS "abC:c::dD:efhiL:lnNPqrS:sTtU:u::wX:x:"  #define OPTIONS "0123456789abC:cdD: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 84 
Line 84 
 {  {
         char *ep, **oargv;          char *ep, **oargv;
         long  l;          long  l;
         int   ch, gotstdin;          int   ch, lastch, gotstdin;
   
         oargv = argv;          oargv = argv;
         gotstdin = 0;          gotstdin = 0;
   
           lastch = 0;
         while ((ch = getopt_long(argc, argv, OPTIONS, longopts, NULL)) != -1) {          while ((ch = getopt_long(argc, argv, OPTIONS, longopts, NULL)) != -1) {
                 switch (ch) {                  switch (ch) {
                   case '0': case '1': case '2': case '3': case '4':
                   case '5': case '6': case '7': case '8': case '9':
                           if (!(lastch == 'c' || lastch == 'u' ||
                               (lastch >= '0' && lastch <= '9')))
                                   usage();
                           if (lastch == 'c' || lastch == 'u')
                                   context = 0;
                           context = context * 10 + ch - '0';
                           break;
                 case 'a':                  case 'a':
                         aflag = 1;                          aflag = 1;
                         break;                          break;
Line 185 
Line 195 
                         usage();                          usage();
                         break;                          break;
                 }                  }
                   lastch = ch;
         }          }
         argc -= optind;          argc -= optind;
         argv += optind;          argv += optind;

Legend:
Removed from v.1.39  
changed lines
  Added in v.1.40