cvs: /php4 main.c main.h /php4/ext/standard basic_functions.c lcg.c output.c parsedate.y php_filestat.h string.c /php4/ext/xml php_xml.h

From: Date: Sun, 05 Dec 1999 14:17:08 +0000
Subject: cvs: /php4 main.c main.h /php4/ext/standard basic_functions.c lcg.c output.c parsedate.y php_filestat.h string.c /php4/ext/xml php_xml.h
Groups: php.version4 
Request: Send a blank email to php-version4+get-7441@lists.php.net to get a copy of this message
rasmus Sun Dec 5 09:17:08 1999 EDT Modified files: /php4 main.c main.h /php4/ext/standard basic_functions.c lcg.c output.c parsedate.y php_filestat.h string.c /php4/ext/xml php_xml.h Log: More maintainer-mode cleanups Index: php4/main.c diff -u php4/main.c:1.150 php4/main.c:1.151 --- php4/main.c:1.150 Sat Dec 4 14:15:41 1999 +++ php4/main.c Sun Dec 5 09:16:35 1999 @@ -19,7 +19,7 @@ */ -/* $Id: main.c,v 1.150 1999/12/04 19:15:41 sas Exp $ */ +/* $Id: main.c,v 1.151 1999/12/05 14:16:35 rasmus Exp $ */ #include <stdio.h> @@ -793,7 +793,7 @@ sapi_send_headers(); php_end_ob_buffering(SG(request_info).headers_only?0:1); - php3_call_shutdown_functions(); + php_call_shutdown_functions(); php_ini_rshutdown(); Index: php4/main.h diff -u php4/main.h:1.11 php4/main.h:1.12 --- php4/main.h:1.11 Sun Dec 5 05:29:03 1999 +++ php4/main.h Sun Dec 5 09:16:35 1999 @@ -18,7 +18,7 @@ */ -/* $Id: main.h,v 1.11 1999/12/05 10:29:03 ssb Exp $ */ +/* $Id: main.h,v 1.12 1999/12/05 14:16:35 rasmus Exp $ */ #ifndef _MAIN_H @@ -38,7 +38,7 @@ PHPAPI void php_execute_script(zend_file_handle *primary_file CLS_DC ELS_DC PLS_DC); -extern void php3_call_shutdown_functions(void); +extern void php_call_shutdown_functions(void); /* configuration module */ Index: php4/ext/standard/basic_functions.c diff -u php4/ext/standard/basic_functions.c:1.131 php4/ext/standard/basic_functions.c:1.132 --- php4/ext/standard/basic_functions.c:1.131 Sat Dec 4 14:16:03 1999 +++ php4/ext/standard/basic_functions.c Sun Dec 5 09:16:36 1999 @@ -19,6 +19,7 @@ #include "php.h" +#include "main.h" #include "php_ini.h" #include "internal_functions_registry.h" #include "php_standard.h" @@ -77,6 +78,9 @@ /* some prototypes for local functions */ static int user_shutdown_function_dtor(php_shutdown_function_entry *shutdown_function_entry); +pval test_class_get_property(zend_property_reference *property_reference); +int test_class_set_property(zend_property_reference *property_reference, pval *value); +void test_class_call_function(INTERNAL_FUNCTION_PARAMETERS, zend_property_reference *property_reference); function_entry basic_functions[] = { PHP_FE(intval, NULL) @@ -357,7 +361,7 @@ #define M_PI 3.14159265358979323846 #endif -void test_class_startup(); +void test_class_startup(void); PHP_MINIT_FUNCTION(basic) { @@ -1034,7 +1038,7 @@ } -void php3_call_shutdown_functions(void) +void php_call_shutdown_functions(void) { BLS_FETCH(); Index: php4/ext/standard/lcg.c diff -u php4/ext/standard/lcg.c:1.3 php4/ext/standard/lcg.c:1.4 --- php4/ext/standard/lcg.c:1.3 Sun Dec 5 08:41:42 1999 +++ php4/ext/standard/lcg.c Sun Dec 5 09:16:36 1999 @@ -59,8 +59,6 @@ return z * 4.656613e-10; } -static void lcg_init_globals(LCGLS_D); - static void lcg_init_globals(LCGLS_D) { LCG(s1) = 1; Index: php4/ext/standard/output.c diff -u php4/ext/standard/output.c:1.6 php4/ext/standard/output.c:1.7 --- php4/ext/standard/output.c:1.6 Sun Nov 28 15:38:44 1999 +++ php4/ext/standard/output.c Sun Dec 5 09:16:36 1999 @@ -30,12 +30,14 @@ static int php_b_body_write(const char *str, uint str_length); static void php_ob_init(uint initial_size, uint block_size); -static void php_ob_destroy(); +static void php_ob_destroy(void); static void php_ob_append(const char *text, uint text_length); +#if 0 static void php_ob_prepend(const char *text, uint text_length); -static inline void php_ob_send(); +#endif +static inline void php_ob_send(void); -void php_start_ob_buffering(); +void php_start_ob_buffering(void); void php_end_ob_buffering(int send_buffer); int php_ob_get_buffer(pval *p); @@ -58,7 +60,7 @@ #define OLS_FETCH() php_output_globals *output_globals = ts_resource(output_globals_id) int output_globals_id; #else -#define OLS_D +#define OLS_D void #define OLS_C #define OG(v) (output_globals.v) #define OLS_FETCH() @@ -188,7 +190,7 @@ * Output buffering - implementation */ -static inline void php_ob_allocate() +static inline void php_ob_allocate(void) { OLS_FETCH(); @@ -240,8 +242,8 @@ memcpy(target, text, text_length); target[text_length]=0; } - +#if 0 static void php_ob_prepend(const char *text, uint text_length) { char *p, *start; @@ -260,7 +262,7 @@ memcpy(OG(ob_buffer), text, text_length); OG(ob_buffer)[OG(ob_text_length)]=0; } - +#endif static inline void php_ob_send() { Index: php4/ext/standard/parsedate.y diff -u php4/ext/standard/parsedate.y:1.7 php4/ext/standard/parsedate.y:1.8 --- php4/ext/standard/parsedate.y:1.7 Wed Dec 1 09:24:45 1999 +++ php4/ext/standard/parsedate.y Sun Dec 5 09:16:36 1999 @@ -1,5 +1,5 @@ %{ -/* $Revision: 1.7 $ +/* $Revision: 1.8 $ ** ** Originally written by Steven M. Bellovin <smb@research.att.com> while ** at the University of North Carolina at Chapel Hill. Later tweaked by @@ -70,6 +70,7 @@ #define yytable date_yytable #define yycheck date_yycheck #define yyparse date_parse +#define yyparse date_parse #define yylex date_lex #define yyerror date_error @@ -102,6 +103,8 @@ long tzone; } TIMEINFO; +int GetTimeInfo(TIMEINFO *Now); + typedef char const *STRING; typedef char * const CSTRING; @@ -151,9 +154,9 @@ static time_t yyRelSeconds; -extern struct tm *localtime(); +extern struct tm *localtime(const time_t *timep); -static void date_error(); +static void date_error(char *s); %} %expect 6 @@ -526,8 +529,7 @@ /* ARGSUSED */ static void -date_error(s) - char *s; +date_error(char *s) { /* NOTREACHED */ } @@ -594,11 +596,7 @@ static time_t -ToSeconds(Hours, Minutes, Seconds, Meridian) - time_t Hours; - time_t Minutes; - time_t Seconds; - MERIDIAN Meridian; +ToSeconds(time_t Hours, time_t Minutes, time_t Seconds, MERIDIAN Meridian) { if (Minutes < 0 || Minutes > 59 || Seconds < 0 || Seconds > 61) return -1; @@ -619,15 +617,7 @@ static time_t -Convert(Month, Day, Year, Hours, Minutes, Seconds, Meridian, dst) - time_t Month; - time_t Day; - time_t Year; - time_t Hours; - time_t Minutes; - time_t Seconds; - MERIDIAN Meridian; - DSTMODE dst; +Convert(time_t Month, time_t Day, time_t Year, time_t Hours, time_t Minutes, time_t Seconds, MERIDIAN Meridian, DSTMODE dst) { static int DaysNormal[13] = { 0, 31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31 @@ -683,9 +673,7 @@ static time_t -DSTcorrect(Start, Future) - time_t Start; - time_t Future; +DSTcorrect(time_t Start, time_t Future) { time_t StartDay; time_t FutureDay; @@ -697,9 +685,7 @@ static time_t -RelativeMonth(Start, RelMonth) - time_t Start; - time_t RelMonth; +RelativeMonth(time_t Start, time_t RelMonth) { struct tm *tm, tmbuf; time_t Month; @@ -870,7 +856,11 @@ time_t parsedate(char *p, TIMEINFO *now) { - extern int date_parse(); +#ifdef YYPARSE_PARAM + extern int date_parse (void *); +#else + extern int date_parse (void); +#endif struct tm *tm, tmbuf; TIMEINFO ti; time_t Start; Index: php4/ext/standard/php_filestat.h diff -u php4/ext/standard/php_filestat.h:1.1 php4/ext/standard/php_filestat.h:1.2 --- php4/ext/standard/php_filestat.h:1.1 Sat Dec 4 14:16:04 1999 +++ php4/ext/standard/php_filestat.h Sun Dec 5 09:16:36 1999 @@ -27,7 +27,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: php_filestat.h,v 1.1 1999/12/04 19:16:04 sas Exp $ */ +/* $Id: php_filestat.h,v 1.2 1999/12/05 14:16:36 rasmus Exp $ */ #ifndef _FILESTAT_H #define _FILESTAT_H @@ -54,6 +54,7 @@ PHP_FUNCTION(file_exists); PHP_FUNCTION(stat); PHP_FUNCTION(lstat); +PHP_FUNCTION(diskfreespace); PHP_FUNCTION(chown); PHP_FUNCTION(chgrp); PHP_FUNCTION(chmod); Index: php4/ext/standard/string.c diff -u php4/ext/standard/string.c:1.62 php4/ext/standard/string.c:1.63 --- php4/ext/standard/string.c:1.62 Sat Dec 4 14:16:06 1999 +++ php4/ext/standard/string.c Sun Dec 5 09:16:36 1999 @@ -18,7 +18,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: string.c,v 1.62 1999/12/04 19:16:06 sas Exp $ */ +/* $Id: string.c,v 1.63 1999/12/05 14:16:36 rasmus Exp $ */ /* Synced with php3 revision 1.193 1999-06-16 [ssb] */ @@ -32,6 +32,8 @@ #endif #include "zend_execute.h" #include "php_globals.h" + +int php_tag_find(char *tag, int len, char *set); /* this is read-only, so it's ok */ static char hexconvtab[] = "0123456789abcdef"; Index: php4/ext/xml/php_xml.h diff -u php4/ext/xml/php_xml.h:1.1 php4/ext/xml/php_xml.h:1.2 --- php4/ext/xml/php_xml.h:1.1 Sat Dec 4 14:16:10 1999 +++ php4/ext/xml/php_xml.h Sun Dec 5 09:16:37 1999 @@ -27,7 +27,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: php_xml.h,v 1.1 1999/12/04 19:16:10 sas Exp $ */ +/* $Id: php_xml.h,v 1.2 1999/12/05 14:16:37 rasmus Exp $ */ #ifndef _PHP_XML_H # define _PHP_XML_H @@ -126,6 +126,8 @@ PHP_FUNCTION(utf8_encode); PHP_FUNCTION(utf8_decode); PHP_FUNCTION(xml_parse_into_struct); + +PHPAPI char *_xml_zval_strdup(zval *val); #else /* !HAVE_LIBEXPAT */

« previous php.version4 (#7441) next »