]> git.pld-linux.org Git - packages/xfig.git/blob - xfig-i18n.patch
- fix locale for reading, too
[packages/xfig.git] / xfig-i18n.patch
1 diff -urN xfig.3.2.3d.org/Fig.ad xfig.3.2.3d/Fig.ad
2 --- xfig.3.2.3d.org/Fig.ad      Thu Oct 25 23:14:36 2001
3 +++ xfig.3.2.3d/Fig.ad  Thu Oct 25 23:15:04 2001
4 @@ -158,7 +158,7 @@
5  
6  ! If xfig is compiled with I18N option, you may want to uncomment following line.
7  !
8 -!Fig.international: true
9 +Fig.international: true
10  
11  ! Note that you shouldn't remove the following "Fig*international: false".  
12  ! It must be there to cancel any *international: true that may defined via xrdb.
13 diff -urN xfig.3.2.3d.org/Imakefile xfig.3.2.3d/Imakefile
14 --- xfig.3.2.3d.org/Imakefile   Thu Oct 25 23:14:34 2001
15 +++ xfig.3.2.3d/Imakefile       Thu Oct 25 23:15:04 2001
16 @@ -120,7 +120,7 @@
17  XCOMM If your setlocale() dosen't support the locale, you should
18  XCOMM add -DSETLOCALE to I18N_DEFS.
19  
20 -XCOMM #define I18N
21 +#define I18N
22  
23  XCOMM If using an input tablet uncomment the following
24  
25 diff -urN xfig.3.2.3d.org/f_read.c xfig.3.2.3d/f_read.c
26 --- xfig.3.2.3d.org/f_read.c    Thu Oct 25 23:14:35 2001
27 +++ xfig.3.2.3d/f_read.c        Thu Oct 25 23:19:59 2001
28 @@ -15,6 +15,7 @@
29   *
30   */
31  
32 +#include <locale.h>
33  #include "fig.h"
34  #include "figx.h"
35  #include "resources.h"
36 @@ -221,7 +222,13 @@
37      else {
38         if (!update_figs)
39             put_msg("Reading objects from \"%s\" ...", file_name);
40 +#ifdef I18N
41 +       setlocale(LC_NUMERIC, "C");
42 +#endif
43         status = readfp_fig(fp, obj, merge, xoff, yoff, settings);
44 +#ifdef I18N
45 +       setlocale(LC_NUMERIC, "");
46 +#endif
47         fclose(fp);
48         /* so subsequent file_msg() calls don't print wrong file name */
49         first_file_msg = False;
50 diff -urN xfig.3.2.3d.org/f_save.c xfig.3.2.3d/f_save.c
51 --- xfig.3.2.3d.org/f_save.c    Thu Oct 25 23:14:35 2001
52 +++ xfig.3.2.3d/f_save.c        Thu Oct 25 23:18:43 2001
53 @@ -15,6 +15,7 @@
54   *
55   */
56  
57 +#include <locale.h>
58  #include "fig.h"
59  #include "resources.h"
60  #include "mode.h"
61 @@ -90,6 +91,9 @@
62  
63      if (!update_figs)
64         put_msg("Writing . . .");
65 +#ifdef I18N
66 +    setlocale(LC_NUMERIC, "C");
67 +#endif
68      write_file_header(fp);
69      for (a = objects.arcs; a != NULL; a = a->next) {
70         num_object++;
71 @@ -115,6 +119,9 @@
72         num_object++;
73         write_text(fp, t);
74      }
75 +#ifdef I18N
76 +    setlocale(LC_NUMERIC, "");
77 +#endif
78      if (ferror(fp)) {
79         fclose(fp);
80         return (-1);
81 diff -urN xfig.3.2.3d.org/main.c xfig.3.2.3d/main.c
82 --- xfig.3.2.3d.org/main.c      Thu Oct 25 23:14:35 2001
83 +++ xfig.3.2.3d/main.c  Thu Oct 25 23:15:04 2001
84 @@ -632,7 +632,6 @@
85  
86  #ifdef I18N
87      setlocale(LC_ALL, "");
88 -    setlocale(LC_NUMERIC, "C");
89      XtSetLanguageProc(NULL, NULL, NULL);
90  #endif  /* I18N */
91  
This page took 0.029642 seconds and 3 git commands to generate.