diff options
author | dgp <dgp@users.sourceforge.net> | 2012-11-16 19:17:21 (GMT) |
---|---|---|
committer | dgp <dgp@users.sourceforge.net> | 2012-11-16 19:17:21 (GMT) |
commit | fd1f9d484eb12a94ef0005b475a12aa3429cfce5 (patch) | |
tree | b53fde11422fed477ec07ef2e2a982075c11b963 /generic/tclUtil.c | |
parent | b3a59469e023419e5a31fd41ed99714272b3819d (diff) | |
download | tcl-fd1f9d484eb12a94ef0005b475a12aa3429cfce5.zip tcl-fd1f9d484eb12a94ef0005b475a12aa3429cfce5.tar.gz tcl-fd1f9d484eb12a94ef0005b475a12aa3429cfce5.tar.bz2 |
Burn the octal bridges. We're not goin' back.
Diffstat (limited to 'generic/tclUtil.c')
-rw-r--r-- | generic/tclUtil.c | 68 |
1 files changed, 0 insertions, 68 deletions
diff --git a/generic/tclUtil.c b/generic/tclUtil.c index 40073d3..4e92772 100644 --- a/generic/tclUtil.c +++ b/generic/tclUtil.c @@ -3546,7 +3546,6 @@ TclGetIntForIndex( if (!strncmp(bytes, "end-", 4)) { bytes += 4; } - TclCheckBadOctal(interp, bytes); Tcl_SetErrorCode(interp, "TCL", "VALUE", "INDEX", NULL); } @@ -3691,73 +3690,6 @@ SetEndOffsetFromAny( /* *---------------------------------------------------------------------- * - * TclCheckBadOctal -- - * - * This function checks for a bad octal value and appends a meaningful - * error to the interp's result. - * - * Results: - * 1 if the argument was a bad octal, else 0. - * - * Side effects: - * The interpreter's result is modified. - * - *---------------------------------------------------------------------- - */ - -int -TclCheckBadOctal( - Tcl_Interp *interp, /* Interpreter to use for error reporting. If - * NULL, then no error message is left after - * errors. */ - const char *value) /* String to check. */ -{ - register const char *p = value; - - /* - * A frequent mistake is invalid octal values due to an unwanted leading - * zero. Try to generate a meaningful error message. - */ - - while (TclIsSpaceProc(*p)) { - p++; - } - if (*p == '+' || *p == '-') { - p++; - } - if (*p == '0') { - if ((p[1] == 'o') || p[1] == 'O') { - p += 2; - } - while (isdigit(UCHAR(*p))) { /* INTL: digit. */ - p++; - } - while (TclIsSpaceProc(*p)) { - p++; - } - if (*p == '\0') { - /* - * Reached end of string. - */ - - if (interp != NULL) { - /* - * Don't reset the result here because we want this result to - * be added to an existing error message as extra info. - */ - - Tcl_AppendToObj(Tcl_GetObjResult(interp), - " (looks like invalid octal number)", -1); - } - return 1; - } - } - return 0; -} - -/* - *---------------------------------------------------------------------- - * * ClearHash -- * * Remove all the entries in the hash table *tablePtr. |