Update to groff 1.19.1.
[dragonfly.git] / gnu / usr.bin / groff / src / libs / libgroff / patches / cmap.cpp.patch
... / ...
CommitLineData
1$DragonFly: src/gnu/usr.bin/groff/src/libs/libgroff/patches/cmap.cpp.patch,v 1.1 2005/09/01 20:47:13 asmodai Exp $
2
3--- cmap.cpp 2005-08-31 14:28:07.000000000 +0200
4+++ cmap.cpp 2005-08-31 15:15:08.000000000 +0200
5@@ -19,12 +19,15 @@
6 Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
7
8 #include <ctype.h>
9+#if defined(__DragonFly__) || defined(__FreeBSD__)
10+#include <locale.h>
11+#endif
12 #include "cmap.h"
13
14 cmap cmlower(CMAP_BUILTIN);
15 cmap cmupper(CMAP_BUILTIN);
16
17-#ifdef isascii
18+#if defined(isascii) && (!defined(__DragonFly__) || !defined(__FreeBSD__))
19 #define ISASCII(c) isascii(c)
20 #else
21 #define ISASCII(c) (1)
22@@ -49,6 +52,9 @@
23 if (initialised)
24 return;
25 initialised = 1;
26+#if defined(__DragonFly__) || (__FreeBSD__)
27+ (void)setlocale(LC_CTYPE, "");
28+#endif
29 for (int i = 0; i <= UCHAR_MAX; i++) {
30 cmupper.v[i] = ISASCII(i) && islower(i) ? toupper(i) : i;
31 cmlower.v[i] = ISASCII(i) && isupper(i) ? tolower(i) : i;