- Change PHP_ to V_ (directory & file functions)

This commit is contained in:
Andi Gutmans 2000-04-15 14:28:48 +00:00
parent 1665cba750
commit c9911a151e
9 changed files with 11 additions and 11 deletions

View file

@ -571,7 +571,7 @@ PHP_FUNCTION(posix_getcwd)
char buffer[MAXPATHLEN]; char buffer[MAXPATHLEN];
char *p; char *p;
p = PHP_GETCWD(buffer, MAXPATHLEN); p = V_GETCWD(buffer, MAXPATHLEN);
if (!p) { if (!p) {
php_error(E_WARNING, "posix_getcwd() failed with '%s'", php_error(E_WARNING, "posix_getcwd() failed with '%s'",
strerror(errno)); strerror(errno));

View file

@ -210,7 +210,7 @@ PHP_FUNCTION(chdir)
} }
convert_to_string_ex(arg); convert_to_string_ex(arg);
ret = PHP_CHDIR((*arg)->value.str.val); ret = V_CHDIR((*arg)->value.str.val);
if (ret < 0) { if (ret < 0) {
php_error(E_WARNING, "ChDir: %s (errno %d)", strerror(errno), errno); php_error(E_WARNING, "ChDir: %s (errno %d)", strerror(errno), errno);
@ -234,9 +234,9 @@ PHP_FUNCTION(getcwd)
} }
#if HAVE_GETCWD #if HAVE_GETCWD
ret = PHP_GETCWD(path,MAXPATHLEN-1); ret = V_GETCWD(path,MAXPATHLEN-1);
#elif HAVE_GETWD #elif HAVE_GETWD
ret = PHP_GETWD(path); ret = V_GETWD(path);
/* /*
* #warning is not ANSI C * #warning is not ANSI C
* #else * #else

View file

@ -387,7 +387,7 @@ PHP_FUNCTION(touch)
/* create the file if it doesn't exist already */ /* create the file if it doesn't exist already */
ret = stat((*filename)->value.str.val, &sb); ret = stat((*filename)->value.str.val, &sb);
if (ret == -1) { if (ret == -1) {
file = PHP_FOPEN((*filename)->value.str.val, "w"); file = V_FOPEN((*filename)->value.str.val, "w");
if (file == NULL) { if (file == NULL) {
php_error(E_WARNING, "unable to create file %s because %s", (*filename)->value.str.val, strerror(errno)); php_error(E_WARNING, "unable to create file %s because %s", (*filename)->value.str.val, strerror(errno));
if (newtime) efree(newtime); if (newtime) efree(newtime);

View file

@ -338,7 +338,7 @@ PHP_FUNCTION(getimagesize)
/* Check open_basedir */ /* Check open_basedir */
if (php_check_open_basedir((*arg1)->value.str.val)) return; if (php_check_open_basedir((*arg1)->value.str.val)) return;
if ((fp = PHP_FOPEN((*arg1)->value.str.val,"rb")) == 0) { if ((fp = V_FOPEN((*arg1)->value.str.val,"rb")) == 0) {
php_error(E_WARNING, "Unable to open %s", (*arg1)->value.str.val); php_error(E_WARNING, "Unable to open %s", (*arg1)->value.str.val);
return; return;
} }

View file

@ -198,7 +198,7 @@ PHP_FUNCTION(iptcembed)
if (php_check_open_basedir((*jpeg_file)->value.str.val)) if (php_check_open_basedir((*jpeg_file)->value.str.val))
RETURN_FALSE; RETURN_FALSE;
if ((fp = PHP_FOPEN((*jpeg_file)->value.str.val,"rb")) == 0) { if ((fp = V_FOPEN((*jpeg_file)->value.str.val,"rb")) == 0) {
php_error(E_WARNING, "Unable to open %s", (*jpeg_file)->value.str.val); php_error(E_WARNING, "Unable to open %s", (*jpeg_file)->value.str.val);
RETURN_FALSE; RETURN_FALSE;
} }

View file

@ -483,7 +483,7 @@ int send_php(request_rec *r, int display_source_mode, char *filename)
SG(server_context) = r; SG(server_context) = r;
php_save_umask(); php_save_umask();
PHP_CHDIR_FILE(filename); V_CHDIR_FILE(filename);
add_common_vars(r); add_common_vars(r);
add_cgi_vars(r); add_cgi_vars(r);

View file

@ -457,7 +457,7 @@ static void init_request_info(sapi_globals_struct *sapi_globals, LPEXTENSION_CON
if (path_end) { if (path_end) {
*path_end = 0; *path_end = 0;
PHP_CHDIR(SG(request_info).path_translated); V_CHDIR(SG(request_info).path_translated);
*path_end = SEPARATOR; *path_end = SEPARATOR;
} }
} }

View file

@ -601,7 +601,7 @@ static int php_roxen_module_main(SLS_D)
/* VERY BAD, but should work */ /* VERY BAD, but should work */
if(len > 0) { if(len > 0) {
dir[len] = '\0'; dir[len] = '\0';
PHP_CHDIR(dir); V_CHDIR(dir);
} }
free(dir); free(dir);
#endif #endif

View file

@ -29,7 +29,7 @@ void UpdateIniFromRegistry(char *path)
char drive_letter; char drive_letter;
/* get current working directory and prepend it to the path */ /* get current working directory and prepend it to the path */
if (!PHP_GETCWD(tmp_buf, MAXPATHLEN)) { if (!V_GETCWD(tmp_buf, MAXPATHLEN)) {
efree(orig_path); efree(orig_path);
return; return;
} }