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

Diff for /src/usr.bin/patch/patch.c between version 1.37 and 1.38

version 1.37, 2003/08/10 21:28:48 version 1.38, 2003/10/31 20:20:45
Line 86 
Line 86 
 int             diff_type = 0;  int             diff_type = 0;
 char            *revision = NULL;       /* prerequisite revision, if any */  char            *revision = NULL;       /* prerequisite revision, if any */
 LINENUM         input_lines = 0;        /* how long is input file in lines */  LINENUM         input_lines = 0;        /* how long is input file in lines */
   int             posix = 0;              /* strict POSIX mode? */
   
 static void     reinitialize_almost_everything(void);  static void     reinitialize_almost_everything(void);
 static void     get_some_switches(void);  static void     get_some_switches(void);
Line 196 
Line 197 
         get_some_switches();          get_some_switches();
   
         if (backup_type == none) {          if (backup_type == none) {
                 v = getenv("VERSION_CONTROL");                  if ((v = getenv("PATCH_VERSION_CONTROL")) == NULL)
 #ifdef notyet                          v = getenv("VERSION_CONTROL");
                 if (v != NULL)                  if (v != NULL || !posix)
 #endif  
                         backup_type = get_version(v);   /* OK to pass NULL. */                          backup_type = get_version(v);   /* OK to pass NULL. */
         }          }
   
Line 465 
Line 465 
                 {"unified",             no_argument,            0,      'u'},                  {"unified",             no_argument,            0,      'u'},
                 {"version",             no_argument,            0,      'v'},                  {"version",             no_argument,            0,      'v'},
                 {"version-control",     required_argument,      0,      'V'},                  {"version-control",     required_argument,      0,      'V'},
                   {"posix",               no_argument,            &posix, 1},
                 {NULL,                  0,                      0,      0}                  {NULL,                  0,                      0,      0}
         };          };
         int ch;          int ch;
Line 478 
Line 479 
         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 'b':                  case 'b':
 #ifdef notyet  
                         if (backup_type == none)                          if (backup_type == none)
                                 backup_type = numbered_existing;                                  backup_type = numbered_existing;
 #endif  
                         if (optarg == NULL)                          if (optarg == NULL)
                                 break;                                  break;
                         if (verbose)                          if (verbose)
Line 578 
Line 577 
                         break;                          break;
 #endif  #endif
                 default:                  default:
                         usage();                          if (ch != '\0')
                                   usage();
                         break;                          break;
                 }                  }
         }          }
Line 595 
Line 595 
                         Argc--;                          Argc--;
                 }                  }
         }          }
   
           if (getenv("POSIXLY_CORRECT") != NULL)
                   posix = 1;
 }  }
   
 static __dead void  static __dead void

Legend:
Removed from v.1.37  
changed lines
  Added in v.1.38