[PHP4BETA] CVS update: php4
| From: | rasmus | Date: | Fri, 28 May 1999 03:54:15 +0000 |
| Subject: | [PHP4BETA] CVS update: php4 | ||
| Groups: | php.version4 | ||
| Request: | Send a blank email to php-version4+get-1144@lists.php.net to get a copy of this message | ||
Date: Thursday May 27, 1999 @ 23:54
Author: rasmus
Update of /repository/php4
In directory php:/tmp/cvs-serv404
Modified Files:
Makefile.in main.c main.h mod_php4.c mod_php4.h
Log Message:
Some innocent cleanups
Index: php4/Makefile.in
diff -u php4/Makefile.in:1.32 php4/Makefile.in:1.33
--- php4/Makefile.in:1.32 Wed May 26 21:20:52 1999
+++ php4/Makefile.in Thu May 27 23:54:15 1999
@@ -24,7 +24,7 @@
# +----------------------------------------------------------------------+
#
-# $Id: Makefile.in,v 1.32 1999/05/27 01:20:52 sas Exp $
+# $Id: Makefile.in,v 1.33 1999/05/28 03:54:15 rasmus Exp $
#
prefix = @prefix@
@@ -117,7 +117,7 @@
flex -Pcfg -oconfiguration-scanner.c -i $(srcdir)/configuration-scanner.l
clean: clean-recursive
- -rm -f libphp4.a libmodphp4.a php *.o
+ -rm -f libphp4.a libmodphp4.a libphp4.so php *.o
-rm -f test/php.desc test/php.in test/php.out test/php.test
-rm -f test/a.tmp test/b.tmp test/test.dbm*
Index: php4/main.c
diff -u php4/main.c:1.64 php4/main.c:1.65
--- php4/main.c:1.64 Wed May 26 23:14:57 1999
+++ php4/main.c Thu May 27 23:54:15 1999
@@ -29,7 +29,7 @@
+----------------------------------------------------------------------+
*/
-/* $Id: main.c,v 1.64 1999/05/27 03:14:57 zeev Exp $ */
+/* $Id: main.c,v 1.65 1999/05/28 03:54:15 rasmus Exp $ */
#include <stdio.h>
@@ -584,9 +584,9 @@
void *ptr = (void *)((char *)t+sizeof(mem_header)+PLATFORM_PADDING);
#if WIN32||WINNT
- snprintf(memory_leak_buf, 512, "%s(%d) : Freeing 0x%0.8X (%d bytes), script=%s\n",
t->filename, t->lineno, ptr, t->size, SG(request_info).path_translated);
+ snprintf(memory_leak_buf, 512, "%s(%d) : Freeing 0x%0.8X (%d bytes), script=%s\n",
t->filename, t->lineno, (unsigned long)ptr, t->size, SG(request_info).path_translated);
#else
- snprintf(memory_leak_buf, 512, "%s: Freeing 0x%0.8X (%d bytes), allocated in %s on line
%d<br>\n", SG(request_info).path_translated, ptr,
t->size,t->filename,t->lineno);
+ snprintf(memory_leak_buf, 512, "%s: Freeing 0x%0.8lX (%d bytes), allocated in %s on
line %d<br>\n", SG(request_info).path_translated, (unsigned long)ptr,
t->size,t->filename,t->lineno);
#endif
} else {
uint leak_count = (uint) data;
@@ -879,7 +879,7 @@
-void php_module_shutdown_for_exec(void)
+void php_module_shutdown_for_exec()
{
/* used to close fd's in the range 3.255 here, but it's problematic */
}
@@ -1218,7 +1218,7 @@
/* some systems are missing these from their header files */
#if APACHE
-PHPAPI int apache_php3_module_main(request_rec *r, int fd, int display_source_mode SLS_DC)
+PHPAPI int apache_php_module_main(request_rec *r, int fd, int display_source_mode SLS_DC)
{
zend_file_handle file_handle;
#ifdef ZTS
Index: php4/main.h
diff -u php4/main.h:1.8 php4/main.h:1.9
--- php4/main.h:1.8 Wed May 5 17:05:43 1999
+++ php4/main.h Thu May 27 23:54:15 1999
@@ -29,7 +29,7 @@
*/
-/* $Id: main.h,v 1.8 1999/05/05 21:05:43 zeev Exp $ */
+/* $Id: main.h,v 1.9 1999/05/28 03:54:15 rasmus Exp $ */
#ifndef _MAIN_H
@@ -44,7 +44,7 @@
PHPAPI void php_request_shutdown_for_exec(void *dummy);
PHPAPI int php_module_startup(sapi_module_struct *sf);
PHPAPI void php_module_shutdown();
-PHPAPI void php_module_shutdown_for_exec(void);
+PHPAPI void php_module_shutdown_for_exec();
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);
Index: php4/mod_php4.c
diff -u php4/mod_php4.c:1.1 php4/mod_php4.c:1.2
--- php4/mod_php4.c:1.1 Sat May 22 05:24:19 1999
+++ php4/mod_php4.c Thu May 27 23:54:15 1999
@@ -23,12 +23,12 @@
| If you did not, or have any questions about PHP licensing, please |
| contact core@php.net. |
+----------------------------------------------------------------------+
- | Authors: Rasmus Lerdorf <rasmus@lerdorf.on.ca> |
+ | Authors: Rasmus Lerdorf <rasmus@php.net> |
| (with helpful hints from Dean Gaudet <dgaudet@arctic.org> |
| PHP 4.0 patches by Zeev Suraski <zeev@zend.com> |
+----------------------------------------------------------------------+
*/
-/* $Id: mod_php4.c,v 1.1 1999/05/22 09:24:19 zeev Exp $ */
+/* $Id: mod_php4.c,v 1.2 1999/05/28 03:54:15 rasmus Exp $ */
#include "httpd.h"
#include "http_config.h"
@@ -58,7 +58,7 @@
# include "mod_dav.h"
#endif
-PHPAPI int apache_php3_module_main(request_rec *r, int fd, int display_source_mode SLS_DC);
+PHPAPI int apache_php_module_main(request_rec *r, int fd, int display_source_mode SLS_DC);
/* ### these should be defined in mod_php4.h or somewhere else */
#define USE_PATH 1
@@ -87,7 +87,7 @@
-void php3_save_umask()
+void php_save_umask()
{
saved_umask = umask(077);
umask(saved_umask);
@@ -191,7 +191,7 @@
};
-void php3_restore_umask()
+void php_restore_umask()
{
umask(saved_umask);
}
@@ -207,7 +207,7 @@
SG(request_info).query_string = r->args;
SG(request_info).path_translated = r->filename;
SG(request_info).request_uri = r->uri;
- SG(request_info).request_method = r->method;
+ SG(request_info).request_method = (char *)r->method;
SG(request_info).content_type = (char *) table_get(r->subprocess_env,
"CONTENT_TYPE");
SG(request_info).content_length = (content_length ? atoi(content_length) : 0);
@@ -233,7 +233,7 @@
}
-int send_php3(request_rec *r, int display_source_mode, char *filename)
+int send_php(request_rec *r, int display_source_mode, char *filename)
{
int fd, retval;
SLS_FETCH();
@@ -249,7 +249,7 @@
return NOT_FOUND;
}
- /* If PHP parser engine has been turned off with a "php3_engine off"
+ /* If PHP parser engine has been turned off with an "engine off"
* directive, then decline to handle this request
*/
if (!php_apache_info.engine) {
@@ -293,36 +293,36 @@
SG(server_context) = r;
init_request_info(SLS_C);
- php3_save_umask();
+ php_save_umask();
chdir_file(filename);
add_common_vars(r);
add_cgi_vars(r);
- apache_php3_module_main(r, fd, display_source_mode SLS_CC);
+ apache_php_module_main(r, fd, display_source_mode SLS_CC);
/* Done, restore umask, turn off timeout, close file and return */
- php3_restore_umask();
+ php_restore_umask();
kill_timeout(r);
pclosef(r->pool, fd);
return OK;
}
-int send_parsed_php3(request_rec * r)
+int send_parsed_php(request_rec * r)
{
- return send_php3(r, 0, NULL);
+ return send_php(r, 0, NULL);
}
-int send_parsed_php3_source(request_rec * r)
+int send_parsed_php_source(request_rec * r)
{
- return send_php3(r, 0, NULL);
+ return send_php(r, 0, NULL);
}
/*
* Create the per-directory config structure with defaults
*/
-static void *php3_create_dir(pool * p, char *dummy)
+static void *php_create_dir(pool * p, char *dummy)
{
php_apache_info_struct *new;
@@ -362,7 +362,7 @@
}
-int php3_xbithack_handler(request_rec * r)
+int php_xbithack_handler(request_rec * r)
{
php_apache_info_struct *conf;
@@ -375,11 +375,11 @@
r->allowed |= (1 << METHODS) - 1;
return DECLINED;
}
- return send_parsed_php3(r);
+ return send_parsed_php(r);
}
-void php3_init_handler(server_rec *s, pool *p)
+void php_init_handler(server_rec *s, pool *p)
{
register_cleanup(p, NULL, php_module_shutdown, php_module_shutdown_for_exec);
php_module_startup(&sapi_module);
@@ -394,17 +394,17 @@
extern int phpdav_mkcol_test_handler(request_rec *r);
extern int phpdav_mkcol_create_handler(request_rec *r);
-/* conf is being read twice (both here and in send_php3()) */
-int send_parsed_php3_dav_script(request_rec *r)
+/* conf is being read twice (both here and in send_php()) */
+int send_parsed_php_dav_script(request_rec *r)
{
php_apache_info_struct *conf;
conf = (php_apache_info_struct *) get_module_config(r->per_dir_config,
&php4_module);
- return send_php3(r, 0, 0, conf->dav_script);
+ return send_php(r, 0, 0, conf->dav_script);
}
-static int php3_type_checker(request_rec *r)
+static int php_type_checker(request_rec *r)
{
php_apache_info_struct *conf;
@@ -413,7 +413,7 @@
/* If DAV support is enabled, use mod_dav's type checker. */
if (conf->dav_script) {
- dav_api_set_request_handler(r, send_parsed_php3_dav_script);
+ dav_api_set_request_handler(r, send_parsed_php_dav_script);
dav_api_set_mkcol_handlers(r, phpdav_mkcol_test_handler,
phpdav_mkcol_create_handler);
/* leave the rest of the request to mod_dav */
@@ -425,21 +425,21 @@
#else /* HAVE_MOD_DAV */
-# define php3_type_checker NULL
+# define php_type_checker NULL
#endif /* HAVE_MOD_DAV */
-handler_rec php3_handlers[] =
+handler_rec php_handlers[] =
{
- {"application/x-httpd-php3", send_parsed_php3},
- {"application/x-httpd-php3-source", send_parsed_php3_source},
- {"text/html", php3_xbithack_handler},
+ {"application/x-httpd-php3", send_parsed_php},
+ {"application/x-httpd-php3-source", send_parsed_php_source},
+ {"text/html", php_xbithack_handler},
{NULL}
};
-command_rec php3_commands[] =
+command_rec php_commands[] =
{
{"php4_value", php_apache_value_handler, NULL, OR_OPTIONS, TAKE2, "PHP Value
Modifier"},
{"php4_flag", php_apache_flag_handler, NULL, OR_OPTIONS, TAKE2, "PHP Flag
Modifier"},
@@ -451,18 +451,18 @@
module MODULE_VAR_EXPORT php4_module =
{
STANDARD_MODULE_STUFF,
- php3_init_handler, /* initializer */
- php3_create_dir, /* per-directory config creator */
+ php_init_handler, /* initializer */
+ php_create_dir, /* per-directory config creator */
NULL, /* dir merger */
NULL, /* per-server config creator */
NULL, /* merge server config */
- php3_commands, /* command table */
- php3_handlers, /* handlers */
+ php_commands, /* command table */
+ php_handlers, /* handlers */
NULL, /* filename translation */
NULL, /* check_user_id */
NULL, /* check auth */
NULL, /* check access */
- php3_type_checker, /* type_checker */
+ php_type_checker, /* type_checker */
NULL, /* fixups */
NULL /* logger */
#if MODULE_MAGIC_NUMBER >= 19970103
Index: php4/mod_php4.h
diff -u php4/mod_php4.h:1.1 php4/mod_php4.h:1.2
--- php4/mod_php4.h:1.1 Sat May 22 05:24:19 1999
+++ php4/mod_php4.h Thu May 27 23:54:15 1999
@@ -23,13 +23,13 @@
| If you did not, or have any questions about PHP licensing, please |
| contact core@php.net. |
+----------------------------------------------------------------------+
- | Authors: Rasmus Lerdorf <rasmus@lerdorf.on.ca> |
+ | Authors: Rasmus Lerdorf <rasmus@php.net> |
+----------------------------------------------------------------------+
*/
-/* $Id: mod_php4.h,v 1.1 1999/05/22 09:24:19 zeev Exp $ */
+/* $Id: mod_php4.h,v 1.2 1999/05/28 03:54:15 rasmus Exp $ */
-#ifndef _MOD_PHP3_H
-#define _MOD_PHP3_H
+#ifndef _MOD_PHP4_H
+#define _MOD_PHP4_H
#if !defined(WIN32) && !defined(WINNT)
#ifndef MODULE_VAR_EXPORT
@@ -50,7 +50,7 @@
#define S_IXUSR _S_IEXEC
#endif
-#endif /* _MOD_PHP3_H */
+#endif /* _MOD_PHP4_H */
/*
* Local variables:
--
PHP 4 Beta