diff options
author | Andi Gutmans <andi@php.net> | 2000-08-21 04:30:25 +0000 |
---|---|---|
committer | Andi Gutmans <andi@php.net> | 2000-08-21 04:30:25 +0000 |
commit | 99d3b9bfe82f7852b1d2b06af34c9d9b009a3f4c (patch) | |
tree | 42a5c07a4609b6aa11f9b3ebbc8d63680da8b9c0 | |
parent | 6d7cc46e387318464268b9e4b74e4738176c5863 (diff) | |
download | php-git-99d3b9bfe82f7852b1d2b06af34c9d9b009a3f4c.tar.gz |
- Remove old/deprecated version of expand_filepath
-rw-r--r-- | main/fopen_wrappers.c | 45 |
1 files changed, 0 insertions, 45 deletions
diff --git a/main/fopen_wrappers.c b/main/fopen_wrappers.c index 406c295e0b..c6aea3d003 100644 --- a/main/fopen_wrappers.c +++ b/main/fopen_wrappers.c @@ -1063,8 +1063,6 @@ PHPAPI char *php_strip_url_passwd(char *url) } -#if 1 - PHPAPI char *expand_filepath(const char *filepath, char *real_path) { cwd_state new_state; @@ -1094,49 +1092,6 @@ PHPAPI char *expand_filepath(const char *filepath, char *real_path) return real_path; } -#else - -PHPAPI char *expand_filepath(char *filepath) -{ - char *retval = NULL; - - if (filepath[0] == '.') { - char *cwd = malloc(MAXPATHLEN + 1); - - if (V_GETCWD(cwd, MAXPATHLEN)) { - char *cwd_end = cwd + strlen(cwd); - - if (filepath[1] == '.') { /* parent directory - .. */ - /* erase the last directory name from the path */ -#ifdef PHP_WIN32 - while (*cwd_end != '/' || *cwd_end != '\\') { -#else - while (*cwd_end != '/') { -#endif - *cwd_end-- = 0; - } - filepath++; /* make filepath appear as a current directory path */ - } -#ifdef PHP_WIN32 - if (cwd_end > cwd && (*cwd_end == '/' || *cwd_end == '\\')) { /* remove trailing slashes */ -#else - if (cwd_end > cwd && *cwd_end == '/') { /* remove trailing slashes */ -#endif - *cwd_end-- = 0; - } - retval = (char *) malloc(strlen(cwd) + strlen(filepath) - 1 + 1); - strcpy(retval, cwd); - strcat(retval, filepath + 1); - free(cwd); - } - } - if (!retval) { - retval = strdup(filepath); - } - return retval; -} - -#endif /* * Local variables: |