[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.40 and 1.41

version 1.40, 2015/10/23 11:01:30 version 1.41, 2015/10/23 11:43:16
Line 163 
Line 163 
                                 var = 0;                                  var = 0;
                         if (printing) {                          if (printing) {
                                 struct match *foo;                                  struct match *foo;
   
                                 ev1 = NULL;                                  ev1 = NULL;
                                 while (m) {                                  while (m) {
                                         cur_evt = malloc(sizeof(struct event));                                          cur_evt = malloc(sizeof(struct event));
                                         if (cur_evt == NULL)                                          if (cur_evt == NULL)
                                                 err(1, NULL);                                                  err(1, NULL);
   
                                         cur_evt->when = m->when;                                          cur_evt->when = m->when;
                                         snprintf(cur_evt->print_date,                                          snprintf(cur_evt->print_date,
                                             sizeof(cur_evt->print_date), "%s%c",                                              sizeof(cur_evt->print_date), "%s%c",
Line 302 
Line 302 
                                  * number of special events. */                                   * number of special events. */
                                 break;                                  break;
                         }                          }
                         *flags |= F_SPECIAL;                          *flags |= F_SPECIAL;
                 }                  }
                 if (!(*flags & F_SPECIAL)) {                  if (!(*flags & F_SPECIAL)) {
                         /* undefined rest */                          /* undefined rest */
Line 354 
Line 354 
                         (void)close(pdes[1]);                          (void)close(pdes[1]);
                 }                  }
                 (void)close(pdes[0]);                  (void)close(pdes[0]);
                 /*                  /*
                  * Set stderr to /dev/null.  Necessary so that cron does not                   * Set stderr to /dev/null.  Necessary so that cron does not
                  * wait for cpp to finish if it's running calendar -a.                   * wait for cpp to finish if it's running calendar -a.
                  */                   */

Legend:
Removed from v.1.40  
changed lines
  Added in v.1.41