diff options
author | Karl Berry <karl@freefriends.org> | 2015-05-11 22:12:25 +0000 |
---|---|---|
committer | Karl Berry <karl@freefriends.org> | 2015-05-11 22:12:25 +0000 |
commit | 0417a4fa56359c545358f5fb8c9b3f88a1845db2 (patch) | |
tree | ed331ec191a82fe896f05005dee844269e406281 /Build/source/utils/asymptote/runpicture.in | |
parent | e7256bd4adc1d8df03ed8434e3f9cc15817b6f22 (diff) |
asy 2.33 sources
git-svn-id: svn://tug.org/texlive/trunk@37343 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Build/source/utils/asymptote/runpicture.in')
-rw-r--r-- | Build/source/utils/asymptote/runpicture.in | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/Build/source/utils/asymptote/runpicture.in b/Build/source/utils/asymptote/runpicture.in index 40209ed5860..e3896c4882d 100644 --- a/Build/source/utils/asymptote/runpicture.in +++ b/Build/source/utils/asymptote/runpicture.in @@ -576,7 +576,20 @@ void deconstruct(picture *f, picture *preamble=NULL, real magnification=1, b=group->bounds(); b *= magnification; + const char *oldlocale=setlocale(LC_NUMERIC,NULL); + bool override=oldlocale && strcmp(oldlocale,"C") != 0; + if(override) { + oldlocale=StrdupNoGC(oldlocale); + setlocale(LC_NUMERIC,"C"); + } + fprintf(pipeout,"%g %g %g %g\n",b.left,b.right,b.bottom,b.top); + + if(override) { + setlocale(LC_NUMERIC,oldlocale); + delete[] oldlocale; + } + fflush(pipeout); ++n; ++p; |