cvs: php4 /ext/standard basic_functions.c dir.c file.c file.h filestat.c php_dir.h php_filestat.h /main php.h
| From: | Sascha Schumann | Date: | Thu, 07 Dec 2000 12:09:39 +0000 |
| Subject: | cvs: php4 /ext/standard basic_functions.c dir.c file.c file.h filestat.c php_dir.h php_filestat.h /main php.h | ||
| Groups: | php.cvs | ||
| Request: | Send a blank email to php-cvs+get-3002@lists.php.net to get a copy of this message | ||
sas Thu Dec 7 04:09:39 2000 EDT
Modified files:
/php4/ext/standard basic_functions.c dir.c file.c file.h filestat.c
php_dir.h php_filestat.h
/php4/main php.h
Log:
Hardcode all functions which are mentioned in the Large File Support Spec
http://ewe3.sas.com/standards/large.file/specs/api+.007.html
Index: php4/ext/standard/basic_functions.c diff -u php4/ext/standard/basic_functions.c:1.280 php4/ext/standard/basic_functions.c:1.281 --- php4/ext/standard/basic_functions.c:1.280 Wed Nov 29 07:37:38 2000 +++ php4/ext/standard/basic_functions.c Thu Dec 7 04:09:37 2000 @@ -17,7 +17,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: basic_functions.c,v 1.280 2000/11/29 15:37:38 sterling Exp $ */ +/* $Id: basic_functions.c,v 1.281 2000/12/07 12:09:37 sas Exp $ */ #include "php.h" #include "php_main.h" @@ -393,10 +393,10 @@ PHP_FE(fgets, NULL) PHP_FE(fgetss, NULL) PHP_FE(fread, NULL) - PHP_FE(fopen, NULL) + PHP_STATIC_FE("fopen", php_if_fopen, NULL) PHP_FE(fpassthru, NULL) - PHP_FE(ftruncate, NULL) - PHP_FE(fstat, NULL) + PHP_STATIC_FE("ftruncate", php_if_ftruncate, NULL) + PHP_STATIC_FE("fstat", php_if_fstat, NULL) PHP_FE(fseek, NULL) PHP_FE(ftell, NULL) PHP_FE(fflush, NULL) @@ -406,7 +406,7 @@ PHP_FE(rename, NULL) PHP_FE(copy, NULL) PHP_FE(tempnam, NULL) - PHP_FE(tmpfile, NULL) + PHP_STATIC_FE("tmpfile", php_if_tmpfile, NULL) PHP_FE(file, NULL) PHP_FE(fgetcsv, NULL) PHP_FE(flock, NULL) @@ -473,8 +473,8 @@ PHP_FE(is_file, NULL) PHP_FE(is_dir, NULL) PHP_FE(is_link, NULL) - PHP_FE(stat, NULL) - PHP_FE(lstat, NULL) + PHP_STATIC_FE("stat", php_if_stat, NULL) + PHP_STATIC_FE("lstat", php_if_lstat, NULL) PHP_FE(chown, NULL) PHP_FE(chgrp, NULL) PHP_FE(chmod, NULL) Index: php4/ext/standard/dir.c diff -u php4/ext/standard/dir.c:1.50 php4/ext/standard/dir.c:1.51 --- php4/ext/standard/dir.c:1.50 Sat Nov 4 09:15:00 2000 +++ php4/ext/standard/dir.c Thu Dec 7 04:09:37 2000 @@ -17,7 +17,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: dir.c,v 1.50 2000/11/04 17:15:00 andi Exp $ */ +/* $Id: dir.c,v 1.51 2000/12/07 12:09:37 sas Exp $ */ /* {{{ includes/startup/misc */ @@ -92,7 +92,7 @@ static zend_function_entry php_dir_class_functions[] = { PHP_FALIAS(close, closedir, NULL) PHP_FALIAS(rewind, rewinddir, NULL) - PHP_FALIAS(read, readdir, NULL) + PHP_STATIC_FE("read", php_if_readdir, NULL) {NULL, NULL, NULL} }; @@ -294,7 +294,7 @@ /* {{{ proto string readdir([int dir_handle]) Read directory entry from dir_handle */ -PHP_FUNCTION(readdir) +PHP_NAMED_FUNCTION(php_if_readdir) { pval **id, **tmp, *myself; php_dir *dirp; Index: php4/ext/standard/file.c diff -u php4/ext/standard/file.c:1.125 php4/ext/standard/file.c:1.126 --- php4/ext/standard/file.c:1.125 Wed Nov 22 02:08:25 2000 +++ php4/ext/standard/file.c Thu Dec 7 04:09:37 2000 @@ -20,7 +20,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: file.c,v 1.125 2000/11/22 10:08:25 dbeu Exp $ */ +/* $Id: file.c,v 1.126 2000/12/07 12:09:37 sas Exp $ */ /* Synced with php 3.0 revision 1.218 1999-06-16 [ssb] */ @@ -500,7 +500,7 @@ /* }}} */ /* {{{ proto int tmpfile(void) Create a temporary file that will be deleted automatically after use */ -PHP_FUNCTION(tmpfile) +PHP_NAMED_FUNCTION(php_if_tmpfile) { FILE *fp; if (ARG_COUNT(ht) != 0) { @@ -518,7 +518,7 @@ /* {{{ proto int fopen(string filename, string mode [, int use_include_path]) Open a file or a URL and return a file pointer */ -PHP_FUNCTION(fopen) +PHP_NAMED_FUNCTION(php_if_fopen) { pval **arg1, **arg2, **arg3; FILE *fp; @@ -1552,7 +1552,7 @@ /* {{{ proto int ftruncate (int fp, int size) Truncate file to 'size' length */ -PHP_FUNCTION(ftruncate) +PHP_NAMED_FUNCTION(php_if_ftruncate) { zval **fp , **size; short int ret; @@ -1581,7 +1581,7 @@ /* {{{ proto int fstat(int fp) Stat() on a filehandle */ -PHP_FUNCTION(fstat) +PHP_NAMED_FUNCTION(php_if_fstat) { zval **fp; int type; Index: php4/ext/standard/file.h diff -u php4/ext/standard/file.h:1.29 php4/ext/standard/file.h:1.30 --- php4/ext/standard/file.h:1.29 Mon Sep 11 12:04:23 2000 +++ php4/ext/standard/file.h Thu Dec 7 04:09:37 2000 @@ -16,7 +16,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: file.h,v 1.29 2000/09/11 19:04:23 andi Exp $ */ +/* $Id: file.h,v 1.30 2000/12/07 12:09:37 sas Exp $ */ /* Synced with php 3.0 revision 1.30 1999-06-16 [ssb] */ @@ -26,8 +26,8 @@ extern PHP_MINIT_FUNCTION(file); PHP_FUNCTION(tempnam); -PHP_FUNCTION(tmpfile); -PHP_FUNCTION(fopen); +PHP_NAMED_FUNCTION(php_if_tmpfile); +PHP_NAMED_FUNCTION(php_if_fopen); PHP_FUNCTION(fclose); PHP_FUNCTION(popen); PHP_FUNCTION(pclose); @@ -63,8 +63,8 @@ PHP_FUNCTION(fd_isset); PHP_FUNCTION(select); PHP_FUNCTION(realpath); -PHP_FUNCTION(ftruncate); -PHP_FUNCTION(fstat); +PHP_NAMED_FUNCTION(php_if_ftruncate); +PHP_NAMED_FUNCTION(php_if_fstat); PHPAPI int php_set_sock_blocking(int socketd, int block); PHPAPI int php_file_le_fopen(void); Index: php4/ext/standard/filestat.c diff -u php4/ext/standard/filestat.c:1.50 php4/ext/standard/filestat.c:1.51 --- php4/ext/standard/filestat.c:1.50 Sun Dec 3 05:42:54 2000 +++ php4/ext/standard/filestat.c Thu Dec 7 04:09:38 2000 @@ -16,7 +16,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: filestat.c,v 1.50 2000/12/03 13:42:54 stas Exp $ */ +/* $Id: filestat.c,v 1.51 2000/12/07 12:09:38 sas Exp $ */ #include "php.h" #include "safe_mode.h" @@ -712,12 +712,12 @@ /* {{{ proto array lstat(string filename) Give information about a file or symbolic link */ -FileFunction(PHP_FN(lstat),16) +FileFunction(php_if_lstat,16) /* }}} */ /* {{{ proto array stat(string filename) Give information about a file */ -FileFunction(PHP_FN(stat),17) +FileFunction(php_if_stat,17) /* }}} */ /* Index: php4/ext/standard/php_dir.h diff -u php4/ext/standard/php_dir.h:1.10 php4/ext/standard/php_dir.h:1.11 --- php4/ext/standard/php_dir.h:1.10 Sun Oct 29 01:14:53 2000 +++ php4/ext/standard/php_dir.h Thu Dec 7 04:09:38 2000 @@ -17,7 +17,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: php_dir.h,v 1.10 2000/10/29 09:14:53 thies Exp $ */ +/* $Id: php_dir.h,v 1.11 2000/12/07 12:09:38 sas Exp $ */ #ifndef PHP_DIR_H #define PHP_DIR_H @@ -30,7 +30,7 @@ PHP_FUNCTION(chdir); PHP_FUNCTION(getcwd); PHP_FUNCTION(rewinddir); -PHP_FUNCTION(readdir); +PHP_NAMED_FUNCTION(php_if_readdir); PHP_FUNCTION(getdir); #endif /* PHP_DIR_H */ Index: php4/ext/standard/php_filestat.h diff -u php4/ext/standard/php_filestat.h:1.7 php4/ext/standard/php_filestat.h:1.8 --- php4/ext/standard/php_filestat.h:1.7 Sun Jul 23 18:39:49 2000 +++ php4/ext/standard/php_filestat.h Thu Dec 7 04:09:38 2000 @@ -16,7 +16,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: php_filestat.h,v 1.7 2000/07/24 01:39:49 david Exp $ */ +/* $Id: php_filestat.h,v 1.8 2000/12/07 12:09:38 sas Exp $ */ #ifndef PHP_FILESTAT_H #define PHP_FILESTAT_H @@ -41,8 +41,8 @@ PHP_FUNCTION(is_dir); PHP_FUNCTION(is_link); PHP_FUNCTION(file_exists); -PHP_FUNCTION(stat); -PHP_FUNCTION(lstat); +PHP_NAMED_FUNCTION(php_if_stat); +PHP_NAMED_FUNCTION(php_if_lstat); PHP_FUNCTION(diskfreespace); PHP_FUNCTION(chown); PHP_FUNCTION(chgrp); Index: php4/main/php.h diff -u php4/main/php.h:1.128 php4/main/php.h:1.129 --- php4/main/php.h:1.128 Sat Dec 2 05:27:10 2000 +++ php4/main/php.h Thu Dec 7 04:09:38 2000 @@ -17,7 +17,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: php.h,v 1.128 2000/12/02 13:27:10 sas Exp $ */ +/* $Id: php.h,v 1.129 2000/12/07 12:09:38 sas Exp $ */ #ifndef PHP_H #define PHP_H @@ -215,6 +215,7 @@ #define PHP_NAMED_FE(php_name, name, arg_types) { #php_name, name, arg_types }, #define PHP_FE(name, arg_types) PHP_NAMED_FE(name, PHP_FN(name), arg_types) #define PHP_FALIAS(name, alias, arg_types) PHP_NAMED_FE(name, PHP_FN(alias), arg_types) +#define PHP_STATIC_FE(php_name, func_name, arg_types) { php_name, func_name, arg_types }, #define PHP_MINIT(module) php_minit_##module #define PHP_MSHUTDOWN(module) php_mshutdown_##module
Index: php4/ext/standard/basic_functions.c diff -u php4/ext/standard/basic_functions.c:1.280 php4/ext/standard/basic_functions.c:1.281 --- php4/ext/standard/basic_functions.c:1.280 Wed Nov 29 07:37:38 2000 +++ php4/ext/standard/basic_functions.c Thu Dec 7 04:09:37 2000 @@ -17,7 +17,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: basic_functions.c,v 1.280 2000/11/29 15:37:38 sterling Exp $ */ +/* $Id: basic_functions.c,v 1.281 2000/12/07 12:09:37 sas Exp $ */ #include "php.h" #include "php_main.h" @@ -393,10 +393,10 @@ PHP_FE(fgets, NULL) PHP_FE(fgetss, NULL) PHP_FE(fread, NULL) - PHP_FE(fopen, NULL) + PHP_STATIC_FE("fopen", php_if_fopen, NULL) PHP_FE(fpassthru, NULL) - PHP_FE(ftruncate, NULL) - PHP_FE(fstat, NULL) + PHP_STATIC_FE("ftruncate", php_if_ftruncate, NULL) + PHP_STATIC_FE("fstat", php_if_fstat, NULL) PHP_FE(fseek, NULL) PHP_FE(ftell, NULL) PHP_FE(fflush, NULL) @@ -406,7 +406,7 @@ PHP_FE(rename, NULL) PHP_FE(copy, NULL) PHP_FE(tempnam, NULL) - PHP_FE(tmpfile, NULL) + PHP_STATIC_FE("tmpfile", php_if_tmpfile, NULL) PHP_FE(file, NULL) PHP_FE(fgetcsv, NULL) PHP_FE(flock, NULL) @@ -473,8 +473,8 @@ PHP_FE(is_file, NULL) PHP_FE(is_dir, NULL) PHP_FE(is_link, NULL) - PHP_FE(stat, NULL) - PHP_FE(lstat, NULL) + PHP_STATIC_FE("stat", php_if_stat, NULL) + PHP_STATIC_FE("lstat", php_if_lstat, NULL) PHP_FE(chown, NULL) PHP_FE(chgrp, NULL) PHP_FE(chmod, NULL) Index: php4/ext/standard/dir.c diff -u php4/ext/standard/dir.c:1.50 php4/ext/standard/dir.c:1.51 --- php4/ext/standard/dir.c:1.50 Sat Nov 4 09:15:00 2000 +++ php4/ext/standard/dir.c Thu Dec 7 04:09:37 2000 @@ -17,7 +17,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: dir.c,v 1.50 2000/11/04 17:15:00 andi Exp $ */ +/* $Id: dir.c,v 1.51 2000/12/07 12:09:37 sas Exp $ */ /* {{{ includes/startup/misc */ @@ -92,7 +92,7 @@ static zend_function_entry php_dir_class_functions[] = { PHP_FALIAS(close, closedir, NULL) PHP_FALIAS(rewind, rewinddir, NULL) - PHP_FALIAS(read, readdir, NULL) + PHP_STATIC_FE("read", php_if_readdir, NULL) {NULL, NULL, NULL} }; @@ -294,7 +294,7 @@ /* {{{ proto string readdir([int dir_handle]) Read directory entry from dir_handle */ -PHP_FUNCTION(readdir) +PHP_NAMED_FUNCTION(php_if_readdir) { pval **id, **tmp, *myself; php_dir *dirp; Index: php4/ext/standard/file.c diff -u php4/ext/standard/file.c:1.125 php4/ext/standard/file.c:1.126 --- php4/ext/standard/file.c:1.125 Wed Nov 22 02:08:25 2000 +++ php4/ext/standard/file.c Thu Dec 7 04:09:37 2000 @@ -20,7 +20,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: file.c,v 1.125 2000/11/22 10:08:25 dbeu Exp $ */ +/* $Id: file.c,v 1.126 2000/12/07 12:09:37 sas Exp $ */ /* Synced with php 3.0 revision 1.218 1999-06-16 [ssb] */ @@ -500,7 +500,7 @@ /* }}} */ /* {{{ proto int tmpfile(void) Create a temporary file that will be deleted automatically after use */ -PHP_FUNCTION(tmpfile) +PHP_NAMED_FUNCTION(php_if_tmpfile) { FILE *fp; if (ARG_COUNT(ht) != 0) { @@ -518,7 +518,7 @@ /* {{{ proto int fopen(string filename, string mode [, int use_include_path]) Open a file or a URL and return a file pointer */ -PHP_FUNCTION(fopen) +PHP_NAMED_FUNCTION(php_if_fopen) { pval **arg1, **arg2, **arg3; FILE *fp; @@ -1552,7 +1552,7 @@ /* {{{ proto int ftruncate (int fp, int size) Truncate file to 'size' length */ -PHP_FUNCTION(ftruncate) +PHP_NAMED_FUNCTION(php_if_ftruncate) { zval **fp , **size; short int ret; @@ -1581,7 +1581,7 @@ /* {{{ proto int fstat(int fp) Stat() on a filehandle */ -PHP_FUNCTION(fstat) +PHP_NAMED_FUNCTION(php_if_fstat) { zval **fp; int type; Index: php4/ext/standard/file.h diff -u php4/ext/standard/file.h:1.29 php4/ext/standard/file.h:1.30 --- php4/ext/standard/file.h:1.29 Mon Sep 11 12:04:23 2000 +++ php4/ext/standard/file.h Thu Dec 7 04:09:37 2000 @@ -16,7 +16,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: file.h,v 1.29 2000/09/11 19:04:23 andi Exp $ */ +/* $Id: file.h,v 1.30 2000/12/07 12:09:37 sas Exp $ */ /* Synced with php 3.0 revision 1.30 1999-06-16 [ssb] */ @@ -26,8 +26,8 @@ extern PHP_MINIT_FUNCTION(file); PHP_FUNCTION(tempnam); -PHP_FUNCTION(tmpfile); -PHP_FUNCTION(fopen); +PHP_NAMED_FUNCTION(php_if_tmpfile); +PHP_NAMED_FUNCTION(php_if_fopen); PHP_FUNCTION(fclose); PHP_FUNCTION(popen); PHP_FUNCTION(pclose); @@ -63,8 +63,8 @@ PHP_FUNCTION(fd_isset); PHP_FUNCTION(select); PHP_FUNCTION(realpath); -PHP_FUNCTION(ftruncate); -PHP_FUNCTION(fstat); +PHP_NAMED_FUNCTION(php_if_ftruncate); +PHP_NAMED_FUNCTION(php_if_fstat); PHPAPI int php_set_sock_blocking(int socketd, int block); PHPAPI int php_file_le_fopen(void); Index: php4/ext/standard/filestat.c diff -u php4/ext/standard/filestat.c:1.50 php4/ext/standard/filestat.c:1.51 --- php4/ext/standard/filestat.c:1.50 Sun Dec 3 05:42:54 2000 +++ php4/ext/standard/filestat.c Thu Dec 7 04:09:38 2000 @@ -16,7 +16,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: filestat.c,v 1.50 2000/12/03 13:42:54 stas Exp $ */ +/* $Id: filestat.c,v 1.51 2000/12/07 12:09:38 sas Exp $ */ #include "php.h" #include "safe_mode.h" @@ -712,12 +712,12 @@ /* {{{ proto array lstat(string filename) Give information about a file or symbolic link */ -FileFunction(PHP_FN(lstat),16) +FileFunction(php_if_lstat,16) /* }}} */ /* {{{ proto array stat(string filename) Give information about a file */ -FileFunction(PHP_FN(stat),17) +FileFunction(php_if_stat,17) /* }}} */ /* Index: php4/ext/standard/php_dir.h diff -u php4/ext/standard/php_dir.h:1.10 php4/ext/standard/php_dir.h:1.11 --- php4/ext/standard/php_dir.h:1.10 Sun Oct 29 01:14:53 2000 +++ php4/ext/standard/php_dir.h Thu Dec 7 04:09:38 2000 @@ -17,7 +17,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: php_dir.h,v 1.10 2000/10/29 09:14:53 thies Exp $ */ +/* $Id: php_dir.h,v 1.11 2000/12/07 12:09:38 sas Exp $ */ #ifndef PHP_DIR_H #define PHP_DIR_H @@ -30,7 +30,7 @@ PHP_FUNCTION(chdir); PHP_FUNCTION(getcwd); PHP_FUNCTION(rewinddir); -PHP_FUNCTION(readdir); +PHP_NAMED_FUNCTION(php_if_readdir); PHP_FUNCTION(getdir); #endif /* PHP_DIR_H */ Index: php4/ext/standard/php_filestat.h diff -u php4/ext/standard/php_filestat.h:1.7 php4/ext/standard/php_filestat.h:1.8 --- php4/ext/standard/php_filestat.h:1.7 Sun Jul 23 18:39:49 2000 +++ php4/ext/standard/php_filestat.h Thu Dec 7 04:09:38 2000 @@ -16,7 +16,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: php_filestat.h,v 1.7 2000/07/24 01:39:49 david Exp $ */ +/* $Id: php_filestat.h,v 1.8 2000/12/07 12:09:38 sas Exp $ */ #ifndef PHP_FILESTAT_H #define PHP_FILESTAT_H @@ -41,8 +41,8 @@ PHP_FUNCTION(is_dir); PHP_FUNCTION(is_link); PHP_FUNCTION(file_exists); -PHP_FUNCTION(stat); -PHP_FUNCTION(lstat); +PHP_NAMED_FUNCTION(php_if_stat); +PHP_NAMED_FUNCTION(php_if_lstat); PHP_FUNCTION(diskfreespace); PHP_FUNCTION(chown); PHP_FUNCTION(chgrp); Index: php4/main/php.h diff -u php4/main/php.h:1.128 php4/main/php.h:1.129 --- php4/main/php.h:1.128 Sat Dec 2 05:27:10 2000 +++ php4/main/php.h Thu Dec 7 04:09:38 2000 @@ -17,7 +17,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: php.h,v 1.128 2000/12/02 13:27:10 sas Exp $ */ +/* $Id: php.h,v 1.129 2000/12/07 12:09:38 sas Exp $ */ #ifndef PHP_H #define PHP_H @@ -215,6 +215,7 @@ #define PHP_NAMED_FE(php_name, name, arg_types) { #php_name, name, arg_types }, #define PHP_FE(name, arg_types) PHP_NAMED_FE(name, PHP_FN(name), arg_types) #define PHP_FALIAS(name, alias, arg_types) PHP_NAMED_FE(name, PHP_FN(alias), arg_types) +#define PHP_STATIC_FE(php_name, func_name, arg_types) { php_name, func_name, arg_types }, #define PHP_MINIT(module) php_minit_##module #define PHP_MSHUTDOWN(module) php_mshutdown_##module