More maintainer-mode cleanups

This commit is contained in:
Rasmus Lerdorf 1999-12-05 14:16:37 +00:00
parent ca362445c4
commit dfd0f8824c
10 changed files with 46 additions and 45 deletions

View File

@ -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 @@ typedef struct _php_shutdown_function_entry {
/* 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 @@ static int _php3_putenv_destructor(putenv_entry *pe)
#define M_PI 3.14159265358979323846
#endif
void test_class_startup();
void test_class_startup(void);
PHP_MINIT_FUNCTION(basic)
{
@ -1034,7 +1038,7 @@ int user_shutdown_function_dtor(php_shutdown_function_entry *shutdown_function_e
}
void php3_call_shutdown_functions(void)
void php_call_shutdown_functions(void)
{
BLS_FETCH();

View File

@ -59,8 +59,6 @@ double php_combined_lcg(void)
return z * 4.656613e-10;
}
static void lcg_init_globals(LCGLS_D);
static void lcg_init_globals(LCGLS_D)
{
LCG(s1) = 1;

View File

@ -30,12 +30,14 @@ static int php_ub_body_write_no_header(const char *str, uint str_length);
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 @@ typedef struct {
#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 @@ PHPAPI void php_end_ob_buffering(int send_buffer)
* Output buffering - implementation
*/
static inline void php_ob_allocate()
static inline void php_ob_allocate(void)
{
OLS_FETCH();
@ -241,7 +243,7 @@ static void php_ob_append(const char *text, uint 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 @@ static void php_ob_prepend(const char *text, uint text_length)
memcpy(OG(ob_buffer), text, text_length);
OG(ob_buffer)[OG(ob_text_length)]=0;
}
#endif
static inline void php_ob_send()
{

View File

@ -70,6 +70,7 @@ extern time_t timezone;
#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 @@ typedef struct _TIMEINFO {
long tzone;
} TIMEINFO;
int GetTimeInfo(TIMEINFO *Now);
typedef char const *STRING;
typedef char * const CSTRING;
@ -151,9 +154,9 @@ static time_t yyRelMonth;
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 @@ static TABLE TimezoneTable[] = {
/* ARGSUSED */
static void
date_error(s)
char *s;
date_error(char *s)
{
/* NOTREACHED */
}
@ -594,11 +596,7 @@ int GetTimeInfo(TIMEINFO *Now)
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 @@ ToSeconds(Hours, Minutes, Seconds, Meridian)
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 @@ Convert(Month, Day, Year, Hours, Minutes, Seconds, Meridian, dst)
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 @@ DSTcorrect(Start, Future)
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 @@ static int date_lex(void)
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;

View File

@ -54,6 +54,7 @@ PHP_FUNCTION(is_link);
PHP_FUNCTION(file_exists);
PHP_FUNCTION(stat);
PHP_FUNCTION(lstat);
PHP_FUNCTION(diskfreespace);
PHP_FUNCTION(chown);
PHP_FUNCTION(chgrp);
PHP_FUNCTION(chmod);

View File

@ -33,6 +33,8 @@
#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";

View File

@ -127,6 +127,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 */
# define xml_module_ptr NULL

2
main.h
View File

@ -38,7 +38,7 @@ PHPAPI int php_module_shutdown_wrapper(sapi_module_struct *sapi_globals);
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 */

View File

@ -793,7 +793,7 @@ void php_request_shutdown(void *dummy)
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();

View File

@ -30,12 +30,14 @@ static int php_ub_body_write_no_header(const char *str, uint str_length);
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 @@ typedef struct {
#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 @@ PHPAPI void php_end_ob_buffering(int send_buffer)
* Output buffering - implementation
*/
static inline void php_ob_allocate()
static inline void php_ob_allocate(void)
{
OLS_FETCH();
@ -241,7 +243,7 @@ static void php_ob_append(const char *text, uint 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 @@ static void php_ob_prepend(const char *text, uint text_length)
memcpy(OG(ob_buffer), text, text_length);
OG(ob_buffer)[OG(ob_text_length)]=0;
}
#endif
static inline void php_ob_send()
{