summaryrefslogtreecommitdiff
path: root/ext/standard
diff options
context:
space:
mode:
Diffstat (limited to 'ext/standard')
-rw-r--r--ext/standard/basic_functions.c12
-rw-r--r--ext/standard/dir.c2
-rw-r--r--ext/standard/file.c26
-rw-r--r--ext/standard/filestat.c18
-rw-r--r--ext/standard/fsock.c14
-rw-r--r--ext/standard/fsock.h10
-rw-r--r--ext/standard/image.c2
-rw-r--r--ext/standard/iptc.c2
-rw-r--r--ext/standard/link.c8
9 files changed, 47 insertions, 47 deletions
diff --git a/ext/standard/basic_functions.c b/ext/standard/basic_functions.c
index 8538ab0c66..77264d4911 100644
--- a/ext/standard/basic_functions.c
+++ b/ext/standard/basic_functions.c
@@ -167,8 +167,8 @@ function_entry basic_functions[] = {
PHP_FE(parse_str, NULL)
PHP_FALIAS(rtrim, chop, NULL)
PHP_FALIAS(strchr, strstr, NULL)
- PHP_NAMED_FE(sprintf, php3_user_sprintf, NULL)
- PHP_NAMED_FE(printf, php3_user_printf, NULL)
+ PHP_NAMED_FE(sprintf, PHP_FN(user_sprintf), NULL)
+ PHP_NAMED_FE(printf, PHP_FN(user_printf), NULL)
PHP_FE(parse_url, NULL)
PHP_FE(urlencode, NULL)
@@ -291,7 +291,7 @@ function_entry basic_functions[] = {
PHP_FE(register_shutdown_function, NULL)
PHP_FE(highlight_file, NULL)
- PHP_NAMED_FE(show_source, php3_highlight_file, NULL)
+ PHP_NAMED_FE(show_source, PHP_FN(highlight_file), NULL)
PHP_FE(highlight_string, NULL)
PHP_FE(ini_get, NULL)
@@ -760,7 +760,7 @@ PHP_FUNCTION(settype)
PHP_FUNCTION(get_current_user)
{
- RETURN_STRING(_php3_get_current_user(),1);
+ RETURN_STRING(php_get_current_user(),1);
}
@@ -959,7 +959,7 @@ PHPAPI int _php_error_log(int opt_err,char *message,char *opt,char *headers){
return FAILURE;
break;
case 3: /*save to a file*/
- logfile=php3_fopen_wrapper(opt,"a", (IGNORE_URL|ENFORCE_SAFE_MODE), &issock, &socketd, NULL);
+ logfile=php_fopen_wrapper(opt,"a", (IGNORE_URL|ENFORCE_SAFE_MODE), &issock, &socketd, NULL);
if(!logfile) {
php_error(E_WARNING,"error_log: Unable to write to %s",opt);
return FAILURE;
@@ -968,7 +968,7 @@ PHPAPI int _php_error_log(int opt_err,char *message,char *opt,char *headers){
fclose(logfile);
break;
default:
- php3_log_err(message);
+ php_log_err(message);
break;
}
return SUCCESS;
diff --git a/ext/standard/dir.c b/ext/standard/dir.c
index 4f40dd2d98..0717badf87 100644
--- a/ext/standard/dir.c
+++ b/ext/standard/dir.c
@@ -151,7 +151,7 @@ static void _php_do_opendir(INTERNAL_FUNCTION_PARAMETERS, int createobject)
}
convert_to_string_ex(arg);
- if (_php3_check_open_basedir((*arg)->value.str.val)) {
+ if (php_check_open_basedir((*arg)->value.str.val)) {
RETURN_FALSE;
}
diff --git a/ext/standard/file.c b/ext/standard/file.c
index 60e0b30d9a..d4cd4fae3d 100644
--- a/ext/standard/file.c
+++ b/ext/standard/file.c
@@ -412,11 +412,11 @@ PHP_FUNCTION(get_meta_tags)
}
convert_to_string_ex(filename);
- fp = php3_fopen_wrapper((*filename)->value.str.val,"r", use_include_path|ENFORCE_SAFE_MODE, &issock, &socketd, NULL);
+ fp = php_fopen_wrapper((*filename)->value.str.val,"r", use_include_path|ENFORCE_SAFE_MODE, &issock, &socketd, NULL);
if (!fp && !socketd) {
if (issock != BAD_URL) {
char *tmp = estrdup((*filename)->value.str.val);
- php3_strip_url_passwd(tmp);
+ php_strip_url_passwd(tmp);
php_error(E_WARNING,"get_meta_tags(\"%s\") - %s", tmp, strerror(errno));
efree(tmp);
}
@@ -542,11 +542,11 @@ PHP_FUNCTION(file)
}
convert_to_string_ex(filename);
- fp = php3_fopen_wrapper((*filename)->value.str.val,"r", use_include_path|ENFORCE_SAFE_MODE, &issock, &socketd, NULL);
+ fp = php_fopen_wrapper((*filename)->value.str.val,"r", use_include_path|ENFORCE_SAFE_MODE, &issock, &socketd, NULL);
if (!fp && !socketd) {
if (issock != BAD_URL) {
char *tmp = estrdup((*filename)->value.str.val);
- php3_strip_url_passwd(tmp);
+ php_strip_url_passwd(tmp);
php_error(E_WARNING,"file(\"%s\") - %s", tmp, strerror(errno));
efree(tmp);
}
@@ -659,11 +659,11 @@ PHP_FUNCTION(fopen)
* We need a better way of returning error messages from
* php3_fopen__wrapper().
*/
- fp = php3_fopen_wrapper((*arg1)->value.str.val, p, use_include_path|ENFORCE_SAFE_MODE, &issock, &socketd, NULL);
+ fp = php_fopen_wrapper((*arg1)->value.str.val, p, use_include_path|ENFORCE_SAFE_MODE, &issock, &socketd, NULL);
if (!fp && !socketd) {
if (issock != BAD_URL) {
char *tmp = estrdup((*arg1)->value.str.val);
- php3_strip_url_passwd(tmp);
+ php_strip_url_passwd(tmp);
php_error(E_WARNING,"fopen(\"%s\",\"%s\") - %s", tmp, p, strerror(errno));
efree(tmp);
}
@@ -1210,7 +1210,7 @@ PHP_FUNCTION(mkdir)
convert_to_string_ex(arg1);
convert_to_long_ex(arg2);
mode = (*arg2)->value.lval;
- if (PG(safe_mode) &&(!_php3_checkuid((*arg1)->value.str.val,3))) {
+ if (PG(safe_mode) &&(!php_checkuid((*arg1)->value.str.val,3))) {
RETURN_FALSE;
}
ret = mkdir((*arg1)->value.str.val,mode);
@@ -1235,7 +1235,7 @@ PHP_FUNCTION(rmdir)
WRONG_PARAM_COUNT;
}
convert_to_string_ex(arg1);
- if (PG(safe_mode) &&(!_php3_checkuid((*arg1)->value.str.val,1))) {
+ if (PG(safe_mode) &&(!php_checkuid((*arg1)->value.str.val,1))) {
RETURN_FALSE;
}
ret = rmdir((*arg1)->value.str.val);
@@ -1325,13 +1325,13 @@ PHP_FUNCTION(readfile)
/*
* We need a better way of returning error messages from
- * php3_fopen_wrapper().
+ * php_fopen_wrapper().
*/
- fp = php3_fopen_wrapper((*arg1)->value.str.val,"r", use_include_path|ENFORCE_SAFE_MODE, &issock, &socketd, NULL);
+ fp = php_fopen_wrapper((*arg1)->value.str.val,"r", use_include_path|ENFORCE_SAFE_MODE, &issock, &socketd, NULL);
if (!fp && !socketd){
if (issock != BAD_URL) {
char *tmp = estrdup((*arg1)->value.str.val);
- php3_strip_url_passwd(tmp);
+ php_strip_url_passwd(tmp);
php_error(E_WARNING,"readfile(\"%s\") - %s", tmp, strerror(errno));
efree(tmp);
}
@@ -1429,7 +1429,7 @@ PHP_FUNCTION(rename)
old_name = (*old_arg)->value.str.val;
new_name = (*new_arg)->value.str.val;
- if (PG(safe_mode) &&(!_php3_checkuid(old_name, 2))) {
+ if (PG(safe_mode) &&(!php_checkuid(old_name, 2))) {
RETURN_FALSE;
}
ret = rename(old_name, new_name);
@@ -1460,7 +1460,7 @@ PHP_FUNCTION(copy)
convert_to_string_ex(source);
convert_to_string_ex(target);
- if (PG(safe_mode) &&(!_php3_checkuid((*source)->value.str.val,2))) {
+ if (PG(safe_mode) &&(!php_checkuid((*source)->value.str.val,2))) {
RETURN_FALSE;
}
diff --git a/ext/standard/filestat.c b/ext/standard/filestat.c
index 39303afe6a..4a33ea7ff5 100644
--- a/ext/standard/filestat.c
+++ b/ext/standard/filestat.c
@@ -142,7 +142,7 @@ PHP_FUNCTION(diskfreespace)
convert_to_string(path);
- if (_php3_check_open_basedir(path->value.str.val)) RETURN_FALSE;
+ if (php_check_open_basedir(path->value.str.val)) RETURN_FALSE;
#ifdef WINDOWS
/* GetDiskFreeSpaceEx is only available in NT and Win95 post-OSR2,
@@ -228,12 +228,12 @@ PHP_FUNCTION(chgrp)
gid = group->value.lval;
}
- if (PG(safe_mode) &&(!_php3_checkuid(filename->value.str.val, 1))) {
+ if (PG(safe_mode) &&(!php_checkuid(filename->value.str.val, 1))) {
RETURN_FALSE;
}
/* Check the basedir */
- if (_php3_check_open_basedir(filename->value.str.val)) RETURN_FALSE;
+ if (php_check_open_basedir(filename->value.str.val)) RETURN_FALSE;
ret = chown(filename->value.str.val, -1, gid);
if (ret == -1) {
@@ -273,12 +273,12 @@ PHP_FUNCTION(chown)
uid = user->value.lval;
}
- if (PG(safe_mode) &&(!_php3_checkuid(filename->value.str.val, 1))) {
+ if (PG(safe_mode) &&(!php_checkuid(filename->value.str.val, 1))) {
RETURN_FALSE;
}
/* Check the basedir */
- if (_php3_check_open_basedir(filename->value.str.val)) RETURN_FALSE;
+ if (php_check_open_basedir(filename->value.str.val)) RETURN_FALSE;
ret = chown(filename->value.str.val, uid, -1);
if (ret == -1) {
@@ -302,12 +302,12 @@ PHP_FUNCTION(chmod)
convert_to_string(filename);
convert_to_long(mode);
- if (PG(safe_mode) &&(!_php3_checkuid(filename->value.str.val, 1))) {
+ if (PG(safe_mode) &&(!php_checkuid(filename->value.str.val, 1))) {
RETURN_FALSE;
}
/* Check the basedir */
- if (_php3_check_open_basedir(filename->value.str.val)) RETURN_FALSE;
+ if (php_check_open_basedir(filename->value.str.val)) RETURN_FALSE;
ret = chmod(filename->value.str.val, mode->value.lval);
if (ret == -1) {
@@ -353,13 +353,13 @@ PHP_FUNCTION(touch)
}
convert_to_string(filename);
- if (PG(safe_mode) &&(!_php3_checkuid(filename->value.str.val, 1))) {
+ if (PG(safe_mode) &&(!php_checkuid(filename->value.str.val, 1))) {
if (newtime) efree(newtime);
RETURN_FALSE;
}
/* Check the basedir */
- if (_php3_check_open_basedir(filename->value.str.val)) RETURN_FALSE;
+ if (php_check_open_basedir(filename->value.str.val)) RETURN_FALSE;
/* create the file if it doesn't exist already */
ret = stat(filename->value.str.val, &sb);
diff --git a/ext/standard/fsock.c b/ext/standard/fsock.c
index 7366859f39..bbb22c9f1f 100644
--- a/ext/standard/fsock.c
+++ b/ext/standard/fsock.c
@@ -484,7 +484,7 @@ int _php3_sock_destroy(int socket)
#define SOCK_CLOSE(s) shutdown(s, 0); closesocket(s)
-int _php3_sock_close(int socket)
+int php_sock_close(int socket)
{
int ret = 0;
php3i_sockbuf *sock;
@@ -593,11 +593,11 @@ int _php3_sock_set_blocking(int socket, int mode)
SOCK_FIND(sock, socket); \
if(sock->is_blocked) _php3_sock_read_total(sock, max); else _php3_sock_read(sock)
-/* {{{ _php3_sock_fgets() */
+/* {{{ php_sock_fgets() */
/*
* FIXME: fgets depends on '\n' as line delimiter
*/
-char *_php3_sock_fgets(char *buf, size_t maxlen, int socket)
+char *php_sock_fgets(char *buf, size_t maxlen, int socket)
{
char *p = NULL;
char *ret = NULL;
@@ -655,7 +655,7 @@ char *_php3_sock_fgets(char *buf, size_t maxlen, int socket)
* ss@2ns.de 19990528
*/
-int _php3_sock_fgetc(int socket)
+int php_sock_fgetc(int socket)
{
int ret = EOF;
SOCK_FIND_AND_READ_MAX(1);
@@ -668,7 +668,7 @@ int _php3_sock_fgetc(int socket)
return ret;
}
-int _php3_sock_feof(int socket)
+int php_sock_feof(int socket)
{
int ret = 0;
SOCK_FIND(sock, socket);
@@ -682,9 +682,9 @@ int _php3_sock_feof(int socket)
return ret;
}
-/* {{{ _php3_sock_fread() */
+/* {{{ php_sock_fread() */
-size_t _php3_sock_fread(char *ptr, size_t size, int socket)
+size_t php_sock_fread(char *ptr, size_t size, int socket)
{
size_t ret = 0;
SOCK_FIND_AND_READ_MAX(size);
diff --git a/ext/standard/fsock.h b/ext/standard/fsock.h
index cc0a360e25..a833f9be44 100644
--- a/ext/standard/fsock.h
+++ b/ext/standard/fsock.h
@@ -61,14 +61,14 @@ extern php3_module_entry fsock_module_entry;
PHP_FUNCTION(fsockopen);
PHP_FUNCTION(pfsockopen);
int lookup_hostname(const char *addr, struct in_addr *in);
-char *_php3_sock_fgets(char *buf, size_t maxlen, int socket);
-size_t _php3_sock_fread(char *buf, size_t maxlen, int socket);
-int _php3_sock_feof(int socket);
-int _php3_sock_fgetc(int socket);
+char *php_sock_fgets(char *buf, size_t maxlen, int socket);
+size_t php_sock_fread(char *buf, size_t maxlen, int socket);
+int php_sock_feof(int socket);
+int php_sock_fgetc(int socket);
int _php3_is_persistent_sock(int);
int _php3_sock_set_blocking(int socket, int mode);
int _php3_sock_destroy(int socket);
-int _php3_sock_close(int socket);
+int php_sock_close(int socket);
size_t _php3_sock_set_def_chunk_size(size_t size);
int php_msock_destroy(int *data);
diff --git a/ext/standard/image.c b/ext/standard/image.c
index 5c1578faf6..06dcd0228b 100644
--- a/ext/standard/image.c
+++ b/ext/standard/image.c
@@ -336,7 +336,7 @@ PHP_FUNCTION(getimagesize)
}
/* Check open_basedir */
- if (_php3_check_open_basedir((*arg1)->value.str.val)) return;
+ if (php_check_open_basedir((*arg1)->value.str.val)) return;
if ((fp = fopen((*arg1)->value.str.val,"rb")) == 0) {
php_error(E_WARNING, "Unable to open %s", (*arg1)->value.str.val);
diff --git a/ext/standard/iptc.c b/ext/standard/iptc.c
index 540ae518d1..f790b35446 100644
--- a/ext/standard/iptc.c
+++ b/ext/standard/iptc.c
@@ -195,7 +195,7 @@ PHP_FUNCTION(iptcembed)
break;
}
- if (_php3_check_open_basedir((*jpeg_file)->value.str.val))
+ if (php_check_open_basedir((*jpeg_file)->value.str.val))
RETURN_FALSE;
if ((fp = fopen((*jpeg_file)->value.str.val,"rb")) == 0) {
diff --git a/ext/standard/link.c b/ext/standard/link.c
index f296a2dbcb..1acbcdc4c4 100644
--- a/ext/standard/link.c
+++ b/ext/standard/link.c
@@ -113,7 +113,7 @@ PHP_FUNCTION(symlink)
convert_to_string_ex(topath);
convert_to_string_ex(frompath);
- if (PG(safe_mode) && !_php3_checkuid((*topath)->value.str.val, 2)) {
+ if (PG(safe_mode) && !php_checkuid((*topath)->value.str.val, 2)) {
RETURN_FALSE;
}
if (!strncasecmp((*topath)->value.str.val,"http://",7) || !strncasecmp((*topath)->value.str.val,"ftp://",6)) {
@@ -146,7 +146,7 @@ PHP_FUNCTION(link)
convert_to_string_ex(topath);
convert_to_string_ex(frompath);
- if (PG(safe_mode) && !_php3_checkuid((*topath)->value.str.val, 2)) {
+ if (PG(safe_mode) && !php_checkuid((*topath)->value.str.val, 2)) {
RETURN_FALSE;
}
if (!strncasecmp((*topath)->value.str.val,"http://",7) || !strncasecmp((*topath)->value.str.val,"ftp://",6)) {
@@ -177,7 +177,7 @@ PHP_FUNCTION(unlink)
}
convert_to_string_ex(filename);
- if (PG(safe_mode) && !_php3_checkuid((*filename)->value.str.val, 2)) {
+ if (PG(safe_mode) && !php_checkuid((*filename)->value.str.val, 2)) {
RETURN_FALSE;
}
@@ -187,7 +187,7 @@ PHP_FUNCTION(unlink)
RETURN_FALSE;
}
/* Clear stat cache */
- php3_clearstatcache(INTERNAL_FUNCTION_PARAM_PASSTHRU);
+ PHP_FN(clearstatcache)(INTERNAL_FUNCTION_PARAM_PASSTHRU);
RETURN_TRUE;
}
/* }}} */