summaryrefslogtreecommitdiffstats
path: root/generic
diff options
context:
space:
mode:
authordkf <donal.k.fellows@manchester.ac.uk>2013-10-22 18:58:49 (GMT)
committerdkf <donal.k.fellows@manchester.ac.uk>2013-10-22 18:58:49 (GMT)
commit3840fcc4dd1c28595fc927287edcd057b0643420 (patch)
tree3fb5ddac3f3c1cb95aa48679ac4d28da1b1d1652 /generic
parent545698c7c06b1e3d1956d77508ecaf251163fb22 (diff)
parent1c8937d85be2f327d881c29e203c46df34b9da08 (diff)
downloadtcl-3840fcc4dd1c28595fc927287edcd057b0643420.zip
tcl-3840fcc4dd1c28595fc927287edcd057b0643420.tar.gz
tcl-3840fcc4dd1c28595fc927287edcd057b0643420.tar.bz2
[3556215]: Made [scan] match [format] better in what it accepts as a format
string, by allowing uppercase %X, %E and %G.
Diffstat (limited to 'generic')
-rw-r--r--generic/tclScan.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/generic/tclScan.c b/generic/tclScan.c
index ef7eedf..4dfc2d6 100644
--- a/generic/tclScan.c
+++ b/generic/tclScan.c
@@ -406,11 +406,14 @@ ValidateFormat(
*/
case 'd':
case 'e':
+ case 'E':
case 'f':
case 'g':
+ case 'G':
case 'i':
case 'o':
case 'x':
+ case 'X':
case 'b':
break;
case 'u':
@@ -743,6 +746,7 @@ Tcl_ScanObjCmd(
parseFlag |= TCL_PARSE_OCTAL_ONLY | TCL_PARSE_SCAN_PREFIXES;
break;
case 'x':
+ case 'X':
op = 'i';
parseFlag |= TCL_PARSE_HEXADECIMAL_ONLY;
break;
@@ -758,7 +762,9 @@ Tcl_ScanObjCmd(
case 'f':
case 'e':
+ case 'E':
case 'g':
+ case 'G':
op = 'f';
break;