aboutsummaryrefslogtreecommitdiffstats
path: root/libical
diff options
context:
space:
mode:
Diffstat (limited to 'libical')
-rw-r--r--libical/ChangeLog5
-rw-r--r--libical/src/libical/icalproperty.c19
2 files changed, 23 insertions, 1 deletions
diff --git a/libical/ChangeLog b/libical/ChangeLog
index 4b077f01ee..8b902fd4a9 100644
--- a/libical/ChangeLog
+++ b/libical/ChangeLog
@@ -1,3 +1,8 @@
+2000-10-20 Jesse Pavel <jpavel@helixcode.com>
+
+ * src/libical/icalproperty.c: added support for the
+ icalproperty_remove_parameter() function.
+
2000-10-11 Damon Chaplin <damon@helixcode.com>
* src/libical/icalparameter.c (icalparameter_as_ical_string):
diff --git a/libical/src/libical/icalproperty.c b/libical/src/libical/icalproperty.c
index 1040215108..b63c8a960a 100644
--- a/libical/src/libical/icalproperty.c
+++ b/libical/src/libical/icalproperty.c
@@ -382,9 +382,26 @@ icalproperty_add_parameter (icalproperty* prop,icalparameter* parameter)
void
icalproperty_remove_parameter (icalproperty* prop, icalparameter_kind kind)
{
+ struct icalproperty_impl *p = (struct icalproperty_impl*)prop;
+ icalparameter *param;
+ pvl_elem elem;
+
icalerror_check_arg_rv((prop!=0),"prop");
- assert(0); /* This routine is not implemented */
+ /* This routine is now implemented, so disregard the following
+ assertion. */
+ /* assert(0); */
+
+ elem = pvl_head (p->parameters);
+ while (elem != NULL) {
+ param = (icalparameter *)pvl_data (elem);
+ if (icalparameter_isa (param) == kind) {
+ pvl_remove (p->parameters, elem);
+ icalparameter_free (param);
+ break;
+ }
+ elem = pvl_next (elem);
+ }
}