mirror of
https://github.com/php/php-src.git
synced 2025-08-15 21:48:51 +02:00
Cleaning up some mess
This commit is contained in:
parent
1bbea8d0eb
commit
8e0ae5d152
15 changed files with 51 additions and 20 deletions
|
@ -117,6 +117,8 @@ typedef unsigned int php_stat_len;
|
|||
typedef int php_stat_len;
|
||||
#endif
|
||||
|
||||
PHPAPI int _php_error_log(int opt_err,char *message,char *opt,char *headers);
|
||||
|
||||
#if SIZEOF_INT == 4
|
||||
/* Most 32-bit and 64-bit systems have 32-bit ints */
|
||||
typedef unsigned int php_uint32;
|
||||
|
|
|
@ -19,6 +19,7 @@
|
|||
/* $Id$ */
|
||||
|
||||
#include "php.h"
|
||||
#include "basic_functions.h"
|
||||
|
||||
/*
|
||||
* This code implements the AUTODIN II polynomial
|
||||
|
|
|
@ -33,6 +33,8 @@
|
|||
#endif
|
||||
#include <stdio.h>
|
||||
|
||||
#include "php_parsedate.h"
|
||||
|
||||
char *mon_full_names[] =
|
||||
{
|
||||
"January", "February", "March", "April",
|
||||
|
@ -65,8 +67,6 @@ static int phpday_tab[2][12] =
|
|||
|
||||
#define isleap(year) (((year%4) == 0 && (year%100)!=0) || (year%400)==0)
|
||||
|
||||
extern PHPAPI time_t parse_date (const char *p, const time_t *now);
|
||||
|
||||
/* {{{ proto int time(void)
|
||||
Return current UNIX timestamp */
|
||||
PHP_FUNCTION(time)
|
||||
|
|
|
@ -108,7 +108,7 @@ static void php_print_gpcse_array(char *name, uint name_length ELS_DC)
|
|||
}
|
||||
}
|
||||
|
||||
void php_info_print_style()
|
||||
void php_info_print_style(void)
|
||||
{
|
||||
php_printf("<STYLE TYPE=\"text/css\"><!--\n");
|
||||
php_printf("A { text-decoration: none; }\n");
|
||||
|
|
|
@ -53,10 +53,12 @@ PHP_FUNCTION(phpinfo);
|
|||
PHP_FUNCTION(phpcredits);
|
||||
PHP_FUNCTION(php_logo_guid);
|
||||
PHP_FUNCTION(zend_logo_guid);
|
||||
PHP_FUNCTION(php_egg_logo_guid);
|
||||
PHP_FUNCTION(php_sapi_name);
|
||||
PHPAPI void php_print_info(int flag);
|
||||
PHPAPI void php_print_credits(int flag);
|
||||
PHPAPI void php_print_style(void);
|
||||
PHPAPI void php_info_print_style(void);
|
||||
PHPAPI void php_info_print_table_colspan_header(int num_cols, char *header);
|
||||
PHPAPI void php_info_print_table_header(int num_cols, ...);
|
||||
PHPAPI void php_info_print_table_row(int num_cols, ...);
|
||||
|
|
|
@ -24,7 +24,7 @@
|
|||
#include "php_string.h"
|
||||
|
||||
/* faster, but obfuscated, all operations have a cost of 1 */
|
||||
int fastest_levdist(const char *s1, const char *s2)
|
||||
static int fastest_levdist(const char *s1, const char *s2)
|
||||
{
|
||||
register char *p1,*p2;
|
||||
register int i,j,n;
|
||||
|
@ -179,7 +179,7 @@ static int weighted_levdist( const char *s1
|
|||
return n-=cost_del;
|
||||
}
|
||||
|
||||
int custom_levdist(char *str1,char *str2,char *callback_name)
|
||||
static int custom_levdist(char *str1,char *str2,char *callback_name)
|
||||
{
|
||||
php_error(E_WARNING,"the general Levenshtein support is not there yet");
|
||||
/* not there yet */
|
||||
|
|
|
@ -26,6 +26,8 @@
|
|||
# include "win32/time.h"
|
||||
#endif
|
||||
|
||||
#include <php_parsedate.h>
|
||||
|
||||
#if HAVE_STDLIB_H
|
||||
# include <stdlib.h> /* for `free'; used by Bison 1.27 */
|
||||
#endif
|
||||
|
|
26
ext/standard/php_parsedate.h
Normal file
26
ext/standard/php_parsedate.h
Normal file
|
@ -0,0 +1,26 @@
|
|||
/*
|
||||
+----------------------------------------------------------------------+
|
||||
| PHP version 4.0 |
|
||||
+----------------------------------------------------------------------+
|
||||
| Copyright (c) 1997, 1998, 1999, 2000 The PHP Group |
|
||||
+----------------------------------------------------------------------+
|
||||
| This source file is subject to version 2.02 of the PHP license, |
|
||||
| that is bundled with this package in the file LICENSE, and is |
|
||||
| available at through the world-wide-web at |
|
||||
| http://www.php.net/license/2_02.txt. |
|
||||
| If you did not receive a copy of the PHP license and are unable to |
|
||||
| obtain it through the world-wide-web, please send a note to |
|
||||
| license@php.net so we can mail you a copy immediately. |
|
||||
+----------------------------------------------------------------------+
|
||||
| Authors: Sascha Schumann <sascha@schumann.cx> |
|
||||
+----------------------------------------------------------------------+
|
||||
*/
|
||||
|
||||
#ifndef PHP_PARSEDATE_H
|
||||
#define PHP_PARSEDATE_H
|
||||
|
||||
#include <time.h>
|
||||
|
||||
time_t parse_date(const char *p, const time_t *now);
|
||||
|
||||
#endif
|
|
@ -244,7 +244,7 @@ PHPAPI int php_check_open_basedir(char *path)
|
|||
return 0;
|
||||
}
|
||||
|
||||
FILE *php_fopen_and_set_opened_path(const char *path, char *mode, char **opened_path)
|
||||
static FILE *php_fopen_and_set_opened_path(const char *path, char *mode, char **opened_path)
|
||||
{
|
||||
FILE *fp;
|
||||
|
||||
|
|
|
@ -304,7 +304,7 @@ void php_log_err(char *log_message)
|
|||
#define PRINTF_BUFFER_SIZE 1024*4
|
||||
|
||||
/* wrapper for modules to use PHPWRITE */
|
||||
PHPAPI int php_write(void *buf, int size)
|
||||
PHPAPI int php_write(void *buf, uint size)
|
||||
{
|
||||
return PHPWRITE(buf, size);
|
||||
}
|
||||
|
|
17
main/php.h
17
main/php.h
|
@ -156,7 +156,7 @@ typedef unsigned int socklen_t;
|
|||
#include "safe_mode.h"
|
||||
|
||||
#ifndef HAVE_STRERROR
|
||||
extern char *strerror(int);
|
||||
char *strerror(int);
|
||||
#endif
|
||||
|
||||
#include "fopen-wrappers.h"
|
||||
|
@ -240,12 +240,12 @@ extern char **environ;
|
|||
#define php_sleep sleep
|
||||
#endif
|
||||
|
||||
extern void phperror(char *error);
|
||||
extern PHPAPI int php_write(void *buf, int size);
|
||||
extern PHPAPI int php_printf(const char *format, ...);
|
||||
extern void php_log_err(char *log_message);
|
||||
extern int Debug(char *format, ...);
|
||||
extern int cfgparse(void);
|
||||
void phperror(char *error);
|
||||
PHPAPI int php_write(void *buf, uint size);
|
||||
PHPAPI int php_printf(const char *format, ...);
|
||||
void php_log_err(char *log_message);
|
||||
int Debug(char *format, ...);
|
||||
int cfgparse(void);
|
||||
|
||||
#define php_error zend_error
|
||||
|
||||
|
@ -264,9 +264,6 @@ int php_global_shutdown_internal_extensions(void);
|
|||
|
||||
int mergesort(void *base, size_t nmemb, register size_t size, int (*cmp) (const void *, const void *));
|
||||
|
||||
/*from basic functions*/
|
||||
extern PHPAPI int _php_error_log(int opt_err,char *message,char *opt,char *headers);
|
||||
|
||||
PHPAPI void php_register_pre_request_shutdown(void (*func)(void *), void *userdata);
|
||||
|
||||
PHPAPI int cfg_get_long(char *varname, long *result);
|
||||
|
|
|
@ -103,7 +103,7 @@ static int ini_key_compare(const void *a, const void *b)
|
|||
}
|
||||
|
||||
|
||||
void php_ini_sort_entries()
|
||||
void php_ini_sort_entries(void)
|
||||
{
|
||||
zend_hash_sort(&known_directives, qsort, ini_key_compare, 0);
|
||||
}
|
||||
|
|
|
@ -55,7 +55,7 @@ int php_ini_mstartup(void);
|
|||
int php_ini_mshutdown(void);
|
||||
int php_ini_rshutdown(void);
|
||||
|
||||
void php_ini_sort_entries();
|
||||
void php_ini_sort_entries(void);
|
||||
|
||||
PHPAPI int php_register_ini_entries(php_ini_entry *ini_entry, int module_number);
|
||||
PHPAPI void php_unregister_ini_entries(int module_number);
|
||||
|
|
|
@ -55,7 +55,7 @@ PHPAPI int php_remove_tick_function(void (*func)(int))
|
|||
return SUCCESS;
|
||||
}
|
||||
|
||||
void php_tick_iterator(void *data, void *arg)
|
||||
static void php_tick_iterator(void *data, void *arg)
|
||||
{
|
||||
void (*func)(int);
|
||||
func = (void(*)(int))data;
|
||||
|
|
|
@ -23,6 +23,7 @@
|
|||
#include "ext/standard/php_standard.h"
|
||||
#include "php_variables.h"
|
||||
#include "php_globals.h"
|
||||
#include "php_content_types.h"
|
||||
#include "SAPI.h"
|
||||
|
||||
#include "zend_globals.h"
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue