Index: libgnomeprint/ChangeLog =================================================================== RCS file: /cvs/gnome/gnome-print/libgnomeprint/ChangeLog,v retrieving revision 1.249.2.13 diff -u -5 -r1.249.2.13 ChangeLog --- libgnomeprint/ChangeLog 2001/03/10 17:36:00 1.249.2.13 +++ libgnomeprint/ChangeLog 2001/03/12 08:30:30 @@ -1,5 +1,10 @@ +2001-03-11 Vlad Harchev + + * gnome-print-pdf.c: use "C" for LC_NUMERIC for each *printf call as in + gnome_print_context_fprintf() + 2001-03-10 Chema Celorio * gnome-print-ps2.c (gnome_print_ps2_get_level): enable gp_ps2_get_level for libgpa compilation ONLY Index: libgnomeprint/gnome-print-pdf.c =================================================================== RCS file: /cvs/gnome/gnome-print/libgnomeprint/gnome-print-pdf.c,v retrieving revision 1.51 diff -u -5 -r1.51 gnome-print-pdf.c --- libgnomeprint/gnome-print-pdf.c 2000/12/18 21:38:50 1.51 +++ libgnomeprint/gnome-print-pdf.c 2001/03/12 08:30:37 @@ -89,10 +89,11 @@ #include /* For getpid () */ #include /* For time() */ #include #include #include +#include #include #include #include #include @@ -421,22 +422,29 @@ gnome_print_pdf_write (GnomePrintContext *pc, const char *format, ...) { GnomePrintPdf *pdf; va_list arguments; gchar *text; + char *oldlocale; g_return_val_if_fail (GNOME_IS_PRINT_CONTEXT (pc), -1); pdf = GNOME_PRINT_PDF (pc); g_return_val_if_fail (pdf != NULL, -1); + oldlocale = g_strdup (setlocale (LC_NUMERIC, NULL)); + setlocale (LC_NUMERIC, "C"); + va_start (arguments, format); text = g_strdup_vprintf (format, arguments); va_end (arguments); pdf->offset += gnome_print_context_write_file (pc, text, strlen(text)); g_free (text); + + setlocale (LC_NUMERIC, oldlocale); + g_free (oldlocale); return 0; } gint @@ -1812,21 +1820,28 @@ GnomePrintContext *pc; GnomePrintPdfPage *page; va_list arguments; gchar *text; gint text_length; + char *oldlocale; debug (FALSE, ""); g_return_val_if_fail (pdf->current_page != NULL, -1); g_return_val_if_fail (pdf != NULL, -1); pc = GNOME_PRINT_CONTEXT (pdf); g_return_val_if_fail (GNOME_IS_PRINT_CONTEXT (pc), -1); + oldlocale = g_strdup (setlocale (LC_NUMERIC, NULL)); + setlocale (LC_NUMERIC, "C"); + va_start (arguments, format); text = g_strdup_vprintf (format, arguments); va_end (arguments); + + setlocale (LC_NUMERIC, oldlocale); + g_free (oldlocale); page = pdf->current_page; text_length = strlen (text);