CVS update: php31/sapi
| From: | zeev | Date: | Fri, 21 Aug 1998 12:09:22 +0000 |
| Subject: | CVS update: php31/sapi | ||
| Groups: | php.dev | ||
| Request: | Send a blank email to php-dev+get-405@lists.php.net to get a copy of this message | ||
Date: Friday August 21, 1998 @ 8:09
Author: zeev
Update of /repository/php31/sapi
In directory asf:/tmp/cvs-serv25327
Modified Files:
cgi_sapi.c sapi.h
Log Message:
Optimize puts() for dl's
minor indentation fixes
Index: php31/sapi/cgi_sapi.c
diff -c php31/sapi/cgi_sapi.c:2.11 php31/sapi/cgi_sapi.c:2.12
*** php31/sapi/cgi_sapi.c:2.11 Thu Aug 20 23:22:48 1998
--- php31/sapi/cgi_sapi.c Fri Aug 21 08:09:22 1998
***************
*** 1,9 ****
/*
! Server API Abstraction Layer
! functions for CGI
! */
#include <stdio.h>
#include <stdarg.h>
#include "php.h"
--- 1,35 ----
/*
! +----------------------------------------------------------------------+
! | PHP HTML Embedded Scripting Language Version 3.0 |
! +----------------------------------------------------------------------+
! | Copyright (c) 1997,1998 PHP Development Team (See Credits file) |
! +----------------------------------------------------------------------+
! | This program is free software; you can redistribute it and/or modify |
! | it under the terms of one of the following licenses: |
! | |
! | A) the GNU General Public License as published by the Free Software |
! | Foundation; either version 2 of the License, or (at your option) |
! | any later version. |
! | |
! | B) the PHP License as published by the PHP Development Team and |
! | included in the distribution in the file: LICENSE |
! | |
! | This program is distributed in the hope that it will be useful, |
! | but WITHOUT ANY WARRANTY; without even the implied warranty of |
! | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
! | GNU General Public License for more details. |
! | |
! | You should have received a copy of both licenses referred to here. |
! | If you did not, or have any questions about PHP licensing, please |
! | contact core@php.net. |
! +----------------------------------------------------------------------+
! | Authors: Shane Caraveo <shane@caraveo.com> |
! +----------------------------------------------------------------------+
! */
! /* Server API Abstraction Layer: CGI implementation */
!
#include <stdio.h>
#include <stdarg.h>
#include "php.h"
***************
*** 21,37 ****
struct sapi_request_info *sapi_info;
#ifdef THREAD_SAFE
! #define SAPI_FUNC_VARS \
php3_globals_struct *php3_globals=(php3_globals_struct *)php3_globals_var;\
struct sapi_request_info *sapi_info=(struct sapi_request_info *)php3_globals->sapi_rqst
#else
! #define SAPI_FUNC_VARS
! /* for non-thread safe static compiles */
! struct sapi_request_info *sapi_rqst;
#endif
#define module_info NULL
/* sapi functions */
int sapi_readclient(SAPI_GLOBAL_INCLUDE unsigned char *buf, int length)
{
--- 47,63 ----
struct sapi_request_info *sapi_info;
#ifdef THREAD_SAFE
! # define SAPI_FUNC_VARS \
php3_globals_struct *php3_globals=(php3_globals_struct *)php3_globals_var;\
struct sapi_request_info *sapi_info=(struct sapi_request_info *)php3_globals->sapi_rqst
#else
! # define SAPI_FUNC_VARS
! struct sapi_request_info *sapi_rqst; /* for non-thread safe static compiles */
#endif
#define module_info NULL
+
/* sapi functions */
int sapi_readclient(SAPI_GLOBAL_INCLUDE unsigned char *buf, int length)
{
***************
*** 105,112 ****
}
! int sapi_writeclient(SAPI_GLOBAL_INCLUDE unsigned char *string, int len){
! if(fwrite(string,len,1,stdout)<(unsigned int)1){
#if MSVC5
OutputDebugString("write client (fwrite) failed\n");
#endif
--- 131,139 ----
}
! int sapi_writeclient(SAPI_GLOBAL_INCLUDE unsigned char *string, int len)
! {
! if (fwrite(string,len,1,stdout)<(unsigned int)1) {
#if MSVC5
OutputDebugString("write client (fwrite) failed\n");
#endif
***************
*** 380,385 ****
--- 407,413 ----
sapi_info->filename = NULL;
sapi_info->query_string = NULL;
sapi_info->argv0=NULL;
+ sapi_info->buffered_output=0;
/* Make sure we detect we are a cgi - a bit redundancy here,
but the default case is that we have to check only the first one. */
Index: php31/sapi/sapi.h
diff -c php31/sapi/sapi.h:2.6 php31/sapi/sapi.h:2.7
*** php31/sapi/sapi.h:2.6 Thu Aug 20 19:06:43 1998
--- php31/sapi/sapi.h Fri Aug 21 08:09:22 1998
***************
*** 76,81 ****
--- 76,82 ----
int (*writeclient) (SAPI_GLOBAL_INCLUDE unsigned char *, int);
int (*flush) (SAPI_GLOBAL_INCLUDE_V); /*flush writes to client */
void (*log) (SAPI_GLOBAL_INCLUDE char *); /*use server error log */
+ unsigned char buffered_output;
/* signal and thread functions */
void (*blockalarms) (SAPI_GLOBAL_INCLUDE_V); /*signal blocking */
***************
*** 92,98 ****
void (*signal) (SAPI_GLOBAL_INCLUDE int sig, void (__cdecl * func) (int sig, int subcode));
#endif
! /* FIXME these functions need definet work */
void (*_php3_hash_server_env) (SAPI_GLOBAL_INCLUDE_V);
/* so far, apache specific */
void (*register_clean) (SAPI_GLOBAL_INCLUDE void *, void *, void *);
--- 93,99 ----
void (*signal) (SAPI_GLOBAL_INCLUDE int sig, void (__cdecl * func) (int sig, int subcode));
#endif
! /* FIXME these functions need definite work */
void (*_php3_hash_server_env) (SAPI_GLOBAL_INCLUDE_V);
/* so far, apache specific */
void (*register_clean) (SAPI_GLOBAL_INCLUDE void *, void *, void *);
***************
*** 111,117 ****
#endif
#if defined(COMPILE_DL)
! #define PUTS(a) php3_printf("%s",a)
#define PUTC(a) PUTS(a)
#define PHPWRITE(a,n) php3_write((a),(n))
#else
--- 112,118 ----
#endif
#if defined(COMPILE_DL)
! #define PUTS(a) php3_printf(a)
#define PUTC(a) PUTS(a)
#define PHPWRITE(a,n) php3_write((a),(n))
#else
--
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