cvs: /php3/functions php3_mcal.c

From: Date: Tue, 07 Sep 1999 18:31:56 +0000
Subject: cvs: /php3/functions php3_mcal.c
Groups: php.dev 
Request: Send a blank email to php-dev+get-10671@lists.php.net to get a copy of this message
musone Tue Sep 7 14:31:56 1999 EDT Modified files: /php3/functions php3_mcal.c Log: more php4->php3 backports Index: php3/functions/php3_mcal.c diff -u php3/functions/php3_mcal.c:1.15 php3/functions/php3_mcal.c:1.16 --- php3/functions/php3_mcal.c:1.15 Tue Sep 7 12:19:05 1999 +++ php3/functions/php3_mcal.c Tue Sep 7 14:31:54 1999 @@ -158,7 +158,7 @@ } -static int add_assoc_object(pval *arg, char *key, pval *tmp) +static int add_assoc_object(pval *arg, char *key, pval tmp) { return _php3_hash_update(arg->value.ht, key, strlen(key)+1, (void *) &tmp, sizeof(pval), NULL); } @@ -333,7 +333,7 @@ Fetch an event*/ void php3_mcal_fetch_event(INTERNAL_FUNCTION_PARAMETERS) { - pval *streamind,*eventid,*start,*end,*options=NULL; + pval *streamind,*eventid,start,end,*options=NULL; int ind, ind_type; pils *mcal_le_struct=NULL; CALEVENT *myevent; @@ -358,35 +358,39 @@ object_init(return_value); add_property_long(return_value,"id",myevent->id); add_property_long(return_value,"public",myevent->public); - object_init(start); + object_init(&start); + if(myevent->start.has_date) { - add_property_long(start,"year",myevent->start.year); - add_property_long(start,"month",myevent->start.mon); - add_property_long(start,"mday",myevent->start.mday); + add_property_long(&start,"year",myevent->start.year); + add_property_long(&start,"month",myevent->start.mon); + add_property_long(&start,"mday",myevent->start.mday); } if(myevent->start.has_time) { - add_property_long(start,"hour",myevent->start.hour); - add_property_long(start,"min",myevent->start.min); - add_property_long(start,"sec",myevent->start.sec); + add_property_long(&start,"hour",myevent->start.hour); + add_property_long(&start,"min",myevent->start.min); + add_property_long(&start,"sec",myevent->start.sec); } + + add_assoc_object(return_value, "start",start); - object_init(end); + object_init(&end); if(myevent->end.has_date) { - add_property_long(end,"year",myevent->end.year); - add_property_long(end,"month",myevent->end.mon); - add_property_long(end,"mday",myevent->end.mday); + add_property_long(&end,"year",myevent->end.year); + add_property_long(&end,"month",myevent->end.mon); + add_property_long(&end,"mday",myevent->end.mday); } if(myevent->end.has_time) { - add_property_long(end,"hour",myevent->end.hour); - add_property_long(end,"min",myevent->end.min); - add_property_long(end,"sec",myevent->end.sec); + add_property_long(&end,"hour",myevent->end.hour); + add_property_long(&end,"min",myevent->end.min); + add_property_long(&end,"sec",myevent->end.sec); } add_assoc_object(return_value, "end",end); + add_property_string(return_value,"category",myevent->category,1); add_property_string(return_value,"title",myevent->title,1);

« previous php.dev (#10671) next »