From a96a700cf2ec87e29f9a08557f120eb5c03b76d0 Mon Sep 17 00:00:00 2001
From: Huw Davies <huw@codeweavers.com>
Date: Sun, 28 Nov 2004 14:59:13 +0000
Subject: [PATCH] Protect sscanfs with a "C" locale so that they still work
 with new glibcs in a locale doesn't use a '.' as a decimal separator.

---
 dlls/wineps/ppd.c | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/dlls/wineps/ppd.c b/dlls/wineps/ppd.c
index e6cf8f36e6b..04991d33337 100644
--- a/dlls/wineps/ppd.c
+++ b/dlls/wineps/ppd.c
@@ -23,6 +23,7 @@
 #include <stdarg.h>
 #include <stdio.h>
 #include <ctype.h>
+#include <locale.h>
 #include "windef.h"
 #include "winbase.h"
 #include "wine/debug.h"
@@ -710,8 +711,10 @@ PPD *PSDRV_ParsePPD(char *fname)
 #define PIA page->ImageableArea
 	    if(!PIA) {
  	        PIA = HeapAlloc( PSDRV_Heap, 0, sizeof(*PIA) );
+                push_lc_numeric("C");
 		sscanf(tuple.value, "%f%f%f%f", &PIA->llx, &PIA->lly,
 						&PIA->urx, &PIA->ury);
+                pop_lc_numeric();
 	    }
 #undef PIA
 	}
@@ -733,7 +736,9 @@ PPD *PSDRV_ParsePPD(char *fname)
 #define PD page->PaperDimension
 	    if(!PD) {
  	        PD = HeapAlloc( PSDRV_Heap, 0, sizeof(*PD) );
+                push_lc_numeric("C");
 		sscanf(tuple.value, "%f%f", &PD->x, &PD->y);
+                pop_lc_numeric();
 	    }
 #undef PD
 	}