[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.26 and 1.27

version 1.26, 2004/06/02 14:58:46 version 1.27, 2004/12/10 15:00:27
Line 118 
Line 118 
                         } else                          } else
                                 bodun_maybe = 0;                                  bodun_maybe = 0;
                         continue;                          continue;
                 }                  } else if (strncmp(buf, "CALENDAR=", 9) == 0) {
                 if (bodun_maybe && strncmp(buf, "BODUN=", 6) == 0) {                          char *ep;
   
                           if (buf[9] == '\0')
                                   calendar = 0;
                           else if (!strcasecmp(buf + 9, "julian")) {
                                   calendar = JULIAN;
                                   errno = 0;
                                   julian = strtoul(buf + 14, &ep, 10);
                                   if (buf[0] == '\0' || *ep != '\0')
                                           julian = 13;
                                   if ((errno == ERANGE && julian == ULONG_MAX) ||
                                       julian > 14)
                                           errx(1, "Julian calendar offset is too large");
                           } else if (!strcasecmp(buf + 9, "gregorian"))
                                   calendar = GREGORIAN;
                           else if (!strcasecmp(buf + 9, "lunar"))
                                   calendar = LUNAR;
                   } else if (bodun_maybe && strncmp(buf, "BODUN=", 6) == 0) {
                         bodun++;                          bodun++;
                         if (prefix)                          if (prefix)
                                 free(prefix);                                  free(prefix);
                         if ((prefix = strdup(buf + 6)) == NULL)                          if ((prefix = strdup(buf + 6)) == NULL)
                                 err(1, NULL);                                  err(1, NULL);
                           continue;
                 }                  }
                 /* User defined names for special events */                  /* User defined names for special events */
                 if ((p = strchr(buf, '='))) {                  if ((p = strchr(buf, '='))) {

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