Lines 40-45
Link Here
|
40 |
#include "argv.h" |
40 |
#include "argv.h" |
41 |
#include "quotearg.h" |
41 |
#include "quotearg.h" |
42 |
#include "filalign.h" |
42 |
#include "filalign.h" |
|
|
43 |
#include <locale.h> |
44 |
#include <langinfo.h> |
43 |
#include "version-etc.h" |
45 |
#include "version-etc.h" |
44 |
|
46 |
|
45 |
#define MAN_LINES 66 /* no lines for a man */ |
47 |
#define MAN_LINES 66 /* no lines for a man */ |
Lines 268-273
Link Here
|
268 |
struct opt_optarg *opt_optarg = NULL; |
270 |
struct opt_optarg *opt_optarg = NULL; |
269 |
int res; |
271 |
int res; |
270 |
|
272 |
|
|
|
273 |
unsigned int paper_height=0; |
274 |
|
271 |
/* Reset optind so that getopt is reinitialized. */ |
275 |
/* Reset optind so that getopt is reinitialized. */ |
272 |
optind = 0; |
276 |
optind = 0; |
273 |
|
277 |
|
Lines 515-521
Link Here
|
515 |
break; |
519 |
break; |
516 |
|
520 |
|
517 |
case 'M': /* select a medium */ |
521 |
case 'M': /* select a medium */ |
518 |
xstrcpy (job->medium_request, optarg); |
522 |
if(strcasecmp("_glibc",optarg)==0){ |
|
|
523 |
paper_height = ((union { char *string; unsigned int word; })nl_langinfo(_NL_PAPER_HEIGHT)).word; |
524 |
if(paper_height==279) /* US Letter */ |
525 |
strcpy(optarg,"letter"); |
526 |
else /* Everyone else */ |
527 |
strcpy(optarg,"a4"); |
528 |
} |
529 |
xstrcpy (job->medium_request, optarg); |
519 |
break; |
530 |
break; |
520 |
|
531 |
|
521 |
case 'n': /* n copies */ |
532 |
case 'n': /* n copies */ |