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

Diff for /src/usr.bin/calendar/day.c between version 1.36 and 1.37

version 1.36, 2019/02/01 16:22:53 version 1.37, 2019/08/12 20:03:28
Line 323 
Line 323 
                 if (month == -1) {                  if (month == -1) {
                         month = tp->tm_mon + 1;                          month = tp->tm_mon + 1;
                         interval = MONTHLY;                          interval = MONTHLY;
                 } else if (calendar)                  } else {
                         adjust_calendar(&day, &month);                          if ((month > 12) || (month < 1))
                 if ((month > 12) || (month < 1))                                  return (NULL);
                         return (NULL);                          if (calendar)
                                   adjust_calendar(&day, &month);
                   }
         }          }
   
         /* 2. {Monthname} XYZ ... */          /* 2. {Monthname} XYZ ... */
Line 371 
Line 373 
                 else {                  else {
                         /* F_ISDAY set, v2 > 12, or no way to tell */                          /* F_ISDAY set, v2 > 12, or no way to tell */
                         month = v1;                          month = v1;
                           if ((month > 12) || (month < 1))
                                   return (NULL);
                         /* if no recognizable day, assume the first */                          /* if no recognizable day, assume the first */
                         day = v2 ? v2 : 1;                          day = v2 ? v2 : 1;
                         if ((flags & F_ISDAY)) {                          if ((flags & F_ISDAY)) {

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