summaryrefslogtreecommitdiffstats
path: root/generic/tclScan.c
diff options
context:
space:
mode:
authordkf <donal.k.fellows@manchester.ac.uk>2013-10-22 18:55:02 (GMT)
committerdkf <donal.k.fellows@manchester.ac.uk>2013-10-22 18:55:02 (GMT)
commit1c8937d85be2f327d881c29e203c46df34b9da08 (patch)
tree4a99121a110b0074997b0c840212381d383a00c1 /generic/tclScan.c
parent19365e8ffd408a387d99496423bd1d1ef04e492a (diff)
downloadtcl-1c8937d85be2f327d881c29e203c46df34b9da08.zip
tcl-1c8937d85be2f327d881c29e203c46df34b9da08.tar.gz
tcl-1c8937d85be2f327d881c29e203c46df34b9da08.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/tclScan.c')
-rw-r--r--generic/tclScan.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/generic/tclScan.c b/generic/tclScan.c
index d83c8c9..229f3fa 100644
--- a/generic/tclScan.c
+++ b/generic/tclScan.c
@@ -398,11 +398,14 @@ ValidateFormat(
*/
case 'd':
case 'e':
+ case 'E':
case 'f':
case 'g':
+ case 'G':
case 'i':
case 'o':
case 'x':
+ case 'X':
break;
case 'u':
if (flags & SCAN_BIG) {
@@ -727,6 +730,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;
@@ -738,7 +742,9 @@ Tcl_ScanObjCmd(
case 'f':
case 'e':
+ case 'E':
case 'g':
+ case 'G':
op = 'f';
break;