diff options
author | Vadim Zhukov <zhuk@cvs.openbsd.org> | 2015-10-23 11:01:31 +0000 |
---|---|---|
committer | Vadim Zhukov <zhuk@cvs.openbsd.org> | 2015-10-23 11:01:31 +0000 |
commit | fba06fc119b1ea67cb16ffe61da4cce95d9ad026 (patch) | |
tree | 792851b04fff9d3d946f6e93094a4e08af3d873a | |
parent | f852f8d6b2b936446604c54ea36c48683ec02524 (diff) |
Fix BODUN handling after switch to UTF-8.
Still wondering if this functionality should be removed, but I'll leave
the decision to those who drink alcohol.
Input from & okay tedu@.
-rw-r--r-- | usr.bin/calendar/calendar.1 | 8 | ||||
-rw-r--r-- | usr.bin/calendar/io.c | 8 |
2 files changed, 10 insertions, 6 deletions
diff --git a/usr.bin/calendar/calendar.1 b/usr.bin/calendar/calendar.1 index acaf0f7dbc2..f0a9596c797 100644 --- a/usr.bin/calendar/calendar.1 +++ b/usr.bin/calendar/calendar.1 @@ -1,4 +1,4 @@ -.\" $OpenBSD: calendar.1,v 1.38 2015/09/25 16:36:00 schwarze Exp $ +.\" $OpenBSD: calendar.1,v 1.39 2015/10/23 11:01:30 zhuk Exp $ .\" .\" Copyright (c) 1989, 1990, 1993 .\" The Regents of the University of California. All rights reserved. @@ -29,7 +29,7 @@ .\" .\" @(#)calendar.1 8.1 (Berkeley) 6/29/93 .\" -.Dd $Mdocdate: September 25 2015 $ +.Dd $Mdocdate: October 23 2015 $ .Dt CALENDAR 1 .Os .Sh NAME @@ -70,7 +70,7 @@ Print lines from today and previous .Ar num days (backward, past). .It Fl b -Enforce special date calculation mode for KOI8 calendars. +Enforce special date calculation mode for Cyrillic calendars. .It Fl f Ar calendarfile Use .Ar calendarfile @@ -110,7 +110,7 @@ you should specify .Dq LANG=<local_name> and .Dq BODUN=<bodun_prefix> -where <local_name> can be ru_RU.KOI8-R, uk_UA.KOI8-U or by_BY.KOI8-B. +where <local_name> can be ru_RU.UTF-8, uk_UA.UTF-8 or by_BY.UTF-8. .Pp Other lines should begin with a month and day. They may be entered in almost any format, either numeric or as character diff --git a/usr.bin/calendar/io.c b/usr.bin/calendar/io.c index 1e1950b2d30..7e4b3719745 100644 --- a/usr.bin/calendar/io.c +++ b/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.40 2015/10/23 11:01:30 zhuk 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++; |