]> granicus.if.org Git - php/commitdiff
More php3_ cleanup
authorZeev Suraski <zeev@php.net>
Sat, 18 Dec 1999 11:49:31 +0000 (11:49 +0000)
committerZeev Suraski <zeev@php.net>
Sat, 18 Dec 1999 11:49:31 +0000 (11:49 +0000)
ext/ldap/ldap.c
ext/ldap/php_ldap.h
ext/mcal/Makefile.am
ext/mcal/php_mcal.c [moved from ext/mcal/php3_mcal.c with 93% similarity]
ext/mcal/php_mcal.h

index dceadd309705de8b15d8d68e3091422beb12cbc5..ca3204162814e63065bd6db45ec54b4be27d7a95 100644 (file)
 #if THREAD_SAFE & HAVE_NSLDAP
 #include "php3_threads.h"
 /* Structure for LDAP error values */
-#define LDAP_TLS_VARS ldap_module *PHP3_TLS_GET(ldapTLS,php3_ldap_module)
-#define LDAP_GLOBAL(a) php3_ldap_module->a
+#define LDAP_TLS_VARS ldap_module *PHP3_TLS_GET(ldapTLS,php_ldap_module)
+#define LDAP_GLOBAL(a) php_ldap_module->a
 #else
 #define LDAP_TLS_VARS
-#define LDAP_GLOBAL(a) php3_ldap_module.a
-ldap_module php3_ldap_module;
+#define LDAP_GLOBAL(a) php_ldap_module.a
+ldap_module php_ldap_module;
 #endif
 
 
@@ -111,7 +111,7 @@ DLEXPORT zend_module_entry *get_module(void ) { return &ldap_module_entry; }
 
 #if 0 /* see my note in php_ldap.h.  smc */
 /* Function for setting thread-specific LDAP error values */
-static void php3_ldap_set_ld_error( int err, char *matched, char *errmsg, void *dummy )
+static void php_ldap_set_ld_error( int err, char *matched, char *errmsg, void *dummy )
 {
        LDAP_TLS_VARS;
 
@@ -131,7 +131,7 @@ static void php3_ldap_set_ld_error( int err, char *matched, char *errmsg, void *
 }
 
 /* Function for getting the thread-specific LDAP error values */
-static int php3_ldap_get_ld_error( char **matched, char **errmsg, void *dummy )
+static int php_ldap_get_ld_error( char **matched, char **errmsg, void *dummy )
 {
        LDAP_TLS_VARS;
    /* Retrieve the error values */
@@ -145,13 +145,13 @@ static int php3_ldap_get_ld_error( char **matched, char **errmsg, void *dummy )
 }
 
 /* Function for setting the value of the errno variable */
-static void php3_ldap_set_errno( int err )
+static void php_ldap_set_errno( int err )
 {
    errno = err;
 }
 
 /* Function for getting the value of the errno variable */
-static int php3_ldap_get_errno( void )
+static int php_ldap_get_errno( void )
 {
    return( errno );
 }
@@ -174,7 +174,7 @@ static void _free_ldap_result(LDAPMessage *result)
 PHP_MINIT_FUNCTION(ldap)
 {
 #if defined(THREAD_SAFE)
-       ldap_module     *php3_ldap_module;
+       ldap_module     *php_ldap_module;
        PHP3_MUTEX_ALLOC(ldap_mutex);
        PHP3_MUTEX_LOCK(ldap_mutex);
        numthreads++;
@@ -186,7 +186,7 @@ PHP_MINIT_FUNCTION(ldap)
                }
        }
        PHP3_MUTEX_UNLOCK(ldap_mutex);
-       if(!PHP3_TLS_THREAD_INIT(ldapTLS,php3_ldap_module,ldap_module))
+       if(!PHP3_TLS_THREAD_INIT(ldapTLS,php_ldap_module,ldap_module))
                return 0;
 #if 0 /*HAVE_NSLDAP*/
    /* Set up the ldap_thread_fns structure with pointers 
@@ -206,15 +206,15 @@ PHP_MINIT_FUNCTION(ldap)
       thread needs to unlock a mutex. */
    LDAP_GLOBAL(tfns).ltf_mutex_unlock = (int (*)(void *)) php3_mutex_unlock;
    /* Call the get_errno() function to get the value of errno */
-   LDAP_GLOBAL(tfns).ltf_get_errno = php3_ldap_get_errno;
+   LDAP_GLOBAL(tfns).ltf_get_errno = php_ldap_get_errno;
    /* Call the set_errno() function to set the value of errno */
-   LDAP_GLOBAL(tfns).ltf_set_errno = php3_ldap_set_errno;
+   LDAP_GLOBAL(tfns).ltf_set_errno = php_ldap_set_errno;
    /* Call the get_ld_error() function to get error values from 
       calls to functions in the libldap library */
-   LDAP_GLOBAL(tfns).ltf_get_lderrno = php3_ldap_get_ld_error;
+   LDAP_GLOBAL(tfns).ltf_get_lderrno = php_ldap_get_ld_error;
    /* Call the set_ld_error() function to set error values for 
       calls to functions in the libldap library */
-   LDAP_GLOBAL(tfns).ltf_set_lderrno = php3_ldap_set_ld_error;
+   LDAP_GLOBAL(tfns).ltf_set_lderrno = php_ldap_set_ld_error;
    /* Don't pass any extra parameter to the functions for 
      getting and setting libldap function call errors */
    LDAP_GLOBAL(tfns).ltf_lderrno_arg = NULL;
@@ -245,7 +245,7 @@ PHP_MSHUTDOWN_FUNCTION(ldap)
 {
 #ifdef THREAD_SAFE
        LDAP_TLS_VARS;
-       PHP3_TLS_THREAD_FREE(php3_ldap_module);
+       PHP3_TLS_THREAD_FREE(php_ldap_module);
        PHP3_MUTEX_LOCK(ldap_mutex);
        numthreads--;
        if (!numthreads) {
@@ -537,7 +537,7 @@ PHP_FUNCTION(ldap_unbind)
 /* }}} */
 
 
-static void php3_ldap_do_search(INTERNAL_FUNCTION_PARAMETERS, int scope)
+static void php_ldap_do_search(INTERNAL_FUNCTION_PARAMETERS, int scope)
 {
        pval **link, **base_dn, **filter, **attrs, **attr;
        char *ldap_base_dn, *ldap_filter;
@@ -642,7 +642,7 @@ static void php3_ldap_do_search(INTERNAL_FUNCTION_PARAMETERS, int scope)
    Read an entry */
 PHP_FUNCTION(ldap_read)
 {
-       php3_ldap_do_search(INTERNAL_FUNCTION_PARAM_PASSTHRU, LDAP_SCOPE_BASE);
+       php_ldap_do_search(INTERNAL_FUNCTION_PARAM_PASSTHRU, LDAP_SCOPE_BASE);
 }
 /* }}} */
 
@@ -650,7 +650,7 @@ PHP_FUNCTION(ldap_read)
    Single-level search */
 PHP_FUNCTION(ldap_list)
 {
-       php3_ldap_do_search(INTERNAL_FUNCTION_PARAM_PASSTHRU, LDAP_SCOPE_ONELEVEL);
+       php_ldap_do_search(INTERNAL_FUNCTION_PARAM_PASSTHRU, LDAP_SCOPE_ONELEVEL);
 }
 /* }}} */
 
@@ -659,7 +659,7 @@ PHP_FUNCTION(ldap_list)
    Search LDAP tree under base_dn */
 PHP_FUNCTION(ldap_search)
 {
-       php3_ldap_do_search(INTERNAL_FUNCTION_PARAM_PASSTHRU, LDAP_SCOPE_SUBTREE);
+       php_ldap_do_search(INTERNAL_FUNCTION_PARAM_PASSTHRU, LDAP_SCOPE_SUBTREE);
 }
 /* }}} */
 
@@ -1122,7 +1122,7 @@ PHP_FUNCTION(ldap_dn2ufn)
 #define PHP_LD_FULL_ADD 0xff
        
 
-static void php3_ldap_do_modify(INTERNAL_FUNCTION_PARAMETERS, int oper)
+static void php_ldap_do_modify(INTERNAL_FUNCTION_PARAMETERS, int oper)
 {
        pval **link, **dn, **entry, **value, **ivalue;
        LDAP *ldap;
@@ -1231,8 +1231,8 @@ static void php3_ldap_do_modify(INTERNAL_FUNCTION_PARAMETERS, int oper)
 PHP_FUNCTION(ldap_add)
 {
        /* use a newly define parameter into the do_modify so ldap_mod_add can be used the way it is supposed to be used , Gerrit THomson */
-       /* php3_ldap_do_modify(INTERNAL_FUNCTION_PARAM_PASSTHRU, LDAP_MOD_ADD);*/
-       php3_ldap_do_modify(INTERNAL_FUNCTION_PARAM_PASSTHRU, PHP_LD_FULL_ADD);
+       /* php_ldap_do_modify(INTERNAL_FUNCTION_PARAM_PASSTHRU, LDAP_MOD_ADD);*/
+       php_ldap_do_modify(INTERNAL_FUNCTION_PARAM_PASSTHRU, PHP_LD_FULL_ADD);
 }
 /* }}} */
 
@@ -1241,7 +1241,7 @@ PHP_FUNCTION(ldap_add)
    Modify an LDAP entry */
 PHP_FUNCTION(ldap_modify)
 {
-       php3_ldap_do_modify(INTERNAL_FUNCTION_PARAM_PASSTHRU, LDAP_MOD_REPLACE); 
+       php_ldap_do_modify(INTERNAL_FUNCTION_PARAM_PASSTHRU, LDAP_MOD_REPLACE); 
 }
 /* }}} */
 
@@ -1254,14 +1254,14 @@ PHP_FUNCTION(ldap_modify)
    Replace attribute values with new ones */
 PHP_FUNCTION(ldap_mod_replace)
 {
-        php3_ldap_do_modify(INTERNAL_FUNCTION_PARAM_PASSTHRU, LDAP_MOD_REPLACE);}
+        php_ldap_do_modify(INTERNAL_FUNCTION_PARAM_PASSTHRU, LDAP_MOD_REPLACE);}
 /* }}} */
 
 /* {{{ proto int ldap_mod_add(int link, string dn, array entry)
         Add attribute values to current */
 PHP_FUNCTION(ldap_mod_add)
 {
-        php3_ldap_do_modify(INTERNAL_FUNCTION_PARAM_PASSTHRU, LDAP_MOD_ADD);
+        php_ldap_do_modify(INTERNAL_FUNCTION_PARAM_PASSTHRU, LDAP_MOD_ADD);
 }
 /* }}} */
 
@@ -1269,7 +1269,7 @@ PHP_FUNCTION(ldap_mod_add)
    Delete attribute values */
 PHP_FUNCTION(ldap_mod_del)
 {
-        php3_ldap_do_modify(INTERNAL_FUNCTION_PARAM_PASSTHRU, LDAP_MOD_DELETE);
+        php_ldap_do_modify(INTERNAL_FUNCTION_PARAM_PASSTHRU, LDAP_MOD_DELETE);
 }
 
 /* end of attribute based functions , gerrit thomson */
index 6c0d461ff78b5eb7b5daf4f789e3f3f2df2dcc29..1e691f93c3980530c32846b1ec522b777a71ff3a 100644 (file)
@@ -113,7 +113,7 @@ typedef struct {
 } ldap_module;
 
 #ifndef THREAD_SAFE
-extern ldap_module php3_ldap_module;
+extern ldap_module php_ldap_module;
 #endif
 
 #else
index 0b19bbebe2229c3cce0ed8db753cc83813462a22..e5a63a329bb495ce46b223ede1832a650dc9bfc8 100644 (file)
@@ -1,5 +1,5 @@
 # $Id$
 
 noinst_LTLIBRARIES=libphpext_mcal.la
-libphpext_mcal_la_SOURCES=php3_mcal.c
+libphpext_mcal_la_SOURCES=php_mcal.c
 
similarity index 93%
rename from ext/mcal/php3_mcal.c
rename to ext/mcal/php_mcal.c
index 159e820b161ddc865eeb46c8a3a5818b4b75f7c2..ed4191e6e5e5f9d5f3bd0c594c4efb116a9cd71f 100644 (file)
@@ -23,8 +23,7 @@
    | If you did not, or have any questions about PHP licensing, please    |
    | contact core@php.net.                                                |
    +----------------------------------------------------------------------+
-   | Authors:                                                             |
-   |          Mark Musone         <musone@chek.com>                  |
+   | Authors: Mark Musone <musone@chek.com>                               |
    +----------------------------------------------------------------------+
  */
 
@@ -64,7 +63,7 @@ CALSTREAM *cal_close_it ();
 CALSTREAM *cal_close_full ();
 
 
-typedef struct php3_mcal_le_struct {
+typedef struct _php_mcal_le_struct {
   CALSTREAM *mcal_stream;
   long public;
   CALEVENT *event;
@@ -125,15 +124,15 @@ PHP_FE(mcal_fetch_current_stream_event,NULL)
 };
 
 #ifdef ZEND_VERSION
-zend_module_entry php3_mcal_module_entry = {
+zend_module_entry php_mcal_module_entry = {
        CALVER, mcal_functions, PHP_MINIT(mcal), NULL, NULL, NULL, PHP_MINFO(mcal), 0, 0, 0, NULL
 };
 #else
-zend_module_entry php3_mcal_module_entry = {"mcal", mcal_functions, PHP_MINIT_FUNCTION, NULL, NULL, NULL, PHP_MINFO_FUNCTION, 0, 0, 0, NULL};
+zend_module_entry php_mcal_module_entry = {"mcal", mcal_functions, PHP_MINIT_FUNCTION, NULL, NULL, NULL, PHP_MINFO_FUNCTION, 0, 0, 0, NULL};
 #endif
 
 #if COMPILE_DL
-DLEXPORT zend_module_entry *get_module(void) { return &php3_mcal_module_entry; }
+DLEXPORT zend_module_entry *get_module(void) { return &php_mcal_module_entry; }
 #endif
 
 /* 
@@ -239,7 +238,7 @@ static int add_assoc_object(pval *arg, char *key, pval tmp)
 }
 
 
-void php3_mcal_do_open(INTERNAL_FUNCTION_PARAMETERS, int persistent)
+void php_mcal_do_open(INTERNAL_FUNCTION_PARAMETERS, int persistent)
 {
        pval *calendar;
        pval *user;
@@ -285,7 +284,7 @@ void php3_mcal_do_open(INTERNAL_FUNCTION_PARAMETERS, int persistent)
 
 /* {{{ proto int mcal_close(int stream_id [, int options])
    Close an MCAL stream */
-void php3_mcal_close(INTERNAL_FUNCTION_PARAMETERS)
+void PHP_FUNCTION(mcal_close)
 {
         pval *options, *streamind;
         int ind, ind_type;
@@ -322,16 +321,16 @@ void php3_mcal_close(INTERNAL_FUNCTION_PARAMETERS)
 
 /* {{{ proto int mcal_open(string calendar, string user, string password [, int options])
    Open an MCAL stream to a calendar */
-void php3_mcal_open(INTERNAL_FUNCTION_PARAMETERS)
+void PHP_FUNCTION(mcal_open)
 {
-       php3_mcal_do_open(INTERNAL_FUNCTION_PARAM_PASSTHRU, 0);
+       php_mcal_do_open(INTERNAL_FUNCTION_PARAM_PASSTHRU, 0);
 }
 /* }}} */
 
 
 /* {{{ proto int mcal_reopen(int stream_id, string calendar [, int options])
    Reopen MCAL stream to new calendar */
-void php3_mcal_reopen(INTERNAL_FUNCTION_PARAMETERS)
+void PHP_FUNCTION(mcal_reopen)
 {
        pval *streamind;
        pval *calendar;
@@ -372,7 +371,7 @@ void php3_mcal_reopen(INTERNAL_FUNCTION_PARAMETERS)
 
 /* {{{ proto int mcal_expunge(int stream_id)
    Delete all messages marked for deletion */
-void php3_mcal_expunge(INTERNAL_FUNCTION_PARAMETERS)
+void PHP_FUNCTION(mcal_expunge)
 {
        pval *streamind;
        int ind, ind_type;
@@ -401,7 +400,7 @@ void php3_mcal_expunge(INTERNAL_FUNCTION_PARAMETERS)
 
 /* {{{ proto int mcal_fetch_event(int stream_id,int eventid, [int options])
    Fetch an event*/
-void php3_mcal_fetch_event(INTERNAL_FUNCTION_PARAMETERS)
+void PHP_FUNCTION(mcal_fetch_event)
 {
        pval *streamind,*eventid,*options=NULL;
        int ind, ind_type;
@@ -437,7 +436,7 @@ void php3_mcal_fetch_event(INTERNAL_FUNCTION_PARAMETERS)
 
 /* {{{ proto object mcal_fetch_current_stream_event(int stream_id)
    Fetch the current event stored in the stream's event structure*/
-void php3_mcal_fetch_current_stream_event(INTERNAL_FUNCTION_PARAMETERS)
+void PHP_FUNCTION(mcal_fetch_current_stream_event)
 {
        pval *streamind;
        int ind, ind_type;
@@ -531,7 +530,7 @@ void make_event_object(pval *mypvalue,CALEVENT *event)
 
 /* {{{ proto array mcal_list_events(int stream_id,object begindate, [object enddate])
    Returns list of UIDs for that day or range of days */
-void php3_mcal_list_events(INTERNAL_FUNCTION_PARAMETERS)
+void PHP_FUNCTION(mcal_list_events)
 {
        pval *streamind,*startyear,*startmonth,*startday;
        pval *endyear,*endmonth,*endday;
@@ -601,7 +600,7 @@ void php3_mcal_list_events(INTERNAL_FUNCTION_PARAMETERS)
 /* {{{ proto string mcal_create_calendar(int stream_id, string calendar)
    Create a new calendar*/
 
-void php3_mcal_create_calendar(INTERNAL_FUNCTION_PARAMETERS)
+void PHP_FUNCTION(mcal_create_calendar)
 {
        pval *streamind, *calendar;
        int ind, ind_type;
@@ -636,7 +635,7 @@ void php3_mcal_create_calendar(INTERNAL_FUNCTION_PARAMETERS)
 
 /* {{{ proto string mcal_rename(int stream_id, string src_calendar, string dest_calendar)
    Rename a calendar*/
-void php3_mcal_rename_calendar(INTERNAL_FUNCTION_PARAMETERS)
+void PHP_FUNCTION(mcal_rename_calendar)
 {
        pval *streamind, *src_calendar,*dest_calendar;
        int ind, ind_type;
@@ -668,7 +667,7 @@ void php3_mcal_rename_calendar(INTERNAL_FUNCTION_PARAMETERS)
 
 /* {{{ proto int mcal_reopen(int stream_id, array date, array time)
    list alarms for a given time */
-void php3_mcal_list_alarms(INTERNAL_FUNCTION_PARAMETERS)
+void PHP_FUNCTION(mcal_list_alarms)
 {
   pval *streamind, *year,*month,*day,*hour,*min,*sec;
 #ifdef ZEND_VERSION
@@ -729,7 +728,7 @@ void php3_mcal_list_alarms(INTERNAL_FUNCTION_PARAMETERS)
 
 /* {{{ proto string mcal_delete_calendar(int stream_id, string calendar)
    Delete calendar*/
-void php3_mcal_delete_calendar(INTERNAL_FUNCTION_PARAMETERS)
+void PHP_FUNCTION(mcal_delete_calendar)
 {
        pval *streamind, *calendar;
        int ind, ind_type;
@@ -764,7 +763,7 @@ void php3_mcal_delete_calendar(INTERNAL_FUNCTION_PARAMETERS)
 
 /* {{{ proto string mcal_delete_event(int stream_id, int uid)
    Delete event*/
-void php3_mcal_delete_event(INTERNAL_FUNCTION_PARAMETERS)
+void PHP_FUNCTION(mcal_delete_event)
 {
        pval *streamind, *uid;
        int ind, ind_type;
@@ -795,13 +794,13 @@ void php3_mcal_delete_event(INTERNAL_FUNCTION_PARAMETERS)
 /* }}} */
 
 
-void php3_mcal_popen(INTERNAL_FUNCTION_PARAMETERS){
+void PHP_FUNCTION(mcal_popen){
 }
 
 
 /* {{{ proto string mcal_store_event(int stream_id, object event)
    Store an  event*/
-void php3_mcal_store_event(INTERNAL_FUNCTION_PARAMETERS)
+void PHP_FUNCTION(mcal_store_event)
 {
        pval *streamind,*storeobject;
        int ind, ind_type;
@@ -840,7 +839,7 @@ void php3_mcal_store_event(INTERNAL_FUNCTION_PARAMETERS)
 
 /* {{{ proto string mcal_snooze(int stream_id, int uid)
    Snooze an alarm*/
-void php3_mcal_snooze(INTERNAL_FUNCTION_PARAMETERS)
+void PHP_FUNCTION(mcal_snooze)
 {
        pval *streamind,*uid;
        int ind, ind_type;
@@ -879,7 +878,7 @@ void php3_mcal_snooze(INTERNAL_FUNCTION_PARAMETERS)
 
 /* {{{ proto string mcal_event_set_category(int stream_id, string category)
    attach a category to an event*/
-void php3_mcal_event_set_category(INTERNAL_FUNCTION_PARAMETERS)
+void PHP_FUNCTION(mcal_event_set_category)
 {
        pval *streamind,*category;
        int ind, ind_type;
@@ -907,7 +906,7 @@ void php3_mcal_event_set_category(INTERNAL_FUNCTION_PARAMETERS)
 
 /* {{{ proto string mcal_event_set_title(int stream_id, string title)
    attach a title to an event*/
-void php3_mcal_event_set_title(INTERNAL_FUNCTION_PARAMETERS)
+void PHP_FUNCTION(mcal_event_set_title)
 {
        pval *streamind,*title;
        int ind, ind_type;
@@ -935,7 +934,7 @@ void php3_mcal_event_set_title(INTERNAL_FUNCTION_PARAMETERS)
 
 /* {{{ proto string mcal_event_set_description(int stream_id, string description)
    attach a description to an event*/
-void php3_mcal_event_set_description(INTERNAL_FUNCTION_PARAMETERS)
+void PHP_FUNCTION(mcal_event_set_description)
 {
        pval *streamind,*description;
        int ind, ind_type;
@@ -963,7 +962,7 @@ void php3_mcal_event_set_description(INTERNAL_FUNCTION_PARAMETERS)
 
 /* {{{ proto string mcal_event_set_start(int stream_id, int year,int month, int day, [[[int hour],int min],int sec])
    attach a start datetime to an event*/
-void php3_mcal_event_set_start(INTERNAL_FUNCTION_PARAMETERS)
+void PHP_FUNCTION(mcal_event_set_start)
 {
        pval *streamind,*year,*month,*date,*hour,*min,*sec;
        int ind, ind_type;
@@ -1005,7 +1004,7 @@ void php3_mcal_event_set_start(INTERNAL_FUNCTION_PARAMETERS)
 
 /* {{{ proto string mcal_event_set_end(int stream_id, int year,int month, int day, [[[int hour],int min],int sec])
    attach an end datetime to an event*/
-void php3_mcal_event_set_end(INTERNAL_FUNCTION_PARAMETERS)
+void PHP_FUNCTION(mcal_event_set_end)
 {
        pval *streamind,*year,*month,*date,*hour,*min,*sec;
        int ind, ind_type;
@@ -1046,7 +1045,7 @@ void php3_mcal_event_set_end(INTERNAL_FUNCTION_PARAMETERS)
 
 /* {{{ proto int mcal_event_set_alarm(int stream_id, int alarm)
    add an alarm to the streams global event */
-void php3_mcal_event_set_alarm(INTERNAL_FUNCTION_PARAMETERS)
+void PHP_FUNCTION(mcal_event_set_alarm)
 {
        pval *streamind,*alarm;
        int ind, ind_type;
@@ -1074,7 +1073,7 @@ void php3_mcal_event_set_alarm(INTERNAL_FUNCTION_PARAMETERS)
 
 /* {{{ proto int mcal_event_init(int stream_id)
    initialize a streams global event */
-void php3_mcal_event_init(INTERNAL_FUNCTION_PARAMETERS)
+void PHP_FUNCTION(mcal_event_init)
 {
        pval *streamind;
        int ind, ind_type;
@@ -1095,11 +1094,11 @@ void php3_mcal_event_init(INTERNAL_FUNCTION_PARAMETERS)
                php_error(E_WARNING, "Unable to find stream pointer");
                RETURN_FALSE;
        }
-       php3_event_init(mcal_le_struct);
+       php_mcal_event_init(mcal_le_struct);
 }
        /* }}} */
 
-void php3_event_init(struct php3_mcal_le_struct *mystruct)
+void php_mcal_event_init(struct _php_mcal_le_struct *mystruct)
 {
   calevent_free(mystruct->event);
   mystruct->event=calevent_new();
@@ -1108,7 +1107,7 @@ void php3_event_init(struct php3_mcal_le_struct *mystruct)
 
 /* {{{ proto int mcal_event_set_class(int stream_id, int class)
    add an class to the streams global event */
-void php3_mcal_event_set_class(INTERNAL_FUNCTION_PARAMETERS)
+void PHP_FUNCTION(mcal_event_set_class)
 {
        pval *streamind,*class;
        int ind, ind_type;
@@ -1138,7 +1137,7 @@ void php3_mcal_event_set_class(INTERNAL_FUNCTION_PARAMETERS)
 
 /* {{{ proto bool mcal_is_leap_year(int year)
    returns true if year is a leap year, false if not */
-void php3_mcal_is_leap_year(INTERNAL_FUNCTION_PARAMETERS)
+void PHP_FUNCTION(mcal_is_leap_year)
 {
        pval *year;
        int myargc;
@@ -1160,7 +1159,7 @@ void php3_mcal_is_leap_year(INTERNAL_FUNCTION_PARAMETERS)
 
 /* {{{ proto int mcal_days_in_month(int month,bool leap_year)
    returns the number of days in the given month, needs to know if the year is a leap year or not */
-void php3_mcal_days_in_month(INTERNAL_FUNCTION_PARAMETERS)
+void PHP_FUNCTION(mcal_days_in_month)
 {
        pval *month,*leap;
        int myargc;
@@ -1178,7 +1177,7 @@ void php3_mcal_days_in_month(INTERNAL_FUNCTION_PARAMETERS)
 
 /* {{{ proto bool mcal_date_valid(int year,int month,int day)
    returns true if the date is a valid date */
-void php3_mcal_date_valid(INTERNAL_FUNCTION_PARAMETERS)
+void PHP_FUNCTION(mcal_date_valid)
 {
        pval *year,*month,*day;
        int myargc;
@@ -1204,7 +1203,7 @@ void php3_mcal_date_valid(INTERNAL_FUNCTION_PARAMETERS)
 
 /* {{{ proto bool mcal_time_valid(int hour,int min,int sec)
    returns true if the time is a valid time */
-void php3_mcal_time_valid(INTERNAL_FUNCTION_PARAMETERS)
+void PHP_FUNCTION(mcal_time_valid)
 {
        pval *hour,*min,*sec;
        int myargc;
@@ -1228,7 +1227,7 @@ void php3_mcal_time_valid(INTERNAL_FUNCTION_PARAMETERS)
 
 /* {{{ proto int mcal_day_of_week(int year,int month,int day)
    returns the day of the week of the given date */
-void php3_mcal_day_of_week(INTERNAL_FUNCTION_PARAMETERS)
+void PHP_FUNCTION(mcal_day_of_week)
 {
        pval *year,*month,*day;
        int myargc;
@@ -1249,7 +1248,7 @@ void php3_mcal_day_of_week(INTERNAL_FUNCTION_PARAMETERS)
 
 /* {{{ proto int mcal_day_of_year(int year,int month,int day)
    returns the day of the year of the given date */
-void php3_mcal_day_of_year(INTERNAL_FUNCTION_PARAMETERS)
+void PHP_FUNCTION(mcal_day_of_year)
 {
        pval *year,*month,*day;
        int myargc;
@@ -1272,7 +1271,7 @@ void php3_mcal_day_of_year(INTERNAL_FUNCTION_PARAMETERS)
 
 /* {{{ proto int mcal_day_of_week(int ayear,int amonth,int aday,int byear,int bmonth,int bday)
  returns <0, 0, >0 if a<b, a==b, a>b respectively  */
-void php3_mcal_date_compare(INTERNAL_FUNCTION_PARAMETERS)
+void PHP_FUNCTION(mcal_date_compare)
 {
        pval *ayear,*amonth,*aday;
        pval *byear,*bmonth,*bday;
@@ -1305,7 +1304,7 @@ void php3_mcal_date_compare(INTERNAL_FUNCTION_PARAMETERS)
    after the supplied date.  Returns empty date field if event does not
   occur or something is invalid.
  */
-void php3_mcal_next_recurrence(INTERNAL_FUNCTION_PARAMETERS)
+void PHP_FUNCTION(mcal_next_recurrence)
 {
        pval *streamind,*weekstart,*next,*pvalue;
        int ind, ind_type;
@@ -1384,7 +1383,7 @@ void php3_mcal_next_recurrence(INTERNAL_FUNCTION_PARAMETERS)
 
 /* {{{ proto string mcal_event_set_recur_daily(int stream_id,int year,int month,int day,int hour,int min,int sec,int interval
    create a daily recurrence */
-void php3_mcal_event_set_recur_daily(INTERNAL_FUNCTION_PARAMETERS)
+void PHP_FUNCTION(mcal_event_set_recur_daily)
 {
        pval *streamind,*year,*month,*day,*hour,*min,*sec,*interval;
        int ind, ind_type;
@@ -1423,7 +1422,7 @@ void php3_mcal_event_set_recur_daily(INTERNAL_FUNCTION_PARAMETERS)
 
 /* {{{ proto string mcal_event_set_recur_weekly(int stream_id,int year,int month,int day,int hour,int min,int sec,int interval, int weekdays)
 create a weekly recurrence */
-void php3_mcal_event_set_recur_weekly(INTERNAL_FUNCTION_PARAMETERS)
+void PHP_FUNCTION(mcal_event_set_recur_weekly)
 {
        pval *streamind,*year,*month,*day,*hour,*min,*sec,*interval,*weekdays;
        int ind, ind_type;
@@ -1462,7 +1461,7 @@ void php3_mcal_event_set_recur_weekly(INTERNAL_FUNCTION_PARAMETERS)
 
 /* {{{ proto string mcal_event_set_recur_monthly_mday(int stream_id,int year,int month,int day,int hour,int min,int sec,int interval)
  create a monthly by day recurrence */
-void php3_mcal_event_set_recur_monthly_mday(INTERNAL_FUNCTION_PARAMETERS)
+void PHP_FUNCTION(mcal_event_set_recur_monthly_mday)
 {
        pval *streamind,*year,*month,*day,*hour,*min,*sec,*interval;
        int ind, ind_type;
@@ -1501,7 +1500,7 @@ void php3_mcal_event_set_recur_monthly_mday(INTERNAL_FUNCTION_PARAMETERS)
 
 /* {{{ proto string mcal_event_set_recur_monthly_wday(int stream_id,int year,int month,int day,int hour,int min,int sec,int interval)
    create a monthy by week recurrence */
-void php3_mcal_event_set_recur_monthly_wday(INTERNAL_FUNCTION_PARAMETERS)
+void PHP_FUNCTION(mcal_event_set_recur_monthly_wday)
 {
        pval *streamind,*year,*month,*day,*hour,*min,*sec,*interval;
        int ind, ind_type;
@@ -1540,7 +1539,7 @@ void php3_mcal_event_set_recur_monthly_wday(INTERNAL_FUNCTION_PARAMETERS)
 
 /* {{{ proto string mcal_event_set_recur_yearly(int stream_id,int year,int month,int day,int hour,int min,int sec,int interval)
    create a yearly recurrence */
-void php3_mcal_event_set_recur_yearly(INTERNAL_FUNCTION_PARAMETERS)
+void PHP_FUNCTION(mcal_event_set_recur_yearly)
 {
        pval *streamind,*year,*month,*day,*hour,*min,*sec,*interval;
        int ind, ind_type;
index 5b58b1d23afdd9fa6a55ef69b34743e664808e60..05eb3dfa4e4e09096f65e3353998798c45652f1a 100644 (file)
 #endif
 
 /* Functions accessable to PHP */
-//extern zend_module_entry php3_mcal_module_entry;
-extern zend_module_entry php3_mcal_module_entry;
-#define php3_mcal_module_ptr &php3_mcal_module_entry
-#define phpext_mcal_ptr php3_mcal_module_ptr
+//extern zend_module_entry php_mcal_module_entry;
+extern zend_module_entry php_mcal_module_entry;
+#define php_mcal_module_ptr &php_mcal_module_entry
+#define phpext_mcal_ptr php_mcal_module_ptr
 
 #ifdef ZEND_VERSION
 extern PHP_MINIT_FUNCTION(mcal);
@@ -35,47 +35,47 @@ extern void PHP_MINFO_FUNCTION(void);
 extern int mcal_init_request(INIT_FUNC_ARGS);
 extern int mcal_end_request(void);
 void make_event_object();
-void php3_event_init();
-
-void php3_mcal_open(INTERNAL_FUNCTION_PARAMETERS);
-void php3_mcal_popen(INTERNAL_FUNCTION_PARAMETERS);
-void php3_mcal_reopen(INTERNAL_FUNCTION_PARAMETERS);
-void php3_mcal_close(INTERNAL_FUNCTION_PARAMETERS);
-void php3_mcal_fetch_event(INTERNAL_FUNCTION_PARAMETERS);
-void php3_mcal_list_events(INTERNAL_FUNCTION_PARAMETERS);
-void php3_mcal_create_calendar(INTERNAL_FUNCTION_PARAMETERS);
-void php3_mcal_rename_calendar(INTERNAL_FUNCTION_PARAMETERS);
-void php3_mcal_delete_calendar(INTERNAL_FUNCTION_PARAMETERS);
-void php3_mcal_store_event(INTERNAL_FUNCTION_PARAMETERS);
-void php3_mcal_delete_event(INTERNAL_FUNCTION_PARAMETERS);
-void php3_mcal_snooze(INTERNAL_FUNCTION_PARAMETERS);
-void php3_mcal_list_alarms(INTERNAL_FUNCTION_PARAMETERS);
-void php3_mcal_event_set_category(INTERNAL_FUNCTION_PARAMETERS);
-void php3_mcal_event_set_title(INTERNAL_FUNCTION_PARAMETERS);
-void php3_mcal_event_set_description(INTERNAL_FUNCTION_PARAMETERS);
-void php3_mcal_event_set_start(INTERNAL_FUNCTION_PARAMETERS);
-void php3_mcal_event_set_end(INTERNAL_FUNCTION_PARAMETERS);
-void php3_mcal_event_set_alarm(INTERNAL_FUNCTION_PARAMETERS);
-void php3_mcal_event_set_class(INTERNAL_FUNCTION_PARAMETERS);
-void php3_mcal_is_leap_year(INTERNAL_FUNCTION_PARAMETERS);
-void php3_mcal_days_in_month(INTERNAL_FUNCTION_PARAMETERS);
-void php3_mcal_date_valid(INTERNAL_FUNCTION_PARAMETERS);
-void php3_mcal_time_valid(INTERNAL_FUNCTION_PARAMETERS);
-void php3_mcal_day_of_week(INTERNAL_FUNCTION_PARAMETERS);
-void php3_mcal_day_of_year(INTERNAL_FUNCTION_PARAMETERS);
-void php3_mcal_date_compare(INTERNAL_FUNCTION_PARAMETERS);
-void php3_mcal_event_init(INTERNAL_FUNCTION_PARAMETERS);
-void php3_mcal_next_recurrence(INTERNAL_FUNCTION_PARAMETERS);
-void php3_mcal_event_set_recur_daily(INTERNAL_FUNCTION_PARAMETERS);
-void php3_mcal_event_set_recur_weekly(INTERNAL_FUNCTION_PARAMETERS);
-void php3_mcal_event_set_recur_monthly_mday(INTERNAL_FUNCTION_PARAMETERS);
-void php3_mcal_event_set_recur_monthly_wday(INTERNAL_FUNCTION_PARAMETERS);
-void php3_mcal_event_set_recur_yearly(INTERNAL_FUNCTION_PARAMETERS);
-void php3_mcal_fetch_current_stream_event(INTERNAL_FUNCTION_PARAMETERS);
+void php_mcal_event_init();
+
+PHP_FUNCTION(mcal_open);
+PHP_FUNCTION(mcal_popen);
+PHP_FUNCTION(mcal_reopen);
+PHP_FUNCTION(mcal_close);
+PHP_FUNCTION(mcal_fetch_event);
+PHP_FUNCTION(mcal_list_events);
+PHP_FUNCTION(mcal_create_calendar);
+PHP_FUNCTION(mcal_rename_calendar);
+PHP_FUNCTION(mcal_delete_calendar);
+PHP_FUNCTION(mcal_store_event);
+PHP_FUNCTION(mcal_delete_event);
+PHP_FUNCTION(mcal_snooze);
+PHP_FUNCTION(mcal_list_alarms);
+PHP_FUNCTION(mcal_event_set_category);
+PHP_FUNCTION(mcal_event_set_title);
+PHP_FUNCTION(mcal_event_set_description);
+PHP_FUNCTION(mcal_event_set_start);
+PHP_FUNCTION(mcal_event_set_end);
+PHP_FUNCTION(mcal_event_set_alarm);
+PHP_FUNCTION(mcal_event_set_class);
+PHP_FUNCTION(mcal_is_leap_year);
+PHP_FUNCTION(mcal_days_in_month);
+PHP_FUNCTION(mcal_date_valid);
+PHP_FUNCTION(mcal_time_valid);
+PHP_FUNCTION(mcal_day_of_week);
+PHP_FUNCTION(mcal_day_of_year);
+PHP_FUNCTION(mcal_date_compare);
+PHP_FUNCTION(mcal_event_init);
+PHP_FUNCTION(mcal_next_recurrence);
+PHP_FUNCTION(mcal_event_set_recur_daily);
+PHP_FUNCTION(mcal_event_set_recur_weekly);
+PHP_FUNCTION(mcal_event_set_recur_monthly_mday);
+PHP_FUNCTION(mcal_event_set_recur_monthly_wday);
+PHP_FUNCTION(mcal_event_set_recur_yearly);
+PHP_FUNCTION(mcal_fetch_current_stream_event);
 
 
 #else
-#define php3_mcal_module_ptr NULL
+#define php_mcal_module_ptr NULL
 #endif /* HAVE_MCAL */