--- Begin Message ---
- To: mgp-users@mew.org
- Subject: [mgp-users 01112] [patch] add locale support in mgp2ps
- From: Denis Ducamp <Denis.Ducamp@groar.org>
- Date: Tue, 28 Jan 2003 15:02:15 +0100
- Organization: groar.org
- User-agent: Mutt/1.2.5i
Hi,
Here is a trivial patch to mgp2ps to add the locale support, so ps generated
with mgp2ps has the same hyphenation than what is shown by mgp.
Regards,
Denis.
--- print.c.orig Mon Sep 17 16:48:30 2001
+++ print.c Thu Dec 19 20:22:12 2002
@@ -33,6 +33,11 @@
*/
#include "mgp.h"
+#ifdef USE_SETLOCALE
+#ifdef HAVE_LOCALE_H
+#include <locale.h>
+#endif
+#endif
static u_int align = AL_LEFT;
static char *curprefix = NULL;
@@ -1906,6 +1911,10 @@
extern int optind;
char *progname;
static char pathbuf[MAXPATHLEN];
+
+#ifdef USE_SETLOCALE
+ setlocale(LC_CTYPE, "");
+#endif
progname = argv[0];
--- End Message ---