ALT Linux Bugzilla
– Attachment 17891 Details for
Bug 53318
a2ps v4.15.6 in Sisyphus
New bug
|
Search
|
[?]
|
Help
Register
|
Log In
[x]
|
Forgot Password
Login:
[x]
|
EN
|
RU
[patch]
a2ps-2.13-pld-glibcpaper.patch
a2ps-2.13-pld-glibcpaper.patch (text/plain), 2.00 KB, created by
Usoltsev Petr
on 2025-03-05 10:45:11 MSK
(
hide
)
Description:
a2ps-2.13-pld-glibcpaper.patch
Filename:
MIME Type:
Creator:
Usoltsev Petr
Created:
2025-03-05 10:45:11 MSK
Size:
2.00 KB
patch
obsolete
>diff -Nru a2ps-4.15.6_copy/liba2ps/jobs.c a2ps-4.15.6/liba2ps/jobs.c >--- a2ps-4.15.6_copy/liba2ps/jobs.c 2025-02-28 16:36:18.778073534 +0800 >+++ a2ps-4.15.6/liba2ps/jobs.c 2025-02-28 16:53:11.859779055 +0800 >@@ -119,6 +119,7 @@ > setlocale (LC_TIME, ""); > setlocale (LC_MESSAGES, ""); > setlocale (LC_CTYPE, ""); >+ setlocale (LC_PAPER, ""); > > bindtextdomain (PACKAGE, LOCALEDIR); > bindtextdomain (PACKAGE "-gnulib", LOCALEDIR); >diff -Nru a2ps-4.15.6_copy/liba2ps/options.c a2ps-4.15.6/liba2ps/options.c >--- a2ps-4.15.6_copy/liba2ps/options.c 2025-02-28 16:36:18.779073539 +0800 >+++ a2ps-4.15.6/liba2ps/options.c 2025-02-28 16:57:44.545312403 +0800 >@@ -40,6 +40,8 @@ > #include "argv.h" > #include "quotearg.h" > #include "filalign.h" >+#include <locale.h> >+#include <langinfo.h> > #include "version-etc.h" > > #define MAN_LINES 66 /* no lines for a man */ >@@ -268,6 +270,8 @@ > struct opt_optarg *opt_optarg = NULL; > int res; > >+ unsigned int paper_height=0; >+ > /* Reset optind so that getopt is reinitialized. */ > optind = 0; > >@@ -515,7 +519,14 @@ > break; > > case 'M': /* select a medium */ >- xstrcpy (job->medium_request, optarg); >+ if(strcasecmp("_glibc",optarg)==0){ >+ paper_height = ((union { char *string; unsigned int word; })nl_langinfo(_NL_PAPER_HEIGHT)).word; >+ if(paper_height==279) /* US Letter */ >+ strcpy(optarg,"letter"); >+ else /* Everyone else */ >+ strcpy(optarg,"a4"); >+ } >+ xstrcpy (job->medium_request, optarg); > break; > > case 'n': /* n copies */ >diff -Nru a2ps-4.15.6_copy/src/main.c a2ps-4.15.6/src/main.c >--- a2ps-4.15.6_copy/src/main.c 2025-02-28 16:36:18.810073714 +0800 >+++ a2ps-4.15.6/src/main.c 2025-02-28 16:58:34.738593097 +0800 >@@ -926,6 +926,7 @@ > setlocale (LC_TIME, ""); > setlocale (LC_MESSAGES, ""); > setlocale (LC_CTYPE, ""); >+ setlocale (LC_PAPER, ""); > > bindtextdomain (PACKAGE, LOCALEDIR); > bindtextdomain (PACKAGE "-gnulib", LOCALEDIR);
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 53318
:
17887
|
17888
|
17889
|
17890
| 17891 |
17892
|
17893
|
17894
|
17895
|
17896