components/enscript/patches/enscript-1.6.1-locale.patch
author Kristina Tripp <Kristina.Tripp@oracle.com>
Thu, 09 Oct 2014 15:53:40 -0700
branchs11-update
changeset 3378 8c7eb3630145
parent 2723 138732f62341
child 6638 c7defa3ae9cc
permissions -rw-r--r--
PSARC/2014/275 Hiera 1.3.4 19137944 Add hiera to userland consolidation 19623766 hiera-19 package not installed if ruby-19 not installed

--- 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;