Skip to content

Commit

Permalink
remove dead code
Browse files Browse the repository at this point in the history
  • Loading branch information
weltling committed Oct 26, 2016
1 parent 6679df1 commit 71f73d7
Showing 1 changed file with 0 additions and 51 deletions.
51 changes: 0 additions & 51 deletions Zend/zend_virtual_cwd.c
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,6 @@

#include "zend.h"
#include "zend_virtual_cwd.h"
#include "tsrm_strtok_r.h"

#ifdef ZEND_WIN32
#include <io.h>
Expand Down Expand Up @@ -85,56 +84,6 @@ cwd_state main_cwd_state; /* True global */
#include <direct.h>
#endif

#ifdef ZEND_WIN32
#include <tchar.h>
#define tsrm_strtok_r(a,b,c) _tcstok((a),(b))
#define TOKENIZER_STRING "/\\"

static int php_check_dots(const char *element, int n)
{
while (n-- > 0) if (element[n] != '.') break;

return (n != -1);
}

#define IS_DIRECTORY_UP(element, len) \
(len >= 2 && !php_check_dots(element, len))

#define IS_DIRECTORY_CURRENT(element, len) \
(len == 1 && element[0] == '.')

#elif defined(NETWARE)
/* NetWare has strtok() (in LibC) and allows both slashes in paths, like Windows --
but rest of the stuff is like Unix */
/* strtok() call in LibC is abending when used in a different address space -- hence using
PHP's version itself for now */
/*#define tsrm_strtok_r(a,b,c) strtok((a),(b))*/
#define TOKENIZER_STRING "/\\"

#else
#define TOKENIZER_STRING "/"
#endif

/* default macros */

#ifndef IS_DIRECTORY_UP
#define IS_DIRECTORY_UP(element, len) \
(len == 2 && element[0] == '.' && element[1] == '.')
#endif

#ifndef IS_DIRECTORY_CURRENT
#define IS_DIRECTORY_CURRENT(element, len) \
(len == 1 && element[0] == '.')
#endif

/* define this to check semantics */
#define IS_DIR_OK(s) (1)

#ifndef IS_DIR_OK
#define IS_DIR_OK(state) (php_is_dir_ok(state) == 0)
#endif


#define CWD_STATE_COPY(d, s) \
(d)->cwd_length = (s)->cwd_length; \
(d)->cwd = (char *) emalloc((s)->cwd_length+1); \
Expand Down

0 comments on commit 71f73d7

Please sign in to comment.