diff options
author | Zeev Suraski <zeev@php.net> | 2001-08-05 01:43:02 +0000 |
---|---|---|
committer | Zeev Suraski <zeev@php.net> | 2001-08-05 01:43:02 +0000 |
commit | 1159c84ab7849099d4a717cd05c2d920102040ed (patch) | |
tree | ed4e48bb27e2ce5de5972fc3a29c1d24c818467a /ext | |
parent | fcc035108f7b8d2e169c5a592227b3df84d0573e (diff) | |
download | php-git-1159c84ab7849099d4a717cd05c2d920102040ed.tar.gz |
- TSRMLS_FETCH work
- whitespace fixes
Diffstat (limited to 'ext')
-rw-r--r-- | ext/db/db.c | 7 | ||||
-rw-r--r-- | ext/dba/dba_cdb.c | 2 | ||||
-rw-r--r-- | ext/dba/dba_dbm.c | 2 | ||||
-rw-r--r-- | ext/dbase/dbase.c | 32 | ||||
-rw-r--r-- | ext/dbase/dbf_head.c | 4 | ||||
-rw-r--r-- | ext/domxml/php_domxml.c | 15 | ||||
-rw-r--r-- | ext/fdf/fdf.c | 2 | ||||
-rw-r--r-- | ext/gd/gd.c | 2 | ||||
-rw-r--r-- | ext/gd/gdttf.c | 3 | ||||
-rw-r--r-- | ext/hyperwave/hw.c | 183 | ||||
-rw-r--r-- | ext/ldap/ldap.c | 6 | ||||
-rw-r--r-- | ext/mnogosearch/php_mnogo.c | 3 | ||||
-rw-r--r-- | ext/notes/php_notes.c | 27 | ||||
-rw-r--r-- | ext/oci8/oci8.c | 4 | ||||
-rw-r--r-- | ext/pdf/pdf.c | 124 | ||||
-rw-r--r-- | ext/pspell/pspell.c | 36 | ||||
-rw-r--r-- | ext/session/mod_files.c | 9 | ||||
-rw-r--r-- | ext/session/session.c | 2 | ||||
-rw-r--r-- | ext/snmp/snmp.c | 18 | ||||
-rw-r--r-- | ext/standard/base64.c | 6 | ||||
-rw-r--r-- | ext/standard/basic_functions.c | 2 | ||||
-rw-r--r-- | ext/standard/file.c | 20 | ||||
-rw-r--r-- | ext/standard/file.h | 2 | ||||
-rw-r--r-- | ext/standard/math.c | 3 | ||||
-rw-r--r-- | ext/swf/swf.c | 4 | ||||
-rw-r--r-- | ext/vpopmail/php_vpopmail.c | 6 | ||||
-rw-r--r-- | ext/yp/yp.c | 6 |
27 files changed, 341 insertions, 189 deletions
diff --git a/ext/db/db.c b/ext/db/db.c index 7cdfe7ae63..522e3b6466 100644 --- a/ext/db/db.c +++ b/ext/db/db.c @@ -350,7 +350,7 @@ dbm_info *php_dbm_open(char *filename, char *mode TSRMLS_DC) } #else /* NFS_HACK */ - lockfd = VCWD_OPEN((lockfn,O_RDWR|O_CREAT,0644)); + lockfd = VCWD_OPEN_MODE(lockfn, O_RDWR|O_CREAT, 0644); if (lockfd) { flock(lockfd,LOCK_EX); @@ -422,7 +422,8 @@ dbm_info *php_dbm_open(char *filename, char *mode TSRMLS_DC) /* {{{ proto bool dbmclose(int dbm_identifier) Closes a dbm database */ -PHP_FUNCTION(dbmclose) { +PHP_FUNCTION(dbmclose) +{ pval *id; if (ZEND_NUM_ARGS() != 1 || zend_get_parameters(ht,1,&id)==FAILURE) { @@ -453,7 +454,7 @@ int php_dbm_close(zend_rsrc_list_entry *rsrc TSRMLS_DC) VCWD_UNLINK(info->lockfn); #else if (info->lockfn) { - lockfd = VCWD_OPEN((info->lockfn,O_RDWR,0644)); + lockfd = VCWD_OPEN_MODE(info->lockfn, O_RDWR, 0644); flock(lockfd,LOCK_UN); close(lockfd); } diff --git a/ext/dba/dba_cdb.c b/ext/dba/dba_cdb.c index 2419a8f563..5515a45163 100644 --- a/ext/dba/dba_cdb.c +++ b/ext/dba/dba_cdb.c @@ -60,7 +60,7 @@ DBA_OPEN_FUNC(cdb) cdb = malloc(sizeof *cdb); memset(cdb, 0, sizeof *cdb); - cdb->fd = VCWD_OPEN((info->path, gmode)); + cdb->fd = VCWD_OPEN(info->path, gmode); if(cdb->fd < 0) { free(cdb); return FAILURE; diff --git a/ext/dba/dba_dbm.c b/ext/dba/dba_dbm.c index cf087b37e3..9fb9c5e4e7 100644 --- a/ext/dba/dba_dbm.c +++ b/ext/dba/dba_dbm.c @@ -36,7 +36,7 @@ #define TRUNC_IT(extension, mode) \ snprintf(buf, MAXPATHLEN, "%s" extension, info->path); \ buf[MAXPATHLEN-1] = '\0'; \ - if((fd = VCWD_OPEN((buf, O_CREAT | mode | O_WRONLY, filemode))) == -1) \ + if((fd = VCWD_OPEN_MODE(buf, O_CREAT | mode | O_WRONLY, filemode)) == -1) \ return FAILURE; \ close(fd); diff --git a/ext/dbase/dbase.c b/ext/dbase/dbase.c index 8394720fec..e809a1bdbf 100644 --- a/ext/dbase/dbase.c +++ b/ext/dbase/dbase.c @@ -116,7 +116,8 @@ static PHP_MSHUTDOWN_FUNCTION(dbase) /* {{{ proto int dbase_open(string name, int mode) Opens a dBase-format database file */ -PHP_FUNCTION(dbase_open) { +PHP_FUNCTION(dbase_open) +{ pval *dbf_name, *options; dbhead_t *dbh; int handle; @@ -149,7 +150,8 @@ PHP_FUNCTION(dbase_open) { /* {{{ proto bool dbase_close(int identifier) Closes an open dBase-format database file */ -PHP_FUNCTION(dbase_close) { +PHP_FUNCTION(dbase_close) +{ pval *dbh_id; dbhead_t *dbh; int dbh_type; @@ -172,7 +174,8 @@ PHP_FUNCTION(dbase_close) { /* {{{ proto int dbase_numrecords(int identifier) Returns the number of records in the database */ -PHP_FUNCTION(dbase_numrecords) { +PHP_FUNCTION(dbase_numrecords) +{ pval *dbh_id; dbhead_t *dbh; int dbh_type; @@ -194,7 +197,8 @@ PHP_FUNCTION(dbase_numrecords) { /* {{{ proto int dbase_numfields(int identifier) Returns the number of fields (columns) in the database */ -PHP_FUNCTION(dbase_numfields) { +PHP_FUNCTION(dbase_numfields) +{ pval *dbh_id; dbhead_t *dbh; int dbh_type; @@ -216,7 +220,8 @@ PHP_FUNCTION(dbase_numfields) { /* {{{ proto bool dbase_pack(int identifier) Packs the database (deletes records marked for deletion) */ -PHP_FUNCTION(dbase_pack) { +PHP_FUNCTION(dbase_pack) +{ pval *dbh_id; dbhead_t *dbh; int dbh_type; @@ -240,7 +245,8 @@ PHP_FUNCTION(dbase_pack) { /* {{{ proto bool dbase_add_record(int identifier, array data) Adds a record to the database */ -PHP_FUNCTION(dbase_add_record) { +PHP_FUNCTION(dbase_add_record) +{ pval *dbh_id, *fields, **field; dbhead_t *dbh; int dbh_type; @@ -382,7 +388,8 @@ PHP_FUNCTION(dbase_replace_record) /* {{{ proto bool dbase_delete_record(int identifier, int record) Marks a record to be deleted */ -PHP_FUNCTION(dbase_delete_record) { +PHP_FUNCTION(dbase_delete_record) +{ pval *dbh_id, *record; dbhead_t *dbh; int dbh_type; @@ -416,7 +423,8 @@ PHP_FUNCTION(dbase_delete_record) { /* {{{ proto array dbase_get_record(int identifier, int record) Returns an array representing a record from the database */ -PHP_FUNCTION(dbase_get_record) { +PHP_FUNCTION(dbase_get_record) +{ pval *dbh_id, *record; dbhead_t *dbh; int dbh_type; @@ -500,7 +508,8 @@ PHP_FUNCTION(dbase_get_record) { /* From Martin Kuba <makub@aida.inet.cz> */ /* {{{ proto array dbase_get_record_with_names(int identifier, int record) Returns an associative array representing a record from the database */ -PHP_FUNCTION(dbase_get_record_with_names) { +PHP_FUNCTION(dbase_get_record_with_names) +{ pval *dbh_id, *record; dbhead_t *dbh; int dbh_type; @@ -575,7 +584,8 @@ PHP_FUNCTION(dbase_get_record_with_names) { /* {{{ proto bool dbase_create(string filename, array fields) Creates a new dBase-format database file */ -PHP_FUNCTION(dbase_create) { +PHP_FUNCTION(dbase_create) +{ pval *filename, *fields, **field, **value; int fd; dbhead_t *dbh; @@ -603,7 +613,7 @@ PHP_FUNCTION(dbase_create) { RETURN_FALSE; } - if ((fd = VCWD_OPEN((Z_STRVAL_P(filename), O_BINARY|O_RDWR|O_CREAT, 0644))) < 0) { + if ((fd = VCWD_OPEN_MODE(Z_STRVAL_P(filename), O_BINARY|O_RDWR|O_CREAT, 0644)) < 0) { php_error(E_WARNING, "Unable to create database (%d): %s", errno, strerror(errno)); RETURN_FALSE; } diff --git a/ext/dbase/dbf_head.c b/ext/dbase/dbf_head.c index 4530337879..650960f5e2 100644 --- a/ext/dbase/dbf_head.c +++ b/ext/dbase/dbf_head.c @@ -227,10 +227,10 @@ dbhead_t *dbf_open(char *dp, int o_flags) dbhead_t *dbh; cp = dp; - if ((fd = VCWD_OPEN((cp, o_flags|O_BINARY))) < 0) { + if ((fd = VCWD_OPEN(cp, o_flags|O_BINARY)) < 0) { cp = (char *)malloc(256); strcpy(cp, dp); strcat(cp, ".dbf"); - if ((fd = VCWD_OPEN((cp, o_flags))) < 0) { + if ((fd = VCWD_OPEN(cp, o_flags)) < 0) { perror("open"); return NULL; } diff --git a/ext/domxml/php_domxml.c b/ext/domxml/php_domxml.c index 8eeccd12ef..af9e226894 100644 --- a/ext/domxml/php_domxml.c +++ b/ext/domxml/php_domxml.c @@ -2453,14 +2453,16 @@ static void php_xpathptr_new_context(INTERNAL_FUNCTION_PARAMETERS, int mode) /* {{{ proto string xpath_new_context([int doc_handle]) Create new XPath context */ -PHP_FUNCTION(xpath_new_context) { +PHP_FUNCTION(xpath_new_context) +{ php_xpathptr_new_context(INTERNAL_FUNCTION_PARAM_PASSTHRU, PHP_XPATH); } /* }}} */ /* {{{ proto string xptr_new_context([int doc_handle]) Create new XPath context */ -PHP_FUNCTION(xptr_new_context) { +PHP_FUNCTION(xptr_new_context) +{ php_xpathptr_new_context(INTERNAL_FUNCTION_PARAM_PASSTHRU, PHP_XPTR); } /* }}} */ @@ -2557,14 +2559,16 @@ static void php_xpathptr_eval(INTERNAL_FUNCTION_PARAMETERS, int mode, int expr) /* {{{ proto int xpath_eval([int xpathctx_handle,] string str) Evaluate the XPath Location Path in the given string */ -PHP_FUNCTION(xpath_eval) { +PHP_FUNCTION(xpath_eval) +{ php_xpathptr_eval(INTERNAL_FUNCTION_PARAM_PASSTHRU, PHP_XPATH, 0); } /* }}} */ /* {{{ proto int xpath_eval_expression([int xpathctx_handle,] string str) Evaluate the XPath Location Path in the given string */ -PHP_FUNCTION(xpath_eval_expression) { +PHP_FUNCTION(xpath_eval_expression) +{ php_xpathptr_eval(INTERNAL_FUNCTION_PARAM_PASSTHRU, PHP_XPATH, 1); } /* }}} */ @@ -2573,7 +2577,8 @@ PHP_FUNCTION(xpath_eval_expression) { #if defined(LIBXML_XPTR_ENABLED) /* {{{ proto int xptr_eval([int xpathctx_handle,] string str) Evaluate the XPtr Location Path in the given string */ -PHP_FUNCTION(xptr_eval) { +PHP_FUNCTION(xptr_eval) +{ php_xpathptr_eval(INTERNAL_FUNCTION_PARAM_PASSTHRU, PHP_XPTR, 0); } /* }}} */ diff --git a/ext/fdf/fdf.c b/ext/fdf/fdf.c index cbe7a1715d..43fade2ee0 100644 --- a/ext/fdf/fdf.c +++ b/ext/fdf/fdf.c @@ -727,7 +727,7 @@ SAPI_POST_HANDLER_FUNC(fdf_post_handler) ASInt32 nBytes; zval *array_ptr = (zval *) arg; - fp=php_open_temporary_file(NULL,"fdfdata.",&filename); + fp=php_open_temporary_file(NULL, "fdfdata.", &filename TSRMLS_CC); if(!fp) { if(filename) efree(filename); return; diff --git a/ext/gd/gd.c b/ext/gd/gd.c index 6e44cb74f3..eafac5858d 100644 --- a/ext/gd/gd.c +++ b/ext/gd/gd.c @@ -2712,7 +2712,7 @@ void php_imagettftext_common(INTERNAL_FUNCTION_PARAMETERS, int mode, int extende l = strlen(str); #ifdef VIRTUAL_DIR - if(virtual_filepath(Z_STRVAL_PP(FONTNAME), &fontname)) { + if(virtual_filepath(Z_STRVAL_PP(FONTNAME), &fontname TSRMLS_CC)) { fontname = (unsigned char*)Z_STRVAL_PP(FONTNAME); } #else diff --git a/ext/gd/gdttf.c b/ext/gd/gdttf.c index 0be895fb7b..89907c5d28 100644 --- a/ext/gd/gdttf.c +++ b/ext/gd/gdttf.c @@ -332,11 +332,12 @@ fontFetch ( char **error, void *key ) fontkey_t *b=(fontkey_t *)key; int i, n, map_found; short platform, encoding; + TSRMLS_FETCH(); a = (font_t *)malloc(sizeof(font_t)); #ifdef VIRTUAL_DIR /* a->fontname will be freed in fontRelease() later on */ - if (virtual_filepath(b->fontname, &a->fontname)) { + if (virtual_filepath(b->fontname, &a->fontname TSRMLS_CC)) { *error = "Could not find/open font"; return NULL; } diff --git a/ext/hyperwave/hw.c b/ext/hyperwave/hw.c index fe1eec534a..c8c67c59f5 100644 --- a/ext/hyperwave/hw.c +++ b/ext/hyperwave/hw.c @@ -971,7 +971,8 @@ PHP_FUNCTION(hw_pconnect) /* {{{ proto void hw_close(int link) Close connection to Hyperwave server */ -PHP_FUNCTION(hw_close) { +PHP_FUNCTION(hw_close) +{ pval **arg1; int id, type; hw_connection *ptr; @@ -1366,7 +1367,8 @@ char *php_hw_command(INTERNAL_FUNCTION_PARAMETERS, int comm) { /* {{{ proto string hw_stat(int link) Returns status string */ -PHP_FUNCTION(hw_stat) { +PHP_FUNCTION(hw_stat) +{ char *object; object = php_hw_command(INTERNAL_FUNCTION_PARAM_PASSTHRU, STAT_COMMAND); @@ -1381,7 +1383,8 @@ PHP_FUNCTION(hw_stat) { /* {{{ proto array hw_who(int link) Returns names and info of users loged in */ -PHP_FUNCTION(hw_who) { +PHP_FUNCTION(hw_who) +{ zval *user_arr; char *object, *ptr, *temp, *attrname; int i; @@ -1497,7 +1500,8 @@ php_printf("%s\n", ptr); /* {{{ proto string hw_dummy(int link, int id, int msgid) Hyperwave dummy function */ -PHP_FUNCTION(hw_dummy) { +PHP_FUNCTION(hw_dummy) +{ pval **arg1, **arg2, **arg3; int link, id, type, msgid; hw_connection *ptr; @@ -1533,7 +1537,8 @@ php_printf("%s", object); /* {{{ proto string hw_getobject(int link, int objid [, string query]) Returns object record */ -PHP_FUNCTION(hw_getobject) { +PHP_FUNCTION(hw_getobject) +{ pval **argv[3]; int argc, link, id, type, multi; char *query; @@ -1621,7 +1626,8 @@ PHP_FUNCTION(hw_getobject) { /* {{{ proto int hw_insertobject(int link, string objrec, string parms) Inserts an object */ -PHP_FUNCTION(hw_insertobject) { +PHP_FUNCTION(hw_insertobject) +{ pval *arg1, *arg2, *arg3; int link, type; char *objrec, *parms; @@ -1655,7 +1661,8 @@ PHP_FUNCTION(hw_insertobject) { /* {{{ proto string hw_getandlock(int link, int objid) Returns object record and locks object */ -PHP_FUNCTION(hw_getandlock) { +PHP_FUNCTION(hw_getandlock) +{ pval *arg1, *arg2; int link, id, type; hw_connection *ptr; @@ -1686,7 +1693,8 @@ PHP_FUNCTION(hw_getandlock) { /* {{{ proto void hw_unlock(int link, int objid) Unlocks object */ -PHP_FUNCTION(hw_unlock) { +PHP_FUNCTION(hw_unlock) +{ pval *arg1, *arg2; int link, id, type; hw_connection *ptr; @@ -1714,7 +1722,8 @@ PHP_FUNCTION(hw_unlock) { /* {{{ proto void hw_deleteobject(int link, int objid) Deletes object */ -PHP_FUNCTION(hw_deleteobject) { +PHP_FUNCTION(hw_deleteobject) +{ pval *arg1, *arg2; int link, id, type; hw_connection *ptr; @@ -1742,7 +1751,8 @@ PHP_FUNCTION(hw_deleteobject) { /* {{{ proto void hw_changeobject(int link, int objid, array attributes) Changes attributes of an object (obsolete) */ #define BUFFERLEN 200 -PHP_FUNCTION(hw_changeobject) { +PHP_FUNCTION(hw_changeobject) +{ pval *arg1, *arg2, *arg3; int link, id, type, i; hw_connection *ptr; @@ -1831,7 +1841,8 @@ PHP_FUNCTION(hw_changeobject) { /* {{{ proto void hw_modifyobject(int link, int objid, array remattributes, array addattributes [, int mode]) Modifies attributes of an object */ #define BUFFERLEN 200 -PHP_FUNCTION(hw_modifyobject) { +PHP_FUNCTION(hw_modifyobject) +{ zval **argv[5]; int argc; int link, id, type, i, mode; @@ -2152,21 +2163,24 @@ void php_hw_mvcp(INTERNAL_FUNCTION_PARAMETERS, int mvcp) { /* {{{ proto void hw_mv(int link, array objrec, int from, int dest) Moves object */ -PHP_FUNCTION(hw_mv) { +PHP_FUNCTION(hw_mv) +{ php_hw_mvcp(INTERNAL_FUNCTION_PARAM_PASSTHRU, MOVE); } /* }}} */ /* {{{ proto void hw_cp(int link, array objrec, int dest) Copies object */ -PHP_FUNCTION(hw_cp) { +PHP_FUNCTION(hw_cp) +{ php_hw_mvcp(INTERNAL_FUNCTION_PARAM_PASSTHRU, COPY); } /* }}} */ /* {{{ proto hwdoc hw_gettext(int link, int objid [, int rootid]) Returns text document. Links are relative to rootid if given */ -PHP_FUNCTION(hw_gettext) { +PHP_FUNCTION(hw_gettext) +{ pval *argv[3]; int argc, link, id, type, mode; int rootid = 0; @@ -2228,7 +2242,8 @@ PHP_FUNCTION(hw_gettext) { /* {{{ proto void hw_edittext(int link, hwdoc doc) Modifies text document */ -PHP_FUNCTION(hw_edittext) { +PHP_FUNCTION(hw_edittext) +{ pval *arg1, *arg2; int link, doc, type; hw_connection *ptr; @@ -2269,7 +2284,8 @@ PHP_FUNCTION(hw_edittext) { Returns the output of a CGI script */ #define BUFFERLEN 1000 /* FIX ME: The buffer cgi_env_str should be allocated dynamically */ -PHP_FUNCTION(hw_getcgi) { +PHP_FUNCTION(hw_getcgi) +{ pval *arg1, *arg2; int link, id, type; hw_document *doc; @@ -2331,7 +2347,8 @@ PHP_FUNCTION(hw_getcgi) { /* {{{ proto int hw_getremote(int link, int objid) Returns the content of a remote document */ -PHP_FUNCTION(hw_getremote) { +PHP_FUNCTION(hw_getremote) +{ pval *arg1, *arg2; int link, id, type; hw_document *doc; @@ -2371,7 +2388,8 @@ PHP_FUNCTION(hw_getremote) { /* {{{ proto [array|int] hw_getremotechildren(int link, string objrec) Returns the remote document or an array of object records */ -PHP_FUNCTION(hw_getremotechildren) { +PHP_FUNCTION(hw_getremotechildren) +{ pval *arg1, *arg2; int link, type, i; hw_connection *ptr; @@ -2475,7 +2493,8 @@ php_printf("count = %d, remainder = <HR>%s---<HR>", count, remainder); /* {{{ proto void hw_setlinkroot(int link, int rootid) Set the id to which links are calculated */ -PHP_FUNCTION(hw_setlinkroot) { +PHP_FUNCTION(hw_setlinkroot) +{ pval *arg1, *arg2; int link, type, rootid; hw_connection *ptr; @@ -2500,7 +2519,8 @@ PHP_FUNCTION(hw_setlinkroot) { /* {{{ proto hwdoc hw_pipedocument(int link, int objid [, array urlprefixes]) Returns document with links inserted. Optionally a array with five urlprefixes may be passed, which will be inserted for the different types of anchors. This should be a named array with the following keys: HW_DEFAULT_LINK, HW_IMAGE_LINK, HW_BACKGROUND_LINK, HW_INTAG_LINK, and HW_APPLET_LINK */ -PHP_FUNCTION(hw_pipedocument) { +PHP_FUNCTION(hw_pipedocument) +{ pval *arg1, *arg2, *arg3; int i, link, id, type, argc, mode; int rootid = 0; @@ -2617,7 +2637,8 @@ PHP_FUNCTION(hw_pipedocument) { /* {{{ proto hwdoc hw_pipedocument(int link, int objid) Returns document */ -PHP_FUNCTION(hw_oldpipedocument) { +PHP_FUNCTION(hw_oldpipedocument) +{ pval *argv[3]; int link, id, type, argc, mode; int rootid = 0; @@ -2687,7 +2708,8 @@ PHP_FUNCTION(hw_oldpipedocument) { Returns output of CGI script */ #define BUFFERLEN 1000 /* FIX ME: The buffer cgi_env_str should be allocated dynamically */ -PHP_FUNCTION(hw_pipecgi) { +PHP_FUNCTION(hw_pipecgi) +{ pval *arg1, *arg2; int link, id, type; hw_connection *ptr; @@ -2751,7 +2773,8 @@ PHP_FUNCTION(hw_pipecgi) { /* {{{ proto void hw_insertdocument(int link, int parentid, hwdoc doc) Insert new document */ -PHP_FUNCTION(hw_insertdocument) { +PHP_FUNCTION(hw_insertdocument) +{ pval *arg1, *arg2, *arg3; int link, id, doc, type; hw_connection *ptr; @@ -2939,7 +2962,8 @@ PHP_FUNCTION(hw_new_document_from_file) /* {{{ proto void hw_free_document(hwdoc doc) Frees memory of document */ -PHP_FUNCTION(hw_free_document) { +PHP_FUNCTION(hw_free_document) +{ pval *arg1; int id, type; hw_document *ptr; @@ -2965,7 +2989,8 @@ PHP_FUNCTION(hw_free_document) { /* {{{ proto void hw_output_document(hwdoc doc) Prints document */ -PHP_FUNCTION(hw_output_document) { +PHP_FUNCTION(hw_output_document) +{ pval *arg1; int id, type; hw_document *ptr; @@ -2993,7 +3018,8 @@ PHP_FUNCTION(hw_output_document) { /* {{{ proto string hw_document_bodytag(hwdoc doc [, string prefix]) Return bodytag prefixed by prefix */ -PHP_FUNCTION(hw_document_bodytag) { +PHP_FUNCTION(hw_document_bodytag) +{ pval *argv[2]; int id, type, argc; hw_document *ptr; @@ -3038,7 +3064,8 @@ PHP_FUNCTION(hw_document_bodytag) { /* {{{ proto string hw_document_content(hwdoc doc) Returns content of document */ -PHP_FUNCTION(hw_document_content) { +PHP_FUNCTION(hw_document_content) +{ pval *argv[1]; int id, type, argc; hw_document *ptr; @@ -3064,7 +3091,8 @@ PHP_FUNCTION(hw_document_content) { /* {{{ proto int hw_document_setcontent(hwdoc doc, string content) Sets/replaces content of document */ -PHP_FUNCTION(hw_document_setcontent) { +PHP_FUNCTION(hw_document_setcontent) +{ pval *argv[2]; int id, type, argc; hw_document *ptr; @@ -3104,7 +3132,8 @@ PHP_FUNCTION(hw_document_setcontent) { /* {{{ proto int hw_document_size(hwdoc doc) Returns size of document */ -PHP_FUNCTION(hw_document_size) { +PHP_FUNCTION(hw_document_size) +{ pval *arg1; int id, type; hw_document *ptr; @@ -3130,7 +3159,8 @@ PHP_FUNCTION(hw_document_size) { /* {{{ proto string hw_document_attributes(hwdoc doc) Returns object record of document */ -PHP_FUNCTION(hw_document_attributes) { +PHP_FUNCTION(hw_document_attributes) +{ pval *arg1; int id, type; hw_document *ptr; @@ -3153,7 +3183,8 @@ PHP_FUNCTION(hw_document_attributes) { /* {{{ proto array hw_getparentsobj(int link, int objid) Returns array of parent object records */ -PHP_FUNCTION(hw_getparentsobj) { +PHP_FUNCTION(hw_getparentsobj) +{ pval *arg1, *arg2; int link, id, type; int count; @@ -3188,7 +3219,8 @@ PHP_FUNCTION(hw_getparentsobj) { /* {{{ proto array hw_getparents(int link, int objid) Returns array of parent object ids */ -PHP_FUNCTION(hw_getparents) { +PHP_FUNCTION(hw_getparents) +{ pval *arg1, *arg2; int link, id, type; int count; @@ -3233,7 +3265,8 @@ PHP_FUNCTION(hw_getparents) { /* {{{ proto array hw_children(int link, int objid) Returns array of children object ids */ -PHP_FUNCTION(hw_children) { +PHP_FUNCTION(hw_children) +{ zval **arg1, **arg2; int link, id, type; int count; @@ -3278,7 +3311,8 @@ PHP_FUNCTION(hw_children) { /* {{{ proto array hw_childrenobj(int link, int objid) Returns array of children object records */ -PHP_FUNCTION(hw_childrenobj) { +PHP_FUNCTION(hw_childrenobj) +{ pval **arg1, **arg2; int link, id, type; int count; @@ -3313,7 +3347,8 @@ PHP_FUNCTION(hw_childrenobj) { /* {{{ proto array hw_getchildcoll(int link, int objid) Returns array of child collection object ids */ -PHP_FUNCTION(hw_getchildcoll) { +PHP_FUNCTION(hw_getchildcoll) +{ pval **arg1, **arg2; int link, id, type; int count; @@ -3358,7 +3393,8 @@ PHP_FUNCTION(hw_getchildcoll) { /* {{{ proto array hw_getchildcollobj(int link, int objid) Returns array of child collection object records */ -PHP_FUNCTION(hw_getchildcollobj) { +PHP_FUNCTION(hw_getchildcollobj) +{ pval **arg1, **arg2; int link, id, type; int count; @@ -3393,7 +3429,8 @@ PHP_FUNCTION(hw_getchildcollobj) { /* {{{ proto int hw_docbyanchor(int link, int anchorid) Returns objid of document belonging to anchorid */ -PHP_FUNCTION(hw_docbyanchor) { +PHP_FUNCTION(hw_docbyanchor) +{ pval **arg1, **arg2; int link, id, type; hw_connection *ptr; @@ -3424,7 +3461,8 @@ PHP_FUNCTION(hw_docbyanchor) { /* {{{ proto array hw_docbyanchorobj(int link, int anchorid) Returns object record of document belonging to anchorid */ -PHP_FUNCTION(hw_docbyanchorobj) { +PHP_FUNCTION(hw_docbyanchorobj) +{ pval **arg1, **arg2; int link, id, type; hw_connection *ptr; @@ -3459,7 +3497,8 @@ PHP_FUNCTION(hw_docbyanchorobj) { /* {{{ proto array hw_getobjectbyquery(int link, string query, int maxhits) Search for query and return maxhits objids */ -PHP_FUNCTION(hw_getobjectbyquery) { +PHP_FUNCTION(hw_getobjectbyquery) +{ pval **arg1, **arg2, **arg3; int link, type, maxhits; char *query; @@ -3502,7 +3541,8 @@ PHP_FUNCTION(hw_getobjectbyquery) { /* {{{ proto array hw_getobjectbyqueryobj(int link, string query, int maxhits) Search for query and return maxhits object records */ -PHP_FUNCTION(hw_getobjectbyqueryobj) { +PHP_FUNCTION(hw_getobjectbyqueryobj) +{ pval **arg1, **arg2, **arg3; int link, type, maxhits; char *query; @@ -3540,7 +3580,8 @@ PHP_FUNCTION(hw_getobjectbyqueryobj) { /* {{{ proto array hw_getobjectbyquerycoll(int link, int collid, string query, int maxhits) Search for query in collection and return maxhits objids */ -PHP_FUNCTION(hw_getobjectbyquerycoll) { +PHP_FUNCTION(hw_getobjectbyquerycoll) +{ pval **arg1, **arg2, **arg3, **arg4; int link, id, type, maxhits; char *query; @@ -3585,7 +3626,8 @@ PHP_FUNCTION(hw_getobjectbyquerycoll) { /* {{{ proto array hw_getobjectbyquerycollobj(int link, int collid, string query, int maxhits) Search for query in collection and return maxhits object records */ -PHP_FUNCTION(hw_getobjectbyquerycollobj) { +PHP_FUNCTION(hw_getobjectbyquerycollobj) +{ pval **arg1, **arg2, **arg3, **arg4; int link, id, type, maxhits; char *query; @@ -3625,7 +3667,8 @@ PHP_FUNCTION(hw_getobjectbyquerycollobj) { /* {{{ proto array hw_getobjectbyftquery(int link, string query, int maxhits) Search for query as fulltext and return maxhits objids */ -PHP_FUNCTION(hw_getobjectbyftquery) { +PHP_FUNCTION(hw_getobjectbyftquery) +{ pval **arg1, **arg2, **arg3; int link, type, maxhits; char *query; @@ -3669,7 +3712,8 @@ PHP_FUNCTION(hw_getobjectbyftquery) { /* {{{ proto array hw_getobjectbyftqueryobj(int link, string query, int maxhits) Search for query as fulltext and return maxhits object records */ -PHP_FUNCTION(hw_getobjectbyftqueryobj) { +PHP_FUNCTION(hw_getobjectbyftqueryobj) +{ pval **arg1, **arg2, **arg3; int link, type, maxhits; char *query; @@ -3708,7 +3752,8 @@ PHP_FUNCTION(hw_getobjectbyftqueryobj) { /* {{{ proto array hw_getobjectbyftquerycoll(int link, int collid, string query, int maxhits) Search for fulltext query in collection and return maxhits objids */ -PHP_FUNCTION(hw_getobjectbyftquerycoll) { +PHP_FUNCTION(hw_getobjectbyftquerycoll) +{ pval **arg1, **arg2, **arg3, **arg4; int link, id, type, maxhits; char *query; @@ -3754,7 +3799,8 @@ PHP_FUNCTION(hw_getobjectbyftquerycoll) { /* {{{ proto array hw_getobjectbyftquerycollobj(int link, int collid, string query, int maxhits) Search for fulltext query in collection and return maxhits object records */ -PHP_FUNCTION(hw_getobjectbyftquerycollobj) { +PHP_FUNCTION(hw_getobjectbyftquerycollobj) +{ pval **arg1, **arg2, **arg3, **arg4; int link, id, type, maxhits; char *query; @@ -3795,7 +3841,8 @@ PHP_FUNCTION(hw_getobjectbyftquerycollobj) { /* {{{ proto array hw_getchilddoccoll(int link, int objid) Returns all children ids which are documents */ -PHP_FUNCTION(hw_getchilddoccoll) { +PHP_FUNCTION(hw_getchilddoccoll) +{ pval **arg1, **arg2; int link, id, type; int count, i; @@ -3834,7 +3881,8 @@ PHP_FUNCTION(hw_getchilddoccoll) { /* {{{ proto array hw_getchilddoccollobj(int link, int objid) Returns all children object records which are documents */ -PHP_FUNCTION(hw_getchilddoccollobj) { +PHP_FUNCTION(hw_getchilddoccollobj) +{ pval **arg1, **arg2; int link, id, type; int count; @@ -3869,7 +3917,8 @@ PHP_FUNCTION(hw_getchilddoccollobj) { /* {{{ proto array hw_getanchors(int link, int objid) Return all anchors of object */ -PHP_FUNCTION(hw_getanchors) { +PHP_FUNCTION(hw_getanchors) +{ pval **arg1, **arg2; int link, id, type; int count, i; @@ -3908,7 +3957,8 @@ PHP_FUNCTION(hw_getanchors) { /* {{{ proto array hw_getanchorsobj(int link, int objid) Return all object records of anchors of object */ -PHP_FUNCTION(hw_getanchorsobj) { +PHP_FUNCTION(hw_getanchorsobj) +{ pval **arg1, **arg2; int link, id, type; int count; @@ -3942,7 +3992,8 @@ PHP_FUNCTION(hw_getanchorsobj) { /* {{{ proto string hw_getusername(int link) Returns the current user name */ -PHP_FUNCTION(hw_getusername) { +PHP_FUNCTION(hw_getusername) +{ pval **arg1; int link, type; hw_connection *ptr; @@ -3966,7 +4017,8 @@ PHP_FUNCTION(hw_getusername) { /* {{{ proto void hw_identify(int link, string username, string password) Identifies at Hyperwave server */ -PHP_FUNCTION(hw_identify) { +PHP_FUNCTION(hw_identify) +{ pval **arg1, **arg2, **arg3; int link, type; char *name, *passwd, *userdata; @@ -4015,7 +4067,8 @@ PHP_FUNCTION(hw_identify) { /* {{{ proto array hw_objrec2array(string objrec, [array format]) Returns object array of object record */ -PHP_FUNCTION(hw_objrec2array) { +PHP_FUNCTION(hw_objrec2array) +{ zval **arg1, **arg2; switch(ZEND_NUM_ARGS()) { @@ -4040,7 +4093,8 @@ PHP_FUNCTION(hw_objrec2array) { /* {{{ proto string hw_array2objrec(array objarr) Returns object record of object array */ -PHP_FUNCTION(hw_array2objrec) { +PHP_FUNCTION(hw_array2objrec) +{ pval **arg1; char *objrec, *retobj; @@ -4060,7 +4114,8 @@ PHP_FUNCTION(hw_array2objrec) { /* {{{ proto array hw_incollections(int link, array objids, array collids, int para) Returns object ids which are in collections */ -PHP_FUNCTION(hw_incollections) { +PHP_FUNCTION(hw_incollections) +{ pval **arg1, **arg2, **arg3, **arg4; int type, link, i; hw_connection *ptr; @@ -4121,7 +4176,8 @@ PHP_FUNCTION(hw_incollections) { /* {{{ proto void hw_inscoll(int link, int parentid, array objarr) Inserts collection */ -PHP_FUNCTION(hw_inscoll) { +PHP_FUNCTION(hw_inscoll) +{ pval **arg1, **arg2, **arg3; char *objrec; int id, newid, type, link; @@ -4159,7 +4215,8 @@ PHP_FUNCTION(hw_inscoll) { /* {{{ proto void hw_insdoc(int link, int parentid, string objrec [, string text]) Inserts document */ -PHP_FUNCTION(hw_insdoc) { +PHP_FUNCTION(hw_insdoc) +{ zval **argv[4]; char *objrec, *text; int id, newid, type, link, argc; @@ -4201,7 +4258,8 @@ PHP_FUNCTION(hw_insdoc) { /* {{{ proto int hw_getsrcbydestobj(int link, int destid) Returns object id of source docuent by destination anchor */ -PHP_FUNCTION(hw_getsrcbydestobj) { +PHP_FUNCTION(hw_getsrcbydestobj) +{ pval **arg1, **arg2; int link, type, id; int count; @@ -4235,7 +4293,8 @@ PHP_FUNCTION(hw_getsrcbydestobj) { /* {{{ proto int hw_mapid(int link, int serverid, int destid) Returns virtual object id of document on remote Hyperwave server */ -PHP_FUNCTION(hw_mapid) { +PHP_FUNCTION(hw_mapid) +{ pval **arg1, **arg2, **arg3; int link, type, servid, id, virtid; hw_connection *ptr; @@ -4266,7 +4325,8 @@ PHP_FUNCTION(hw_mapid) { /* {{{ proto string hw_getrellink(int link, int rootid, int sourceid, int destid) Get link from source to dest relative to rootid */ -PHP_FUNCTION(hw_getrellink) { +PHP_FUNCTION(hw_getrellink) +{ pval **arg1, **arg2, **arg3, **arg4; int link, type; int rootid, destid, sourceid; @@ -4302,7 +4362,8 @@ PHP_FUNCTION(hw_getrellink) { /* {{{ proto string hw_insertanchors(int hwdoc, array anchorecs, array dest [, array urlprefixes]) Inserts only anchors into text */ -PHP_FUNCTION(hw_insertanchors) { +PHP_FUNCTION(hw_insertanchors) +{ pval **arg1, **arg2, **arg3, **arg4; hw_document *hwdoc; int type, docid, error, argc, count; diff --git a/ext/ldap/ldap.c b/ext/ldap/ldap.c index 2ef3c2d162..3a4cb2bd84 100644 --- a/ext/ldap/ldap.c +++ b/ext/ldap/ldap.c @@ -1984,14 +1984,16 @@ static void php_ldap_do_translate(INTERNAL_FUNCTION_PARAMETERS, int way) /* {{{ proto string ldap_t61_to_8859(string value) Translate t61 characters to 8859 characters */ -PHP_FUNCTION(ldap_t61_to_8859) { +PHP_FUNCTION(ldap_t61_to_8859) +{ php_ldap_do_translate(INTERNAL_FUNCTION_PARAM_PASSTHRU, 0); } /* }}} */ /* {{{ proto string ldap_8859_to_t61(string value) Translate 8859 characters to t61 characters */ -PHP_FUNCTION(ldap_8859_to_t61) { +PHP_FUNCTION(ldap_8859_to_t61) +{ php_ldap_do_translate(INTERNAL_FUNCTION_PARAM_PASSTHRU, 1); } /* }}} */ diff --git a/ext/mnogosearch/php_mnogo.c b/ext/mnogosearch/php_mnogo.c index 9efe54cbc7..f4c0d42758 100644 --- a/ext/mnogosearch/php_mnogo.c +++ b/ext/mnogosearch/php_mnogo.c @@ -884,7 +884,8 @@ DLEXPORT PHP_FUNCTION(udm_find) /* {{{ proto string udm_get_res_field(int res, int row, int field) Fetch mnoGoSearch result field */ -DLEXPORT PHP_FUNCTION(udm_get_res_field){ +DLEXPORT PHP_FUNCTION(udm_get_res_field) +{ pval **yyres, **yyrow_num, **yyfield_name; UDM_RESULT * Res; diff --git a/ext/notes/php_notes.c b/ext/notes/php_notes.c index 210107fd8a..4b42040c38 100644 --- a/ext/notes/php_notes.c +++ b/ext/notes/php_notes.c @@ -476,7 +476,8 @@ STATUS UndoUnreadStatus ( Mark a note_id as read for the User user_name Note: user_name must be fully distinguished user name */ -PHP_FUNCTION(notes_mark_read){ +PHP_FUNCTION(notes_mark_read) +{ int argc; int ActionCount; @@ -570,7 +571,8 @@ PHP_FUNCTION(notes_mark_read){ Mark a note_id as unread for the User user_name Note: user_name must be fully distinguished user name */ -PHP_FUNCTION(notes_mark_unread){ +PHP_FUNCTION(notes_mark_unread) +{ int argc; int ActionCount; @@ -898,7 +900,8 @@ STATUS UndoUnreadStatus ( /* {{{ proto string notes_unread(string database_name, string user_name) Returns the unread note id's for the current User user_name Note: user_name must be fully distinguished user name*/ -PHP_FUNCTION(notes_unread){ +PHP_FUNCTION(notes_unread) +{ int argc; pval *argv[2]; @@ -1020,7 +1023,8 @@ STATUS near pascal GetUniqueFileName(char *Drive, char *Ext, char *FileName); priority H: High N: Normal L: Low receipt 1: Yes 0: No subject*/ -PHP_FUNCTION(notes_header_info){ +PHP_FUNCTION(notes_header_info) +{ int argc; pval *argv[3]; @@ -1254,7 +1258,8 @@ STATUS near pascal GetUniqueFileName(char *Drive, char *Ext, /* {{{ proto array notes_body(string server, string mailbox, int msg_number) Open the message msg_number in the specified mailbox on the specified server (leave server blank for local) and returns an array of body text lines. */ -PHP_FUNCTION(notes_body){ +PHP_FUNCTION(notes_body) +{ int argc; pval *argv[3]; @@ -1454,7 +1459,8 @@ PHP_FUNCTION(notes_body){ FILTER FIELD */ -PHP_FUNCTION(notes_find_note){ +PHP_FUNCTION(notes_find_note) +{ int argc; pval *argv[3]; @@ -1542,7 +1548,8 @@ PHP_FUNCTION(notes_find_note){ /* {{{ proto bool notes_nav_create(string database_name, string name ) Create a navigator name, in database_name */ -PHP_FUNCTION(notes_nav_create){ +PHP_FUNCTION(notes_nav_create) +{ int argc; pval *argv[2]; @@ -1742,7 +1749,8 @@ STATUS LNPUBLIC file_action (void *, SEARCH_MATCH *, ITEM_TABLE *); STATUS LNPUBLIC print_file_summary (ITEM_TABLE *); -PHP_FUNCTION(notes_search){ +PHP_FUNCTION(notes_search) +{ int argc; pval *argv[2]; @@ -2267,7 +2275,8 @@ char ItemText[MAX_ITEM_LEN]; /* Text rendering of item value */ char ItemName[MAX_ITEM_NAME_LEN];/* Zero terminated item name */ -PHP_FUNCTION(notes_list_msgs){ +PHP_FUNCTION(notes_list_msgs) +{ int argc; pval *argv[1]; diff --git a/ext/oci8/oci8.c b/ext/oci8/oci8.c index ca915adf18..3c17478de0 100644 --- a/ext/oci8/oci8.c +++ b/ext/oci8/oci8.c @@ -2936,7 +2936,7 @@ PHP_FUNCTION(ocisavelobfile) filename = (*arg)->value.str.val; - if ((fp = VCWD_OPEN((filename, O_RDONLY|O_BINARY))) == -1) { + if ((fp = VCWD_OPEN(filename, O_RDONLY|O_BINARY)) == -1) { php_error(E_WARNING, "Can't open file %s", filename); RETURN_FALSE; } @@ -3054,7 +3054,7 @@ PHP_FUNCTION(ociwritelobtofile) goto bail; } - if ((fp = VCWD_OPEN((filename,O_CREAT | O_RDWR | O_BINARY | O_TRUNC, 0600))) == -1) { + if ((fp = VCWD_OPEN_MODE(filename,O_CREAT | O_RDWR | O_BINARY | O_TRUNC, 0600)) == -1) { php_error(E_WARNING, "Can't create file %s", filename); goto bail; } diff --git a/ext/pdf/pdf.c b/ext/pdf/pdf.c index cb5c198af1..7274b0e15a 100644 --- a/ext/pdf/pdf.c +++ b/ext/pdf/pdf.c @@ -399,7 +399,7 @@ static void _php_pdf_set_info(INTERNAL_FUNCTION_PARAMETERS, char *field) /* {{{ proto bool pdf_set_info(int pdfdoc, string fieldname, string value) Fills an info field of the document */ -PHP_FUNCTION(pdf_set_info) +PHP_FUNCTION(pdf_set_info) { zval **arg1, **arg2, **arg3; PDF *pdf; @@ -452,14 +452,15 @@ PHP_FUNCTION(pdf_set_info_author) /* {{{ proto bool pdf_set_info_keywords(int pdfdoc, string keywords) Fills the keywords field of the document */ -PHP_FUNCTION(pdf_set_info_keywords) { +PHP_FUNCTION(pdf_set_info_keywords) +{ _php_pdf_set_info(INTERNAL_FUNCTION_PARAM_PASSTHRU, "Keywords"); } /* }}} */ /* {{{ proto int pdf_open([int filedesc]) Opens a new pdf document. If filedesc is NULL, document is created in memory. This is the old interface, only for compatibility use pdf_new + pdf_open_file instead */ -PHP_FUNCTION(pdf_open) +PHP_FUNCTION(pdf_open) { zval **file; FILE *fp; @@ -494,7 +495,7 @@ PHP_FUNCTION(pdf_open) /* {{{ proto void pdf_close(int pdfdoc) Closes the pdf document */ -PHP_FUNCTION(pdf_close) +PHP_FUNCTION(pdf_close) { zval **arg1; PDF *pdf; @@ -514,7 +515,7 @@ PHP_FUNCTION(pdf_close) /* {{{ proto void pdf_begin_page(int pdfdoc, double width, double height) Starts page */ -PHP_FUNCTION(pdf_begin_page) +PHP_FUNCTION(pdf_begin_page) { zval **arg1, **arg2, **arg3; PDF *pdf; @@ -534,7 +535,7 @@ PHP_FUNCTION(pdf_begin_page) /* {{{ proto void pdf_end_page(int pdfdoc) Ends page */ -PHP_FUNCTION(pdf_end_page) +PHP_FUNCTION(pdf_end_page) { zval **arg1; PDF *pdf; @@ -552,7 +553,7 @@ PHP_FUNCTION(pdf_end_page) /* {{{ proto void pdf_show(int pdfdoc, string text) Output text at current position */ -PHP_FUNCTION(pdf_show) +PHP_FUNCTION(pdf_show) { zval **arg1, **arg2; PDF *pdf; @@ -571,7 +572,7 @@ PHP_FUNCTION(pdf_show) /* {{{ proto void pdf_show_xy(int pdfdoc, string text, double x-koor, double y-koor) Output text at position */ -PHP_FUNCTION(pdf_show_xy) +PHP_FUNCTION(pdf_show_xy) { zval **arg1, **arg2, **arg3, **arg4; PDF *pdf; @@ -592,7 +593,7 @@ PHP_FUNCTION(pdf_show_xy) /* {{{ proto int pdf_show_boxed(int pdfdoc, string text, double x-koor, double y-koor, double width, double height, string mode [, string feature]) Output text formated in a boxed */ -PHP_FUNCTION(pdf_show_boxed) +PHP_FUNCTION(pdf_show_boxed) { zval **argv[8]; int argc = ZEND_NUM_ARGS(); @@ -634,7 +635,7 @@ PHP_FUNCTION(pdf_show_boxed) /* {{{ proto void pdf_set_font(int pdfdoc, string font, double size, string encoding [, int embed]) Select the current font face, size and encoding */ -PHP_FUNCTION(pdf_set_font) +PHP_FUNCTION(pdf_set_font) { zval **arg1, **arg2, **arg3, **arg4, **arg5; int font, embed; @@ -1831,7 +1832,7 @@ static void _php_pdf_open_image(INTERNAL_FUNCTION_PARAMETERS, char *type) convert_to_string_ex(arg2); #ifdef VIRTUAL_DIR - virtual_filepath(Z_STRVAL_PP(arg2), &image); + virtual_filepath(Z_STRVAL_PP(arg2), &image TSRMLS_CC); #else image = Z_STRVAL_PP(arg2); #endif @@ -1904,7 +1905,7 @@ PHP_FUNCTION(pdf_open_image_file) convert_to_string_ex(arg3); #ifdef VIRTUAL_DIR - virtual_filepath(Z_STRVAL_PP(arg3), &image); + virtual_filepath(Z_STRVAL_PP(arg3), &image TSRMLS_CC); #else image = Z_STRVAL_PP(arg3); #endif @@ -2228,7 +2229,8 @@ PHP_FUNCTION(pdf_add_annotation) /* {{{ proto int pdf_new() Creates a new PDF object */ -PHP_FUNCTION(pdf_new) { +PHP_FUNCTION(pdf_new) +{ PDF *pdf; pdf = PDF_new2(custom_errorhandler, pdf_emalloc, pdf_realloc, pdf_efree, NULL); @@ -2244,7 +2246,8 @@ PHP_FUNCTION(pdf_new) { /* {{{ proto void pdf_delete(int pdfdoc) Deletes the PDF object */ -PHP_FUNCTION(pdf_delete) { +PHP_FUNCTION(pdf_delete) +{ zval **arg1; PDF *pdf; @@ -2265,7 +2268,8 @@ PHP_FUNCTION(pdf_delete) { /* {{{ proto int pdf_open_file(int pdfdoc [, char filename]) Opens a new PDF document. If filename is NULL, document is created in memory. This is not yet fully supported */ -PHP_FUNCTION(pdf_open_file) { +PHP_FUNCTION(pdf_open_file) +{ zval **arg1, **arg2; int pdf_file; char *filename; @@ -2304,7 +2308,8 @@ PHP_FUNCTION(pdf_open_file) { /* {{{ proto int pdf_get_buffer(int pdfdoc) Fetches the full buffer containig the generated PDF data */ -PHP_FUNCTION(pdf_get_buffer) { +PHP_FUNCTION(pdf_get_buffer) +{ zval **arg1; long size; PDF *pdf; @@ -2325,7 +2330,8 @@ PHP_FUNCTION(pdf_get_buffer) { /* {{{ proto int pdf_findfont(int pdfdoc, string fontname, string encoding [, int embed]) Prepares the font fontname for later use with pdf_setfont() */ -PHP_FUNCTION(pdf_findfont) { +PHP_FUNCTION(pdf_findfont) +{ zval **arg1, **arg2, **arg3, **arg4; int embed, font; const char *fontname, *encoding; @@ -2371,7 +2377,8 @@ PHP_FUNCTION(pdf_findfont) { /* {{{ proto void pdf_setfont(int pdfdoc, int font, float fontsize) Sets the current font in the fiven fontsize */ -PHP_FUNCTION(pdf_setfont) { +PHP_FUNCTION(pdf_setfont) +{ zval **arg1, **arg2, **arg3; int font; float fontsize; @@ -2399,7 +2406,8 @@ PHP_FUNCTION(pdf_setfont) { /* {{{ proto void pdf_setpolydash(int pdfdoc, double darray) Sets more complicated dash pattern */ -PHP_FUNCTION(pdf_setpolydash) { +PHP_FUNCTION(pdf_setpolydash) +{ zval **arg1, **arg2; HashTable *array; int len, i; @@ -2444,7 +2452,8 @@ PHP_FUNCTION(pdf_setpolydash) { /* {{{ proto void pdf_concat(int pdf, double a, double b, double c, double d, double e, double f) Concatenates a matrix to the current transformation matrix for text and graphics */ -PHP_FUNCTION(pdf_concat) { +PHP_FUNCTION(pdf_concat) +{ zval **arg1, **arg2, **arg3, **arg4, **arg5, **arg6, **arg7; PDF *pdf; @@ -2475,7 +2484,8 @@ PHP_FUNCTION(pdf_concat) { /* {{{ proto int pdf_open_ccitt(int pdf, string filename, int width, int height, int bitreverse, int k, int blackls1) Opens an image file with raw CCITT G3 or G4 compresed bitmap data */ -PHP_FUNCTION(pdf_open_ccitt) { +PHP_FUNCTION(pdf_open_ccitt) +{ zval **arg1, **arg2, **arg3, **arg4, **arg5, **arg6, **arg7; PDF *pdf; int pdf_image; @@ -2489,7 +2499,7 @@ PHP_FUNCTION(pdf_open_ccitt) { convert_to_string_ex(arg2); #ifdef VIRTUAL_DIR - virtual_filepath(Z_STRVAL_PP(arg2), &image); + virtual_filepath(Z_STRVAL_PP(arg2), &image TSRMLS_CC); #else image = Z_STRVAL_PP(arg2); #endif @@ -2514,7 +2524,8 @@ PHP_FUNCTION(pdf_open_ccitt) { /* {{{ proto int pdf_open_image(int pdf, string type, string source, string data, long length, int width, int height, int components, int bpc, string params) Opens an image of the given type and returns an image for placement in a PDF document */ -PHP_FUNCTION(pdf_open_image) { +PHP_FUNCTION(pdf_open_image) +{ zval **arg1, **arg2, **arg3, **arg4, **arg5, **arg6, **arg7, **arg8, **arg9, **arg10; PDF *pdf; int pdf_image; @@ -2537,7 +2548,7 @@ PHP_FUNCTION(pdf_open_image) { convert_to_string_ex(arg10); #ifdef VIRTUAL_DIR - virtual_filepath(Z_STRVAL_PP(arg4), &image); + virtual_filepath(Z_STRVAL_PP(arg4), &image TSRMLS_CC); #else image = Z_STRVAL_PP(arg4); #endif @@ -2559,7 +2570,8 @@ PHP_FUNCTION(pdf_open_image) { /* {{{ proto void pdf_attach_file(int pdf, double lly, double lly, double urx, double ury, string filename, string description, string author, string mimetype, string icon) Adds a file attachment annotation at the rectangle specified by his lower left and upper right corners */ -PHP_FUNCTION(pdf_attach_file) { +PHP_FUNCTION(pdf_attach_file) +{ zval **arg1, **arg2, **arg3, **arg4, **arg5, **arg6, **arg7, **arg8, **arg9, **arg10; PDF *pdf; @@ -2596,7 +2608,8 @@ PHP_FUNCTION(pdf_attach_file) { /* {{{ proto void pdf_add_note(int pdfdoc, double llx, double lly, double urx, double ury, string contents, string title, string icon, int open) Sets annotation */ -PHP_FUNCTION(pdf_add_note) { +PHP_FUNCTION(pdf_add_note) +{ zval **arg1, **arg2, **arg3, **arg4, **arg5, **arg6, **arg7, **arg8, **arg9; PDF *pdf; @@ -2631,7 +2644,8 @@ PHP_FUNCTION(pdf_add_note) { /* {{{ proto void pdf_add_locallink(int pdfdoc, double llx, double lly, double urx, double ury, int page, string dest) Adds link to web resource */ -PHP_FUNCTION(pdf_add_locallink) { +PHP_FUNCTION(pdf_add_locallink) +{ zval **arg1, **arg2, **arg3, **arg4, **arg5, **arg6, **arg7; PDF *pdf; @@ -2662,7 +2676,8 @@ PHP_FUNCTION(pdf_add_locallink) { /* {{{ proto void pdf_add_launchlink(int pdfdoc, double llx, double lly, double urx, double ury, string filename) Adds link to web resource */ -PHP_FUNCTION(pdf_add_launchlink) { +PHP_FUNCTION(pdf_add_launchlink) +{ zval **arg1, **arg2, **arg3, **arg4, **arg5, **arg6; PDF *pdf; @@ -2693,7 +2708,8 @@ PHP_FUNCTION(pdf_add_launchlink) { /* {{{ proto int pdf_open_pdi(int pdf, string filename, string stringparam, int intparam); * Open an existing PDF document and prepare it for later use. */ -PHP_FUNCTION(pdf_open_pdi) { +PHP_FUNCTION(pdf_open_pdi) +{ zval **arg1, **arg2, **arg3, **arg4; PDF *pdf; int pdi_handle; @@ -2710,7 +2726,7 @@ PHP_FUNCTION(pdf_open_pdi) { convert_to_long_ex(arg4); #ifdef VIRTUAL_DIR - virtual_filepath(Z_STRVAL_PP(arg2), &file); + virtual_filepath(Z_STRVAL_PP(arg2), &file) TSRMLS_CC; #else file = Z_STRVAL_PP(arg2); #endif @@ -2726,7 +2742,8 @@ PHP_FUNCTION(pdf_open_pdi) { /* {{{ proto void pdf_close_pdi(int pdf, int doc); * Close all open page handles, and close the input PDF document. */ -PHP_FUNCTION(pdf_close_pdi) { +PHP_FUNCTION(pdf_close_pdi) +{ zval **arg1, **arg2; PDF *pdf; @@ -2747,7 +2764,8 @@ PHP_FUNCTION(pdf_close_pdi) { /* {{{ proto int pdf_open_pdi_page(int pdf, int doc, int page, string label); * Prepare a page for later use with PDF_place_image(). */ -PHP_FUNCTION(pdf_open_pdi_page) { +PHP_FUNCTION(pdf_open_pdi_page) +{ zval **arg1, **arg2, **arg3, **arg4; PDF *pdf; int pdi_image; @@ -2773,7 +2791,8 @@ PHP_FUNCTION(pdf_open_pdi_page) { /* {{{ proto void pdf_place_pdi_page(int pdf, int page, double x, double y, double sx, double sy) * Place a PDF page with the lower left corner at (x, y), and scale it. */ -PHP_FUNCTION(pdf_place_pdi_page) { +PHP_FUNCTION(pdf_place_pdi_page) +{ zval **arg1, **arg2, **arg3, **arg4, **arg5, **arg6; PDF *pdf; @@ -2802,7 +2821,8 @@ PHP_FUNCTION(pdf_place_pdi_page) { /* {{{ proto void pdf_close_pdi_page(int pdf, int page); * Close the page handle, and free all page-related resources. */ -PHP_FUNCTION(pdf_close_pdi_page) { +PHP_FUNCTION(pdf_close_pdi_page) +{ zval **arg1, **arg2; PDF *pdf; @@ -2823,7 +2843,8 @@ PHP_FUNCTION(pdf_close_pdi_page) { /* {{{ proto string pdf_get_pdi_parameter(int pdf, string key, int doc, int page, int index); * Get the contents of some PDI document parameter with string type. */ -PHP_FUNCTION(pdf_get_pdi_parameter) { +PHP_FUNCTION(pdf_get_pdi_parameter) +{ zval **arg1, **arg2, **arg3, **arg4, **arg5; PDF *pdf; const char *buffer; @@ -2853,7 +2874,8 @@ PHP_FUNCTION(pdf_get_pdi_parameter) { /* {{{ proto double pdf_get_pdi_value(int pdf, string key, int doc, int page, int index); * Get the contents of some PDI document parameter with numerical type. */ -PHP_FUNCTION(pdf_get_pdi_value) { +PHP_FUNCTION(pdf_get_pdi_value) +{ zval **arg1, **arg2, **arg3, **arg4, **arg5; PDF *pdf; double value; @@ -2881,7 +2903,8 @@ PHP_FUNCTION(pdf_get_pdi_value) { /* {{{ proto int pdf_begin_pattern(int pdf, double width, double height, double xstep, double ystep, int painttype); * Start a new pattern definition. */ -PHP_FUNCTION(pdf_begin_pattern) { +PHP_FUNCTION(pdf_begin_pattern) +{ zval **arg1, **arg2, **arg3, **arg4, **arg5, **arg6; PDF *pdf; int pattern_image; @@ -2911,7 +2934,8 @@ PHP_FUNCTION(pdf_begin_pattern) { /* {{{ proto void pdf_end_pattern(int pdf); * Finish the pattern definition. */ -PHP_FUNCTION(pdf_end_pattern) { +PHP_FUNCTION(pdf_end_pattern) +{ zval **arg1; PDF *pdf; @@ -2929,7 +2953,8 @@ PHP_FUNCTION(pdf_end_pattern) { /* {{{ proto int pdf_begin_template(int pdf, double width, double height); * Start a new template definition. */ -PHP_FUNCTION(pdf_begin_template) { +PHP_FUNCTION(pdf_begin_template) +{ zval **arg1, **arg2, **arg3; PDF *pdf; int tmpl_image; @@ -2953,7 +2978,8 @@ PHP_FUNCTION(pdf_begin_template) { /* {{{ proto void pdf_end_template(int pdf); * Finish the template definition. */ -PHP_FUNCTION(pdf_end_template) { +PHP_FUNCTION(pdf_end_template) +{ zval **arg1; PDF *pdf; @@ -2972,7 +2998,8 @@ PHP_FUNCTION(pdf_end_template) { /* {{{ proto void pdf_setcolor(int pdf, string type, string colorspace, double c1 [, double c2 [, double c3 [, double c4]]]); * Set the current color space and color. */ -PHP_FUNCTION(pdf_setcolor) { +PHP_FUNCTION(pdf_setcolor) +{ zval **arg1, **arg2, **arg3, **arg4, **arg5, **arg6, **arg7; PDF *pdf; double c1; @@ -3035,7 +3062,8 @@ PHP_FUNCTION(pdf_setcolor) { /* {{{ proto int pdf_makespotcolor(int pdf, string spotname); * Make a named spot color from the current color. */ -PHP_FUNCTION(pdf_makespotcolor) { +PHP_FUNCTION(pdf_makespotcolor) +{ zval **arg1, **arg2; PDF *pdf; int spotcolor; @@ -3058,7 +3086,8 @@ PHP_FUNCTION(pdf_makespotcolor) { /* {{{ proto void pdf_arcn(int pdf, double x, double y, double r, double alpha, double beta); * Draw a clockwise circular arc from alpha to beta degrees. */ -PHP_FUNCTION(pdf_arcn) { +PHP_FUNCTION(pdf_arcn) +{ zval **arg1, **arg2, **arg3, **arg4, **arg5, **arg6; PDF *pdf; @@ -3087,7 +3116,8 @@ PHP_FUNCTION(pdf_arcn) { /* {{{ proto void pdf_initgraphics(int pdf); * Reset all implicit color and graphics state parameters to their defaults. */ -PHP_FUNCTION(pdf_initgraphics) { +PHP_FUNCTION(pdf_initgraphics) +{ zval **arg1; PDF *pdf; @@ -3105,7 +3135,8 @@ PHP_FUNCTION(pdf_initgraphics) { /* {{{ proto void pdf_add_thumbnail(int pdf, int image); * Add an existing image as thumbnail for the current page. */ -PHP_FUNCTION(pdf_add_thumbnail) { +PHP_FUNCTION(pdf_add_thumbnail) +{ zval **arg1, **arg2; PDF *pdf; @@ -3126,7 +3157,8 @@ PHP_FUNCTION(pdf_add_thumbnail) { /* {{{ proto void pdf_setmatrix(int pdf, double a, double b, double c, double d, double e, double f) Explicitly set the current transformation matrix. */ -PHP_FUNCTION(pdf_setmatrix) { +PHP_FUNCTION(pdf_setmatrix) +{ zval **arg1, **arg2, **arg3, **arg4, **arg5, **arg6, **arg7; PDF *pdf; diff --git a/ext/pspell/pspell.c b/ext/pspell/pspell.c index fec700adb8..9d0d91593b 100644 --- a/ext/pspell/pspell.c +++ b/ext/pspell/pspell.c @@ -94,7 +94,8 @@ static void php_pspell_close_config(zend_rsrc_list_entry *rsrc TSRMLS_DC) /* {{{ PHP_MINIT_FUNCTION */ -PHP_MINIT_FUNCTION(pspell){ +PHP_MINIT_FUNCTION(pspell) +{ REGISTER_MAIN_LONG_CONSTANT("PSPELL_FAST", PSPELL_FAST, CONST_PERSISTENT | CONST_CS); REGISTER_MAIN_LONG_CONSTANT("PSPELL_NORMAL", PSPELL_NORMAL, CONST_PERSISTENT | CONST_CS); REGISTER_MAIN_LONG_CONSTANT("PSPELL_BAD_SPELLERS", PSPELL_BAD_SPELLERS, CONST_PERSISTENT | CONST_CS); @@ -107,7 +108,8 @@ PHP_MINIT_FUNCTION(pspell){ /* {{{ proto int pspell_new(string language [, string spelling [, string jargon [, string encoding [, int mode]]]]) Load a dictionary */ -PHP_FUNCTION(pspell_new){ +PHP_FUNCTION(pspell_new) +{ zval **language,**spelling,**jargon,**encoding,**pmode; long mode = 0L, speed = 0L; int argc; @@ -183,7 +185,8 @@ PHP_FUNCTION(pspell_new){ /* {{{ proto int pspell_new_personal(string personal, string language [, string spelling [, string jargon [, string encoding [, int mode]]]]) Load a dictionary with a personal wordlist*/ -PHP_FUNCTION(pspell_new_personal){ +PHP_FUNCTION(pspell_new_personal) +{ zval **personal, **language,**spelling,**jargon,**encoding,**pmode; long mode = 0L, speed = 0L; int argc; @@ -265,7 +268,8 @@ PHP_FUNCTION(pspell_new_personal){ /* {{{ proto int pspell_new_config(int config) Load a dictionary based on the given config */ -PHP_FUNCTION(pspell_new_config){ +PHP_FUNCTION(pspell_new_config) +{ int type; zval **conf; int argc; @@ -297,7 +301,8 @@ PHP_FUNCTION(pspell_new_config){ /* {{{ proto int pspell_check(int pspell, string word) Returns true if word is valid */ -PHP_FUNCTION(pspell_check){ +PHP_FUNCTION(pspell_check) +{ int type; zval **scin,**word; PspellManager *manager; @@ -539,7 +544,8 @@ PHP_FUNCTION(pspell_save_wordlist) /* {{{ proto int pspell_config_create(string language [, string spelling [, string jargon [, string encoding]]]) Create a new config to be used later to create a manager */ -PHP_FUNCTION(pspell_config_create){ +PHP_FUNCTION(pspell_config_create) +{ zval **language,**spelling,**jargon,**encoding; int argc; int ind; @@ -587,7 +593,8 @@ PHP_FUNCTION(pspell_config_create){ /* {{{ proto int pspell_config_runtogether(int conf, bool runtogether) Consider run-together words as valid components */ -PHP_FUNCTION(pspell_config_runtogether){ +PHP_FUNCTION(pspell_config_runtogether) +{ int type; zval **sccin, **runtogether; int argc; @@ -615,7 +622,8 @@ PHP_FUNCTION(pspell_config_runtogether){ /* {{{ proto int pspell_config_mode(int conf, long mode) Select mode for config (PSPELL_FAST, PSPELL_NORMAL or PSPELL_BAD_SPELLERS) */ -PHP_FUNCTION(pspell_config_mode){ +PHP_FUNCTION(pspell_config_mode) +{ int type; zval **sccin, **mode; int argc; @@ -651,7 +659,8 @@ PHP_FUNCTION(pspell_config_mode){ /* {{{ proto int pspell_config_ignore(int conf, int ignore) Ignore words <= n chars */ -PHP_FUNCTION(pspell_config_ignore){ +PHP_FUNCTION(pspell_config_ignore) +{ int type; zval **sccin, **pignore; int argc; @@ -701,7 +710,8 @@ PHP_FUNCTION(pspell_config_ignore){ /* {{{ proto int pspell_config_personal(int conf, string personal) Use a personal dictionary for this config */ -PHP_FUNCTION(pspell_config_personal){ +PHP_FUNCTION(pspell_config_personal) +{ int type; zval **sccin, **personal; int argc; @@ -729,7 +739,8 @@ PHP_FUNCTION(pspell_config_personal){ /* {{{ proto int pspell_config_repl(int conf, string repl) Use a personal dictionary with replacement pairs for this config */ -PHP_FUNCTION(pspell_config_repl){ +PHP_FUNCTION(pspell_config_repl) +{ int type; zval **sccin, **repl; int argc; @@ -759,7 +770,8 @@ PHP_FUNCTION(pspell_config_repl){ /* {{{ proto int pspell_config_save_repl(int conf, bool save) Save replacement pairs when personal list is saved for this config */ -PHP_FUNCTION(pspell_config_save_repl){ +PHP_FUNCTION(pspell_config_save_repl) +{ int type; zval **sccin, **save; int argc; diff --git a/ext/session/mod_files.c b/ext/session/mod_files.c index 5ed3e0aa4d..ef5231a73c 100644 --- a/ext/session/mod_files.c +++ b/ext/session/mod_files.c @@ -126,6 +126,7 @@ static void ps_files_close(ps_files *data) static void ps_files_open(ps_files *data, const char *key) { char buf[MAXPATHLEN]; + TSRMLS_FETCH(); if (data->fd < 0 || !data->lastkey || strcmp(key, data->lastkey)) { if (data->lastkey) { @@ -142,12 +143,12 @@ static void ps_files_open(ps_files *data, const char *key) data->lastkey = estrdup(key); #ifdef O_EXCL - data->fd = VCWD_OPEN((buf, O_RDWR | O_BINARY)); + data->fd = VCWD_OPEN(buf, O_RDWR | O_BINARY); if (data->fd == -1 && errno == ENOENT) - data->fd = VCWD_OPEN((buf, O_EXCL | O_RDWR | O_CREAT | O_BINARY, 0600)); + data->fd = VCWD_OPEN_MODE(buf, O_EXCL | O_RDWR | O_CREAT | O_BINARY, 0600); #else - data->fd = VCWD_OPEN((buf, O_CREAT | O_RDWR | O_BINARY, 0600)); + data->fd = VCWD_OPEN_MODE(buf, O_CREAT | O_RDWR | O_BINARY, 0600); #endif if (data->fd != -1) flock(data->fd, LOCK_EX); @@ -168,6 +169,7 @@ static int ps_files_cleanup_dir(const char *dirname, int maxlifetime) time_t now; int nrdels = 0; size_t dirname_len; + TSRMLS_FETCH(); dir = opendir(dirname); if (!dir) { @@ -312,6 +314,7 @@ PS_DESTROY_FUNC(files) { char buf[MAXPATHLEN]; PS_FILES_DATA; + TSRMLS_FETCH(); if (!ps_files_path_create(buf, sizeof(buf), data, key)) return FAILURE; diff --git a/ext/session/session.c b/ext/session/session.c index 6c7ab27cd3..d414ac409d 100644 --- a/ext/session/session.c +++ b/ext/session/session.c @@ -478,7 +478,7 @@ static char *_php_create_id(int *newlen TSRMLS_DC) if (PS(entropy_length) > 0) { int fd; - fd = VCWD_OPEN((PS(entropy_file), O_RDONLY)); + fd = VCWD_OPEN(PS(entropy_file), O_RDONLY); if (fd >= 0) { char buf[2048]; int n; diff --git a/ext/snmp/snmp.c b/ext/snmp/snmp.c index 9998dff0a4..6b635b196a 100644 --- a/ext/snmp/snmp.c +++ b/ext/snmp/snmp.c @@ -376,35 +376,40 @@ retry: /* {{{ proto string snmpget(string host, string community, string object_id [, int timeout [, int retries]]) Fetch a SNMP object */ -PHP_FUNCTION(snmpget) { +PHP_FUNCTION(snmpget) +{ php_snmp(INTERNAL_FUNCTION_PARAM_PASSTHRU,1); } /* }}} */ /* {{{ proto array snmpwalk(string host, string community, string object_id [, int timeout [, int retries]]) Return all objects under the specified object id */ -PHP_FUNCTION(snmpwalk) { +PHP_FUNCTION(snmpwalk) +{ php_snmp(INTERNAL_FUNCTION_PARAM_PASSTHRU,2); } /* }}} */ /* {{{ proto array snmprealwalk(string host, string community, string object_id [, int timeout [, int retries]]) Return all objects including their respective object id withing the specified one */ -PHP_FUNCTION(snmprealwalk) { +PHP_FUNCTION(snmprealwalk) +{ php_snmp(INTERNAL_FUNCTION_PARAM_PASSTHRU,3); } /* }}} */ /* {{{ proto bool snmp_get_quick_print(void) Return the current status of quick_print */ -PHP_FUNCTION(snmp_get_quick_print) { +PHP_FUNCTION(snmp_get_quick_print) +{ RETURN_LONG(snmp_get_quick_print() ? 1 : 0); } /* }}} */ /* {{{ proto void snmp_set_quick_print(int quick_print) Return all objects including their respective object id withing the specified one */ -PHP_FUNCTION(snmp_set_quick_print) { +PHP_FUNCTION(snmp_set_quick_print) +{ zval **a1; if (ZEND_NUM_ARGS() != 1 || zend_get_parameters_ex(1, &a1) == FAILURE) { WRONG_PARAM_COUNT; @@ -416,7 +421,8 @@ PHP_FUNCTION(snmp_set_quick_print) { /* {{{ proto int snmpset(string host, string community, string object_id, string type, mixed value [, int timeout [, int retries]]) Set the value of a SNMP object */ -PHP_FUNCTION(snmpset) { +PHP_FUNCTION(snmpset) +{ php_snmp(INTERNAL_FUNCTION_PARAM_PASSTHRU,11); } /* }}} */ diff --git a/ext/standard/base64.c b/ext/standard/base64.c index cf3a4b79a2..5a4674f3ec 100644 --- a/ext/standard/base64.c +++ b/ext/standard/base64.c @@ -151,7 +151,8 @@ unsigned char *php_base64_decode(const unsigned char *str, int length, int *ret_ /* {{{ proto string base64_encode(string str) Encodes string using MIME base64 algorithm */ -PHP_FUNCTION(base64_encode) { +PHP_FUNCTION(base64_encode) +{ pval **str; unsigned char *result; int ret_length; @@ -172,7 +173,8 @@ PHP_FUNCTION(base64_encode) { /* {{{ proto string base64_decode(string str) Decodes string using MIME base64 algorithm */ -PHP_FUNCTION(base64_decode) { +PHP_FUNCTION(base64_decode) +{ pval **str; unsigned char *result; int ret_length; diff --git a/ext/standard/basic_functions.c b/ext/standard/basic_functions.c index f8c8cba25b..6370c5e4b2 100644 --- a/ext/standard/basic_functions.c +++ b/ext/standard/basic_functions.c @@ -2465,7 +2465,7 @@ PHP_FUNCTION(move_uploaded_file) VCWD_UNLINK(Z_STRVAL_PP(new_path)); if (rename(Z_STRVAL_PP(path), Z_STRVAL_PP(new_path))==0) { successful=1; - } else if (php_copy_file(Z_STRVAL_PP(path), Z_STRVAL_PP(new_path))==SUCCESS) { + } else if (php_copy_file(Z_STRVAL_PP(path), Z_STRVAL_PP(new_path) TSRMLS_CC)==SUCCESS) { VCWD_UNLINK(Z_STRVAL_PP(path)); successful=1; } diff --git a/ext/standard/file.c b/ext/standard/file.c index 74257b3043..78a683f5c3 100644 --- a/ext/standard/file.c +++ b/ext/standard/file.c @@ -581,7 +581,7 @@ PHP_FUNCTION(tempnam) d = estrndup(Z_STRVAL_PP(arg1), Z_STRLEN_PP(arg1)); strlcpy(p, Z_STRVAL_PP(arg2), sizeof(p)); - if ((fp = php_open_temporary_file(d, p, &opened_path))) { + if ((fp = php_open_temporary_file(d, p, &opened_path TSRMLS_CC))) { fclose(fp); RETVAL_STRING(opened_path, 0); } else { @@ -1059,7 +1059,8 @@ exit_failed: /* {{{ proto string fgetc(int fp) Get a character from file pointer */ -PHP_FUNCTION(fgetc) { +PHP_FUNCTION(fgetc) +{ pval **arg1; int type; char *buf; @@ -1921,7 +1922,7 @@ PHP_FUNCTION(copy) RETURN_FALSE; } - if (php_copy_file(Z_STRVAL_PP(source), Z_STRVAL_PP(target))==SUCCESS) { + if (php_copy_file(Z_STRVAL_PP(source), Z_STRVAL_PP(target) TSRMLS_CC)==SUCCESS) { RETURN_TRUE; } else { RETURN_FALSE; @@ -1932,24 +1933,24 @@ PHP_FUNCTION(copy) /* {{{ php_copy_file */ -PHPAPI int php_copy_file(char *src, char *dest) +PHPAPI int php_copy_file(char *src, char *dest TSRMLS_DC) { char buffer[8192]; int fd_s,fd_t,read_bytes; int ret = FAILURE; #ifdef PHP_WIN32 - if ((fd_s=VCWD_OPEN((src,O_RDONLY|_O_BINARY)))==-1) { + if ((fd_s=VCWD_OPEN(src, O_RDONLY|_O_BINARY))==-1) { #else - if ((fd_s=VCWD_OPEN((src,O_RDONLY)))==-1) { + if ((fd_s=VCWD_OPEN(src, O_RDONLY))==-1) { #endif php_error(E_WARNING,"Unable to open '%s' for reading: %s", src, strerror(errno)); return FAILURE; } #ifdef PHP_WIN32 - if ((fd_t=VCWD_OPEN((dest,_O_WRONLY|_O_CREAT|_O_TRUNC|_O_BINARY,_S_IREAD|_S_IWRITE)))==-1) { + if ((fd_t=VCWD_OPEN_MODE(dest, _O_WRONLY|_O_CREAT|_O_TRUNC|_O_BINARY, _S_IREAD|_S_IWRITE))==-1) { #else - if ((fd_t=VCWD_CREAT(dest,0777))==-1) { + if ((fd_t=VCWD_CREAT(dest, 0777))==-1) { #endif php_error(E_WARNING,"Unable to create '%s': %s", dest, strerror(errno)); close(fd_s); @@ -2045,7 +2046,8 @@ PHP_FUNCTION(fread) /* {{{ proto array fgetcsv(int fp, int length [, string delimiter]) Get line from file pointer and parse for CSV fields */ -PHP_FUNCTION(fgetcsv) { +PHP_FUNCTION(fgetcsv) +{ char *temp, *tptr, *bptr, *lineEnd; char delimiter = ','; /* allow this to be set as parameter */ diff --git a/ext/standard/file.h b/ext/standard/file.h index cb3bc4b848..b12a72838c 100644 --- a/ext/standard/file.h +++ b/ext/standard/file.h @@ -75,7 +75,7 @@ PHPAPI int php_file_le_fopen(void); PHPAPI int php_file_le_stream(void); PHPAPI int php_file_le_popen(void); PHPAPI int php_file_le_socket(void); -PHPAPI int php_copy_file(char *src, char *dest); +PHPAPI int php_copy_file(char *src, char *dest TSRMLS_DC); #define META_DEF_BUFSIZE 8192 diff --git a/ext/standard/math.c b/ext/standard/math.c index b0676fdaa9..bfdade04ca 100644 --- a/ext/standard/math.c +++ b/ext/standard/math.c @@ -81,7 +81,8 @@ PHP_FUNCTION(ceil) /* {{{ proto double floor(double number) Returns the next lowest integer value from the number */ -PHP_FUNCTION(floor) { +PHP_FUNCTION(floor) +{ zval **value; if (ZEND_NUM_ARGS()!=1||zend_get_parameters_ex(1,&value)==FAILURE) { diff --git a/ext/swf/swf.c b/ext/swf/swf.c index a33f613773..b06eba7fd6 100644 --- a/ext/swf/swf.c +++ b/ext/swf/swf.c @@ -200,7 +200,7 @@ PHP_FUNCTION(swf_openfile) if (strcasecmp("php://stdout", tmpna) == 0) { FILE *fp; - fp = php_open_temporary_file(NULL, "php_swf_stdout", &na); + fp = php_open_temporary_file(NULL, "php_swf_stdout", &na TSRMLS_CC); if (!fp) { free_na = 0; RETURN_FALSE; @@ -215,7 +215,7 @@ PHP_FUNCTION(swf_openfile) } #ifdef VIRTUAL_DIR - if (virtual_filepath(na, &tmpna)) { + if (virtual_filepath(na, &tmpna TSRMLS_CC)) { if (free_na) { efree(na); } diff --git a/ext/vpopmail/php_vpopmail.c b/ext/vpopmail/php_vpopmail.c index 769e269439..74b466f992 100644 --- a/ext/vpopmail/php_vpopmail.c +++ b/ext/vpopmail/php_vpopmail.c @@ -427,7 +427,8 @@ PHP_FUNCTION(vpopmail_add_domain_ex) /* {{{ proto bool vpopmail_del_domain_ex(string domain) Delete a virtual domain */ -PHP_FUNCTION(vpopmail_del_domain_ex) { +PHP_FUNCTION(vpopmail_del_domain_ex) +{ zval **domain; int retval=-1; char *cmd,*escdomain; @@ -469,7 +470,8 @@ PHP_FUNCTION(vpopmail_del_domain_ex) { /* {{{ proto bool vpopmail_add_alias_domain_ex(string olddomain, string newdomain) Add alias to an existing virtual domain */ -PHP_FUNCTION(vpopmail_add_alias_domain_ex) { +PHP_FUNCTION(vpopmail_add_alias_domain_ex) +{ zval **olddomain, **newdomain; int retval; char *cmd,*escolddomain,*escnewdomain; diff --git a/ext/yp/yp.c b/ext/yp/yp.c index 4a5343f0ba..db26404acc 100644 --- a/ext/yp/yp.c +++ b/ext/yp/yp.c @@ -309,7 +309,8 @@ static int php_foreach_cat (int instatus, char *inkey, int inkeylen, char *inval /* {{{ proto array yp_cat(string domain, string map) Return an array containing the entire map */ -PHP_FUNCTION(yp_cat) { +PHP_FUNCTION(yp_cat) +{ pval **domain, **map; struct ypall_callback callback; @@ -343,7 +344,8 @@ PHP_FUNCTION(yp_errno) /* {{{ proto string yp_err_string(int errorcode) Returns the corresponding error string for the given error code */ -PHP_FUNCTION(yp_err_string) { +PHP_FUNCTION(yp_err_string) +{ pval **error; char *string; |