diff options
author | dgp <dgp@users.sourceforge.net> | 2011-06-10 20:14:39 (GMT) |
---|---|---|
committer | dgp <dgp@users.sourceforge.net> | 2011-06-10 20:14:39 (GMT) |
commit | 4348b1d1a803b524fd852a46fddaf6572f546827 (patch) | |
tree | aeffdde9ead5b6c4becdeee9212a8c316ebd3273 /generic/tkEntry.c | |
parent | 1047d6425a9d9c79430c35804acaeee884488f1e (diff) | |
parent | 4786156306bcb3c0800108b508b32ad99332fd54 (diff) | |
download | tk-4348b1d1a803b524fd852a46fddaf6572f546827.zip tk-4348b1d1a803b524fd852a46fddaf6572f546827.tar.gz tk-4348b1d1a803b524fd852a46fddaf6572f546827.tar.bz2 |
Merge to RC branch
Diffstat (limited to 'generic/tkEntry.c')
-rw-r--r-- | generic/tkEntry.c | 11 |
1 files changed, 4 insertions, 7 deletions
diff --git a/generic/tkEntry.c b/generic/tkEntry.c index 3694375..8f181cd 100644 --- a/generic/tkEntry.c +++ b/generic/tkEntry.c @@ -13,8 +13,6 @@ * * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. - * - * RCS: @(#) $Id: tkEntry.c,v 1.47.2.2 2008/10/09 15:17:44 dgp Exp $ */ #include "tkInt.h" @@ -1330,11 +1328,10 @@ ConfigureEntry( * isn't a double value, we set it to -from. */ - int code; double dvalue; - code = Tcl_GetDouble(NULL, entryPtr->string, &dvalue); - if (code != TCL_OK) { + if (sscanf(entryPtr->string, "%lf", &dvalue) == 0) { + /* Scan failure */ dvalue = sbPtr->fromValue; } else { if (dvalue > sbPtr->toValue) { @@ -4241,9 +4238,9 @@ SpinboxInvoke( } else if (!DOUBLES_EQ(sbPtr->fromValue, sbPtr->toValue)) { double dvalue; - if (Tcl_GetDouble(NULL, entryPtr->string, &dvalue) != TCL_OK) { + if (sscanf(entryPtr->string, "%lf", &dvalue) == 0) { /* - * If the string is empty, or isn't a valid double value, just + * If the string doesn't scan as a double value, just * use the -from value */ |