]> git.pld-linux.org Git - packages/a2ps.git/blame - a2ps-glibcpaper.patch
- don't require versioned psutils, it comes from texlive, rel 2
[packages/a2ps.git] / a2ps-glibcpaper.patch
CommitLineData
938b2c3a
JB
1--- a2ps-4.15.4/liba2ps/jobs.c.orig 2023-06-11 19:59:27.481861785 +0200
2+++ a2ps-4.15.4/liba2ps/jobs.c 2023-06-11 19:59:52.208394496 +0200
3@@ -119,6 +119,7 @@ a2ps_job_new (void)
4 setlocale (LC_TIME, "");
9d216bc5 5 setlocale (LC_MESSAGES, "");
9d216bc5 6 setlocale (LC_CTYPE, "");
7+ setlocale (LC_PAPER, "");
8
9 bindtextdomain (PACKAGE, LOCALEDIR);
938b2c3a
JB
10 bindtextdomain (PACKAGE "-gnulib", LOCALEDIR);
11--- a2ps-4.15.4/liba2ps/options.c.orig 2023-04-12 20:50:51.000000000 +0200
12+++ a2ps-4.15.4/liba2ps/options.c 2023-06-11 20:00:19.368247359 +0200
13@@ -23,6 +23,8 @@
14 /* */
15 /************************************************************************/
16 #include <config.h>
9d216bc5 17+#include <locale.h>
18+#include <langinfo.h>
19
938b2c3a
JB
20 #include "a2ps.h"
21 #include "routines.h"
22@@ -267,7 +269,8 @@ a2ps_handle_options (a2ps_job * job, int
9d216bc5 23 struct opt_optarg *opt_optarg_head = NULL;
24 struct opt_optarg *opt_optarg = NULL;
25 int res;
26-
27+ unsigned int paper_height=0;
28+
29 /* Reset optind so that getopt is reinitialized. */
30 optind = 0;
31
938b2c3a 32@@ -515,7 +518,14 @@ a2ps_handle_options (a2ps_job * job, int
9d216bc5 33 break;
34
35 case 'M': /* select a medium */
36- xstrcpy (job->medium_request, optarg);
37+ if(strcasecmp("_glibc",optarg)==0){
38+ paper_height = ((union { char *string; unsigned int word; })nl_langinfo(_NL_PAPER_HEIGHT)).word;
39+ if(paper_height==279) /* US Letter */
40+ strcpy(optarg,"letter");
41+ else /* Everyone else */
42+ strcpy(optarg,"a4");
43+ }
44+ xstrcpy (job->medium_request, optarg);
45 break;
46
47 case 'n': /* n copies */
938b2c3a
JB
48--- a2ps-4.15.4/src/main.c.orig 2023-06-11 20:00:41.568127092 +0200
49+++ a2ps-4.15.4/src/main.c 2023-06-11 20:01:05.021333368 +0200
50@@ -926,6 +926,7 @@ main (int argc, char *argv[])
51 setlocale (LC_TIME, "");
9d216bc5 52 setlocale (LC_MESSAGES, "");
9d216bc5 53 setlocale (LC_CTYPE, "");
54+ setlocale (LC_PAPER, "");
55
56 bindtextdomain (PACKAGE, LOCALEDIR);
938b2c3a 57 bindtextdomain (PACKAGE "-gnulib", LOCALEDIR);
This page took 0.070862 seconds and 4 git commands to generate.