components/enscript/patches/enscript-1.6.1-locale.patch
author Mike Sullivan <Mike.Sullivan@Oracle.COM>
Mon, 01 Apr 2013 23:00:57 -0700
changeset 1243 cf247f5101ae
parent 1132 a62391631ea1
child 6638 c7defa3ae9cc
permissions -rw-r--r--
Added tag s12-19 for changeset f52d88cf6f9e
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
1132
a62391631ea1 16170971 Move enscript from the Desktop consolidation to Userland
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
     1
--- enscript-1.6.1/src/main.c.locale	Mon Mar 18 11:23:14 2002
a62391631ea1 16170971 Move enscript from the Desktop consolidation to Userland
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
     2
+++ enscript-1.6.1/src/main.c	Mon Mar 18 11:24:08 2002
a62391631ea1 16170971 Move enscript from the Desktop consolidation to Userland
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
     3
@@ -912,9 +912,8 @@
a62391631ea1 16170971 Move enscript from the Desktop consolidation to Userland
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
     4
    * We want to change only messages (gs do not like decimals in 0,1
a62391631ea1 16170971 Move enscript from the Desktop consolidation to Userland
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
     5
    * format ;)
a62391631ea1 16170971 Move enscript from the Desktop consolidation to Userland
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
     6
    */
a62391631ea1 16170971 Move enscript from the Desktop consolidation to Userland
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
     7
-#if HAVE_LC_MESSAGES
a62391631ea1 16170971 Move enscript from the Desktop consolidation to Userland
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
     8
-  setlocale (LC_MESSAGES, "");
a62391631ea1 16170971 Move enscript from the Desktop consolidation to Userland
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
     9
-#endif
a62391631ea1 16170971 Move enscript from the Desktop consolidation to Userland
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
    10
+  setlocale (LC_ALL, "");
a62391631ea1 16170971 Move enscript from the Desktop consolidation to Userland
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
    11
+  setlocale (LC_NUMERIC, "C");
a62391631ea1 16170971 Move enscript from the Desktop consolidation to Userland
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
    12
 #endif
a62391631ea1 16170971 Move enscript from the Desktop consolidation to Userland
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
    13
 #if ENABLE_NLS
a62391631ea1 16170971 Move enscript from the Desktop consolidation to Userland
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
    14
   bindtextdomain (PACKAGE, LOCALEDIR);
a62391631ea1 16170971 Move enscript from the Desktop consolidation to Userland
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
    15
--- enscript-1.6.1/src/psgen.c.locale	Mon Mar 18 11:23:14 2002
a62391631ea1 16170971 Move enscript from the Desktop consolidation to Userland
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
    16
+++ enscript-1.6.1/src/psgen.c	Mon Mar 18 11:23:14 2002
a62391631ea1 16170971 Move enscript from the Desktop consolidation to Userland
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
    17
@@ -1103,7 +1103,8 @@
a62391631ea1 16170971 Move enscript from the Desktop consolidation to Userland
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
    18
   /* Get escape name. */
a62391631ea1 16170971 Move enscript from the Desktop consolidation to Userland
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
    19
   for (i = 0; i < sizeof (escname) - 1 && (ch = is_getc (is)) != EOF; i++)
a62391631ea1 16170971 Move enscript from the Desktop consolidation to Userland
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
    20
     {
a62391631ea1 16170971 Move enscript from the Desktop consolidation to Userland
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
    21
-      if (!isalnum (ch))
a62391631ea1 16170971 Move enscript from the Desktop consolidation to Userland
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
    22
+      if (!((ch >= '0' && ch <= '9') || (ch >= 'A' && ch <= 'Z') ||
a62391631ea1 16170971 Move enscript from the Desktop consolidation to Userland
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
    23
+	    (ch >= 'a' && ch <= 'z')))
a62391631ea1 16170971 Move enscript from the Desktop consolidation to Userland
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
    24
 	{
a62391631ea1 16170971 Move enscript from the Desktop consolidation to Userland
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
    25
 	  is_ungetc (ch, is);
a62391631ea1 16170971 Move enscript from the Desktop consolidation to Userland
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
    26
 	  break;