cvs: php4 /ext/mssql php_mssql.c /ext/odbc php_odbc.c /ext/session php_session.h /ext/standard credits.c file.c iptc.c php_var.h var.c /main
main.c output.c php.h php_ini.c php_output.h /sapi/apache php_apache.c
| From: | Sascha Schumann | Date: | Sun, 05 Aug 2001 15:55:43 +0000 |
| Subject: | cvs: php4 /ext/mssql php_mssql.c /ext/odbc php_odbc.c /ext/session php_session.h /ext/standard credits.c file.c iptc.c php_var.h var.c /main main.c output.c php.h php_ini.c php_output.h /sapi/apache php_apache.c |
||
| Groups: | php.cvs | ||
| Request: | Send a blank email to php-cvs+get-6576@lists.php.net to get a copy of this message | ||
sas Sun Aug 5 11:55:43 2001 EDT
Modified files:
/php4/ext/mssql php_mssql.c
/php4/ext/odbc php_odbc.c
/php4/ext/session php_session.h
/php4/ext/standard credits.c file.c iptc.c php_var.h var.c
/php4/main main.c output.c php.h php_ini.c php_output.h
/php4/sapi/apache php_apache.c
Log:
more tsrm cleanup -- output.c is not doing any fetches anymore
Index: php4/ext/mssql/php_mssql.c diff -u php4/ext/mssql/php_mssql.c:1.64 php4/ext/mssql/php_mssql.c:1.65 --- php4/ext/mssql/php_mssql.c:1.64 Tue Jul 31 01:43:59 2001 +++ php4/ext/mssql/php_mssql.c Sun Aug 5 11:55:41 2001 @@ -16,7 +16,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: php_mssql.c,v 1.64 2001/07/31 05:43:59 zeev Exp $ */ +/* $Id: php_mssql.c,v 1.65 2001/08/05 15:55:41 sas Exp $ */ #ifdef COMPILE_DL_MSSQL #define HAVE_MSSQL 1 @@ -103,6 +103,7 @@ static PHP_INI_DISP(display_text_size) { char *value; + TSRMLS_FETCH(); if (type == PHP_INI_DISPLAY_ORIG && ini_entry->modified) { value = ini_entry->orig_value; Index: php4/ext/odbc/php_odbc.c diff -u php4/ext/odbc/php_odbc.c:1.102 php4/ext/odbc/php_odbc.c:1.103 --- php4/ext/odbc/php_odbc.c:1.102 Tue Jul 31 01:44:02 2001 +++ php4/ext/odbc/php_odbc.c Sun Aug 5 11:55:41 2001 @@ -20,7 +20,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: php_odbc.c,v 1.102 2001/07/31 05:44:02 zeev Exp $ */ +/* $Id: php_odbc.c,v 1.103 2001/08/05 15:55:41 sas Exp $ */ #ifdef HAVE_CONFIG_H #include "config.h" @@ -234,6 +234,7 @@ static PHP_INI_DISP(display_link_nums) { char *value; + TSRMLS_FETCH(); if (type == PHP_INI_DISPLAY_ORIG && ini_entry->modified) { value = ini_entry->orig_value; @@ -255,6 +256,7 @@ static PHP_INI_DISP(display_defPW) { char *value; + TSRMLS_FETCH(); if (type == PHP_INI_DISPLAY_ORIG && ini_entry->modified) { value = ini_entry->orig_value; @@ -278,6 +280,7 @@ static PHP_INI_DISP(display_binmode) { char *value; + TSRMLS_FETCH(); if (type == PHP_INI_DISPLAY_ORIG && ini_entry->modified) { value = ini_entry->orig_value; @@ -305,6 +308,7 @@ static PHP_INI_DISP(display_lrl) { char *value; + TSRMLS_FETCH(); if (type == PHP_INI_DISPLAY_ORIG && ini_entry->modified) { value = ini_entry->orig_value; Index: php4/ext/session/php_session.h diff -u php4/ext/session/php_session.h:1.49 php4/ext/session/php_session.h:1.50 --- php4/ext/session/php_session.h:1.49 Sun Aug 5 11:29:37 2001 +++ php4/ext/session/php_session.h Sun Aug 5 11:55:41 2001 @@ -146,7 +146,7 @@ #ifdef TRANS_SID void session_adapt_uris(const char *, size_t, char **, size_t * TSRMLS_DC); void session_adapt_url(const char *, size_t, char **, size_t * TSRMLS_DC); -void session_adapt_flush(int (*)(const char *, uint) TSRMLS_DC); +void session_adapt_flush(int (*)(const char *, uint TSRMLS_DC) TSRMLS_DC); #else #define session_adapt_uris(a,b,c,d) do { } while(0) #define session_adapt_url(a,b,c,d) do { } while(0) Index: php4/ext/standard/credits.c diff -u php4/ext/standard/credits.c:1.10 php4/ext/standard/credits.c:1.11 --- php4/ext/standard/credits.c:1.10 Mon Jul 9 14:54:59 2001 +++ php4/ext/standard/credits.c Sun Aug 5 11:55:42 2001 @@ -17,7 +17,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: credits.c,v 1.10 2001/07/09 18:54:59 andrei Exp $ */ +/* $Id: credits.c,v 1.11 2001/08/05 15:55:42 sas Exp $ */ #include "php.h" #include "info.h" @@ -28,6 +28,8 @@ */ PHPAPI void php_print_credits(int flag) { + TSRMLS_FETCH(); + if (flag & PHP_CREDITS_FULLPAGE) { PUTS("<html><head><title>PHP Credits</title></head><body>\n"); } Index: php4/ext/standard/file.c diff -u php4/ext/standard/file.c:1.179 php4/ext/standard/file.c:1.180 --- php4/ext/standard/file.c:1.179 Sat Aug 4 21:42:41 2001 +++ php4/ext/standard/file.c Sun Aug 5 11:55:42 2001 @@ -21,7 +21,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: file.c,v 1.179 2001/08/05 01:42:41 zeev Exp $ */ +/* $Id: file.c,v 1.180 2001/08/05 15:55:42 sas Exp $ */ /* Synced with php 3.0 revision 1.218 1999-06-16 [ssb] */ @@ -1547,7 +1547,7 @@ /* }}} */ /* {{{ php_passthru_fd */ -static size_t php_passthru_fd(int socketd, FILE *fp, int issock) +static size_t php_passthru_fd(int socketd, FILE *fp, int issock TSRMLS_DC) { size_t bcount = 0; int ready = 0; @@ -1651,7 +1651,7 @@ rsrc_id = ZEND_REGISTER_RESOURCE(NULL,fp,php_file_le_fopen()); } - size = php_passthru_fd(socketd, fp, issock); + size = php_passthru_fd(socketd, fp, issock TSRMLS_CC); zend_list_delete(rsrc_id); @@ -1710,7 +1710,7 @@ socketd=*(int*)what; } - size = php_passthru_fd(socketd, (FILE*) what, issock); + size = php_passthru_fd(socketd, (FILE*) what, issock TSRMLS_CC); zend_list_delete((*arg1)->value.lval); Index: php4/ext/standard/iptc.c diff -u php4/ext/standard/iptc.c:1.31 php4/ext/standard/iptc.c:1.32 --- php4/ext/standard/iptc.c:1.31 Tue Jul 31 02:28:03 2001 +++ php4/ext/standard/iptc.c Sun Aug 5 11:55:42 2001 @@ -16,7 +16,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: iptc.c,v 1.31 2001/07/31 06:28:03 zeev Exp $ */ +/* $Id: iptc.c,v 1.32 2001/08/05 15:55:42 sas Exp $ */ /* * Functions to parse & compse IPTC data. @@ -75,7 +75,7 @@ /* {{{ php_iptc_put1 */ -static int php_iptc_put1(FILE *fp,int spool,unsigned char c,unsigned char **spoolbuf) +static int php_iptc_put1(FILE *fp,int spool,unsigned char c,unsigned char **spoolbuf TSRMLS_DC) { if (spool > 0) PUTC(c); @@ -88,7 +88,7 @@ /* {{{ php_iptc_get1 */ -static int php_iptc_get1(FILE *fp,int spool,unsigned char **spoolbuf) +static int php_iptc_get1(FILE *fp,int spool,unsigned char **spoolbuf TSRMLS_DC) { int c; char cc; @@ -110,11 +110,11 @@ /* {{{ php_iptc_read_remaining */ -static int php_iptc_read_remaining(FILE *fp,int spool,unsigned char **spoolbuf) +static int php_iptc_read_remaining(FILE *fp,int spool,unsigned char **spoolbuf TSRMLS_DC) { int c; - while ((c = php_iptc_get1(fp,spool,spoolbuf)) != EOF) continue; + while ((c = php_iptc_get1(fp,spool,spoolbuf TSRMLS_CC)) != EOF) continue; return M_EOI; } @@ -122,21 +122,21 @@ /* {{{ php_iptc_skip_variable */ -static int php_iptc_skip_variable(FILE *fp,int spool,unsigned char **spoolbuf) +static int php_iptc_skip_variable(FILE *fp,int spool,unsigned char **spoolbuf TSRMLS_DC) { unsigned int length; int c1,c2; - if ((c1 = php_iptc_get1(fp,spool,spoolbuf)) == EOF) return M_EOI; + if ((c1 = php_iptc_get1(fp,spool,spoolbuf TSRMLS_CC)) == EOF) return M_EOI; - if ((c2 = php_iptc_get1(fp,spool,spoolbuf)) == EOF) return M_EOI; + if ((c2 = php_iptc_get1(fp,spool,spoolbuf TSRMLS_CC)) == EOF) return M_EOI; length = (((unsigned char) c1) << 8) + ((unsigned char) c2); length -= 2; while (length--) - if (php_iptc_get1(fp,spool,spoolbuf) == EOF) return M_EOI; + if (php_iptc_get1(fp,spool,spoolbuf TSRMLS_CC) == EOF) return M_EOI; return 0; } @@ -144,29 +144,29 @@ /* {{{ php_iptc_next_marker */ -static int php_iptc_next_marker(FILE *fp,int spool,unsigned char **spoolbuf) +static int php_iptc_next_marker(FILE *fp,int spool,unsigned char **spoolbuf TSRMLS_DC) { int c; /* skip unimportant stuff */ - c = php_iptc_get1(fp,spool,spoolbuf); + c = php_iptc_get1(fp,spool,spoolbuf TSRMLS_CC); if (c == EOF) return M_EOI; while (c != 0xff) { - if ((c = php_iptc_get1(fp,spool,spoolbuf)) == EOF) + if ((c = php_iptc_get1(fp,spool,spoolbuf TSRMLS_CC)) == EOF) return M_EOI; /* we hit EOF */ } /* get marker byte, swallowing possible padding */ do { - c = php_iptc_get1(fp,0,0); + c = php_iptc_get1(fp,0,0 TSRMLS_CC); if (c == EOF) return M_EOI; /* we hit EOF */ else if (c == 0xff) - php_iptc_put1(fp,spool,(unsigned char)c,spoolbuf); + php_iptc_put1(fp,spool,(unsigned char)c,spoolbuf TSRMLS_CC); } while (c == 0xff); return (unsigned int) c; @@ -232,36 +232,36 @@ } } - if (php_iptc_get1(fp,spool,poi?&poi:0) != 0xFF) { + if (php_iptc_get1(fp,spool,poi?&poi:0 TSRMLS_CC) != 0xFF) { fclose(fp); RETURN_FALSE; } - if (php_iptc_get1(fp,spool,poi?&poi:0) != 0xD8) { + if (php_iptc_get1(fp,spool,poi?&poi:0 TSRMLS_CC) != 0xD8) { fclose(fp); RETURN_FALSE; } while (!done) { - marker = php_iptc_next_marker(fp,spool,poi?&poi:0); + marker = php_iptc_next_marker(fp,spool,poi?&poi:0 TSRMLS_CC); if (marker == M_EOI) { /* EOF */ break; } else if (marker != M_APP13) { - php_iptc_put1(fp,spool,(unsigned char)marker,poi?&poi:0); + php_iptc_put1(fp,spool,(unsigned char)marker,poi?&poi:0 TSRMLS_CC); } switch (marker) { case M_APP13: /* we are going to write a new APP13 marker, so don't output the old one */ - php_iptc_skip_variable(fp,0,0); - php_iptc_read_remaining(fp,spool,poi?&poi:0); + php_iptc_skip_variable(fp,0,0 TSRMLS_CC); + php_iptc_read_remaining(fp,spool,poi?&poi:0 TSRMLS_CC); done = 1; break; case M_APP0: /* APP0 is in each and every JPEG, so when we hit APP0 we insert our new APP13! */ - php_iptc_skip_variable(fp,spool,poi?&poi:0); + php_iptc_skip_variable(fp,spool,poi?&poi:0 TSRMLS_CC); if (len & 1) len++; /* make the length even */ @@ -269,23 +269,23 @@ psheader[ 3 ] = (len+28)&0xff; for (inx = 0; inx < 28; inx++) - php_iptc_put1(fp,spool,psheader[inx],poi?&poi:0); + php_iptc_put1(fp,spool,psheader[inx],poi?&poi:0 TSRMLS_CC); - php_iptc_put1(fp,spool,(unsigned char)(len>>8),poi?&poi:0); - php_iptc_put1(fp,spool,(unsigned char)(len&0xff),poi?&poi:0); + php_iptc_put1(fp,spool,(unsigned char)(len>>8),poi?&poi:0 TSRMLS_CC); + php_iptc_put1(fp,spool,(unsigned char)(len&0xff),poi?&poi:0 TSRMLS_CC); for (inx = 0; inx < len; inx++) - php_iptc_put1(fp,spool,(*iptcdata)->value.str.val[inx],poi?&poi:0); + php_iptc_put1(fp,spool,(*iptcdata)->value.str.val[inx],poi?&poi:0 TSRMLS_CC); break; case M_SOS: /* we hit data, no more marker-inserting can be done! */ - php_iptc_read_remaining(fp,spool,poi?&poi:0); + php_iptc_read_remaining(fp,spool,poi?&poi:0 TSRMLS_CC); done = 1; break; default: - php_iptc_skip_variable(fp,spool,poi?&poi:0); + php_iptc_skip_variable(fp,spool,poi?&poi:0 TSRMLS_CC); break; } } Index: php4/ext/standard/php_var.h diff -u php4/ext/standard/php_var.h:1.10 php4/ext/standard/php_var.h:1.11 --- php4/ext/standard/php_var.h:1.10 Fri Aug 3 03:25:27 2001 +++ php4/ext/standard/php_var.h Sun Aug 5 11:55:42 2001 @@ -16,7 +16,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: php_var.h,v 1.10 2001/08/03 07:25:27 sas Exp $ */ +/* $Id: php_var.h,v 1.11 2001/08/05 15:55:42 sas Exp $ */ #ifndef PHP_VAR_H #define PHP_VAR_H @@ -27,7 +27,7 @@ PHP_FUNCTION(serialize); PHP_FUNCTION(unserialize); -void php_var_dump(zval **struc, int level); +void php_var_dump(zval **struc, int level TSRMLS_DC); /* typdef HashTable php_serialize_data_t; */ #define php_serialize_data_t HashTable Index: php4/ext/standard/var.c diff -u php4/ext/standard/var.c:1.108 php4/ext/standard/var.c:1.109 --- php4/ext/standard/var.c:1.108 Sat Aug 4 13:29:54 2001 +++ php4/ext/standard/var.c Sun Aug 5 11:55:42 2001 @@ -18,7 +18,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: var.c,v 1.108 2001/08/04 17:29:54 thies Exp $ */ +/* $Id: var.c,v 1.109 2001/08/05 15:55:42 sas Exp $ */ /* {{{ includes @@ -42,6 +42,7 @@ static int php_array_element_dump(zval **zv, int num_args, va_list args, zend_hash_key *hash_key) { int level; + TSRMLS_FETCH(); level = va_arg(args, int); @@ -50,11 +51,11 @@ } else { /* string key */ php_printf("%*c[\"%s\"]=>\n", level + 1, ' ', hash_key->arKey); } - php_var_dump(zv, level + 2); + php_var_dump(zv, level + 2 TSRMLS_CC); return 0; } -void php_var_dump(zval **struc, int level) +void php_var_dump(zval **struc, int level TSRMLS_DC) { HashTable *myht; @@ -131,7 +132,7 @@ } for (i=0; i<argc; i++) - php_var_dump(args[i], 1); + php_var_dump(args[i], 1 TSRMLS_CC); efree(args); } @@ -366,7 +367,7 @@ } /* }}} */ -/* {{{ php_var_dump */ +/* {{{ php_var_unserialize */ PHPAPI int php_var_unserialize(zval **rval, const char **p, const char *max, HashTable *var_hash) { Index: php4/main/main.c diff -u php4/main/main.c:1.396 php4/main/main.c:1.397 --- php4/main/main.c:1.396 Sun Aug 5 11:29:39 2001 +++ php4/main/main.c Sun Aug 5 11:55:42 2001 @@ -18,7 +18,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: main.c,v 1.396 2001/08/05 15:29:39 sas Exp $ */ +/* $Id: main.c,v 1.397 2001/08/05 15:55:42 sas Exp $ */ /* {{{ includes */ @@ -306,6 +306,7 @@ wrapper for modules to use PHPWRITE */ PHPAPI int php_write(void *buf, uint size) { + TSRMLS_FETCH(); return PHPWRITE(buf, size); } /* }}} */ @@ -318,6 +319,7 @@ int ret; char buffer[PRINTF_BUFFER_SIZE]; int size; + TSRMLS_FETCH(); va_start(args, format); size = vsnprintf(buffer, sizeof(buffer), format, args); @@ -719,7 +721,8 @@ */ static int php_body_write_wrapper(const char *str, uint str_length) { - return php_body_write(str, str_length); + TSRMLS_FETCH(); + return php_body_write(str, str_length TSRMLS_CC); } /* }}} */ Index: php4/main/output.c diff -u php4/main/output.c:1.72 php4/main/output.c:1.73 --- php4/main/output.c:1.72 Sun Aug 5 11:29:40 2001 +++ php4/main/output.c Sun Aug 5 11:55:43 2001 @@ -17,7 +17,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: output.c,v 1.72 2001/08/05 15:29:40 sas Exp $ */ +/* $Id: output.c,v 1.73 2001/08/05 15:55:43 sas Exp $ */ #include "php.h" #include "ext/standard/head.h" @@ -95,15 +95,13 @@ } -PHPAPI int php_body_write(const char *str, uint str_length) +PHPAPI int php_body_write(const char *str, uint str_length TSRMLS_DC) { - TSRMLS_FETCH(); return OG(php_body_write)(str, str_length TSRMLS_CC); } -PHPAPI int php_header_write(const char *str, uint str_length) +PHPAPI int php_header_write(const char *str, uint str_length TSRMLS_DC) { - TSRMLS_FETCH(); if (OG(disable_output)) { return 0; } else { Index: php4/main/php.h diff -u php4/main/php.h:1.146 php4/main/php.h:1.147 --- php4/main/php.h:1.146 Sat Aug 4 21:42:44 2001 +++ php4/main/php.h Sun Aug 5 11:55:43 2001 @@ -17,7 +17,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: php.h,v 1.146 2001/08/05 01:42:44 zeev Exp $ */ +/* $Id: php.h,v 1.147 2001/08/05 15:55:43 sas Exp $ */ #ifndef PHP_H #define PHP_H @@ -274,12 +274,12 @@ /* Output support */ #include "main/php_output.h" -#define PHPWRITE(str, str_len) php_body_write((str), (str_len)) -#define PUTS(str) php_body_write((str), strlen((str))) -#define PUTC(c) (php_body_write(&(c), 1), (c)) -#define PHPWRITE_H(str, str_len) php_header_write((str), (str_len)) -#define PUTS_H(str) php_header_write((str), strlen((str))) -#define PUTC_H(c) (php_header_write(&(c), 1), (c)) +#define PHPWRITE(str, str_len) php_body_write((str), (str_len) TSRMLS_CC) +#define PUTS(str) php_body_write((str), strlen((str)) TSRMLS_CC) +#define PUTC(c) (php_body_write(&(c), 1 TSRMLS_CC), (c)) +#define PHPWRITE_H(str, str_len) php_header_write((str), (str_len) TSRMLS_CC) +#define PUTS_H(str) php_header_write((str), strlen((str)) TSRMLS_CC) +#define PUTC_H(c) (php_header_write(&(c), 1 TSRMLS_CC), (c)) #ifdef ZTS #define VIRTUAL_DIR Index: php4/main/php_ini.c diff -u php4/main/php_ini.c:1.68 php4/main/php_ini.c:1.69 --- php4/main/php_ini.c:1.68 Sat Aug 4 21:42:44 2001 +++ php4/main/php_ini.c Sun Aug 5 11:55:43 2001 @@ -69,6 +69,7 @@ if(esc_html) { zend_html_puts(display_string, display_string_length); } else { + TSRMLS_FETCH(); PHPWRITE(display_string, display_string_length); } } Index: php4/main/php_output.h diff -u php4/main/php_output.h:1.29 php4/main/php_output.h:1.30 --- php4/main/php_output.h:1.29 Sun Aug 5 11:29:40 2001 +++ php4/main/php_output.h Sun Aug 5 11:55:43 2001 @@ -16,7 +16,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: php_output.h,v 1.29 2001/08/05 15:29:40 sas Exp $ */ +/* $Id: php_output.h,v 1.30 2001/08/05 15:55:43 sas Exp $ */ #ifndef PHP_OUTPUT_H #define PHP_OUTPUT_H @@ -29,8 +29,8 @@ PHPAPI void php_output_activate(TSRMLS_D); PHPAPI void php_output_set_status(zend_bool status TSRMLS_DC); void php_output_register_constants(TSRMLS_D); -PHPAPI int php_body_write(const char *str, uint str_length); -PHPAPI int php_header_write(const char *str, uint str_length); +PHPAPI int php_body_write(const char *str, uint str_length TSRMLS_DC); +PHPAPI int php_header_write(const char *str, uint str_length TSRMLS_DC); PHPAPI int php_start_ob_buffer(zval *output_handler, uint chunk_size TSRMLS_DC); PHPAPI void php_end_ob_buffer(zend_bool send_buffer, zend_bool just_flush TSRMLS_DC); PHPAPI void php_end_ob_buffers(zend_bool send_buffer TSRMLS_DC); Index: php4/sapi/apache/php_apache.c diff -u php4/sapi/apache/php_apache.c:1.42 php4/sapi/apache/php_apache.c:1.43 --- php4/sapi/apache/php_apache.c:1.42 Sun Aug 5 11:29:41 2001 +++ php4/sapi/apache/php_apache.c Sun Aug 5 11:55:43 2001 @@ -17,7 +17,7 @@ | David Sklar <sklar@student.net> | +----------------------------------------------------------------------+ */ -/* $Id: php_apache.c,v 1.42 2001/08/05 15:29:41 sas Exp $ */ +/* $Id: php_apache.c,v 1.43 2001/08/05 15:55:43 sas Exp $ */ #define NO_REGEX_EXTRA_H @@ -182,6 +182,7 @@ extern char *user_name; extern gid_t group_id; extern int max_requests_per_child; + TSRMLS_FETCH(); serv = ((request_rec *) SG(server_context))->server; @@ -241,7 +242,6 @@ array_header *arr; table_entry *elts; request_rec *r; - TSRMLS_FETCH(); r = ((request_rec *) SG(server_context)); arr = table_elts(r->subprocess_env); @@ -261,7 +261,6 @@ table_entry *env; int i; request_rec *r; - TSRMLS_FETCH(); r = ((request_rec *) SG(server_context)); SECTION("HTTP Headers Information");
Index: php4/ext/mssql/php_mssql.c diff -u php4/ext/mssql/php_mssql.c:1.64 php4/ext/mssql/php_mssql.c:1.65 --- php4/ext/mssql/php_mssql.c:1.64 Tue Jul 31 01:43:59 2001 +++ php4/ext/mssql/php_mssql.c Sun Aug 5 11:55:41 2001 @@ -16,7 +16,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: php_mssql.c,v 1.64 2001/07/31 05:43:59 zeev Exp $ */ +/* $Id: php_mssql.c,v 1.65 2001/08/05 15:55:41 sas Exp $ */ #ifdef COMPILE_DL_MSSQL #define HAVE_MSSQL 1 @@ -103,6 +103,7 @@ static PHP_INI_DISP(display_text_size) { char *value; + TSRMLS_FETCH(); if (type == PHP_INI_DISPLAY_ORIG && ini_entry->modified) { value = ini_entry->orig_value; Index: php4/ext/odbc/php_odbc.c diff -u php4/ext/odbc/php_odbc.c:1.102 php4/ext/odbc/php_odbc.c:1.103 --- php4/ext/odbc/php_odbc.c:1.102 Tue Jul 31 01:44:02 2001 +++ php4/ext/odbc/php_odbc.c Sun Aug 5 11:55:41 2001 @@ -20,7 +20,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: php_odbc.c,v 1.102 2001/07/31 05:44:02 zeev Exp $ */ +/* $Id: php_odbc.c,v 1.103 2001/08/05 15:55:41 sas Exp $ */ #ifdef HAVE_CONFIG_H #include "config.h" @@ -234,6 +234,7 @@ static PHP_INI_DISP(display_link_nums) { char *value; + TSRMLS_FETCH(); if (type == PHP_INI_DISPLAY_ORIG && ini_entry->modified) { value = ini_entry->orig_value; @@ -255,6 +256,7 @@ static PHP_INI_DISP(display_defPW) { char *value; + TSRMLS_FETCH(); if (type == PHP_INI_DISPLAY_ORIG && ini_entry->modified) { value = ini_entry->orig_value; @@ -278,6 +280,7 @@ static PHP_INI_DISP(display_binmode) { char *value; + TSRMLS_FETCH(); if (type == PHP_INI_DISPLAY_ORIG && ini_entry->modified) { value = ini_entry->orig_value; @@ -305,6 +308,7 @@ static PHP_INI_DISP(display_lrl) { char *value; + TSRMLS_FETCH(); if (type == PHP_INI_DISPLAY_ORIG && ini_entry->modified) { value = ini_entry->orig_value; Index: php4/ext/session/php_session.h diff -u php4/ext/session/php_session.h:1.49 php4/ext/session/php_session.h:1.50 --- php4/ext/session/php_session.h:1.49 Sun Aug 5 11:29:37 2001 +++ php4/ext/session/php_session.h Sun Aug 5 11:55:41 2001 @@ -146,7 +146,7 @@ #ifdef TRANS_SID void session_adapt_uris(const char *, size_t, char **, size_t * TSRMLS_DC); void session_adapt_url(const char *, size_t, char **, size_t * TSRMLS_DC); -void session_adapt_flush(int (*)(const char *, uint) TSRMLS_DC); +void session_adapt_flush(int (*)(const char *, uint TSRMLS_DC) TSRMLS_DC); #else #define session_adapt_uris(a,b,c,d) do { } while(0) #define session_adapt_url(a,b,c,d) do { } while(0) Index: php4/ext/standard/credits.c diff -u php4/ext/standard/credits.c:1.10 php4/ext/standard/credits.c:1.11 --- php4/ext/standard/credits.c:1.10 Mon Jul 9 14:54:59 2001 +++ php4/ext/standard/credits.c Sun Aug 5 11:55:42 2001 @@ -17,7 +17,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: credits.c,v 1.10 2001/07/09 18:54:59 andrei Exp $ */ +/* $Id: credits.c,v 1.11 2001/08/05 15:55:42 sas Exp $ */ #include "php.h" #include "info.h" @@ -28,6 +28,8 @@ */ PHPAPI void php_print_credits(int flag) { + TSRMLS_FETCH(); + if (flag & PHP_CREDITS_FULLPAGE) { PUTS("<html><head><title>PHP Credits</title></head><body>\n"); } Index: php4/ext/standard/file.c diff -u php4/ext/standard/file.c:1.179 php4/ext/standard/file.c:1.180 --- php4/ext/standard/file.c:1.179 Sat Aug 4 21:42:41 2001 +++ php4/ext/standard/file.c Sun Aug 5 11:55:42 2001 @@ -21,7 +21,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: file.c,v 1.179 2001/08/05 01:42:41 zeev Exp $ */ +/* $Id: file.c,v 1.180 2001/08/05 15:55:42 sas Exp $ */ /* Synced with php 3.0 revision 1.218 1999-06-16 [ssb] */ @@ -1547,7 +1547,7 @@ /* }}} */ /* {{{ php_passthru_fd */ -static size_t php_passthru_fd(int socketd, FILE *fp, int issock) +static size_t php_passthru_fd(int socketd, FILE *fp, int issock TSRMLS_DC) { size_t bcount = 0; int ready = 0; @@ -1651,7 +1651,7 @@ rsrc_id = ZEND_REGISTER_RESOURCE(NULL,fp,php_file_le_fopen()); } - size = php_passthru_fd(socketd, fp, issock); + size = php_passthru_fd(socketd, fp, issock TSRMLS_CC); zend_list_delete(rsrc_id); @@ -1710,7 +1710,7 @@ socketd=*(int*)what; } - size = php_passthru_fd(socketd, (FILE*) what, issock); + size = php_passthru_fd(socketd, (FILE*) what, issock TSRMLS_CC); zend_list_delete((*arg1)->value.lval); Index: php4/ext/standard/iptc.c diff -u php4/ext/standard/iptc.c:1.31 php4/ext/standard/iptc.c:1.32 --- php4/ext/standard/iptc.c:1.31 Tue Jul 31 02:28:03 2001 +++ php4/ext/standard/iptc.c Sun Aug 5 11:55:42 2001 @@ -16,7 +16,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: iptc.c,v 1.31 2001/07/31 06:28:03 zeev Exp $ */ +/* $Id: iptc.c,v 1.32 2001/08/05 15:55:42 sas Exp $ */ /* * Functions to parse & compse IPTC data. @@ -75,7 +75,7 @@ /* {{{ php_iptc_put1 */ -static int php_iptc_put1(FILE *fp,int spool,unsigned char c,unsigned char **spoolbuf) +static int php_iptc_put1(FILE *fp,int spool,unsigned char c,unsigned char **spoolbuf TSRMLS_DC) { if (spool > 0) PUTC(c); @@ -88,7 +88,7 @@ /* {{{ php_iptc_get1 */ -static int php_iptc_get1(FILE *fp,int spool,unsigned char **spoolbuf) +static int php_iptc_get1(FILE *fp,int spool,unsigned char **spoolbuf TSRMLS_DC) { int c; char cc; @@ -110,11 +110,11 @@ /* {{{ php_iptc_read_remaining */ -static int php_iptc_read_remaining(FILE *fp,int spool,unsigned char **spoolbuf) +static int php_iptc_read_remaining(FILE *fp,int spool,unsigned char **spoolbuf TSRMLS_DC) { int c; - while ((c = php_iptc_get1(fp,spool,spoolbuf)) != EOF) continue; + while ((c = php_iptc_get1(fp,spool,spoolbuf TSRMLS_CC)) != EOF) continue; return M_EOI; } @@ -122,21 +122,21 @@ /* {{{ php_iptc_skip_variable */ -static int php_iptc_skip_variable(FILE *fp,int spool,unsigned char **spoolbuf) +static int php_iptc_skip_variable(FILE *fp,int spool,unsigned char **spoolbuf TSRMLS_DC) { unsigned int length; int c1,c2; - if ((c1 = php_iptc_get1(fp,spool,spoolbuf)) == EOF) return M_EOI; + if ((c1 = php_iptc_get1(fp,spool,spoolbuf TSRMLS_CC)) == EOF) return M_EOI; - if ((c2 = php_iptc_get1(fp,spool,spoolbuf)) == EOF) return M_EOI; + if ((c2 = php_iptc_get1(fp,spool,spoolbuf TSRMLS_CC)) == EOF) return M_EOI; length = (((unsigned char) c1) << 8) + ((unsigned char) c2); length -= 2; while (length--) - if (php_iptc_get1(fp,spool,spoolbuf) == EOF) return M_EOI; + if (php_iptc_get1(fp,spool,spoolbuf TSRMLS_CC) == EOF) return M_EOI; return 0; } @@ -144,29 +144,29 @@ /* {{{ php_iptc_next_marker */ -static int php_iptc_next_marker(FILE *fp,int spool,unsigned char **spoolbuf) +static int php_iptc_next_marker(FILE *fp,int spool,unsigned char **spoolbuf TSRMLS_DC) { int c; /* skip unimportant stuff */ - c = php_iptc_get1(fp,spool,spoolbuf); + c = php_iptc_get1(fp,spool,spoolbuf TSRMLS_CC); if (c == EOF) return M_EOI; while (c != 0xff) { - if ((c = php_iptc_get1(fp,spool,spoolbuf)) == EOF) + if ((c = php_iptc_get1(fp,spool,spoolbuf TSRMLS_CC)) == EOF) return M_EOI; /* we hit EOF */ } /* get marker byte, swallowing possible padding */ do { - c = php_iptc_get1(fp,0,0); + c = php_iptc_get1(fp,0,0 TSRMLS_CC); if (c == EOF) return M_EOI; /* we hit EOF */ else if (c == 0xff) - php_iptc_put1(fp,spool,(unsigned char)c,spoolbuf); + php_iptc_put1(fp,spool,(unsigned char)c,spoolbuf TSRMLS_CC); } while (c == 0xff); return (unsigned int) c; @@ -232,36 +232,36 @@ } } - if (php_iptc_get1(fp,spool,poi?&poi:0) != 0xFF) { + if (php_iptc_get1(fp,spool,poi?&poi:0 TSRMLS_CC) != 0xFF) { fclose(fp); RETURN_FALSE; } - if (php_iptc_get1(fp,spool,poi?&poi:0) != 0xD8) { + if (php_iptc_get1(fp,spool,poi?&poi:0 TSRMLS_CC) != 0xD8) { fclose(fp); RETURN_FALSE; } while (!done) { - marker = php_iptc_next_marker(fp,spool,poi?&poi:0); + marker = php_iptc_next_marker(fp,spool,poi?&poi:0 TSRMLS_CC); if (marker == M_EOI) { /* EOF */ break; } else if (marker != M_APP13) { - php_iptc_put1(fp,spool,(unsigned char)marker,poi?&poi:0); + php_iptc_put1(fp,spool,(unsigned char)marker,poi?&poi:0 TSRMLS_CC); } switch (marker) { case M_APP13: /* we are going to write a new APP13 marker, so don't output the old one */ - php_iptc_skip_variable(fp,0,0); - php_iptc_read_remaining(fp,spool,poi?&poi:0); + php_iptc_skip_variable(fp,0,0 TSRMLS_CC); + php_iptc_read_remaining(fp,spool,poi?&poi:0 TSRMLS_CC); done = 1; break; case M_APP0: /* APP0 is in each and every JPEG, so when we hit APP0 we insert our new APP13! */ - php_iptc_skip_variable(fp,spool,poi?&poi:0); + php_iptc_skip_variable(fp,spool,poi?&poi:0 TSRMLS_CC); if (len & 1) len++; /* make the length even */ @@ -269,23 +269,23 @@ psheader[ 3 ] = (len+28)&0xff; for (inx = 0; inx < 28; inx++) - php_iptc_put1(fp,spool,psheader[inx],poi?&poi:0); + php_iptc_put1(fp,spool,psheader[inx],poi?&poi:0 TSRMLS_CC); - php_iptc_put1(fp,spool,(unsigned char)(len>>8),poi?&poi:0); - php_iptc_put1(fp,spool,(unsigned char)(len&0xff),poi?&poi:0); + php_iptc_put1(fp,spool,(unsigned char)(len>>8),poi?&poi:0 TSRMLS_CC); + php_iptc_put1(fp,spool,(unsigned char)(len&0xff),poi?&poi:0 TSRMLS_CC); for (inx = 0; inx < len; inx++) - php_iptc_put1(fp,spool,(*iptcdata)->value.str.val[inx],poi?&poi:0); + php_iptc_put1(fp,spool,(*iptcdata)->value.str.val[inx],poi?&poi:0 TSRMLS_CC); break; case M_SOS: /* we hit data, no more marker-inserting can be done! */ - php_iptc_read_remaining(fp,spool,poi?&poi:0); + php_iptc_read_remaining(fp,spool,poi?&poi:0 TSRMLS_CC); done = 1; break; default: - php_iptc_skip_variable(fp,spool,poi?&poi:0); + php_iptc_skip_variable(fp,spool,poi?&poi:0 TSRMLS_CC); break; } } Index: php4/ext/standard/php_var.h diff -u php4/ext/standard/php_var.h:1.10 php4/ext/standard/php_var.h:1.11 --- php4/ext/standard/php_var.h:1.10 Fri Aug 3 03:25:27 2001 +++ php4/ext/standard/php_var.h Sun Aug 5 11:55:42 2001 @@ -16,7 +16,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: php_var.h,v 1.10 2001/08/03 07:25:27 sas Exp $ */ +/* $Id: php_var.h,v 1.11 2001/08/05 15:55:42 sas Exp $ */ #ifndef PHP_VAR_H #define PHP_VAR_H @@ -27,7 +27,7 @@ PHP_FUNCTION(serialize); PHP_FUNCTION(unserialize); -void php_var_dump(zval **struc, int level); +void php_var_dump(zval **struc, int level TSRMLS_DC); /* typdef HashTable php_serialize_data_t; */ #define php_serialize_data_t HashTable Index: php4/ext/standard/var.c diff -u php4/ext/standard/var.c:1.108 php4/ext/standard/var.c:1.109 --- php4/ext/standard/var.c:1.108 Sat Aug 4 13:29:54 2001 +++ php4/ext/standard/var.c Sun Aug 5 11:55:42 2001 @@ -18,7 +18,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: var.c,v 1.108 2001/08/04 17:29:54 thies Exp $ */ +/* $Id: var.c,v 1.109 2001/08/05 15:55:42 sas Exp $ */ /* {{{ includes @@ -42,6 +42,7 @@ static int php_array_element_dump(zval **zv, int num_args, va_list args, zend_hash_key *hash_key) { int level; + TSRMLS_FETCH(); level = va_arg(args, int); @@ -50,11 +51,11 @@ } else { /* string key */ php_printf("%*c[\"%s\"]=>\n", level + 1, ' ', hash_key->arKey); } - php_var_dump(zv, level + 2); + php_var_dump(zv, level + 2 TSRMLS_CC); return 0; } -void php_var_dump(zval **struc, int level) +void php_var_dump(zval **struc, int level TSRMLS_DC) { HashTable *myht; @@ -131,7 +132,7 @@ } for (i=0; i<argc; i++) - php_var_dump(args[i], 1); + php_var_dump(args[i], 1 TSRMLS_CC); efree(args); } @@ -366,7 +367,7 @@ } /* }}} */ -/* {{{ php_var_dump */ +/* {{{ php_var_unserialize */ PHPAPI int php_var_unserialize(zval **rval, const char **p, const char *max, HashTable *var_hash) { Index: php4/main/main.c diff -u php4/main/main.c:1.396 php4/main/main.c:1.397 --- php4/main/main.c:1.396 Sun Aug 5 11:29:39 2001 +++ php4/main/main.c Sun Aug 5 11:55:42 2001 @@ -18,7 +18,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: main.c,v 1.396 2001/08/05 15:29:39 sas Exp $ */ +/* $Id: main.c,v 1.397 2001/08/05 15:55:42 sas Exp $ */ /* {{{ includes */ @@ -306,6 +306,7 @@ wrapper for modules to use PHPWRITE */ PHPAPI int php_write(void *buf, uint size) { + TSRMLS_FETCH(); return PHPWRITE(buf, size); } /* }}} */ @@ -318,6 +319,7 @@ int ret; char buffer[PRINTF_BUFFER_SIZE]; int size; + TSRMLS_FETCH(); va_start(args, format); size = vsnprintf(buffer, sizeof(buffer), format, args); @@ -719,7 +721,8 @@ */ static int php_body_write_wrapper(const char *str, uint str_length) { - return php_body_write(str, str_length); + TSRMLS_FETCH(); + return php_body_write(str, str_length TSRMLS_CC); } /* }}} */ Index: php4/main/output.c diff -u php4/main/output.c:1.72 php4/main/output.c:1.73 --- php4/main/output.c:1.72 Sun Aug 5 11:29:40 2001 +++ php4/main/output.c Sun Aug 5 11:55:43 2001 @@ -17,7 +17,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: output.c,v 1.72 2001/08/05 15:29:40 sas Exp $ */ +/* $Id: output.c,v 1.73 2001/08/05 15:55:43 sas Exp $ */ #include "php.h" #include "ext/standard/head.h" @@ -95,15 +95,13 @@ } -PHPAPI int php_body_write(const char *str, uint str_length) +PHPAPI int php_body_write(const char *str, uint str_length TSRMLS_DC) { - TSRMLS_FETCH(); return OG(php_body_write)(str, str_length TSRMLS_CC); } -PHPAPI int php_header_write(const char *str, uint str_length) +PHPAPI int php_header_write(const char *str, uint str_length TSRMLS_DC) { - TSRMLS_FETCH(); if (OG(disable_output)) { return 0; } else { Index: php4/main/php.h diff -u php4/main/php.h:1.146 php4/main/php.h:1.147 --- php4/main/php.h:1.146 Sat Aug 4 21:42:44 2001 +++ php4/main/php.h Sun Aug 5 11:55:43 2001 @@ -17,7 +17,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: php.h,v 1.146 2001/08/05 01:42:44 zeev Exp $ */ +/* $Id: php.h,v 1.147 2001/08/05 15:55:43 sas Exp $ */ #ifndef PHP_H #define PHP_H @@ -274,12 +274,12 @@ /* Output support */ #include "main/php_output.h" -#define PHPWRITE(str, str_len) php_body_write((str), (str_len)) -#define PUTS(str) php_body_write((str), strlen((str))) -#define PUTC(c) (php_body_write(&(c), 1), (c)) -#define PHPWRITE_H(str, str_len) php_header_write((str), (str_len)) -#define PUTS_H(str) php_header_write((str), strlen((str))) -#define PUTC_H(c) (php_header_write(&(c), 1), (c)) +#define PHPWRITE(str, str_len) php_body_write((str), (str_len) TSRMLS_CC) +#define PUTS(str) php_body_write((str), strlen((str)) TSRMLS_CC) +#define PUTC(c) (php_body_write(&(c), 1 TSRMLS_CC), (c)) +#define PHPWRITE_H(str, str_len) php_header_write((str), (str_len) TSRMLS_CC) +#define PUTS_H(str) php_header_write((str), strlen((str)) TSRMLS_CC) +#define PUTC_H(c) (php_header_write(&(c), 1 TSRMLS_CC), (c)) #ifdef ZTS #define VIRTUAL_DIR Index: php4/main/php_ini.c diff -u php4/main/php_ini.c:1.68 php4/main/php_ini.c:1.69 --- php4/main/php_ini.c:1.68 Sat Aug 4 21:42:44 2001 +++ php4/main/php_ini.c Sun Aug 5 11:55:43 2001 @@ -69,6 +69,7 @@ if(esc_html) { zend_html_puts(display_string, display_string_length); } else { + TSRMLS_FETCH(); PHPWRITE(display_string, display_string_length); } } Index: php4/main/php_output.h diff -u php4/main/php_output.h:1.29 php4/main/php_output.h:1.30 --- php4/main/php_output.h:1.29 Sun Aug 5 11:29:40 2001 +++ php4/main/php_output.h Sun Aug 5 11:55:43 2001 @@ -16,7 +16,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: php_output.h,v 1.29 2001/08/05 15:29:40 sas Exp $ */ +/* $Id: php_output.h,v 1.30 2001/08/05 15:55:43 sas Exp $ */ #ifndef PHP_OUTPUT_H #define PHP_OUTPUT_H @@ -29,8 +29,8 @@ PHPAPI void php_output_activate(TSRMLS_D); PHPAPI void php_output_set_status(zend_bool status TSRMLS_DC); void php_output_register_constants(TSRMLS_D); -PHPAPI int php_body_write(const char *str, uint str_length); -PHPAPI int php_header_write(const char *str, uint str_length); +PHPAPI int php_body_write(const char *str, uint str_length TSRMLS_DC); +PHPAPI int php_header_write(const char *str, uint str_length TSRMLS_DC); PHPAPI int php_start_ob_buffer(zval *output_handler, uint chunk_size TSRMLS_DC); PHPAPI void php_end_ob_buffer(zend_bool send_buffer, zend_bool just_flush TSRMLS_DC); PHPAPI void php_end_ob_buffers(zend_bool send_buffer TSRMLS_DC); Index: php4/sapi/apache/php_apache.c diff -u php4/sapi/apache/php_apache.c:1.42 php4/sapi/apache/php_apache.c:1.43 --- php4/sapi/apache/php_apache.c:1.42 Sun Aug 5 11:29:41 2001 +++ php4/sapi/apache/php_apache.c Sun Aug 5 11:55:43 2001 @@ -17,7 +17,7 @@ | David Sklar <sklar@student.net> | +----------------------------------------------------------------------+ */ -/* $Id: php_apache.c,v 1.42 2001/08/05 15:29:41 sas Exp $ */ +/* $Id: php_apache.c,v 1.43 2001/08/05 15:55:43 sas Exp $ */ #define NO_REGEX_EXTRA_H @@ -182,6 +182,7 @@ extern char *user_name; extern gid_t group_id; extern int max_requests_per_child; + TSRMLS_FETCH(); serv = ((request_rec *) SG(server_context))->server; @@ -241,7 +242,6 @@ array_header *arr; table_entry *elts; request_rec *r; - TSRMLS_FETCH(); r = ((request_rec *) SG(server_context)); arr = table_elts(r->subprocess_env); @@ -261,7 +261,6 @@ table_entry *env; int i; request_rec *r; - TSRMLS_FETCH(); r = ((request_rec *) SG(server_context)); SECTION("HTTP Headers Information");