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

Diff for /src/usr.bin/touch/touch.c between version 1.25 and 1.26

version 1.25, 2015/10/09 01:37:09 version 1.26, 2019/03/10 15:11:52
Line 41 
Line 41 
 #include <stdio.h>  #include <stdio.h>
 #include <stdlib.h>  #include <stdlib.h>
 #include <string.h>  #include <string.h>
 #include <locale.h>  
 #include <time.h>  #include <time.h>
 #include <unistd.h>  #include <unistd.h>
   
Line 49 
Line 48 
 void            stime_arg2(char *, int, struct timespec *);  void            stime_arg2(char *, int, struct timespec *);
 void            stime_argd(char *, struct timespec *);  void            stime_argd(char *, struct timespec *);
 void            stime_file(char *, struct timespec *);  void            stime_file(char *, struct timespec *);
 __dead void     usage(void);  static void __dead usage(void);
   
 int  int
 main(int argc, char *argv[])  main(int argc, char *argv[])
Line 58 
Line 57 
         int              aflag, cflag, mflag, ch, fd, len, rval, timeset;          int              aflag, cflag, mflag, ch, fd, len, rval, timeset;
         char            *p;          char            *p;
   
         (void)setlocale(LC_ALL, "");  
   
         if (pledge("stdio rpath wpath cpath fattr", NULL) == -1)          if (pledge("stdio rpath wpath cpath fattr", NULL) == -1)
                 err(1, "pledge");                  err(1, "pledge");
   
Line 145 
Line 142 
                         warn("%s", *argv);                          warn("%s", *argv);
                 }                  }
         }          }
         exit(rval);          return rval;
 }  }
   
 #define ATOI2(s)        ((s) += 2, ((s)[-2] - '0') * 10 + ((s)[-1] - '0'))  #define ATOI2(s)        ((s) += 2, ((s)[-2] - '0') * 10 + ((s)[-1] - '0'))
Line 324 
Line 321 
         tsp[1] = tsp[0];          tsp[1] = tsp[0];
 }  }
   
 __dead void  static void __dead
 usage(void)  usage(void)
 {  {
         (void)fprintf(stderr,          (void)fprintf(stderr,

Legend:
Removed from v.1.25  
changed lines
  Added in v.1.26