[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.42 and 1.43

version 1.42, 2015/10/23 12:36:23 version 1.43, 2015/12/08 19:04:50
Line 98 
Line 98 
                             !strcmp(buf + 5, "by_BY.KOI8-B")) {                              !strcmp(buf + 5, "by_BY.KOI8-B")) {
                                 bodun_maybe++;                                  bodun_maybe++;
                                 bodun = 0;                                  bodun = 0;
                                 if (prefix)                                  free(prefix);
                                         free(prefix);  
                                 prefix = NULL;                                  prefix = NULL;
                         } else                          } else
                                 bodun_maybe = 0;                                  bodun_maybe = 0;
Line 124 
Line 123 
                                 calendar = LUNAR;                                  calendar = LUNAR;
                 } else if (bodun_maybe && strncmp(buf, "BODUN=", 6) == 0) {                  } else if (bodun_maybe && strncmp(buf, "BODUN=", 6) == 0) {
                         bodun++;                          bodun++;
                         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;                          continue;
Line 138 
Line 136 
                                     (p - buf == spev[i].nlen) &&                                      (p - buf == spev[i].nlen) &&
                                     buf[spev[i].nlen + 1]) {                                      buf[spev[i].nlen + 1]) {
                                         p++;                                          p++;
                                         if (spev[i].uname != NULL)                                          free(spev[i].uname);
                                                 free(spev[i].uname);  
                                         if ((spev[i].uname = strdup(p)) == NULL)                                          if ((spev[i].uname = strdup(p)) == NULL)
                                                 err(1, NULL);                                                  err(1, NULL);
                                         spev[i].ulen = strlen(p);                                          spev[i].ulen = strlen(p);
Line 211 
Line 208 
         tmp = events;          tmp = events;
         while (tmp) {          while (tmp) {
                 events = tmp;                  events = tmp;
                 if (tmp->ldesc)                  free(tmp->ldesc);
                         free(tmp->ldesc);  
                 tmp = tmp->next;                  tmp = tmp->next;
                 free(events);                  free(events);
         }          }

Legend:
Removed from v.1.42  
changed lines
  Added in v.1.43