]> granicus.if.org Git - php/commitdiff
- TSRMLS_FETCH work
authorZeev Suraski <zeev@php.net>
Sun, 5 Aug 2001 01:43:02 +0000 (01:43 +0000)
committerZeev Suraski <zeev@php.net>
Sun, 5 Aug 2001 01:43:02 +0000 (01:43 +0000)
- whitespace fixes

56 files changed:
ext/db/db.c
ext/dba/dba_cdb.c
ext/dba/dba_dbm.c
ext/dbase/dbase.c
ext/dbase/dbf_head.c
ext/domxml/php_domxml.c
ext/fdf/fdf.c
ext/gd/gd.c
ext/gd/gdttf.c
ext/hyperwave/hw.c
ext/ldap/ldap.c
ext/mnogosearch/php_mnogo.c
ext/notes/php_notes.c
ext/oci8/oci8.c
ext/pdf/pdf.c
ext/pspell/pspell.c
ext/session/mod_files.c
ext/session/session.c
ext/snmp/snmp.c
ext/standard/base64.c
ext/standard/basic_functions.c
ext/standard/file.c
ext/standard/file.h
ext/standard/math.c
ext/swf/swf.c
ext/vpopmail/php_vpopmail.c
ext/yp/yp.c
main/fopen_wrappers.c
main/fopen_wrappers.h
main/main.c
main/output.c
main/php.h
main/php_content_types.c
main/php_ini.c
main/php_logos.c
main/php_open_temporary_file.c
main/php_open_temporary_file.h
main/php_ticks.c
main/rfc1867.c
main/safe_mode.c
main/win95nt.h
sapi/aolserver/aolserver.c
sapi/apache/mod_php4.c
sapi/apache/php_apache.c
sapi/apache/sapi_apache.c
sapi/caudium/caudium.c
sapi/cgi/cgi_main.c
sapi/fastcgi/fastcgi.c
sapi/isapi/php4isapi.c
sapi/isapi/stresstest/stresstest.cpp
sapi/phttpd/phttpd.c
sapi/roxen/roxen.c
sapi/servlet/servlet.c
win32/php4.dsw
win32/php_registry.h
win32/registry.c

index 7cdfe7ae63506525eeed43eaf3a08d614c8277d6..522e3b6466c943aa86744696c9f84e3c9f74afac 100644 (file)
@@ -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);
        }
index 2419a8f5637cabfe1d3fa55d5cfbff593bafa9a9..5515a4516383f2a10b16c7bcc5d1da9599ab4e92 100644 (file)
@@ -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;
index cf087b37e3bc43696dd3ede871deca35cc638e93..9fb9c5e4e7f6091cb14b50be9ae9074e21feaccc 100644 (file)
@@ -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);
 
index 8394720fec3ffe4a56af7d250103bd9c043cf720..e809a1bdbf8442eca83ff20df80b0d629603140f 100644 (file)
@@ -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;
        }
index 45303378793c671e01d903171031f3e52bf8bff8..650960f5e2ed495eaf488935b156e7d5ac7f64a5 100644 (file)
@@ -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;
                }
index 8eeccd12ef66fe23ed9f2570f3889e2597cde49e..af9e2268940b1e17d36b565ff8e9eeba3c0aa552 100644 (file)
@@ -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);
 }
 /* }}} */
index cbe7a1715dd9bb456cf5e934338cca65712e7bc7..43fade2ee0b244ceb33c141d7c4a86295ee0c47e 100644 (file)
@@ -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;
index 6e44cb74f3ad28764f46b5b87e6f72e8b4addfbe..eafac5858dcff05aea86608b771de204ceec58af 100644 (file)
@@ -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
index 0be895fb7b93e67bf6aeaeb95e832c6fe9d3e453..89907c5d28fff432f0931e48259e6991eb093e90 100644 (file)
@@ -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;
        }
index fe1eec534adcef501eedb7095525c517231bd441..c8c67c59f5dd955243212b323fcc936f40079b20 100644 (file)
@@ -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;
index 2ef3c2d16235b30e41e0205079e701f9ce07abfd..3a4cb2bd846f61dac048e6243fa2fbe123a543e1 100644 (file)
@@ -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);
 }
 /* }}} */
index 9efe54cbc78b2c9efc077bf45c79c9b6b43f91e8..f4c0d42758041201471001aa3dd40da7c5e5ae4f 100644 (file)
@@ -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;
index 210107fd8a83f65fc150fce181e9486c29f21b23..4b42040c3816d196b5ea07e1622db970c2ec2bfe 100644 (file)
@@ -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];
index ca915adf188a3a622947876033b07eae7e5bad64..3c17478de0163361468fdb901b6493613f4ac61f 100644 (file)
@@ -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;
                        } 
index cb5c198af19e9412d9c7acf2e37c5f7f249462a1..7274b0e15a669260197840999cc6e529b063dfdc 100644 (file)
@@ -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;
 
index fec700adb8f9bee488f9a76166afd4404b0c9c86..9d0d91593b9e82d3e7c9a8618206d8e308c3daa5 100644 (file)
@@ -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;
index 5ed3e0aa4d5278d604847196b1f1fc2361ae725b..ef5231a73cbb7aa5a3ae9fa0596f4a9adcbd6451 100644 (file)
@@ -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;
index 6c7ab27cd3d382d6f98067db5d3346427a9fec31..d414ac409dae4bd4aefa5760284a39d6c3171b9c 100644 (file)
@@ -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;
index 9998dff0a437bf5eab4c504930877c3b3b3a54f8..6b635b196a228a874f65eeab34e050a69d4d5cb1 100644 (file)
@@ -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);
 }
 /* }}} */
index cf3a4b79a23ced1e1a13297a0d57c85be63b478e..5a4674f3eceebf301f2813ddd8b1a18601bcbb7d 100644 (file)
@@ -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;
index f8c8cba25bd86d663e9e7363f634bfa3eca277b8..6370c5e4b2895d357c98b9eade7af52ea327fd9a 100644 (file)
@@ -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;
        }
index 74257b30436b8998ac47ff0b025a6d61e65fe711..78a683f5c33fe22c542783fccf95408ebbd6e997 100644 (file)
@@ -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 */
 
index cb3bc4b848864dd721c3cecc37932c0efc3e380a..b12a72838c2ca702b9dc3a491558cad7d1ac4744 100644 (file)
@@ -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
 
index b0676fdaa94cf3d2dee33a7e40fd7036ee8c51aa..bfdade04caa9895fa1f1d63e335561f57d8714c3 100644 (file)
@@ -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) {
index a33f613773a5559681e131d4ba926523d088068f..b06eba7fd6155432876c423661d55d3d1b217827 100644 (file)
@@ -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);
                }
index 769e269439bc15a295c112bc92ba2cfd46161ec4..74b466f9927970fd59678003325563fa8522428e 100644 (file)
@@ -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;
index 4a5343f0ba3c499e209fb0c11784eee3cd7089ad..db26404acc877f05b6644ba319e273d00c865cdb 100644 (file)
@@ -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;
 
index 9f642aaf9f1ed9722c475899541286d80cdba83c..b283de1ea497df883285a58d035804d894905079 100644 (file)
@@ -163,7 +163,7 @@ PHPAPI int php_check_specific_open_basedir(char *basedir, char *path TSRMLS_DC)
        }
 
        /* Resolve the real path into resolved_name */
-       if ((expand_filepath(path, resolved_name) != NULL) && (expand_filepath(local_open_basedir, resolved_basedir) != NULL)) {
+       if ((expand_filepath(path, resolved_name TSRMLS_CC) != NULL) && (expand_filepath(local_open_basedir, resolved_basedir TSRMLS_CC) != NULL)) {
                /* Check the path */
 #ifdef PHP_WIN32
                if (strncasecmp(resolved_basedir, resolved_name, strlen(resolved_basedir)) == 0) {
@@ -232,7 +232,7 @@ static FILE *php_fopen_and_set_opened_path(const char *path, char *mode, char **
        }
        fp = VCWD_FOPEN(path, mode);
        if (fp && opened_path) {
-               *opened_path = expand_filepath(path, NULL);
+               *opened_path = expand_filepath(path, NULL TSRMLS_CC);
        }
        return fp;
 }
@@ -350,7 +350,7 @@ PHPAPI int php_fopen_primary_script(zend_file_handle *file_handle TSRMLS_DC)
                return FAILURE;
        }
 
-       file_handle->opened_path = expand_filepath(filename, NULL);
+       file_handle->opened_path = expand_filepath(filename, NULL TSRMLS_CC);
 
     if (!(SG(options) & SAPI_OPTION_NO_CHDIR)) {
                VCWD_CHDIR_FILE(filename);
@@ -539,7 +539,7 @@ static FILE *php_fopen_url_wrapper(const char *path, char *mode, int options, in
                }
        } 
 
-       if (!protocol || !strncasecmp(protocol, "file",n)){
+       if (!protocol || !strncasecmp(protocol, "file", n)){
                *issock = 0;
                
                if(protocol) {
@@ -605,7 +605,7 @@ PHPAPI char *php_strip_url_passwd(char *url)
 
 /* {{{ expand_filepath
  */
-PHPAPI char *expand_filepath(const char *filepath, char *real_path)
+PHPAPI char *expand_filepath(const char *filepath, char *real_path TSRMLS_DC)
 {
        cwd_state new_state;
        char cwd[MAXPATHLEN];
index ae8931d1491314448ea498f6f487bd1fe9b23e2d..b46b60f3b4bedb7874ac3df39a1d162742412e41 100644 (file)
 # define SOCK_CONN_ERR -1
 # define SOCK_RECV_ERR -1
 #endif
-#define SOCK_WRITE(d,s) send(s,d,strlen(d),0)
-#define SOCK_WRITEL(d,l,s) send(s,d,l,0)
+#define SOCK_WRITE(d, s) send(s, d, strlen(d), 0)
+#define SOCK_WRITEL(d, l, s) send(s, d, l, 0)
 #define SOCK_FGETC(s) php_sock_fgetc((s))
-#define SOCK_FGETS(b,l,s) php_sock_fgets((b),(l),(s))
+#define SOCK_FGETS(b, l, s) php_sock_fgets((b), (l), (s))
 #define SOCK_FEOF(sock) php_sock_feof((sock))
-#define SOCK_FREAD(ptr,size,sock) php_sock_fread((ptr),(size),(sock))
+#define SOCK_FREAD(ptr, size, sock) php_sock_fread((ptr), (size), (sock))
 #define SOCK_FCLOSE(s) php_sock_close(s)
 
-#define FP_FGETS(buf,len,sock,fp,issock) \
-       ((issock)?SOCK_FGETS(buf,len,sock):fgets(buf,len,fp))
-#define FP_FREAD(buf,len,sock,fp,issock) \
-       ((issock)?SOCK_FREAD(buf,len,sock):fread(buf,1,len,fp))
-#define FP_FEOF(sock,fp,issock) \
+#define FP_FGETS(buf, len, sock, fp, issock) \
+       ((issock)?SOCK_FGETS(buf, len, sock):fgets(buf, len, fp))
+#define FP_FREAD(buf, len, sock, fp, issock) \
+       ((issock)?SOCK_FREAD(buf, len, sock):fread(buf, 1, len, fp))
+#define FP_FEOF(sock, fp, issock) \
        ((issock)?SOCK_FEOF(sock):feof(fp))
-#define FP_FGETC(sock,fp,issock) \
+#define FP_FGETC(sock, fp, issock) \
        ((issock)?SOCK_FGETC(sock):fgetc(fp))
 
 /* values for issock */
@@ -69,7 +69,7 @@ typedef FILE *(*php_fopen_url_wrapper_t)(const char *, char *, int, int *, int *
 PHPAPI FILE *php_fopen_wrapper(char *filename, char *mode, int options, int *issock, int *socketd, char **opened_path TSRMLS_DC);
 
 PHPAPI int php_fopen_primary_script(zend_file_handle *file_handle TSRMLS_DC);
-PHPAPI char *expand_filepath(const char *filepath, char *real_path);
+PHPAPI char *expand_filepath(const char *filepath, char *real_path TSRMLS_DC);
 
 PHPAPI int php_check_open_basedir(char *path TSRMLS_DC);
 PHPAPI int php_check_specific_open_basedir(char *basedir, char *path TSRMLS_DC);
index 3202b1a85b452a1ed002000cffee746e238f8bc9..ae64e8c91147f1410c8f0a8ecf3f2ae8c7187b16 100644 (file)
@@ -189,7 +189,7 @@ PHP_INI_BEGIN()
        PHP_INI_ENTRY_EX("highlight.keyword",           HL_KEYWORD_COLOR,       PHP_INI_ALL,    NULL,                   php_ini_color_displayer_cb)
        PHP_INI_ENTRY_EX("highlight.string",            HL_STRING_COLOR,        PHP_INI_ALL,    NULL,                   php_ini_color_displayer_cb)
 
-       STD_PHP_INI_BOOLEAN("allow_call_time_pass_reference","1",PHP_INI_SYSTEM|PHP_INI_PERDIR,         OnUpdateBool,   allow_call_time_pass_reference, zend_compiler_globals,  compiler_globals)
+       STD_PHP_INI_BOOLEAN("allow_call_time_pass_reference",   "1",    PHP_INI_SYSTEM|PHP_INI_PERDIR,          OnUpdateBool,   allow_call_time_pass_reference, zend_compiler_globals,  compiler_globals)
        STD_PHP_INI_BOOLEAN("asp_tags",                         "0",            PHP_INI_SYSTEM|PHP_INI_PERDIR,          OnUpdateBool,                   asp_tags,                               zend_compiler_globals,  compiler_globals)
        STD_PHP_INI_BOOLEAN("display_errors",           "1",            PHP_INI_ALL,            OnUpdateBool,                   display_errors,                 php_core_globals,       core_globals)
        STD_PHP_INI_BOOLEAN("display_startup_errors",   "0",    PHP_INI_ALL,            OnUpdateBool,                   display_startup_errors, php_core_globals,       core_globals)
@@ -602,7 +602,7 @@ static void sigchld_handler(int apar)
 {
     while (waitpid(-1, NULL, WNOHANG) > 0)
                ;
-    signal(SIGCHLD,sigchld_handler);   
+    signal(SIGCHLD, sigchld_handler);   
 }
 /* }}} */
 #endif
@@ -616,7 +616,7 @@ int php_request_startup(TSRMLS_D)
        int retval = SUCCESS;
 
 #if PHP_SIGCHILD
-       signal(SIGCHLD,sigchld_handler);
+       signal(SIGCHLD, sigchld_handler);
 #endif
 
        zend_try {
@@ -728,7 +728,7 @@ static int php_body_write_wrapper(const char *str, uint str_length)
  */
 static void core_globals_ctor(php_core_globals *core_globals TSRMLS_DC)
 {
-       memset(core_globals,0,sizeof(*core_globals));
+       memset(core_globals, 0, sizeof(*core_globals));
 }
 /* }}} */
 #endif
@@ -959,10 +959,12 @@ void php_module_shutdown()
        php_shutdown_fopen_wrappers(TSRMLS_C);
        php_shutdown_info_logos();
        UNREGISTER_INI_ENTRIES();
-#ifndef ZTS
+#ifdef ZTS
+       ts_free_thread();
+#else
        zend_ini_shutdown(TSRMLS_C);
-#endif
        shutdown_memory_manager(0, 1);
+#endif
        module_initialized = 0;
 }
 /* }}} */
@@ -1003,7 +1005,7 @@ static inline void php_register_server_variables(TSRMLS_D)
 static int php_hash_environment(TSRMLS_D)
 {
        char *p;
-       unsigned char _gpc_flags[3] = {0,0,0};
+       unsigned char _gpc_flags[3] = {0, 0, 0};
        zend_bool have_variables_order;
        zval *dummy_track_vars_array;
        zend_bool initialized_dummy_track_vars_array=0;
@@ -1200,7 +1202,7 @@ PHPAPI int php_execute_script(zend_file_handle *primary_file TSRMLS_DC)
 
        zend_try {
 #ifdef PHP_WIN32
-               UpdateIniFromRegistry(primary_file->filename);
+               UpdateIniFromRegistry(primary_file->filename TSRMLS_CC);
 #endif
 
                PG(during_request_startup) = 0;
index 4e52d458f467829e949a2af5654726d6889770eb..fc458078798278deb6f52ba0111b4bf38ddcf729 100644 (file)
@@ -173,12 +173,12 @@ PHPAPI void php_end_ob_buffer(zend_bool send_buffer, zend_bool just_flush)
                TSRMLS_FETCH();
 
                ALLOC_INIT_ZVAL(orig_buffer);
-               ZVAL_STRINGL(orig_buffer,OG(active_ob_buffer).buffer,OG(active_ob_buffer).text_length,0);
+               ZVAL_STRINGL(orig_buffer, OG(active_ob_buffer).buffer, OG(active_ob_buffer).text_length, 0);
                orig_buffer->refcount=2;        /* don't let call_user_function() destroy our buffer */
                orig_buffer->is_ref=1;
 
                ALLOC_INIT_ZVAL(z_status);
-               ZVAL_LONG(z_status,status);
+               ZVAL_LONG(z_status, status);
 
                params[0] = &orig_buffer;
                params[1] = &z_status;
@@ -415,7 +415,7 @@ int php_ob_get_buffer(pval *p)
        if (OG(ob_nesting_level)==0) {
                return FAILURE;
        }
-       ZVAL_STRINGL(p,OG(active_ob_buffer).buffer,OG(active_ob_buffer).text_length,1);
+       ZVAL_STRINGL(p, OG(active_ob_buffer).buffer, OG(active_ob_buffer).text_length, 1);
        return SUCCESS;
 }
 /* }}} */
@@ -429,7 +429,7 @@ int php_ob_get_length(pval *p)
        if (OG(ob_nesting_level) == 0) {
                return FAILURE;
        }
-       ZVAL_LONG(p,OG(active_ob_buffer).text_length);
+       ZVAL_LONG(p, OG(active_ob_buffer).text_length);
        return SUCCESS;
 }
 /* }}} */
index 34cdeae6e4c5755b8bb5bfa154896d54d0d5bfa9..aa8395036ad241b85bc9ca88284aa42ec0c2c408 100644 (file)
@@ -113,7 +113,7 @@ char *strtok_r(char *s, const char *delim, char **last);
 typedef unsigned int socklen_t;
 #endif
 
-#define CREATE_MUTEX(a,b)
+#define CREATE_MUTEX(a, b)
 #define SET_MUTEX(a)
 #define FREE_MUTEX(a)
 
@@ -303,29 +303,29 @@ PHPAPI int cfg_get_string(char *varname, char **result);
 
 #if defined(CRAY) || (defined(__arm) && !defined(LINUX))
 #ifdef __STDC__
-#define XtOffset(p_type,field) _Offsetof(p_type,field)
+#define XtOffset(p_type, field) _Offsetof(p_type, field)
 #else
 #ifdef CRAY2
-#define XtOffset(p_type,field) \
+#define XtOffset(p_type, field) \
     (sizeof(int)*((unsigned int)&(((p_type)NULL)->field)))
 
 #else /* !CRAY2 */
 
-#define XtOffset(p_type,field) ((unsigned int)&(((p_type)NULL)->field))
+#define XtOffset(p_type, field) ((unsigned int)&(((p_type)NULL)->field))
 
 #endif /* !CRAY2 */
 #endif /* __STDC__ */
 #else /* ! (CRAY || __arm) */
 
-#define XtOffset(p_type,field) \
+#define XtOffset(p_type, field) \
     ((long) (((char *) (&(((p_type)NULL)->field))) - ((char *) NULL)))
 
 #endif /* !CRAY */
 
 #ifdef offsetof
-#define XtOffsetOf(s_type,field) offsetof(s_type,field)
+#define XtOffsetOf(s_type, field) offsetof(s_type, field)
 #else
-#define XtOffsetOf(s_type,field) XtOffset(s_type*,field)
+#define XtOffsetOf(s_type, field) XtOffset(s_type*, field)
 #endif
 
 PHPAPI PHP_FUNCTION(warn_not_available);
index 80ef9a829031585ba8ab79e8fb1772b6415f9fa7..aaa06e34a01d42bf6f918c6c7ad53e8f7b75ae4f 100644 (file)
@@ -40,7 +40,7 @@ SAPI_POST_READER_FUNC(php_default_post_reader)
        char *data;
 
        if(!SG(request_info).post_data) sapi_read_standard_form_data(TSRMLS_C);
-       data = estrndup(SG(request_info).post_data,SG(request_info).post_data_length);
+       data = estrndup(SG(request_info).post_data, SG(request_info).post_data_length);
        SET_VAR_STRINGL("HTTP_RAW_POST_DATA", data, SG(request_info).post_data_length);
 }
 /* }}} */
index 2d14300b3cfae155ce8f26e233c62df618659724..6e6ca748c17f98aa06dee3cc1a368826d71ab1a6 100644 (file)
@@ -228,7 +228,7 @@ int php_init_config(char *php_ini_path_override)
 #ifdef PHP_WIN32
                default_location = (char *) emalloc(512);
        
-               if (!GetWindowsDirectory(default_location,255)) {
+               if (!GetWindowsDirectory(default_location, 255)) {
                        default_location[0]=0;
                }
                free_default_location=1;
@@ -272,7 +272,7 @@ int php_init_config(char *php_ini_path_override)
                tmp.value.str.len = strlen(php_ini_opened_path);
                tmp.value.str.val = zend_strndup(php_ini_opened_path, tmp.value.str.len);
                tmp.type = IS_STRING;
-               zend_hash_update(&configuration_hash, "cfg_file_path", sizeof("cfg_file_path"),(void *) &tmp,sizeof(zval), NULL);
+               zend_hash_update(&configuration_hash, "cfg_file_path", sizeof("cfg_file_path"), (void *) &tmp, sizeof(zval), NULL);
                efree(php_ini_opened_path);
                php_ini_opened_path = zend_strndup(tmp.value.str.val, tmp.value.str.len);
        }
@@ -321,11 +321,11 @@ zval *cfg_get_entry(char *name, uint name_length)
 
 /* {{{ cfg_get_long
  */
-PHPAPI int cfg_get_long(char *varname,long *result)
+PHPAPI int cfg_get_long(char *varname, long *result)
 {
-       zval *tmp,var;
+       zval *tmp, var;
        
-       if (zend_hash_find(&configuration_hash,varname,strlen(varname)+1,(void **) &tmp)==FAILURE) {
+       if (zend_hash_find(&configuration_hash, varname, strlen(varname)+1, (void **) &tmp)==FAILURE) {
                *result=(long)NULL;
                return FAILURE;
        }
@@ -339,11 +339,11 @@ PHPAPI int cfg_get_long(char *varname,long *result)
 
 /* {{{ cfg_get_double
  */
-PHPAPI int cfg_get_double(char *varname,double *result)
+PHPAPI int cfg_get_double(char *varname, double *result)
 {
-       zval *tmp,var;
+       zval *tmp, var;
        
-       if (zend_hash_find(&configuration_hash,varname,strlen(varname)+1,(void **) &tmp)==FAILURE) {
+       if (zend_hash_find(&configuration_hash, varname, strlen(varname)+1, (void **) &tmp)==FAILURE) {
                *result=(double)0;
                return FAILURE;
        }
@@ -361,7 +361,7 @@ PHPAPI int cfg_get_string(char *varname, char **result)
 {
        zval *tmp;
 
-       if (zend_hash_find(&configuration_hash,varname,strlen(varname)+1,(void **) &tmp)==FAILURE) {
+       if (zend_hash_find(&configuration_hash, varname, strlen(varname)+1, (void **) &tmp)==FAILURE) {
                *result=NULL;
                return FAILURE;
        }
index eb3c523492218525233defa70ea72249611f0715..28329234efc8aaa19f2a7b241ef6c4cbfbcd4ebf 100644 (file)
@@ -73,14 +73,14 @@ int php_info_logos(const char *logo_string TSRMLS_DC)
        char *content_header;
        int len;
 
-       if(FAILURE==zend_hash_find(&phpinfo_logo_hash,(char *) logo_string,strlen(logo_string),(void **)&logo_image))
+       if(FAILURE==zend_hash_find(&phpinfo_logo_hash, (char *) logo_string, strlen(logo_string), (void **)&logo_image))
                return 0;
 
        len=strlen(CONTENT_TYPE_HEADER)+logo_image->mimelen;
        content_header=malloc(len+1);
        if(!content_header) return 0;
-       strcpy(content_header,CONTENT_TYPE_HEADER);
-       strcat(content_header,logo_image->mimetype);
+       strcpy(content_header, CONTENT_TYPE_HEADER);
+       strcat(content_header, logo_image->mimetype);
        sapi_add_header(content_header, len, 1);
        free(content_header);
 
index de4aacc998675aca914083b7658c9ac14764c416..ebbc6211f300cbd4f048131bf40188a55321484c 100644 (file)
@@ -87,7 +87,7 @@
  * SUCH DAMAGE.
  */
 
-static FILE *php_do_open_temporary_file(char *path, const char *pfx, char **opened_path_p)
+static FILE *php_do_open_temporary_file(char *path, const char *pfx, char **opened_path_p TSRMLS_DC)
 {
        char *trailing_slash;
        FILE *fp;
@@ -148,7 +148,7 @@ static FILE *php_do_open_temporary_file(char *path, const char *pfx, char **open
  * This function should do its best to return a file pointer to a newly created
  * unique file, on every platform.
  */
-PHPAPI FILE *php_open_temporary_file(const char *dir, const char *pfx, char **opened_path_p)
+PHPAPI FILE *php_open_temporary_file(const char *dir, const char *pfx, char **opened_path_p TSRMLS_DC)
 {
        static char path_tmp[] = "/tmp";
        FILE *fp;
@@ -162,11 +162,11 @@ PHPAPI FILE *php_open_temporary_file(const char *dir, const char *pfx, char **op
                *opened_path_p = NULL;
        }
 
-       if ((fp=php_do_open_temporary_file((char *) dir, pfx, opened_path_p))) {
+       if ((fp=php_do_open_temporary_file((char *) dir, pfx, opened_path_p TSRMLS_CC))) {
                return fp;
        }
 
-       if ((fp=php_do_open_temporary_file(getenv("TMPDIR"), pfx, opened_path_p))) {
+       if ((fp=php_do_open_temporary_file(getenv("TMPDIR"), pfx, opened_path_p TSRMLS_CC))) {
                return fp;
        }
 #if PHP_WIN32
@@ -175,17 +175,17 @@ PHPAPI FILE *php_open_temporary_file(const char *dir, const char *pfx, char **op
 
                TempPath = (char *) emalloc(MAXPATHLEN);
                if (GetTempPath(MAXPATHLEN, TempPath)) {
-                       fp = php_do_open_temporary_file(TempPath, pfx, opened_path_p);
+                       fp = php_do_open_temporary_file(TempPath, pfx, opened_path_p TSRMLS_CC);
                }
                efree(TempPath);
                return fp;
        }
 #else
-       if ((fp=php_do_open_temporary_file(P_tmpdir, pfx, opened_path_p))) {
+       if ((fp=php_do_open_temporary_file(P_tmpdir, pfx, opened_path_p TSRMLS_CC))) {
                return fp;
        }
 
-       if ((fp=php_do_open_temporary_file(path_tmp, pfx, opened_path_p))) {
+       if ((fp=php_do_open_temporary_file(path_tmp, pfx, opened_path_p TSRMLS_CC))) {
                return fp;
        }
 #endif
index 38c99cf0aac73fbaf175608d4e7066dba0138790..743c7cca6bc894754855fba531046238eb8a1684 100644 (file)
@@ -19,6 +19,6 @@
 #ifndef PHP_OPEN_TEMPORARY_FILE_H
 #define PHP_OPEN_TEMPORARY_FILE_H
 
-PHPAPI FILE *php_open_temporary_file(const char *dir, const char *pfx, char **opened_path_p);
+PHPAPI FILE *php_open_temporary_file(const char *dir, const char *pfx, char **opened_path_p TSRMLS_DC);
 
 #endif /* PHP_OPEN_TEMPORARY_FILE_H */
index da0430cd711351f7fa4581215872ee792c7e2c1f..684524ea8241cdfe47e1bce12bab57924cf3058c 100644 (file)
@@ -53,7 +53,7 @@ PHPAPI void php_remove_tick_function(void (*func)(int))
        TSRMLS_FETCH();
 
        zend_llist_del_element(&PG(tick_functions), func,
-                                                  (int(*)(void*,void*))php_compare_tick_functions);
+                                                  (int(*)(void*, void*))php_compare_tick_functions);
 }
 
 static void php_tick_iterator(void *data, void *arg TSRMLS_DC)
index 6ad499e5e95a4158c7abab9a54ebbbec23dfcd74..e8efe0851d6990f60ad415c984c3fd426ba66deb 100644 (file)
@@ -215,7 +215,7 @@ static void php_mime_split(char *buf, int cnt, char *boundary, zval *array_ptr T
                                        if(is_arr_upload) {
                                                arr_len = strlen(start_arr);
                                                if(arr_index) efree(arr_index);
-                                               arr_index = estrndup(start_arr+1,arr_len-2);    
+                                               arr_index = estrndup(start_arr+1, arr_len-2);   
                                        }
                                } else {
                                        php_error(E_WARNING, "File upload error - no name component in content disposition");
@@ -366,13 +366,13 @@ static void php_mime_split(char *buf, int cnt, char *boundary, zval *array_ptr T
                                }
                                bytes = 0;
 
-                               fp = php_open_temporary_file(PG(upload_tmp_dir), "php", &temp_filename);
+                               fp = php_open_temporary_file(PG(upload_tmp_dir), "php", &temp_filename TSRMLS_CC);
                                if (!fp) {
                                        php_error(E_WARNING, "File upload error - unable to create a temporary file");
                                        SAFE_RETURN;
                                }
                                if ((loc - ptr - 4) > PG(upload_max_filesize)) {
-                                       php_error(E_WARNING, "Max file size of %ld bytes exceeded - file [%s] not saved", PG(upload_max_filesize),namebuf);
+                                       php_error(E_WARNING, "Max file size of %ld bytes exceeded - file [%s] not saved", PG(upload_max_filesize), namebuf);
                                        upload_successful = 0;
                                } else if (max_file_size && ((loc - ptr - 4) > max_file_size)) {
                                        php_error(E_WARNING, "Max file size exceeded - file [%s] not saved", namebuf);
index 675a3d7ab49c974cb27e1d983d1858f0adcf4a8c..f570ca80fc7330411ce90a7be68afd420404b647 100644 (file)
@@ -68,7 +68,7 @@ PHPAPI int php_checkuid(const char *filename, char *fopen_mode, int mode)
         * If given filepath is a URL, allow - safe mode stuff
         * related to URL's is checked in individual functions
      */        
-       if (!strncasecmp(filename,"http://",7) || !strncasecmp(filename,"ftp://",6)) {
+       if (!strncasecmp(filename,"http://", 7) || !strncasecmp(filename,"ftp://", 6)) {
                return 1;
        }
                
@@ -97,11 +97,11 @@ PHPAPI int php_checkuid(const char *filename, char *fopen_mode, int mode)
                }
 
                /* Trim off filename */
-               if ((s = strrchr(path,DEFAULT_SLASH))) {
+               if ((s = strrchr(path, DEFAULT_SLASH))) {
                        *s = '\0';
                }
        } else { /* CHECKUID_ALLOW_ONLY_DIR */
-               s = strrchr(filename,DEFAULT_SLASH);
+               s = strrchr(filename, DEFAULT_SLASH);
 
                if (s) {
                        *s = '\0';
index bc0e83b4b7e66fc6efceb2041321644a89680f32..16412f9f0594a479096e328bd31718fccaeddc67 100644 (file)
@@ -19,7 +19,7 @@ typedef char * caddr_t;
 #define S_IFBLK                _IFBLK
 #define        S_IFLNK         _IFLNK
 #define chdir(path) SetCurrentDirectory(path)
-#define mkdir(a,b)     _mkdir(a)
+#define mkdir(a, b)    _mkdir(a)
 #define rmdir(a)       _rmdir(a)
 #define getpid         _getpid
 #define php_sleep(t)   Sleep(t*1000)
index 6f620a3a9e33f3ecdd13059b3d056f3f0f3b6e46..e7830c36e6f3658015316f2e708b09883c2a0293 100644 (file)
@@ -299,7 +299,7 @@ php_ns_startup(sapi_module_struct *sapi_module)
  * the HTTP header data, so that a script can access these.
  */
 
-#define ADD_STRINGX(name,buf)                                                                          \
+#define ADD_STRINGX(name, buf)                                                                         \
        php_register_variable(name, buf, track_vars_array TSRMLS_CC)
 
 #define ADD_STRING(name)                                                                               \
index c13ce53de834e541e702594656b81365743d8cb6..4265f4aa6ada1bb598aea0e61c83cd09ec05a2ee 100644 (file)
@@ -440,7 +440,7 @@ static void init_request_info(TSRMLS_D)
                tmp = uudecode(r->pool, authorization);
                SG(request_info).auth_user = getword_nulls_nc(r->pool, &tmp, ':');
                if (SG(request_info).auth_user) {
-                       r->connection->user = pstrdup(r->connection->pool,SG(request_info).auth_user);
+                       r->connection->user = pstrdup(r->connection->pool, SG(request_info).auth_user);
                        r->connection->ap_auth_type = "Basic";
                        SG(request_info).auth_user = estrdup(SG(request_info).auth_user);
                }
@@ -596,7 +596,7 @@ static int send_parsed_php(request_rec * r)
         TSRMLS_FETCH();
  
         sprintf(mem_usage,"%u", (int) AG(allocated_memory_peak));
-        ap_table_setn(r->notes, "mod_php_memory_usage", ap_pstrdup(r->pool,mem_usage));
+        ap_table_setn(r->notes, "mod_php_memory_usage", ap_pstrdup(r->pool, mem_usage));
     }
 #endif
 
@@ -889,16 +889,16 @@ module MODULE_VAR_EXPORT php4_module =
        NULL,                                           /* fixups */
        NULL                                            /* logger */
 #if MODULE_MAGIC_NUMBER >= 19970103
-       ,NULL                                           /* header parser */
+       , NULL                                          /* header parser */
 #endif
 #if MODULE_MAGIC_NUMBER >= 19970719
-       ,NULL                                   /* child_init */
+       , NULL                                  /* child_init */
 #endif
 #if MODULE_MAGIC_NUMBER >= 19970728
-       ,php_child_exit_handler         /* child_exit */
+       , php_child_exit_handler                /* child_exit */
 #endif
 #if MODULE_MAGIC_NUMBER >= 19970902
-       ,NULL                                           /* post read-request */
+       , NULL                                          /* post read-request */
 #endif
 };
 /* }}} */
index 681493e86f61727eb4965714857ec0d299d1bb63..6b141c52b427e4fa7072d4df9b09192a0361762d 100644 (file)
@@ -139,26 +139,26 @@ PHP_FUNCTION(apache_child_terminate)
    Get and set Apache request notes */
 PHP_FUNCTION(apache_note)
 {
-       pval **arg_name,**arg_val;
+       pval **arg_name, **arg_val;
        char *note_val;
        int arg_count = ARG_COUNT(ht);
        TSRMLS_FETCH();
 
        if (arg_count<1 || arg_count>2 ||
-               zend_get_parameters_ex(arg_count,&arg_name,&arg_val) ==FAILURE ) {
+               zend_get_parameters_ex(arg_count, &arg_name, &arg_val) ==FAILURE ) {
                WRONG_PARAM_COUNT;
        }
        
        convert_to_string_ex(arg_name);
-       note_val = (char *) table_get(((request_rec *)SG(server_context))->notes,(*arg_name)->value.str.val);
+       note_val = (char *) table_get(((request_rec *)SG(server_context))->notes, (*arg_name)->value.str.val);
        
        if (arg_count == 2) {
                convert_to_string_ex(arg_val);
-               table_set(((request_rec *)SG(server_context))->notes,(*arg_name)->value.str.val,(*arg_val)->value.str.val);
+               table_set(((request_rec *)SG(server_context))->notes, (*arg_name)->value.str.val, (*arg_val)->value.str.val);
        }
 
        if (note_val) {
-               RETURN_STRING(note_val,1);
+               RETURN_STRING(note_val, 1);
        } else {
                RETURN_FALSE;
        }
@@ -205,15 +205,15 @@ PHP_MINFO_FUNCTION(apache)
 #endif
        sprintf(output_buf, "%d", MODULE_MAGIC_NUMBER);
        php_info_print_table_row(2, "Apache API Version", output_buf);
-       sprintf(output_buf, "%s:%u", serv->server_hostname,serv->port);
+       sprintf(output_buf, "%s:%u", serv->server_hostname, serv->port);
        php_info_print_table_row(2, "Hostname:Port", output_buf);
 #if !defined(WIN32) && !defined(WINNT)
-       sprintf(output_buf, "%s(%d)/%d", user_name,(int)user_id,(int)group_id);
+       sprintf(output_buf, "%s(%d)/%d", user_name, (int)user_id, (int)group_id);
        php_info_print_table_row(2, "User/Group", output_buf);
-       sprintf(output_buf, "Per Child: %d<br>Keep Alive: %s<br>Max Per Connection: %d",max_requests_per_child,serv->keep_alive ? "on":"off", serv->keep_alive_max);
+       sprintf(output_buf, "Per Child: %d<br>Keep Alive: %s<br>Max Per Connection: %d", max_requests_per_child, serv->keep_alive ? "on":"off", serv->keep_alive_max);
        php_info_print_table_row(2, "Max Requests", output_buf);
 #endif
-       sprintf(output_buf, "Connection: %d<br>Keep-Alive: %d",serv->timeout,serv->keep_alive_timeout);
+       sprintf(output_buf, "Connection: %d<br>Keep-Alive: %d", serv->timeout, serv->keep_alive_timeout);
        php_info_print_table_row(2, "Timeouts", output_buf);
 #if !defined(WIN32) && !defined(WINNT)
        php_info_print_table_row(2, "Server Root", server_root);
@@ -304,12 +304,12 @@ PHP_FUNCTION(virtual)
        request_rec *rr = NULL;
        TSRMLS_FETCH();
 
-       if (ARG_COUNT(ht) != 1 || zend_get_parameters_ex(1,&filename) == FAILURE) {
+       if (ARG_COUNT(ht) != 1 || zend_get_parameters_ex(1, &filename) == FAILURE) {
                WRONG_PARAM_COUNT;
        }
        convert_to_string_ex(filename);
        
-       if (!(rr = sub_req_lookup_uri ((*filename)->value.str.val,((request_rec *) SG(server_context))))) {
+       if (!(rr = sub_req_lookup_uri ((*filename)->value.str.val, ((request_rec *) SG(server_context))))) {
                php_error(E_WARNING, "Unable to include '%s' - URI lookup failed", (*filename)->value.str.val);
                if (rr) destroy_sub_req (rr);
                RETURN_FALSE;
@@ -355,7 +355,7 @@ PHP_FUNCTION(getallheaders)
                         !strncasecmp(tenv[i].key, "authorization", 13))) {
                        continue;
                }
-               if (add_assoc_string(return_value, tenv[i].key,(tenv[i].val==NULL) ? "" : tenv[i].val, 1)==FAILURE) {
+               if (add_assoc_string(return_value, tenv[i].key, (tenv[i].val==NULL) ? "" : tenv[i].val, 1)==FAILURE) {
                        RETURN_FALSE;
                }
     }
@@ -370,65 +370,65 @@ PHP_FUNCTION(apache_lookup_uri)
        request_rec *rr=NULL;
        TSRMLS_FETCH();
 
-       if (ARG_COUNT(ht) != 1 || zend_get_parameters_ex(1,&filename) == FAILURE) {
+       if (ARG_COUNT(ht) != 1 || zend_get_parameters_ex(1, &filename) == FAILURE) {
                WRONG_PARAM_COUNT;
        }
        convert_to_string_ex(filename);
 
-       if(!(rr = sub_req_lookup_uri((*filename)->value.str.val,((request_rec *) SG(server_context))))) {
-               php_error(E_WARNING, "URI lookup failed",(*filename)->value.str.val);
+       if(!(rr = sub_req_lookup_uri((*filename)->value.str.val, ((request_rec *) SG(server_context))))) {
+               php_error(E_WARNING, "URI lookup failed", (*filename)->value.str.val);
                RETURN_FALSE;
        }
        object_init(return_value);
-       add_property_long(return_value,"status",rr->status);
+       add_property_long(return_value,"status", rr->status);
        if (rr->the_request) {
-               add_property_string(return_value,"the_request",rr->the_request,1);
+               add_property_string(return_value,"the_request", rr->the_request, 1);
        }
        if (rr->status_line) {
-               add_property_string(return_value,"status_line",(char *)rr->status_line,1);              
+               add_property_string(return_value,"status_line", (char *)rr->status_line, 1);            
        }
        if (rr->method) {
-               add_property_string(return_value,"method",(char *)rr->method,1);                
+               add_property_string(return_value,"method", (char *)rr->method, 1);              
        }
        if (rr->content_type) {
-               add_property_string(return_value,"content_type",(char *)rr->content_type,1);
+               add_property_string(return_value,"content_type", (char *)rr->content_type, 1);
        }
        if (rr->handler) {
-               add_property_string(return_value,"handler",(char *)rr->handler,1);              
+               add_property_string(return_value,"handler", (char *)rr->handler, 1);            
        }
        if (rr->uri) {
-               add_property_string(return_value,"uri",rr->uri,1);
+               add_property_string(return_value,"uri", rr->uri, 1);
        }
        if (rr->filename) {
-               add_property_string(return_value,"filename",rr->filename,1);
+               add_property_string(return_value,"filename", rr->filename, 1);
        }
        if (rr->path_info) {
-               add_property_string(return_value,"path_info",rr->path_info,1);
+               add_property_string(return_value,"path_info", rr->path_info, 1);
        }
        if (rr->args) {
-               add_property_string(return_value,"args",rr->args,1);
+               add_property_string(return_value,"args", rr->args, 1);
        }
        if (rr->boundary) {
-               add_property_string(return_value,"boundary",rr->boundary,1);
+               add_property_string(return_value,"boundary", rr->boundary, 1);
        }
-       add_property_long(return_value,"no_cache",rr->no_cache);
-       add_property_long(return_value,"no_local_copy",rr->no_local_copy);
-       add_property_long(return_value,"allowed",rr->allowed);
-       add_property_long(return_value,"sent_bodyct",rr->sent_bodyct);
-       add_property_long(return_value,"bytes_sent",rr->bytes_sent);
-       add_property_long(return_value,"byterange",rr->byterange);
-       add_property_long(return_value,"clength",rr->clength);
+       add_property_long(return_value,"no_cache", rr->no_cache);
+       add_property_long(return_value,"no_local_copy", rr->no_local_copy);
+       add_property_long(return_value,"allowed", rr->allowed);
+       add_property_long(return_value,"sent_bodyct", rr->sent_bodyct);
+       add_property_long(return_value,"bytes_sent", rr->bytes_sent);
+       add_property_long(return_value,"byterange", rr->byterange);
+       add_property_long(return_value,"clength", rr->clength);
 
 #if MODULE_MAGIC_NUMBER >= 19980324
        if (rr->unparsed_uri) {
-               add_property_string(return_value,"unparsed_uri",rr->unparsed_uri,1);
+               add_property_string(return_value,"unparsed_uri", rr->unparsed_uri, 1);
        }
        if(rr->mtime) {
-               add_property_long(return_value,"mtime",rr->mtime);
+               add_property_long(return_value,"mtime", rr->mtime);
        }
 #endif
        if(rr->request_time) {
-               add_property_long(return_value,"request_time",rr->request_time);
+               add_property_long(return_value,"request_time", rr->request_time);
        }
 
        destroy_sub_req(rr);
@@ -445,13 +445,13 @@ PHP_FUNCTION(apache_exec_uri)
        request_rec *rr=NULL;
        TSRMLS_FETCH();
 
-       if (ARG_COUNT(ht) != 1 || zend_get_parameters_ex(1,&filename) == FAILURE) {
+       if (ARG_COUNT(ht) != 1 || zend_get_parameters_ex(1, &filename) == FAILURE) {
                WRONG_PARAM_COUNT;
        }
        convert_to_string_ex(filename);
 
-       if(!(rr = ap_sub_req_lookup_uri((*filename)->value.str.val,((request_rec *) SG(server_context))))) {
-               php_error(E_WARNING, "URI lookup failed",(*filename)->value.str.val);
+       if(!(rr = ap_sub_req_lookup_uri((*filename)->value.str.val, ((request_rec *) SG(server_context))))) {
+               php_error(E_WARNING, "URI lookup failed", (*filename)->value.str.val);
                RETURN_FALSE;
        }
        RETVAL_LONG(ap_run_sub_req(rr));
index f67e4b35fb47ffe6bae84e4c74df3a8f7966eaad..572d46ebffe35eeaf170c8ed65488d34a48dc6e3 100644 (file)
@@ -75,7 +75,7 @@ int apache_php_module_main(request_rec *r, int display_source_mode TSRMLS_DC)
                zend_syntax_highlighter_ini syntax_highlighter_ini;
 
                php_get_highlight_struct(&syntax_highlighter_ini);
-               if (highlight_file(SG(request_info).path_translated,&syntax_highlighter_ini TSRMLS_CC)){
+               if (highlight_file(SG(request_info).path_translated, &syntax_highlighter_ini TSRMLS_CC)){
                        return OK;
                } else {
                        return NOT_FOUND;
index 356a6ee978eb3c838d45dec10cca59ab597c6249..135c2428967ce9520ef7fb64c43672073b87dc54 100644 (file)
@@ -823,7 +823,7 @@ void pike_module_init( void )
   }
   start_new_program(); /* Text */
   pike_add_function("run", f_php_caudium_request_handler,
-                   "function(string,mapping,object,function:void)", 0);
+                   "function(string, mapping, object, function:void)", 0);
   end_class("Interpreter", 0);
 }
 
index c8c366b844c7fccdc82099689935ae483a34b303..b0d6134c7d76b72d59d27f983e5f20d51baa2f66 100644 (file)
@@ -390,7 +390,7 @@ int main(int argc, char *argv[])
 
 #ifdef HAVE_SIGNAL_H
 #if defined(SIGPIPE) && defined(SIG_IGN)
-       signal(SIGPIPE,SIG_IGN); /* ignore SIGPIPE in standalone mode so
+       signal(SIGPIPE, SIG_IGN); /* ignore SIGPIPE in standalone mode so
                                                                that sockets created via fsockopen()
                                                                don't kill PHP if the remote site
                                                                closes it.  in apache|apxs mode apache
@@ -401,7 +401,7 @@ int main(int argc, char *argv[])
 
 
 #ifdef ZTS
-       tsrm_startup(1,1,0, NULL);
+       tsrm_startup(1, 1, 0, NULL);
 #endif
 
        sapi_startup(&cgi_sapi_module);
@@ -718,7 +718,7 @@ any .htaccess restrictions anywhere on your site you can leave doc_root undefine
                                return FAILURE;
                        }
                        file_handle.filename = argv0;
-                       file_handle.opened_path = expand_filepath(argv0, NULL);
+                       file_handle.opened_path = expand_filepath(argv0, NULL TSRMLS_CC);
                } else if (retval == SUCCESS) {
                        /* #!php support */
                        c = fgetc(file_handle.handle.fp);
index 3050bcd6ac5c722c64a1b5ae160add1cc822865c..382d148807b501d627693c72fb7f31bdcc487ac0 100644 (file)
@@ -237,7 +237,7 @@ static void init_request_info( TSRMLS_D )
           char *ptr;
           while( ptr = strrchr(pt,'/') ) {
              *ptr = 0;
-             if ( stat(pt,&st) == 0 && S_ISREG(st.st_mode) ) {
+             if ( stat(pt, &st) == 0 && S_ISREG(st.st_mode) ) {
                 /*
                  * okay, we found the base script!
                  * work out how many chars we had to strip off;
@@ -350,7 +350,7 @@ int main(int argc, char *argv[])
 
 #ifdef HAVE_SIGNAL_H
 #if defined(SIGPIPE) && defined(SIG_IGN)
-       signal(SIGPIPE,SIG_IGN); /* ignore SIGPIPE in standalone mode so
+       signal(SIGPIPE, SIG_IGN); /* ignore SIGPIPE in standalone mode so
                                    that sockets created via fsockopen()
                                    don't kill PHP if the remote site
                                    closes it.  in apache|apxs mode apache
index 145e45cd2652e7c97632a0ac15f9576f2f9d51a4..da0c303ebc10d505f75a4d7d8021b44c745f7a51 100644 (file)
@@ -788,14 +788,14 @@ DWORD WINAPI HttpExtensionProc(LPEXTENSION_CONTROL_BLOCK lpECB)
                                }
 
                                CG(unclean_shutdown)=1;
-                               _snprintf(buf,sizeof(buf)-1,"PHP has encountered a Stack overflow");
+                               _snprintf(buf, sizeof(buf)-1,"PHP has encountered a Stack overflow");
                                php_isapi_report_exception(buf, strlen(buf) TSRMLS_CC);
                        } else if (_exception_code()==EXCEPTION_ACCESS_VIOLATION) {
-                               _snprintf(buf,sizeof(buf)-1,"PHP has encountered an Access Violation at %p",e->ExceptionRecord->ExceptionAddress);
+                               _snprintf(buf, sizeof(buf)-1,"PHP has encountered an Access Violation at %p", e->ExceptionRecord->ExceptionAddress);
                                php_isapi_report_exception(buf, strlen(buf) TSRMLS_CC);
                                my_endthread();
                        } else {
-                               _snprintf(buf,sizeof(buf)-1,"PHP has encountered an Unhandled Exception Code %d at %p",e->ExceptionRecord->ExceptionCode , e->ExceptionRecord->ExceptionAddress);
+                               _snprintf(buf, sizeof(buf)-1,"PHP has encountered an Unhandled Exception Code %d at %p", e->ExceptionRecord->ExceptionCode , e->ExceptionRecord->ExceptionAddress);
                                php_isapi_report_exception(buf, strlen(buf) TSRMLS_CC);
                                my_endthread();
                        }
index 846305ac6c6a537dc186ddade3287b1e6a34814e..34084eee89a4991e434593d9d08509cf91aeb3e2 100644 (file)
@@ -23,8 +23,8 @@
 //
 // Simple wrappers for the heap APIS
 //
-#define xmalloc(s) HeapAlloc(GetProcessHeap(),HEAP_ZERO_MEMORY,(s))
-#define xfree(s)   HeapFree(GetProcessHeap(),0,(s))
+#define xmalloc(s) HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, (s))
+#define xfree(s)   HeapFree(GetProcessHeap(), 0, (s))
 
 //
 // The mandatory exports from the ISAPI DLL
@@ -64,9 +64,9 @@ typedef BOOL (WINAPI *VersionProc)(HSE_VERSION_INFO *) ;
 typedef DWORD (WINAPI *HttpExtProc)(EXTENSION_CONTROL_BLOCK *);
 BOOL WINAPI FillExtensionControlBlock(EXTENSION_CONTROL_BLOCK *, TIsapiContext *) ;
 BOOL WINAPI GetServerVariable(HCONN, LPSTR, LPVOID, LPDWORD );
-BOOL WINAPI ReadClient(HCONN,LPVOID,LPDWORD);
-BOOL WINAPI WriteClient(HCONN,LPVOID,LPDWORD,DWORD);
-BOOL WINAPI ServerSupportFunction(HCONN,DWORD,LPVOID,LPDWORD,LPDWORD);
+BOOL WINAPI ReadClient(HCONN, LPVOID, LPDWORD);
+BOOL WINAPI WriteClient(HCONN, LPVOID, LPDWORD, DWORD);
+BOOL WINAPI ServerSupportFunction(HCONN, DWORD, LPVOID, LPDWORD, LPDWORD);
 VersionProc IsapiGetExtensionVersion;
 HttpExtProc IsapiHttpExtensionProc;
 HSE_VERSION_INFO version_info;
@@ -186,7 +186,7 @@ BOOL ReadGlobalEnvironment(const char *environment)
        DWORD i=0;
        if (fp) {
                char line[2048];
-               while (fgets(line,sizeof(line)-1,fp)) {
+               while (fgets(line, sizeof(line)-1, fp)) {
                        // file.php arg1 arg2 etc.
                        char *p = strchr(line, '=');
                        if (p) {
@@ -209,7 +209,7 @@ BOOL ReadFileList(const char *filelist)
        }
        char line[2048];
        int i=0;
-       while (fgets(line,sizeof(line)-1,fp)) {
+       while (fgets(line, sizeof(line)-1, fp)) {
                // file.php arg1 arg2 etc.
                stripcrlf(line);
                if (strlen(line)>3) {
@@ -298,7 +298,7 @@ BOOL ParseTestFile(const char *path, const char *fn)
        FILE *ft = fopen(tn, "w+");
        FILE *fe = fopen(en, "w+");
        if (fp && ft && fe) {
-               while (fgets(line,sizeof(line)-1,fp)) {
+               while (fgets(line, sizeof(line)-1, fp)) {
                        if (line[0]=='-') {
                                if (_strnicmp(line, "--TEST--", 8)==0) {
                                        parsestate = test;
@@ -371,7 +371,7 @@ BOOL GetTestFiles(const char *path)
        WIN32_FIND_DATA fd;
        memset(&fd, 0, sizeof(WIN32_FIND_DATA));
 
-       _snprintf(FindPath, sizeof(FindPath)-1, "%s\\*.*",path);
+       _snprintf(FindPath, sizeof(FindPath)-1, "%s\\*.*", path);
        HANDLE fh = FindFirstFile(FindPath, &fd);
        if (fh != INVALID_HANDLE_VALUE) {
                do {
@@ -379,7 +379,7 @@ BOOL GetTestFiles(const char *path)
                                !strchr(fd.cFileName, '.')) {
                                // subdirectory, recurse into it
                                char NewFindPath[MAX_PATH];
-                               _snprintf(NewFindPath, sizeof(NewFindPath)-1, "%s\\%s",path, fd.cFileName);
+                               _snprintf(NewFindPath, sizeof(NewFindPath)-1, "%s\\%s", path, fd.cFileName);
                                GetTestFiles(NewFindPath);
                        } else if (strstr(fd.cFileName, ".phpt")) {
                                // got test file, parse it now
@@ -400,12 +400,12 @@ void DeleteTempFiles(const char *mask)
        WIN32_FIND_DATA fd;
        memset(&fd, 0, sizeof(WIN32_FIND_DATA));
 
-       _snprintf(FindPath, sizeof(FindPath)-1, "%s\\%s",temppath, mask);
+       _snprintf(FindPath, sizeof(FindPath)-1, "%s\\%s", temppath, mask);
        HANDLE fh = FindFirstFile(FindPath, &fd);
        if (fh != INVALID_HANDLE_VALUE) {
                do {
                        char NewFindPath[MAX_PATH];
-                       _snprintf(NewFindPath, sizeof(NewFindPath)-1, "%s\\%s",temppath, fd.cFileName);
+                       _snprintf(NewFindPath, sizeof(NewFindPath)-1, "%s\\%s", temppath, fd.cFileName);
                        DeleteFile(NewFindPath);
                        memset(&fd, 0, sizeof(WIN32_FIND_DATA));
                } while (FindNextFile(fh, &fd) != 0);
@@ -469,7 +469,7 @@ int main(int argc, char* argv[])
                    0,
                    NULL 
                );
-               fprintf(stderr,"Error: Dll 'php4isapi.dll' not found -%d\n%s\n", GetLastError(),lpMsgBuf);
+               fprintf(stderr,"Error: Dll 'php4isapi.dll' not found -%d\n%s\n", GetLastError(), lpMsgBuf);
                LocalFree( lpMsgBuf );
                return -1;
        }
@@ -479,12 +479,12 @@ int main(int argc, char* argv[])
 
        IsapiGetExtensionVersion = (VersionProc)GetProcAddress(hDll,"GetExtensionVersion");
        if (!IsapiGetExtensionVersion) {
-               fprintf(stderr,"Can't Get Extension Version %d\n",GetLastError());
+               fprintf(stderr,"Can't Get Extension Version %d\n", GetLastError());
                return -1;
        }
        IsapiHttpExtensionProc = (HttpExtProc)GetProcAddress(hDll,"HttpExtensionProc");
        if (!IsapiHttpExtensionProc) {
-               fprintf(stderr,"Can't Get Extension proc %d\n",GetLastError());
+               fprintf(stderr,"Can't Get Extension proc %d\n", GetLastError());
                return -1;
        }
 
@@ -658,7 +658,7 @@ BOOL WINAPI GetServerVariable(HCONN hConn, LPSTR lpszVariableName,
                rc = value.GetLength();
                strncpy((char *)lpBuffer, value, *lpdwSize-1);
        } else
-               rc = GetEnvironmentVariable(lpszVariableName,(char *)lpBuffer,*lpdwSize) ;
+               rc = GetEnvironmentVariable(lpszVariableName, (char *)lpBuffer, *lpdwSize) ;
 
        if (!rc) { // return of 0 indicates the variable was not found
                SetLastError(ERROR_NO_DATA);
@@ -684,7 +684,7 @@ BOOL WINAPI ReadClient(HCONN hConn, LPVOID lpBuffer, LPDWORD lpdwSize) {
        if (!c) return FALSE;
 
        if (c->in != INVALID_HANDLE_VALUE) 
-               return ReadFile(c->in,lpBuffer,(*lpdwSize), lpdwSize,NULL);
+               return ReadFile(c->in, lpBuffer, (*lpdwSize), lpdwSize, NULL);
 
        return FALSE;
 }
@@ -697,7 +697,7 @@ BOOL WINAPI WriteClient(HCONN hConn, LPVOID lpBuffer, LPDWORD lpdwSize,
        if (!c) return FALSE;
 
        if (c->out != INVALID_HANDLE_VALUE) 
-               return WriteFile(c->out,lpBuffer,*lpdwSize, lpdwSize,NULL);
+               return WriteFile(c->out, lpBuffer, *lpdwSize, lpdwSize, NULL);
 
        return FALSE;
 }
@@ -737,7 +737,7 @@ BOOL WINAPI ServerSupportFunction(HCONN hConn, DWORD dwHSERequest,
                        if (temp) xfree(temp);
 
                        dwBytes = strlen(lpszRespBuf);
-                       bRet = WriteClient(0,lpszRespBuf,&dwBytes,0);
+                       bRet = WriteClient(0, lpszRespBuf, &dwBytes, 0);
                        xfree(lpszRespBuf);
 
                        break;
@@ -761,7 +761,7 @@ BOOL WINAPI ServerSupportFunction(HCONN hConn, DWORD dwHSERequest,
                                        (lpdwSize > 0)?lpvBuffer:0);
                        xfree(temp);
                        dwBytes = strlen(lpszRespBuf);
-                       bRet = WriteClient(0,lpszRespBuf,&dwBytes,0);
+                       bRet = WriteClient(0, lpszRespBuf, &dwBytes, 0);
                        xfree(lpszRespBuf);
                        break;
                default:
@@ -785,11 +785,11 @@ char * MakeDateStr(void){
 
        GetSystemTime(&systime);
 
-       wsprintf(szDate,"%s, %d %s %d %d:%d.%d",DaysofWeek[systime.wDayOfWeek],
+       wsprintf(szDate,"%s, %d %s %d %d:%d.%d", DaysofWeek[systime.wDayOfWeek],
                                                                          systime.wDay,
                                                                          Months[systime.wMonth],
                                                                          systime.wYear,
-                                                                         systime.wHour,systime.wMinute,
+                                                                         systime.wHour, systime.wMinute,
                                                                          systime.wSecond );
 
        return szDate;
@@ -801,7 +801,7 @@ BOOL WINAPI FillExtensionControlBlock(EXTENSION_CONTROL_BLOCK *ECB, TIsapiContex
 
        char * temp;
        ECB->cbSize = sizeof(EXTENSION_CONTROL_BLOCK);
-       ECB->dwVersion = MAKELONG(HSE_VERSION_MINOR,HSE_VERSION_MAJOR);
+       ECB->dwVersion = MAKELONG(HSE_VERSION_MINOR, HSE_VERSION_MAJOR);
        ECB->ConnID = (void *)context;
        //
        // Pointers to the functions the DLL will call.
@@ -831,15 +831,16 @@ BOOL WINAPI FillExtensionControlBlock(EXTENSION_CONTROL_BLOCK *ECB, TIsapiContex
 //
 // Works like _getenv(), but uses win32 functions instead.
 //
-char * GetEnv(LPSTR lpszEnvVar) {
+char *GetEnv(LPSTR lpszEnvVar)
+{
        
-       char *var,dummy;
+       char *var, dummy;
        DWORD dwLen;
 
        if (!lpszEnvVar)
                return "";
        
-       dwLen =GetEnvironmentVariable(lpszEnvVar,&dummy,1);
+       dwLen =GetEnvironmentVariable(lpszEnvVar, &dummy, 1);
 
        if (dwLen == 0)
                return "";
@@ -847,7 +848,7 @@ char * GetEnv(LPSTR lpszEnvVar) {
        var = (char *)xmalloc(dwLen);
        if (!var)
                return "";
-       (void)GetEnvironmentVariable(lpszEnvVar,var,dwLen);
+       (void)GetEnvironmentVariable(lpszEnvVar, var, dwLen);
 
        return var;
 }
index a7fbebcde14cf04706ed46e937ec6192b58bdd7e..cb3b524723b597698b5e4abfcb156b4325992ba0 100644 (file)
@@ -62,7 +62,7 @@ php_phttpd_sapi_ub_write(const char *str, uint str_length)
     int sent_bytes;
        TSRMLS_FETCH();
 
-       sent_bytes = fd_write(PHG(cip)->fd,str,str_length);
+       sent_bytes = fd_write(PHG(cip)->fd, str, str_length);
 
        if (sent_bytes == -1) {
                php_handle_aborted_connection();
@@ -78,7 +78,7 @@ php_phttpd_sapi_header_handler(sapi_header_struct *sapi_header, sapi_headers_str
     char *p;
     TSRMLS_FETCH();
  
-       http_sendheaders(PHG(cip)->fd,PHG(cip), SG(sapi_headers).http_response_code, NULL);
+       http_sendheaders(PHG(cip)->fd, PHG(cip), SG(sapi_headers).http_response_code, NULL);
 
     header_name = sapi_header->header;
     header_content = p = strchr(header_name, ':');
@@ -89,7 +89,7 @@ php_phttpd_sapi_header_handler(sapi_header_struct *sapi_header, sapi_headers_str
             header_content++;
         } while (*header_content == ' ');
 
-               fd_printf(PHG(cip)->fd,"%s: %s\n",header_name,header_content);
+               fd_printf(PHG(cip)->fd,"%s: %s\n", header_name, header_content);
  
         *p = ':';
     }
@@ -194,7 +194,7 @@ static sapi_module_struct phttpd_sapi_module = {
 static void
 php_phttpd_request_ctor(TSRMLS_D TSRMLS_DC)
 {
-       memset(&SG(request_info),0,sizeof(sapi_globals_struct)); /* pfusch! */
+       memset(&SG(request_info), 0, sizeof(sapi_globals_struct)); /* pfusch! */
 
     SG(request_info).query_string = PHG(cip)->hip->request;
     SG(request_info).request_method = PHG(cip)->hip->method;
index bad3621e7d04e37899c88fadddce2a240ca9311e..09ea71c4d3bfd3af8dd494c6d3d0d2a16db5c76a 100644 (file)
@@ -716,7 +716,7 @@ void pike_module_init( void )
   ADD_STORAGE(php_roxen_request);
   set_init_callback(clear_struct);
   pike_add_function("run", f_php_roxen_request_handler,
-                   "function(string,mapping,object,function:int)", 0);
+                   "function(string, mapping, object, function:int)", 0);
   add_program_constant("Interpreter", (php_program = end_program()), 0);
 }
 
index dda106fe4a251b2d3a0ec218930c111401d0ee0a..edfce72b81cec42d820b248fafc2fd642c448089 100644 (file)
@@ -355,7 +355,7 @@ JNIEXPORT void JNICALL Java_net_php_servlet_send
                 * changed, so save it and change it back as quickly as possible
                 * in the hopes that Java doesn't notice.
                 */
-               getcwd(cwd,MAXPATHLEN);
+               getcwd(cwd, MAXPATHLEN);
                retval = php_fopen_primary_script(&file_handle TSRMLS_CC);
                chdir(cwd);
 #endif
@@ -363,7 +363,7 @@ JNIEXPORT void JNICALL Java_net_php_servlet_send
                if (retval == FAILURE) {
                        php_request_shutdown((void *) 0);
                        php_module_shutdown();
-                       ThrowIOException(jenv,file_handle.filename);
+                       ThrowIOException(jenv, file_handle.filename);
                        return;
                }
 
index 25e42c8a464f22646a6f735e8a9eb114ee03bf0f..623a169984be2b65674a69593344c16347bd3e38 100644 (file)
@@ -23,6 +23,9 @@ Package=<5>
 \r
 Package=<4>\r
 {{{\r
+    Begin Project Dependency\r
+    Project_Dep_Name TSRM\r
+    End Project Dependency\r
 }}}\r
 \r
 ###############################################################################\r
@@ -50,6 +53,12 @@ Package=<4>
     Begin Project Dependency\r
     Project_Dep_Name php4dll\r
     End Project Dependency\r
+    Begin Project Dependency\r
+    Project_Dep_Name Zend\r
+    End Project Dependency\r
+    Begin Project Dependency\r
+    Project_Dep_Name TSRM\r
+    End Project Dependency\r
 }}}\r
 \r
 ###############################################################################\r
index 275d89edd2b45c7b98b143c7a1859d288d4282f5..fe7c1fddd5758912aa43fb194d333c3789399016 100644 (file)
@@ -2,6 +2,6 @@
 #define PHP_REGISTRY_H
 
 
-void UpdateIniFromRegistry(char *path);
+void UpdateIniFromRegistry(char *path TSRMLS_DC);
 
 #endif /* PHP_REGISTRY_H */
index 8ae25011b74f5aa9d170668b011e180e71235a40..e36caa94f7aff43f7144a821fba9ba1e9e8bb074 100644 (file)
@@ -1,7 +1,7 @@
 #include "php.h"
 #include "php_ini.h"
 
-void UpdateIniFromRegistry(char *path)
+void UpdateIniFromRegistry(char *path TSRMLS_DC)
 {
        char *p, *orig_path;
        HKEY MainKey;
@@ -11,7 +11,6 @@ void UpdateIniFromRegistry(char *path)
                return;
        }
 
-
        orig_path = path = estrdup(path);
 
        /* Get rid of C:, if exists */