diff options
author | dgp <dgp@users.sourceforge.net> | 2011-03-08 19:27:46 (GMT) |
---|---|---|
committer | dgp <dgp@users.sourceforge.net> | 2011-03-08 19:27:46 (GMT) |
commit | f1e390fc29f2b6d8bb7d6157c6a70ce42cbba762 (patch) | |
tree | eb0f6965bc086189a82d579f14bbcf6fb02a32c1 /generic | |
parent | 16a4cc132d523f9d754a92cae5f0b293a816796c (diff) | |
parent | fbbea57c8db5cba0fe0ebe3d067ed136454343b5 (diff) | |
download | tcl-f1e390fc29f2b6d8bb7d6157c6a70ce42cbba762.zip tcl-f1e390fc29f2b6d8bb7d6157c6a70ce42cbba762.tar.gz tcl-f1e390fc29f2b6d8bb7d6157c6a70ce42cbba762.tar.bz2 |
* generic/tclInt.h: Remove TclMarkList() routine, an experimental
* generic/tclUtil.c: dead-end from the 8.5 alpha days.
Diffstat (limited to 'generic')
-rw-r--r-- | generic/tclInt.h | 3 | ||||
-rw-r--r-- | generic/tclUtil.c | 111 |
2 files changed, 0 insertions, 114 deletions
diff --git a/generic/tclInt.h b/generic/tclInt.h index ca87530..180e0e8 100644 --- a/generic/tclInt.h +++ b/generic/tclInt.h @@ -2994,9 +2994,6 @@ MODULE_SCOPE Tcl_Obj * TclLsetFlat(Tcl_Interp *interp, Tcl_Obj *listPtr, Tcl_Obj *valuePtr); MODULE_SCOPE Tcl_Command TclMakeEnsemble(Tcl_Interp *interp, const char *name, const EnsembleImplMap map[]); -MODULE_SCOPE int TclMarkList(Tcl_Interp *interp, const char *list, - const char *end, int *argcPtr, - const int **argszPtr, const char ***argvPtr); MODULE_SCOPE int TclMergeReturnOptions(Tcl_Interp *interp, int objc, Tcl_Obj *const objv[], Tcl_Obj **optionsPtrPtr, int *codePtr, int *levelPtr); diff --git a/generic/tclUtil.c b/generic/tclUtil.c index 7161fdd..d77c276 100644 --- a/generic/tclUtil.c +++ b/generic/tclUtil.c @@ -490,117 +490,6 @@ Tcl_SplitList( /* *---------------------------------------------------------------------- * - * TclMarkList -- - * - * Marks the locations within a string where list elements start and - * computes where they end. - * - * Results - * The return value is normally TCL_OK, which means that the list was - * successfully split up. If TCL_ERROR is returned, it means that "list" - * didn't have proper list structure; the interp's result will contain a - * more detailed error message. - * - * *argvPtr will be filled in with the address of an array whose elements - * point to the places where the elements of list start, in order. - * *argcPtr will get filled in with the number of valid elements in the - * array. *argszPtr will get filled in with the address of an array whose - * elements are the lengths of the elements of the list, in order. - * Note: *argvPtr, *argcPtr and *argszPtr are only modified if the - * function returns normally. - * - * Side effects: - * Memory is allocated. - * - *---------------------------------------------------------------------- - */ - -int -TclMarkList( - Tcl_Interp *interp, /* Interpreter to use for error reporting. If - * NULL, no error message is left. */ - const char *list, /* Pointer to string with list structure. */ - const char *end, /* Pointer to first char after the list. */ - int *argcPtr, /* Pointer to location to fill in with the - * number of elements in the list. */ - const int **argszPtr, /* Pointer to place to store length of list - * elements. */ - const char ***argvPtr) /* Pointer to place to store pointer to array - * of pointers to list elements. */ -{ - const char **argv, *l, *element; - int *argn, length, size, i, result, elSize, brace; - - /* - * Figure out how much space to allocate. There must be enough space for - * the array of pointers and lengths. To estimate the number of pointers - * needed, count the number of whitespace characters in the list. - */ - - for (size=2, l=list ; l!=end ; l++) { - if (isspace(UCHAR(*l))) { /* INTL: ISO space. */ - size++; - - /* - * Consecutive space can only count as a single list delimiter. - */ - - while (1) { - char next = *(l + 1); - - if ((l+1) == end) { - break; - } - l++; - if (isspace(UCHAR(next))) { /* INTL: ISO space. */ - continue; - } - break; - } - } - } - length = l - list; - argv = (const char **) ckalloc((unsigned) size * sizeof(char *)); - argn = (int *) ckalloc((unsigned) size * sizeof(int *)); - - for (i = 0; list != end; i++) { - const char *prevList = list; - - result = TclFindElement(interp, list, length, &element, &list, - &elSize, &brace); - length -= (list - prevList); - if (result != TCL_OK) { - ckfree((char *) argv); - ckfree((char *) argn); - return result; - } - if (*element == 0) { - break; - } - if (i >= size) { - ckfree((char *) argv); - ckfree((char *) argn); - if (interp != NULL) { - Tcl_SetResult(interp, "internal error in TclMarkList", - TCL_STATIC); - } - return TCL_ERROR; - } - argv[i] = element; - argn[i] = elSize; - } - - argv[i] = NULL; - argn[i] = 0; - *argvPtr = argv; - *argszPtr = argn; - *argcPtr = i; - return TCL_OK; -} - -/* - *---------------------------------------------------------------------- - * * Tcl_ScanElement -- * * This function is a companion function to Tcl_ConvertElement. It scans |