#ifdef ZEND_VERSION
zend_module_entry php_mcal_module_entry = {
- CALVER, mcal_functions, PHP_MINIT(mcal), NULL, NULL, NULL, PHP_MINFO(mcal), 0, 0, 0, NULL
+ CALVER, mcal_functions, PHP_MINIT(mcal), NULL, NULL, NULL, PHP_MINFO(mcal), STANDARD_MODULE_PROPERTIES
};
#else
zend_module_entry php_mcal_module_entry = {"mcal", mcal_functions, PHP_MINIT_FUNCTION, NULL, NULL, NULL, PHP_MINFO_FUNCTION, 0, 0, 0, NULL};
/* {{{ proto int mcal_close(int stream_id [, int options])
Close an MCAL stream */
-void PHP_FUNCTION(mcal_close)
+PHP_FUNCTION(mcal_close)
{
pval *options, *streamind;
int ind, ind_type;
/* {{{ proto int mcal_open(string calendar, string user, string password [, int options])
Open an MCAL stream to a calendar */
-void PHP_FUNCTION(mcal_open)
+PHP_FUNCTION(mcal_open)
{
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 PHP_FUNCTION(mcal_reopen)
+PHP_FUNCTION(mcal_reopen)
{
pval *streamind;
pval *calendar;
/* {{{ proto int mcal_expunge(int stream_id)
Delete all messages marked for deletion */
-void PHP_FUNCTION(mcal_expunge)
+PHP_FUNCTION(mcal_expunge)
{
pval *streamind;
int ind, ind_type;
/* {{{ proto int mcal_fetch_event(int stream_id,int eventid, [int options])
Fetch an event*/
-void PHP_FUNCTION(mcal_fetch_event)
+PHP_FUNCTION(mcal_fetch_event)
{
pval *streamind,*eventid,*options=NULL;
int ind, ind_type;
/* {{{ proto object mcal_fetch_current_stream_event(int stream_id)
Fetch the current event stored in the stream's event structure*/
-void PHP_FUNCTION(mcal_fetch_current_stream_event)
+PHP_FUNCTION(mcal_fetch_current_stream_event)
{
pval *streamind;
int ind, ind_type;
/* {{{ proto array mcal_list_events(int stream_id,object begindate, [object enddate])
Returns list of UIDs for that day or range of days */
-void PHP_FUNCTION(mcal_list_events)
+PHP_FUNCTION(mcal_list_events)
{
pval *streamind,*startyear,*startmonth,*startday;
pval *endyear,*endmonth,*endday;
-#ifdef ZEND_VERSION
- pval **pvalue;
-#else
- pval *pvalue;
-#endif
int ind, ind_type;
pils *mcal_le_struct;
cal_list_t *my_cal_list;
/* {{{ proto string mcal_create_calendar(int stream_id, string calendar)
Create a new calendar*/
-void PHP_FUNCTION(mcal_create_calendar)
+PHP_FUNCTION(mcal_create_calendar)
{
pval *streamind, *calendar;
int ind, ind_type;
/* {{{ proto string mcal_rename(int stream_id, string src_calendar, string dest_calendar)
Rename a calendar*/
-void PHP_FUNCTION(mcal_rename_calendar)
+PHP_FUNCTION(mcal_rename_calendar)
{
pval *streamind, *src_calendar,*dest_calendar;
int ind, ind_type;
/* {{{ proto int mcal_reopen(int stream_id, array date, array time)
list alarms for a given time */
-void PHP_FUNCTION(mcal_list_alarms)
+PHP_FUNCTION(mcal_list_alarms)
{
pval *streamind, *year,*month,*day,*hour,*min,*sec;
-#ifdef ZEND_VERSION
- pval **pvalue;
-#else
- pval *pvalue;
-#endif
datetime_t mydate=DT_INIT;
int ind, ind_type;
pils *mcal_le_struct;
/* {{{ proto string mcal_delete_calendar(int stream_id, string calendar)
Delete calendar*/
-void PHP_FUNCTION(mcal_delete_calendar)
+PHP_FUNCTION(mcal_delete_calendar)
{
pval *streamind, *calendar;
int ind, ind_type;
/* {{{ proto string mcal_delete_event(int stream_id, int uid)
Delete event*/
-void PHP_FUNCTION(mcal_delete_event)
+PHP_FUNCTION(mcal_delete_event)
{
pval *streamind, *uid;
int ind, ind_type;
/* }}} */
-void PHP_FUNCTION(mcal_popen){
+PHP_FUNCTION(mcal_popen){
}
/* {{{ proto string mcal_store_event(int stream_id, object event)
Store an event*/
-void PHP_FUNCTION(mcal_store_event)
+PHP_FUNCTION(mcal_store_event)
{
- pval *streamind,*storeobject;
+ pval *streamind;
int ind, ind_type;
pils *mcal_le_struct;
int myargc;
/* {{{ proto string mcal_snooze(int stream_id, int uid)
Snooze an alarm*/
-void PHP_FUNCTION(mcal_snooze)
+PHP_FUNCTION(mcal_snooze)
{
pval *streamind,*uid;
int ind, ind_type;
/* {{{ proto string mcal_event_set_category(int stream_id, string category)
attach a category to an event*/
-void PHP_FUNCTION(mcal_event_set_category)
+PHP_FUNCTION(mcal_event_set_category)
{
pval *streamind,*category;
int ind, ind_type;
/* {{{ proto string mcal_event_set_title(int stream_id, string title)
attach a title to an event*/
-void PHP_FUNCTION(mcal_event_set_title)
+PHP_FUNCTION(mcal_event_set_title)
{
pval *streamind,*title;
int ind, ind_type;
/* {{{ proto string mcal_event_set_description(int stream_id, string description)
attach a description to an event*/
-void PHP_FUNCTION(mcal_event_set_description)
+PHP_FUNCTION(mcal_event_set_description)
{
pval *streamind,*description;
int ind, ind_type;
/* {{{ 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 PHP_FUNCTION(mcal_event_set_start)
+PHP_FUNCTION(mcal_event_set_start)
{
pval *streamind,*year,*month,*date,*hour,*min,*sec;
int ind, ind_type;
/* {{{ 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 PHP_FUNCTION(mcal_event_set_end)
+PHP_FUNCTION(mcal_event_set_end)
{
pval *streamind,*year,*month,*date,*hour,*min,*sec;
int ind, ind_type;
- int myhour,mymin,mysec;
+ /* initialize these to zero to make sure we don't use them
+ uninitialized (and to avoid the gcc warning) */
+ int myhour = 0; int mymin = 0; int mysec = 0;
pils *mcal_le_struct;
int myargc;
myargc=ARG_COUNT(ht);
/* {{{ proto int mcal_event_set_alarm(int stream_id, int alarm)
add an alarm to the streams global event */
-void PHP_FUNCTION(mcal_event_set_alarm)
+PHP_FUNCTION(mcal_event_set_alarm)
{
pval *streamind,*alarm;
int ind, ind_type;
/* {{{ proto int mcal_event_init(int stream_id)
initialize a streams global event */
-void PHP_FUNCTION(mcal_event_init)
+PHP_FUNCTION(mcal_event_init)
{
pval *streamind;
int ind, ind_type;
/* {{{ proto int mcal_event_set_class(int stream_id, int class)
add an class to the streams global event */
-void PHP_FUNCTION(mcal_event_set_class)
+PHP_FUNCTION(mcal_event_set_class)
{
pval *streamind,*class;
int ind, ind_type;
/* {{{ proto bool mcal_is_leap_year(int year)
returns true if year is a leap year, false if not */
-void PHP_FUNCTION(mcal_is_leap_year)
+PHP_FUNCTION(mcal_is_leap_year)
{
pval *year;
int myargc;
/* {{{ 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 PHP_FUNCTION(mcal_days_in_month)
+PHP_FUNCTION(mcal_days_in_month)
{
pval *month,*leap;
int myargc;
/* {{{ proto bool mcal_date_valid(int year,int month,int day)
returns true if the date is a valid date */
-void PHP_FUNCTION(mcal_date_valid)
+PHP_FUNCTION(mcal_date_valid)
{
pval *year,*month,*day;
int myargc;
/* {{{ proto bool mcal_time_valid(int hour,int min,int sec)
returns true if the time is a valid time */
-void PHP_FUNCTION(mcal_time_valid)
+PHP_FUNCTION(mcal_time_valid)
{
pval *hour,*min,*sec;
int myargc;
/* {{{ proto int mcal_day_of_week(int year,int month,int day)
returns the day of the week of the given date */
-void PHP_FUNCTION(mcal_day_of_week)
+PHP_FUNCTION(mcal_day_of_week)
{
pval *year,*month,*day;
int myargc;
/* {{{ proto int mcal_day_of_year(int year,int month,int day)
returns the day of the year of the given date */
-void PHP_FUNCTION(mcal_day_of_year)
+PHP_FUNCTION(mcal_day_of_year)
{
pval *year,*month,*day;
int myargc;
/* {{{ 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 PHP_FUNCTION(mcal_date_compare)
+PHP_FUNCTION(mcal_date_compare)
{
pval *ayear,*amonth,*aday;
pval *byear,*bmonth,*bday;
after the supplied date. Returns empty date field if event does not
occur or something is invalid.
*/
-void PHP_FUNCTION(mcal_next_recurrence)
+PHP_FUNCTION(mcal_next_recurrence)
{
pval *streamind,*weekstart,*next,*pvalue;
int ind, ind_type;
pils *mcal_le_struct;
int myargc;
datetime_t mydate;
- CALEVENT *myevent=NULL;
myargc=ARG_COUNT(ht);
if (myargc !=3 || getParameters(ht,myargc,&streamind,&weekstart,&next) == FAILURE) {
WRONG_PARAM_COUNT;
/* {{{ 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 PHP_FUNCTION(mcal_event_set_recur_daily)
+PHP_FUNCTION(mcal_event_set_recur_daily)
{
pval *streamind,*year,*month,*day,*hour,*min,*sec,*interval;
int ind, ind_type;
/* {{{ 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 PHP_FUNCTION(mcal_event_set_recur_weekly)
+PHP_FUNCTION(mcal_event_set_recur_weekly)
{
pval *streamind,*year,*month,*day,*hour,*min,*sec,*interval,*weekdays;
int ind, ind_type;
/* {{{ 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 PHP_FUNCTION(mcal_event_set_recur_monthly_mday)
+PHP_FUNCTION(mcal_event_set_recur_monthly_mday)
{
pval *streamind,*year,*month,*day,*hour,*min,*sec,*interval;
int ind, ind_type;
/* {{{ 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 PHP_FUNCTION(mcal_event_set_recur_monthly_wday)
+PHP_FUNCTION(mcal_event_set_recur_monthly_wday)
{
pval *streamind,*year,*month,*day,*hour,*min,*sec,*interval;
int ind, ind_type;
/* {{{ 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 PHP_FUNCTION(mcal_event_set_recur_yearly)
+PHP_FUNCTION(mcal_event_set_recur_yearly)
{
pval *streamind,*year,*month,*day,*hour,*min,*sec,*interval;
int ind, ind_type;