summaryrefslogtreecommitdiffstats
path: root/generic
diff options
context:
space:
mode:
authordgp <dgp@users.sourceforge.net>2011-03-08 19:24:23 (GMT)
committerdgp <dgp@users.sourceforge.net>2011-03-08 19:24:23 (GMT)
commitfbbea57c8db5cba0fe0ebe3d067ed136454343b5 (patch)
tree7087086cc103c02b1120e586580e1d5414b3fed9 /generic
parent896ceaf5023cd32e741ee7f6895eaeedf6afef49 (diff)
downloadtcl-fbbea57c8db5cba0fe0ebe3d067ed136454343b5.zip
tcl-fbbea57c8db5cba0fe0ebe3d067ed136454343b5.tar.gz
tcl-fbbea57c8db5cba0fe0ebe3d067ed136454343b5.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.h3
-rw-r--r--generic/tclUtil.c111
2 files changed, 0 insertions, 114 deletions
diff --git a/generic/tclInt.h b/generic/tclInt.h
index 649d0cd..c966610 100644
--- a/generic/tclInt.h
+++ b/generic/tclInt.h
@@ -2667,9 +2667,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 d6e5b7b..3565165 100644
--- a/generic/tclUtil.c
+++ b/generic/tclUtil.c
@@ -488,117 +488,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