Hello community,
here is the log from the commit of package xfig
checked in at Thu Nov 16 16:15:44 CET 2006.
--------
--- xfig/xfig.changes 2006-11-07 16:01:24.000000000 +0100
+++ /mounts/work_src_done/STABLE/xfig/xfig.changes 2006-11-16 14:19:58.000000000 +0100
@@ -1,0 +2,5 @@
+Thu Nov 16 14:18:54 CET 2006 - werner@suse.de
+
+- Set LC_NUMERIC to POSIX before print or export data (bug #213942)
+
+-------------------------------------------------------------------
New:
----
xfig.3.2.4-locale.dif
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ xfig.spec ++++++
--- /var/tmp/diff_new_pack.7mwRHa/_old 2006-11-16 16:15:25.000000000 +0100
+++ /var/tmp/diff_new_pack.7mwRHa/_new 2006-11-16 16:15:25.000000000 +0100
@@ -18,7 +18,7 @@
Requires: transfig netpbm ghostscript-fonts-std
Autoreqprov: on
Version: 3.2.4
-Release: 103
+Release: 107
Summary: Facility for Interactive Generation of Figures under the X Window System
Url: http://www.xfig.org/
Source: xfig.%{version}.tar.bz2
@@ -35,6 +35,7 @@
Patch6: xfig.%{version}-null.dif
Patch7: xfig.%{version}-quiet.dif
Patch8: xfig.%{version}-gcc4.dif
+Patch9: xfig.%{version}-locale.dif
BuildRoot: %{_tmppath}/%{name}-%{version}-build
%{expand: %%global _exec_prefix %(type -p pkg-config &>/dev/null && pkg-config --variable prefix x11 || echo /usr/X11R6)}
%if "%_exec_prefix" == "/usr/X11R6"
@@ -81,6 +82,7 @@
%patch6 -p0 -b .null
%patch7 -p0 -b .quiet
%patch8 -p0 -b .gcc4
+%patch9 -p0 -b .locale
cp $RPM_SOURCE_DIR/font-test.fig .
xmkmf -a -D_DATA='%{_data}'
@@ -133,6 +135,8 @@
%doc %{_mandir}/man1/xfig.1x.gz
%changelog -n xfig
+* Thu Nov 16 2006 - werner@suse.de
+- Set LC_NUMERIC to POSIX before print or export data (bug #213942)
* Tue Nov 07 2006 - ro@suse.de
- fix docu permissions
* Mon Jul 31 2006 - werner@suse.de
++++++ xfig.3.2.4-locale.dif ++++++
--- main.c
+++ main.c 2006-07-31 17:56:25.000000000 +0200
@@ -62,6 +62,7 @@
#ifdef I18N
#include
#include
+#include
#endif /* I18N */
/* EXPORTS */
@@ -709,11 +710,6 @@ main(argc, argv)
}
}
-#ifdef I18N
- setlocale(LC_ALL, "");
- XtSetLanguageProc(NULL, NULL, NULL);
-#endif /* I18N */
-
/*
* save the command line arguments
*/
@@ -807,6 +803,10 @@ main(argc, argv)
}
#ifdef I18N
+ if (NULL == strcasestr(nl_langinfo(CODESET),"ANSI") &&
+ NULL == strcasestr(nl_langinfo(CODESET),"ISO-8859-1"))
+ appres.international = True;
+
/************************************************************/
/* if the international option has been set, set the locale */
/************************************************************/
@@ -1523,6 +1523,11 @@ setup_visual(argc_p, argv, args)
*/
tool = XtAppInitialize (&tool_app, "Fig", options, XtNumber (options), argc_p, argv,
(String *) NULL, args, 0);
+#ifdef I18N
+ setlocale(LC_ALL, "");
+ setlocale(LC_NUMERIC, "C");
+ XtSetLanguageProc(tool_app, NULL, NULL);
+#endif /* I18N */
/* save important info */
tool_d = XtDisplay(tool);
tool_s = XtScreen(tool);
--- u_print.c
+++ u_print.c 2006-11-16 12:45:46.000000000 +0000
@@ -15,6 +15,7 @@
*
*/
+#include
#include "fig.h"
#include "resources.h"
#include "mode.h"
@@ -75,6 +76,7 @@ char *shell_protect_string(string)
return(buf);
}
+void
print_to_printer(printer, backgrnd, mag, print_all_layers, grid, params)
char printer[];
char *backgrnd;
@@ -111,6 +113,8 @@ print_to_printer(printer, backgrnd, mag,
name = shell_protect_string(cur_filename);
#ifdef I18N
+ /* set the numeric locale to C so we set decimal points for numbers */
+ setlocale(LC_NUMERIC, "C");
sprintf(tmpcmd, "%s %s -L ps -z %s -m %f %s -n %s",
fig2dev_cmd, appres.international ? appres.fig2dev_localize_option : "",
#else
@@ -119,6 +123,10 @@ print_to_printer(printer, backgrnd, mag,
#endif /* I18N */
paper_sizes[appres.papersize].sname, mag/100.0,
appres.landscape ? "-l xxx" : "-p xxx", name);
+#ifdef I18N
+ /* reset to original locale */
+ setlocale(LC_NUMERIC, "");
+#endif /* I18N */
if (appres.correct_font_size)
strcat(tmpcmd," -F ");
@@ -223,9 +231,13 @@ print_to_file(file, lang, mag, xoff, yof
/* start with the command, language and internationalization, if applicable */
#ifdef I18N
+ /* set the numeric locale to C so we set decimal points for numbers */
+ setlocale(LC_NUMERIC, "C");
sprintf(prcmd, "%s %s -L %s -m %f ",
fig2dev_cmd, appres.international ? appres.fig2dev_localize_option : "",
real_lang, mag/100.0);
+ /* reset to original locale */
+ setlocale(LC_NUMERIC, "");
#else
sprintf(prcmd, "%s -L %s -m %f ", fig2dev_cmd, real_lang, mag/100.0);
#endif /* I18N */
@@ -324,6 +336,8 @@ print_to_file(file, lang, mag, xoff, yof
strcat(tmp_name,"_t");
/* make it automatically input the postscript/pdf part (-p option) */
#ifdef I18N
+ /* set the numeric locale to C so we set decimal points for numbers */
+ setlocale(LC_NUMERIC, "C");
sprintf(prcmd, "%s %s -L %s -E %d -p %s -m %f ",
fig2dev_cmd, appres.international ? appres.fig2dev_localize_option : "",
#else
@@ -332,6 +346,10 @@ print_to_file(file, lang, mag, xoff, yof
#endif /* I18N */
!strcmp(lang,"pstex")? "pstex_t": "pdftex_t",
appres.encoding, outfile, mag/100.0);
+#ifdef I18N
+ /* reset to original locale */
+ setlocale(LC_NUMERIC, "");
+#endif /* I18N */
/* add the -D +list if user doesn't want all layers printed */
if (!print_all_layers)
strcat(prcmd, layers);
++++++ xfig.3.2.4.dif ++++++
--- /var/tmp/diff_new_pack.7mwRHa/_old 2006-11-16 16:15:25.000000000 +0100
+++ /var/tmp/diff_new_pack.7mwRHa/_new 2006-11-16 16:15:25.000000000 +0100
@@ -411,50 +411,6 @@
#include
#if defined(__convex__) && defined(__STDC__)
---- main.c
-+++ main.c 2006-07-31 17:56:25.000000000 +0200
-@@ -62,6 +62,7 @@
- #ifdef I18N
- #include
- #include
-+#include
- #endif /* I18N */
-
- /* EXPORTS */
-@@ -709,11 +710,6 @@ main(argc, argv)
- }
- }
-
--#ifdef I18N
-- setlocale(LC_ALL, "");
-- XtSetLanguageProc(NULL, NULL, NULL);
--#endif /* I18N */
--
- /*
- * save the command line arguments
- */
-@@ -807,6 +803,9 @@ main(argc, argv)
- }
-
- #ifdef I18N
-+ if (NULL == strcasestr(nl_langinfo(CODESET),"ISO-8859-1"))
-+ appres.international = True;
-+
- /************************************************************/
- /* if the international option has been set, set the locale */
- /************************************************************/
-@@ -1523,6 +1522,11 @@ setup_visual(argc_p, argv, args)
- */
- tool = XtAppInitialize (&tool_app, "Fig", options, XtNumber (options), argc_p, argv,
- (String *) NULL, args, 0);
-+#ifdef I18N
-+ setlocale(LC_ALL, "");
-+ setlocale(LC_NUMERIC, "C");
-+ XtSetLanguageProc(tool_app, NULL, NULL);
-+#endif /* I18N */
- /* save important info */
- tool_d = XtDisplay(tool);
- tool_s = XtScreen(tool);
--- mode.h
+++ mode.h 2006-07-31 17:56:25.000000000 +0200
@@ -19,7 +19,7 @@
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Remember to have fun...
---------------------------------------------------------------------
To unsubscribe, e-mail: opensuse-commit+unsubscribe@opensuse.org
For additional commands, e-mail: opensuse-commit+help@opensuse.org