components/enscript/patches/enscript-1.6.1-locale.patch
author Jiri Sasek <Jiri.Sasek@Oracle.COM>
Mon, 07 Jul 2014 04:16:19 -0700
changeset 1986 ec77e9bb9f57
parent 1132 a62391631ea1
child 6638 c7defa3ae9cc
permissions -rw-r--r--
17027615 smbd still dumps core with patch 119758-27(SAMBA 3.6.12) in AIO mode with SAMFS

--- enscript-1.6.1/src/main.c.locale	Mon Mar 18 11:23:14 2002
+++ enscript-1.6.1/src/main.c	Mon Mar 18 11:24:08 2002
@@ -912,9 +912,8 @@
    * We want to change only messages (gs do not like decimals in 0,1
    * format ;)
    */
-#if HAVE_LC_MESSAGES
-  setlocale (LC_MESSAGES, "");
-#endif
+  setlocale (LC_ALL, "");
+  setlocale (LC_NUMERIC, "C");
 #endif
 #if ENABLE_NLS
   bindtextdomain (PACKAGE, LOCALEDIR);
--- enscript-1.6.1/src/psgen.c.locale	Mon Mar 18 11:23:14 2002
+++ enscript-1.6.1/src/psgen.c	Mon Mar 18 11:23:14 2002
@@ -1103,7 +1103,8 @@
   /* Get escape name. */
   for (i = 0; i < sizeof (escname) - 1 && (ch = is_getc (is)) != EOF; i++)
     {
-      if (!isalnum (ch))
+      if (!((ch >= '0' && ch <= '9') || (ch >= 'A' && ch <= 'Z') ||
+	    (ch >= 'a' && ch <= 'z')))
 	{
 	  is_ungetc (ch, is);
 	  break;