]> granicus.if.org Git - php/commitdiff
Cleaning up some mess
authorSascha Schumann <sas@php.net>
Mon, 21 Aug 2000 09:50:53 +0000 (09:50 +0000)
committerSascha Schumann <sas@php.net>
Mon, 21 Aug 2000 09:50:53 +0000 (09:50 +0000)
15 files changed:
ext/standard/basic_functions.h
ext/standard/crc32.c
ext/standard/datetime.c
ext/standard/info.c
ext/standard/info.h
ext/standard/levenshtein.c
ext/standard/parsedate.y
ext/standard/php_parsedate.h [new file with mode: 0644]
main/fopen_wrappers.c
main/main.c
main/php.h
main/php_ini.c
main/php_ini.h
main/php_ticks.c
main/php_variables.c

index 32d90c9aaf49b941882ec9c0daaffe41e371d399..b87b58264e6eb3a0a61b570b33829882d04cc6de 100644 (file)
@@ -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;
index ba9d54d0201de51c2c0d4013005e85bb82e73976..c309658b9780464f3ae0fa7b23791c29ebd5a2eb 100644 (file)
@@ -19,6 +19,7 @@
 /* $Id$ */
 
 #include "php.h"
+#include "basic_functions.h"
 
 /*
  * This code implements the AUTODIN II polynomial
index 61416c0dd67ed2dcc85a4041e58e8f7a34ebb72b..c98fd2ead7d028b3f2e2f48aeaf35d70cf2fe608 100644 (file)
@@ -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)
index b0e84b59137cf19d2edf837903ec34fb721b892f..0fbcd94056f0c3f4ca30874903f2717256639292 100644 (file)
@@ -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");
index 01bb01b8a87bc283febc6262d6b8279eecf8718e..6936b58dba7869e88e207e9d2a7075900a0ba2da 100644 (file)
@@ -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, ...);
index 24b0e22a288e973c2cbecf2a779fe31e9e0c5fba..d157cf7fab71e500dd030df8bb95ddf5fe4f9c81 100644 (file)
@@ -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 */
index b66021e947db72116ff7c3134741b0ace0eb5a2c..1357ccd6bb0b19c86614bc4e661ee7ecbb285d92 100644 (file)
@@ -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
diff --git a/ext/standard/php_parsedate.h b/ext/standard/php_parsedate.h
new file mode 100644 (file)
index 0000000..0e17176
--- /dev/null
@@ -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
index c6aea3d003ead66875ed4cfe17e82b22032cdd5b..eec07555efe66cfdc6dcad8e8393fa68b7f06e2a 100644 (file)
@@ -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;
 
index 93ff27609367aecb669acbffeb33bcd128edacc0..b52ae64031267ec311c981fdc09c5720561ca3dc 100644 (file)
@@ -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);
 }
index 670335d63c90371dec19bf18e5578f13f161c5ca..c8a0a3699c73da736f79a24d0169dbe4ac471ea4 100644 (file)
@@ -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);
index 417415f594cb52b974ef6cb92403e2ac427009f0..dc5ebf1e24fca19a5977d282b1503ba671d1b7fc 100644 (file)
@@ -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);
 }
index 4fdaf126d8c54e7ea9ddea1715d33a8d625cd667..7c5721f6ca828ccd6d7b491f5e302faff7b72c9b 100644 (file)
@@ -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);
index bb6ac715bbe6992da5d221303343a4401d9d9eb0..c93200c9adebc5bc0dea841aca2e5f34bd444092 100644 (file)
@@ -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;
index 180a2c0d1db8afc8024fba843496148c057542fd..3fa22a9c33c4de0dd47e0b712e1aa0fa6ea7b22e 100644 (file)
@@ -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"