summary refs log tree commit diff
path: root/src/usr.bin/calendar/io.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/usr.bin/calendar/io.c')
-rw-r--r--src/usr.bin/calendar/io.c16
1 files changed, 10 insertions, 6 deletions
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.
 		 */