summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorHarm van der Heijden <hrm@users.sourceforge.net>2001-12-24 18:40:13 +0000
committerHarm van der Heijden <hrm@users.sourceforge.net>2001-12-24 18:40:13 +0000
commit045e74b5df70e05ba994dcff65f6c1f1556b89e7 (patch)
treeeea05eb1c354d6a59f6b628a0465cdef7e61def9 /src
parent6254378bae8f4423f6dc46b66920240a7e424dc3 (diff)
downloadxine-lib-045e74b5df70e05ba994dcff65f6c1f1556b89e7.tar.gz
xine-lib-045e74b5df70e05ba994dcff65f6c1f1556b89e7.tar.bz2
parsing of external file failed due to locale setting of numerical
types. (the file is .overlay/resXxXxX, generated by em8300's autocal) this was probably introduced sometime between xine 0.9.4 and 0.9.7 in xine-ui. Fix is to temporarily set the locale to "en_US". CVS patchset: 1302 CVS date: 2001/12/24 18:40:13
Diffstat (limited to 'src')
-rw-r--r--src/dxr3/dxr3_vo_core.c12
1 files changed, 11 insertions, 1 deletions
diff --git a/src/dxr3/dxr3_vo_core.c b/src/dxr3/dxr3_vo_core.c
index 84092955a..aa710f687 100644
--- a/src/dxr3/dxr3_vo_core.c
+++ b/src/dxr3/dxr3_vo_core.c
@@ -17,7 +17,7 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA
*
- * $Id: dxr3_vo_core.c,v 1.12 2001/12/23 02:36:55 hrm Exp $
+ * $Id: dxr3_vo_core.c,v 1.13 2001/12/24 18:40:13 hrm Exp $
*
*************************************************************************
* core functions common to both Standard and RT-Encoding vo plugins *
@@ -40,6 +40,7 @@
*************************************************************************/
#include "dxr3_video_out.h"
+#include <locale.h>
#define OVERLAY_LOG 0
@@ -562,6 +563,13 @@ int dxr3_overlay_read_state(dxr3_overlay_t *this)
void *ptr;
int type;
int j;
+ char *loc;
+
+ /* store previous locale */
+ loc = setlocale(LC_NUMERIC, NULL);
+ /* set american locale for floating point values
+ * (used by .overlay/res file) */
+ setlocale(LC_NUMERIC, "en_US");
strcpy(fname,getenv("HOME"));
strcat(fname,"/.overlay");
@@ -623,6 +631,8 @@ int dxr3_overlay_read_state(dxr3_overlay_t *this)
}
free(lut);
fclose(fp);
+ /* restore original locale */
+ setlocale(LC_NUMERIC, loc);
return 0;
}