cvs: /php3/functions php3_mcal.c php3_mcal.h

From: Date: Tue, 07 Sep 1999 19:54:40 +0000
Subject: cvs: /php3/functions php3_mcal.c php3_mcal.h
Groups: php.dev 
Request: Send a blank email to php-dev+get-10674@lists.php.net to get a copy of this message
musone Tue Sep 7 15:54:40 1999 EDT Modified files: /php3/functions php3_mcal.c php3_mcal.h Log: more fixes, using more mcal api functions Index: php3/functions/php3_mcal.c diff -u php3/functions/php3_mcal.c:1.16 php3/functions/php3_mcal.c:1.17 --- php3/functions/php3_mcal.c:1.16 Tue Sep 7 14:31:54 1999 +++ php3/functions/php3_mcal.c Tue Sep 7 15:54:40 1999 @@ -64,8 +64,8 @@ CALSTREAM *mcal_stream; long public; char *category,*title,*description; - long alarm,start_year,start_month,start_mday,start_hour,start_min,start_sec,start_has_time; - long end_year,end_month,end_mday,end_hour,end_min,end_sec,end_has_time; + long alarm,start_year,start_month,start_mday,start_hour,start_min,start_sec,start_has_date,start_has_time; + long end_year,end_month,end_mday,end_hour,end_min,end_sec,end_has_date,end_has_time; long flags,class; } pils; @@ -100,6 +100,7 @@ {"mcal_event_set_title",php3_mcal_event_add_title,NULL}, {"mcal_event_set_description",php3_mcal_event_add_description,NULL}, {"mcal_event_set_start",php3_mcal_event_add_start,NULL}, + {"mcal_event_set_end",php3_mcal_event_add_end,NULL}, {"mcal_event_set_alarm",php3_mcal_event_add_alarm,NULL}, {"mcal_event_set_class",php3_mcal_event_add_class,NULL}, {"mcal_is_leap_year",php3_mcal_is_leap_year,NULL}, @@ -109,6 +110,7 @@ {"mcal_day_of_week",php3_mcal_day_of_week,NULL}, {"mcal_day_of_year",php3_mcal_day_of_year,NULL}, {"mcal_date_compare",php3_mcal_date_compare,NULL}, + {"mcal_event_init",php3_mcal_init_event,NULL}, {NULL, NULL, NULL} }; @@ -857,9 +859,9 @@ } else { - myevent->description=mcal_le_struct->description; - myevent->title=mcal_le_struct->title; - myevent->category=mcal_le_struct->category; + myevent->description=strdup(mcal_le_struct->description); + myevent->title=strdup(mcal_le_struct->title); + myevent->category=strdup(mcal_le_struct->category); myevent->alarm=mcal_le_struct->alarm; myevent->public=mcal_le_struct->class; myevent->start.year=mcal_le_struct->start_year; @@ -868,13 +870,14 @@ myevent->start.hour=mcal_le_struct->start_hour; myevent->start.min=mcal_le_struct->start_min; myevent->start.sec=mcal_le_struct->start_sec; - + myevent->start.has_date=true; myevent->end.year=mcal_le_struct->end_year; myevent->end.mon=mcal_le_struct->end_month; myevent->end.mday=mcal_le_struct->end_mday; myevent->end.hour=mcal_le_struct->end_hour; myevent->end.min=mcal_le_struct->end_min; myevent->end.sec=mcal_le_struct->start_sec; + myevent->end.has_date=true; } cal_append(mcal_le_struct->mcal_stream,"INBOX",&uid,myevent); calevent_free(myevent); @@ -1192,7 +1195,7 @@ php3_error(E_WARNING, "Unable to find stream pointer"); RETURN_FALSE; } - php3_event_init(&mcal_le_struct); + php3_event_init(mcal_le_struct); } /* }}} */ Index: php3/functions/php3_mcal.h diff -u php3/functions/php3_mcal.h:1.5 php3/functions/php3_mcal.h:1.6 --- php3/functions/php3_mcal.h:1.5 Tue Sep 7 11:07:51 1999 +++ php3/functions/php3_mcal.h Tue Sep 7 15:54:40 1999 @@ -1,4 +1,4 @@ -/* $Id: php3_mcal.h,v 1.5 1999/09/07 15:07:51 musone Exp $ */ +/* $Id: php3_mcal.h,v 1.6 1999/09/07 19:54:40 musone Exp $ */ #ifndef _INCLUDED_MCAL_H #define _INCLUDED_MCAL_H @@ -46,6 +46,7 @@ void php3_mcal_event_add_title(INTERNAL_FUNCTION_PARAMETERS); void php3_mcal_event_add_description(INTERNAL_FUNCTION_PARAMETERS); void php3_mcal_event_add_start(INTERNAL_FUNCTION_PARAMETERS); +void php3_mcal_event_add_end(INTERNAL_FUNCTION_PARAMETERS); void php3_mcal_event_add_alarm(INTERNAL_FUNCTION_PARAMETERS); void php3_mcal_event_add_class(INTERNAL_FUNCTION_PARAMETERS); void php3_mcal_is_leap_year(INTERNAL_FUNCTION_PARAMETERS); @@ -55,7 +56,7 @@ 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_init_event(INTERNAL_FUNCTION_PARAMETERS);

« previous php.dev (#10674) next »