Changeset View
Changeset View
Standalone View
Standalone View
usr.bin/calendar/io.c
Show First 20 Lines • Show All 288 Lines • ▼ Show 20 Lines | while ((linelen = getline(&line, &linecap, in)) > 0) { | ||||
buf[l] = '\0'; | buf[l] = '\0'; | ||||
if (buf[0] == '\0') | if (buf[0] == '\0') | ||||
continue; | continue; | ||||
/* Parse special definitions: LANG, Easter, Paskha etc */ | /* Parse special definitions: LANG, Easter, Paskha etc */ | ||||
if (strncmp(buf, "LANG=", 5) == 0) { | if (strncmp(buf, "LANG=", 5) == 0) { | ||||
(void)setlocale(LC_ALL, buf + 5); | (void)setlocale(LC_ALL, buf + 5); | ||||
d_first = (*nl_langinfo(D_MD_ORDER) == 'd'); | d_first = (*nl_langinfo(D_MD_ORDER) == 'd'); | ||||
#ifdef WITH_ICONV | |||||
set_new_encoding(); | |||||
#endif | |||||
setnnames(); | setnnames(); | ||||
continue; | continue; | ||||
} | } | ||||
REPLACE("Easter=", 7, neaster); | REPLACE("Easter=", 7, neaster); | ||||
REPLACE("Paskha=", 7, npaskha); | REPLACE("Paskha=", 7, npaskha); | ||||
REPLACE("ChineseNewYear=", 15, ncny); | REPLACE("ChineseNewYear=", 15, ncny); | ||||
REPLACE("NewMoon=", 8, nnewmoon); | REPLACE("NewMoon=", 8, nnewmoon); | ||||
REPLACE("FullMoon=", 9, nfullmoon); | REPLACE("FullMoon=", 9, nfullmoon); | ||||
▲ Show 20 Lines • Show All 201 Lines • Show Last 20 Lines |