diff options
author | scuri <scuri> | 2010-10-19 15:48:26 +0000 |
---|---|---|
committer | scuri <scuri> | 2010-10-19 15:48:26 +0000 |
commit | 736712ef1e87d38e52e502d859cca2dcad56a3ce (patch) | |
tree | 49ec51ce6376e2797258cd68d4db64b4f9452b4d /src/drv/cdps.c | |
parent | d965dd8953d37a41ab8958a3ff05d0d9aa14c09f (diff) |
*** empty log message ***
Diffstat (limited to 'src/drv/cdps.c')
-rw-r--r-- | src/drv/cdps.c | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/src/drv/cdps.c b/src/drv/cdps.c index 08d6ba7..0db3590 100644 --- a/src/drv/cdps.c +++ b/src/drv/cdps.c @@ -9,6 +9,7 @@ #include <string.h> #include <time.h> #include <math.h> +#include <locale.h> #include "cd.h" #include "cd_private.h" @@ -64,6 +65,7 @@ struct _cdCtxCanvas int level1; /* if true generates level 1 only function calls */ int landscape; /* page orientation */ int debug; /* print debug strings in the file */ + char* old_locale; float rotate_angle; int rotate_center_x, @@ -391,6 +393,12 @@ static void cdkillcanvas(cdCtxCanvas *ctxcanvas) fclose(ctxcanvas->file); + if (ctxcanvas->old_locale) + { + setlocale(LC_NUMERIC, ctxcanvas->old_locale); + free(ctxcanvas->old_locale); + } + memset(ctxcanvas, 0, sizeof(cdCtxCanvas)); free(ctxcanvas); } @@ -1965,6 +1973,10 @@ static void cdcreatecanvas(cdCanvas* canvas, void *data) ctxcanvas = (cdCtxCanvas *)malloc(sizeof(cdCtxCanvas)); memset(ctxcanvas, 0, sizeof(cdCtxCanvas)); + /* SVN specification states that number must use dot as decimal separator */ + ctxcanvas->old_locale = cdStrDup(setlocale(LC_NUMERIC, NULL)); + setlocale(LC_NUMERIC, "C"); + line += cdGetFileName(line, filename); if (filename[0] == 0) return; |