components/enscript/patches/enscript-1.6.1-locale.patch
author Neng Xue <neng.xue@oracle.com>
Fri, 14 Oct 2016 11:36:01 -0700
changeset 7111 a0e4f5518caa
parent 6638 c7defa3ae9cc
permissions -rw-r--r--
23500659 Setting ADIHEAP finds issues in GSS-API

--- 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
@@ -954,9 +954,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
@@ -1210,7 +1210,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;