version 1.1, 1996/12/05 06:04:40 |
version 1.3, 1998/02/14 21:07:21 |
|
|
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); |
|
|
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) |