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

Diff for /src/usr.bin/calendar/calendar.c between version 1.30 and 1.31

version 1.30, 2015/03/15 00:41:28 version 1.31, 2015/04/18 18:28:37
Line 41 
Line 41 
 #include <stdio.h>  #include <stdio.h>
 #include <stdlib.h>  #include <stdlib.h>
 #include <string.h>  #include <string.h>
   #include <limits.h>
 #include <time.h>  #include <time.h>
 #include <unistd.h>  #include <unistd.h>
   
Line 68 
Line 69 
 main(int argc, char *argv[])  main(int argc, char *argv[])
 {  {
         int ch;          int ch;
           const char *errstr;
         char *caldir;          char *caldir;
   
         (void)setlocale(LC_ALL, "");          (void)setlocale(LC_ALL, "");
Line 95 
Line 97 
                         break;                          break;
   
                 case 'A': /* days after current date */                  case 'A': /* days after current date */
                         f_dayAfter = atoi(optarg);                          f_dayAfter = strtonum(optarg, 0, INT_MAX, &errstr);
                           if (errstr)
                                   errx(1, "-A %s: %s", optarg, errstr);
                         f_SetdayAfter = 1;                          f_SetdayAfter = 1;
                         break;                          break;
   
                 case 'B': /* days before current date */                  case 'B': /* days before current date */
                         f_dayBefore = atoi(optarg);                          f_dayBefore = strtonum(optarg, 0, INT_MAX, &errstr);
                           if (errstr)
                                   errx(1, "-B %s: %s", optarg, errstr);
                         break;                          break;
   
                 default:                  default:

Legend:
Removed from v.1.30  
changed lines
  Added in v.1.31