From 1b3a0a73ae314d9cade49bd422025fb4d16c0cc9 Mon Sep 17 00:00:00 2001 From: dgp Date: Tue, 12 Jun 2018 19:16:38 +0000 Subject: Remove AbsolutePath(), no longer used. --- generic/tclZipfs.c | 82 ------------------------------------------------------ 1 file changed, 82 deletions(-) diff --git a/generic/tclZipfs.c b/generic/tclZipfs.c index e934490..1df6694 100644 --- a/generic/tclZipfs.c +++ b/generic/tclZipfs.c @@ -760,88 +760,6 @@ CanonicalPath(const char *root, const char *tail, Tcl_DString *dsPtr,int ZIPFSPA return result; } - -/* - *------------------------------------------------------------------------- - * - * AbsolutePath -- - * - * This function computes the absolute path from a given - * (relative) path name into the specified Tcl_DString. - * - * Results: - * Returns the pointer to the absolute path contained in the - * specified Tcl_DString. - * - * Side effects: - * Modifies the specified Tcl_DString. - * - *------------------------------------------------------------------------- - */ - -static char * -AbsolutePath(const char *path, -#if HAS_DRIVES - int *drvPtr, -#endif - Tcl_DString *dsPtr) -{ - char *result; - -#if HAS_DRIVES - if (drvPtr != NULL) { - *drvPtr = 0; - } -#endif - if (*path == '~') { - Tcl_DStringAppend(dsPtr, path, -1); - return Tcl_DStringValue(dsPtr); - } - if ((*path != '/') -#if HAS_DRIVES - && (*path != '\\') && - (((*path != '\0') && (strchr(drvletters, *path) == NULL)) || - (path[1] != ':')) -#endif - ) { - Tcl_DString pwd; - - /* relative path */ - Tcl_DStringInit(&pwd); - Tcl_GetCwd(NULL, &pwd); - result = Tcl_DStringValue(&pwd); -#if HAS_DRIVES - if ((result[0] != '\0') && (strchr(drvletters, result[0]) != NULL) && - (result[1] == ':')) { - if (drvPtr != NULL) { - drvPtr[0] = result[0]; - if ((drvPtr[0] >= 'a') && (drvPtr[0] <= 'z')) { - drvPtr[0] -= 'a' - 'A'; - } - } - result += 2; - } -#endif - result = CanonicalPath(result, path, dsPtr, 0); - Tcl_DStringFree(&pwd); - } else { - /* absolute path */ -#if HAS_DRIVES - if ((path[0] != '\0') && (strchr(drvletters, path[0]) != NULL) && - (path[1] == ':')) { - if (drvPtr != NULL) { - drvPtr[0] = path[0]; - if ((drvPtr[0] >= 'a') && (drvPtr[0] <= 'z')) { - drvPtr[0] -= 'a' - 'A'; - } - } - } -#endif - result = CanonicalPath("", path, dsPtr, 0); - } - return result; -} - /* *------------------------------------------------------------------------- * -- cgit v0.12