]>
Commit | Line | Data |
---|---|---|
1 | --- a2ps-4.13/lib/jobs.c.glibcpaper Sat Jan 15 18:15:07 2000 | |
2 | +++ a2ps-4.13/lib/jobs.c Tue Feb 20 18:44:48 2001 | |
3 | @@ -138,6 +138,7 @@ | |
4 | setlocale (LC_MESSAGES, ""); | |
5 | #endif | |
6 | setlocale (LC_CTYPE, ""); | |
7 | + setlocale (LC_PAPER, ""); | |
8 | ||
9 | bindtextdomain (PACKAGE, LOCALEDIR); | |
10 | textdomain (PACKAGE); | |
11 | --- a2ps-4.13/lib/options.c.glibcpaper Tue Aug 31 13:42:41 1999 | |
12 | +++ a2ps-4.13/lib/options.c Tue Feb 20 18:44:48 2001 | |
13 | @@ -54,6 +54,8 @@ | |
14 | #include "argv.h" | |
15 | #include "quotearg.h" | |
16 | #include "filalign.h" | |
17 | +#include <locale.h> | |
18 | +#include <langinfo.h> | |
19 | ||
20 | #define MAN_LINES 66 /* no lines for a man */ | |
21 | extern char *program_name; | |
22 | @@ -281,7 +283,8 @@ | |
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 | ||
32 | @@ -545,7 +548,14 @@ | |
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 */ | |
48 | --- a2ps-4.13/src/main.c.glibcpaper Wed Jan 26 19:29:15 2000 | |
49 | +++ a2ps-4.13/src/main.c Tue Feb 20 18:45:18 2001 | |
50 | @@ -945,6 +945,7 @@ | |
51 | setlocale (LC_MESSAGES, ""); | |
52 | #endif | |
53 | setlocale (LC_CTYPE, ""); | |
54 | + setlocale (LC_PAPER, ""); | |
55 | ||
56 | bindtextdomain (PACKAGE, LOCALEDIR); | |
57 | textdomain (PACKAGE); |