From 99319bc83e151e4abcbef9f7139b6bd0dd7f4189 Mon Sep 17 00:00:00 2001 From: Adam Fedor Date: Thu, 5 Dec 2002 04:29:12 +0000 Subject: [PATCH] Update for GSSetLocale change git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@15250 72102866-910b-0410-8b05-ffd578937521 --- ChangeLog | 4 ++++ Source/NSPrintOperation.m | 23 ++++++++++++----------- 2 files changed, 16 insertions(+), 11 deletions(-) diff --git a/ChangeLog b/ChangeLog index 70bb2c6c7..6a6294a43 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,7 @@ +2002-12-04 Adam Fedor + + * Source/NSPrintOperation.m: Update for change in GSSetLocale. + 2002-12-04 Adam Fedor * Headers/gnustep/gui/DPSOperators.h (DPSPrintf): Remove inline diff --git a/Source/NSPrintOperation.m b/Source/NSPrintOperation.m index 6f9d775c7..ec27c1eeb 100644 --- a/Source/NSPrintOperation.m +++ b/Source/NSPrintOperation.m @@ -54,6 +54,7 @@ #include #include +#include #define NSNUMBER(a) [NSNumber numberWithInt: (a)] #define NSFNUMBER(a) [NSNumber numberWithFloat: (a)] @@ -939,10 +940,10 @@ scaleRect(NSRect rect, double scale) } /* Reset the current locale to a generic C locale so numbers - get printed correctly for PostScript (maybe we should only - set the numeric locale?). Save the current locale for later. */ - clocale = GSSetLocale(nil); - GSSetLocale(@"C"); + get printed correctly for PostScriptl + Save the current locale for later. */ + clocale = GSSetLocale(LC_NUMERIC, nil); + GSSetLocale(LC_NUMERIC, @"C"); /* Print the header information */ [_view beginDocument]; @@ -1010,7 +1011,7 @@ scaleRect(NSRect rect, double scale) [_view _endSheet]; } [_view endDocument]; - GSSetLocale(clocale); + GSSetLocale(LC_NUMERIC, clocale); /* Setup/reset for next time */ [dict setObject: NSNUMBER(info.last) forKey: NSPrintLastPage]; @@ -1287,8 +1288,8 @@ scaleRect(NSRect rect, double scale) /* Reset the current locale to a generic C locale so numbers get printed correctly for PostScript (maybe we should only set the numeric locale?). Save the current locale for later. */ - clocale = GSSetLocale(nil); - GSSetLocale(@"C"); + clocale = GSSetLocale(LC_NUMERIC, nil); + GSSetLocale(LC_NUMERIC, @"C"); /* Save this for the view to look at. Seems like there should be a better way to pass it to beginDocument */ @@ -1299,7 +1300,7 @@ scaleRect(NSRect rect, double scale) [_view displayRectIgnoringOpacity: _rect]; [_view endDocument]; - GSSetLocale(clocale); + GSSetLocale(LC_NUMERIC, clocale); } - (BOOL)isEPSOperation @@ -1383,12 +1384,12 @@ scaleRect(NSRect rect, double scale) /* Reset the current locale to a generic C locale so numbers get printed correctly for PostScript (maybe we should only set the numeric locale?). Save the current locale for later. */ - clocale = GSSetLocale(nil); - GSSetLocale(@"C"); + clocale = GSSetLocale(LC_NUMERIC, nil); + GSSetLocale(LC_NUMERIC, @"C"); [_view displayRectIgnoringOpacity: _rect]; - GSSetLocale(clocale); + GSSetLocale(LC_NUMERIC, clocale); } - (BOOL)deliverResult