CVS update: php31/sapi

From: Date: Fri, 14 Aug 1998 16:34:29 +0000
Subject: CVS update: php31/sapi
Groups: php.dev 
Request: Send a blank email to php-dev+get-225@lists.php.net to get a copy of this message
Date: Friday August 14, 1998 @ 12:34 Author: shane Update of /repository/php31/sapi In directory asf:/tmp/cvs-serv663/sapi Modified Files: cgi_sapi.c Log Message: fix cgi -h and abort function Index: php31/sapi/cgi_sapi.c diff -c php31/sapi/cgi_sapi.c:2.2 php31/sapi/cgi_sapi.c:2.3 *** php31/sapi/cgi_sapi.c:2.2 Tue Aug 11 14:22:38 1998 --- php31/sapi/cgi_sapi.c Fri Aug 14 12:34:28 1998 *************** *** 48,59 **** int sapi_insert_header(SAPI_GLOBAL_INCLUDE unsigned char *header){ puts(header); ! if(!puts("\015\012"))sapi_info->abort=1; return SUCCESS; } int sapi_send_header(SAPI_GLOBAL_INCLUDE_V){ ! if(!puts("\015\012"))sapi_info->abort=1; return SUCCESS; } --- 48,69 ---- int sapi_insert_header(SAPI_GLOBAL_INCLUDE unsigned char *header){ puts(header); ! if(puts("\015\012")<0){ ! sapi_info->abort=1; ! #if MSVC5 ! OutputDebugString("insert header failed\n"); ! #endif ! } return SUCCESS; } int sapi_send_header(SAPI_GLOBAL_INCLUDE_V){ ! if(puts("\015\012")<0){ ! sapi_info->abort=1; ! #if MSVC5 ! OutputDebugString("send header failed\n"); ! #endif ! } return SUCCESS; } *************** *** 62,78 **** } int sapi_puts(SAPI_GLOBAL_INCLUDE unsigned char *string){ ! if(!puts(string))sapi_info->abort=1; return SUCCESS; } int sapi_putc(SAPI_GLOBAL_INCLUDE unsigned char c){ ! if(!putc(c,stdout))sapi_info->abort=1; return SUCCESS; } int sapi_writeclient(SAPI_GLOBAL_INCLUDE unsigned char *string, int len){ ! if(!fwrite(string,len,1,stdout))sapi_info->abort=1; return SUCCESS; } --- 72,103 ---- } int sapi_puts(SAPI_GLOBAL_INCLUDE unsigned char *string){ ! if(puts(string)<0){ ! sapi_info->abort=1; ! #if MSVC5 ! OutputDebugString("puts failed\n"); ! #endif ! } return SUCCESS; } int sapi_putc(SAPI_GLOBAL_INCLUDE unsigned char c){ ! if(putc(c,stdout)<0){ ! sapi_info->abort=1; ! #if MSVC5 ! OutputDebugString("putc failed\n"); ! #endif ! } return SUCCESS; } int sapi_writeclient(SAPI_GLOBAL_INCLUDE unsigned char *string, int len){ ! if(fwrite(string,len,1,stdout)<(unsigned int)len){ ! sapi_info->abort=1; ! #if MSVC5 ! OutputDebugString("write client (fwrite) failed\n"); ! #endif ! } return SUCCESS; } *************** *** 185,191 **** sapi_info->log=sapi_log; sapi_info->info=sapi_print_info; sapi_info->aborted = sapi_aborted; ! sapi_info->abort = 1; /*page stat info*/ sapi_info->page_uid=0; --- 210,216 ---- sapi_info->log=sapi_log; sapi_info->info=sapi_print_info; sapi_info->aborted = sapi_aborted; ! sapi_info->abort = 0; /*page stat info*/ sapi_info->page_uid=0; *************** *** 258,264 **** prog = "php"; } ! php3_printf("Usage: %s [-q] [-h]" " [-s]" " [-v] [-i] [-f <file>] | " "{<file> [args...]}\n" --- 283,289 ---- prog = "php"; } ! printf("Usage: %s [-q] [-h]" " [-s]" " [-v] [-i] [-f <file>] | " "{<file> [args...]}\n" -- 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

« previous php.dev (#225) next »