[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.1 and 1.3

version 1.1, 1996/12/05 06:04:40 version 1.3, 1998/02/14 21:07:21
Line 149 
Line 149 
                                 tm.tm_mon = month - 1;                                  tm.tm_mon = month - 1;
                                 tm.tm_mday = day;                                  tm.tm_mday = day;
                                 tm.tm_year = tp->tm_year; /* unused */                                  tm.tm_year = tp->tm_year; /* unused */
                                 (void)strftime(dbuf, sizeof(dbuf), "%c", &tm);                                  tm.tm_isdst = tp->tm_isdst; /* unused */
                                 dbuf[10] = '\0';                                  tm.tm_gmtoff = tp->tm_gmtoff; /* unused */
                                   tm.tm_zone = tp->tm_zone; /* unused */
                                   (void)strftime(dbuf, sizeof(dbuf), "%a %b %d",
                                       &tm);
                                 (void)fprintf(fp, "%s%c%s\n",                                  (void)fprintf(fp, "%s%c%s\n",
                                     dbuf + 4/* skip weekdays */,                                      dbuf + 4/* skip weekdays */,
                                     var ? '*' : ' ', p);                                      var ? '*' : ' ', p);
Line 253 
Line 256 
                         chdir(getenv("HOME"));                          chdir(getenv("HOME"));
                         if (!(chdir(calendarHome) == 0 &&                          if (!(chdir(calendarHome) == 0 &&
                               freopen(calendarFile, "r", stdin)))                                freopen(calendarFile, "r", stdin)))
                                 errx(1, "no calendar file: ``%s'' or ``~/%s/%s\n", calendarFile, calendarHome, calendarFile);                                  errx(1, "no calendar file: ``%s'' or ``~/%s/%s",
                                       calendarFile, calendarHome, calendarFile);
                 }                  }
         }          }
         if (pipe(pdes) < 0)          if (pipe(pdes) < 0)

Legend:
Removed from v.1.1  
changed lines
  Added in v.1.3