diff options
author | dkf <donal.k.fellows@manchester.ac.uk> | 2008-10-03 13:13:31 (GMT) |
---|---|---|
committer | dkf <donal.k.fellows@manchester.ac.uk> | 2008-10-03 13:13:31 (GMT) |
commit | 8b4ecc93591895810fb1546a33a8dbd0ac0ab131 (patch) | |
tree | 5f8791b7d6fede6856ef719fbb242afe7ff5bc5f /generic/tkCanvText.c | |
parent | c235c1b9bd589c5b0d1fa2ca85f45f1521cf188c (diff) | |
download | tk-8b4ecc93591895810fb1546a33a8dbd0ac0ab131.zip tk-8b4ecc93591895810fb1546a33a8dbd0ac0ab131.tar.gz tk-8b4ecc93591895810fb1546a33a8dbd0ac0ab131.tar.bz2 |
Convert %g to Tcl_PrintDouble to avoid locale trouble. [Bug 2112563]
Diffstat (limited to 'generic/tkCanvText.c')
-rw-r--r-- | generic/tkCanvText.c | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/generic/tkCanvText.c b/generic/tkCanvText.c index 34206ea..3450633 100644 --- a/generic/tkCanvText.c +++ b/generic/tkCanvText.c @@ -9,7 +9,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tkCanvText.c,v 1.27 2008/04/27 22:38:55 dkf Exp $ + * RCS: @(#) $Id: tkCanvText.c,v 1.28 2008/10/03 13:13:31 dkf Exp $ */ #include <stdio.h> @@ -1501,8 +1501,13 @@ TextToPostscript( } Tk_GetFontMetrics(textPtr->tkfont, &fm); - sprintf(buffer, "] %d %g %g %s %s DrawText\n", - fm.linespace, x / -2.0, y / 2.0, justify, + sprintf(buffer. "] %d ", fm.linespace); + Tcl_AppendResult(interp, buffer, NULL); + Tcl_PrintDouble(NULL, x / -2.0, buffer); + Tcl_AppendResult(interp, buffer, " ", NULL); + Tcl_PrintDouble(NULL, y / 2.0, buffer); + Tcl_AppendResult(interp, buffer, NULL); + sprintf(buffer, " %s %s DrawText\n", justify, ((stipple == None) ? "false" : "true")); Tcl_AppendResult(interp, buffer, NULL); |