diff options
Diffstat (limited to 'generic/tkScrollbar.c')
-rw-r--r-- | generic/tkScrollbar.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/generic/tkScrollbar.c b/generic/tkScrollbar.c index d736539..611da88 100644 --- a/generic/tkScrollbar.c +++ b/generic/tkScrollbar.c @@ -11,7 +11,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tkScrollbar.c,v 1.14 2008/07/23 23:24:21 nijtmans Exp $ + * RCS: @(#) $Id: tkScrollbar.c,v 1.15 2008/10/03 13:13:31 dkf Exp $ */ #include "tkInt.h" @@ -324,7 +324,7 @@ ScrollbarWidgetCmd( } else { fraction = ((double) pixels / (double) length); } - sprintf(buf, "%g", fraction); + Tcl_PrintDouble(NULL, fraction, buf); Tcl_SetResult(interp, buf, TCL_VOLATILE); } else if ((c == 'f') && (strncmp(argv[1], "fraction", length) == 0)) { int x, y, pos, length; @@ -359,7 +359,7 @@ ScrollbarWidgetCmd( } else if (fraction > 1.0) { fraction = 1.0; } - sprintf(buf, "%g", fraction); + Tcl_PrintDouble(NULL, fraction, buf); Tcl_SetResult(interp, buf, TCL_VOLATILE); } else if ((c == 'g') && (strncmp(argv[1], "get", length) == 0)) { if (argc != 2) { @@ -370,8 +370,8 @@ ScrollbarWidgetCmd( if (scrollPtr->flags & NEW_STYLE_COMMANDS) { char first[TCL_DOUBLE_SPACE], last[TCL_DOUBLE_SPACE]; - Tcl_PrintDouble(interp, scrollPtr->firstFraction, first); - Tcl_PrintDouble(interp, scrollPtr->lastFraction, last); + Tcl_PrintDouble(NULL, scrollPtr->firstFraction, first); + Tcl_PrintDouble(NULL, scrollPtr->lastFraction, last); Tcl_AppendResult(interp, first, " ", last, NULL); } else { char buf[TCL_INTEGER_SPACE * 4]; |