cvs: php4 /main php_virtual_cwd.c php_virtual_cwd.h

From: Date: Sun, 27 Aug 2000 19:36:35 +0000
Subject: cvs: php4 /main php_virtual_cwd.c php_virtual_cwd.h
Groups: php.cvs 
Request: Send a blank email to php-cvs+get-1418@lists.php.net to get a copy of this message
sas Sun Aug 27 12:36:35 2000 EDT Modified files: /php4/main php_virtual_cwd.c php_virtual_cwd.h Log: Export IS_ABSOLUTE_PATH to the outside world. Index: php4/main/php_virtual_cwd.c diff -u php4/main/php_virtual_cwd.c:1.72 php4/main/php_virtual_cwd.c:1.73 --- php4/main/php_virtual_cwd.c:1.72 Sun Aug 27 12:20:53 2000 +++ php4/main/php_virtual_cwd.c Sun Aug 27 12:36:35 2000 @@ -17,7 +17,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: php_virtual_cwd.c,v 1.72 2000/08/27 19:20:53 andi Exp $ */ +/* $Id: php_virtual_cwd.c,v 1.73 2000/08/27 19:36:35 sas Exp $ */ #include <sys/types.h> #include <sys/stat.h> @@ -26,7 +26,6 @@ #include <limits.h> #include <errno.h> #include <stdlib.h> -#include <ctype.h> #include <fcntl.h> #ifdef ZEND_WIN32 @@ -68,13 +67,9 @@ #ifdef ZEND_WIN32 #define php_strtok_r(a,b,c) strtok((a),(b)) -#define IS_SLASH(c) ((c) == '/' || (c) == '\\') #define DEFAULT_SLASH '\\' #define TOKENIZER_STRING "/\\" -#define IS_ABSOLUTE_PATH(path, len) \ - (len >= 2 && isalpha(path[0]) && path[1] == ':') - #define COPY_WHEN_ABSOLUTE 2 static int php_check_dots(const char *element, int n) @@ -92,18 +87,12 @@ #else -#define IS_SLASH(c) ((c) == '/') #define DEFAULT_SLASH '/' #define TOKENIZER_STRING "/" #endif /* default macros */ - -#ifndef IS_ABSOLUTE_PATH -#define IS_ABSOLUTE_PATH(path, len) \ - (IS_SLASH(path[0])) -#endif #ifndef IS_DIRECTORY_UP #define IS_DIRECTORY_UP(element, len) \ Index: php4/main/php_virtual_cwd.h diff -u php4/main/php_virtual_cwd.h:1.37 php4/main/php_virtual_cwd.h:1.38 --- php4/main/php_virtual_cwd.h:1.37 Sun Aug 27 11:01:17 2000 +++ php4/main/php_virtual_cwd.h Sun Aug 27 12:36:35 2000 @@ -17,7 +17,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: php_virtual_cwd.h,v 1.37 2000/08/27 18:01:17 andi Exp $ */ +/* $Id: php_virtual_cwd.h,v 1.38 2000/08/27 19:36:35 sas Exp $ */ #ifndef VIRTUAL_CWD_H #define VIRTUAL_CWD_H @@ -36,12 +36,28 @@ #include <unistd.h> #endif +#include <ctype.h> + #ifdef ZEND_WIN32 #include "win32/readdir.h" + +#define IS_SLASH(c) ((c) == '/' || (c) == '\\') + +#define IS_ABSOLUTE_PATH(path, len) \ + (len >= 2 && isalpha(path[0]) && path[1] == ':') + #else #ifdef HAVE_DIRENT_H #include <dirent.h> #endif + +#define IS_SLASH(c) ((c) == '/') + +#endif + +#ifndef IS_ABSOLUTE_PATH +#define IS_ABSOLUTE_PATH(path, len) \ + (IS_SLASH(path[0])) #endif #if HAVE_UTIME

« previous php.cvs (#1418) next »