summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAllen Winter <allen.winter@kdab.com>2016-12-21 18:21:23 -0500
committerAllen Winter <allen.winter@kdab.com>2016-12-21 18:21:23 -0500
commit59cbd599c0b22c2ba2e1b2ed4778f30ca0de40f4 (patch)
treeb4519083ba6dff2daf56ab2a36e66fad52623243
parent3678f01bda891dc056959db309e32da525a22ec6 (diff)
downloadlibical-git-59cbd599c0b22c2ba2e1b2ed4778f30ca0de40f4.tar.gz
* Signature changed for functions:
+ VObject *Parse_MIME_FromFileName(const char *fname) + icalgauge *icalgauge_new_from_sql(const char *sql, int expand) + const char *icallangbind_property_eval_string(icalproperty *prop, const char *sep) + const char *icallangbind_property_eval_string_r(icalproperty *prop, const char *sep) + void set_zone_directory(const char *path) + icalcalendar *icalcalendar_new(const char *dir) + int icalrecur_expand_recurrence(const char *rule, time_t start, int count, time_t *array) issue#276
-rw-r--r--ConfigureChecks.cmake2
-rw-r--r--ReleaseNotes.txt10
-rw-r--r--doc/UsingLibical.txt2
-rw-r--r--src/Net-ICal-Libical/lib/Net/ICal/Libical.pm48
-rw-r--r--src/Net-ICal-Libical/netical.i85
-rw-r--r--src/libical-glib/api/i-cal-langbind.xml2
-rw-r--r--src/libical-glib/api/i-cal-recur.xml38
-rw-r--r--src/libical-glib/api/i-cal-timezone.xml6
-rw-r--r--src/libical/icalcomponent.c1
-rw-r--r--src/libical/icalderivedproperty.c.in1
-rw-r--r--src/libical/icallangbind.c4
-rw-r--r--src/libical/icallangbind.h8
-rw-r--r--src/libical/icalrecur.c2
-rw-r--r--src/libical/icalrecur.h7
-rw-r--r--src/libical/icaltimezone.c2
-rw-r--r--src/libical/icaltimezone.h3
-rw-r--r--src/libicalss/icalcalendar.c2
-rw-r--r--src/libicalss/icalcalendar.h3
-rw-r--r--src/libicalss/icalgauge.c4
-rw-r--r--src/libicalss/icalgauge.h4
-rw-r--r--src/libicalvcal/vcc.c2
-rw-r--r--src/libicalvcal/vcc.h3
-rw-r--r--src/libicalvcal/vcc.y2
-rw-r--r--src/python/LibicalWrap_icaltimezone.i39
-rw-r--r--src/test/builtin_timezones.c2
-rw-r--r--src/test/regression-storage.c1
-rw-r--r--src/test/regression.c70
-rw-r--r--src/test/testvcal.c2
-rw-r--r--src/test/timezones.c2
29 files changed, 176 insertions, 181 deletions
diff --git a/ConfigureChecks.cmake b/ConfigureChecks.cmake
index bb115381..e4d0e2ec 100644
--- a/ConfigureChecks.cmake
+++ b/ConfigureChecks.cmake
@@ -55,7 +55,7 @@ check_function_exists(iswspace HAVE_ISWSPACE) #Linux <wctype.h>
check_function_exists(setenv HAVE_SETENV)
check_function_exists(unsetenv HAVE_UNSETENV)
check_function_exists(snprintf HAVE_SNPRINTF) #Available with MSVC 2015
-#TODO:V2:BUILDSYSTEM:Figure out why check_function_exists fails to find snprintf for MSVC2015
+#TODO:BUILDSYSTEM:Figure out why check_function_exists fails to find snprintf for MSVC2015
if(MSVC_VERSION GREATER 1899)
set(HAVE_SNPRINTF true)
endif()
diff --git a/ReleaseNotes.txt b/ReleaseNotes.txt
index cc1badef..ab8f2ea3 100644
--- a/ReleaseNotes.txt
+++ b/ReleaseNotes.txt
@@ -15,11 +15,19 @@ Version 3.0.0:
+ icalvalue_new_datetimedate (DATE or DATE-TIME)
+ icalvalue_set_datetimedate
+ icalvalue_get_datetimedate
- * Removed deprecated functions
+ * Removed deprecated functions:
+ icaltime_from_timet (use icaltime_from_timet_with_zone)
+ icaltime_start_day_of_week (use icaltime_start_day_week)
+ icalproperty_remove_parameter (use icalproperty_remove_parameter_by_kind)
+ icalproperty_string_to_enum (use icalproperty_kind_and_string_to_enum)
+ * Signature changed for functions:
+ + VObject *Parse_MIME_FromFileName(const char *fname)
+ + icalgauge *icalgauge_new_from_sql(const char *sql, int expand)
+ + const char *icallangbind_property_eval_string(icalproperty *prop, const char *sep)
+ + const char *icallangbind_property_eval_string_r(icalproperty *prop, const char *sep)
+ + void set_zone_directory(const char *path)
+ + icalcalendar *icalcalendar_new(const char *dir)
+ + int icalrecur_expand_recurrence(const char *rule, time_t start, int count, time_t *array)
Version 2.0.0:
--------------
diff --git a/doc/UsingLibical.txt b/doc/UsingLibical.txt
index dd4217c4..69cdd443 100644
--- a/doc/UsingLibical.txt
+++ b/doc/UsingLibical.txt
@@ -1071,7 +1071,7 @@ test for the properties within a components; only components that
pass the test are returned. A gauge can be constructed from a MINSQL
string with:
-icalgauge* icalgauge_new_from_sql(char* sql);
+icalgauge* icalgauge_new_from_sql(const char* sql);
Then, you can add the gauge to the set with :
diff --git a/src/Net-ICal-Libical/lib/Net/ICal/Libical.pm b/src/Net-ICal-Libical/lib/Net/ICal/Libical.pm
index d78b0c46..e59362b5 100644
--- a/src/Net-ICal-Libical/lib/Net/ICal/Libical.pm
+++ b/src/Net-ICal-Libical/lib/Net/ICal/Libical.pm
@@ -2,10 +2,10 @@
# -*- Mode: perl -*-
#======================================================================
# FILE: Libical.pm
-# CREATOR: eric
+# CREATOR: eric
#
# DESCRIPTION:
-#
+#
#
# $Id: Libical.pm,v 1.8 2001-03-03 05:44:01 ebusboom Exp $
# $Locker: $
@@ -15,7 +15,7 @@
# This package is free software and is provided "as is" without express
# or implied warranty. It may be used, redistributed and/or modified
# under the same terms as perl itself. ( Either the Artistic License or the
-# GPL. )
+# GPL. )
#
#======================================================================
@@ -44,15 +44,15 @@ $VERSION = "0.01";
sub validate_component {
my $comp_str = shift;
-
- my $c = Net::ICal::Libical::icalparser_parse_string($comp_str);
+
+ my $c = Net::ICal::Libical::icalparser_parse_string($comp_str);
my $out;
die "Failed to parse component" if !$c;
my $r = Net::ICal::Libical::icalrestriction_check($c);
-
+
$out = Net::ICal::Libical::icalcomponent_as_ical_string($c);
Net::ICal::Libical::icalcomponent_free($c);
@@ -72,8 +72,8 @@ sub generate_occurrences {
my $array = Net::ICal::Libical::icallangbind_new_array(25);
Net::ICal::Libical::icalrecur_expand_recurrence($rule,$start,
- $count,$array);
-
+ $count,$array);
+
for($i = 0; $i<$count; $i++){
my $t = Net::ICal::Libical::icallangbind_access_array($array,$i);
if($t != 0) {
@@ -92,7 +92,7 @@ sub generate_occurrences {
# perl binding to libical. Currently, it is looking for an author....
-
+
1;
@@ -115,7 +115,7 @@ sub valid { }
# """ Return or set time in seconds past POSIX epoch"""
sub utc_seconds {}
-# """ Return or set boolean indicating if time is in UTC """
+# """ Return or set boolean indicating if time is in UTC """
sub is_utc {}
# Get/Set booll indicating is time is a date
@@ -177,14 +177,14 @@ sub start {}
#The return value is an instance of Time.
#If the Period has a duration set, but not an end time, this
-#method will caluculate the end time from the duration.
+#method will caluculate the end time from the duration.
sub end {}
#Return or set the duration of the period. The duration may be
#expressed as an RFC2445 format string or an instance of Duration.
#The return value is an instance of Duration.
#If the period has an end time set, but not a duration, this
-#method will calculate the duration from the end time.
+#method will calculate the duration from the end time.
sub duration{}
# Get set the timezone for the period. Basically returns self->dict{TZID}
@@ -224,7 +224,7 @@ package Net::ICal::Libical::Recurrence_Id;
package Net::ICal::Libical::Attach;
@ISA= (Property)
-
+
package Net::ICal::Libical::Event;
@ISA= (Component)
@@ -254,7 +254,7 @@ sub dtend{}
#If the duration value is being set and dtend() has a value, the dtend
#property will be removed.
sub duration{}
-
+
#Sets attendees or returns a list of Attendee objects.
sub attendees {}
@@ -283,14 +283,14 @@ sub recurrence_id{}
#Usage:
#sequence(1) # Set the value using an integer
#sequence('2') # Set the value using a string containing an integer
-#sequence() # Return an integer
+#sequence() # Return an integer
sub sequence{}
-
+
#Sets or returns the value of the LAST-MODIFIED property.
#Usage:
#lastmodified(time_obj) # Set the value using a Time object
#lastmodified('19970101T123000Z')# Set using an iCalendar string
-#lastmodified(982362522) # Set using seconds
+#lastmodified(982362522) # Set using seconds
#lastmodified() # Return a Time
sub lastmodified{}
@@ -300,7 +300,7 @@ sub lastmodified{}
#Usage:
#created(time_obj) # Set the value using a Time object
#created('19970101T123000Z') # Set using an iCalendar string
-#created(982362522) # Set using seconds
+#created(982362522) # Set using seconds
#created() # Return a Time
sub created {}
@@ -319,11 +319,11 @@ sub attach{}
#Represents a set of event occurrences. This
#package controls a component's RRULE, EXRULE, RDATE and EXDATE
-#properties and can produce from them a set of occurrences.
-package Net::ICal::Libical::RecurrenceSet:
+#properties and can produce from them a set of occurrences.
+package Net::ICal::Libical::RecurrenceSet:
-#Include a date or rule to the set.
+#Include a date or rule to the set.
#Use date= or pass in a
#Time instance to include a date. Included dates will add an
#RDATE property or will remove an EXDATE property of the same
@@ -334,7 +334,7 @@ package Net::ICal::Libical::RecurrenceSet:
sub include{}
-#Exclude date or rule to the set.
+#Exclude date or rule to the set.
#Use date= or pass in a Time instance to exclude a
#date. Excluded dates will add an EXDATE property or will remove
#an RDATE property of the same date.
@@ -350,7 +350,7 @@ package Net::ICal::Libical::Store;
sub new{}
sub path{}
sub mark{}
-sub commit{}
+sub commit{}
sub addComponent{}
sub removeComponent{}
sub countComponents{}
@@ -369,7 +369,7 @@ package Net::ICal::Libical::FileStore;
sub new{}
sub path{}
sub mark{}
-sub commit{}
+sub commit{}
sub addComponent{}
sub removeComponent{}
sub countComponents{}
diff --git a/src/Net-ICal-Libical/netical.i b/src/Net-ICal-Libical/netical.i
index 19bea6ef..a9e42ab7 100644
--- a/src/Net-ICal-Libical/netical.i
+++ b/src/Net-ICal-Libical/netical.i
@@ -21,7 +21,7 @@
Contributions from:
Graham Davison (g.m.davison@computer.org)
- ======================================================================*/
+ ======================================================================*/
%module Net__ICal__Libical
@@ -55,22 +55,22 @@ void icalcomponent_convert_errors(icalcomponent* component);
icalproperty* icalcomponent_get_current_property(icalcomponent* component);
icalproperty* icalcomponent_get_first_property(icalcomponent* component,
- icalproperty_kind kind);
+ icalproperty_kind kind);
icalproperty* icalcomponent_get_next_property(icalcomponent* component,
- icalproperty_kind kind);
+ icalproperty_kind kind);
icalcomponent* icalcomponent_get_current_component (icalcomponent* component);
icalcomponent* icalcomponent_get_first_component(icalcomponent* component,
- icalcomponent_kind kind);
+ icalcomponent_kind kind);
icalcomponent* icalcomponent_get_next_component(icalcomponent* component,
- icalcomponent_kind kind);
+ icalcomponent_kind kind);
void icalcomponent_add_property(icalcomponent* component,
- icalproperty* property);
+ icalproperty* property);
void icalcomponent_remove_property(icalcomponent* component,
- icalproperty* property);
+ icalproperty* property);
icalcomponent* icalcomponent_get_parent(icalcomponent* component);
@@ -81,7 +81,7 @@ int icalrestriction_check(icalcomponent* comp);
/* actually returns icalproperty_kind */
-int icalproperty_string_to_kind(const char* string);
+int icalproperty_string_to_kind(const char* string);
/* actually takes icalproperty_kind */
icalproperty* icalproperty_new(int kind);
@@ -102,10 +102,10 @@ const char* icalproperty_get_parameter_as_string(icalproperty* prop,
icalcomponent* icalproperty_get_parent(icalproperty* property);
typedef enum icalerrorenum {
-
+
ICAL_BADARG_ERROR,
ICAL_NEWFAILED_ERROR,
- ICAL_MALFORMEDDATA_ERROR,
+ ICAL_MALFORMEDDATA_ERROR,
ICAL_PARSE_ERROR,
ICAL_INTERNAL_ERROR, /* Like assert --internal consist. prob */
ICAL_FILE_ERROR,
@@ -117,7 +117,7 @@ typedef enum icalerrorenum {
} icalerrorenum;
/* Make an individual error fatal or non-fatal. */
-typedef enum icalererorstate {
+typedef enum icalererorstate {
ICAL_ERROR_FATAL, /* Not fata */
ICAL_ERROR_NONFATAL, /* Fatal */
ICAL_ERROR_DEFAULT, /* Use the value of icalerror_errors_are_fatal*/
@@ -146,8 +146,8 @@ icalvalue_kind icalenum_property_kind_to_value_kind(icalproperty_kind kind);
int* icallangbind_new_array(int size);
void icallangbind_free_array(int* array);
int icallangbind_access_array(int* array, int index);
-int icalrecur_expand_recurrence(char* rule, int start,
- int count, int* array);
+int icalrecur_expand_recurrence(const char* rule, int start,
+ int count, int* array);
/* Iterate through properties and components using strings for the kind */
@@ -168,28 +168,28 @@ icalcomponent* icallangbind_get_next_component(icalcomponent *c,
generated a hash that holds the property's name, value and
parameters. Sep is the hash seperation string, "=>" for perl and
":" for python */
-const char* icallangbind_property_eval_string(icalproperty* prop, char* sep);
+const char* icallangbind_property_eval_string(icalproperty* prop, const char* sep);
/***********************************************************************
- Time routines
+ Time routines
***********************************************************************/
struct icaltimetype
{
- int year;
- int month;
- int day;
- int hour;
- int minute;
- int second;
+ int year;
+ int month;
+ int day;
+ int hour;
+ int minute;
+ int second;
+
+ int is_utc; /* 1-> time is in UTC timezone */
- int is_utc; /* 1-> time is in UTC timezone */
+ int is_date; /* 1 -> interpret this as date. */
- int is_date; /* 1 -> interpret this as date. */
-
- const char* zone; /*Ptr to Olsen placename. Libical does not own mem*/
-};
+ const char* zone; /*Ptr to Olsen placename. Libical does not own mem*/
+};
/* Convert seconds past UNIX epoch to a timetype*/
@@ -215,11 +215,11 @@ int icaltime_utc_offset(struct icaltimetype tt, const char* tzid);
/* convert tt, of timezone tzid, into a utc time. Does nothing if the
time is already UTC. */
struct icaltimetype icaltime_as_utc(struct icaltimetype tt,
- const char* tzid);
+ const char* tzid);
/* convert tt, a time in UTC, into a time in timezone tzid */
struct icaltimetype icaltime_as_zone(struct icaltimetype tt,
- const char* tzid);
+ const char* tzid);
/* Return a null time, which indicates no time has been set. This time represent the beginning of the epoch */
struct icaltimetype icaltime_null_time(void);
@@ -269,18 +269,18 @@ short icaltime_days_in_month(short month,short year);
/***********************************************************************
- Duration Routines
+ Duration Routines
***********************************************************************/
struct icaldurationtype
{
- int is_neg;
- unsigned int days;
- unsigned int weeks;
- unsigned int hours;
- unsigned int minutes;
- unsigned int seconds;
+ int is_neg;
+ unsigned int days;
+ unsigned int weeks;
+ unsigned int hours;
+ unsigned int minutes;
+ unsigned int seconds;
};
struct icaldurationtype icaldurationtype_from_int(int t);
@@ -291,22 +291,22 @@ struct icaldurationtype icaldurationtype_null_duration();
int icaldurationtype_is_null_duration(struct icaldurationtype d);
struct icaltimetype icaltime_add(struct icaltimetype t,
- struct icaldurationtype d);
+ struct icaldurationtype d);
struct icaldurationtype icaltime_subtract(struct icaltimetype t1,
- struct icaltimetype t2);
+ struct icaltimetype t2);
/***********************************************************************
- Period Routines
+ Period Routines
***********************************************************************/
-struct icalperiodtype
+struct icalperiodtype
{
- struct icaltimetype start;
- struct icaltimetype end;
- struct icaldurationtype duration;
+ struct icaltimetype start;
+ struct icaltimetype end;
+ struct icaldurationtype duration;
};
struct icalperiodtype icalperiodtype_from_string (const char* str);
@@ -315,4 +315,3 @@ const char* icalperiodtype_as_ical_string(struct icalperiodtype p);
struct icalperiodtype icalperiodtype_null_period();
int icalperiodtype_is_null_period(struct icalperiodtype p);
int icalperiodtype_is_valid_period(struct icalperiodtype p);
-
diff --git a/src/libical-glib/api/i-cal-langbind.xml b/src/libical-glib/api/i-cal-langbind.xml
index e2b20d33..0bd808c7 100644
--- a/src/libical-glib/api/i-cal-langbind.xml
+++ b/src/libical-glib/api/i-cal-langbind.xml
@@ -65,7 +65,7 @@
</method>
<method name="i_cal_langbind_property_eval_string_r" corresponds="icallangbind_property_eval_string_r" since="1.0">
<parameter type="ICalProperty *" name="prop" comment="The #ICalComponent to be translated."/>
- <parameter type="gchar *" name="sep" comment="The seperator."/>
+ <parameter type="const gchar *" name="sep" comment="The seperator."/>
<returns type="gchar *" annotation="transfer full" comment="The sring representation of @prop"/>
<comment xml:space="preserve">Translate the #ICalProperty into the string representation.</comment>
</method>
diff --git a/src/libical-glib/api/i-cal-recur.xml b/src/libical-glib/api/i-cal-recur.xml
index 8ce3afa8..0345996e 100644
--- a/src/libical-glib/api/i-cal-recur.xml
+++ b/src/libical-glib/api/i-cal-recur.xml
@@ -15,25 +15,25 @@
-->
<structure namespace="ICal" name="Recur">
<method name="i_cal_recur_expand_recurrence" corresponds="CUSTOM" since="1.0">
- <parameter type="gchar *" name="rule" comment="The rule of the recurrence."/>
+ <parameter type="const gchar *" name="rule" comment="The rule of the recurrence."/>
<parameter type="time_t" name="start" comment="the start seconds past the POSIX epoch."/>
<parameter type="gint" name="count" comment="The number of elements to be filled up in the @array."/>
<returns type="GArray *" annotation="array, element-type long, transfer full" comment="If successful, return the array. NULL if failed."/>
<comment xml:space="preserve">Fill an array with the 'count' number of occurrences generated by the rrule. Note that the times are returned in UTC, but the times are calculated in local time. YOu will have to convert the results back into local time before using them.</comment>
- <custom> time_t *array;
- GArray *garray;
- gint result;
- g_return_val_if_fail (rule != NULL, 0);
- array = g_new (time_t, count);
- result = icalrecur_expand_recurrence (rule, start, count, array);
- if (result == 0) {
- g_free (array);
- return NULL;
- } else {
- garray = g_array_new (FALSE, FALSE, sizeof (time_t));
- g_array_append_vals (garray, array, count);
- return garray;
- }</custom>
+ <custom> time_t *array;
+ GArray *garray;
+ gint result;
+ g_return_val_if_fail (rule != NULL, 0);
+ array = g_new (time_t, count);
+ result = icalrecur_expand_recurrence (rule, start, count, array);
+ if (result == 0) {
+ g_free (array);
+ return NULL;
+ } else {
+ garray = g_array_new (FALSE, FALSE, sizeof (time_t));
+ g_array_append_vals (garray, array, count);
+ return garray;
+ }</custom>
</method>
<method name="i_cal_recur_string_to_weekday" corresponds="icalrecur_string_to_weekday" since="1.0">
<parameter type="const gchar *" name="str" comment="The string representation of the weekday."/>
@@ -44,7 +44,7 @@
<parameter type="ICalRecurrenceTypeWeekday" name="kind" comment="The freqeuncy enum"/>
<returns type="const gchar *" comment="The string representation of weekday"/>
<comment xml:space="preserve">Convert a enum representation to a string representation for the weekday.</comment>
- </method>
+ </method>
<method name="i_cal_recur_string_to_freq" corresponds="icalrecur_string_to_freq" since="2.0">
<parameter type="const gchar *" name="str" comment="The string representation of the frequency."/>
<returns type="ICalRecurrenceTypeFrequency" comment="The enum representation of the frequency."/>
@@ -54,8 +54,8 @@
<parameter type="ICalRecurrenceTypeFrequency" name="kind" comment="The freqeuncy enum"/>
<returns type="const gchar *" comment="The string representation of frequency"/>
<comment xml:space="preserve">Convert a enum representation to a string representation for the frequency.</comment>
- </method>
- <method name="i_cal_recur_string_to_skip" corresponds="icalrecur_string_to_skip" since="2.0">
+ </method>
+ <method name="i_cal_recur_string_to_skip" corresponds="icalrecur_string_to_skip" since="2.0">
<parameter type="const gchar *" name="str" comment="The string representation of the skip."/>
<returns type="ICalRecurrenceTypeSkip" comment="The enum representation of the skip."/>
<comment xml:space="preserve">Convert a string representation to an enum representation for the skip.</comment>
@@ -64,5 +64,5 @@
<parameter type="ICalRecurrenceTypeSkip" name="kind" comment="The freqeuncy enum"/>
<returns type="const gchar *" comment="The string representation of skip"/>
<comment xml:space="preserve">Convert a enum representation to a string representation for the skip.</comment>
- </method>
+ </method>
</structure>
diff --git a/src/libical-glib/api/i-cal-timezone.xml b/src/libical-glib/api/i-cal-timezone.xml
index 066a5b39..ed915aad 100644
--- a/src/libical-glib/api/i-cal-timezone.xml
+++ b/src/libical-glib/api/i-cal-timezone.xml
@@ -21,7 +21,7 @@
<method name="i_cal_timezone_destroy" corresponds="CUSTOM" annotation="skip" kind="private" since="1.0">
<parameter type="icaltimezone *" name="zone" comment="The #ICalTimezone to be freed"/>
<comment xml:space="preserve">The destructor of the type #ICalTimezone to fully destroy the object by providing 1 as the second argument of i_cal_time_zone_free. The method is used as a default destructor for introspection.</comment>
- <custom> icaltimezone_free (zone, 1);</custom>
+ <custom> icaltimezone_free (zone, 1);</custom>
</method>
<method name="i_cal_timezone_copy" corresponds="icaltimezone_copy" kind="clone" since="1.0">
<parameter type="const ICalTimezone *" name="zone" comment="The #ICalTimezone needs to be cloned."/>
@@ -153,7 +153,7 @@
<comment xml:space="preserve">Get the name of the vtimezone in component.</comment>
</method>
<method name="i_cal_timezone_set_zone_directory" corresponds ="set_zone_directory" kind ="others" since="1.0">
- <parameter type="gchar *" name="path" comment="The path to look for the zonefiles"/>
+ <parameter type="const gchar *" name="path" comment="The path to look for the zonefiles"/>
<comment xml:space="preserve">Set the directory to look for the zonefiles</comment>
</method>
<method name="i_cal_timezone_free_zone_directory" corresponds="free_zone_directory" kind ="others" since="1.0">
@@ -182,6 +182,6 @@
<parameter type="guint" name="index" comment="The index"/>
<returns type="ICalTimezone *" annotation="transfer full" translator_argus="timezones, FALSE" comment="The #ICalTimezone at the position @index in @timezones."/>
<comment>Get the #ICalTimezone at specified position in array.</comment>
- <custom> return i_cal_timezone_new_full ((gpointer)i_cal_array_element_at (timezones, index), (GObject *)timezones, FALSE);</custom>
+ <custom> return i_cal_timezone_new_full ((gpointer)i_cal_array_element_at (timezones, index), (GObject *)timezones, FALSE);</custom>
</method>
</structure>
diff --git a/src/libical/icalcomponent.c b/src/libical/icalcomponent.c
index b05eea48..db4be9da 100644
--- a/src/libical/icalcomponent.c
+++ b/src/libical/icalcomponent.c
@@ -116,7 +116,6 @@ icalcomponent *icalcomponent_new(icalcomponent_kind kind)
/** @brief Constructor
*/
-//TODO:V3:API:Is there a way to change the API so -Wvarargs doesn't complain?
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Wvarargs"
icalcomponent *icalcomponent_vanew(icalcomponent_kind kind, ...)
diff --git a/src/libical/icalderivedproperty.c.in b/src/libical/icalderivedproperty.c.in
index c12d878e..2da4a61b 100644
--- a/src/libical/icalderivedproperty.c.in
+++ b/src/libical/icalderivedproperty.c.in
@@ -52,7 +52,6 @@ struct icalproperty_enum_map
const char *str;
};
-//TODO:V3:API:Is there a way to change the API so -Wvarargs doesn't complain?
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Wvarargs"
<insert_code_here>
diff --git a/src/libical/icallangbind.c b/src/libical/icallangbind.c
index bb54d55f..72e26ad6 100644
--- a/src/libical/icallangbind.c
+++ b/src/libical/icallangbind.c
@@ -141,7 +141,7 @@ icalcomponent *icallangbind_get_next_component(icalcomponent *c, const char *com
#define APPENDC(x) icalmemory_append_char(&buf, &buf_ptr, &buf_size, x);
-char *icallangbind_property_eval_string_r(icalproperty *prop, char *sep)
+char *icallangbind_property_eval_string_r(icalproperty *prop, const char *sep)
{
char tmp[25];
size_t buf_size = 1024;
@@ -269,7 +269,7 @@ char *icallangbind_property_eval_string_r(icalproperty *prop, char *sep)
return buf;
}
-const char *icallangbind_property_eval_string(icalproperty *prop, char *sep)
+const char *icallangbind_property_eval_string(icalproperty *prop, const char *sep)
{
char *buf;
diff --git a/src/libical/icallangbind.h b/src/libical/icallangbind.h
index b88b0fc5..90e78f14 100644
--- a/src/libical/icallangbind.h
+++ b/src/libical/icallangbind.h
@@ -46,11 +46,11 @@ LIBICAL_ICAL_EXPORT icalparameter *icallangbind_get_first_parameter(icalproperty
LIBICAL_ICAL_EXPORT icalparameter *icallangbind_get_next_parameter(icalproperty *prop);
-/*TODO:V3:API:const char *icallangbind_property_eval_string(icalproperty *prop, const char *sep);*/
-LIBICAL_ICAL_EXPORT const char *icallangbind_property_eval_string(icalproperty *prop, char *sep);
+LIBICAL_ICAL_EXPORT const char *icallangbind_property_eval_string(icalproperty *prop,
+ const char *sep);
-/*TODO:V3:API:char *icallangbind_property_eval_string_r(icalproperty *prop, const char *sep);*/
-LIBICAL_ICAL_EXPORT char *icallangbind_property_eval_string_r(icalproperty *prop, char *sep);
+LIBICAL_ICAL_EXPORT char *icallangbind_property_eval_string_r(icalproperty *prop,
+ const char *sep);
LIBICAL_ICAL_EXPORT int icallangbind_string_to_open_flag(const char *str);
diff --git a/src/libical/icalrecur.c b/src/libical/icalrecur.c
index fe17afb2..9ed683b9 100644
--- a/src/libical/icalrecur.c
+++ b/src/libical/icalrecur.c
@@ -2869,7 +2869,7 @@ int icalrecurrencetype_month_month(short month)
* back into local time before using them.
*/
-int icalrecur_expand_recurrence(char *rule,
+int icalrecur_expand_recurrence(const char *rule,
time_t start, int count, time_t *array)
{
struct icalrecurrencetype recur;
diff --git a/src/libical/icalrecur.h b/src/libical/icalrecur.h
index f380d77e..084e78a6 100644
--- a/src/libical/icalrecur.h
+++ b/src/libical/icalrecur.h
@@ -45,7 +45,7 @@ Or, just make them up:
2) Create an iterator
@code
- icalrecur_iterator* ritr;
+ icalrecur_iterator *ritr;
ritr = icalrecur_iterator_new(recur,start);
@endcode
@@ -243,8 +243,7 @@ LIBICAL_ICAL_EXPORT void icalrecur_iterator_free(icalrecur_iterator *);
* Fills array up with at most 'count' time_t values, each
* representing an occurrence time in seconds past the POSIX epoch
*/
-/*TODO:V3:API:int icalrecur_expand_recurrence(const char *rule, time_t start,...)*/
-LIBICAL_ICAL_EXPORT int icalrecur_expand_recurrence(char *rule, time_t start,
- int count, time_t * array);
+LIBICAL_ICAL_EXPORT int icalrecur_expand_recurrence(const char *rule, time_t start,
+ int count, time_t *array);
#endif
diff --git a/src/libical/icaltimezone.c b/src/libical/icaltimezone.c
index 3b0ac143..1401ecff 100644
--- a/src/libical/icaltimezone.c
+++ b/src/libical/icaltimezone.c
@@ -2038,7 +2038,7 @@ static const char *get_zone_directory(void)
#endif
}
-void set_zone_directory(char *path)
+void set_zone_directory(const char *path)
{
if (zone_files_directory)
free_zone_directory();
diff --git a/src/libical/icaltimezone.h b/src/libical/icaltimezone.h
index eac848c9..b1bb54f3 100644
--- a/src/libical/icaltimezone.h
+++ b/src/libical/icaltimezone.h
@@ -159,8 +159,7 @@ LIBICAL_ICAL_EXPORT char *icaltimezone_get_tznames_from_vtimezone(icalcomponent
*/
/** Set the directory to look for the zonefiles */
-/*TODO:V3:API:void set_zone_directory(const char *path);*/
-LIBICAL_ICAL_EXPORT void set_zone_directory(char *path);
+LIBICAL_ICAL_EXPORT void set_zone_directory(const char *path);
/** Free memory dedicated to the zonefile directory */
LIBICAL_ICAL_EXPORT void free_zone_directory(void);
diff --git a/src/libicalss/icalcalendar.c b/src/libicalss/icalcalendar.c
index cca51d00..e51a4150 100644
--- a/src/libicalss/icalcalendar.c
+++ b/src/libicalss/icalcalendar.c
@@ -83,7 +83,7 @@ static icalerrorenum icalcalendar_create(struct icalcalendar_impl *impl)
return ICAL_NO_ERROR;
}
-icalcalendar *icalcalendar_new(char *dir)
+icalcalendar *icalcalendar_new(const char *dir)
{
struct icalcalendar_impl *impl;
diff --git a/src/libicalss/icalcalendar.h b/src/libicalss/icalcalendar.h
index 4bacb482..c4418e06 100644
--- a/src/libicalss/icalcalendar.h
+++ b/src/libicalss/icalcalendar.h
@@ -33,8 +33,7 @@
typedef struct icalcalendar_impl icalcalendar;
-/*TODO:V3:API:icalcalendar *icalcalendar_new(const char *dir);*/
-LIBICAL_ICALSS_EXPORT icalcalendar *icalcalendar_new(char *dir);
+LIBICAL_ICALSS_EXPORT icalcalendar *icalcalendar_new(const char *dir);
LIBICAL_ICALSS_EXPORT void icalcalendar_free(icalcalendar *calendar);
diff --git a/src/libicalss/icalgauge.c b/src/libicalss/icalgauge.c
index e62a77a3..c3934122 100644
--- a/src/libicalss/icalgauge.c
+++ b/src/libicalss/icalgauge.c
@@ -37,7 +37,7 @@ extern char *input_buffer_p;
struct icalgauge_impl *icalss_yy_gauge;
-icalgauge *icalgauge_new_from_sql(char *sql, int expand)
+icalgauge *icalgauge_new_from_sql(const char *sql, int expand)
{
struct icalgauge_impl *impl;
int r;
@@ -53,7 +53,7 @@ icalgauge *icalgauge_new_from_sql(char *sql, int expand)
impl->expand = expand;
icalss_yy_gauge = impl;
- input_buffer = input_buffer_p = sql;
+ input_buffer = input_buffer_p = (char *)sql;
r = ssparse();
diff --git a/src/libicalss/icalgauge.h b/src/libicalss/icalgauge.h
index cece3e21..5153b793 100644
--- a/src/libicalss/icalgauge.h
+++ b/src/libicalss/icalgauge.h
@@ -32,9 +32,7 @@
typedef struct icalgauge_impl icalgauge;
-/* TODO:V3:API:icalgauge *icalgauge_new_from_sql(const char *sql, int expand);*/
-
-LIBICAL_ICALSS_EXPORT icalgauge *icalgauge_new_from_sql(char *sql, int expand);
+LIBICAL_ICALSS_EXPORT icalgauge *icalgauge_new_from_sql(const char *sql, int expand);
LIBICAL_ICALSS_EXPORT int icalgauge_get_expand(icalgauge *gauge);
diff --git a/src/libicalvcal/vcc.c b/src/libicalvcal/vcc.c
index 0dfaa212..73571ac0 100644
--- a/src/libicalvcal/vcc.c
+++ b/src/libicalvcal/vcc.c
@@ -1206,7 +1206,7 @@ VObject* Parse_MIME_FromFile(FILE *file)
return result;
}
-VObject* Parse_MIME_FromFileName(char *fname)
+VObject* Parse_MIME_FromFileName(const char *fname)
{
FILE *fp = fopen(fname,"r");
if (fp) {
diff --git a/src/libicalvcal/vcc.h b/src/libicalvcal/vcc.h
index 109b6dba..d63681c0 100644
--- a/src/libicalvcal/vcc.h
+++ b/src/libicalvcal/vcc.h
@@ -53,8 +53,7 @@ extern "C"
LIBICAL_VCAL_EXPORT VObject *Parse_MIME(const char *input, unsigned long len);
- /*TODO:V3:API:VObject *Parse_MIME_FromFileName(const char *fname);*/
- LIBICAL_VCAL_EXPORT VObject *Parse_MIME_FromFileName(char *fname);
+ LIBICAL_VCAL_EXPORT VObject *Parse_MIME_FromFileName(const char *fname);
/* NOTE regarding Parse_MIME_FromFile
The function above, Parse_MIME_FromFile, comes in two flavors,
diff --git a/src/libicalvcal/vcc.y b/src/libicalvcal/vcc.y
index 7436b813..bbcdd657 100644
--- a/src/libicalvcal/vcc.y
+++ b/src/libicalvcal/vcc.y
@@ -1172,7 +1172,7 @@ VObject* Parse_MIME_FromFile(FILE *file)
return result;
}
-DLLEXPORT(VObject*) Parse_MIME_FromFileName(char *fname)
+DLLEXPORT(VObject*) Parse_MIME_FromFileName(const char *fname)
{
FILE *fp = fopen(fname,"r");
if (fp) {
diff --git a/src/python/LibicalWrap_icaltimezone.i b/src/python/LibicalWrap_icaltimezone.i
index 804a59e6..0bfe925a 100644
--- a/src/python/LibicalWrap_icaltimezone.i
+++ b/src/python/LibicalWrap_icaltimezone.i
@@ -18,7 +18,7 @@
Contributions from:
- ======================================================================*/
+ ======================================================================*/
%rename(icaltimezone) _icaltimezone;
@@ -82,15 +82,15 @@ void icaltimezone_set_tzid_prefix(const char *new_prefix);
void icaltimezone_free_builtin_timezones(void);
/** Returns the array of builtin icaltimezones. */
-icalarray* icaltimezone_get_builtin_timezones (void);
+icalarray* icaltimezone_get_builtin_timezones (void);
/**
* @par Converting times between timezones.
*/
-void icaltimezone_convert_time (struct icaltimetype *tt,
- icaltimezone *from_zone,
- icaltimezone *to_zone);
+void icaltimezone_convert_time (struct icaltimetype *tt,
+ icaltimezone *from_zone,
+ icaltimezone *to_zone);
/**
@@ -101,17 +101,17 @@ void icaltimezone_convert_time (struct icaltimetype *tt,
timezone. It is the number of seconds to add to UTC to get local
time. The is_daylight flag is set to 1 if the time is in
daylight-savings time. */
-int icaltimezone_get_utc_offset (icaltimezone *zone,
- struct icaltimetype *tt,
- int *is_daylight);
+int icaltimezone_get_utc_offset (icaltimezone *zone,
+ struct icaltimetype *tt,
+ int *is_daylight);
/** Calculates the UTC offset of a given UTC time in the given
timezone. It is the number of seconds to add to UTC to get local
time. The is_daylight flag is set to 1 if the time is in
daylight-savings time. */
-int icaltimezone_get_utc_offset_of_utc_time (icaltimezone *zone,
- struct icaltimetype *tt,
- int *is_daylight);
+int icaltimezone_get_utc_offset_of_utc_time (icaltimezone *zone,
+ struct icaltimetype *tt,
+ int *is_daylight);
/*
@@ -119,7 +119,7 @@ int icaltimezone_get_utc_offset_of_utc_time (icaltimezone *zone,
*/
/** Set the directory to look for the zonefiles */
-void set_zone_directory(char *path);
+void set_zone_directory(const char *path);
/** Free memory dedicated to the zonefile directory */
void free_zone_directory(void);
@@ -131,9 +131,9 @@ void icaltimezone_release_zone_tab(void);
/** Dumps information about changes in the timezone up to and including
max_year. */
-int icaltimezone_dump_changes (icaltimezone *zone,
- int max_year,
- FILE *fp);
+int icaltimezone_dump_changes (icaltimezone *zone,
+ int max_year,
+ FILE *fp);
#endif
@@ -190,17 +190,17 @@ def icaltimezone_new(self):
obj.this.acquire()
try: self.this.append(obj.this)
except: self.this = obj.this
-
+
def icaltimezone_delete(self):
# do not delete the struct because swig will do this
if self.this.own():
_LibicalWrap.icaltimezone_free(self, 0)
-
+
icaltimezone_methods = {
'as_tzinfo': icaltzinfo,
'copy': icaltimezone_copy,
- '__init__': icaltimezone_new,
- '__del__': icaltimezone_delete,
+ '__init__': icaltimezone_new,
+ '__del__': icaltimezone_delete,
}
_swig_add_instance_methods(icaltimezone, icaltimezone_methods)
@@ -213,4 +213,3 @@ icaltimezone.get_builtin_timezone_from_tzid = staticmethod(_LibicalWrap.icaltime
%}
-
diff --git a/src/test/builtin_timezones.c b/src/test/builtin_timezones.c
index 06e09244..84654ccc 100644
--- a/src/test/builtin_timezones.c
+++ b/src/test/builtin_timezones.c
@@ -30,7 +30,7 @@ int main()
int dd, hh, zz, tried = 0;
long zz2 = -1;
- set_zone_directory((char *)"../../zoneinfo");
+ set_zone_directory("../../zoneinfo");
icaltimezone_set_tzid_prefix("/softwarestudio.org/");
tt = icaltime_current_time_with_zone(icaltimezone_get_builtin_timezone("America/New_York"));
diff --git a/src/test/regression-storage.c b/src/test/regression-storage.c
index f7094285..efaa33e0 100644
--- a/src/test/regression-storage.c
+++ b/src/test/regression-storage.c
@@ -718,7 +718,6 @@ void test_dirset_extended(void)
}
gauge = icalgauge_new_from_sql(
- (char *)
"SELECT * FROM VEVENT WHERE "
"VEVENT.SUMMARY = 'Submit Income Taxes' OR "
"VEVENT.SUMMARY = 'Bastille Day Party'",
diff --git a/src/test/regression.c b/src/test/regression.c
index 6479c850..614e22ee 100644
--- a/src/test/regression.c
+++ b/src/test/regression.c
@@ -777,8 +777,7 @@ void test_dirset()
}
}
- gauge = icalgauge_new_from_sql((char *)
- "SELECT * FROM VEVENT WHERE "
+ gauge = icalgauge_new_from_sql("SELECT * FROM VEVENT WHERE "
"VEVENT.SUMMARY = 'Submit Income Taxes' OR "
"VEVENT.SUMMARY = 'Bastille Day Party'",
0);
@@ -950,7 +949,7 @@ void test_calendar()
(void)mkdir("calendar", 0755);
(void)mkdir("calendar/booked", 0755);
- calendar = icalcalendar_new((char *)"calendar");
+ calendar = icalcalendar_new("calendar");
comp =
icalcomponent_vanew(
@@ -1033,7 +1032,7 @@ void test_recur()
printf("\n Using icalrecur_expand_recurrence\n");
icalrecur_expand_recurrence(
- (char *)"FREQ=MONTHLY;UNTIL=19971224T000000Z;INTERVAL=1;BYDAY=TU,2FR,3SA",
+ "FREQ=MONTHLY;UNTIL=19971224T000000Z;INTERVAL=1;BYDAY=TU,2FR,3SA",
icaltime_as_timet(start), 25, array);
for (i = 0; i < 25 && array[i] != 0; i++) {
@@ -1050,7 +1049,7 @@ void test_expand_recurrence()
time_t now = 931057385;
int i, numfound = 0;
- icalrecur_expand_recurrence((char *)"FREQ=MONTHLY;BYDAY=MO,WE", now, 5, arr);
+ icalrecur_expand_recurrence("FREQ=MONTHLY;BYDAY=MO,WE", now, 5, arr);
if (VERBOSE)
printf("Start %s", ctime(&now));
@@ -2583,7 +2582,7 @@ void test_gauge_sql()
str =
"SELECT DTSTART,DTEND,COMMENT FROM VEVENT,VTODO WHERE VEVENT.SUMMARY = 'Bongoa' AND SEQUENCE < 5";
- g = icalgauge_new_from_sql((char *)str, 0);
+ g = icalgauge_new_from_sql(str, 0);
ok(str, (g != NULL));
if (VERBOSE)
icalgauge_dump(g);
@@ -2593,7 +2592,7 @@ void test_gauge_sql()
str =
"SELECT * FROM VEVENT,VTODO WHERE VEVENT.SUMMARY = 'Bongoa' AND SEQUENCE < 5 OR METHOD != 'CREATE'";
- g = icalgauge_new_from_sql((char *)str, 0);
+ g = icalgauge_new_from_sql(str, 0);
ok(str, (g != NULL));
if (VERBOSE)
icalgauge_dump(g);
@@ -2602,7 +2601,7 @@ void test_gauge_sql()
str = "SELECT * FROM VEVENT WHERE SUMMARY == 'BA301'";
- g = icalgauge_new_from_sql((char *)str, 0);
+ g = icalgauge_new_from_sql(str, 0);
ok(str, (g != NULL));
if (VERBOSE)
icalgauge_dump(g);
@@ -2611,7 +2610,7 @@ void test_gauge_sql()
str = "SELECT * FROM VEVENT WHERE SUMMARY == 'BA301'";
- g = icalgauge_new_from_sql((char *)str, 0);
+ g = icalgauge_new_from_sql(str, 0);
ok(str, (g != NULL));
if (VERBOSE)
icalgauge_dump(g);
@@ -2620,7 +2619,7 @@ void test_gauge_sql()
str = "SELECT * FROM VEVENT WHERE LOCATION == '104 Forum'";
- g = icalgauge_new_from_sql((char *)str, 0);
+ g = icalgauge_new_from_sql(str, 0);
ok(str, (g != NULL));
if (VERBOSE)
icalgauge_dump(g);
@@ -2644,7 +2643,7 @@ void test_gauge_compare()
(void *)0);
str = "SELECT * FROM VEVENT WHERE DTSTART = '20000101T000002'";
- g = icalgauge_new_from_sql((char *)str, 0);
+ g = icalgauge_new_from_sql(str, 0);
ok(str, (c != 0 && g != 0));
assert(c != 0);
@@ -2656,7 +2655,7 @@ void test_gauge_compare()
icalgauge_free(g);
str = "SELECT * FROM VEVENT WHERE DTSTART = '20000101T000001'";
- g = icalgauge_new_from_sql((char *)str, 0);
+ g = icalgauge_new_from_sql(str, 0);
ok(str, (g != 0));
@@ -2666,7 +2665,7 @@ void test_gauge_compare()
icalgauge_free(g);
str = "SELECT * FROM VEVENT WHERE DTSTART != '20000101T000003'";
- g = icalgauge_new_from_sql((char *)str, 0);
+ g = icalgauge_new_from_sql(str, 0);
ok(str, (c != 0 && g != 0));
@@ -2679,7 +2678,7 @@ void test_gauge_compare()
/* Less than */
str = "SELECT * FROM VEVENT WHERE DTSTART < '20000101T000003'";
- g = icalgauge_new_from_sql((char *)str, 0);
+ g = icalgauge_new_from_sql(str, 0);
ok(str, (c != 0 && g != 0));
@@ -2690,7 +2689,7 @@ void test_gauge_compare()
icalgauge_free(g);
str = "SELECT * FROM VEVENT WHERE DTSTART < '20000101T000002'";
- g = icalgauge_new_from_sql((char *)str, 0);
+ g = icalgauge_new_from_sql(str, 0);
ok(str, (g != 0));
@@ -2702,7 +2701,7 @@ void test_gauge_compare()
/* Greater than */
str = "SELECT * FROM VEVENT WHERE DTSTART > '20000101T000001'";
- g = icalgauge_new_from_sql((char *)str, 0);
+ g = icalgauge_new_from_sql(str, 0);
ok(str, (g != 0));
@@ -2713,7 +2712,7 @@ void test_gauge_compare()
icalgauge_free(g);
str = "SELECT * FROM VEVENT WHERE DTSTART > '20000101T000002'";
- g = icalgauge_new_from_sql((char *)str, 0);
+ g = icalgauge_new_from_sql(str, 0);
ok(str, (g != 0));
@@ -2725,7 +2724,7 @@ void test_gauge_compare()
/* Greater than or Equal to */
str = "SELECT * FROM VEVENT WHERE DTSTART >= '20000101T000002'";
- g = icalgauge_new_from_sql((char *)str, 0);
+ g = icalgauge_new_from_sql(str, 0);
ok(str, (g != 0));
@@ -2735,7 +2734,7 @@ void test_gauge_compare()
icalgauge_free(g);
str = "SELECT * FROM VEVENT WHERE DTSTART >= '20000101T000003'";
- g = icalgauge_new_from_sql((char *)str, 0);
+ g = icalgauge_new_from_sql(str, 0);
ok(str, (g != 0));
@@ -2746,7 +2745,7 @@ void test_gauge_compare()
/* Less than or Equal to */
str = "SELECT * FROM VEVENT WHERE DTSTART <= '20000101T000002'";
- g = icalgauge_new_from_sql((char *)str, 0);
+ g = icalgauge_new_from_sql(str, 0);
ok(str, (g != 0));
@@ -2757,7 +2756,7 @@ void test_gauge_compare()
icalgauge_free(g);
str = "SELECT * FROM VEVENT WHERE DTSTART <= '20000101T000001'";
- g = icalgauge_new_from_sql((char *)str, 0);
+ g = icalgauge_new_from_sql(str, 0);
ok(str, (g != 0));
@@ -2778,7 +2777,7 @@ void test_gauge_compare()
str = "SELECT * FROM VEVENT WHERE DTSTART > '20000101T000000' and DTSTART < '20000103T000000'";
- g = icalgauge_new_from_sql((char *)str, 0);
+ g = icalgauge_new_from_sql(str, 0);
ok(str, (g != 0));
int_is("compare", icalgauge_compare(g, c), 1);
@@ -2787,7 +2786,7 @@ void test_gauge_compare()
str = "SELECT * FROM VEVENT WHERE DTSTART > '20000101T000000' and DTSTART < '20000102T000000'";
- g = icalgauge_new_from_sql((char *)str, 0);
+ g = icalgauge_new_from_sql(str, 0);
ok(str, (g != 0));
int_is("compare", icalgauge_compare(g, c), 0);
@@ -2795,7 +2794,7 @@ void test_gauge_compare()
str = "SELECT * FROM VEVENT WHERE DTSTART > '20000101T000000' or DTSTART < '20000102T000000'";
- g = icalgauge_new_from_sql((char *)str, 0);
+ g = icalgauge_new_from_sql(str, 0);
ok(str, (g != 0));
int_is("compare", icalgauge_compare(g, c), 1);
@@ -2812,7 +2811,7 @@ void test_gauge_compare()
str = "SELECT * FROM VEVENT WHERE DTSTART > '20000101T000000' and DTSTART < '20000103T000000'";
- g = icalgauge_new_from_sql((char *)str, 0);
+ g = icalgauge_new_from_sql(str, 0);
ok(str, (g != 0));
int_is("compare", icalgauge_compare(g, c), 1);
@@ -2821,7 +2820,7 @@ void test_gauge_compare()
str = "SELECT * FROM VEVENT WHERE DTSTART > '20000101T000000' and DTSTART < '20000102T000000'";
- g = icalgauge_new_from_sql((char *)str, 0);
+ g = icalgauge_new_from_sql(str, 0);
ok(str, (g != 0));
int_is("compare", icalgauge_compare(g, c), 0);
@@ -2829,7 +2828,7 @@ void test_gauge_compare()
str = "SELECT * FROM VEVENT WHERE DTSTART > '20000101T000000' or DTSTART < '20000102T000000'";
- g = icalgauge_new_from_sql((char *)str, 0);
+ g = icalgauge_new_from_sql(str, 0);
ok(str, (g != 0));
int_is("compare", icalgauge_compare(g, c), 1);
@@ -2856,7 +2855,7 @@ void test_gauge_compare()
str = "SELECT * FROM VEVENT WHERE VALARM.DTSTART = '20000101T120000'";
- g = icalgauge_new_from_sql((char *)str, 0);
+ g = icalgauge_new_from_sql(str, 0);
ok(str, (g != 0));
int_is("compare", icalgauge_compare(g, c), 1);
@@ -2864,7 +2863,7 @@ void test_gauge_compare()
icalgauge_free(g);
str = "SELECT * FROM VEVENT WHERE COMMENT = 'foo'";
- g = icalgauge_new_from_sql((char *)str, 0);
+ g = icalgauge_new_from_sql(str, 0);
ok(str, (g != 0));
int_is("compare", icalgauge_compare(g, c), 1);
@@ -2872,7 +2871,7 @@ void test_gauge_compare()
icalgauge_free(g);
str = "SELECT * FROM VEVENT WHERE COMMENT = 'foo' AND VALARM.DTSTART = '20000101T120000'";
- g = icalgauge_new_from_sql((char *)str, 0);
+ g = icalgauge_new_from_sql(str, 0);
ok(str, (g != 0));
int_is("compare", icalgauge_compare(g, c), 1);
@@ -2880,14 +2879,14 @@ void test_gauge_compare()
icalgauge_free(g);
str = "SELECT * FROM VEVENT WHERE COMMENT = 'bar' AND VALARM.DTSTART = '20000101T120000'";
- g = icalgauge_new_from_sql((char *)str, 0);
+ g = icalgauge_new_from_sql(str, 0);
ok(str, (g != 0));
int_is("compare", icalgauge_compare(g, c), 0);
icalgauge_free(g);
str = "SELECT * FROM VEVENT WHERE COMMENT = 'bar' or VALARM.DTSTART = '20000101T120000'";
- g = icalgauge_new_from_sql((char *)str, 0);
+ g = icalgauge_new_from_sql(str, 0);
ok(str, (g != 0));
int_is("compare", icalgauge_compare(g, c), 1);
@@ -2927,7 +2926,6 @@ void test_fileset()
const char *path = "test_fileset.ics";
icalgauge *g =
icalgauge_new_from_sql(
- (char *)
"SELECT * FROM VEVENT "
"WHERE DTSTART > '20000103T120000Z' AND "
"DTSTART <= '20000106T120000Z'",
@@ -3436,7 +3434,7 @@ void test_langbind()
p != 0; p = icallangbind_get_next_property(inner, "ANY")
) {
- const char *str = icallangbind_property_eval_string(p, (char *)":");
+ const char *str = icallangbind_property_eval_string(p, ":");
/** TODO add tests **/
if (VERBOSE)
@@ -3734,7 +3732,7 @@ void test_vcal(void)
icalcomponent *comp;
const char *file = TEST_DATADIR "/user-cal.vcf";
- vcal = Parse_MIME_FromFileName((char *)file);
+ vcal = Parse_MIME_FromFileName(file);
ok("Parsing " TEST_DATADIR "/user-cal.vcf", (vcal != 0));
@@ -3889,7 +3887,7 @@ int main(int argc, char *argv[])
int do_header = 0;
int failed_count = 0;
- set_zone_directory((char *)"../../zoneinfo");
+ set_zone_directory("../../zoneinfo");
icaltimezone_set_tzid_prefix("/softwarestudio.org/");
test_start(0);
diff --git a/src/test/testvcal.c b/src/test/testvcal.c
index 66e0e509..834e64e7 100644
--- a/src/test/testvcal.c
+++ b/src/test/testvcal.c
@@ -49,7 +49,7 @@ int main(int argc, char *argv[])
file = argv[1];
}
- vcal = Parse_MIME_FromFileName((char *)file);
+ vcal = Parse_MIME_FromFileName(file);
assert(vcal != 0);
diff --git a/src/test/timezones.c b/src/test/timezones.c
index 0f834447..1f9e3d60 100644
--- a/src/test/timezones.c
+++ b/src/test/timezones.c
@@ -46,7 +46,7 @@ int main()
static char new_tz[256];
#endif
- set_zone_directory((char *)"../../zoneinfo");
+ set_zone_directory("../../zoneinfo");
icaltimezone_set_tzid_prefix("/softwarestudio.org/");
timezones = icaltimezone_get_builtin_timezones();