From 166efa19c7ed5e13b1db524dd0b26fc48a56a2ee Mon Sep 17 00:00:00 2001 From: Christian Neukirchen Date: Thu, 12 Nov 2015 16:56:39 +0100 Subject: cvs update of calendar --- src/usr.bin/calendar/io.c | 16 ++++++++++------ 1 file changed, 10 insertions(+), 6 deletions(-) (limited to 'src/usr.bin/calendar/io.c') diff --git a/src/usr.bin/calendar/io.c b/src/usr.bin/calendar/io.c index 1e1950b..05fe7ae 100644 --- a/src/usr.bin/calendar/io.c +++ b/src/usr.bin/calendar/io.c @@ -1,4 +1,4 @@ -/* $OpenBSD: io.c,v 1.39 2015/04/18 18:28:37 deraadt Exp $ */ +/* $OpenBSD: io.c,v 1.42 2015/10/23 12:36:23 deraadt Exp $ */ /* * Copyright (c) 1989, 1993, 1994 @@ -89,7 +89,11 @@ cal(void) if (strncmp(buf, "LANG=", 5) == 0) { (void) setlocale(LC_ALL, buf + 5); setnnames(); - if (!strcmp(buf + 5, "ru_RU.KOI8-R") || + /* XXX remove KOI8 lines after 5.9 is out */ + if (!strcmp(buf + 5, "ru_RU.UTF-8") || + !strcmp(buf + 5, "uk_UA.UTF-8") || + !strcmp(buf + 5, "by_BY.UTF-8") || + !strcmp(buf + 5, "ru_RU.KOI8-R") || !strcmp(buf + 5, "uk_UA.KOI8-U") || !strcmp(buf + 5, "by_BY.KOI8-B")) { bodun_maybe++; @@ -159,13 +163,13 @@ cal(void) var = 0; if (printing) { struct match *foo; - + ev1 = NULL; while (m) { cur_evt = malloc(sizeof(struct event)); if (cur_evt == NULL) err(1, NULL); - + cur_evt->when = m->when; snprintf(cur_evt->print_date, sizeof(cur_evt->print_date), "%s%c", @@ -298,7 +302,7 @@ getfield(char *p, char **endp, int *flags) * number of special events. */ break; } - *flags |= F_SPECIAL; + *flags |= F_SPECIAL; } if (!(*flags & F_SPECIAL)) { /* undefined rest */ @@ -350,7 +354,7 @@ opencal(void) (void)close(pdes[1]); } (void)close(pdes[0]); - /* + /* * Set stderr to /dev/null. Necessary so that cron does not * wait for cpp to finish if it's running calendar -a. */ -- cgit 1.4.1