Commit Graph

196 Commits

Author SHA1 Message Date
2428e668ea added a few new timezones
svn path=/trunk/; revision=13913
2001-10-22 23:41:49 +00:00
1da29bab5d updated all files again, placing current RDATEs first, so Outlook uses
2001-10-22  Damon Chaplin  <damon@ximian.com>

	* zoneinfo/*: updated all files again, placing current RDATEs first,
	so Outlook uses those. Also fixed a few bugs in vzic which resulted in
	a few changes.

	* zoneinfo/Makefile.am (DIRS): added America/North_Dakota.

2001-10-22  Damon Chaplin  <damon@ximian.com>

	* src/libical/icaltimezone.c (icaltimezone_get_utc_offset):
	(icaltimezone_get_utc_offset_of_utc_time): if we go off the start of
	the changes array, return the TZOFFSETFROM of the first change.
	Also changed the maximum year to 2037.

	* src/libical/icaltime.c (icaltime_day_of_week):
	(icaltime_start_doy_of_week):
	(icaltime_week_number): init tm_hour to 12. Sometimes mktime()
	adjusts the time, if that local time doesn't actually exist, leading
	to the wrong day being returned. It is unlikely to adjust by 12 hours.
	(icaltime_as_timet_with_zone):
	(icaltime_from_timet_with_zone): change it back so it does convert
	DATE values to/from the timezone. time_t values don't really go well
	with DATE values, so be very careful when using them. We now assume
	that the time_t points to the start of the day in the given timezone.
	(We used to assume it pointed to the start of the day in UTC, but
	that meant it was actually incorrect wrt the displayed calendar.)

	* src/libical/icalrecur.c (expand_year_days): for FREQ=YEARLY with no
	modifiers, we add one day, using the month and day from DTSTART.
	(next_year): make sure we never go past 2037.

	* scripts/mkderivedproperties.pl: Updated to allow DTSTART, DTEND, DUE
	and RECURRENCE-ID to be set with DATE values. I think it now handles
	all properties which can take DATE values, except RDATE which uses
	DATE-TIME-PERIOD.

svn path=/trunk/; revision=13912
2001-10-22 23:40:29 +00:00
7d70bec880 don't free the parameter
2001-10-19  JP Rosevear  <jpr@ximian.com>

	* src/libical/icalproperty.c (icalproperty_remove_parameter):
	don't free the parameter

svn path=/trunk/; revision=13808
2001-10-19 22:17:16 +00:00
952708390e Assign with =', not +='.
* src/libical/Makefile.am (CLEANFILES): Assign with `=', not `+='.

svn path=/trunk/; revision=13463
2001-10-05 20:23:26 +00:00
6543d06edf Fix the libical-related part of Ximian bug #7892.
2001-09-26  Federico Mena Quintero  <federico@ximian.com>

	Fix the libical-related part of Ximian bug #7892.

	* src/libical/icalduration.c (icaldurationtype_as_ical_string):
	The correct string for zero seconds is "PT0S", not "PTS0".  Also
	handle "negative zero" durations.

	* src/libical/icalvalue.c (icalvalue_new_from_string_with_error):
	Use icalerrno to see if the duration string is invalid.  We cannot
	use icaldurationtype_is_null_duration() because a duration of zero
	*is* valid, not an error (icalduration_type_from_string() returns
	a zero duration on parse error, too).

svn path=/trunk/; revision=13172
2001-09-26 23:10:08 +00:00
00dcd396ed free the temp dup'd string.
2001-09-19  Larry Ewing  <lewing@ximian.com>

	* src/libical/icalperiod.c (icalperiodtype_from_string): free the
	temp dup'd string.

svn path=/trunk/; revision=12984
2001-09-19 19:34:19 +00:00
b55a868f79 Generate an ICAL_ATTACH_VALUE value from the string.
2001-09-11  Federico Mena Quintero  <federico@ximian.com>

	* src/libical/icalvalue.c (icalvalue_new_from_string_with_error):
	Generate an ICAL_ATTACH_VALUE value from the string.

svn path=/trunk/; revision=12769
2001-09-11 22:00:22 +00:00
e0beab1325 strdup the result of the first call to ical_component_as_ical_string()
2001-09-10  Damon Chaplin  <damon@ximian.com>

	* src/libical/icalcomponent.c (icalcomponent_compare_vtimezones):
	strdup the result of the first call to ical_component_as_ical_string()
	since the second call may free it.
	Also, don't free the results of ical_component_as_ical_string() since
	it is a tmp buffer which is freed elsewhere.

svn path=/trunk/; revision=12750
2001-09-10 23:07:51 +00:00
2be48d8855 Replace struct icalattachtype by an opaque icalattach that is properly
2001-09-10  Federico Mena Quintero  <federico@ximian.com>

	Replace struct icalattachtype by an opaque icalattach that is
	properly reference-counted.

	* src/libical/icalvalueimpl.h (struct icalattach_impl): Private
	declaration for the icalattach type.
	(struct icalvalue_impl): Make the v_attach field be an icalattach *.

	* src/libical/icaltypes.h: Added declaration for icalattach.  This
	is now an opaque type; the implementation is in icalvalueimpl.h.
	(struct icalattachtype): Removed.

	* src/libical/icaltypes.c (icalattach_new_from_url): New function.
	(icalattach_new_from_data): New function.
	(icalattach_ref): New function.
	(icalattach_unref): New function.
	(icalattach_get_is_url): New function.
	(icalattach_get_url): New function.
	(icalattach_get_data): New function.
	(icalattachtype_new): Removed.
	(icalattachtype_free): Removed.
	(icalattachtype_add_reference): Removed.
	(icalattachtype_set_url): Removed.
	(icalattachtype_get_url): Removed.
	(icalattachtype_set_base64): Removed.
	(icalattachtype_get_base64): Removed.
	(icalattachtype_set_binary): Removed.
	(icalattachtype_get_binary): Removed.

	* src/libical/icalderivedvalue.c.in (icalvalue_new_attach): New
	function; we implement it ourselves.
	(icalvalue_set_attach): New function.
	(icalvalue_get_attach): New function.

	* src/libical/icalvalue.c (icalmemory_strdup_and_dequote): Made
	static.
	(icalvalue_new_clone): Clone BINARY and ATTACH values by refing
	the old attach value.
	(icalvalue_free): Free BINARY and ATTACH values.
	(icalvalue_attach_as_ical_string): Handle the new icalattachtype.
	(icalvalue_compare): Ditto.

	* src/libical/Makefile.am (CLEANFILES): Added ical.h.

	* design-data/*: Mark ATTACH as a custom value.

svn path=/trunk/; revision=12745
2001-09-10 21:54:44 +00:00
da42183a7b pass the VTIMEZONE component to icalcomponent_compare_vtimezones(), not
2001-09-06  Damon Chaplin  <damon@ximian.com>

	* src/libical/icalcomponent.c (icalcomponent_merge_vtimezone): pass
	the VTIMEZONE component to icalcomponent_compare_vtimezones(), not
	the icaltimezone*. Strangely we weren't getting a compiler error.
	Fixes bug #5275, hopefully.

	* src/libical/icaltimezone.c (icaltimezone_dump_changes): updated so
	it still outputs the same format, even though the '1 Jan 0001'
	component isn't included any more.

svn path=/trunk/; revision=12670
2001-09-07 03:36:30 +00:00
3ca5273c1d updated all of the VTIMEZONE files to try to be more compatable with
2001-08-31  Damon Chaplin  <damon@ximian.com>

	* zoneinfo/*: updated all of the VTIMEZONE files to try to be more
	compatable with Outlook. i.e. We don't use seconds in UTC offsets,
	we don't use BYMONTHDAY if we can avoid it (there are still a few uses
	of this we need to fix), and we don't use years < 1600.

	* src/libical/icalvalue.c (icalvalue_utcoffset_as_ical_string): if
	seconds is 0 then don't output it. None of the builtin VTIMEZONE data
	uses the seconds value any more, since it messes up iTIP with Outlook.
	We may want to make it always round to the nearest minute, to avoid
	interop problems.

svn path=/trunk/; revision=12551
2001-09-01 01:53:47 +00:00
d9e5feffa7 Remove src/python/Makefile and src/test/Makefile.
* configure.in: Remove src/python/Makefile and src/test/Makefile.

svn path=/trunk/; revision=12407
2001-08-22 23:17:06 +00:00
9333af2f12 Dequote the same characters that we know how to quote in
2001-08-16  Federico Mena Quintero  <federico@ximian.com>

	* src/libical/icalvalue.c (icalmemory_strdup_and_dequote): Dequote
	the same characters that we know how to quote in
	icalvalue_text_as_ical_string().  Fixes Ximian bug #7433.

svn path=/trunk/; revision=12115
2001-08-16 19:23:41 +00:00
beb38ecbf6 removed some debugging messages.
2001-08-01  Damon Chaplin  <damon@ximian.com>

	* src/libical/icaltimezone.c: removed some debugging messages.

svn path=/trunk/; revision=11562
2001-08-02 03:22:01 +00:00
61889c3c08 changed the debugging message to avoid a crash on non-glibc boxes. (Using
2001-07-30  Damon Chaplin  <damon@ximian.com>

	* src/libical/icaltimezone.c (icaltimezone_get_builtin_timezone):
	changed the debugging message to avoid a crash on non-glibc boxes.
	(Using %s with a NULL argument will crash them.)

svn path=/trunk/; revision=11492
2001-07-30 21:44:09 +00:00
ddbf92b2ec copy the TZID just in case the property we got it from gets modified.
2001-07-30  Damon Chaplin  <damon@ximian.com>

	* src/libical/icalcomponent.c (icalcomponent_merge_vtimezone): copy
	the TZID just in case the property we got it from gets modified.
	(icalcomponent_rename_tzids_callback): break out of the loop if we
	have renamed the TZID parameter. Otherwise our tzid variable would be
	invalid.

	* scripts/mkderivedproperties.pl (fudge_data): changed this so we can
	set EXDATEs that are DATE values, by checking the is_date field.
	I'm not entirely sure this is the way it should be done.
	If it is, I'll also do this for other things like DTSTART/DTEND.

	* src/libical/icalrecur.c (icalrecurrencetype_as_string): handle
	UNTIL as a DATE value as well as a DATE-TIME.

	* src/libical/icalcomponent.c (icalcomponent_compare_vtimezones):
	fixed stupid error, getting TZID property from wrong VTIMEZONE.
	This would only have affected iTIP stuff, with VTIMEZONEs that don't
	use the '/' prefix (i.e. from Outlook). It probably just meant we
	kept multiple copies of the same VTIMEZONE.

	* src/libical/icaltimezone.c: removed some debugging messages.

svn path=/trunk/; revision=11491
2001-07-30 21:31:43 +00:00
11198e3e26 call pvl_next on i rather than itr.iter
2001-07-26  JP Rosevear  <jpr@ximian.com>

	* src/libical/icalcomponent.c (icalcomponent_begin_component):
	call pvl_next on i rather than itr.iter

svn path=/trunk/; revision=11439
2001-07-27 00:03:55 +00:00
4d50dc146d if from_zone is NULL (i.e. it is a floating time), just return.
2001-07-26  Damon Chaplin  <damon@ximian.com>

	* src/libical/icaltimezone.c (icaltimezone_convert_time): if from_zone
	is NULL (i.e. it is a floating time), just return.

svn path=/trunk/; revision=11435
2001-07-26 21:43:39 +00:00
487fbbf877 accept an icaltimezone* of NULL for all the public functions, since NULL
2001-07-25  Damon Chaplin  <damon@ximian.com>

	* 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
2001-07-25 21:00:11 +00:00
77a394e24d if the property contai
2001-07-25  JP Rosevear  <jpr@ximian.com>

	* src/libical/icalparameter.c (icalparameter_as_ical_string): if
	the property contai

svn path=/trunk/; revision=11405
2001-07-25 18:46:43 +00:00
dc4f47979d pass extra param to icalparser_get_next_char (icalparser_get_next_char):
2001-07-23  JP Rosevear  <jpr@ximian.com>

	* src/libical/icalparser.c: pass extra param to
	icalparser_get_next_char
	(icalparser_get_next_char): only use quote mode if the flag is set

svn path=/trunk/; revision=11326
2001-07-23 23:30:11 +00:00
80f0e61199 changed so it doesn't use mktime(). We are having problems because
2001-07-23  Damon Chaplin  <damon@ximian.com>

	* src/libical/icaltime.c (icaltime_day_of_year): changed so it doesn't
	use mktime(). We are having problems because mktime() only works
	post 1970.

svn path=/trunk/; revision=11325
2001-07-23 22:56:06 +00:00
833b8636a3 do not strdup a NULL (valid) timezone
2001-07-17  JP Rosevear  <jpr@ximian.com>

	* src/libical/icaltimezone.c
	(icaltimezone_get_tznames_from_vtimezone): do not strdup a NULL
	(valid) timezone

svn path=/trunk/; revision=11180
2001-07-17 21:36:14 +00:00
3b8e07c5b8 return NULL if we couldn't find the LOCATION.
2001-07-16  Damon Chaplin  <damon@ximian.com>

	* src/libical/icaltimezone.c (icaltimezone_get_location_from_vtimezone): return NULL if we couldn't find the LOCATION.
	(icaltimezone_get_utc_offset): ifdef'd out a debugging message.
	(icaltimezone_get_location):
	(icaltimezone_get_latitude):
	(icaltimezone_get_longitude): don't load the builtin timezone for
	these. We should already have the data from reading zones.tab.
	(icaltimezone_get_builtin_timezone_from_tzid): return NULL if the TZID
	given is NULL or "" (i.e. a floating time).

svn path=/trunk/; revision=11143
2001-07-17 01:06:18 +00:00
de6d478888 Add the COMBINEDHEADERS here and remove the EXTRA_DIST. This fixes
2001-07-10  Peter Williams  <peterw@ximian.com>

	* src/libicalss/Makefile.am (libicalss_la_SOURCES): Add the
	COMBINEDHEADERS here and remove the EXTRA_DIST. This fixes distcheck.
	We can't just put CONBINEDHEADERS at the bottom of _SOURCES because
	of the $(srcdir).

svn path=/trunk/; revision=11040
2001-07-12 14:21:27 +00:00
0a9ff51460 only create the timezones array when we need to, and make sure we free
2001-07-11  Damon Chaplin  <damon@ximian.com>

	* src/libical/icaltimezone.c: only create the timezones array when we
	need to, and make sure we free things when necessary.
	Also added timezones_sorted variable, which we set to 0 when adding a
	timezone. We then sort the array before doing binary searches (oops!)

	* src/libical/icaltimezone.[hc]: added free_struct() arg to
	icaltimezone_free() to specify whether to free the icaltimezone struct.
	Also added icaltimezone_array_free() function.

svn path=/trunk/; revision=11026
2001-07-12 02:37:53 +00:00
552d3501e9 don't convert DATE values.
2001-07-10  Damon Chaplin  <damon@ximian.com>

	* src/libical/icaltimezone.c (icaltimezone_convert_time): don't convert
	DATE values.

	* src/libical/icaltime.c (icaltime_from_timet_with_zone):
	(icaltime_as_timet_with_zone): changed so they do not convert DATE
	values according to the timezone.

	* src/libical/icaltime.[hc]: added icaltime_current_time_with_zone()
	and icaltime_today() functions.

svn path=/trunk/; revision=10983
2001-07-11 03:46:33 +00:00
c41a49b0b5 forgot to compile before committing. Idiot.
2001-07-09  Damon Chaplin  <damon@ximian.com>

	* src/libical/icaltime.c (icaltime_adjust): forgot to compile before
	committing. Idiot.

svn path=/trunk/; revision=10945
2001-07-10 02:45:51 +00:00
8f5df2dc9e if the 2 zones are the same just return.
2001-07-09  Damon Chaplin  <damon@ximian.com>

	* src/libical/icaltimezone.c (icaltimezone_convert_time): if the 2
	zones are the same just return.

	* src/libical/icaltime.c (icaltime_adjust): normalize the month.

svn path=/trunk/; revision=10944
2001-07-10 02:14:20 +00:00
9dbf178166 add the icaltimezone to the timezone array of the toplevel VCALENDAR
2001-07-03  Damon Chaplin  <damon@ximian.com>

	* src/libical/icalcomponent.c (icalcomponent_add_component): add the
	icaltimezone to the timezone array of the toplevel VCALENDAR component.

svn path=/trunk/; revision=10738
2001-07-03 09:17:53 +00:00
2d250ff733 fixed bad assertion, '!=' -> '=='. (icalcomponent_merge_vtimezone): get
2001-07-03  Damon Chaplin  <damon@ximian.com>

	* src/libical/icalcomponent.c (icalcomponent_merge_component): fixed
	bad assertion, '!=' -> '=='.
	(icalcomponent_merge_vtimezone): get the TZID from vtimezone, not comp.

svn path=/trunk/; revision=10733
2001-07-03 06:10:27 +00:00
0e27010e0b more timezone stuff.
2001-07-03  Damon Chaplin  <damon@ximian.com>

	* src/libical/icaltimezone.c (icaltimezone_get_builtin_timezone_from_tzid):
	* src/libical/icaltime.c:
	* src/libical/icalcomponent.c: more timezone stuff.

svn path=/trunk/; revision=10727
2001-07-03 04:11:38 +00:00
c9562d914e Add $(srcdir) as in install-data-local rule.
2001-06-28  Peter Williams  <peterw@ximian.com>

        * zoneinfo/Makefile.am (dist-hook): Add $(srcdir) as in install-data-local
        rule.

svn path=/trunk/; revision=10605
2001-06-29 19:22:53 +00:00
cc9eea946f commented out AC_DEFINE(ICAL_ERRORS_ARE_FATAL,1). We only want it to abort
2001-06-28  Damon Chaplin  <damon@ximian.com>

	* configure.in: commented out AC_DEFINE(ICAL_ERRORS_ARE_FATAL,1).
	We only want it to abort when there is no possibility of carrying on.

svn path=/trunk/; revision=10581
2001-06-28 22:35:43 +00:00
b8624a9ad3 stripped all blank lines from iCalendar files. Apparently they aren't
2001-06-26  Damon Chaplin  <damon@ximian.com>

	* zoneinfo/*: stripped all blank lines from iCalendar files.
	Apparently they aren't exactly legal. Oops.

svn path=/trunk/; revision=10526
2001-06-27 03:22:21 +00:00
91cc026904 Update the copyrights, replacing Helix Code with Ximian and
helixcode.com with ximian.com all over the place.

svn path=/trunk/; revision=10440
2001-06-23 08:52:02 +00:00
19904850fe Extra dist the zones.tab information
2001-06-15  JP Rosevear  <jpr@ximian.com>

	* zoneinfo/Makefile.am: Extra dist the zones.tab information

svn path=/trunk/; revision=10250
2001-06-15 13:56:42 +00:00
8089ac1639 added functions to get the coords of builtin timezones.
2001-06-14  Damon Chaplin  <damon@ximian.com>

	* src/libical/icaltimezone.c (icaltimezone_get_latitude):
	(icaltimezone_get_longitude): added functions to get the coords of
	builtin timezones.

svn path=/trunk/; revision=10222
2001-06-14 05:55:32 +00:00
d54f22de6e merged in some new stuff from libical CVS. (icalrecur_add_byrules): If no
2001-06-13  Damon Chaplin  <damon@ximian.com>

	* src/libical/icalrecur.c: merged in some new stuff from libical CVS.
	(icalrecur_add_byrules): If no sign is given set sign to 1 (i.e.
	default to positive).
	(icalrecur_iterator_new): when setting up the year days array, handle
	the case where a year has no occurrences and we have to skip it.
	Also initialize the last.day and last.month fields.
	(expand_by_day): set the last day of the year explicitly rather than
	adding 1 to year and subtracting 1 from day. It is more efficient,
	and less prone to bugs. Also rewrote a bit.
	(expand_year_days): added code to handle BY_MONTH_DAY and BY_DAY +
	BY_MONTH_DAY, and rewrote code to handle BY_DAY + BY_MONTH.
	(next_year): handled the case where there are no occurrences in the
	year.

	* src/libical/icaltime.c (icaltime_adjust): new function to adjust a
	time by a number of days/hours/minutes/seconds.
	(icaltime_day_of_week): rewrote using a single call to mktime().
	(icaltime_day_of_year): rewrote using a single call to mktime().
	(icaltime_from_day_of_year): rewrote in a simpler way. The old version
	had a bug in it.

	* src/libical/icaltime.h (struct icaltimetype): added is_daylight
	flag, so we can try to distinguish between standard and daylight time
	when the clocks go back. Though this doesn't always resolve the
	ambiguity.

	* src/libical/icalcomponent.c: added some stuff to handle timezone
	data connected to the calendar component. Unfinished.

	* src/libical/icalyacc.y: merged in a fix from sourceforge CVS version
	of libical, so we can handle -ve UTC offsets.

	* src/libical/Makefile.am (CPPFLAGS): added PACKAGE_DATA_DIR define
	for finding the VTIMEZONE files.
	(libical_la_SOURCES): added icalarray.[hc] and icaltimezone.[hc].
	(COMBINEDHEADERS): added icalarray.h and icaltimezone.h to the headers
	to be combined into ical.h.

svn path=/trunk/; revision=10220
2001-06-14 02:50:46 +00:00
71c0692058 new files to contain support for timezones.
2001-06-13  Damon Chaplin  <damon@ximian.com>

	* src/libical/icaltimezone.[hc]: new files to contain support for
	timezones.

	* src/libical/icalarray.[hc]: new files to provide a simple expanding
	array datatype.

svn path=/trunk/; revision=10215
2001-06-14 02:17:40 +00:00
9913eeda8c added zoneinfo.
2001-06-13  Damon Chaplin  <damon@ximian.com>

	* Makefile.am (SUBDIRS): added zoneinfo.

	* configure.in (AC_OUTPUT): added zoneinfo/Makefile.

	* zoneinfo/Makefile.am: new file to install & distribute the
	VTIMEZONE data files, and the zones.tab file.

	* zoneinfo/zones.tab: new file containing a list of all timezones
	and their coordinates (so we can mark them on the world map).

	* zoneinfo/*: Lots of VTIMEZONE data files added, one per timezone.

svn path=/trunk/; revision=10214
2001-06-13 23:09:50 +00:00
d1735f70b7 Fixes to make it make dist and make distcheck. Kind of kludgy but they
2001-05-16  JP Rosevear  <jpr@ximian.com>

	* src/libical/Makefile.am: Fixes to make it make dist and make
	distcheck.  Kind of kludgy but they seem to work.  Time will tell.

svn path=/trunk/; revision=9841
2001-05-16 07:16:31 +00:00
d706eb2e77 here's some good lovin' from the oven...
CVe: ----------------------------------------------------------------------

svn path=/trunk/; revision=9829
2001-05-15 19:41:04 +00:00
9bd88f883a plug leak (icaltime_as_timet): use altered functions
2001-05-10  JP Roseveaer  <jpr@ximian.com>

	* src/libical/icaltime.c (set_tz, unset_tz): plug leak
	(icaltime_as_timet): use altered functions
	(icaltime_utc_offset): ditto
	(icaltime_from_day_of_year): ditto

svn path=/trunk/; revision=9752
2001-05-10 23:47:18 +00:00
f7bb8712c9 Shush
svn path=/trunk/; revision=9701
2001-05-07 21:47:10 +00:00
76808d38e9 initialize "continuation_line" to 0
2001-05-02  JP Rosevear  <jpr@ximian.com>

	* src/libical/icalparser.c (icalparser_new): initialize
	"continuation_line" to 0

svn path=/trunk/; revision=9646
2001-05-02 17:38:11 +00:00
8605f53460 this shouldn't have been here (at least not containing ".deps")
svn path=/trunk/; revision=9589
2001-04-26 18:35:06 +00:00
7e6f96d93f I get "cannot obtain lock on directory /cvs/gnome/..../.deps: no such file or directory" so add .deps to cvsignore
svn path=/trunk/; revision=9483
2001-04-21 16:21:19 +00:00
c78c05d8af Disable the Python stuff and the tests for now. They are broken and
are not needed by end users anyway.

svn path=/trunk/; revision=9443
2001-04-18 15:47:26 +00:00
818a27977d Prepend `$(srcdir)' to the list of libicalss headers to be combined.
svn path=/trunk/; revision=9442
2001-04-18 15:37:01 +00:00