]> granicus.if.org Git - php/commitdiff
More php3 cleanup
authorZeev Suraski <zeev@php.net>
Fri, 17 Dec 1999 21:34:28 +0000 (21:34 +0000)
committerZeev Suraski <zeev@php.net>
Fri, 17 Dec 1999 21:34:28 +0000 (21:34 +0000)
ext/dba/dba.c
ext/dbase/dbase.c
ext/domxml/domxml.c
ext/domxml/php_domxml.h
ext/ftp/php_ftp.c
ext/ftp/php_ftp.h

index 56a5f3aa59734fdd5dad96197966858dcff68f02..d448441e47ab17c16ea170bb7d534d144888f336 100644 (file)
@@ -180,7 +180,6 @@ static void dba_close(dba_info *info)
        free(info);
 }
 /* }}} */
-       /* {{{ php3_minit_dba */
 
 static PHP_MINIT_FUNCTION(dba)
 {
@@ -189,16 +188,12 @@ static PHP_MINIT_FUNCTION(dba)
        GLOBAL(le_pdb) = register_list_destructors(NULL, dba_close);
        return SUCCESS;
 }
-/* }}} */
-       /* {{{ php3_mshutdown_dba */
 
 static PHP_MSHUTDOWN_FUNCTION(dba)
 {
        zend_hash_destroy(&ht_keys);
        return SUCCESS;
 }
-/* }}} */
-       /* {{{ php3_info_dba */
 
 static PHP_MINFO_FUNCTION(dba)
 {
@@ -210,10 +205,8 @@ static PHP_MINFO_FUNCTION(dba)
                PUTS(hptr->name);
        }
 }
-/* }}} */      
-       /* {{{ _php3_dba_update */
 
-static void _php3_dba_update(INTERNAL_FUNCTION_PARAMETERS, int mode)
+static void php_dba_update(INTERNAL_FUNCTION_PARAMETERS, int mode)
 {
        DBA_ID_PARS;
        pval **val, **key;
@@ -231,12 +224,10 @@ static void _php3_dba_update(INTERNAL_FUNCTION_PARAMETERS, int mode)
                RETURN_TRUE;
        RETURN_FALSE;
 }
-/* }}} */
-       /* {{{ _php3_dba_open */
 
 #define FREENOW if(args) efree(args); if(key) efree(key)
 
-static void _php3_dba_open(INTERNAL_FUNCTION_PARAMETERS, int persistent)
+static void php_dba_open(INTERNAL_FUNCTION_PARAMETERS, int persistent)
 {
        pval ***args = (pval ***) NULL;
        int ac = ARG_COUNT(ht);
@@ -343,7 +334,7 @@ static void _php3_dba_open(INTERNAL_FUNCTION_PARAMETERS, int persistent)
    opens path using the specified handler in mode persistently */
 PHP_FUNCTION(dba_popen)
 {
-       _php3_dba_open(INTERNAL_FUNCTION_PARAM_PASSTHRU, 1);
+       php_dba_open(INTERNAL_FUNCTION_PARAM_PASSTHRU, 1);
 }
 /* }}} */
 
@@ -351,7 +342,7 @@ PHP_FUNCTION(dba_popen)
    opens path using the specified handler in mode*/
 PHP_FUNCTION(dba_open)
 {
-       _php3_dba_open(INTERNAL_FUNCTION_PARAM_PASSTHRU, 0);
+       php_dba_open(INTERNAL_FUNCTION_PARAM_PASSTHRU, 0);
 }
 /* }}} */
 
@@ -441,7 +432,7 @@ PHP_FUNCTION(dba_delete)
    inserts value as key, returns false, if key exists already */
 PHP_FUNCTION(dba_insert)
 {
-       _php3_dba_update(INTERNAL_FUNCTION_PARAM_PASSTHRU, 1);
+       php_dba_update(INTERNAL_FUNCTION_PARAM_PASSTHRU, 1);
 }
 /* }}} */
 
@@ -449,7 +440,7 @@ PHP_FUNCTION(dba_insert)
    inserts value as key, replaces key, if key exists already */
 PHP_FUNCTION(dba_replace)
 {
-       _php3_dba_update(INTERNAL_FUNCTION_PARAM_PASSTHRU, 0);
+       php_dba_update(INTERNAL_FUNCTION_PARAM_PASSTHRU, 0);
 }
 /* }}} */
 
index f3b8498d379dfe3b371a5b9d53118ff8982250fc..34fa80f80be004a7efd0efa52ae50c34bf5ef239 100644 (file)
@@ -303,7 +303,8 @@ PHP_FUNCTION(dbase_add_record) {
 
 /* {{{ proto bool dbase_replace_record(int identifier, array data, int recnum)
    Replaces a record to the database */
-void php3_dbase_replace_record(INTERNAL_FUNCTION_PARAMETERS) {
+PHP_FUNCTION(dbase_replace_record)
+{
        pval *dbh_id, *fields, *field, *recnum;
        dbhead_t *dbh;
        int dbh_type;
index 684bb96292cc2a532bffe1657f3a6aab6f90c76f..fc6a53cfc2d6e6e2b50e11b76d0c5fcfe00b7956 100644 (file)
@@ -70,7 +70,7 @@ static zend_function_entry php_domxmlattr_class_functions[] = {
        {NULL, NULL, NULL}
 };
 
-zend_module_entry php3_domxml_module_entry = {
+zend_module_entry php_domxml_module_entry = {
        "DOM", php_domxml_functions, PHP_MINIT(domxml), NULL, NULL, NULL, PHP_MINFO(domxml), STANDARD_MODULE_PROPERTIES
 };
 
index 4cc78fe5db9450e1f4f66969b4b71f64cc296f17..415381817238b798a23524d58a094ec726edc353 100644 (file)
@@ -37,8 +37,8 @@
 #if HAVE_DOMXML
 #include <gnome-xml/parser.h>
 
-extern zend_module_entry php3_domxml_module_entry;
-#define php3_domxml_module_ptr &php3_domxml_module_entry
+extern zend_module_entry php_domxml_module_entry;
+#define php_domxml_module_ptr &php_domxml_module_entry
 
 /* directory functions */
 extern PHP_MINIT_FUNCTION(domxml);
@@ -61,8 +61,8 @@ PHP_FUNCTION(domxml_parent);
 PHP_FUNCTION(domxml_attrname);
 
 #else
-#define php3_domxml_module_ptr NULL
+#define php_domxml_module_ptr NULL
 #endif /* HAVE_DOMXML */
-#define phpext_domxml_ptr php3_domxml_module_ptr
+#define phpext_domxml_ptr php_domxml_module_ptr
 
 #endif /* _PHP3_DIR_H */
index 1b86f1f4cf3457570e6a7ff88e2f2102c1c9a258..f96cc21a3c5b305a78495330eadaf00364526ff7 100644 (file)
 
 #if HAVE_FTP
 
-#ifndef ZEND_VERSION
-#include "internal_functions.h"
-#include "php3_list.h"
-#define php_error php_error
-#endif
-
 #include "ext/standard/file.h"
 
 #include "php_ftp.h"
@@ -48,7 +42,7 @@
 static int     le_ftpbuf;
 
 
-function_entry php3_ftp_functions[] = {
+function_entry php_ftp_functions[] = {
        PHP_FE(ftp_connect,                     NULL)
        PHP_FE(ftp_login,                       NULL)
        PHP_FE(ftp_pwd,                         NULL)
@@ -72,14 +66,10 @@ function_entry php3_ftp_functions[] = {
        {NULL, NULL, NULL}
 };
 
-zend_module_entry php3_ftp_module_entry = {
+zend_module_entry php_ftp_module_entry = {
        "FTP Functions",
-       php3_ftp_functions,
-#ifdef ZEND_VERSION
+       php_ftp_functions,
        PHP_MINIT(ftp),
-#else
-       php3_minit_ftp,
-#endif
        NULL,
        NULL,
        NULL,
@@ -92,11 +82,7 @@ static void ftp_destructor_ftpbuf(ftpbuf_t *ftp)
        ftp_close(ftp);
 }
 
-#ifndef ZEND_VERSION
-int php3_minit_ftp(INIT_FUNC_ARGS)
-#else
 PHP_MINIT_FUNCTION(ftp)
-#endif
 {
 
        ELS_FETCH();
index fa978c45315f7b06f4069cdd179933095549b5fe..8e1a08ec838cabe43849332cae24c98f92336eca 100644 (file)
 
 #if HAVE_FTP
 
-extern zend_module_entry php3_ftp_module_entry;
-#define php3_ftp_module_ptr &php3_ftp_module_entry
+extern zend_module_entry php_ftp_module_entry;
+#define php_ftp_module_ptr &php_ftp_module_entry
 
-#ifdef ZEND_VERSION
 PHP_MINIT_FUNCTION(ftp);
-#else
-int php3_minit_ftp(INIT_FUNC_ARGS);
-#endif
 
 PHP_FUNCTION(ftp_connect);
 PHP_FUNCTION(ftp_login);
@@ -70,10 +66,10 @@ PHP_FUNCTION(ftp_rename);
 PHP_FUNCTION(ftp_delete);
 PHP_FUNCTION(ftp_quit);
 
-#define phpext_ftp_ptr php3_ftp_module_ptr
+#define phpext_ftp_ptr php_ftp_module_ptr
 
 #else
-#define php3_ftp_module_ptr NULL
+#define php_ftp_module_ptr NULL
 #endif /* HAVE_FTP */
 
 #endif