]> git.pld-linux.org Git - packages/a2ps.git/blob - a2ps-autoenc.patch
- adapterized
[packages/a2ps.git] / a2ps-autoenc.patch
1 --- a2ps-4.13.rh/src/main.c     Fri Feb 23 17:39:02 2001
2 +++ a2ps-4.13.euc/src/main.c    Fri Feb 23 23:07:40 2001
3 @@ -31,6 +31,8 @@
4  /*                                                                      */
5  /************************************************************************/
6  #include <assert.h>
7 +#include <string.h>
8 +#include <locale.h>
9  
10  #include "a2ps.h"
11  #include "argmatch.h"
12 @@ -925,6 +927,7 @@
13  main (int argc, char *argv[])
14  {
15    int argn;
16 +  char *locale;
17  
18    /* Architecture specific initialization. */
19  #ifdef __EMX__
20 @@ -947,6 +950,9 @@
21    setlocale (LC_CTYPE, "");
22    setlocale (LC_PAPER, "");
23  
24 +  locale = setlocale (LC_ALL, "");
25 +  /* fprintf(stderr, "locale : %s\n", locale); */
26 +
27    bindtextdomain (PACKAGE, LOCALEDIR);
28    textdomain (PACKAGE);
29  
30 @@ -1013,6 +1019,10 @@
31       yet read sheets. */
32    sheets_map = sheets_map_new ();
33    style_sheets = new_style_sheets ();
34 +
35 +  /* Process special case: Japanese Document */
36 +  if ((locale != NULL) && ! strncmp (locale, "ja", 2) )
37 +    job->requested_encoding_name = xstrdup ("euc-jp");
38  
39    /* Process the command line options. */
40    argn = a2ps_handle_options (job, argc, argv);
This page took 0.07994 seconds and 3 git commands to generate.