]> git.pld-linux.org Git - packages/a2ps.git/blob - a2ps-autoenc.patch
- updated to 4.15.4; devel part is gone (no longer installed)
[packages/a2ps.git] / a2ps-autoenc.patch
1 --- a2ps-4.15.4/src/main.c.orig 2023-06-11 20:01:18.534593494 +0200
2 +++ a2ps-4.15.4/src/main.c      2023-06-11 20:02:16.417613248 +0200
3 @@ -25,6 +25,7 @@
4  #include <config.h>
5  
6  #include <signal.h>
7 +#include <string.h>
8  #include <locale.h>
9  
10  #include "a2ps.h"
11 @@ -917,6 +918,7 @@ int
12  main (int argc, char *argv[])
13  {
14    int argn;
15 +  char *locale;
16  
17    /* Name under which this program was called. */
18    program_name = base_name (argv[0]);
19 @@ -928,6 +930,8 @@ main (int argc, char *argv[])
20    setlocale (LC_CTYPE, "");
21    setlocale (LC_PAPER, "");
22  
23 +  locale = setlocale (LC_ALL, "");
24 +
25    bindtextdomain (PACKAGE, LOCALEDIR);
26    bindtextdomain (PACKAGE "-gnulib", LOCALEDIR);
27    textdomain (PACKAGE);
28 @@ -988,6 +992,10 @@ main (int argc, char *argv[])
29    sheets_map = sheets_map_new ();
30    style_sheets = new_style_sheets ();
31  
32 +  /* Process special case: Japanese Document */
33 +  if ((locale != NULL) && ! strncmp (locale, "ja", 2) )
34 +    job->requested_encoding_name = xstrdup ("euc-jp");
35 +
36    /* Process the command line options. */
37    argn = a2ps_handle_options (job, argc, argv);
38    switch (behavior) {
This page took 0.050486 seconds and 3 git commands to generate.