cvs: php4 /ext/dbx dbx.c /ext/mailparse mailparse.c /ext/mysql php_mysql.c /ext/pcntl pcntl.c
| From: | Derick Rethans | Date: | Thu, 08 Nov 2001 20:23:32 +0000 |
| Subject: | cvs: php4 /ext/dbx dbx.c /ext/mailparse mailparse.c /ext/mysql php_mysql.c /ext/pcntl pcntl.c | ||
| Groups: | php.cvs | ||
| Request: | Send a blank email to php-cvs+get-8101@lists.php.net to get a copy of this message | ||
derick Thu Nov 8 15:23:32 2001 EDT
Modified files:
/php4/ext/dbx dbx.c
/php4/ext/mailparse mailparse.c
/php4/ext/mysql php_mysql.c
/php4/ext/pcntl pcntl.c
Log:
- prototypes
#- Thanks to Zak for pointing this out during his talk
Index: php4/ext/dbx/dbx.c diff -u php4/ext/dbx/dbx.c:1.29 php4/ext/dbx/dbx.c:1.30 --- php4/ext/dbx/dbx.c:1.29 Thu Oct 11 19:32:42 2001 +++ php4/ext/dbx/dbx.c Thu Nov 8 15:23:31 2001 @@ -20,7 +20,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: dbx.c,v 1.29 2001/10/11 23:32:42 ssb Exp $ */ +/* $Id: dbx.c,v 1.30 2001/11/08 20:23:31 derick Exp $ */ #ifdef HAVE_CONFIG_H #include "config.h" @@ -535,7 +535,7 @@ * dbx functions that are database independent... like sorting result_objects! */ -/* {{{ proto long dbx_compare(array row_x, array row_y, string columnname [, flags]) +/* {{{ proto int dbx_compare(array row_x, array row_y, string columnname [, flags]) returns row_y[columnname] - row_x[columnname], converted to -1, 0 or 1 */ ZEND_FUNCTION(dbx_compare) @@ -627,7 +627,7 @@ } /* }}} */ -/* {{{ proto long dbx_sort(dbx_result_object dbx_result, string compare_function_name) +/* {{{ proto int dbx_sort(dbx_result_object dbx_result, string compare_function_name) returns 0 on failure, 1 on success */ ZEND_FUNCTION(dbx_sort) Index: php4/ext/mailparse/mailparse.c diff -u php4/ext/mailparse/mailparse.c:1.12 php4/ext/mailparse/mailparse.c:1.13 --- php4/ext/mailparse/mailparse.c:1.12 Thu Oct 11 19:33:01 2001 +++ php4/ext/mailparse/mailparse.c Thu Nov 8 15:23:31 2001 @@ -18,7 +18,7 @@ | the support routines for this extension were based upon. | +----------------------------------------------------------------------+ */ -/* $Id: mailparse.c,v 1.12 2001/10/11 23:33:01 ssb Exp $ */ +/* $Id: mailparse.c,v 1.13 2001/11/08 20:23:31 derick Exp $ */ #ifdef HAVE_CONFIG_H #include "config.h" @@ -308,7 +308,7 @@ } /* }}} */ -/* {{{ proto long mailparse_determine_best_xfer_encoding(resource fp) +/* {{{ proto int mailparse_determine_best_xfer_encoding(resource fp) figure out the best way of encoding the content read from the file pointer fp, which must be seek-able. */ PHP_FUNCTION(mailparse_determine_best_xfer_encoding) @@ -556,7 +556,7 @@ /* }}} */ -/* {{{ proto long mailparse_msg_create() +/* {{{ proto int mailparse_msg_create() Return a handle that can be used to parse a message */ PHP_FUNCTION(mailparse_msg_create) @@ -885,7 +885,7 @@ } /* }}} */ -/* {{{ proto long mailparse_msg_get_part(resource rfc2045, string mimesection) +/* {{{ proto int mailparse_msg_get_part(resource rfc2045, string mimesection) Return a handle on a given section in a mimemessage */ PHP_FUNCTION(mailparse_msg_get_part) Index: php4/ext/mysql/php_mysql.c diff -u php4/ext/mysql/php_mysql.c:1.105 php4/ext/mysql/php_mysql.c:1.106 --- php4/ext/mysql/php_mysql.c:1.105 Fri Nov 2 02:08:48 2001 +++ php4/ext/mysql/php_mysql.c Thu Nov 8 15:23:32 2001 @@ -16,7 +16,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: php_mysql.c,v 1.105 2001/11/02 07:08:48 sniper Exp $ */ +/* $Id: php_mysql.c,v 1.106 2001/11/08 20:23:32 derick Exp $ */ /* TODO: @@ -691,7 +691,7 @@ } /* }}} */ -/* {{{ proto int mysql_connect([string hostname[:port][:/path/to/socket]] [, string username] [, string password]) +/* {{{ proto resource mysql_connect([string hostname[:port][:/path/to/socket]] [, string username] [, string password]) Open a connection to a MySQL Server */ PHP_FUNCTION(mysql_connect) { @@ -699,7 +699,7 @@ } /* }}} */ -/* {{{ proto int mysql_pconnect([string hostname[:port][:/path/to/socket]] [, string username] [, string password]) +/* {{{ proto resource mysql_pconnect([string hostname[:port][:/path/to/socket]] [, string username] [, string password]) Open a persistent connection to a MySQL Server */ PHP_FUNCTION(mysql_pconnect) { @@ -707,7 +707,7 @@ } /* }}} */ -/* {{{ proto int mysql_close([int link_identifier]) +/* {{{ proto bool mysql_close([int link_identifier]) Close a MySQL connection */ PHP_FUNCTION(mysql_close) { @@ -746,7 +746,7 @@ } /* }}} */ -/* {{{ proto int mysql_select_db(string database_name [, int link_identifier]) +/* {{{ proto bool mysql_select_db(string database_name [, int link_identifier]) Select a MySQL database */ PHP_FUNCTION(mysql_select_db) { @@ -893,7 +893,7 @@ #endif #if MYSQL_VERSION_ID < 40000 -/* {{{ proto int mysql_create_db(string database_name [, int link_identifier]) +/* {{{ proto bool mysql_create_db(string database_name [, int link_identifier]) Create a MySQL database */ PHP_FUNCTION(mysql_create_db) { @@ -931,7 +931,7 @@ } /* }}} */ -/* {{{ proto int mysql_drop_db(string database_name [, int link_identifier]) +/* {{{ proto bool mysql_drop_db(string database_name [, int link_identifier]) Drop (delete) a MySQL database */ PHP_FUNCTION(mysql_drop_db) { @@ -1062,7 +1062,7 @@ } /* }}} */ -/* {{{ proto int mysql_query(string query [, int link_identifier] [, int result_mode]) +/* {{{ proto resource mysql_query(string query [, int link_identifier] [, int result_mode]) Send an SQL query to MySQL */ PHP_FUNCTION(mysql_query) { @@ -1071,7 +1071,7 @@ /* }}} */ -/* {{{ proto int mysql_unbuffered_query(string query [, int link_identifier] [, int result_mode]) +/* {{{ proto resource mysql_unbuffered_query(string query [, int link_identifier] [, int result_mode]) Send an SQL query to MySQL, without fetching and buffering the result rows */ PHP_FUNCTION(mysql_unbuffered_query) { @@ -1080,7 +1080,7 @@ /* }}} */ -/* {{{ proto int mysql_db_query(string database_name, string query [, int link_identifier]) +/* {{{ proto resource mysql_db_query(string database_name, string query [, int link_identifier]) Send an SQL query to MySQL */ PHP_FUNCTION(mysql_db_query) { @@ -1113,7 +1113,7 @@ /* }}} */ -/* {{{ proto int mysql_list_dbs([int link_identifier]) +/* {{{ proto resource mysql_list_dbs([int link_identifier]) List databases available on a MySQL server */ PHP_FUNCTION(mysql_list_dbs) { @@ -1149,7 +1149,7 @@ /* }}} */ -/* {{{ proto int mysql_list_tables(string database_name [, int link_identifier]) +/* {{{ proto resource mysql_list_tables(string database_name [, int link_identifier]) List tables in a MySQL database */ PHP_FUNCTION(mysql_list_tables) { @@ -1192,7 +1192,7 @@ /* }}} */ -/* {{{ proto int mysql_list_fields(string database_name, string table_name [, int link_identifier]) +/* {{{ proto resource mysql_list_fields(string database_name, string table_name [, int link_identifier]) List MySQL result fields */ PHP_FUNCTION(mysql_list_fields) { @@ -1399,7 +1399,7 @@ /* }}} */ -/* {{{ proto int mysql_result(int result, int row [, mixed field]) +/* {{{ proto mixed mysql_result(int result, int row [, mixed field]) Get result data */ PHP_FUNCTION(mysql_result) { @@ -1516,7 +1516,7 @@ ZEND_FETCH_RESOURCE(mysql_result, MYSQL_RES *, result, -1, "MySQL result", le_result); /* conversion from int64 to long happing here */ - Z_LVAL_P(return_value) = (long)mysql_num_rows(mysql_result); + Z_LVAL_P(return_value) = (long) mysql_num_rows(mysql_result); Z_TYPE_P(return_value) = IS_LONG; } /* }}} */ @@ -1663,7 +1663,7 @@ } /* }}} */ -/* {{{ proto int mysql_data_seek(int result, int row_number) +/* {{{ proto bool mysql_data_seek(int result, int row_number) Move internal result pointer */ PHP_FUNCTION(mysql_data_seek) { @@ -1831,7 +1831,7 @@ /* }}} */ -/* {{{ proto int mysql_field_seek(int result, int field_offset) +/* {{{ proto bool mysql_field_seek(int result, int field_offset) Set result pointer to a specific field offset */ PHP_FUNCTION(mysql_field_seek) { @@ -2033,7 +2033,7 @@ /* }}} */ -/* {{{ proto int mysql_free_result(int result) +/* {{{ proto bool mysql_free_result(int result) Free result memory */ PHP_FUNCTION(mysql_free_result) { Index: php4/ext/pcntl/pcntl.c diff -u php4/ext/pcntl/pcntl.c:1.14 php4/ext/pcntl/pcntl.c:1.15 --- php4/ext/pcntl/pcntl.c:1.14 Thu Oct 11 19:33:37 2001 +++ php4/ext/pcntl/pcntl.c Thu Nov 8 15:23:32 2001 @@ -16,7 +16,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: pcntl.c,v 1.14 2001/10/11 23:33:37 ssb Exp $ */ +/* $Id: pcntl.c,v 1.15 2001/11/08 20:23:32 derick Exp $ */ #define PCNTL_DEBUG 0 @@ -155,6 +155,7 @@ REGISTER_LONG_CONSTANT("SIGPWR", (long) SIGPWR, CONST_CS | CONST_PERSISTENT); #endif REGISTER_LONG_CONSTANT("SIGSYS", (long) SIGSYS, CONST_CS | CONST_PERSISTENT); + REGISTER_LONG_CONSTANT("SIGBABY", (long) SIGSYS, CONST_CS | CONST_PERSISTENT); } static void php_pcntl_init_globals(zend_pcntl_globals *pcntl_globals) @@ -202,7 +203,7 @@ php_info_print_table_end(); } -/* {{{ proto long pcntl_fork() +/* {{{ proto int pcntl_fork() Forks the currently running process following the same behavior as the UNIX fork() system call*/ PHP_FUNCTION(pcntl_fork) { @@ -217,7 +218,7 @@ } /* }}} */ -/* {{{ proto long pcntl_waitpid(long pid, long status, long options) +/* {{{ proto int pcntl_waitpid(long pid, long status, long options) Waits on or returns the status of a forked child as defined by the waitpid() system call */ PHP_FUNCTION(pcntl_waitpid) { @@ -302,7 +303,7 @@ } /* }}} */ -/* {{{ proto long pcntl_wexitstatus(long status) +/* {{{ proto int pcntl_wexitstatus(long status) Returns the status code of a child's exit */ PHP_FUNCTION(pcntl_wexitstatus) { @@ -325,7 +326,7 @@ } /* }}} */ -/* {{{ proto long pcntl_wtermsig(long status) +/* {{{ proto int pcntl_wtermsig(long status) Returns the number of the signal that terminated the process who's status code is passed */ PHP_FUNCTION(pcntl_wtermsig) { @@ -346,7 +347,7 @@ } /* }}} */ -/* {{{ proto long pcntl_wstopsig(long status) +/* {{{ proto int pcntl_wstopsig(long status) Returns the number of the signal that caused the process to stop who's status code is passed */ PHP_FUNCTION(pcntl_wstopsig) {
Index: php4/ext/dbx/dbx.c diff -u php4/ext/dbx/dbx.c:1.29 php4/ext/dbx/dbx.c:1.30 --- php4/ext/dbx/dbx.c:1.29 Thu Oct 11 19:32:42 2001 +++ php4/ext/dbx/dbx.c Thu Nov 8 15:23:31 2001 @@ -20,7 +20,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: dbx.c,v 1.29 2001/10/11 23:32:42 ssb Exp $ */ +/* $Id: dbx.c,v 1.30 2001/11/08 20:23:31 derick Exp $ */ #ifdef HAVE_CONFIG_H #include "config.h" @@ -535,7 +535,7 @@ * dbx functions that are database independent... like sorting result_objects! */ -/* {{{ proto long dbx_compare(array row_x, array row_y, string columnname [, flags]) +/* {{{ proto int dbx_compare(array row_x, array row_y, string columnname [, flags]) returns row_y[columnname] - row_x[columnname], converted to -1, 0 or 1 */ ZEND_FUNCTION(dbx_compare) @@ -627,7 +627,7 @@ } /* }}} */ -/* {{{ proto long dbx_sort(dbx_result_object dbx_result, string compare_function_name) +/* {{{ proto int dbx_sort(dbx_result_object dbx_result, string compare_function_name) returns 0 on failure, 1 on success */ ZEND_FUNCTION(dbx_sort) Index: php4/ext/mailparse/mailparse.c diff -u php4/ext/mailparse/mailparse.c:1.12 php4/ext/mailparse/mailparse.c:1.13 --- php4/ext/mailparse/mailparse.c:1.12 Thu Oct 11 19:33:01 2001 +++ php4/ext/mailparse/mailparse.c Thu Nov 8 15:23:31 2001 @@ -18,7 +18,7 @@ | the support routines for this extension were based upon. | +----------------------------------------------------------------------+ */ -/* $Id: mailparse.c,v 1.12 2001/10/11 23:33:01 ssb Exp $ */ +/* $Id: mailparse.c,v 1.13 2001/11/08 20:23:31 derick Exp $ */ #ifdef HAVE_CONFIG_H #include "config.h" @@ -308,7 +308,7 @@ } /* }}} */ -/* {{{ proto long mailparse_determine_best_xfer_encoding(resource fp) +/* {{{ proto int mailparse_determine_best_xfer_encoding(resource fp) figure out the best way of encoding the content read from the file pointer fp, which must be seek-able. */ PHP_FUNCTION(mailparse_determine_best_xfer_encoding) @@ -556,7 +556,7 @@ /* }}} */ -/* {{{ proto long mailparse_msg_create() +/* {{{ proto int mailparse_msg_create() Return a handle that can be used to parse a message */ PHP_FUNCTION(mailparse_msg_create) @@ -885,7 +885,7 @@ } /* }}} */ -/* {{{ proto long mailparse_msg_get_part(resource rfc2045, string mimesection) +/* {{{ proto int mailparse_msg_get_part(resource rfc2045, string mimesection) Return a handle on a given section in a mimemessage */ PHP_FUNCTION(mailparse_msg_get_part) Index: php4/ext/mysql/php_mysql.c diff -u php4/ext/mysql/php_mysql.c:1.105 php4/ext/mysql/php_mysql.c:1.106 --- php4/ext/mysql/php_mysql.c:1.105 Fri Nov 2 02:08:48 2001 +++ php4/ext/mysql/php_mysql.c Thu Nov 8 15:23:32 2001 @@ -16,7 +16,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: php_mysql.c,v 1.105 2001/11/02 07:08:48 sniper Exp $ */ +/* $Id: php_mysql.c,v 1.106 2001/11/08 20:23:32 derick Exp $ */ /* TODO: @@ -691,7 +691,7 @@ } /* }}} */ -/* {{{ proto int mysql_connect([string hostname[:port][:/path/to/socket]] [, string username] [, string password]) +/* {{{ proto resource mysql_connect([string hostname[:port][:/path/to/socket]] [, string username] [, string password]) Open a connection to a MySQL Server */ PHP_FUNCTION(mysql_connect) { @@ -699,7 +699,7 @@ } /* }}} */ -/* {{{ proto int mysql_pconnect([string hostname[:port][:/path/to/socket]] [, string username] [, string password]) +/* {{{ proto resource mysql_pconnect([string hostname[:port][:/path/to/socket]] [, string username] [, string password]) Open a persistent connection to a MySQL Server */ PHP_FUNCTION(mysql_pconnect) { @@ -707,7 +707,7 @@ } /* }}} */ -/* {{{ proto int mysql_close([int link_identifier]) +/* {{{ proto bool mysql_close([int link_identifier]) Close a MySQL connection */ PHP_FUNCTION(mysql_close) { @@ -746,7 +746,7 @@ } /* }}} */ -/* {{{ proto int mysql_select_db(string database_name [, int link_identifier]) +/* {{{ proto bool mysql_select_db(string database_name [, int link_identifier]) Select a MySQL database */ PHP_FUNCTION(mysql_select_db) { @@ -893,7 +893,7 @@ #endif #if MYSQL_VERSION_ID < 40000 -/* {{{ proto int mysql_create_db(string database_name [, int link_identifier]) +/* {{{ proto bool mysql_create_db(string database_name [, int link_identifier]) Create a MySQL database */ PHP_FUNCTION(mysql_create_db) { @@ -931,7 +931,7 @@ } /* }}} */ -/* {{{ proto int mysql_drop_db(string database_name [, int link_identifier]) +/* {{{ proto bool mysql_drop_db(string database_name [, int link_identifier]) Drop (delete) a MySQL database */ PHP_FUNCTION(mysql_drop_db) { @@ -1062,7 +1062,7 @@ } /* }}} */ -/* {{{ proto int mysql_query(string query [, int link_identifier] [, int result_mode]) +/* {{{ proto resource mysql_query(string query [, int link_identifier] [, int result_mode]) Send an SQL query to MySQL */ PHP_FUNCTION(mysql_query) { @@ -1071,7 +1071,7 @@ /* }}} */ -/* {{{ proto int mysql_unbuffered_query(string query [, int link_identifier] [, int result_mode]) +/* {{{ proto resource mysql_unbuffered_query(string query [, int link_identifier] [, int result_mode]) Send an SQL query to MySQL, without fetching and buffering the result rows */ PHP_FUNCTION(mysql_unbuffered_query) { @@ -1080,7 +1080,7 @@ /* }}} */ -/* {{{ proto int mysql_db_query(string database_name, string query [, int link_identifier]) +/* {{{ proto resource mysql_db_query(string database_name, string query [, int link_identifier]) Send an SQL query to MySQL */ PHP_FUNCTION(mysql_db_query) { @@ -1113,7 +1113,7 @@ /* }}} */ -/* {{{ proto int mysql_list_dbs([int link_identifier]) +/* {{{ proto resource mysql_list_dbs([int link_identifier]) List databases available on a MySQL server */ PHP_FUNCTION(mysql_list_dbs) { @@ -1149,7 +1149,7 @@ /* }}} */ -/* {{{ proto int mysql_list_tables(string database_name [, int link_identifier]) +/* {{{ proto resource mysql_list_tables(string database_name [, int link_identifier]) List tables in a MySQL database */ PHP_FUNCTION(mysql_list_tables) { @@ -1192,7 +1192,7 @@ /* }}} */ -/* {{{ proto int mysql_list_fields(string database_name, string table_name [, int link_identifier]) +/* {{{ proto resource mysql_list_fields(string database_name, string table_name [, int link_identifier]) List MySQL result fields */ PHP_FUNCTION(mysql_list_fields) { @@ -1399,7 +1399,7 @@ /* }}} */ -/* {{{ proto int mysql_result(int result, int row [, mixed field]) +/* {{{ proto mixed mysql_result(int result, int row [, mixed field]) Get result data */ PHP_FUNCTION(mysql_result) { @@ -1516,7 +1516,7 @@ ZEND_FETCH_RESOURCE(mysql_result, MYSQL_RES *, result, -1, "MySQL result", le_result); /* conversion from int64 to long happing here */ - Z_LVAL_P(return_value) = (long)mysql_num_rows(mysql_result); + Z_LVAL_P(return_value) = (long) mysql_num_rows(mysql_result); Z_TYPE_P(return_value) = IS_LONG; } /* }}} */ @@ -1663,7 +1663,7 @@ } /* }}} */ -/* {{{ proto int mysql_data_seek(int result, int row_number) +/* {{{ proto bool mysql_data_seek(int result, int row_number) Move internal result pointer */ PHP_FUNCTION(mysql_data_seek) { @@ -1831,7 +1831,7 @@ /* }}} */ -/* {{{ proto int mysql_field_seek(int result, int field_offset) +/* {{{ proto bool mysql_field_seek(int result, int field_offset) Set result pointer to a specific field offset */ PHP_FUNCTION(mysql_field_seek) { @@ -2033,7 +2033,7 @@ /* }}} */ -/* {{{ proto int mysql_free_result(int result) +/* {{{ proto bool mysql_free_result(int result) Free result memory */ PHP_FUNCTION(mysql_free_result) { Index: php4/ext/pcntl/pcntl.c diff -u php4/ext/pcntl/pcntl.c:1.14 php4/ext/pcntl/pcntl.c:1.15 --- php4/ext/pcntl/pcntl.c:1.14 Thu Oct 11 19:33:37 2001 +++ php4/ext/pcntl/pcntl.c Thu Nov 8 15:23:32 2001 @@ -16,7 +16,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: pcntl.c,v 1.14 2001/10/11 23:33:37 ssb Exp $ */ +/* $Id: pcntl.c,v 1.15 2001/11/08 20:23:32 derick Exp $ */ #define PCNTL_DEBUG 0 @@ -155,6 +155,7 @@ REGISTER_LONG_CONSTANT("SIGPWR", (long) SIGPWR, CONST_CS | CONST_PERSISTENT); #endif REGISTER_LONG_CONSTANT("SIGSYS", (long) SIGSYS, CONST_CS | CONST_PERSISTENT); + REGISTER_LONG_CONSTANT("SIGBABY", (long) SIGSYS, CONST_CS | CONST_PERSISTENT); } static void php_pcntl_init_globals(zend_pcntl_globals *pcntl_globals) @@ -202,7 +203,7 @@ php_info_print_table_end(); } -/* {{{ proto long pcntl_fork() +/* {{{ proto int pcntl_fork() Forks the currently running process following the same behavior as the UNIX fork() system call*/ PHP_FUNCTION(pcntl_fork) { @@ -217,7 +218,7 @@ } /* }}} */ -/* {{{ proto long pcntl_waitpid(long pid, long status, long options) +/* {{{ proto int pcntl_waitpid(long pid, long status, long options) Waits on or returns the status of a forked child as defined by the waitpid() system call */ PHP_FUNCTION(pcntl_waitpid) { @@ -302,7 +303,7 @@ } /* }}} */ -/* {{{ proto long pcntl_wexitstatus(long status) +/* {{{ proto int pcntl_wexitstatus(long status) Returns the status code of a child's exit */ PHP_FUNCTION(pcntl_wexitstatus) { @@ -325,7 +326,7 @@ } /* }}} */ -/* {{{ proto long pcntl_wtermsig(long status) +/* {{{ proto int pcntl_wtermsig(long status) Returns the number of the signal that terminated the process who's status code is passed */ PHP_FUNCTION(pcntl_wtermsig) { @@ -346,7 +347,7 @@ } /* }}} */ -/* {{{ proto long pcntl_wstopsig(long status) +/* {{{ proto int pcntl_wstopsig(long status) Returns the number of the signal that caused the process to stop who's status code is passed */ PHP_FUNCTION(pcntl_wstopsig) {