Changeset View
Changeset View
Standalone View
Standalone View
usr.bin/calendar/io.c
Show First 20 Lines • Show All 145 Lines • ▼ Show 20 Lines | if ((fp = fopen(file, "r")) != NULL) { | ||||
cal_home = home; | cal_home = home; | ||||
cal_dir = calendarhome; | cal_dir = calendarhome; | ||||
cal_file = file; | cal_file = file; | ||||
return (fp); | return (fp); | ||||
} | } | ||||
} | } | ||||
warnx("can't open calendar file \"%s\"", file); | warnx("can't open calendar file \"%s\"", file); | ||||
if (!warned && stat(_PATH_INCLUDE_LOCAL, &sb) != 0) { | if (!warned) { | ||||
snprintf(path, sizeof(path), _PATH_INCLUDE_LOCAL, getlocalbase()); | |||||
if (stat(path, &sb) != 0) { | |||||
warnx("calendar data files now provided by calendar-data pkg."); | warnx("calendar data files now provided by calendar-data pkg."); | ||||
warned = true; | warned = true; | ||||
} | |||||
} | } | ||||
return (NULL); | return (NULL); | ||||
} | } | ||||
static char* | static char* | ||||
cal_path(void) | cal_path(void) | ||||
{ | { | ||||
▲ Show 20 Lines • Show All 545 Lines • Show Last 20 Lines |