diff options
author | dgp <dgp@users.sourceforge.net> | 2014-12-23 02:12:59 (GMT) |
---|---|---|
committer | dgp <dgp@users.sourceforge.net> | 2014-12-23 02:12:59 (GMT) |
commit | b0078c812949591757520d79106eae38f21d33f0 (patch) | |
tree | c15f7352ff30b6ef63061c5c44559b74fa0915f1 /generic/tclParse.c | |
parent | 49e7d0262bb9fcc94ce092927df43261350e319a (diff) | |
download | tcl-b0078c812949591757520d79106eae38f21d33f0.zip tcl-b0078c812949591757520d79106eae38f21d33f0.tar.gz tcl-b0078c812949591757520d79106eae38f21d33f0.tar.bz2 |
Eliminate TclIsLocalScalar(). No callers left.
Diffstat (limited to 'generic/tclParse.c')
-rw-r--r-- | generic/tclParse.c | 50 |
1 files changed, 0 insertions, 50 deletions
diff --git a/generic/tclParse.c b/generic/tclParse.c index ca12be5..5524979 100644 --- a/generic/tclParse.c +++ b/generic/tclParse.c @@ -2526,56 +2526,6 @@ TclObjCommandComplete( } /* - *---------------------------------------------------------------------- - * - * TclIsLocalScalar -- - * - * Check to see if a given string is a legal scalar variable name with no - * namespace qualifiers or substitutions. - * - * Results: - * Returns 1 if the variable is a local scalar. - * - * Side effects: - * None. - * - *---------------------------------------------------------------------- - */ - -int -TclIsLocalScalar( - const char *src, - int len) -{ - const char *p; - const char *lastChar = src + (len - 1); - - for (p=src ; p<=lastChar ; p++) { - if ((CHAR_TYPE(*p) != TYPE_NORMAL) - && (CHAR_TYPE(*p) != TYPE_COMMAND_END)) { - /* - * TCL_COMMAND_END is returned for the last character of the - * string. By this point we know it isn't an array or namespace - * reference. - */ - - return 0; - } - if (*p == '(') { - if (*lastChar == ')') { /* We have an array element */ - return 0; - } - } else if (*p == ':') { - if ((p != lastChar) && *(p+1) == ':') { /* qualified name */ - return 0; - } - } - } - - return 1; -} - -/* * Local Variables: * mode: c * c-basic-offset: 4 |