From 319a66b560b7ca7144b88ced1982ba5e490e6e57 Mon Sep 17 00:00:00 2001 From: John Darrington Date: Sat, 1 Dec 2012 07:08:55 +0100 Subject: [PATCH] measure.c: Use c_strtod instead of strtod Since the input to these function come from hard coded strings, it is not appropriate to interpret them in a locale dependent manner. --- src/output/measure.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/src/output/measure.c b/src/output/measure.c index 14cd5dab9f..60894f1cc2 100644 --- a/src/output/measure.c +++ b/src/output/measure.c @@ -18,6 +18,7 @@ #include "output/measure.h" +#include #include #include #if HAVE_LC_PAPER @@ -50,7 +51,7 @@ measure_dimension (const char *dimen) char *tail; /* Number. */ - raw = strtod (dimen, &tail); + raw = c_strtod (dimen, &tail); if (raw < 0.0) goto syntax_error; @@ -150,7 +151,7 @@ parse_paper_size (const char *size, int *h, int *v) char *tail; /* Width. */ - raw_h = strtod (size, &tail); + raw_h = c_strtod (size, &tail); if (raw_h <= 0.0) return false; @@ -158,7 +159,7 @@ parse_paper_size (const char *size, int *h, int *v) tail += strspn (tail, CC_SPACES "x,"); /* Length. */ - raw_v = strtod (tail, &tail); + raw_v = c_strtod (tail, &tail); if (raw_v <= 0.0) return false; -- 2.30.2