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

Diff for /src/usr.bin/calendar/io.c between version 1.38 and 1.39

version 1.38, 2015/03/15 00:41:28 version 1.39, 2015/04/18 18:28:37
Line 281 
Line 281 
                         }                          }
                 }                  }
                 if (i > NUMEV) {                  if (i > NUMEV) {
                         switch(*start) {                          const char *errstr;
   
                           switch (*start) {
                         case '-':                          case '-':
                         case '+':                          case '+':
                                 var = atoi(start);                                  var = strtonum(start + 1, 0, 365, &errstr);
                                 if (var > 365 || var < -365)                                  if (errstr)
                                         return (0); /* Someone is just being silly */                                          return (0); /* Someone is just being silly */
                                   if (*start == '-')
                                           var = -var;
                                 val += (NUMEV + 1) * var;                                  val += (NUMEV + 1) * var;
                                 /* We add one to the matching event and multiply by                                  /* We add one to the matching event and multiply by
                                  * (NUMEV + 1) so as not to return 0 if there's a match.                                   * (NUMEV + 1) so as not to return 0 if there's a match.

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