From 487fbbf8777b0975d3b411bb442852ef6fd1dc41 Mon Sep 17 00:00:00 2001 From: Damon Chaplin Date: Wed, 25 Jul 2001 21:00:11 +0000 Subject: accept an icaltimezone* of NULL for all the public functions, since NULL 2001-07-25 Damon Chaplin * src/libical/icaltimezone.c: accept an icaltimezone* of NULL for all the public functions, since NULL is used to represent floating times. svn path=/trunk/; revision=11413 --- libical/ChangeLog | 5 +++++ libical/src/libical/icaltimezone.c | 22 +++++++++++++++++++++- 2 files changed, 26 insertions(+), 1 deletion(-) (limited to 'libical') diff --git a/libical/ChangeLog b/libical/ChangeLog index 70c28eb878..115c47239d 100644 --- a/libical/ChangeLog +++ b/libical/ChangeLog @@ -1,3 +1,8 @@ +2001-07-25 Damon Chaplin + + * src/libical/icaltimezone.c: accept an icaltimezone* of NULL for all + the public functions, since NULL is used to represent floating times. + 2001-07-25 JP Rosevear * src/libical/icalparameter.c (icalparameter_as_ical_string): if diff --git a/libical/src/libical/icaltimezone.c b/libical/src/libical/icaltimezone.c index 300ac7924e..ca91d881da 100644 --- a/libical/src/libical/icaltimezone.c +++ b/libical/src/libical/icaltimezone.c @@ -1133,7 +1133,7 @@ icaltimezone_adjust_change (icaltimezonechange *tt, char* icaltimezone_get_tzid (icaltimezone *zone) { - /* If this is a local time, without a timezone, return NULL. */ + /* If this is a floating time, without a timezone, return NULL. */ if (!zone) return NULL; @@ -1147,6 +1147,10 @@ icaltimezone_get_tzid (icaltimezone *zone) char* icaltimezone_get_location (icaltimezone *zone) { + /* If this is a floating time, without a timezone, return NULL. */ + if (!zone) + return NULL; + /* Note that for builtin timezones this comes from zones.tab so we don't need to check the timezone is loaded here. */ return zone->location; @@ -1156,6 +1160,10 @@ icaltimezone_get_location (icaltimezone *zone) char* icaltimezone_get_tznames (icaltimezone *zone) { + /* If this is a floating time, without a timezone, return NULL. */ + if (!zone) + return NULL; + if (!zone->component) icaltimezone_load_builtin_timezone (zone); @@ -1167,6 +1175,10 @@ icaltimezone_get_tznames (icaltimezone *zone) double icaltimezone_get_latitude (icaltimezone *zone) { + /* If this is a floating time, without a timezone, return 0. */ + if (!zone) + return 0.0; + /* Note that for builtin timezones this comes from zones.tab so we don't need to check the timezone is loaded here. */ return zone->latitude; @@ -1177,6 +1189,10 @@ icaltimezone_get_latitude (icaltimezone *zone) double icaltimezone_get_longitude (icaltimezone *zone) { + /* If this is a floating time, without a timezone, return 0. */ + if (!zone) + return 0.0; + /* Note that for builtin timezones this comes from zones.tab so we don't need to check the timezone is loaded here. */ return zone->longitude; @@ -1187,6 +1203,10 @@ icaltimezone_get_longitude (icaltimezone *zone) icalcomponent* icaltimezone_get_component (icaltimezone *zone) { + /* If this is a floating time, without a timezone, return NULL. */ + if (!zone) + return NULL; + if (!zone->component) icaltimezone_load_builtin_timezone (zone); -- cgit tron6/files/elliptic-6.5.4 FreeBSD GNOME current development ports (https://github.com/freebsd/freebsd-ports-gnome)
aboutsummaryrefslogtreecommitdiffstats
Commit message (Expand)AuthorAgeFilesLines
* - update png to 1.5.10dinoex2012-06-011-1/+1
* - bump after update to graphviz-0.28dinoex2011-05-201-1/+1
* - Get Rid MD5 supportmiwi2011-03-191-1/+0
* Sync to new bsd.autotools.mkade2010-12-041-1/+1
* - update to 1.4.1dinoex2010-03-281-1/+1
* - update to jpeg-8dinoex2010-02-051-1/+1
* -Repocopy devel/libtool15 -> libtool22 and libltdl15 -> libltdl22.mezz2009-08-031-1/+1
* - bump all port that indirectly depends on libjpeg and have not yet been bump...dinoex2009-07-311-1/+1
* - bump PORTREVISION to catch graphviz new shared lib versiondinoex2009-03-151-1/+1
* Bump portrevision due to upgrade of devel/gettext.edwin2008-06-061-1/+1
* Cleanup USE_XLIBxride2008-03-191-2/+1
* Remove always-false/true conditions based on OSVERSION 500000edwin2007-10-041-5/+1
* - Welcome X.org 7.2 \o/.flz2007-05-201-0/+1
* - chase update of graphvizdinoex2007-03-131-1/+1