Update for GSSetLocale change

git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@15250 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
Adam Fedor 2002-12-05 04:29:12 +00:00
parent f9917b89bd
commit 99319bc83e
2 changed files with 16 additions and 11 deletions

View file

@ -54,6 +54,7 @@
#include <AppKit/PSOperators.h>
#include <gnustep/base/GSLocale.h>
#include <locale.h>
#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