CVS update: php31/main
| From: | shane | Date: | Fri, 21 Aug 1998 16:52:23 +0000 |
| Subject: | CVS update: php31/main | ||
| Groups: | php.dev | ||
| Request: | Send a blank email to php-dev+get-427@lists.php.net to get a copy of this message | ||
Date: Friday August 21, 1998 @ 12:52
Author: shane
Update of /repository/php31/main
In directory asf:/tmp/cvs-serv28145/main
Modified Files:
main.c
Log Message:
optimize output functions to all go through php3_write
php3_sapi_writeclient was not needed here. Also removed php3_puts and putc
as the defines for PUTS and PUTC in sapi.h cover that.
Index: php31/main/main.c
diff -c php31/main/main.c:2.14 php31/main/main.c:2.15
*** php31/main/main.c:2.14 Fri Aug 21 12:41:05 1998
--- php31/main/main.c Fri Aug 21 12:52:23 1998
***************
*** 29,35 ****
+----------------------------------------------------------------------+
*/
! /* $Id: main.c,v 2.14 1998/08/21 16:41:05 shane Exp $ */
/* #define CRASH_DETECTION */
--- 29,35 ----
+----------------------------------------------------------------------+
*/
! /* $Id: main.c,v 2.15 1998/08/21 16:52:23 shane Exp $ */
/* #define CRASH_DETECTION */
***************
*** 228,243 ****
#define PRINTF_BUFFER_SIZE 1024*4
- PHPAPI int php3_putc(char c)
- {
- return php3_write(&c, 1);
- }
-
- PHPAPI int php3_puts(char *buf)
- {
- return php3_write(buf, strlen(buf));
- }
-
/*wrapper for modules to use PHPWRITE */
PHPAPI int php3_write(void *buf, int size)
{
--- 228,233 ----
***************
*** 252,271 ****
}
- PHPAPI int php3_sapi_writeclient(void *buf, int size)
- {
- /*FIXME we should optimize this to not call tls vars here, we cannot
- use the SAPI_GLOBAL_INCLUDE inside php core! */
- TLS_VARS;
- if (GLOBAL(sapi_rqst)->buffered_output) {
- string_buffer_concat(&GLOBAL(sapi_rqst)->output_buffer, buf, size);
- return size;
- } else {
- return GLOBAL(sapi_rqst)->writeclient(SAPI_GLOBAL_PASS buf,size);
- }
- return FAILURE; /* avoid a compile warning */
- }
-
PHPAPI int php3_printf(const char *format,...)
{
va_list args;
--- 242,247 ----
***************
*** 280,286 ****
/* fix for memory manager shutting down before request is started! */
if(GLOBAL(sapi_rqst)){
#endif
! ret = GLOBAL(sapi_rqst)->writeclient(SAPI_GLOBAL_PASS buffer, size);
#if DEBUG
}
#endif
--- 256,268 ----
/* fix for memory manager shutting down before request is started! */
if(GLOBAL(sapi_rqst)){
#endif
! /*duplicated from php3_write so we can avoid an dditional tls call */
! if (GLOBAL(sapi_rqst)->buffered_output) {
! string_buffer_concat(&GLOBAL(sapi_rqst)->output_buffer, buffer, size);
! ret= size;
! } else {
! ret= GLOBAL(sapi_rqst)->writeclient(SAPI_GLOBAL_PASS buffer,size);
! }
#if DEBUG
}
#endif
***************
*** 1597,1603 ****
is (should be) initialized
*/
sapi_info->send_header(SAPI_GLOBAL_PASS_V);
! php3_puts("IIS Internal Error: Thread could not initialized!");
return SUCCESS;
}
}
--- 1579,1585 ----
is (should be) initialized
*/
sapi_info->send_header(SAPI_GLOBAL_PASS_V);
! PUTS("IIS Internal Error: Thread could not initialized!");
return SUCCESS;
}
}
--
PHP Development Mailing List http://www.php.net/
To unsubscribe send an empty message to php-dev-unsubscribe@lists.php.net
For help: php-dev-help@lists.php.net