Stephen,
Andy, Jonathan, what's going on here?
My screwup - I didn't notice that it wouldn't work on Win95. I don't
think anyone's testing that platform but I think they would have seen
the same old broken behaviour that the patch was intended to fix.
The patch below should work on all versions of MS Windows, but I only
have Win98se and WinXP available to test. Rick's patch to #define
LOCALE_RETURN_NUMBER to fix cygwin builds could now be safely reverted,
but is harmless. I'll apply a similar patch to 21.5 myself.
Jonathan.
ChangeLog for src:
2002-05-21 Jonathan Harris <jonathan(a)xemacs.org>
* device-msw.c (mswindows_handle_page_setup_dialog_box):
Fix detection of metric units to work on Win95
Index: src/device-msw.c
===================================================================
RCS file: /pack/xemacscvs/XEmacs/xemacs/src/device-msw.c,v
retrieving revision 1.24.2.3.2.1
diff -u -r1.24.2.3.2.1 device-msw.c
--- src/device-msw.c 2002/03/30 21:45:55 1.24.2.3.2.1
+++ src/device-msw.c 2002/05/21 22:05:47
@@ -866,11 +866,12 @@
{
Lisp_Devmode *ldm = decode_devmode (device);
PAGESETUPDLG pd;
- DWORD data;
+ TCHAR measure[2];
+ int data;
- GetLocaleInfo (LOCALE_USER_DEFAULT,
-
LOCALE_IMEASURE|LOCALE_RETURN_NUMBER,
-
(LPTSTR) &data, sizeof(data));
+ GetLocaleInfo (LOCALE_USER_DEFAULT, LOCALE_IMEASURE,
+
measure, sizeof(measure));
+ data = (strcmp (measure, "0"));
memset (&pd, 0, sizeof (pd));
pd.lStructSize = sizeof (pd);
--
Jonathan Harris | jhar(a)tardis.ed.ac.uk
London, England | Jonathan.Harris(a)symbian.com