diff options
author | Lorry Tar Creator <lorry-tar-importer@lorry> | 2013-05-04 21:39:27 +0000 |
---|---|---|
committer | Lorry Tar Creator <lorry-tar-importer@lorry> | 2013-05-04 21:39:27 +0000 |
commit | fec6336699f34758d3e6cb41b2edf902fedb9035 (patch) | |
tree | 8256c1dbf3ca7c9e58a3dbecf07cf826fb2e0ce2 /src | |
parent | 7dbffd7e2b0067e834801617c5c486e3177f6709 (diff) | |
download | libical-fec6336699f34758d3e6cb41b2edf902fedb9035.tar.gz |
libical-1.0HEADlibical-1.0master
Diffstat (limited to 'src')
128 files changed, 7240 insertions, 10421 deletions
diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index 3a55216..d0ebc7b 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -4,10 +4,11 @@ add_subdirectory(libicalvcal) add_subdirectory(test) if(MSVC) -install(FILES - ical.def - icalss.def - icalvcal.def - DESTINATION - ${LIB_INSTALL_DIR}) + install(FILES + ical.def + icalss.def + icalvcal.def + DESTINATION + ${LIB_INSTALL_DIR} + ) endif(MSVC) diff --git a/src/Makefile.am b/src/Makefile.am index 11129a2..a754545 100644 --- a/src/Makefile.am +++ b/src/Makefile.am @@ -1,3 +1,9 @@ -SUBDIRS = libical libicalss libicalvcal test +if HAVE_PYTHON +if HAVE_SWIG + python_dir = python +endif +endif + +SUBDIRS = libical libicalss libicalvcal test $(python_dir) include_HEADERS = ical.h diff --git a/src/Makefile.in b/src/Makefile.in index 1365418..0d64a25 100644 --- a/src/Makefile.in +++ b/src/Makefile.in @@ -1,8 +1,8 @@ -# Makefile.in generated by automake 1.9.5 from Makefile.am. +# Makefile.in generated by automake 1.12.2 from Makefile.am. # @configure_input@ -# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, -# 2003, 2004, 2005 Free Software Foundation, Inc. +# Copyright (C) 1994-2012 Free Software Foundation, Inc. + # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. @@ -14,15 +14,29 @@ @SET_MAKE@ -srcdir = @srcdir@ -top_srcdir = @top_srcdir@ VPATH = @srcdir@ +am__make_dryrun = \ + { \ + am__dry=no; \ + case $$MAKEFLAGS in \ + *\\[\ \ ]*) \ + echo 'am--echo: ; @echo "AM" OK' | $(MAKE) -f - 2>/dev/null \ + | grep '^AM OK$$' >/dev/null || am__dry=yes;; \ + *) \ + for am__flg in $$MAKEFLAGS; do \ + case $$am__flg in \ + *=*|--*) ;; \ + *n*) am__dry=yes; break;; \ + esac; \ + done;; \ + esac; \ + test $$am__dry = yes; \ + } pkgdatadir = $(datadir)/@PACKAGE@ -pkglibdir = $(libdir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ -top_builddir = .. +pkglibdir = $(libdir)/@PACKAGE@ +pkglibexecdir = $(libexecdir)/@PACKAGE@ am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd -INSTALL = @INSTALL@ install_sh_DATA = $(install_sh) -c -m 644 install_sh_PROGRAM = $(install_sh) -c install_sh_SCRIPT = $(install_sh) -c @@ -39,7 +53,7 @@ host_triplet = @host@ target_triplet = @target@ subdir = src DIST_COMMON = $(include_HEADERS) $(srcdir)/Makefile.am \ - $(srcdir)/Makefile.in + $(srcdir)/Makefile.in $(top_srcdir)/mkinstalldirs ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/configure.in am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ @@ -47,30 +61,85 @@ am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs CONFIG_HEADER = $(top_builddir)/config.h CONFIG_CLEAN_FILES = +CONFIG_CLEAN_VPATH_FILES = SOURCES = DIST_SOURCES = RECURSIVE_TARGETS = all-recursive check-recursive dvi-recursive \ html-recursive info-recursive install-data-recursive \ - install-exec-recursive install-info-recursive \ - install-recursive installcheck-recursive installdirs-recursive \ - pdf-recursive ps-recursive uninstall-info-recursive \ - uninstall-recursive + install-dvi-recursive install-exec-recursive \ + install-html-recursive install-info-recursive \ + install-pdf-recursive install-ps-recursive install-recursive \ + installcheck-recursive installdirs-recursive pdf-recursive \ + ps-recursive uninstall-recursive +am__can_run_installinfo = \ + case $$AM_UPDATE_INFO_DIR in \ + n|no|NO) false;; \ + *) (install-info --version) >/dev/null 2>&1;; \ + esac am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; am__vpath_adj = case $$p in \ $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \ *) f=$$p;; \ esac; -am__strip_dir = `echo $$p | sed -e 's|^.*/||'`; +am__strip_dir = f=`echo $$p | sed -e 's|^.*/||'`; +am__install_max = 40 +am__nobase_strip_setup = \ + srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/\\\\&/g'` +am__nobase_strip = \ + for p in $$list; do echo "$$p"; done | sed -e "s|$$srcdirstrip/||" +am__nobase_list = $(am__nobase_strip_setup); \ + for p in $$list; do echo "$$p $$p"; done | \ + sed "s| $$srcdirstrip/| |;"' / .*\//!s/ .*/ ./; s,\( .*\)/[^/]*$$,\1,' | \ + $(AWK) 'BEGIN { files["."] = "" } { files[$$2] = files[$$2] " " $$1; \ + if (++n[$$2] == $(am__install_max)) \ + { print $$2, files[$$2]; n[$$2] = 0; files[$$2] = "" } } \ + END { for (dir in files) print dir, files[dir] }' +am__base_list = \ + sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \ + sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g' +am__uninstall_files_from_dir = { \ + test -z "$$files" \ + || { test ! -d "$$dir" && test ! -f "$$dir" && test ! -r "$$dir"; } \ + || { echo " ( cd '$$dir' && rm -f" $$files ")"; \ + $(am__cd) "$$dir" && rm -f $$files; }; \ + } am__installdirs = "$(DESTDIR)$(includedir)" -includeHEADERS_INSTALL = $(INSTALL_HEADER) HEADERS = $(include_HEADERS) +RECURSIVE_CLEAN_TARGETS = mostlyclean-recursive clean-recursive \ + distclean-recursive maintainer-clean-recursive +AM_RECURSIVE_TARGETS = $(RECURSIVE_TARGETS:-recursive=) \ + $(RECURSIVE_CLEAN_TARGETS:-recursive=) tags TAGS ctags CTAGS \ + distdir ETAGS = etags CTAGS = ctags -DIST_SUBDIRS = $(SUBDIRS) +DIST_SUBDIRS = libical libicalss libicalvcal test python DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) +am__relativize = \ + dir0=`pwd`; \ + sed_first='s,^\([^/]*\)/.*$$,\1,'; \ + sed_rest='s,^[^/]*/*,,'; \ + sed_last='s,^.*/\([^/]*\)$$,\1,'; \ + sed_butlast='s,/*[^/]*$$,,'; \ + while test -n "$$dir1"; do \ + first=`echo "$$dir1" | sed -e "$$sed_first"`; \ + if test "$$first" != "."; then \ + if test "$$first" = ".."; then \ + dir2=`echo "$$dir0" | sed -e "$$sed_last"`/"$$dir2"; \ + dir0=`echo "$$dir0" | sed -e "$$sed_butlast"`; \ + else \ + first2=`echo "$$dir2" | sed -e "$$sed_first"`; \ + if test "$$first2" = "$$first"; then \ + dir2=`echo "$$dir2" | sed -e "$$sed_rest"`; \ + else \ + dir2="../$$dir2"; \ + fi; \ + dir0="$$dir0"/"$$first"; \ + fi; \ + fi; \ + dir1=`echo "$$dir1" | sed -e "$$sed_rest"`; \ + done; \ + reldir="$$dir2" ACLOCAL = @ACLOCAL@ -AMDEP_FALSE = @AMDEP_FALSE@ -AMDEP_TRUE = @AMDEP_TRUE@ AMTAR = @AMTAR@ AR = @AR@ AUTOCONF = @AUTOCONF@ @@ -94,18 +163,17 @@ CXXFLAGS = @CXXFLAGS@ CYGPATH_W = @CYGPATH_W@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ -DEV_FALSE = @DEV_FALSE@ -DEV_TRUE = @DEV_TRUE@ -ECHO = @ECHO@ +DLLTOOL = @DLLTOOL@ +DSYMUTIL = @DSYMUTIL@ +DUMPBIN = @DUMPBIN@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ -F77 = @F77@ -FFLAGS = @FFLAGS@ -HAVE_PTHREAD_FALSE = @HAVE_PTHREAD_FALSE@ -HAVE_PTHREAD_TRUE = @HAVE_PTHREAD_TRUE@ +FGREP = @FGREP@ +GREP = @GREP@ +INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ @@ -115,6 +183,7 @@ JAVA = @JAVA@ JAVAC = @JAVAC@ JAVAH = @JAVAH@ JAVA_PLATFORM = @JAVA_PLATFORM@ +LD = @LD@ LDFLAGS = @LDFLAGS@ LEX = @LEX@ LEXLIB = @LEXLIB@ @@ -122,53 +191,52 @@ LEX_OUTPUT_ROOT = @LEX_OUTPUT_ROOT@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LIBTOOL = @LIBTOOL@ +LIPO = @LIPO@ LN_S = @LN_S@ LTLIBOBJS = @LTLIBOBJS@ MAINT = @MAINT@ -MAINTAINER_MODE_FALSE = @MAINTAINER_MODE_FALSE@ -MAINTAINER_MODE_TRUE = @MAINTAINER_MODE_TRUE@ MAKEINFO = @MAKEINFO@ +MANIFEST_TOOL = @MANIFEST_TOOL@ +MKDIR_P = @MKDIR_P@ +NM = @NM@ +NMEDIT = @NMEDIT@ +OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ -OS_WIN32_FALSE = @OS_WIN32_FALSE@ -OS_WIN32_TRUE = @OS_WIN32_TRUE@ +OTOOL = @OTOOL@ +OTOOL64 = @OTOOL64@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ +PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ PERL = @PERL@ PTHREAD_LIBS = @PTHREAD_LIBS@ +PYTHON = @PYTHON@ +PYTHON_EXEC_PREFIX = @PYTHON_EXEC_PREFIX@ +PYTHON_PLATFORM = @PYTHON_PLATFORM@ +PYTHON_PREFIX = @PYTHON_PREFIX@ +PYTHON_VERSION = @PYTHON_VERSION@ PY_CFLAGS = @PY_CFLAGS@ -PY_EXTRA_LIBS = @PY_EXTRA_LIBS@ -PY_LIBS = @PY_LIBS@ -PY_LIB_LOC = @PY_LIB_LOC@ RANLIB = @RANLIB@ +SED = @SED@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ STRIP = @STRIP@ VERSION = @VERSION@ -WITH_BDB4_FALSE = @WITH_BDB4_FALSE@ -WITH_BDB4_TRUE = @WITH_BDB4_TRUE@ -WITH_CXX_BINDINGS_FALSE = @WITH_CXX_BINDINGS_FALSE@ -WITH_CXX_BINDINGS_TRUE = @WITH_CXX_BINDINGS_TRUE@ -WITH_JAVA_FALSE = @WITH_JAVA_FALSE@ -WITH_JAVA_TRUE = @WITH_JAVA_TRUE@ -WITH_PYTHON_FALSE = @WITH_PYTHON_FALSE@ -WITH_PYTHON_TRUE = @WITH_PYTHON_TRUE@ YACC = @YACC@ +YFLAGS = @YFLAGS@ ZONE_INFO = @ZONE_INFO@ +abs_builddir = @abs_builddir@ +abs_srcdir = @abs_srcdir@ +abs_top_builddir = @abs_top_builddir@ +abs_top_srcdir = @abs_top_srcdir@ ac_ct_AR = @ac_ct_AR@ ac_ct_CC = @ac_ct_CC@ ac_ct_CXX = @ac_ct_CXX@ -ac_ct_F77 = @ac_ct_F77@ -ac_ct_RANLIB = @ac_ct_RANLIB@ -ac_ct_STRIP = @ac_ct_STRIP@ -am__fastdepCC_FALSE = @am__fastdepCC_FALSE@ -am__fastdepCC_TRUE = @am__fastdepCC_TRUE@ -am__fastdepCXX_FALSE = @am__fastdepCXX_FALSE@ -am__fastdepCXX_TRUE = @am__fastdepCXX_TRUE@ +ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ am__include = @am__include@ am__leading_dot = @am__leading_dot@ am__quote = @am__quote@ @@ -180,34 +248,51 @@ build_alias = @build_alias@ build_cpu = @build_cpu@ build_os = @build_os@ build_vendor = @build_vendor@ +builddir = @builddir@ datadir = @datadir@ +datarootdir = @datarootdir@ +docdir = @docdir@ +dvidir = @dvidir@ exec_prefix = @exec_prefix@ host = @host@ host_alias = @host_alias@ host_cpu = @host_cpu@ host_os = @host_os@ host_vendor = @host_vendor@ +htmldir = @htmldir@ includedir = @includedir@ infodir = @infodir@ install_sh = @install_sh@ libdir = @libdir@ libexecdir = @libexecdir@ +localedir = @localedir@ localstatedir = @localstatedir@ mandir = @mandir@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ +pdfdir = @pdfdir@ +pkgpyexecdir = @pkgpyexecdir@ +pkgpythondir = @pkgpythondir@ prefix = @prefix@ program_transform_name = @program_transform_name@ -python_val = @python_val@ +psdir = @psdir@ +pyexecdir = @pyexecdir@ +pythondir = @pythondir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ +srcdir = @srcdir@ +swig_val = @swig_val@ sysconfdir = @sysconfdir@ target = @target@ target_alias = @target_alias@ target_cpu = @target_cpu@ target_os = @target_os@ target_vendor = @target_vendor@ -SUBDIRS = libical libicalss libicalvcal test +top_build_prefix = @top_build_prefix@ +top_builddir = @top_builddir@ +top_srcdir = @top_srcdir@ +@HAVE_PYTHON_TRUE@@HAVE_SWIG_TRUE@python_dir = python +SUBDIRS = libical libicalss libicalvcal test $(python_dir) include_HEADERS = ical.h all: all-recursive @@ -216,14 +301,14 @@ $(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__confi @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh \ - && exit 0; \ + ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ + && { if test -f $@; then exit 0; else break; fi; }; \ exit 1;; \ esac; \ done; \ - echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu src/Makefile'; \ - cd $(top_srcdir) && \ - $(AUTOMAKE) --gnu src/Makefile + echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu src/Makefile'; \ + $(am__cd) $(top_srcdir) && \ + $(AUTOMAKE) --gnu src/Makefile .PRECIOUS: Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ @@ -241,42 +326,43 @@ $(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh +$(am__aclocal_m4_deps): mostlyclean-libtool: -rm -f *.lo clean-libtool: -rm -rf .libs _libs - -distclean-libtool: - -rm -f libtool -uninstall-info-am: install-includeHEADERS: $(include_HEADERS) @$(NORMAL_INSTALL) - test -z "$(includedir)" || $(mkdir_p) "$(DESTDIR)$(includedir)" - @list='$(include_HEADERS)'; for p in $$list; do \ + @list='$(include_HEADERS)'; test -n "$(includedir)" || list=; \ + if test -n "$$list"; then \ + echo " $(MKDIR_P) '$(DESTDIR)$(includedir)'"; \ + $(MKDIR_P) "$(DESTDIR)$(includedir)" || exit 1; \ + fi; \ + for p in $$list; do \ if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ - f=$(am__strip_dir) \ - echo " $(includeHEADERS_INSTALL) '$$d$$p' '$(DESTDIR)$(includedir)/$$f'"; \ - $(includeHEADERS_INSTALL) "$$d$$p" "$(DESTDIR)$(includedir)/$$f"; \ + echo "$$d$$p"; \ + done | $(am__base_list) | \ + while read files; do \ + echo " $(INSTALL_HEADER) $$files '$(DESTDIR)$(includedir)'"; \ + $(INSTALL_HEADER) $$files "$(DESTDIR)$(includedir)" || exit $$?; \ done uninstall-includeHEADERS: @$(NORMAL_UNINSTALL) - @list='$(include_HEADERS)'; for p in $$list; do \ - f=$(am__strip_dir) \ - echo " rm -f '$(DESTDIR)$(includedir)/$$f'"; \ - rm -f "$(DESTDIR)$(includedir)/$$f"; \ - done + @list='$(include_HEADERS)'; test -n "$(includedir)" || list=; \ + files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \ + dir='$(DESTDIR)$(includedir)'; $(am__uninstall_files_from_dir) # This directory's subdirectories are mostly independent; you can cd -# into them and run `make' without going through this Makefile. -# To change the values of `make' variables: instead of editing Makefiles, -# (1) if the variable is set in `config.status', edit `config.status' -# (which will cause the Makefiles to be regenerated when you run `make'); -# (2) otherwise, pass the desired values on the `make' command line. -$(RECURSIVE_TARGETS): - @failcom='exit 1'; \ +# into them and run 'make' without going through this Makefile. +# To change the values of 'make' variables: instead of editing Makefiles, +# (1) if the variable is set in 'config.status', edit 'config.status' +# (which will cause the Makefiles to be regenerated when you run 'make'); +# (2) otherwise, pass the desired values on the 'make' command line. +$(RECURSIVE_TARGETS) $(RECURSIVE_CLEAN_TARGETS): + @fail= failcom='exit 1'; \ for f in x $$MAKEFLAGS; do \ case $$f in \ *=* | --[!k]*);; \ @@ -285,7 +371,11 @@ $(RECURSIVE_TARGETS): done; \ dot_seen=no; \ target=`echo $@ | sed s/-recursive//`; \ - list='$(SUBDIRS)'; for subdir in $$list; do \ + case "$@" in \ + distclean-* | maintainer-clean-*) list='$(DIST_SUBDIRS)' ;; \ + *) list='$(SUBDIRS)' ;; \ + esac; \ + for subdir in $$list; do \ echo "Making $$target in $$subdir"; \ if test "$$subdir" = "."; then \ dot_seen=yes; \ @@ -293,51 +383,23 @@ $(RECURSIVE_TARGETS): else \ local_target="$$target"; \ fi; \ - (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \ + ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \ || eval $$failcom; \ done; \ if test "$$dot_seen" = "no"; then \ $(MAKE) $(AM_MAKEFLAGS) "$$target-am" || exit 1; \ fi; test -z "$$fail" - -mostlyclean-recursive clean-recursive distclean-recursive \ -maintainer-clean-recursive: - @failcom='exit 1'; \ - for f in x $$MAKEFLAGS; do \ - case $$f in \ - *=* | --[!k]*);; \ - *k*) failcom='fail=yes';; \ - esac; \ - done; \ - dot_seen=no; \ - case "$@" in \ - distclean-* | maintainer-clean-*) list='$(DIST_SUBDIRS)' ;; \ - *) list='$(SUBDIRS)' ;; \ - esac; \ - rev=''; for subdir in $$list; do \ - if test "$$subdir" = "."; then :; else \ - rev="$$subdir $$rev"; \ - fi; \ - done; \ - rev="$$rev ."; \ - target=`echo $@ | sed s/-recursive//`; \ - for subdir in $$rev; do \ - echo "Making $$target in $$subdir"; \ - if test "$$subdir" = "."; then \ - local_target="$$target-am"; \ - else \ - local_target="$$target"; \ - fi; \ - (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \ - || eval $$failcom; \ - done && test -z "$$fail" tags-recursive: list='$(SUBDIRS)'; for subdir in $$list; do \ - test "$$subdir" = . || (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) tags); \ + test "$$subdir" = . || ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) tags); \ done ctags-recursive: list='$(SUBDIRS)'; for subdir in $$list; do \ - test "$$subdir" = . || (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) ctags); \ + test "$$subdir" = . || ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) ctags); \ + done +cscopelist-recursive: + list='$(SUBDIRS)'; for subdir in $$list; do \ + test "$$subdir" = . || ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) cscopelist); \ done ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) @@ -345,14 +407,14 @@ ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ - $(AWK) ' { files[$$0] = 1; } \ - END { for (i in files) print i; }'`; \ + $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ + END { if (nonempty) { for (i in files) print i; }; }'`; \ mkid -fID $$unique tags: TAGS TAGS: tags-recursive $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) - tags=; \ + set x; \ here=`pwd`; \ if ($(ETAGS) --etags-include --version) >/dev/null 2>&1; then \ include_option=--etags-include; \ @@ -364,81 +426,112 @@ TAGS: tags-recursive $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ list='$(SUBDIRS)'; for subdir in $$list; do \ if test "$$subdir" = .; then :; else \ test ! -f $$subdir/TAGS || \ - tags="$$tags $$include_option=$$here/$$subdir/TAGS"; \ + set "$$@" "$$include_option=$$here/$$subdir/TAGS"; \ fi; \ done; \ list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ - $(AWK) ' { files[$$0] = 1; } \ - END { for (i in files) print i; }'`; \ - if test -z "$(ETAGS_ARGS)$$tags$$unique"; then :; else \ + $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ + END { if (nonempty) { for (i in files) print i; }; }'`; \ + shift; \ + if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ test -n "$$unique" || unique=$$empty_fix; \ - $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ - $$tags $$unique; \ + if test $$# -gt 0; then \ + $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ + "$$@" $$unique; \ + else \ + $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ + $$unique; \ + fi; \ fi ctags: CTAGS CTAGS: ctags-recursive $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) - tags=; \ - here=`pwd`; \ list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ - $(AWK) ' { files[$$0] = 1; } \ - END { for (i in files) print i; }'`; \ - test -z "$(CTAGS_ARGS)$$tags$$unique" \ + $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ + END { if (nonempty) { for (i in files) print i; }; }'`; \ + test -z "$(CTAGS_ARGS)$$unique" \ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ - $$tags $$unique + $$unique GTAGS: here=`$(am__cd) $(top_builddir) && pwd` \ - && cd $(top_srcdir) \ - && gtags -i $(GTAGS_ARGS) $$here + && $(am__cd) $(top_srcdir) \ + && gtags -i $(GTAGS_ARGS) "$$here" + +cscopelist: cscopelist-recursive $(HEADERS) $(SOURCES) $(LISP) + list='$(SOURCES) $(HEADERS) $(LISP)'; \ + case "$(srcdir)" in \ + [\\/]* | ?:[\\/]*) sdir="$(srcdir)" ;; \ + *) sdir=$(subdir)/$(srcdir) ;; \ + esac; \ + for i in $$list; do \ + if test -f "$$i"; then \ + echo "$(subdir)/$$i"; \ + else \ + echo "$$sdir/$$i"; \ + fi; \ + done >> $(top_builddir)/cscope.files distclean-tags: -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags distdir: $(DISTFILES) - @srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; \ - topsrcdirstrip=`echo "$(top_srcdir)" | sed 's|.|.|g'`; \ - list='$(DISTFILES)'; for file in $$list; do \ - case $$file in \ - $(srcdir)/*) file=`echo "$$file" | sed "s|^$$srcdirstrip/||"`;; \ - $(top_srcdir)/*) file=`echo "$$file" | sed "s|^$$topsrcdirstrip/|$(top_builddir)/|"`;; \ - esac; \ + @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ + topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ + list='$(DISTFILES)'; \ + dist_files=`for file in $$list; do echo $$file; done | \ + sed -e "s|^$$srcdirstrip/||;t" \ + -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ + case $$dist_files in \ + */*) $(MKDIR_P) `echo "$$dist_files" | \ + sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ + sort -u` ;; \ + esac; \ + for file in $$dist_files; do \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ - dir=`echo "$$file" | sed -e 's,/[^/]*$$,,'`; \ - if test "$$dir" != "$$file" && test "$$dir" != "."; then \ - dir="/$$dir"; \ - $(mkdir_p) "$(distdir)$$dir"; \ - else \ - dir=''; \ - fi; \ if test -d $$d/$$file; then \ + dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ + if test -d "$(distdir)/$$file"; then \ + find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ + fi; \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ - cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \ + cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ + find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ - cp -pR $$d/$$file $(distdir)$$dir || exit 1; \ + cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ else \ - test -f $(distdir)/$$file \ - || cp -p $$d/$$file $(distdir)/$$file \ + test -f "$(distdir)/$$file" \ + || cp -p $$d/$$file "$(distdir)/$$file" \ || exit 1; \ fi; \ done - list='$(DIST_SUBDIRS)'; for subdir in $$list; do \ + @list='$(DIST_SUBDIRS)'; for subdir in $$list; do \ if test "$$subdir" = .; then :; else \ - test -d "$(distdir)/$$subdir" \ - || $(mkdir_p) "$(distdir)/$$subdir" \ - || exit 1; \ - distdir=`$(am__cd) $(distdir) && pwd`; \ - top_distdir=`$(am__cd) $(top_distdir) && pwd`; \ - (cd $$subdir && \ + $(am__make_dryrun) \ + || test -d "$(distdir)/$$subdir" \ + || $(MKDIR_P) "$(distdir)/$$subdir" \ + || exit 1; \ + dir1=$$subdir; dir2="$(distdir)/$$subdir"; \ + $(am__relativize); \ + new_distdir=$$reldir; \ + dir1=$$subdir; dir2="$(top_distdir)"; \ + $(am__relativize); \ + new_top_distdir=$$reldir; \ + echo " (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) top_distdir="$$new_top_distdir" distdir="$$new_distdir" \\"; \ + echo " am__remove_distdir=: am__skip_length_check=: am__skip_mode_fix=: distdir)"; \ + ($(am__cd) $$subdir && \ $(MAKE) $(AM_MAKEFLAGS) \ - top_distdir="$$top_distdir" \ - distdir="$$distdir/$$subdir" \ + top_distdir="$$new_top_distdir" \ + distdir="$$new_distdir" \ + am__remove_distdir=: \ + am__skip_length_check=: \ + am__skip_mode_fix=: \ distdir) \ || exit 1; \ fi; \ @@ -449,7 +542,7 @@ all-am: Makefile $(HEADERS) installdirs: installdirs-recursive installdirs-am: for dir in "$(DESTDIR)$(includedir)"; do \ - test -z "$$dir" || $(mkdir_p) "$$dir"; \ + test -z "$$dir" || $(MKDIR_P) "$$dir"; \ done install: install-recursive install-exec: install-exec-recursive @@ -461,16 +554,22 @@ install-am: all-am installcheck: installcheck-recursive install-strip: - $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ - install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ - `test -z '$(STRIP)' || \ - echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install + if test -z '$(STRIP)'; then \ + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + install; \ + else \ + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \ + fi mostlyclean-generic: clean-generic: distclean-generic: -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) + -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) maintainer-clean-generic: @echo "This command is intended for maintainers to use" @@ -481,8 +580,7 @@ clean-am: clean-generic clean-libtool mostlyclean-am distclean: distclean-recursive -rm -f Makefile -distclean-am: clean-am distclean-generic distclean-libtool \ - distclean-tags +distclean-am: clean-am distclean-generic distclean-tags dvi: dvi-recursive @@ -490,18 +588,38 @@ dvi-am: html: html-recursive +html-am: + info: info-recursive info-am: install-data-am: install-includeHEADERS +install-dvi: install-dvi-recursive + +install-dvi-am: + install-exec-am: +install-html: install-html-recursive + +install-html-am: + install-info: install-info-recursive +install-info-am: + install-man: +install-pdf: install-pdf-recursive + +install-pdf-am: + +install-ps: install-ps-recursive + +install-ps-am: + installcheck-am: maintainer-clean: maintainer-clean-recursive @@ -520,24 +638,27 @@ ps: ps-recursive ps-am: -uninstall-am: uninstall-includeHEADERS uninstall-info-am - -uninstall-info: uninstall-info-recursive - -.PHONY: $(RECURSIVE_TARGETS) CTAGS GTAGS all all-am check check-am \ - clean clean-generic clean-libtool clean-recursive ctags \ - ctags-recursive distclean distclean-generic distclean-libtool \ - distclean-recursive distclean-tags distdir dvi dvi-am html \ - html-am info info-am install install-am install-data \ - install-data-am install-exec install-exec-am \ - install-includeHEADERS install-info install-info-am \ - install-man install-strip installcheck installcheck-am \ - installdirs installdirs-am maintainer-clean \ - maintainer-clean-generic maintainer-clean-recursive \ - mostlyclean mostlyclean-generic mostlyclean-libtool \ - mostlyclean-recursive pdf pdf-am ps ps-am tags tags-recursive \ - uninstall uninstall-am uninstall-includeHEADERS \ - uninstall-info-am +uninstall-am: uninstall-includeHEADERS + +.MAKE: $(RECURSIVE_CLEAN_TARGETS) $(RECURSIVE_TARGETS) \ + cscopelist-recursive ctags-recursive install-am install-strip \ + tags-recursive + +.PHONY: $(RECURSIVE_CLEAN_TARGETS) $(RECURSIVE_TARGETS) CTAGS GTAGS \ + all all-am check check-am clean clean-generic clean-libtool \ + cscopelist cscopelist-recursive ctags ctags-recursive \ + distclean distclean-generic distclean-libtool distclean-tags \ + distdir dvi dvi-am html html-am info info-am install \ + install-am install-data install-data-am install-dvi \ + install-dvi-am install-exec install-exec-am install-html \ + install-html-am install-includeHEADERS install-info \ + install-info-am install-man install-pdf install-pdf-am \ + install-ps install-ps-am install-strip installcheck \ + installcheck-am installdirs installdirs-am maintainer-clean \ + maintainer-clean-generic mostlyclean mostlyclean-generic \ + mostlyclean-libtool pdf pdf-am ps ps-am tags tags-recursive \ + uninstall uninstall-am uninstall-includeHEADERS + # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. diff --git a/src/Net-ICal-Libical/netical.i b/src/Net-ICal-Libical/netical.i index 9d380dc..3c9181c 100644 --- a/src/Net-ICal-Libical/netical.i +++ b/src/Net-ICal-Libical/netical.i @@ -5,15 +5,16 @@ (C) COPYRIGHT 1999 Eric Busboom http://www.softwarestudio.org - The contents of this file are subject to the Mozilla Public License - Version 1.0 (the "License"); you may not use this file except in - compliance with the License. You may obtain a copy of the License at - http://www.mozilla.org/MPL/ - - Software distributed under the License is distributed on an "AS IS" - basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See - the License for the specific language governing rights and - limitations under the License. + This program is free software; you can redistribute it and/or modify + it under the terms of either: + + The LGPL as published by the Free Software Foundation, version + 2.1, available at: http://www.fsf.org/copyleft/lesser.html + + Or: + + The Mozilla Public License Version 1.0. You may obtain a copy of + the License at http://www.mozilla.org/MPL/ The original author is Eric Busboom diff --git a/src/ical.def b/src/ical.def index 83bdfd2..90ba599 100644 --- a/src/ical.def +++ b/src/ical.def @@ -1,4 +1,4 @@ -LIBRARY ical.dll +LIBRARY EXPORTS caldat compare_map DATA @@ -126,7 +126,6 @@ icalerrno_return icalerror_clear_errno icalerror_crash_here icalerror_error_from_string -icalerror_errors_are_fatal icalerror_get_error_state icalerror_perror icalerror_restore @@ -847,6 +846,7 @@ icaltimezone_get_utc_timezone icaltimezone_new icaltimezone_release_zone_tab icaltimezone_set_component +icaltimezone_set_tzid_prefix icaltriggertype_from_int icaltriggertype_from_string icaltriggertype_is_bad_trigger @@ -995,3139 +995,6 @@ pvl_unshift restr_string_map DATA set_tz set_zone_directory -simple_str_to_float -sspm_action_map DATA -sspm_append_char -sspm_append_hex -sspm_append_string -sspm_build_header -sspm_default_add_line -sspm_default_end_part -sspm_default_free_part -sspm_default_new_part -sspm_encode_base64 -sspm_encode_quoted_printable -sspm_encoding_map DATA -sspm_encoding_string -sspm_find_major_content_type -sspm_find_minor_content_type -sspm_free_header -sspm_free_parts -sspm_get_next_line -sspm_get_parameter -sspm_is_blank -sspm_is_continuation_line -sspm_is_mail_header -sspm_is_mime_boundary -sspm_is_mime_header -sspm_is_mime_terminating_boundary -sspm_lowercase -sspm_major_type_string -sspm_make_multipart_part -sspm_make_multipart_subpart -sspm_make_part -sspm_minor_type_string -sspm_parse_mime -sspm_property_name -sspm_read_header -sspm_set_error -sspm_store_part -sspm_strdup -sspm_value -sspm_write_base64 -sspm_write_header -sspm_write_mime -sspm_write_multipart_part -sspm_write_part -strstriplt -unset_tz -ycaltime_days_in_year -LIBRARY ical.dll -EXPORTS -caldat -compare_map DATA -decode_base64 -decode_quoted_printable -free_zone_directory -ical_bt -icalarray_append -icalarray_element_at -icalarray_free -icalarray_new -icalarray_remove_element_at -icalarray_sort -icalattach_get_data -icalattach_get_is_url -icalattach_get_url -icalattach_new_from_data -icalattach_new_from_url -icalattach_ref -icalattach_unref -icalcompiter_deref -icalcompiter_next -icalcompiter_null DATA -icalcompiter_prior -icalcomponent_add_children -icalcomponent_add_component -icalcomponent_add_property -icalcomponent_as_ical_string -icalcomponent_as_ical_string_r -icalcomponent_begin_component -icalcomponent_check_restrictions -icalcomponent_convert_errors -icalcomponent_count_components -icalcomponent_count_errors -icalcomponent_count_properties -icalcomponent_end_component -icalcomponent_foreach_recurrence -icalcomponent_foreach_tzid -icalcomponent_free -icalcomponent_get_comment -icalcomponent_get_current_component -icalcomponent_get_current_property -icalcomponent_get_description -icalcomponent_get_dtend -icalcomponent_get_dtstamp -icalcomponent_get_dtstart -icalcomponent_get_due -icalcomponent_get_duration -icalcomponent_get_first_component -icalcomponent_get_first_property -icalcomponent_get_first_real_component -icalcomponent_get_inner -icalcomponent_get_location -icalcomponent_get_method -icalcomponent_get_next_component -icalcomponent_get_next_property -icalcomponent_get_parent -icalcomponent_get_recurrenceid -icalcomponent_get_relcalid -icalcomponent_get_sequence -icalcomponent_get_span -icalcomponent_get_status -icalcomponent_get_summary -icalcomponent_get_timezone -icalcomponent_get_uid -icalcomponent_is_valid -icalcomponent_isa -icalcomponent_isa_component -icalcomponent_kind_is_valid -icalcomponent_kind_to_string -icalcomponent_merge_component -icalcomponent_new -icalcomponent_new_clone -icalcomponent_new_from_string -icalcomponent_new_vagenda -icalcomponent_new_valarm -icalcomponent_new_vcalendar -icalcomponent_new_vevent -icalcomponent_new_vfreebusy -icalcomponent_new_vjournal -icalcomponent_new_vquery -icalcomponent_new_vreply -icalcomponent_new_vtimezone -icalcomponent_new_vtodo -icalcomponent_new_x -icalcomponent_new_xdaylight -icalcomponent_new_xstandard -icalcomponent_remove_component -icalcomponent_remove_property -icalcomponent_set_comment -icalcomponent_set_description -icalcomponent_set_dtend -icalcomponent_set_dtstamp -icalcomponent_set_dtstart -icalcomponent_set_due -icalcomponent_set_duration -icalcomponent_set_location -icalcomponent_set_method -icalcomponent_set_parent -icalcomponent_set_recurrenceid -icalcomponent_set_relcalid -icalcomponent_set_sequence -icalcomponent_set_status -icalcomponent_set_summary -icalcomponent_set_uid -icalcomponent_string_to_kind -icalcomponent_strip_errors -icalcomponent_vanew -icaldurationtype_as_ical_string -icaldurationtype_as_ical_string_r -icaldurationtype_as_int -icaldurationtype_bad_duration -icaldurationtype_from_int -icaldurationtype_from_string -icaldurationtype_is_bad_duration -icaldurationtype_is_null_duration -icaldurationtype_null_duration -icalenum_num_to_reqstat -icalenum_reqstat_code -icalenum_reqstat_code_r -icalenum_reqstat_desc -icalenum_reqstat_major -icalenum_reqstat_minor -icalerrno_return -icalerror_clear_errno -icalerror_crash_here -icalerror_error_from_string -icalerror_errors_are_fatal -icalerror_get_error_state -icalerror_perror -icalerror_restore -icalerror_set_errno -icalerror_set_error_state -icalerror_stop_here -icalerror_strerror -icalerror_supress -icallangbind_access_array -icallangbind_free_array -icallangbind_get_first_component -icallangbind_get_first_parameter -icallangbind_get_first_property -icallangbind_get_next_component -icallangbind_get_next_parameter -icallangbind_get_next_property -icallangbind_new_array -icallangbind_property_eval_string -icallangbind_property_eval_string_r -icallangbind_quote_as_ical -icallangbind_quote_as_ical_r -icallangbind_string_to_open_flag -icalmemory_add_tmp_buffer -icalmemory_append_char -icalmemory_append_string -icalmemory_free_buffer -icalmemory_free_ring -icalmemory_free_ring_byval -icalmemory_free_tmp_buffer -icalmemory_new_buffer -icalmemory_resize_buffer -icalmemory_strdup -icalmemory_tmp_buffer -icalmemory_tmp_copy -icalmime_attachment_add_line -icalmime_attachment_end_part -icalmime_attachment_free_part -icalmime_attachment_new_part -icalmime_make_part -icalmime_parse -icalmime_test -icalmime_text_add_line -icalmime_text_end_part -icalmime_text_end_part_r -icalmime_text_free_part -icalmime_text_new_part -icalmime_textcalendar_end_part -icalparameter_as_ical_string -icalparameter_as_ical_string_r -icalparameter_enum_to_string -icalparameter_free -icalparameter_get_actionparam -icalparameter_get_altrep -icalparameter_get_charset -icalparameter_get_cn -icalparameter_get_cutype -icalparameter_get_delegatedfrom -icalparameter_get_delegatedto -icalparameter_get_dir -icalparameter_get_enable -icalparameter_get_encoding -icalparameter_get_fbtype -icalparameter_get_fmttype -icalparameter_get_id -icalparameter_get_language -icalparameter_get_latency -icalparameter_get_local -icalparameter_get_localize -icalparameter_get_member -icalparameter_get_options -icalparameter_get_parent -icalparameter_get_partstat -icalparameter_get_range -icalparameter_get_related -icalparameter_get_reltype -icalparameter_get_role -icalparameter_get_rsvp -icalparameter_get_sentby -icalparameter_get_tzid -icalparameter_get_value -icalparameter_get_x -icalparameter_get_xliccomparetype -icalparameter_get_xlicerrortype -icalparameter_get_xname -icalparameter_get_xvalue -icalparameter_isa -icalparameter_isa_parameter -icalparameter_kind_to_string -icalparameter_new -icalparameter_new_actionparam -icalparameter_new_altrep -icalparameter_new_charset -icalparameter_new_clone -icalparameter_new_cn -icalparameter_new_cutype -icalparameter_new_delegatedfrom -icalparameter_new_delegatedto -icalparameter_new_dir -icalparameter_new_enable -icalparameter_new_encoding -icalparameter_new_fbtype -icalparameter_new_fmttype -icalparameter_new_from_string -icalparameter_new_from_value_string -icalparameter_new_id -icalparameter_new_impl -icalparameter_new_language -icalparameter_new_latency -icalparameter_new_local -icalparameter_new_localize -icalparameter_new_member -icalparameter_new_options -icalparameter_new_partstat -icalparameter_new_range -icalparameter_new_related -icalparameter_new_reltype -icalparameter_new_role -icalparameter_new_rsvp -icalparameter_new_sentby -icalparameter_new_tzid -icalparameter_new_value -icalparameter_new_x -icalparameter_new_xliccomparetype -icalparameter_new_xlicerrortype -icalparameter_set_actionparam -icalparameter_set_altrep -icalparameter_set_charset -icalparameter_set_cn -icalparameter_set_cutype -icalparameter_set_delegatedfrom -icalparameter_set_delegatedto -icalparameter_set_dir -icalparameter_set_enable -icalparameter_set_encoding -icalparameter_set_fbtype -icalparameter_set_fmttype -icalparameter_set_id -icalparameter_set_language -icalparameter_set_latency -icalparameter_set_local -icalparameter_set_localize -icalparameter_set_member -icalparameter_set_options -icalparameter_set_parent -icalparameter_set_partstat -icalparameter_set_range -icalparameter_set_related -icalparameter_set_reltype -icalparameter_set_role -icalparameter_set_rsvp -icalparameter_set_sentby -icalparameter_set_tzid -icalparameter_set_value -icalparameter_set_x -icalparameter_set_xliccomparetype -icalparameter_set_xlicerrortype -icalparameter_set_xname -icalparameter_set_xvalue -icalparameter_string_to_enum -icalparameter_string_to_kind -icalparameter_value_to_value_kind -icalparser_add_line -icalparser_clean -icalparser_free -icalparser_get_line -icalparser_get_state -icalparser_get_value -icalparser_new -icalparser_parse -icalparser_parse_string -icalparser_set_gen_data -icalparser_string_line_generator -icalperiodtype_as_ical_string -icalperiodtype_as_ical_string_r -icalperiodtype_from_string -icalperiodtype_is_null_period -icalperiodtype_is_valid_period -icalperiodtype_null_period -icalproperty_add_parameter -icalproperty_add_parameters -icalproperty_as_ical_string -icalproperty_as_ical_string_r -icalproperty_count_parameters -icalproperty_enum_belongs_to_property -icalproperty_enum_to_string -icalproperty_enum_to_string_r -icalproperty_free -icalproperty_get_action -icalproperty_get_allowconflict -icalproperty_get_attach -icalproperty_get_attendee -icalproperty_get_calid -icalproperty_get_calmaster -icalproperty_get_calscale -icalproperty_get_capversion -icalproperty_get_carid -icalproperty_get_carlevel -icalproperty_get_categories -icalproperty_get_class -icalproperty_get_cmd -icalproperty_get_comment -icalproperty_get_completed -icalproperty_get_components -icalproperty_get_contact -icalproperty_get_created -icalproperty_get_csid -icalproperty_get_datemax -icalproperty_get_datemin -icalproperty_get_decreed -icalproperty_get_defaultcharset -icalproperty_get_defaultlocale -icalproperty_get_defaulttzid -icalproperty_get_defaultvcars -icalproperty_get_deny -icalproperty_get_description -icalproperty_get_dtend -icalproperty_get_dtstamp -icalproperty_get_dtstart -icalproperty_get_due -icalproperty_get_duration -icalproperty_get_exdate -icalproperty_get_expand -icalproperty_get_exrule -icalproperty_get_first_parameter -icalproperty_get_freebusy -icalproperty_get_geo -icalproperty_get_grant -icalproperty_get_itipversion -icalproperty_get_lastmodified -icalproperty_get_location -icalproperty_get_maxcomponentsize -icalproperty_get_maxdate -icalproperty_get_maxresults -icalproperty_get_maxresultssize -icalproperty_get_method -icalproperty_get_mindate -icalproperty_get_multipart -icalproperty_get_name -icalproperty_get_next_parameter -icalproperty_get_organizer -icalproperty_get_owner -icalproperty_get_parameter_as_string -icalproperty_get_parameter_as_string_r -icalproperty_get_parent -icalproperty_get_percentcomplete -icalproperty_get_permission -icalproperty_get_priority -icalproperty_get_prodid -icalproperty_get_property_name -icalproperty_get_property_name_r -icalproperty_get_query -icalproperty_get_queryid -icalproperty_get_querylevel -icalproperty_get_queryname -icalproperty_get_rdate -icalproperty_get_recuraccepted -icalproperty_get_recurexpand -icalproperty_get_recurlimit -icalproperty_get_recurrenceid -icalproperty_get_relatedto -icalproperty_get_relcalid -icalproperty_get_repeat -icalproperty_get_requeststatus -icalproperty_get_resources -icalproperty_get_restriction -icalproperty_get_rrule -icalproperty_get_scope -icalproperty_get_sequence -icalproperty_get_status -icalproperty_get_storesexpanded -icalproperty_get_summary -icalproperty_get_target -icalproperty_get_transp -icalproperty_get_trigger -icalproperty_get_tzid -icalproperty_get_tzname -icalproperty_get_tzoffsetfrom -icalproperty_get_tzoffsetto -icalproperty_get_tzurl -icalproperty_get_uid -icalproperty_get_url -icalproperty_get_value -icalproperty_get_value_as_string -icalproperty_get_value_as_string_r -icalproperty_get_version -icalproperty_get_x -icalproperty_get_x_name -icalproperty_get_xlicclass -icalproperty_get_xlicclustercount -icalproperty_get_xlicerror -icalproperty_get_xlicmimecharset -icalproperty_get_xlicmimecid -icalproperty_get_xlicmimecontenttype -icalproperty_get_xlicmimeencoding -icalproperty_get_xlicmimefilename -icalproperty_get_xlicmimeoptinfo -icalproperty_isa -icalproperty_isa_property -icalproperty_kind_and_string_to_enum -icalproperty_kind_is_valid -icalproperty_kind_to_string -icalproperty_kind_to_value_kind -icalproperty_method_to_string -icalproperty_new -icalproperty_new_action -icalproperty_new_allowconflict -icalproperty_new_attach -icalproperty_new_attendee -icalproperty_new_calid -icalproperty_new_calmaster -icalproperty_new_calscale -icalproperty_new_capversion -icalproperty_new_carid -icalproperty_new_carlevel -icalproperty_new_categories -icalproperty_new_class -icalproperty_new_clone -icalproperty_new_cmd -icalproperty_new_comment -icalproperty_new_completed -icalproperty_new_components -icalproperty_new_contact -icalproperty_new_created -icalproperty_new_csid -icalproperty_new_datemax -icalproperty_new_datemin -icalproperty_new_decreed -icalproperty_new_defaultcharset -icalproperty_new_defaultlocale -icalproperty_new_defaulttzid -icalproperty_new_defaultvcars -icalproperty_new_deny -icalproperty_new_description -icalproperty_new_dtend -icalproperty_new_dtstamp -icalproperty_new_dtstart -icalproperty_new_due -icalproperty_new_duration -icalproperty_new_exdate -icalproperty_new_expand -icalproperty_new_exrule -icalproperty_new_freebusy -icalproperty_new_from_string -icalproperty_new_geo -icalproperty_new_grant -icalproperty_new_impl -icalproperty_new_itipversion -icalproperty_new_lastmodified -icalproperty_new_location -icalproperty_new_maxcomponentsize -icalproperty_new_maxdate -icalproperty_new_maxresults -icalproperty_new_maxresultssize -icalproperty_new_method -icalproperty_new_mindate -icalproperty_new_multipart -icalproperty_new_name -icalproperty_new_organizer -icalproperty_new_owner -icalproperty_new_percentcomplete -icalproperty_new_permission -icalproperty_new_priority -icalproperty_new_prodid -icalproperty_new_query -icalproperty_new_queryid -icalproperty_new_querylevel -icalproperty_new_queryname -icalproperty_new_rdate -icalproperty_new_recuraccepted -icalproperty_new_recurexpand -icalproperty_new_recurlimit -icalproperty_new_recurrenceid -icalproperty_new_relatedto -icalproperty_new_relcalid -icalproperty_new_repeat -icalproperty_new_requeststatus -icalproperty_new_resources -icalproperty_new_restriction -icalproperty_new_rrule -icalproperty_new_scope -icalproperty_new_sequence -icalproperty_new_status -icalproperty_new_storesexpanded -icalproperty_new_summary -icalproperty_new_target -icalproperty_new_transp -icalproperty_new_trigger -icalproperty_new_tzid -icalproperty_new_tzname -icalproperty_new_tzoffsetfrom -icalproperty_new_tzoffsetto -icalproperty_new_tzurl -icalproperty_new_uid -icalproperty_new_url -icalproperty_new_version -icalproperty_new_x -icalproperty_new_xlicclass -icalproperty_new_xlicclustercount -icalproperty_new_xlicerror -icalproperty_new_xlicmimecharset -icalproperty_new_xlicmimecid -icalproperty_new_xlicmimecontenttype -icalproperty_new_xlicmimeencoding -icalproperty_new_xlicmimefilename -icalproperty_new_xlicmimeoptinfo -icalproperty_recurrence_is_excluded -icalproperty_remove_parameter -icalproperty_remove_parameter_by_kind -icalproperty_remove_parameter_by_name -icalproperty_remove_parameter_by_ref -icalproperty_set_action -icalproperty_set_allowconflict -icalproperty_set_attach -icalproperty_set_attendee -icalproperty_set_calid -icalproperty_set_calmaster -icalproperty_set_calscale -icalproperty_set_capversion -icalproperty_set_carid -icalproperty_set_carlevel -icalproperty_set_categories -icalproperty_set_class -icalproperty_set_cmd -icalproperty_set_comment -icalproperty_set_completed -icalproperty_set_components -icalproperty_set_contact -icalproperty_set_created -icalproperty_set_csid -icalproperty_set_datemax -icalproperty_set_datemin -icalproperty_set_decreed -icalproperty_set_defaultcharset -icalproperty_set_defaultlocale -icalproperty_set_defaulttzid -icalproperty_set_defaultvcars -icalproperty_set_deny -icalproperty_set_description -icalproperty_set_dtend -icalproperty_set_dtstamp -icalproperty_set_dtstart -icalproperty_set_due -icalproperty_set_duration -icalproperty_set_exdate -icalproperty_set_expand -icalproperty_set_exrule -icalproperty_set_freebusy -icalproperty_set_geo -icalproperty_set_grant -icalproperty_set_itipversion -icalproperty_set_lastmodified -icalproperty_set_location -icalproperty_set_maxcomponentsize -icalproperty_set_maxdate -icalproperty_set_maxresults -icalproperty_set_maxresultssize -icalproperty_set_method -icalproperty_set_mindate -icalproperty_set_multipart -icalproperty_set_name -icalproperty_set_organizer -icalproperty_set_owner -icalproperty_set_parameter -icalproperty_set_parameter_from_string -icalproperty_set_parent -icalproperty_set_percentcomplete -icalproperty_set_permission -icalproperty_set_priority -icalproperty_set_prodid -icalproperty_set_query -icalproperty_set_queryid -icalproperty_set_querylevel -icalproperty_set_queryname -icalproperty_set_rdate -icalproperty_set_recuraccepted -icalproperty_set_recurexpand -icalproperty_set_recurlimit -icalproperty_set_recurrenceid -icalproperty_set_relatedto -icalproperty_set_relcalid -icalproperty_set_repeat -icalproperty_set_requeststatus -icalproperty_set_resources -icalproperty_set_restriction -icalproperty_set_rrule -icalproperty_set_scope -icalproperty_set_sequence -icalproperty_set_status -icalproperty_set_storesexpanded -icalproperty_set_summary -icalproperty_set_target -icalproperty_set_transp -icalproperty_set_trigger -icalproperty_set_tzid -icalproperty_set_tzname -icalproperty_set_tzoffsetfrom -icalproperty_set_tzoffsetto -icalproperty_set_tzurl -icalproperty_set_uid -icalproperty_set_url -icalproperty_set_value -icalproperty_set_value_from_string -icalproperty_set_version -icalproperty_set_x -icalproperty_set_x_name -icalproperty_set_xlicclass -icalproperty_set_xlicclustercount -icalproperty_set_xlicerror -icalproperty_set_xlicmimecharset -icalproperty_set_xlicmimecid -icalproperty_set_xlicmimecontenttype -icalproperty_set_xlicmimeencoding -icalproperty_set_xlicmimefilename -icalproperty_set_xlicmimeoptinfo -icalproperty_status_to_string -icalproperty_string_to_enum -icalproperty_string_to_kind -icalproperty_string_to_method -icalproperty_string_to_status -icalproperty_value_kind_to_kind -icalproperty_vanew_action -icalproperty_vanew_allowconflict -icalproperty_vanew_attach -icalproperty_vanew_attendee -icalproperty_vanew_calid -icalproperty_vanew_calmaster -icalproperty_vanew_calscale -icalproperty_vanew_capversion -icalproperty_vanew_carid -icalproperty_vanew_carlevel -icalproperty_vanew_categories -icalproperty_vanew_class -icalproperty_vanew_cmd -icalproperty_vanew_comment -icalproperty_vanew_completed -icalproperty_vanew_components -icalproperty_vanew_contact -icalproperty_vanew_created -icalproperty_vanew_csid -icalproperty_vanew_datemax -icalproperty_vanew_datemin -icalproperty_vanew_decreed -icalproperty_vanew_defaultcharset -icalproperty_vanew_defaultlocale -icalproperty_vanew_defaulttzid -icalproperty_vanew_defaultvcars -icalproperty_vanew_deny -icalproperty_vanew_description -icalproperty_vanew_dtend -icalproperty_vanew_dtstamp -icalproperty_vanew_dtstart -icalproperty_vanew_due -icalproperty_vanew_duration -icalproperty_vanew_exdate -icalproperty_vanew_expand -icalproperty_vanew_exrule -icalproperty_vanew_freebusy -icalproperty_vanew_geo -icalproperty_vanew_grant -icalproperty_vanew_itipversion -icalproperty_vanew_lastmodified -icalproperty_vanew_location -icalproperty_vanew_maxcomponentsize -icalproperty_vanew_maxdate -icalproperty_vanew_maxresults -icalproperty_vanew_maxresultssize -icalproperty_vanew_method -icalproperty_vanew_mindate -icalproperty_vanew_multipart -icalproperty_vanew_name -icalproperty_vanew_organizer -icalproperty_vanew_owner -icalproperty_vanew_percentcomplete -icalproperty_vanew_permission -icalproperty_vanew_priority -icalproperty_vanew_prodid -icalproperty_vanew_query -icalproperty_vanew_queryid -icalproperty_vanew_querylevel -icalproperty_vanew_queryname -icalproperty_vanew_rdate -icalproperty_vanew_recuraccepted -icalproperty_vanew_recurexpand -icalproperty_vanew_recurlimit -icalproperty_vanew_recurrenceid -icalproperty_vanew_relatedto -icalproperty_vanew_relcalid -icalproperty_vanew_repeat -icalproperty_vanew_requeststatus -icalproperty_vanew_resources -icalproperty_vanew_restriction -icalproperty_vanew_rrule -icalproperty_vanew_scope -icalproperty_vanew_sequence -icalproperty_vanew_status -icalproperty_vanew_storesexpanded -icalproperty_vanew_summary -icalproperty_vanew_target -icalproperty_vanew_transp -icalproperty_vanew_trigger -icalproperty_vanew_tzid -icalproperty_vanew_tzname -icalproperty_vanew_tzoffsetfrom -icalproperty_vanew_tzoffsetto -icalproperty_vanew_tzurl -icalproperty_vanew_uid -icalproperty_vanew_url -icalproperty_vanew_version -icalproperty_vanew_x -icalproperty_vanew_xlicclass -icalproperty_vanew_xlicclustercount -icalproperty_vanew_xlicerror -icalproperty_vanew_xlicmimecharset -icalproperty_vanew_xlicmimecid -icalproperty_vanew_xlicmimecontenttype -icalproperty_vanew_xlicmimeencoding -icalproperty_vanew_xlicmimefilename -icalproperty_vanew_xlicmimeoptinfo -icalrecur_add_bydayrules -icalrecur_add_byrules -icalrecur_check_rulepart -icalrecur_clause_name_and_value -icalrecur_expand_recurrence -icalrecur_first_clause -icalrecur_freq_to_string -icalrecur_iterator_free -icalrecur_iterator_new -icalrecur_iterator_next -icalrecur_iterator_sizeof_byarray -icalrecur_next_clause -icalrecur_string_to_freq -icalrecur_string_to_weekday -icalrecur_weekday_to_string -icalrecurrencetype_as_string -icalrecurrencetype_as_string_r -icalrecurrencetype_clear -icalrecurrencetype_day_day_of_week -icalrecurrencetype_day_position -icalrecurrencetype_from_string -icalreqstattype_as_string -icalreqstattype_as_string_r -icalreqstattype_from_string -icalrestriction_check -icalrestriction_check_component -icalrestriction_compare -icalrestriction_may_be_comp_need_process -icalrestriction_may_be_draft_final_canceled -icalrestriction_may_be_tent_conf -icalrestriction_may_be_tent_conf_cancel -icalrestriction_must_be_cancel_if_present -icalrestriction_must_be_canceled_no_attendee -icalrestriction_must_be_email -icalrestriction_must_be_recurring -icalrestriction_must_have_duration -icalrestriction_must_have_repeat -icalrestriction_must_if_tz_ref -icalrestriction_no_dtend -icalrestriction_no_duration -icaltime_add -icaltime_adjust -icaltime_as_ical_string -icaltime_as_ical_string_r -icaltime_as_timet -icaltime_as_timet_with_zone -icaltime_compare -icaltime_compare_date_only -icaltime_compare_date_only_tz -icaltime_convert_to_zone -icaltime_current_time_with_zone -icaltime_day_of_week -icaltime_day_of_year -icaltime_days_in_month -icaltime_from_day_of_year -icaltime_from_string -icaltime_from_timet -icaltime_from_timet_with_zone -icaltime_get_timezone -icaltime_get_tzid -icaltime_is_date -icaltime_is_leap_year -icaltime_is_null_time -icaltime_is_utc -icaltime_is_valid_time -icaltime_normalize -icaltime_null_date -icaltime_null_time -icaltime_set_timezone -icaltime_span_contains -icaltime_span_new -icaltime_span_overlaps -icaltime_start_doy_of_week -icaltime_start_doy_week -icaltime_subtract -icaltime_today -icaltime_week_number -icaltimezone_array_append_from_vtimezone -icaltimezone_array_free -icaltimezone_array_new -icaltimezone_convert_time -icaltimezone_copy -icaltimezone_dump_changes -icaltimezone_free -icaltimezone_free_builtin_timezones -icaltimezone_get_builtin_timezone -icaltimezone_get_builtin_timezone_from_offset -icaltimezone_get_builtin_timezone_from_tzid -icaltimezone_get_builtin_timezones -icaltimezone_get_component -icaltimezone_get_display_name -icaltimezone_get_latitude -icaltimezone_get_location -icaltimezone_get_longitude -icaltimezone_get_tzid -icaltimezone_get_tznames -icaltimezone_get_utc_offset -icaltimezone_get_utc_offset_of_utc_time -icaltimezone_get_utc_timezone -icaltimezone_new -icaltimezone_release_zone_tab -icaltimezone_set_component -icaltriggertype_from_int -icaltriggertype_from_string -icaltriggertype_is_bad_trigger -icaltriggertype_is_null_trigger -icaltzutil_fetch_timezone -icaltzutil_get_zone_directory -icalvalue_as_ical_string -icalvalue_as_ical_string_r -icalvalue_compare -icalvalue_decode_ical_string -icalvalue_encode_ical_string -icalvalue_free -icalvalue_get_action -icalvalue_get_attach -icalvalue_get_binary -icalvalue_get_boolean -icalvalue_get_caladdress -icalvalue_get_carlevel -icalvalue_get_class -icalvalue_get_cmd -icalvalue_get_date -icalvalue_get_datetime -icalvalue_get_datetimeperiod -icalvalue_get_duration -icalvalue_get_float -icalvalue_get_geo -icalvalue_get_integer -icalvalue_get_method -icalvalue_get_parent -icalvalue_get_period -icalvalue_get_query -icalvalue_get_querylevel -icalvalue_get_recur -icalvalue_get_requeststatus -icalvalue_get_status -icalvalue_get_string -icalvalue_get_text -icalvalue_get_transp -icalvalue_get_trigger -icalvalue_get_uri -icalvalue_get_utcoffset -icalvalue_get_x -icalvalue_get_xlicclass -icalvalue_is_valid -icalvalue_isa -icalvalue_isa_value -icalvalue_kind_is_valid -icalvalue_kind_to_string -icalvalue_new -icalvalue_new_action -icalvalue_new_attach -icalvalue_new_binary -icalvalue_new_boolean -icalvalue_new_caladdress -icalvalue_new_carlevel -icalvalue_new_class -icalvalue_new_clone -icalvalue_new_cmd -icalvalue_new_date -icalvalue_new_datetime -icalvalue_new_datetimeperiod -icalvalue_new_duration -icalvalue_new_float -icalvalue_new_from_string -icalvalue_new_from_string_with_error -icalvalue_new_geo -icalvalue_new_impl -icalvalue_new_integer -icalvalue_new_method -icalvalue_new_period -icalvalue_new_query -icalvalue_new_querylevel -icalvalue_new_recur -icalvalue_new_requeststatus -icalvalue_new_status -icalvalue_new_string -icalvalue_new_text -icalvalue_new_transp -icalvalue_new_trigger -icalvalue_new_uri -icalvalue_new_utcoffset -icalvalue_new_x -icalvalue_new_xlicclass -icalvalue_reset_kind -icalvalue_set_action -icalvalue_set_attach -icalvalue_set_binary -icalvalue_set_boolean -icalvalue_set_caladdress -icalvalue_set_carlevel -icalvalue_set_class -icalvalue_set_cmd -icalvalue_set_date -icalvalue_set_datetime -icalvalue_set_datetimeperiod -icalvalue_set_duration -icalvalue_set_float -icalvalue_set_geo -icalvalue_set_integer -icalvalue_set_method -icalvalue_set_parent -icalvalue_set_period -icalvalue_set_query -icalvalue_set_querylevel -icalvalue_set_recur -icalvalue_set_requeststatus -icalvalue_set_status -icalvalue_set_string -icalvalue_set_text -icalvalue_set_transp -icalvalue_set_trigger -icalvalue_set_uri -icalvalue_set_utcoffset -icalvalue_set_x -icalvalue_set_xlicclass -icalvalue_string_to_kind -juldat -null_comp_record DATA -null_prop_record DATA -print_date_to_string -print_datetime_to_string -print_time_to_string -pvl_apply -pvl_clear -pvl_count -pvl_data -pvl_elem_count DATA -pvl_find -pvl_find_next -pvl_free -pvl_head -pvl_insert_after -pvl_insert_before -pvl_insert_ordered -pvl_list_count DATA -pvl_new_element -pvl_newlist -pvl_next -pvl_pop -pvl_prior -pvl_push -pvl_remove -pvl_shift -pvl_tail -pvl_unshift -restr_string_map DATA -set_tz -set_zone_directory -simple_str_to_float -sspm_action_map DATA -sspm_append_char -sspm_append_hex -sspm_append_string -sspm_build_header -sspm_default_add_line -sspm_default_end_part -sspm_default_free_part -sspm_default_new_part -sspm_encode_base64 -sspm_encode_quoted_printable -sspm_encoding_map DATA -sspm_encoding_string -sspm_find_major_content_type -sspm_find_minor_content_type -sspm_free_header -sspm_free_parts -sspm_get_next_line -sspm_get_parameter -sspm_is_blank -sspm_is_continuation_line -sspm_is_mail_header -sspm_is_mime_boundary -sspm_is_mime_header -sspm_is_mime_terminating_boundary -sspm_lowercase -sspm_major_type_string -sspm_make_multipart_part -sspm_make_multipart_subpart -sspm_make_part -sspm_minor_type_string -sspm_parse_mime -sspm_property_name -sspm_read_header -sspm_set_error -sspm_store_part -sspm_strdup -sspm_value -sspm_write_base64 -sspm_write_header -sspm_write_mime -sspm_write_multipart_part -sspm_write_part -strstriplt -unset_tz -ycaltime_days_in_year -LIBRARY ical.dll -EXPORTS -caldat -compare_map DATA -decode_base64 -decode_quoted_printable -free_zone_directory -ical_bt -icalarray_append -icalarray_element_at -icalarray_free -icalarray_new -icalarray_remove_element_at -icalarray_sort -icalattach_get_data -icalattach_get_is_url -icalattach_get_url -icalattach_new_from_data -icalattach_new_from_url -icalattach_ref -icalattach_unref -icalcompiter_deref -icalcompiter_next -icalcompiter_null DATA -icalcompiter_prior -icalcomponent_add_children -icalcomponent_add_component -icalcomponent_add_property -icalcomponent_as_ical_string -icalcomponent_as_ical_string_r -icalcomponent_begin_component -icalcomponent_check_restrictions -icalcomponent_convert_errors -icalcomponent_count_components -icalcomponent_count_errors -icalcomponent_count_properties -icalcomponent_end_component -icalcomponent_foreach_recurrence -icalcomponent_foreach_tzid -icalcomponent_free -icalcomponent_get_comment -icalcomponent_get_current_component -icalcomponent_get_current_property -icalcomponent_get_description -icalcomponent_get_dtend -icalcomponent_get_dtstamp -icalcomponent_get_dtstart -icalcomponent_get_due -icalcomponent_get_duration -icalcomponent_get_first_component -icalcomponent_get_first_property -icalcomponent_get_first_real_component -icalcomponent_get_inner -icalcomponent_get_location -icalcomponent_get_method -icalcomponent_get_next_component -icalcomponent_get_next_property -icalcomponent_get_parent -icalcomponent_get_recurrenceid -icalcomponent_get_relcalid -icalcomponent_get_sequence -icalcomponent_get_span -icalcomponent_get_status -icalcomponent_get_summary -icalcomponent_get_timezone -icalcomponent_get_uid -icalcomponent_is_valid -icalcomponent_isa -icalcomponent_isa_component -icalcomponent_kind_is_valid -icalcomponent_kind_to_string -icalcomponent_merge_component -icalcomponent_new -icalcomponent_new_clone -icalcomponent_new_from_string -icalcomponent_new_vagenda -icalcomponent_new_valarm -icalcomponent_new_vcalendar -icalcomponent_new_vevent -icalcomponent_new_vfreebusy -icalcomponent_new_vjournal -icalcomponent_new_vquery -icalcomponent_new_vreply -icalcomponent_new_vtimezone -icalcomponent_new_vtodo -icalcomponent_new_x -icalcomponent_new_xdaylight -icalcomponent_new_xstandard -icalcomponent_remove_component -icalcomponent_remove_property -icalcomponent_set_comment -icalcomponent_set_description -icalcomponent_set_dtend -icalcomponent_set_dtstamp -icalcomponent_set_dtstart -icalcomponent_set_due -icalcomponent_set_duration -icalcomponent_set_location -icalcomponent_set_method -icalcomponent_set_parent -icalcomponent_set_recurrenceid -icalcomponent_set_relcalid -icalcomponent_set_sequence -icalcomponent_set_status -icalcomponent_set_summary -icalcomponent_set_uid -icalcomponent_string_to_kind -icalcomponent_strip_errors -icalcomponent_vanew -icaldurationtype_as_ical_string -icaldurationtype_as_ical_string_r -icaldurationtype_as_int -icaldurationtype_bad_duration -icaldurationtype_from_int -icaldurationtype_from_string -icaldurationtype_is_bad_duration -icaldurationtype_is_null_duration -icaldurationtype_null_duration -icalenum_num_to_reqstat -icalenum_reqstat_code -icalenum_reqstat_code_r -icalenum_reqstat_desc -icalenum_reqstat_major -icalenum_reqstat_minor -icalerrno_return -icalerror_clear_errno -icalerror_crash_here -icalerror_error_from_string -icalerror_errors_are_fatal -icalerror_get_error_state -icalerror_perror -icalerror_restore -icalerror_set_errno -icalerror_set_error_state -icalerror_stop_here -icalerror_strerror -icalerror_supress -icallangbind_access_array -icallangbind_free_array -icallangbind_get_first_component -icallangbind_get_first_parameter -icallangbind_get_first_property -icallangbind_get_next_component -icallangbind_get_next_parameter -icallangbind_get_next_property -icallangbind_new_array -icallangbind_property_eval_string -icallangbind_property_eval_string_r -icallangbind_quote_as_ical -icallangbind_quote_as_ical_r -icallangbind_string_to_open_flag -icalmemory_add_tmp_buffer -icalmemory_append_char -icalmemory_append_string -icalmemory_free_buffer -icalmemory_free_ring -icalmemory_free_ring_byval -icalmemory_free_tmp_buffer -icalmemory_new_buffer -icalmemory_resize_buffer -icalmemory_strdup -icalmemory_tmp_buffer -icalmemory_tmp_copy -icalmime_attachment_add_line -icalmime_attachment_end_part -icalmime_attachment_free_part -icalmime_attachment_new_part -icalmime_make_part -icalmime_parse -icalmime_test -icalmime_text_add_line -icalmime_text_end_part -icalmime_text_end_part_r -icalmime_text_free_part -icalmime_text_new_part -icalmime_textcalendar_end_part -icalparameter_as_ical_string -icalparameter_as_ical_string_r -icalparameter_enum_to_string -icalparameter_free -icalparameter_get_actionparam -icalparameter_get_altrep -icalparameter_get_charset -icalparameter_get_cn -icalparameter_get_cutype -icalparameter_get_delegatedfrom -icalparameter_get_delegatedto -icalparameter_get_dir -icalparameter_get_enable -icalparameter_get_encoding -icalparameter_get_fbtype -icalparameter_get_fmttype -icalparameter_get_id -icalparameter_get_language -icalparameter_get_latency -icalparameter_get_local -icalparameter_get_localize -icalparameter_get_member -icalparameter_get_options -icalparameter_get_parent -icalparameter_get_partstat -icalparameter_get_range -icalparameter_get_related -icalparameter_get_reltype -icalparameter_get_role -icalparameter_get_rsvp -icalparameter_get_sentby -icalparameter_get_tzid -icalparameter_get_value -icalparameter_get_x -icalparameter_get_xliccomparetype -icalparameter_get_xlicerrortype -icalparameter_get_xname -icalparameter_get_xvalue -icalparameter_isa -icalparameter_isa_parameter -icalparameter_kind_to_string -icalparameter_new -icalparameter_new_actionparam -icalparameter_new_altrep -icalparameter_new_charset -icalparameter_new_clone -icalparameter_new_cn -icalparameter_new_cutype -icalparameter_new_delegatedfrom -icalparameter_new_delegatedto -icalparameter_new_dir -icalparameter_new_enable -icalparameter_new_encoding -icalparameter_new_fbtype -icalparameter_new_fmttype -icalparameter_new_from_string -icalparameter_new_from_value_string -icalparameter_new_id -icalparameter_new_impl -icalparameter_new_language -icalparameter_new_latency -icalparameter_new_local -icalparameter_new_localize -icalparameter_new_member -icalparameter_new_options -icalparameter_new_partstat -icalparameter_new_range -icalparameter_new_related -icalparameter_new_reltype -icalparameter_new_role -icalparameter_new_rsvp -icalparameter_new_sentby -icalparameter_new_tzid -icalparameter_new_value -icalparameter_new_x -icalparameter_new_xliccomparetype -icalparameter_new_xlicerrortype -icalparameter_set_actionparam -icalparameter_set_altrep -icalparameter_set_charset -icalparameter_set_cn -icalparameter_set_cutype -icalparameter_set_delegatedfrom -icalparameter_set_delegatedto -icalparameter_set_dir -icalparameter_set_enable -icalparameter_set_encoding -icalparameter_set_fbtype -icalparameter_set_fmttype -icalparameter_set_id -icalparameter_set_language -icalparameter_set_latency -icalparameter_set_local -icalparameter_set_localize -icalparameter_set_member -icalparameter_set_options -icalparameter_set_parent -icalparameter_set_partstat -icalparameter_set_range -icalparameter_set_related -icalparameter_set_reltype -icalparameter_set_role -icalparameter_set_rsvp -icalparameter_set_sentby -icalparameter_set_tzid -icalparameter_set_value -icalparameter_set_x -icalparameter_set_xliccomparetype -icalparameter_set_xlicerrortype -icalparameter_set_xname -icalparameter_set_xvalue -icalparameter_string_to_enum -icalparameter_string_to_kind -icalparameter_value_to_value_kind -icalparser_add_line -icalparser_clean -icalparser_free -icalparser_get_line -icalparser_get_state -icalparser_get_value -icalparser_new -icalparser_parse -icalparser_parse_string -icalparser_set_gen_data -icalparser_string_line_generator -icalperiodtype_as_ical_string -icalperiodtype_as_ical_string_r -icalperiodtype_from_string -icalperiodtype_is_null_period -icalperiodtype_is_valid_period -icalperiodtype_null_period -icalproperty_add_parameter -icalproperty_add_parameters -icalproperty_as_ical_string -icalproperty_as_ical_string_r -icalproperty_count_parameters -icalproperty_enum_belongs_to_property -icalproperty_enum_to_string -icalproperty_enum_to_string_r -icalproperty_free -icalproperty_get_action -icalproperty_get_allowconflict -icalproperty_get_attach -icalproperty_get_attendee -icalproperty_get_calid -icalproperty_get_calmaster -icalproperty_get_calscale -icalproperty_get_capversion -icalproperty_get_carid -icalproperty_get_carlevel -icalproperty_get_categories -icalproperty_get_class -icalproperty_get_cmd -icalproperty_get_comment -icalproperty_get_completed -icalproperty_get_components -icalproperty_get_contact -icalproperty_get_created -icalproperty_get_csid -icalproperty_get_datemax -icalproperty_get_datemin -icalproperty_get_decreed -icalproperty_get_defaultcharset -icalproperty_get_defaultlocale -icalproperty_get_defaulttzid -icalproperty_get_defaultvcars -icalproperty_get_deny -icalproperty_get_description -icalproperty_get_dtend -icalproperty_get_dtstamp -icalproperty_get_dtstart -icalproperty_get_due -icalproperty_get_duration -icalproperty_get_exdate -icalproperty_get_expand -icalproperty_get_exrule -icalproperty_get_first_parameter -icalproperty_get_freebusy -icalproperty_get_geo -icalproperty_get_grant -icalproperty_get_itipversion -icalproperty_get_lastmodified -icalproperty_get_location -icalproperty_get_maxcomponentsize -icalproperty_get_maxdate -icalproperty_get_maxresults -icalproperty_get_maxresultssize -icalproperty_get_method -icalproperty_get_mindate -icalproperty_get_multipart -icalproperty_get_name -icalproperty_get_next_parameter -icalproperty_get_organizer -icalproperty_get_owner -icalproperty_get_parameter_as_string -icalproperty_get_parameter_as_string_r -icalproperty_get_parent -icalproperty_get_percentcomplete -icalproperty_get_permission -icalproperty_get_priority -icalproperty_get_prodid -icalproperty_get_property_name -icalproperty_get_property_name_r -icalproperty_get_query -icalproperty_get_queryid -icalproperty_get_querylevel -icalproperty_get_queryname -icalproperty_get_rdate -icalproperty_get_recuraccepted -icalproperty_get_recurexpand -icalproperty_get_recurlimit -icalproperty_get_recurrenceid -icalproperty_get_relatedto -icalproperty_get_relcalid -icalproperty_get_repeat -icalproperty_get_requeststatus -icalproperty_get_resources -icalproperty_get_restriction -icalproperty_get_rrule -icalproperty_get_scope -icalproperty_get_sequence -icalproperty_get_status -icalproperty_get_storesexpanded -icalproperty_get_summary -icalproperty_get_target -icalproperty_get_transp -icalproperty_get_trigger -icalproperty_get_tzid -icalproperty_get_tzname -icalproperty_get_tzoffsetfrom -icalproperty_get_tzoffsetto -icalproperty_get_tzurl -icalproperty_get_uid -icalproperty_get_url -icalproperty_get_value -icalproperty_get_value_as_string -icalproperty_get_value_as_string_r -icalproperty_get_version -icalproperty_get_x -icalproperty_get_x_name -icalproperty_get_xlicclass -icalproperty_get_xlicclustercount -icalproperty_get_xlicerror -icalproperty_get_xlicmimecharset -icalproperty_get_xlicmimecid -icalproperty_get_xlicmimecontenttype -icalproperty_get_xlicmimeencoding -icalproperty_get_xlicmimefilename -icalproperty_get_xlicmimeoptinfo -icalproperty_isa -icalproperty_isa_property -icalproperty_kind_and_string_to_enum -icalproperty_kind_is_valid -icalproperty_kind_to_string -icalproperty_kind_to_value_kind -icalproperty_method_to_string -icalproperty_new -icalproperty_new_action -icalproperty_new_allowconflict -icalproperty_new_attach -icalproperty_new_attendee -icalproperty_new_calid -icalproperty_new_calmaster -icalproperty_new_calscale -icalproperty_new_capversion -icalproperty_new_carid -icalproperty_new_carlevel -icalproperty_new_categories -icalproperty_new_class -icalproperty_new_clone -icalproperty_new_cmd -icalproperty_new_comment -icalproperty_new_completed -icalproperty_new_components -icalproperty_new_contact -icalproperty_new_created -icalproperty_new_csid -icalproperty_new_datemax -icalproperty_new_datemin -icalproperty_new_decreed -icalproperty_new_defaultcharset -icalproperty_new_defaultlocale -icalproperty_new_defaulttzid -icalproperty_new_defaultvcars -icalproperty_new_deny -icalproperty_new_description -icalproperty_new_dtend -icalproperty_new_dtstamp -icalproperty_new_dtstart -icalproperty_new_due -icalproperty_new_duration -icalproperty_new_exdate -icalproperty_new_expand -icalproperty_new_exrule -icalproperty_new_freebusy -icalproperty_new_from_string -icalproperty_new_geo -icalproperty_new_grant -icalproperty_new_impl -icalproperty_new_itipversion -icalproperty_new_lastmodified -icalproperty_new_location -icalproperty_new_maxcomponentsize -icalproperty_new_maxdate -icalproperty_new_maxresults -icalproperty_new_maxresultssize -icalproperty_new_method -icalproperty_new_mindate -icalproperty_new_multipart -icalproperty_new_name -icalproperty_new_organizer -icalproperty_new_owner -icalproperty_new_percentcomplete -icalproperty_new_permission -icalproperty_new_priority -icalproperty_new_prodid -icalproperty_new_query -icalproperty_new_queryid -icalproperty_new_querylevel -icalproperty_new_queryname -icalproperty_new_rdate -icalproperty_new_recuraccepted -icalproperty_new_recurexpand -icalproperty_new_recurlimit -icalproperty_new_recurrenceid -icalproperty_new_relatedto -icalproperty_new_relcalid -icalproperty_new_repeat -icalproperty_new_requeststatus -icalproperty_new_resources -icalproperty_new_restriction -icalproperty_new_rrule -icalproperty_new_scope -icalproperty_new_sequence -icalproperty_new_status -icalproperty_new_storesexpanded -icalproperty_new_summary -icalproperty_new_target -icalproperty_new_transp -icalproperty_new_trigger -icalproperty_new_tzid -icalproperty_new_tzname -icalproperty_new_tzoffsetfrom -icalproperty_new_tzoffsetto -icalproperty_new_tzurl -icalproperty_new_uid -icalproperty_new_url -icalproperty_new_version -icalproperty_new_x -icalproperty_new_xlicclass -icalproperty_new_xlicclustercount -icalproperty_new_xlicerror -icalproperty_new_xlicmimecharset -icalproperty_new_xlicmimecid -icalproperty_new_xlicmimecontenttype -icalproperty_new_xlicmimeencoding -icalproperty_new_xlicmimefilename -icalproperty_new_xlicmimeoptinfo -icalproperty_recurrence_is_excluded -icalproperty_remove_parameter -icalproperty_remove_parameter_by_kind -icalproperty_remove_parameter_by_name -icalproperty_remove_parameter_by_ref -icalproperty_set_action -icalproperty_set_allowconflict -icalproperty_set_attach -icalproperty_set_attendee -icalproperty_set_calid -icalproperty_set_calmaster -icalproperty_set_calscale -icalproperty_set_capversion -icalproperty_set_carid -icalproperty_set_carlevel -icalproperty_set_categories -icalproperty_set_class -icalproperty_set_cmd -icalproperty_set_comment -icalproperty_set_completed -icalproperty_set_components -icalproperty_set_contact -icalproperty_set_created -icalproperty_set_csid -icalproperty_set_datemax -icalproperty_set_datemin -icalproperty_set_decreed -icalproperty_set_defaultcharset -icalproperty_set_defaultlocale -icalproperty_set_defaulttzid -icalproperty_set_defaultvcars -icalproperty_set_deny -icalproperty_set_description -icalproperty_set_dtend -icalproperty_set_dtstamp -icalproperty_set_dtstart -icalproperty_set_due -icalproperty_set_duration -icalproperty_set_exdate -icalproperty_set_expand -icalproperty_set_exrule -icalproperty_set_freebusy -icalproperty_set_geo -icalproperty_set_grant -icalproperty_set_itipversion -icalproperty_set_lastmodified -icalproperty_set_location -icalproperty_set_maxcomponentsize -icalproperty_set_maxdate -icalproperty_set_maxresults -icalproperty_set_maxresultssize -icalproperty_set_method -icalproperty_set_mindate -icalproperty_set_multipart -icalproperty_set_name -icalproperty_set_organizer -icalproperty_set_owner -icalproperty_set_parameter -icalproperty_set_parameter_from_string -icalproperty_set_parent -icalproperty_set_percentcomplete -icalproperty_set_permission -icalproperty_set_priority -icalproperty_set_prodid -icalproperty_set_query -icalproperty_set_queryid -icalproperty_set_querylevel -icalproperty_set_queryname -icalproperty_set_rdate -icalproperty_set_recuraccepted -icalproperty_set_recurexpand -icalproperty_set_recurlimit -icalproperty_set_recurrenceid -icalproperty_set_relatedto -icalproperty_set_relcalid -icalproperty_set_repeat -icalproperty_set_requeststatus -icalproperty_set_resources -icalproperty_set_restriction -icalproperty_set_rrule -icalproperty_set_scope -icalproperty_set_sequence -icalproperty_set_status -icalproperty_set_storesexpanded -icalproperty_set_summary -icalproperty_set_target -icalproperty_set_transp -icalproperty_set_trigger -icalproperty_set_tzid -icalproperty_set_tzname -icalproperty_set_tzoffsetfrom -icalproperty_set_tzoffsetto -icalproperty_set_tzurl -icalproperty_set_uid -icalproperty_set_url -icalproperty_set_value -icalproperty_set_value_from_string -icalproperty_set_version -icalproperty_set_x -icalproperty_set_x_name -icalproperty_set_xlicclass -icalproperty_set_xlicclustercount -icalproperty_set_xlicerror -icalproperty_set_xlicmimecharset -icalproperty_set_xlicmimecid -icalproperty_set_xlicmimecontenttype -icalproperty_set_xlicmimeencoding -icalproperty_set_xlicmimefilename -icalproperty_set_xlicmimeoptinfo -icalproperty_status_to_string -icalproperty_string_to_enum -icalproperty_string_to_kind -icalproperty_string_to_method -icalproperty_string_to_status -icalproperty_value_kind_to_kind -icalproperty_vanew_action -icalproperty_vanew_allowconflict -icalproperty_vanew_attach -icalproperty_vanew_attendee -icalproperty_vanew_calid -icalproperty_vanew_calmaster -icalproperty_vanew_calscale -icalproperty_vanew_capversion -icalproperty_vanew_carid -icalproperty_vanew_carlevel -icalproperty_vanew_categories -icalproperty_vanew_class -icalproperty_vanew_cmd -icalproperty_vanew_comment -icalproperty_vanew_completed -icalproperty_vanew_components -icalproperty_vanew_contact -icalproperty_vanew_created -icalproperty_vanew_csid -icalproperty_vanew_datemax -icalproperty_vanew_datemin -icalproperty_vanew_decreed -icalproperty_vanew_defaultcharset -icalproperty_vanew_defaultlocale -icalproperty_vanew_defaulttzid -icalproperty_vanew_defaultvcars -icalproperty_vanew_deny -icalproperty_vanew_description -icalproperty_vanew_dtend -icalproperty_vanew_dtstamp -icalproperty_vanew_dtstart -icalproperty_vanew_due -icalproperty_vanew_duration -icalproperty_vanew_exdate -icalproperty_vanew_expand -icalproperty_vanew_exrule -icalproperty_vanew_freebusy -icalproperty_vanew_geo -icalproperty_vanew_grant -icalproperty_vanew_itipversion -icalproperty_vanew_lastmodified -icalproperty_vanew_location -icalproperty_vanew_maxcomponentsize -icalproperty_vanew_maxdate -icalproperty_vanew_maxresults -icalproperty_vanew_maxresultssize -icalproperty_vanew_method -icalproperty_vanew_mindate -icalproperty_vanew_multipart -icalproperty_vanew_name -icalproperty_vanew_organizer -icalproperty_vanew_owner -icalproperty_vanew_percentcomplete -icalproperty_vanew_permission -icalproperty_vanew_priority -icalproperty_vanew_prodid -icalproperty_vanew_query -icalproperty_vanew_queryid -icalproperty_vanew_querylevel -icalproperty_vanew_queryname -icalproperty_vanew_rdate -icalproperty_vanew_recuraccepted -icalproperty_vanew_recurexpand -icalproperty_vanew_recurlimit -icalproperty_vanew_recurrenceid -icalproperty_vanew_relatedto -icalproperty_vanew_relcalid -icalproperty_vanew_repeat -icalproperty_vanew_requeststatus -icalproperty_vanew_resources -icalproperty_vanew_restriction -icalproperty_vanew_rrule -icalproperty_vanew_scope -icalproperty_vanew_sequence -icalproperty_vanew_status -icalproperty_vanew_storesexpanded -icalproperty_vanew_summary -icalproperty_vanew_target -icalproperty_vanew_transp -icalproperty_vanew_trigger -icalproperty_vanew_tzid -icalproperty_vanew_tzname -icalproperty_vanew_tzoffsetfrom -icalproperty_vanew_tzoffsetto -icalproperty_vanew_tzurl -icalproperty_vanew_uid -icalproperty_vanew_url -icalproperty_vanew_version -icalproperty_vanew_x -icalproperty_vanew_xlicclass -icalproperty_vanew_xlicclustercount -icalproperty_vanew_xlicerror -icalproperty_vanew_xlicmimecharset -icalproperty_vanew_xlicmimecid -icalproperty_vanew_xlicmimecontenttype -icalproperty_vanew_xlicmimeencoding -icalproperty_vanew_xlicmimefilename -icalproperty_vanew_xlicmimeoptinfo -icalrecur_add_bydayrules -icalrecur_add_byrules -icalrecur_check_rulepart -icalrecur_clause_name_and_value -icalrecur_expand_recurrence -icalrecur_first_clause -icalrecur_freq_to_string -icalrecur_iterator_free -icalrecur_iterator_new -icalrecur_iterator_next -icalrecur_iterator_sizeof_byarray -icalrecur_next_clause -icalrecur_string_to_freq -icalrecur_string_to_weekday -icalrecur_weekday_to_string -icalrecurrencetype_as_string -icalrecurrencetype_as_string_r -icalrecurrencetype_clear -icalrecurrencetype_day_day_of_week -icalrecurrencetype_day_position -icalrecurrencetype_from_string -icalreqstattype_as_string -icalreqstattype_as_string_r -icalreqstattype_from_string -icalrestriction_check -icalrestriction_check_component -icalrestriction_compare -icalrestriction_may_be_comp_need_process -icalrestriction_may_be_draft_final_canceled -icalrestriction_may_be_tent_conf -icalrestriction_may_be_tent_conf_cancel -icalrestriction_must_be_cancel_if_present -icalrestriction_must_be_canceled_no_attendee -icalrestriction_must_be_email -icalrestriction_must_be_recurring -icalrestriction_must_have_duration -icalrestriction_must_have_repeat -icalrestriction_must_if_tz_ref -icalrestriction_no_dtend -icalrestriction_no_duration -icaltime_add -icaltime_adjust -icaltime_as_ical_string -icaltime_as_ical_string_r -icaltime_as_timet -icaltime_as_timet_with_zone -icaltime_compare -icaltime_compare_date_only -icaltime_compare_date_only_tz -icaltime_convert_to_zone -icaltime_current_time_with_zone -icaltime_day_of_week -icaltime_day_of_year -icaltime_days_in_month -icaltime_from_day_of_year -icaltime_from_string -icaltime_from_timet -icaltime_from_timet_with_zone -icaltime_get_timezone -icaltime_get_tzid -icaltime_is_date -icaltime_is_leap_year -icaltime_is_null_time -icaltime_is_utc -icaltime_is_valid_time -icaltime_normalize -icaltime_null_date -icaltime_null_time -icaltime_set_timezone -icaltime_span_contains -icaltime_span_new -icaltime_span_overlaps -icaltime_start_doy_of_week -icaltime_start_doy_week -icaltime_subtract -icaltime_today -icaltime_week_number -icaltimezone_array_append_from_vtimezone -icaltimezone_array_free -icaltimezone_array_new -icaltimezone_convert_time -icaltimezone_copy -icaltimezone_dump_changes -icaltimezone_free -icaltimezone_free_builtin_timezones -icaltimezone_get_builtin_timezone -icaltimezone_get_builtin_timezone_from_offset -icaltimezone_get_builtin_timezone_from_tzid -icaltimezone_get_builtin_timezones -icaltimezone_get_component -icaltimezone_get_display_name -icaltimezone_get_latitude -icaltimezone_get_location -icaltimezone_get_longitude -icaltimezone_get_tzid -icaltimezone_get_tznames -icaltimezone_get_utc_offset -icaltimezone_get_utc_offset_of_utc_time -icaltimezone_get_utc_timezone -icaltimezone_new -icaltimezone_release_zone_tab -icaltimezone_set_component -icaltriggertype_from_int -icaltriggertype_from_string -icaltriggertype_is_bad_trigger -icaltriggertype_is_null_trigger -icaltzutil_fetch_timezone -icaltzutil_get_zone_directory -icalvalue_as_ical_string -icalvalue_as_ical_string_r -icalvalue_compare -icalvalue_decode_ical_string -icalvalue_encode_ical_string -icalvalue_free -icalvalue_get_action -icalvalue_get_attach -icalvalue_get_binary -icalvalue_get_boolean -icalvalue_get_caladdress -icalvalue_get_carlevel -icalvalue_get_class -icalvalue_get_cmd -icalvalue_get_date -icalvalue_get_datetime -icalvalue_get_datetimeperiod -icalvalue_get_duration -icalvalue_get_float -icalvalue_get_geo -icalvalue_get_integer -icalvalue_get_method -icalvalue_get_parent -icalvalue_get_period -icalvalue_get_query -icalvalue_get_querylevel -icalvalue_get_recur -icalvalue_get_requeststatus -icalvalue_get_status -icalvalue_get_string -icalvalue_get_text -icalvalue_get_transp -icalvalue_get_trigger -icalvalue_get_uri -icalvalue_get_utcoffset -icalvalue_get_x -icalvalue_get_xlicclass -icalvalue_is_valid -icalvalue_isa -icalvalue_isa_value -icalvalue_kind_is_valid -icalvalue_kind_to_string -icalvalue_new -icalvalue_new_action -icalvalue_new_attach -icalvalue_new_binary -icalvalue_new_boolean -icalvalue_new_caladdress -icalvalue_new_carlevel -icalvalue_new_class -icalvalue_new_clone -icalvalue_new_cmd -icalvalue_new_date -icalvalue_new_datetime -icalvalue_new_datetimeperiod -icalvalue_new_duration -icalvalue_new_float -icalvalue_new_from_string -icalvalue_new_from_string_with_error -icalvalue_new_geo -icalvalue_new_impl -icalvalue_new_integer -icalvalue_new_method -icalvalue_new_period -icalvalue_new_query -icalvalue_new_querylevel -icalvalue_new_recur -icalvalue_new_requeststatus -icalvalue_new_status -icalvalue_new_string -icalvalue_new_text -icalvalue_new_transp -icalvalue_new_trigger -icalvalue_new_uri -icalvalue_new_utcoffset -icalvalue_new_x -icalvalue_new_xlicclass -icalvalue_reset_kind -icalvalue_set_action -icalvalue_set_attach -icalvalue_set_binary -icalvalue_set_boolean -icalvalue_set_caladdress -icalvalue_set_carlevel -icalvalue_set_class -icalvalue_set_cmd -icalvalue_set_date -icalvalue_set_datetime -icalvalue_set_datetimeperiod -icalvalue_set_duration -icalvalue_set_float -icalvalue_set_geo -icalvalue_set_integer -icalvalue_set_method -icalvalue_set_parent -icalvalue_set_period -icalvalue_set_query -icalvalue_set_querylevel -icalvalue_set_recur -icalvalue_set_requeststatus -icalvalue_set_status -icalvalue_set_string -icalvalue_set_text -icalvalue_set_transp -icalvalue_set_trigger -icalvalue_set_uri -icalvalue_set_utcoffset -icalvalue_set_x -icalvalue_set_xlicclass -icalvalue_string_to_kind -juldat -null_comp_record DATA -null_prop_record DATA -print_date_to_string -print_datetime_to_string -print_time_to_string -pvl_apply -pvl_clear -pvl_count -pvl_data -pvl_elem_count DATA -pvl_find -pvl_find_next -pvl_free -pvl_head -pvl_insert_after -pvl_insert_before -pvl_insert_ordered -pvl_list_count DATA -pvl_new_element -pvl_newlist -pvl_next -pvl_pop -pvl_prior -pvl_push -pvl_remove -pvl_shift -pvl_tail -pvl_unshift -restr_string_map DATA -set_tz -set_zone_directory -simple_str_to_float -sspm_action_map DATA -sspm_append_char -sspm_append_hex -sspm_append_string -sspm_build_header -sspm_default_add_line -sspm_default_end_part -sspm_default_free_part -sspm_default_new_part -sspm_encode_base64 -sspm_encode_quoted_printable -sspm_encoding_map DATA -sspm_encoding_string -sspm_find_major_content_type -sspm_find_minor_content_type -sspm_free_header -sspm_free_parts -sspm_get_next_line -sspm_get_parameter -sspm_is_blank -sspm_is_continuation_line -sspm_is_mail_header -sspm_is_mime_boundary -sspm_is_mime_header -sspm_is_mime_terminating_boundary -sspm_lowercase -sspm_major_type_string -sspm_make_multipart_part -sspm_make_multipart_subpart -sspm_make_part -sspm_minor_type_string -sspm_parse_mime -sspm_property_name -sspm_read_header -sspm_set_error -sspm_store_part -sspm_strdup -sspm_value -sspm_write_base64 -sspm_write_header -sspm_write_mime -sspm_write_multipart_part -sspm_write_part -strstriplt -unset_tz -ycaltime_days_in_year -LIBRARY ical.dll -EXPORTS -caldat -compare_map DATA -decode_base64 -decode_quoted_printable -free_zone_directory -ical_bt -icalarray_append -icalarray_element_at -icalarray_free -icalarray_new -icalarray_remove_element_at -icalarray_sort -icalattach_get_data -icalattach_get_is_url -icalattach_get_url -icalattach_new_from_data -icalattach_new_from_url -icalattach_ref -icalattach_unref -icalcompiter_deref -icalcompiter_next -icalcompiter_null DATA -icalcompiter_prior -icalcomponent_add_children -icalcomponent_add_component -icalcomponent_add_property -icalcomponent_as_ical_string -icalcomponent_as_ical_string_r -icalcomponent_begin_component -icalcomponent_check_restrictions -icalcomponent_convert_errors -icalcomponent_count_components -icalcomponent_count_errors -icalcomponent_count_properties -icalcomponent_end_component -icalcomponent_foreach_recurrence -icalcomponent_foreach_tzid -icalcomponent_free -icalcomponent_get_comment -icalcomponent_get_current_component -icalcomponent_get_current_property -icalcomponent_get_description -icalcomponent_get_dtend -icalcomponent_get_dtstamp -icalcomponent_get_dtstart -icalcomponent_get_due -icalcomponent_get_duration -icalcomponent_get_first_component -icalcomponent_get_first_property -icalcomponent_get_first_real_component -icalcomponent_get_inner -icalcomponent_get_location -icalcomponent_get_method -icalcomponent_get_next_component -icalcomponent_get_next_property -icalcomponent_get_parent -icalcomponent_get_recurrenceid -icalcomponent_get_relcalid -icalcomponent_get_sequence -icalcomponent_get_span -icalcomponent_get_status -icalcomponent_get_summary -icalcomponent_get_timezone -icalcomponent_get_uid -icalcomponent_is_valid -icalcomponent_isa -icalcomponent_isa_component -icalcomponent_kind_is_valid -icalcomponent_kind_to_string -icalcomponent_merge_component -icalcomponent_new -icalcomponent_new_clone -icalcomponent_new_from_string -icalcomponent_new_vagenda -icalcomponent_new_valarm -icalcomponent_new_vcalendar -icalcomponent_new_vevent -icalcomponent_new_vfreebusy -icalcomponent_new_vjournal -icalcomponent_new_vquery -icalcomponent_new_vreply -icalcomponent_new_vtimezone -icalcomponent_new_vtodo -icalcomponent_new_x -icalcomponent_new_xdaylight -icalcomponent_new_xstandard -icalcomponent_remove_component -icalcomponent_remove_property -icalcomponent_set_comment -icalcomponent_set_description -icalcomponent_set_dtend -icalcomponent_set_dtstamp -icalcomponent_set_dtstart -icalcomponent_set_due -icalcomponent_set_duration -icalcomponent_set_location -icalcomponent_set_method -icalcomponent_set_parent -icalcomponent_set_recurrenceid -icalcomponent_set_relcalid -icalcomponent_set_sequence -icalcomponent_set_status -icalcomponent_set_summary -icalcomponent_set_uid -icalcomponent_string_to_kind -icalcomponent_strip_errors -icalcomponent_vanew -icaldurationtype_as_ical_string -icaldurationtype_as_ical_string_r -icaldurationtype_as_int -icaldurationtype_bad_duration -icaldurationtype_from_int -icaldurationtype_from_string -icaldurationtype_is_bad_duration -icaldurationtype_is_null_duration -icaldurationtype_null_duration -icalenum_num_to_reqstat -icalenum_reqstat_code -icalenum_reqstat_code_r -icalenum_reqstat_desc -icalenum_reqstat_major -icalenum_reqstat_minor -icalerrno_return -icalerror_clear_errno -icalerror_crash_here -icalerror_error_from_string -icalerror_errors_are_fatal -icalerror_get_error_state -icalerror_perror -icalerror_restore -icalerror_set_errno -icalerror_set_error_state -icalerror_stop_here -icalerror_strerror -icalerror_supress -icallangbind_access_array -icallangbind_free_array -icallangbind_get_first_component -icallangbind_get_first_parameter -icallangbind_get_first_property -icallangbind_get_next_component -icallangbind_get_next_parameter -icallangbind_get_next_property -icallangbind_new_array -icallangbind_property_eval_string -icallangbind_property_eval_string_r -icallangbind_quote_as_ical -icallangbind_quote_as_ical_r -icallangbind_string_to_open_flag -icalmemory_add_tmp_buffer -icalmemory_append_char -icalmemory_append_string -icalmemory_free_buffer -icalmemory_free_ring -icalmemory_free_ring_byval -icalmemory_free_tmp_buffer -icalmemory_new_buffer -icalmemory_resize_buffer -icalmemory_strdup -icalmemory_tmp_buffer -icalmemory_tmp_copy -icalmime_attachment_add_line -icalmime_attachment_end_part -icalmime_attachment_free_part -icalmime_attachment_new_part -icalmime_make_part -icalmime_parse -icalmime_test -icalmime_text_add_line -icalmime_text_end_part -icalmime_text_end_part_r -icalmime_text_free_part -icalmime_text_new_part -icalmime_textcalendar_end_part -icalparameter_as_ical_string -icalparameter_as_ical_string_r -icalparameter_enum_to_string -icalparameter_free -icalparameter_get_actionparam -icalparameter_get_altrep -icalparameter_get_charset -icalparameter_get_cn -icalparameter_get_cutype -icalparameter_get_delegatedfrom -icalparameter_get_delegatedto -icalparameter_get_dir -icalparameter_get_enable -icalparameter_get_encoding -icalparameter_get_fbtype -icalparameter_get_fmttype -icalparameter_get_id -icalparameter_get_language -icalparameter_get_latency -icalparameter_get_local -icalparameter_get_localize -icalparameter_get_member -icalparameter_get_options -icalparameter_get_parent -icalparameter_get_partstat -icalparameter_get_range -icalparameter_get_related -icalparameter_get_reltype -icalparameter_get_role -icalparameter_get_rsvp -icalparameter_get_sentby -icalparameter_get_tzid -icalparameter_get_value -icalparameter_get_x -icalparameter_get_xliccomparetype -icalparameter_get_xlicerrortype -icalparameter_get_xname -icalparameter_get_xvalue -icalparameter_isa -icalparameter_isa_parameter -icalparameter_kind_to_string -icalparameter_new -icalparameter_new_actionparam -icalparameter_new_altrep -icalparameter_new_charset -icalparameter_new_clone -icalparameter_new_cn -icalparameter_new_cutype -icalparameter_new_delegatedfrom -icalparameter_new_delegatedto -icalparameter_new_dir -icalparameter_new_enable -icalparameter_new_encoding -icalparameter_new_fbtype -icalparameter_new_fmttype -icalparameter_new_from_string -icalparameter_new_from_value_string -icalparameter_new_id -icalparameter_new_impl -icalparameter_new_language -icalparameter_new_latency -icalparameter_new_local -icalparameter_new_localize -icalparameter_new_member -icalparameter_new_options -icalparameter_new_partstat -icalparameter_new_range -icalparameter_new_related -icalparameter_new_reltype -icalparameter_new_role -icalparameter_new_rsvp -icalparameter_new_sentby -icalparameter_new_tzid -icalparameter_new_value -icalparameter_new_x -icalparameter_new_xliccomparetype -icalparameter_new_xlicerrortype -icalparameter_set_actionparam -icalparameter_set_altrep -icalparameter_set_charset -icalparameter_set_cn -icalparameter_set_cutype -icalparameter_set_delegatedfrom -icalparameter_set_delegatedto -icalparameter_set_dir -icalparameter_set_enable -icalparameter_set_encoding -icalparameter_set_fbtype -icalparameter_set_fmttype -icalparameter_set_id -icalparameter_set_language -icalparameter_set_latency -icalparameter_set_local -icalparameter_set_localize -icalparameter_set_member -icalparameter_set_options -icalparameter_set_parent -icalparameter_set_partstat -icalparameter_set_range -icalparameter_set_related -icalparameter_set_reltype -icalparameter_set_role -icalparameter_set_rsvp -icalparameter_set_sentby -icalparameter_set_tzid -icalparameter_set_value -icalparameter_set_x -icalparameter_set_xliccomparetype -icalparameter_set_xlicerrortype -icalparameter_set_xname -icalparameter_set_xvalue -icalparameter_string_to_enum -icalparameter_string_to_kind -icalparameter_value_to_value_kind -icalparser_add_line -icalparser_clean -icalparser_free -icalparser_get_line -icalparser_get_state -icalparser_get_value -icalparser_new -icalparser_parse -icalparser_parse_string -icalparser_set_gen_data -icalparser_string_line_generator -icalperiodtype_as_ical_string -icalperiodtype_as_ical_string_r -icalperiodtype_from_string -icalperiodtype_is_null_period -icalperiodtype_is_valid_period -icalperiodtype_null_period -icalproperty_add_parameter -icalproperty_add_parameters -icalproperty_as_ical_string -icalproperty_as_ical_string_r -icalproperty_count_parameters -icalproperty_enum_belongs_to_property -icalproperty_enum_to_string -icalproperty_enum_to_string_r -icalproperty_free -icalproperty_get_action -icalproperty_get_allowconflict -icalproperty_get_attach -icalproperty_get_attendee -icalproperty_get_calid -icalproperty_get_calmaster -icalproperty_get_calscale -icalproperty_get_capversion -icalproperty_get_carid -icalproperty_get_carlevel -icalproperty_get_categories -icalproperty_get_class -icalproperty_get_cmd -icalproperty_get_comment -icalproperty_get_completed -icalproperty_get_components -icalproperty_get_contact -icalproperty_get_created -icalproperty_get_csid -icalproperty_get_datemax -icalproperty_get_datemin -icalproperty_get_decreed -icalproperty_get_defaultcharset -icalproperty_get_defaultlocale -icalproperty_get_defaulttzid -icalproperty_get_defaultvcars -icalproperty_get_deny -icalproperty_get_description -icalproperty_get_dtend -icalproperty_get_dtstamp -icalproperty_get_dtstart -icalproperty_get_due -icalproperty_get_duration -icalproperty_get_exdate -icalproperty_get_expand -icalproperty_get_exrule -icalproperty_get_first_parameter -icalproperty_get_freebusy -icalproperty_get_geo -icalproperty_get_grant -icalproperty_get_itipversion -icalproperty_get_lastmodified -icalproperty_get_location -icalproperty_get_maxcomponentsize -icalproperty_get_maxdate -icalproperty_get_maxresults -icalproperty_get_maxresultssize -icalproperty_get_method -icalproperty_get_mindate -icalproperty_get_multipart -icalproperty_get_name -icalproperty_get_next_parameter -icalproperty_get_organizer -icalproperty_get_owner -icalproperty_get_parameter_as_string -icalproperty_get_parameter_as_string_r -icalproperty_get_parent -icalproperty_get_percentcomplete -icalproperty_get_permission -icalproperty_get_priority -icalproperty_get_prodid -icalproperty_get_property_name -icalproperty_get_property_name_r -icalproperty_get_query -icalproperty_get_queryid -icalproperty_get_querylevel -icalproperty_get_queryname -icalproperty_get_rdate -icalproperty_get_recuraccepted -icalproperty_get_recurexpand -icalproperty_get_recurlimit -icalproperty_get_recurrenceid -icalproperty_get_relatedto -icalproperty_get_relcalid -icalproperty_get_repeat -icalproperty_get_requeststatus -icalproperty_get_resources -icalproperty_get_restriction -icalproperty_get_rrule -icalproperty_get_scope -icalproperty_get_sequence -icalproperty_get_status -icalproperty_get_storesexpanded -icalproperty_get_summary -icalproperty_get_target -icalproperty_get_transp -icalproperty_get_trigger -icalproperty_get_tzid -icalproperty_get_tzname -icalproperty_get_tzoffsetfrom -icalproperty_get_tzoffsetto -icalproperty_get_tzurl -icalproperty_get_uid -icalproperty_get_url -icalproperty_get_value -icalproperty_get_value_as_string -icalproperty_get_value_as_string_r -icalproperty_get_version -icalproperty_get_x -icalproperty_get_x_name -icalproperty_get_xlicclass -icalproperty_get_xlicclustercount -icalproperty_get_xlicerror -icalproperty_get_xlicmimecharset -icalproperty_get_xlicmimecid -icalproperty_get_xlicmimecontenttype -icalproperty_get_xlicmimeencoding -icalproperty_get_xlicmimefilename -icalproperty_get_xlicmimeoptinfo -icalproperty_isa -icalproperty_isa_property -icalproperty_kind_and_string_to_enum -icalproperty_kind_is_valid -icalproperty_kind_to_string -icalproperty_kind_to_value_kind -icalproperty_method_to_string -icalproperty_new -icalproperty_new_action -icalproperty_new_allowconflict -icalproperty_new_attach -icalproperty_new_attendee -icalproperty_new_calid -icalproperty_new_calmaster -icalproperty_new_calscale -icalproperty_new_capversion -icalproperty_new_carid -icalproperty_new_carlevel -icalproperty_new_categories -icalproperty_new_class -icalproperty_new_clone -icalproperty_new_cmd -icalproperty_new_comment -icalproperty_new_completed -icalproperty_new_components -icalproperty_new_contact -icalproperty_new_created -icalproperty_new_csid -icalproperty_new_datemax -icalproperty_new_datemin -icalproperty_new_decreed -icalproperty_new_defaultcharset -icalproperty_new_defaultlocale -icalproperty_new_defaulttzid -icalproperty_new_defaultvcars -icalproperty_new_deny -icalproperty_new_description -icalproperty_new_dtend -icalproperty_new_dtstamp -icalproperty_new_dtstart -icalproperty_new_due -icalproperty_new_duration -icalproperty_new_exdate -icalproperty_new_expand -icalproperty_new_exrule -icalproperty_new_freebusy -icalproperty_new_from_string -icalproperty_new_geo -icalproperty_new_grant -icalproperty_new_impl -icalproperty_new_itipversion -icalproperty_new_lastmodified -icalproperty_new_location -icalproperty_new_maxcomponentsize -icalproperty_new_maxdate -icalproperty_new_maxresults -icalproperty_new_maxresultssize -icalproperty_new_method -icalproperty_new_mindate -icalproperty_new_multipart -icalproperty_new_name -icalproperty_new_organizer -icalproperty_new_owner -icalproperty_new_percentcomplete -icalproperty_new_permission -icalproperty_new_priority -icalproperty_new_prodid -icalproperty_new_query -icalproperty_new_queryid -icalproperty_new_querylevel -icalproperty_new_queryname -icalproperty_new_rdate -icalproperty_new_recuraccepted -icalproperty_new_recurexpand -icalproperty_new_recurlimit -icalproperty_new_recurrenceid -icalproperty_new_relatedto -icalproperty_new_relcalid -icalproperty_new_repeat -icalproperty_new_requeststatus -icalproperty_new_resources -icalproperty_new_restriction -icalproperty_new_rrule -icalproperty_new_scope -icalproperty_new_sequence -icalproperty_new_status -icalproperty_new_storesexpanded -icalproperty_new_summary -icalproperty_new_target -icalproperty_new_transp -icalproperty_new_trigger -icalproperty_new_tzid -icalproperty_new_tzname -icalproperty_new_tzoffsetfrom -icalproperty_new_tzoffsetto -icalproperty_new_tzurl -icalproperty_new_uid -icalproperty_new_url -icalproperty_new_version -icalproperty_new_x -icalproperty_new_xlicclass -icalproperty_new_xlicclustercount -icalproperty_new_xlicerror -icalproperty_new_xlicmimecharset -icalproperty_new_xlicmimecid -icalproperty_new_xlicmimecontenttype -icalproperty_new_xlicmimeencoding -icalproperty_new_xlicmimefilename -icalproperty_new_xlicmimeoptinfo -icalproperty_recurrence_is_excluded -icalproperty_remove_parameter -icalproperty_remove_parameter_by_kind -icalproperty_remove_parameter_by_name -icalproperty_remove_parameter_by_ref -icalproperty_set_action -icalproperty_set_allowconflict -icalproperty_set_attach -icalproperty_set_attendee -icalproperty_set_calid -icalproperty_set_calmaster -icalproperty_set_calscale -icalproperty_set_capversion -icalproperty_set_carid -icalproperty_set_carlevel -icalproperty_set_categories -icalproperty_set_class -icalproperty_set_cmd -icalproperty_set_comment -icalproperty_set_completed -icalproperty_set_components -icalproperty_set_contact -icalproperty_set_created -icalproperty_set_csid -icalproperty_set_datemax -icalproperty_set_datemin -icalproperty_set_decreed -icalproperty_set_defaultcharset -icalproperty_set_defaultlocale -icalproperty_set_defaulttzid -icalproperty_set_defaultvcars -icalproperty_set_deny -icalproperty_set_description -icalproperty_set_dtend -icalproperty_set_dtstamp -icalproperty_set_dtstart -icalproperty_set_due -icalproperty_set_duration -icalproperty_set_exdate -icalproperty_set_expand -icalproperty_set_exrule -icalproperty_set_freebusy -icalproperty_set_geo -icalproperty_set_grant -icalproperty_set_itipversion -icalproperty_set_lastmodified -icalproperty_set_location -icalproperty_set_maxcomponentsize -icalproperty_set_maxdate -icalproperty_set_maxresults -icalproperty_set_maxresultssize -icalproperty_set_method -icalproperty_set_mindate -icalproperty_set_multipart -icalproperty_set_name -icalproperty_set_organizer -icalproperty_set_owner -icalproperty_set_parameter -icalproperty_set_parameter_from_string -icalproperty_set_parent -icalproperty_set_percentcomplete -icalproperty_set_permission -icalproperty_set_priority -icalproperty_set_prodid -icalproperty_set_query -icalproperty_set_queryid -icalproperty_set_querylevel -icalproperty_set_queryname -icalproperty_set_rdate -icalproperty_set_recuraccepted -icalproperty_set_recurexpand -icalproperty_set_recurlimit -icalproperty_set_recurrenceid -icalproperty_set_relatedto -icalproperty_set_relcalid -icalproperty_set_repeat -icalproperty_set_requeststatus -icalproperty_set_resources -icalproperty_set_restriction -icalproperty_set_rrule -icalproperty_set_scope -icalproperty_set_sequence -icalproperty_set_status -icalproperty_set_storesexpanded -icalproperty_set_summary -icalproperty_set_target -icalproperty_set_transp -icalproperty_set_trigger -icalproperty_set_tzid -icalproperty_set_tzname -icalproperty_set_tzoffsetfrom -icalproperty_set_tzoffsetto -icalproperty_set_tzurl -icalproperty_set_uid -icalproperty_set_url -icalproperty_set_value -icalproperty_set_value_from_string -icalproperty_set_version -icalproperty_set_x -icalproperty_set_x_name -icalproperty_set_xlicclass -icalproperty_set_xlicclustercount -icalproperty_set_xlicerror -icalproperty_set_xlicmimecharset -icalproperty_set_xlicmimecid -icalproperty_set_xlicmimecontenttype -icalproperty_set_xlicmimeencoding -icalproperty_set_xlicmimefilename -icalproperty_set_xlicmimeoptinfo -icalproperty_status_to_string -icalproperty_string_to_enum -icalproperty_string_to_kind -icalproperty_string_to_method -icalproperty_string_to_status -icalproperty_value_kind_to_kind -icalproperty_vanew_action -icalproperty_vanew_allowconflict -icalproperty_vanew_attach -icalproperty_vanew_attendee -icalproperty_vanew_calid -icalproperty_vanew_calmaster -icalproperty_vanew_calscale -icalproperty_vanew_capversion -icalproperty_vanew_carid -icalproperty_vanew_carlevel -icalproperty_vanew_categories -icalproperty_vanew_class -icalproperty_vanew_cmd -icalproperty_vanew_comment -icalproperty_vanew_completed -icalproperty_vanew_components -icalproperty_vanew_contact -icalproperty_vanew_created -icalproperty_vanew_csid -icalproperty_vanew_datemax -icalproperty_vanew_datemin -icalproperty_vanew_decreed -icalproperty_vanew_defaultcharset -icalproperty_vanew_defaultlocale -icalproperty_vanew_defaulttzid -icalproperty_vanew_defaultvcars -icalproperty_vanew_deny -icalproperty_vanew_description -icalproperty_vanew_dtend -icalproperty_vanew_dtstamp -icalproperty_vanew_dtstart -icalproperty_vanew_due -icalproperty_vanew_duration -icalproperty_vanew_exdate -icalproperty_vanew_expand -icalproperty_vanew_exrule -icalproperty_vanew_freebusy -icalproperty_vanew_geo -icalproperty_vanew_grant -icalproperty_vanew_itipversion -icalproperty_vanew_lastmodified -icalproperty_vanew_location -icalproperty_vanew_maxcomponentsize -icalproperty_vanew_maxdate -icalproperty_vanew_maxresults -icalproperty_vanew_maxresultssize -icalproperty_vanew_method -icalproperty_vanew_mindate -icalproperty_vanew_multipart -icalproperty_vanew_name -icalproperty_vanew_organizer -icalproperty_vanew_owner -icalproperty_vanew_percentcomplete -icalproperty_vanew_permission -icalproperty_vanew_priority -icalproperty_vanew_prodid -icalproperty_vanew_query -icalproperty_vanew_queryid -icalproperty_vanew_querylevel -icalproperty_vanew_queryname -icalproperty_vanew_rdate -icalproperty_vanew_recuraccepted -icalproperty_vanew_recurexpand -icalproperty_vanew_recurlimit -icalproperty_vanew_recurrenceid -icalproperty_vanew_relatedto -icalproperty_vanew_relcalid -icalproperty_vanew_repeat -icalproperty_vanew_requeststatus -icalproperty_vanew_resources -icalproperty_vanew_restriction -icalproperty_vanew_rrule -icalproperty_vanew_scope -icalproperty_vanew_sequence -icalproperty_vanew_status -icalproperty_vanew_storesexpanded -icalproperty_vanew_summary -icalproperty_vanew_target -icalproperty_vanew_transp -icalproperty_vanew_trigger -icalproperty_vanew_tzid -icalproperty_vanew_tzname -icalproperty_vanew_tzoffsetfrom -icalproperty_vanew_tzoffsetto -icalproperty_vanew_tzurl -icalproperty_vanew_uid -icalproperty_vanew_url -icalproperty_vanew_version -icalproperty_vanew_x -icalproperty_vanew_xlicclass -icalproperty_vanew_xlicclustercount -icalproperty_vanew_xlicerror -icalproperty_vanew_xlicmimecharset -icalproperty_vanew_xlicmimecid -icalproperty_vanew_xlicmimecontenttype -icalproperty_vanew_xlicmimeencoding -icalproperty_vanew_xlicmimefilename -icalproperty_vanew_xlicmimeoptinfo -icalrecur_add_bydayrules -icalrecur_add_byrules -icalrecur_check_rulepart -icalrecur_clause_name_and_value -icalrecur_expand_recurrence -icalrecur_first_clause -icalrecur_freq_to_string -icalrecur_iterator_free -icalrecur_iterator_new -icalrecur_iterator_next -icalrecur_iterator_sizeof_byarray -icalrecur_next_clause -icalrecur_string_to_freq -icalrecur_string_to_weekday -icalrecur_weekday_to_string -icalrecurrencetype_as_string -icalrecurrencetype_as_string_r -icalrecurrencetype_clear -icalrecurrencetype_day_day_of_week -icalrecurrencetype_day_position -icalrecurrencetype_from_string -icalreqstattype_as_string -icalreqstattype_as_string_r -icalreqstattype_from_string -icalrestriction_check -icalrestriction_check_component -icalrestriction_compare -icalrestriction_may_be_comp_need_process -icalrestriction_may_be_draft_final_canceled -icalrestriction_may_be_tent_conf -icalrestriction_may_be_tent_conf_cancel -icalrestriction_must_be_cancel_if_present -icalrestriction_must_be_canceled_no_attendee -icalrestriction_must_be_email -icalrestriction_must_be_recurring -icalrestriction_must_have_duration -icalrestriction_must_have_repeat -icalrestriction_must_if_tz_ref -icalrestriction_no_dtend -icalrestriction_no_duration -icaltime_add -icaltime_adjust -icaltime_as_ical_string -icaltime_as_ical_string_r -icaltime_as_timet -icaltime_as_timet_with_zone -icaltime_compare -icaltime_compare_date_only -icaltime_compare_date_only_tz -icaltime_convert_to_zone -icaltime_current_time_with_zone -icaltime_day_of_week -icaltime_day_of_year -icaltime_days_in_month -icaltime_from_day_of_year -icaltime_from_string -icaltime_from_timet -icaltime_from_timet_with_zone -icaltime_get_timezone -icaltime_get_tzid -icaltime_is_date -icaltime_is_leap_year -icaltime_is_null_time -icaltime_is_utc -icaltime_is_valid_time -icaltime_normalize -icaltime_null_date -icaltime_null_time -icaltime_set_timezone -icaltime_span_contains -icaltime_span_new -icaltime_span_overlaps -icaltime_start_doy_of_week -icaltime_start_doy_week -icaltime_subtract -icaltime_today -icaltime_week_number -icaltimezone_array_append_from_vtimezone -icaltimezone_array_free -icaltimezone_array_new -icaltimezone_convert_time -icaltimezone_copy -icaltimezone_dump_changes -icaltimezone_free -icaltimezone_free_builtin_timezones -icaltimezone_get_builtin_timezone -icaltimezone_get_builtin_timezone_from_offset -icaltimezone_get_builtin_timezone_from_tzid -icaltimezone_get_builtin_timezones -icaltimezone_get_component -icaltimezone_get_display_name -icaltimezone_get_latitude -icaltimezone_get_location -icaltimezone_get_longitude -icaltimezone_get_tzid -icaltimezone_get_tznames -icaltimezone_get_utc_offset -icaltimezone_get_utc_offset_of_utc_time -icaltimezone_get_utc_timezone -icaltimezone_new -icaltimezone_release_zone_tab -icaltimezone_set_component -icaltriggertype_from_int -icaltriggertype_from_string -icaltriggertype_is_bad_trigger -icaltriggertype_is_null_trigger -icaltzutil_fetch_timezone -icaltzutil_get_zone_directory -icalvalue_as_ical_string -icalvalue_as_ical_string_r -icalvalue_compare -icalvalue_decode_ical_string -icalvalue_encode_ical_string -icalvalue_free -icalvalue_get_action -icalvalue_get_attach -icalvalue_get_binary -icalvalue_get_boolean -icalvalue_get_caladdress -icalvalue_get_carlevel -icalvalue_get_class -icalvalue_get_cmd -icalvalue_get_date -icalvalue_get_datetime -icalvalue_get_datetimeperiod -icalvalue_get_duration -icalvalue_get_float -icalvalue_get_geo -icalvalue_get_integer -icalvalue_get_method -icalvalue_get_parent -icalvalue_get_period -icalvalue_get_query -icalvalue_get_querylevel -icalvalue_get_recur -icalvalue_get_requeststatus -icalvalue_get_status -icalvalue_get_string -icalvalue_get_text -icalvalue_get_transp -icalvalue_get_trigger -icalvalue_get_uri -icalvalue_get_utcoffset -icalvalue_get_x -icalvalue_get_xlicclass -icalvalue_is_valid -icalvalue_isa -icalvalue_isa_value -icalvalue_kind_is_valid -icalvalue_kind_to_string -icalvalue_new -icalvalue_new_action -icalvalue_new_attach -icalvalue_new_binary -icalvalue_new_boolean -icalvalue_new_caladdress -icalvalue_new_carlevel -icalvalue_new_class -icalvalue_new_clone -icalvalue_new_cmd -icalvalue_new_date -icalvalue_new_datetime -icalvalue_new_datetimeperiod -icalvalue_new_duration -icalvalue_new_float -icalvalue_new_from_string -icalvalue_new_from_string_with_error -icalvalue_new_geo -icalvalue_new_impl -icalvalue_new_integer -icalvalue_new_method -icalvalue_new_period -icalvalue_new_query -icalvalue_new_querylevel -icalvalue_new_recur -icalvalue_new_requeststatus -icalvalue_new_status -icalvalue_new_string -icalvalue_new_text -icalvalue_new_transp -icalvalue_new_trigger -icalvalue_new_uri -icalvalue_new_utcoffset -icalvalue_new_x -icalvalue_new_xlicclass -icalvalue_reset_kind -icalvalue_set_action -icalvalue_set_attach -icalvalue_set_binary -icalvalue_set_boolean -icalvalue_set_caladdress -icalvalue_set_carlevel -icalvalue_set_class -icalvalue_set_cmd -icalvalue_set_date -icalvalue_set_datetime -icalvalue_set_datetimeperiod -icalvalue_set_duration -icalvalue_set_float -icalvalue_set_geo -icalvalue_set_integer -icalvalue_set_method -icalvalue_set_parent -icalvalue_set_period -icalvalue_set_query -icalvalue_set_querylevel -icalvalue_set_recur -icalvalue_set_requeststatus -icalvalue_set_status -icalvalue_set_string -icalvalue_set_text -icalvalue_set_transp -icalvalue_set_trigger -icalvalue_set_uri -icalvalue_set_utcoffset -icalvalue_set_x -icalvalue_set_xlicclass -icalvalue_string_to_kind -juldat -null_comp_record DATA -null_prop_record DATA -print_date_to_string -print_datetime_to_string -print_time_to_string -pvl_apply -pvl_clear -pvl_count -pvl_data -pvl_elem_count DATA -pvl_find -pvl_find_next -pvl_free -pvl_head -pvl_insert_after -pvl_insert_before -pvl_insert_ordered -pvl_list_count DATA -pvl_new_element -pvl_newlist -pvl_next -pvl_pop -pvl_prior -pvl_push -pvl_remove -pvl_shift -pvl_tail -pvl_unshift -restr_string_map DATA -set_tz -set_zone_directory -simple_str_to_float sspm_action_map DATA sspm_append_char sspm_append_hex @@ -7,17 +7,19 @@ http://freeassociation.sourceforge.net This program is free software; you can redistribute it and/or modify - it under the terms of either: + it under the terms of either: - The LGPL as published by the Free Software Foundation, version - 2.1, available at: http://www.fsf.org/copyleft/lesser.html + The LGPL as published by the Free Software Foundation, version 2.1 Or: - The Mozilla Public License Version 1.0. You may obtain a copy of - the License at http://www.mozilla.org/MPL/ + The Mozilla Public License Version 1.0. ************************************************************************/ +#ifdef _MSC_VER +#pragma message("WARNING: #include <ical.h> is deprecated. Please #include <libical/ical.h> instead.") +#else #warning "#include <ical.h> is deprecated. Please #include <libical/ical.h> instead." +#endif #include <libical/ical.h> diff --git a/src/icalss.def b/src/icalss.def index 4511ade..bb7c482 100644 --- a/src/icalss.def +++ b/src/icalss.def @@ -1,4 +1,4 @@ -LIBRARY icalss.dll +LIBRARY EXPORTS icalcalendar_create icalcalendar_free @@ -179,608 +179,6 @@ input_buffer_p DATA ss_create_buffer ss_delete_buffer ss_flush_buffer -ss_init_buffer -ss_load_buffer_state -ss_scan_buffer -ss_scan_bytes -ss_scan_string -ss_switch_to_buffer -sschar DATA -sserror -ssin DATA -ssleng DATA -sslex -sslval DATA -ssnerrs DATA -ssout DATA -ssparse -ssrestart -sstext DATA -sswrap -yytext_ptr DATA -LIBRARY icalss.dll -EXPORTS -icalcalendar_create -icalcalendar_free -icalcalendar_get_booked -icalcalendar_get_freebusy -icalcalendar_get_incoming -icalcalendar_get_properties -icalcalendar_islocked -icalcalendar_lock -icalcalendar_new -icalcalendar_new_impl -icalcalendar_ownlock -icalcalendar_unlock -icalclassify -icalclassify_add_instance -icalclassify_cancel_all -icalclassify_cancel_event -icalclassify_cancel_instance -icalclassify_counter -icalclassify_delinecounter -icalclassify_find_attendee -icalclassify_find_overlaps -icalclassify_lowercase -icalclassify_publish_freebusy -icalclassify_publish_new -icalclassify_publish_update -icalclassify_refesh -icalclassify_reply_accept -icalclassify_reply_crasher_accept -icalclassify_reply_crasher_decline -icalclassify_reply_decline -icalclassify_reply_delegate -icalclassify_request_delegate -icalclassify_request_forward -icalclassify_request_freebusy -icalclassify_request_new -icalclassify_request_new_organizer -icalclassify_request_reschedule -icalclassify_request_status -icalclassify_request_update -icalcluster_add_component -icalcluster_commit -icalcluster_count_components -icalcluster_free -icalcluster_get_component -icalcluster_get_current_component -icalcluster_get_first_component -icalcluster_get_next_component -icalcluster_is_changed -icalcluster_key -icalcluster_mark -icalcluster_new -icalcluster_new_clone -icalcluster_new_impl -icalcluster_remove_component -icaldirset_add_component -icaldirset_begin_component -icaldirset_clear -icaldirset_commit -icaldirset_count_components -icaldirset_fetch -icaldirset_fetch_match -icaldirset_free -icaldirset_get_current_component -icaldirset_get_first_component -icaldirset_get_next_component -icaldirset_has_uid -icaldirset_init -icaldirset_lock -icaldirset_mark -icaldirset_modify -icaldirset_new -icaldirset_new_reader -icaldirset_new_writer -icaldirset_next_cluster -icaldirset_next_uid_number -icaldirset_options_default DATA -icaldirset_path -icaldirset_read_directory -icaldirset_remove_component -icaldirset_select -icaldirset_unlock -icaldirsetiter_to_next -icaldirsetiter_to_prior -icalfileset_add_component -icalfileset_begin_component -icalfileset_clear -icalfileset_commit -icalfileset_count_components -icalfileset_fetch -icalfileset_fetch_match -icalfileset_filesize -icalfileset_form_a_matched_recurrence_component -icalfileset_free -icalfileset_get_component -icalfileset_get_current_component -icalfileset_get_first_component -icalfileset_get_id -icalfileset_get_next_component -icalfileset_has_uid -icalfileset_id_free -icalfileset_init -icalfileset_lock -icalfileset_mark -icalfileset_modify -icalfileset_new -icalfileset_new_reader -icalfileset_new_writer -icalfileset_options_default DATA -icalfileset_path -icalfileset_produce_icalcluster -icalfileset_read_file -icalfileset_read_from_file -icalfileset_remove_component -icalfileset_select -icalfileset_unlock -icalfilesetiter_to_next -icalgauge_compare -icalgauge_compare_recurse -icalgauge_dump -icalgauge_free -icalgauge_get_expand -icalgauge_new_from_sql -icalmessage_copy_properties -icalmessage_find_attendee -icalmessage_get_inner -icalmessage_new_accept_reply -icalmessage_new_counterpropose_reply -icalmessage_new_decline_reply -icalmessage_new_delegate_reply -icalmessage_new_delegate_request -icalmessage_new_error_reply -icalmessage_new_reply_base -icalset_add_component -icalset_begin_component -icalset_clear -icalset_commit -icalset_count_components -icalset_fetch -icalset_fetch_match -icalset_free -icalset_get_current_component -icalset_get_first_component -icalset_get_next_component -icalset_has_uid -icalset_mark -icalset_modify -icalset_new -icalset_new_dir -icalset_new_dir_reader -icalset_new_dir_writer -icalset_new_file -icalset_new_file_reader -icalset_new_file_writer -icalset_path -icalset_remove_component -icalset_select -icalsetiter_deref -icalsetiter_next -icalsetiter_null DATA -icalsetiter_prior -icalsetiter_to_next -icalsetiter_to_prior -icalspanlist_as_freebusy_matrix -icalspanlist_as_vfreebusy -icalspanlist_dump -icalspanlist_free -icalspanlist_from_vfreebusy -icalspanlist_new -icalspanlist_next_free_time -icalss_input -icalss_yy_gauge DATA -icalssutil_free_parts -icalssutil_get_parts -icalssutil_is_rescheduled -input_buffer DATA -input_buffer_p DATA -ss_create_buffer -ss_delete_buffer -ss_flush_buffer -ss_init_buffer -ss_load_buffer_state -ss_scan_buffer -ss_scan_bytes -ss_scan_string -ss_switch_to_buffer -sschar DATA -sserror -ssin DATA -ssleng DATA -sslex -sslval DATA -ssnerrs DATA -ssout DATA -ssparse -ssrestart -sstext DATA -sswrap -yytext_ptr DATA -LIBRARY icalss.dll -EXPORTS -icalcalendar_create -icalcalendar_free -icalcalendar_get_booked -icalcalendar_get_freebusy -icalcalendar_get_incoming -icalcalendar_get_properties -icalcalendar_islocked -icalcalendar_lock -icalcalendar_new -icalcalendar_new_impl -icalcalendar_ownlock -icalcalendar_unlock -icalclassify -icalclassify_add_instance -icalclassify_cancel_all -icalclassify_cancel_event -icalclassify_cancel_instance -icalclassify_counter -icalclassify_delinecounter -icalclassify_find_attendee -icalclassify_find_overlaps -icalclassify_lowercase -icalclassify_publish_freebusy -icalclassify_publish_new -icalclassify_publish_update -icalclassify_refesh -icalclassify_reply_accept -icalclassify_reply_crasher_accept -icalclassify_reply_crasher_decline -icalclassify_reply_decline -icalclassify_reply_delegate -icalclassify_request_delegate -icalclassify_request_forward -icalclassify_request_freebusy -icalclassify_request_new -icalclassify_request_new_organizer -icalclassify_request_reschedule -icalclassify_request_status -icalclassify_request_update -icalcluster_add_component -icalcluster_commit -icalcluster_count_components -icalcluster_free -icalcluster_get_component -icalcluster_get_current_component -icalcluster_get_first_component -icalcluster_get_next_component -icalcluster_is_changed -icalcluster_key -icalcluster_mark -icalcluster_new -icalcluster_new_clone -icalcluster_new_impl -icalcluster_remove_component -icaldirset_add_component -icaldirset_begin_component -icaldirset_clear -icaldirset_commit -icaldirset_count_components -icaldirset_fetch -icaldirset_fetch_match -icaldirset_free -icaldirset_get_current_component -icaldirset_get_first_component -icaldirset_get_next_component -icaldirset_has_uid -icaldirset_init -icaldirset_lock -icaldirset_mark -icaldirset_modify -icaldirset_new -icaldirset_new_reader -icaldirset_new_writer -icaldirset_next_cluster -icaldirset_next_uid_number -icaldirset_options_default DATA -icaldirset_path -icaldirset_read_directory -icaldirset_remove_component -icaldirset_select -icaldirset_unlock -icaldirsetiter_to_next -icaldirsetiter_to_prior -icalfileset_add_component -icalfileset_begin_component -icalfileset_clear -icalfileset_commit -icalfileset_count_components -icalfileset_fetch -icalfileset_fetch_match -icalfileset_filesize -icalfileset_form_a_matched_recurrence_component -icalfileset_free -icalfileset_get_component -icalfileset_get_current_component -icalfileset_get_first_component -icalfileset_get_id -icalfileset_get_next_component -icalfileset_has_uid -icalfileset_id_free -icalfileset_init -icalfileset_lock -icalfileset_mark -icalfileset_modify -icalfileset_new -icalfileset_new_reader -icalfileset_new_writer -icalfileset_options_default DATA -icalfileset_path -icalfileset_produce_icalcluster -icalfileset_read_file -icalfileset_read_from_file -icalfileset_remove_component -icalfileset_select -icalfileset_unlock -icalfilesetiter_to_next -icalgauge_compare -icalgauge_compare_recurse -icalgauge_dump -icalgauge_free -icalgauge_get_expand -icalgauge_new_from_sql -icalmessage_copy_properties -icalmessage_find_attendee -icalmessage_get_inner -icalmessage_new_accept_reply -icalmessage_new_counterpropose_reply -icalmessage_new_decline_reply -icalmessage_new_delegate_reply -icalmessage_new_delegate_request -icalmessage_new_error_reply -icalmessage_new_reply_base -icalset_add_component -icalset_begin_component -icalset_clear -icalset_commit -icalset_count_components -icalset_fetch -icalset_fetch_match -icalset_free -icalset_get_current_component -icalset_get_first_component -icalset_get_next_component -icalset_has_uid -icalset_mark -icalset_modify -icalset_new -icalset_new_dir -icalset_new_dir_reader -icalset_new_dir_writer -icalset_new_file -icalset_new_file_reader -icalset_new_file_writer -icalset_path -icalset_remove_component -icalset_select -icalsetiter_deref -icalsetiter_next -icalsetiter_null DATA -icalsetiter_prior -icalsetiter_to_next -icalsetiter_to_prior -icalspanlist_as_freebusy_matrix -icalspanlist_as_vfreebusy -icalspanlist_dump -icalspanlist_free -icalspanlist_from_vfreebusy -icalspanlist_new -icalspanlist_next_free_time -icalss_input -icalss_yy_gauge DATA -icalssutil_free_parts -icalssutil_get_parts -icalssutil_is_rescheduled -input_buffer DATA -input_buffer_p DATA -ss_create_buffer -ss_delete_buffer -ss_flush_buffer -ss_init_buffer -ss_load_buffer_state -ss_scan_buffer -ss_scan_bytes -ss_scan_string -ss_switch_to_buffer -sschar DATA -sserror -ssin DATA -ssleng DATA -sslex -sslval DATA -ssnerrs DATA -ssout DATA -ssparse -ssrestart -sstext DATA -sswrap -yytext_ptr DATA -LIBRARY icalss.dll -EXPORTS -icalcalendar_create -icalcalendar_free -icalcalendar_get_booked -icalcalendar_get_freebusy -icalcalendar_get_incoming -icalcalendar_get_properties -icalcalendar_islocked -icalcalendar_lock -icalcalendar_new -icalcalendar_new_impl -icalcalendar_ownlock -icalcalendar_unlock -icalclassify -icalclassify_add_instance -icalclassify_cancel_all -icalclassify_cancel_event -icalclassify_cancel_instance -icalclassify_counter -icalclassify_delinecounter -icalclassify_find_attendee -icalclassify_find_overlaps -icalclassify_lowercase -icalclassify_publish_freebusy -icalclassify_publish_new -icalclassify_publish_update -icalclassify_refesh -icalclassify_reply_accept -icalclassify_reply_crasher_accept -icalclassify_reply_crasher_decline -icalclassify_reply_decline -icalclassify_reply_delegate -icalclassify_request_delegate -icalclassify_request_forward -icalclassify_request_freebusy -icalclassify_request_new -icalclassify_request_new_organizer -icalclassify_request_reschedule -icalclassify_request_status -icalclassify_request_update -icalcluster_add_component -icalcluster_commit -icalcluster_count_components -icalcluster_free -icalcluster_get_component -icalcluster_get_current_component -icalcluster_get_first_component -icalcluster_get_next_component -icalcluster_is_changed -icalcluster_key -icalcluster_mark -icalcluster_new -icalcluster_new_clone -icalcluster_new_impl -icalcluster_remove_component -icaldirset_add_component -icaldirset_begin_component -icaldirset_clear -icaldirset_commit -icaldirset_count_components -icaldirset_fetch -icaldirset_fetch_match -icaldirset_free -icaldirset_get_current_component -icaldirset_get_first_component -icaldirset_get_next_component -icaldirset_has_uid -icaldirset_init -icaldirset_lock -icaldirset_mark -icaldirset_modify -icaldirset_new -icaldirset_new_reader -icaldirset_new_writer -icaldirset_next_cluster -icaldirset_next_uid_number -icaldirset_options_default DATA -icaldirset_path -icaldirset_read_directory -icaldirset_remove_component -icaldirset_select -icaldirset_unlock -icaldirsetiter_to_next -icaldirsetiter_to_prior -icalfileset_add_component -icalfileset_begin_component -icalfileset_clear -icalfileset_commit -icalfileset_count_components -icalfileset_fetch -icalfileset_fetch_match -icalfileset_filesize -icalfileset_form_a_matched_recurrence_component -icalfileset_free -icalfileset_get_component -icalfileset_get_current_component -icalfileset_get_first_component -icalfileset_get_id -icalfileset_get_next_component -icalfileset_has_uid -icalfileset_id_free -icalfileset_init -icalfileset_lock -icalfileset_mark -icalfileset_modify -icalfileset_new -icalfileset_new_reader -icalfileset_new_writer -icalfileset_options_default DATA -icalfileset_path -icalfileset_produce_icalcluster -icalfileset_read_file -icalfileset_read_from_file -icalfileset_remove_component -icalfileset_select -icalfileset_unlock -icalfilesetiter_to_next -icalgauge_compare -icalgauge_compare_recurse -icalgauge_dump -icalgauge_free -icalgauge_get_expand -icalgauge_new_from_sql -icalmessage_copy_properties -icalmessage_find_attendee -icalmessage_get_inner -icalmessage_new_accept_reply -icalmessage_new_counterpropose_reply -icalmessage_new_decline_reply -icalmessage_new_delegate_reply -icalmessage_new_delegate_request -icalmessage_new_error_reply -icalmessage_new_reply_base -icalset_add_component -icalset_begin_component -icalset_clear -icalset_commit -icalset_count_components -icalset_fetch -icalset_fetch_match -icalset_free -icalset_get_current_component -icalset_get_first_component -icalset_get_next_component -icalset_has_uid -icalset_mark -icalset_modify -icalset_new -icalset_new_dir -icalset_new_dir_reader -icalset_new_dir_writer -icalset_new_file -icalset_new_file_reader -icalset_new_file_writer -icalset_path -icalset_remove_component -icalset_select -icalsetiter_deref -icalsetiter_next -icalsetiter_null DATA -icalsetiter_prior -icalsetiter_to_next -icalsetiter_to_prior -icalspanlist_as_freebusy_matrix -icalspanlist_as_vfreebusy -icalspanlist_dump -icalspanlist_free -icalspanlist_from_vfreebusy -icalspanlist_new -icalspanlist_next_free_time -icalss_input -icalss_yy_gauge DATA -icalssutil_free_parts -icalssutil_get_parts -icalssutil_is_rescheduled -input_buffer DATA -input_buffer_p DATA -ss_create_buffer -ss_delete_buffer -ss_flush_buffer -ss_init_buffer -ss_load_buffer_state ss_scan_buffer ss_scan_bytes ss_scan_string diff --git a/src/icalvcal.def b/src/icalvcal.def index ca8ea71..33c6e22 100644 --- a/src/icalvcal.def +++ b/src/icalvcal.def @@ -1,286 +1,4 @@ -LIBRARY icalvcal.dll -EXPORTS -Parse_MIME -Parse_MIME_FromFile -Parse_MIME_FromFileName -addGroup -addList -addProp -addPropSizedValue -addPropSizedValue_ -addPropValue -addProp_ -addVObjectProp -alarm_comp -cleanStrTbl -cleanVObject -cleanVObjects -comp -dc_prop -deleteStr -deleteVObject -dupStr -fakeCString -fakeUnicode -fieldedProp DATA -get_string_value -icalvcal_convert -icalvcal_convert_with_defaults -initLex -initPropIterator -initVObjectIterator -isAPropertyOf -lexBuf DATA -lookupProp -lookupProp_ -lookupStr -mime_char DATA -mime_debug DATA -mime_lex -mime_lineNum DATA -mime_nerrs DATA -mime_numErrors DATA -mime_parse -mime_yylval DATA -moreIteration -multivalued_prop -newVObject -newVObject_ -nextVObject -nextVObjectInList -printVObject -printVObjectToFile -printVObjectsToFile -registerMimeErrorHandler -rule_prop -sequence_prop -setVObjectAnyValue -setVObjectIntegerValue -setVObjectLongValue -setVObjectName -setVObjectStringZValue -setVObjectStringZValue_ -setVObjectUStringZValue -setVObjectUStringZValue_ -setVObjectVObjectValue -setValueWithSize -setValueWithSize_ -status_prop -transp_prop -uStrLen -unUseStr -utc_datetime_prop -vObjectAnyValue -vObjectIntegerValue -vObjectLongValue -vObjectName -vObjectStringZValue -vObjectUStringZValue -vObjectVObjectValue -vObjectValueType -vcsAddAAlarm -vcsAddDAlarm -vcsAddEvent -vcsAddMAlarm -vcsAddPAlarm -vcsAddTodo -vcsCreateVCal -weekday_codes DATA -weekdays DATA -writeMemVObject -writeMemVObjects -writeVObject -writeVObjectToFile -writeVObjectsToFile -LIBRARY icalvcal.dll -EXPORTS -Parse_MIME -Parse_MIME_FromFile -Parse_MIME_FromFileName -addGroup -addList -addProp -addPropSizedValue -addPropSizedValue_ -addPropValue -addProp_ -addVObjectProp -alarm_comp -cleanStrTbl -cleanVObject -cleanVObjects -comp -dc_prop -deleteStr -deleteVObject -dupStr -fakeCString -fakeUnicode -fieldedProp DATA -get_string_value -icalvcal_convert -icalvcal_convert_with_defaults -initLex -initPropIterator -initVObjectIterator -isAPropertyOf -lexBuf DATA -lookupProp -lookupProp_ -lookupStr -mime_char DATA -mime_debug DATA -mime_lex -mime_lineNum DATA -mime_nerrs DATA -mime_numErrors DATA -mime_parse -mime_yylval DATA -moreIteration -multivalued_prop -newVObject -newVObject_ -nextVObject -nextVObjectInList -printVObject -printVObjectToFile -printVObjectsToFile -registerMimeErrorHandler -rule_prop -sequence_prop -setVObjectAnyValue -setVObjectIntegerValue -setVObjectLongValue -setVObjectName -setVObjectStringZValue -setVObjectStringZValue_ -setVObjectUStringZValue -setVObjectUStringZValue_ -setVObjectVObjectValue -setValueWithSize -setValueWithSize_ -status_prop -transp_prop -uStrLen -unUseStr -utc_datetime_prop -vObjectAnyValue -vObjectIntegerValue -vObjectLongValue -vObjectName -vObjectStringZValue -vObjectUStringZValue -vObjectVObjectValue -vObjectValueType -vcsAddAAlarm -vcsAddDAlarm -vcsAddEvent -vcsAddMAlarm -vcsAddPAlarm -vcsAddTodo -vcsCreateVCal -weekday_codes DATA -weekdays DATA -writeMemVObject -writeMemVObjects -writeVObject -writeVObjectToFile -writeVObjectsToFile -LIBRARY icalvcal.dll -EXPORTS -Parse_MIME -Parse_MIME_FromFile -Parse_MIME_FromFileName -addGroup -addList -addProp -addPropSizedValue -addPropSizedValue_ -addPropValue -addProp_ -addVObjectProp -alarm_comp -cleanStrTbl -cleanVObject -cleanVObjects -comp -dc_prop -deleteStr -deleteVObject -dupStr -fakeCString -fakeUnicode -fieldedProp DATA -get_string_value -icalvcal_convert -icalvcal_convert_with_defaults -initLex -initPropIterator -initVObjectIterator -isAPropertyOf -lexBuf DATA -lookupProp -lookupProp_ -lookupStr -mime_char DATA -mime_debug DATA -mime_lex -mime_lineNum DATA -mime_nerrs DATA -mime_numErrors DATA -mime_parse -mime_yylval DATA -moreIteration -multivalued_prop -newVObject -newVObject_ -nextVObject -nextVObjectInList -printVObject -printVObjectToFile -printVObjectsToFile -registerMimeErrorHandler -rule_prop -sequence_prop -setVObjectAnyValue -setVObjectIntegerValue -setVObjectLongValue -setVObjectName -setVObjectStringZValue -setVObjectStringZValue_ -setVObjectUStringZValue -setVObjectUStringZValue_ -setVObjectVObjectValue -setValueWithSize -setValueWithSize_ -status_prop -transp_prop -uStrLen -unUseStr -utc_datetime_prop -vObjectAnyValue -vObjectIntegerValue -vObjectLongValue -vObjectName -vObjectStringZValue -vObjectUStringZValue -vObjectVObjectValue -vObjectValueType -vcsAddAAlarm -vcsAddDAlarm -vcsAddEvent -vcsAddMAlarm -vcsAddPAlarm -vcsAddTodo -vcsCreateVCal -weekday_codes DATA -weekdays DATA -writeMemVObject -writeMemVObjects -writeVObject -writeVObjectToFile -writeVObjectsToFile -LIBRARY icalvcal.dll +LIBRARY EXPORTS Parse_MIME Parse_MIME_FromFile diff --git a/src/java/CMakeLists.txt b/src/java/CMakeLists.txt index 6329476..4ae0edd 100644 --- a/src/java/CMakeLists.txt +++ b/src/java/CMakeLists.txt @@ -1,95 +1,41 @@ ########### next target ############### -SET(ical_jni_LIB_SRCS - jlibical_consts_cxx.h - jlibical_utils_cxx.cpp - jlibical_utils_cxx.h - jniICalDurationType_cxx.cpp - jniICalDurationType_cxx.h - jniICalPeriodType_cxx.cpp - jniICalPeriodType_cxx.h - jniICalRecurrenceType_cxx.cpp - jniICalRecurrenceType_cxx.h - jniICalTimeType_cxx.cpp - jniICalTimeType_cxx.h - jniICalTriggerType_cxx.cpp - jniICalTriggerType_cxx.h - net_cp_jlibical_ICalParameter_cxx.cpp - net_cp_jlibical_ICalParameter_cxx.h - net_cp_jlibical_ICalProperty_cxx.cpp - net_cp_jlibical_ICalProperty_cxx.h - net_cp_jlibical_ICalValue_cxx.cpp - net_cp_jlibical_ICalValue_cxx.h - net_cp_jlibical_VComponent_cxx.cpp - net_cp_jlibical_VComponent_cxx.h +set(ical_jni_LIB_SRCS + jlibical_consts_cxx.h + jlibical_utils_cxx.cpp + jlibical_utils_cxx.h + jniICalDurationType_cxx.cpp + jniICalDurationType_cxx.h + jniICalPeriodType_cxx.cpp + jniICalPeriodType_cxx.h + jniICalRecurrenceType_cxx.cpp + jniICalRecurrenceType_cxx.h + jniICalTimeType_cxx.cpp + jniICalTimeType_cxx.h + jniICalTriggerType_cxx.cpp + jniICalTriggerType_cxx.h + net_cp_jlibical_ICalParameter_cxx.cpp + net_cp_jlibical_ICalParameter_cxx.h + net_cp_jlibical_ICalProperty_cxx.cpp + net_cp_jlibical_ICalProperty_cxx.h + net_cp_jlibical_ICalValue_cxx.cpp + net_cp_jlibical_ICalValue_cxx.h + net_cp_jlibical_VComponent_cxx.cpp + net_cp_jlibical_VComponent_cxx.h ) -add_library(ical_jni SHARED ${ical_jni_LIB_SRCS}) +add_library(ical_jni ${LIBRARY_TYPE} ${ical_jni_LIB_SRCS}) target_link_libraries(ical_jni ical_cxx) -set_target_properties(ical_jni PROPERTIES VERSION ${LIBICAL_LIB_VERSION_STRING} SOVERSION ${LIBICAL_LIB_MAJOR_VERSION}) +set_target_properties(ical_jni PROPERTIES + VERSION ${LIBICAL_LIB_VERSION_STRING} + SOVERSION ${LIBICAL_LIB_MAJOR_VERSION} +) install(TARGETS ical_jni DESTINATION lib) - ########### install files ############### -install(FILES DESTINATION /include) -install(FILES libical.jar DESTINATION /share) - - - -#original Makefile.am contents follow: - -#lib_LTLIBRARIES = libical_jni.la -# -#INCLUDES = -I../libical -I$(JAVA_HOME)/include -I$(JAVA_HOME)/include/$(JAVA_PLATFORM) -# -#libical_jni_la_LDFLAGS = -no-defined -version-info 43:0:43 -# -#libical_jni_la_LIBADD = \ -# ../libical/libical_cxx.la -# -#libical_jni_la_SOURCES = \ -# jlibical_consts_cxx.h \ -# jlibical_utils_cxx.cpp \ -# jlibical_utils_cxx.h \ -# jniICalDurationType_cxx.cpp \ -# jniICalDurationType_cxx.h \ -# jniICalPeriodType_cxx.cpp \ -# jniICalPeriodType_cxx.h \ -# jniICalRecurrenceType_cxx.cpp \ -# jniICalRecurrenceType_cxx.h \ -# jniICalTimeType_cxx.cpp \ -# jniICalTimeType_cxx.h \ -# jniICalTriggerType_cxx.cpp \ -# jniICalTriggerType_cxx.h \ -# net_cp_jlibical_ICalParameter_cxx.cpp \ -# net_cp_jlibical_ICalParameter_cxx.h \ -# net_cp_jlibical_ICalProperty_cxx.cpp \ -# net_cp_jlibical_ICalProperty_cxx.h \ -# net_cp_jlibical_ICalValue_cxx.cpp \ -# net_cp_jlibical_ICalValue_cxx.h \ -# net_cp_jlibical_VComponent_cxx.cpp \ -# net_cp_jlibical_VComponent_cxx.h -# -#java_JAVA=\ -#ICalDurationType.java ICalTriggerType.java VEvent.java\ -#ICalParameter.java ICalValue.java VFreeBusy.java\ -#ICalPeriodType.java VAgenda.java VQuery.java\ -#ICalProperty.java VAlarm.java VToDo.java\ -#ICalRecurrenceType.java VCalendar.java \ -#ICalTimeType.java VComponent.java -# -#data_DATA = libical.jar -# -#libical.jar: classjava.stamp -# (cd $(top_builddir); $(JAR) cf src/java/libical.jar net) -# -#jlibical_jniincludedir = $(includedir) -# -#TESTS = testjni.sh -# -#testjni.sh: -# echo "$(JAVA) -Djava.library.path=@prefix@/lib -classpath $(JAVA_HOME)/lib/classes.zip:@prefix@/lib/libical.jar net.cp.jlibical.testjni" > testjni.sh && chmod a+x testjni.sh +install(FILES DESTINATION /include) +install(FILES libical.jar DESTINATION /share) diff --git a/src/java/Makefile.am b/src/java/Makefile.am index 8ab3de0..461219a 100644 --- a/src/java/Makefile.am +++ b/src/java/Makefile.am @@ -2,7 +2,7 @@ lib_LTLIBRARIES = libical_jni.la INCLUDES = -I../libical -I$(JAVA_HOME)/include -I$(JAVA_HOME)/include/$(JAVA_PLATFORM) -libical_jni_la_LDFLAGS = -no-defined -version-info 43:0:43 +libical_jni_la_LDFLAGS = -no-defined -version-info 48:0:48 libical_jni_la_LIBADD = \ ../libical/libical_cxx.la diff --git a/src/libical/CMakeLists.txt b/src/libical/CMakeLists.txt index 9ff663d..6774352 100644 --- a/src/libical/CMakeLists.txt +++ b/src/libical/CMakeLists.txt @@ -2,17 +2,24 @@ configure_file(${CMAKE_CURRENT_SOURCE_DIR}/icalversion.h.cmake ${CMAKE_CURRENT_B include_directories( ${CMAKE_BINARY_DIR} + ${CMAKE_BINARY_DIR}/src ${CMAKE_SOURCE_DIR}/src ${CMAKE_SOURCE_DIR}/src/libical ${CMAKE_BINARY_DIR}/src/libical ) -set(PACKAGE_DATA_DIR "\\\"${CMAKE_INSTALL_PREFIX}/share/libical\\\"") -add_definitions(-DPACKAGE_DATA_DIR=${PACKAGE_DATA_DIR}) +if(WIN32) + if(MSVC) + add_definitions(-DBUILD_LIBICALDLL) + endif(MSVC) +endif(WIN32) +configure_file(icalerror.h.cmake ${CMAKE_CURRENT_BINARY_DIR}/icalerror.h) +set(PACKAGE_DATA_DIR "\\\"${CMAKE_INSTALL_PREFIX}/share/libical\\\"") +add_definitions(-DPACKAGE_DATA_DIR="${PACKAGE_DATA_DIR}") -set(ICALSCRIPTS ${CMAKE_SOURCE_DIR}/scripts/ ) +set(ICALSCRIPTS ${CMAKE_SOURCE_DIR}/scripts/) set(PROPERTYDEPS ${ICALSCRIPTS}/mkderivedproperties.pl @@ -22,9 +29,8 @@ set(PROPERTYDEPS ${CMAKE_SOURCE_DIR}/src/libical/icalderivedproperty.c.in ) - add_custom_command( - OUTPUT + OUTPUT ${CMAKE_BINARY_DIR}/src/libical/icalderivedproperty.h COMMAND ${PERL_EXECUTABLE} -I ${ICALSCRIPTS} ${ICALSCRIPTS}/mkderivedproperties.pl @@ -55,9 +61,9 @@ set(PARAMETERDEPS ) add_custom_command( - OUTPUT + OUTPUT ${CMAKE_BINARY_DIR}/src/libical/icalderivedparameter.h - COMMAND + COMMAND ${PERL_EXECUTABLE} -I ${ICALSCRIPTS} ${ICALSCRIPTS}/mkderivedparameters.pl -i ${CMAKE_SOURCE_DIR}/src/libical/icalderivedparameter.h.in -h ${CMAKE_SOURCE_DIR}/design-data/parameters.csv > @@ -69,9 +75,9 @@ add_custom_command( OUTPUT ${CMAKE_BINARY_DIR}/src/libical/icalderivedparameter.c COMMAND - ${PERL_EXECUTABLE} -I ${ICALSCRIPTS} ${ICALSCRIPTS}/mkderivedparameters.pl + ${PERL_EXECUTABLE} -I ${ICALSCRIPTS} ${ICALSCRIPTS}/mkderivedparameters.pl -i ${CMAKE_SOURCE_DIR}/src/libical/icalderivedparameter.c.in - -c ${CMAKE_SOURCE_DIR}/design-data/parameters.csv > + -c ${CMAKE_SOURCE_DIR}/design-data/parameters.csv > ${CMAKE_BINARY_DIR}/src/libical/icalderivedparameter.c DEPENDS ${PARAMETERDEPS} ${CMAKE_BINARY_DIR}/src/libical/icalderivedparameter.h ) @@ -105,7 +111,7 @@ add_custom_command( OUTPUT ${CMAKE_BINARY_DIR}/src/libical/icalderivedvalue.h COMMAND - ${PERL_EXECUTABLE} -I${ICALSCRIPTS} ${ICALSCRIPTS}/mkderivedvalues.pl + ${PERL_EXECUTABLE} -I${ICALSCRIPTS} ${ICALSCRIPTS}/mkderivedvalues.pl -i ${CMAKE_SOURCE_DIR}/src/libical/icalderivedvalue.h.in -h ${CMAKE_SOURCE_DIR}/design-data/value-types.csv > ${CMAKE_BINARY_DIR}/src/libical/icalderivedvalue.h @@ -113,9 +119,9 @@ add_custom_command( ) add_custom_command( - OUTPUT + OUTPUT ${CMAKE_BINARY_DIR}/src/libical/icalderivedvalue.c - COMMAND + COMMAND ${PERL_EXECUTABLE} -I${ICALSCRIPTS} ${ICALSCRIPTS}/mkderivedvalues.pl -i ${CMAKE_SOURCE_DIR}/src/libical/icalderivedvalue.c.in -c ${CMAKE_SOURCE_DIR}/design-data/value-types.csv > @@ -150,91 +156,137 @@ add_custom_target(ical-header DEPENDS ${CMAKE_BINARY_DIR}/src/libical/ical.h ) +macro(_list_prefix _outvar _listvar _prefix) + set(${_outvar}) + foreach(_item IN LISTS ${_listvar}) + list(APPEND ${_outvar} ${_prefix}${_item}) + endforeach() +endmacro(_list_prefix) + +# GObject Introspection +if(HAVE_INTROSPECTION) + include(GObjectIntrospectionMacros) + set(INTROSPECTION_GIRS) + #set(INTROSPECTION_SCANNER_ARGS "--add-include-path=${CMAKE_CURRENT_SOURCE_DIR}") + #set(INTROSPECTION_COMPILER_ARGS "--includedir=${CMAKE_CURRENT_SOURCE_DIR}") + + set(libical_0_48_gir "libical") + set(libical_0_48_gir_VERSION "0.48") + set(INTROSPECTION_SCANNER_ARGS ${CMAKE_BINARY_DIR}/src/libical/ical.h) + set(libical_0_48_gir_LIBRARY "ical") + set(libical_0_48_gir_INCLUDES GObject-2.0) + get_directory_property(_tmp_includes ical_LIB_SRCS) + _list_prefix(_includes _tmp_includes "-L") + set(libical_0_48_gir_CFLAGS ${_includes}) + set(libical_0_48_gir_LIBS ical) + + list(APPEND INTROSPECTION_GIRS libical-0.48.gir) + + gir_add_introspections(INTROSPECTION_GIRS) +endif() + ########### next target ############### set(BUILT_COMBINEDHEADERS - ${CMAKE_BINARY_DIR}/src/libical/icalderivedparameter.h - ${CMAKE_BINARY_DIR}/src/libical/icalderivedproperty.h - ${CMAKE_BINARY_DIR}/src/libical/icalderivedvalue.h + ${CMAKE_BINARY_DIR}/src/libical/icalderivedparameter.h + ${CMAKE_BINARY_DIR}/src/libical/icalderivedproperty.h + ${CMAKE_BINARY_DIR}/src/libical/icalderivedvalue.h ) set(BUILT_SOURCES - ${BUILT_COMBINEDHEADERS} - icalderivedparameter.c - icalderivedproperty.c - icalrestriction.c - icalderivedvalue.c + ${BUILT_COMBINEDHEADERS} + icalderivedparameter.c + icalderivedproperty.c + icalrestriction.c + icalderivedvalue.c ) -SET(ical_LIB_SRCS - ${BUILT_SOURCES} - icalarray.c - icalarray.h - icalattach.h - icalattachimpl.h - icalattach.c - icalcomponent.c - icalcomponent.h - icalenums.c - icalenums.h - icalerror.c - icalerror.h - icalmemory.c - icalmemory.h - icalmime.c - icalmime.h - icalparameter.c - icalparameter.h - icalparameterimpl.h - icalparser.c - icalparser.h - icalproperty.c - icalproperty.h - icalrecur.c - icalrecur.h - icalrestriction.h - icaltime.c - icaltime.h - icaltz-util.c - icaltz-util.h - icaltimezone.c - icaltimezone.h - icalduration.h - icalduration.c - icalperiod.h - icalperiod.c - icaltypes.c - icaltypes.h - icalvalue.c - icalvalue.h - icalvalueimpl.h - pvl.c - pvl.h - sspm.c - sspm.h - icallangbind.h - icallangbind.c - caldate.c - astime.h +set(ical_LIB_SRCS + ${BUILT_SOURCES} + icalarray.c + icalarray.h + icalattach.h + icalattachimpl.h + icalattach.c + icalcomponent.c + icalcomponent.h + icalenums.c + icalenums.h + icalerror.c + icalmemory.c + icalmemory.h + icalmime.c + icalmime.h + icalparameter.c + icalparameter.h + icalparameterimpl.h + icalparser.c + icalparser.h + icalproperty.c + icalproperty.h + icalrecur.c + icalrecur.h + icalrestriction.h + icaltime.c + icaltime.h + icaltz-util.c + icaltz-util.h + icaltimezone.c + icaltimezone.h + icalduration.h + icalduration.c + icalperiod.h + icalperiod.c + icaltypes.c + icaltypes.h + icalvalue.c + icalvalue.h + icalvalueimpl.h + pvl.c + pvl.h + sspm.c + sspm.h + icallangbind.h + icallangbind.c + caldate.c + astime.h ) -if(NOT WIN32) - list(APPEND ical_LIB_SRCS vsnprintf.c) -else(NOT WIN32) +if(WIN32) if(MSVC) list(APPEND ical_LIB_SRCS ../ical.def) endif(MSVC) -endif(NOT WIN32) +endif(WIN32) + +add_library(ical ${LIBRARY_TYPE} ${ical_LIB_SRCS}) +add_library(ical-static STATIC ${ical_LIB_SRCS}) -add_library(ical SHARED ${ical_LIB_SRCS}) add_dependencies(ical ical-header) target_link_libraries(ical ${CMAKE_THREAD_LIBS_INIT}) -set_target_properties(ical PROPERTIES VERSION ${LIBICAL_LIB_VERSION_STRING} SOVERSION ${LIBICAL_LIB_MAJOR_VERSION}) -install(TARGETS ical ${INSTALL_TARGETS_DEFAULT_ARGS}) +if(WINCE) + target_link_libraries(ical ${WCECOMPAT_LIBRARIES}) +endif(WINCE) + +if(MSVC) + set_target_properties(ical PROPERTIES OUTPUT_NAME "libical") + set_target_properties(ical-static PROPERTIES OUTPUT_NAME "libical-static") +else(MSVC) + set_target_properties(ical-static PROPERTIES OUTPUT_NAME "ical") +endif(MSVC) +set_target_properties(ical PROPERTIES + VERSION ${LIBICAL_LIB_VERSION_STRING} + SOVERSION ${LIBICAL_LIB_MAJOR_VERSION} +) +set_target_properties(ical PROPERTIES CLEAN_DIRECT_OUTPUT 1) +set_target_properties(ical-static PROPERTIES CLEAN_DIRECT_OUTPUT 1) + +install(TARGETS ical ical-static ${INSTALL_TARGETS_DEFAULT_ARGS}) ########### install files ############### +install(FILES ${CMAKE_SOURCE_DIR}/src/ical.h DESTINATION ${INCLUDE_INSTALL_DIR}) + install(FILES ${CMAKE_BINARY_DIR}/src/libical/ical.h icalarray.h @@ -245,7 +297,7 @@ install(FILES ${CMAKE_BINARY_DIR}/src/libical/icalderivedvalue.h icalduration.h icalenums.h - icalerror.h + ${CMAKE_BINARY_DIR}/src/libical/icalerror.h icallangbind.h icalmemory.h icalmime.h @@ -262,329 +314,6 @@ install(FILES icalvalue.h pvl.h sspm.h - #$(cxx_headers) - DESTINATION - ${INCLUDE_INSTALL_DIR}/libical) - - -#original Makefile.am contents follow: - -##====================================================================== -## FILE: Makefile.am -## CREATOR: eric -## -## $Id: Makefile.am,v 1.40 2008-01-02 20:07:30 dothebart Exp $ -## -## -## (C) COPYRIGHT 2000, Eric Busboom, http://www.softwarestudio.org -## -## This program is free software; you can redistribute it and/or modify -## it under the terms of either: -## -## The LGPL as published by the Free Software Foundation, version -## 2.1, available at: http://www.fsf.org/copyleft/lesser.html -## -## Or: -## -## The Mozilla Public License Version 1.0. You may obtain a copy of -## the License at http://www.mozilla.org/MPL/ -## -## -## -##====================================================================== -# -# -#DESIGNDATA = $(top_srcdir)/design-data -#ICALSCRIPTS = $(top_srcdir)/scripts -# -#if WITH_CXX_BINDINGS -#cxx_lib=libical_cxx.la -#cxx_headers=vcomponent.h icalparameter_cxx.h icalproperty_cxx.h icalvalue_cxx.h icptrholder.h -#else -#cxx_lib= -#cxx_headers= -#endif -# -#lib_LTLIBRARIES = libical.la $(cxx_lib) -#noinst_LTLIBRARIES = libical-static.la -#libical_static_la_SOURCES = $(libical_la_SOURCES) -#libical_static_la_LDFLAGS = --all-static -# -#AM_CPPFLAGS = -DPACKAGE_DATA_DIR=\""$(datadir)/$(PACKAGE)"\" -# -## CFLAGS = -g -# -#INCLUDES = \ -# -I$(top_builddir) \ -# -I$(top_srcdir)/src \ -# -I$(top_builddir)/src \ -# -I$(top_srcdir)/src/libical \ -# -I$(top_builddir)/src/libical \ -# -I$(srcdir) -# -#libical_la_LDFLAGS = -version-info 42:0:42 -# -#libical_la_LIBADD = $(PTHREAD_LIBS) -# -#libical_la_SOURCES = \ -# $(BUILT_SOURCES) \ -# icalarray.c \ -# icalarray.h \ -# icalattach.h \ -# icalattachimpl.h \ -# icalattach.c \ -# icalcomponent.c \ -# icalcomponent.h \ -# icalenums.c \ -# icalenums.h \ -# icalerror.c \ -# icalerror.h \ -# icalmemory.c \ -# icalmemory.h \ -# icalmime.c \ -# icalmime.h \ -# icalparameter.c \ -# icalparameter.h \ -# icalparameterimpl.h \ -# icalparser.c \ -# icalparser.h \ -# icalproperty.c \ -# icalproperty.h \ -# icalrecur.c \ -# icalrecur.h \ -# icalrestriction.h \ -# icaltime.c \ -# icaltime.h \ -# icaltz-util.c \ -# icaltz-util.h \ -# icaltimezone.c \ -# icaltimezone.h \ -# icalduration.h \ -# icalduration.c \ -# icalperiod.h \ -# icalperiod.c \ -# icaltypes.c \ -# icaltypes.h \ -# icalvalue.c \ -# icalvalue.h \ -# icalvalueimpl.h \ -# pvl.c \ -# pvl.h \ -# sspm.c \ -# sspm.h \ -# vsnprintf.c \ -# icallangbind.h \ -# icallangbind.c \ -# caldate.c \ -# astime.h -# -#if WITH_CXX_BINDINGS -#libical_cxx_la_SOURCES = \ -# $(libical_la_SOURCES) \ -# vcomponent.h \ -# vcomponent.cpp \ -# icalproperty_cxx.h \ -# icalproperty_cxx.cpp \ -# icalparameter_cxx.h \ -# icalparameter_cxx.cpp \ -# icalvalue_cxx.h \ -# icalvalue_cxx.cpp \ -# icptrholder.h -#endif -# -#libical_includedir = $(includedir)/libical -# -#libical_include_HEADERS = \ -# ical.h \ -# icalarray.h \ -# icalattach.h \ -# icalcomponent.h \ -# icalderivedparameter.h \ -# icalderivedproperty.h \ -# icalderivedvalue.h \ -# icalduration.h \ -# icalenums.h \ -# icalerror.h \ -# icallangbind.h \ -# icalmemory.h \ -# icalmime.h \ -# icalparameter.h \ -# icalparser.h \ -# icalperiod.h \ -# icalproperty.h \ -# icalrecur.h \ -# icalrestriction.h \ -# icaltime.h \ -# icaltz-util.h \ -# icaltimezone.h \ -# icaltypes.h \ -# icalvalue.h \ -# pvl.h \ -# sspm.h \ -# $(cxx_headers) -# -## ORDERING OF HEADERS IS SIGNIFICANT. Don't change this ordering. It -## is required to make the combined header ical.h properly -#COMBINEDHEADERS = \ -# $(top_builddir)/src/libical/icalversion.h \ -# $(top_srcdir)/src/libical/icaltime.h \ -# $(top_srcdir)/src/libical/icalduration.h \ -# $(top_srcdir)/src/libical/icalperiod.h \ -# $(top_srcdir)/src/libical/icalenums.h \ -# $(top_srcdir)/src/libical/icaltypes.h \ -# $(top_srcdir)/src/libical/icalrecur.h \ -# $(top_srcdir)/src/libical/icalattach.h \ -# icalderivedvalue.h \ -# icalderivedparameter.h \ -# $(top_srcdir)/src/libical/icalvalue.h \ -# $(top_srcdir)/src/libical/icalparameter.h \ -# icalderivedproperty.h \ -# $(top_srcdir)/src/libical/icalproperty.h \ -# $(top_srcdir)/src/libical/pvl.h \ -# $(top_srcdir)/src/libical/icalarray.h \ -# $(top_srcdir)/src/libical/icalcomponent.h \ -# $(top_srcdir)/src/libical/icaltimezone.h \ -# $(top_srcdir)/src/libical/icalparser.h \ -# $(top_srcdir)/src/libical/icalmemory.h \ -# $(top_srcdir)/src/libical/icalerror.h \ -# $(top_srcdir)/src/libical/icalrestriction.h \ -# $(top_srcdir)/src/libical/sspm.h \ -# $(top_srcdir)/src/libical/icalmime.h \ -# $(top_srcdir)/src/libical/icallangbind.h -# -## exporting the configure stuff is probably no good idea. -## others use standard defines not in our namespace too. -## $(top_builddir)/config.h -# -#BUILT_COMBINEDHEADERS = \ -# icalderivedparameter.h \ -# icalderivedproperty.h \ -# icalderivedvalue.h -# -#BUILT_SOURCES = \ -# $(BUILT_COMBINEDHEADERS)\ -# icalderivedparameter.c \ -# icalderivedproperty.c \ -# icalrestriction.c \ -# icalderivedvalue.c -# -#ical.h: $(COMBINEDHEADERS) -# echo '#ifndef LIBICAL_ICAL_H' > ical.h -# echo '#define LIBICAL_ICAL_H' >> ical.h -# echo '#ifdef __cplusplus' >> ical.h -# echo 'extern "C" {' >> ical.h -# echo '#endif' >> ical.h -# echo '/*' >> ical.h -# echo ' $$''Id''$$' >> ical.h -# echo '*/' >> ical.h -# cat $(COMBINEDHEADERS) \ -# | egrep -v "#include.*\"ical" \ -# | egrep -v "#include.*\"config" \ -# | egrep -v "#include.*\"pvl\.h\"" \ -# | egrep -v '\$$(Id|Locker): .+\$$'>> ical.h -# echo '#ifdef __cplusplus' >> ical.h -# echo '}' >> ical.h -# echo '#endif' >> ical.h -# echo '#endif' >> ical.h -# -# -## parameters -# -#PARAMETERDEPS = \ -# $(ICALSCRIPTS)/mkderivedparameters.pl \ -# $(DESIGNDATA)/parameters.csv \ -# icalderivedparameter.c.in \ -# icalderivedparameter.h.in -# -#icalderivedparameter.h: $(PARAMETERDEPS) -# $(PERL) -I $(ICALSCRIPTS) $(ICALSCRIPTS)/mkderivedparameters.pl -i $(srcdir)/icalderivedparameter.h.in -h $(DESIGNDATA)/parameters.csv > icalderivedparameter.h -# -#icalderivedparameter.c: $(PARAMETERDEPS) $(BUILT_COMBINEDHEADERS) -# $(PERL) -I $(ICALSCRIPTS) $(ICALSCRIPTS)/mkderivedparameters.pl -i $(srcdir)/icalderivedparameter.c.in -c $(DESIGNDATA)/parameters.csv > icalderivedparameter.c -# -## properties -# -#PROPERTYDEPS = \ -# $(ICALSCRIPTS)/mkderivedproperties.pl \ -# $(DESIGNDATA)/properties.csv \ -# $(DESIGNDATA)/value-types.csv \ -# icalderivedproperty.c.in \ -# icalderivedproperty.h.in -# -# -#icalderivedproperty.h: $(PROPERTYDEPS) -# $(PERL) -I$(ICALSCRIPTS) $(ICALSCRIPTS)/mkderivedproperties.pl \ -# -i $(srcdir)/icalderivedproperty.h.in -h $(DESIGNDATA)/properties.csv\ -# ${DESIGNDATA}/value-types.csv > icalderivedproperty.h -# -#icalderivedproperty.c: $(PROPERTYDEPS) $(BUILT_COMBINEDHEADERS) -# $(PERL) -I$(ICALSCRIPTS) $(ICALSCRIPTS)/mkderivedproperties.pl \ -# -i $(srcdir)/icalderivedproperty.c.in -c $(DESIGNDATA)/properties.csv \ -# ${DESIGNDATA}/value-types.csv > icalderivedproperty.c -# -## restrictions -# -#RESTRICTIONDEPS = \ -# $(ICALSCRIPTS)/mkrestrictiontable.pl \ -# $(DESIGNDATA)/restrictions.csv \ -# icalrestriction.c.in -# -#icalrestriction.c: $(RESTRICTIONDEPS) -# $(PERL) $(ICALSCRIPTS)/mkrestrictiontable.pl -i $(srcdir)/icalrestriction.c.in \ -# $(DESIGNDATA)/restrictions.csv > icalrestriction.c -# -## values -# -#VALUEDEPS = \ -# $(ICALSCRIPTS)/mkderivedvalues.pl \ -# $(DESIGNDATA)/value-types.csv \ -# icalderivedvalue.c.in \ -# icalderivedvalue.h.in -# -#icalderivedvalue.h: $(VALUEDEPS) -# $(PERL) -I$(ICALSCRIPTS) $(ICALSCRIPTS)/mkderivedvalues.pl \ -# -i $(srcdir)/icalderivedvalue.h.in -h $(DESIGNDATA)/value-types.csv > icalderivedvalue.h -# -#icalderivedvalue.c: $(VALUEDEPS) $(BUILT_COMBINEDHEADERS) -# $(PERL) -I$(ICALSCRIPTS) $(ICALSCRIPTS)/mkderivedvalues.pl \ -# -i $(srcdir)/icalderivedvalue.c.in -c $(DESIGNDATA)/value-types.csv > icalderivedvalue.c -# -## c++ needs ical.h auto-generated. -#icalparameter_cxx.lo: ical.h -#icalproperty_cxx.lo: ical.h -#icalvalue_cxx.lo: ical.h -#vcomponent.lo: ical.h -# -# -## housekeeping -#CONFIG_CLEAN_FILES = y.output -# -#CLEANFILES = $(BUILT_SOURCES) $(BUILT_COMBINEDHEADERS) -# -#dist-hook: -# cd $(distdir); rm -f $(BUILT_SOURCES) -# cd $(distdir); rm -f ical.h icalversion.h -# -#EXTRA_DIST = \ -# icalderivedparameter.c.in \ -# icalderivedparameter.h.in \ -# icalderivedproperty.c.in \ -# icalderivedproperty.h.in \ -# icalrestriction.c.in \ -# icalderivedvalue.c.in \ -# icalderivedvalue.h.in \ -# icalversion.h.in -# -#$(srcdir)/icalcomponent.c: icalderivedvalue.h icalderivedproperty.h icalderivedparameter.h -#icalderivedparameter.c: icalderivedvalue.h icalderivedproperty.h icalderivedparameter.h -#icalderivedproperty.c: icalderivedvalue.h icalderivedproperty.h icalderivedparameter.h -#icalderivedvalue.c: icalderivedvalue.h icalderivedproperty.h icalderivedparameter.h -#$(srcdir)/icalduration.c: icalderivedvalue.h icalderivedproperty.h icalderivedparameter.h -#$(srcdir)/icallangbind.c: icalderivedvalue.h icalderivedproperty.h icalderivedparameter.h -#$(srcdir)/icalmime.c: icalderivedvalue.h icalderivedproperty.h icalderivedparameter.h -#$(srcdir)/icalparameter.c: icalderivedvalue.h icalderivedproperty.h icalderivedparameter.h -#$(srcdir)/icalparser.c: icalderivedvalue.h icalderivedproperty.h icalderivedparameter.h -#$(srcdir)/icalproperty.c: icalderivedvalue.h icalderivedproperty.h icalderivedparameter.h -#icalrestriction.c: icalderivedvalue.h icalderivedproperty.h icalderivedparameter.h -#$(srcdir)/icaltime.c: icalderivedvalue.h icalderivedproperty.h icalderivedparameter.h -#$(srcdir)/icalvalue.c: icalderivedvalue.h icalderivedproperty.h icalderivedparameter.h + DESTINATION + ${INCLUDE_INSTALL_DIR}/libical +) diff --git a/src/libical/Makefile.am b/src/libical/Makefile.am index 8846a46..8696986 100644 --- a/src/libical/Makefile.am +++ b/src/libical/Makefile.am @@ -51,7 +51,11 @@ INCLUDES = \ -I$(top_builddir)/src/libical \ -I$(srcdir) -libical_la_LDFLAGS = -version-info 43:0:43 +libical_la_LDFLAGS = -version-info 48:0:48 + +if OS_WIN32 +libical_la_LDFLAGS += -no-undefined +endif libical_la_LIBADD = $(PTHREAD_LIBS) @@ -101,7 +105,7 @@ libical_la_SOURCES = \ pvl.h \ sspm.c \ sspm.h \ - vsnprintf.c \ + libicals_w32_vsnprintf_replacement.c \ icallangbind.h \ icallangbind.c \ caldate.c \ @@ -175,7 +179,7 @@ COMBINEDHEADERS = \ $(top_srcdir)/src/libical/icaltimezone.h \ $(top_srcdir)/src/libical/icalparser.h \ $(top_srcdir)/src/libical/icalmemory.h \ - $(top_srcdir)/src/libical/icalerror.h \ + icalerror.h \ $(top_srcdir)/src/libical/icalrestriction.h \ $(top_srcdir)/src/libical/sspm.h \ $(top_srcdir)/src/libical/icalmime.h \ diff --git a/src/libical/Makefile.in b/src/libical/Makefile.in index 71ddbea..0f85682 100644 --- a/src/libical/Makefile.in +++ b/src/libical/Makefile.in @@ -1,8 +1,8 @@ -# Makefile.in generated by automake 1.9.5 from Makefile.am. +# Makefile.in generated by automake 1.12.2 from Makefile.am. # @configure_input@ -# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, -# 2003, 2004, 2005 Free Software Foundation, Inc. +# Copyright (C) 1994-2012 Free Software Foundation, Inc. + # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. @@ -39,17 +39,29 @@ #====================================================================== -SOURCES = $(libical_static_la_SOURCES) $(libical_la_SOURCES) $(libical_cxx_la_SOURCES) - -srcdir = @srcdir@ -top_srcdir = @top_srcdir@ VPATH = @srcdir@ +am__make_dryrun = \ + { \ + am__dry=no; \ + case $$MAKEFLAGS in \ + *\\[\ \ ]*) \ + echo 'am--echo: ; @echo "AM" OK' | $(MAKE) -f - 2>/dev/null \ + | grep '^AM OK$$' >/dev/null || am__dry=yes;; \ + *) \ + for am__flg in $$MAKEFLAGS; do \ + case $$am__flg in \ + *=*|--*) ;; \ + *n*) am__dry=yes; break;; \ + esac; \ + done;; \ + esac; \ + test $$am__dry = yes; \ + } pkgdatadir = $(datadir)/@PACKAGE@ -pkglibdir = $(libdir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ -top_builddir = ../.. +pkglibdir = $(libdir)/@PACKAGE@ +pkglibexecdir = $(libexecdir)/@PACKAGE@ am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd -INSTALL = @INSTALL@ install_sh_DATA = $(install_sh) -c -m 644 install_sh_PROGRAM = $(install_sh) -c install_sh_SCRIPT = $(install_sh) -c @@ -64,25 +76,48 @@ POST_UNINSTALL = : build_triplet = @build@ host_triplet = @host@ target_triplet = @target@ +@OS_WIN32_TRUE@am__append_1 = -no-undefined subdir = src/libical DIST_COMMON = $(am__libical_include_HEADERS_DIST) \ $(srcdir)/Makefile.am $(srcdir)/Makefile.in \ - $(srcdir)/icalversion.h.in + $(srcdir)/icalerror.h.in $(srcdir)/icalversion.h.in \ + $(top_srcdir)/depcomp $(top_srcdir)/mkinstalldirs ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/configure.in am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs CONFIG_HEADER = $(top_builddir)/config.h +CONFIG_CLEAN_VPATH_FILES = am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; am__vpath_adj = case $$p in \ $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \ *) f=$$p;; \ esac; -am__strip_dir = `echo $$p | sed -e 's|^.*/||'`; +am__strip_dir = f=`echo $$p | sed -e 's|^.*/||'`; +am__install_max = 40 +am__nobase_strip_setup = \ + srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/\\\\&/g'` +am__nobase_strip = \ + for p in $$list; do echo "$$p"; done | sed -e "s|$$srcdirstrip/||" +am__nobase_list = $(am__nobase_strip_setup); \ + for p in $$list; do echo "$$p $$p"; done | \ + sed "s| $$srcdirstrip/| |;"' / .*\//!s/ .*/ ./; s,\( .*\)/[^/]*$$,\1,' | \ + $(AWK) 'BEGIN { files["."] = "" } { files[$$2] = files[$$2] " " $$1; \ + if (++n[$$2] == $(am__install_max)) \ + { print $$2, files[$$2]; n[$$2] = 0; files[$$2] = "" } } \ + END { for (dir in files) print dir, files[dir] }' +am__base_list = \ + sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \ + sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g' +am__uninstall_files_from_dir = { \ + test -z "$$files" \ + || { test ! -d "$$dir" && test ! -f "$$dir" && test ! -r "$$dir"; } \ + || { echo " ( cd '$$dir' && rm -f" $$files ")"; \ + $(am__cd) "$$dir" && rm -f $$files; }; \ + } am__installdirs = "$(DESTDIR)$(libdir)" \ "$(DESTDIR)$(libical_includedir)" -libLTLIBRARIES_INSTALL = $(INSTALL) LTLIBRARIES = $(lib_LTLIBRARIES) $(noinst_LTLIBRARIES) libical_static_la_LIBADD = am__objects_1 = @@ -93,9 +128,13 @@ am__objects_3 = $(am__objects_2) icalarray.lo icalattach.lo \ icalmime.lo icalparameter.lo icalparser.lo icalproperty.lo \ icalrecur.lo icaltime.lo icaltz-util.lo icaltimezone.lo \ icalduration.lo icalperiod.lo icaltypes.lo icalvalue.lo pvl.lo \ - sspm.lo vsnprintf.lo icallangbind.lo caldate.lo + sspm.lo libicals_w32_vsnprintf_replacement.lo icallangbind.lo \ + caldate.lo am_libical_static_la_OBJECTS = $(am__objects_3) libical_static_la_OBJECTS = $(am_libical_static_la_OBJECTS) +libical_static_la_LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) \ + $(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \ + $(libical_static_la_LDFLAGS) $(LDFLAGS) -o $@ am__DEPENDENCIES_1 = libical_la_DEPENDENCIES = $(am__DEPENDENCIES_1) am_libical_la_OBJECTS = $(am__objects_2) icalarray.lo icalattach.lo \ @@ -103,8 +142,12 @@ am_libical_la_OBJECTS = $(am__objects_2) icalarray.lo icalattach.lo \ icalmime.lo icalparameter.lo icalparser.lo icalproperty.lo \ icalrecur.lo icaltime.lo icaltz-util.lo icaltimezone.lo \ icalduration.lo icalperiod.lo icaltypes.lo icalvalue.lo pvl.lo \ - sspm.lo vsnprintf.lo icallangbind.lo caldate.lo + sspm.lo libicals_w32_vsnprintf_replacement.lo icallangbind.lo \ + caldate.lo libical_la_OBJECTS = $(am_libical_la_OBJECTS) +libical_la_LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) \ + $(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \ + $(libical_la_LDFLAGS) $(LDFLAGS) -o $@ libical_cxx_la_LIBADD = am__libical_cxx_la_SOURCES_DIST = icalderivedparameter.h \ icalderivedproperty.h icalderivedvalue.h \ @@ -119,39 +162,47 @@ am__libical_cxx_la_SOURCES_DIST = icalderivedparameter.h \ icaltz-util.h icaltimezone.c icaltimezone.h icalduration.h \ icalduration.c icalperiod.h icalperiod.c icaltypes.c \ icaltypes.h icalvalue.c icalvalue.h icalvalueimpl.h pvl.c \ - pvl.h sspm.c sspm.h vsnprintf.c icallangbind.h icallangbind.c \ - caldate.c astime.h vcomponent.h vcomponent.cpp \ - icalproperty_cxx.h icalproperty_cxx.cpp icalparameter_cxx.h \ - icalparameter_cxx.cpp icalvalue_cxx.h icalvalue_cxx.cpp \ - icptrholder.h + pvl.h sspm.c sspm.h libicals_w32_vsnprintf_replacement.c \ + icallangbind.h icallangbind.c caldate.c astime.h vcomponent.h \ + vcomponent.cpp icalproperty_cxx.h icalproperty_cxx.cpp \ + icalparameter_cxx.h icalparameter_cxx.cpp icalvalue_cxx.h \ + icalvalue_cxx.cpp icptrholder.h @WITH_CXX_BINDINGS_TRUE@am_libical_cxx_la_OBJECTS = $(am__objects_3) \ @WITH_CXX_BINDINGS_TRUE@ vcomponent.lo icalproperty_cxx.lo \ @WITH_CXX_BINDINGS_TRUE@ icalparameter_cxx.lo icalvalue_cxx.lo libical_cxx_la_OBJECTS = $(am_libical_cxx_la_OBJECTS) @WITH_CXX_BINDINGS_TRUE@am_libical_cxx_la_rpath = -rpath $(libdir) -DEFAULT_INCLUDES = -I. -I$(srcdir) -I$(top_builddir) +DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir) depcomp = $(SHELL) $(top_srcdir)/depcomp am__depfiles_maybe = depfiles +am__mv = mv -f COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -LTCOMPILE = $(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) \ - $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \ - $(AM_CFLAGS) $(CFLAGS) +LTCOMPILE = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ + --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ + $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) CCLD = $(CC) -LINK = $(LIBTOOL) --tag=CC --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \ - $(AM_LDFLAGS) $(LDFLAGS) -o $@ +LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ + --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) \ + $(LDFLAGS) -o $@ CXXCOMPILE = $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -LTCXXCOMPILE = $(LIBTOOL) --tag=CXX --mode=compile $(CXX) $(DEFS) \ - $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \ - $(AM_CXXFLAGS) $(CXXFLAGS) +LTCXXCOMPILE = $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ + --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ + $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) CXXLD = $(CXX) -CXXLINK = $(LIBTOOL) --tag=CXX --mode=link $(CXXLD) $(AM_CXXFLAGS) \ - $(CXXFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@ +CXXLINK = $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ + --mode=link $(CXXLD) $(AM_CXXFLAGS) $(CXXFLAGS) $(AM_LDFLAGS) \ + $(LDFLAGS) -o $@ SOURCES = $(libical_static_la_SOURCES) $(libical_la_SOURCES) \ $(libical_cxx_la_SOURCES) DIST_SOURCES = $(libical_static_la_SOURCES) $(libical_la_SOURCES) \ $(am__libical_cxx_la_SOURCES_DIST) +am__can_run_installinfo = \ + case $$AM_UPDATE_INFO_DIR in \ + n|no|NO) false;; \ + *) (install-info --version) >/dev/null 2>&1;; \ + esac am__libical_include_HEADERS_DIST = ical.h icalarray.h icalattach.h \ icalcomponent.h icalderivedparameter.h icalderivedproperty.h \ icalderivedvalue.h icalduration.h icalenums.h icalerror.h \ @@ -161,14 +212,11 @@ am__libical_include_HEADERS_DIST = ical.h icalarray.h icalattach.h \ icaltypes.h icalvalue.h pvl.h sspm.h vcomponent.h \ icalparameter_cxx.h icalproperty_cxx.h icalvalue_cxx.h \ icptrholder.h -libical_includeHEADERS_INSTALL = $(INSTALL_HEADER) HEADERS = $(libical_include_HEADERS) ETAGS = etags CTAGS = ctags DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ -AMDEP_FALSE = @AMDEP_FALSE@ -AMDEP_TRUE = @AMDEP_TRUE@ AMTAR = @AMTAR@ AR = @AR@ AUTOCONF = @AUTOCONF@ @@ -192,18 +240,17 @@ CXXFLAGS = @CXXFLAGS@ CYGPATH_W = @CYGPATH_W@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ -DEV_FALSE = @DEV_FALSE@ -DEV_TRUE = @DEV_TRUE@ -ECHO = @ECHO@ +DLLTOOL = @DLLTOOL@ +DSYMUTIL = @DSYMUTIL@ +DUMPBIN = @DUMPBIN@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ -F77 = @F77@ -FFLAGS = @FFLAGS@ -HAVE_PTHREAD_FALSE = @HAVE_PTHREAD_FALSE@ -HAVE_PTHREAD_TRUE = @HAVE_PTHREAD_TRUE@ +FGREP = @FGREP@ +GREP = @GREP@ +INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ @@ -213,6 +260,7 @@ JAVA = @JAVA@ JAVAC = @JAVAC@ JAVAH = @JAVAH@ JAVA_PLATFORM = @JAVA_PLATFORM@ +LD = @LD@ LDFLAGS = @LDFLAGS@ LEX = @LEX@ LEXLIB = @LEXLIB@ @@ -220,53 +268,52 @@ LEX_OUTPUT_ROOT = @LEX_OUTPUT_ROOT@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LIBTOOL = @LIBTOOL@ +LIPO = @LIPO@ LN_S = @LN_S@ LTLIBOBJS = @LTLIBOBJS@ MAINT = @MAINT@ -MAINTAINER_MODE_FALSE = @MAINTAINER_MODE_FALSE@ -MAINTAINER_MODE_TRUE = @MAINTAINER_MODE_TRUE@ MAKEINFO = @MAKEINFO@ +MANIFEST_TOOL = @MANIFEST_TOOL@ +MKDIR_P = @MKDIR_P@ +NM = @NM@ +NMEDIT = @NMEDIT@ +OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ -OS_WIN32_FALSE = @OS_WIN32_FALSE@ -OS_WIN32_TRUE = @OS_WIN32_TRUE@ +OTOOL = @OTOOL@ +OTOOL64 = @OTOOL64@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ +PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ PERL = @PERL@ PTHREAD_LIBS = @PTHREAD_LIBS@ +PYTHON = @PYTHON@ +PYTHON_EXEC_PREFIX = @PYTHON_EXEC_PREFIX@ +PYTHON_PLATFORM = @PYTHON_PLATFORM@ +PYTHON_PREFIX = @PYTHON_PREFIX@ +PYTHON_VERSION = @PYTHON_VERSION@ PY_CFLAGS = @PY_CFLAGS@ -PY_EXTRA_LIBS = @PY_EXTRA_LIBS@ -PY_LIBS = @PY_LIBS@ -PY_LIB_LOC = @PY_LIB_LOC@ RANLIB = @RANLIB@ +SED = @SED@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ STRIP = @STRIP@ VERSION = @VERSION@ -WITH_BDB4_FALSE = @WITH_BDB4_FALSE@ -WITH_BDB4_TRUE = @WITH_BDB4_TRUE@ -WITH_CXX_BINDINGS_FALSE = @WITH_CXX_BINDINGS_FALSE@ -WITH_CXX_BINDINGS_TRUE = @WITH_CXX_BINDINGS_TRUE@ -WITH_JAVA_FALSE = @WITH_JAVA_FALSE@ -WITH_JAVA_TRUE = @WITH_JAVA_TRUE@ -WITH_PYTHON_FALSE = @WITH_PYTHON_FALSE@ -WITH_PYTHON_TRUE = @WITH_PYTHON_TRUE@ YACC = @YACC@ +YFLAGS = @YFLAGS@ ZONE_INFO = @ZONE_INFO@ +abs_builddir = @abs_builddir@ +abs_srcdir = @abs_srcdir@ +abs_top_builddir = @abs_top_builddir@ +abs_top_srcdir = @abs_top_srcdir@ ac_ct_AR = @ac_ct_AR@ ac_ct_CC = @ac_ct_CC@ ac_ct_CXX = @ac_ct_CXX@ -ac_ct_F77 = @ac_ct_F77@ -ac_ct_RANLIB = @ac_ct_RANLIB@ -ac_ct_STRIP = @ac_ct_STRIP@ -am__fastdepCC_FALSE = @am__fastdepCC_FALSE@ -am__fastdepCC_TRUE = @am__fastdepCC_TRUE@ -am__fastdepCXX_FALSE = @am__fastdepCXX_FALSE@ -am__fastdepCXX_TRUE = @am__fastdepCXX_TRUE@ +ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ am__include = @am__include@ am__leading_dot = @am__leading_dot@ am__quote = @am__quote@ @@ -278,33 +325,49 @@ build_alias = @build_alias@ build_cpu = @build_cpu@ build_os = @build_os@ build_vendor = @build_vendor@ +builddir = @builddir@ datadir = @datadir@ +datarootdir = @datarootdir@ +docdir = @docdir@ +dvidir = @dvidir@ exec_prefix = @exec_prefix@ host = @host@ host_alias = @host_alias@ host_cpu = @host_cpu@ host_os = @host_os@ host_vendor = @host_vendor@ +htmldir = @htmldir@ includedir = @includedir@ infodir = @infodir@ install_sh = @install_sh@ libdir = @libdir@ libexecdir = @libexecdir@ +localedir = @localedir@ localstatedir = @localstatedir@ mandir = @mandir@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ +pdfdir = @pdfdir@ +pkgpyexecdir = @pkgpyexecdir@ +pkgpythondir = @pkgpythondir@ prefix = @prefix@ program_transform_name = @program_transform_name@ -python_val = @python_val@ +psdir = @psdir@ +pyexecdir = @pyexecdir@ +pythondir = @pythondir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ +srcdir = @srcdir@ +swig_val = @swig_val@ sysconfdir = @sysconfdir@ target = @target@ target_alias = @target_alias@ target_cpu = @target_cpu@ target_os = @target_os@ target_vendor = @target_vendor@ +top_build_prefix = @top_build_prefix@ +top_builddir = @top_builddir@ +top_srcdir = @top_srcdir@ DESIGNDATA = $(top_srcdir)/design-data ICALSCRIPTS = $(top_srcdir)/scripts @WITH_CXX_BINDINGS_FALSE@cxx_lib = @@ -326,7 +389,7 @@ INCLUDES = \ -I$(top_builddir)/src/libical \ -I$(srcdir) -libical_la_LDFLAGS = -version-info 43:0:43 +libical_la_LDFLAGS = -version-info 48:0:48 $(am__append_1) libical_la_LIBADD = $(PTHREAD_LIBS) libical_la_SOURCES = \ $(BUILT_SOURCES) \ @@ -374,7 +437,7 @@ libical_la_SOURCES = \ pvl.h \ sspm.c \ sspm.h \ - vsnprintf.c \ + libicals_w32_vsnprintf_replacement.c \ icallangbind.h \ icallangbind.c \ caldate.c \ @@ -446,7 +509,7 @@ COMBINEDHEADERS = \ $(top_srcdir)/src/libical/icaltimezone.h \ $(top_srcdir)/src/libical/icalparser.h \ $(top_srcdir)/src/libical/icalmemory.h \ - $(top_srcdir)/src/libical/icalerror.h \ + icalerror.h \ $(top_srcdir)/src/libical/icalrestriction.h \ $(top_srcdir)/src/libical/sspm.h \ $(top_srcdir)/src/libical/icalmime.h \ @@ -523,14 +586,14 @@ $(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__confi @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh \ - && exit 0; \ + ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ + && { if test -f $@; then exit 0; else break; fi; }; \ exit 1;; \ esac; \ done; \ - echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu src/libical/Makefile'; \ - cd $(top_srcdir) && \ - $(AUTOMAKE) --gnu src/libical/Makefile + echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu src/libical/Makefile'; \ + $(am__cd) $(top_srcdir) && \ + $(AUTOMAKE) --gnu src/libical/Makefile .PRECIOUS: Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ @@ -548,50 +611,62 @@ $(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh +$(am__aclocal_m4_deps): icalversion.h: $(top_builddir)/config.status $(srcdir)/icalversion.h.in cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ +icalerror.h: $(top_builddir)/config.status $(srcdir)/icalerror.h.in + cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ install-libLTLIBRARIES: $(lib_LTLIBRARIES) @$(NORMAL_INSTALL) - test -z "$(libdir)" || $(mkdir_p) "$(DESTDIR)$(libdir)" - @list='$(lib_LTLIBRARIES)'; for p in $$list; do \ + @list='$(lib_LTLIBRARIES)'; test -n "$(libdir)" || list=; \ + list2=; for p in $$list; do \ if test -f $$p; then \ - f=$(am__strip_dir) \ - echo " $(LIBTOOL) --mode=install $(libLTLIBRARIES_INSTALL) $(INSTALL_STRIP_FLAG) '$$p' '$(DESTDIR)$(libdir)/$$f'"; \ - $(LIBTOOL) --mode=install $(libLTLIBRARIES_INSTALL) $(INSTALL_STRIP_FLAG) "$$p" "$(DESTDIR)$(libdir)/$$f"; \ + list2="$$list2 $$p"; \ else :; fi; \ - done + done; \ + test -z "$$list2" || { \ + echo " $(MKDIR_P) '$(DESTDIR)$(libdir)'"; \ + $(MKDIR_P) "$(DESTDIR)$(libdir)" || exit 1; \ + echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL) $(INSTALL_STRIP_FLAG) $$list2 '$(DESTDIR)$(libdir)'"; \ + $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL) $(INSTALL_STRIP_FLAG) $$list2 "$(DESTDIR)$(libdir)"; \ + } uninstall-libLTLIBRARIES: @$(NORMAL_UNINSTALL) - @set -x; list='$(lib_LTLIBRARIES)'; for p in $$list; do \ - p=$(am__strip_dir) \ - echo " $(LIBTOOL) --mode=uninstall rm -f '$(DESTDIR)$(libdir)/$$p'"; \ - $(LIBTOOL) --mode=uninstall rm -f "$(DESTDIR)$(libdir)/$$p"; \ + @list='$(lib_LTLIBRARIES)'; test -n "$(libdir)" || list=; \ + for p in $$list; do \ + $(am__strip_dir) \ + echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f '$(DESTDIR)$(libdir)/$$f'"; \ + $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f "$(DESTDIR)$(libdir)/$$f"; \ done clean-libLTLIBRARIES: -test -z "$(lib_LTLIBRARIES)" || rm -f $(lib_LTLIBRARIES) - @list='$(lib_LTLIBRARIES)'; for p in $$list; do \ - dir="`echo $$p | sed -e 's|/[^/]*$$||'`"; \ - test "$$dir" != "$$p" || dir=.; \ - echo "rm -f \"$${dir}/so_locations\""; \ - rm -f "$${dir}/so_locations"; \ - done + @list='$(lib_LTLIBRARIES)'; \ + locs=`for p in $$list; do echo $$p; done | \ + sed 's|^[^/]*$$|.|; s|/[^/]*$$||; s|$$|/so_locations|' | \ + sort -u`; \ + test -z "$$locs" || { \ + echo rm -f $${locs}; \ + rm -f $${locs}; \ + } clean-noinstLTLIBRARIES: -test -z "$(noinst_LTLIBRARIES)" || rm -f $(noinst_LTLIBRARIES) - @list='$(noinst_LTLIBRARIES)'; for p in $$list; do \ - dir="`echo $$p | sed -e 's|/[^/]*$$||'`"; \ - test "$$dir" != "$$p" || dir=.; \ - echo "rm -f \"$${dir}/so_locations\""; \ - rm -f "$${dir}/so_locations"; \ - done -libical-static.la: $(libical_static_la_OBJECTS) $(libical_static_la_DEPENDENCIES) - $(LINK) $(libical_static_la_LDFLAGS) $(libical_static_la_OBJECTS) $(libical_static_la_LIBADD) $(LIBS) -libical.la: $(libical_la_OBJECTS) $(libical_la_DEPENDENCIES) - $(LINK) -rpath $(libdir) $(libical_la_LDFLAGS) $(libical_la_OBJECTS) $(libical_la_LIBADD) $(LIBS) -libical_cxx.la: $(libical_cxx_la_OBJECTS) $(libical_cxx_la_DEPENDENCIES) - $(CXXLINK) $(am_libical_cxx_la_rpath) $(libical_cxx_la_LDFLAGS) $(libical_cxx_la_OBJECTS) $(libical_cxx_la_LIBADD) $(LIBS) + @list='$(noinst_LTLIBRARIES)'; \ + locs=`for p in $$list; do echo $$p; done | \ + sed 's|^[^/]*$$|.|; s|/[^/]*$$||; s|$$|/so_locations|' | \ + sort -u`; \ + test -z "$$locs" || { \ + echo rm -f $${locs}; \ + rm -f $${locs}; \ + } +libical-static.la: $(libical_static_la_OBJECTS) $(libical_static_la_DEPENDENCIES) $(EXTRA_libical_static_la_DEPENDENCIES) + $(libical_static_la_LINK) $(libical_static_la_OBJECTS) $(libical_static_la_LIBADD) $(LIBS) +libical.la: $(libical_la_OBJECTS) $(libical_la_DEPENDENCIES) $(EXTRA_libical_la_DEPENDENCIES) + $(libical_la_LINK) -rpath $(libdir) $(libical_la_OBJECTS) $(libical_la_LIBADD) $(LIBS) +libical_cxx.la: $(libical_cxx_la_OBJECTS) $(libical_cxx_la_DEPENDENCIES) $(EXTRA_libical_cxx_la_DEPENDENCIES) + $(CXXLINK) $(am_libical_cxx_la_rpath) $(libical_cxx_la_OBJECTS) $(libical_cxx_la_LIBADD) $(LIBS) mostlyclean-compile: -rm -f *.$(OBJEXT) @@ -626,49 +701,49 @@ distclean-compile: @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/icaltz-util.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/icalvalue.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/icalvalue_cxx.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libicals_w32_vsnprintf_replacement.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/pvl.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/sspm.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/vcomponent.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/vsnprintf.Plo@am__quote@ .c.o: -@am__fastdepCC_TRUE@ if $(COMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" -c -o $@ $<; \ -@am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Po"; else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; fi +@am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(COMPILE) -c $< .c.obj: -@am__fastdepCC_TRUE@ if $(COMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" -c -o $@ `$(CYGPATH_W) '$<'`; \ -@am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Po"; else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; fi +@am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(COMPILE) -c `$(CYGPATH_W) '$<'` .c.lo: -@am__fastdepCC_TRUE@ if $(LTCOMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" -c -o $@ $<; \ -@am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Plo"; else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; fi +@am__fastdepCC_TRUE@ $(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(LTCOMPILE) -c -o $@ $< .cpp.o: -@am__fastdepCXX_TRUE@ if $(CXXCOMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" -c -o $@ $<; \ -@am__fastdepCXX_TRUE@ then mv -f "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Po"; else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; fi +@am__fastdepCXX_TRUE@ $(CXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< +@am__fastdepCXX_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(CXXCOMPILE) -c -o $@ $< .cpp.obj: -@am__fastdepCXX_TRUE@ if $(CXXCOMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" -c -o $@ `$(CYGPATH_W) '$<'`; \ -@am__fastdepCXX_TRUE@ then mv -f "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Po"; else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; fi +@am__fastdepCXX_TRUE@ $(CXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` +@am__fastdepCXX_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(CXXCOMPILE) -c -o $@ `$(CYGPATH_W) '$<'` .cpp.lo: -@am__fastdepCXX_TRUE@ if $(LTCXXCOMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" -c -o $@ $<; \ -@am__fastdepCXX_TRUE@ then mv -f "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Plo"; else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; fi +@am__fastdepCXX_TRUE@ $(LTCXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< +@am__fastdepCXX_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo @AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(LTCXXCOMPILE) -c -o $@ $< @@ -678,100 +753,121 @@ mostlyclean-libtool: clean-libtool: -rm -rf .libs _libs - -distclean-libtool: - -rm -f libtool -uninstall-info-am: install-libical_includeHEADERS: $(libical_include_HEADERS) @$(NORMAL_INSTALL) - test -z "$(libical_includedir)" || $(mkdir_p) "$(DESTDIR)$(libical_includedir)" - @list='$(libical_include_HEADERS)'; for p in $$list; do \ + @list='$(libical_include_HEADERS)'; test -n "$(libical_includedir)" || list=; \ + if test -n "$$list"; then \ + echo " $(MKDIR_P) '$(DESTDIR)$(libical_includedir)'"; \ + $(MKDIR_P) "$(DESTDIR)$(libical_includedir)" || exit 1; \ + fi; \ + for p in $$list; do \ if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ - f=$(am__strip_dir) \ - echo " $(libical_includeHEADERS_INSTALL) '$$d$$p' '$(DESTDIR)$(libical_includedir)/$$f'"; \ - $(libical_includeHEADERS_INSTALL) "$$d$$p" "$(DESTDIR)$(libical_includedir)/$$f"; \ + echo "$$d$$p"; \ + done | $(am__base_list) | \ + while read files; do \ + echo " $(INSTALL_HEADER) $$files '$(DESTDIR)$(libical_includedir)'"; \ + $(INSTALL_HEADER) $$files "$(DESTDIR)$(libical_includedir)" || exit $$?; \ done uninstall-libical_includeHEADERS: @$(NORMAL_UNINSTALL) - @list='$(libical_include_HEADERS)'; for p in $$list; do \ - f=$(am__strip_dir) \ - echo " rm -f '$(DESTDIR)$(libical_includedir)/$$f'"; \ - rm -f "$(DESTDIR)$(libical_includedir)/$$f"; \ - done + @list='$(libical_include_HEADERS)'; test -n "$(libical_includedir)" || list=; \ + files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \ + dir='$(DESTDIR)$(libical_includedir)'; $(am__uninstall_files_from_dir) ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ - $(AWK) ' { files[$$0] = 1; } \ - END { for (i in files) print i; }'`; \ + $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ + END { if (nonempty) { for (i in files) print i; }; }'`; \ mkid -fID $$unique tags: TAGS TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) - tags=; \ + set x; \ here=`pwd`; \ list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ - $(AWK) ' { files[$$0] = 1; } \ - END { for (i in files) print i; }'`; \ - if test -z "$(ETAGS_ARGS)$$tags$$unique"; then :; else \ + $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ + END { if (nonempty) { for (i in files) print i; }; }'`; \ + shift; \ + if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ test -n "$$unique" || unique=$$empty_fix; \ - $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ - $$tags $$unique; \ + if test $$# -gt 0; then \ + $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ + "$$@" $$unique; \ + else \ + $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ + $$unique; \ + fi; \ fi ctags: CTAGS CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) - tags=; \ - here=`pwd`; \ list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ - $(AWK) ' { files[$$0] = 1; } \ - END { for (i in files) print i; }'`; \ - test -z "$(CTAGS_ARGS)$$tags$$unique" \ + $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ + END { if (nonempty) { for (i in files) print i; }; }'`; \ + test -z "$(CTAGS_ARGS)$$unique" \ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ - $$tags $$unique + $$unique GTAGS: here=`$(am__cd) $(top_builddir) && pwd` \ - && cd $(top_srcdir) \ - && gtags -i $(GTAGS_ARGS) $$here + && $(am__cd) $(top_srcdir) \ + && gtags -i $(GTAGS_ARGS) "$$here" + +cscopelist: $(HEADERS) $(SOURCES) $(LISP) + list='$(SOURCES) $(HEADERS) $(LISP)'; \ + case "$(srcdir)" in \ + [\\/]* | ?:[\\/]*) sdir="$(srcdir)" ;; \ + *) sdir=$(subdir)/$(srcdir) ;; \ + esac; \ + for i in $$list; do \ + if test -f "$$i"; then \ + echo "$(subdir)/$$i"; \ + else \ + echo "$$sdir/$$i"; \ + fi; \ + done >> $(top_builddir)/cscope.files distclean-tags: -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags distdir: $(DISTFILES) - @srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; \ - topsrcdirstrip=`echo "$(top_srcdir)" | sed 's|.|.|g'`; \ - list='$(DISTFILES)'; for file in $$list; do \ - case $$file in \ - $(srcdir)/*) file=`echo "$$file" | sed "s|^$$srcdirstrip/||"`;; \ - $(top_srcdir)/*) file=`echo "$$file" | sed "s|^$$topsrcdirstrip/|$(top_builddir)/|"`;; \ - esac; \ + @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ + topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ + list='$(DISTFILES)'; \ + dist_files=`for file in $$list; do echo $$file; done | \ + sed -e "s|^$$srcdirstrip/||;t" \ + -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ + case $$dist_files in \ + */*) $(MKDIR_P) `echo "$$dist_files" | \ + sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ + sort -u` ;; \ + esac; \ + for file in $$dist_files; do \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ - dir=`echo "$$file" | sed -e 's,/[^/]*$$,,'`; \ - if test "$$dir" != "$$file" && test "$$dir" != "."; then \ - dir="/$$dir"; \ - $(mkdir_p) "$(distdir)$$dir"; \ - else \ - dir=''; \ - fi; \ if test -d $$d/$$file; then \ + dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ + if test -d "$(distdir)/$$file"; then \ + find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ + fi; \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ - cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \ + cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ + find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ - cp -pR $$d/$$file $(distdir)$$dir || exit 1; \ + cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ else \ - test -f $(distdir)/$$file \ - || cp -p $$d/$$file $(distdir)/$$file \ + test -f "$(distdir)/$$file" \ + || cp -p $$d/$$file "$(distdir)/$$file" \ || exit 1; \ fi; \ done @@ -784,7 +880,7 @@ check: $(BUILT_SOURCES) all-am: Makefile $(LTLIBRARIES) $(HEADERS) installdirs: for dir in "$(DESTDIR)$(libdir)" "$(DESTDIR)$(libical_includedir)"; do \ - test -z "$$dir" || $(mkdir_p) "$$dir"; \ + test -z "$$dir" || $(MKDIR_P) "$$dir"; \ done install: $(BUILT_SOURCES) $(MAKE) $(AM_MAKEFLAGS) install-am @@ -797,10 +893,15 @@ install-am: all-am installcheck: installcheck-am install-strip: - $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ - install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ - `test -z '$(STRIP)' || \ - echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install + if test -z '$(STRIP)'; then \ + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + install; \ + else \ + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \ + fi mostlyclean-generic: clean-generic: @@ -808,6 +909,7 @@ clean-generic: distclean-generic: -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) + -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) maintainer-clean-generic: @echo "This command is intended for maintainers to use" @@ -822,7 +924,7 @@ distclean: distclean-am -rm -rf ./$(DEPDIR) -rm -f Makefile distclean-am: clean-am distclean-compile distclean-generic \ - distclean-libtool distclean-tags + distclean-tags dvi: dvi-am @@ -830,18 +932,38 @@ dvi-am: html: html-am +html-am: + info: info-am info-am: install-data-am: install-libical_includeHEADERS +install-dvi: install-dvi-am + +install-dvi-am: + install-exec-am: install-libLTLIBRARIES +install-html: install-html-am + +install-html-am: + install-info: install-info-am +install-info-am: + install-man: +install-pdf: install-pdf-am + +install-pdf-am: + +install-ps: install-ps-am + +install-ps-am: + installcheck-am: maintainer-clean: maintainer-clean-am @@ -862,22 +984,26 @@ ps: ps-am ps-am: -uninstall-am: uninstall-info-am uninstall-libLTLIBRARIES \ +uninstall-am: uninstall-libLTLIBRARIES \ uninstall-libical_includeHEADERS +.MAKE: all check install install-am install-strip + .PHONY: CTAGS GTAGS all all-am check check-am clean clean-generic \ clean-libLTLIBRARIES clean-libtool clean-noinstLTLIBRARIES \ - ctags dist-hook distclean distclean-compile distclean-generic \ - distclean-libtool distclean-tags distdir dvi dvi-am html \ - html-am info info-am install install-am install-data \ - install-data-am install-exec install-exec-am install-info \ - install-info-am install-libLTLIBRARIES \ - install-libical_includeHEADERS install-man install-strip \ + cscopelist ctags dist-hook distclean distclean-compile \ + distclean-generic distclean-libtool distclean-tags distdir dvi \ + dvi-am html html-am info info-am install install-am \ + install-data install-data-am install-dvi install-dvi-am \ + install-exec install-exec-am install-html install-html-am \ + install-info install-info-am install-libLTLIBRARIES \ + install-libical_includeHEADERS install-man install-pdf \ + install-pdf-am install-ps install-ps-am install-strip \ installcheck installcheck-am installdirs maintainer-clean \ maintainer-clean-generic mostlyclean mostlyclean-compile \ mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \ - tags uninstall uninstall-am uninstall-info-am \ - uninstall-libLTLIBRARIES uninstall-libical_includeHEADERS + tags uninstall uninstall-am uninstall-libLTLIBRARIES \ + uninstall-libical_includeHEADERS ical.h: $(COMBINEDHEADERS) @@ -950,6 +1076,7 @@ $(srcdir)/icalproperty.c: icalderivedvalue.h icalderivedproperty.h icalderivedpa icalrestriction.c: icalderivedvalue.h icalderivedproperty.h icalderivedparameter.h $(srcdir)/icaltime.c: icalderivedvalue.h icalderivedproperty.h icalderivedparameter.h $(srcdir)/icalvalue.c: icalderivedvalue.h icalderivedproperty.h icalderivedparameter.h + # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. .NOEXPORT: diff --git a/src/libical/autogenex/ical.h b/src/libical/autogenex/ical.h index 572133d..1b6e6da 100644 --- a/src/libical/autogenex/ical.h +++ b/src/libical/autogenex/ical.h @@ -3272,7 +3272,7 @@ if(icalerror_get_error_state(x)==ICAL_ERROR_FATAL || \ void icalerror_set_errno(icalerrorenum x); #endif -#ifdef ICAL_ERRORS_ARE_FATAL +#if ICAL_ERRORS_ARE_FATAL == 1 #undef NDEBUG #endif @@ -3282,7 +3282,7 @@ void icalerror_set_errno(icalerrorenum x); #define icalerror_check_component_type(value,type); /* Assert with a message */ -#ifdef ICAL_ERRORS_ARE_FATAL +#if ICAL_ERRORS_ARE_FATAL == 1 #ifdef __GNUC__ #define icalerror_assert(test,message) if(!(test)){fprintf(stderr,"%s(), %s:%d: %s\n",__FUNCTION__,__FILE__,__LINE__,message);icalerror_stop_here(); abort();} diff --git a/src/libical/autogenex/icalderivedproperty.c b/src/libical/autogenex/icalderivedproperty.c index 59aa30a..03e38a8 100644 --- a/src/libical/autogenex/icalderivedproperty.c +++ b/src/libical/autogenex/icalderivedproperty.c @@ -252,7 +252,8 @@ enum icalproperty_action icalproperty_get_action(const icalproperty* prop){ } icalproperty* icalproperty_vanew_allowconflict(const char* v, ...){ va_list args; - struct icalproperty_impl *impl = icalproperty_new_impl(ICAL_ALLOWCONFLICT_PROPERTY); icalerror_check_arg_rz( (v!=0),"v"); + icalerror_check_arg_rz( (v!=0),"v"); + struct icalproperty_impl *impl = icalproperty_new_impl(ICAL_ALLOWCONFLICT_PROPERTY); icalproperty_set_allowconflict((icalproperty*)impl,v); va_start(args,v); @@ -263,7 +264,8 @@ icalproperty* icalproperty_vanew_allowconflict(const char* v, ...){ /* ALLOW-CONFLICT */ icalproperty* icalproperty_new_allowconflict(const char* v) { - struct icalproperty_impl *impl = icalproperty_new_impl(ICAL_ALLOWCONFLICT_PROPERTY); icalerror_check_arg_rz( (v!=0),"v"); + icalerror_check_arg_rz( (v!=0),"v"); + struct icalproperty_impl *impl = icalproperty_new_impl(ICAL_ALLOWCONFLICT_PROPERTY); icalproperty_set_allowconflict((icalproperty*)impl,v); return (icalproperty*)impl; @@ -281,7 +283,8 @@ const char* icalproperty_get_allowconflict(const icalproperty* prop){ } icalproperty* icalproperty_vanew_attach(icalattach * v, ...){ va_list args; - struct icalproperty_impl *impl = icalproperty_new_impl(ICAL_ATTACH_PROPERTY); icalerror_check_arg_rz( (v!=0),"v"); + icalerror_check_arg_rz( (v!=0),"v"); + struct icalproperty_impl *impl = icalproperty_new_impl(ICAL_ATTACH_PROPERTY); icalproperty_set_attach((icalproperty*)impl,v); va_start(args,v); @@ -292,7 +295,8 @@ icalproperty* icalproperty_vanew_attach(icalattach * v, ...){ /* ATTACH */ icalproperty* icalproperty_new_attach(icalattach * v) { - struct icalproperty_impl *impl = icalproperty_new_impl(ICAL_ATTACH_PROPERTY); icalerror_check_arg_rz( (v!=0),"v"); + icalerror_check_arg_rz( (v!=0),"v"); + struct icalproperty_impl *impl = icalproperty_new_impl(ICAL_ATTACH_PROPERTY); icalproperty_set_attach((icalproperty*)impl,v); return (icalproperty*)impl; @@ -310,7 +314,8 @@ icalattach * icalproperty_get_attach(const icalproperty* prop){ } icalproperty* icalproperty_vanew_attendee(const char* v, ...){ va_list args; - struct icalproperty_impl *impl = icalproperty_new_impl(ICAL_ATTENDEE_PROPERTY); icalerror_check_arg_rz( (v!=0),"v"); + icalerror_check_arg_rz( (v!=0),"v"); + struct icalproperty_impl *impl = icalproperty_new_impl(ICAL_ATTENDEE_PROPERTY); icalproperty_set_attendee((icalproperty*)impl,v); va_start(args,v); @@ -321,7 +326,8 @@ icalproperty* icalproperty_vanew_attendee(const char* v, ...){ /* ATTENDEE */ icalproperty* icalproperty_new_attendee(const char* v) { - struct icalproperty_impl *impl = icalproperty_new_impl(ICAL_ATTENDEE_PROPERTY); icalerror_check_arg_rz( (v!=0),"v"); + icalerror_check_arg_rz( (v!=0),"v"); + struct icalproperty_impl *impl = icalproperty_new_impl(ICAL_ATTENDEE_PROPERTY); icalproperty_set_attendee((icalproperty*)impl,v); return (icalproperty*)impl; @@ -339,7 +345,8 @@ const char* icalproperty_get_attendee(const icalproperty* prop){ } icalproperty* icalproperty_vanew_calid(const char* v, ...){ va_list args; - struct icalproperty_impl *impl = icalproperty_new_impl(ICAL_CALID_PROPERTY); icalerror_check_arg_rz( (v!=0),"v"); + icalerror_check_arg_rz( (v!=0),"v"); + struct icalproperty_impl *impl = icalproperty_new_impl(ICAL_CALID_PROPERTY); icalproperty_set_calid((icalproperty*)impl,v); va_start(args,v); @@ -350,7 +357,8 @@ icalproperty* icalproperty_vanew_calid(const char* v, ...){ /* CALID */ icalproperty* icalproperty_new_calid(const char* v) { - struct icalproperty_impl *impl = icalproperty_new_impl(ICAL_CALID_PROPERTY); icalerror_check_arg_rz( (v!=0),"v"); + icalerror_check_arg_rz( (v!=0),"v"); + struct icalproperty_impl *impl = icalproperty_new_impl(ICAL_CALID_PROPERTY); icalproperty_set_calid((icalproperty*)impl,v); return (icalproperty*)impl; @@ -368,7 +376,8 @@ const char* icalproperty_get_calid(const icalproperty* prop){ } icalproperty* icalproperty_vanew_calmaster(const char* v, ...){ va_list args; - struct icalproperty_impl *impl = icalproperty_new_impl(ICAL_CALMASTER_PROPERTY); icalerror_check_arg_rz( (v!=0),"v"); + icalerror_check_arg_rz( (v!=0),"v"); + struct icalproperty_impl *impl = icalproperty_new_impl(ICAL_CALMASTER_PROPERTY); icalproperty_set_calmaster((icalproperty*)impl,v); va_start(args,v); @@ -379,7 +388,8 @@ icalproperty* icalproperty_vanew_calmaster(const char* v, ...){ /* CALMASTER */ icalproperty* icalproperty_new_calmaster(const char* v) { - struct icalproperty_impl *impl = icalproperty_new_impl(ICAL_CALMASTER_PROPERTY); icalerror_check_arg_rz( (v!=0),"v"); + icalerror_check_arg_rz( (v!=0),"v"); + struct icalproperty_impl *impl = icalproperty_new_impl(ICAL_CALMASTER_PROPERTY); icalproperty_set_calmaster((icalproperty*)impl,v); return (icalproperty*)impl; @@ -397,7 +407,8 @@ const char* icalproperty_get_calmaster(const icalproperty* prop){ } icalproperty* icalproperty_vanew_calscale(const char* v, ...){ va_list args; - struct icalproperty_impl *impl = icalproperty_new_impl(ICAL_CALSCALE_PROPERTY); icalerror_check_arg_rz( (v!=0),"v"); + icalerror_check_arg_rz( (v!=0),"v"); + struct icalproperty_impl *impl = icalproperty_new_impl(ICAL_CALSCALE_PROPERTY); icalproperty_set_calscale((icalproperty*)impl,v); va_start(args,v); @@ -408,7 +419,8 @@ icalproperty* icalproperty_vanew_calscale(const char* v, ...){ /* CALSCALE */ icalproperty* icalproperty_new_calscale(const char* v) { - struct icalproperty_impl *impl = icalproperty_new_impl(ICAL_CALSCALE_PROPERTY); icalerror_check_arg_rz( (v!=0),"v"); + icalerror_check_arg_rz( (v!=0),"v"); + struct icalproperty_impl *impl = icalproperty_new_impl(ICAL_CALSCALE_PROPERTY); icalproperty_set_calscale((icalproperty*)impl,v); return (icalproperty*)impl; @@ -426,7 +438,8 @@ const char* icalproperty_get_calscale(const icalproperty* prop){ } icalproperty* icalproperty_vanew_carid(const char* v, ...){ va_list args; - struct icalproperty_impl *impl = icalproperty_new_impl(ICAL_CARID_PROPERTY); icalerror_check_arg_rz( (v!=0),"v"); + icalerror_check_arg_rz( (v!=0),"v"); + struct icalproperty_impl *impl = icalproperty_new_impl(ICAL_CARID_PROPERTY); icalproperty_set_carid((icalproperty*)impl,v); va_start(args,v); @@ -437,7 +450,8 @@ icalproperty* icalproperty_vanew_carid(const char* v, ...){ /* CARID */ icalproperty* icalproperty_new_carid(const char* v) { - struct icalproperty_impl *impl = icalproperty_new_impl(ICAL_CARID_PROPERTY); icalerror_check_arg_rz( (v!=0),"v"); + icalerror_check_arg_rz( (v!=0),"v"); + struct icalproperty_impl *impl = icalproperty_new_impl(ICAL_CARID_PROPERTY); icalproperty_set_carid((icalproperty*)impl,v); return (icalproperty*)impl; @@ -455,7 +469,8 @@ const char* icalproperty_get_carid(const icalproperty* prop){ } icalproperty* icalproperty_vanew_categories(const char* v, ...){ va_list args; - struct icalproperty_impl *impl = icalproperty_new_impl(ICAL_CATEGORIES_PROPERTY); icalerror_check_arg_rz( (v!=0),"v"); + icalerror_check_arg_rz( (v!=0),"v"); + struct icalproperty_impl *impl = icalproperty_new_impl(ICAL_CATEGORIES_PROPERTY); icalproperty_set_categories((icalproperty*)impl,v); va_start(args,v); @@ -466,7 +481,8 @@ icalproperty* icalproperty_vanew_categories(const char* v, ...){ /* CATEGORIES */ icalproperty* icalproperty_new_categories(const char* v) { - struct icalproperty_impl *impl = icalproperty_new_impl(ICAL_CATEGORIES_PROPERTY); icalerror_check_arg_rz( (v!=0),"v"); + icalerror_check_arg_rz( (v!=0),"v"); + struct icalproperty_impl *impl = icalproperty_new_impl(ICAL_CATEGORIES_PROPERTY); icalproperty_set_categories((icalproperty*)impl,v); return (icalproperty*)impl; @@ -510,7 +526,8 @@ enum icalproperty_class icalproperty_get_class(const icalproperty* prop){ } icalproperty* icalproperty_vanew_comment(const char* v, ...){ va_list args; - struct icalproperty_impl *impl = icalproperty_new_impl(ICAL_COMMENT_PROPERTY); icalerror_check_arg_rz( (v!=0),"v"); + icalerror_check_arg_rz( (v!=0),"v"); + struct icalproperty_impl *impl = icalproperty_new_impl(ICAL_COMMENT_PROPERTY); icalproperty_set_comment((icalproperty*)impl,v); va_start(args,v); @@ -521,7 +538,8 @@ icalproperty* icalproperty_vanew_comment(const char* v, ...){ /* COMMENT */ icalproperty* icalproperty_new_comment(const char* v) { - struct icalproperty_impl *impl = icalproperty_new_impl(ICAL_COMMENT_PROPERTY); icalerror_check_arg_rz( (v!=0),"v"); + icalerror_check_arg_rz( (v!=0),"v"); + struct icalproperty_impl *impl = icalproperty_new_impl(ICAL_COMMENT_PROPERTY); icalproperty_set_comment((icalproperty*)impl,v); return (icalproperty*)impl; @@ -565,7 +583,8 @@ struct icaltimetype icalproperty_get_completed(const icalproperty* prop){ } icalproperty* icalproperty_vanew_contact(const char* v, ...){ va_list args; - struct icalproperty_impl *impl = icalproperty_new_impl(ICAL_CONTACT_PROPERTY); icalerror_check_arg_rz( (v!=0),"v"); + icalerror_check_arg_rz( (v!=0),"v"); + struct icalproperty_impl *impl = icalproperty_new_impl(ICAL_CONTACT_PROPERTY); icalproperty_set_contact((icalproperty*)impl,v); va_start(args,v); @@ -576,7 +595,8 @@ icalproperty* icalproperty_vanew_contact(const char* v, ...){ /* CONTACT */ icalproperty* icalproperty_new_contact(const char* v) { - struct icalproperty_impl *impl = icalproperty_new_impl(ICAL_CONTACT_PROPERTY); icalerror_check_arg_rz( (v!=0),"v"); + icalerror_check_arg_rz( (v!=0),"v"); + struct icalproperty_impl *impl = icalproperty_new_impl(ICAL_CONTACT_PROPERTY); icalproperty_set_contact((icalproperty*)impl,v); return (icalproperty*)impl; @@ -620,7 +640,8 @@ struct icaltimetype icalproperty_get_created(const icalproperty* prop){ } icalproperty* icalproperty_vanew_decreed(const char* v, ...){ va_list args; - struct icalproperty_impl *impl = icalproperty_new_impl(ICAL_DECREED_PROPERTY); icalerror_check_arg_rz( (v!=0),"v"); + icalerror_check_arg_rz( (v!=0),"v"); + struct icalproperty_impl *impl = icalproperty_new_impl(ICAL_DECREED_PROPERTY); icalproperty_set_decreed((icalproperty*)impl,v); va_start(args,v); @@ -631,7 +652,8 @@ icalproperty* icalproperty_vanew_decreed(const char* v, ...){ /* DECREED */ icalproperty* icalproperty_new_decreed(const char* v) { - struct icalproperty_impl *impl = icalproperty_new_impl(ICAL_DECREED_PROPERTY); icalerror_check_arg_rz( (v!=0),"v"); + icalerror_check_arg_rz( (v!=0),"v"); + struct icalproperty_impl *impl = icalproperty_new_impl(ICAL_DECREED_PROPERTY); icalproperty_set_decreed((icalproperty*)impl,v); return (icalproperty*)impl; @@ -649,7 +671,8 @@ const char* icalproperty_get_decreed(const icalproperty* prop){ } icalproperty* icalproperty_vanew_defaultcharset(const char* v, ...){ va_list args; - struct icalproperty_impl *impl = icalproperty_new_impl(ICAL_DEFAULTCHARSET_PROPERTY); icalerror_check_arg_rz( (v!=0),"v"); + icalerror_check_arg_rz( (v!=0),"v"); + struct icalproperty_impl *impl = icalproperty_new_impl(ICAL_DEFAULTCHARSET_PROPERTY); icalproperty_set_defaultcharset((icalproperty*)impl,v); va_start(args,v); @@ -660,7 +683,8 @@ icalproperty* icalproperty_vanew_defaultcharset(const char* v, ...){ /* DEFAULT-CHARSET */ icalproperty* icalproperty_new_defaultcharset(const char* v) { - struct icalproperty_impl *impl = icalproperty_new_impl(ICAL_DEFAULTCHARSET_PROPERTY); icalerror_check_arg_rz( (v!=0),"v"); + icalerror_check_arg_rz( (v!=0),"v"); + struct icalproperty_impl *impl = icalproperty_new_impl(ICAL_DEFAULTCHARSET_PROPERTY); icalproperty_set_defaultcharset((icalproperty*)impl,v); return (icalproperty*)impl; @@ -678,7 +702,8 @@ const char* icalproperty_get_defaultcharset(const icalproperty* prop){ } icalproperty* icalproperty_vanew_defaultlocale(const char* v, ...){ va_list args; - struct icalproperty_impl *impl = icalproperty_new_impl(ICAL_DEFAULTLOCALE_PROPERTY); icalerror_check_arg_rz( (v!=0),"v"); + icalerror_check_arg_rz( (v!=0),"v"); + struct icalproperty_impl *impl = icalproperty_new_impl(ICAL_DEFAULTLOCALE_PROPERTY); icalproperty_set_defaultlocale((icalproperty*)impl,v); va_start(args,v); @@ -689,7 +714,8 @@ icalproperty* icalproperty_vanew_defaultlocale(const char* v, ...){ /* DEFAULT-LOCALE */ icalproperty* icalproperty_new_defaultlocale(const char* v) { - struct icalproperty_impl *impl = icalproperty_new_impl(ICAL_DEFAULTLOCALE_PROPERTY); icalerror_check_arg_rz( (v!=0),"v"); + icalerror_check_arg_rz( (v!=0),"v"); + struct icalproperty_impl *impl = icalproperty_new_impl(ICAL_DEFAULTLOCALE_PROPERTY); icalproperty_set_defaultlocale((icalproperty*)impl,v); return (icalproperty*)impl; @@ -707,7 +733,8 @@ const char* icalproperty_get_defaultlocale(const icalproperty* prop){ } icalproperty* icalproperty_vanew_defaulttzid(const char* v, ...){ va_list args; - struct icalproperty_impl *impl = icalproperty_new_impl(ICAL_DEFAULTTZID_PROPERTY); icalerror_check_arg_rz( (v!=0),"v"); + icalerror_check_arg_rz( (v!=0),"v"); + struct icalproperty_impl *impl = icalproperty_new_impl(ICAL_DEFAULTTZID_PROPERTY); icalproperty_set_defaulttzid((icalproperty*)impl,v); va_start(args,v); @@ -718,7 +745,8 @@ icalproperty* icalproperty_vanew_defaulttzid(const char* v, ...){ /* DEFAULT-TZID */ icalproperty* icalproperty_new_defaulttzid(const char* v) { - struct icalproperty_impl *impl = icalproperty_new_impl(ICAL_DEFAULTTZID_PROPERTY); icalerror_check_arg_rz( (v!=0),"v"); + icalerror_check_arg_rz( (v!=0),"v"); + struct icalproperty_impl *impl = icalproperty_new_impl(ICAL_DEFAULTTZID_PROPERTY); icalproperty_set_defaulttzid((icalproperty*)impl,v); return (icalproperty*)impl; @@ -736,7 +764,8 @@ const char* icalproperty_get_defaulttzid(const icalproperty* prop){ } icalproperty* icalproperty_vanew_description(const char* v, ...){ va_list args; - struct icalproperty_impl *impl = icalproperty_new_impl(ICAL_DESCRIPTION_PROPERTY); icalerror_check_arg_rz( (v!=0),"v"); + icalerror_check_arg_rz( (v!=0),"v"); + struct icalproperty_impl *impl = icalproperty_new_impl(ICAL_DESCRIPTION_PROPERTY); icalproperty_set_description((icalproperty*)impl,v); va_start(args,v); @@ -747,7 +776,8 @@ icalproperty* icalproperty_vanew_description(const char* v, ...){ /* DESCRIPTION */ icalproperty* icalproperty_new_description(const char* v) { - struct icalproperty_impl *impl = icalproperty_new_impl(ICAL_DESCRIPTION_PROPERTY); icalerror_check_arg_rz( (v!=0),"v"); + icalerror_check_arg_rz( (v!=0),"v"); + struct icalproperty_impl *impl = icalproperty_new_impl(ICAL_DESCRIPTION_PROPERTY); icalproperty_set_description((icalproperty*)impl,v); return (icalproperty*)impl; @@ -1071,7 +1101,8 @@ struct icaltimetype icalproperty_get_lastmodified(const icalproperty* prop){ } icalproperty* icalproperty_vanew_location(const char* v, ...){ va_list args; - struct icalproperty_impl *impl = icalproperty_new_impl(ICAL_LOCATION_PROPERTY); icalerror_check_arg_rz( (v!=0),"v"); + icalerror_check_arg_rz( (v!=0),"v"); + struct icalproperty_impl *impl = icalproperty_new_impl(ICAL_LOCATION_PROPERTY); icalproperty_set_location((icalproperty*)impl,v); va_start(args,v); @@ -1082,7 +1113,8 @@ icalproperty* icalproperty_vanew_location(const char* v, ...){ /* LOCATION */ icalproperty* icalproperty_new_location(const char* v) { - struct icalproperty_impl *impl = icalproperty_new_impl(ICAL_LOCATION_PROPERTY); icalerror_check_arg_rz( (v!=0),"v"); + icalerror_check_arg_rz( (v!=0),"v"); + struct icalproperty_impl *impl = icalproperty_new_impl(ICAL_LOCATION_PROPERTY); icalproperty_set_location((icalproperty*)impl,v); return (icalproperty*)impl; @@ -1178,7 +1210,8 @@ enum icalproperty_method icalproperty_get_method(const icalproperty* prop){ } icalproperty* icalproperty_vanew_organizer(const char* v, ...){ va_list args; - struct icalproperty_impl *impl = icalproperty_new_impl(ICAL_ORGANIZER_PROPERTY); icalerror_check_arg_rz( (v!=0),"v"); + icalerror_check_arg_rz( (v!=0),"v"); + struct icalproperty_impl *impl = icalproperty_new_impl(ICAL_ORGANIZER_PROPERTY); icalproperty_set_organizer((icalproperty*)impl,v); va_start(args,v); @@ -1189,7 +1222,8 @@ icalproperty* icalproperty_vanew_organizer(const char* v, ...){ /* ORGANIZER */ icalproperty* icalproperty_new_organizer(const char* v) { - struct icalproperty_impl *impl = icalproperty_new_impl(ICAL_ORGANIZER_PROPERTY); icalerror_check_arg_rz( (v!=0),"v"); + icalerror_check_arg_rz( (v!=0),"v"); + struct icalproperty_impl *impl = icalproperty_new_impl(ICAL_ORGANIZER_PROPERTY); icalproperty_set_organizer((icalproperty*)impl,v); return (icalproperty*)impl; @@ -1207,7 +1241,8 @@ const char* icalproperty_get_organizer(const icalproperty* prop){ } icalproperty* icalproperty_vanew_owner(const char* v, ...){ va_list args; - struct icalproperty_impl *impl = icalproperty_new_impl(ICAL_OWNER_PROPERTY); icalerror_check_arg_rz( (v!=0),"v"); + icalerror_check_arg_rz( (v!=0),"v"); + struct icalproperty_impl *impl = icalproperty_new_impl(ICAL_OWNER_PROPERTY); icalproperty_set_owner((icalproperty*)impl,v); va_start(args,v); @@ -1218,7 +1253,8 @@ icalproperty* icalproperty_vanew_owner(const char* v, ...){ /* OWNER */ icalproperty* icalproperty_new_owner(const char* v) { - struct icalproperty_impl *impl = icalproperty_new_impl(ICAL_OWNER_PROPERTY); icalerror_check_arg_rz( (v!=0),"v"); + icalerror_check_arg_rz( (v!=0),"v"); + struct icalproperty_impl *impl = icalproperty_new_impl(ICAL_OWNER_PROPERTY); icalproperty_set_owner((icalproperty*)impl,v); return (icalproperty*)impl; @@ -1288,7 +1324,8 @@ int icalproperty_get_priority(const icalproperty* prop){ } icalproperty* icalproperty_vanew_prodid(const char* v, ...){ va_list args; - struct icalproperty_impl *impl = icalproperty_new_impl(ICAL_PRODID_PROPERTY); icalerror_check_arg_rz( (v!=0),"v"); + icalerror_check_arg_rz( (v!=0),"v"); + struct icalproperty_impl *impl = icalproperty_new_impl(ICAL_PRODID_PROPERTY); icalproperty_set_prodid((icalproperty*)impl,v); va_start(args,v); @@ -1299,7 +1336,8 @@ icalproperty* icalproperty_vanew_prodid(const char* v, ...){ /* PRODID */ icalproperty* icalproperty_new_prodid(const char* v) { - struct icalproperty_impl *impl = icalproperty_new_impl(ICAL_PRODID_PROPERTY); icalerror_check_arg_rz( (v!=0),"v"); + icalerror_check_arg_rz( (v!=0),"v"); + struct icalproperty_impl *impl = icalproperty_new_impl(ICAL_PRODID_PROPERTY); icalproperty_set_prodid((icalproperty*)impl,v); return (icalproperty*)impl; @@ -1317,7 +1355,8 @@ const char* icalproperty_get_prodid(const icalproperty* prop){ } icalproperty* icalproperty_vanew_query(const char* v, ...){ va_list args; - struct icalproperty_impl *impl = icalproperty_new_impl(ICAL_QUERY_PROPERTY); icalerror_check_arg_rz( (v!=0),"v"); + icalerror_check_arg_rz( (v!=0),"v"); + struct icalproperty_impl *impl = icalproperty_new_impl(ICAL_QUERY_PROPERTY); icalproperty_set_query((icalproperty*)impl,v); va_start(args,v); @@ -1328,7 +1367,8 @@ icalproperty* icalproperty_vanew_query(const char* v, ...){ /* QUERY */ icalproperty* icalproperty_new_query(const char* v) { - struct icalproperty_impl *impl = icalproperty_new_impl(ICAL_QUERY_PROPERTY); icalerror_check_arg_rz( (v!=0),"v"); + icalerror_check_arg_rz( (v!=0),"v"); + struct icalproperty_impl *impl = icalproperty_new_impl(ICAL_QUERY_PROPERTY); icalproperty_set_query((icalproperty*)impl,v); return (icalproperty*)impl; @@ -1346,7 +1386,8 @@ const char* icalproperty_get_query(const icalproperty* prop){ } icalproperty* icalproperty_vanew_queryname(const char* v, ...){ va_list args; - struct icalproperty_impl *impl = icalproperty_new_impl(ICAL_QUERYNAME_PROPERTY); icalerror_check_arg_rz( (v!=0),"v"); + icalerror_check_arg_rz( (v!=0),"v"); + struct icalproperty_impl *impl = icalproperty_new_impl(ICAL_QUERYNAME_PROPERTY); icalproperty_set_queryname((icalproperty*)impl,v); va_start(args,v); @@ -1357,7 +1398,8 @@ icalproperty* icalproperty_vanew_queryname(const char* v, ...){ /* QUERYNAME */ icalproperty* icalproperty_new_queryname(const char* v) { - struct icalproperty_impl *impl = icalproperty_new_impl(ICAL_QUERYNAME_PROPERTY); icalerror_check_arg_rz( (v!=0),"v"); + icalerror_check_arg_rz( (v!=0),"v"); + struct icalproperty_impl *impl = icalproperty_new_impl(ICAL_QUERYNAME_PROPERTY); icalproperty_set_queryname((icalproperty*)impl,v); return (icalproperty*)impl; @@ -1432,7 +1474,8 @@ struct icaltimetype icalproperty_get_recurrenceid(const icalproperty* prop){ } icalproperty* icalproperty_vanew_relatedto(const char* v, ...){ va_list args; - struct icalproperty_impl *impl = icalproperty_new_impl(ICAL_RELATEDTO_PROPERTY); icalerror_check_arg_rz( (v!=0),"v"); + icalerror_check_arg_rz( (v!=0),"v"); + struct icalproperty_impl *impl = icalproperty_new_impl(ICAL_RELATEDTO_PROPERTY); icalproperty_set_relatedto((icalproperty*)impl,v); va_start(args,v); @@ -1443,7 +1486,8 @@ icalproperty* icalproperty_vanew_relatedto(const char* v, ...){ /* RELATED-TO */ icalproperty* icalproperty_new_relatedto(const char* v) { - struct icalproperty_impl *impl = icalproperty_new_impl(ICAL_RELATEDTO_PROPERTY); icalerror_check_arg_rz( (v!=0),"v"); + icalerror_check_arg_rz( (v!=0),"v"); + struct icalproperty_impl *impl = icalproperty_new_impl(ICAL_RELATEDTO_PROPERTY); icalproperty_set_relatedto((icalproperty*)impl,v); return (icalproperty*)impl; @@ -1461,7 +1505,8 @@ const char* icalproperty_get_relatedto(const icalproperty* prop){ } icalproperty* icalproperty_vanew_relcalid(const char* v, ...){ va_list args; - struct icalproperty_impl *impl = icalproperty_new_impl(ICAL_RELCALID_PROPERTY); icalerror_check_arg_rz( (v!=0),"v"); + icalerror_check_arg_rz( (v!=0),"v"); + struct icalproperty_impl *impl = icalproperty_new_impl(ICAL_RELCALID_PROPERTY); icalproperty_set_relcalid((icalproperty*)impl,v); va_start(args,v); @@ -1472,7 +1517,8 @@ icalproperty* icalproperty_vanew_relcalid(const char* v, ...){ /* RELCALID */ icalproperty* icalproperty_new_relcalid(const char* v) { - struct icalproperty_impl *impl = icalproperty_new_impl(ICAL_RELCALID_PROPERTY); icalerror_check_arg_rz( (v!=0),"v"); + icalerror_check_arg_rz( (v!=0),"v"); + struct icalproperty_impl *impl = icalproperty_new_impl(ICAL_RELCALID_PROPERTY); icalproperty_set_relcalid((icalproperty*)impl,v); return (icalproperty*)impl; @@ -1542,7 +1588,8 @@ struct icalreqstattype icalproperty_get_requeststatus(const icalproperty* prop){ } icalproperty* icalproperty_vanew_resources(const char* v, ...){ va_list args; - struct icalproperty_impl *impl = icalproperty_new_impl(ICAL_RESOURCES_PROPERTY); icalerror_check_arg_rz( (v!=0),"v"); + icalerror_check_arg_rz( (v!=0),"v"); + struct icalproperty_impl *impl = icalproperty_new_impl(ICAL_RESOURCES_PROPERTY); icalproperty_set_resources((icalproperty*)impl,v); va_start(args,v); @@ -1553,7 +1600,8 @@ icalproperty* icalproperty_vanew_resources(const char* v, ...){ /* RESOURCES */ icalproperty* icalproperty_new_resources(const char* v) { - struct icalproperty_impl *impl = icalproperty_new_impl(ICAL_RESOURCES_PROPERTY); icalerror_check_arg_rz( (v!=0),"v"); + icalerror_check_arg_rz( (v!=0),"v"); + struct icalproperty_impl *impl = icalproperty_new_impl(ICAL_RESOURCES_PROPERTY); icalproperty_set_resources((icalproperty*)impl,v); return (icalproperty*)impl; @@ -1597,7 +1645,8 @@ struct icalrecurrencetype icalproperty_get_rrule(const icalproperty* prop){ } icalproperty* icalproperty_vanew_scope(const char* v, ...){ va_list args; - struct icalproperty_impl *impl = icalproperty_new_impl(ICAL_SCOPE_PROPERTY); icalerror_check_arg_rz( (v!=0),"v"); + icalerror_check_arg_rz( (v!=0),"v"); + struct icalproperty_impl *impl = icalproperty_new_impl(ICAL_SCOPE_PROPERTY); icalproperty_set_scope((icalproperty*)impl,v); va_start(args,v); @@ -1608,7 +1657,8 @@ icalproperty* icalproperty_vanew_scope(const char* v, ...){ /* SCOPE */ icalproperty* icalproperty_new_scope(const char* v) { - struct icalproperty_impl *impl = icalproperty_new_impl(ICAL_SCOPE_PROPERTY); icalerror_check_arg_rz( (v!=0),"v"); + icalerror_check_arg_rz( (v!=0),"v"); + struct icalproperty_impl *impl = icalproperty_new_impl(ICAL_SCOPE_PROPERTY); icalproperty_set_scope((icalproperty*)impl,v); return (icalproperty*)impl; @@ -1678,7 +1728,8 @@ enum icalproperty_status icalproperty_get_status(const icalproperty* prop){ } icalproperty* icalproperty_vanew_summary(const char* v, ...){ va_list args; - struct icalproperty_impl *impl = icalproperty_new_impl(ICAL_SUMMARY_PROPERTY); icalerror_check_arg_rz( (v!=0),"v"); + icalerror_check_arg_rz( (v!=0),"v"); + struct icalproperty_impl *impl = icalproperty_new_impl(ICAL_SUMMARY_PROPERTY); icalproperty_set_summary((icalproperty*)impl,v); va_start(args,v); @@ -1689,7 +1740,8 @@ icalproperty* icalproperty_vanew_summary(const char* v, ...){ /* SUMMARY */ icalproperty* icalproperty_new_summary(const char* v) { - struct icalproperty_impl *impl = icalproperty_new_impl(ICAL_SUMMARY_PROPERTY); icalerror_check_arg_rz( (v!=0),"v"); + icalerror_check_arg_rz( (v!=0),"v"); + struct icalproperty_impl *impl = icalproperty_new_impl(ICAL_SUMMARY_PROPERTY); icalproperty_set_summary((icalproperty*)impl,v); return (icalproperty*)impl; @@ -1707,7 +1759,8 @@ const char* icalproperty_get_summary(const icalproperty* prop){ } icalproperty* icalproperty_vanew_target(const char* v, ...){ va_list args; - struct icalproperty_impl *impl = icalproperty_new_impl(ICAL_TARGET_PROPERTY); icalerror_check_arg_rz( (v!=0),"v"); + icalerror_check_arg_rz( (v!=0),"v"); + struct icalproperty_impl *impl = icalproperty_new_impl(ICAL_TARGET_PROPERTY); icalproperty_set_target((icalproperty*)impl,v); va_start(args,v); @@ -1718,7 +1771,8 @@ icalproperty* icalproperty_vanew_target(const char* v, ...){ /* TARGET */ icalproperty* icalproperty_new_target(const char* v) { - struct icalproperty_impl *impl = icalproperty_new_impl(ICAL_TARGET_PROPERTY); icalerror_check_arg_rz( (v!=0),"v"); + icalerror_check_arg_rz( (v!=0),"v"); + struct icalproperty_impl *impl = icalproperty_new_impl(ICAL_TARGET_PROPERTY); icalproperty_set_target((icalproperty*)impl,v); return (icalproperty*)impl; @@ -1788,7 +1842,8 @@ struct icaltriggertype icalproperty_get_trigger(const icalproperty* prop){ } icalproperty* icalproperty_vanew_tzid(const char* v, ...){ va_list args; - struct icalproperty_impl *impl = icalproperty_new_impl(ICAL_TZID_PROPERTY); icalerror_check_arg_rz( (v!=0),"v"); + icalerror_check_arg_rz( (v!=0),"v"); + struct icalproperty_impl *impl = icalproperty_new_impl(ICAL_TZID_PROPERTY); icalproperty_set_tzid((icalproperty*)impl,v); va_start(args,v); @@ -1799,7 +1854,8 @@ icalproperty* icalproperty_vanew_tzid(const char* v, ...){ /* TZID */ icalproperty* icalproperty_new_tzid(const char* v) { - struct icalproperty_impl *impl = icalproperty_new_impl(ICAL_TZID_PROPERTY); icalerror_check_arg_rz( (v!=0),"v"); + icalerror_check_arg_rz( (v!=0),"v"); + struct icalproperty_impl *impl = icalproperty_new_impl(ICAL_TZID_PROPERTY); icalproperty_set_tzid((icalproperty*)impl,v); return (icalproperty*)impl; @@ -1817,7 +1873,8 @@ const char* icalproperty_get_tzid(const icalproperty* prop){ } icalproperty* icalproperty_vanew_tzname(const char* v, ...){ va_list args; - struct icalproperty_impl *impl = icalproperty_new_impl(ICAL_TZNAME_PROPERTY); icalerror_check_arg_rz( (v!=0),"v"); + icalerror_check_arg_rz( (v!=0),"v"); + struct icalproperty_impl *impl = icalproperty_new_impl(ICAL_TZNAME_PROPERTY); icalproperty_set_tzname((icalproperty*)impl,v); va_start(args,v); @@ -1828,7 +1885,8 @@ icalproperty* icalproperty_vanew_tzname(const char* v, ...){ /* TZNAME */ icalproperty* icalproperty_new_tzname(const char* v) { - struct icalproperty_impl *impl = icalproperty_new_impl(ICAL_TZNAME_PROPERTY); icalerror_check_arg_rz( (v!=0),"v"); + icalerror_check_arg_rz( (v!=0),"v"); + struct icalproperty_impl *impl = icalproperty_new_impl(ICAL_TZNAME_PROPERTY); icalproperty_set_tzname((icalproperty*)impl,v); return (icalproperty*)impl; @@ -1898,7 +1956,8 @@ int icalproperty_get_tzoffsetto(const icalproperty* prop){ } icalproperty* icalproperty_vanew_tzurl(const char* v, ...){ va_list args; - struct icalproperty_impl *impl = icalproperty_new_impl(ICAL_TZURL_PROPERTY); icalerror_check_arg_rz( (v!=0),"v"); + icalerror_check_arg_rz( (v!=0),"v"); + struct icalproperty_impl *impl = icalproperty_new_impl(ICAL_TZURL_PROPERTY); icalproperty_set_tzurl((icalproperty*)impl,v); va_start(args,v); @@ -1909,7 +1968,8 @@ icalproperty* icalproperty_vanew_tzurl(const char* v, ...){ /* TZURL */ icalproperty* icalproperty_new_tzurl(const char* v) { - struct icalproperty_impl *impl = icalproperty_new_impl(ICAL_TZURL_PROPERTY); icalerror_check_arg_rz( (v!=0),"v"); + icalerror_check_arg_rz( (v!=0),"v"); + struct icalproperty_impl *impl = icalproperty_new_impl(ICAL_TZURL_PROPERTY); icalproperty_set_tzurl((icalproperty*)impl,v); return (icalproperty*)impl; @@ -1927,7 +1987,8 @@ const char* icalproperty_get_tzurl(const icalproperty* prop){ } icalproperty* icalproperty_vanew_uid(const char* v, ...){ va_list args; - struct icalproperty_impl *impl = icalproperty_new_impl(ICAL_UID_PROPERTY); icalerror_check_arg_rz( (v!=0),"v"); + icalerror_check_arg_rz( (v!=0),"v"); + struct icalproperty_impl *impl = icalproperty_new_impl(ICAL_UID_PROPERTY); icalproperty_set_uid((icalproperty*)impl,v); va_start(args,v); @@ -1938,7 +1999,8 @@ icalproperty* icalproperty_vanew_uid(const char* v, ...){ /* UID */ icalproperty* icalproperty_new_uid(const char* v) { - struct icalproperty_impl *impl = icalproperty_new_impl(ICAL_UID_PROPERTY); icalerror_check_arg_rz( (v!=0),"v"); + icalerror_check_arg_rz( (v!=0),"v"); + struct icalproperty_impl *impl = icalproperty_new_impl(ICAL_UID_PROPERTY); icalproperty_set_uid((icalproperty*)impl,v); return (icalproperty*)impl; @@ -1956,7 +2018,8 @@ const char* icalproperty_get_uid(const icalproperty* prop){ } icalproperty* icalproperty_vanew_url(const char* v, ...){ va_list args; - struct icalproperty_impl *impl = icalproperty_new_impl(ICAL_URL_PROPERTY); icalerror_check_arg_rz( (v!=0),"v"); + icalerror_check_arg_rz( (v!=0),"v"); + struct icalproperty_impl *impl = icalproperty_new_impl(ICAL_URL_PROPERTY); icalproperty_set_url((icalproperty*)impl,v); va_start(args,v); @@ -1967,7 +2030,8 @@ icalproperty* icalproperty_vanew_url(const char* v, ...){ /* URL */ icalproperty* icalproperty_new_url(const char* v) { - struct icalproperty_impl *impl = icalproperty_new_impl(ICAL_URL_PROPERTY); icalerror_check_arg_rz( (v!=0),"v"); + icalerror_check_arg_rz( (v!=0),"v"); + struct icalproperty_impl *impl = icalproperty_new_impl(ICAL_URL_PROPERTY); icalproperty_set_url((icalproperty*)impl,v); return (icalproperty*)impl; @@ -1985,7 +2049,8 @@ const char* icalproperty_get_url(const icalproperty* prop){ } icalproperty* icalproperty_vanew_version(const char* v, ...){ va_list args; - struct icalproperty_impl *impl = icalproperty_new_impl(ICAL_VERSION_PROPERTY); icalerror_check_arg_rz( (v!=0),"v"); + icalerror_check_arg_rz( (v!=0),"v"); + struct icalproperty_impl *impl = icalproperty_new_impl(ICAL_VERSION_PROPERTY); icalproperty_set_version((icalproperty*)impl,v); va_start(args,v); @@ -1996,7 +2061,8 @@ icalproperty* icalproperty_vanew_version(const char* v, ...){ /* VERSION */ icalproperty* icalproperty_new_version(const char* v) { - struct icalproperty_impl *impl = icalproperty_new_impl(ICAL_VERSION_PROPERTY); icalerror_check_arg_rz( (v!=0),"v"); + icalerror_check_arg_rz( (v!=0),"v"); + struct icalproperty_impl *impl = icalproperty_new_impl(ICAL_VERSION_PROPERTY); icalproperty_set_version((icalproperty*)impl,v); return (icalproperty*)impl; @@ -2014,7 +2080,8 @@ const char* icalproperty_get_version(const icalproperty* prop){ } icalproperty* icalproperty_vanew_x(const char* v, ...){ va_list args; - struct icalproperty_impl *impl = icalproperty_new_impl(ICAL_X_PROPERTY); icalerror_check_arg_rz( (v!=0),"v"); + icalerror_check_arg_rz( (v!=0),"v"); + struct icalproperty_impl *impl = icalproperty_new_impl(ICAL_X_PROPERTY); icalproperty_set_x((icalproperty*)impl,v); va_start(args,v); @@ -2025,7 +2092,8 @@ icalproperty* icalproperty_vanew_x(const char* v, ...){ /* X */ icalproperty* icalproperty_new_x(const char* v) { - struct icalproperty_impl *impl = icalproperty_new_impl(ICAL_X_PROPERTY); icalerror_check_arg_rz( (v!=0),"v"); + icalerror_check_arg_rz( (v!=0),"v"); + struct icalproperty_impl *impl = icalproperty_new_impl(ICAL_X_PROPERTY); icalproperty_set_x((icalproperty*)impl,v); return (icalproperty*)impl; @@ -2069,7 +2137,8 @@ enum icalproperty_xlicclass icalproperty_get_xlicclass(const icalproperty* prop) } icalproperty* icalproperty_vanew_xlicclustercount(const char* v, ...){ va_list args; - struct icalproperty_impl *impl = icalproperty_new_impl(ICAL_XLICCLUSTERCOUNT_PROPERTY); icalerror_check_arg_rz( (v!=0),"v"); + icalerror_check_arg_rz( (v!=0),"v"); + struct icalproperty_impl *impl = icalproperty_new_impl(ICAL_XLICCLUSTERCOUNT_PROPERTY); icalproperty_set_xlicclustercount((icalproperty*)impl,v); va_start(args,v); @@ -2080,7 +2149,8 @@ icalproperty* icalproperty_vanew_xlicclustercount(const char* v, ...){ /* X-LIC-CLUSTERCOUNT */ icalproperty* icalproperty_new_xlicclustercount(const char* v) { - struct icalproperty_impl *impl = icalproperty_new_impl(ICAL_XLICCLUSTERCOUNT_PROPERTY); icalerror_check_arg_rz( (v!=0),"v"); + icalerror_check_arg_rz( (v!=0),"v"); + struct icalproperty_impl *impl = icalproperty_new_impl(ICAL_XLICCLUSTERCOUNT_PROPERTY); icalproperty_set_xlicclustercount((icalproperty*)impl,v); return (icalproperty*)impl; @@ -2098,7 +2168,8 @@ const char* icalproperty_get_xlicclustercount(const icalproperty* prop){ } icalproperty* icalproperty_vanew_xlicerror(const char* v, ...){ va_list args; - struct icalproperty_impl *impl = icalproperty_new_impl(ICAL_XLICERROR_PROPERTY); icalerror_check_arg_rz( (v!=0),"v"); + icalerror_check_arg_rz( (v!=0),"v"); + struct icalproperty_impl *impl = icalproperty_new_impl(ICAL_XLICERROR_PROPERTY); icalproperty_set_xlicerror((icalproperty*)impl,v); va_start(args,v); @@ -2109,7 +2180,8 @@ icalproperty* icalproperty_vanew_xlicerror(const char* v, ...){ /* X-LIC-ERROR */ icalproperty* icalproperty_new_xlicerror(const char* v) { - struct icalproperty_impl *impl = icalproperty_new_impl(ICAL_XLICERROR_PROPERTY); icalerror_check_arg_rz( (v!=0),"v"); + icalerror_check_arg_rz( (v!=0),"v"); + struct icalproperty_impl *impl = icalproperty_new_impl(ICAL_XLICERROR_PROPERTY); icalproperty_set_xlicerror((icalproperty*)impl,v); return (icalproperty*)impl; @@ -2127,7 +2199,8 @@ const char* icalproperty_get_xlicerror(const icalproperty* prop){ } icalproperty* icalproperty_vanew_xlicmimecharset(const char* v, ...){ va_list args; - struct icalproperty_impl *impl = icalproperty_new_impl(ICAL_XLICMIMECHARSET_PROPERTY); icalerror_check_arg_rz( (v!=0),"v"); + icalerror_check_arg_rz( (v!=0),"v"); + struct icalproperty_impl *impl = icalproperty_new_impl(ICAL_XLICMIMECHARSET_PROPERTY); icalproperty_set_xlicmimecharset((icalproperty*)impl,v); va_start(args,v); @@ -2138,7 +2211,8 @@ icalproperty* icalproperty_vanew_xlicmimecharset(const char* v, ...){ /* X-LIC-MIMECHARSET */ icalproperty* icalproperty_new_xlicmimecharset(const char* v) { - struct icalproperty_impl *impl = icalproperty_new_impl(ICAL_XLICMIMECHARSET_PROPERTY); icalerror_check_arg_rz( (v!=0),"v"); + icalerror_check_arg_rz( (v!=0),"v"); + struct icalproperty_impl *impl = icalproperty_new_impl(ICAL_XLICMIMECHARSET_PROPERTY); icalproperty_set_xlicmimecharset((icalproperty*)impl,v); return (icalproperty*)impl; @@ -2156,7 +2230,8 @@ const char* icalproperty_get_xlicmimecharset(const icalproperty* prop){ } icalproperty* icalproperty_vanew_xlicmimecid(const char* v, ...){ va_list args; - struct icalproperty_impl *impl = icalproperty_new_impl(ICAL_XLICMIMECID_PROPERTY); icalerror_check_arg_rz( (v!=0),"v"); + icalerror_check_arg_rz( (v!=0),"v"); + struct icalproperty_impl *impl = icalproperty_new_impl(ICAL_XLICMIMECID_PROPERTY); icalproperty_set_xlicmimecid((icalproperty*)impl,v); va_start(args,v); @@ -2167,7 +2242,8 @@ icalproperty* icalproperty_vanew_xlicmimecid(const char* v, ...){ /* X-LIC-MIMECID */ icalproperty* icalproperty_new_xlicmimecid(const char* v) { - struct icalproperty_impl *impl = icalproperty_new_impl(ICAL_XLICMIMECID_PROPERTY); icalerror_check_arg_rz( (v!=0),"v"); + icalerror_check_arg_rz( (v!=0),"v"); + struct icalproperty_impl *impl = icalproperty_new_impl(ICAL_XLICMIMECID_PROPERTY); icalproperty_set_xlicmimecid((icalproperty*)impl,v); return (icalproperty*)impl; @@ -2185,7 +2261,8 @@ const char* icalproperty_get_xlicmimecid(const icalproperty* prop){ } icalproperty* icalproperty_vanew_xlicmimecontenttype(const char* v, ...){ va_list args; - struct icalproperty_impl *impl = icalproperty_new_impl(ICAL_XLICMIMECONTENTTYPE_PROPERTY); icalerror_check_arg_rz( (v!=0),"v"); + icalerror_check_arg_rz( (v!=0),"v"); + struct icalproperty_impl *impl = icalproperty_new_impl(ICAL_XLICMIMECONTENTTYPE_PROPERTY); icalproperty_set_xlicmimecontenttype((icalproperty*)impl,v); va_start(args,v); @@ -2196,7 +2273,8 @@ icalproperty* icalproperty_vanew_xlicmimecontenttype(const char* v, ...){ /* X-LIC-MIMECONTENTTYPE */ icalproperty* icalproperty_new_xlicmimecontenttype(const char* v) { - struct icalproperty_impl *impl = icalproperty_new_impl(ICAL_XLICMIMECONTENTTYPE_PROPERTY); icalerror_check_arg_rz( (v!=0),"v"); + icalerror_check_arg_rz( (v!=0),"v"); + struct icalproperty_impl *impl = icalproperty_new_impl(ICAL_XLICMIMECONTENTTYPE_PROPERTY); icalproperty_set_xlicmimecontenttype((icalproperty*)impl,v); return (icalproperty*)impl; @@ -2214,7 +2292,8 @@ const char* icalproperty_get_xlicmimecontenttype(const icalproperty* prop){ } icalproperty* icalproperty_vanew_xlicmimeencoding(const char* v, ...){ va_list args; - struct icalproperty_impl *impl = icalproperty_new_impl(ICAL_XLICMIMEENCODING_PROPERTY); icalerror_check_arg_rz( (v!=0),"v"); + icalerror_check_arg_rz( (v!=0),"v"); + struct icalproperty_impl *impl = icalproperty_new_impl(ICAL_XLICMIMEENCODING_PROPERTY); icalproperty_set_xlicmimeencoding((icalproperty*)impl,v); va_start(args,v); @@ -2225,7 +2304,8 @@ icalproperty* icalproperty_vanew_xlicmimeencoding(const char* v, ...){ /* X-LIC-MIMEENCODING */ icalproperty* icalproperty_new_xlicmimeencoding(const char* v) { - struct icalproperty_impl *impl = icalproperty_new_impl(ICAL_XLICMIMEENCODING_PROPERTY); icalerror_check_arg_rz( (v!=0),"v"); + icalerror_check_arg_rz( (v!=0),"v"); + struct icalproperty_impl *impl = icalproperty_new_impl(ICAL_XLICMIMEENCODING_PROPERTY); icalproperty_set_xlicmimeencoding((icalproperty*)impl,v); return (icalproperty*)impl; @@ -2243,7 +2323,8 @@ const char* icalproperty_get_xlicmimeencoding(const icalproperty* prop){ } icalproperty* icalproperty_vanew_xlicmimefilename(const char* v, ...){ va_list args; - struct icalproperty_impl *impl = icalproperty_new_impl(ICAL_XLICMIMEFILENAME_PROPERTY); icalerror_check_arg_rz( (v!=0),"v"); + icalerror_check_arg_rz( (v!=0),"v"); + struct icalproperty_impl *impl = icalproperty_new_impl(ICAL_XLICMIMEFILENAME_PROPERTY); icalproperty_set_xlicmimefilename((icalproperty*)impl,v); va_start(args,v); @@ -2254,7 +2335,8 @@ icalproperty* icalproperty_vanew_xlicmimefilename(const char* v, ...){ /* X-LIC-MIMEFILENAME */ icalproperty* icalproperty_new_xlicmimefilename(const char* v) { - struct icalproperty_impl *impl = icalproperty_new_impl(ICAL_XLICMIMEFILENAME_PROPERTY); icalerror_check_arg_rz( (v!=0),"v"); + icalerror_check_arg_rz( (v!=0),"v"); + struct icalproperty_impl *impl = icalproperty_new_impl(ICAL_XLICMIMEFILENAME_PROPERTY); icalproperty_set_xlicmimefilename((icalproperty*)impl,v); return (icalproperty*)impl; @@ -2272,7 +2354,8 @@ const char* icalproperty_get_xlicmimefilename(const icalproperty* prop){ } icalproperty* icalproperty_vanew_xlicmimeoptinfo(const char* v, ...){ va_list args; - struct icalproperty_impl *impl = icalproperty_new_impl(ICAL_XLICMIMEOPTINFO_PROPERTY); icalerror_check_arg_rz( (v!=0),"v"); + icalerror_check_arg_rz( (v!=0),"v"); + struct icalproperty_impl *impl = icalproperty_new_impl(ICAL_XLICMIMEOPTINFO_PROPERTY); icalproperty_set_xlicmimeoptinfo((icalproperty*)impl,v); va_start(args,v); @@ -2283,7 +2366,8 @@ icalproperty* icalproperty_vanew_xlicmimeoptinfo(const char* v, ...){ /* X-LIC-MIMEOPTINFO */ icalproperty* icalproperty_new_xlicmimeoptinfo(const char* v) { - struct icalproperty_impl *impl = icalproperty_new_impl(ICAL_XLICMIMEOPTINFO_PROPERTY); icalerror_check_arg_rz( (v!=0),"v"); + icalerror_check_arg_rz( (v!=0),"v"); + struct icalproperty_impl *impl = icalproperty_new_impl(ICAL_XLICMIMEOPTINFO_PROPERTY); icalproperty_set_xlicmimeoptinfo((icalproperty*)impl,v); return (icalproperty*)impl; diff --git a/src/libical/autogenex/icalderivedproperty.h b/src/libical/autogenex/icalderivedproperty.h index 4c7fc6f..f77d5b3 100644 --- a/src/libical/autogenex/icalderivedproperty.h +++ b/src/libical/autogenex/icalderivedproperty.h @@ -6,6 +6,18 @@ $Id: icalderivedproperty.h,v 1.5 2002-09-01 19:12:31 gray-john Exp $ (C) COPYRIGHT 2000, Eric Busboom, http://www.softwarestudio.org + + This program is free software; you can redistribute it and/or modify + it under the terms of either: + + The LGPL as published by the Free Software Foundation, version + 2.1, available at: http://www.fsf.org/copyleft/lesser.html + + Or: + + The Mozilla Public License Version 1.0. You may obtain a copy of + the License at http://www.mozilla.org/MPL/ + ======================================================================*/ diff --git a/src/libical/autogenex/icalderivedvalue.c b/src/libical/autogenex/icalderivedvalue.c index 006bd37..0fb68bd 100644 --- a/src/libical/autogenex/icalderivedvalue.c +++ b/src/libical/autogenex/icalderivedvalue.c @@ -197,8 +197,8 @@ enum icalproperty_method icalvalue_get_method(const icalvalue* value) { icalvalue* icalvalue_new_caladdress (const char* v){ - struct icalvalue_impl* impl = icalvalue_new_impl(ICAL_CALADDRESS_VALUE); icalerror_check_arg_rz( (v!=0),"v"); + struct icalvalue_impl* impl = icalvalue_new_impl(ICAL_CALADDRESS_VALUE); icalvalue_set_caladdress((icalvalue*)impl,v); return (icalvalue*)impl; @@ -286,8 +286,8 @@ enum icalproperty_status icalvalue_get_status(const icalvalue* value) { icalvalue* icalvalue_new_binary (const char* v){ - struct icalvalue_impl* impl = icalvalue_new_impl(ICAL_BINARY_VALUE); icalerror_check_arg_rz( (v!=0),"v"); + struct icalvalue_impl* impl = icalvalue_new_impl(ICAL_BINARY_VALUE); icalvalue_set_binary((icalvalue*)impl,v); return (icalvalue*)impl; @@ -321,8 +321,8 @@ const char* icalvalue_get_binary(const icalvalue* value) { icalvalue* icalvalue_new_text (const char* v){ - struct icalvalue_impl* impl = icalvalue_new_impl(ICAL_TEXT_VALUE); icalerror_check_arg_rz( (v!=0),"v"); + struct icalvalue_impl* impl = icalvalue_new_impl(ICAL_TEXT_VALUE); icalvalue_set_text((icalvalue*)impl,v); return (icalvalue*)impl; @@ -410,8 +410,8 @@ int icalvalue_get_integer(const icalvalue* value) { icalvalue* icalvalue_new_uri (const char* v){ - struct icalvalue_impl* impl = icalvalue_new_impl(ICAL_URI_VALUE); icalerror_check_arg_rz( (v!=0),"v"); + struct icalvalue_impl* impl = icalvalue_new_impl(ICAL_URI_VALUE); icalvalue_set_uri((icalvalue*)impl,v); return (icalvalue*)impl; @@ -499,8 +499,8 @@ float icalvalue_get_float(const icalvalue* value) { icalvalue* icalvalue_new_query (const char* v){ - struct icalvalue_impl* impl = icalvalue_new_impl(ICAL_QUERY_VALUE); icalerror_check_arg_rz( (v!=0),"v"); + struct icalvalue_impl* impl = icalvalue_new_impl(ICAL_QUERY_VALUE); icalvalue_set_query((icalvalue*)impl,v); return (icalvalue*)impl; @@ -534,8 +534,8 @@ const char* icalvalue_get_query(const icalvalue* value) { icalvalue* icalvalue_new_string (const char* v){ - struct icalvalue_impl* impl = icalvalue_new_impl(ICAL_STRING_VALUE); icalerror_check_arg_rz( (v!=0),"v"); + struct icalvalue_impl* impl = icalvalue_new_impl(ICAL_STRING_VALUE); icalvalue_set_string((icalvalue*)impl,v); return (icalvalue*)impl; @@ -768,8 +768,8 @@ icalvalue_kind icalvalue_string_to_kind(const char* str) } icalvalue* icalvalue_new_x (const char* v){ - struct icalvalue_impl* impl = icalvalue_new_impl(ICAL_X_VALUE); icalerror_check_arg_rz( (v!=0),"v"); + struct icalvalue_impl* impl = icalvalue_new_impl(ICAL_X_VALUE); icalvalue_set_x((icalvalue*)impl,v); return (icalvalue*)impl; diff --git a/src/libical/autogenex/icalrestriction.c b/src/libical/autogenex/icalrestriction.c index 3d2bd15..2e9a0d1 100644 --- a/src/libical/autogenex/icalrestriction.c +++ b/src/libical/autogenex/icalrestriction.c @@ -1,7 +1,18 @@ /* -*- Mode: C -*- */ /* ====================================================================== File: icalrestriction.c - + + This program is free software; you can redistribute it and/or modify + it under the terms of either: + + The LGPL as published by the Free Software Foundation, version + 2.1, available at: http://www.fsf.org/copyleft/lesser.html + + Or: + + The Mozilla Public License Version 1.0. You may obtain a copy of + the License at http://www.mozilla.org/MPL/ + (C) COPYRIGHT 2000, Eric Busboom, http://www.softwarestudio.org ======================================================================*/ /*#line 7 "icalrestriction.c.in"*/ @@ -20,8 +31,10 @@ #define TMP_BUF_SIZE 1024 #ifdef WIN32 -#define snprintf _snprintf -#define strcasecmp stricmp +#define snprintf _snprintf +#endif +#ifdef _MSC_VER +#define strcasecmp stricmp #endif diff --git a/src/libical/caldate.c b/src/libical/caldate.c index f5554f6..1ce9178 100644 --- a/src/libical/caldate.c +++ b/src/libical/caldate.c @@ -72,13 +72,13 @@ struct ut_instant * date; ka = (long) jd; if ( jd >= 2299161L ) { - ialp = ( (double) jd - 1867216.25 ) / ( 36524.25 ); + ialp = (long) (((double) jd) - 1867216.25 ) / 36524.25; ka = jd + 1L + ialp - ( ialp >> 2 ); } kb = ka + 1524L; - kc = ( (double) kb - 122.1 ) / 365.25; - kd = (double) kc * 365.25; - ke = (double) ( kb - kd ) / 30.6001; + kc = (long) ((double) kb - 122.1 ) / 365.25; + kd = (long) (double) kc * 365.25; + ke = (long) (double) ( kb - kd ) / 30.6001; date->day = kb - kd - ((long) ( (double) ke * 30.6001 )); if ( ke > 13L ) date->month = ke - 13L; @@ -93,9 +93,9 @@ struct ut_instant * date; else date->year = kc - 4715L; date->i_hour = date->d_hour = frac * 24.0; /* hour */ - date->i_minute = date->d_minute = + date->i_minute = date->d_minute = (long) ( date->d_hour - (double) date->i_hour ) * 60.0; /* minute */ - date->i_second = date->d_second = + date->i_second = date->d_second = (long) ( date->d_minute - (double) date->i_minute ) * 60.0;/* second */ date->weekday = (jd + 1L) % 7L; /* day of week */ if ( date->year == ((date->year >> 2) << 2) ) diff --git a/src/libical/ical_file.cmake b/src/libical/ical_file.cmake index 134b079..21da350 100644 --- a/src/libical/ical_file.cmake +++ b/src/libical/ical_file.cmake @@ -21,7 +21,7 @@ set(COMBINEDHEADERSICAL ${TOPS}/src/libical/icaltimezone.h ${TOPS}/src/libical/icalparser.h ${TOPS}/src/libical/icalmemory.h - ${TOPS}/src/libical/icalerror.h + ${TOPB}/src/libical/icalerror.h ${TOPS}/src/libical/icalrestriction.h ${TOPS}/src/libical/sspm.h ${TOPS}/src/libical/icalmime.h diff --git a/src/libical/icalarray.c b/src/libical/icalarray.c index d36a816..f382a2a 100644 --- a/src/libical/icalarray.c +++ b/src/libical/icalarray.c @@ -38,7 +38,6 @@ #include "icalarray.h" #include "icalerror.h" - static void icalarray_expand (icalarray *array, int space_needed); @@ -61,20 +60,65 @@ icalarray_new (int element_size, array->increment_size = increment_size; array->num_elements = 0; array->space_allocated = 0; - array->data = NULL; + array->chunks = NULL; + + return array; +} + +static void * +icalarray_alloc_chunk(icalarray *array) +{ + void *chunk = malloc(array->element_size * array->increment_size); + if (!chunk) + icalerror_set_errno(ICAL_NEWFAILED_ERROR); + return chunk; +} + +icalarray *icalarray_copy (icalarray *originalarray) +{ + icalarray *array = icalarray_new(originalarray->element_size, originalarray->increment_size); + int chunks = originalarray->space_allocated / originalarray->increment_size; + int chunk; + + if (!array) + return NULL; + + array->num_elements = originalarray->num_elements; + array->space_allocated = originalarray->space_allocated; + + array->chunks = malloc(chunks * sizeof (void *)); + if (array->chunks) { + for (chunk = 0; chunk < chunks; chunk++) { + array->chunks[chunk] = icalarray_alloc_chunk(array); + if (array->chunks[chunk]) + memcpy(array->chunks[chunk], originalarray->chunks[chunk], + array->increment_size * array->element_size); + } + + } else { + icalerror_set_errno(ICAL_ALLOCATION_ERROR); + } return array; } + /** @brief Destructor */ void icalarray_free (icalarray *array) { - if (array->data) - free (array->data); + if (array->chunks) { + int chunks = array->space_allocated / array->increment_size; + int chunk; + for (chunk = 0; chunk < chunks; chunk++) + free(array->chunks[chunk]); + free (array->chunks); + array->chunks = 0; + } free (array); + array = 0; } @@ -82,12 +126,12 @@ void icalarray_append (icalarray *array, const void *element) { + int pos; if (array->num_elements >= array->space_allocated) icalarray_expand (array, 1); - memcpy ((char *)(array->data) + ( array->num_elements * array->element_size ), element, - array->element_size); - array->num_elements++; + pos = array->num_elements++; + memcpy (icalarray_element_at(array, pos), element, array->element_size); } @@ -95,10 +139,12 @@ void* icalarray_element_at (icalarray *array, int position) { + int chunk = position / array->increment_size; + int offset = position % array->increment_size; + assert (position >= 0); assert ((unsigned int)position < array->num_elements); - - return (char *)(array->data) + (position * array->element_size); + return (char *)(array->chunks[chunk]) + (offset * array->element_size); } @@ -112,12 +158,12 @@ icalarray_remove_element_at (icalarray *array, assert (position >= 0); assert ((unsigned int)position < array->num_elements); - dest = (char *)array->data + (position * array->element_size); - elements_to_move = array->num_elements - position - 1; - - if (elements_to_move > 0) - memmove (dest, (char *)dest + array->element_size, - elements_to_move * array->element_size); + while (position < array->num_elements - 1) { + memmove(icalarray_element_at(array, position), + icalarray_element_at(array, position + 1), + array->element_size); + position++; + } array->num_elements--; } @@ -128,7 +174,26 @@ icalarray_sort (icalarray *array, int (*compare) (const void *, const void *)) { - qsort (array->data, array->num_elements, array->element_size, compare); + if (array->num_elements == 0) { + return; + } + + if (array->num_elements <= array->increment_size) { + qsort(array->chunks[0], array->num_elements, array->element_size, compare); + } else { + int pos; + void *tmp = malloc (array->num_elements * array->element_size); + if (!tmp) + return; + for (pos = 0; pos < array->num_elements; pos++) + memcpy((char *) tmp + array->element_size * pos, icalarray_element_at(array, pos), array->element_size); + + qsort (tmp, array->num_elements, array->element_size, compare); + + for (pos = 0; pos < array->num_elements; pos++) + memcpy(icalarray_element_at(array, pos), (char *) tmp + array->element_size * pos, array->element_size); + free (tmp); + } } @@ -136,28 +201,27 @@ static void icalarray_expand (icalarray *array, int space_needed) { - int new_space_allocated; - void *new_data; - - new_space_allocated = array->space_allocated + array->increment_size; - - if ((unsigned int)space_needed > array->increment_size) - new_space_allocated += space_needed; - - /* - new_data = realloc (array->data, - new_space_allocated * array->element_size); - */ - new_data = malloc(new_space_allocated * array->element_size); - - if (new_data) { - memcpy(new_data,array->data,array->element_size*array->space_allocated); - free(array->data); - array->data = new_data; - array->space_allocated = new_space_allocated; - } else { + int num_chunks = array->space_allocated / array->increment_size; + int num_new_chunks; + int c; + void **new_chunks; + + num_new_chunks = (space_needed + array->increment_size - 1) / array->increment_size; + if (!num_new_chunks) + num_new_chunks = 1; + + new_chunks = malloc ((num_chunks + num_new_chunks) * sizeof (void *)); + + if (new_chunks) { + memcpy(new_chunks, array->chunks, num_chunks * sizeof (void *)); + for (c = 0; c < num_new_chunks; c++) + new_chunks[c + num_chunks] = icalarray_alloc_chunk(array); + if (array->chunks) + free (array->chunks); + array->chunks = new_chunks; + array->space_allocated = array->space_allocated + num_new_chunks * array->increment_size; + } else icalerror_set_errno(ICAL_ALLOCATION_ERROR); - } } diff --git a/src/libical/icalarray.h b/src/libical/icalarray.h index ab92a9e..93620de 100644 --- a/src/libical/icalarray.h +++ b/src/libical/icalarray.h @@ -39,13 +39,14 @@ struct _icalarray { unsigned int increment_size; unsigned int num_elements; unsigned int space_allocated; - void *data; + void **chunks; }; icalarray *icalarray_new (int element_size, int increment_size); +icalarray *icalarray_copy (icalarray *array); void icalarray_free (icalarray *array); void icalarray_append (icalarray *array, diff --git a/src/libical/icalattach.c b/src/libical/icalattach.c index 14bdd46..6c6ff07 100644 --- a/src/libical/icalattach.c +++ b/src/libical/icalattach.c @@ -63,7 +63,7 @@ icalattach_new_from_url (const char *url) } icalattach * -icalattach_new_from_data (unsigned char *data, icalattach_free_fn_t free_fn, +icalattach_new_from_data (const char *data, icalattach_free_fn_t free_fn, void *free_fn_data) { icalattach *attach; diff --git a/src/libical/icalattach.h b/src/libical/icalattach.h index 4189d4b..5a82ab8 100644 --- a/src/libical/icalattach.h +++ b/src/libical/icalattach.h @@ -30,7 +30,7 @@ typedef struct icalattach_impl icalattach; typedef void (* icalattach_free_fn_t) (unsigned char *data, void *user_data); icalattach *icalattach_new_from_url (const char *url); -icalattach *icalattach_new_from_data (unsigned char *data, +icalattach *icalattach_new_from_data (const char *data, icalattach_free_fn_t free_fn, void *free_fn_data); void icalattach_ref (icalattach *attach); diff --git a/src/libical/icalattachimpl.h b/src/libical/icalattachimpl.h index 86d0f6e..952b849 100644 --- a/src/libical/icalattachimpl.h +++ b/src/libical/icalattachimpl.h @@ -46,7 +46,7 @@ struct icalattach_impl { /* Inline data */ struct { - unsigned char *data; + char *data; icalattach_free_fn_t free_fn; void *free_fn_data; } data; diff --git a/src/libical/icalcomponent.c b/src/libical/icalcomponent.c index 4b01c7e..ed08546 100644 --- a/src/libical/icalcomponent.c +++ b/src/libical/icalcomponent.c @@ -47,6 +47,11 @@ #include <string.h> /* for strdup */ #include <limits.h> /* for INT_MAX */ +#ifdef _MSC_VER +#define snprintf _snprintf +#define strncasecmp strnicmp +#endif + struct icalcomponent_impl { char id[5]; @@ -81,7 +86,7 @@ static void icalcomponent_handle_conflicting_vtimezones (icalcomponent *comp, icalproperty *tzid_prop, const char *tzid, icalarray *tzids_to_rename); -static unsigned int icalcomponent_get_tzid_prefix_len (const char *tzid); +static size_t icalcomponent_get_tzid_prefix_len (const char *tzid); static void icalcomponent_rename_tzids(icalcomponent* comp, icalarray* rename_table); static void icalcomponent_rename_tzids_callback(icalparameter *param, @@ -90,6 +95,8 @@ static int icalcomponent_compare_vtimezones (icalcomponent *vtimezone1, icalcomponent *vtimezone2); static int icalcomponent_compare_timezone_fn (const void *elem1, const void *elem2); +static struct icaltimetype +icalcomponent_get_datetime(icalcomponent *comp, icalproperty *prop); void icalcomponent_add_children(icalcomponent *impl, va_list args) @@ -245,24 +252,22 @@ icalcomponent_free (icalcomponent* c) if(c != 0 ){ - if ( c->properties != 0 ) - { - while( (prop=pvl_pop(c->properties)) != 0){ - assert(prop != 0); - icalproperty_set_parent(prop,0); - icalproperty_free(prop); - } - pvl_free(c->properties); - } + if ( c->properties != 0 ) + { + while( (prop=pvl_pop(c->properties)) != 0){ + icalproperty_set_parent(prop,0); + icalproperty_free(prop); + } + pvl_free(c->properties); + } - while( (comp=pvl_data(pvl_head(c->components))) != 0){ - assert(comp!=0); - icalcomponent_remove_component(c,comp); - icalcomponent_free(comp); - } + while( (comp=pvl_data(pvl_head(c->components))) != 0){ + icalcomponent_remove_component(c,comp); + icalcomponent_free(comp); + } - pvl_free(c->components); + pvl_free(c->components); if (c->x_name != 0) { free(c->x_name); @@ -312,9 +317,6 @@ icalcomponent_as_ical_string_r (icalcomponent* impl) const char* kind_string; - buf = icalmemory_new_buffer(buf_size); - buf_ptr = buf; - icalerror_check_arg_rz( (impl!=0), "component"); icalerror_check_arg_rz( (kind!=ICAL_NO_COMPONENT), "component kind is ICAL_NO_COMPONENT"); @@ -326,6 +328,9 @@ icalcomponent_as_ical_string_r (icalcomponent* impl) icalerror_check_arg_rz( (kind_string!=0),"Unknown kind of component"); + buf = icalmemory_new_buffer(buf_size); + buf_ptr = buf; + icalmemory_append_string(&buf, &buf_ptr, &buf_size, "BEGIN:"); icalmemory_append_string(&buf, &buf_ptr, &buf_size, kind_string); icalmemory_append_string(&buf, &buf_ptr, &buf_size, newline); @@ -390,7 +395,6 @@ icalcomponent_isa (const icalcomponent* component) { return component->kind; } - return ICAL_NO_COMPONENT; } @@ -432,8 +436,13 @@ icalcomponent_remove_property (icalcomponent* component, icalproperty* property) icalerror_check_arg_rv( (component!=0), "component"); icalerror_check_arg_rv( (property!=0), "property"); +#ifdef ICAL_REMOVE_NONMEMBER_COMPONENT_IS_ERROR icalerror_assert( (icalproperty_get_parent(property)),"The property is not a member of a component"); - +#else + if(icalproperty_get_parent(property) == 0){ + return; + } +#endif for( itr = pvl_head(component->properties); itr != 0; @@ -481,7 +490,7 @@ icalproperty* icalcomponent_get_current_property (icalcomponent* component) { icalerror_check_arg_rz( (component!=0),"component"); - if ((component->property_iterator==0)){ + if (component->property_iterator==0){ return 0; } @@ -847,23 +856,27 @@ int icalproperty_recurrence_is_excluded(icalcomponent *comp, struct icaltimetype *dtstart, struct icaltimetype *recurtime) { icalproperty *exdate, *exrule; - pvl_elem property_iterator = comp->property_iterator; + pvl_elem property_iterator; if (comp == NULL || dtstart == NULL || recurtime == NULL || icaltime_is_null_time(*recurtime)) /* BAD DATA */ - return 1; + return 1; + + property_iterator = comp->property_iterator; /** first test against the exdate values **/ for (exdate = icalcomponent_get_first_property(comp,ICAL_EXDATE_PROPERTY); exdate != NULL; exdate = icalcomponent_get_next_property(comp,ICAL_EXDATE_PROPERTY)) { - struct icaltimetype exdatetime = icalproperty_get_exdate(exdate); + struct icaltimetype exdatetime = icalcomponent_get_datetime(comp, exdate); - if (icaltime_compare(*recurtime, exdatetime) == 0) { + if ((icaltime_is_date(exdatetime) + && icaltime_compare_date_only(*recurtime, exdatetime) == 0) || + (icaltime_compare(*recurtime, exdatetime) == 0)) { /** MATCHED **/ comp->property_iterator = property_iterator; @@ -880,7 +893,7 @@ int icalproperty_recurrence_is_excluded(icalcomponent *comp, icalrecur_iterator *exrule_itr = icalrecur_iterator_new(recur, *dtstart); struct icaltimetype exrule_time; - while (1) { + while (exrule_itr) { int result; exrule_time = icalrecur_iterator_next(exrule_itr); @@ -988,7 +1001,7 @@ void icalcomponent_foreach_recurrence(icalcomponent* comp, struct icaltimetype dtstart, dtend; icaltime_span recurspan, basespan, limit_span; time_t limit_start, limit_end; - int dtduration; + time_t dtduration; icalproperty *rrule, *rdate; struct icaldurationtype dur; pvl_elem property_iterator; /* for saving the iterator */ @@ -1042,16 +1055,22 @@ void icalcomponent_foreach_recurrence(icalcomponent* comp, struct icalrecurrencetype recur = icalproperty_get_rrule(rrule); icalrecur_iterator *rrule_itr = icalrecur_iterator_new(recur, dtstart); - struct icaltimetype rrule_time = icalrecur_iterator_next(rrule_itr); + struct icaltimetype rrule_time; + if(rrule_itr) + rrule_time = icalrecur_iterator_next(rrule_itr); /** note that icalrecur_iterator_next always returns dtstart the first time.. **/ - while (1) { + while (rrule_itr) { rrule_time = icalrecur_iterator_next(rrule_itr); if (icaltime_is_null_time(rrule_time)) break; + /* if we have iterated past end time, then no need to check any further */ + if (icaltime_compare(rrule_time, end) > 0) + break; + dur = icaltime_subtract(rrule_time, dtstart); recurspan.start = basespan.start + icaldurationtype_as_int(dur); @@ -1097,6 +1116,7 @@ void icalcomponent_foreach_recurrence(icalcomponent* comp, if (!icalproperty_recurrence_is_excluded(comp, &dtstart, &rdate_period.time)) { /** call callback action **/ + if (icaltime_span_overlaps(&recurspan, &limit_span)) (*callback) (comp, &recurspan, callback_data); } comp->property_iterator = property_iterator; @@ -1166,6 +1186,8 @@ void icalcomponent_strip_errors(icalcomponent* component) if(icalproperty_isa(p) == ICAL_XLICERROR_PROPERTY) { icalcomponent_remove_property(component,p); + icalproperty_free(p); + p = NULL; } } @@ -1233,6 +1255,8 @@ void icalcomponent_convert_errors(icalcomponent* component) icalproperty_new_requeststatus(rst)); icalcomponent_remove_property(component,p); + icalproperty_free(p); + p = NULL; } } } @@ -1611,17 +1635,20 @@ struct icaltimetype icalcomponent_get_dtend(icalcomponent* comp) struct icaltimetype ret = icaltime_null_time(); if ( end_prop != 0) { - ret = icalcomponent_get_datetime(comp, end_prop); - } else if ( dur_prop != 0) { - - struct icaltimetype start = - icalcomponent_get_dtstart(inner); - struct icaldurationtype duration = - icalproperty_get_duration(dur_prop); + ret = icalcomponent_get_datetime(comp, end_prop); + } else if ( dur_prop != 0) { - struct icaltimetype end = icaltime_add(start,duration); + struct icaltimetype start = icalcomponent_get_dtstart(inner); + struct icaldurationtype duration; + + //extra check to prevent empty durations from crashing + if (icalproperty_get_value(dur_prop)) { + duration = icalproperty_get_duration(dur_prop); + } else { + duration = icaldurationtype_null_duration(); + } - ret = end; + ret = icaltime_add(start,duration); } return ret; @@ -2027,51 +2054,51 @@ enum icalproperty_status icalcomponent_get_status(icalcomponent* comp){ return icalproperty_get_status(prop); } -icalcomponent* icalcomponent_new_vcalendar() +icalcomponent* icalcomponent_new_vcalendar(void) { return icalcomponent_new(ICAL_VCALENDAR_COMPONENT); } -icalcomponent* icalcomponent_new_vevent() +icalcomponent* icalcomponent_new_vevent(void) { return icalcomponent_new(ICAL_VEVENT_COMPONENT); } -icalcomponent* icalcomponent_new_vtodo() +icalcomponent* icalcomponent_new_vtodo(void) { return icalcomponent_new(ICAL_VTODO_COMPONENT); } -icalcomponent* icalcomponent_new_vjournal() +icalcomponent* icalcomponent_new_vjournal(void) { return icalcomponent_new(ICAL_VJOURNAL_COMPONENT); } -icalcomponent* icalcomponent_new_valarm() +icalcomponent* icalcomponent_new_valarm(void) { return icalcomponent_new(ICAL_VALARM_COMPONENT); } -icalcomponent* icalcomponent_new_vfreebusy() +icalcomponent* icalcomponent_new_vfreebusy(void) { return icalcomponent_new(ICAL_VFREEBUSY_COMPONENT); } -icalcomponent* icalcomponent_new_vtimezone() +icalcomponent* icalcomponent_new_vtimezone(void) { return icalcomponent_new(ICAL_VTIMEZONE_COMPONENT); } -icalcomponent* icalcomponent_new_xstandard() +icalcomponent* icalcomponent_new_xstandard(void) { return icalcomponent_new(ICAL_XSTANDARD_COMPONENT); } -icalcomponent* icalcomponent_new_xdaylight() +icalcomponent* icalcomponent_new_xdaylight(void) { return icalcomponent_new(ICAL_XDAYLIGHT_COMPONENT); } -icalcomponent* icalcomponent_new_vagenda() +icalcomponent* icalcomponent_new_vagenda(void) { return icalcomponent_new(ICAL_VAGENDA_COMPONENT); } -icalcomponent* icalcomponent_new_vquery() +icalcomponent* icalcomponent_new_vquery(void) { return icalcomponent_new(ICAL_VQUERY_COMPONENT); } -icalcomponent* icalcomponent_new_vreply() +icalcomponent* icalcomponent_new_vreply(void) { return icalcomponent_new(ICAL_VREPLY_COMPONENT); } @@ -2122,9 +2149,8 @@ void icalcomponent_merge_component(icalcomponent* comp, for (i = 0; i < tzids_to_rename->num_elements; i++) { free (icalarray_element_at (tzids_to_rename, i)); } - icalarray_free (tzids_to_rename); } - + icalarray_free (tzids_to_rename); /* Now move all the components from comp_to_merge to comp, excluding VTIMEZONE components. */ subcomp = icalcomponent_get_first_component (comp_to_merge, @@ -2209,7 +2235,7 @@ icalcomponent_handle_conflicting_vtimezones (icalcomponent *comp, icalarray *tzids_to_rename) { int i, suffix, max_suffix = 0, num_elements; - unsigned int tzid_len; + size_t tzid_len; char *tzid_copy, *new_tzid, suffix_buf[32]; (void)tzid_prop; /* hack to stop unused variable warning */ @@ -2228,7 +2254,7 @@ icalcomponent_handle_conflicting_vtimezones (icalcomponent *comp, icaltimezone *zone; const char *existing_tzid; const char *existing_tzid_copy; - unsigned int existing_tzid_len; + size_t existing_tzid_len; zone = icalarray_element_at (comp->timezones, i); existing_tzid = icaltimezone_get_tzid (zone); @@ -2245,11 +2271,17 @@ icalcomponent_handle_conflicting_vtimezones (icalcomponent *comp, /* The VTIMEZONEs match, so we can use the existing VTIMEZONE. But we have to rename TZIDs to this TZID. */ tzid_copy = strdup (tzid); + if(!tzid_copy) { + icalerror_set_errno(ICAL_NEWFAILED_ERROR); + return; + } existing_tzid_copy = strdup (existing_tzid); - if (!tzid_copy || !existing_tzid_copy) { + if (!existing_tzid_copy) { icalerror_set_errno(ICAL_NEWFAILED_ERROR); + free(tzid_copy); } else { icalarray_append (tzids_to_rename, tzid_copy); + free(tzid_copy); icalarray_append (tzids_to_rename, existing_tzid_copy); } return; @@ -2268,10 +2300,16 @@ icalcomponent_handle_conflicting_vtimezones (icalcomponent *comp, /* We didn't find a VTIMEZONE that matched, so we have to rename the TZID, using the maximum numerical suffix found + 1. */ tzid_copy = strdup (tzid); + if(!tzid_copy) { + icalerror_set_errno(ICAL_NEWFAILED_ERROR); + return; + } + snprintf (suffix_buf, sizeof(suffix_buf), "%i", max_suffix + 1); new_tzid = malloc (tzid_len + strlen (suffix_buf) + 1); - if (!new_tzid || !tzid_copy) { + if (!new_tzid) { icalerror_set_errno(ICAL_NEWFAILED_ERROR); + free(tzid_copy); return; } @@ -2279,13 +2317,15 @@ icalcomponent_handle_conflicting_vtimezones (icalcomponent *comp, strcpy (new_tzid + tzid_len, suffix_buf); icalarray_append (tzids_to_rename, tzid_copy); icalarray_append (tzids_to_rename, new_tzid); + free(tzid_copy); + free(new_tzid); } /* Returns the length of the TZID, without any trailing digits. */ -static unsigned int icalcomponent_get_tzid_prefix_len (const char *tzid) +static size_t icalcomponent_get_tzid_prefix_len (const char *tzid) { - int len; + size_t len; const char *p; len = strlen (tzid); @@ -2400,13 +2440,15 @@ icaltimezone* icalcomponent_get_timezone(icalcomponent* comp, const char *tzid) middle = (lower + upper) >> 1; zone = icalarray_element_at (comp->timezones, middle); zone_tzid = icaltimezone_get_tzid (zone); - cmp = strcmp (tzid, zone_tzid); - if (cmp == 0) - return zone; - else if (cmp < 0) - upper = middle; - else - lower = middle + 1; + if (zone_tzid != NULL) { + cmp = strcmp (tzid, zone_tzid); + if (cmp == 0) + return zone; + else if (cmp < 0) + upper = middle; + else + lower = middle + 1; + } } return NULL; @@ -2569,9 +2611,7 @@ struct icaltimetype icalcomponent_get_due(icalcomponent* comp) icalproperty *dur_prop = icalcomponent_get_first_property(inner, ICAL_DURATION_PROPERTY); - if( due_prop == 0 && dur_prop == 0){ - return icaltime_null_time(); - } else if ( due_prop != 0) { + if ( due_prop != 0) { return icalproperty_get_due(due_prop); } else if ( dur_prop != 0) { @@ -2584,13 +2624,8 @@ struct icaltimetype icalcomponent_get_due(icalcomponent* comp) return due; - } else { - /* Error, both duration and due have been specified */ - icalerror_set_errno(ICAL_MALFORMEDDATA_ERROR); - return icaltime_null_time(); - } - + return icaltime_null_time(); } /** @brief Set the due date of a VTODO task. @@ -2632,8 +2667,5 @@ void icalcomponent_set_due(icalcomponent* comp, struct icaltimetype v) icalproperty_set_duration(dur_prop,dur); - } else { - /* Error, both duration and due have been specified */ - icalerror_set_errno(ICAL_MALFORMEDDATA_ERROR); } } diff --git a/src/libical/icalcomponent.h b/src/libical/icalcomponent.h index d963249..338dac1 100644 --- a/src/libical/icalcomponent.h +++ b/src/libical/icalcomponent.h @@ -270,16 +270,16 @@ void icalcomponent_foreach_recurrence(icalcomponent* comp, /*************** Type Specific routines ***************/ -icalcomponent* icalcomponent_new_vcalendar(); -icalcomponent* icalcomponent_new_vevent(); -icalcomponent* icalcomponent_new_vtodo(); -icalcomponent* icalcomponent_new_vjournal(); -icalcomponent* icalcomponent_new_valarm(); -icalcomponent* icalcomponent_new_vfreebusy(); -icalcomponent* icalcomponent_new_vtimezone(); -icalcomponent* icalcomponent_new_xstandard(); -icalcomponent* icalcomponent_new_xdaylight(); -icalcomponent* icalcomponent_new_vagenda(); -icalcomponent* icalcomponent_new_vquery(); +icalcomponent* icalcomponent_new_vcalendar(void); +icalcomponent* icalcomponent_new_vevent(void); +icalcomponent* icalcomponent_new_vtodo(void); +icalcomponent* icalcomponent_new_vjournal(void); +icalcomponent* icalcomponent_new_valarm(void); +icalcomponent* icalcomponent_new_vfreebusy(void); +icalcomponent* icalcomponent_new_vtimezone(void); +icalcomponent* icalcomponent_new_xstandard(void); +icalcomponent* icalcomponent_new_xdaylight(void); +icalcomponent* icalcomponent_new_vagenda(void); +icalcomponent* icalcomponent_new_vquery(void); #endif /* !ICALCOMPONENT_H */ diff --git a/src/libical/icalderivedparameter.c.in b/src/libical/icalderivedparameter.c.in index 918efa1..2a66539 100644 --- a/src/libical/icalderivedparameter.c.in +++ b/src/libical/icalderivedparameter.c.in @@ -38,13 +38,14 @@ #include "icalproperty.h" #include "icalerror.h" #include "icalmemory.h" +#include "icaltypes.h" #include <stdlib.h> /* for malloc() */ #include <errno.h> #include <string.h> /* for memset() */ -#ifdef WIN32 -#define strcasecmp stricmp +#ifdef _MSC_VER +#define strcasecmp stricmp #endif icalvalue_kind icalparameter_value_to_value_kind(icalparameter_value value); @@ -98,21 +99,25 @@ icalparameter_kind icalparameter_string_to_kind(const char* string) int i; if (string ==0 ) { - return ICAL_NO_PARAMETER; + return ICAL_NO_PARAMETER; } for (i=0; parameter_map[i].kind != ICAL_NO_PARAMETER; i++) { - if (strcasecmp(parameter_map[i].name, string) == 0) { - return parameter_map[i].kind; - } + if (strcasecmp(parameter_map[i].name, string) == 0) { + return parameter_map[i].kind; + } } if(strncmp(string,"X-",2)==0){ - return ICAL_X_PARAMETER; + return ICAL_X_PARAMETER; } - return ICAL_NO_PARAMETER; + if (ical_get_unknown_token_handling_setting() == ICAL_TREAT_AS_ERROR) { + return ICAL_NO_PARAMETER; + } else { + return ICAL_IANA_PARAMETER; + } } diff --git a/src/libical/icalderivedproperty.c.in b/src/libical/icalderivedproperty.c.in index b4f29f1..f74c6f0 100644 --- a/src/libical/icalderivedproperty.c.in +++ b/src/libical/icalderivedproperty.c.in @@ -43,9 +43,9 @@ #include <errno.h> #include <stdio.h> /* for printf */ #include <stdarg.h> /* for va_list, va_start, etc. */ - -#ifdef WIN32 -#define strcasecmp stricmp + +#ifdef _MSC_VER +#define strcasecmp stricmp #endif struct icalproperty_impl* @@ -192,7 +192,8 @@ int icalproperty_kind_and_string_to_enum(const int kind, const char* str) return 0; for (; i != ICALPROPERTY_LAST_ENUM; i++) { - if ( strcasecmp(enum_map[i-ICALPROPERTY_FIRST_ENUM].str, str) == 0) { + if(enum_map[i-ICALPROPERTY_FIRST_ENUM].prop == pkind && + strcasecmp(enum_map[i-ICALPROPERTY_FIRST_ENUM].str, str) == 0) { return enum_map[i-ICALPROPERTY_FIRST_ENUM].prop_enum; } } diff --git a/src/libical/icalderivedproperty.h.in b/src/libical/icalderivedproperty.h.in index 99f1b70..44f6f31 100644 --- a/src/libical/icalderivedproperty.h.in +++ b/src/libical/icalderivedproperty.h.in @@ -4,7 +4,18 @@ CREATOR: eric 09 May 1999 $Id: icalderivedproperty.h.in,v 1.7 2007-04-30 13:57:48 artcancro Exp $ - + + This program is free software; you can redistribute it and/or modify + it under the terms of either: + + The LGPL as published by the Free Software Foundation, version + 2.1, available at: http://www.fsf.org/copyleft/lesser.html + + Or: + + The Mozilla Public License Version 1.0. You may obtain a copy of + the License at http://www.mozilla.org/MPL/ + (C) COPYRIGHT 2000, Eric Busboom, http://www.softwarestudio.org ======================================================================*/ diff --git a/src/libical/icalderivedvalue.c.in b/src/libical/icalderivedvalue.c.in index 3074432..c0515ad 100644 --- a/src/libical/icalderivedvalue.c.in +++ b/src/libical/icalderivedvalue.c.in @@ -47,8 +47,8 @@ #include <stdlib.h> /* for atoi and atof */ #include <limits.h> /* for SHRT_MAX */ -#ifdef WIN32 -#define strcasecmp stricmp +#ifdef _MSC_VER +#define strcasecmp stricmp #endif struct icalvalue_impl* icalvalue_new_impl(icalvalue_kind kind); @@ -102,9 +102,11 @@ icalvalue_kind icalvalue_string_to_kind(const char* str) } icalvalue* icalvalue_new_x (const char* v){ - struct icalvalue_impl* impl = icalvalue_new_impl(ICAL_X_VALUE); + struct icalvalue_impl* impl; icalerror_check_arg_rz( (v!=0),"v"); + impl = icalvalue_new_impl(ICAL_X_VALUE); + icalvalue_set_x((icalvalue*)impl,v); return (icalvalue*)impl; } @@ -123,7 +125,7 @@ void icalvalue_set_x(icalvalue* impl, const char* v) { } const char* icalvalue_get_x(const icalvalue* value) { - icalerror_check_arg( (value!=0),"value"); + icalerror_check_arg_rz( (value!=0),"value"); icalerror_check_value_type(value, ICAL_X_VALUE); return value->x_value; } @@ -164,7 +166,10 @@ icalvalue_set_recur(icalvalue* impl, struct icalrecurrencetype v) struct icalrecurrencetype icalvalue_get_recur(const icalvalue* value) { - icalerror_check_arg( (value!=0),"value"); + struct icalrecurrencetype rt; + icalrecurrencetype_clear(&rt); + + icalerror_check_arg_rx( (value!=0),"value", rt); icalerror_check_value_type(value, ICAL_RECUR_VALUE); return *(value->data.v_recur); @@ -202,24 +207,64 @@ icalvalue_get_trigger(const icalvalue* impl) { struct icaltriggertype tr; - icalerror_check_arg( (impl!=0),"value"); - icalerror_check_arg( (impl!=0),"value"); + tr.duration = icaldurationtype_from_int(0); + tr.time = icaltime_null_time(); - if(impl->kind == ICAL_DATETIME_VALUE){ - tr.duration = icaldurationtype_from_int(0); - tr.time = impl->data.v_time; - } else if(impl->kind == ICAL_DURATION_VALUE){ + icalerror_check_arg_rx( (impl!=0),"value", tr); + + if(impl) { + if(impl->kind == ICAL_DATETIME_VALUE){ + tr.duration = icaldurationtype_from_int(0); + tr.time = impl->data.v_time; + } else if(impl->kind == ICAL_DURATION_VALUE){ tr.time = icaltime_null_time(); tr.duration = impl->data.v_duration; - } else { + } else { tr.duration = icaldurationtype_from_int(0); tr.time = icaltime_null_time(); icalerror_set_errno(ICAL_BADARG_ERROR); + } + } else { + tr.duration = icaldurationtype_from_int(0); + tr.time = icaltime_null_time(); + icalerror_set_errno(ICAL_BADARG_ERROR); } - + return tr; } +icalvalue* +icalvalue_new_datetime (struct icaltimetype v){ + + struct icalvalue_impl* impl = icalvalue_new_impl(ICAL_DATETIME_VALUE); + icalvalue_set_datetime((icalvalue*)impl,v); + return (icalvalue*)impl; +} + +void +icalvalue_set_datetime(icalvalue* value, struct icaltimetype v) { + struct icalvalue_impl* impl; + icalerror_check_arg_rv( (value!=0),"value"); + + icalerror_check_value_type(value, ICAL_DATETIME_VALUE); + impl = (struct icalvalue_impl*)value; + + + impl->data.v_time = v; + + icalvalue_reset_kind(impl); +} + +struct icaltimetype +icalvalue_get_datetime (const icalvalue* value) { + struct icaltimetype dt; + dt = icaltime_null_time(); + + icalerror_check_arg_rx((value!=0),"value", dt); + icalerror_check_value_type (value, ICAL_DATETIME_VALUE); + return ((struct icalvalue_impl*)value)->data.v_time; +} + /* DATE-TIME-PERIOD is a special case, and is not auto generated */ icalvalue* @@ -262,25 +307,98 @@ struct icaldatetimeperiodtype icalvalue_get_datetimeperiod(const icalvalue* impl) { struct icaldatetimeperiodtype dtp; - - icalerror_check_arg( (impl!=0),"value"); + + dtp.period = icalperiodtype_null_period(); + dtp.time = icaltime_null_time(); + + icalerror_check_arg_rx( (impl!=0),"value", dtp); icalerror_check_value_type(value, ICAL_DATETIMEPERIOD_VALUE); - - if( impl->kind == ICAL_DATETIME_VALUE || impl->kind == ICAL_DATE_VALUE ){ + + if(impl) { + if( impl->kind == ICAL_DATETIME_VALUE || impl->kind == ICAL_DATE_VALUE ){ dtp.period = icalperiodtype_null_period(); dtp.time = impl->data.v_time; - } else if(impl->kind == ICAL_PERIOD_VALUE) { + } else if(impl->kind == ICAL_PERIOD_VALUE) { dtp.period = impl->data.v_period; dtp.time = icaltime_null_time(); - } else { + } else { dtp.period = icalperiodtype_null_period(); dtp.time = icaltime_null_time(); icalerror_set_errno(ICAL_BADARG_ERROR); + } + } else { + dtp.period = icalperiodtype_null_period(); + dtp.time = icaltime_null_time(); + icalerror_set_errno(ICAL_BADARG_ERROR); } return dtp; } +icalvalue* +icalvalue_new_class (enum icalproperty_class v){ + + struct icalvalue_impl* impl = icalvalue_new_impl(ICAL_CLASS_VALUE); + icalvalue_set_class((icalvalue*)impl,v); + return (icalvalue*)impl; +} + +void +icalvalue_set_class(icalvalue* value, enum icalproperty_class v) { + struct icalvalue_impl* impl; + icalerror_check_arg_rv( (value!=0),"value"); + + icalerror_check_value_type(value, ICAL_CLASS_VALUE); + impl = (struct icalvalue_impl*)value; + + impl->data.v_enum = v; + + icalvalue_reset_kind(impl); +} + +enum icalproperty_class +icalvalue_get_class (const icalvalue* value) { + + icalproperty_class pr; + pr = ICAL_CLASS_NONE; + + icalerror_check_arg_rx ((value!=NULL),"value", pr); + icalerror_check_arg ((value!=0),"value"); + icalerror_check_value_type (value, ICAL_CLASS_VALUE); + return ((struct icalvalue_impl*)value)->data.v_enum; +} + +icalvalue* +icalvalue_new_geo (struct icalgeotype v){ + + struct icalvalue_impl* impl = icalvalue_new_impl(ICAL_GEO_VALUE); + icalvalue_set_geo((icalvalue*)impl,v); + return (icalvalue*)impl; +} + +void +icalvalue_set_geo(icalvalue* value, struct icalgeotype v) { + struct icalvalue_impl* impl; + icalerror_check_arg_rv( (value!=0),"value"); + + icalerror_check_value_type(value, ICAL_GEO_VALUE); + impl = (struct icalvalue_impl*)value; + + impl->data.v_geo = v; + + icalvalue_reset_kind(impl); +} + +struct icalgeotype +icalvalue_get_geo (const icalvalue* value) { + struct icalgeotype gt; + gt.lat = 255.0; + gt.lon = 255.0; + + icalerror_check_arg_rx((value!=0),"value", gt); + icalerror_check_value_type (value, ICAL_GEO_VALUE); + return ((struct icalvalue_impl*)value)->data.v_geo; +} icalvalue * diff --git a/src/libical/icalderivedvalue.h.in b/src/libical/icalderivedvalue.h.in index 35c542e..5c6e2b5 100644 --- a/src/libical/icalderivedvalue.h.in +++ b/src/libical/icalderivedvalue.h.in @@ -38,8 +38,6 @@ typedef struct icalvalue_impl icalvalue; - - void icalvalue_set_x(icalvalue* value, const char* v); icalvalue* icalvalue_new_x(const char* v); const char* icalvalue_get_x(const icalvalue* value); @@ -52,10 +50,19 @@ icalvalue* icalvalue_new_trigger (struct icaltriggertype v); void icalvalue_set_trigger(icalvalue* value, struct icaltriggertype v); struct icaltriggertype icalvalue_get_trigger(const icalvalue* value); +icalvalue* icalvalue_new_datetime(struct icaltimetype v); +struct icaltimetype icalvalue_get_datetime(const icalvalue* value); +void icalvalue_set_datetime(icalvalue* value, struct icaltimetype v); + icalvalue* icalvalue_new_datetimeperiod (struct icaldatetimeperiodtype v); void icalvalue_set_datetimeperiod(icalvalue* value, struct icaldatetimeperiodtype v); struct icaldatetimeperiodtype icalvalue_get_datetimeperiod(const icalvalue* value); +/* GEO */ +icalvalue* icalvalue_new_geo(struct icalgeotype v); +struct icalgeotype icalvalue_get_geo(const icalvalue* value); +void icalvalue_set_geo(icalvalue* value, struct icalgeotype v); + icalvalue *icalvalue_new_attach (icalattach *attach); void icalvalue_set_attach (icalvalue *value, icalattach *attach); icalattach *icalvalue_get_attach (const icalvalue *value); @@ -63,3 +70,8 @@ icalattach *icalvalue_get_attach (const icalvalue *value); void icalvalue_reset_kind(icalvalue* value); <insert_code_here> + + +icalvalue* icalvalue_new_class(enum icalproperty_class v); +enum icalproperty_class icalvalue_get_class(const icalvalue* value); +void icalvalue_set_class(icalvalue* value, enum icalproperty_class v); diff --git a/src/libical/icalduration.c b/src/libical/icalduration.c index 8f20858..df11d18 100644 --- a/src/libical/icalduration.c +++ b/src/libical/icalduration.c @@ -40,8 +40,9 @@ #include "icalmemory.h" #include "icalvalue.h" - - +#if defined(_MSC_VER) +#define snprintf _snprintf +#endif /* From Seth Alves, <alves@hungry.com> */ struct icaldurationtype icaldurationtype_from_int(int t) @@ -79,10 +80,9 @@ struct icaldurationtype icaldurationtype_from_string(const char* str) int begin_flag = 0; int time_flag = 0; int date_flag = 0; - int week_flag = 0; int digits=-1; int scan_size = -1; - int size = strlen(str); + size_t size = strlen(str); char p; struct icaldurationtype d; @@ -137,19 +137,19 @@ struct icaldurationtype icaldurationtype_from_string(const char* str) } case 'H': { - if (time_flag == 0||week_flag == 1||d.hours !=0||digits ==-1) + if (time_flag == 0||d.hours !=0||digits ==-1) goto error; d.hours = digits; digits = -1; break; } case 'M': { - if (time_flag == 0||week_flag==1||d.minutes != 0||digits ==-1) + if (time_flag == 0||d.minutes != 0||digits ==-1) goto error; d.minutes = digits; digits = -1; break; } case 'S': { - if (time_flag == 0||week_flag==1||d.seconds!=0||digits ==-1) + if (time_flag == 0||d.seconds!=0||digits ==-1) goto error; d.seconds = digits; digits = -1; break; @@ -157,12 +157,11 @@ struct icaldurationtype icaldurationtype_from_string(const char* str) case 'W': { if (time_flag==1||date_flag==1||d.weeks!=0||digits ==-1) goto error; - week_flag = 1; d.weeks = digits; digits = -1; break; } case 'D': { - if (time_flag==1||week_flag==1||d.days!=0||digits ==-1) + if (time_flag==1||d.days!=0||digits ==-1) goto error; date_flag = 1; d.days = digits; digits = -1; diff --git a/src/libical/icalenums.c b/src/libical/icalenums.c index b27480e..80720b6 100644 --- a/src/libical/icalenums.c +++ b/src/libical/icalenums.c @@ -37,6 +37,10 @@ #include <assert.h> #include "icalmemory.h" +#if defined(_MSC_VER) +#define snprintf _snprintf +#endif + /*** @brief Allowed request status values */ static const struct { diff --git a/src/libical/icalerror.c b/src/libical/icalerror.c index 4cff753..f269718 100644 --- a/src/libical/icalerror.c +++ b/src/libical/icalerror.c @@ -189,7 +189,7 @@ icalerrorstate icalerror_supress(const char* error){ return es; } -const char* icalerror_perror() +const char* icalerror_perror(void) { return icalerror_strerror(icalerrno); } diff --git a/src/libical/icalerror.h b/src/libical/icalerror.h.cmake index 3d660c3..88021f5 100644 --- a/src/libical/icalerror.h +++ b/src/libical/icalerror.h.cmake @@ -64,12 +64,26 @@ typedef enum icalerrorenum { icalerrorenum * icalerrno_return(void); #define icalerrno (*(icalerrno_return())) +#cmakedefine LIBICAL_STATIC 1 + /** If true, libicl aborts after a call to icalerror_set_error * * @warning NOT THREAD SAFE -- recommended that you do not change * this in a multithreaded program. */ -extern int icalerror_errors_are_fatal; +#ifdef _MSC_VER + #if defined(LIBICAL_STATIC) + #define LIBICAL_EXPORT extern + #elif defined(BUILD_LIBICALDLL) + #define LIBICAL_EXPORT __declspec(dllexport) + #else + #define LIBICAL_EXPORT __declspec(dllimport) + #endif +#else + #define LIBICAL_EXPORT extern +#endif + +LIBICAL_EXPORT int icalerror_errors_are_fatal; /* Warning messages */ @@ -92,7 +106,7 @@ typedef enum icalerrorstate { } icalerrorstate ; const char* icalerror_strerror(icalerrorenum e); -const char* icalerror_perror(); +const char* icalerror_perror(void); void ical_bt(void); void icalerror_set_error_state( icalerrorenum error, icalerrorstate); icalerrorstate icalerror_get_error_state( icalerrorenum error); @@ -111,7 +125,11 @@ if(icalerror_get_error_state(x)==ICAL_ERROR_FATAL || \ void icalerror_set_errno(icalerrorenum x); #endif -#ifdef ICAL_ERRORS_ARE_FATAL +#if !defined(ICAL_ERRORS_ARE_FATAL) +#define ICAL_ERRORS_ARE_FATAL 0 +#endif + +#if ICAL_ERRORS_ARE_FATAL == 1 #undef NDEBUG #endif @@ -121,7 +139,7 @@ void icalerror_set_errno(icalerrorenum x); #define icalerror_check_component_type(value,type); /* Assert with a message */ -#ifdef ICAL_ERRORS_ARE_FATAL +#if ICAL_ERRORS_ARE_FATAL == 1 #ifdef __GNUC__ #define icalerror_assert(test,message) if(!(test)){fprintf(stderr,"%s(), %s:%d: %s\n",__FUNCTION__,__FILE__,__LINE__,message);icalerror_stop_here(); abort();} diff --git a/src/libical/icalerror.h.in b/src/libical/icalerror.h.in new file mode 100644 index 0000000..3eeb6c3 --- /dev/null +++ b/src/libical/icalerror.h.in @@ -0,0 +1,181 @@ +/* -*- Mode: C -*- */ +/*====================================================================== + FILE: icalerror.h + CREATOR: eric 09 May 1999 + + $Id: icalerror.h,v 1.17 2008-01-15 23:17:40 dothebart Exp $ + + + (C) COPYRIGHT 2000, Eric Busboom <eric@softwarestudio.org> + http://www.softwarestudio.org + + This program is free software; you can redistribute it and/or modify + it under the terms of either: + + The LGPL as published by the Free Software Foundation, version + 2.1, available at: http://www.fsf.org/copyleft/lesser.html + + Or: + + The Mozilla Public License Version 1.0. You may obtain a copy of + the License at http://www.mozilla.org/MPL/ + + The original code is icalerror.h + +======================================================================*/ + + +#ifndef ICALERROR_H +#define ICALERROR_H + +#include <assert.h> +#include <stdio.h> /* For icalerror_warn() */ + + +#ifdef HAVE_CONFIG_H +#include "config.h" +#endif + +#define ICAL_SETERROR_ISFUNC + + +/** This routine is called before any error is triggered. It is called + by icalerror_set_errno, so it does not appear in all of the macros + below */ +void icalerror_stop_here(void); + +void icalerror_crash_here(void); + +typedef enum icalerrorenum { + ICAL_NO_ERROR, /* icalerrno may not be initialized - put it first so and pray that the compiler initialize things to zero */ + ICAL_BADARG_ERROR, + ICAL_NEWFAILED_ERROR, + ICAL_ALLOCATION_ERROR, + ICAL_MALFORMEDDATA_ERROR, + ICAL_PARSE_ERROR, + ICAL_INTERNAL_ERROR, /* Like assert --internal consist. prob */ + ICAL_FILE_ERROR, + ICAL_USAGE_ERROR, + ICAL_UNIMPLEMENTED_ERROR, + ICAL_UNKNOWN_ERROR /* Used for problems in input to icalerror_strerror()*/ + +} icalerrorenum; + +icalerrorenum * icalerrno_return(void); +#define icalerrno (*(icalerrno_return())) + +/*#cmakedefine LIBICAL_STATIC 1*/ + +/** If true, libicl aborts after a call to icalerror_set_error + * + * @warning NOT THREAD SAFE -- recommended that you do not change + * this in a multithreaded program. + */ +#ifdef _MSC_VER + #if defined(LIBICAL_STATIC) + #define LIBICAL_EXPORT extern + #elif defined(BUILD_LIBICALDLL) + #define LIBICAL_EXPORT __declspec(dllexport) + #else + #define LIBICAL_EXPORT __declspec(dllimport) + #endif +#else + #define LIBICAL_EXPORT extern +#endif + +LIBICAL_EXPORT int icalerror_errors_are_fatal; + +/* Warning messages */ + +#ifdef __GNUC__ca +#define icalerror_warn(message) {fprintf(stderr,"%s(), %s:%d: %s\n",__FUNCTION__,__FILE__,__LINE__,message);} +#else /* __GNU_C__ */ +#define icalerror_warn(message) {fprintf(stderr,"%s:%d: %s\n",__FILE__,__LINE__,message);} +#endif /* __GNU_C__ */ + + +void icalerror_clear_errno(void); +void _icalerror_set_errno(icalerrorenum); + +/* Make an individual error fatal or non-fatal. */ +typedef enum icalerrorstate { + ICAL_ERROR_FATAL, /* Not fata */ + ICAL_ERROR_NONFATAL, /* Fatal */ + ICAL_ERROR_DEFAULT, /* Use the value of icalerror_errors_are_fatal*/ + ICAL_ERROR_UNKNOWN /* Asked state for an unknown error type */ +} icalerrorstate ; + +const char* icalerror_strerror(icalerrorenum e); +const char* icalerror_perror(void); +void ical_bt(void); +void icalerror_set_error_state( icalerrorenum error, icalerrorstate); +icalerrorstate icalerror_get_error_state( icalerrorenum error); + +#ifndef ICAL_SETERROR_ISFUNC +#define icalerror_set_errno(x) \ +icalerrno = x; \ +if(icalerror_get_error_state(x)==ICAL_ERROR_FATAL || \ + (icalerror_get_error_state(x)==ICAL_ERROR_DEFAULT && \ + icalerror_errors_are_fatal == 1 )){ \ + icalerror_warn(icalerror_strerror(x)); \ + ical_bt(); \ + assert(0); \ +} } +#else +void icalerror_set_errno(icalerrorenum x); +#endif + +#if !defined(ICAL_ERRORS_ARE_FATAL) +#define ICAL_ERRORS_ARE_FATAL 0 +#endif + +#if ICAL_ERRORS_ARE_FATAL == 1 +#undef NDEBUG +#endif + +#define icalerror_check_value_type(value,type); +#define icalerror_check_property_type(value,type); +#define icalerror_check_parameter_type(value,type); +#define icalerror_check_component_type(value,type); + +/* Assert with a message */ +#if ICAL_ERRORS_ARE_FATAL == 1 + +#ifdef __GNUC__ +#define icalerror_assert(test,message) if(!(test)){fprintf(stderr,"%s(), %s:%d: %s\n",__FUNCTION__,__FILE__,__LINE__,message);icalerror_stop_here(); abort();} +#else /*__GNUC__*/ +#define icalerror_assert(test,message) if(!(test)){fprintf(stderr,"%s:%d: %s\n",__FILE__,__LINE__,message);icalerror_stop_here(); abort();} +#endif /*__GNUC__*/ + +#else /* ICAL_ERRORS_ARE_FATAL */ +#define icalerror_assert(test,message) +#endif /* ICAL_ERRORS_ARE_FATAL */ + +/* Check & abort if check fails */ +#define icalerror_check_arg(test,arg) if(!(test)) { icalerror_set_errno(ICAL_BADARG_ERROR); } + +/* Check & return void if check fails*/ +#define icalerror_check_arg_rv(test,arg) if(!(test)) {icalerror_set_errno(ICAL_BADARG_ERROR); return; } + +/* Check & return 0 if check fails*/ +#define icalerror_check_arg_rz(test,arg) if(!(test)) { icalerror_set_errno(ICAL_BADARG_ERROR); return 0;} + +/* Check & return an error if check fails*/ +#define icalerror_check_arg_re(test,arg,error) if(!(test)) { icalerror_stop_here(); assert(0); return error;} + +/* Check & return something*/ +#define icalerror_check_arg_rx(test,arg,x) if(!(test)) { icalerror_set_errno(ICAL_BADARG_ERROR); return x;} + + + +/* String interfaces to set an error to NONFATAL and restore it to its + original value */ + +icalerrorstate icalerror_supress(const char* error); +void icalerror_restore(const char* error, icalerrorstate es); + + +#endif /* !ICALERROR_H */ + + + diff --git a/src/libical/icallangbind.c b/src/libical/icallangbind.c index 904be27..8218872 100644 --- a/src/libical/icallangbind.c +++ b/src/libical/icallangbind.c @@ -30,9 +30,9 @@ #include <stdlib.h> #include <string.h> -#ifdef WIN32 -#define snprintf _snprintf -#define strcasecmp stricmp +#if defined(_MSC_VER) +#define snprintf _snprintf +#define strcasecmp stricmp #endif int* icallangbind_new_array(int size){ @@ -160,8 +160,8 @@ char* icallangbind_property_eval_string_r(icalproperty* prop, char* sep) { char tmp[25]; size_t buf_size = 1024; - char* buf = icalmemory_new_buffer(buf_size); - char* buf_ptr = buf; + char* buf; + char* buf_ptr; icalparameter *param; icalvalue* value; @@ -169,6 +169,9 @@ char* icallangbind_property_eval_string_r(icalproperty* prop, char* sep) if( prop == 0){ return 0; } + + buf = icalmemory_new_buffer(buf_size); + buf_ptr = buf; APPENDS("{ "); @@ -314,9 +317,7 @@ char* icallangbind_quote_as_ical_r(const char* str) /* assume every char could be quoted */ char* buf = icalmemory_new_buffer(buf_size); - int result; - - result = icalvalue_encode_ical_string(str, buf, buf_size); + (void)icalvalue_encode_ical_string(str, buf, (int)buf_size); return buf; } diff --git a/src/libical/icalmime.c b/src/libical/icalmime.c index 41487a5..c902a59 100644 --- a/src/libical/icalmime.c +++ b/src/libical/icalmime.c @@ -38,9 +38,9 @@ #include "dmalloc.h" #endif -#ifdef WIN32 -#define snprintf _snprintf -#define strcasecmp stricmp +#if defined(_MSC_VER) +#define snprintf _snprintf +#define strcasecmp stricmp #endif /* These *_part routines are called by the MIME parser via the @@ -53,7 +53,7 @@ struct text_part size_t buf_size; }; -void* icalmime_text_new_part() +void* icalmime_text_new_part(void) { #define BUF_SIZE 2048 @@ -125,7 +125,7 @@ void icalmime_text_free_part(void *part) /* Ignore Attachments for now */ -void* icalmime_attachment_new_part() +void* icalmime_attachment_new_part(void) { return 0; } @@ -190,7 +190,7 @@ icalcomponent* icalmime_parse(char* (*get_string)(char *s, size_t size, return 0; } - memset(parts,0,sizeof(parts)); + memset(parts,0,sizeof(NUM_PARTS*sizeof(struct sspm_part))); sspm_parse_mime(parts, NUM_PARTS, /* Max parts */ @@ -341,14 +341,11 @@ line between the header and the previous boundary\?"; parent = last; icalcomponent_add_component(parent,comp); - last_level = parts[i].level; - } else if (parts[i].level < last_level){ - parent = icalcomponent_get_parent(parent); + if (parent) + parent = icalcomponent_get_parent(parent); icalcomponent_add_component(parent,comp); - - last_level = parts[i].level; } else { assert(0); } @@ -379,7 +376,7 @@ int icalmime_test(char* (*get_string)(char *s, size_t size, void *d), return 0; } - memset(parts,0,sizeof(parts)); + memset(parts,0,sizeof(NUM_PARTS*sizeof(struct sspm_part))); sspm_parse_mime(parts, NUM_PARTS, /* Max parts */ @@ -399,6 +396,7 @@ int icalmime_test(char* (*get_string)(char *s, size_t size, void *d), sspm_write_mime(parts,NUM_PARTS,&out,"To: bob@bob.org"); printf("%s\n",out); + free(out); return 0; diff --git a/src/libical/icalparameter.c b/src/libical/icalparameter.c index 571f2ae..aa7520a 100644 --- a/src/libical/icalparameter.c +++ b/src/libical/icalparameter.c @@ -27,7 +27,6 @@ Graham Davison <g.m.davison@computer.org> ======================================================================*/ -/*#line 29 "icalparameter.c.in"*/ #ifdef HAVE_CONFIG_H #include <config.h> #endif @@ -43,6 +42,11 @@ #include <errno.h> #include <string.h> /* for memset() */ +#if defined(_MSC_VER) +#define snprintf _snprintf +#define strcasecmp stricmp +#endif + /* In icalderivedparameter */ icalparameter* icalparameter_new_from_value_string(icalparameter_kind kind,const char* val); @@ -104,7 +108,7 @@ icalparameter_free (icalparameter* param) free ((void*)param->x_name); } - memset(param,0,sizeof(param)); + memset(param,0,sizeof(icalparameter)); param->parent = 0; param->id[0] = 'X'; @@ -167,6 +171,7 @@ icalparameter* icalparameter_new_from_string(const char *str) if(eq == 0){ icalerror_set_errno(ICAL_MALFORMEDDATA_ERROR); + free(cpy); return 0; } @@ -178,6 +183,7 @@ icalparameter* icalparameter_new_from_string(const char *str) if(kind == ICAL_NO_PARAMETER){ icalerror_set_errno(ICAL_MALFORMEDDATA_ERROR); + free(cpy); return 0; } @@ -185,6 +191,8 @@ icalparameter* icalparameter_new_from_string(const char *str) if(kind == ICAL_X_PARAMETER){ icalparameter_set_xname(param,cpy); + } else if(kind == ICAL_IANA_PARAMETER) { + icalparameter_set_iana_name(param, cpy); } free(cpy); @@ -220,7 +228,6 @@ icalparameter_as_ical_string_r(icalparameter* param) size_t buf_size = 1024; char* buf; char* buf_ptr; - char *out_buf; const char *kind_string; icalerror_check_arg_rz( (param!=0), "parameter"); @@ -233,10 +240,11 @@ icalparameter_as_ical_string_r(icalparameter* param) buf_ptr = buf; if(param->kind == ICAL_X_PARAMETER) { - - icalmemory_append_string(&buf, &buf_ptr, &buf_size, - icalparameter_get_xname(param)); - + icalmemory_append_string(&buf, &buf_ptr, &buf_size, + icalparameter_get_xname(param)); + } else if (param->kind == ICAL_IANA_PARAMETER) { + icalmemory_append_string(&buf, &buf_ptr, &buf_size, + icalparameter_get_iana_name(param)); } else { kind_string = icalparameter_kind_to_string(param->kind); @@ -246,6 +254,7 @@ icalparameter_as_ical_string_r(icalparameter* param) kind_string == 0) { icalerror_set_errno(ICAL_BADARG_ERROR); + free(buf); return 0; } @@ -274,6 +283,7 @@ icalparameter_as_ical_string_r(icalparameter* param) icalmemory_append_string(&buf, &buf_ptr, &buf_size, str); } else { icalerror_set_errno(ICAL_MALFORMEDDATA_ERROR); + free(buf); return 0; } @@ -365,6 +375,26 @@ icalparameter_get_xvalue (icalparameter* param) return param->string; } +void icalparameter_set_iana_value (icalparameter* param, const char* v) +{ + icalparameter_set_xvalue(param, v); +} + +const char* icalparameter_get_iana_value(icalparameter* param) +{ + return icalparameter_get_xvalue(param); +} + +void icalparameter_set_iana_name (icalparameter* param, const char* v) +{ + icalparameter_set_xname(param, v); +} + +const char* icalparameter_get_iana_name (icalparameter* param) +{ + return icalparameter_get_xname(param); +} + void icalparameter_set_parent(icalparameter* param, icalproperty* property) { @@ -380,6 +410,36 @@ icalproperty* icalparameter_get_parent(icalparameter* param) return param->parent; } +/* returns 1 if parameters have same name in ICAL, otherwise 0 */ +int icalparameter_has_same_name(icalparameter* param1, icalparameter* param2) +{ + icalparameter_kind kind1; + icalparameter_kind kind2; + const char *name1; + const char *name2; + + icalerror_check_arg_rz( (param1!=0),"param1"); + icalerror_check_arg_rz( (param2!=0),"param2"); + + kind1 = icalparameter_isa(param1); + kind2 = icalparameter_isa(param2); + + if (kind1 != kind2) + return 0; + + if (kind1 == ICAL_X_PARAMETER) { + name1 = icalparameter_get_xname(param1); + name2 = icalparameter_get_xname(param2); + if (strcasecmp(name1, name2) != 0) + return 0; + } else if (kind1 == ICAL_IANA_PARAMETER) { + name1 = icalparameter_get_iana_name(param1); + name2 = icalparameter_get_iana_name(param2); + if (strcasecmp(name1, name2) != 0) + return 0; + } + return 1; +} /* Everything below this line is machine generated. Do not edit. */ /* ALTREP */ diff --git a/src/libical/icalparameter.h b/src/libical/icalparameter.h index 0219869..cc15953 100644 --- a/src/libical/icalparameter.h +++ b/src/libical/icalparameter.h @@ -55,12 +55,21 @@ icalparameter_kind icalparameter_isa(icalparameter* parameter); int icalparameter_isa_parameter(void* param); -/* Access the name of an X parameer */ +/* Access the name of an X parameter */ void icalparameter_set_xname (icalparameter* param, const char* v); const char* icalparameter_get_xname(icalparameter* param); void icalparameter_set_xvalue (icalparameter* param, const char* v); const char* icalparameter_get_xvalue(icalparameter* param); +/* Access the name of an IANA parameter */ +void icalparameter_set_iana_name (icalparameter* param, const char* v); +const char* icalparameter_get_iana_name(icalparameter* param); +void icalparameter_set_iana_value (icalparameter* param, const char* v); +const char* icalparameter_get_iana_value(icalparameter* param); + +/* returns 1 if parameters have same name in ICAL, otherwise 0 */ +int icalparameter_has_same_name(icalparameter* param1, icalparameter* param2); + /* Convert enumerations */ const char* icalparameter_kind_to_string(icalparameter_kind kind); diff --git a/src/libical/icalparser.c b/src/libical/icalparser.c index 1c62dd0..43ea903 100644 --- a/src/libical/icalparser.c +++ b/src/libical/icalparser.c @@ -68,16 +68,16 @@ # endif #endif -#ifdef WIN32 -#define snprintf _snprintf -#define strcasecmp stricmp +#if defined(_MSC_VER) +#define snprintf _snprintf +#define strcasecmp stricmp #endif static char* parser_get_next_char(char c, char *str, int qm); static char* parser_get_next_parameter(char* line,char** end); static char* parser_get_next_value(char* line, char **end, icalvalue_kind kind); static char* parser_get_prop_name(char* line, char** end); -static char* parser_get_param_name(char* line, char **end, char **buf_value); +static char* parser_get_param_name(char* line, char **end); #define TMP_BUF_SIZE 80 @@ -115,14 +115,14 @@ void strstriplt(char *buf) return; } len = strlen(buf); - while ((buf[0] != 0) && (isspace(buf[len - 1]))) { + while ((buf[0] != 0) && (isspace((unsigned char)buf[len - 1]))) { buf[--len] = 0; } if (buf[0] == 0) { return; } a = 0; - while ((buf[0]!=0) && (isspace(buf[a]))) { + while ((buf[0]!=0) && (isspace((unsigned char)buf[a]))) { a++; } if (a > 0) { @@ -192,18 +192,18 @@ char* parser_get_next_char(char c, char *str, int qm) for(p=str; *p!=0; p++){ if (qm == 1) { - if ( quote_mode == 0 && *p=='"' && *(p-1) != '\\' ){ + if ( quote_mode == 0 && *p=='"' && p>str && *(p-1) != '\\' ){ quote_mode =1; continue; } - if ( quote_mode == 1 && *p=='"' && *(p-1) != '\\' ){ + if ( quote_mode == 1 && *p=='"' && p>str && *(p-1) != '\\' ){ quote_mode =0; continue; } } - if (quote_mode == 0 && *p== c && *(p-1) != '\\' ){ + if (quote_mode == 0 && *p== c && p>str && *(p-1) != '\\' ){ return p; } @@ -261,14 +261,13 @@ char* parser_get_prop_name(char* line, char** end) } static -char* parser_get_param_name(char* line, char **end, char **buf) +char* parser_get_param_name(char* line, char **end) { char* next; char *str; next = parser_get_next_char('=',line,1); - *buf = 0; if (next == 0) { return 0; } @@ -279,10 +278,13 @@ char* parser_get_param_name(char* line, char **end, char **buf) *end = *end+1; next = parser_get_next_char('"',*end,0); if (next == 0) { + free(str); return 0; } - *buf = *end = make_segment(*end,next); + *end = make_segment(*end,next); + } else { + *end = make_segment(*end, *end + strlen(*end)); } return str; @@ -336,13 +338,19 @@ static char* parser_get_next_value(char* line, char **end, icalvalue_kind kind) { - char* next; + char* next = 0; char *p; char *str; size_t length = strlen(line); + int quoted = 0; + + if( line[0] == '\"' && line[length - 1] == '\"' ) { + /* This line is quoted, don't split into multiple values */ + quoted = 1; + } p = line; - while(1){ + while(!quoted){ next = parser_get_next_char(',',p,1); @@ -877,90 +885,141 @@ icalcomponent* icalparser_add_line(icalparser* parser, if (str != 0){ char* name = 0; char* pvalue = 0; - char *buf_value = NULL; icalparameter *param = 0; icalparameter_kind kind; icalcomponent *tail = pvl_data(pvl_tail(parser->components)); - name = parser_get_param_name(str,&pvalue,&buf_value); + name = parser_get_param_name(str,&pvalue); if (name == 0){ - /* 'tail' defined above */ - insert_error(tail, str, "Cant parse parameter name", - ICAL_XLICERRORTYPE_PARAMETERNAMEPARSEERROR); - tail = 0; - break; + /* 'tail' defined above */ + insert_error(tail, str, "Cant parse parameter name", + ICAL_XLICERRORTYPE_PARAMETERNAMEPARSEERROR); + tail = 0; + break; } kind = icalparameter_string_to_kind(name); if(kind == ICAL_X_PARAMETER){ param = icalparameter_new(ICAL_X_PARAMETER); - - if(param != 0){ - icalparameter_set_xname(param,name); - icalparameter_set_xvalue(param,pvalue); - } - icalmemory_free_buffer(buf_value); - buf_value = NULL; - - } else if (kind != ICAL_NO_PARAMETER){ - param = icalparameter_new_from_value_string(kind,pvalue); - - icalmemory_free_buffer(buf_value); - buf_value = NULL; - - } else { - /* Error. Failed to parse the parameter*/ - /* 'tail' defined above */ - - /* Change for mozilla */ - /* have the option of being flexible towards unsupported parameters */ - #ifndef ICAL_ERRORS_ARE_FATAL + if(param != 0){ + icalparameter_set_xname(param,name); + icalparameter_set_xvalue(param,pvalue); + } + } else if (kind == ICAL_IANA_PARAMETER){ + ical_unknown_token_handling tokHandlingSetting = + ical_get_unknown_token_handling_setting(); + if (tokHandlingSetting == ICAL_DISCARD_TOKEN) continue; - #endif - - insert_error(tail, str, "Cant parse parameter name", - ICAL_XLICERRORTYPE_PARAMETERNAMEPARSEERROR); - tail = 0; - parser->state = ICALPARSER_ERROR; - /* if (pvalue) { - free(pvalue); - pvalue = 0; - } */ - if (name) { - free(name); - name = 0; - } - return 0; + param = icalparameter_new(ICAL_IANA_PARAMETER); + + if(param != 0){ + icalparameter_set_xname(param,name); + icalparameter_set_xvalue(param,pvalue); + } + } else if (kind == ICAL_TZID_PARAMETER){ + /* + Special case handling for TZID to workaround invalid incoming data. + For example, Google Calendar will send back stuff like this: + DTSTART;TZID=GMT+05:30:20120904T020000 + + In this case we read to the last colon rather than the first colon. + This way the TZID will become GMT+05:30 rather than trying to parse + the date-time as 30:20120904T020000. + */ + char *lastColon = 0; + char *nextColon = end; + + /* Find the last colon in the line */ + do { + nextColon = parser_get_next_char(':', nextColon, 1); + + if (nextColon) { + lastColon = nextColon; + } + } while (nextColon); + + /* + Rebuild str so that it includes everything up to the last colon. + So given the above example, str will go from + "TZID=GMT+05" to "TZID=GMT+05:30" + */ + if (lastColon && *(lastColon + 1) != 0) { + char *strStart = line + sizeof(str); + + end = lastColon + 1; + + icalmemory_free_buffer(str); + str = make_segment(strStart, end - 1); + } + + icalmemory_free_buffer(name); + icalmemory_free_buffer(pvalue); + + /* Reparse the parameter name and value with the new segment */ + name = parser_get_param_name(str,&pvalue); + param = icalparameter_new_from_value_string(kind,pvalue); + } else if (kind != ICAL_NO_PARAMETER){ + param = icalparameter_new_from_value_string(kind,pvalue); + } else { + /* Error. Failed to parse the parameter*/ + /* 'tail' defined above */ + + /* Change for mozilla */ + /* have the option of being flexible towards unsupported parameters */ +#if ICAL_ERRORS_ARE_FATAL == 1 + insert_error(tail, str, "Cant parse parameter name", + ICAL_XLICERRORTYPE_PARAMETERNAMEPARSEERROR); + tail = 0; + parser->state = ICALPARSER_ERROR; + if (pvalue) { + free(pvalue); + pvalue = 0; + } + if (name) { + free(name); + name = 0; + } + icalmemory_free_buffer(str); + str = NULL; + return 0; +#else + if (name) { + free(name); + name = 0; + } + icalmemory_free_buffer(str); + str = NULL; + continue; +#endif } - /* if (pvalue) { - free(pvalue); - pvalue = 0; - } */ + if (pvalue) { + free(pvalue); + pvalue = 0; + } + if (name) { - free(name); - name = 0; + free(name); + name = 0; } if (param == 0){ - /* 'tail' defined above */ - insert_error(tail,str,"Cant parse parameter value", - ICAL_XLICERRORTYPE_PARAMETERVALUEPARSEERROR); + /* 'tail' defined above */ + insert_error(tail,str,"Cant parse parameter value", + ICAL_XLICERRORTYPE_PARAMETERVALUEPARSEERROR); - tail = 0; - parser->state = ICALPARSER_ERROR; + tail = 0; + parser->state = ICALPARSER_ERROR; - icalmemory_free_buffer(buf_value); - buf_value = NULL; - icalmemory_free_buffer(name); - name = NULL; - icalmemory_free_buffer(str); - str = NULL; + icalmemory_free_buffer(name); + name = NULL; + icalmemory_free_buffer(str); + str = NULL; - continue; + continue; } /* If it is a VALUE parameter, set the kind of value*/ @@ -981,7 +1040,6 @@ icalcomponent* icalparser_add_line(icalparser* parser, tail, str, "Got a VALUE parameter with an unknown type", ICAL_XLICERRORTYPE_PARAMETERVALUEPARSEERROR); - icalparameter_free(param); value_kind = icalproperty_kind_to_value_kind( @@ -1067,7 +1125,14 @@ icalcomponent* icalparser_add_line(icalparser* parser, prop = clone; tail = 0; } - + + /* If this is a URI value for an ATTACH property, then change + the value to an ATTACH kind as well. + Now we can support ATTACH;TYPE=URI:http://my.fav.url + */ + if(value_kind == ICAL_URI_VALUE && prop_kind == ICAL_ATTACH_PROPERTY){ + value_kind = ICAL_ATTACH_VALUE; + } value = icalvalue_new_from_string(value_kind, str); /* Don't add properties without value */ @@ -1103,11 +1168,15 @@ icalcomponent* icalparser_add_line(icalparser* parser, str = NULL; } else { - if (str != NULL) { - icalmemory_free_buffer(str); - str = NULL; - } - +#if ICAL_ALLOW_EMPTY_PROPERTIES + /* Don't replace empty properties with an error. + Set an empty length string (not null) as the value instead */ + if (vcount == 0) { + icalproperty_set_value(prop, icalvalue_new_text("")); + } + + break; +#else if (vcount == 0){ char temp[200]; /* HACK */ @@ -1131,6 +1200,7 @@ icalcomponent* icalparser_add_line(icalparser* parser, break; } +#endif } } diff --git a/src/libical/icalperiod.c b/src/libical/icalperiod.c index 160229a..52be357 100644 --- a/src/libical/icalperiod.c +++ b/src/libical/icalperiod.c @@ -48,7 +48,7 @@ struct icalperiodtype icalperiodtype_from_string (const char* str) struct icalperiodtype p, null_p; char *s = icalmemory_strdup(str); - char *start, *end = s; + char *start, *end; icalerrorstate es; /* Errors are normally generated in the following code, so save @@ -130,7 +130,7 @@ char* icalperiodtype_as_ical_string_r(struct icalperiodtype p) start = icaltime_as_ical_string_r(p.start); icalmemory_append_string(&buf, &buf_ptr, &buf_size, start); - icalmemory_free_buffer(start); + icalmemory_free_buffer((void*)start); if(!icaltime_is_null_time(p.end)){ end = icaltime_as_ical_string_r(p.end); @@ -141,7 +141,7 @@ char* icalperiodtype_as_ical_string_r(struct icalperiodtype p) icalmemory_append_char(&buf, &buf_ptr, &buf_size, '/'); icalmemory_append_string(&buf, &buf_ptr, &buf_size, end); - icalmemory_free_buffer(end); + icalmemory_free_buffer((void*)end); return buf; } diff --git a/src/libical/icalproperty.c b/src/libical/icalproperty.c index 3514772..df71fac 100644 --- a/src/libical/icalproperty.c +++ b/src/libical/icalproperty.c @@ -45,9 +45,9 @@ #include <stdio.h> /* for printf */ #include <stdarg.h> /* for va_list, va_start, etc. */ -#ifdef WIN32 -#define snprintf _snprintf -#define strcasecmp stricmp +#if defined(_MSC_VER) +#define snprintf _snprintf +#define strcasecmp stricmp #endif /* Private routines for icalproperty */ @@ -174,14 +174,17 @@ icalproperty* icalproperty_new_from_string(const char* str) { size_t buf_size = 1024; - char* buf = icalmemory_new_buffer(buf_size); - char* buf_ptr = buf; + char* buf; + char* buf_ptr; icalproperty *prop; icalcomponent *comp; int errors = 0; icalerror_check_arg_rz( (str!=0),"str"); + buf = icalmemory_new_buffer(buf_size); + buf_ptr = buf; + /* Is this a HACK or a crafty reuse of code? */ icalmemory_append_string(&buf, &buf_ptr, &buf_size, "BEGIN:VCALENDAR\r\n"); @@ -193,6 +196,7 @@ icalproperty* icalproperty_new_from_string(const char* str) if(comp == 0){ icalerror_set_errno(ICAL_PARSE_ERROR); + free(buf); return 0; } @@ -263,7 +267,7 @@ icalproperty_free (icalproperty* p) /*#define MAX_LINE_LEN 120*/ static char* -get_next_line_start (char *line_start, int chars_left) +get_next_line_start (char *line_start, size_t chars_left) { char *pos; @@ -316,9 +320,9 @@ get_next_line_start (char *line_start, int chars_left) static char* fold_property_line (char *text) { - size_t buf_size; - char *buf, *buf_ptr, *line_start, *next_line_start, *out_buf; - int len, chars_left, first_line; + size_t buf_size, len, chars_left; + char *buf, *buf_ptr, *line_start, *next_line_start; + int first_line; char ch; /* Start with a buffer twice the size of our property line, so we almost @@ -432,8 +436,8 @@ icalproperty_as_ical_string_r(icalproperty* prop) const char* property_name = 0; size_t buf_size = 1024; - char* buf = icalmemory_new_buffer(buf_size); - char* buf_ptr = buf; + char* buf; + char* buf_ptr; icalvalue* value; char *out_buf; const char* kind_string = 0; @@ -442,6 +446,8 @@ icalproperty_as_ical_string_r(icalproperty* prop) icalerror_check_arg_rz( (prop!=0),"prop"); + buf = icalmemory_new_buffer(buf_size); + buf_ptr = buf; /* Append property name */ @@ -499,12 +505,17 @@ icalproperty_as_ical_string_r(icalproperty* prop) if (value != 0){ char *str = icalvalue_as_ical_string_r(value); - icalerror_assert((str !=0),"Could not get string representation of a value"); - icalmemory_append_string(&buf, &buf_ptr, &buf_size, str); + if (str != 0) + icalmemory_append_string(&buf, &buf_ptr, &buf_size, str); +#if ICAL_ALLOW_EMPTY_PROPERTIES == 0 + else + icalmemory_append_string(&buf, &buf_ptr, &buf_size,"ERROR: No Value"); +#endif free(str); } else { +#if ICAL_ALLOW_EMPTY_PROPERTIES == 0 icalmemory_append_string(&buf, &buf_ptr, &buf_size,"ERROR: No Value"); - +#endif } icalmemory_append_string(&buf, &buf_ptr, &buf_size, newline); @@ -563,11 +574,15 @@ icalproperty_set_parameter (icalproperty* prop,icalparameter* parameter) icalerror_check_arg_rv( (parameter!=0),"parameter"); kind = icalparameter_isa(parameter); - if (kind != ICAL_X_PARAMETER) - icalproperty_remove_parameter_by_kind(prop,kind); - else + if (kind == ICAL_X_PARAMETER) { icalproperty_remove_parameter_by_name(prop, icalparameter_get_xname(parameter)); + } else if (kind == ICAL_IANA_PARAMETER) { + icalproperty_remove_parameter_by_name(prop, + icalparameter_get_iana_name(parameter)); + } + else + icalproperty_remove_parameter_by_kind(prop,kind); icalproperty_add_parameter(prop,parameter); } @@ -597,8 +612,10 @@ void icalproperty_set_parameter_from_string(icalproperty* prop, return; } - if(kind == ICAL_X_PARAMETER){ - icalparameter_set_xname(param, name); + if (kind == ICAL_X_PARAMETER) { + icalparameter_set_xname(param, name); + } else if (kind == ICAL_IANA_PARAMETER) { + icalparameter_set_iana_name(param, name); } icalproperty_set_parameter(prop,param); @@ -638,13 +655,19 @@ char* icalproperty_get_parameter_as_string_r(icalproperty* prop, for(param = icalproperty_get_first_parameter(prop,kind); param != 0; param = icalproperty_get_next_parameter(prop,kind)) { - if (kind != ICAL_X_PARAMETER) { - break; - } - if (strcmp(icalparameter_get_xname(param),name)==0) { + if (kind == ICAL_X_PARAMETER) { + if (strcmp(icalparameter_get_xname(param),name)==0) { + break; + } + } else if (kind == ICAL_IANA_PARAMETER) { + if (strcmp(icalparameter_get_iana_name(param),name)==0) { + break; + } + } else { break; - } + } + } if (param == 0){ @@ -757,6 +780,8 @@ icalproperty_remove_parameter_by_name(icalproperty* prop, const char *name) if (icalparameter_isa(param) == ICAL_X_PARAMETER) kind_string = icalparameter_get_xname(param); + else if (icalparameter_isa(param) == ICAL_IANA_PARAMETER) + kind_string = icalparameter_get_iana_name(param); else kind_string = icalparameter_kind_to_string(icalparameter_isa(param)); @@ -765,6 +790,7 @@ icalproperty_remove_parameter_by_name(icalproperty* prop, const char *name) if (0 == strcmp(kind_string, name)) { pvl_remove (prop->parameters, p); + icalparameter_free(param); break; } } @@ -784,28 +810,18 @@ void icalproperty_remove_parameter_by_ref(icalproperty* prop, icalparameter* parameter) { pvl_elem p; - icalparameter_kind kind; - const char *name; icalerror_check_arg_rv((prop!=0),"prop"); icalerror_check_arg_rv((parameter!=0),"parameter"); - kind = icalparameter_isa(parameter); - name = icalparameter_get_xname(parameter); + for (p=pvl_head(prop->parameters);p != 0; p = pvl_next(p)) { + icalparameter* p_param = (icalparameter *)pvl_data (p); - /* - * FIXME If it's an X- parameter, also compare the names. It would be nice - * to have a better abstraction like icalparameter_equals() - */ - for(p=pvl_head(prop->parameters);p != 0; p = pvl_next(p)){ - icalparameter* p_param = (icalparameter *)pvl_data (p); - if (icalparameter_isa(p_param) == kind && - (kind != ICAL_X_PARAMETER || - !strcmp(icalparameter_get_xname(p_param), name))) { + if (icalparameter_has_same_name(parameter, p_param)) { pvl_remove (prop->parameters, p); icalparameter_free(p_param); break; - } + } } } @@ -920,6 +936,7 @@ void icalproperty_set_value_from_string(icalproperty* prop,const char* str, return; } + icalerror_clear_errno(); nval = icalvalue_new_from_string(kind, str); if(nval == 0){ @@ -999,10 +1016,13 @@ char* icalproperty_get_property_name_r(const icalproperty* prop) const char* property_name = 0; size_t buf_size = 256; - char* buf = icalmemory_new_buffer(buf_size); - char* buf_ptr = buf; + char* buf; + char* buf_ptr; icalerror_check_arg_rz( (prop!=0),"prop"); + + buf = icalmemory_new_buffer(buf_size); + buf_ptr = buf; if (prop->kind == ICAL_X_PROPERTY && prop->x_name != 0){ property_name = prop->x_name; @@ -1012,6 +1032,7 @@ char* icalproperty_get_property_name_r(const icalproperty* prop) if (property_name == 0 ) { icalerror_set_errno(ICAL_MALFORMEDDATA_ERROR); + icalmemory_free_buffer(buf); return 0; } else { diff --git a/src/libical/icalrecur.c b/src/libical/icalrecur.c index 850e46d..c0e5eca 100644 --- a/src/libical/icalrecur.c +++ b/src/libical/icalrecur.c @@ -139,16 +139,23 @@ #include <stdint.h> #endif +#include <stdio.h> +#include <stdarg.h> + +#if defined(_MSC_VER) +#define snprintf _snprintf +#endif + #include <limits.h> #ifndef HAVE_INTPTR_T -#if defined (WIN32) || defined (XP_BEOS) +#if (defined (WIN32) && !defined (__MINGW32__)) || defined (XP_BEOS) typedef long intptr_t; #endif #endif -#ifdef WIN32 -#define strcasecmp stricmp +#ifdef _MSC_VER +#define strcasecmp stricmp #endif #include "icalrecur.h" @@ -156,7 +163,7 @@ typedef long intptr_t; #include "icalerror.h" #include "icalmemory.h" -#include <stdlib.h> /* for malloc */ +#include <stdlib.h> /* for malloc, strtol */ #include <errno.h> /* for errno */ #include <string.h> /* for strdup and strchr*/ #include <assert.h> @@ -354,7 +361,7 @@ void icalrecur_add_bydayrules(struct icalrecur_parser *parser, const char* vals) char *t, *n; int i=0; int sign = 1; - int weekno = 0; + char weekno = 0; /* note: Novell/Groupwise sends BYDAY=255SU, so we fit in a signed char to get -1 SU for last sunday. */ icalrecurrencetype_weekday wd; short *array = parser->rt.by_day; char* end; @@ -389,7 +396,7 @@ void icalrecur_add_bydayrules(struct icalrecur_parser *parser, const char* vals) } /* Get Optional weekno */ - weekno = strtol(t,&t,10); + weekno = (char)strtol(t,&t,10); /* Outlook/Exchange generate "BYDAY=MO, FR" and "BYDAY=2 TH". * Cope with that. @@ -441,7 +448,7 @@ struct icalrecurrencetype icalrecurrencetype_from_string(const char* str) if(name == 0){ icalerror_set_errno(ICAL_MALFORMEDDATA_ERROR); icalrecurrencetype_clear(&parser.rt); - free(parser.copy); + free(parser.copy); return parser.rt; } @@ -453,6 +460,11 @@ struct icalrecurrencetype icalrecurrencetype_from_string(const char* str) parser.rt.until = icaltime_from_string(value); } else if (strcasecmp(name,"INTERVAL") == 0){ parser.rt.interval = (short)atoi(value); + /* don't allow an interval to be less than 1 + (RFC specifies an interval must be a positive integer) */ + if (parser.rt.interval < 1){ + parser.rt.interval = 1; + } } else if (strcasecmp(name,"WKST") == 0){ parser.rt.week_start = icalrecur_string_to_weekday(value); sort_bydayrules(&parser); @@ -485,7 +497,7 @@ struct icalrecurrencetype icalrecurrencetype_from_string(const char* str) } else { icalerror_set_errno(ICAL_MALFORMEDDATA_ERROR); icalrecurrencetype_clear(&parser.rt); - free(parser.copy); + free(parser.copy); return parser.rt; } @@ -810,6 +822,8 @@ icalrecur_iterator* icalrecur_iterator_new(struct icalrecurrencetype rule, icalrecur_iterator* impl; icalrecurrencetype_frequency freq; + icalerror_clear_errno(); + if ( ( impl = (icalrecur_iterator*) malloc(sizeof(icalrecur_iterator))) == 0) { icalerror_set_errno(ICAL_NEWFAILED_ERROR); @@ -875,26 +889,18 @@ icalrecur_iterator* icalrecur_iterator_new(struct icalrecurrencetype rule, icalrecur_two_byrule(impl,BY_YEAR_DAY,BY_DAY) ){ icalerror_set_errno(ICAL_MALFORMEDDATA_ERROR); - + free(impl); return 0; } - /* BYWEEKNO and BYMONTH rule parts may not both appear.*/ - - if(icalrecur_two_byrule(impl,BY_WEEK_NO,BY_MONTH)){ - icalerror_set_errno(ICAL_MALFORMEDDATA_ERROR); - - icalerror_set_errno(ICAL_MALFORMEDDATA_ERROR); - return 0; - } + /* BYWEEKNO and BYMONTHDAY rule parts may not both appear.*/ if(icalrecur_two_byrule(impl,BY_WEEK_NO,BY_MONTH_DAY)){ icalerror_set_errno(ICAL_MALFORMEDDATA_ERROR); - - icalerror_set_errno(ICAL_MALFORMEDDATA_ERROR); - return 0; + free(impl); + return 0; } @@ -904,7 +910,8 @@ icalrecur_iterator* icalrecur_iterator_new(struct icalrecurrencetype rule, if(freq == ICAL_MONTHLY_RECURRENCE && icalrecur_one_byrule(impl,BY_WEEK_NO)){ icalerror_set_errno(ICAL_MALFORMEDDATA_ERROR); - return 0; + free(impl); + return 0; } @@ -914,13 +921,15 @@ icalrecur_iterator* icalrecur_iterator_new(struct icalrecurrencetype rule, if(freq == ICAL_WEEKLY_RECURRENCE && icalrecur_one_byrule(impl,BY_MONTH_DAY )) { icalerror_set_errno(ICAL_MALFORMEDDATA_ERROR); - return 0; + free(impl); + return 0; } /* BYYEARDAY may only appear in YEARLY rules */ if(freq != ICAL_YEARLY_RECURRENCE && icalrecur_one_byrule(impl,BY_YEAR_DAY )) { icalerror_set_errno(ICAL_MALFORMEDDATA_ERROR); + free(impl); return 0; } @@ -990,9 +999,16 @@ icalrecur_iterator* icalrecur_iterator_new(struct icalrecurrencetype rule, if(impl->rule.freq == ICAL_YEARLY_RECURRENCE){ struct icaltimetype next; + icalerror_clear_errno(); - for (;;) { + /* Fail after hitting the year 20000 if no expanded days match */ + while (impl->last.year < 20000) { expand_year_days(impl, impl->last.year); + if( icalerrno != ICAL_NO_ERROR) { + icalerror_set_errno(ICAL_MALFORMEDDATA_ERROR); + free(impl); + return 0; + } if (impl->days[0] != ICAL_RECURRENCE_ARRAY_MAX) break; /* break when no days are expanded */ increment_year(impl,impl->rule.interval); @@ -1054,7 +1070,8 @@ icalrecur_iterator* icalrecur_iterator_new(struct icalrecurrencetype rule, if(impl->last.day > days_in_month || impl->last.day == 0){ icalerror_set_errno(ICAL_MALFORMEDDATA_ERROR); - return 0; + free(impl); + return 0; } } else if (has_by_data(impl,BY_MONTH_DAY)) { @@ -1158,7 +1175,7 @@ static void increment_hour(icalrecur_iterator* impl, int inc) days = impl->last.hour / 24; impl->last.hour = impl->last.hour % 24; - if (impl->days != 0){ + if (days != 0){ increment_monthday(impl,days); } } @@ -1494,6 +1511,20 @@ static int is_day_in_byday(icalrecur_iterator* impl,struct icaltimetype tt){ return 0; } +int check_set_position(icalrecur_iterator* impl, int set_pos) +{ + int i; + int found = 0; + for (i = 0; impl->rule.by_set_pos[i] != ICAL_RECURRENCE_ARRAY_MAX && + i != ICAL_BY_SETPOS_SIZE; i++){ + if (impl->rule.by_set_pos[i] == set_pos) { + found = 1; + break; + } + } + return found; +} + static int next_month(icalrecur_iterator* impl) { int data_valid = 1; @@ -1575,15 +1606,44 @@ static int next_month(icalrecur_iterator* impl) int day; int days_in_month = icaltime_days_in_month(impl->last.month, impl->last.year); - assert( BYDAYPTR[0]!=ICAL_RECURRENCE_ARRAY_MAX); + int set_pos_counter = 0; + int set_pos_total = 0; + int found = 0; + + assert( BYDAYPTR[0]!=ICAL_RECURRENCE_ARRAY_MAX); + + /* Count the past positions for the BYSETPOS calculation */ + if(has_by_data(impl,BY_SET_POS)){ + int last_day = impl->last.day; + for(day = 1; day <= days_in_month; day++){ + impl->last.day = day; + + if(is_day_in_byday(impl,impl->last)){ + set_pos_total++; + if(day <= last_day) + set_pos_counter++; + } + } + impl->last.day = last_day; + } + for(day = impl->last.day+1; day <= days_in_month; day++){ impl->last.day = day; + if(is_day_in_byday(impl,impl->last)){ - data_valid = 1; - break; - } + /* If there is no BYSETPOS rule, calculate only by BYDAY + If there is BYSETPOS rule, take into account the occurence + matches with BYDAY */ + if(!has_by_data(impl,BY_SET_POS) || check_set_position(impl, ++set_pos_counter) + || check_set_position(impl, set_pos_counter-set_pos_total-1)) { + found = 1; + break; + } + } } + + data_valid = found; if ( day > days_in_month){ impl->last.day = 1; @@ -1594,7 +1654,9 @@ static int next_month(icalrecur_iterator* impl) invalid */ if(is_day_in_byday(impl,impl->last)){ - data_valid = 1; + /* If there is no BYSETPOS rule or BYSETPOS=1, new data is valid */ + if(!has_by_data(impl,BY_SET_POS) || check_set_position(impl,1)) + data_valid = 1; } else { data_valid = 0; /* signal that impl->last is invalid */ } @@ -1647,12 +1709,15 @@ static int next_month(icalrecur_iterator* impl) } else { int days_in_month; + assert( BYMDPTR[0]!=ICAL_RECURRENCE_ARRAY_MAX); + impl->last.day = BYMDPTR[0]; + increment_month(impl); days_in_month = icaltime_days_in_month(impl->last.month, impl->last.year); if (impl->last.day > days_in_month){ - data_valid = 0; /* signal that impl->last is invalid */ + impl->last.day = days_in_month; } } @@ -1850,7 +1915,7 @@ static pvl_list expand_by_day(icalrecur_iterator* impl, int year) static int expand_year_days(icalrecur_iterator* impl, int year) { - int j,k; + int i,j,k; int days_index=0; struct icaltimetype t; int flags; @@ -1872,6 +1937,46 @@ static int expand_year_days(icalrecur_iterator* impl, int year) (HBD(BY_YEAR_DAY) ? 1<<BY_YEAR_DAY : 0); + /* BY_WEEK_NO together with BY_MONTH - may conflict, in this case BY_MONTH wins */ + if( (flags & 1<<BY_MONTH) && (flags & 1<<BY_WEEK_NO) ){ + int valid_weeks[ICAL_BY_WEEKNO_SIZE]; + int valid = 1; + memset(valid_weeks, 0, sizeof(valid_weeks)); + t.year = year; + t.is_date = 1; + + /* calculate valid week numbers */ + for(j=0; impl->by_ptrs[BY_MONTH][j]!=ICAL_RECURRENCE_ARRAY_MAX; j++){ + int month = impl->by_ptrs[BY_MONTH][j]; + int first_week, last_week; + t.month = month; + t.day = 1; + first_week = icaltime_week_number(t); + t.day = icaltime_days_in_month(month,year); + last_week = icaltime_week_number(t); + for(j=first_week; j<last_week; j++) { + valid_weeks[j] = 1; + } + } + + /* check valid weeks */ + for(i = 0; BYWEEKPTR[i] != ICAL_RECURRENCE_ARRAY_MAX && valid; i++){ + int weekno = BYWEEKPTR[i]; + if(weekno < ICAL_BY_WEEKNO_SIZE) + valid &= valid_weeks[i]; /* check if the week number is valid */ + else + valid = 0; /* invalid week number */ + } + + /* let us make the decision which rule to keep */ + if(valid) { /* BYWEEKNO wins */ + flags -= 1<<BY_MONTH; + } + else { /* BYMONTH vins */ + flags -= 1<<BY_WEEK_NO; + } + } + switch(flags) { case 0: { @@ -2011,7 +2116,24 @@ static int expand_year_days(icalrecur_iterator* impl, int year) t.day = days_in_month; last_dow = icaltime_day_of_week(t); - for(k=0;impl->by_ptrs[BY_DAY][k]!=ICAL_RECURRENCE_ARRAY_MAX;k++){ + if(has_by_data(impl,BY_SET_POS)) { + /*FREQ=YEARLY; BYDAY=TH,20MO,-10FR; BYMONTH = 12; BYSETPOS=1*/ + int day; + int set_pos_counter = 0; + int set_pos_total = 0; + int by_month_day[ICAL_BY_MONTHDAY_SIZE]; + for(day = 1; day <= days_in_month; day++){ + t.day = day; + if(is_day_in_byday(impl,t)) + by_month_day[set_pos_total++] = day; + } + for(set_pos_counter = 0; set_pos_counter < set_pos_total; set_pos_counter++){ + if(check_set_position(impl, set_pos_counter+1) || + check_set_position(impl, set_pos_counter-set_pos_total)) + impl->days[days_index++] = doy_offset + by_month_day[set_pos_counter]; + } + } + else for(k=0;impl->by_ptrs[BY_DAY][k]!=ICAL_RECURRENCE_ARRAY_MAX;k++){ short day_coded = impl->by_ptrs[BY_DAY][k]; enum icalrecurrencetype_weekday dow = icalrecurrencetype_day_day_of_week(day_coded); @@ -2252,8 +2374,8 @@ static int check_contracting_rules(icalrecur_iterator* impl) struct icaltimetype icalrecur_iterator_next(icalrecur_iterator *impl) { int valid = 1; - - if( (impl->rule.count!=0 &&impl->occurrence_no >= impl->rule.count) || + + if( !impl || (impl->rule.count!=0 &&impl->occurrence_no >= impl->rule.count) || (!icaltime_is_null_time(impl->rule.until) && icaltime_compare(impl->last,impl->rule.until) > 0)) { return icaltime_null_time(); @@ -2470,21 +2592,21 @@ int icalrecur_expand_recurrence(char* rule, time_t start, icstart = icaltime_from_timet_with_zone(start,0,0); recur = icalrecurrencetype_from_string(rule); + ritr = icalrecur_iterator_new(recur,icstart); + if(ritr) { + for(next = icalrecur_iterator_next(ritr); + !icaltime_is_null_time(next) && i < count; + next = icalrecur_iterator_next(ritr)){ - for(ritr = icalrecur_iterator_new(recur,icstart), - next = icalrecur_iterator_next(ritr); - !icaltime_is_null_time(next) && i < count; - next = icalrecur_iterator_next(ritr)){ - - tt = icaltime_as_timet(next); + tt = icaltime_as_timet(next); - if (tt >= start ){ - array[i++] = tt; - } - + if (tt >= start ){ + array[i++] = tt; + } + } + icalrecur_iterator_free(ritr); } - icalrecur_iterator_free(ritr); return 1; } diff --git a/src/libical/icalrestriction.c.in b/src/libical/icalrestriction.c.in index 87fa252..d8c03cc 100644 --- a/src/libical/icalrestriction.c.in +++ b/src/libical/icalrestriction.c.in @@ -1,7 +1,18 @@ /* -*- Mode: C -*- */ /* ====================================================================== File: icalrestriction.c - + + This program is free software; you can redistribute it and/or modify + it under the terms of either: + + The LGPL as published by the Free Software Foundation, version + 2.1, available at: http://www.fsf.org/copyleft/lesser.html + + Or: + + The Mozilla Public License Version 1.0. You may obtain a copy of + the License at http://www.mozilla.org/MPL/ + (C) COPYRIGHT 2000, Eric Busboom, http://www.softwarestudio.org ======================================================================*/ /*#line 7 "icalrestriction.c.in"*/ @@ -15,7 +26,11 @@ #include "icalerror.h" #include <assert.h> -#include <stdio.h> /* For snprintf */ +#include <stdio.h> + +#if defined(_MSC_VER) +#define snprintf _snprintf +#endif #define TMP_BUF_SIZE 1024 @@ -281,7 +296,7 @@ const char* icalrestriction_no_dtend( (void)rec; (void)prop; - if( !icalcomponent_get_first_property(comp,ICAL_DTEND_PROPERTY)){ + if(icalcomponent_get_first_property(comp,ICAL_DTEND_PROPERTY)){ return "Failed iTIP restrictions for DTEND property. The component must not have both DURATION and DTEND"; diff --git a/src/libical/icaltime.c b/src/libical/icaltime.c index c1c4f35..b984256 100644 --- a/src/libical/icaltime.c +++ b/src/libical/icaltime.c @@ -47,9 +47,11 @@ #ifdef WIN32 #include <windows.h> +#endif -#define snprintf _snprintf -#define strcasecmp stricmp +#if defined(_MSC_VER) +#define snprintf _snprintf +#define strcasecmp stricmp #endif #ifdef WIN32 @@ -329,6 +331,7 @@ char* set_tz(const char* tzid) if(new_tz == 0){ icalerror_set_errno(ICAL_NEWFAILED_ERROR); + free(old_tz_copy); return 0; } @@ -363,8 +366,12 @@ void unset_tz(char *tzstr) #ifdef HAVE_UNSETENV unsetenv("TZ"); #else +#ifdef _MSC_VER + putenv("TZ="); // The equals is required to remove with MS Visual C++ +#else putenv("TZ"); #endif +#endif } /* Free any previous TZ environment string we have used in a synchronized manner */ @@ -426,15 +433,11 @@ to prevent any crashes */ /* Set TZ to UTC and use mktime to convert to a time_t. */ old_tz = set_tz ("UTC"); -#ifdef WIN32 tzset (); -#endif t = mktime (&stm); unset_tz (old_tz); -#ifdef WIN32 tzset (); -#endif #ifdef HAVE_PTHREAD pthread_mutex_unlock (&tzid_mutex); @@ -507,7 +510,7 @@ struct icaltimetype icaltime_normalize(const struct icaltimetype tt) struct icaltimetype icaltime_from_string(const char* str) { struct icaltimetype tt = icaltime_null_time(); - int size; + size_t size; icalerror_check_arg_re(str!=0,"str",icaltime_null_time()); diff --git a/src/libical/icaltimezone.c b/src/libical/icaltimezone.c index dd0e511..aa9c1d9 100644 --- a/src/libical/icaltimezone.c +++ b/src/libical/icaltimezone.c @@ -40,12 +40,20 @@ #include "icalerror.h" #include "icalparser.h" #include "icaltimezone.h" +#include "icaltimezoneimpl.h" #include "icaltz-util.h" #include <sys/stat.h> +#ifdef HAVE_PTHREAD +#include <pthread.h> +static pthread_mutex_t builtin_mutex = PTHREAD_MUTEX_INITIALIZER; +#endif + #ifdef WIN32 +#ifndef _WIN32_WCE #include <mbstring.h> +#endif #include <windows.h> /* Undef the similar macro from pthread.h, it doesn't check if * gmtime() returns NULL. @@ -54,6 +62,16 @@ /* The gmtime() in Microsoft's C library is MT-safe */ #define gmtime_r(tp,tmp) (gmtime(tp)?(*(tmp)=*gmtime(tp),(tmp)):0) + +// MSVC lacks the POSIX macro S_ISDIR, however it's a trivial one: +#ifndef S_ISDIR +#define S_ISDIR(m) (((m) & _S_IFMT) == _S_IFDIR) +#endif +#endif + +#if defined(_MSC_VER) +#define snprintf _snprintf +#define strcasecmp stricmp #endif /** This is the toplevel directory where the timezone data is installed in. */ @@ -76,54 +94,6 @@ const char *ical_tzid_prefix = "/freeassociation.sourceforge.net/"; somewhere around 2037. */ #define ICALTIMEZONE_MAX_YEAR 2035 -struct _icaltimezone { - char *tzid; - /**< The unique ID of this timezone, - e.g. "/citadel.org/Olson_20010601_1/Africa/Banjul". - This should only be used to identify a VTIMEZONE. It is not - meant to be displayed to the user in any form. */ - - char *location; - /**< The location for the timezone, e.g. "Africa/Accra" for the - Olson database. We look for this in the "LOCATION" or - "X-LIC-LOCATION" properties of the VTIMEZONE component. It - isn't a standard property yet. This will be NULL if no location - is found in the VTIMEZONE. */ - - char *tznames; - /**< This will be set to a combination of the TZNAME properties - from the last STANDARD and DAYLIGHT components in the - VTIMEZONE, e.g. "EST/EDT". If they both use the same TZNAME, - or only one type of component is found, then only one TZNAME - will appear, e.g. "AZOT". If no TZNAME is found this will be - NULL. */ - - double latitude; - double longitude; - /**< The coordinates of the city, in degrees. */ - - icalcomponent *component; - /**< The toplevel VTIMEZONE component loaded from the .ics file for this - timezone. If we need to regenerate the changes data we need this. */ - - icaltimezone *builtin_timezone; - /**< If this is not NULL it points to the builtin icaltimezone - that the above TZID refers to. This icaltimezone should be used - instead when accessing the timezone changes data, so that the - expanded timezone changes data is shared between calendar - components. */ - - int end_year; - /**< This is the last year for which we have expanded the data to. - If we need to calculate a date past this we need to expand the - timezone component data from scratch. */ - - icalarray *changes; - /**< A dynamically-allocated array of time zone changes, sorted by the - time of the change in local time. So we can do fast binary-searches - to convert from local time to UTC. */ -}; - typedef struct _icaltimezonechange icaltimezonechange; struct _icaltimezonechange { @@ -234,10 +204,18 @@ icaltimezone_copy (icaltimezone *originalzone) } memcpy (zone, originalzone, sizeof (icaltimezone)); + if (zone->tzid != NULL) + zone->tzid = strdup (zone->tzid); if (zone->location != NULL) zone->location = strdup (zone->location); if (zone->tznames != NULL) zone->tznames = strdup (zone->tznames); + if (zone->changes != NULL) + zone->changes = icalarray_copy(zone->changes); + + /* Let the caller set the component because then they will + know to be careful not to free this reference twice. */ + zone->component = NULL; return zone; } @@ -298,7 +276,7 @@ icaltimezone_get_vtimezone_properties (icaltimezone *zone, icalcomponent *component) { icalproperty *prop; - const char *tzid, *tzname; + const char *tzid; prop = icalcomponent_get_first_property (component, ICAL_TZID_PROPERTY); if (!prop) @@ -309,17 +287,16 @@ icaltimezone_get_vtimezone_properties (icaltimezone *zone, if (!tzid) return 0; - prop = icalcomponent_get_first_property (component, ICAL_TZNAME_PROPERTY); - if (prop) { - tzname = icalproperty_get_tzname (prop); - zone->tznames = strdup(tzname); - } else - zone->tznames = NULL; - + if (zone->tzid) free(zone->tzid); zone->tzid = strdup (tzid); + + if (zone->component) icalcomponent_free(zone->component); zone->component = component; - if ( zone->location != 0 ) free ( zone->location ); + + if (zone->location) free(zone->location); zone->location = icaltimezone_get_location_from_vtimezone (component); + + if (zone->tznames) free(zone->tznames); zone->tznames = icaltimezone_get_tznames_from_vtimezone (component); return 1; @@ -449,7 +426,7 @@ icaltimezone_get_tznames_from_vtimezone (icalcomponent *component) /* If both standard and daylight TZNAMEs were found, if they are the same we return just one, else we format them like "EST/EDT". */ if (standard_tzname && daylight_tzname) { - unsigned int standard_len, daylight_len; + size_t standard_len, daylight_len; char *tznames; if (!strcmp (standard_tzname, daylight_tzname)) @@ -482,8 +459,7 @@ icaltimezone_ensure_coverage (icaltimezone *zone, int changes_end_year; - if (!zone->component) - icaltimezone_load_builtin_timezone (zone); + icaltimezone_load_builtin_timezone (zone); if (icaltimezone_minimum_expansion_year == -1) { struct icaltimetype today = icaltime_today(); @@ -552,7 +528,7 @@ icaltimezone_expand_vtimezone (icalcomponent *comp, icalrecur_iterator* rrule_iterator; struct icaldatetimeperiodtype rdate; int found_dtstart = 0, found_tzoffsetto = 0, found_tzoffsetfrom = 0; - int has_recurrence = 0; + int has_rdate = 0, has_rrule = 0; /* First we check if it is a STANDARD or DAYLIGHT component, and just return if it isn't. */ @@ -584,8 +560,10 @@ icaltimezone_expand_vtimezone (icalcomponent *comp, found_tzoffsetfrom = 1; break; case ICAL_RDATE_PROPERTY: + has_rdate = 1; + break; case ICAL_RRULE_PROPERTY: - has_recurrence = 1; + has_rrule = 1; break; default: /* Just ignore any other properties. */ @@ -595,6 +573,14 @@ icaltimezone_expand_vtimezone (icalcomponent *comp, prop = icalcomponent_get_next_property (comp, ICAL_ANY_PROPERTY); } + /* Microsoft Outlook for Mac (and possibly other versions) will create + timezones without a tzoffsetfrom property if it's a timezone that + doesn't change for DST. */ + if (found_tzoffsetto && !found_tzoffsetfrom) { + change.prev_utc_offset = change.utc_offset; + found_tzoffsetfrom = 1; + } + /* If we didn't find a DTSTART, TZOFFSETTO and TZOFFSETFROM we have to ignore the component. FIXME: Add an error property? */ if (!found_dtstart || !found_tzoffsetto || !found_tzoffsetfrom) @@ -606,9 +592,9 @@ icaltimezone_expand_vtimezone (icalcomponent *comp, dtstart.hour, dtstart.minute, dtstart.second); #endif - /* If the STANDARD/DAYLIGHT component has no recurrence data, we just add + /* If the STANDARD/DAYLIGHT component has no recurrence rule, we add a single change for the DTSTART. */ - if (!has_recurrence) { + if (!has_rrule) { change.year = dtstart.year; change.month = dtstart.month; change.day = dtstart.day; @@ -627,12 +613,11 @@ icaltimezone_expand_vtimezone (icalcomponent *comp, /* Add the change to the array. */ icalarray_append (changes, &change); - return; } /* The component has recurrence data, so we expand that now. */ prop = icalcomponent_get_first_property (comp, ICAL_ANY_PROPERTY); - while (prop) { + while (prop && (has_rdate || has_rrule)) { #if 0 printf ("Expanding property...\n"); #endif @@ -688,9 +673,32 @@ icaltimezone_expand_vtimezone (icalcomponent *comp, rrule.until.is_utc = 0; } + /* Add the dtstart to changes, otherwise some oddly-defined VTIMEZONE + components can cause the first year to get skipped. */ + change.year = dtstart.year; + change.month = dtstart.month; + change.day = dtstart.day; + change.hour = dtstart.hour; + change.minute = dtstart.minute; + change.second = dtstart.second; + +#if 0 + printf (" Appending RRULE element (Y/M/D): %i/%02i/%02i %i:%02i:%02i\n", + change.year, change.month, change.day, + change.hour, change.minute, change.second); +#endif + + icaltimezone_adjust_change (&change, 0, 0, 0, + -change.prev_utc_offset); + + icalarray_append (changes, &change); + rrule_iterator = icalrecur_iterator_new (rrule, dtstart); - for (;;) { + for (;rrule_iterator;) { occ = icalrecur_iterator_next (rrule_iterator); + /* Skip dtstart since we just added it */ + if (icaltime_compare(dtstart, occ) == 0) + continue; if (occ.year > end_year || icaltime_is_null_time (occ)) break; @@ -899,9 +907,12 @@ icaltimezone_get_utc_offset (icaltimezone *zone, change_num += step; /* If we go past the start of the changes array, then we have no data - for this time so we return a UTC offset of 0. */ - if (change_num < 0) - return 0; + for this time so we return the prev UTC offset. */ + if (change_num < 0) { + if (is_daylight) + *is_daylight = ! tmp_change.is_daylight; + return tmp_change.prev_utc_offset; + } if ((unsigned int)change_num >= zone->changes->num_elements) break; @@ -1169,8 +1180,7 @@ icaltimezone_get_tzid (icaltimezone *zone) if (!zone) return NULL; - if (!zone->tzid) - icaltimezone_load_builtin_timezone (zone); + icaltimezone_load_builtin_timezone (zone); return zone->tzid; } @@ -1196,8 +1206,7 @@ icaltimezone_get_tznames (icaltimezone *zone) if (!zone) return NULL; - if (!zone->component) - icaltimezone_load_builtin_timezone (zone); + icaltimezone_load_builtin_timezone (zone); return zone->tznames; } @@ -1239,8 +1248,7 @@ icaltimezone_get_component (icaltimezone *zone) if (!zone) return NULL; - if (!zone->component) - icaltimezone_load_builtin_timezone (zone); + icaltimezone_load_builtin_timezone (zone); return zone->component; } @@ -1354,6 +1362,7 @@ void icaltimezone_free_builtin_timezones(void) { icaltimezone_array_free(builtin_timezones); + builtin_timezones = 0; } @@ -1361,8 +1370,9 @@ icaltimezone_free_builtin_timezones(void) icaltimezone* icaltimezone_get_builtin_timezone (const char *location) { + icalcomponent *comp; icaltimezone *zone; - int lower; + unsigned int lower; const char *zone_location; if (!location || !location[0]) @@ -1371,7 +1381,7 @@ icaltimezone_get_builtin_timezone (const char *location) if (!builtin_timezones) icaltimezone_init_builtin_timezones (); - if (!strcmp (location, "UTC")) + if (strcmp (location, "UTC") == 0 || strcmp (location, "GMT") == 0) return &utc_timezone; #if 0 @@ -1402,6 +1412,20 @@ icaltimezone_get_builtin_timezone (const char *location) return zone; } + /* Check whether file exists, but is not mentioned in zone.tab. + It means it's a deprecated timezone, but still available. */ + comp = icaltzutil_fetch_timezone (location); + if (comp) { + icaltimezone tz; + icaltimezone_init (&tz); + if (icaltimezone_set_component (&tz, comp)) { + icalarray_append (builtin_timezones, &tz); + return icalarray_element_at (builtin_timezones, builtin_timezones->num_elements - 1); + } else { + icalcomponent_free (comp); + } + } + return NULL; } @@ -1462,8 +1486,7 @@ icaltimezone_get_builtin_timezone_from_offset (int offset, const char *tzname) for (i=0; i<count; i++) { int z_offset; zone = icalarray_element_at (builtin_timezones, i); - if (!zone->component) - icaltimezone_load_builtin_timezone (zone); + icaltimezone_load_builtin_timezone (zone); z_offset = get_offset(zone); @@ -1485,12 +1508,15 @@ icaltimezone_get_builtin_timezone_from_tzid (const char *tzid) if (!tzid || !tzid[0]) return NULL; + if (strcmp (tzid, "UTC") == 0 || strcmp (tzid, "GMT") == 0) { + return icaltimezone_get_builtin_timezone(tzid); + } + /* Check that the TZID starts with our unique prefix. */ if (strncmp (tzid, ical_tzid_prefix, strlen(ical_tzid_prefix))) return NULL; /* Get the location, which is after the 3rd '/' character. */ - p = tzid; for (p = tzid; *p; p++) { if (*p == '/') { num_slashes++; @@ -1541,7 +1567,14 @@ icaltimezone_init_builtin_timezones (void) /* Initialize the special UTC timezone. */ utc_timezone.tzid = (char *)"UTC"; - icaltimezone_parse_zone_tab (); +#ifdef HAVE_PTHREAD + pthread_mutex_lock(&builtin_mutex); +#endif + if (!builtin_timezones) + icaltimezone_parse_zone_tab (); +#ifdef HAVE_PTHREAD + pthread_mutex_unlock(&builtin_mutex); +#endif } static int @@ -1570,7 +1603,7 @@ parse_coord (char *coord, } static int fetch_lat_long_from_string (const char *str, int *latitude_degrees, int *latitude_minutes, int *latitude_seconds, - int *longitude_degrees, int *longitude_minutes, int *longitude_seconds, char *location) + int *longitude_degrees, int *longitude_minutes, int *longitude_seconds, char *location) { size_t len; char *sptr, *lat, *lon, *loc, *temp; @@ -1614,10 +1647,17 @@ fetch_lat_long_from_string (const char *str, int *latitude_degrees, int *latitu while (*lon != '+' && *lon != '-') lon++; - if (parse_coord (lat, lon - lat, latitude_degrees, latitude_minutes, latitude_seconds) == 1 || - parse_coord (lon, strlen (lon), longitude_degrees, longitude_minutes, longitude_seconds) - == 1) - return 1; + if (parse_coord (lat, (int)(lon - lat), + latitude_degrees, + latitude_minutes, + latitude_seconds) == 1 || + parse_coord (lon, (int)strlen(lon), + longitude_degrees, + longitude_minutes, + longitude_seconds) == 1) { + free(lat); + return 1; + } free (lat); @@ -1638,7 +1678,7 @@ icaltimezone_parse_zone_tab (void) FILE *fp; char buf[1024]; /* Used to store each line of zones.tab as it is read. */ char location[1024]; /* Stores the city name when parsing buf. */ - unsigned int filename_len; + size_t filename_len; int latitude_degrees = 0, latitude_minutes = 0, latitude_seconds = 0; int longitude_degrees = 0, longitude_minutes = 0, longitude_seconds = 0; icaltimezone zone; @@ -1735,7 +1775,7 @@ icaltimezone_parse_zone_tab (void) void icaltimezone_release_zone_tab (void) { - int i; + unsigned int i; icalarray *mybuiltin_timezones = builtin_timezones; if (builtin_timezones == NULL) @@ -1756,6 +1796,17 @@ icaltimezone_load_builtin_timezone (icaltimezone *zone) if (!zone->location || !zone->location[0]) return; +#ifdef HAVE_PTHREAD + pthread_mutex_lock(&builtin_mutex); + if (zone->component) + goto out; +#else +#ifdef USE_BUILTIN_TZDATA + if (zone->component) + return; +#endif +#endif + #ifdef USE_BUILTIN_TZDATA { char *filename; @@ -1769,7 +1820,7 @@ icaltimezone_load_builtin_timezone (icaltimezone *zone) filename = (char*) malloc (filename_len); if (!filename) { icalerror_set_errno(ICAL_NEWFAILED_ERROR); - return; + goto out; } snprintf (filename, filename_len, "%s/%s.ics", get_zone_directory(), @@ -1779,7 +1830,7 @@ icaltimezone_load_builtin_timezone (icaltimezone *zone) free (filename); if (!fp) { icalerror_set_errno(ICAL_FILE_ERROR); - return; + goto out; } @@ -1803,7 +1854,7 @@ icaltimezone_load_builtin_timezone (icaltimezone *zone) if (!subcomp) { icalerror_set_errno(ICAL_PARSE_ERROR); - return; + goto out; } icaltimezone_get_vtimezone_properties (zone, subcomp); @@ -1812,8 +1863,13 @@ icaltimezone_load_builtin_timezone (icaltimezone *zone) icalcomponent_remove_component(comp,subcomp); icalcomponent_free(comp); } -#endif +#endif + out: +#ifdef HAVE_PTHREAD + pthread_mutex_unlock(&builtin_mutex); +#endif + return; } @@ -1867,7 +1923,6 @@ icaltimezone_dump_changes (icaltimezone *zone, printf ("Num changes: %i\n", zone->changes->num_elements); #endif - change_num = 0; for (change_num = 0; (unsigned int)change_num < zone->changes->num_elements; change_num++) { zone_change = icalarray_element_at (zone->changes, change_num); @@ -1929,10 +1984,18 @@ static const char* get_zone_directory(void) return zone_files_directory == NULL ? ZONEINFO_DIRECTORY : zone_files_directory; #else wchar_t wbuffer[1000]; +#ifndef _WIN32_WCE char buffer[1000], zoneinfodir[1000], dirname[1000]; +#else + wchar_t zoneinfodir[1000], dirname[1000]; +#endif int used_default; static char *cache = NULL; +#ifndef _WIN32_WCE char *dirslash, *zislash; +#else + wchar_t *dirslash, *zislash; +#endif struct stat st; if (zone_files_directory) @@ -1945,6 +2008,8 @@ static const char* get_zone_directory(void) if (!GetModuleFileNameW (NULL, wbuffer, sizeof (wbuffer) / sizeof (wbuffer[0]))) return ZONEINFO_DIRECTORY; +/*wince supports only unicode*/ +#ifndef _WIN32_WCE /* Convert to system codepage */ if (!WideCharToMultiByte (CP_ACP, 0, wbuffer, -1, buffer, sizeof (buffer), NULL, &used_default) || @@ -1957,6 +2022,7 @@ static const char* get_zone_directory(void) used_default) return ZONEINFO_DIRECTORY; } +#endif /* Look for the zoneinfo directory somewhere in the path where * the app is installed. If the path to the app is * @@ -1992,10 +2058,38 @@ static const char* get_zone_directory(void) */ /* Strip away basename of app .exe first */ +#ifndef _WIN32_WCE dirslash = _mbsrchr (buffer, '\\'); +#else + dirslash = wcsrchr (wbuffer, L'\\'); +#endif if (dirslash) +#ifndef _WIN32_WCE *dirslash = '\0'; +#else + *dirslash = L'\0'; +#endif +#ifdef _WIN32_WCE + while ((dirslash = wcsrchr (wbuffer, '\\'))) { + /* Strip one more directory from app .exe location */ + *dirslash = L'\0'; + + MultiByteToWideChar(CP_ACP,0,ZONEINFO_DIRECTORY,-1,zoneinfodir,1000); + + while ((zislash = wcschr (zoneinfodir, L'/'))) { + *zislash = L'.'; + wcscpy (dirname, wbuffer); + wcscat (dirname, "/"); + wcscat (dirname, zislash + 1); + if (stat (dirname, &st) == 0 && + S_ISDIR (st.st_mode)) { + cache = wce_wctomb (dirname); + return cache; + } + } + } +#else while ((dirslash = _mbsrchr (buffer, '\\'))) { /* Strip one more directory from app .exe location */ *dirslash = '\0'; @@ -2013,12 +2107,15 @@ static const char* get_zone_directory(void) } } } +#endif return ZONEINFO_DIRECTORY; #endif } void set_zone_directory(char *path) { + if (zone_files_directory) + free_zone_directory(); zone_files_directory = malloc(strlen(path)+1); if ( zone_files_directory != NULL ) { @@ -2031,6 +2128,7 @@ void free_zone_directory(void) if ( zone_files_directory != NULL ) { free(zone_files_directory); + zone_files_directory = NULL; } } diff --git a/src/libical/icaltimezoneimpl.h b/src/libical/icaltimezoneimpl.h new file mode 100644 index 0000000..354d5bb --- /dev/null +++ b/src/libical/icaltimezoneimpl.h @@ -0,0 +1,88 @@ +/* -*- Mode: C -*- + ====================================================================== + FILE: icaltimezoneimpl.h + CREATOR: glenn 07 March 2010 + + $Id: icalparameterimpl.h,v 1.4 2008-01-15 23:17:40 dothebart Exp $ + $Locker: $ + + + (C) COPYRIGHT 2000, Eric Busboom <eric@softwarestudio.org> + http://www.softwarestudio.org + + This program is free software; you can redistribute it and/or modify + it under the terms of either: + + The LGPL as published by the Free Software Foundation, version + 2.1, available at: http://www.fsf.org/copyleft/lesser.html + + Or: + + The Mozilla Public License Version 1.0. You may obtain a copy of + the License at http://www.mozilla.org/MPL/ + + Contributions from: + + ======================================================================*/ +#ifdef HAVE_CONFIG_H +#include <config.h> +#endif + +#ifndef ICALTIMEZONE_IMPL +#define ICALTIMEZONE_IMPL + +#include "icaltimezone.h" +#include "icalcomponent.h" +#include "icalarray.h" + +struct _icaltimezone { + char *tzid; + /**< The unique ID of this timezone, + e.g. "/citadel.org/Olson_20010601_1/Africa/Banjul". + This should only be used to identify a VTIMEZONE. It is not + meant to be displayed to the user in any form. */ + + char *location; + /**< The location for the timezone, e.g. "Africa/Accra" for the + Olson database. We look for this in the "LOCATION" or + "X-LIC-LOCATION" properties of the VTIMEZONE component. It + isn't a standard property yet. This will be NULL if no location + is found in the VTIMEZONE. */ + + char *tznames; + /**< This will be set to a combination of the TZNAME properties + from the last STANDARD and DAYLIGHT components in the + VTIMEZONE, e.g. "EST/EDT". If they both use the same TZNAME, + or only one type of component is found, then only one TZNAME + will appear, e.g. "AZOT". If no TZNAME is found this will be + NULL. */ + + double latitude; + double longitude; + /**< The coordinates of the city, in degrees. */ + + icalcomponent *component; + /**< The toplevel VTIMEZONE component loaded from the .ics file for this + timezone. If we need to regenerate the changes data we need this. */ + + icaltimezone *builtin_timezone; + /**< If this is not NULL it points to the builtin icaltimezone + that the above TZID refers to. This icaltimezone should be used + instead when accessing the timezone changes data, so that the + expanded timezone changes data is shared between calendar + components. */ + + int end_year; + /**< This is the last year for which we have expanded the data to. + If we need to calculate a date past this we need to expand the + timezone component data from scratch. */ + + icalarray *changes; + /**< A dynamically-allocated array of time zone changes, sorted by the + time of the change in local time. So we can do fast binary-searches + to convert from local time to UTC. */ +}; + + + +#endif /*ICALTIMEZONE_IMPL*/ diff --git a/src/libical/icaltypes.c b/src/libical/icaltypes.c index 2debac4..8ce5d1d 100644 --- a/src/libical/icaltypes.c +++ b/src/libical/icaltypes.c @@ -36,13 +36,19 @@ #include <string.h> /* for icalmemory_strdup */ #include <assert.h> -#ifdef WIN32 -#define snprintf _snprintf -#define strcasecmp stricmp +#if defined(_MSC_VER) +#define snprintf _snprintf +#define strcasecmp stricmp #endif #define TEMP_MAX 1024 +#ifdef HAVE_PTHREAD + #include <pthread.h> + static pthread_mutex_t unk_token_mutex = PTHREAD_MUTEX_INITIALIZER; +#endif + +static ical_unknown_token_handling unknownTokenHandling = ICAL_TREAT_AS_ERROR; int icaltriggertype_is_null_trigger(struct icaltriggertype tr) { @@ -77,16 +83,13 @@ struct icaltriggertype icaltriggertype_from_string(const char* str) { - struct icaltriggertype tr, null_tr; + struct icaltriggertype tr; icalerrorstate es = ICAL_ERROR_DEFAULT; icalerrorenum e; tr.time= icaltime_null_time(); tr.duration = icaldurationtype_from_int(0); - null_tr = tr; - - /* Suppress errors so a failure in icaltime_from_string() does not cause an abort */ es = icalerror_get_error_state(ICAL_MALFORMEDDATA_ERROR); if(str == 0) goto error; @@ -178,9 +181,9 @@ char* icalreqstattype_as_string_r(struct icalreqstattype stat) { char *temp; - temp = (char*)icalmemory_new_buffer(TEMP_MAX); - icalerror_check_arg_rz((stat.code != ICAL_UNKNOWN_STATUS),"Status"); + + temp = (char*)icalmemory_new_buffer(TEMP_MAX); if (stat.desc == 0){ stat.desc = icalenum_reqstat_desc(stat.code); @@ -199,3 +202,35 @@ char* icalreqstattype_as_string_r(struct icalreqstattype stat) return temp; } + +ical_unknown_token_handling ical_get_unknown_token_handling_setting(void) +{ + ical_unknown_token_handling myHandling; + +#ifdef HAVE_PTHREAD + pthread_mutex_lock (&unk_token_mutex); +#endif + + myHandling = unknownTokenHandling; + +#ifdef HAVE_PTHREAD + pthread_mutex_unlock (&unk_token_mutex); +#endif + + return myHandling; +} + +void ical_set_unknown_token_handling_setting(ical_unknown_token_handling newSetting) +{ + +#ifdef HAVE_PTHREAD + pthread_mutex_lock (&unk_token_mutex); +#endif + + unknownTokenHandling = newSetting; + +#ifdef HAVE_PTHREAD + pthread_mutex_unlock (&unk_token_mutex); +#endif + +} diff --git a/src/libical/icaltypes.h b/src/libical/icaltypes.h index 2f0e6f6..b1629c2 100644 --- a/src/libical/icaltypes.h +++ b/src/libical/icaltypes.h @@ -34,8 +34,8 @@ struct icalgeotype { - float lat; - float lon; + double lat; + double lon; }; @@ -67,7 +67,7 @@ don't use it after the original string has been freed. BTW, you would get that original string from *icalproperty_get_requeststatus() or icalvalue_get_text(), when -operating on a the value of a request_status property. */ +operating on the value of a request_status property. */ struct icalreqstattype { @@ -105,5 +105,18 @@ struct icaltimezonetype { void icaltimezonetype_free(struct icaltimezonetype tzt); +/* ical_unknown_token_handling : + * How should the ICAL library handle components, properties and parameters with + * unknown names? + * FIXME: Currently only affects parameters. Extend to components and properties. + */ +typedef enum ical_unknown_token_handling { + ICAL_ASSUME_IANA_TOKEN = 1, + ICAL_DISCARD_TOKEN = 2, + ICAL_TREAT_AS_ERROR = 3 +} ical_unknown_token_handling; + +ical_unknown_token_handling ical_get_unknown_token_handling_setting(void); +void ical_set_unknown_token_handling_setting(ical_unknown_token_handling newSetting); #endif /* !ICALTYPES_H */ diff --git a/src/libical/icaltz-util.c b/src/libical/icaltz-util.c index d999457..adf7598 100644 --- a/src/libical/icaltz-util.c +++ b/src/libical/icaltz-util.c @@ -25,12 +25,20 @@ #endif #include <string.h> +#ifdef HAVE_STDINT_H +#include <stdint.h> +#endif + #if defined(sun) && defined(__SVR4) +#include <sys/types.h> #include <sys/byteorder.h> #else # ifdef HAVE_BYTESWAP_H # include <byteswap.h> # endif +# ifdef HAVE_ENDIAN_H +# include <endian.h> +# else # ifdef HAVE_SYS_ENDIAN_H # include <sys/endian.h> # ifdef bswap32 @@ -39,12 +47,10 @@ # define bswap_32 swap32 # endif # endif -# ifdef HAVE_ENDIAN_H -# include <endian.h> -# endif +# endif #endif -#ifdef WIN32 +#ifdef _MSC_VER #if !defined(HAVE_BYTESWAP_H) && !defined(HAVE_SYS_ENDIAN_H) && !defined(HAVE_ENDIAN_H) #define bswap_16(x) (((x) << 8) & 0xff00) | (((x) >> 8 ) & 0xff) #define bswap_32(x) (((x) << 24) & 0xff000000) \ @@ -63,6 +69,12 @@ #include <io.h> #endif +#if defined(__APPLE__) +#define bswap_16(x) (((x) << 8) & 0xff00) | (((x) >> 8 ) & 0xff) +#define bswap_32 __builtin_bswap32 +#define bswap_64 __builtin_bswap64 +#endif + #ifndef PATH_MAX #define PATH_MAX 512 #endif @@ -176,42 +188,8 @@ zname_from_stridx (char *str, long int idx) return ret; } -static void -find_transidx (time_t *transitions, ttinfo *types, int *trans_idx, long int num_trans, int *stdidx, int *dstidx) -{ - time_t now = time (NULL); - int i, found = 0, idx; - - for (i = 0; i < num_trans; i++) { - if (now < transitions [i]) { - found = 1; - break; - } - } - - /* If the transition time is not found, it means the timezone does not have the dst changes */ - if (!found) { - *stdidx = i -1; - return; - } - - idx = trans_idx [i]; - types [idx].isdst ? (*dstidx = i) : (*stdidx = i); - - if (i < num_trans - 1) - i++; - else - return; - - idx = trans_idx [i]; - types [idx].isdst ? (*dstidx = i) : (*stdidx = i); - - return; -} - - static void -set_zone_directory (void) +set_zonedir (void) { char file_path[PATH_MAX]; const char *fname = ZONES_TAB_SYSTEM_FILENAME; @@ -231,7 +209,7 @@ const char * icaltzutil_get_zone_directory (void) { if (!zdir) - set_zone_directory (); + set_zonedir (); return zdir; } @@ -257,24 +235,28 @@ icaltzutil_fetch_timezone (const char *location) int ret = 0; FILE *f; tzinfo type_cnts; - unsigned int num_trans, num_types, num_chars, num_leaps, num_isstd, num_isgmt; + unsigned int i, num_trans, num_types, num_chars, num_leaps, num_isstd, num_isgmt; time_t *transitions = NULL; - time_t trans; - int *trans_idx = NULL, dstidx = -1, stdidx = -1, pos, sign, zidx, zp_idx, i; + time_t trans, start, end; + int *trans_idx = NULL, pos, sign, zidx, zp_idx, idx, prev_idx; ttinfo *types = NULL; char *znames = NULL, *full_path, *tzid, *r_trans, *temp; leap *leaps = NULL; - icalcomponent *tz_comp = NULL, *dst_comp = NULL, *std_comp = NULL; + icalcomponent *tz_comp = NULL, *comp = NULL; icalproperty *icalprop; icaltimetype dtstart, icaltime; struct icalrecurrencetype ical_recur; + const char *basedir; - if (!zdir) - set_zone_directory (); - - full_path = (char *) malloc (strlen (zdir) + strlen (location) + 2); - sprintf (full_path,"%s/%s",zdir, location); - + basedir = icaltzutil_get_zone_directory(); + if (!basedir) { + icalerror_set_errno (ICAL_FILE_ERROR); + return NULL; + } + + full_path = (char *) malloc (strlen (basedir) + strlen (location) + 2); + sprintf (full_path,"%s/%s",basedir, location); + if ((f = fopen (full_path, "rb")) == 0) { icalerror_set_errno (ICAL_FILE_ERROR); free (full_path); @@ -319,7 +301,10 @@ icaltzutil_fetch_timezone (const char *location) EFREAD(a, 4, 1, f); c = fgetc (f); types [i].isdst = c; - c = fgetc (f); + if((c = fgetc (f)) < 0) { + c = 0; + break; + } types [i].abbr = c; types [i].gmtoff = decode (a); } @@ -361,11 +346,6 @@ icaltzutil_fetch_timezone (const char *location) for (i = 0; i < num_types; i++) types [i].zname = zname_from_stridx (znames, types [i].abbr); - if (num_trans != 0) - find_transidx (transitions, types, trans_idx, num_trans, &stdidx, &dstidx); - else - stdidx = 0; - tz_comp = icalcomponent_new (ICAL_VTIMEZONE_COMPONENT); /* Add tzid property */ @@ -378,83 +358,54 @@ icaltzutil_fetch_timezone (const char *location) icalprop = icalproperty_new_x (location); icalproperty_set_x_name (icalprop, "X-LIC-LOCATION"); icalcomponent_add_property (tz_comp, icalprop); - - if (stdidx != -1) { - if (num_trans != 0) - zidx = trans_idx [stdidx]; - else - zidx = 0; - - std_comp = icalcomponent_new (ICAL_XSTANDARD_COMPONENT); - icalprop = icalproperty_new_tzname (types [zidx].zname); - icalcomponent_add_property (std_comp, icalprop); - - trans = transitions [stdidx] + types [zidx].gmtoff; - icaltime = icaltime_from_timet (trans, 0); - dtstart = icaltime; - dtstart.year = 1970; - dtstart.minute = dtstart.second = 0; - icalprop = icalproperty_new_dtstart (dtstart); - icalcomponent_add_property (std_comp, icalprop); - - /* If DST changes are present use RRULE */ - if (dstidx != -1) { - zp_idx = trans_idx [stdidx-1]; - icalrecurrencetype_clear (&ical_recur); - ical_recur.freq = ICAL_YEARLY_RECURRENCE; - ical_recur.by_month [0] = icaltime.month; - pos = calculate_pos (icaltime); - pos < 0 ? (sign = -1): (sign = 1); - ical_recur.by_day [0] = sign * ((abs (pos) * 8) + icaltime_day_of_week (icaltime)); - icalprop = icalproperty_new_rrule (ical_recur); - icalcomponent_add_property (std_comp, icalprop); - - icalprop = icalproperty_new_tzoffsetfrom (types [zp_idx].gmtoff); - icalcomponent_add_property (std_comp, icalprop); - } else { - icalprop = icalproperty_new_tzoffsetfrom (types [zidx].gmtoff); - icalcomponent_add_property (std_comp, icalprop); - } - icalprop = icalproperty_new_tzoffsetto (types [zidx].gmtoff); - icalcomponent_add_property (std_comp, icalprop); - - icalcomponent_add_component (tz_comp, std_comp); - } else - icalerror_set_errno (ICAL_MALFORMEDDATA_ERROR); - - if (dstidx != -1) { - zidx = trans_idx [dstidx]; - zp_idx = trans_idx [dstidx-1]; - dst_comp = icalcomponent_new (ICAL_XDAYLIGHT_COMPONENT); - icalprop = icalproperty_new_tzname (types [zidx].zname); - icalcomponent_add_property (dst_comp, icalprop); - - trans = transitions [dstidx] + types [zidx].gmtoff; - icaltime = icaltime_from_timet (trans, 0); - dtstart = icaltime; - dtstart.year = 1970; - dtstart.minute = dtstart.second = 0; + prev_idx = 0; + if (num_trans == 0) { + prev_idx = idx = 0; + + } else { + idx = trans_idx[0]; + } + start = 0; + for (i = 1; i < num_trans; i++, start = end) { + prev_idx = idx; + idx = trans_idx [i]; + end = transitions [i] + types [prev_idx].gmtoff; + /* don't bother starting until the epoch */ + if (0 > end) + continue; + + if (types [prev_idx].isdst) + comp = icalcomponent_new (ICAL_XDAYLIGHT_COMPONENT); + else + comp = icalcomponent_new (ICAL_XSTANDARD_COMPONENT); + icalprop = icalproperty_new_tzname (types [prev_idx].zname); + icalcomponent_add_property (comp, icalprop); + dtstart = icaltime_from_timet(start, 0); icalprop = icalproperty_new_dtstart (dtstart); - icalcomponent_add_property (dst_comp, icalprop); - - icalrecurrencetype_clear (&ical_recur); - ical_recur.freq = ICAL_YEARLY_RECURRENCE; - ical_recur.by_month [0] = icaltime.month; - pos = calculate_pos (icaltime); - pos < 0 ? (sign = -1): (sign = 1); - ical_recur.by_day [0] = sign * ((abs (pos) * 8) + icaltime_day_of_week (icaltime)); - icalprop = icalproperty_new_rrule (ical_recur); - icalcomponent_add_property (dst_comp, icalprop); - - icalprop = icalproperty_new_tzoffsetfrom (types [zp_idx].gmtoff); - icalcomponent_add_property (dst_comp, icalprop); - - icalprop = icalproperty_new_tzoffsetto (types [zidx].gmtoff); - icalcomponent_add_property (dst_comp, icalprop); - - icalcomponent_add_component (tz_comp, dst_comp); + icalcomponent_add_property (comp, icalprop); + icalprop = icalproperty_new_tzoffsetfrom (types [idx].gmtoff); + icalcomponent_add_property (comp, icalprop); + icalprop = icalproperty_new_tzoffsetto (types [prev_idx].gmtoff); + icalcomponent_add_property (comp, icalprop); + icalcomponent_add_component (tz_comp, comp); } + /* finally, add a last zone with no end date */ + if (types [idx].isdst) + comp = icalcomponent_new (ICAL_XDAYLIGHT_COMPONENT); + else + comp = icalcomponent_new (ICAL_XSTANDARD_COMPONENT); + icalprop = icalproperty_new_tzname (types [idx].zname); + icalcomponent_add_property (comp, icalprop); + dtstart = icaltime_from_timet(start, 0); + icalprop = icalproperty_new_dtstart (dtstart); + icalcomponent_add_property (comp, icalprop); + icalprop = icalproperty_new_tzoffsetfrom (types [prev_idx].gmtoff); + icalcomponent_add_property (comp, icalprop); + icalprop = icalproperty_new_tzoffsetto (types [idx].gmtoff); + icalcomponent_add_property (comp, icalprop); + icalcomponent_add_component (tz_comp, comp); + error: if (f) diff --git a/src/libical/icalvalue.c b/src/libical/icalvalue.c index bad30e2..63a0121 100644 --- a/src/libical/icalvalue.c +++ b/src/libical/icalvalue.c @@ -50,9 +50,9 @@ #include <locale.h> #include <ctype.h> /* for isspace and isdigit */ -#ifdef WIN32 -#define snprintf _snprintf -#define strcasecmp stricmp +#if defined(_MSC_VER) +#define snprintf _snprintf +#define strcasecmp stricmp #endif #if _MAC_OS_ @@ -136,18 +136,37 @@ icalvalue* icalvalue_new_clone(const icalvalue* old) { new->data.v_string=icalmemory_strdup(old->data.v_string); if ( new->data.v_string == 0 ) { + icalvalue_free(new); return 0; } } break; } + case ICAL_ACTION_VALUE: + { + new->data = old->data; + + if (old->data.v_enum == ICAL_ACTION_X) { + //preserve the custom action string + if (old->x_value != 0) { + new->x_value = icalmemory_strdup(old->x_value); + + if (new->x_value == 0) { + icalvalue_free(new); + return 0; + } + } + } + break; + } case ICAL_RECUR_VALUE: { if(old->data.v_recur != 0){ new->data.v_recur = malloc(sizeof(struct icalrecurrencetype)); if(new->data.v_recur == 0){ + icalvalue_free(new); return 0; } @@ -163,6 +182,7 @@ icalvalue* icalvalue_new_clone(const icalvalue* old) { new->x_value=icalmemory_strdup(old->x_value); if (new->x_value == 0) { + icalvalue_free(new); return 0; } } @@ -187,6 +207,7 @@ static char* icalmemory_strdup_and_dequote(const char* str) const char* p; char* out = (char*)malloc(sizeof(char) * strlen(str) +1); char* pout; + int wroteNull = 0; if (out == 0){ return 0; @@ -194,7 +215,11 @@ static char* icalmemory_strdup_and_dequote(const char* str) pout = out; - for (p = str; *p!=0; p++){ + /* Stop the loop when encountering a terminator in the source string + or if a null has been written to the destination. This prevents + reading past the end of the source string if the last character + is a backslash. */ + for (p = str; !wroteNull && *p!=0; p++){ if( *p == '\\') { @@ -202,6 +227,7 @@ static char* icalmemory_strdup_and_dequote(const char* str) switch(*p){ case 0: { + wroteNull = 1; //stops iteration so p isn't incremented past the end of str *pout = '\0'; break; @@ -263,6 +289,84 @@ static char* icalmemory_strdup_and_dequote(const char* str) } /* + * Returns a quoted copy of a string + * @todo This is not RFC2445 compliant. + * The RFC only allows: + * TSAFE-CHAR = %x20-21 / %x23-2B / %x2D-39 / %x3C-5B / %x5D-7E / NON-US-ASCII + * As such, \t\r\b\f are not allowed, not even escaped + */ +static char* icalmemory_strdup_and_quote(const icalvalue* value, + const char* unquoted_str) +{ + char *str; + char *str_p; + const char *p; + size_t buf_sz; + + buf_sz = strlen(unquoted_str)+1; + + str_p = str = (char*)icalmemory_new_buffer(buf_sz); + + if (str_p == 0){ + return 0; + } + + for(p=unquoted_str; *p!=0; p++){ + + switch(*p){ + case '\n': { + icalmemory_append_string(&str,&str_p,&buf_sz,"\\n"); + break; + } + + case '\t': { + icalmemory_append_string(&str,&str_p,&buf_sz,"\\t"); + break; + } + case '\r': { + icalmemory_append_string(&str,&str_p,&buf_sz,"\\r"); + break; + } + case '\b': { + icalmemory_append_string(&str,&str_p,&buf_sz,"\\b"); + break; + } + case '\f': { + icalmemory_append_string(&str,&str_p,&buf_sz,"\\f"); + break; + } + + case ';': + case ',': + /* unescaped COMMA is allowed in CATEGORIES property as its + considered a list delimiter here, see: + http://tools.ietf.org/html/rfc2445#section-4.3.11 */ + if (icalproperty_isa(value->parent) == ICAL_CATEGORIES_PROPERTY) { + icalmemory_append_char(&str,&str_p,&buf_sz,*p); + break; + } + case '"': + case '\\': { + icalmemory_append_char(&str,&str_p,&buf_sz,'\\'); + icalmemory_append_char(&str,&str_p,&buf_sz,*p); + break; + } + + default: { + icalmemory_append_char(&str,&str_p,&buf_sz,*p); + } + } + } + + /* Assume the last character is not a '\0' and add one. We could + check *str_p != 0, but that would be an uninitialized memory + read. */ + + icalmemory_append_char(&str,&str_p,&buf_sz,'\0'); + return str; +} + +/* * FIXME * * This is a bad API, as it forces callers to specify their own X type. @@ -297,14 +401,16 @@ icalvalue* icalvalue_new_enum(icalvalue_kind kind, int x_type, const char* str) * If you want a code that that does the same job with a decimal separator * dependant on the current locale, then use strtof() from libc. */ -int simple_str_to_float(const char* from, - float *result, - char** to) +int simple_str_to_double(const char* from, + double *result, + char** to) { #define TMP_NUM_SIZE 100 char *start=NULL, *end=NULL, *cur=(char*)from ; char tmp_buf[TMP_NUM_SIZE+1] ; /*hack*/ +#ifndef _WIN32_WCE struct lconv *loc_data = localeconv () ; +#endif int i=0 ; /*sanity checks*/ @@ -335,12 +441,13 @@ int simple_str_to_float(const char* from, return 1 ; } memset(tmp_buf, 0, TMP_NUM_SIZE+1) ; - i=0 ; + /* * copy the float number string into tmp_buf, and take * care to have the (optional) decimal separator be the one * of the current locale. */ +#ifndef _WIN32_WCE for (i=0 ; i < end - from ;++i) { if (start[i] == '.' && loc_data @@ -353,6 +460,9 @@ int simple_str_to_float(const char* from, tmp_buf[i] = start[i] ; } } +#else + GetNumberFormat(LOCALE_SYSTEM_DEFAULT,0,start, NULL, tmp_buf,TMP_NUM_SIZE); +#endif if (to) *to = end ; *result = atof(tmp_buf) ; @@ -388,7 +498,7 @@ icalvalue* icalvalue_new_from_string_with_error(icalvalue_kind kind,const char* case ICAL_BINARY_VALUE: { icalattach *attach; - attach = icalattach_new_from_data ((unsigned char*)str, 0, 0); + attach = icalattach_new_from_data (str, 0, 0); if ( !attach ) break; value = icalvalue_new_attach (attach); @@ -495,7 +605,7 @@ icalvalue* icalvalue_new_from_string_with_error(icalvalue_kind kind,const char* char *cur=NULL ; struct icalgeotype geo = {0.0, 0.0}; - if (simple_str_to_float (str, &geo.lat, &cur)) { + if (simple_str_to_double (str, &geo.lat, &cur)) { goto geo_parsing_error ; } @@ -518,7 +628,7 @@ icalvalue* icalvalue_new_from_string_with_error(icalvalue_kind kind,const char* ++cur ; } - if (simple_str_to_float (cur, &geo.lon, &cur)) { + if (simple_str_to_double (cur, &geo.lon, &cur)) { goto geo_parsing_error ; } value = icalvalue_new_geo (geo) ; @@ -706,6 +816,7 @@ icalvalue_free (icalvalue* v) case ICAL_TEXT_VALUE: case ICAL_CALADDRESS_VALUE: case ICAL_URI_VALUE: + case ICAL_STRING_VALUE: case ICAL_QUERY_VALUE: { if (v->data.v_string != 0) { @@ -766,9 +877,10 @@ static char* icalvalue_binary_as_ical_string_r(const icalvalue* value) { static char* icalvalue_int_as_ical_string_r(const icalvalue* value) { int data; - char* str = (char*)icalmemory_new_buffer(MAX_INT_DIGITS); + char* str; icalerror_check_arg_rz( (value!=0),"value"); + str = (char*)icalmemory_new_buffer(MAX_INT_DIGITS); data = icalvalue_get_integer(value); @@ -782,10 +894,11 @@ static char* icalvalue_utcoffset_as_ical_string_r(const icalvalue* value) { int data,h,m,s; char sign; - char* str = (char*)icalmemory_new_buffer(9); + char* str; icalerror_check_arg_rz( (value!=0),"value"); + str = (char*)icalmemory_new_buffer(9); data = icalvalue_get_utcoffset(value); if (abs(data) == data){ @@ -827,81 +940,8 @@ static char* icalvalue_recur_as_ical_string_r(const icalvalue* value) return icalrecurrencetype_as_string_r(recur); } - /* @todo This is not RFC2445 compliant. - * The RFC only allows: - * TSAFE-CHAR = %x20-21 / %x23-2B / %x2D-39 / %x3C-5B / %x5D-7E / NON-US-ASCII - * As such, \t\r\b\f are not allowed, not even escaped - */ - static char* icalvalue_text_as_ical_string_r(const icalvalue* value) { - char *str; - char *str_p; - const char *p; - size_t buf_sz; - - buf_sz = strlen(value->data.v_string)+1; - - str_p = str = (char*)icalmemory_new_buffer(buf_sz); - - if (str_p == 0){ - return 0; - } - - for(p=value->data.v_string; *p!=0; p++){ - - switch(*p){ - case '\n': { - icalmemory_append_string(&str,&str_p,&buf_sz,"\\n"); - break; - } - - case '\t': { - icalmemory_append_string(&str,&str_p,&buf_sz,"\\t"); - break; - } - case '\r': { - icalmemory_append_string(&str,&str_p,&buf_sz,"\\r"); - break; - } - case '\b': { - icalmemory_append_string(&str,&str_p,&buf_sz,"\\b"); - break; - } - case '\f': { - icalmemory_append_string(&str,&str_p,&buf_sz,"\\f"); - break; - } - - case ';': - case ',': - case '"': - case '\\':{ - icalmemory_append_char(&str,&str_p,&buf_sz,'\\'); - icalmemory_append_char(&str,&str_p,&buf_sz,*p); - break; - } - - default: { - icalmemory_append_char(&str,&str_p,&buf_sz,*p); - } - } - } - - /* Assume the last character is not a '\0' and add one. We could - check *str_p != 0, but that would be an uninitialized memory - read. */ - - - icalmemory_append_char(&str,&str_p,&buf_sz,'\0'); - return str; -} - - -static char* icalvalue_text_as_ical_string(const icalvalue* value) { - char *buf; - buf = icalvalue_text_as_ical_string_r(value); - icalmemory_add_tmp_buffer(buf); - return buf; + return icalmemory_strdup_and_quote(value, value->data.v_string); } @@ -1035,13 +1075,24 @@ static char* icalvalue_float_as_ical_string_r(const icalvalue* value) { float data; char* str; + char* old_locale; icalerror_check_arg_rz( (value!=0),"value"); data = icalvalue_get_float(value); + /* bypass current locale in order to make + sure snprintf uses a '.' as a separator + set locate to 'C' and keep old locale */ + old_locale = strdup (setlocale (LC_NUMERIC,NULL)); + setlocale (LC_NUMERIC,"C"); + str = (char*)icalmemory_new_buffer(40); snprintf(str,40,"%f",data); + /* restore saved locale */ + setlocale (LC_NUMERIC,old_locale); + free (old_locale); + return str; } @@ -1050,14 +1101,25 @@ static char* icalvalue_geo_as_ical_string_r(const icalvalue* value) { struct icalgeotype data; char* str; + char* old_locale; icalerror_check_arg_rz( (value!=0),"value"); data = icalvalue_get_geo(value); + /* bypass current locale in order to make + * sure snprintf uses a '.' as a separator + * set locate to 'C' and keep old locale */ + old_locale = strdup (setlocale (LC_NUMERIC,NULL)); + setlocale (LC_NUMERIC,"C"); + str = (char*)icalmemory_new_buffer(80); snprintf(str,80,"%f;%f",data.lat,data.lon); + /* restore saved locale */ + setlocale (LC_NUMERIC,old_locale); + free (old_locale); + return str; } @@ -1186,7 +1248,7 @@ icalvalue_as_ical_string_r(const icalvalue* value) case ICAL_X_VALUE: if (value->x_value != 0) - return icalmemory_strdup(value->x_value); + return icalmemory_strdup_and_quote(value,value->x_value); /* FALLTHRU */ diff --git a/src/libical/icalvalue.h b/src/libical/icalvalue.h index f35261e..4105762 100644 --- a/src/libical/icalvalue.h +++ b/src/libical/icalvalue.h @@ -63,18 +63,19 @@ icalparameter_xliccomparetype icalvalue_compare(const icalvalue* a, const icalva /* Special, non autogenerated value accessors */ -icalvalue* icalvalue_new_recur (struct icalrecurrencetype v); -void icalvalue_set_recur(icalvalue* value, struct icalrecurrencetype v); -struct icalrecurrencetype icalvalue_get_recur(const icalvalue* value); - -icalvalue* icalvalue_new_trigger (struct icaltriggertype v); -void icalvalue_set_trigger(icalvalue* value, struct icaltriggertype v); -struct icaltriggertype icalvalue_get_trigger(const icalvalue* value); - -icalvalue* icalvalue_new_datetimeperiod (struct icaldatetimeperiodtype v); -void icalvalue_set_datetimeperiod(icalvalue* value, - struct icaldatetimeperiodtype v); -struct icaldatetimeperiodtype icalvalue_get_datetimeperiod(const icalvalue* value); +/* Defined in icalderivedvalue.h */ +/* icalvalue* icalvalue_new_recur (struct icalrecurrencetype v); */ +/* void icalvalue_set_recur(icalvalue* value, struct icalrecurrencetype v); */ +/* struct icalrecurrencetype icalvalue_get_recur(const icalvalue* value); */ + +/* icalvalue* icalvalue_new_trigger (struct icaltriggertype v); */ +/* void icalvalue_set_trigger(icalvalue* value, struct icaltriggertype v); */ +/* struct icaltriggertype icalvalue_get_trigger(const icalvalue* value); */ + +/* icalvalue* icalvalue_new_datetimeperiod (struct icaldatetimeperiodtype v); */ +/* void icalvalue_set_datetimeperiod(icalvalue* value, */ +/* struct icaldatetimeperiodtype v); */ +/* struct icaldatetimeperiodtype icalvalue_get_datetimeperiod(const icalvalue* value); */ /* Convert enumerations */ diff --git a/src/libical/vsnprintf.c b/src/libical/libicals_w32_vsnprintf_replacement.c index cb416bc..8cb9817 100644 --- a/src/libical/vsnprintf.c +++ b/src/libical/libicals_w32_vsnprintf_replacement.c @@ -1,8 +1,8 @@ -#ifndef WIN32 +#ifdef WIN32 #include "config.h" -#endif #ifndef HAVE_SNPRINTF #error DO NOT USE libical version of vsnprintf. +#endif /* * Revision 12: http://theos.com/~deraadt/snprintf.c * diff --git a/src/libical/pvl.c b/src/libical/pvl.c index d663eaa..23c69a8 100644 --- a/src/libical/pvl.c +++ b/src/libical/pvl.c @@ -5,6 +5,18 @@ (C) COPYRIGHT 2000, Eric Busboom <eric@softwarestudio.org> http://www.softwarestudio.org + + This program is free software; you can redistribute it and/or modify + it under the terms of either: + + The LGPL as published by the Free Software Foundation, version + 2.1, available at: http://www.fsf.org/copyleft/lesser.html + + Or: + + The Mozilla Public License Version 1.0. You may obtain a copy of + the License at http://www.mozilla.org/MPL/ + ======================================================================*/ #ifdef HAVE_CONFIG_H diff --git a/src/libical/pvl.h b/src/libical/pvl.h index c009846..77c0531 100644 --- a/src/libical/pvl.h +++ b/src/libical/pvl.h @@ -5,6 +5,18 @@ (C) COPYRIGHT 2000, Eric Busboom <eric@softwarestudio.org> http://www.softwarestudio.org + + This program is free software; you can redistribute it and/or modify + it under the terms of either: + + The LGPL as published by the Free Software Foundation, version + 2.1, available at: http://www.fsf.org/copyleft/lesser.html + + Or: + + The Mozilla Public License Version 1.0. You may obtain a copy of + the License at http://www.mozilla.org/MPL/ + ======================================================================*/ diff --git a/src/libical/sspm.c b/src/libical/sspm.c index 19ba011..b2b1dc2 100644 --- a/src/libical/sspm.c +++ b/src/libical/sspm.c @@ -46,9 +46,9 @@ #include "dmalloc.h" #endif -#ifdef WIN32 -#define snprintf _snprintf -#define strcasecmp stricmp +#if defined(_MSC_VER) +#define snprintf _snprintf +#define strcasecmp stricmp #endif #define TMP_BUF_SIZE 1024 @@ -181,7 +181,8 @@ char* sspm_get_parameter(const char* line, const char* parameter) if(s != 0){ strncpy(name,p,(size_t)s-(size_t)p); } else { - strcpy(name,p); + strncpy(name,p,sizeof(name)-1); + name[sizeof(name)-1]='\0'; } /* Strip off trailing quote, if it exists */ @@ -252,7 +253,7 @@ static const char *mime_headers[] = { }; -void* sspm_default_new_part() +void* sspm_default_new_part(void) { return 0; } @@ -472,6 +473,7 @@ enum sspm_minor_type sspm_find_minor_content_type(char* type) char *p = strchr(ltype,'/'); if (p==0){ + free(ltype); return SSPM_UNKNOWN_MINOR_TYPE; } @@ -1594,7 +1596,7 @@ int sspm_write_mime(struct sspm_part *parts,size_t num_parts, { struct sspm_buffer buf; int part_num =0; - int slen; + size_t slen; (void)num_parts; buf.buffer = malloc(4096); diff --git a/src/libical/sspm.h b/src/libical/sspm.h index 3dac371..fad0bb6 100644 --- a/src/libical/sspm.h +++ b/src/libical/sspm.h @@ -111,7 +111,7 @@ struct sspm_part { struct sspm_action_map { enum sspm_major_type major; enum sspm_minor_type minor; - void* (*new_part)(); + void* (*new_part)(void); void (*add_line)(void *part, struct sspm_header *header, const char* line, size_t size); void* (*end_part)(void* part); diff --git a/src/libical/vsnprintf.h b/src/libical/vsnprintf.h new file mode 100644 index 0000000..104a53a --- /dev/null +++ b/src/libical/vsnprintf.h @@ -0,0 +1,33 @@ +#ifdef WIN32 + +#ifndef roundup +#define roundup(x, y) ((((x)+((y)-1))/(y))*(y)) +#endif + +#include <stdlib.h> +#include <stdarg.h> + +int +#if __STDC__ +vsnprintf(char *str, size_t n, char const *fmt, va_list ap); +#else +vsnprintf(str, n, fmt, ap); + char *str; + size_t n; + char *fmt; + char *ap; +#endif + + +int +#if __STDC__ +snprintf(char *str, size_t n, char const *fmt, ...); +#else +snprintf(str, n, fmt, va_alist); + char *str; + size_t n; + char *fmt; + va_dcl +#endif + +#endif diff --git a/src/libicalcap/CMakeLists.txt b/src/libicalcap/CMakeLists.txt index 0369740..2390789 100644 --- a/src/libicalcap/CMakeLists.txt +++ b/src/libicalcap/CMakeLists.txt @@ -1,101 +1,22 @@ -include_directories(${CMAKE_SOURCE_DIR}/src ${CMAKE_SOURCE_DIR}/src/libical ) - +include_directories(${CMAKE_SOURCE_DIR}/src ${CMAKE_SOURCE_DIR}/src/libical) ########### next target ############### -SET(client_SRCS client.c) +set(client_SRCS client.c) add_executable(client ${client_SRCS}) target_link_libraries(client) - ########### install files ############### -install(FILES +install(FILES icalcap.h icalcap_impl.h - icalcap_message_impl.h + icalcap_message_impl.h icalcap_server.h icalcap_server_impl.h icalcap_session.h icalcap_session_impl.h - DESTINATION ${INCLUDE_INSTALL_DIR}/libicalcap) - - - -#original Makefile.am contents follow: - -##====================================================================== -## FILE: Makefile.am -## CREATOR: acampi -## -## $Id: Makefile.am,v 1.4 2008-01-02 20:07:33 dothebart Exp $ -## -## -## (C) COPYRIGHT 2003, Andrea Campi, mailto:a.campi@inet.it -## -## This program is free software; you can redistribute it and/or modify -## it under the terms of either: -## -## The LGPL as published by the Free Software Foundation, version -## 2.1, available at: http://www.fsf.org/copyleft/lesser.html -## -## Or: -## -## The Mozilla Public License Version 1.0. You may obtain a copy of -## the License at http://www.mozilla.org/MPL/ -## -## -## -##====================================================================== -# -# -#lib_LTLIBRARIES = libicalcap-evolution.la -# -#INCLUDES = \ -# -I$(top_builddir) \ -# -I$(top_srcdir)/src \ -# -I$(top_builddir)/src \ -# -I$(top_srcdir)/src/libical \ -# -I$(top_builddir)/libical \ -# -I$(srcdir) \ -# -DWITH_RR $(RRCAP_CFLAGS) -# -#libicalcap_evolution_la_LDFLAGS = $(RRCAP_LIBS) -version-info 43:0:43 -# -# -#libicalcap_evolution_la_SOURCES = \ -# icalcap.c \ -# icalcap.h \ -# icalcap_impl.h \ -# icalcap_message.c \ -# icalcap_message_impl.h \ -# icalcap_rr.c \ -# icalcap_server.c \ -# icalcap_server.h \ -# icalcap_server_impl.h \ -# icalcap_session.c \ -# icalcap_session.h \ -# icalcap_session_impl.h \ -# icalcap_utils.c -# -#libicalcap_evolutionincludedir = $(includedir) -# -#libicalcap_evolutioninclude_HEADERS = \ -# icalcap.h \ -# icalcap_impl.h \ -# icalcap_message_impl.h \ -# icalcap_server.h \ -# icalcap_server_impl.h \ -# icalcap_session.h \ -# icalcap_session_impl.h -# -# -#noinst_PROGRAMS = client -# -#LDADD = ../libicalss/libicalss-evolution.la ../libicalvcal/libicalvcal-evolution.la ../libical/libical-evolution.la libicalcap-evolution.la $(RRCAP_LIBS) -# -# -#client_SOURCES = client.c -# + DESTINATION ${INCLUDE_INSTALL_DIR}/libicalcap +) diff --git a/src/libicalcap/Makefile.am b/src/libicalcap/Makefile.am index 04e6f43..022e58a 100644 --- a/src/libicalcap/Makefile.am +++ b/src/libicalcap/Makefile.am @@ -34,7 +34,7 @@ INCLUDES = \ -I$(srcdir) \ -DWITH_RR $(RRCAP_CFLAGS) -libicalcap_evolution_la_LDFLAGS = $(RRCAP_LIBS) -version-info 43:0:43 +libicalcap_evolution_la_LDFLAGS = $(RRCAP_LIBS) -version-info 48:0:48 libicalcap_evolution_la_SOURCES = \ diff --git a/src/libicalcap/icalcap.h b/src/libicalcap/icalcap.h index 5e61bf9..de7b471 100644 --- a/src/libicalcap/icalcap.h +++ b/src/libicalcap/icalcap.h @@ -1,7 +1,7 @@ #ifndef __ICALCAP_H__ #define __ICALCAP_H__ -#include <ical.h> +#include <libical/ical.h> /* * Opaque objects diff --git a/src/libicalcap/icalcap_message_impl.h b/src/libicalcap/icalcap_message_impl.h index ae234d2..fa44f4d 100644 --- a/src/libicalcap/icalcap_message_impl.h +++ b/src/libicalcap/icalcap_message_impl.h @@ -3,7 +3,7 @@ #ifdef WITH_RR -#include <ical.h> +#include <libical/ical.h> #include <librr/rr.h> #define ICALCAP_MESSAGE_CMD 1 diff --git a/src/libicalss/CMakeLists.txt b/src/libicalss/CMakeLists.txt index 330dfeb..a016216 100644 --- a/src/libicalss/CMakeLists.txt +++ b/src/libicalss/CMakeLists.txt @@ -1,7 +1,7 @@ include_directories( ${CMAKE_BINARY_DIR} ${CMAKE_SOURCE_DIR}/src ${CMAKE_BINARY_DIR}/src - ${CMAKE_SOURCE_DIR}/src/libicalss ${CMAKE_BINARY_DIR}/src/libicalss + ${CMAKE_SOURCE_DIR}/src/libicalss ${CMAKE_BINARY_DIR}/src/libicalss ${CMAKE_SOURCE_DIR}/src/libical ${CMAKE_BINARY_DIR}/src/libical ) @@ -15,21 +15,21 @@ endif(WIN32) add_custom_command( OUTPUT - ${CMAKE_BINARY_DIR}/src/libical/icalss.h + ${CMAKE_BINARY_DIR}/src/libicalss/icalss.h COMMAND ${CMAKE_COMMAND} -DTOPS:FILEPATH=${TOPS} -DTOPB:FILEPATH=${TOPB} - -DICAL_FILE_H_FILE:FILEPATH=${CMAKE_BINARY_DIR}/src/libical/icalss.h + -DICAL_FILE_H_FILE:FILEPATH=${CMAKE_BINARY_DIR}/src/libicalss/icalss.h -P ${CMAKE_CURRENT_SOURCE_DIR}/icalss_file.cmake DEPENDS - ${CMAKE_BINARY_DIR}/src/libical/icalderivedproperty.h - ${CMAKE_BINARY_DIR}/src/libical/icalderivedparameter.h - ${CMAKE_BINARY_DIR}/src/libical/icalderivedvalue.h + ical-header ) -add_custom_target(icalss-header DEPENDS - ${CMAKE_BINARY_DIR}/src/libical/icalss.h +add_custom_target(icalss-header + DEPENDS + ical-header + ${CMAKE_BINARY_DIR}/src/libicalss/icalss.h ) ########### next target ############### @@ -38,53 +38,67 @@ add_custom_target(icalss-header DEPENDS set(icalss_LIB_DEVSRCS icalsslexer.c icalssyacc.c) set(icalss_LIB_SRCS - icalcalendar.c - icalcalendar.h - icalclassify.c - icalclassify.h - icalcluster.c - icalcluster.h - icalclusterimpl.h - icalgauge.c - icalgauge.h - icalgaugeimpl.h - icaldirset.c - icaldirset.h - icaldirsetimpl.h - icalfileset.c - icalfileset.h - icalfilesetimpl.h - icalset.c - icalset.h - icalssyacc.h - icalspanlist.c - icalspanlist.h - icalmessage.c - icalmessage.h -# $(BDB_SOURCEFILES) - ${icalss_LIB_DEVSRCS} + icalcalendar.c + icalcalendar.h + icalclassify.c + icalclassify.h + icalcluster.c + icalcluster.h + icalclusterimpl.h + icalgauge.c + icalgauge.h + icalgaugeimpl.h + icaldirset.c + icaldirset.h + icaldirsetimpl.h + icalfileset.c + icalfileset.h + icalfilesetimpl.h + icalset.c + icalset.h + icalssyacc.h + icalspanlist.c + icalspanlist.h + icalmessage.c + icalmessage.h + ${icalss_LIB_DEVSRCS} ) if(MSVC) - list(APPEND icalss_LIB_SRCS ../icalss.def) + list(APPEND icalss_LIB_SRCS ../icalss.def) endif(MSVC) -add_library(icalss SHARED ${icalss_LIB_SRCS}) +add_library(icalss ${LIBRARY_TYPE} ${icalss_LIB_SRCS}) +add_library(icalss-static STATIC ${icalss_LIB_SRCS}) + add_dependencies(icalss icalss-header) +add_dependencies(icalss-static icalss-header) target_link_libraries(icalss ical) -set_target_properties(icalss PROPERTIES VERSION ${LIBICAL_LIB_VERSION_STRING} SOVERSION ${LIBICAL_LIB_MAJOR_VERSION}) -install(TARGETS icalss ${INSTALL_TARGETS_DEFAULT_ARGS}) +if(MSVC) + set_target_properties(icalss PROPERTIES OUTPUT_NAME "libicalss") + set_target_properties(icalss-static PROPERTIES OUTPUT_NAME "libicalss-static") +else(MSVC) + set_target_properties(icalss-static PROPERTIES OUTPUT_NAME "icalss") +endif(MSVC) +set_target_properties(icalss PROPERTIES + VERSION ${LIBICAL_LIB_VERSION_STRING} + SOVERSION ${LIBICAL_LIB_MAJOR_VERSION} +) +set_target_properties(icalss PROPERTIES CLEAN_DIRECT_OUTPUT 1) +set_target_properties(icalss-static PROPERTIES CLEAN_DIRECT_OUTPUT 1) + +install(TARGETS icalss icalss-static ${INSTALL_TARGETS_DEFAULT_ARGS}) ########### install files ############### install(FILES - ${CMAKE_BINARY_DIR}/src/libical/icalss.h + ${CMAKE_BINARY_DIR}/src/libicalss/icalss.h icalcalendar.h icalclassify.h icalcluster.h - icaldirset.h + icaldirset.h icaldirsetimpl.h icalfileset.h icalfilesetimpl.h @@ -94,155 +108,6 @@ install(FILES icalset.h icalspanlist.h icalssyacc.h - #$(libicalssinclude_BDBHEADERS) DESTINATION - ${INCLUDE_INSTALL_DIR}/libical + ${INCLUDE_INSTALL_DIR}/libical ) - -#original Makefile.am contents follow: - -##====================================================================== -## FILE: Makefile.am -## CREATOR: eric -## -## $Id: Makefile.am,v 1.24 2008-02-03 15:27:34 dothebart Exp $ -## -## -## (C) COPYRIGHT 2000, Eric Busboom, http://www.softwarestudio.org -## -## This program is free software; you can redistribute it and/or modify -## it under the terms of either: -## -## The LGPL as published by the Free Software Foundation, version -## 2.1, available at: http://www.fsf.org/copyleft/lesser.html -## -## Or: -## -## The Mozilla Public License Version 1.0. You may obtain a copy of -## the License at http://www.mozilla.org/MPL/ -## -## -## -##====================================================================== -# -# -#AM_YFLAGS =-d -v -p ss -#AM_LFLAGS = -Pss -#LEX_OUTPUT_ROOT = lex.ss -# -#all: icalss.h -# -## just to get it built -#$(srcdir)/icalgauge.c: icalssyacc.h -#$(srcdir)/icalsslexer.c: icalssyacc.h -# -# -#if WITH_BDB4 -#BDB_INCLUDE=-I@BDB_DIR_INCLUDE@ -DWITH_BDB4 -#BDB_SOURCEFILES=icalbdbset.c icalbdbset.h icalbdbsetimpl.h -#BDB_HEADERFILES=$(srcdir)/icalbdbset.h -#libicalssinclude_BDBHEADERS=icalbdbset.h icalbdbsetimpl.h -#BDB_LIBFILES=@BDB_DIR_LIB@/@BDB_LIB@ -#else -#BDB_INCLUDE= -#BDB_SOURCEFILES= -#BDB_HEADERFILES= -#endif -# -#if WITH_CXX_BINDINGS -#cxx_lib=libicalss_cxx.la -#cxx_headers=icalspanlist_cxx.h -#else -#cxx_lib= -#cxx_headers= -#endif -# -#lib_LTLIBRARIES = libicalss.la $(cxx_lib) -# -#INCLUDES = \ -# -I$(top_srcdir)/src \ -# -I$(top_builddir)/src \ -# -I$(top_srcdir)/src/libical \ -# -I$(top_builddir)/src/libical \ -# $(BDB_INCLUDE) -# -#libicalss_la_LDFLAGS = -version-info 43:0:43 -#libicalss_la_LIBADD = $(BDB_LIBFILES) -# -#if DEV -#libicalss_la_DEVSOURCES = icalsslexer.l icalssyacc.y -#else -#libicalss_la_DEVSOURCES = icalsslexer.c icalssyacc.c -#endif -# -#libicalss_la_SOURCES = \ -# icalcalendar.c \ -# icalcalendar.h \ -# icalclassify.c \ -# icalclassify.h \ -# icalcluster.c \ -# icalcluster.h \ -# icalclusterimpl.h \ -# icalgauge.c \ -# icalgauge.h \ -# icalgaugeimpl.h \ -# icaldirset.c \ -# icaldirset.h \ -# icaldirsetimpl.h \ -# icalfileset.c \ -# icalfileset.h \ -# icalfilesetimpl.h \ -# icalset.c \ -# icalset.h \ -# icalssyacc.h \ -# icalspanlist.c \ -# icalspanlist.h \ -# icalmessage.c \ -# icalmessage.h \ -# $(BDB_SOURCEFILES) \ -# $(libicalss_la_DEVSOURCES) -# -#libicalssincludedir = $(includedir)/libical -# -#COMBINEDHEADERS = \ -# $(srcdir)/icalgauge.h \ -# $(srcdir)/icalset.h \ -# $(srcdir)/icalcluster.h \ -# $(srcdir)/icalfileset.h \ -# $(srcdir)/icaldirset.h \ -# $(BDB_HEADERFILES) \ -# $(srcdir)/icalcalendar.h \ -# $(srcdir)/icalclassify.h \ -# $(srcdir)/icalspanlist.h \ -# $(srcdir)/icalmessage.h -# -#if WITH_CXX_BINDINGS -#libicalss_cxx_la_SOURCES = \ -# $(libicalss_evolution_la_SOURCES) \ -# icalspanlist_cxx.h \ -# icalspanlist_cxx.cpp -# -#endif -# -#icalss.h: $(COMBINEDHEADERS) -# echo '#ifndef LIBICAL_ICALSS_H' > icalss.h -# echo '#define LIBICAL_ICALSS_H' >> icalss.h -# echo '#ifdef __cplusplus' >> icalss.h -# echo 'extern "C" {' >> icalss.h -# echo '#endif' >> icalss.h -# echo '/*' >> icalss.h -# echo ' $$''Id''$$' >> icalss.h -# echo '*/' >> icalss.h -# cat $(COMBINEDHEADERS) \ -# | egrep -v "#include.*\"ical" \ -# | egrep -v "#include.*\"pvl\.h\"" \ -# | egrep -v '\$$(Id|Locker): .+\$$'>> icalss.h -# echo '#ifdef __cplusplus' >> icalss.h -# echo '}' >> icalss.h -# echo '#endif' >> icalss.h -# echo '#endif' >> icalss.h -# -#libicalssinclude_HEADERS = icalss.h icalcalendar.h icalclassify.h icalcluster.h icaldirset.h icaldirsetimpl.h icalfileset.h icalfilesetimpl.h icalgauge.h icalgaugeimpl.h icalmessage.h icalset.h icalspanlist.h icalssyacc.h $(libicalssinclude_BDBHEADERS) -# -#CONFIG_CLEAN_FILES = y.output -# diff --git a/src/libicalss/Makefile.am b/src/libicalss/Makefile.am index f688a0b..bb0bc3d 100644 --- a/src/libicalss/Makefile.am +++ b/src/libicalss/Makefile.am @@ -23,11 +23,11 @@ #====================================================================== -AM_YFLAGS =-d -v -p ss -AM_LFLAGS = -Pss +AM_YFLAGS = -d -v -p ss -l +AM_LFLAGS = -Pss -L -R LEX_OUTPUT_ROOT = lex.ss -all: icalss.h +BUILT_SOURCES = icalss.h # just to get it built $(srcdir)/icalgauge.c: icalssyacc.h @@ -63,8 +63,13 @@ INCLUDES = \ -I$(top_builddir)/src/libical \ $(BDB_INCLUDE) -libicalss_la_LDFLAGS = -version-info 43:0:43 -libicalss_la_LIBADD = $(BDB_LIBFILES) +libicalss_la_LDFLAGS = -version-info 48:0:48 + +if OS_WIN32 +libicalss_la_LDFLAGS += -no-undefined +endif + +libicalss_la_LIBADD = $(BDB_LIBFILES) $(top_builddir)/src/libical/libical.la if DEV libicalss_la_DEVSOURCES = icalsslexer.l icalssyacc.y diff --git a/src/libicalss/Makefile.in b/src/libicalss/Makefile.in index 0ce0e36..04b5eb9 100644 --- a/src/libicalss/Makefile.in +++ b/src/libicalss/Makefile.in @@ -1,8 +1,8 @@ -# Makefile.in generated by automake 1.9.5 from Makefile.am. +# Makefile.in generated by automake 1.12.2 from Makefile.am. # @configure_input@ -# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, -# 2003, 2004, 2005 Free Software Foundation, Inc. +# Copyright (C) 1994-2012 Free Software Foundation, Inc. + # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. @@ -39,17 +39,29 @@ #====================================================================== -SOURCES = $(libicalss_la_SOURCES) $(libicalss_cxx_la_SOURCES) - -srcdir = @srcdir@ -top_srcdir = @top_srcdir@ VPATH = @srcdir@ +am__make_dryrun = \ + { \ + am__dry=no; \ + case $$MAKEFLAGS in \ + *\\[\ \ ]*) \ + echo 'am--echo: ; @echo "AM" OK' | $(MAKE) -f - 2>/dev/null \ + | grep '^AM OK$$' >/dev/null || am__dry=yes;; \ + *) \ + for am__flg in $$MAKEFLAGS; do \ + case $$am__flg in \ + *=*|--*) ;; \ + *n*) am__dry=yes; break;; \ + esac; \ + done;; \ + esac; \ + test $$am__dry = yes; \ + } pkgdatadir = $(datadir)/@PACKAGE@ -pkglibdir = $(libdir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ -top_builddir = ../.. +pkglibdir = $(libdir)/@PACKAGE@ +pkglibexecdir = $(libexecdir)/@PACKAGE@ am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd -INSTALL = @INSTALL@ install_sh_DATA = $(install_sh) -c -m 644 install_sh_PROGRAM = $(install_sh) -c install_sh_SCRIPT = $(install_sh) -c @@ -64,28 +76,52 @@ POST_UNINSTALL = : build_triplet = @build@ host_triplet = @host@ target_triplet = @target@ +@OS_WIN32_TRUE@am__append_1 = -no-undefined subdir = src/libicalss DIST_COMMON = $(am__libicalssinclude_HEADERS_DIST) \ - $(srcdir)/Makefile.am $(srcdir)/Makefile.in icalsslexer.c \ - icalssyacc.c icalssyacc.h + $(srcdir)/Makefile.am $(srcdir)/Makefile.in \ + $(top_srcdir)/depcomp $(top_srcdir)/mkinstalldirs \ + $(top_srcdir)/ylwrap icalsslexer.c icalssyacc.c icalssyacc.h ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/configure.in am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs CONFIG_HEADER = $(top_builddir)/config.h +CONFIG_CLEAN_VPATH_FILES = am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; am__vpath_adj = case $$p in \ $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \ *) f=$$p;; \ esac; -am__strip_dir = `echo $$p | sed -e 's|^.*/||'`; +am__strip_dir = f=`echo $$p | sed -e 's|^.*/||'`; +am__install_max = 40 +am__nobase_strip_setup = \ + srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/\\\\&/g'` +am__nobase_strip = \ + for p in $$list; do echo "$$p"; done | sed -e "s|$$srcdirstrip/||" +am__nobase_list = $(am__nobase_strip_setup); \ + for p in $$list; do echo "$$p $$p"; done | \ + sed "s| $$srcdirstrip/| |;"' / .*\//!s/ .*/ ./; s,\( .*\)/[^/]*$$,\1,' | \ + $(AWK) 'BEGIN { files["."] = "" } { files[$$2] = files[$$2] " " $$1; \ + if (++n[$$2] == $(am__install_max)) \ + { print $$2, files[$$2]; n[$$2] = 0; files[$$2] = "" } } \ + END { for (dir in files) print dir, files[dir] }' +am__base_list = \ + sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \ + sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g' +am__uninstall_files_from_dir = { \ + test -z "$$files" \ + || { test ! -d "$$dir" && test ! -f "$$dir" && test ! -r "$$dir"; } \ + || { echo " ( cd '$$dir' && rm -f" $$files ")"; \ + $(am__cd) "$$dir" && rm -f $$files; }; \ + } am__installdirs = "$(DESTDIR)$(libdir)" \ "$(DESTDIR)$(libicalssincludedir)" -libLTLIBRARIES_INSTALL = $(INSTALL) LTLIBRARIES = $(lib_LTLIBRARIES) am__DEPENDENCIES_1 = -libicalss_la_DEPENDENCIES = $(am__DEPENDENCIES_1) +libicalss_la_DEPENDENCIES = $(am__DEPENDENCIES_1) \ + $(top_builddir)/src/libical/libical.la am__libicalss_la_SOURCES_DIST = icalcalendar.c icalcalendar.h \ icalclassify.c icalclassify.h icalcluster.c icalcluster.h \ icalclusterimpl.h icalgauge.c icalgauge.h icalgaugeimpl.h \ @@ -102,6 +138,9 @@ am_libicalss_la_OBJECTS = icalcalendar.lo icalclassify.lo \ icalset.lo icalspanlist.lo icalmessage.lo $(am__objects_1) \ $(am__objects_2) libicalss_la_OBJECTS = $(am_libicalss_la_OBJECTS) +libicalss_la_LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) \ + $(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \ + $(libicalss_la_LDFLAGS) $(LDFLAGS) -o $@ libicalss_cxx_la_LIBADD = am__libicalss_cxx_la_SOURCES_DIST = icalspanlist_cxx.h \ icalspanlist_cxx.cpp @@ -109,46 +148,57 @@ am__libicalss_cxx_la_SOURCES_DIST = icalspanlist_cxx.h \ @WITH_CXX_BINDINGS_TRUE@ icalspanlist_cxx.lo libicalss_cxx_la_OBJECTS = $(am_libicalss_cxx_la_OBJECTS) @WITH_CXX_BINDINGS_TRUE@am_libicalss_cxx_la_rpath = -rpath $(libdir) -DEFAULT_INCLUDES = -I. -I$(srcdir) -I$(top_builddir) +DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir) depcomp = $(SHELL) $(top_srcdir)/depcomp am__depfiles_maybe = depfiles +am__mv = mv -f COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -LTCOMPILE = $(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) \ - $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \ - $(AM_CFLAGS) $(CFLAGS) +LTCOMPILE = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ + --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ + $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) CCLD = $(CC) -LINK = $(LIBTOOL) --tag=CC --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \ - $(AM_LDFLAGS) $(LDFLAGS) -o $@ +LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ + --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) \ + $(LDFLAGS) -o $@ CXXCOMPILE = $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -LTCXXCOMPILE = $(LIBTOOL) --tag=CXX --mode=compile $(CXX) $(DEFS) \ - $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \ - $(AM_CXXFLAGS) $(CXXFLAGS) +LTCXXCOMPILE = $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ + --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ + $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) CXXLD = $(CXX) -CXXLINK = $(LIBTOOL) --tag=CXX --mode=link $(CXXLD) $(AM_CXXFLAGS) \ - $(CXXFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@ -LEXCOMPILE = $(LEX) $(LFLAGS) $(AM_LFLAGS) -LTLEXCOMPILE = $(LIBTOOL) --mode=compile $(LEX) $(LFLAGS) $(AM_LFLAGS) -YACCCOMPILE = $(YACC) $(YFLAGS) $(AM_YFLAGS) -LTYACCCOMPILE = $(LIBTOOL) --mode=compile $(YACC) $(YFLAGS) \ - $(AM_YFLAGS) +CXXLINK = $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ + --mode=link $(CXXLD) $(AM_CXXFLAGS) $(CXXFLAGS) $(AM_LDFLAGS) \ + $(LDFLAGS) -o $@ +@MAINTAINER_MODE_FALSE@am__skiplex = test -f $@ || +LEXCOMPILE = $(LEX) $(AM_LFLAGS) $(LFLAGS) +LTLEXCOMPILE = $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ + --mode=compile $(LEX) $(AM_LFLAGS) $(LFLAGS) +YLWRAP = $(top_srcdir)/ylwrap +@MAINTAINER_MODE_FALSE@am__skipyacc = test -f $@ || +am__yacc_c2h = sed -e s/cc$$/hh/ -e s/cpp$$/hpp/ -e s/cxx$$/hxx/ \ + -e s/c++$$/h++/ -e s/c$$/h/ +YACCCOMPILE = $(YACC) $(AM_YFLAGS) $(YFLAGS) +LTYACCCOMPILE = $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ + --mode=compile $(YACC) $(AM_YFLAGS) $(YFLAGS) SOURCES = $(libicalss_la_SOURCES) $(libicalss_cxx_la_SOURCES) DIST_SOURCES = $(am__libicalss_la_SOURCES_DIST) \ $(am__libicalss_cxx_la_SOURCES_DIST) +am__can_run_installinfo = \ + case $$AM_UPDATE_INFO_DIR in \ + n|no|NO) false;; \ + *) (install-info --version) >/dev/null 2>&1;; \ + esac am__libicalssinclude_HEADERS_DIST = icalss.h icalcalendar.h \ icalclassify.h icalcluster.h icaldirset.h icaldirsetimpl.h \ icalfileset.h icalfilesetimpl.h icalgauge.h icalgaugeimpl.h \ icalmessage.h icalset.h icalspanlist.h icalssyacc.h \ icalbdbset.h icalbdbsetimpl.h -libicalssincludeHEADERS_INSTALL = $(INSTALL_HEADER) HEADERS = $(libicalssinclude_HEADERS) ETAGS = etags CTAGS = ctags DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ -AMDEP_FALSE = @AMDEP_FALSE@ -AMDEP_TRUE = @AMDEP_TRUE@ AMTAR = @AMTAR@ AR = @AR@ AUTOCONF = @AUTOCONF@ @@ -172,18 +222,17 @@ CXXFLAGS = @CXXFLAGS@ CYGPATH_W = @CYGPATH_W@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ -DEV_FALSE = @DEV_FALSE@ -DEV_TRUE = @DEV_TRUE@ -ECHO = @ECHO@ +DLLTOOL = @DLLTOOL@ +DSYMUTIL = @DSYMUTIL@ +DUMPBIN = @DUMPBIN@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ -F77 = @F77@ -FFLAGS = @FFLAGS@ -HAVE_PTHREAD_FALSE = @HAVE_PTHREAD_FALSE@ -HAVE_PTHREAD_TRUE = @HAVE_PTHREAD_TRUE@ +FGREP = @FGREP@ +GREP = @GREP@ +INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ @@ -193,6 +242,7 @@ JAVA = @JAVA@ JAVAC = @JAVAC@ JAVAH = @JAVAH@ JAVA_PLATFORM = @JAVA_PLATFORM@ +LD = @LD@ LDFLAGS = @LDFLAGS@ LEX = @LEX@ LEXLIB = @LEXLIB@ @@ -200,53 +250,52 @@ LEX_OUTPUT_ROOT = lex.ss LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LIBTOOL = @LIBTOOL@ +LIPO = @LIPO@ LN_S = @LN_S@ LTLIBOBJS = @LTLIBOBJS@ MAINT = @MAINT@ -MAINTAINER_MODE_FALSE = @MAINTAINER_MODE_FALSE@ -MAINTAINER_MODE_TRUE = @MAINTAINER_MODE_TRUE@ MAKEINFO = @MAKEINFO@ +MANIFEST_TOOL = @MANIFEST_TOOL@ +MKDIR_P = @MKDIR_P@ +NM = @NM@ +NMEDIT = @NMEDIT@ +OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ -OS_WIN32_FALSE = @OS_WIN32_FALSE@ -OS_WIN32_TRUE = @OS_WIN32_TRUE@ +OTOOL = @OTOOL@ +OTOOL64 = @OTOOL64@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ +PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ PERL = @PERL@ PTHREAD_LIBS = @PTHREAD_LIBS@ +PYTHON = @PYTHON@ +PYTHON_EXEC_PREFIX = @PYTHON_EXEC_PREFIX@ +PYTHON_PLATFORM = @PYTHON_PLATFORM@ +PYTHON_PREFIX = @PYTHON_PREFIX@ +PYTHON_VERSION = @PYTHON_VERSION@ PY_CFLAGS = @PY_CFLAGS@ -PY_EXTRA_LIBS = @PY_EXTRA_LIBS@ -PY_LIBS = @PY_LIBS@ -PY_LIB_LOC = @PY_LIB_LOC@ RANLIB = @RANLIB@ +SED = @SED@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ STRIP = @STRIP@ VERSION = @VERSION@ -WITH_BDB4_FALSE = @WITH_BDB4_FALSE@ -WITH_BDB4_TRUE = @WITH_BDB4_TRUE@ -WITH_CXX_BINDINGS_FALSE = @WITH_CXX_BINDINGS_FALSE@ -WITH_CXX_BINDINGS_TRUE = @WITH_CXX_BINDINGS_TRUE@ -WITH_JAVA_FALSE = @WITH_JAVA_FALSE@ -WITH_JAVA_TRUE = @WITH_JAVA_TRUE@ -WITH_PYTHON_FALSE = @WITH_PYTHON_FALSE@ -WITH_PYTHON_TRUE = @WITH_PYTHON_TRUE@ YACC = @YACC@ +YFLAGS = @YFLAGS@ ZONE_INFO = @ZONE_INFO@ +abs_builddir = @abs_builddir@ +abs_srcdir = @abs_srcdir@ +abs_top_builddir = @abs_top_builddir@ +abs_top_srcdir = @abs_top_srcdir@ ac_ct_AR = @ac_ct_AR@ ac_ct_CC = @ac_ct_CC@ ac_ct_CXX = @ac_ct_CXX@ -ac_ct_F77 = @ac_ct_F77@ -ac_ct_RANLIB = @ac_ct_RANLIB@ -ac_ct_STRIP = @ac_ct_STRIP@ -am__fastdepCC_FALSE = @am__fastdepCC_FALSE@ -am__fastdepCC_TRUE = @am__fastdepCC_TRUE@ -am__fastdepCXX_FALSE = @am__fastdepCXX_FALSE@ -am__fastdepCXX_TRUE = @am__fastdepCXX_TRUE@ +ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ am__include = @am__include@ am__leading_dot = @am__leading_dot@ am__quote = @am__quote@ @@ -258,35 +307,52 @@ build_alias = @build_alias@ build_cpu = @build_cpu@ build_os = @build_os@ build_vendor = @build_vendor@ +builddir = @builddir@ datadir = @datadir@ +datarootdir = @datarootdir@ +docdir = @docdir@ +dvidir = @dvidir@ exec_prefix = @exec_prefix@ host = @host@ host_alias = @host_alias@ host_cpu = @host_cpu@ host_os = @host_os@ host_vendor = @host_vendor@ +htmldir = @htmldir@ includedir = @includedir@ infodir = @infodir@ install_sh = @install_sh@ libdir = @libdir@ libexecdir = @libexecdir@ +localedir = @localedir@ localstatedir = @localstatedir@ mandir = @mandir@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ +pdfdir = @pdfdir@ +pkgpyexecdir = @pkgpyexecdir@ +pkgpythondir = @pkgpythondir@ prefix = @prefix@ program_transform_name = @program_transform_name@ -python_val = @python_val@ +psdir = @psdir@ +pyexecdir = @pyexecdir@ +pythondir = @pythondir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ +srcdir = @srcdir@ +swig_val = @swig_val@ sysconfdir = @sysconfdir@ target = @target@ target_alias = @target_alias@ target_cpu = @target_cpu@ target_os = @target_os@ target_vendor = @target_vendor@ -AM_YFLAGS = -d -v -p ss -AM_LFLAGS = -Pss +top_build_prefix = @top_build_prefix@ +top_builddir = @top_builddir@ +top_srcdir = @top_srcdir@ +AM_YFLAGS = -d -v -p ss -l +AM_LFLAGS = -Pss -L -R +BUILT_SOURCES = icalss.h @WITH_BDB4_FALSE@BDB_INCLUDE = @WITH_BDB4_TRUE@BDB_INCLUDE = -I@BDB_DIR_INCLUDE@ -DWITH_BDB4 @WITH_BDB4_FALSE@BDB_SOURCEFILES = @@ -307,8 +373,8 @@ INCLUDES = \ -I$(top_builddir)/src/libical \ $(BDB_INCLUDE) -libicalss_la_LDFLAGS = -version-info 43:0:43 -libicalss_la_LIBADD = $(BDB_LIBFILES) +libicalss_la_LDFLAGS = -version-info 48:0:48 $(am__append_1) +libicalss_la_LIBADD = $(BDB_LIBFILES) $(top_builddir)/src/libical/libical.la @DEV_FALSE@libicalss_la_DEVSOURCES = icalsslexer.c icalssyacc.c @DEV_TRUE@libicalss_la_DEVSOURCES = icalsslexer.l icalssyacc.y libicalss_la_SOURCES = \ @@ -358,7 +424,8 @@ COMBINEDHEADERS = \ libicalssinclude_HEADERS = icalss.h icalcalendar.h icalclassify.h icalcluster.h icaldirset.h icaldirsetimpl.h icalfileset.h icalfilesetimpl.h icalgauge.h icalgaugeimpl.h icalmessage.h icalset.h icalspanlist.h icalssyacc.h $(libicalssinclude_BDBHEADERS) CONFIG_CLEAN_FILES = y.output -all: all-am +all: $(BUILT_SOURCES) + $(MAKE) $(AM_MAKEFLAGS) all-am .SUFFIXES: .SUFFIXES: .c .cpp .l .lo .o .obj .y @@ -366,14 +433,14 @@ $(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__confi @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh \ - && exit 0; \ + ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ + && { if test -f $@; then exit 0; else break; fi; }; \ exit 1;; \ esac; \ done; \ - echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu src/libicalss/Makefile'; \ - cd $(top_srcdir) && \ - $(AUTOMAKE) --gnu src/libicalss/Makefile + echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu src/libicalss/Makefile'; \ + $(am__cd) $(top_srcdir) && \ + $(AUTOMAKE) --gnu src/libicalss/Makefile .PRECIOUS: Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ @@ -391,42 +458,48 @@ $(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh +$(am__aclocal_m4_deps): install-libLTLIBRARIES: $(lib_LTLIBRARIES) @$(NORMAL_INSTALL) - test -z "$(libdir)" || $(mkdir_p) "$(DESTDIR)$(libdir)" - @list='$(lib_LTLIBRARIES)'; for p in $$list; do \ + @list='$(lib_LTLIBRARIES)'; test -n "$(libdir)" || list=; \ + list2=; for p in $$list; do \ if test -f $$p; then \ - f=$(am__strip_dir) \ - echo " $(LIBTOOL) --mode=install $(libLTLIBRARIES_INSTALL) $(INSTALL_STRIP_FLAG) '$$p' '$(DESTDIR)$(libdir)/$$f'"; \ - $(LIBTOOL) --mode=install $(libLTLIBRARIES_INSTALL) $(INSTALL_STRIP_FLAG) "$$p" "$(DESTDIR)$(libdir)/$$f"; \ + list2="$$list2 $$p"; \ else :; fi; \ - done + done; \ + test -z "$$list2" || { \ + echo " $(MKDIR_P) '$(DESTDIR)$(libdir)'"; \ + $(MKDIR_P) "$(DESTDIR)$(libdir)" || exit 1; \ + echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL) $(INSTALL_STRIP_FLAG) $$list2 '$(DESTDIR)$(libdir)'"; \ + $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL) $(INSTALL_STRIP_FLAG) $$list2 "$(DESTDIR)$(libdir)"; \ + } uninstall-libLTLIBRARIES: @$(NORMAL_UNINSTALL) - @set -x; list='$(lib_LTLIBRARIES)'; for p in $$list; do \ - p=$(am__strip_dir) \ - echo " $(LIBTOOL) --mode=uninstall rm -f '$(DESTDIR)$(libdir)/$$p'"; \ - $(LIBTOOL) --mode=uninstall rm -f "$(DESTDIR)$(libdir)/$$p"; \ + @list='$(lib_LTLIBRARIES)'; test -n "$(libdir)" || list=; \ + for p in $$list; do \ + $(am__strip_dir) \ + echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f '$(DESTDIR)$(libdir)/$$f'"; \ + $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f "$(DESTDIR)$(libdir)/$$f"; \ done clean-libLTLIBRARIES: -test -z "$(lib_LTLIBRARIES)" || rm -f $(lib_LTLIBRARIES) - @list='$(lib_LTLIBRARIES)'; for p in $$list; do \ - dir="`echo $$p | sed -e 's|/[^/]*$$||'`"; \ - test "$$dir" != "$$p" || dir=.; \ - echo "rm -f \"$${dir}/so_locations\""; \ - rm -f "$${dir}/so_locations"; \ - done + @list='$(lib_LTLIBRARIES)'; \ + locs=`for p in $$list; do echo $$p; done | \ + sed 's|^[^/]*$$|.|; s|/[^/]*$$||; s|$$|/so_locations|' | \ + sort -u`; \ + test -z "$$locs" || { \ + echo rm -f $${locs}; \ + rm -f $${locs}; \ + } icalssyacc.h: icalssyacc.c - @if test ! -f $@; then \ - rm -f icalssyacc.c; \ - $(MAKE) icalssyacc.c; \ - else :; fi -libicalss.la: $(libicalss_la_OBJECTS) $(libicalss_la_DEPENDENCIES) - $(LINK) -rpath $(libdir) $(libicalss_la_LDFLAGS) $(libicalss_la_OBJECTS) $(libicalss_la_LIBADD) $(LIBS) -libicalss_cxx.la: $(libicalss_cxx_la_OBJECTS) $(libicalss_cxx_la_DEPENDENCIES) - $(CXXLINK) $(am_libicalss_cxx_la_rpath) $(libicalss_cxx_la_LDFLAGS) $(libicalss_cxx_la_OBJECTS) $(libicalss_cxx_la_LIBADD) $(LIBS) + @if test ! -f $@; then rm -f icalssyacc.c; else :; fi + @if test ! -f $@; then $(MAKE) $(AM_MAKEFLAGS) icalssyacc.c; else :; fi +libicalss.la: $(libicalss_la_OBJECTS) $(libicalss_la_DEPENDENCIES) $(EXTRA_libicalss_la_DEPENDENCIES) + $(libicalss_la_LINK) -rpath $(libdir) $(libicalss_la_OBJECTS) $(libicalss_la_LIBADD) $(LIBS) +libicalss_cxx.la: $(libicalss_cxx_la_OBJECTS) $(libicalss_cxx_la_DEPENDENCIES) $(EXTRA_libicalss_cxx_la_DEPENDENCIES) + $(CXXLINK) $(am_libicalss_cxx_la_rpath) $(libicalss_cxx_la_OBJECTS) $(libicalss_cxx_la_LIBADD) $(LIBS) mostlyclean-compile: -rm -f *.$(OBJEXT) @@ -449,183 +522,186 @@ distclean-compile: @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/icalssyacc.Plo@am__quote@ .c.o: -@am__fastdepCC_TRUE@ if $(COMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" -c -o $@ $<; \ -@am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Po"; else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; fi +@am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(COMPILE) -c $< .c.obj: -@am__fastdepCC_TRUE@ if $(COMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" -c -o $@ `$(CYGPATH_W) '$<'`; \ -@am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Po"; else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; fi +@am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(COMPILE) -c `$(CYGPATH_W) '$<'` .c.lo: -@am__fastdepCC_TRUE@ if $(LTCOMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" -c -o $@ $<; \ -@am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Plo"; else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; fi +@am__fastdepCC_TRUE@ $(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(LTCOMPILE) -c -o $@ $< .cpp.o: -@am__fastdepCXX_TRUE@ if $(CXXCOMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" -c -o $@ $<; \ -@am__fastdepCXX_TRUE@ then mv -f "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Po"; else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; fi +@am__fastdepCXX_TRUE@ $(CXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< +@am__fastdepCXX_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(CXXCOMPILE) -c -o $@ $< .cpp.obj: -@am__fastdepCXX_TRUE@ if $(CXXCOMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" -c -o $@ `$(CYGPATH_W) '$<'`; \ -@am__fastdepCXX_TRUE@ then mv -f "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Po"; else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; fi +@am__fastdepCXX_TRUE@ $(CXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` +@am__fastdepCXX_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(CXXCOMPILE) -c -o $@ `$(CYGPATH_W) '$<'` .cpp.lo: -@am__fastdepCXX_TRUE@ if $(LTCXXCOMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" -c -o $@ $<; \ -@am__fastdepCXX_TRUE@ then mv -f "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Plo"; else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; fi +@am__fastdepCXX_TRUE@ $(LTCXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< +@am__fastdepCXX_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo @AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(LTCXXCOMPILE) -c -o $@ $< .l.c: - $(LEXCOMPILE) $< - sed '/^#/ s|$(LEX_OUTPUT_ROOT)\.c|$@|' $(LEX_OUTPUT_ROOT).c >$@ - rm -f $(LEX_OUTPUT_ROOT).c + $(am__skiplex) $(SHELL) $(YLWRAP) $< $(LEX_OUTPUT_ROOT).c $@ -- $(LEXCOMPILE) .y.c: - $(YACCCOMPILE) $< - if test -f y.tab.h; then \ - to=`echo "$*_H" | sed \ - -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/' \ - -e 's/[^ABCDEFGHIJKLMNOPQRSTUVWXYZ]/_/g'`; \ - sed -e "/^#/!b" -e "s/Y_TAB_H/$$to/g" -e "s|y\.tab\.h|$*.h|" \ - y.tab.h >$*.ht; \ - rm -f y.tab.h; \ - if cmp -s $*.ht $*.h; then \ - rm -f $*.ht ;\ - else \ - mv $*.ht $*.h; \ - fi; \ - fi - if test -f y.output; then \ - mv y.output $*.output; \ - fi - sed '/^#/ s|y\.tab\.c|$@|' y.tab.c >$@t && mv $@t $@ - rm -f y.tab.c + $(am__skipyacc) $(SHELL) $(YLWRAP) $< y.tab.c $@ y.tab.h `echo $@ | $(am__yacc_c2h)` y.output $*.output -- $(YACCCOMPILE) mostlyclean-libtool: -rm -f *.lo clean-libtool: -rm -rf .libs _libs - -distclean-libtool: - -rm -f libtool -uninstall-info-am: install-libicalssincludeHEADERS: $(libicalssinclude_HEADERS) @$(NORMAL_INSTALL) - test -z "$(libicalssincludedir)" || $(mkdir_p) "$(DESTDIR)$(libicalssincludedir)" - @list='$(libicalssinclude_HEADERS)'; for p in $$list; do \ + @list='$(libicalssinclude_HEADERS)'; test -n "$(libicalssincludedir)" || list=; \ + if test -n "$$list"; then \ + echo " $(MKDIR_P) '$(DESTDIR)$(libicalssincludedir)'"; \ + $(MKDIR_P) "$(DESTDIR)$(libicalssincludedir)" || exit 1; \ + fi; \ + for p in $$list; do \ if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ - f=$(am__strip_dir) \ - echo " $(libicalssincludeHEADERS_INSTALL) '$$d$$p' '$(DESTDIR)$(libicalssincludedir)/$$f'"; \ - $(libicalssincludeHEADERS_INSTALL) "$$d$$p" "$(DESTDIR)$(libicalssincludedir)/$$f"; \ + echo "$$d$$p"; \ + done | $(am__base_list) | \ + while read files; do \ + echo " $(INSTALL_HEADER) $$files '$(DESTDIR)$(libicalssincludedir)'"; \ + $(INSTALL_HEADER) $$files "$(DESTDIR)$(libicalssincludedir)" || exit $$?; \ done uninstall-libicalssincludeHEADERS: @$(NORMAL_UNINSTALL) - @list='$(libicalssinclude_HEADERS)'; for p in $$list; do \ - f=$(am__strip_dir) \ - echo " rm -f '$(DESTDIR)$(libicalssincludedir)/$$f'"; \ - rm -f "$(DESTDIR)$(libicalssincludedir)/$$f"; \ - done + @list='$(libicalssinclude_HEADERS)'; test -n "$(libicalssincludedir)" || list=; \ + files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \ + dir='$(DESTDIR)$(libicalssincludedir)'; $(am__uninstall_files_from_dir) ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ - $(AWK) ' { files[$$0] = 1; } \ - END { for (i in files) print i; }'`; \ + $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ + END { if (nonempty) { for (i in files) print i; }; }'`; \ mkid -fID $$unique tags: TAGS TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) - tags=; \ + set x; \ here=`pwd`; \ list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ - $(AWK) ' { files[$$0] = 1; } \ - END { for (i in files) print i; }'`; \ - if test -z "$(ETAGS_ARGS)$$tags$$unique"; then :; else \ + $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ + END { if (nonempty) { for (i in files) print i; }; }'`; \ + shift; \ + if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ test -n "$$unique" || unique=$$empty_fix; \ - $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ - $$tags $$unique; \ + if test $$# -gt 0; then \ + $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ + "$$@" $$unique; \ + else \ + $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ + $$unique; \ + fi; \ fi ctags: CTAGS CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) - tags=; \ - here=`pwd`; \ list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ - $(AWK) ' { files[$$0] = 1; } \ - END { for (i in files) print i; }'`; \ - test -z "$(CTAGS_ARGS)$$tags$$unique" \ + $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ + END { if (nonempty) { for (i in files) print i; }; }'`; \ + test -z "$(CTAGS_ARGS)$$unique" \ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ - $$tags $$unique + $$unique GTAGS: here=`$(am__cd) $(top_builddir) && pwd` \ - && cd $(top_srcdir) \ - && gtags -i $(GTAGS_ARGS) $$here + && $(am__cd) $(top_srcdir) \ + && gtags -i $(GTAGS_ARGS) "$$here" + +cscopelist: $(HEADERS) $(SOURCES) $(LISP) + list='$(SOURCES) $(HEADERS) $(LISP)'; \ + case "$(srcdir)" in \ + [\\/]* | ?:[\\/]*) sdir="$(srcdir)" ;; \ + *) sdir=$(subdir)/$(srcdir) ;; \ + esac; \ + for i in $$list; do \ + if test -f "$$i"; then \ + echo "$(subdir)/$$i"; \ + else \ + echo "$$sdir/$$i"; \ + fi; \ + done >> $(top_builddir)/cscope.files distclean-tags: -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags distdir: $(DISTFILES) - @srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; \ - topsrcdirstrip=`echo "$(top_srcdir)" | sed 's|.|.|g'`; \ - list='$(DISTFILES)'; for file in $$list; do \ - case $$file in \ - $(srcdir)/*) file=`echo "$$file" | sed "s|^$$srcdirstrip/||"`;; \ - $(top_srcdir)/*) file=`echo "$$file" | sed "s|^$$topsrcdirstrip/|$(top_builddir)/|"`;; \ - esac; \ + @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ + topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ + list='$(DISTFILES)'; \ + dist_files=`for file in $$list; do echo $$file; done | \ + sed -e "s|^$$srcdirstrip/||;t" \ + -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ + case $$dist_files in \ + */*) $(MKDIR_P) `echo "$$dist_files" | \ + sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ + sort -u` ;; \ + esac; \ + for file in $$dist_files; do \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ - dir=`echo "$$file" | sed -e 's,/[^/]*$$,,'`; \ - if test "$$dir" != "$$file" && test "$$dir" != "."; then \ - dir="/$$dir"; \ - $(mkdir_p) "$(distdir)$$dir"; \ - else \ - dir=''; \ - fi; \ if test -d $$d/$$file; then \ + dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ + if test -d "$(distdir)/$$file"; then \ + find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ + fi; \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ - cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \ + cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ + find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ - cp -pR $$d/$$file $(distdir)$$dir || exit 1; \ + cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ else \ - test -f $(distdir)/$$file \ - || cp -p $$d/$$file $(distdir)/$$file \ + test -f "$(distdir)/$$file" \ + || cp -p $$d/$$file "$(distdir)/$$file" \ || exit 1; \ fi; \ done check-am: all-am -check: check-am +check: $(BUILT_SOURCES) + $(MAKE) $(AM_MAKEFLAGS) check-am all-am: Makefile $(LTLIBRARIES) $(HEADERS) installdirs: for dir in "$(DESTDIR)$(libdir)" "$(DESTDIR)$(libicalssincludedir)"; do \ - test -z "$$dir" || $(mkdir_p) "$$dir"; \ + test -z "$$dir" || $(MKDIR_P) "$$dir"; \ done -install: install-am +install: $(BUILT_SOURCES) + $(MAKE) $(AM_MAKEFLAGS) install-am install-exec: install-exec-am install-data: install-data-am uninstall: uninstall-am @@ -635,16 +711,22 @@ install-am: all-am installcheck: installcheck-am install-strip: - $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ - install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ - `test -z '$(STRIP)' || \ - echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install + if test -z '$(STRIP)'; then \ + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + install; \ + else \ + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \ + fi mostlyclean-generic: clean-generic: distclean-generic: -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) + -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) maintainer-clean-generic: @echo "This command is intended for maintainers to use" @@ -652,6 +734,7 @@ maintainer-clean-generic: -rm -f icalsslexer.c -rm -f icalssyacc.c -rm -f icalssyacc.h + -test -z "$(BUILT_SOURCES)" || rm -f $(BUILT_SOURCES) clean: clean-am clean-am: clean-generic clean-libLTLIBRARIES clean-libtool \ @@ -661,7 +744,7 @@ distclean: distclean-am -rm -rf ./$(DEPDIR) -rm -f Makefile distclean-am: clean-am distclean-compile distclean-generic \ - distclean-libtool distclean-tags + distclean-tags dvi: dvi-am @@ -669,18 +752,38 @@ dvi-am: html: html-am +html-am: + info: info-am info-am: install-data-am: install-libicalssincludeHEADERS +install-dvi: install-dvi-am + +install-dvi-am: + install-exec-am: install-libLTLIBRARIES +install-html: install-html-am + +install-html-am: + install-info: install-info-am +install-info-am: + install-man: +install-pdf: install-pdf-am + +install-pdf-am: + +install-ps: install-ps-am + +install-ps-am: + installcheck-am: maintainer-clean: maintainer-clean-am @@ -701,26 +804,28 @@ ps: ps-am ps-am: -uninstall-am: uninstall-info-am uninstall-libLTLIBRARIES \ +uninstall-am: uninstall-libLTLIBRARIES \ uninstall-libicalssincludeHEADERS +.MAKE: all check install install-am install-strip + .PHONY: CTAGS GTAGS all all-am check check-am clean clean-generic \ - clean-libLTLIBRARIES clean-libtool ctags distclean \ + clean-libLTLIBRARIES clean-libtool cscopelist ctags distclean \ distclean-compile distclean-generic distclean-libtool \ distclean-tags distdir dvi dvi-am html html-am info info-am \ - install install-am install-data install-data-am install-exec \ - install-exec-am install-info install-info-am \ + install install-am install-data install-data-am install-dvi \ + install-dvi-am install-exec install-exec-am install-html \ + install-html-am install-info install-info-am \ install-libLTLIBRARIES install-libicalssincludeHEADERS \ - install-man install-strip installcheck installcheck-am \ + install-man install-pdf install-pdf-am install-ps \ + install-ps-am install-strip installcheck installcheck-am \ installdirs maintainer-clean maintainer-clean-generic \ mostlyclean mostlyclean-compile mostlyclean-generic \ mostlyclean-libtool pdf pdf-am ps ps-am tags uninstall \ - uninstall-am uninstall-info-am uninstall-libLTLIBRARIES \ + uninstall-am uninstall-libLTLIBRARIES \ uninstall-libicalssincludeHEADERS -all: icalss.h - # just to get it built $(srcdir)/icalgauge.c: icalssyacc.h $(srcdir)/icalsslexer.c: icalssyacc.h @@ -742,6 +847,7 @@ icalss.h: $(COMBINEDHEADERS) echo '}' >> icalss.h echo '#endif' >> icalss.h echo '#endif' >> icalss.h + # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. .NOEXPORT: diff --git a/src/libicalss/icalcalendar.c b/src/libicalss/icalcalendar.c index 04380f6..c4a8152 100644 --- a/src/libicalss/icalcalendar.c +++ b/src/libicalss/icalcalendar.c @@ -49,6 +49,7 @@ #include <errno.h> #ifdef WIN32 +#include <direct.h> #define mkdir(path, mode) _mkdir(path) #endif @@ -89,9 +90,10 @@ icalerrorenum icalcalendar_create(struct icalcalendar_impl* impl) icalerror_check_arg_re((impl != 0),"impl",ICAL_BADARG_ERROR); path[0] = '\0'; - strcpy(path,impl->dir); - strcat(path,"/"); - strcat(path,BOOKED_DIR); + strncpy(path,impl->dir,PATH_MAX-1); + strncat(path,"/",PATH_MAX-strlen(path)-1); + strncat(path,BOOKED_DIR,PATH_MAX-strlen(path)-1); + path[PATH_MAX-1] = '\0'; r = stat(path,&sbuf); @@ -139,7 +141,7 @@ void icalcalendar_free(icalcalendar* impl) } if (impl->freebusy !=0){ - icalset_free(impl->booked); + icalset_free(impl->freebusy); } if (impl->properties !=0){ @@ -196,9 +198,10 @@ icalset* icalcalendar_get_booked(icalcalendar* impl) icalerror_check_arg_rz((impl != 0),"impl"); dir[0] = '\0'; - strcpy(dir,impl->dir); - strcat(dir,"/"); - strcat(dir,BOOKED_DIR); + strncpy(dir,impl->dir,PATH_MAX-1); + strncat(dir,"/",PATH_MAX-strlen(dir)-1); + strncat(dir,BOOKED_DIR,PATH_MAX-strlen(dir)-1); + dir[PATH_MAX-1] = '\0'; if (impl->booked == 0){ icalerror_clear_errno(); @@ -216,9 +219,10 @@ icalset* icalcalendar_get_incoming(icalcalendar* impl) icalerror_check_arg_rz((impl != 0),"impl"); path[0] = '\0'; - strcpy(path,impl->dir); - strcat(path,"/"); - strcat(path,INCOMING_FILE); + strncpy(path,impl->dir,PATH_MAX-1); + strncat(path,"/",PATH_MAX-strlen(path)-1); + strncat(path,INCOMING_FILE,PATH_MAX-strlen(path)-1); + path[PATH_MAX-1] = '\0'; if (impl->properties == 0){ impl->properties = icalfileset_new(path); @@ -233,9 +237,10 @@ icalset* icalcalendar_get_properties(icalcalendar* impl) icalerror_check_arg_rz((impl != 0),"impl"); path[0] = '\0'; - strcpy(path,impl->dir); - strcat(path,"/"); - strcat(path,PROP_FILE); + strncpy(path,impl->dir,PATH_MAX-1); + strncat(path,"/",PATH_MAX-strlen(path)-1); + strncat(path,PROP_FILE,PATH_MAX-strlen(path)-1); + path[PATH_MAX-1] = '\0'; if (impl->properties == 0){ impl->properties = icalfileset_new(path); @@ -250,10 +255,10 @@ icalset* icalcalendar_get_freebusy(icalcalendar* impl) icalerror_check_arg_rz((impl != 0),"impl"); path[0] = '\0'; - strcpy(path,impl->dir); - strcat(path,"/"); - strcat(path,FBLIST_FILE); - + strncpy(path,impl->dir,PATH_MAX-1); + strncat(path,"/",PATH_MAX-strlen(path)-1); + strncat(path,FBLIST_FILE,PATH_MAX-strlen(path)-1); + path[PATH_MAX-1] = '\0'; if (impl->freebusy == 0){ impl->freebusy = icalfileset_new(path); diff --git a/src/libicalss/icalcalendar.h b/src/libicalss/icalcalendar.h index fb3d55a..3dcd1fb 100644 --- a/src/libicalss/icalcalendar.h +++ b/src/libicalss/icalcalendar.h @@ -30,7 +30,7 @@ #define ICALCALENDAR_H #include <libical/ical.h> -#include <icalset.h> +#include "icalset.h" /* icalcalendar * Routines for storing calendar data in a file system. The calendar diff --git a/src/libicalss/icalclassify.c b/src/libicalss/icalclassify.c index 1963f91..50dc1b5 100644 --- a/src/libicalss/icalclassify.c +++ b/src/libicalss/icalclassify.c @@ -156,6 +156,7 @@ icalproperty* icalclassify_find_attendee(icalcomponent *c, this_upn = strchr(this_attendee,':'); if(this_upn == 0){ + free(this_attendee); continue; } else { this_upn++; @@ -475,10 +476,11 @@ int icalclassify_request_new_organizer( icalclassify_pre icalerror_set_errno(ICAL_UNIMPLEMENTED_ERROR); icalclassify_post +/* already done before. (void)comp; (void)match; (void)user; - +*/ } int icalclassify_request_status( @@ -489,9 +491,11 @@ int icalclassify_request_status( icalclassify_pre icalerror_set_errno(ICAL_UNIMPLEMENTED_ERROR); icalclassify_post +/* (void)comp; (void)match; (void)user; +*/ } int icalclassify_request_forward( @@ -502,9 +506,11 @@ int icalclassify_request_forward( icalclassify_pre icalerror_set_errno(ICAL_UNIMPLEMENTED_ERROR); icalclassify_post +/* (void)comp; (void)match; (void)user; +*/ } int icalclassify_request_freebusy( @@ -515,9 +521,11 @@ int icalclassify_request_freebusy( icalclassify_pre icalerror_set_errno(ICAL_UNIMPLEMENTED_ERROR); icalclassify_post +/* (void)comp; (void)match; (void)user; +*/ } int icalclassify_reply_accept( diff --git a/src/libicalss/icalclassify.h b/src/libicalss/icalclassify.h index ed6f297..b692e74 100644 --- a/src/libicalss/icalclassify.h +++ b/src/libicalss/icalclassify.h @@ -28,8 +28,8 @@ #define ICALCLASSIFY_H #include <libical/ical.h> -#include <icalset.h> -#include <icalcomponent.h> +#include "icalset.h" +#include "icalcomponent.h" icalproperty_xlicclass icalclassify(icalcomponent* c,icalcomponent* match, const char* user); diff --git a/src/libicalss/icalcluster.c b/src/libicalss/icalcluster.c index 6b0b9f2..d1ab253 100644 --- a/src/libicalss/icalcluster.c +++ b/src/libicalss/icalcluster.c @@ -61,9 +61,9 @@ #include "icalclusterimpl.h" #include "icalgauge.h" -#ifdef WIN32 -#define snprintf _snprintf -#define strcasecmp stricmp +#if defined(_MSC_VER) +#define snprintf _snprintf +#define strcasecmp stricmp #endif diff --git a/src/libicalss/icalcluster.h b/src/libicalss/icalcluster.h index 6f9cea4..6ce13c7 100644 --- a/src/libicalss/icalcluster.h +++ b/src/libicalss/icalcluster.h @@ -30,7 +30,7 @@ #define ICALCLUSTER_H #include <libical/ical.h> -#include <icalset.h> +#include "icalset.h" typedef struct icalcluster_impl icalcluster; diff --git a/src/libicalss/icalcomponent.h b/src/libicalss/icalcomponent.h index 3802581..c097ab3 100644 --- a/src/libicalss/icalcomponent.h +++ b/src/libicalss/icalcomponent.h @@ -7,17 +7,19 @@ (C) COPYRIGHT 1999 Eric Busboom http://www.softwarestudio.org - The contents of this file are subject to the Mozilla Public License - Version 1.0 (the "License"); you may not use this file except in - compliance with the License. You may obtain a copy of the License at - http://www.mozilla.org/MPL/ - - Software distributed under the License is distributed on an "AS IS" - basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See - the License for the specific language governing rights and - limitations under the License. - - The original author is Eric Busboom + This program is free software; you can redistribute it and/or modify + it under the terms of either: + + The LGPL as published by the Free Software Foundation, version + 2.1, available at: http://www.fsf.org/copyleft/lesser.html + + Or: + + The Mozilla Public License Version 1.0. You may obtain a copy of + the License at http://www.mozilla.org/MPL/ + + The Original Code is eric. The Initial Developer of the Original + Code is Eric Busboom The original code is icalcomponent.h ======================================================================*/ diff --git a/src/libicalss/icaldirset.c b/src/libicalss/icaldirset.c index cfdd372..852206f 100644 --- a/src/libicalss/icaldirset.c +++ b/src/libicalss/icaldirset.c @@ -65,7 +65,6 @@ #include "icalcluster.h" #include "icalgauge.h" -#include <limits.h> /* For PATH_MAX */ #ifndef WIN32 #include <dirent.h> /* for opendir() */ #include <unistd.h> /* for stat, getpid */ @@ -74,23 +73,22 @@ #include <io.h> #include <process.h> #endif + #include <errno.h> #include <sys/types.h> /* for opendir() */ #include <sys/stat.h> /* for stat */ +#include <limits.h> /* For PATH_MAX */ #include <time.h> /* for clock() */ #include <stdlib.h> /* for rand(), srand() */ #include <string.h> /* for strdup */ #include "icaldirsetimpl.h" - -#ifdef WIN32 -#define snprintf _snprintf -#define strcasecmp stricmp - +#if defined(_MSC_VER) #define _S_ISTYPE(mode, mask) (((mode) & _S_IFMT) == (mask)) - #define S_ISDIR(mode) _S_ISTYPE((mode), _S_IFDIR) #define S_ISREG(mode) _S_ISTYPE((mode), _S_IFREG) +#define snprintf _snprintf +#define strcasecmp stricmp #endif /** Default options used when NULL is passed to icalset_new() **/ @@ -174,10 +172,10 @@ icalerrorenum icaldirset_read_directory(icaldirset *dset) closedir(dp); #else - struct _finddata_t c_file; - long hFile; + struct _finddata_t c_file; + intptr_t hFile; - /* Find first .c file in current directory */ + /* Find first .c file in current directory */ if( (hFile = _findfirst( "*", &c_file )) == -1L ) { icalerror_set_errno(ICAL_FILE_ERROR); return ICAL_FILE_ERROR; @@ -407,7 +405,8 @@ static void icaldirset_add_uid(icalcomponent* comp) uid = icalproperty_new_uid(uidstring); icalcomponent_add_property(comp,uid); } else { - strcpy(uidstring,icalproperty_get_uid(uid)); + strncpy(uidstring,icalproperty_get_uid(uid),ICAL_PATH_MAX-1); + uidstring[ICAL_PATH_MAX-1]='\0'; } } diff --git a/src/libicalss/icaldirset.h b/src/libicalss/icaldirset.h index 492c4e1..75d7514 100644 --- a/src/libicalss/icaldirset.h +++ b/src/libicalss/icaldirset.h @@ -30,9 +30,9 @@ #define ICALDIRSET_H #include <libical/ical.h> -#include <icalset.h> -#include <icalcluster.h> -#include <icalgauge.h> +#include "icalset.h" +#include "icalcluster.h" +#include "icalgauge.h" /* icaldirset Routines for storing, fetching, and searching for ical * objects in a database */ diff --git a/src/libicalss/icalfileset.c b/src/libicalss/icalfileset.c index 358c4ab..9d73917 100644 --- a/src/libicalss/icalfileset.c +++ b/src/libicalss/icalfileset.c @@ -38,22 +38,27 @@ #include <unistd.h> /* for stat, getpid */ #else #include <io.h> +#ifndef _WIN32_WCE #include <share.h> #endif +#endif + #include <stdlib.h> #include <string.h> #include <fcntl.h> /* for fcntl */ #include "icalfilesetimpl.h" #include "icalclusterimpl.h" -#ifdef WIN32 -#define snprintf _snprintf -#define strcasecmp stricmp - +#if defined(_MSC_VER) #define _S_ISTYPE(mode, mask) (((mode) & _S_IFMT) == (mask)) - #define S_ISDIR(mode) _S_ISTYPE((mode), _S_IFDIR) #define S_ISREG(mode) _S_ISTYPE((mode), _S_IFREG) +#define snprintf _snprintf +#define strcasecmp stricmp +#endif + +#ifdef _WIN32_WCE +#include <winbase.h> #endif /** Default options used when NULL is passed to icalset_new() **/ @@ -160,7 +165,7 @@ icalcluster* icalfileset_produce_icalcluster(const char *path) { fileset = icalfileset_new_reader(path); - if (fileset == 0 && icalerrno == ICAL_FILE_ERROR) { + if (fileset == 0 || icalerrno == ICAL_FILE_ERROR) { /* file does not exist */ ret = icalcluster_new(path, NULL); } else { @@ -366,6 +371,10 @@ icalerrorenum icalfileset_commit(icalset* set) icalcomponent *c; off_t write_size=0; icalfileset *fset = (icalfileset*) set; +#ifdef _WIN32_WCE + wchar_t *wtmp=0; + PROCESS_INFORMATION pi; +#endif icalerror_check_arg_re((fset!=0),"set",ICAL_BADARG_ERROR); @@ -378,18 +387,28 @@ icalerrorenum icalfileset_commit(icalset* set) if (fset->options.safe_saves == 1) { #ifndef WIN32 - char *quoted_file = shell_quote(fset->path); - snprintf(tmp,ICAL_PATH_MAX,"cp '%s' '%s.bak'",fset->path, fset->path); - free(quoted_file); + char *quoted_file = shell_quote(fset->path); + snprintf(tmp,ICAL_PATH_MAX,"cp '%s' '%s.bak'",fset->path, fset->path); + free(quoted_file); #else - snprintf(tmp,ICAL_PATH_MAX,"copy %s %s.bak", fset->path, fset->path); + snprintf(tmp,ICAL_PATH_MAX,"copy %s %s.bak", fset->path, fset->path); #endif - if(system(tmp) < 0){ - icalerror_set_errno(ICAL_FILE_ERROR); - return ICAL_FILE_ERROR; - } +#ifndef _WIN32_WCE + if(system(tmp) < 0){ +#else + + wtmp = wce_mbtowc(tmp); + + if (CreateProcess (wtmp, L"", NULL, NULL, FALSE, 0, NULL, NULL, NULL,&pi)){ +#endif + icalerror_set_errno(ICAL_FILE_ERROR); + return ICAL_FILE_ERROR; + } } +#ifdef _WIN32_WCE + free(wtmp); +#endif if(lseek(fset->fd, 0, SEEK_SET) < 0){ icalerror_set_errno(ICAL_FILE_ERROR); @@ -408,6 +427,7 @@ icalerrorenum icalfileset_commit(icalset* set) if ( sz != strlen(str)){ perror("write"); icalerror_set_errno(ICAL_FILE_ERROR); + free(str); return ICAL_FILE_ERROR; } @@ -422,7 +442,11 @@ icalerrorenum icalfileset_commit(icalset* set) return ICAL_FILE_ERROR; } #else +#ifndef _WIN32_WCE chsize( fset->fd, tell( fset->fd ) ); +#else + SetEndOfFile(fset->fd); +#endif #endif return ICAL_NO_ERROR; @@ -760,6 +784,7 @@ icalsetiter icalfileset_begin_component(icalset* set, icalcomponent_kind kind, i icalerror_check_arg_re((set!=0), "set", icalsetiter_null); + start = icaltime_from_timet( time(0),0); itr.gauge = gauge; citr = icalcomponent_begin_component(fset->cluster, kind); @@ -837,6 +862,7 @@ icalcomponent* icalfileset_form_a_matched_recurrence_component(icalsetiter* itr) icalproperty *dtstart, *rrule, *prop, *due; struct icalrecurrencetype recur; + start = icaltime_from_timet( time(0),0); comp = itr->last_component; if (comp == NULL || itr->gauge == NULL) { @@ -899,6 +925,8 @@ icalcomponent* icalfilesetiter_to_next(icalset* set, icalsetiter* i) struct icalrecurrencetype recur; int g = 0; + start = icaltime_from_timet( time(0),0); + next = icaltime_from_timet( time(0),0); do { c = icalcompiter_next(&(i->iter)); diff --git a/src/libicalss/icalfileset.h b/src/libicalss/icalfileset.h index 64dba1f..c95c70f 100644 --- a/src/libicalss/icalfileset.h +++ b/src/libicalss/icalfileset.h @@ -30,9 +30,9 @@ #define ICALFILESET_H #include <libical/ical.h> -#include <icalset.h> -#include <icalcluster.h> -#include <icalgauge.h> +#include "icalset.h" +#include "icalcluster.h" +#include "icalgauge.h" #include <sys/types.h> /* For open() flags and mode */ #include <sys/stat.h> /* For open() flags and mode */ #include <fcntl.h> /* For open() flags and mode */ @@ -41,8 +41,6 @@ #define mode_t int #endif -extern int icalfileset_safe_saves; - typedef struct icalfileset_impl icalfileset; icalset* icalfileset_new(const char* path); diff --git a/src/libicalss/icalgauge.c b/src/libicalss/icalgauge.c index 3598e71..64ef1ae 100644 --- a/src/libicalss/icalgauge.c +++ b/src/libicalss/icalgauge.c @@ -284,8 +284,6 @@ int icalgauge_compare(icalgauge* gauge,icalcomponent* comp) icalerror_check_arg_rz( (comp!=0), "comp"); icalerror_check_arg_rz( (gauge!=0), "gauge"); - if (gauge == 0 || comp == 0) return 0; - inner = icalcomponent_get_first_real_component(comp); if(inner == 0){ @@ -362,6 +360,7 @@ int icalgauge_compare(icalgauge* gauge,icalcomponent* comp) } else { sub_comp = icalcomponent_get_first_component(inner,w->comp); if(sub_comp == 0){ + icalvalue_free(v); return 0; } } diff --git a/src/libicalss/icalgauge.h b/src/libicalss/icalgauge.h index 8333a4b..a2f5b7b 100644 --- a/src/libicalss/icalgauge.h +++ b/src/libicalss/icalgauge.h @@ -29,7 +29,7 @@ #ifndef ICALGAUGE_H #define ICALGAUGE_H -#include <icalcomponent.h> +#include "icalcomponent.h" /** @file icalgauge.h * @brief Routines implementing a filter for ical components diff --git a/src/libicalss/icalmessage.c b/src/libicalss/icalmessage.c index 559fc44..9c99452 100644 --- a/src/libicalss/icalmessage.c +++ b/src/libicalss/icalmessage.c @@ -31,6 +31,11 @@ #include <ctype.h> /* for tolower()*/ #include <string.h> /* for strstr */ #include <stdlib.h> /* for free(), malloc() */ + +#if defined(_MSC_VER) +#define snprintf _snprintf +#endif + icalcomponent* icalmessage_get_inner(icalcomponent* comp) { if (icalcomponent_isa(comp) == ICAL_VCALENDAR_COMPONENT){ @@ -43,12 +48,14 @@ icalcomponent* icalmessage_get_inner(icalcomponent* comp) static char* lowercase(const char* str) { char* p = 0; - char* n = icalmemory_strdup(str); + char* n = 0; if(str ==0){ return 0; } + n = icalmemory_strdup(str); + for(p = n; *p!=0; p++){ *p = tolower(*p); } @@ -72,6 +79,7 @@ icalproperty* icalmessage_find_attendee(icalcomponent* comp, const char* user) lattendee = lowercase(icalproperty_get_attendee(p)); if (strstr(lattendee,user) != 0){ + free(lattendee); attendee = p; break; } @@ -346,6 +354,7 @@ icalcomponent* icalmessage_new_error_reply(icalcomponent* c, icalerror_check_arg_rz(c,"c"); + memset(&rs, 0, sizeof(struct icalreqstattype)); reply = icalmessage_new_reply_base(c,user,msg); inner = icalmessage_get_inner(reply); cinner = icalmessage_get_inner(c); diff --git a/src/libicalss/icalset.c b/src/libicalss/icalset.c index 83acdb4..cd38033 100644 --- a/src/libicalss/icalset.c +++ b/src/libicalss/icalset.c @@ -313,10 +313,6 @@ icalset* icalset_new(icalset_kind kind, const char* dsn, void* options) { return(NULL); } - if ( data == 0) { - icalerror_set_errno(ICAL_NEWFAILED_ERROR); - return 0; - } data->kind = kind; data->dsn = strdup(dsn); #endif diff --git a/src/libicalss/icalset.h b/src/libicalss/icalset.h index 66be3b7..b6929f0 100644 --- a/src/libicalss/icalset.h +++ b/src/libicalss/icalset.h @@ -41,7 +41,7 @@ #include <limits.h> /* For PATH_MAX */ #include <libical/ical.h> -#include <icalgauge.h> +#include "icalgauge.h" #ifdef PATH_MAX #define ICAL_PATH_MAX PATH_MAX diff --git a/src/libicalss/icalspanlist.c b/src/libicalss/icalspanlist.c index 3ea73ca..456abb1 100644 --- a/src/libicalss/icalspanlist.c +++ b/src/libicalss/icalspanlist.c @@ -175,6 +175,7 @@ icalspanlist* icalspanlist_new(icalset *set, if ((freetime=(struct icaltime_span *) malloc(sizeof(struct icaltime_span))) == 0){ icalerror_set_errno(ICAL_NEWFAILED_ERROR); + icalspanlist_free(sl); return 0; } @@ -207,6 +208,7 @@ icalspanlist* icalspanlist_new(icalset *set, if ((freetime=(struct icaltime_span *) malloc(sizeof(struct icaltime_span))) == 0){ icalerror_set_errno(ICAL_NEWFAILED_ERROR); + icalspanlist_free(sl); return 0; } @@ -541,6 +543,7 @@ icalspanlist *icalspanlist_from_vfreebusy(icalcomponent* comp) if (s == 0) { icalerror_set_errno(ICAL_NEWFAILED_ERROR); + icalspanlist_free(sl); return 0; } @@ -552,6 +555,7 @@ icalspanlist *icalspanlist_from_vfreebusy(icalcomponent* comp) case ICAL_FBTYPE_NONE: case ICAL_FBTYPE_X: s->is_busy = 1; + break; default: s->is_busy = 0; } diff --git a/src/libicalss/icalspanlist.h b/src/libicalss/icalspanlist.h index aa023f1..71056de 100644 --- a/src/libicalss/icalspanlist.h +++ b/src/libicalss/icalspanlist.h @@ -26,7 +26,7 @@ #define ICALSPANLIST_H #include <libical/ical.h> -#include <icalset.h> +#include "icalset.h" /** @file icalspanlist.h * @brief Code that supports collections of free/busy spans of time diff --git a/src/libicalss/icalsslexer.c b/src/libicalss/icalsslexer.c index 8a71140..ae4a656 100644 --- a/src/libicalss/icalsslexer.c +++ b/src/libicalss/icalsslexer.c @@ -1,8 +1,11 @@ + + +#define YY_INT_ALIGNED short int + +/* A lexical scanner generated by flex */ + #define yy_create_buffer ss_create_buffer #define yy_delete_buffer ss_delete_buffer -#define yy_scan_buffer ss_scan_buffer -#define yy_scan_string ss_scan_string -#define yy_scan_bytes ss_scan_bytes #define yy_flex_debug ss_flex_debug #define yy_init_buffer ss_init_buffer #define yy_flush_buffer ss_flush_buffer @@ -11,79 +14,122 @@ #define yyin ssin #define yyleng ssleng #define yylex sslex +#define yylineno sslineno #define yyout ssout #define yyrestart ssrestart #define yytext sstext #define yywrap sswrap - -/* A lexical scanner generated by flex*/ - -/* Scanner skeleton version: - * $Header: /home/daffy/u0/vern/flex/RCS/flex.skl,v 2.91 96/09/10 16:58:48 vern Exp $ - */ +#define yyalloc ssalloc +#define yyrealloc ssrealloc +#define yyfree ssfree #define FLEX_SCANNER #define YY_FLEX_MAJOR_VERSION 2 #define YY_FLEX_MINOR_VERSION 5 - -#ifdef HAVE_CONFIG_H -#include "config.h" +#define YY_FLEX_SUBMINOR_VERSION 35 +#if YY_FLEX_SUBMINOR_VERSION > 0 +#define FLEX_BETA #endif + +/* First, we deal with platform-specific or compiler-specific issues. */ + +/* begin standard C headers. */ #include <stdio.h> -#if defined(HAVE_UNISTD_H) -#include <unistd.h> -#endif +#include <string.h> +#include <errno.h> +#include <stdlib.h> -/* cfront 1.2 defines "c_plusplus" instead of "__cplusplus" */ -#ifdef c_plusplus -#ifndef __cplusplus -#define __cplusplus +#ifdef _WIN32_WCE +#include <io.h> #endif + +/* end standard C headers. */ + +/* flex integer type definitions */ + +#ifndef FLEXINT_H +#define FLEXINT_H + +/* C99 systems have <inttypes.h>. Non-C99 systems may or may not. */ + +#if defined (__STDC_VERSION__) && __STDC_VERSION__ >= 199901L + +/* C99 says to define __STDC_LIMIT_MACROS before including stdint.h, + * if you want the limit (max/min) macros for int types. + */ +#ifndef __STDC_LIMIT_MACROS +#define __STDC_LIMIT_MACROS 1 #endif +#include <inttypes.h> +typedef int8_t flex_int8_t; +typedef uint8_t flex_uint8_t; +typedef int16_t flex_int16_t; +typedef uint16_t flex_uint16_t; +typedef int32_t flex_int32_t; +typedef uint32_t flex_uint32_t; +#else +typedef signed char flex_int8_t; +typedef short int flex_int16_t; +typedef int flex_int32_t; +typedef unsigned char flex_uint8_t; +typedef unsigned short int flex_uint16_t; +typedef unsigned int flex_uint32_t; -#ifdef __cplusplus +/* Limits of integral types. */ +#ifndef INT8_MIN +#define INT8_MIN (-128) +#endif +#ifndef INT16_MIN +#define INT16_MIN (-32767-1) +#endif +#ifndef INT32_MIN +#define INT32_MIN (-2147483647-1) +#endif +#ifndef INT8_MAX +#define INT8_MAX (127) +#endif +#ifndef INT16_MAX +#define INT16_MAX (32767) +#endif +#ifndef INT32_MAX +#define INT32_MAX (2147483647) +#endif +#ifndef UINT8_MAX +#define UINT8_MAX (255U) +#endif +#ifndef UINT16_MAX +#define UINT16_MAX (65535U) +#endif +#ifndef UINT32_MAX +#define UINT32_MAX (4294967295U) +#endif -#include <stdlib.h> +#endif /* ! C99 */ + +#endif /* ! FLEXINT_H */ -/* Use prototypes in function declarations. */ -#define YY_USE_PROTOS +#ifdef __cplusplus /* The "const" storage-class-modifier is valid. */ #define YY_USE_CONST #else /* ! __cplusplus */ -#if __STDC__ +/* C99 requires __STDC__ to be defined as 1. */ +#if defined (__STDC__) -#define YY_USE_PROTOS #define YY_USE_CONST -#endif /* __STDC__ */ +#endif /* defined (__STDC__) */ #endif /* ! __cplusplus */ -#ifdef __TURBOC__ - #pragma warn -rch - #pragma warn -use -#include <io.h> -#include <stdlib.h> -#define YY_USE_CONST -#define YY_USE_PROTOS -#endif - #ifdef YY_USE_CONST #define yyconst const #else #define yyconst #endif - -#ifdef YY_USE_PROTOS -#define YY_PROTO(proto) proto -#else -#define YY_PROTO(proto) () -#endif - /* Returned upon end-of-file. */ #define YY_NULL 0 @@ -98,80 +144,70 @@ * but we do it the disgusting crufty way forced on us by the ()-less * definition of BEGIN. */ -#define BEGIN yy_start = 1 + 2 * +#define BEGIN (yy_start) = 1 + 2 * /* Translate the current start state into a value that can be later handed * to BEGIN to return to the state. The YYSTATE alias is for lex * compatibility. */ -#define YY_START ((yy_start - 1) / 2) +#define YY_START (((yy_start) - 1) / 2) #define YYSTATE YY_START /* Action number for EOF rule of a given start state. */ #define YY_STATE_EOF(state) (YY_END_OF_BUFFER + state + 1) /* Special action meaning "start processing a new file". */ -#define YY_NEW_FILE yyrestart( yyin ) +#define YY_NEW_FILE ssrestart(ssin ) #define YY_END_OF_BUFFER_CHAR 0 /* Size of default input buffer. */ +#ifndef YY_BUF_SIZE #define YY_BUF_SIZE 16384 +#endif +/* The state buf must be large enough to hold one state per character in the main buffer. + */ +#define YY_STATE_BUF_SIZE ((YY_BUF_SIZE + 2) * sizeof(yy_state_type)) + +#ifndef YY_TYPEDEF_YY_BUFFER_STATE +#define YY_TYPEDEF_YY_BUFFER_STATE typedef struct yy_buffer_state *YY_BUFFER_STATE; +#endif -extern int yyleng; -extern FILE *yyin, *yyout; +extern int ssleng; + +extern FILE *ssin, *ssout; #define EOB_ACT_CONTINUE_SCAN 0 #define EOB_ACT_END_OF_FILE 1 #define EOB_ACT_LAST_MATCH 2 -/* The funky do-while in the following #define is used to turn the definition - * int a single C statement (which needs a semi-colon terminator). This - * avoids problems with code like: - * - * if ( condition_holds ) - * yyless( 5 ); - * else - * do_something_else(); - * - * Prior to using the do-while the compiler would get upset at the - * "else" because it interpreted the "if" statement as being all - * done when it reached the ';' after the yyless() call. - */ - -/* Return all but the first 'n' matched characters back to the input stream. */ - + #define YY_LESS_LINENO(n) + +/* Return all but the first "n" matched characters back to the input stream. */ #define yyless(n) \ do \ { \ - /* Undo effects of setting up yytext. */ \ - *yy_cp = yy_hold_char; \ + /* Undo effects of setting up sstext. */ \ + int yyless_macro_arg = (n); \ + YY_LESS_LINENO(yyless_macro_arg);\ + *yy_cp = (yy_hold_char); \ YY_RESTORE_YY_MORE_OFFSET \ - yy_c_buf_p = yy_cp = yy_bp + n - YY_MORE_ADJ; \ - YY_DO_BEFORE_ACTION; /* set up yytext again */ \ + (yy_c_buf_p) = yy_cp = yy_bp + yyless_macro_arg - YY_MORE_ADJ; \ + YY_DO_BEFORE_ACTION; /* set up sstext again */ \ } \ while ( 0 ) -#define unput(c) yyunput( c, yytext_ptr ) +#define unput(c) yyunput( c, (yytext_ptr) ) -/* Some routines like yy_flex_realloc() are emitted as static but are - not called by all lexers. This generates warnings in some compilers, - notably GCC. Arrange to suppress these. */ -#ifdef __GNUC__ -#define YY_MAY_BE_UNUSED __attribute__((unused)) -#else -#define YY_MAY_BE_UNUSED +#ifndef YY_TYPEDEF_YY_SIZE_T +#define YY_TYPEDEF_YY_SIZE_T +typedef size_t yy_size_t; #endif -/* The following is because we cannot portably get our hands on size_t - * (without autoconf's help, which isn't available because we want - * flex-generated scanners to compile on their own). - */ -typedef unsigned int yy_size_t; - - +#ifndef YY_STRUCT_YY_BUFFER_STATE +#define YY_STRUCT_YY_BUFFER_STATE struct yy_buffer_state { FILE *yy_input_file; @@ -208,12 +244,16 @@ struct yy_buffer_state */ int yy_at_bol; + int yy_bs_lineno; /**< The line count. */ + int yy_bs_column; /**< The column count. */ + /* Whether to try to fill the input buffer when we reach the * end of it. */ int yy_fill_buffer; int yy_buffer_status; + #define YY_BUFFER_NEW 0 #define YY_BUFFER_NORMAL 1 /* When an EOF's been seen but there's still some text to process @@ -223,102 +263,137 @@ struct yy_buffer_state * possible backing-up. * * When we actually see the EOF, we change the status to "new" - * (via yyrestart()), so that the user can continue scanning by - * just pointing yyin at a new input file. + * (via ssrestart()), so that the user can continue scanning by + * just pointing ssin at a new input file. */ #define YY_BUFFER_EOF_PENDING 2 + }; +#endif /* !YY_STRUCT_YY_BUFFER_STATE */ -static YY_BUFFER_STATE yy_current_buffer = 0; +/* Stack of input buffers. */ +static size_t yy_buffer_stack_top = 0; /**< index of top of stack. */ +static size_t yy_buffer_stack_max = 0; /**< capacity of stack. */ +static YY_BUFFER_STATE * yy_buffer_stack = 0; /**< Stack as an array. */ /* We provide macros for accessing buffer states in case in the * future we want to put the buffer states in a more general * "scanner state". + * + * Returns the top of the stack, or NULL. */ -#define YY_CURRENT_BUFFER yy_current_buffer +#define YY_CURRENT_BUFFER ( (yy_buffer_stack) \ + ? (yy_buffer_stack)[(yy_buffer_stack_top)] \ + : NULL) +/* Same as previous macro, but useful when we know that the buffer stack is not + * NULL or when we need an lvalue. For internal use only. + */ +#define YY_CURRENT_BUFFER_LVALUE (yy_buffer_stack)[(yy_buffer_stack_top)] -/* yy_hold_char holds the character lost when yytext is formed. */ +/* yy_hold_char holds the character lost when sstext is formed. */ static char yy_hold_char; - static int yy_n_chars; /* number of characters read into yy_ch_buf */ - - -int yyleng; +int ssleng; /* Points to current character in buffer. */ static char *yy_c_buf_p = (char *) 0; -static int yy_init = 1; /* whether we need to initialize */ +static int yy_init = 0; /* whether we need to initialize */ static int yy_start = 0; /* start state number */ -/* Flag which is used to allow yywrap()'s to do buffer switches - * instead of setting up a fresh yyin. A bit of a hack ... +/* Flag which is used to allow sswrap()'s to do buffer switches + * instead of setting up a fresh ssin. A bit of a hack ... */ static int yy_did_buffer_switch_on_eof; -void yyrestart YY_PROTO(( FILE *input_file )); +void ssrestart (FILE *input_file ); +void ss_switch_to_buffer (YY_BUFFER_STATE new_buffer ); +YY_BUFFER_STATE ss_create_buffer (FILE *file,int size ); +void ss_delete_buffer (YY_BUFFER_STATE b ); +void ss_flush_buffer (YY_BUFFER_STATE b ); +void sspush_buffer_state (YY_BUFFER_STATE new_buffer ); +void sspop_buffer_state (void ); + +static void ssensure_buffer_stack (void ); +static void ss_load_buffer_state (void ); +static void ss_init_buffer (YY_BUFFER_STATE b,FILE *file ); -void yy_switch_to_buffer YY_PROTO(( YY_BUFFER_STATE new_buffer )); -void yy_load_buffer_state YY_PROTO(( void )); -YY_BUFFER_STATE yy_create_buffer YY_PROTO(( FILE *file, int size )); -void yy_delete_buffer YY_PROTO(( YY_BUFFER_STATE b )); -void yy_init_buffer YY_PROTO(( YY_BUFFER_STATE b, FILE *file )); -void yy_flush_buffer YY_PROTO(( YY_BUFFER_STATE b )); -#define YY_FLUSH_BUFFER yy_flush_buffer( yy_current_buffer ) +#define YY_FLUSH_BUFFER ss_flush_buffer(YY_CURRENT_BUFFER ) -YY_BUFFER_STATE yy_scan_buffer YY_PROTO(( char *base, yy_size_t size )); -YY_BUFFER_STATE yy_scan_string YY_PROTO(( yyconst char *yy_str )); -YY_BUFFER_STATE yy_scan_bytes YY_PROTO(( yyconst char *bytes, int len )); +YY_BUFFER_STATE ss_scan_buffer (char *base,yy_size_t size ); +YY_BUFFER_STATE ss_scan_string (yyconst char *yy_str ); +YY_BUFFER_STATE ss_scan_bytes (yyconst char *bytes,int len ); -static void *yy_flex_alloc YY_PROTO(( yy_size_t )); -static void *yy_flex_realloc YY_PROTO(( void *, yy_size_t )) YY_MAY_BE_UNUSED; -static void yy_flex_free YY_PROTO(( void * )); +void *ssalloc (yy_size_t ); +void *ssrealloc (void *,yy_size_t ); +void ssfree (void * ); -#define yy_new_buffer yy_create_buffer +#define yy_new_buffer ss_create_buffer #define yy_set_interactive(is_interactive) \ { \ - if ( ! yy_current_buffer ) \ - yy_current_buffer = yy_create_buffer( yyin, YY_BUF_SIZE ); \ - yy_current_buffer->yy_is_interactive = is_interactive; \ + if ( ! YY_CURRENT_BUFFER ){ \ + ssensure_buffer_stack (); \ + YY_CURRENT_BUFFER_LVALUE = \ + ss_create_buffer(ssin,YY_BUF_SIZE ); \ + } \ + YY_CURRENT_BUFFER_LVALUE->yy_is_interactive = is_interactive; \ } #define yy_set_bol(at_bol) \ { \ - if ( ! yy_current_buffer ) \ - yy_current_buffer = yy_create_buffer( yyin, YY_BUF_SIZE ); \ - yy_current_buffer->yy_at_bol = at_bol; \ + if ( ! YY_CURRENT_BUFFER ){\ + ssensure_buffer_stack (); \ + YY_CURRENT_BUFFER_LVALUE = \ + ss_create_buffer(ssin,YY_BUF_SIZE ); \ + } \ + YY_CURRENT_BUFFER_LVALUE->yy_at_bol = at_bol; \ } -#define YY_AT_BOL() (yy_current_buffer->yy_at_bol) +#define YY_AT_BOL() (YY_CURRENT_BUFFER_LVALUE->yy_at_bol) + +/* Begin user sect3 */ typedef unsigned char YY_CHAR; -FILE *yyin = (FILE *) 0, *yyout = (FILE *) 0; + +FILE *ssin = (FILE *) 0, *ssout = (FILE *) 0; + typedef int yy_state_type; -extern char yytext[]; +extern int sslineno; + +int sslineno = 1; + +extern char sstext[]; -static yy_state_type yy_get_previous_state YY_PROTO(( void )); -static yy_state_type yy_try_NUL_trans YY_PROTO(( yy_state_type current_state )); -static int yy_get_next_buffer YY_PROTO(( void )); -static void yy_fatal_error YY_PROTO(( yyconst char msg[] )); +static yy_state_type yy_get_previous_state (void ); +static yy_state_type yy_try_NUL_trans (yy_state_type current_state ); +static int yy_get_next_buffer (void ); +static void yy_fatal_error (yyconst char msg[] ); /* Done after the current pattern has been matched and before the - * corresponding action - sets up yytext. + * corresponding action - sets up sstext. */ #define YY_DO_BEFORE_ACTION \ - yytext_ptr = yy_bp; \ - yyleng = (int) (yy_cp - yy_bp); \ - yy_hold_char = *yy_cp; \ + (yytext_ptr) = yy_bp; \ + ssleng = (size_t) (yy_cp - yy_bp); \ + (yy_hold_char) = *yy_cp; \ *yy_cp = '\0'; \ - if ( yyleng >= YYLMAX ) \ + if ( ssleng >= YYLMAX ) \ YY_FATAL_ERROR( "token too large, exceeds YYLMAX" ); \ - yy_flex_strncpy( yytext, yytext_ptr, yyleng + 1 ); \ - yy_c_buf_p = yy_cp; + yy_flex_strncpy( sstext, (yytext_ptr), ssleng + 1 ); \ + (yy_c_buf_p) = yy_cp; #define YY_NUM_RULES 23 #define YY_END_OF_BUFFER 24 -static yyconst short int yy_accept[56] = +/* This struct is not used in this scanner, + but its presence is necessary. */ +struct yy_trans_info + { + flex_int32_t yy_verify; + flex_int32_t yy_nxt; + }; +static yyconst flex_int16_t yy_accept[56] = { 0, 0, 0, 0, 0, 0, 0, 24, 22, 18, 18, 22, 17, 21, 4, 19, 8, 5, 9, 21, 21, @@ -328,7 +403,7 @@ static yyconst short int yy_accept[56] = 21, 21, 3, 1, 0 } ; -static yyconst int yy_ec[256] = +static yyconst flex_int32_t yy_ec[256] = { 0, 1, 1, 1, 1, 1, 1, 1, 1, 2, 3, 1, 1, 2, 1, 1, 1, 1, 1, 1, 1, @@ -339,10 +414,10 @@ static yyconst int yy_ec[256] = 12, 13, 1, 7, 14, 7, 15, 16, 17, 18, 7, 19, 20, 7, 7, 21, 22, 23, 24, 7, 7, 25, 26, 27, 28, 7, 29, 7, 7, 7, - 1, 1, 1, 1, 1, 1, 14, 7, 15, 16, + 1, 1, 1, 1, 1, 1, 30, 7, 31, 32, - 17, 18, 7, 19, 20, 7, 7, 21, 22, 23, - 24, 7, 7, 25, 26, 27, 28, 7, 29, 7, + 33, 34, 7, 35, 36, 7, 7, 37, 38, 39, + 40, 7, 7, 41, 42, 43, 44, 7, 45, 7, 7, 7, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, @@ -360,24 +435,26 @@ static yyconst int yy_ec[256] = 1, 1, 1, 1, 1 } ; -static yyconst int yy_meta[30] = +static yyconst flex_int32_t yy_meta[46] = { 0, 1, 1, 1, 2, 1, 1, 3, 1, 2, 1, 1, 1, 1, 3, 3, 3, 3, 3, 3, 3, - 3, 3, 3, 3, 3, 3, 3, 3, 3 + 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, + 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, + 3, 3, 3, 3, 3 } ; -static yyconst short int yy_base[58] = +static yyconst flex_int16_t yy_base[58] = { 0, - 0, 0, 0, 0, 0, 0, 68, 69, 28, 31, - 55, 0, 0, 69, 69, 54, 53, 52, 40, 37, - 35, 12, 35, 42, 39, 35, 69, 51, 0, 69, - 69, 69, 40, 31, 0, 27, 32, 0, 31, 34, - 69, 0, 28, 0, 28, 31, 22, 0, 0, 31, - 28, 17, 0, 0, 69, 39, 40 + 0, 0, 0, 0, 0, 0, 98, 107, 44, 47, + 85, 0, 0, 107, 107, 84, 83, 79, 29, 28, + 28, 31, 31, 40, 39, 58, 107, 84, 0, 107, + 107, 107, 47, 40, 0, 38, 45, 0, 46, 59, + 107, 0, 55, 0, 57, 67, 60, 0, 0, 71, + 70, 61, 0, 0, 107, 103, 86 } ; -static yyconst short int yy_def[58] = +static yyconst flex_int16_t yy_def[58] = { 0, 55, 1, 1, 1, 1, 1, 55, 55, 55, 55, 55, 56, 57, 55, 55, 55, 55, 55, 57, 57, @@ -387,39 +464,54 @@ static yyconst short int yy_def[58] = 57, 57, 57, 57, 0, 55, 55 } ; -static yyconst short int yy_nxt[99] = +static yyconst flex_int16_t yy_nxt[153] = { 0, 8, 9, 10, 9, 11, 12, 13, 14, 8, 15, 16, 17, 18, 19, 13, 13, 13, 20, 13, 21, - 13, 13, 22, 23, 13, 24, 13, 13, 25, 26, - 26, 26, 26, 26, 26, 36, 26, 26, 26, 37, - 28, 28, 29, 54, 53, 52, 51, 50, 49, 48, - 47, 46, 45, 44, 43, 42, 41, 40, 39, 38, - 35, 34, 33, 32, 31, 30, 27, 55, 7, 55, + 13, 13, 22, 23, 13, 24, 13, 13, 25, 19, + 13, 13, 13, 20, 13, 21, 13, 13, 22, 23, + 13, 24, 13, 13, 25, 26, 26, 26, 26, 26, + 26, 33, 34, 35, 36, 38, 39, 40, 37, 26, + 26, 26, 42, 43, 44, 45, 46, 33, 34, 35, + 36, 38, 39, 40, 37, 47, 48, 49, 42, 43, + 44, 45, 46, 50, 51, 52, 53, 54, 29, 41, + 32, 47, 48, 49, 31, 30, 27, 55, 55, 50, + + 51, 52, 53, 54, 28, 28, 7, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, - 55, 55, 55, 55, 55, 55, 55, 55 - + 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, + 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, + 55, 55 } ; -static yyconst short int yy_chk[99] = +static yyconst flex_int16_t yy_chk[153] = { 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, 1, 9, - 9, 9, 10, 10, 10, 22, 26, 26, 26, 22, - 56, 56, 57, 52, 51, 50, 47, 46, 45, 43, - 40, 39, 37, 36, 34, 33, 28, 25, 24, 23, - 21, 20, 19, 18, 17, 16, 11, 7, 55, 55, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 9, 9, 9, 10, 10, + 10, 19, 20, 21, 22, 23, 24, 25, 22, 26, + 26, 26, 33, 34, 36, 37, 39, 19, 20, 21, + 22, 23, 24, 25, 22, 40, 43, 45, 33, 34, + 36, 37, 39, 46, 47, 50, 51, 52, 57, 28, + 18, 40, 43, 45, 17, 16, 11, 7, 0, 46, + + 47, 50, 51, 52, 56, 56, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, - 55, 55, 55, 55, 55, 55, 55, 55 - + 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, + 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, + 55, 55 } ; static yy_state_type yy_last_accepting_state; static char *yy_last_accepting_cpos; +extern int ss_flex_debug; +int ss_flex_debug = 0; + /* The intent behind this definition is that it'll catch * any uses of REJECT which flex missed. */ @@ -431,11 +523,8 @@ static char *yy_last_accepting_cpos; #define YYLMAX 8192 #endif -char yytext[YYLMAX]; +char sstext[YYLMAX]; char *yytext_ptr; -#line 1 "icalsslexer.l" -#define INITIAL 0 -#line 2 "icalsslexer.l" /* -*- Mode: C -*- ====================================================================== FILE: icalsslexer.l @@ -473,11 +562,11 @@ char *yytext_ptr; const char* input_buffer; const char* input_buffer_p; -#define min(a,b) ((a) < (b) ? (a) : (b)) +#define minInt(a,b) ((a) < (b) ? (a) : (b)) int icalss_input(char* buf, int max_size) { - int n = min(max_size,strlen(input_buffer_p)); + int n = minInt(max_size,strlen(input_buffer_p)); if (n > 0){ memcpy(buf, input_buffer_p, n); @@ -494,10 +583,54 @@ int icalss_input(char* buf, int max_size) #undef SS_FATAL_ERROR #define SS_FATAL_ERROR(msg) sserror(msg) + + +#define INITIAL 0 #define sql 1 #define string_value 2 -#line 497 "icalsslexer.c" +#ifndef YY_NO_UNISTD_H +/* Special case for "unistd.h", since it is non-ANSI. We include it way + * down here because we want the user's section 1 to have been scanned first. + * The user has a chance to override it with an option. + */ +#include <unistd.h> +#endif + +#ifndef YY_EXTRA_TYPE +#define YY_EXTRA_TYPE void * +#endif + +static int yy_init_globals (void ); + +/* Accessor methods to globals. + These are made visible to non-reentrant scanners for convenience. */ + +int sslex_destroy (void ); + +int ssget_debug (void ); + +void ssset_debug (int debug_flag ); + +YY_EXTRA_TYPE ssget_extra (void ); + +void ssset_extra (YY_EXTRA_TYPE user_defined ); + +FILE *ssget_in (void ); + +void ssset_in (FILE * in_str ); + +FILE *ssget_out (void ); + +void ssset_out (FILE * out_str ); + +int ssget_leng (void ); + +char *ssget_text (void ); + +int ssget_lineno (void ); + +void ssset_lineno (int line_number ); /* Macros after this point can all be overridden by user definitions in * section 1. @@ -505,65 +638,30 @@ int icalss_input(char* buf, int max_size) #ifndef YY_SKIP_YYWRAP #ifdef __cplusplus -extern "C" int yywrap YY_PROTO(( void )); +extern "C" int sswrap (void ); #else -extern int yywrap YY_PROTO(( void )); +extern int sswrap (void ); #endif #endif -#ifndef YY_NO_UNPUT -static void yyunput YY_PROTO(( int c, char *buf_ptr )); -#endif - + static void yyunput (int c,char *buf_ptr ); + #ifndef yytext_ptr -static void yy_flex_strncpy YY_PROTO(( char *, yyconst char *, int )); +static void yy_flex_strncpy (char *,yyconst char *,int ); #endif #ifdef YY_NEED_STRLEN -static int yy_flex_strlen YY_PROTO(( yyconst char * )); +static int yy_flex_strlen (yyconst char * ); #endif #ifndef YY_NO_INPUT -#ifdef __cplusplus -static int yyinput YY_PROTO(( void )); -#else -static int input YY_PROTO(( void )); -#endif -#endif - -#if YY_STACK_USED -static int yy_start_stack_ptr = 0; -static int yy_start_stack_depth = 0; -static int *yy_start_stack = 0; -#ifndef YY_NO_PUSH_STATE -static void yy_push_state YY_PROTO(( int new_state )); -#endif -#ifndef YY_NO_POP_STATE -static void yy_pop_state YY_PROTO(( void )); -#endif -#ifndef YY_NO_TOP_STATE -static int yy_top_state YY_PROTO(( void )); -#endif +#ifdef __cplusplus +static int yyinput (void ); #else -#define YY_NO_PUSH_STATE 1 -#define YY_NO_POP_STATE 1 -#define YY_NO_TOP_STATE 1 +static int input (void ); #endif -#ifdef YY_MALLOC_DECL -YY_MALLOC_DECL -#else -#if __STDC__ -#ifndef __cplusplus -#include <stdlib.h> -#endif -#else -/* Just try to get by without declaring the routines. This will fail - * miserably on non-ANSI systems for which sizeof(size_t) != sizeof(int) - * or sizeof(void*) != sizeof(int). - */ -#endif #endif /* Amount of stuff to slurp up with each read. */ @@ -572,12 +670,11 @@ YY_MALLOC_DECL #endif /* Copy whatever the last rule matched to the standard output. */ - #ifndef ECHO /* This used to be an fputs(), but since the string might contain NUL's, * we now use fwrite(). */ -#define ECHO (void) fwrite( yytext, yyleng, 1, yyout ) +#define ECHO do { if (fwrite( sstext, ssleng, 1, ssout )) {} } while (0) #endif /* Gets input and stuffs it into "buf". number of characters read, or YY_NULL, @@ -585,21 +682,35 @@ YY_MALLOC_DECL */ #ifndef YY_INPUT #define YY_INPUT(buf,result,max_size) \ - if ( yy_current_buffer->yy_is_interactive ) \ + if ( YY_CURRENT_BUFFER_LVALUE->yy_is_interactive ) \ { \ - int c = '*', n; \ + int c = '*'; \ + size_t n; \ for ( n = 0; n < max_size && \ - (c = getc( yyin )) != EOF && c != '\n'; ++n ) \ + (c = getc( ssin )) != EOF && c != '\n'; ++n ) \ buf[n] = (char) c; \ if ( c == '\n' ) \ buf[n++] = (char) c; \ - if ( c == EOF && ferror( yyin ) ) \ + if ( c == EOF && ferror( ssin ) ) \ YY_FATAL_ERROR( "input in flex scanner failed" ); \ result = n; \ } \ - else if ( ((result = fread( buf, 1, max_size, yyin )) == 0) \ - && ferror( yyin ) ) \ - YY_FATAL_ERROR( "input in flex scanner failed" ); + else \ + { \ + errno=0; \ + while ( (result = fread(buf, 1, max_size, ssin))==0 && ferror(ssin)) \ + { \ + if( errno != EINTR) \ + { \ + YY_FATAL_ERROR( "input in flex scanner failed" ); \ + break; \ + } \ + errno=0; \ + clearerr(ssin); \ + } \ + }\ +\ + #endif /* No semi-colon after return; correct usage is to write "yyterminate();" - @@ -620,14 +731,20 @@ YY_MALLOC_DECL #define YY_FATAL_ERROR(msg) yy_fatal_error( msg ) #endif +/* end tables serialization structures and prototypes */ + /* Default declaration of generated scanner - a define so the user can * easily add parameters. */ #ifndef YY_DECL -#define YY_DECL int yylex YY_PROTO(( void )) -#endif +#define YY_DECL_IS_OURS 1 -/* Code executed at the beginning of each rule, after yytext and yyleng +extern int sslex (void); + +#define YY_DECL int sslex (void) +#endif /* !YY_DECL */ + +/* Code executed at the beginning of each rule, after sstext and ssleng * have been set up. */ #ifndef YY_USER_ACTION @@ -642,66 +759,68 @@ YY_MALLOC_DECL #define YY_RULE_SETUP \ YY_USER_ACTION +/** The main scanner function which does all the work. + */ YY_DECL - { +{ register yy_state_type yy_current_state; - register char *yy_cp = NULL, *yy_bp = NULL; + register char *yy_cp, *yy_bp; register int yy_act; - -#line 83 "icalsslexer.l" + -#line 655 "icalsslexer.c" - if ( yy_init ) + if ( !(yy_init) ) { - yy_init = 0; + (yy_init) = 1; #ifdef YY_USER_INIT YY_USER_INIT; #endif - if ( ! yy_start ) - yy_start = 1; /* first start state */ + if ( ! (yy_start) ) + (yy_start) = 1; /* first start state */ - if ( ! yyin ) - yyin = stdin; + if ( ! ssin ) + ssin = stdin; - if ( ! yyout ) - yyout = stdout; + if ( ! ssout ) + ssout = stdout; - if ( ! yy_current_buffer ) - yy_current_buffer = - yy_create_buffer( yyin, YY_BUF_SIZE ); + if ( ! YY_CURRENT_BUFFER ) { + ssensure_buffer_stack (); + YY_CURRENT_BUFFER_LVALUE = + ss_create_buffer(ssin,YY_BUF_SIZE ); + } - yy_load_buffer_state(); + ss_load_buffer_state( ); } while ( 1 ) /* loops until end-of-file is reached */ { - yy_cp = yy_c_buf_p; + yy_cp = (yy_c_buf_p); - /* Support of yytext. */ - *yy_cp = yy_hold_char; + /* Support of sstext. */ + *yy_cp = (yy_hold_char); /* yy_bp points to the position in yy_ch_buf of the start of * the current run. */ yy_bp = yy_cp; - yy_current_state = yy_start; + yy_current_state = (yy_start); yy_match: do { register YY_CHAR yy_c = yy_ec[YY_SC_TO_UI(*yy_cp)]; if ( yy_accept[yy_current_state] ) { - yy_last_accepting_state = yy_current_state; - yy_last_accepting_cpos = yy_cp; + (yy_last_accepting_state) = yy_current_state; + (yy_last_accepting_cpos) = yy_cp; } while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state ) { @@ -712,135 +831,116 @@ yy_match: yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c]; ++yy_cp; } - while ( yy_base[yy_current_state] != 69 ); + while ( yy_base[yy_current_state] != 107 ); yy_find_action: yy_act = yy_accept[yy_current_state]; if ( yy_act == 0 ) { /* have to back up */ - yy_cp = yy_last_accepting_cpos; - yy_current_state = yy_last_accepting_state; + yy_cp = (yy_last_accepting_cpos); + yy_current_state = (yy_last_accepting_state); yy_act = yy_accept[yy_current_state]; } YY_DO_BEFORE_ACTION; - do_action: /* This label is used only to access EOF actions. */ - switch ( yy_act ) { /* beginning of action switch */ case 0: /* must back up */ /* undo the effects of YY_DO_BEFORE_ACTION */ - *yy_cp = yy_hold_char; - yy_cp = yy_last_accepting_cpos; - yy_current_state = yy_last_accepting_state; + *yy_cp = (yy_hold_char); + yy_cp = (yy_last_accepting_cpos); + yy_current_state = (yy_last_accepting_state); goto yy_find_action; case 1: YY_RULE_SETUP -#line 89 "icalsslexer.l" { return SELECT; } YY_BREAK case 2: YY_RULE_SETUP -#line 90 "icalsslexer.l" { return FROM; } YY_BREAK case 3: YY_RULE_SETUP -#line 91 "icalsslexer.l" { return WHERE; } YY_BREAK case 4: YY_RULE_SETUP -#line 92 "icalsslexer.l" { return COMMA; } YY_BREAK case 5: YY_RULE_SETUP -#line 93 "icalsslexer.l" { return EQUALS; } YY_BREAK case 6: YY_RULE_SETUP -#line 94 "icalsslexer.l" { return EQUALS; } YY_BREAK case 7: YY_RULE_SETUP -#line 95 "icalsslexer.l" { return NOTEQUALS; } YY_BREAK case 8: YY_RULE_SETUP -#line 96 "icalsslexer.l" { return LESS; } YY_BREAK case 9: YY_RULE_SETUP -#line 97 "icalsslexer.l" { return GREATER; } YY_BREAK case 10: YY_RULE_SETUP -#line 98 "icalsslexer.l" { return LESSEQUALS; } YY_BREAK case 11: YY_RULE_SETUP -#line 99 "icalsslexer.l" { return GREATEREQUALS; } YY_BREAK case 12: YY_RULE_SETUP -#line 100 "icalsslexer.l" { return AND; } YY_BREAK case 13: YY_RULE_SETUP -#line 101 "icalsslexer.l" { return OR; } YY_BREAK case 14: YY_RULE_SETUP -#line 102 "icalsslexer.l" { return IS; } YY_BREAK case 15: YY_RULE_SETUP -#line 103 "icalsslexer.l" { return NOT; } YY_BREAK case 16: YY_RULE_SETUP -#line 104 "icalsslexer.l" { return SQLNULL; } YY_BREAK case 17: YY_RULE_SETUP -#line 105 "icalsslexer.l" { return QUOTE; } YY_BREAK case 18: +/* rule 18 can match eol */ YY_RULE_SETUP -#line 106 "icalsslexer.l" ; YY_BREAK case 19: YY_RULE_SETUP -#line 107 "icalsslexer.l" { return EOL; } YY_BREAK case 20: YY_RULE_SETUP -#line 109 "icalsslexer.l" { int c = input(); - unput(c); + if(c != EOF){ + unput(c); + } if(c!='\''){ - sslval.v_string= icalmemory_tmp_copy(yytext); + sslval.v_string= icalmemory_tmp_copy(sstext); return STRING; } else { /*ssmore();*/ @@ -849,23 +949,19 @@ YY_RULE_SETUP YY_BREAK case 21: YY_RULE_SETUP -#line 120 "icalsslexer.l" { - sslval.v_string= icalmemory_tmp_copy(yytext); + sslval.v_string= icalmemory_tmp_copy(sstext); return STRING; } YY_BREAK case 22: YY_RULE_SETUP -#line 126 "icalsslexer.l" -{ return yytext[0]; } +{ return sstext[0]; } YY_BREAK case 23: YY_RULE_SETUP -#line 128 "icalsslexer.l" ECHO; YY_BREAK -#line 865 "icalsslexer.c" case YY_STATE_EOF(INITIAL): case YY_STATE_EOF(sql): case YY_STATE_EOF(string_value): @@ -874,26 +970,26 @@ case YY_STATE_EOF(string_value): case YY_END_OF_BUFFER: { /* Amount of text matched not including the EOB char. */ - int yy_amount_of_matched_text = (int) (yy_cp - yytext_ptr) - 1; + int yy_amount_of_matched_text = (int) (yy_cp - (yytext_ptr)) - 1; /* Undo the effects of YY_DO_BEFORE_ACTION. */ - *yy_cp = yy_hold_char; + *yy_cp = (yy_hold_char); YY_RESTORE_YY_MORE_OFFSET - if ( yy_current_buffer->yy_buffer_status == YY_BUFFER_NEW ) + if ( YY_CURRENT_BUFFER_LVALUE->yy_buffer_status == YY_BUFFER_NEW ) { /* We're scanning a new file or input source. It's * possible that this happened because the user - * just pointed yyin at a new source and called - * yylex(). If so, then we have to assure - * consistency between yy_current_buffer and our + * just pointed ssin at a new source and called + * sslex(). If so, then we have to assure + * consistency between YY_CURRENT_BUFFER and our * globals. Here is the right place to do so, because * this is the first action (other than possibly a * back-up) that will match for the new input source. */ - yy_n_chars = yy_current_buffer->yy_n_chars; - yy_current_buffer->yy_input_file = yyin; - yy_current_buffer->yy_buffer_status = YY_BUFFER_NORMAL; + (yy_n_chars) = YY_CURRENT_BUFFER_LVALUE->yy_n_chars; + YY_CURRENT_BUFFER_LVALUE->yy_input_file = ssin; + YY_CURRENT_BUFFER_LVALUE->yy_buffer_status = YY_BUFFER_NORMAL; } /* Note that here we test for yy_c_buf_p "<=" to the position @@ -903,13 +999,13 @@ case YY_STATE_EOF(string_value): * end-of-buffer state). Contrast this with the test * in input(). */ - if ( yy_c_buf_p <= &yy_current_buffer->yy_ch_buf[yy_n_chars] ) + if ( (yy_c_buf_p) <= &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars)] ) { /* This was really a NUL. */ yy_state_type yy_next_state; - yy_c_buf_p = yytext_ptr + yy_amount_of_matched_text; + (yy_c_buf_p) = (yytext_ptr) + yy_amount_of_matched_text; - yy_current_state = yy_get_previous_state(); + yy_current_state = yy_get_previous_state( ); /* Okay, we're now positioned to make the NUL * transition. We couldn't have @@ -922,41 +1018,41 @@ case YY_STATE_EOF(string_value): yy_next_state = yy_try_NUL_trans( yy_current_state ); - yy_bp = yytext_ptr + YY_MORE_ADJ; + yy_bp = (yytext_ptr) + YY_MORE_ADJ; if ( yy_next_state ) { /* Consume the NUL. */ - yy_cp = ++yy_c_buf_p; + yy_cp = ++(yy_c_buf_p); yy_current_state = yy_next_state; goto yy_match; } else { - yy_cp = yy_c_buf_p; + yy_cp = (yy_c_buf_p); goto yy_find_action; } } - else switch ( yy_get_next_buffer() ) + else switch ( yy_get_next_buffer( ) ) { case EOB_ACT_END_OF_FILE: { - yy_did_buffer_switch_on_eof = 0; + (yy_did_buffer_switch_on_eof) = 0; - if ( yywrap() ) + if ( sswrap( ) ) { /* Note: because we've taken care in * yy_get_next_buffer() to have set up - * yytext, we can now set up + * sstext, we can now set up * yy_c_buf_p so that if some total * hoser (like flex itself) wants to * call the scanner after we return the * YY_NULL, it'll still work - another * YY_NULL will get returned. */ - yy_c_buf_p = yytext_ptr + YY_MORE_ADJ; + (yy_c_buf_p) = (yytext_ptr) + YY_MORE_ADJ; yy_act = YY_STATE_EOF(YY_START); goto do_action; @@ -964,30 +1060,30 @@ case YY_STATE_EOF(string_value): else { - if ( ! yy_did_buffer_switch_on_eof ) + if ( ! (yy_did_buffer_switch_on_eof) ) YY_NEW_FILE; } break; } case EOB_ACT_CONTINUE_SCAN: - yy_c_buf_p = - yytext_ptr + yy_amount_of_matched_text; + (yy_c_buf_p) = + (yytext_ptr) + yy_amount_of_matched_text; - yy_current_state = yy_get_previous_state(); + yy_current_state = yy_get_previous_state( ); - yy_cp = yy_c_buf_p; - yy_bp = yytext_ptr + YY_MORE_ADJ; + yy_cp = (yy_c_buf_p); + yy_bp = (yytext_ptr) + YY_MORE_ADJ; goto yy_match; case EOB_ACT_LAST_MATCH: - yy_c_buf_p = - &yy_current_buffer->yy_ch_buf[yy_n_chars]; + (yy_c_buf_p) = + &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars)]; - yy_current_state = yy_get_previous_state(); + yy_current_state = yy_get_previous_state( ); - yy_cp = yy_c_buf_p; - yy_bp = yytext_ptr + YY_MORE_ADJ; + yy_cp = (yy_c_buf_p); + yy_bp = (yytext_ptr) + YY_MORE_ADJ; goto yy_find_action; } break; @@ -998,8 +1094,7 @@ case YY_STATE_EOF(string_value): "fatal flex scanner internal error--no action found" ); } /* end of action switch */ } /* end of scanning one token */ - } /* end of yylex */ - +} /* end of sslex */ /* yy_get_next_buffer - try to read in a new buffer * @@ -1008,21 +1103,20 @@ case YY_STATE_EOF(string_value): * EOB_ACT_CONTINUE_SCAN - continue scanning from current position * EOB_ACT_END_OF_FILE - end of file */ - -static int yy_get_next_buffer() - { - register char *dest = yy_current_buffer->yy_ch_buf; - register char *source = yytext_ptr; +static int yy_get_next_buffer (void) +{ + register char *dest = YY_CURRENT_BUFFER_LVALUE->yy_ch_buf; + register char *source = (yytext_ptr); register int number_to_move, i; int ret_val; - if ( yy_c_buf_p > &yy_current_buffer->yy_ch_buf[yy_n_chars + 1] ) + if ( (yy_c_buf_p) > &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars) + 1] ) YY_FATAL_ERROR( "fatal flex scanner internal error--end of buffer missed" ); - if ( yy_current_buffer->yy_fill_buffer == 0 ) + if ( YY_CURRENT_BUFFER_LVALUE->yy_fill_buffer == 0 ) { /* Don't try to fill the buffer, so this is an EOF. */ - if ( yy_c_buf_p - yytext_ptr - YY_MORE_ADJ == 1 ) + if ( (yy_c_buf_p) - (yytext_ptr) - YY_MORE_ADJ == 1 ) { /* We matched a single character, the EOB, so * treat this as a final EOF. @@ -1042,34 +1136,30 @@ static int yy_get_next_buffer() /* Try to read more data. */ /* First move last chars to start of buffer. */ - number_to_move = (int) (yy_c_buf_p - yytext_ptr) - 1; + number_to_move = (int) ((yy_c_buf_p) - (yytext_ptr)) - 1; for ( i = 0; i < number_to_move; ++i ) *(dest++) = *(source++); - if ( yy_current_buffer->yy_buffer_status == YY_BUFFER_EOF_PENDING ) + if ( YY_CURRENT_BUFFER_LVALUE->yy_buffer_status == YY_BUFFER_EOF_PENDING ) /* don't do the read, it's not guaranteed to return an EOF, * just force an EOF */ - yy_current_buffer->yy_n_chars = yy_n_chars = 0; + YY_CURRENT_BUFFER_LVALUE->yy_n_chars = (yy_n_chars) = 0; else { - int num_to_read = - yy_current_buffer->yy_buf_size - number_to_move - 1; + int num_to_read = + YY_CURRENT_BUFFER_LVALUE->yy_buf_size - number_to_move - 1; while ( num_to_read <= 0 ) { /* Not enough room in the buffer - grow it. */ -#ifdef YY_USES_REJECT - YY_FATAL_ERROR( -"input buffer overflow, can't enlarge buffer because scanner uses REJECT" ); -#else /* just a shorter name for the current buffer */ - YY_BUFFER_STATE b = yy_current_buffer; + YY_BUFFER_STATE b = YY_CURRENT_BUFFER; int yy_c_buf_p_offset = - (int) (yy_c_buf_p - b->yy_ch_buf); + (int) ((yy_c_buf_p) - b->yy_ch_buf); if ( b->yy_is_our_buffer ) { @@ -1082,8 +1172,7 @@ static int yy_get_next_buffer() b->yy_ch_buf = (char *) /* Include room in for 2 EOB chars. */ - yy_flex_realloc( (void *) b->yy_ch_buf, - b->yy_buf_size + 2 ); + ssrealloc((void *) b->yy_ch_buf,b->yy_buf_size + 2 ); } else /* Can't grow it, we don't own it. */ @@ -1093,35 +1182,35 @@ static int yy_get_next_buffer() YY_FATAL_ERROR( "fatal error - scanner input buffer overflow" ); - yy_c_buf_p = &b->yy_ch_buf[yy_c_buf_p_offset]; + (yy_c_buf_p) = &b->yy_ch_buf[yy_c_buf_p_offset]; - num_to_read = yy_current_buffer->yy_buf_size - + num_to_read = YY_CURRENT_BUFFER_LVALUE->yy_buf_size - number_to_move - 1; -#endif + } if ( num_to_read > YY_READ_BUF_SIZE ) num_to_read = YY_READ_BUF_SIZE; /* Read in more data. */ - YY_INPUT( (&yy_current_buffer->yy_ch_buf[number_to_move]), - yy_n_chars, num_to_read ); + YY_INPUT( (&YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[number_to_move]), + (yy_n_chars), (size_t) num_to_read ); - yy_current_buffer->yy_n_chars = yy_n_chars; + YY_CURRENT_BUFFER_LVALUE->yy_n_chars = (yy_n_chars); } - if ( yy_n_chars == 0 ) + if ( (yy_n_chars) == 0 ) { if ( number_to_move == YY_MORE_ADJ ) { ret_val = EOB_ACT_END_OF_FILE; - yyrestart( yyin ); + ssrestart(ssin ); } else { ret_val = EOB_ACT_LAST_MATCH; - yy_current_buffer->yy_buffer_status = + YY_CURRENT_BUFFER_LVALUE->yy_buffer_status = YY_BUFFER_EOF_PENDING; } } @@ -1129,32 +1218,39 @@ static int yy_get_next_buffer() else ret_val = EOB_ACT_CONTINUE_SCAN; - yy_n_chars += number_to_move; - yy_current_buffer->yy_ch_buf[yy_n_chars] = YY_END_OF_BUFFER_CHAR; - yy_current_buffer->yy_ch_buf[yy_n_chars + 1] = YY_END_OF_BUFFER_CHAR; + if ((yy_size_t) ((yy_n_chars) + number_to_move) > YY_CURRENT_BUFFER_LVALUE->yy_buf_size) { + /* Extend the array by 50%, plus the number we really need. */ + yy_size_t new_size = (yy_n_chars) + number_to_move + ((yy_n_chars) >> 1); + YY_CURRENT_BUFFER_LVALUE->yy_ch_buf = (char *) ssrealloc((void *) YY_CURRENT_BUFFER_LVALUE->yy_ch_buf,new_size ); + if ( ! YY_CURRENT_BUFFER_LVALUE->yy_ch_buf ) + YY_FATAL_ERROR( "out of dynamic memory in yy_get_next_buffer()" ); + } - yytext_ptr = &yy_current_buffer->yy_ch_buf[0]; + (yy_n_chars) += number_to_move; + YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars)] = YY_END_OF_BUFFER_CHAR; + YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars) + 1] = YY_END_OF_BUFFER_CHAR; - return ret_val; - } + (yytext_ptr) = &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[0]; + return ret_val; +} /* yy_get_previous_state - get the state just before the EOB char was reached */ -static yy_state_type yy_get_previous_state() - { + static yy_state_type yy_get_previous_state (void) +{ register yy_state_type yy_current_state; register char *yy_cp; + + yy_current_state = (yy_start); - yy_current_state = yy_start; - - for ( yy_cp = yytext_ptr + YY_MORE_ADJ; yy_cp < yy_c_buf_p; ++yy_cp ) + for ( yy_cp = (yytext_ptr) + YY_MORE_ADJ; yy_cp < (yy_c_buf_p); ++yy_cp ) { register YY_CHAR yy_c = (*yy_cp ? yy_ec[YY_SC_TO_UI(*yy_cp)] : 1); if ( yy_accept[yy_current_state] ) { - yy_last_accepting_state = yy_current_state; - yy_last_accepting_cpos = yy_cp; + (yy_last_accepting_state) = yy_current_state; + (yy_last_accepting_cpos) = yy_cp; } while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state ) { @@ -1166,30 +1262,23 @@ static yy_state_type yy_get_previous_state() } return yy_current_state; - } - +} /* yy_try_NUL_trans - try to make a transition on the NUL character * * synopsis * next_state = yy_try_NUL_trans( current_state ); */ - -#ifdef YY_USE_PROTOS -static yy_state_type yy_try_NUL_trans( yy_state_type yy_current_state ) -#else -static yy_state_type yy_try_NUL_trans( yy_current_state ) -yy_state_type yy_current_state; -#endif - { + static yy_state_type yy_try_NUL_trans (yy_state_type yy_current_state ) +{ register int yy_is_jam; - register char *yy_cp = yy_c_buf_p; + register char *yy_cp = (yy_c_buf_p); register YY_CHAR yy_c = 1; if ( yy_accept[yy_current_state] ) { - yy_last_accepting_state = yy_current_state; - yy_last_accepting_cpos = yy_cp; + (yy_last_accepting_state) = yy_current_state; + (yy_last_accepting_cpos) = yy_cp; } while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state ) { @@ -1201,81 +1290,73 @@ yy_state_type yy_current_state; yy_is_jam = (yy_current_state == 55); return yy_is_jam ? 0 : yy_current_state; - } - +} -#ifndef YY_NO_UNPUT -#ifdef YY_USE_PROTOS -static void yyunput( int c, register char *yy_bp ) -#else -static void yyunput( c, yy_bp ) -int c; -register char *yy_bp; -#endif - { - register char *yy_cp = yy_c_buf_p; + static void yyunput (int c, register char * yy_bp ) +{ + register char *yy_cp; + + yy_cp = (yy_c_buf_p); - /* undo effects of setting up yytext */ - *yy_cp = yy_hold_char; + /* undo effects of setting up sstext */ + *yy_cp = (yy_hold_char); - if ( yy_cp < yy_current_buffer->yy_ch_buf + 2 ) + if ( yy_cp < YY_CURRENT_BUFFER_LVALUE->yy_ch_buf + 2 ) { /* need to shift things up to make room */ /* +2 for EOB chars. */ - register int number_to_move = yy_n_chars + 2; - register char *dest = &yy_current_buffer->yy_ch_buf[ - yy_current_buffer->yy_buf_size + 2]; + register int number_to_move = (yy_n_chars) + 2; + register char *dest = &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[ + YY_CURRENT_BUFFER_LVALUE->yy_buf_size + 2]; register char *source = - &yy_current_buffer->yy_ch_buf[number_to_move]; + &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[number_to_move]; - while ( source > yy_current_buffer->yy_ch_buf ) + while ( source > YY_CURRENT_BUFFER_LVALUE->yy_ch_buf ) *--dest = *--source; yy_cp += (int) (dest - source); yy_bp += (int) (dest - source); - yy_current_buffer->yy_n_chars = - yy_n_chars = yy_current_buffer->yy_buf_size; + YY_CURRENT_BUFFER_LVALUE->yy_n_chars = + (yy_n_chars) = YY_CURRENT_BUFFER_LVALUE->yy_buf_size; - if ( yy_cp < yy_current_buffer->yy_ch_buf + 2 ) + if ( yy_cp < YY_CURRENT_BUFFER_LVALUE->yy_ch_buf + 2 ) YY_FATAL_ERROR( "flex scanner push-back overflow" ); } *--yy_cp = (char) c; - - yytext_ptr = yy_bp; - yy_hold_char = *yy_cp; - yy_c_buf_p = yy_cp; - } -#endif /* ifndef YY_NO_UNPUT */ - + (yytext_ptr) = yy_bp; + (yy_hold_char) = *yy_cp; + (yy_c_buf_p) = yy_cp; +} #ifndef YY_NO_INPUT #ifdef __cplusplus -static int yyinput() + static int yyinput (void) #else -static int input() + static int input (void) #endif - { - int c; - *yy_c_buf_p = yy_hold_char; +{ + int c; + + *(yy_c_buf_p) = (yy_hold_char); - if ( *yy_c_buf_p == YY_END_OF_BUFFER_CHAR ) + if ( *(yy_c_buf_p) == YY_END_OF_BUFFER_CHAR ) { /* yy_c_buf_p now points to the character we want to return. * If this occurs *before* the EOB characters, then it's a * valid NUL; if not, then we've hit the end of the buffer. */ - if ( yy_c_buf_p < &yy_current_buffer->yy_ch_buf[yy_n_chars] ) + if ( (yy_c_buf_p) < &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars)] ) /* This was really a NUL. */ - *yy_c_buf_p = '\0'; + *(yy_c_buf_p) = '\0'; else { /* need more input */ - int offset = yy_c_buf_p - yytext_ptr; - ++yy_c_buf_p; + int offset = (yy_c_buf_p) - (yytext_ptr); + ++(yy_c_buf_p); - switch ( yy_get_next_buffer() ) + switch ( yy_get_next_buffer( ) ) { case EOB_ACT_LAST_MATCH: /* This happens because yy_g_n_b() @@ -1289,16 +1370,16 @@ static int input() */ /* Reset buffer status. */ - yyrestart( yyin ); + ssrestart(ssin ); - /* fall through */ + /*FALLTHROUGH*/ case EOB_ACT_END_OF_FILE: { - if ( yywrap() ) + if ( sswrap( ) ) return EOF; - if ( ! yy_did_buffer_switch_on_eof ) + if ( ! (yy_did_buffer_switch_on_eof) ) YY_NEW_FILE; #ifdef __cplusplus return yyinput(); @@ -1308,167 +1389,169 @@ static int input() } case EOB_ACT_CONTINUE_SCAN: - yy_c_buf_p = yytext_ptr + offset; + (yy_c_buf_p) = (yytext_ptr) + offset; break; } } } - c = *(unsigned char *) yy_c_buf_p; /* cast for 8-bit char's */ - *yy_c_buf_p = '\0'; /* preserve yytext */ - yy_hold_char = *++yy_c_buf_p; - + c = *(unsigned char *) (yy_c_buf_p); /* cast for 8-bit char's */ + *(yy_c_buf_p) = '\0'; /* preserve sstext */ + (yy_hold_char) = *++(yy_c_buf_p); return c; - } -#endif /* YY_NO_INPUT */ - -#ifdef YY_USE_PROTOS -void yyrestart( FILE *input_file ) -#else -void yyrestart( input_file ) -FILE *input_file; -#endif - { - if ( ! yy_current_buffer ) - yy_current_buffer = yy_create_buffer( yyin, YY_BUF_SIZE ); +} +#endif /* ifndef YY_NO_INPUT */ - yy_init_buffer( yy_current_buffer, input_file ); - yy_load_buffer_state(); +/** Immediately switch to a different input stream. + * @param input_file A readable stream. + * + * @note This function does not reset the start condition to @c INITIAL . + */ + void ssrestart (FILE * input_file ) +{ + + if ( ! YY_CURRENT_BUFFER ){ + ssensure_buffer_stack (); + YY_CURRENT_BUFFER_LVALUE = + ss_create_buffer(ssin,YY_BUF_SIZE ); } + ss_init_buffer(YY_CURRENT_BUFFER,input_file ); + ss_load_buffer_state( ); +} -#ifdef YY_USE_PROTOS -void yy_switch_to_buffer( YY_BUFFER_STATE new_buffer ) -#else -void yy_switch_to_buffer( new_buffer ) -YY_BUFFER_STATE new_buffer; -#endif - { - if ( yy_current_buffer == new_buffer ) +/** Switch to a different input buffer. + * @param new_buffer The new input buffer. + * + */ + void ss_switch_to_buffer (YY_BUFFER_STATE new_buffer ) +{ + + /* TODO. We should be able to replace this entire function body + * with + * sspop_buffer_state(); + * sspush_buffer_state(new_buffer); + */ + ssensure_buffer_stack (); + if ( YY_CURRENT_BUFFER == new_buffer ) return; - if ( yy_current_buffer ) + if ( YY_CURRENT_BUFFER ) { /* Flush out information for old buffer. */ - *yy_c_buf_p = yy_hold_char; - yy_current_buffer->yy_buf_pos = yy_c_buf_p; - yy_current_buffer->yy_n_chars = yy_n_chars; + *(yy_c_buf_p) = (yy_hold_char); + YY_CURRENT_BUFFER_LVALUE->yy_buf_pos = (yy_c_buf_p); + YY_CURRENT_BUFFER_LVALUE->yy_n_chars = (yy_n_chars); } - yy_current_buffer = new_buffer; - yy_load_buffer_state(); + YY_CURRENT_BUFFER_LVALUE = new_buffer; + ss_load_buffer_state( ); /* We don't actually know whether we did this switch during - * EOF (yywrap()) processing, but the only time this flag - * is looked at is after yywrap() is called, so it's safe + * EOF (sswrap()) processing, but the only time this flag + * is looked at is after sswrap() is called, so it's safe * to go ahead and always set it. */ - yy_did_buffer_switch_on_eof = 1; - } - - -#ifdef YY_USE_PROTOS -void yy_load_buffer_state( void ) -#else -void yy_load_buffer_state() -#endif - { - yy_n_chars = yy_current_buffer->yy_n_chars; - yytext_ptr = yy_c_buf_p = yy_current_buffer->yy_buf_pos; - yyin = yy_current_buffer->yy_input_file; - yy_hold_char = *yy_c_buf_p; - } + (yy_did_buffer_switch_on_eof) = 1; +} +static void ss_load_buffer_state (void) +{ + (yy_n_chars) = YY_CURRENT_BUFFER_LVALUE->yy_n_chars; + (yytext_ptr) = (yy_c_buf_p) = YY_CURRENT_BUFFER_LVALUE->yy_buf_pos; + ssin = YY_CURRENT_BUFFER_LVALUE->yy_input_file; + (yy_hold_char) = *(yy_c_buf_p); +} -#ifdef YY_USE_PROTOS -YY_BUFFER_STATE yy_create_buffer( FILE *file, int size ) -#else -YY_BUFFER_STATE yy_create_buffer( file, size ) -FILE *file; -int size; -#endif - { +/** Allocate and initialize an input buffer state. + * @param file A readable stream. + * @param size The character buffer size in bytes. When in doubt, use @c YY_BUF_SIZE. + * + * @return the allocated buffer state. + */ + YY_BUFFER_STATE ss_create_buffer (FILE * file, int size ) +{ YY_BUFFER_STATE b; - - b = (YY_BUFFER_STATE) yy_flex_alloc( sizeof( struct yy_buffer_state ) ); + + b = (YY_BUFFER_STATE) ssalloc(sizeof( struct yy_buffer_state ) ); if ( ! b ) - YY_FATAL_ERROR( "out of dynamic memory in yy_create_buffer()" ); + YY_FATAL_ERROR( "out of dynamic memory in ss_create_buffer()" ); b->yy_buf_size = size; /* yy_ch_buf has to be 2 characters longer than the size given because * we need to put in 2 end-of-buffer characters. */ - b->yy_ch_buf = (char *) yy_flex_alloc( b->yy_buf_size + 2 ); + b->yy_ch_buf = (char *) ssalloc(b->yy_buf_size + 2 ); if ( ! b->yy_ch_buf ) - YY_FATAL_ERROR( "out of dynamic memory in yy_create_buffer()" ); + YY_FATAL_ERROR( "out of dynamic memory in ss_create_buffer()" ); b->yy_is_our_buffer = 1; - yy_init_buffer( b, file ); + ss_init_buffer(b,file ); return b; - } - +} -#ifdef YY_USE_PROTOS -void yy_delete_buffer( YY_BUFFER_STATE b ) -#else -void yy_delete_buffer( b ) -YY_BUFFER_STATE b; -#endif - { +/** Destroy the buffer. + * @param b a buffer created with ss_create_buffer() + * + */ + void ss_delete_buffer (YY_BUFFER_STATE b ) +{ + if ( ! b ) return; - if ( b == yy_current_buffer ) - yy_current_buffer = (YY_BUFFER_STATE) 0; + if ( b == YY_CURRENT_BUFFER ) /* Not sure if we should pop here. */ + YY_CURRENT_BUFFER_LVALUE = (YY_BUFFER_STATE) 0; if ( b->yy_is_our_buffer ) - yy_flex_free( (void *) b->yy_ch_buf ); - - yy_flex_free( (void *) b ); - } - + ssfree((void *) b->yy_ch_buf ); + ssfree((void *) b ); +} -#ifdef YY_USE_PROTOS -void yy_init_buffer( YY_BUFFER_STATE b, FILE *file ) -#else -void yy_init_buffer( b, file ) -YY_BUFFER_STATE b; -FILE *file; -#endif - +#ifndef __cplusplus +extern int isatty (int ); +#endif /* __cplusplus */ + +/* Initializes or reinitializes a buffer. + * This function is sometimes called more than once on the same buffer, + * such as during a ssrestart() or at EOF. + */ + static void ss_init_buffer (YY_BUFFER_STATE b, FILE * file ) - { - yy_flush_buffer( b ); +{ + int oerrno = errno; + + ss_flush_buffer(b ); b->yy_input_file = file; b->yy_fill_buffer = 1; -#if YY_ALWAYS_INTERACTIVE - b->yy_is_interactive = 1; -#else -#if YY_NEVER_INTERACTIVE - b->yy_is_interactive = 0; -#else - b->yy_is_interactive = file ? (isatty( fileno(file) ) > 0) : 0; -#endif -#endif - } - + /* If b is the current buffer, then ss_init_buffer was _probably_ + * called from ssrestart() or through yy_get_next_buffer. + * In that case, we don't want to reset the lineno or column. + */ + if (b != YY_CURRENT_BUFFER){ + b->yy_bs_lineno = 1; + b->yy_bs_column = 0; + } -#ifdef YY_USE_PROTOS -void yy_flush_buffer( YY_BUFFER_STATE b ) -#else -void yy_flush_buffer( b ) -YY_BUFFER_STATE b; -#endif + b->yy_is_interactive = file ? (isatty( fileno(file) ) > 0) : 0; + + errno = oerrno; +} - { - if ( ! b ) +/** Discard all buffered characters. On the next scan, YY_INPUT will be called. + * @param b the buffer state to be flushed, usually @c YY_CURRENT_BUFFER. + * + */ + void ss_flush_buffer (YY_BUFFER_STATE b ) +{ + if ( ! b ) return; b->yy_n_chars = 0; @@ -1485,31 +1568,127 @@ YY_BUFFER_STATE b; b->yy_at_bol = 1; b->yy_buffer_status = YY_BUFFER_NEW; - if ( b == yy_current_buffer ) - yy_load_buffer_state(); + if ( b == YY_CURRENT_BUFFER ) + ss_load_buffer_state( ); +} + +/** Pushes the new state onto the stack. The new state becomes + * the current state. This function will allocate the stack + * if necessary. + * @param new_buffer The new state. + * + */ +void sspush_buffer_state (YY_BUFFER_STATE new_buffer ) +{ + if (new_buffer == NULL) + return; + + ssensure_buffer_stack(); + + /* This block is copied from ss_switch_to_buffer. */ + if ( YY_CURRENT_BUFFER ) + { + /* Flush out information for old buffer. */ + *(yy_c_buf_p) = (yy_hold_char); + YY_CURRENT_BUFFER_LVALUE->yy_buf_pos = (yy_c_buf_p); + YY_CURRENT_BUFFER_LVALUE->yy_n_chars = (yy_n_chars); + } + + /* Only push if top exists. Otherwise, replace top. */ + if (YY_CURRENT_BUFFER) + (yy_buffer_stack_top)++; + YY_CURRENT_BUFFER_LVALUE = new_buffer; + + /* copied from ss_switch_to_buffer. */ + ss_load_buffer_state( ); + (yy_did_buffer_switch_on_eof) = 1; +} + +/** Removes and deletes the top of the stack, if present. + * The next element becomes the new top. + * + */ +void sspop_buffer_state (void) +{ + if (!YY_CURRENT_BUFFER) + return; + + ss_delete_buffer(YY_CURRENT_BUFFER ); + YY_CURRENT_BUFFER_LVALUE = NULL; + if ((yy_buffer_stack_top) > 0) + --(yy_buffer_stack_top); + + if (YY_CURRENT_BUFFER) { + ss_load_buffer_state( ); + (yy_did_buffer_switch_on_eof) = 1; } +} +/* Allocates the stack if it does not exist. + * Guarantees space for at least one push. + */ +static void ssensure_buffer_stack (void) +{ + int num_to_alloc; + + if (!(yy_buffer_stack)) { + + /* First allocation is just for 2 elements, since we don't know if this + * scanner will even need a stack. We use 2 instead of 1 to avoid an + * immediate realloc on the next call. + */ + num_to_alloc = 1; + (yy_buffer_stack) = (struct yy_buffer_state**)ssalloc + (num_to_alloc * sizeof(struct yy_buffer_state*) + ); + if ( ! (yy_buffer_stack) ) + YY_FATAL_ERROR( "out of dynamic memory in ssensure_buffer_stack()" ); + + memset((yy_buffer_stack), 0, num_to_alloc * sizeof(struct yy_buffer_state*)); + + (yy_buffer_stack_max) = num_to_alloc; + (yy_buffer_stack_top) = 0; + return; + } -#ifndef YY_NO_SCAN_BUFFER -#ifdef YY_USE_PROTOS -YY_BUFFER_STATE yy_scan_buffer( char *base, yy_size_t size ) -#else -YY_BUFFER_STATE yy_scan_buffer( base, size ) -char *base; -yy_size_t size; -#endif - { - YY_BUFFER_STATE b; + if ((yy_buffer_stack_top) >= ((yy_buffer_stack_max)) - 1){ + + /* Increase the buffer to prepare for a possible push. */ + int grow_size = 8 /* arbitrary grow size */; + num_to_alloc = (yy_buffer_stack_max) + grow_size; + (yy_buffer_stack) = (struct yy_buffer_state**)ssrealloc + ((yy_buffer_stack), + num_to_alloc * sizeof(struct yy_buffer_state*) + ); + if ( ! (yy_buffer_stack) ) + YY_FATAL_ERROR( "out of dynamic memory in ssensure_buffer_stack()" ); + + /* zero only the new slots.*/ + memset((yy_buffer_stack) + (yy_buffer_stack_max), 0, grow_size * sizeof(struct yy_buffer_state*)); + (yy_buffer_stack_max) = num_to_alloc; + } +} + +/** Setup the input buffer state to scan directly from a user-specified character buffer. + * @param base the character buffer + * @param size the size in bytes of the character buffer + * + * @return the newly allocated buffer state object. + */ +YY_BUFFER_STATE ss_scan_buffer (char * base, yy_size_t size ) +{ + YY_BUFFER_STATE b; + if ( size < 2 || base[size-2] != YY_END_OF_BUFFER_CHAR || base[size-1] != YY_END_OF_BUFFER_CHAR ) /* They forgot to leave room for the EOB's. */ return 0; - b = (YY_BUFFER_STATE) yy_flex_alloc( sizeof( struct yy_buffer_state ) ); + b = (YY_BUFFER_STATE) ssalloc(sizeof( struct yy_buffer_state ) ); if ( ! b ) - YY_FATAL_ERROR( "out of dynamic memory in yy_scan_buffer()" ); + YY_FATAL_ERROR( "out of dynamic memory in ss_scan_buffer()" ); b->yy_buf_size = size - 2; /* "- 2" to take care of EOB's */ b->yy_buf_pos = b->yy_ch_buf = base; @@ -1521,58 +1700,53 @@ yy_size_t size; b->yy_fill_buffer = 0; b->yy_buffer_status = YY_BUFFER_NEW; - yy_switch_to_buffer( b ); + ss_switch_to_buffer(b ); return b; - } -#endif - - -#ifndef YY_NO_SCAN_STRING -#ifdef YY_USE_PROTOS -YY_BUFFER_STATE yy_scan_string( yyconst char *yy_str ) -#else -YY_BUFFER_STATE yy_scan_string( yy_str ) -yyconst char *yy_str; -#endif - { - int len; - for ( len = 0; yy_str[len]; ++len ) - ; - - return yy_scan_bytes( yy_str, len ); - } -#endif +} +/** Setup the input buffer state to scan a string. The next call to sslex() will + * scan from a @e copy of @a str. + * @param yystr a NUL-terminated string to scan + * + * @return the newly allocated buffer state object. + * @note If you want to scan bytes that may contain NUL values, then use + * ss_scan_bytes() instead. + */ +YY_BUFFER_STATE ss_scan_string (yyconst char * yystr ) +{ + + return ss_scan_bytes(yystr,strlen(yystr) ); +} -#ifndef YY_NO_SCAN_BYTES -#ifdef YY_USE_PROTOS -YY_BUFFER_STATE yy_scan_bytes( yyconst char *bytes, int len ) -#else -YY_BUFFER_STATE yy_scan_bytes( bytes, len ) -yyconst char *bytes; -int len; -#endif - { +/** Setup the input buffer state to scan the given bytes. The next call to sslex() will + * scan from a @e copy of @a bytes. + * @param bytes the byte buffer to scan + * @param len the number of bytes in the buffer pointed to by @a bytes. + * + * @return the newly allocated buffer state object. + */ +YY_BUFFER_STATE ss_scan_bytes (yyconst char * yybytes, int _yybytes_len ) +{ YY_BUFFER_STATE b; char *buf; yy_size_t n; int i; - + /* Get memory for full buffer, including space for trailing EOB's. */ - n = len + 2; - buf = (char *) yy_flex_alloc( n ); + n = _yybytes_len + 2; + buf = (char *) ssalloc(n ); if ( ! buf ) - YY_FATAL_ERROR( "out of dynamic memory in yy_scan_bytes()" ); + YY_FATAL_ERROR( "out of dynamic memory in ss_scan_bytes()" ); - for ( i = 0; i < len; ++i ) - buf[i] = bytes[i]; + for ( i = 0; i < _yybytes_len; ++i ) + buf[i] = yybytes[i]; - buf[len] = buf[len+1] = YY_END_OF_BUFFER_CHAR; + buf[_yybytes_len] = buf[_yybytes_len+1] = YY_END_OF_BUFFER_CHAR; - b = yy_scan_buffer( buf, n ); + b = ss_scan_buffer(buf,n ); if ( ! b ) - YY_FATAL_ERROR( "bad buffer in yy_scan_bytes()" ); + YY_FATAL_ERROR( "bad buffer in ss_scan_bytes()" ); /* It's okay to grow etc. this buffer, and we should throw it * away when we're done. @@ -1580,148 +1754,196 @@ int len; b->yy_is_our_buffer = 1; return b; - } +} + +#ifndef YY_EXIT_FAILURE +#define YY_EXIT_FAILURE 2 #endif +static void yy_fatal_error (yyconst char* msg ) +{ + (void) fprintf( stderr, "%s\n", msg ); + exit( YY_EXIT_FAILURE ); +} -#ifndef YY_NO_PUSH_STATE -#ifdef YY_USE_PROTOS -static void yy_push_state( int new_state ) -#else -static void yy_push_state( new_state ) -int new_state; -#endif - { - if ( yy_start_stack_ptr >= yy_start_stack_depth ) - { - yy_size_t new_size; +/* Redefine yyless() so it works in section 3 code. */ - yy_start_stack_depth += YY_START_STACK_INCR; - new_size = yy_start_stack_depth * sizeof( int ); +#undef yyless +#define yyless(n) \ + do \ + { \ + /* Undo effects of setting up sstext. */ \ + int yyless_macro_arg = (n); \ + YY_LESS_LINENO(yyless_macro_arg);\ + sstext[ssleng] = (yy_hold_char); \ + (yy_c_buf_p) = sstext + yyless_macro_arg; \ + (yy_hold_char) = *(yy_c_buf_p); \ + *(yy_c_buf_p) = '\0'; \ + ssleng = yyless_macro_arg; \ + } \ + while ( 0 ) - if ( ! yy_start_stack ) - yy_start_stack = (int *) yy_flex_alloc( new_size ); +/* Accessor methods (get/set functions) to struct members. */ - else - yy_start_stack = (int *) yy_flex_realloc( - (void *) yy_start_stack, new_size ); +/** Get the current line number. + * + */ +int ssget_lineno (void) +{ + + return sslineno; +} - if ( ! yy_start_stack ) - YY_FATAL_ERROR( - "out of memory expanding start-condition stack" ); - } +/** Get the input stream. + * + */ +FILE *ssget_in (void) +{ + return ssin; +} - yy_start_stack[yy_start_stack_ptr++] = YY_START; +/** Get the output stream. + * + */ +FILE *ssget_out (void) +{ + return ssout; +} - BEGIN(new_state); - } -#endif +/** Get the length of the current token. + * + */ +int ssget_leng (void) +{ + return ssleng; +} +/** Get the current token. + * + */ -#ifndef YY_NO_POP_STATE -static void yy_pop_state() - { - if ( --yy_start_stack_ptr < 0 ) - YY_FATAL_ERROR( "start-condition stack underflow" ); +char *ssget_text (void) +{ + return sstext; +} - BEGIN(yy_start_stack[yy_start_stack_ptr]); - } -#endif +/** Set the current line number. + * @param line_number + * + */ +void ssset_lineno (int line_number ) +{ + + sslineno = line_number; +} +/** Set the input stream. This does not discard the current + * input buffer. + * @param in_str A readable stream. + * + * @see ss_switch_to_buffer + */ +void ssset_in (FILE * in_str ) +{ + ssin = in_str ; +} -#ifndef YY_NO_TOP_STATE -static int yy_top_state() - { - return yy_start_stack[yy_start_stack_ptr - 1]; - } -#endif +void ssset_out (FILE * out_str ) +{ + ssout = out_str ; +} -#ifndef YY_EXIT_FAILURE -#define YY_EXIT_FAILURE 2 -#endif +int ssget_debug (void) +{ + return ss_flex_debug; +} -#ifdef YY_USE_PROTOS -static void yy_fatal_error( yyconst char msg[] ) +void ssset_debug (int bdebug ) +{ + ss_flex_debug = bdebug ; +} + +static int yy_init_globals (void) +{ + /* Initialization is the same as for the non-reentrant scanner. + * This function is called from sslex_destroy(), so don't allocate here. + */ + + (yy_buffer_stack) = 0; + (yy_buffer_stack_top) = 0; + (yy_buffer_stack_max) = 0; + (yy_c_buf_p) = (char *) 0; + (yy_init) = 0; + (yy_start) = 0; + +/* Defined in main.c */ +#ifdef YY_STDINIT + ssin = stdin; + ssout = stdout; #else -static void yy_fatal_error( msg ) -char msg[]; + ssin = (FILE *) 0; + ssout = (FILE *) 0; #endif - { - (void) fprintf( stderr, "%s\n", msg ); - exit( YY_EXIT_FAILURE ); - } + /* For future reference: Set errno on error, since we are called by + * sslex_init() + */ + return 0; +} +/* sslex_destroy is for both reentrant and non-reentrant scanners. */ +int sslex_destroy (void) +{ + + /* Pop the buffer stack, destroying each element. */ + while(YY_CURRENT_BUFFER){ + ss_delete_buffer(YY_CURRENT_BUFFER ); + YY_CURRENT_BUFFER_LVALUE = NULL; + sspop_buffer_state(); + } -/* Redefine yyless() so it works in section 3 code. */ + /* Destroy the stack itself. */ + ssfree((yy_buffer_stack) ); + (yy_buffer_stack) = NULL; -#undef yyless -#define yyless(n) \ - do \ - { \ - /* Undo effects of setting up yytext. */ \ - yytext[yyleng] = yy_hold_char; \ - yy_c_buf_p = yytext + n; \ - yy_hold_char = *yy_c_buf_p; \ - *yy_c_buf_p = '\0'; \ - yyleng = n; \ - } \ - while ( 0 ) + /* Reset the globals. This is important in a non-reentrant scanner so the next time + * sslex() is called, initialization will occur. */ + yy_init_globals( ); + return 0; +} -/* Internal utility routines. */ +/* + * Internal utility routines. + */ #ifndef yytext_ptr -#ifdef YY_USE_PROTOS -static void yy_flex_strncpy( char *s1, yyconst char *s2, int n ) -#else -static void yy_flex_strncpy( s1, s2, n ) -char *s1; -yyconst char *s2; -int n; -#endif - { +static void yy_flex_strncpy (char* s1, yyconst char * s2, int n ) +{ register int i; for ( i = 0; i < n; ++i ) s1[i] = s2[i]; - } +} #endif #ifdef YY_NEED_STRLEN -#ifdef YY_USE_PROTOS -static int yy_flex_strlen( yyconst char *s ) -#else -static int yy_flex_strlen( s ) -yyconst char *s; -#endif - { +static int yy_flex_strlen (yyconst char * s ) +{ register int n; for ( n = 0; s[n]; ++n ) ; return n; - } +} #endif - -#ifdef YY_USE_PROTOS -static void *yy_flex_alloc( yy_size_t size ) -#else -static void *yy_flex_alloc( size ) -yy_size_t size; -#endif - { +void *ssalloc (yy_size_t size ) +{ return (void *) malloc( size ); - } +} -#ifdef YY_USE_PROTOS -static void *yy_flex_realloc( void *ptr, yy_size_t size ) -#else -static void *yy_flex_realloc( ptr, size ) -void *ptr; -yy_size_t size; -#endif - { +void *ssrealloc (void * ptr, yy_size_t size ) +{ /* The cast to (char *) in the following accommodates both * implementations that use char* generic pointers, and those * that use void* generic pointers. It works with the latter @@ -1730,30 +1952,21 @@ yy_size_t size; * as though doing an assignment. */ return (void *) realloc( (char *) ptr, size ); - } +} -#ifdef YY_USE_PROTOS -static void yy_flex_free( void *ptr ) -#else -static void yy_flex_free( ptr ) -void *ptr; -#endif - { - free( ptr ); - } +void ssfree (void * ptr ) +{ + free( (char *) ptr ); /* see ssrealloc() for (char *) cast */ +} -#if YY_MAIN -int main() - { - yylex(); - return 0; - } -#endif -#line 128 "icalsslexer.l" +#define YYTABLES_NAME "yytables" -int yywrap() + + +int sswrap() { return 1; } + diff --git a/src/libicalss/icalsslexer.l b/src/libicalss/icalsslexer.l index a044051..7003fc0 100644 --- a/src/libicalss/icalsslexer.l +++ b/src/libicalss/icalsslexer.l @@ -36,11 +36,14 @@ const char* input_buffer; const char* input_buffer_p; -#define min(a,b) ((a) < (b) ? (a) : (b)) - int icalss_input(char* buf, int max_size) { - int n = min(max_size,strlen(input_buffer_p)); + int n; + int l; + + l = strlen(input_buffer_p); + if (max_size<l) n = max_size; + else n = l; if (n > 0){ memcpy(buf, input_buffer_p, n); @@ -108,7 +111,9 @@ NULL { return SQLNULL; } \'[\@\*A-Za-z0-9\-\.\:\ ]+\' { int c = input(); - unput(c); + if(c != EOF){ + unput(c); + } if(c!='\''){ sslval.v_string= icalmemory_tmp_copy(yytext); return STRING; diff --git a/src/libicalss/icalssyacc.c b/src/libicalss/icalssyacc.c index 8d720db..5896120 100644 --- a/src/libicalss/icalssyacc.c +++ b/src/libicalss/icalssyacc.c @@ -120,36 +120,35 @@ /* Copy the first part of user declarations. */ -#line 1 "icalssyacc.y" -/* -*- Mode: C -*- - ====================================================================== - FILE: icalssyacc.y - CREATOR: eric 08 Aug 2000 - - DESCRIPTION: - - $Id: icalssyacc.y,v 1.10 2008-01-14 00:35:26 dothebart Exp $ - $Locker: $ - -(C) COPYRIGHT 2000, Eric Busboom, http://www.softwarestudio.org - - This program is free software; you can redistribute it and/or modify - it under the terms of either: - - The LGPL as published by the Free Software Foundation, version - 2.1, available at: http://www.fsf.org/copyleft/lesser.html - - Or: - - The Mozilla Public License Version 1.0. You may obtain a copy of - the License at http://www.mozilla.org/MPL/ - - The Original Code is eric. The Initial Developer of the Original - Code is Eric Busboom - - ======================================================================*/ -/*#define YYDEBUG 1*/ +/* -*- Mode: C -*- */ +/* ====================================================================== */ +/* FILE: icalssyacc.y */ +/* CREATOR: eric 08 Aug 2000 */ +/* */ +/* DESCRIPTION: */ +/* */ +/* $Id: icalssyacc.y,v 1.10 2008-01-14 00:35:26 dothebart Exp $ */ +/* $Locker: $ */ +/* */ +/* (C) COPYRIGHT 2000, Eric Busboom, http://www.softwarestudio.org */ +/* */ +/* This program is free software; you can redistribute it and/or modify */ +/* it under the terms of either: */ +/* */ +/* The LGPL as published by the Free Software Foundation, version */ +/* 2.1, available at: http://www.fsf.org/copyleft/lesser.html */ +/* */ +/* Or: */ +/* */ +/* The Mozilla Public License Version 1.0. You may obtain a copy of */ +/* the License at http://www.mozilla.org/MPL/ */ +/* */ +/* The Original Code is eric. The Initial Developer of the Original */ +/* Code is Eric Busboom */ +/* */ +/* ====================================================================== */ +#define YYDEBUG 1 #include <stdlib.h> #include <string.h> /* for strdup() */ #include <limits.h> /* for SHRT_MAX*/ @@ -174,13 +173,12 @@ static void set_logic(struct icalgauge_impl* impl,icalgaugelogic l); /* Don't know why I need this.... */ -/* TODO: older flex version produce whats here configured as OpenBSD */ -/* autoconf should figure out, and which flex version we should be newer than? */ -#ifndef __OpenBSD__ -int sslex(void *YYPARSE_PARAM); -#else -int sslex(); -#endif +/* older flex version (such as included in OpenBSD) takes a different calling syntax */ +#ifdef YYPARSE_PARAM +int sslex(void *YYPARSE_PARAM); +#else +int sslex(void); +#endif /* Enabling traces. */ @@ -203,12 +201,10 @@ int sslex(); #if ! defined YYSTYPE && ! defined YYSTYPE_IS_DECLARED typedef union YYSTYPE -#line 63 "icalssyacc.y" { char* v_string; } /* Line 187 of yacc.c. */ -#line 212 "y.tab.c" YYSTYPE; # define yystype YYSTYPE /* obsolescent; will be withdrawn */ # define YYSTYPE_IS_DECLARED 1 @@ -221,7 +217,6 @@ typedef union YYSTYPE /* Line 216 of yacc.c. */ -#line 225 "y.tab.c" #ifdef short # undef short @@ -362,14 +357,14 @@ YYID (i) # ifndef YYMALLOC # define YYMALLOC malloc # if ! defined malloc && ! defined _STDLIB_H && (defined __STDC__ || defined __C99__FUNC__ \ - || defined __cplusplus || defined _MSC_VER) + || defined __cplusplus) void *malloc (YYSIZE_T); /* INFRINGES ON USER NAME SPACE */ # endif # endif # ifndef YYFREE # define YYFREE free # if ! defined free && ! defined _STDLIB_H && (defined __STDC__ || defined __C99__FUNC__ \ - || defined __cplusplus || defined _MSC_VER) + || defined __cplusplus) void free (void *); /* INFRINGES ON USER NAME SPACE */ # endif # endif @@ -513,9 +508,9 @@ static const yytype_int8 yyrhs[] = /* YYRLINE[YYN] -- source line where rule number YYN was defined. */ static const yytype_uint8 yyrline[] = { - 0, 74, 74, 75, 76, 83, 84, 89, 90, 93, - 95, 96, 97, 98, 99, 100, 101, 102, 106, 107, - 108 + 0, 73, 73, 74, 75, 82, 83, 88, 89, 92, + 94, 95, 96, 97, 98, 99, 100, 101, 105, 106, + 107 }; #endif @@ -1436,7 +1431,6 @@ yyreduce: switch (yyn) { case 4: -#line 76 "icalssyacc.y" { yyclearin; YYABORT; @@ -1444,83 +1438,67 @@ yyreduce: break; case 5: -#line 83 "icalssyacc.y" {ssyacc_add_select(icalss_yy_gauge,(yyvsp[(1) - (1)].v_string));} break; case 6: -#line 84 "icalssyacc.y" {ssyacc_add_select(icalss_yy_gauge,(yyvsp[(3) - (3)].v_string));} break; case 7: -#line 89 "icalssyacc.y" {ssyacc_add_from(icalss_yy_gauge,(yyvsp[(1) - (1)].v_string));} break; case 8: -#line 90 "icalssyacc.y" {ssyacc_add_from(icalss_yy_gauge,(yyvsp[(3) - (3)].v_string));} break; case 10: -#line 95 "icalssyacc.y" {ssyacc_add_where(icalss_yy_gauge,(yyvsp[(1) - (3)].v_string),ICALGAUGECOMPARE_EQUAL,(yyvsp[(3) - (3)].v_string)); } break; case 11: -#line 96 "icalssyacc.y" {ssyacc_add_where(icalss_yy_gauge,(yyvsp[(1) - (3)].v_string),ICALGAUGECOMPARE_ISNULL,""); } break; case 12: -#line 97 "icalssyacc.y" {ssyacc_add_where(icalss_yy_gauge,(yyvsp[(1) - (4)].v_string),ICALGAUGECOMPARE_ISNOTNULL,""); } break; case 13: -#line 98 "icalssyacc.y" {ssyacc_add_where(icalss_yy_gauge,(yyvsp[(1) - (3)].v_string),ICALGAUGECOMPARE_NOTEQUAL,(yyvsp[(3) - (3)].v_string)); } break; case 14: -#line 99 "icalssyacc.y" {ssyacc_add_where(icalss_yy_gauge,(yyvsp[(1) - (3)].v_string),ICALGAUGECOMPARE_LESS,(yyvsp[(3) - (3)].v_string)); } break; case 15: -#line 100 "icalssyacc.y" {ssyacc_add_where(icalss_yy_gauge,(yyvsp[(1) - (3)].v_string),ICALGAUGECOMPARE_GREATER,(yyvsp[(3) - (3)].v_string)); } break; case 16: -#line 101 "icalssyacc.y" {ssyacc_add_where(icalss_yy_gauge,(yyvsp[(1) - (3)].v_string),ICALGAUGECOMPARE_LESSEQUAL,(yyvsp[(3) - (3)].v_string)); } break; case 17: -#line 102 "icalssyacc.y" {ssyacc_add_where(icalss_yy_gauge,(yyvsp[(1) - (3)].v_string),ICALGAUGECOMPARE_GREATEREQUAL,(yyvsp[(3) - (3)].v_string)); } break; case 18: -#line 106 "icalssyacc.y" {set_logic(icalss_yy_gauge,ICALGAUGELOGIC_NONE);} break; case 19: -#line 107 "icalssyacc.y" {set_logic(icalss_yy_gauge,ICALGAUGELOGIC_AND);} break; case 20: -#line 108 "icalssyacc.y" {set_logic(icalss_yy_gauge,ICALGAUGELOGIC_OR);} break; /* Line 1267 of yacc.c. */ -#line 1524 "y.tab.c" default: break; } YY_SYMBOL_PRINT ("-> $$ =", yyr1[yyn], &yyval, &yyloc); @@ -1734,7 +1712,6 @@ yyreturn: } -#line 112 "icalssyacc.y" static void ssyacc_add_where(struct icalgauge_impl* impl, char* str1, @@ -1767,8 +1744,8 @@ static void ssyacc_add_where(struct icalgauge_impl* impl, char* str1, where->value = strdup(s); - /* Is there a period in str1 ? If so, the string specified both a - component and a property*/ + /* Is there a period in str1 ? If so, the string specified both a */ + /* component and a property */ if( (c = strrchr(str1,'.')) != 0){ compstr = str1; propstr = c+1; @@ -1827,8 +1804,8 @@ static void ssyacc_add_select(struct icalgauge_impl* impl, char* str1) where->comp = ICAL_NO_COMPONENT; where->prop = ICAL_NO_PROPERTY; - /* Is there a period in str1 ? If so, the string specified both a - component and a property*/ + /* Is there a period in str1 ? If so, the string specified both a */ + /* component and a property */ if( (c = strrchr(str1,'.')) != 0){ compstr = str1; propstr = c+1; diff --git a/src/libicalss/icalssyacc.h b/src/libicalss/icalssyacc.h index cb6973e..f97cc4a 100644 --- a/src/libicalss/icalssyacc.h +++ b/src/libicalss/icalssyacc.h @@ -86,12 +86,10 @@ #if ! defined YYSTYPE && ! defined YYSTYPE_IS_DECLARED typedef union YYSTYPE -#line 63 "icalssyacc.y" { char* v_string; } /* Line 1489 of yacc.c. */ -#line 95 "y.tab.h" YYSTYPE; # define yystype YYSTYPE /* obsolescent; will be withdrawn */ # define YYSTYPE_IS_DECLARED 1 diff --git a/src/libicalss/icalssyacc.y b/src/libicalss/icalssyacc.y index af16177..03e1d92 100644 --- a/src/libicalss/icalssyacc.y +++ b/src/libicalss/icalssyacc.y @@ -1,31 +1,31 @@ %{ -/* -*- Mode: C -*- - ====================================================================== - FILE: icalssyacc.y - CREATOR: eric 08 Aug 2000 - - DESCRIPTION: - - $Id: icalssyacc.y,v 1.10 2008-01-14 00:35:26 dothebart Exp $ - $Locker: $ - -(C) COPYRIGHT 2000, Eric Busboom, http://www.softwarestudio.org - - This program is free software; you can redistribute it and/or modify - it under the terms of either: - - The LGPL as published by the Free Software Foundation, version - 2.1, available at: http://www.fsf.org/copyleft/lesser.html - - Or: - - The Mozilla Public License Version 1.0. You may obtain a copy of - the License at http://www.mozilla.org/MPL/ - - The Original Code is eric. The Initial Developer of the Original - Code is Eric Busboom - - ======================================================================*/ +/* -*- Mode: C -*- */ +/* ====================================================================== */ +/* FILE: icalssyacc.y */ +/* CREATOR: eric 08 Aug 2000 */ +/* */ +/* DESCRIPTION: */ +/* */ +/* $Id: icalssyacc.y,v 1.10 2008-01-14 00:35:26 dothebart Exp $ */ +/* $Locker: $ */ +/* */ +/* (C) COPYRIGHT 2000, Eric Busboom, http://www.softwarestudio.org */ +/* */ +/* This program is free software; you can redistribute it and/or modify */ +/* it under the terms of either: */ +/* */ +/* The LGPL as published by the Free Software Foundation, version */ +/* 2.1, available at: http://www.fsf.org/copyleft/lesser.html */ +/* */ +/* Or: */ +/* */ +/* The Mozilla Public License Version 1.0. You may obtain a copy of */ +/* the License at http://www.mozilla.org/MPL/ */ +/* */ +/* The Original Code is eric. The Initial Developer of the Original */ +/* Code is Eric Busboom */ +/* */ +/* ====================================================================== */ /*#define YYDEBUG 1*/ #include <stdlib.h> #include <string.h> /* for strdup() */ @@ -51,13 +51,12 @@ static void set_logic(struct icalgauge_impl* impl,icalgaugelogic l); /* Don't know why I need this.... */ -/* TODO: older flex version produce whats here configured as OpenBSD */ -/* autoconf should figure out, and which flex version we should be newer than? */ -#ifndef __OpenBSD__ -int sslex(void *YYPARSE_PARAM); -#else -int sslex(); -#endif +/* older flex version (such as included in OpenBSD) takes a different calling syntax */ +#ifdef YYPARSE_PARAM +int sslex(void *YYPARSE_PARAM); +#else +int sslex(void); +#endif %} %union { @@ -141,8 +140,8 @@ static void ssyacc_add_where(struct icalgauge_impl* impl, char* str1, where->value = strdup(s); - /* Is there a period in str1 ? If so, the string specified both a - component and a property*/ + /* Is there a period in str1 ? If so, the string specified both a */ + /* component and a property */ if( (c = strrchr(str1,'.')) != 0){ compstr = str1; propstr = c+1; @@ -201,8 +200,8 @@ static void ssyacc_add_select(struct icalgauge_impl* impl, char* str1) where->comp = ICAL_NO_COMPONENT; where->prop = ICAL_NO_PROPERTY; - /* Is there a period in str1 ? If so, the string specified both a - component and a property*/ + /* Is there a period in str1 ? If so, the string specified both a */ + /* component and a property */ if( (c = strrchr(str1,'.')) != 0){ compstr = str1; propstr = c+1; diff --git a/src/libicalvcal/CMakeLists.txt b/src/libicalvcal/CMakeLists.txt index 7ef6fb2..4dc1fab 100644 --- a/src/libicalvcal/CMakeLists.txt +++ b/src/libicalvcal/CMakeLists.txt @@ -1,7 +1,7 @@ include_directories( ${CMAKE_BINARY_DIR} ${CMAKE_SOURCE_DIR}/src ${CMAKE_BINARY_DIR}/src - ${CMAKE_SOURCE_DIR}/src/libicalss ${CMAKE_BINARY_DIR}/src/libicalss + ${CMAKE_SOURCE_DIR}/src/libicalss ${CMAKE_BINARY_DIR}/src/libicalss ${CMAKE_SOURCE_DIR}/src/libical ${CMAKE_BINARY_DIR}/src/libical ${CMAKE_SOURCE_DIR}/src/libicalvcal ${CMAKE_BINARY_DIR}/src/libicalvcal ) @@ -11,82 +11,49 @@ set(icalvcal_LIB_DEVSRCS vcc.c) ########### next target ############### -SET(icalvcal_LIB_SRCS - icalvcal.h - icalvcal.c - port.h - vcc.h - vobject.h - vobject.c - vcaltmp.h - vcaltmp.c - ${icalvcal_LIB_DEVSRCS} +set(icalvcal_LIB_SRCS + icalvcal.h + icalvcal.c + port.h + vcc.h + vobject.h + vobject.c + vcaltmp.h + vcaltmp.c + ${icalvcal_LIB_DEVSRCS} ) if(MSVC) - list(APPEND icalvcal_LIB_SRCS ../icalvcal.def) + list(APPEND icalvcal_LIB_SRCS ../icalvcal.def) endif(MSVC) -add_library(icalvcal SHARED ${icalvcal_LIB_SRCS}) +add_library(icalvcal ${LIBRARY_TYPE} ${icalvcal_LIB_SRCS}) +add_library(icalvcal-static STATIC ${icalvcal_LIB_SRCS}) + +add_dependencies(icalvcal ical-header) +add_dependencies(icalvcal-static ical-header) target_link_libraries(icalvcal ical) -set_target_properties(icalvcal PROPERTIES VERSION ${LIBICAL_LIB_VERSION_STRING} SOVERSION ${LIBICAL_LIB_MAJOR_VERSION}) -install(TARGETS icalvcal ${INSTALL_TARGETS_DEFAULT_ARGS}) +if(MSVC) + set_target_properties(icalvcal PROPERTIES OUTPUT_NAME "libicalvcal") + set_target_properties(icalvcal-static PROPERTIES OUTPUT_NAME "libicalvcal-static") +else(MSVC) + set_target_properties(icalvcal-static PROPERTIES OUTPUT_NAME "icalvcal") +endif(MSVC) +set_target_properties(icalvcal PROPERTIES + VERSION ${LIBICAL_LIB_VERSION_STRING} + SOVERSION ${LIBICAL_LIB_MAJOR_VERSION} +) +set_target_properties(icalvcal PROPERTIES CLEAN_DIRECT_OUTPUT 1) +set_target_properties(icalvcal-static PROPERTIES CLEAN_DIRECT_OUTPUT 1) + +install(TARGETS icalvcal icalvcal-static ${INSTALL_TARGETS_DEFAULT_ARGS}) ########### install files ############### install(FILES icalvcal.h port.h vcc.h vobject.h vcaltmp.h DESTINATION - ${INCLUDE_INSTALL_DIR}/libical) - - - -#original Makefile.am contents follow: - -#lib_LTLIBRARIES = libicalvcal.la -# -#INCLUDES = \ -# -I$(top_srcdir) \ -# -I$(top_srcdir)/src \ -# -I$(top_builddir)/src \ -# -I$(top_srcdir)/src/libical \ -# -I$(top_builddir)/src/libical \ -# -I$(top_srcdir)/src/libicalss -# -#libicalvcal_la_LDFLAGS = -version-info 43:0:43 -#libicalvcal_la_LIBADD = ../libical/.libs/libical.la -# -#if DEV -#libicalvcal_la_DEVSOURCES = vcc.y -#else -#libicalvcal_la_DEVSOURCES = vcc.c -#endif -# -# -#libicalvcal_la_SOURCES = \ -# icalvcal.h \ -# icalvcal.c \ -# port.h \ -# vcc.h \ -# vobject.h \ -# vobject.c \ -# vcaltmp.h \ -# vcaltmp.c \ -# $(libicalvcal_la_DEVSOURCES) -# -#libicalvcalincludedir = $(includedir)/libicalvcal -# -#libicalvcalinclude_HEADERS = \ -# icalvcal.h \ -# port.h \ -# vcc.h \ -# vobject.h \ -# vcaltmp.h -# -#EXTRA_DIST = \ -# README.TXT \ -# vcaltest.c \ -# vctest.c -# + ${INCLUDE_INSTALL_DIR}/libical +) diff --git a/src/libicalvcal/Makefile.am b/src/libicalvcal/Makefile.am index b2f977c..8177d3a 100644 --- a/src/libicalvcal/Makefile.am +++ b/src/libicalvcal/Makefile.am @@ -1,3 +1,6 @@ +AM_YFLAGS = -l +AM_LFLAGS = -L -R + lib_LTLIBRARIES = libicalvcal.la INCLUDES = \ @@ -8,8 +11,13 @@ INCLUDES = \ -I$(top_builddir)/src/libical \ -I$(top_srcdir)/src/libicalss -libicalvcal_la_LDFLAGS = -version-info 43:0:43 -libicalvcal_la_LIBADD = ../libical/.libs/libical.la +libicalvcal_la_LDFLAGS = -version-info 48:0:48 + +if OS_WIN32 +libicalvcal_la_LDFLAGS += -no-undefined +endif + +libicalvcal_la_LIBADD = $(top_builddir)/src/libical/libical.la if DEV libicalvcal_la_DEVSOURCES = vcc.y @@ -43,3 +51,4 @@ EXTRA_DIST = \ vcaltest.c \ vctest.c +distclean: clean diff --git a/src/libicalvcal/Makefile.in b/src/libicalvcal/Makefile.in index df038cd..b606a2d 100644 --- a/src/libicalvcal/Makefile.in +++ b/src/libicalvcal/Makefile.in @@ -1,8 +1,8 @@ -# Makefile.in generated by automake 1.9.5 from Makefile.am. +# Makefile.in generated by automake 1.12.2 from Makefile.am. # @configure_input@ -# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, -# 2003, 2004, 2005 Free Software Foundation, Inc. +# Copyright (C) 1994-2012 Free Software Foundation, Inc. + # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. @@ -15,17 +15,29 @@ @SET_MAKE@ -SOURCES = $(libicalvcal_la_SOURCES) - -srcdir = @srcdir@ -top_srcdir = @top_srcdir@ VPATH = @srcdir@ +am__make_dryrun = \ + { \ + am__dry=no; \ + case $$MAKEFLAGS in \ + *\\[\ \ ]*) \ + echo 'am--echo: ; @echo "AM" OK' | $(MAKE) -f - 2>/dev/null \ + | grep '^AM OK$$' >/dev/null || am__dry=yes;; \ + *) \ + for am__flg in $$MAKEFLAGS; do \ + case $$am__flg in \ + *=*|--*) ;; \ + *n*) am__dry=yes; break;; \ + esac; \ + done;; \ + esac; \ + test $$am__dry = yes; \ + } pkgdatadir = $(datadir)/@PACKAGE@ -pkglibdir = $(libdir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ -top_builddir = ../.. +pkglibdir = $(libdir)/@PACKAGE@ +pkglibexecdir = $(libexecdir)/@PACKAGE@ am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd -INSTALL = @INSTALL@ install_sh_DATA = $(install_sh) -c -m 644 install_sh_PROGRAM = $(install_sh) -c install_sh_SCRIPT = $(install_sh) -c @@ -40,9 +52,11 @@ POST_UNINSTALL = : build_triplet = @build@ host_triplet = @host@ target_triplet = @target@ +@OS_WIN32_TRUE@am__append_1 = -no-undefined subdir = src/libicalvcal DIST_COMMON = $(libicalvcalinclude_HEADERS) $(srcdir)/Makefile.am \ - $(srcdir)/Makefile.in vcc.c + $(srcdir)/Makefile.in $(top_srcdir)/depcomp \ + $(top_srcdir)/mkinstalldirs $(top_srcdir)/ylwrap vcc.c ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/configure.in am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ @@ -50,17 +64,38 @@ am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs CONFIG_HEADER = $(top_builddir)/config.h CONFIG_CLEAN_FILES = +CONFIG_CLEAN_VPATH_FILES = am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; am__vpath_adj = case $$p in \ $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \ *) f=$$p;; \ esac; -am__strip_dir = `echo $$p | sed -e 's|^.*/||'`; +am__strip_dir = f=`echo $$p | sed -e 's|^.*/||'`; +am__install_max = 40 +am__nobase_strip_setup = \ + srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/\\\\&/g'` +am__nobase_strip = \ + for p in $$list; do echo "$$p"; done | sed -e "s|$$srcdirstrip/||" +am__nobase_list = $(am__nobase_strip_setup); \ + for p in $$list; do echo "$$p $$p"; done | \ + sed "s| $$srcdirstrip/| |;"' / .*\//!s/ .*/ ./; s,\( .*\)/[^/]*$$,\1,' | \ + $(AWK) 'BEGIN { files["."] = "" } { files[$$2] = files[$$2] " " $$1; \ + if (++n[$$2] == $(am__install_max)) \ + { print $$2, files[$$2]; n[$$2] = 0; files[$$2] = "" } } \ + END { for (dir in files) print dir, files[dir] }' +am__base_list = \ + sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \ + sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g' +am__uninstall_files_from_dir = { \ + test -z "$$files" \ + || { test ! -d "$$dir" && test ! -f "$$dir" && test ! -r "$$dir"; } \ + || { echo " ( cd '$$dir' && rm -f" $$files ")"; \ + $(am__cd) "$$dir" && rm -f $$files; }; \ + } am__installdirs = "$(DESTDIR)$(libdir)" \ "$(DESTDIR)$(libicalvcalincludedir)" -libLTLIBRARIES_INSTALL = $(INSTALL) LTLIBRARIES = $(lib_LTLIBRARIES) -libicalvcal_la_DEPENDENCIES = ../libical/.libs/libical.la +libicalvcal_la_DEPENDENCIES = $(top_builddir)/src/libical/libical.la am__libicalvcal_la_SOURCES_DIST = icalvcal.h icalvcal.c port.h vcc.h \ vobject.h vobject.c vcaltmp.h vcaltmp.c vcc.c vcc.y @DEV_FALSE@am__objects_1 = vcc.lo @@ -68,30 +103,41 @@ am__libicalvcal_la_SOURCES_DIST = icalvcal.h icalvcal.c port.h vcc.h \ am_libicalvcal_la_OBJECTS = icalvcal.lo vobject.lo vcaltmp.lo \ $(am__objects_1) libicalvcal_la_OBJECTS = $(am_libicalvcal_la_OBJECTS) -DEFAULT_INCLUDES = -I. -I$(srcdir) -I$(top_builddir) +libicalvcal_la_LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) \ + $(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \ + $(libicalvcal_la_LDFLAGS) $(LDFLAGS) -o $@ +DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir) depcomp = $(SHELL) $(top_srcdir)/depcomp am__depfiles_maybe = depfiles +am__mv = mv -f COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -LTCOMPILE = $(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) \ - $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \ - $(AM_CFLAGS) $(CFLAGS) +LTCOMPILE = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ + --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ + $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) CCLD = $(CC) -LINK = $(LIBTOOL) --tag=CC --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \ - $(AM_LDFLAGS) $(LDFLAGS) -o $@ -YACCCOMPILE = $(YACC) $(YFLAGS) $(AM_YFLAGS) -LTYACCCOMPILE = $(LIBTOOL) --mode=compile $(YACC) $(YFLAGS) \ - $(AM_YFLAGS) +LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ + --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) \ + $(LDFLAGS) -o $@ +@MAINTAINER_MODE_FALSE@am__skipyacc = test -f $@ || +am__yacc_c2h = sed -e s/cc$$/hh/ -e s/cpp$$/hpp/ -e s/cxx$$/hxx/ \ + -e s/c++$$/h++/ -e s/c$$/h/ +YACCCOMPILE = $(YACC) $(AM_YFLAGS) $(YFLAGS) +LTYACCCOMPILE = $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ + --mode=compile $(YACC) $(AM_YFLAGS) $(YFLAGS) +YLWRAP = $(top_srcdir)/ylwrap SOURCES = $(libicalvcal_la_SOURCES) DIST_SOURCES = $(am__libicalvcal_la_SOURCES_DIST) -libicalvcalincludeHEADERS_INSTALL = $(INSTALL_HEADER) +am__can_run_installinfo = \ + case $$AM_UPDATE_INFO_DIR in \ + n|no|NO) false;; \ + *) (install-info --version) >/dev/null 2>&1;; \ + esac HEADERS = $(libicalvcalinclude_HEADERS) ETAGS = etags CTAGS = ctags DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ -AMDEP_FALSE = @AMDEP_FALSE@ -AMDEP_TRUE = @AMDEP_TRUE@ AMTAR = @AMTAR@ AR = @AR@ AUTOCONF = @AUTOCONF@ @@ -115,18 +161,17 @@ CXXFLAGS = @CXXFLAGS@ CYGPATH_W = @CYGPATH_W@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ -DEV_FALSE = @DEV_FALSE@ -DEV_TRUE = @DEV_TRUE@ -ECHO = @ECHO@ +DLLTOOL = @DLLTOOL@ +DSYMUTIL = @DSYMUTIL@ +DUMPBIN = @DUMPBIN@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ -F77 = @F77@ -FFLAGS = @FFLAGS@ -HAVE_PTHREAD_FALSE = @HAVE_PTHREAD_FALSE@ -HAVE_PTHREAD_TRUE = @HAVE_PTHREAD_TRUE@ +FGREP = @FGREP@ +GREP = @GREP@ +INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ @@ -136,6 +181,7 @@ JAVA = @JAVA@ JAVAC = @JAVAC@ JAVAH = @JAVAH@ JAVA_PLATFORM = @JAVA_PLATFORM@ +LD = @LD@ LDFLAGS = @LDFLAGS@ LEX = @LEX@ LEXLIB = @LEXLIB@ @@ -143,53 +189,52 @@ LEX_OUTPUT_ROOT = @LEX_OUTPUT_ROOT@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LIBTOOL = @LIBTOOL@ +LIPO = @LIPO@ LN_S = @LN_S@ LTLIBOBJS = @LTLIBOBJS@ MAINT = @MAINT@ -MAINTAINER_MODE_FALSE = @MAINTAINER_MODE_FALSE@ -MAINTAINER_MODE_TRUE = @MAINTAINER_MODE_TRUE@ MAKEINFO = @MAKEINFO@ +MANIFEST_TOOL = @MANIFEST_TOOL@ +MKDIR_P = @MKDIR_P@ +NM = @NM@ +NMEDIT = @NMEDIT@ +OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ -OS_WIN32_FALSE = @OS_WIN32_FALSE@ -OS_WIN32_TRUE = @OS_WIN32_TRUE@ +OTOOL = @OTOOL@ +OTOOL64 = @OTOOL64@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ +PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ PERL = @PERL@ PTHREAD_LIBS = @PTHREAD_LIBS@ +PYTHON = @PYTHON@ +PYTHON_EXEC_PREFIX = @PYTHON_EXEC_PREFIX@ +PYTHON_PLATFORM = @PYTHON_PLATFORM@ +PYTHON_PREFIX = @PYTHON_PREFIX@ +PYTHON_VERSION = @PYTHON_VERSION@ PY_CFLAGS = @PY_CFLAGS@ -PY_EXTRA_LIBS = @PY_EXTRA_LIBS@ -PY_LIBS = @PY_LIBS@ -PY_LIB_LOC = @PY_LIB_LOC@ RANLIB = @RANLIB@ +SED = @SED@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ STRIP = @STRIP@ VERSION = @VERSION@ -WITH_BDB4_FALSE = @WITH_BDB4_FALSE@ -WITH_BDB4_TRUE = @WITH_BDB4_TRUE@ -WITH_CXX_BINDINGS_FALSE = @WITH_CXX_BINDINGS_FALSE@ -WITH_CXX_BINDINGS_TRUE = @WITH_CXX_BINDINGS_TRUE@ -WITH_JAVA_FALSE = @WITH_JAVA_FALSE@ -WITH_JAVA_TRUE = @WITH_JAVA_TRUE@ -WITH_PYTHON_FALSE = @WITH_PYTHON_FALSE@ -WITH_PYTHON_TRUE = @WITH_PYTHON_TRUE@ YACC = @YACC@ +YFLAGS = @YFLAGS@ ZONE_INFO = @ZONE_INFO@ +abs_builddir = @abs_builddir@ +abs_srcdir = @abs_srcdir@ +abs_top_builddir = @abs_top_builddir@ +abs_top_srcdir = @abs_top_srcdir@ ac_ct_AR = @ac_ct_AR@ ac_ct_CC = @ac_ct_CC@ ac_ct_CXX = @ac_ct_CXX@ -ac_ct_F77 = @ac_ct_F77@ -ac_ct_RANLIB = @ac_ct_RANLIB@ -ac_ct_STRIP = @ac_ct_STRIP@ -am__fastdepCC_FALSE = @am__fastdepCC_FALSE@ -am__fastdepCC_TRUE = @am__fastdepCC_TRUE@ -am__fastdepCXX_FALSE = @am__fastdepCXX_FALSE@ -am__fastdepCXX_TRUE = @am__fastdepCXX_TRUE@ +ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ am__include = @am__include@ am__leading_dot = @am__leading_dot@ am__quote = @am__quote@ @@ -201,33 +246,51 @@ build_alias = @build_alias@ build_cpu = @build_cpu@ build_os = @build_os@ build_vendor = @build_vendor@ +builddir = @builddir@ datadir = @datadir@ +datarootdir = @datarootdir@ +docdir = @docdir@ +dvidir = @dvidir@ exec_prefix = @exec_prefix@ host = @host@ host_alias = @host_alias@ host_cpu = @host_cpu@ host_os = @host_os@ host_vendor = @host_vendor@ +htmldir = @htmldir@ includedir = @includedir@ infodir = @infodir@ install_sh = @install_sh@ libdir = @libdir@ libexecdir = @libexecdir@ +localedir = @localedir@ localstatedir = @localstatedir@ mandir = @mandir@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ +pdfdir = @pdfdir@ +pkgpyexecdir = @pkgpyexecdir@ +pkgpythondir = @pkgpythondir@ prefix = @prefix@ program_transform_name = @program_transform_name@ -python_val = @python_val@ +psdir = @psdir@ +pyexecdir = @pyexecdir@ +pythondir = @pythondir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ +srcdir = @srcdir@ +swig_val = @swig_val@ sysconfdir = @sysconfdir@ target = @target@ target_alias = @target_alias@ target_cpu = @target_cpu@ target_os = @target_os@ target_vendor = @target_vendor@ +top_build_prefix = @top_build_prefix@ +top_builddir = @top_builddir@ +top_srcdir = @top_srcdir@ +AM_YFLAGS = -l +AM_LFLAGS = -L -R lib_LTLIBRARIES = libicalvcal.la INCLUDES = \ -I$(top_srcdir) \ @@ -237,8 +300,8 @@ INCLUDES = \ -I$(top_builddir)/src/libical \ -I$(top_srcdir)/src/libicalss -libicalvcal_la_LDFLAGS = -version-info 43:0:43 -libicalvcal_la_LIBADD = ../libical/.libs/libical.la +libicalvcal_la_LDFLAGS = -version-info 48:0:48 $(am__append_1) +libicalvcal_la_LIBADD = $(top_builddir)/src/libical/libical.la @DEV_FALSE@libicalvcal_la_DEVSOURCES = vcc.c @DEV_TRUE@libicalvcal_la_DEVSOURCES = vcc.y libicalvcal_la_SOURCES = \ @@ -273,14 +336,14 @@ $(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__confi @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh \ - && exit 0; \ + ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ + && { if test -f $@; then exit 0; else break; fi; }; \ exit 1;; \ esac; \ done; \ - echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu src/libicalvcal/Makefile'; \ - cd $(top_srcdir) && \ - $(AUTOMAKE) --gnu src/libicalvcal/Makefile + echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu src/libicalvcal/Makefile'; \ + $(am__cd) $(top_srcdir) && \ + $(AUTOMAKE) --gnu src/libicalvcal/Makefile .PRECIOUS: Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ @@ -298,35 +361,43 @@ $(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh +$(am__aclocal_m4_deps): install-libLTLIBRARIES: $(lib_LTLIBRARIES) @$(NORMAL_INSTALL) - test -z "$(libdir)" || $(mkdir_p) "$(DESTDIR)$(libdir)" - @list='$(lib_LTLIBRARIES)'; for p in $$list; do \ + @list='$(lib_LTLIBRARIES)'; test -n "$(libdir)" || list=; \ + list2=; for p in $$list; do \ if test -f $$p; then \ - f=$(am__strip_dir) \ - echo " $(LIBTOOL) --mode=install $(libLTLIBRARIES_INSTALL) $(INSTALL_STRIP_FLAG) '$$p' '$(DESTDIR)$(libdir)/$$f'"; \ - $(LIBTOOL) --mode=install $(libLTLIBRARIES_INSTALL) $(INSTALL_STRIP_FLAG) "$$p" "$(DESTDIR)$(libdir)/$$f"; \ + list2="$$list2 $$p"; \ else :; fi; \ - done + done; \ + test -z "$$list2" || { \ + echo " $(MKDIR_P) '$(DESTDIR)$(libdir)'"; \ + $(MKDIR_P) "$(DESTDIR)$(libdir)" || exit 1; \ + echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL) $(INSTALL_STRIP_FLAG) $$list2 '$(DESTDIR)$(libdir)'"; \ + $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL) $(INSTALL_STRIP_FLAG) $$list2 "$(DESTDIR)$(libdir)"; \ + } uninstall-libLTLIBRARIES: @$(NORMAL_UNINSTALL) - @set -x; list='$(lib_LTLIBRARIES)'; for p in $$list; do \ - p=$(am__strip_dir) \ - echo " $(LIBTOOL) --mode=uninstall rm -f '$(DESTDIR)$(libdir)/$$p'"; \ - $(LIBTOOL) --mode=uninstall rm -f "$(DESTDIR)$(libdir)/$$p"; \ + @list='$(lib_LTLIBRARIES)'; test -n "$(libdir)" || list=; \ + for p in $$list; do \ + $(am__strip_dir) \ + echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f '$(DESTDIR)$(libdir)/$$f'"; \ + $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f "$(DESTDIR)$(libdir)/$$f"; \ done clean-libLTLIBRARIES: -test -z "$(lib_LTLIBRARIES)" || rm -f $(lib_LTLIBRARIES) - @list='$(lib_LTLIBRARIES)'; for p in $$list; do \ - dir="`echo $$p | sed -e 's|/[^/]*$$||'`"; \ - test "$$dir" != "$$p" || dir=.; \ - echo "rm -f \"$${dir}/so_locations\""; \ - rm -f "$${dir}/so_locations"; \ - done -libicalvcal.la: $(libicalvcal_la_OBJECTS) $(libicalvcal_la_DEPENDENCIES) - $(LINK) -rpath $(libdir) $(libicalvcal_la_LDFLAGS) $(libicalvcal_la_OBJECTS) $(libicalvcal_la_LIBADD) $(LIBS) + @list='$(lib_LTLIBRARIES)'; \ + locs=`for p in $$list; do echo $$p; done | \ + sed 's|^[^/]*$$|.|; s|/[^/]*$$||; s|$$|/so_locations|' | \ + sort -u`; \ + test -z "$$locs" || { \ + echo rm -f $${locs}; \ + rm -f $${locs}; \ + } +libicalvcal.la: $(libicalvcal_la_OBJECTS) $(libicalvcal_la_DEPENDENCIES) $(EXTRA_libicalvcal_la_DEPENDENCIES) + $(libicalvcal_la_LINK) -rpath $(libdir) $(libicalvcal_la_OBJECTS) $(libicalvcal_la_LIBADD) $(LIBS) mostlyclean-compile: -rm -f *.$(OBJEXT) @@ -340,146 +411,149 @@ distclean-compile: @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/vobject.Plo@am__quote@ .c.o: -@am__fastdepCC_TRUE@ if $(COMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" -c -o $@ $<; \ -@am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Po"; else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; fi +@am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(COMPILE) -c $< .c.obj: -@am__fastdepCC_TRUE@ if $(COMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" -c -o $@ `$(CYGPATH_W) '$<'`; \ -@am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Po"; else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; fi +@am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(COMPILE) -c `$(CYGPATH_W) '$<'` .c.lo: -@am__fastdepCC_TRUE@ if $(LTCOMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" -c -o $@ $<; \ -@am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Plo"; else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; fi +@am__fastdepCC_TRUE@ $(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(LTCOMPILE) -c -o $@ $< .y.c: - $(YACCCOMPILE) $< - if test -f y.tab.h; then \ - to=`echo "$*_H" | sed \ - -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/' \ - -e 's/[^ABCDEFGHIJKLMNOPQRSTUVWXYZ]/_/g'`; \ - sed -e "/^#/!b" -e "s/Y_TAB_H/$$to/g" -e "s|y\.tab\.h|$*.h|" \ - y.tab.h >$*.ht; \ - rm -f y.tab.h; \ - if cmp -s $*.ht $*.h; then \ - rm -f $*.ht ;\ - else \ - mv $*.ht $*.h; \ - fi; \ - fi - if test -f y.output; then \ - mv y.output $*.output; \ - fi - sed '/^#/ s|y\.tab\.c|$@|' y.tab.c >$@t && mv $@t $@ - rm -f y.tab.c + $(am__skipyacc) $(SHELL) $(YLWRAP) $< y.tab.c $@ y.tab.h `echo $@ | $(am__yacc_c2h)` y.output $*.output -- $(YACCCOMPILE) mostlyclean-libtool: -rm -f *.lo clean-libtool: -rm -rf .libs _libs - -distclean-libtool: - -rm -f libtool -uninstall-info-am: install-libicalvcalincludeHEADERS: $(libicalvcalinclude_HEADERS) @$(NORMAL_INSTALL) - test -z "$(libicalvcalincludedir)" || $(mkdir_p) "$(DESTDIR)$(libicalvcalincludedir)" - @list='$(libicalvcalinclude_HEADERS)'; for p in $$list; do \ + @list='$(libicalvcalinclude_HEADERS)'; test -n "$(libicalvcalincludedir)" || list=; \ + if test -n "$$list"; then \ + echo " $(MKDIR_P) '$(DESTDIR)$(libicalvcalincludedir)'"; \ + $(MKDIR_P) "$(DESTDIR)$(libicalvcalincludedir)" || exit 1; \ + fi; \ + for p in $$list; do \ if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ - f=$(am__strip_dir) \ - echo " $(libicalvcalincludeHEADERS_INSTALL) '$$d$$p' '$(DESTDIR)$(libicalvcalincludedir)/$$f'"; \ - $(libicalvcalincludeHEADERS_INSTALL) "$$d$$p" "$(DESTDIR)$(libicalvcalincludedir)/$$f"; \ + echo "$$d$$p"; \ + done | $(am__base_list) | \ + while read files; do \ + echo " $(INSTALL_HEADER) $$files '$(DESTDIR)$(libicalvcalincludedir)'"; \ + $(INSTALL_HEADER) $$files "$(DESTDIR)$(libicalvcalincludedir)" || exit $$?; \ done uninstall-libicalvcalincludeHEADERS: @$(NORMAL_UNINSTALL) - @list='$(libicalvcalinclude_HEADERS)'; for p in $$list; do \ - f=$(am__strip_dir) \ - echo " rm -f '$(DESTDIR)$(libicalvcalincludedir)/$$f'"; \ - rm -f "$(DESTDIR)$(libicalvcalincludedir)/$$f"; \ - done + @list='$(libicalvcalinclude_HEADERS)'; test -n "$(libicalvcalincludedir)" || list=; \ + files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \ + dir='$(DESTDIR)$(libicalvcalincludedir)'; $(am__uninstall_files_from_dir) ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ - $(AWK) ' { files[$$0] = 1; } \ - END { for (i in files) print i; }'`; \ + $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ + END { if (nonempty) { for (i in files) print i; }; }'`; \ mkid -fID $$unique tags: TAGS TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) - tags=; \ + set x; \ here=`pwd`; \ list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ - $(AWK) ' { files[$$0] = 1; } \ - END { for (i in files) print i; }'`; \ - if test -z "$(ETAGS_ARGS)$$tags$$unique"; then :; else \ + $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ + END { if (nonempty) { for (i in files) print i; }; }'`; \ + shift; \ + if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ test -n "$$unique" || unique=$$empty_fix; \ - $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ - $$tags $$unique; \ + if test $$# -gt 0; then \ + $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ + "$$@" $$unique; \ + else \ + $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ + $$unique; \ + fi; \ fi ctags: CTAGS CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) - tags=; \ - here=`pwd`; \ list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ - $(AWK) ' { files[$$0] = 1; } \ - END { for (i in files) print i; }'`; \ - test -z "$(CTAGS_ARGS)$$tags$$unique" \ + $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ + END { if (nonempty) { for (i in files) print i; }; }'`; \ + test -z "$(CTAGS_ARGS)$$unique" \ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ - $$tags $$unique + $$unique GTAGS: here=`$(am__cd) $(top_builddir) && pwd` \ - && cd $(top_srcdir) \ - && gtags -i $(GTAGS_ARGS) $$here + && $(am__cd) $(top_srcdir) \ + && gtags -i $(GTAGS_ARGS) "$$here" + +cscopelist: $(HEADERS) $(SOURCES) $(LISP) + list='$(SOURCES) $(HEADERS) $(LISP)'; \ + case "$(srcdir)" in \ + [\\/]* | ?:[\\/]*) sdir="$(srcdir)" ;; \ + *) sdir=$(subdir)/$(srcdir) ;; \ + esac; \ + for i in $$list; do \ + if test -f "$$i"; then \ + echo "$(subdir)/$$i"; \ + else \ + echo "$$sdir/$$i"; \ + fi; \ + done >> $(top_builddir)/cscope.files distclean-tags: -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags distdir: $(DISTFILES) - @srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; \ - topsrcdirstrip=`echo "$(top_srcdir)" | sed 's|.|.|g'`; \ - list='$(DISTFILES)'; for file in $$list; do \ - case $$file in \ - $(srcdir)/*) file=`echo "$$file" | sed "s|^$$srcdirstrip/||"`;; \ - $(top_srcdir)/*) file=`echo "$$file" | sed "s|^$$topsrcdirstrip/|$(top_builddir)/|"`;; \ - esac; \ + @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ + topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ + list='$(DISTFILES)'; \ + dist_files=`for file in $$list; do echo $$file; done | \ + sed -e "s|^$$srcdirstrip/||;t" \ + -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ + case $$dist_files in \ + */*) $(MKDIR_P) `echo "$$dist_files" | \ + sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ + sort -u` ;; \ + esac; \ + for file in $$dist_files; do \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ - dir=`echo "$$file" | sed -e 's,/[^/]*$$,,'`; \ - if test "$$dir" != "$$file" && test "$$dir" != "."; then \ - dir="/$$dir"; \ - $(mkdir_p) "$(distdir)$$dir"; \ - else \ - dir=''; \ - fi; \ if test -d $$d/$$file; then \ + dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ + if test -d "$(distdir)/$$file"; then \ + find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ + fi; \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ - cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \ + cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ + find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ - cp -pR $$d/$$file $(distdir)$$dir || exit 1; \ + cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ else \ - test -f $(distdir)/$$file \ - || cp -p $$d/$$file $(distdir)/$$file \ + test -f "$(distdir)/$$file" \ + || cp -p $$d/$$file "$(distdir)/$$file" \ || exit 1; \ fi; \ done @@ -488,7 +562,7 @@ check: check-am all-am: Makefile $(LTLIBRARIES) $(HEADERS) installdirs: for dir in "$(DESTDIR)$(libdir)" "$(DESTDIR)$(libicalvcalincludedir)"; do \ - test -z "$$dir" || $(mkdir_p) "$$dir"; \ + test -z "$$dir" || $(MKDIR_P) "$$dir"; \ done install: install-am install-exec: install-exec-am @@ -500,16 +574,22 @@ install-am: all-am installcheck: installcheck-am install-strip: - $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ - install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ - `test -z '$(STRIP)' || \ - echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install + if test -z '$(STRIP)'; then \ + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + install; \ + else \ + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \ + fi mostlyclean-generic: clean-generic: distclean-generic: -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) + -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) maintainer-clean-generic: @echo "This command is intended for maintainers to use" @@ -520,11 +600,8 @@ clean: clean-am clean-am: clean-generic clean-libLTLIBRARIES clean-libtool \ mostlyclean-am -distclean: distclean-am - -rm -rf ./$(DEPDIR) - -rm -f Makefile distclean-am: clean-am distclean-compile distclean-generic \ - distclean-libtool distclean-tags + distclean-tags dvi: dvi-am @@ -532,18 +609,38 @@ dvi-am: html: html-am +html-am: + info: info-am info-am: install-data-am: install-libicalvcalincludeHEADERS +install-dvi: install-dvi-am + +install-dvi-am: + install-exec-am: install-libLTLIBRARIES +install-html: install-html-am + +install-html-am: + install-info: install-info-am +install-info-am: + install-man: +install-pdf: install-pdf-am + +install-pdf-am: + +install-ps: install-ps-am + +install-ps-am: + installcheck-am: maintainer-clean: maintainer-clean-am @@ -564,23 +661,30 @@ ps: ps-am ps-am: -uninstall-am: uninstall-info-am uninstall-libLTLIBRARIES \ +uninstall-am: uninstall-libLTLIBRARIES \ uninstall-libicalvcalincludeHEADERS +.MAKE: install-am install-strip + .PHONY: CTAGS GTAGS all all-am check check-am clean clean-generic \ - clean-libLTLIBRARIES clean-libtool ctags distclean \ + clean-libLTLIBRARIES clean-libtool cscopelist ctags distclean \ distclean-compile distclean-generic distclean-libtool \ distclean-tags distdir dvi dvi-am html html-am info info-am \ - install install-am install-data install-data-am install-exec \ - install-exec-am install-info install-info-am \ + install install-am install-data install-data-am install-dvi \ + install-dvi-am install-exec install-exec-am install-html \ + install-html-am install-info install-info-am \ install-libLTLIBRARIES install-libicalvcalincludeHEADERS \ - install-man install-strip installcheck installcheck-am \ + install-man install-pdf install-pdf-am install-ps \ + install-ps-am install-strip installcheck installcheck-am \ installdirs maintainer-clean maintainer-clean-generic \ mostlyclean mostlyclean-compile mostlyclean-generic \ mostlyclean-libtool pdf pdf-am ps ps-am tags uninstall \ - uninstall-am uninstall-info-am uninstall-libLTLIBRARIES \ + uninstall-am uninstall-libLTLIBRARIES \ uninstall-libicalvcalincludeHEADERS + +distclean: clean + # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. .NOEXPORT: diff --git a/src/libicalvcal/icalvcal.c b/src/libicalvcal/icalvcal.c index f495af2..4e88034 100644 --- a/src/libicalvcal/icalvcal.c +++ b/src/libicalvcal/icalvcal.c @@ -45,10 +45,15 @@ #include "icalvcal.h" #include <string.h> +#include <stddef.h> /* for ptrdiff_h */ -#ifdef WIN32 -#define snprintf _snprintf -#define strcasecmp stricmp +#if defined(_MSC_VER) +#define snprintf _snprintf +#define strcasecmp stricmp +#endif + +#ifdef _WIN32_WCE +#undef IGNORE #endif enum datatype { @@ -167,14 +172,17 @@ icalcomponent* icalvcal_convert_with_defaults (VObject *object, { char* name = (char*)vObjectName(object); - icalcomponent* container = icalcomponent_new(ICAL_XROOT_COMPONENT); + icalcomponent* container; icalcomponent* root; icalproperty *prop; icalerror_check_arg_rz( (object!=0),"Object"); + container = icalcomponent_new(ICAL_XROOT_COMPONENT); + /* The root object must be a VCALENDAR */ if(*name==0 || strcmp(name,VCCalProp) != 0){ + icalcomponent_free(container); return 0; /* HACK. Should return an error */ } @@ -357,6 +365,7 @@ static int get_alarm_properties (icalcomponent *comp, VObject *object, attach = icalattach_new_from_url (s); attach_prop = icalproperty_new_attach (attach); icalcomponent_add_property (comp, attach_prop); + icalattach_unref(attach); /* We output a "application/binary" FMTTYPE for Procedure alarms. */ @@ -468,6 +477,7 @@ static int get_alarm_properties (icalcomponent *comp, VObject *object, fmttype_param = icalparameter_new_fmttype (defaults->alarm_audio_fmttype); icalproperty_add_parameter (attach_prop, fmttype_param); + icalattach_unref(attach); } else { is_valid_alarm = 0; } @@ -526,7 +536,7 @@ static int get_alarm_properties (icalcomponent *comp, VObject *object, /* Check for Gnome Calendar, which will just save a pathname. */ if (url && url[0] == '/') { - int len; + size_t len; char *new_url; icalattach *new_attach; @@ -541,6 +551,7 @@ static int get_alarm_properties (icalcomponent *comp, VObject *object, free (new_url); icalproperty_set_attach (attach_prop, new_attach); + icalattach_unref(attach); } else { is_valid_alarm = 0; @@ -816,7 +827,7 @@ static char* rrule_parse_duration (char *s, struct icalrecurrencetype *recur, } else if (*s >= '0' && *s <= '9') { /* If it starts with a digit it must be the UNTIL date. */ char *e, buffer[20]; - int len; + ptrdiff_t len; /* Find the end of the date. */ e = s; @@ -859,7 +870,7 @@ static char* rrule_parse_duration (char *s, struct icalrecurrencetype *recur, /* It must be followed by whitespace or the end of the string. I'm not sure if anything else is allowed. */ - if (*s != '\0' && *s != ' ' && *s != '\t') { + if (s && *s != '\0' && *s != ' ' && *s != '\t') { *error_message = "Invalid Duration"; return NULL; } diff --git a/src/libicalvcal/vcc.c b/src/libicalvcal/vcc.c index 7f41ffe..7fcf662 100644 --- a/src/libicalvcal/vcc.c +++ b/src/libicalvcal/vcc.c @@ -1,117 +1,24 @@ -/* A Bison parser, made by GNU Bison 2.3. */ - -/* Skeleton implementation for Bison's Yacc-like parsers in C - - Copyright (C) 1984, 1989, 1990, 2000, 2001, 2002, 2003, 2004, 2005, 2006 - Free Software Foundation, Inc. - - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 2, or (at your option) - any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program; if not, write to the Free Software - Foundation, Inc., 51 Franklin Street, Fifth Floor, - Boston, MA 02110-1301, USA. */ - -/* As a special exception, you may create a larger work that contains - part or all of the Bison parser skeleton and distribute that work - under terms of your choice, so long as that work isn't itself a - parser generator using the skeleton or a modified version thereof - as a parser skeleton. Alternatively, if you modify or redistribute - the parser skeleton itself, you may (at your option) remove this - special exception, which will cause the skeleton and the resulting - Bison output files to be licensed under the GNU General Public - License without this special exception. - - This special exception was added by the Free Software Foundation in - version 2.2 of Bison. */ - -/* C LALR(1) parser skeleton written by Richard Stallman, by - simplifying the original so-called "semantic" parser. */ - -/* All symbols defined below should begin with yy or YY, to avoid - infringing on user name space. This should be done even for local - variables, as they might otherwise be expanded by user macros. - There are some unavoidable exceptions within include files to - define necessary library symbols; they are noted "INFRINGES ON - USER NAME SPACE" below. */ - -/* Identify Bison output. */ -#define YYBISON 1 - -/* Bison version. */ -#define YYBISON_VERSION "2.3" - -/* Skeleton name. */ -#define YYSKELETON_NAME "yacc.c" - -/* Pure parsers. */ -#define YYPURE 0 - -/* Using locations. */ -#define YYLSP_NEEDED 0 - - - -/* Tokens. */ -#ifndef YYTOKENTYPE -# define YYTOKENTYPE - /* Put the tokens into the symbol table, so that GDB and other debuggers - know about them. */ - enum yytokentype { - EQ = 258, - COLON = 259, - DOT = 260, - SEMICOLON = 261, - SPACE = 262, - HTAB = 263, - LINESEP = 264, - NEWLINE = 265, - BEGIN_VCARD = 266, - END_VCARD = 267, - BEGIN_VCAL = 268, - END_VCAL = 269, - BEGIN_VEVENT = 270, - END_VEVENT = 271, - BEGIN_VTODO = 272, - END_VTODO = 273, - ID = 274, - STRING = 275 - }; +#ifndef lint +static const char yysccsid[] = "@(#)yaccpar 1.9 (Berkeley) 02/21/93"; #endif -/* Tokens. */ -#define EQ 258 -#define COLON 259 -#define DOT 260 -#define SEMICOLON 261 -#define SPACE 262 -#define HTAB 263 -#define LINESEP 264 -#define NEWLINE 265 -#define BEGIN_VCARD 266 -#define END_VCARD 267 -#define BEGIN_VCAL 268 -#define END_VCAL 269 -#define BEGIN_VEVENT 270 -#define END_VEVENT 271 -#define BEGIN_VTODO 272 -#define END_VTODO 273 -#define ID 274 -#define STRING 275 +#include <stdlib.h> +#include <string.h> +#include <stddef.h> /* for ptrdiff_h */ +#define YYBYACC 1 +#define YYMAJOR 1 +#define YYMINOR 9 +#define YYPATCH 20070509 +#define YYEMPTY (-1) +#define yyclearin (yychar = YYEMPTY) +#define yyerrok (yyerrflag = 0) +#define YYRECOVERING (yyerrflag != 0) -/* Copy the first part of user declarations. */ -#line 1 "vcc.y" +extern int yyparse(void); +static int yygrowstack(void); /*************************************************************************** (C) Copyright 1996 Apple Computer, Inc., AT&T Corp., International @@ -169,8 +76,8 @@ DFARS 252.227-7013 or 48 CFR 52.227-19, as applicable. #define DBG_(x) #endif -#ifdef WIN32 -#define snprintf _snprintf +#if defined(_MSC_VER) +#define snprintf _snprintf #define strcasecmp stricmp #endif @@ -301,1699 +208,236 @@ static VObject* Parse_MIMEHelper(void); static VObject* popVObject(void); static int pushVObject(const char *prop); - - -/* Enabling traces. */ -#ifndef YYDEBUG -# define YYDEBUG 0 -#endif - -/* Enabling verbose error messages. */ -#ifdef YYERROR_VERBOSE -# undef YYERROR_VERBOSE -# define YYERROR_VERBOSE 1 -#else -# define YYERROR_VERBOSE 0 -#endif - -/* Enabling the token table. */ -#ifndef YYTOKEN_TABLE -# define YYTOKEN_TABLE 0 -#endif - -#if ! defined YYSTYPE && ! defined YYSTYPE_IS_DECLARED -typedef union YYSTYPE -#line 197 "vcc.y" -{ +typedef union { char *str; VObject *vobj; - } -/* Line 187 of yacc.c. */ -#line 333 "vcc.c" - YYSTYPE; -# define yystype YYSTYPE /* obsolescent; will be withdrawn */ -# define YYSTYPE_IS_DECLARED 1 -# define YYSTYPE_IS_TRIVIAL 1 -#endif - - - -/* Copy the second part of user declarations. */ - - -/* Line 216 of yacc.c. */ -#line 346 "vcc.c" - -#ifdef short -# undef short -#endif - -#ifdef YYTYPE_UINT8 -typedef YYTYPE_UINT8 yytype_uint8; -#else -typedef unsigned char yytype_uint8; -#endif - -#ifdef YYTYPE_INT8 -typedef YYTYPE_INT8 yytype_int8; -#elif (defined __STDC__ || defined __C99__FUNC__ \ - || defined __cplusplus || defined _MSC_VER) -typedef signed char yytype_int8; -#else -typedef short int yytype_int8; -#endif - -#ifdef YYTYPE_UINT16 -typedef YYTYPE_UINT16 yytype_uint16; -#else -typedef unsigned short int yytype_uint16; -#endif - -#ifdef YYTYPE_INT16 -typedef YYTYPE_INT16 yytype_int16; -#else -typedef short int yytype_int16; -#endif - -#ifndef YYSIZE_T -# ifdef __SIZE_TYPE__ -# define YYSIZE_T __SIZE_TYPE__ -# elif defined size_t -# define YYSIZE_T size_t -# elif ! defined YYSIZE_T && (defined __STDC__ || defined __C99__FUNC__ \ - || defined __cplusplus || defined _MSC_VER) -# include <stddef.h> /* INFRINGES ON USER NAME SPACE */ -# define YYSIZE_T size_t -# else -# define YYSIZE_T unsigned int -# endif -#endif - -#define YYSIZE_MAXIMUM ((YYSIZE_T) -1) - -#ifndef YY_ -# if YYENABLE_NLS -# if ENABLE_NLS -# include <libintl.h> /* INFRINGES ON USER NAME SPACE */ -# define YY_(msgid) dgettext ("bison-runtime", msgid) -# endif -# endif -# ifndef YY_ -# define YY_(msgid) msgid -# endif -#endif - -/* Suppress unused-variable warnings by "using" E. */ -#if ! defined lint || defined __GNUC__ -# define YYUSE(e) ((void) (e)) -#else -# define YYUSE(e) /* empty */ -#endif - -/* Identity function, used to suppress warnings about constant conditions. */ -#ifndef lint -# define YYID(n) (n) -#else -#if (defined __STDC__ || defined __C99__FUNC__ \ - || defined __cplusplus || defined _MSC_VER) -static int -YYID (int i) -#else -static int -YYID (i) - int i; -#endif -{ - return i; -} -#endif - -#if ! defined yyoverflow || YYERROR_VERBOSE - -/* The parser invokes alloca or malloc; define the necessary symbols. */ - -# ifdef YYSTACK_USE_ALLOCA -# if YYSTACK_USE_ALLOCA -# ifdef __GNUC__ -# define YYSTACK_ALLOC __builtin_alloca -# elif defined __BUILTIN_VA_ARG_INCR -# include <alloca.h> /* INFRINGES ON USER NAME SPACE */ -# elif defined _AIX -# define YYSTACK_ALLOC __alloca -# elif defined _MSC_VER -# include <malloc.h> /* INFRINGES ON USER NAME SPACE */ -# define alloca _alloca -# else -# define YYSTACK_ALLOC alloca -# if ! defined _ALLOCA_H && ! defined _STDLIB_H && (defined __STDC__ || defined __C99__FUNC__ \ - || defined __cplusplus || defined _MSC_VER) -# include <stdlib.h> /* INFRINGES ON USER NAME SPACE */ -# ifndef _STDLIB_H -# define _STDLIB_H 1 -# endif -# endif -# endif -# endif -# endif - -# ifdef YYSTACK_ALLOC - /* Pacify GCC's `empty if-body' warning. */ -# define YYSTACK_FREE(Ptr) do { /* empty */; } while (YYID (0)) -# ifndef YYSTACK_ALLOC_MAXIMUM - /* The OS might guarantee only one guard page at the bottom of the stack, - and a page size can be as small as 4096 bytes. So we cannot safely - invoke alloca (N) if N exceeds 4096. Use a slightly smaller number - to allow for a few compiler-allocated temporary stack slots. */ -# define YYSTACK_ALLOC_MAXIMUM 4032 /* reasonable circa 2006 */ -# endif -# else -# define YYSTACK_ALLOC YYMALLOC -# define YYSTACK_FREE YYFREE -# ifndef YYSTACK_ALLOC_MAXIMUM -# define YYSTACK_ALLOC_MAXIMUM YYSIZE_MAXIMUM -# endif -# if (defined __cplusplus && ! defined _STDLIB_H \ - && ! ((defined YYMALLOC || defined malloc) \ - && (defined YYFREE || defined free))) -# include <stdlib.h> /* INFRINGES ON USER NAME SPACE */ -# ifndef _STDLIB_H -# define _STDLIB_H 1 -# endif -# endif -# ifndef YYMALLOC -# define YYMALLOC malloc -# if ! defined malloc && ! defined _STDLIB_H && (defined __STDC__ || defined __C99__FUNC__ \ - || defined __cplusplus || defined _MSC_VER) -void *malloc (YYSIZE_T); /* INFRINGES ON USER NAME SPACE */ -# endif -# endif -# ifndef YYFREE -# define YYFREE free -# if ! defined free && ! defined _STDLIB_H && (defined __STDC__ || defined __C99__FUNC__ \ - || defined __cplusplus || defined _MSC_VER) -void free (void *); /* INFRINGES ON USER NAME SPACE */ -# endif -# endif -# endif -#endif /* ! defined yyoverflow || YYERROR_VERBOSE */ - - -#if (! defined yyoverflow \ - && (! defined __cplusplus \ - || (defined YYSTYPE_IS_TRIVIAL && YYSTYPE_IS_TRIVIAL))) - -/* A type that is properly aligned for any stack member. */ -union yyalloc -{ - yytype_int16 yyss; - YYSTYPE yyvs; - }; - -/* The size of the maximum gap between one aligned stack and the next. */ -# define YYSTACK_GAP_MAXIMUM (sizeof (union yyalloc) - 1) - -/* The size of an array large to enough to hold all stacks, each with - N elements. */ -# define YYSTACK_BYTES(N) \ - ((N) * (sizeof (yytype_int16) + sizeof (YYSTYPE)) \ - + YYSTACK_GAP_MAXIMUM) - -/* Copy COUNT objects from FROM to TO. The source and destination do - not overlap. */ -# ifndef YYCOPY -# if defined __GNUC__ && 1 < __GNUC__ -# define YYCOPY(To, From, Count) \ - __builtin_memcpy (To, From, (Count) * sizeof (*(From))) -# else -# define YYCOPY(To, From, Count) \ - do \ - { \ - YYSIZE_T yyi; \ - for (yyi = 0; yyi < (Count); yyi++) \ - (To)[yyi] = (From)[yyi]; \ - } \ - while (YYID (0)) -# endif -# endif - -/* Relocate STACK from its old location to the new one. The - local variables YYSIZE and YYSTACKSIZE give the old and new number of - elements in the stack, and YYPTR gives the new location of the - stack. Advance YYPTR to a properly aligned location for the next - stack. */ -# define YYSTACK_RELOCATE(Stack) \ - do \ - { \ - YYSIZE_T yynewbytes; \ - YYCOPY (&yyptr->Stack, Stack, yysize); \ - Stack = &yyptr->Stack; \ - yynewbytes = yystacksize * sizeof (*Stack) + YYSTACK_GAP_MAXIMUM; \ - yyptr += yynewbytes / sizeof (*yyptr); \ - } \ - while (YYID (0)) - -#endif - -/* YYFINAL -- State number of the termination state. */ -#define YYFINAL 12 -/* YYLAST -- Last index in YYTABLE. */ -#define YYLAST 56 - -/* YYNTOKENS -- Number of terminals. */ -#define YYNTOKENS 21 -/* YYNNTS -- Number of nonterminals. */ -#define YYNNTS 31 -/* YYNRULES -- Number of rules. */ -#define YYNRULES 47 -/* YYNRULES -- Number of states. */ -#define YYNSTATES 62 - -/* YYTRANSLATE(YYLEX) -- Bison symbol number corresponding to YYLEX. */ -#define YYUNDEFTOK 2 -#define YYMAXUTOK 275 - -#define YYTRANSLATE(YYX) \ - ((unsigned int) (YYX) <= YYMAXUTOK ? yytranslate[YYX] : YYUNDEFTOK) - -/* YYTRANSLATE[YYLEX] -- Bison symbol number corresponding to YYLEX. */ -static const yytype_uint8 yytranslate[] = -{ - 0, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 1, 2, 3, 4, - 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, - 15, 16, 17, 18, 19, 20 -}; - -#if YYDEBUG -/* YYPRHS[YYN] -- Index of the first RHS symbol of rule number YYN in - YYRHS. */ -static const yytype_uint8 yyprhs[] = -{ - 0, 0, 3, 5, 6, 10, 12, 14, 16, 17, - 22, 23, 27, 30, 32, 33, 39, 41, 42, 46, - 48, 51, 53, 56, 58, 62, 64, 65, 70, 72, - 74, 75, 76, 81, 82, 86, 89, 91, 93, 95, - 97, 98, 103, 104, 108, 109, 114, 115 -}; - -/* YYRHS -- A `-1'-separated list of the rules' RHS. */ -static const yytype_int8 yyrhs[] = -{ - 22, 0, -1, 23, -1, -1, 25, 24, 23, -1, - 25, -1, 26, -1, 41, -1, -1, 11, 27, 29, - 12, -1, -1, 11, 28, 12, -1, 30, 29, -1, - 30, -1, -1, 32, 4, 31, 38, 9, -1, 1, - -1, -1, 37, 33, 34, -1, 37, -1, 35, 34, - -1, 35, -1, 6, 36, -1, 37, -1, 37, 3, - 37, -1, 19, -1, -1, 40, 6, 39, 38, -1, - 40, -1, 20, -1, -1, -1, 13, 42, 44, 14, - -1, -1, 13, 43, 14, -1, 45, 44, -1, 45, - -1, 46, -1, 49, -1, 29, -1, -1, 15, 47, - 29, 16, -1, -1, 15, 48, 16, -1, -1, 17, - 50, 29, 18, -1, -1, 17, 51, 18, -1 -}; - -/* YYRLINE[YYN] -- source line where rule number YYN was defined. */ -static const yytype_uint16 yyrline[] = -{ - 0, 225, 225, 229, 228, 231, 235, 236, 241, 240, - 251, 250, 262, 263, 267, 266, 276, 280, 279, 284, - 290, 291, 294, 297, 301, 308, 311, 311, 312, 316, - 317, 322, 321, 327, 326, 332, 333, 337, 338, 339, - 344, 343, 355, 354, 368, 367, 379, 378 + } YYSTYPE; +#define EQ 257 +#define COLON 258 +#define DOT 259 +#define SEMICOLON 260 +#define SPACE 261 +#define HTAB 262 +#define LINESEP 263 +#define NEWLINE 264 +#define BEGIN_VCARD 265 +#define END_VCARD 266 +#define BEGIN_VCAL 267 +#define END_VCAL 268 +#define BEGIN_VEVENT 269 +#define END_VEVENT 270 +#define BEGIN_VTODO 271 +#define END_VTODO 272 +#define ID 273 +#define STRING 274 +#define YYERRCODE 256 +short yylhs[] = { -1, + 0, 7, 6, 6, 5, 5, 9, 3, 10, 3, + 8, 8, 14, 11, 11, 16, 12, 12, 15, 15, + 17, 18, 18, 1, 19, 13, 13, 2, 2, 21, + 4, 22, 4, 20, 20, 23, 23, 23, 26, 24, + 27, 24, 28, 25, 29, 25, }; -#endif - -#if YYDEBUG || YYERROR_VERBOSE || YYTOKEN_TABLE -/* YYTNAME[SYMBOL-NUM] -- String name of the symbol SYMBOL-NUM. - First, the terminals, then, starting at YYNTOKENS, nonterminals. */ -static const char *const yytname[] = -{ - "$end", "error", "$undefined", "EQ", "COLON", "DOT", "SEMICOLON", - "SPACE", "HTAB", "LINESEP", "NEWLINE", "BEGIN_VCARD", "END_VCARD", - "BEGIN_VCAL", "END_VCAL", "BEGIN_VEVENT", "END_VEVENT", "BEGIN_VTODO", - "END_VTODO", "ID", "STRING", "$accept", "mime", "vobjects", "@1", - "vobject", "vcard", "@2", "@3", "items", "item", "@4", "prop", "@5", - "attr_params", "attr_param", "attr", "name", "values", "@6", "value", - "vcal", "@7", "@8", "calitems", "calitem", "eventitem", "@9", "@10", - "todoitem", "@11", "@12", 0 +short yylen[] = { 2, + 1, 0, 3, 1, 1, 1, 0, 4, 0, 3, + 2, 1, 0, 5, 1, 0, 3, 1, 2, 1, + 2, 1, 3, 1, 0, 4, 1, 1, 0, 0, + 4, 0, 3, 2, 1, 1, 1, 1, 0, 4, + 0, 3, 0, 4, 0, 3, }; -#endif - -# ifdef YYPRINT -/* YYTOKNUM[YYLEX-NUM] -- Internal token number corresponding to - token YYLEX-NUM. */ -static const yytype_uint16 yytoknum[] = -{ - 0, 256, 257, 258, 259, 260, 261, 262, 263, 264, - 265, 266, 267, 268, 269, 270, 271, 272, 273, 274, - 275 +short yydefred[] = { 0, + 0, 0, 0, 5, 6, 0, 1, 0, 0, 0, + 0, 0, 15, 24, 0, 0, 0, 0, 10, 0, + 0, 38, 0, 0, 36, 37, 33, 3, 0, 8, + 11, 13, 0, 0, 0, 0, 31, 34, 0, 17, + 0, 0, 0, 42, 0, 46, 0, 21, 19, 28, + 0, 0, 40, 44, 0, 25, 14, 23, 0, 26, }; -# endif - -/* YYR1[YYN] -- Symbol number of symbol that rule YYN derives. */ -static const yytype_uint8 yyr1[] = -{ - 0, 21, 22, 24, 23, 23, 25, 25, 27, 26, - 28, 26, 29, 29, 31, 30, 30, 33, 32, 32, - 34, 34, 35, 36, 36, 37, 39, 38, 38, 40, - 40, 42, 41, 43, 41, 44, 44, 45, 45, 45, - 47, 46, 48, 46, 50, 49, 51, 49 +short yydgoto[] = { 3, + 15, 51, 4, 5, 6, 7, 12, 22, 8, 9, + 17, 18, 52, 42, 40, 29, 41, 48, 59, 23, + 10, 11, 24, 25, 26, 33, 34, 35, 36, }; - -/* YYR2[YYN] -- Number of symbols composing right hand side of rule YYN. */ -static const yytype_uint8 yyr2[] = -{ - 0, 2, 1, 0, 3, 1, 1, 1, 0, 4, - 0, 3, 2, 1, 0, 5, 1, 0, 3, 1, - 2, 1, 2, 1, 3, 1, 0, 4, 1, 1, - 0, 0, 4, 0, 3, 2, 1, 1, 1, 1, - 0, 4, 0, 3, 0, 4, 0, 3 +short yysindex[] = { -227, + 0, 0, 0, 0, 0, 0, 0, -249, -262, -253, + -258, -227, 0, 0, 0, -234, -249, -215, 0, 0, + 0, 0, -223, -253, 0, 0, 0, 0, -247, 0, + 0, 0, -249, -222, -249, -225, 0, 0, -224, 0, + -247, -221, -220, 0, -218, 0, -206, 0, 0, 0, + -208, -207, 0, 0, -224, 0, 0, 0, -221, 0, }; - -/* YYDEFACT[STATE-NAME] -- Default rule to reduce with in state - STATE-NUM when YYTABLE doesn't specify something else to do. Zero - means the default is an error. */ -static const yytype_uint8 yydefact[] = -{ - 0, 8, 31, 0, 2, 3, 6, 7, 0, 0, - 0, 0, 1, 0, 16, 25, 0, 0, 0, 17, - 11, 40, 44, 39, 0, 0, 37, 38, 34, 4, - 9, 12, 14, 0, 0, 0, 0, 0, 32, 35, - 30, 0, 18, 21, 0, 43, 0, 47, 29, 0, - 28, 22, 23, 20, 41, 45, 15, 26, 0, 30, - 24, 27 +short yyrindex[] = { 0, + -245, -254, 0, 0, 0, 1, 0, 0, 0, 0, + 0, 0, 0, 0, -219, 0, -235, 0, 0, -244, + -250, 0, 0, -213, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + -201, -255, 0, 0, 0, 0, -216, 0, 0, 0, + -205, 0, 0, 0, 0, 0, 0, 0, -255, 0, }; - -/* YYDEFGOTO[NTERM-NUM]. */ -static const yytype_int8 yydefgoto[] = -{ - -1, 3, 4, 13, 5, 6, 8, 9, 23, 17, - 40, 18, 33, 42, 43, 51, 19, 49, 59, 50, - 7, 10, 11, 24, 25, 26, 34, 35, 27, 36, - 37 +short yygindex[] = { 0, + -9, 0, 0, 0, 0, 47, 0, -8, 0, 0, + 0, 0, 2, 0, 19, 0, 0, 0, 0, 38, + 0, 0, 0, 0, 0, 0, 0, 0, 0, }; - -/* YYPACT[STATE-NUM] -- Index in YYTABLE of the portion describing - STATE-NUM. */ -#define YYPACT_NINF -18 -static const yytype_int8 yypact[] = -{ - -5, -10, -11, 5, -18, 10, -18, -18, 3, -1, - 12, 16, -18, -5, -18, -18, 20, 0, 29, 30, - -18, 19, 18, -18, 23, 6, -18, -18, -18, -18, - -18, -18, -18, 32, 3, 24, 3, 21, -18, -18, - 22, 25, -18, 32, 27, -18, 28, -18, -18, 36, - 41, -18, 45, -18, -18, -18, -18, -18, 25, 22, - -18, -18 +#define YYTABLESIZE 268 +short yytable[] = { 16, + 4, 30, 13, 19, 29, 43, 13, 29, 31, 27, + 7, 39, 39, 32, 30, 20, 30, 21, 30, 14, + 9, 45, 43, 14, 43, 41, 45, 7, 39, 47, + 12, 30, 12, 12, 12, 12, 12, 1, 18, 2, + 16, 22, 32, 22, 37, 58, 46, 44, 14, 53, + 55, 56, 50, 54, 35, 57, 20, 27, 28, 49, + 60, 38, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 2, 0, 2, }; - -/* YYPGOTO[NTERM-NUM]. */ -static const yytype_int8 yypgoto[] = -{ - -18, -18, 37, -18, -18, -18, -18, -18, -8, -18, - -18, -18, -18, 8, -18, -18, -17, -7, -18, -18, - -18, -18, -18, 31, -18, -18, -18, -18, -18, -18, - -18 -}; - -/* YYTABLE[YYPACT[STATE-NUM]]. What to do in state STATE-NUM. If - positive, shift that token. If negative, reduce the rule which - number is the opposite. If zero, do what YYDEFACT says. - If YYTABLE_NINF, syntax error. */ -#define YYTABLE_NINF -47 -static const yytype_int8 yytable[] = -{ - 16, 14, -10, -33, 14, 12, 1, 14, 2, 31, - -5, 20, -13, 14, -13, -13, -13, -13, -13, 15, - -36, 21, 15, 22, 52, 15, 44, 21, 46, 22, - 28, 15, 30, 32, -19, -42, -46, 38, 41, 47, - 45, 60, 48, 54, 15, 56, 55, 57, 58, 0, - 29, 53, 61, 0, 0, 0, 39 +short yycheck[] = { 8, + 0, 256, 256, 266, 260, 256, 256, 263, 17, 268, + 256, 256, 260, 268, 269, 269, 271, 271, 273, 273, + 266, 272, 273, 273, 33, 270, 35, 273, 273, 39, + 266, 266, 268, 269, 270, 271, 272, 265, 258, 267, + 260, 258, 258, 260, 268, 55, 272, 270, 273, 270, + 257, 260, 274, 272, 268, 263, 258, 263, 12, 41, + 59, 24, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, 265, -1, 267, }; - -static const yytype_int8 yycheck[] = -{ - 8, 1, 12, 14, 1, 0, 11, 1, 13, 17, - 0, 12, 12, 1, 14, 15, 16, 17, 18, 19, - 14, 15, 19, 17, 41, 19, 34, 15, 36, 17, - 14, 19, 12, 4, 4, 16, 18, 14, 6, 18, - 16, 58, 20, 16, 19, 9, 18, 6, 3, -1, - 13, 43, 59, -1, -1, -1, 25 +#define YYFINAL 3 +#ifndef YYDEBUG +#define YYDEBUG 0 +#endif +#define YYMAXTOKEN 274 +#if YYDEBUG +char *yyname[] = { +"end-of-file",0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,"EQ","COLON","DOT","SEMICOLON", +"SPACE","HTAB","LINESEP","NEWLINE","BEGIN_VCARD","END_VCARD","BEGIN_VCAL", +"END_VCAL","BEGIN_VEVENT","END_VEVENT","BEGIN_VTODO","END_VTODO","ID","STRING", }; - -/* YYSTOS[STATE-NUM] -- The (internal number of the) accessing - symbol of state STATE-NUM. */ -static const yytype_uint8 yystos[] = -{ - 0, 11, 13, 22, 23, 25, 26, 41, 27, 28, - 42, 43, 0, 24, 1, 19, 29, 30, 32, 37, - 12, 15, 17, 29, 44, 45, 46, 49, 14, 23, - 12, 29, 4, 33, 47, 48, 50, 51, 14, 44, - 31, 6, 34, 35, 29, 16, 29, 18, 20, 38, - 40, 36, 37, 34, 16, 18, 9, 6, 3, 39, - 37, 38 +char *yyrule[] = { +"$accept : mime", +"mime : vobjects", +"$$1 :", +"vobjects : vobject $$1 vobjects", +"vobjects : vobject", +"vobject : vcard", +"vobject : vcal", +"$$2 :", +"vcard : BEGIN_VCARD $$2 items END_VCARD", +"$$3 :", +"vcard : BEGIN_VCARD $$3 END_VCARD", +"items : item items", +"items : item", +"$$4 :", +"item : prop COLON $$4 values LINESEP", +"item : error", +"$$5 :", +"prop : name $$5 attr_params", +"prop : name", +"attr_params : attr_param attr_params", +"attr_params : attr_param", +"attr_param : SEMICOLON attr", +"attr : name", +"attr : name EQ name", +"name : ID", +"$$6 :", +"values : value SEMICOLON $$6 values", +"values : value", +"value : STRING", +"value :", +"$$7 :", +"vcal : BEGIN_VCAL $$7 calitems END_VCAL", +"$$8 :", +"vcal : BEGIN_VCAL $$8 END_VCAL", +"calitems : calitem calitems", +"calitems : calitem", +"calitem : eventitem", +"calitem : todoitem", +"calitem : items", +"$$9 :", +"eventitem : BEGIN_VEVENT $$9 items END_VEVENT", +"$$10 :", +"eventitem : BEGIN_VEVENT $$10 END_VEVENT", +"$$11 :", +"todoitem : BEGIN_VTODO $$11 items END_VTODO", +"$$12 :", +"todoitem : BEGIN_VTODO $$12 END_VTODO", }; - -#define yyerrok (yyerrstatus = 0) -#define yyclearin (yychar = YYEMPTY) -#define YYEMPTY (-2) -#define YYEOF 0 - -#define YYACCEPT goto yyacceptlab -#define YYABORT goto yyabortlab -#define YYERROR goto yyerrorlab - - -/* Like YYERROR except do call yyerror. This remains here temporarily - to ease the transition to the new meaning of YYERROR, for GCC. - Once GCC version 2 has supplanted version 1, this can go. */ - -#define YYFAIL goto yyerrlab - -#define YYRECOVERING() (!!yyerrstatus) - -#define YYBACKUP(Token, Value) \ -do \ - if (yychar == YYEMPTY && yylen == 1) \ - { \ - yychar = (Token); \ - yylval = (Value); \ - yytoken = YYTRANSLATE (yychar); \ - YYPOPSTACK (1); \ - goto yybackup; \ - } \ - else \ - { \ - yyerror (YY_("syntax error: cannot back up")); \ - YYERROR; \ - } \ -while (YYID (0)) - - -#define YYTERROR 1 -#define YYERRCODE 256 - - -/* YYLLOC_DEFAULT -- Set CURRENT to span from RHS[1] to RHS[N]. - If N is 0, then set CURRENT to the empty location which ends - the previous symbol: RHS[0] (always defined). */ - -#define YYRHSLOC(Rhs, K) ((Rhs)[K]) -#ifndef YYLLOC_DEFAULT -# define YYLLOC_DEFAULT(Current, Rhs, N) \ - do \ - if (YYID (N)) \ - { \ - (Current).first_line = YYRHSLOC (Rhs, 1).first_line; \ - (Current).first_column = YYRHSLOC (Rhs, 1).first_column; \ - (Current).last_line = YYRHSLOC (Rhs, N).last_line; \ - (Current).last_column = YYRHSLOC (Rhs, N).last_column; \ - } \ - else \ - { \ - (Current).first_line = (Current).last_line = \ - YYRHSLOC (Rhs, 0).last_line; \ - (Current).first_column = (Current).last_column = \ - YYRHSLOC (Rhs, 0).last_column; \ - } \ - while (YYID (0)) -#endif - - -/* YY_LOCATION_PRINT -- Print the location on the stream. - This macro was not mandated originally: define only if we know - we won't break user code: when these are the locations we know. */ - -#ifndef YY_LOCATION_PRINT -# if YYLTYPE_IS_TRIVIAL -# define YY_LOCATION_PRINT(File, Loc) \ - fprintf (File, "%d.%d-%d.%d", \ - (Loc).first_line, (Loc).first_column, \ - (Loc).last_line, (Loc).last_column) -# else -# define YY_LOCATION_PRINT(File, Loc) ((void) 0) -# endif #endif - - -/* YYLEX -- calling `yylex' with the right arguments. */ - -#ifdef YYLEX_PARAM -# define YYLEX yylex (YYLEX_PARAM) -#else -# define YYLEX yylex () -#endif - -/* Enable debugging if requested. */ #if YYDEBUG - -# ifndef YYFPRINTF -# include <stdio.h> /* INFRINGES ON USER NAME SPACE */ -# define YYFPRINTF fprintf -# endif - -# define YYDPRINTF(Args) \ -do { \ - if (yydebug) \ - YYFPRINTF Args; \ -} while (YYID (0)) - -# define YY_SYMBOL_PRINT(Title, Type, Value, Location) \ -do { \ - if (yydebug) \ - { \ - YYFPRINTF (stderr, "%s ", Title); \ - yy_symbol_print (stderr, \ - Type, Value); \ - YYFPRINTF (stderr, "\n"); \ - } \ -} while (YYID (0)) - - -/*--------------------------------. -| Print this symbol on YYOUTPUT. | -`--------------------------------*/ - -/*ARGSUSED*/ -#if (defined __STDC__ || defined __C99__FUNC__ \ - || defined __cplusplus || defined _MSC_VER) -static void -yy_symbol_value_print (FILE *yyoutput, int yytype, YYSTYPE const * const yyvaluep) -#else -static void -yy_symbol_value_print (yyoutput, yytype, yyvaluep) - FILE *yyoutput; - int yytype; - YYSTYPE const * const yyvaluep; -#endif -{ - if (!yyvaluep) - return; -# ifdef YYPRINT - if (yytype < YYNTOKENS) - YYPRINT (yyoutput, yytoknum[yytype], *yyvaluep); -# else - YYUSE (yyoutput); -# endif - switch (yytype) - { - default: - break; - } -} - - -/*--------------------------------. -| Print this symbol on YYOUTPUT. | -`--------------------------------*/ - -#if (defined __STDC__ || defined __C99__FUNC__ \ - || defined __cplusplus || defined _MSC_VER) -static void -yy_symbol_print (FILE *yyoutput, int yytype, YYSTYPE const * const yyvaluep) -#else -static void -yy_symbol_print (yyoutput, yytype, yyvaluep) - FILE *yyoutput; - int yytype; - YYSTYPE const * const yyvaluep; -#endif -{ - if (yytype < YYNTOKENS) - YYFPRINTF (yyoutput, "token %s (", yytname[yytype]); - else - YYFPRINTF (yyoutput, "nterm %s (", yytname[yytype]); - - yy_symbol_value_print (yyoutput, yytype, yyvaluep); - YYFPRINTF (yyoutput, ")"); -} - -/*------------------------------------------------------------------. -| yy_stack_print -- Print the state stack from its BOTTOM up to its | -| TOP (included). | -`------------------------------------------------------------------*/ - -#if (defined __STDC__ || defined __C99__FUNC__ \ - || defined __cplusplus || defined _MSC_VER) -static void -yy_stack_print (yytype_int16 *bottom, yytype_int16 *top) -#else -static void -yy_stack_print (bottom, top) - yytype_int16 *bottom; - yytype_int16 *top; -#endif -{ - YYFPRINTF (stderr, "Stack now"); - for (; bottom <= top; ++bottom) - YYFPRINTF (stderr, " %d", *bottom); - YYFPRINTF (stderr, "\n"); -} - -# define YY_STACK_PRINT(Bottom, Top) \ -do { \ - if (yydebug) \ - yy_stack_print ((Bottom), (Top)); \ -} while (YYID (0)) - - -/*------------------------------------------------. -| Report that the YYRULE is going to be reduced. | -`------------------------------------------------*/ - -#if (defined __STDC__ || defined __C99__FUNC__ \ - || defined __cplusplus || defined _MSC_VER) -static void -yy_reduce_print (YYSTYPE *yyvsp, int yyrule) -#else -static void -yy_reduce_print (yyvsp, yyrule) - YYSTYPE *yyvsp; - int yyrule; -#endif -{ - int yynrhs = yyr2[yyrule]; - int yyi; - unsigned long int yylno = yyrline[yyrule]; - YYFPRINTF (stderr, "Reducing stack by rule %d (line %lu):\n", - yyrule - 1, yylno); - /* The symbols being reduced. */ - for (yyi = 0; yyi < yynrhs; yyi++) - { - fprintf (stderr, " $%d = ", yyi + 1); - yy_symbol_print (stderr, yyrhs[yyprhs[yyrule] + yyi], - &(yyvsp[(yyi + 1) - (yynrhs)]) - ); - fprintf (stderr, "\n"); - } -} - -# define YY_REDUCE_PRINT(Rule) \ -do { \ - if (yydebug) \ - yy_reduce_print (yyvsp, Rule); \ -} while (YYID (0)) - -/* Nonzero means print parse trace. It is left uninitialized so that - multiple parsers can coexist. */ -int yydebug; -#else /* !YYDEBUG */ -# define YYDPRINTF(Args) -# define YY_SYMBOL_PRINT(Title, Type, Value, Location) -# define YY_STACK_PRINT(Bottom, Top) -# define YY_REDUCE_PRINT(Rule) -#endif /* !YYDEBUG */ - - -/* YYINITDEPTH -- initial size of the parser's stacks. */ -#ifndef YYINITDEPTH -# define YYINITDEPTH 200 -#endif - -/* YYMAXDEPTH -- maximum size the stacks can grow to (effective only - if the built-in stack extension method is used). - - Do not make this value too large; the results are undefined if - YYSTACK_ALLOC_MAXIMUM < YYSTACK_BYTES (YYMAXDEPTH) - evaluated with infinite-precision integer arithmetic. */ - -#ifndef YYMAXDEPTH -# define YYMAXDEPTH 10000 -#endif - - - -#if YYERROR_VERBOSE - -# ifndef yystrlen -# if defined __GLIBC__ && defined _STRING_H -# define yystrlen strlen -# else -/* Return the length of YYSTR. */ -#if (defined __STDC__ || defined __C99__FUNC__ \ - || defined __cplusplus || defined _MSC_VER) -static YYSIZE_T -yystrlen (const char *yystr) -#else -static YYSIZE_T -yystrlen (yystr) - const char *yystr; -#endif -{ - YYSIZE_T yylen; - for (yylen = 0; yystr[yylen]; yylen++) - continue; - return yylen; -} -# endif -# endif - -# ifndef yystpcpy -# if defined __GLIBC__ && defined _STRING_H && defined _GNU_SOURCE -# define yystpcpy stpcpy -# else -/* Copy YYSRC to YYDEST, returning the address of the terminating '\0' in - YYDEST. */ -#if (defined __STDC__ || defined __C99__FUNC__ \ - || defined __cplusplus || defined _MSC_VER) -static char * -yystpcpy (char *yydest, const char *yysrc) -#else -static char * -yystpcpy (yydest, yysrc) - char *yydest; - const char *yysrc; -#endif -{ - char *yyd = yydest; - const char *yys = yysrc; - - while ((*yyd++ = *yys++) != '\0') - continue; - - return yyd - 1; -} -# endif -# endif - -# ifndef yytnamerr -/* Copy to YYRES the contents of YYSTR after stripping away unnecessary - quotes and backslashes, so that it's suitable for yyerror. The - heuristic is that double-quoting is unnecessary unless the string - contains an apostrophe, a comma, or backslash (other than - backslash-backslash). YYSTR is taken from yytname. If YYRES is - null, do not copy; instead, return the length of what the result - would have been. */ -static YYSIZE_T -yytnamerr (char *yyres, const char *yystr) -{ - if (*yystr == '"') - { - YYSIZE_T yyn = 0; - char const *yyp = yystr; - - for (;;) - switch (*++yyp) - { - case '\'': - case ',': - goto do_not_strip_quotes; - - case '\\': - if (*++yyp != '\\') - goto do_not_strip_quotes; - /* Fall through. */ - default: - if (yyres) - yyres[yyn] = *yyp; - yyn++; - break; - - case '"': - if (yyres) - yyres[yyn] = '\0'; - return yyn; - } - do_not_strip_quotes: ; - } - - if (! yyres) - return yystrlen (yystr); - - return yystpcpy (yyres, yystr) - yyres; -} -# endif - -/* Copy into YYRESULT an error message about the unexpected token - YYCHAR while in state YYSTATE. Return the number of bytes copied, - including the terminating null byte. If YYRESULT is null, do not - copy anything; just return the number of bytes that would be - copied. As a special case, return 0 if an ordinary "syntax error" - message will do. Return YYSIZE_MAXIMUM if overflow occurs during - size calculation. */ -static YYSIZE_T -yysyntax_error (char *yyresult, int yystate, int yychar) -{ - int yyn = yypact[yystate]; - - if (! (YYPACT_NINF < yyn && yyn <= YYLAST)) - return 0; - else - { - int yytype = YYTRANSLATE (yychar); - YYSIZE_T yysize0 = yytnamerr (0, yytname[yytype]); - YYSIZE_T yysize = yysize0; - YYSIZE_T yysize1; - int yysize_overflow = 0; - enum { YYERROR_VERBOSE_ARGS_MAXIMUM = 5 }; - char const *yyarg[YYERROR_VERBOSE_ARGS_MAXIMUM]; - int yyx; - -# if 0 - /* This is so xgettext sees the translatable formats that are - constructed on the fly. */ - YY_("syntax error, unexpected %s"); - YY_("syntax error, unexpected %s, expecting %s"); - YY_("syntax error, unexpected %s, expecting %s or %s"); - YY_("syntax error, unexpected %s, expecting %s or %s or %s"); - YY_("syntax error, unexpected %s, expecting %s or %s or %s or %s"); -# endif - char *yyfmt; - char const *yyf; - static char const yyunexpected[] = "syntax error, unexpected %s"; - static char const yyexpecting[] = ", expecting %s"; - static char const yyor[] = " or %s"; - char yyformat[sizeof yyunexpected - + sizeof yyexpecting - 1 - + ((YYERROR_VERBOSE_ARGS_MAXIMUM - 2) - * (sizeof yyor - 1))]; - char const *yyprefix = yyexpecting; - - /* Start YYX at -YYN if negative to avoid negative indexes in - YYCHECK. */ - int yyxbegin = yyn < 0 ? -yyn : 0; - - /* Stay within bounds of both yycheck and yytname. */ - int yychecklim = YYLAST - yyn + 1; - int yyxend = yychecklim < YYNTOKENS ? yychecklim : YYNTOKENS; - int yycount = 1; - - yyarg[0] = yytname[yytype]; - yyfmt = yystpcpy (yyformat, yyunexpected); - - for (yyx = yyxbegin; yyx < yyxend; ++yyx) - if (yycheck[yyx + yyn] == yyx && yyx != YYTERROR) - { - if (yycount == YYERROR_VERBOSE_ARGS_MAXIMUM) - { - yycount = 1; - yysize = yysize0; - yyformat[sizeof yyunexpected - 1] = '\0'; - break; - } - yyarg[yycount++] = yytname[yyx]; - yysize1 = yysize + yytnamerr (0, yytname[yyx]); - yysize_overflow |= (yysize1 < yysize); - yysize = yysize1; - yyfmt = yystpcpy (yyfmt, yyprefix); - yyprefix = yyor; - } - - yyf = YY_(yyformat); - yysize1 = yysize + yystrlen (yyf); - yysize_overflow |= (yysize1 < yysize); - yysize = yysize1; - - if (yysize_overflow) - return YYSIZE_MAXIMUM; - - if (yyresult) - { - /* Avoid sprintf, as that infringes on the user's name space. - Don't have undefined behavior even if the translation - produced a string with the wrong number of "%s"s. */ - char *yyp = yyresult; - int yyi = 0; - while ((*yyp = *yyf) != '\0') - { - if (*yyp == '%' && yyf[1] == 's' && yyi < yycount) - { - yyp += yytnamerr (yyp, yyarg[yyi++]); - yyf += 2; - } - else - { - yyp++; - yyf++; - } - } - } - return yysize; - } -} -#endif /* YYERROR_VERBOSE */ - - -/*-----------------------------------------------. -| Release the memory associated to this symbol. | -`-----------------------------------------------*/ - -/*ARGSUSED*/ -#if (defined __STDC__ || defined __C99__FUNC__ \ - || defined __cplusplus || defined _MSC_VER) -static void -yydestruct (const char *yymsg, int yytype, YYSTYPE *yyvaluep) -#else -static void -yydestruct (yymsg, yytype, yyvaluep) - const char *yymsg; - int yytype; - YYSTYPE *yyvaluep; -#endif -{ - YYUSE (yyvaluep); - - if (!yymsg) - yymsg = "Deleting"; - YY_SYMBOL_PRINT (yymsg, yytype, yyvaluep, yylocationp); - - switch (yytype) - { - - default: - break; - } -} - - -/* Prevent warnings from -Wmissing-prototypes. */ - -#ifdef YYPARSE_PARAM -#if defined __STDC__ || defined __cplusplus -int yyparse (void *YYPARSE_PARAM); -#else -int yyparse (); -#endif -#else /* ! YYPARSE_PARAM */ -#if defined __STDC__ || defined __cplusplus -int yyparse (void); -#else -int yyparse (); +#include <stdio.h> #endif -#endif /* ! YYPARSE_PARAM */ - - - -/* The look-ahead symbol. */ -int yychar; -/* The semantic value of the look-ahead symbol. */ -YYSTYPE yylval; - -/* Number of syntax errors so far. */ -int yynerrs; - - - -/*----------. -| yyparse. | -`----------*/ - -#ifdef YYPARSE_PARAM -#if (defined __STDC__ || defined __C99__FUNC__ \ - || defined __cplusplus || defined _MSC_VER) -int -yyparse (void *YYPARSE_PARAM) -#else -int -yyparse (YYPARSE_PARAM) - void *YYPARSE_PARAM; -#endif -#else /* ! YYPARSE_PARAM */ -#if (defined __STDC__ || defined __C99__FUNC__ \ - || defined __cplusplus || defined _MSC_VER) -int -yyparse (void) +/* define the initial stack-sizes */ +#ifdef YYSTACKSIZE +#undef YYMAXDEPTH +#define YYMAXDEPTH YYSTACKSIZE #else -int -yyparse () - -#endif -#endif -{ - - int yystate; - int yyn; - int yyresult; - /* Number of tokens to shift before error messages enabled. */ - int yyerrstatus; - /* Look-ahead token as an internal (translated) token number. */ - int yytoken = 0; -#if YYERROR_VERBOSE - /* Buffer for error messages, and its allocated size. */ - char yymsgbuf[128]; - char *yymsg = yymsgbuf; - YYSIZE_T yymsg_alloc = sizeof yymsgbuf; -#endif - - /* Three stacks and their tools: - `yyss': related to states, - `yyvs': related to semantic values, - `yyls': related to locations. - - Refer to the stacks thru separate pointers, to allow yyoverflow - to reallocate them elsewhere. */ - - /* The state stack. */ - yytype_int16 yyssa[YYINITDEPTH]; - yytype_int16 *yyss = yyssa; - yytype_int16 *yyssp; - - /* The semantic value stack. */ - YYSTYPE yyvsa[YYINITDEPTH]; - YYSTYPE *yyvs = yyvsa; - YYSTYPE *yyvsp; - - - -#define YYPOPSTACK(N) (yyvsp -= (N), yyssp -= (N)) - - YYSIZE_T yystacksize = YYINITDEPTH; - - /* The variables used to return semantic value and location from the - action routines. */ - YYSTYPE yyval; - - - /* The number of symbols on the RHS of the reduced rule. - Keep to zero when no symbol should be popped. */ - int yylen = 0; - - YYDPRINTF ((stderr, "Starting parse\n")); - - yystate = 0; - yyerrstatus = 0; - yynerrs = 0; - yychar = YYEMPTY; /* Cause a token to be read. */ - - /* Initialize stack pointers. - Waste one element of value and location stack - so that they stay on the same level as the state stack. - The wasted elements are never initialized. */ - - yyssp = yyss; - yyvsp = yyvs; - - goto yysetstate; - -/*------------------------------------------------------------. -| yynewstate -- Push a new state, which is found in yystate. | -`------------------------------------------------------------*/ - yynewstate: - /* In all cases, when you get here, the value and location stacks - have just been pushed. So pushing a state here evens the stacks. */ - yyssp++; - - yysetstate: - *yyssp = yystate; - - if (yyss + yystacksize - 1 <= yyssp) - { - /* Get the current used size of the three stacks, in elements. */ - YYSIZE_T yysize = yyssp - yyss + 1; - -#ifdef yyoverflow - { - /* Give user a chance to reallocate the stack. Use copies of - these so that the &'s don't force the real ones into - memory. */ - YYSTYPE *yyvs1 = yyvs; - yytype_int16 *yyss1 = yyss; - - - /* Each stack pointer address is followed by the size of the - data in use in that stack, in bytes. This used to be a - conditional around just the two extra args, but that might - be undefined if yyoverflow is a macro. */ - yyoverflow (YY_("memory exhausted"), - &yyss1, yysize * sizeof (*yyssp), - &yyvs1, yysize * sizeof (*yyvsp), - - &yystacksize); - - yyss = yyss1; - yyvs = yyvs1; - } -#else /* no yyoverflow */ -# ifndef YYSTACK_RELOCATE - goto yyexhaustedlab; -# else - /* Extend the stack our own way. */ - if (YYMAXDEPTH <= yystacksize) - goto yyexhaustedlab; - yystacksize *= 2; - if (YYMAXDEPTH < yystacksize) - yystacksize = YYMAXDEPTH; - - { - yytype_int16 *yyss1 = yyss; - union yyalloc *yyptr = - (union yyalloc *) YYSTACK_ALLOC (YYSTACK_BYTES (yystacksize)); - if (! yyptr) - goto yyexhaustedlab; - YYSTACK_RELOCATE (yyss); - YYSTACK_RELOCATE (yyvs); - -# undef YYSTACK_RELOCATE - if (yyss1 != yyssa) - YYSTACK_FREE (yyss1); - } -# endif -#endif /* no yyoverflow */ - - yyssp = yyss + yysize - 1; - yyvsp = yyvs + yysize - 1; - - - YYDPRINTF ((stderr, "Stack size increased to %lu\n", - (unsigned long int) yystacksize)); - - if (yyss + yystacksize - 1 <= yyssp) - YYABORT; - } - - YYDPRINTF ((stderr, "Entering state %d\n", yystate)); - - goto yybackup; - -/*-----------. -| yybackup. | -`-----------*/ -yybackup: - - /* Do appropriate processing given the current state. Read a - look-ahead token if we need one and don't already have one. */ - - /* First try to decide what to do without reference to look-ahead token. */ - yyn = yypact[yystate]; - if (yyn == YYPACT_NINF) - goto yydefault; - - /* Not known => get a look-ahead token if don't already have one. */ - - /* YYCHAR is either YYEMPTY or YYEOF or a valid look-ahead symbol. */ - if (yychar == YYEMPTY) - { - YYDPRINTF ((stderr, "Reading a token: ")); - yychar = YYLEX; - } - - if (yychar <= YYEOF) - { - yychar = yytoken = YYEOF; - YYDPRINTF ((stderr, "Now at end of input.\n")); - } - else - { - yytoken = YYTRANSLATE (yychar); - YY_SYMBOL_PRINT ("Next token is", yytoken, &yylval, &yylloc); - } - - /* If the proper action on seeing token YYTOKEN is to reduce or to - detect an error, take that action. */ - yyn += yytoken; - if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) - goto yydefault; - yyn = yytable[yyn]; - if (yyn <= 0) - { - if (yyn == 0 || yyn == YYTABLE_NINF) - goto yyerrlab; - yyn = -yyn; - goto yyreduce; - } - - if (yyn == YYFINAL) - YYACCEPT; - - /* Count tokens shifted since error; after three, turn off error - status. */ - if (yyerrstatus) - yyerrstatus--; - - /* Shift the look-ahead token. */ - YY_SYMBOL_PRINT ("Shifting", yytoken, &yylval, &yylloc); - - /* Discard the shifted token unless it is eof. */ - if (yychar != YYEOF) - yychar = YYEMPTY; - - yystate = yyn; - *++yyvsp = yylval; - - goto yynewstate; - - -/*-----------------------------------------------------------. -| yydefault -- do the default action for the current state. | -`-----------------------------------------------------------*/ -yydefault: - yyn = yydefact[yystate]; - if (yyn == 0) - goto yyerrlab; - goto yyreduce; - - -/*-----------------------------. -| yyreduce -- Do a reduction. | -`-----------------------------*/ -yyreduce: - /* yyn is the number of a rule to reduce with. */ - yylen = yyr2[yyn]; - - /* If YYLEN is nonzero, implement the default value of the action: - `$$ = $1'. - - Otherwise, the following line sets YYVAL to garbage. - This behavior is undocumented and Bison - users should not rely upon it. Assigning to YYVAL - unconditionally makes the parser a bit smaller, and it avoids a - GCC warning that YYVAL may be used uninitialized. */ - yyval = yyvsp[1-yylen]; - - - YY_REDUCE_PRINT (yyn); - switch (yyn) - { - case 3: -#line 229 "vcc.y" - { addList(&vObjList, (yyvsp[(1) - (1)].vobj)); curObj = 0; } - break; - - case 5: -#line 232 "vcc.y" - { addList(&vObjList, (yyvsp[(1) - (1)].vobj)); curObj = 0; } - break; - - case 8: -#line 241 "vcc.y" - { - lexPushMode(L_VCARD); - if (!pushVObject(VCCardProp)) YYERROR; - } - break; - - case 9: -#line 246 "vcc.y" - { - lexPopMode(0); - (yyval.vobj) = popVObject(); - } - break; - - case 10: -#line 251 "vcc.y" - { - lexPushMode(L_VCARD); - if (!pushVObject(VCCardProp)) YYERROR; - } - break; - - case 11: -#line 256 "vcc.y" - { - lexPopMode(0); - (yyval.vobj) = popVObject(); - } - break; - - case 14: -#line 267 "vcc.y" - { - lexPushMode(L_VALUES); - } - break; - - case 15: -#line 271 "vcc.y" - { - if (lexWithinMode(L_BASE64) || lexWithinMode(L_QUOTED_PRINTABLE)) - lexPopMode(0); - lexPopMode(0); - } - break; - - case 17: -#line 280 "vcc.y" - { - enterProps((yyvsp[(1) - (1)].str)); - } - break; - - case 19: -#line 285 "vcc.y" - { - enterProps((yyvsp[(1) - (1)].str)); - } - break; - - case 23: -#line 298 "vcc.y" - { - enterAttr((yyvsp[(1) - (1)].str),0); - } - break; - - case 24: -#line 302 "vcc.y" - { - enterAttr((yyvsp[(1) - (3)].str),(yyvsp[(3) - (3)].str)); - - } - break; - - case 26: -#line 311 "vcc.y" - { enterValues((yyvsp[(1) - (2)].str)); } - break; - - case 28: -#line 313 "vcc.y" - { enterValues((yyvsp[(1) - (1)].str)); } - break; - - case 30: -#line 317 "vcc.y" - { (yyval.str) = 0; } - break; - - case 31: -#line 322 "vcc.y" - { if (!pushVObject(VCCalProp)) YYERROR; } - break; - - case 32: -#line 325 "vcc.y" - { (yyval.vobj) = popVObject(); } - break; - - case 33: -#line 327 "vcc.y" - { if (!pushVObject(VCCalProp)) YYERROR; } - break; - - case 34: -#line 329 "vcc.y" - { (yyval.vobj) = popVObject(); } - break; - - case 40: -#line 344 "vcc.y" - { - lexPushMode(L_VEVENT); - if (!pushVObject(VCEventProp)) YYERROR; - } - break; - - case 41: -#line 350 "vcc.y" - { - lexPopMode(0); - popVObject(); - } - break; - - case 42: -#line 355 "vcc.y" - { - lexPushMode(L_VEVENT); - if (!pushVObject(VCEventProp)) YYERROR; - } - break; - - case 43: -#line 360 "vcc.y" - { - lexPopMode(0); - popVObject(); - } - break; - - case 44: -#line 368 "vcc.y" - { - lexPushMode(L_VTODO); - if (!pushVObject(VCTodoProp)) YYERROR; - } - break; - - case 45: -#line 374 "vcc.y" - { - lexPopMode(0); - popVObject(); - } - break; - - case 46: -#line 379 "vcc.y" - { - lexPushMode(L_VTODO); - if (!pushVObject(VCTodoProp)) YYERROR; - } - break; - - case 47: -#line 384 "vcc.y" - { - lexPopMode(0); - popVObject(); - } - break; - - -/* Line 1267 of yacc.c. */ -#line 1782 "vcc.c" - default: break; - } - YY_SYMBOL_PRINT ("-> $$ =", yyr1[yyn], &yyval, &yyloc); - - YYPOPSTACK (yylen); - yylen = 0; - YY_STACK_PRINT (yyss, yyssp); - - *++yyvsp = yyval; - - - /* Now `shift' the result of the reduction. Determine what state - that goes to, based on the state we popped back to and the rule - number reduced by. */ - - yyn = yyr1[yyn]; - - yystate = yypgoto[yyn - YYNTOKENS] + *yyssp; - if (0 <= yystate && yystate <= YYLAST && yycheck[yystate] == *yyssp) - yystate = yytable[yystate]; - else - yystate = yydefgoto[yyn - YYNTOKENS]; - - goto yynewstate; - - -/*------------------------------------. -| yyerrlab -- here on detecting error | -`------------------------------------*/ -yyerrlab: - /* If not already recovering from an error, report this error. */ - if (!yyerrstatus) - { - ++yynerrs; -#if ! YYERROR_VERBOSE - yyerror (YY_("syntax error")); +#ifdef YYMAXDEPTH +#define YYSTACKSIZE YYMAXDEPTH #else - { - YYSIZE_T yysize = yysyntax_error (0, yystate, yychar); - if (yymsg_alloc < yysize && yymsg_alloc < YYSTACK_ALLOC_MAXIMUM) - { - YYSIZE_T yyalloc = 2 * yysize; - if (! (yysize <= yyalloc && yyalloc <= YYSTACK_ALLOC_MAXIMUM)) - yyalloc = YYSTACK_ALLOC_MAXIMUM; - if (yymsg != yymsgbuf) - YYSTACK_FREE (yymsg); - yymsg = (char *) YYSTACK_ALLOC (yyalloc); - if (yymsg) - yymsg_alloc = yyalloc; - else - { - yymsg = yymsgbuf; - yymsg_alloc = sizeof yymsgbuf; - } - } - - if (0 < yysize && yysize <= yymsg_alloc) - { - (void) yysyntax_error (yymsg, yystate, yychar); - yyerror (yymsg); - } - else - { - yyerror (YY_("syntax error")); - if (yysize != 0) - goto yyexhaustedlab; - } - } -#endif - } - - - - if (yyerrstatus == 3) - { - /* If just tried and failed to reuse look-ahead token after an - error, discard it. */ - - if (yychar <= YYEOF) - { - /* Return failure if at end of input. */ - if (yychar == YYEOF) - YYABORT; - } - else - { - yydestruct ("Error: discarding", - yytoken, &yylval); - yychar = YYEMPTY; - } - } - - /* Else will try to reuse look-ahead token after shifting the error - token. */ - goto yyerrlab1; - - -/*---------------------------------------------------. -| yyerrorlab -- error raised explicitly by YYERROR. | -`---------------------------------------------------*/ -yyerrorlab: - - /* Pacify compilers like GCC when the user code never invokes - YYERROR and the label yyerrorlab therefore never appears in user - code. */ - if (/*CONSTCOND*/ 0) - goto yyerrorlab; - - /* Do not reclaim the symbols of the rule which action triggered - this YYERROR. */ - YYPOPSTACK (yylen); - yylen = 0; - YY_STACK_PRINT (yyss, yyssp); - yystate = *yyssp; - goto yyerrlab1; - - -/*-------------------------------------------------------------. -| yyerrlab1 -- common code for both syntax error and YYERROR. | -`-------------------------------------------------------------*/ -yyerrlab1: - yyerrstatus = 3; /* Each real token shifted decrements this. */ - - for (;;) - { - yyn = yypact[yystate]; - if (yyn != YYPACT_NINF) - { - yyn += YYTERROR; - if (0 <= yyn && yyn <= YYLAST && yycheck[yyn] == YYTERROR) - { - yyn = yytable[yyn]; - if (0 < yyn) - break; - } - } - - /* Pop the current state because it cannot handle the error token. */ - if (yyssp == yyss) - YYABORT; - - - yydestruct ("Error: popping", - yystos[yystate], yyvsp); - YYPOPSTACK (1); - yystate = *yyssp; - YY_STACK_PRINT (yyss, yyssp); - } - - if (yyn == YYFINAL) - YYACCEPT; - - *++yyvsp = yylval; - - - /* Shift the error token. */ - YY_SYMBOL_PRINT ("Shifting", yystos[yyn], yyvsp, yylsp); - - yystate = yyn; - goto yynewstate; - - -/*-------------------------------------. -| yyacceptlab -- YYACCEPT comes here. | -`-------------------------------------*/ -yyacceptlab: - yyresult = 0; - goto yyreturn; - -/*-----------------------------------. -| yyabortlab -- YYABORT comes here. | -`-----------------------------------*/ -yyabortlab: - yyresult = 1; - goto yyreturn; - -#ifndef yyoverflow -/*-------------------------------------------------. -| yyexhaustedlab -- memory exhaustion comes here. | -`-------------------------------------------------*/ -yyexhaustedlab: - yyerror (YY_("memory exhausted")); - yyresult = 2; - /* Fall through. */ -#endif - -yyreturn: - if (yychar != YYEOF && yychar != YYEMPTY) - yydestruct ("Cleanup: discarding lookahead", - yytoken, &yylval); - /* Do not reclaim the symbols of the rule which action triggered - this YYABORT or YYACCEPT. */ - YYPOPSTACK (yylen); - YY_STACK_PRINT (yyss, yyssp); - while (yyssp != yyss) - { - yydestruct ("Cleanup: popping", - yystos[*yyssp], yyvsp); - YYPOPSTACK (1); - } -#ifndef yyoverflow - if (yyss != yyssa) - YYSTACK_FREE (yyss); +#define YYSTACKSIZE 500 +#define YYMAXDEPTH 500 #endif -#if YYERROR_VERBOSE - if (yymsg != yymsgbuf) - YYSTACK_FREE (yymsg); #endif - /* Make sure YYID is used. */ - return YYID (yyresult); -} - - -#line 390 "vcc.y" +#define YYINITSTACKSIZE 500 + +int yydebug; +int yynerrs; +int yyerrflag; +int yychar; +short *yyssp; +YYSTYPE *yyvsp; +YYSTYPE yyval; +YYSTYPE yylval; + +/* variables for the parser stack */ +static short *yyss; +static short *yysslim; +static YYSTYPE *yyvs; +static int yystacksize; static int pushVObject(const char *prop) { VObject *newObj; @@ -2041,7 +485,7 @@ static void enterValues(const char *value) if (value) { char *p1, *p2; wchar_t *p3; - int i; + size_t i; /* If the property already has a string value, we append this one, using ';' to separate the values. */ @@ -2770,7 +1214,8 @@ VObject* Parse_MIME_FromFile(FILE *file) initLex(0,(unsigned long)-1,file); startPos = ftell(file); if (!(result = Parse_MIMEHelper())) { - fseek(file,startPos,SEEK_SET); + if (startPos >= 0) + fseek(file,startPos,SEEK_SET); } return result; } @@ -2817,4 +1262,375 @@ static void mime_error_(char *s) } } +/* allocate initial stack or double stack size, up to YYMAXDEPTH */ +static int yygrowstack(void) +{ + int newsize; + ptrdiff_t i; + short *newss; + YYSTYPE *newvs; + + if ((newsize = yystacksize) == 0) + newsize = YYINITSTACKSIZE; + else if (newsize >= YYMAXDEPTH) + return -1; + else if ((newsize *= 2) > YYMAXDEPTH) + newsize = YYMAXDEPTH; + + i = yyssp - yyss; + newss = (yyss != 0) + ? (short *)realloc(yyss, newsize * sizeof(*newss)) + : (short *)malloc(newsize * sizeof(*newss)); + if (newss == 0) + return -1; + + yyss = newss; + yyssp = newss + i; + newvs = (yyvs != 0) + ? (YYSTYPE *)realloc(yyvs, newsize * sizeof(*newvs)) + : (YYSTYPE *)malloc(newsize * sizeof(*newvs)); + if (newvs == 0) + return -1; + + yyvs = newvs; + yyvsp = newvs + i; + yystacksize = newsize; + yysslim = yyss + newsize - 1; + return 0; +} + +#define YYABORT goto yyabort +#define YYREJECT goto yyabort +#define YYACCEPT goto yyaccept +#define YYERROR goto yyerrlab +int +yyparse(void) +{ + register int yym, yyn, yystate; +#if YYDEBUG + register const char *yys; + + if ((yys = getenv("YYDEBUG")) != 0) + { + yyn = *yys; + if (yyn >= '0' && yyn <= '9') + yydebug = yyn - '0'; + } +#endif + + yynerrs = 0; + yyerrflag = 0; + yychar = YYEMPTY; + + if (yyss == NULL && yygrowstack()) goto yyoverflow; + yyssp = yyss; + yyvsp = yyvs; + *yyssp = yystate = 0; + +yyloop: + if ((yyn = yydefred[yystate]) != 0) goto yyreduce; + if (yychar < 0) + { + if ((yychar = yylex()) < 0) yychar = 0; +#if YYDEBUG + if (yydebug) + { + yys = 0; + if (yychar <= YYMAXTOKEN) yys = yyname[yychar]; + if (!yys) yys = "illegal-symbol"; + printf("%sdebug: state %d, reading %d (%s)\n", + YYPREFIX, yystate, yychar, yys); + } +#endif + } + if ((yyn = yysindex[yystate]) && (yyn += yychar) >= 0 && + yyn <= YYTABLESIZE && yycheck[yyn] == yychar) + { +#if YYDEBUG + if (yydebug) + printf("%sdebug: state %d, shifting to state %d\n", + YYPREFIX, yystate, yytable[yyn]); +#endif + if (yyssp >= yysslim && yygrowstack()) + { + goto yyoverflow; + } + *++yyssp = yystate = yytable[yyn]; + *++yyvsp = yylval; + yychar = YYEMPTY; + if (yyerrflag > 0) --yyerrflag; + goto yyloop; + } + if ((yyn = yyrindex[yystate]) && (yyn += yychar) >= 0 && + yyn <= YYTABLESIZE && yycheck[yyn] == yychar) + { + yyn = yytable[yyn]; + goto yyreduce; + } + if (yyerrflag) goto yyinrecovery; + + yyerror("syntax error"); + +#ifdef lint + goto yyerrlab; +#endif + +yyerrlab: + ++yynerrs; + +yyinrecovery: + if (yyerrflag < 3) + { + yyerrflag = 3; + for (;;) + { + if ((yyn = yysindex[*yyssp]) && (yyn += YYERRCODE) >= 0 && + yyn <= YYTABLESIZE && yycheck[yyn] == YYERRCODE) + { +#if YYDEBUG + if (yydebug) + printf("%sdebug: state %d, error recovery shifting\ + to state %d\n", YYPREFIX, *yyssp, yytable[yyn]); +#endif + if (yyssp >= yysslim && yygrowstack()) + { + goto yyoverflow; + } + *++yyssp = yystate = yytable[yyn]; + *++yyvsp = yylval; + goto yyloop; + } + else + { +#if YYDEBUG + if (yydebug) + printf("%sdebug: error recovery discarding state %d\n", + YYPREFIX, *yyssp); +#endif + if (yyssp <= yyss) goto yyabort; + --yyssp; + --yyvsp; + } + } + } + else + { + if (yychar == 0) goto yyabort; +#if YYDEBUG + if (yydebug) + { + yys = 0; + if (yychar <= YYMAXTOKEN) yys = yyname[yychar]; + if (!yys) yys = "illegal-symbol"; + printf("%sdebug: state %d, error recovery discards token %d (%s)\n", + YYPREFIX, yystate, yychar, yys); + } +#endif + yychar = YYEMPTY; + goto yyloop; + } + +yyreduce: +#if YYDEBUG + if (yydebug) + printf("%sdebug: state %d, reducing by rule %d (%s)\n", + YYPREFIX, yystate, yyn, yyrule[yyn]); +#endif + yym = yylen[yyn]; + if (yym) + yyval = yyvsp[1-yym]; + else + memset(&yyval, 0, sizeof yyval); + switch (yyn) + { +case 2: +{ addList(&vObjList, yyvsp[0].vobj); curObj = 0; } +break; +case 4: +{ addList(&vObjList, yyvsp[0].vobj); curObj = 0; } +break; +case 7: +{ + lexPushMode(L_VCARD); + if (!pushVObject(VCCardProp)) YYERROR; + } +break; +case 8: +{ + lexPopMode(0); + yyval.vobj = popVObject(); + } +break; +case 9: +{ + lexPushMode(L_VCARD); + if (!pushVObject(VCCardProp)) YYERROR; + } +break; +case 10: +{ + lexPopMode(0); + yyval.vobj = popVObject(); + } +break; +case 13: +{ + lexPushMode(L_VALUES); + } +break; +case 14: +{ + if (lexWithinMode(L_BASE64) || lexWithinMode(L_QUOTED_PRINTABLE)) + lexPopMode(0); + lexPopMode(0); + } +break; +case 16: +{ + enterProps(yyvsp[0].str); + } +break; +case 18: +{ + enterProps(yyvsp[0].str); + } +break; +case 22: +{ + enterAttr(yyvsp[0].str,0); + } +break; +case 23: +{ + enterAttr(yyvsp[-2].str,yyvsp[0].str); + + } +break; +case 25: +{ enterValues(yyvsp[-1].str); } +break; +case 27: +{ enterValues(yyvsp[0].str); } +break; +case 29: +{ yyval.str = 0; } +break; +case 30: +{ if (!pushVObject(VCCalProp)) YYERROR; } +break; +case 31: +{ yyval.vobj = popVObject(); } +break; +case 32: +{ if (!pushVObject(VCCalProp)) YYERROR; } +break; +case 33: +{ yyval.vobj = popVObject(); } +break; +case 39: +{ + lexPushMode(L_VEVENT); + if (!pushVObject(VCEventProp)) YYERROR; + } +break; +case 40: +{ + lexPopMode(0); + popVObject(); + } +break; +case 41: +{ + lexPushMode(L_VEVENT); + if (!pushVObject(VCEventProp)) YYERROR; + } +break; +case 42: +{ + lexPopMode(0); + popVObject(); + } +break; +case 43: +{ + lexPushMode(L_VTODO); + if (!pushVObject(VCTodoProp)) YYERROR; + } +break; +case 44: +{ + lexPopMode(0); + popVObject(); + } +break; +case 45: +{ + lexPushMode(L_VTODO); + if (!pushVObject(VCTodoProp)) YYERROR; + } +break; +case 46: +{ + lexPopMode(0); + popVObject(); + } +break; + } + yyssp -= yym; + yystate = *yyssp; + yyvsp -= yym; + yym = yylhs[yyn]; + if (yystate == 0 && yym == 0) + { +#if YYDEBUG + if (yydebug) + printf("%sdebug: after reduction, shifting from state 0 to\ + state %d\n", YYPREFIX, YYFINAL); +#endif + yystate = YYFINAL; + *++yyssp = YYFINAL; + *++yyvsp = yyval; + if (yychar < 0) + { + if ((yychar = yylex()) < 0) yychar = 0; +#if YYDEBUG + if (yydebug) + { + yys = 0; + if (yychar <= YYMAXTOKEN) yys = yyname[yychar]; + if (!yys) yys = "illegal-symbol"; + printf("%sdebug: state %d, reading %d (%s)\n", + YYPREFIX, YYFINAL, yychar, yys); + } +#endif + } + if (yychar == 0) goto yyaccept; + goto yyloop; + } + if ((yyn = yygindex[yym]) && (yyn += yystate) >= 0 && + yyn <= YYTABLESIZE && yycheck[yyn] == yystate) + yystate = yytable[yyn]; + else + yystate = yydgoto[yym]; +#if YYDEBUG + if (yydebug) + printf("%sdebug: after reduction, shifting from state %d \ +to state %d\n", YYPREFIX, *yyssp, yystate); +#endif + if (yyssp >= yysslim && yygrowstack()) + { + goto yyoverflow; + } + *++yyssp = yystate; + *++yyvsp = yyval; + goto yyloop; + +yyoverflow: + yyerror("yacc stack overflow"); +yyabort: + return (1); + +yyaccept: + return (0); +} diff --git a/src/libicalvcal/vcc.y b/src/libicalvcal/vcc.y index 34bcfaf..58631df 100644 --- a/src/libicalvcal/vcc.y +++ b/src/libicalvcal/vcc.y @@ -57,7 +57,9 @@ DFARS 252.227-7013 or 48 CFR 52.227-19, as applicable. #endif #ifdef WIN32 -#define snprintf _snprintf +#define snprintf _snprintf +#endif +#ifdef _MSC_VER #define strcasecmp stricmp #endif @@ -1164,7 +1166,8 @@ VObject* Parse_MIME_FromFile(FILE *file) initLex(0,(unsigned long)-1,file); startPos = ftell(file); if (!(result = Parse_MIMEHelper())) { - fseek(file,startPos,SEEK_SET); + if (startPos >= 0) + fseek(file,startPos,SEEK_SET); } return result; } diff --git a/src/libicalvcal/vobject.c b/src/libicalvcal/vobject.c index e4fc7ad..af7647f 100644 --- a/src/libicalvcal/vobject.c +++ b/src/libicalvcal/vobject.c @@ -42,8 +42,8 @@ DFARS 252.227-7013 or 48 CFR 52.227-19, as applicable. * vobject, and convert a vobject into its textual representation. */ -#ifdef WIN32 -#define snprintf _snprintf +#if defined(_MSC_VER) +#define snprintf _snprintf #define strcasecmp stricmp #endif @@ -124,7 +124,7 @@ DLLEXPORT(void) deleteVObject(VObject *p) free(p); } -DLLEXPORT(char*) dupStr(const char *s, unsigned int size) +DLLEXPORT(char*) dupStr(const char *s, size_t size) { char *t; if (size == 0) { @@ -685,7 +685,7 @@ DLLEXPORT(void) cleanStrTbl() p = t; t = t->next; deleteStrItem(p); - } while (t); + } strTbl[i] = 0; } } @@ -1079,7 +1079,7 @@ static void appendcOFile(OFile *fp, char c) static void appendsOFile(OFile *fp, const char *s) { - int i, slen; + size_t i, slen; slen = strlen(s); for (i=0; i<slen; i++) { appendcOFile(fp,s[i]); @@ -1247,9 +1247,11 @@ static void writeGroup(OFile *fp, VObject *o) { char buf1[256]; char buf2[256]; - strcpy(buf1,NAME_OF(o)); + strncpy(buf1,NAME_OF(o),sizeof(buf1)-1); + buf1[sizeof(buf1)-1]='\0'; + while ((o=isAPropertyOf(o,VCGroupingProp)) != 0) { - strncpy(buf2,STRINGZ_VALUE_OF(o),sizeof(buf2)); + strncpy(buf2,STRINGZ_VALUE_OF(o),sizeof(buf2)-1); buf2[sizeof(buf2)-1] = '\0'; strncat(buf2,".",sizeof(buf2)-strlen(buf2)-1); strncat(buf2,buf1,sizeof(buf2)-strlen(buf2)-1); @@ -1404,10 +1406,10 @@ DLLEXPORT(char*) writeMemVObjects(char *s, int *len, VObject *list) /*---------------------------------------------------------------------- APIs to do fake Unicode stuff. ----------------------------------------------------------------------*/ -DLLEXPORT(wchar_t*) fakeUnicode(const char *ps, int *bytes) +DLLEXPORT(wchar_t*) fakeUnicode(const char *ps, size_t *bytes) { wchar_t *r, *pw; - int len = strlen(ps)+1; + size_t len = strlen(ps)+1; pw = r = (wchar_t*)malloc(sizeof(wchar_t)*len); if (bytes) diff --git a/src/libicalvcal/vobject.h b/src/libicalvcal/vobject.h index bc31dc8..227f91e 100644 --- a/src/libicalvcal/vobject.h +++ b/src/libicalvcal/vobject.h @@ -261,7 +261,7 @@ typedef struct VObjectIterator { extern DLLEXPORT(VObject*) newVObject(const char *id); extern DLLEXPORT(void) deleteVObject(VObject *p); -extern DLLEXPORT(char*) dupStr(const char *s, unsigned int size); +extern DLLEXPORT(char*) dupStr(const char *s, size_t size); extern DLLEXPORT(void) deleteStr(const char *p); extern DLLEXPORT(void) unUseStr(const char *s); @@ -313,7 +313,7 @@ extern DLLEXPORT(void) cleanVObjects(VObject *list); extern DLLEXPORT(const char*) lookupProp(const char* str); extern DLLEXPORT(const char*) lookupProp_(const char* str); -extern DLLEXPORT(wchar_t*) fakeUnicode(const char *ps, int *bytes); +extern DLLEXPORT(wchar_t*) fakeUnicode(const char *ps, size_t *bytes); extern DLLEXPORT(int) uStrLen(const wchar_t *u); extern DLLEXPORT(char*) fakeCString(const wchar_t *u); diff --git a/src/python/CMakeLists.txt b/src/python/CMakeLists.txt index 09ac348..a5a593c 100644 --- a/src/python/CMakeLists.txt +++ b/src/python/CMakeLists.txt @@ -1,72 +1,24 @@ -include_directories(${CMAKE_SOURCE_DIR}/src ${CMAKE_SOURCE_DIR}/src/libical ${CMAKE_SOURCE_DIR}/src/libicalss ) - +include_directories( + ${CMAKE_SOURCE_DIR}/src + ${CMAKE_SOURCE_DIR}/src/libical + ${CMAKE_SOURCE_DIR}/src/libicalss +) ########### next target ############### -SET(LibicalWrap_LIB_SRCS - LibicalWrap.c +set(LibicalWrap_LIB_SRCS + LibicalWrap.c ) -add_library(LibicalWrap SHARED ${LibicalWrap_LIB_SRCS}) +add_library(LibicalWrap ${LIBRARY_TYPE} ${LibicalWrap_LIB_SRCS}) target_link_libraries(LibicalWrap) -set_target_properties(LibicalWrap PROPERTIES VERSION ${LIBICAL_LIB_VERSION_STRING} SOVERSION ${LIBICAL_LIB_MAJOR_VERSION}) +set_target_properties(LibicalWrap PROPERTIES + VERSION ${LIBICAL_LIB_VERSION_STRING} + SOVERSION ${LIBICAL_LIB_MAJOR_VERSION} +) install(TARGETS LibicalWrap DESTINATION lib) - ########### install files ############### - - - -#original Makefile.am contents follow: - -# -#lib_LTLIBRARIES = libLibicalWrap.la -# -#libLibicalWrap_la_SOURCES = LibicalWrap.c -# -#INCLUDES = \ -# -I$(top_builddir) \ -# -I$(top_srcdir)/src \ -# -I$(top_builddir)/src \ -# -I$(top_srcdir)/src/libical \ -# -I$(top_builddir)/src/libical \ -# -I$(top_srcdir)/src/libicalss \ -# $(PY_CFLAGS) -# -#LDADD = ../libical/libical.la ../libicalss/libicalss.la -# -#all: LibicalWrap.so -# -#LibicalWrap.c: LibicalWrap.i -# swig -python -o LibicalWrap.c LibicalWrap.i -# -## This part should be done with libtool, but I don't know how to do -## it. Libtool needs to generate a shared library in this directory -## regardless of the value of AM_DISABLE_SHARED -#LibicalWrap.so: LibicalWrap.c -# ld -shared -o LibicalWrap.so LibicalWrap.o ../libical/.libs/libical.a ../libicalss/.libs/libicalss.a -# -#CLEANFILES = LibicalWrap.c LibicalWrap_wrap.doc Libical.pyc LibicalWrap.so -# -#EXTRA_DIST = \ -#Libical.py \ -#LibicalWrap.i \ -#python-binding.txt \ -#test.py \ -#Attendee.py \ -#Collection.py \ -#Component.py \ -#DerivedProperties.py \ -#Duration.py \ -#Error.py \ -#Gauge.py \ -#Period.py \ -#Property.py \ -#Store.py \ -#Time.py \ -#ChangeLog -# -# diff --git a/src/python/Collection.py b/src/python/Collection.py index bf6503c..48c3652 100644 --- a/src/python/Collection.py +++ b/src/python/Collection.py @@ -100,7 +100,7 @@ class ComponentCollection: oldComps = self._components[beg:end] self._components.__setslice__(beg, end, sequence) for c in sequence: - self._components.addComponent(c) + self._parent.add_component(c) for c in oldComps: self._parent.remove_component(c) @@ -118,7 +118,11 @@ class ComponentCollection: def __len__(self): return len(self._components) - + + def __add__(self, iterable): + for i in iterable: + self.append(i) + def append(self, property): self._components.append(property) - self._parent.addComponent(property) + self._parent.add_component(property) diff --git a/src/python/Component.py b/src/python/Component.py index 9cdcd0d..8f24f54 100644 --- a/src/python/Component.py +++ b/src/python/Component.py @@ -37,10 +37,25 @@ import string WrapperNULL = None -class Component: +# Swig objects are natively unhashable, so we hash on the pointer val. +class SwigRefHash(dict): + def __getitem__(self, k): + return dict.__getitem__(self, int(k)) + + def __setitem__(self, k, v): + return dict.__setitem__(self, int(k), v) + + def __delitem__(self, k): + dict.__delitem__(self, int(k)) + + def has_key(self, k): + return dict.has_key(self, int(k)) + +class Component(object): def __init__(self,ref=None,kind=None): + self._ref = None if ref != None: self._ref = ref elif kind != None: @@ -54,8 +69,8 @@ class Component: else: raise "Could not construct component of kind" + kind - self.cached_props = {} - self.cached_comps = {} + self.cached_props = SwigRefHash() + self.cached_comps = SwigRefHash() def __del__(self): if self._ref != None and icalcomponent_get_parent(self._ref) != WrapperNULL: @@ -73,7 +88,7 @@ class Component: d = {} d['value'] = icalproperty_get_value_as_string(p) - d['name'] = icalproperty_get_name(p) + d['name'] = icalproperty_get_property_name(p) propkind = icalproperty_string_to_kind(d['name']) kind = icalproperty_kind_to_value_kind(propkind) @@ -81,6 +96,7 @@ class Component: d['ref'] = p + #~ print p, Property(ref=p).name() if not self.cached_props.has_key(p): if d['value_type'] == 'DATE-TIME' or d['value_type'] == 'DATE': @@ -176,7 +192,7 @@ class Component: comps.append(comp) c = icalcomponent_get_next_component(self._ref,kind); - return comps + return ComponentCollection(self, comps) def inner_component(self): @@ -213,6 +229,10 @@ class Component: return icalcomponent_as_ical_string(self._ref) + def name(self): + k = icalcomponent_isa(self._ref) + return icalcomponent_kind_to_string(k) + def ref(self): """ Return the internal reference to the libical icalproperty """ return self._ref @@ -514,7 +534,7 @@ class GenericComponent(Component): for alarm in values: self.add_component(alarm) else: - return ComponentCollection(self, self.components('VALARM')) + return self.components('VALARM') #### # Methods that deal with Properties that can occur multiple times are diff --git a/src/python/Libical.py b/src/python/Libical.py index 23e3820..5f4aae7 100644 --- a/src/python/Libical.py +++ b/src/python/Libical.py @@ -25,12 +25,15 @@ # the License at http://www.mozilla.org/MPL/ #====================================================================== +from LibicalWrap import ICAL_PACKAGE, ICAL_VERSION from Component import Component, NewComponent, Event, Todo, Journal from Property import Property, RecurrenceSet, test_enum -from Time import Time +from Time import Time, UTC from Period import Period from Duration import Duration from Attendee import Attendee, Organizer from DerivedProperties import RDate, Trigger,Recurrence_Id, Attach from Store import Store, FileStore from Gauge import Gauge + +version = ICAL_VERSION diff --git a/src/python/LibicalWrap.i b/src/python/LibicalWrap.i index bf3e19c..bc1f199 100644 --- a/src/python/LibicalWrap.i +++ b/src/python/LibicalWrap.i @@ -26,428 +26,168 @@ %{ -#include "ical.h" -#include "icalss.h" +#include "libical/ical.h" +#include "libicalss/icalss.h" #include <sys/types.h> /* for size_t */ #include <time.h> %} +%pythoncode %{ +import Error -#include "fcntl.h" /* For Open flags */ - -typedef void icalcomponent; -typedef void icalproperty; - -icalcomponent* icalparser_parse_string(char* str); - - -/* actually takes icalcomponent_kind */ -icalcomponent* icalcomponent_new(int kind); -icalcomponent* icalcomponent_new_clone(icalcomponent* component); -icalcomponent* icalcomponent_new_from_string(char* str); - -const char* icalcomponent_kind_to_string(int kind); -int icalcomponent_string_to_kind(const char* string); - - -char* icalcomponent_as_ical_string(icalcomponent* component); - -void icalcomponent_free(icalcomponent* component); -int icalcomponent_count_errors(icalcomponent* component); -void icalcomponent_strip_errors(icalcomponent* component); -void icalcomponent_convert_errors(icalcomponent* component); - -icalproperty* icalcomponent_get_current_property(icalcomponent* component); - -icalproperty* icalcomponent_get_first_property(icalcomponent* component, - int kind); -icalproperty* icalcomponent_get_next_property(icalcomponent* component, - int kind); - -icalcomponent* icalcomponent_get_current_component (icalcomponent* component); - -icalcomponent* icalcomponent_get_first_component(icalcomponent* component, - int kind); -icalcomponent* icalcomponent_get_next_component(icalcomponent* component, - int kind); - -void icalcomponent_add_property(icalcomponent* component, - icalproperty* property); - -void icalcomponent_remove_property(icalcomponent* component, - icalproperty* property); - - -void icalcomponent_add_component(icalcomponent* parent, - icalcomponent* child); - -void icalcomponent_remove_component(icalcomponent* parent, - icalcomponent* child); - -icalcomponent* icalcomponent_get_inner(icalcomponent* comp); - -icalcomponent* icalcomponent_get_parent(icalcomponent* component); -int icalcomponent_isa(icalcomponent* component); - -int icalrestriction_check(icalcomponent* comp); - -/* actually takes icalproperty_kind */ -icalproperty* icalproperty_new(int kind); - -icalproperty* icalproperty_new_from_string(char* str); - -char* icalproperty_as_ical_string(icalproperty *prop); - -void icalproperty_set_parameter_from_string(icalproperty* prop, - const char* name, const char* value); -const char* icalproperty_get_parameter_as_string(icalproperty* prop, - const char* name); -void icalproperty_remove_parameter_by_name(icalproperty* prop, - const char *name); - -void icalproperty_set_value_from_string(icalproperty* prop,const char* value, const char * kind); - -const char* icalproperty_get_value_as_string(icalproperty* prop); -icalcomponent* icalproperty_get_parent(icalproperty* property); - -const char* icalproperty_kind_to_string(int kind); -int icalproperty_string_to_kind(const char* string); -int icalproperty_string_to_enum(const char* str); -int icalproperty_enum_belongs_to_property(int kind, int e); -int icalproperty_kind_to_value_kind(int kind); - -/* Deal with X properties */ - -void icalproperty_set_x_name(icalproperty* prop, const char* name); -const char* icalproperty_get_x_name(icalproperty* prop); - -/* Return the name of the property -- the type name converted to a - string, or the value of _get_x_name if the type is and X property */ -const char* icalproperty_get_name (const icalproperty* prop); - - -int icalerror_supress(const char* error); -void icalerror_restore(const char* error, int es); -char* icalerror_perror(); -void icalerror_clear_errno(void); - - -const char* icalvalue_kind_to_string(int kind); -int icalvalue_string_to_kind(const char* str); - -char* icalparameter_as_ical_string(icalparameter* parameter); - -const char* icalparameter_kind_to_string(int kind); -int icalparameter_string_to_kind(const char* string); - -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(char* rule, int start, - int count, time_t* array); - - -/* Iterate through properties, components and parameters using strings for the kind */ -icalproperty* icallangbind_get_first_property(icalcomponent *c, - const char* prop); - -icalproperty* icallangbind_get_next_property(icalcomponent *c, - const char* prop); - -icalcomponent* icallangbind_get_first_component(icalcomponent *c, - const char* comp); - -icalcomponent* icallangbind_get_next_component(icalcomponent *c, - const char* comp); - -icalparameter* icallangbind_get_first_parameter(icalproperty *prop); - -icalparameter* icallangbind_get_next_parameter(icalproperty *prop); - - -/* Return a string that can be evaluated in perl or python to - 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); - -int icallangbind_string_to_open_flag(const char* str); - -const char* icallangbind_quote_as_ical(const char* str); - -/*********************************************************************** - Time routines -***********************************************************************/ - - -struct icaltimetype -{ - int year; - int month; - int day; - int hour; - int minute; - int second; -}; - - -/* Convert seconds past UNIX epoch to a timetype*/ -struct icaltimetype icaltime_from_timet(int v, int is_date); - -/** Convert seconds past UNIX epoch to a timetype, using timezones. */ -struct icaltimetype icaltime_from_timet_with_zone(int tm, - int is_date, icaltimezone *zone); - -/* Return the time as seconds past the UNIX epoch */ -/* Normally, this returns a time_t, but SWIG tries to turn that type - into a pointer */ -int icaltime_as_timet(struct icaltimetype tt); - -/* Return a string represention of the time, in RFC2445 format. The - string is owned by libical */ -char* icaltime_as_ical_string(struct icaltimetype tt); - -/* create a time from an ISO format string */ -struct icaltimetype icaltime_from_string(const char* str); - -/* Routines for handling timezones */ -/* 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); - -/* Return true of the time is null. */ -int icaltime_is_null_time(struct icaltimetype t); - -/* Returns false if the time is clearly invalid, but is not null. This - is usually the result of creating a new time type buy not clearing - it, or setting one of the flags to an illegal value. */ -int icaltime_is_valid_time(struct icaltimetype t); - -/** @brief Return the timezone */ -const icaltimezone *icaltime_get_timezone(const struct icaltimetype t); - -/** @brief Return the tzid, or NULL for a floating time */ -char *icaltime_get_tzid(const struct icaltimetype t); - -/** @brief Set the timezone */ -struct icaltimetype icaltime_set_timezone(struct icaltimetype *t, - const icaltimezone *zone); - -/* Returns true if time is of DATE type, false if DATE-TIME */ -int icaltime_is_date(struct icaltimetype t); - -/* Returns true if time is relative to UTC zone */ -int icaltime_is_utc(struct icaltimetype t); - -/* Reset all of the time components to be in their normal ranges. For - instance, given a time with minutes=70, the minutes will be reduces - to 10, and the hour incremented. This allows the caller to do - arithmetic on times without worrying about overflow or - underflow. */ -struct icaltimetype icaltime_normalize(struct icaltimetype t); - -/* Return the day of the year of the given time */ -short icaltime_day_of_year(struct icaltimetype t); - -/* Create a new time, given a day of year and a year. */ -struct icaltimetype icaltime_from_day_of_year(short doy, short year); - -/* Return the day of the week of the given time. Sunday is 0 */ -short icaltime_day_of_week(struct icaltimetype t); - -/* Return the day of the year for the Sunday of the week that the - given time is within. */ -short icaltime_start_doy_of_week(struct icaltimetype t); - -/* Return the week number for the week the given time is within */ -short icaltime_week_number(struct icaltimetype t); - -/* Return -1, 0, or 1 to indicate that a<b, a==b or a>b */ -int icaltime_compare(struct icaltimetype a,struct icaltimetype b); - -/* like icaltime_compare, but only use the date parts. */ -int icaltime_compare_date_only(struct icaltimetype a, struct icaltimetype b); - -/* Return the number of days in the given month */ -short icaltime_days_in_month(short month,short year); - -/** convert tt, of timezone tzid, into a utc time. Does nothing if the - time is already UTC. */ -struct icaltimetype icaltime_convert_to_zone(struct icaltimetype tt, - icaltimezone *zone); - - - -/*********************************************************************** - Duration Routines -***********************************************************************/ - - -struct icaldurationtype -{ - 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); -struct icaldurationtype icaldurationtype_from_string(const char*); -int icaldurationtype_as_int(struct icaldurationtype duration); -char* icaldurationtype_as_ical_string(struct icaldurationtype d); -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 icaltime_subtract(struct icaltimetype t1, - struct icaltimetype t2); - - -/*********************************************************************** - Period Routines -***********************************************************************/ - - -struct icalperiodtype -{ - struct icaltimetype start; - struct icaltimetype end; - struct icaldurationtype duration; -}; - -struct icalperiodtype icalperiodtype_from_string (const char* str); - -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); - -/*********************************************************************** - * timezone handling routines -***********************************************************************/ - -/** Returns a single builtin timezone, given its Olson city name. */ -icaltimezone* icaltimezone_get_builtin_timezone (const char *location); - -/** Returns the UTC timezone. */ -icaltimezone* icaltimezone_get_utc_timezone (void); - -/*********************************************************************** - Storage Routines -***********************************************************************/ - -/** - * @brief options for opening an icalfileset. - * - * These options should be passed to the icalset_new() function - */ - -struct icalfileset_options { - int flags; /**< flags for open() O_RDONLY, etc */ - mode_t mode; /**< file mode */ - icalcluster *cluster; /**< use this cluster to initialize data */ -}; - -icalset* icalfileset_new(const char* path); -icalset* icalfileset_new_reader(const char* path); -icalset* icalfileset_new_writer(const char* path); - -icalset* icalfileset_init(icalset *set, const char *dsn, void* options); - -/* icalfileset* icalfileset_new_from_cluster(const char* path, icalcluster *cluster); */ - -icalcluster* icalfileset_produce_icalcluster(const char *path); - -void icalfileset_free(icalset* cluster); - -const char* icalfileset_path(icalset* cluster); - -/* Mark the cluster as changed, so it will be written to disk when it - is freed. Commit writes to disk immediately. */ -void icalfileset_mark(icalset* set); -icalerrorenum icalfileset_commit(icalset* set); - -icalerrorenum icalfileset_add_component(icalset* set, - icalcomponent* child); - -icalerrorenum icalfileset_remove_component(icalset* set, - icalcomponent* child); - -int icalfileset_count_components(icalset* set, - int kind); - -/** - * Restrict the component returned by icalfileset_first, _next to those - * that pass the gauge. _clear removes the gauge - */ -icalerrorenum icalfileset_select(icalset* set, icalgauge* gauge); - -/** clear the gauge **/ -void icalfileset_clear(icalset* set); - -/** Get and search for a component by uid **/ -icalcomponent* icalfileset_fetch(icalset* set, const char* uid); -int icalfileset_has_uid(icalset* set, const char* uid); -icalcomponent* icalfileset_fetch_match(icalset* set, icalcomponent *c); - - -/** - * Modify components according to the MODIFY method of CAP. Works on the - * currently selected components. - */ -icalerrorenum icalfileset_modify(icalset* set, - icalcomponent *oldcomp, - icalcomponent *newcomp); - -/* Iterate through components. If a gauge has been defined, these - will skip over components that do not pass the gauge */ - -icalcomponent* icalfileset_get_current_component (icalset* cluster); -icalcomponent* icalfileset_get_first_component(icalset* cluster); -icalcomponent* icalfileset_get_next_component(icalset* cluster); - -/* External iterator for thread safety */ -icalsetiter icalfileset_begin_component(icalset* set, int kind, icalgauge* gauge); -icalcomponent * icalfilesetiter_to_next(icalset* set, icalsetiter *iter); -icalcomponent* icalfileset_form_a_matched_recurrence_component(icalsetiter* itr); - -/*********************************************************************** - Gauge Routines -***********************************************************************/ - -icalgauge* icalgauge_new_from_sql(char* sql, int expand); - -int icalgauge_get_expand(icalgauge* gauge); - -void icalgauge_free(icalgauge* gauge); +%} -/* Pending Implementation */ -/* char* icalgauge_as_sql(icalcomponent* gauge); */ +%feature("autodoc", "1"); + +typedef int time_t; + + +// This is declared as an extern, but never used in the library. +%ignore icalfileset_safe_saves; + + +// Ignore these declarations because there does not exist a definition for them +%ignore _icalerror_set_errno(icalerrorenum); +%ignore icalattachtype_add_reference(struct icalattachtype* v); +%ignore icalattachtype_get_binary(struct icalattachtype* v); +%ignore icalattachtype_set_binary(struct icalattachtype* v, char* binary, + int owns); +%ignore icalattachtype_get_url(struct icalattachtype* v); +%ignore icalattachtype_set_url(struct icalattachtype* v, char* url); +%ignore icalattachtype_free(struct icalattachtype* v); +%ignore icalattachtype_get_base64(struct icalattachtype* v); +%ignore icalattachtype_new(void); +%ignore icalattachtype_set_base64(struct icalattachtype* v, char* base64, + int owns); +%ignore icalclassify_class_to_string(icalproperty_xlicclass c); +%ignore icalfileset_new_from_cluster(const char* path, icalcluster *cluster); +%ignore icalgauge_as_sql(icalcomponent* gauge); +%ignore icalgauge_new_clone(icalgauge* g, icalcomponent* comp); +%ignore icallangbind_get_component(icalcomponent *c, const char* comp); +%ignore icallangbind_get_parameter(icalproperty *p, const char* parameter); +%ignore icallangbind_get_property(icalcomponent *c, int n, const char* prop); +%ignore icallangbind_get_property_val(icalproperty* p); +%ignore icalmessage_new_cancel_all(icalcomponent* c, + const char* user, + const char* msg); +%ignore icalmessage_new_cancel_event(icalcomponent* c, + const char* user, + const char* msg); +%ignore icalmessage_new_cancel_instance(icalcomponent* c, + const char* user, + const char* msg); +%ignore icalmime_as_mime_string(char* icalcomponent); +%ignore icalparameter_is_valid(icalparameter* parameter); +%ignore icalparser_parse_value(icalvalue_kind kind, + const char* str, icalcomponent** errors); +%ignore icalrecur_iterator_decrement_count(icalrecur_iterator*); +%ignore icalrestriction_is_parameter_allowed(icalproperty_kind property, + icalparameter_kind parameter); +%ignore icalset_clear_select(icalset* set); +%ignore icalspanlist_make_free_list(icalspanlist* sl); +%ignore icalspanlist_make_busy_list(icalspanlist* sl); +%ignore icalspanlist_next_busy_time(icalspanlist* sl, + struct icaltimetype t); +%ignore icaltime_compare_with_zone(const struct icaltimetype a, + const struct icaltimetype b); +%ignore icaltime_days_in_year (const int year); +%ignore icaltime_from_string_with_zone(const char* str, + const icaltimezone *zone); +%ignore icaltime_from_week_number(const int week_number, + const int year); +%ignore icaltime_is_floating(const struct icaltimetype t); +%ignore icaltimezonetype_free(struct icaltimezonetype tzt); + + +// Remove depreciated functions +%ignore icalproperty_string_to_enum(const char* str); +%ignore icaltimezone_get_utc_offset(icaltimezone *zone, + struct icaltimetype *tt, + int *is_daylight); +%ignore icaltimezone_get_utc_offset_of_utc_time (icaltimezone *zone, + struct icaltimetype *tt, + int *is_daylight); +%ignore icaltime_start_doy_of_week(const struct icaltimetype t); +%ignore icalcomponent_get_span(icalcomponent* comp); +%ignore icalproperty_remove_parameter(icalproperty* prop, icalparameter_kind kind); + +// Can't wrap va_list +%ignore icalproperty_add_parameters(struct icalproperty_impl *prop, va_list args); + +#ifndef _DLOPEN_TEST +%ignore icalset_register_class(icalset *set); +#endif + + +//#include "fcntl.h" /* For Open flags */ +%include "libical/ical.h" +%include "libicalss/icalss.h" + +%inline %{ +/* declare some internal functions which are not in the header file. */ +void icalproperty_set_parent(icalproperty* property, + icalcomponent* component); +icalcomponent* icalproperty_get_parent(const icalproperty* property); + +void icalvalue_set_parent(icalvalue* value, + icalproperty* property); +icalproperty* icalvalue_get_parent(icalvalue* value); + +void icalparameter_set_parent(icalparameter* param, + icalproperty* property); +icalproperty* icalparameter_get_parent(icalparameter* value); -void icalgauge_dump(icalgauge* gauge); +%} -/** @brief Return true if comp matches the gauge. - * - * The component must be in - * cannonical form -- a VCALENDAR with one VEVENT, VTODO or VJOURNAL - * sub component - */ -int icalgauge_compare(icalgauge* g, icalcomponent* comp); +%pythoncode %{ + +# Helper functions for overriding default swig property methods +def _swig_set_properties(cls, properties={}): + for propname, props in properties.items(): + if len(props) > 0: + cls.__swig_getmethods__[propname] = props[0] + if len(props) > 1: + cls.__swig_setmethods__[propname] = props[1] + # Currently not used by swig + if len(props) > 2: + cls.__swig_delmethods__[propname] = props[2] + + if _newclass: + setattr(cls, propname, _swig_property(*props)) + +def _swig_remove_private_properties(cls, properties=tuple()): + # By default remove all properties + if not properties: + props = cls.__swig_getmethods__.copy() + props.update(cls.__swig_setmethods__) + #props.update(cls.__swig_delmethods__) + properties = props.keys() + + for propname in properties: + if cls.__swig_getmethods__.has_key(propname): + del cls.__swig_getmethods__[propname] + if cls.__swig_setmethods__.has_key(propname): + del cls.__swig_setmethods__[propname] + # Currently not used by swig + #if cls.__swig_delmethods__.has_key(propname): + # del cls.__swig_delmethods__[propname] + + if _newclass and hasattr(cls, propname): + delattr(cls, propname) + +import new +def _swig_add_instance_methods(klass, meth_dict={}): + for methname, func in meth_dict.items(): + meth = new.instancemethod(func, None, klass) + if not methname: methname = func.__name__ + func.__name__ = methname + setattr(klass, methname, meth) +%} -/* Pending Implementation */ -/** Clone the component, but only return the properties - * specified in the gauge */ -/* icalcomponent* icalgauge_new_clone(icalgauge* g, icalcomponent* comp); */ +%include "LibicalWrap_icaltimezone.i" +%include "LibicalWrap_icaltime.i" diff --git a/src/python/LibicalWrap_icaltime.i b/src/python/LibicalWrap_icaltime.i new file mode 100644 index 0000000..6b44691 --- /dev/null +++ b/src/python/LibicalWrap_icaltime.i @@ -0,0 +1,204 @@ + +/*====================================================================== + FILE: LibicalWrap_icaltime.i + + (C) COPYRIGHT 2010 Glenn Washburn + + The contents of this file are subject to the Mozilla Public License + Version 1.0 (the "License"); you may not use this file except in + compliance with the License. You may obtain a copy of the License at + http://www.mozilla.org/MPL/ + + Software distributed under the License is distributed on an "AS IS" + basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See + the License for the specific language governing rights and + limitations under the License. + + The original author is Glenn Washburn (crass@berlios.de) + + Contributions from: + + ======================================================================*/ + +// Add some methods to the icaltimetype struct +%extend icaltimetype { + + /* ***** Special methods ***** */ + + int __cmp__(const icaltimetype b) { return icaltime_compare(*($self), b); } + + /* ***** Conversion methods ***** */ + + const char* as_ical_string() { return icaltime_as_ical_string(*($self)); } + time_t as_timet(const icaltimezone *zone=NULL) { + return icaltime_as_timet_with_zone(*($self), zone); + } + + /* ***** Accessor methods ***** */ + + const char *get_tzid() { return icaltime_get_tzid(*($self)); } + int day_of_year() { return icaltime_day_of_year(*($self)); } + int day_of_week() { return icaltime_day_of_week(*($self)); } + + /** Return the day of the year for the Sunday of the week that the + given time is within. */ + /* int start_doy_of_week() { return icaltime_start_doy_of_week(*($self)); } */ + + /** Return the day of the year for the first day of the week that the + given time is within. */ + int start_doy_week(int fdow) { + return icaltime_start_doy_week(*($self), fdow); + } + + /** Return the week number for the week the given time is within */ + int week_number() { return icaltime_week_number(*($self)); } + + + /* ***** Query methods ***** */ + + int is_null_time() { return icaltime_is_null_time(*($self)); } + + /** Returns false if the time is clearly invalid, but is not null. This + is usually the result of creating a new time type buy not clearing + it, or setting one of the flags to an illegal value. */ + int is_valid_time() { return icaltime_is_valid_time(*($self)); } + + /* is_date and is_utc are both over shadowed by the struct accessors, + but they do the same thing. */ + int is_date() { return icaltime_is_date(*($self)); } + int is_utc() { return icaltime_is_utc(*($self)); } + /* int is_floating() { return icaltime_is_floating(*($self)); } */ + + + /* ***** Modify, compare and utility methods ***** */ + + /** Return -1, 0, or 1 to indicate that a<b, a==b or a>b */ + int compare(const icaltimetype b) { return icaltime_compare(*($self), b); } + + /** like icaltime_compare, but only use the date parts. */ + int compare_date_only(const icaltimetype b, icaltimezone *tz=NULL) { + if (tz == NULL) + tz = icaltimezone_get_utc_timezone(); + return icaltime_compare_date_only_tz(*($self), b, tz); + } + + /** Adds or subtracts a number of days, hours, minutes and seconds. */ + void adjust(const int days, const int hours, const int minutes, const int seconds) { + return icaltime_adjust($self, days, hours, minutes, seconds); + } + + /** Normalize the icaltime, so that all fields are within the normal range. */ + icaltimetype normalize() { return icaltime_normalize(*($self)); } + + icaltimetype convert_to_zone(icaltimezone *zone) { + return icaltime_convert_to_zone(*($self), zone); + } + + /* ***** Static methods ***** */ + + static icaltimetype from_timet(const time_t tm, + const int is_date=0, const icaltimezone *zone=NULL) { + return icaltime_from_timet_with_zone(tm, is_date, zone); + } + + static icaltimetype null_time(void) { return icaltime_null_time(); } + static icaltimetype null_date(void) { return icaltime_null_date(); } + + static icaltimetype current_time(const icaltimezone *zone=NULL) { + return icaltime_current_time_with_zone(zone); + } + + static icaltimetype today(void) { return icaltime_today(); } + +#if 0 + static icaltimetype from_string(const char* str, const icaltimezone *zone=NULL) { + /* return _with_zone(str, zone); */ + (void)zone; + return icaltime_from_string(str); + } +#else + /* For the time being do not allow specifying a timezone because this + is unimplemented as of yet. */ + static icaltimetype from_string(const char* str) { + return icaltime_from_string(str); + } +#endif + + /** Return the number of days in the given month */ + static int days_in_month(const int month, const int year) { + return icaltime_days_in_month(month, year); + } + + /** Return whether you've specified a leapyear or not. */ + static int is_leap_year (const int year) { + return icaltime_is_leap_year(year); + } + + /** Return the number of days in this year */ + /* static int days_in_year (const int year) { return icaltime_days_in_year(year); } */ + +} + +// This is a hackish way to support adding the __str__ method to +// a class in python. Its much easier than writing in C (that +// I've figured out). +%pythoncode %{ + +def __icaltimetype_str__(self): + return "<icaltimetype (%d, %d, %d, %d, %d, %d, %d, %d)>" % ( + self.year, self.month, self.day, self.hour, self.minute, + self.second, self.is_date, self.is_daylight) +icaltimetype.__str__ = __icaltimetype_str__ + +import datetime +def icaltimetype_as_datetime(self): + "as_datetime() -> returns datetime object" + return datetime.datetime(self.year, self.month, self.day, self.hour, + self.minute, self.second, 0, self.timezone) +icaltimetype.as_datetime = icaltimetype_as_datetime + +def icaltimetype_from_datetime(dt): + "from_datetime() -> returns icaltimetype object" + tt = icaltimetype() + + tt.year = dt.year + tt.month = dt.month + tt.day = dt.day + tt.hour = dt.hour + tt.minute = dt.minute + tt.second = dt.second + if dt.tzinfo: + # TODO: convert to the right timezone, assume for now we are UTC + tt.zone = 0 + tt.is_utc = True + tt.is_date = False + tt.isdaylight = False + + return tt +icaltimetype.from_datetime = staticmethod(icaltimetype_from_datetime) + +# Remove accessors to private structure members +icaltimetype_delprops = ["is_date", "is_utc", "zone"] + +_swig_remove_private_properties(icaltimetype, icaltimetype_delprops) + + +# Set/Overwrite icaltimetype properties +icaltimetype_props = { + "zone": (_LibicalWrap.icaltime_get_timezone, _LibicalWrap.icaltime_set_timezone, ), + "is_null_time": (_LibicalWrap.icaltime_is_null_time, ), + "is_valid_time": (_LibicalWrap.icaltime_is_valid_time, ), + # These do essentially the same thing as the default swig generated + # accessors is_date and is_utc, but by not defining the setter, we + # make them immutable from python + "is_date": (_LibicalWrap.icaltime_is_date, ), + "is_utc": (_LibicalWrap.icaltime_is_utc, ), +# "is_floating": (_LibicalWrap.icaltime_is_floating, ), +} + +_swig_set_properties(icaltimetype, icaltimetype_props) + +%} + +// TODO: Add icaltime_span_* to icaltime_spantype + diff --git a/src/python/LibicalWrap_icaltimezone.i b/src/python/LibicalWrap_icaltimezone.i new file mode 100644 index 0000000..804a59e --- /dev/null +++ b/src/python/LibicalWrap_icaltimezone.i @@ -0,0 +1,216 @@ + +/*====================================================================== + FILE: LibicalWrap_icaltimezone.i + + (C) COPYRIGHT 2010 Glenn Washburn + + The contents of this file are subject to the Mozilla Public License + Version 1.0 (the "License"); you may not use this file except in + compliance with the License. You may obtain a copy of the License at + http://www.mozilla.org/MPL/ + + Software distributed under the License is distributed on an "AS IS" + basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See + the License for the specific language governing rights and + limitations under the License. + + The original author is Glenn Washburn (crass@berlios.de) + + Contributions from: + + ======================================================================*/ + +%rename(icaltimezone) _icaltimezone; + +%inline %{ +#include "libical/icaltimezone.h" +#include "libical/icaltimezoneimpl.h" +%} +%include "libical/icaltimezone.h" +%include "libical/icaltimezoneimpl.h" + + +%pythoncode %{ + +import time, datetime + +##### Support datetime.tzinfo API ##### +# This is a "good enough" implementation right now. Make better +# later, if needed. +class icaltzinfo(datetime.tzinfo): + def __init__(self, icaltimezone): + self.tz = icaltimezone + + def __cmp__(self, tzinfo): + return cmp(self.tz, self.tz) + + def utcoffset(self, dt): + timet = time.mktime(dt.timetuple()) + tt = icaltimetype.from_timet(int(timet),0,None) + utcoffset = _LibicalWrap.icaltimezone_get_utc_offset(self.tz, tt, None) + return datetime.timedelta(utcoffset) + + def dst(self, dt): + # FIXME: Since icaltimezone_get_utc_offset does all the + # calc for dst internally and there is not function which + # returns what we need here, we'll probably need to partly + # reimplement icaltimezone_get_utc_offset + return datetime.timedelta(0) + + def tzname(self, dt): + return _LibicalWrap.icaltimezone_get_tzid(self.tz) + +# def fromutc(self, dt): pass + +%} + + +#if 0 + +/** Sets the prefix to be used for tzid's generated from system tzdata. + Must be globally unique (such as a domain name owned by the developer + of the calling application), and begin and end with forward slashes. + Do not change or de-allocate the string buffer after calling this. + */ +void icaltimezone_set_tzid_prefix(const char *new_prefix); + +/** + * @par Accessing timezones. + */ + +/** Free any builtin timezone information **/ +void icaltimezone_free_builtin_timezones(void); + +/** Returns the array of builtin icaltimezones. */ +icalarray* icaltimezone_get_builtin_timezones (void); + +/** + * @par Converting times between timezones. + */ + +void icaltimezone_convert_time (struct icaltimetype *tt, + icaltimezone *from_zone, + icaltimezone *to_zone); + + +/** + * @par Getting offsets from UTC. + */ + +/** Calculates the UTC offset of a given local 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 (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); + + +/* + * @par Handling the default location the timezone files + */ + +/** Set the directory to look for the zonefiles */ +void set_zone_directory(char *path); + +/** Free memory dedicated to the zonefile directory */ +void free_zone_directory(void); +void icaltimezone_release_zone_tab(void); + +/* + * @par Debugging Output. + */ + +/** Dumps information about changes in the timezone up to and including + max_year. */ +int icaltimezone_dump_changes (icaltimezone *zone, + int max_year, + FILE *fp); + +#endif + + +// Add some methods to the icaltimetype struct +%extend _icaltimezone { + + /* Might want to change this to somethingmore reasonable, + like longitude or utc offset. */ + int __cmp__(icaltimezone *zone) { + return strcmp(icaltimezone_get_tzid($self), + icaltimezone_get_tzid(zone)); + } + +} + +%pythoncode %{ + +# Remove accessors to private structure members, which is all of them +_swig_remove_private_properties(icaltimezone) + +def _icaltimezone_set_component_wrap(self, comp): + ret = _LibicalWrap.icaltimezone_set_component(self, comp) + if not ret: + # Not successful, raise an exception because setting a property + # has not return value to be checked. + raise Error.LibicalError("Failed to set component to timezone") + +# Set/Overwrite icaltimezone properties +icaltimezone_props = { + "tzid": (_LibicalWrap.icaltimezone_get_tzid, ), + "location": (_LibicalWrap.icaltimezone_get_location, ), + "tznames": (_LibicalWrap.icaltimezone_get_tznames, ), + "latitude": (_LibicalWrap.icaltimezone_get_latitude, ), + "longitude": (_LibicalWrap.icaltimezone_get_longitude, ), + "display_name": (_LibicalWrap.icaltimezone_get_display_name, ), + "component": (_LibicalWrap.icaltimezone_get_component, + _icaltimezone_set_component_wrap, ), +} + +_swig_set_properties(icaltimezone, icaltimezone_props) + +# UTC = _LibicalWrap.icaltimezone_get_utc_timezone() + +def icaltimezone_copy(self): + tz = _LibicalWrap.icaltimezone_copy(self) + tz.this.acquire() + return tz + +def icaltimezone_new(self): + # Hand off the underlying pointer by setting the this attribute + print "newing icaltimezone" + obj = _LibicalWrap.icaltimezone_new() + 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, +} +_swig_add_instance_methods(icaltimezone, icaltimezone_methods) + +icaltimezone.get_builtin_timezone = staticmethod(_LibicalWrap.icaltimezone_get_builtin_timezone) +icaltimezone.get_builtin_timezone_from_offset = staticmethod(_LibicalWrap.icaltimezone_get_builtin_timezone_from_offset) +icaltimezone.get_builtin_timezone_from_tzid = staticmethod(_LibicalWrap.icaltimezone_get_builtin_timezone_from_tzid) + +#icaltimezone.free_builtin_timezones = staticmethod(_LibicalWrap.icaltimezone_free_builtin_timezones) +#icaltimezone.get_builtin_timezones = staticmethod(_LibicalWrap.icaltimezone_get_builtin_timezones) + + +%} + diff --git a/src/python/Makefile.am b/src/python/Makefile.am index e221fa9..077e03d 100644 --- a/src/python/Makefile.am +++ b/src/python/Makefile.am @@ -1,36 +1,12 @@ +# See xapian-bindings for an example of integrating autotools, swig and python -lib_LTLIBRARIES = libLibicalWrap.la +BUILT_SOURCES = _LibicalWrap.c -libLibicalWrap_la_SOURCES = LibicalWrap.c +pyexec_LTLIBRARIES = _LibicalWrap.la -INCLUDES = \ - -I$(top_builddir) \ - -I$(top_srcdir)/src \ - -I$(top_builddir)/src \ - -I$(top_srcdir)/src/libical \ - -I$(top_builddir)/src/libical \ - -I$(top_srcdir)/src/libicalss \ - $(PY_CFLAGS) - -LDADD = ../libical/libical.la ../libicalss/libicalss.la - -all: LibicalWrap.so - -LibicalWrap.c: LibicalWrap.i - swig -python -o LibicalWrap.c LibicalWrap.i - -# This part should be done with libtool, but I don't know how to do -# it. Libtool needs to generate a shared library in this directory -# regardless of the value of AM_DISABLE_SHARED -LibicalWrap.so: LibicalWrap.c - ld -shared -o LibicalWrap.so LibicalWrap.o ../libical/.libs/libical.a ../libicalss/.libs/libicalss.a - -CLEANFILES = LibicalWrap.c LibicalWrap_wrap.doc Libical.pyc LibicalWrap.so - -EXTRA_DIST = \ +common_FILES = \ +__init__.py \ Libical.py \ -LibicalWrap.i \ -python-binding.txt \ test.py \ Attendee.py \ Collection.py \ @@ -42,7 +18,38 @@ Gauge.py \ Period.py \ Property.py \ Store.py \ -Time.py \ +Time.py + +# Install as python source so the code gets byte-compiled at install time. +pkgpython_PYTHON = \ +$(common_FILES) \ +LibicalWrap.py + +# To allow non-standard library names (ie those not prefixed by "lib") see: +# http://sources.redhat.com/automake/automake.html#Libtool-Modules +_LibicalWrap_la_SOURCES = _LibicalWrap.c +_LibicalWrap_la_LDFLAGS = -avoid-version -module -lc +_LibicalWrap_la_LIBADD = $(top_builddir)/src/libical/libical.la \ + $(top_builddir)/src/libicalss/libicalss.la + +AM_CPPFLAGS = \ + -I$(top_builddir) \ + -I$(top_srcdir)/src \ + -I$(top_builddir)/src \ + -I$(top_srcdir)/src/libical \ + -I$(top_builddir)/src/libical \ + -I$(top_srcdir)/src/libicalss \ + $(PY_CFLAGS) + +_LibicalWrap.c: $(srcdir)/LibicalWrap.i $(srcdir)/*.i $(top_builddir)/src/libical/ical.h $(top_builddir)/src/libicalss/icalss.h + swig -python -Wall $(AM_CPPFLAGS) -o _LibicalWrap.c $(srcdir)/LibicalWrap.i + +CLEANFILES = _LibicalWrap.c _LibicalWrap_wrap.doc Libical.pyc LibicalWrap.py _LibicalWrap.so + +EXTRA_DIST = \ +$(common_FILES) \ +LibicalWrap.i \ +python-binding.txt \ ChangeLog diff --git a/src/python/Makefile.in b/src/python/Makefile.in index 1cd1f64..6e5c7eb 100644 --- a/src/python/Makefile.in +++ b/src/python/Makefile.in @@ -1,8 +1,8 @@ -# Makefile.in generated by automake 1.9.5 from Makefile.am. +# Makefile.in generated by automake 1.12.2 from Makefile.am. # @configure_input@ -# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, -# 2003, 2004, 2005 Free Software Foundation, Inc. +# Copyright (C) 1994-2012 Free Software Foundation, Inc. + # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. @@ -14,17 +14,31 @@ @SET_MAKE@ -SOURCES = $(libLibicalWrap_la_SOURCES) +# See xapian-bindings for an example of integrating autotools, swig and python -srcdir = @srcdir@ -top_srcdir = @top_srcdir@ VPATH = @srcdir@ +am__make_dryrun = \ + { \ + am__dry=no; \ + case $$MAKEFLAGS in \ + *\\[\ \ ]*) \ + echo 'am--echo: ; @echo "AM" OK' | $(MAKE) -f - 2>/dev/null \ + | grep '^AM OK$$' >/dev/null || am__dry=yes;; \ + *) \ + for am__flg in $$MAKEFLAGS; do \ + case $$am__flg in \ + *=*|--*) ;; \ + *n*) am__dry=yes; break;; \ + esac; \ + done;; \ + esac; \ + test $$am__dry = yes; \ + } pkgdatadir = $(datadir)/@PACKAGE@ -pkglibdir = $(libdir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ -top_builddir = ../.. +pkglibdir = $(libdir)/@PACKAGE@ +pkglibexecdir = $(libexecdir)/@PACKAGE@ am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd -INSTALL = @INSTALL@ install_sh_DATA = $(install_sh) -c -m 644 install_sh_PROGRAM = $(install_sh) -c install_sh_SCRIPT = $(install_sh) -c @@ -40,7 +54,9 @@ build_triplet = @build@ host_triplet = @host@ target_triplet = @target@ subdir = src/python -DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in ChangeLog +DIST_COMMON = $(pkgpython_PYTHON) $(srcdir)/Makefile.am \ + $(srcdir)/Makefile.in $(top_srcdir)/depcomp \ + $(top_srcdir)/mkinstalldirs $(top_srcdir)/py-compile ChangeLog ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/configure.in am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ @@ -48,37 +64,69 @@ am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs CONFIG_HEADER = $(top_builddir)/config.h CONFIG_CLEAN_FILES = +CONFIG_CLEAN_VPATH_FILES = am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; am__vpath_adj = case $$p in \ $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \ *) f=$$p;; \ esac; -am__strip_dir = `echo $$p | sed -e 's|^.*/||'`; -am__installdirs = "$(DESTDIR)$(libdir)" -libLTLIBRARIES_INSTALL = $(INSTALL) -LTLIBRARIES = $(lib_LTLIBRARIES) -libLibicalWrap_la_LIBADD = -am_libLibicalWrap_la_OBJECTS = LibicalWrap.lo -libLibicalWrap_la_OBJECTS = $(am_libLibicalWrap_la_OBJECTS) -DEFAULT_INCLUDES = -I. -I$(srcdir) -I$(top_builddir) +am__strip_dir = f=`echo $$p | sed -e 's|^.*/||'`; +am__install_max = 40 +am__nobase_strip_setup = \ + srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/\\\\&/g'` +am__nobase_strip = \ + for p in $$list; do echo "$$p"; done | sed -e "s|$$srcdirstrip/||" +am__nobase_list = $(am__nobase_strip_setup); \ + for p in $$list; do echo "$$p $$p"; done | \ + sed "s| $$srcdirstrip/| |;"' / .*\//!s/ .*/ ./; s,\( .*\)/[^/]*$$,\1,' | \ + $(AWK) 'BEGIN { files["."] = "" } { files[$$2] = files[$$2] " " $$1; \ + if (++n[$$2] == $(am__install_max)) \ + { print $$2, files[$$2]; n[$$2] = 0; files[$$2] = "" } } \ + END { for (dir in files) print dir, files[dir] }' +am__base_list = \ + sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \ + sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g' +am__uninstall_files_from_dir = { \ + test -z "$$files" \ + || { test ! -d "$$dir" && test ! -f "$$dir" && test ! -r "$$dir"; } \ + || { echo " ( cd '$$dir' && rm -f" $$files ")"; \ + $(am__cd) "$$dir" && rm -f $$files; }; \ + } +am__installdirs = "$(DESTDIR)$(pyexecdir)" "$(DESTDIR)$(pkgpythondir)" +LTLIBRARIES = $(pyexec_LTLIBRARIES) +_LibicalWrap_la_DEPENDENCIES = $(top_builddir)/src/libical/libical.la \ + $(top_builddir)/src/libicalss/libicalss.la +am__LibicalWrap_la_OBJECTS = _LibicalWrap.lo +_LibicalWrap_la_OBJECTS = $(am__LibicalWrap_la_OBJECTS) +_LibicalWrap_la_LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) \ + $(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \ + $(_LibicalWrap_la_LDFLAGS) $(LDFLAGS) -o $@ +DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir) depcomp = $(SHELL) $(top_srcdir)/depcomp am__depfiles_maybe = depfiles +am__mv = mv -f COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -LTCOMPILE = $(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) \ - $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \ - $(AM_CFLAGS) $(CFLAGS) +LTCOMPILE = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ + --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ + $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) CCLD = $(CC) -LINK = $(LIBTOOL) --tag=CC --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \ - $(AM_LDFLAGS) $(LDFLAGS) -o $@ -SOURCES = $(libLibicalWrap_la_SOURCES) -DIST_SOURCES = $(libLibicalWrap_la_SOURCES) +LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ + --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) \ + $(LDFLAGS) -o $@ +SOURCES = $(_LibicalWrap_la_SOURCES) +DIST_SOURCES = $(_LibicalWrap_la_SOURCES) +am__can_run_installinfo = \ + case $$AM_UPDATE_INFO_DIR in \ + n|no|NO) false;; \ + *) (install-info --version) >/dev/null 2>&1;; \ + esac +am__py_compile = PYTHON=$(PYTHON) $(SHELL) $(py_compile) +py_compile = $(top_srcdir)/py-compile ETAGS = etags CTAGS = ctags DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ -AMDEP_FALSE = @AMDEP_FALSE@ -AMDEP_TRUE = @AMDEP_TRUE@ AMTAR = @AMTAR@ AR = @AR@ AUTOCONF = @AUTOCONF@ @@ -102,18 +150,17 @@ CXXFLAGS = @CXXFLAGS@ CYGPATH_W = @CYGPATH_W@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ -DEV_FALSE = @DEV_FALSE@ -DEV_TRUE = @DEV_TRUE@ -ECHO = @ECHO@ +DLLTOOL = @DLLTOOL@ +DSYMUTIL = @DSYMUTIL@ +DUMPBIN = @DUMPBIN@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ -F77 = @F77@ -FFLAGS = @FFLAGS@ -HAVE_PTHREAD_FALSE = @HAVE_PTHREAD_FALSE@ -HAVE_PTHREAD_TRUE = @HAVE_PTHREAD_TRUE@ +FGREP = @FGREP@ +GREP = @GREP@ +INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ @@ -123,6 +170,7 @@ JAVA = @JAVA@ JAVAC = @JAVAC@ JAVAH = @JAVAH@ JAVA_PLATFORM = @JAVA_PLATFORM@ +LD = @LD@ LDFLAGS = @LDFLAGS@ LEX = @LEX@ LEXLIB = @LEXLIB@ @@ -130,53 +178,52 @@ LEX_OUTPUT_ROOT = @LEX_OUTPUT_ROOT@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LIBTOOL = @LIBTOOL@ +LIPO = @LIPO@ LN_S = @LN_S@ LTLIBOBJS = @LTLIBOBJS@ MAINT = @MAINT@ -MAINTAINER_MODE_FALSE = @MAINTAINER_MODE_FALSE@ -MAINTAINER_MODE_TRUE = @MAINTAINER_MODE_TRUE@ MAKEINFO = @MAKEINFO@ +MANIFEST_TOOL = @MANIFEST_TOOL@ +MKDIR_P = @MKDIR_P@ +NM = @NM@ +NMEDIT = @NMEDIT@ +OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ -OS_WIN32_FALSE = @OS_WIN32_FALSE@ -OS_WIN32_TRUE = @OS_WIN32_TRUE@ +OTOOL = @OTOOL@ +OTOOL64 = @OTOOL64@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ +PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ PERL = @PERL@ PTHREAD_LIBS = @PTHREAD_LIBS@ +PYTHON = @PYTHON@ +PYTHON_EXEC_PREFIX = @PYTHON_EXEC_PREFIX@ +PYTHON_PLATFORM = @PYTHON_PLATFORM@ +PYTHON_PREFIX = @PYTHON_PREFIX@ +PYTHON_VERSION = @PYTHON_VERSION@ PY_CFLAGS = @PY_CFLAGS@ -PY_EXTRA_LIBS = @PY_EXTRA_LIBS@ -PY_LIBS = @PY_LIBS@ -PY_LIB_LOC = @PY_LIB_LOC@ RANLIB = @RANLIB@ +SED = @SED@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ STRIP = @STRIP@ VERSION = @VERSION@ -WITH_BDB4_FALSE = @WITH_BDB4_FALSE@ -WITH_BDB4_TRUE = @WITH_BDB4_TRUE@ -WITH_CXX_BINDINGS_FALSE = @WITH_CXX_BINDINGS_FALSE@ -WITH_CXX_BINDINGS_TRUE = @WITH_CXX_BINDINGS_TRUE@ -WITH_JAVA_FALSE = @WITH_JAVA_FALSE@ -WITH_JAVA_TRUE = @WITH_JAVA_TRUE@ -WITH_PYTHON_FALSE = @WITH_PYTHON_FALSE@ -WITH_PYTHON_TRUE = @WITH_PYTHON_TRUE@ YACC = @YACC@ +YFLAGS = @YFLAGS@ ZONE_INFO = @ZONE_INFO@ +abs_builddir = @abs_builddir@ +abs_srcdir = @abs_srcdir@ +abs_top_builddir = @abs_top_builddir@ +abs_top_srcdir = @abs_top_srcdir@ ac_ct_AR = @ac_ct_AR@ ac_ct_CC = @ac_ct_CC@ ac_ct_CXX = @ac_ct_CXX@ -ac_ct_F77 = @ac_ct_F77@ -ac_ct_RANLIB = @ac_ct_RANLIB@ -ac_ct_STRIP = @ac_ct_STRIP@ -am__fastdepCC_FALSE = @am__fastdepCC_FALSE@ -am__fastdepCC_TRUE = @am__fastdepCC_TRUE@ -am__fastdepCXX_FALSE = @am__fastdepCXX_FALSE@ -am__fastdepCXX_TRUE = @am__fastdepCXX_TRUE@ +ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ am__include = @am__include@ am__leading_dot = @am__leading_dot@ am__quote = @am__quote@ @@ -188,50 +235,54 @@ build_alias = @build_alias@ build_cpu = @build_cpu@ build_os = @build_os@ build_vendor = @build_vendor@ +builddir = @builddir@ datadir = @datadir@ +datarootdir = @datarootdir@ +docdir = @docdir@ +dvidir = @dvidir@ exec_prefix = @exec_prefix@ host = @host@ host_alias = @host_alias@ host_cpu = @host_cpu@ host_os = @host_os@ host_vendor = @host_vendor@ +htmldir = @htmldir@ includedir = @includedir@ infodir = @infodir@ install_sh = @install_sh@ libdir = @libdir@ libexecdir = @libexecdir@ +localedir = @localedir@ localstatedir = @localstatedir@ mandir = @mandir@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ +pdfdir = @pdfdir@ +pkgpyexecdir = @pkgpyexecdir@ +pkgpythondir = @pkgpythondir@ prefix = @prefix@ program_transform_name = @program_transform_name@ -python_val = @python_val@ +psdir = @psdir@ +pyexecdir = @pyexecdir@ +pythondir = @pythondir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ +srcdir = @srcdir@ +swig_val = @swig_val@ sysconfdir = @sysconfdir@ target = @target@ target_alias = @target_alias@ target_cpu = @target_cpu@ target_os = @target_os@ target_vendor = @target_vendor@ -lib_LTLIBRARIES = libLibicalWrap.la -libLibicalWrap_la_SOURCES = LibicalWrap.c -INCLUDES = \ - -I$(top_builddir) \ - -I$(top_srcdir)/src \ - -I$(top_builddir)/src \ - -I$(top_srcdir)/src/libical \ - -I$(top_builddir)/src/libical \ - -I$(top_srcdir)/src/libicalss \ - $(PY_CFLAGS) - -LDADD = ../libical/libical.la ../libicalss/libicalss.la -CLEANFILES = LibicalWrap.c LibicalWrap_wrap.doc Libical.pyc LibicalWrap.so -EXTRA_DIST = \ +top_build_prefix = @top_build_prefix@ +top_builddir = @top_builddir@ +top_srcdir = @top_srcdir@ +BUILT_SOURCES = _LibicalWrap.c +pyexec_LTLIBRARIES = _LibicalWrap.la +common_FILES = \ +__init__.py \ Libical.py \ -LibicalWrap.i \ -python-binding.txt \ test.py \ Attendee.py \ Collection.py \ @@ -243,10 +294,40 @@ Gauge.py \ Period.py \ Property.py \ Store.py \ -Time.py \ +Time.py + + +# Install as python source so the code gets byte-compiled at install time. +pkgpython_PYTHON = \ +$(common_FILES) \ +LibicalWrap.py + + +# To allow non-standard library names (ie those not prefixed by "lib") see: +# http://sources.redhat.com/automake/automake.html#Libtool-Modules +_LibicalWrap_la_SOURCES = _LibicalWrap.c +_LibicalWrap_la_LDFLAGS = -avoid-version -module -lc +_LibicalWrap_la_LIBADD = $(top_builddir)/src/libical/libical.la \ + $(top_builddir)/src/libicalss/libicalss.la + +AM_CPPFLAGS = \ + -I$(top_builddir) \ + -I$(top_srcdir)/src \ + -I$(top_builddir)/src \ + -I$(top_srcdir)/src/libical \ + -I$(top_builddir)/src/libical \ + -I$(top_srcdir)/src/libicalss \ + $(PY_CFLAGS) + +CLEANFILES = _LibicalWrap.c _LibicalWrap_wrap.doc Libical.pyc LibicalWrap.py _LibicalWrap.so +EXTRA_DIST = \ +$(common_FILES) \ +LibicalWrap.i \ +python-binding.txt \ ChangeLog -all: all-am +all: $(BUILT_SOURCES) + $(MAKE) $(AM_MAKEFLAGS) all-am .SUFFIXES: .SUFFIXES: .c .lo .o .obj @@ -254,14 +335,14 @@ $(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__confi @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh \ - && exit 0; \ + ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ + && { if test -f $@; then exit 0; else break; fi; }; \ exit 1;; \ esac; \ done; \ - echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu src/python/Makefile'; \ - cd $(top_srcdir) && \ - $(AUTOMAKE) --gnu src/python/Makefile + echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu src/python/Makefile'; \ + $(am__cd) $(top_srcdir) && \ + $(AUTOMAKE) --gnu src/python/Makefile .PRECIOUS: Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ @@ -279,35 +360,43 @@ $(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh -install-libLTLIBRARIES: $(lib_LTLIBRARIES) +$(am__aclocal_m4_deps): +install-pyexecLTLIBRARIES: $(pyexec_LTLIBRARIES) @$(NORMAL_INSTALL) - test -z "$(libdir)" || $(mkdir_p) "$(DESTDIR)$(libdir)" - @list='$(lib_LTLIBRARIES)'; for p in $$list; do \ + @list='$(pyexec_LTLIBRARIES)'; test -n "$(pyexecdir)" || list=; \ + list2=; for p in $$list; do \ if test -f $$p; then \ - f=$(am__strip_dir) \ - echo " $(LIBTOOL) --mode=install $(libLTLIBRARIES_INSTALL) $(INSTALL_STRIP_FLAG) '$$p' '$(DESTDIR)$(libdir)/$$f'"; \ - $(LIBTOOL) --mode=install $(libLTLIBRARIES_INSTALL) $(INSTALL_STRIP_FLAG) "$$p" "$(DESTDIR)$(libdir)/$$f"; \ + list2="$$list2 $$p"; \ else :; fi; \ - done - -uninstall-libLTLIBRARIES: + done; \ + test -z "$$list2" || { \ + echo " $(MKDIR_P) '$(DESTDIR)$(pyexecdir)'"; \ + $(MKDIR_P) "$(DESTDIR)$(pyexecdir)" || exit 1; \ + echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL) $(INSTALL_STRIP_FLAG) $$list2 '$(DESTDIR)$(pyexecdir)'"; \ + $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL) $(INSTALL_STRIP_FLAG) $$list2 "$(DESTDIR)$(pyexecdir)"; \ + } + +uninstall-pyexecLTLIBRARIES: @$(NORMAL_UNINSTALL) - @set -x; list='$(lib_LTLIBRARIES)'; for p in $$list; do \ - p=$(am__strip_dir) \ - echo " $(LIBTOOL) --mode=uninstall rm -f '$(DESTDIR)$(libdir)/$$p'"; \ - $(LIBTOOL) --mode=uninstall rm -f "$(DESTDIR)$(libdir)/$$p"; \ + @list='$(pyexec_LTLIBRARIES)'; test -n "$(pyexecdir)" || list=; \ + for p in $$list; do \ + $(am__strip_dir) \ + echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f '$(DESTDIR)$(pyexecdir)/$$f'"; \ + $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f "$(DESTDIR)$(pyexecdir)/$$f"; \ done -clean-libLTLIBRARIES: - -test -z "$(lib_LTLIBRARIES)" || rm -f $(lib_LTLIBRARIES) - @list='$(lib_LTLIBRARIES)'; for p in $$list; do \ - dir="`echo $$p | sed -e 's|/[^/]*$$||'`"; \ - test "$$dir" != "$$p" || dir=.; \ - echo "rm -f \"$${dir}/so_locations\""; \ - rm -f "$${dir}/so_locations"; \ - done -libLibicalWrap.la: $(libLibicalWrap_la_OBJECTS) $(libLibicalWrap_la_DEPENDENCIES) - $(LINK) -rpath $(libdir) $(libLibicalWrap_la_LDFLAGS) $(libLibicalWrap_la_OBJECTS) $(libLibicalWrap_la_LIBADD) $(LIBS) +clean-pyexecLTLIBRARIES: + -test -z "$(pyexec_LTLIBRARIES)" || rm -f $(pyexec_LTLIBRARIES) + @list='$(pyexec_LTLIBRARIES)'; \ + locs=`for p in $$list; do echo $$p; done | \ + sed 's|^[^/]*$$|.|; s|/[^/]*$$||; s|$$|/so_locations|' | \ + sort -u`; \ + test -z "$$locs" || { \ + echo rm -f $${locs}; \ + rm -f $${locs}; \ + } +_LibicalWrap.la: $(_LibicalWrap_la_OBJECTS) $(_LibicalWrap_la_DEPENDENCIES) $(EXTRA__LibicalWrap_la_DEPENDENCIES) + $(_LibicalWrap_la_LINK) -rpath $(pyexecdir) $(_LibicalWrap_la_OBJECTS) $(_LibicalWrap_la_LIBADD) $(LIBS) mostlyclean-compile: -rm -f *.$(OBJEXT) @@ -315,25 +404,25 @@ mostlyclean-compile: distclean-compile: -rm -f *.tab.c -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/LibicalWrap.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/_LibicalWrap.Plo@am__quote@ .c.o: -@am__fastdepCC_TRUE@ if $(COMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" -c -o $@ $<; \ -@am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Po"; else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; fi +@am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(COMPILE) -c $< .c.obj: -@am__fastdepCC_TRUE@ if $(COMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" -c -o $@ `$(CYGPATH_W) '$<'`; \ -@am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Po"; else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; fi +@am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(COMPILE) -c `$(CYGPATH_W) '$<'` .c.lo: -@am__fastdepCC_TRUE@ if $(LTCOMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" -c -o $@ $<; \ -@am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Plo"; else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; fi +@am__fastdepCC_TRUE@ $(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(LTCOMPILE) -c -o $@ $< @@ -343,94 +432,151 @@ mostlyclean-libtool: clean-libtool: -rm -rf .libs _libs - -distclean-libtool: - -rm -f libtool -uninstall-info-am: +install-pkgpythonPYTHON: $(pkgpython_PYTHON) + @$(NORMAL_INSTALL) + @list='$(pkgpython_PYTHON)'; dlist=; list2=; test -n "$(pkgpythondir)" || list=; \ + if test -n "$$list"; then \ + echo " $(MKDIR_P) '$(DESTDIR)$(pkgpythondir)'"; \ + $(MKDIR_P) "$(DESTDIR)$(pkgpythondir)" || exit 1; \ + fi; \ + for p in $$list; do \ + if test -f "$$p"; then b=; else b="$(srcdir)/"; fi; \ + if test -f $$b$$p; then \ + $(am__strip_dir) \ + dlist="$$dlist $$f"; \ + list2="$$list2 $$b$$p"; \ + else :; fi; \ + done; \ + for file in $$list2; do echo $$file; done | $(am__base_list) | \ + while read files; do \ + echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(pkgpythondir)'"; \ + $(INSTALL_DATA) $$files "$(DESTDIR)$(pkgpythondir)" || exit $$?; \ + done || exit $$?; \ + if test -n "$$dlist"; then \ + $(am__py_compile) --destdir "$(DESTDIR)" \ + --basedir "$(pkgpythondir)" $$dlist; \ + else :; fi + +uninstall-pkgpythonPYTHON: + @$(NORMAL_UNINSTALL) + @list='$(pkgpython_PYTHON)'; test -n "$(pkgpythondir)" || list=; \ + files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \ + test -n "$$files" || exit 0; \ + dir='$(DESTDIR)$(pkgpythondir)'; \ + filesc=`echo "$$files" | sed 's|$$|c|'`; \ + fileso=`echo "$$files" | sed 's|$$|o|'`; \ + st=0; \ + for files in "$$files" "$$filesc" "$$fileso"; do \ + $(am__uninstall_files_from_dir) || st=$$?; \ + done; \ + exit $$st ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ - $(AWK) ' { files[$$0] = 1; } \ - END { for (i in files) print i; }'`; \ + $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ + END { if (nonempty) { for (i in files) print i; }; }'`; \ mkid -fID $$unique tags: TAGS TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) - tags=; \ + set x; \ here=`pwd`; \ list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ - $(AWK) ' { files[$$0] = 1; } \ - END { for (i in files) print i; }'`; \ - if test -z "$(ETAGS_ARGS)$$tags$$unique"; then :; else \ + $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ + END { if (nonempty) { for (i in files) print i; }; }'`; \ + shift; \ + if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ test -n "$$unique" || unique=$$empty_fix; \ - $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ - $$tags $$unique; \ + if test $$# -gt 0; then \ + $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ + "$$@" $$unique; \ + else \ + $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ + $$unique; \ + fi; \ fi ctags: CTAGS CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) - tags=; \ - here=`pwd`; \ list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ - $(AWK) ' { files[$$0] = 1; } \ - END { for (i in files) print i; }'`; \ - test -z "$(CTAGS_ARGS)$$tags$$unique" \ + $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ + END { if (nonempty) { for (i in files) print i; }; }'`; \ + test -z "$(CTAGS_ARGS)$$unique" \ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ - $$tags $$unique + $$unique GTAGS: here=`$(am__cd) $(top_builddir) && pwd` \ - && cd $(top_srcdir) \ - && gtags -i $(GTAGS_ARGS) $$here + && $(am__cd) $(top_srcdir) \ + && gtags -i $(GTAGS_ARGS) "$$here" + +cscopelist: $(HEADERS) $(SOURCES) $(LISP) + list='$(SOURCES) $(HEADERS) $(LISP)'; \ + case "$(srcdir)" in \ + [\\/]* | ?:[\\/]*) sdir="$(srcdir)" ;; \ + *) sdir=$(subdir)/$(srcdir) ;; \ + esac; \ + for i in $$list; do \ + if test -f "$$i"; then \ + echo "$(subdir)/$$i"; \ + else \ + echo "$$sdir/$$i"; \ + fi; \ + done >> $(top_builddir)/cscope.files distclean-tags: -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags distdir: $(DISTFILES) - @srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; \ - topsrcdirstrip=`echo "$(top_srcdir)" | sed 's|.|.|g'`; \ - list='$(DISTFILES)'; for file in $$list; do \ - case $$file in \ - $(srcdir)/*) file=`echo "$$file" | sed "s|^$$srcdirstrip/||"`;; \ - $(top_srcdir)/*) file=`echo "$$file" | sed "s|^$$topsrcdirstrip/|$(top_builddir)/|"`;; \ - esac; \ + @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ + topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ + list='$(DISTFILES)'; \ + dist_files=`for file in $$list; do echo $$file; done | \ + sed -e "s|^$$srcdirstrip/||;t" \ + -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ + case $$dist_files in \ + */*) $(MKDIR_P) `echo "$$dist_files" | \ + sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ + sort -u` ;; \ + esac; \ + for file in $$dist_files; do \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ - dir=`echo "$$file" | sed -e 's,/[^/]*$$,,'`; \ - if test "$$dir" != "$$file" && test "$$dir" != "."; then \ - dir="/$$dir"; \ - $(mkdir_p) "$(distdir)$$dir"; \ - else \ - dir=''; \ - fi; \ if test -d $$d/$$file; then \ + dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ + if test -d "$(distdir)/$$file"; then \ + find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ + fi; \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ - cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \ + cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ + find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ - cp -pR $$d/$$file $(distdir)$$dir || exit 1; \ + cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ else \ - test -f $(distdir)/$$file \ - || cp -p $$d/$$file $(distdir)/$$file \ + test -f "$(distdir)/$$file" \ + || cp -p $$d/$$file "$(distdir)/$$file" \ || exit 1; \ fi; \ done check-am: all-am -check: check-am +check: $(BUILT_SOURCES) + $(MAKE) $(AM_MAKEFLAGS) check-am all-am: Makefile $(LTLIBRARIES) installdirs: - for dir in "$(DESTDIR)$(libdir)"; do \ - test -z "$$dir" || $(mkdir_p) "$$dir"; \ + for dir in "$(DESTDIR)$(pyexecdir)" "$(DESTDIR)$(pkgpythondir)"; do \ + test -z "$$dir" || $(MKDIR_P) "$$dir"; \ done -install: install-am +install: $(BUILT_SOURCES) + $(MAKE) $(AM_MAKEFLAGS) install-am install-exec: install-exec-am install-data: install-data-am uninstall: uninstall-am @@ -440,10 +586,15 @@ install-am: all-am installcheck: installcheck-am install-strip: - $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ - install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ - `test -z '$(STRIP)' || \ - echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install + if test -z '$(STRIP)'; then \ + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + install; \ + else \ + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \ + fi mostlyclean-generic: clean-generic: @@ -451,20 +602,22 @@ clean-generic: distclean-generic: -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) + -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) maintainer-clean-generic: @echo "This command is intended for maintainers to use" @echo "it deletes files that may require special tools to rebuild." + -test -z "$(BUILT_SOURCES)" || rm -f $(BUILT_SOURCES) clean: clean-am -clean-am: clean-generic clean-libLTLIBRARIES clean-libtool \ +clean-am: clean-generic clean-libtool clean-pyexecLTLIBRARIES \ mostlyclean-am distclean: distclean-am -rm -rf ./$(DEPDIR) -rm -f Makefile distclean-am: clean-am distclean-compile distclean-generic \ - distclean-libtool distclean-tags + distclean-tags dvi: dvi-am @@ -472,18 +625,38 @@ dvi-am: html: html-am +html-am: + info: info-am info-am: -install-data-am: +install-data-am: install-pkgpythonPYTHON + +install-dvi: install-dvi-am + +install-dvi-am: + +install-exec-am: install-pyexecLTLIBRARIES -install-exec-am: install-libLTLIBRARIES +install-html: install-html-am + +install-html-am: install-info: install-info-am +install-info-am: + install-man: +install-pdf: install-pdf-am + +install-pdf-am: + +install-ps: install-ps-am + +install-ps-am: + installcheck-am: maintainer-clean: maintainer-clean-am @@ -504,32 +677,30 @@ ps: ps-am ps-am: -uninstall-am: uninstall-info-am uninstall-libLTLIBRARIES +uninstall-am: uninstall-pkgpythonPYTHON uninstall-pyexecLTLIBRARIES + +.MAKE: all check install install-am install-strip .PHONY: CTAGS GTAGS all all-am check check-am clean clean-generic \ - clean-libLTLIBRARIES clean-libtool ctags distclean \ - distclean-compile distclean-generic distclean-libtool \ - distclean-tags distdir dvi dvi-am html html-am info info-am \ - install install-am install-data install-data-am install-exec \ - install-exec-am install-info install-info-am \ - install-libLTLIBRARIES install-man install-strip installcheck \ + clean-libtool clean-pyexecLTLIBRARIES cscopelist ctags \ + distclean distclean-compile distclean-generic \ + distclean-libtool distclean-tags distdir dvi dvi-am html \ + html-am info info-am install install-am install-data \ + install-data-am install-dvi install-dvi-am install-exec \ + install-exec-am install-html install-html-am install-info \ + install-info-am install-man install-pdf install-pdf-am \ + install-pkgpythonPYTHON install-ps install-ps-am \ + install-pyexecLTLIBRARIES install-strip installcheck \ installcheck-am installdirs maintainer-clean \ maintainer-clean-generic mostlyclean mostlyclean-compile \ mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \ - tags uninstall uninstall-am uninstall-info-am \ - uninstall-libLTLIBRARIES - + tags uninstall uninstall-am uninstall-pkgpythonPYTHON \ + uninstall-pyexecLTLIBRARIES -all: LibicalWrap.so -LibicalWrap.c: LibicalWrap.i - swig -python -o LibicalWrap.c LibicalWrap.i +_LibicalWrap.c: $(srcdir)/LibicalWrap.i $(srcdir)/*.i $(top_builddir)/src/libical/ical.h $(top_builddir)/src/libicalss/icalss.h + swig -python -Wall $(AM_CPPFLAGS) -o _LibicalWrap.c $(srcdir)/LibicalWrap.i -# This part should be done with libtool, but I don't know how to do -# it. Libtool needs to generate a shared library in this directory -# regardless of the value of AM_DISABLE_SHARED -LibicalWrap.so: LibicalWrap.c - ld -shared -o LibicalWrap.so LibicalWrap.o ../libical/.libs/libical.a ../libicalss/.libs/libicalss.a # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. .NOEXPORT: diff --git a/src/python/Period.py b/src/python/Period.py index a9a4777..fb99816 100644 --- a/src/python/Period.py +++ b/src/python/Period.py @@ -76,13 +76,13 @@ class Period(Property): raise Property.ConstructorFailedError("Failed to construct Period") def _end_is_duration(self): - dur = icalperiodtype_duration_get(self.pt) + dur = self.pt.duration if not icaldurationtype_is_null_duration(dur): return 1 return 0 def _end_is_time(self): - end = icalperiodtype_end_get(self.pt) + end = self.pt.end if not icaltime_is_null_time(end): return 1 return 0 @@ -112,12 +112,12 @@ class Period(Property): else: raise TypeError - icalperiodtype_start_set(self.pt,t.tt) + self.pt.start = t.tt self._update_value() - return Time(icaltime_as_timet(icalperiodtype_start_get(self.pt)), + return Time(self.pt.start.as_timet(), "DTSTART") def end(self,v=None): @@ -139,23 +139,22 @@ class Period(Property): raise TypeError if(self._end_is_duration()): - start = icaltime_as_timet(icalperiodtype_start_get(self.pt)) + start = self.pt.start.as_timet() dur = t.utc_seconds()-start; - icalperiodtype_duration_set(self.pt, - icaldurationtype_from_int(dur)) + self.pt.duration = icaldurationtype_from_int(dur) else: - icalperiodtype_end_set(self.pt,t.tt) + self.pt.end = t.tt self._update_value() if(self._end_is_time()): - rt = Time(icaltime_as_timet(icalperiodtype_end_get(self.pt)), + rt = Time(self.pt.end.as_timet(), 'DTEND') rt.timezone(self.timezone()) return rt elif(self._end_is_duration()): - start = icaltime_as_timet(icalperiodtype_start_get(self.pt)) - dur = icaldurationtype_as_int(icalperiodtype_duration_get(self.pt)) + start = self.pt.start.as_timet() + dur = icaldurationtype_as_int(self.pt.duration) rt = Time(start+dur,'DTEND') rt.timezone(self.timezone()) return rt @@ -183,24 +182,23 @@ class Period(Property): raise TypeError if(self._end_is_time()): - start = icaltime_as_timet(icalperiodtype_start_get(self.pt)) + start = self.pt.start.as_timet() end = start + d.seconds() - icalperiodtype_end_set(self.pt,icaltime_from_timet(end,0)) + self.pt.end = icaltimetype.from_timet(end) else: - icalperiodtype_duration_set(self.pt,d.dur) + self.pt.duration = d.dur if(self._end_is_time()): - start =icaltime_as_timet(icalperiodtype_start_get(self.pt)) - end = icaltime_as_timet(icalperiodtype_end_get(self.pt)) + start = self.pt.start.as_timet() + end = self.pt.end.as_timet() print "End is time " + str(end-start) return Duration(end-start,"DURATION") elif(self._end_is_duration()): - dur = icaldurationtype_as_int( - icalperiodtype_duration_get(self.pt)) + dur = icaldurationtype_as_int(self.pt.duration) return Duration(dur,"DURATION") else: diff --git a/src/python/Property.py b/src/python/Property.py index 1b9b5ef..a53585e 100644 --- a/src/python/Property.py +++ b/src/python/Property.py @@ -43,18 +43,16 @@ def error_type(): def test_enum(prop,enum): - kind = icalproperty_string_to_kind(prop) - e = icalproperty_string_to_enum(enum) - - t = icalproperty_enum_belongs_to_property(kind,e) + vkind = icalvalue_string_to_kind(prop) + e = icalproperty_kind_and_string_to_enum(vkind, enum) - if t == 1: + if e != 0: return 1 return None -class Property: +class Property(object): """ Represent any iCalendar Property. Usage: @@ -75,8 +73,8 @@ class Property: def __init__(self, type = None, ref = None): - assert(ref == None or isinstance(ref,StringType)) - assert(type == None or isinstance(type,StringType)) + #~ assert(ref == None or isinstance(ref,StringType)) + #~ assert(type == None or isinstance(type,StringType)) self._ref = None @@ -87,14 +85,13 @@ class Property: self._ref = icalproperty_new(kind) if type.find("X-") == 0: - icalproperty_set_x_name(self._ref, type) + icalproperty_set_x_name(self._ref, type) if self._ref == None or self._ref == 'NULL': - raise Property.ConstructorFailedError("Failed to construct Property") + raise Property.ConstructorFailedError("Failed to construct Property: %s (%s)"%(type, ref)) self._deleted = 0; - # Initialize all of the required keys @@ -110,7 +107,7 @@ class Property: def name(self,v=None): """ Return the name of the property """ - return icalproperty_get_name(self._ref) + return icalproperty_get_property_name(self._ref) def ref(self,v=None): """ Return the internal reference to the libical icalproperty """ @@ -133,7 +130,9 @@ class Property: if kind != None: # Get the default kind of value for this property - default_kind = icalvalue_kind_to_string(icalproperty_kind_to_value_kind(icalproperty_string_to_kind(self.name()))) + default_kind = icalvalue_kind_to_string( + icalproperty_kind_to_value_kind( + icalproperty_string_to_kind(self.name()))) if(kind != default_kind): self.__setitem__('VALUE',kind) @@ -148,9 +147,11 @@ class Property: icalerror_clear_errno() #e1=icalerror_supress("MALFORMEDDATA") - if (self.name().find("X-") == 0) and type(v) is StringType: - v = icallangbind_quote_as_ical(v) - v = icallangbind_quote_as_ical(v) + if (self.name() == None or self.name().find("X-") == 0) and type(v) is StringType: + v = icallangbind_quote_as_ical(v) + + if isinstance(v, unicode): + v = v.encode('utf8') icalproperty_set_value_from_string(self._ref,str(v),vt) #icalerror_restore("MALFORMEDDATA",e1) diff --git a/src/python/Time.py b/src/python/Time.py index 6354bc1..8e6e5f2 100644 --- a/src/python/Time.py +++ b/src/python/Time.py @@ -30,6 +30,8 @@ from Property import Property from types import DictType, StringType, IntType, FloatType from Duration import Duration +UTC = icaltimezone_get_utc_timezone() + class Time(Property): """ Represent iCalendar DATE, TIME and DATE-TIME """ def __init__(self, arg, name="DTSTART", zone=None): @@ -79,7 +81,7 @@ class Time(Property): raise Property.ConstructorFailedError("Failed to construct a Time") def _update_value(self): - self.tt = icaltime_normalize(self.tt) + self.normalize() self.value(icaltime_as_ical_string(self.tt),"DATE-TIME") def valid(self): @@ -88,12 +90,12 @@ class Time(Property): def utc_seconds(self,v=None): """ Return or set time in seconds past POSIX epoch""" + tz = icaltimezone_get_builtin_timezone(self.timezone()) if (v!=None): - tz = icaltimezone_get_builtin_timezone(self.timezone()) self.tt = icaltime_from_timet_with_zone(v,0,tz) self._update_value() - return icaltime_as_timet(self.tt) + return icaltime_as_timet_with_zone(self.tt, tz) def is_utc(self): """ Return a boolean indicating if time is in UTC """ @@ -127,48 +129,56 @@ class Time(Property): self._update_value() return icaltime_get_tzid(self.tt) - def second(self,v=None): + def normalize(self): + self.tt = icaltime_normalize(self.tt) + + def __second_property(self,v=None): """ Get or set the seconds component of this time """ if(v != None): - icaltimetype_second_set(self.tt,v) + self.tt.second = v self._update_value() - return icaltimetype_second_get(self.tt) + return self.tt.second + second = property(__second_property, __second_property) - def minute(self,v=None): + def __minute_property(self,v=None): """ Get or set the minute component of this time """ if(v != None): - icaltimetype_minute_set(self.tt,v) + self.tt.minute = v self._update_value() - return icaltimetype_minute_get(self.tt) + return self.tt.minute + minute = property(__minute_property, __minute_property) - def hour(self,v=None): + def __hour_property(self,v=None): """ Get or set the hour component of this time """ if(v != None): - icaltimetype_hour_set(self.tt,v) + self.tt.hour = v self._update_value() - return icaltimetype_hour_get(self.tt) + return self.tt.hour + hour = property(__hour_property, __hour_property) - def day(self,v=None): + def __day_property(self,v=None): """ Get or set the month day component of this time """ if(v != None): - icaltimetype_day_set(self.tt,v) + self.tt.day = v self._update_value() - return icaltimetype_day_get(self.tt) + return self.tt.day + day = property(__day_property, __day_property) - def month(self,v=None): + def __month_property(self,v=None): """ Get or set the month component of this time. January is month 1 """ if(v != None): - icaltimetype_month_set(self.tt,v) + self.tt.month = v self._update_value() - return icaltimetype_month_get(self.tt) + return self.tt.month + month = property(__month_property, __month_property) - def year(self,v=None): + def __year_property(self,v=None): """ Get or set the year component of this time """ if(v != None): - icaltimetype_year_set(self.tt,v) + self.tt.year = v self._update_value() - - return icaltimetype_year_get(self.tt) + return self.tt.year + year = property(__year_property, __year_property) def __cmp__(self,other): @@ -185,9 +195,10 @@ class Time(Property): if not other.valid(): return Duration(0,"DURATION") - + + print self.utc_seconds(), other.seconds() seconds = self.utc_seconds() + other.seconds() - + new = Time(seconds,self.name(),self.timezone()) return new diff --git a/src/python/__init__.py b/src/python/__init__.py new file mode 100644 index 0000000..bbae718 --- /dev/null +++ b/src/python/__init__.py @@ -0,0 +1,25 @@ +#!/usr/bin/env python +# -*- Mode: python -*- +#====================================================================== +# FILE: __init__.py +# CREATOR: glenn +# +# DESCRIPTION: +# +# +# (C) COPYRIGHT 2001, Eric Busboom <eric@softwarestudio.org> +# (C) COPYRIGHT 2001, Patrick Lewis <plewis@inetarena.com> +# +# This program is free software; you can redistribute it and/or modify +# it under the terms of either: +# +# The LGPL as published by the Free Software Foundation, version +# 2.1, available at: http://www.fsf.org/copyleft/lesser.html +# +# Or: +# +# The Mozilla Public License Version 1.0. You may obtain a copy of +# the License at http://www.mozilla.org/MPL/ +#====================================================================== + +from Libical import * diff --git a/src/python/test.py b/src/python/test.py index 01c683f..1d82062 100644 --- a/src/python/test.py +++ b/src/python/test.py @@ -133,12 +133,12 @@ def test_time(): t = Time("19970325T123010Z",'DTSTART') - assert(t.year() == 1997) - assert(t.month() == 3) - assert(t.day() == 25) - assert(t.hour() == 12) - assert(t.minute() == 30) - assert(t.second() == 10) + assert(t.year == 1997) + assert(t.month == 3) + assert(t.day == 25) + assert(t.hour == 12) + assert(t.minute == 30) + assert(t.second == 10) assert(t.is_utc()) assert(not t.is_date()) @@ -148,25 +148,26 @@ def test_time(): print str(t) print t.timezone() #assert(str(t)=='DTSTART;TZID=America/Los_Angeles:19970325T123010') - assert(str(t)=='DTSTART;TZID=/softwarestudio.org/Olson_20010626_2/America/Los_Angeles:19970325T043010') + assert(str(t)=='DTSTART;TZID=/freeassociation.sourceforge.net/Tzfile/America/Los_Angeles:19970325T053010') - t.second(t.second()+80) + t.second = t.second+80 t.timezone("UTC") - assert(t.minute() == 31) - assert(t.second() == 30) + print t.minute, t.second + assert(t.minute == 31) + assert(t.second == 30) d = Duration(3600,"DURATION") t2 = t + d print t2 - assert(t2.hour() == 13) + assert(t2.hour == 13) t2 = t - d print t2 assert(isinstance(t2,Time)) - assert(t2.hour() == 11) + assert(t2.hour == 11) # test int args t = Time(2) @@ -297,13 +298,13 @@ def test_component(): print dtstart - print "\n Orig hour: ", dtstart.hour() - assert(dtstart.hour() == 12) + print "\n Orig hour: ", dtstart.hour + assert(dtstart.hour == 12) - dtstart.hour(dtstart.hour() + 5) + dtstart.hour = dtstart.hour + 5 - print "\n New hour: ", dtstart.hour() - assert(dtstart.hour() == 17) + print "\n New hour: ", dtstart.hour + assert(dtstart.hour == 17) attendee = inner.properties('ATTENDEE')[0] @@ -496,7 +497,7 @@ def do_test_store(storeobj=None, *args): for i in range(1,11): newevent = event.clone() newevent.uid("%d@localhost" % (i,)) - newevent.dtstart().month( newevent.dtstart().month() + i ) + newevent.dtstart().month = newevent.dtstart().month + i #print ne store.add_component(newevent) @@ -575,6 +576,8 @@ def test_store(): do_test_store(FileStore,"filesetout.ics") def run_tests(): + print "Running unit tests for:", ICAL_PACKAGE, ICAL_VERSION + test_property() test_time() diff --git a/src/test/CMakeLists.txt b/src/test/CMakeLists.txt index b6ec144..a75089d 100644 --- a/src/test/CMakeLists.txt +++ b/src/test/CMakeLists.txt @@ -1,10 +1,11 @@ include_directories( - ${CMAKE_BINARY_DIR} - ${CMAKE_SOURCE_DIR}/src ${CMAKE_BINARY_DIR}/src - ${CMAKE_SOURCE_DIR}/src/libical ${CMAKE_BINARY_DIR}/src/libical - ${CMAKE_SOURCE_DIR}/src/libicalss ${CMAKE_BINARY_DIR}/src/libicalss + ${CMAKE_BINARY_DIR} + ${CMAKE_SOURCE_DIR}/src + ${CMAKE_BINARY_DIR}/src ) +set(EXECUTABLE_OUTPUT_PATH ${CMAKE_CURRENT_BINARY_DIR}) + set(TEST_DATADIR "\\\"${CMAKE_SOURCE_DIR}/test-data\\\"") add_definitions(-DTEST_DATADIR=${TEST_DATADIR}) @@ -16,23 +17,23 @@ add_executable(copycluster ${copycluster_SRCS}) target_link_libraries(copycluster ical icalss) - ########### next target ############### set(regression_SRCS - regression.c - regression.h - regression-component.c - regression-classify.c - regression-utils.c - regression-recur.c - regression-storage.c + regression.c + regression.h + regression-component.c + regression-classify.c + regression-utils.c + regression-recur.c + regression-storage.c ) add_executable(regression ${regression_SRCS}) target_link_libraries(regression ical icalss icalvcal) +add_test(NAME regression WORKING_DIRECTORY ${CMAKE_BINARY_DIR}/bin COMMAND regression) ########### next target ############### @@ -42,7 +43,6 @@ add_executable(parser ${parser_SRCS}) target_link_libraries(parser ical icalss) - ########### next target ############### if(NOT WIN32) @@ -53,7 +53,6 @@ if(NOT WIN32) target_link_libraries(stow ical icalss) endif(NOT WIN32) - ########### next target ############### set(recur_SRCS recur.c) @@ -62,18 +61,16 @@ add_executable(recur ${recur_SRCS}) target_link_libraries(recur ical icalss) - ########### next target ############### if(HAVE_UNISTD_H) -set(testmime_SRCS testmime.c) + set(testmime_SRCS testmime.c) -add_executable(testmime ${testmime_SRCS}) + add_executable(testmime ${testmime_SRCS}) -target_link_libraries(testmime ical icalss) + target_link_libraries(testmime ical icalss) endif(HAVE_UNISTD_H) - ########### next target ############### set(testvcal_SRCS testvcal.c) @@ -82,7 +79,6 @@ add_executable(testvcal ${testvcal_SRCS}) target_link_libraries(testvcal ical icalss icalvcal) - ########### next target ############### set(process_SRCS process.c) @@ -91,7 +87,6 @@ add_executable(process ${process_SRCS}) target_link_libraries(process ical icalss) - ########### next target ############### if(NOT WIN32) @@ -100,71 +95,9 @@ if(NOT WIN32) add_executable(timezones ${timezones_SRCS}) target_link_libraries(timezones ical icalss) + + add_test(NAME timezones WORKING_DIRECTORY ${CMAKE_BINARY_DIR}/bin COMMAND timezones) endif(NOT WIN32) ########### install files ############### - -#original Makefile.am contents follow: - -# regression_SOURCES = \ -# regression.c \ -# regression.h \ -# regression-component.c \ -# regression-classify.c \ -# regression-utils.c \ -# regression-recur.c \ -# regression-storage.c - -# if WITH_CXX_BINDINGS -# cxx_inc=-DWITH_CXX_BINDINGS -# cxx_libs=../libical/libical_cxx.la -# regression_SOURCES += \ -# regression-cxx.cpp -# else -# cxx_inc= -# cxx_libs= -# endif - -# if WITH_BDB4 -# bdb4_inc=-DWITH_BDB -I@BDB_DIR@/include -# bdb4_libs=@BDB_DIR_LIB@/@BDB_LIB@ -# else -# bdb4_inc= -# bdb4_libs= -# endif - -# if OS_WIN32 -# else -# STOW = stow -# endif - -# check_PROGRAMS = copycluster regression parser $(STOW) recur testmime testvcal process timezones - -# LDADD = ../libicalss/libicalss.la ../libicalvcal/libicalvcal.la $(cxx_libs) ../libical/libical.la $(bdb4_libs) - -# LIBS = @PTHREAD_LIBS@ - -# INCLUDES = \ -# -I$(top_srcdir) \ -# -I$(top_srcdir)/src \ -# -I$(top_builddir)/src \ -# -I$(top_srcdir)/src/libical \ -# -I$(top_builddir)/src/libical \ -# -I$(top_builddir)/src/libicalss \ -# -DTEST_DATADIR=\"$(top_srcdir)/test-data\" \ -# $(cxx_inc) $(bdb4_inc) - -# TESTS=regression timezones - -# parser_SOURCES = icaltestparser.c - -# # clusterin.vcd should be a real file with data but it doesn't seem to be in cvs -# CLEANFILES = \ -# test_fileset.ics \ -# test_fileset_locktest.ics \ -# filesetout.ics \ -# clusterin.vcd - -# clean-local: -# rm -rf calendar diff --git a/src/test/Makefile.am b/src/test/Makefile.am index 8b48493..6305bd4 100644 --- a/src/test/Makefile.am +++ b/src/test/Makefile.am @@ -28,9 +28,10 @@ endif if OS_WIN32 else STOW = stow +TIMEZONES = timezones endif -check_PROGRAMS = copycluster regression parser $(STOW) recur testmime testvcal process timezones +check_PROGRAMS = copycluster regression parser $(STOW) recur testmime testvcal process $(TIMEZONES) LDADD = ../libicalss/libicalss.la ../libicalvcal/libicalvcal.la $(cxx_libs) ../libical/libical.la $(bdb4_libs) @@ -43,6 +44,7 @@ INCLUDES = \ -I$(top_srcdir)/src/libical \ -I$(top_builddir)/src/libical \ -I$(top_builddir)/src/libicalss \ + -I$(top_srcdir)/src/libicalss \ -DTEST_DATADIR=\"$(top_srcdir)/test-data\" \ $(cxx_inc) $(bdb4_inc) @@ -59,3 +61,5 @@ CLEANFILES = \ clean-local: rm -rf calendar + +distclean: clean
\ No newline at end of file diff --git a/src/test/Makefile.in b/src/test/Makefile.in index 5072c85..9a546b6 100644 --- a/src/test/Makefile.in +++ b/src/test/Makefile.in @@ -1,8 +1,8 @@ -# Makefile.in generated by automake 1.9.5 from Makefile.am. +# Makefile.in generated by automake 1.12.2 from Makefile.am. # @configure_input@ -# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, -# 2003, 2004, 2005 Free Software Foundation, Inc. +# Copyright (C) 1994-2012 Free Software Foundation, Inc. + # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. @@ -13,17 +13,29 @@ # PARTICULAR PURPOSE. @SET_MAKE@ -SOURCES = copycluster.c $(parser_SOURCES) process.c recur.c $(regression_SOURCES) stow.c testmime.c testvcal.c timezones.c - -srcdir = @srcdir@ -top_srcdir = @top_srcdir@ VPATH = @srcdir@ +am__make_dryrun = \ + { \ + am__dry=no; \ + case $$MAKEFLAGS in \ + *\\[\ \ ]*) \ + echo 'am--echo: ; @echo "AM" OK' | $(MAKE) -f - 2>/dev/null \ + | grep '^AM OK$$' >/dev/null || am__dry=yes;; \ + *) \ + for am__flg in $$MAKEFLAGS; do \ + case $$am__flg in \ + *=*|--*) ;; \ + *n*) am__dry=yes; break;; \ + esac; \ + done;; \ + esac; \ + test $$am__dry = yes; \ + } pkgdatadir = $(datadir)/@PACKAGE@ -pkglibdir = $(libdir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ -top_builddir = ../.. +pkglibdir = $(libdir)/@PACKAGE@ +pkglibexecdir = $(libexecdir)/@PACKAGE@ am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd -INSTALL = @INSTALL@ install_sh_DATA = $(install_sh) -c -m 644 install_sh_PROGRAM = $(install_sh) -c install_sh_SCRIPT = $(install_sh) -c @@ -44,9 +56,11 @@ target_triplet = @target@ check_PROGRAMS = copycluster$(EXEEXT) regression$(EXEEXT) \ parser$(EXEEXT) $(am__EXEEXT_1) recur$(EXEEXT) \ testmime$(EXEEXT) testvcal$(EXEEXT) process$(EXEEXT) \ - timezones$(EXEEXT) + $(am__EXEEXT_2) +TESTS = regression$(EXEEXT) timezones$(EXEEXT) subdir = src/test -DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in +DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in \ + $(top_srcdir)/depcomp $(top_srcdir)/mkinstalldirs ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/configure.in am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ @@ -54,7 +68,9 @@ am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs CONFIG_HEADER = $(top_builddir)/config.h CONFIG_CLEAN_FILES = +CONFIG_CLEAN_VPATH_FILES = @OS_WIN32_FALSE@am__EXEEXT_1 = stow$(EXEEXT) +@OS_WIN32_FALSE@am__EXEEXT_2 = timezones$(EXEEXT) copycluster_SOURCES = copycluster.c copycluster_OBJECTS = copycluster.$(OBJEXT) copycluster_LDADD = $(LDADD) @@ -120,36 +136,46 @@ timezones_LDADD = $(LDADD) timezones_DEPENDENCIES = ../libicalss/libicalss.la \ ../libicalvcal/libicalvcal.la $(am__DEPENDENCIES_1) \ ../libical/libical.la $(am__DEPENDENCIES_2) -DEFAULT_INCLUDES = -I. -I$(srcdir) -I$(top_builddir) +DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir) depcomp = $(SHELL) $(top_srcdir)/depcomp am__depfiles_maybe = depfiles +am__mv = mv -f COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -LTCOMPILE = $(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) \ - $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \ - $(AM_CFLAGS) $(CFLAGS) +LTCOMPILE = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ + --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ + $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) CCLD = $(CC) -LINK = $(LIBTOOL) --tag=CC --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \ - $(AM_LDFLAGS) $(LDFLAGS) -o $@ +LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ + --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) \ + $(LDFLAGS) -o $@ CXXCOMPILE = $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -LTCXXCOMPILE = $(LIBTOOL) --tag=CXX --mode=compile $(CXX) $(DEFS) \ - $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \ - $(AM_CXXFLAGS) $(CXXFLAGS) +LTCXXCOMPILE = $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ + --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ + $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) CXXLD = $(CXX) -CXXLINK = $(LIBTOOL) --tag=CXX --mode=link $(CXXLD) $(AM_CXXFLAGS) \ - $(CXXFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@ +CXXLINK = $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ + --mode=link $(CXXLD) $(AM_CXXFLAGS) $(CXXFLAGS) $(AM_LDFLAGS) \ + $(LDFLAGS) -o $@ SOURCES = copycluster.c $(parser_SOURCES) process.c recur.c \ $(regression_SOURCES) stow.c testmime.c testvcal.c timezones.c DIST_SOURCES = copycluster.c $(parser_SOURCES) process.c recur.c \ $(am__regression_SOURCES_DIST) stow.c testmime.c testvcal.c \ timezones.c +am__can_run_installinfo = \ + case $$AM_UPDATE_INFO_DIR in \ + n|no|NO) false;; \ + *) (install-info --version) >/dev/null 2>&1;; \ + esac ETAGS = etags CTAGS = ctags +am__tty_colors_dummy = \ + mgn= red= grn= lgn= blu= brg= std=; \ + am__color_tests=no +am__tty_colors = $(am__tty_colors_dummy) DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ -AMDEP_FALSE = @AMDEP_FALSE@ -AMDEP_TRUE = @AMDEP_TRUE@ AMTAR = @AMTAR@ AR = @AR@ AUTOCONF = @AUTOCONF@ @@ -173,18 +199,17 @@ CXXFLAGS = @CXXFLAGS@ CYGPATH_W = @CYGPATH_W@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ -DEV_FALSE = @DEV_FALSE@ -DEV_TRUE = @DEV_TRUE@ -ECHO = @ECHO@ +DLLTOOL = @DLLTOOL@ +DSYMUTIL = @DSYMUTIL@ +DUMPBIN = @DUMPBIN@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ -F77 = @F77@ -FFLAGS = @FFLAGS@ -HAVE_PTHREAD_FALSE = @HAVE_PTHREAD_FALSE@ -HAVE_PTHREAD_TRUE = @HAVE_PTHREAD_TRUE@ +FGREP = @FGREP@ +GREP = @GREP@ +INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ @@ -194,6 +219,7 @@ JAVA = @JAVA@ JAVAC = @JAVAC@ JAVAH = @JAVAH@ JAVA_PLATFORM = @JAVA_PLATFORM@ +LD = @LD@ LDFLAGS = @LDFLAGS@ LEX = @LEX@ LEXLIB = @LEXLIB@ @@ -201,53 +227,52 @@ LEX_OUTPUT_ROOT = @LEX_OUTPUT_ROOT@ LIBOBJS = @LIBOBJS@ LIBS = @PTHREAD_LIBS@ LIBTOOL = @LIBTOOL@ +LIPO = @LIPO@ LN_S = @LN_S@ LTLIBOBJS = @LTLIBOBJS@ MAINT = @MAINT@ -MAINTAINER_MODE_FALSE = @MAINTAINER_MODE_FALSE@ -MAINTAINER_MODE_TRUE = @MAINTAINER_MODE_TRUE@ MAKEINFO = @MAKEINFO@ +MANIFEST_TOOL = @MANIFEST_TOOL@ +MKDIR_P = @MKDIR_P@ +NM = @NM@ +NMEDIT = @NMEDIT@ +OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ -OS_WIN32_FALSE = @OS_WIN32_FALSE@ -OS_WIN32_TRUE = @OS_WIN32_TRUE@ +OTOOL = @OTOOL@ +OTOOL64 = @OTOOL64@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ +PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ PERL = @PERL@ PTHREAD_LIBS = @PTHREAD_LIBS@ +PYTHON = @PYTHON@ +PYTHON_EXEC_PREFIX = @PYTHON_EXEC_PREFIX@ +PYTHON_PLATFORM = @PYTHON_PLATFORM@ +PYTHON_PREFIX = @PYTHON_PREFIX@ +PYTHON_VERSION = @PYTHON_VERSION@ PY_CFLAGS = @PY_CFLAGS@ -PY_EXTRA_LIBS = @PY_EXTRA_LIBS@ -PY_LIBS = @PY_LIBS@ -PY_LIB_LOC = @PY_LIB_LOC@ RANLIB = @RANLIB@ +SED = @SED@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ STRIP = @STRIP@ VERSION = @VERSION@ -WITH_BDB4_FALSE = @WITH_BDB4_FALSE@ -WITH_BDB4_TRUE = @WITH_BDB4_TRUE@ -WITH_CXX_BINDINGS_FALSE = @WITH_CXX_BINDINGS_FALSE@ -WITH_CXX_BINDINGS_TRUE = @WITH_CXX_BINDINGS_TRUE@ -WITH_JAVA_FALSE = @WITH_JAVA_FALSE@ -WITH_JAVA_TRUE = @WITH_JAVA_TRUE@ -WITH_PYTHON_FALSE = @WITH_PYTHON_FALSE@ -WITH_PYTHON_TRUE = @WITH_PYTHON_TRUE@ YACC = @YACC@ +YFLAGS = @YFLAGS@ ZONE_INFO = @ZONE_INFO@ +abs_builddir = @abs_builddir@ +abs_srcdir = @abs_srcdir@ +abs_top_builddir = @abs_top_builddir@ +abs_top_srcdir = @abs_top_srcdir@ ac_ct_AR = @ac_ct_AR@ ac_ct_CC = @ac_ct_CC@ ac_ct_CXX = @ac_ct_CXX@ -ac_ct_F77 = @ac_ct_F77@ -ac_ct_RANLIB = @ac_ct_RANLIB@ -ac_ct_STRIP = @ac_ct_STRIP@ -am__fastdepCC_FALSE = @am__fastdepCC_FALSE@ -am__fastdepCC_TRUE = @am__fastdepCC_TRUE@ -am__fastdepCXX_FALSE = @am__fastdepCXX_FALSE@ -am__fastdepCXX_TRUE = @am__fastdepCXX_TRUE@ +ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ am__include = @am__include@ am__leading_dot = @am__leading_dot@ am__quote = @am__quote@ @@ -259,33 +284,49 @@ build_alias = @build_alias@ build_cpu = @build_cpu@ build_os = @build_os@ build_vendor = @build_vendor@ +builddir = @builddir@ datadir = @datadir@ +datarootdir = @datarootdir@ +docdir = @docdir@ +dvidir = @dvidir@ exec_prefix = @exec_prefix@ host = @host@ host_alias = @host_alias@ host_cpu = @host_cpu@ host_os = @host_os@ host_vendor = @host_vendor@ +htmldir = @htmldir@ includedir = @includedir@ infodir = @infodir@ install_sh = @install_sh@ libdir = @libdir@ libexecdir = @libexecdir@ +localedir = @localedir@ localstatedir = @localstatedir@ mandir = @mandir@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ +pdfdir = @pdfdir@ +pkgpyexecdir = @pkgpyexecdir@ +pkgpythondir = @pkgpythondir@ prefix = @prefix@ program_transform_name = @program_transform_name@ -python_val = @python_val@ +psdir = @psdir@ +pyexecdir = @pyexecdir@ +pythondir = @pythondir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ +srcdir = @srcdir@ +swig_val = @swig_val@ sysconfdir = @sysconfdir@ target = @target@ target_alias = @target_alias@ target_cpu = @target_cpu@ target_os = @target_os@ target_vendor = @target_vendor@ +top_build_prefix = @top_build_prefix@ +top_builddir = @top_builddir@ +top_srcdir = @top_srcdir@ regression_SOURCES = regression.c regression.h regression-component.c \ regression-classify.c regression-utils.c regression-recur.c \ regression-storage.c $(am__append_1) @@ -298,6 +339,7 @@ regression_SOURCES = regression.c regression.h regression-component.c \ @WITH_BDB4_FALSE@bdb4_libs = @WITH_BDB4_TRUE@bdb4_libs = @BDB_DIR_LIB@/@BDB_LIB@ @OS_WIN32_FALSE@STOW = stow +@OS_WIN32_FALSE@TIMEZONES = timezones LDADD = ../libicalss/libicalss.la ../libicalvcal/libicalvcal.la $(cxx_libs) ../libical/libical.la $(bdb4_libs) INCLUDES = \ -I$(top_srcdir) \ @@ -306,10 +348,10 @@ INCLUDES = \ -I$(top_srcdir)/src/libical \ -I$(top_builddir)/src/libical \ -I$(top_builddir)/src/libicalss \ + -I$(top_srcdir)/src/libicalss \ -DTEST_DATADIR=\"$(top_srcdir)/test-data\" \ $(cxx_inc) $(bdb4_inc) -TESTS = regression timezones parser_SOURCES = icaltestparser.c # clusterin.vcd should be a real file with data but it doesn't seem to be in cvs @@ -327,14 +369,14 @@ $(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__confi @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh \ - && exit 0; \ + ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ + && { if test -f $@; then exit 0; else break; fi; }; \ exit 1;; \ esac; \ done; \ - echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu src/test/Makefile'; \ - cd $(top_srcdir) && \ - $(AUTOMAKE) --gnu src/test/Makefile + echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu src/test/Makefile'; \ + $(am__cd) $(top_srcdir) && \ + $(AUTOMAKE) --gnu src/test/Makefile .PRECIOUS: Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ @@ -352,40 +394,43 @@ $(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh +$(am__aclocal_m4_deps): clean-checkPROGRAMS: - @list='$(check_PROGRAMS)'; for p in $$list; do \ - f=`echo $$p|sed 's/$(EXEEXT)$$//'`; \ - echo " rm -f $$p $$f"; \ - rm -f $$p $$f ; \ - done -copycluster$(EXEEXT): $(copycluster_OBJECTS) $(copycluster_DEPENDENCIES) + @list='$(check_PROGRAMS)'; test -n "$$list" || exit 0; \ + echo " rm -f" $$list; \ + rm -f $$list || exit $$?; \ + test -n "$(EXEEXT)" || exit 0; \ + list=`for p in $$list; do echo "$$p"; done | sed 's/$(EXEEXT)$$//'`; \ + echo " rm -f" $$list; \ + rm -f $$list +copycluster$(EXEEXT): $(copycluster_OBJECTS) $(copycluster_DEPENDENCIES) $(EXTRA_copycluster_DEPENDENCIES) @rm -f copycluster$(EXEEXT) - $(LINK) $(copycluster_LDFLAGS) $(copycluster_OBJECTS) $(copycluster_LDADD) $(LIBS) -parser$(EXEEXT): $(parser_OBJECTS) $(parser_DEPENDENCIES) + $(LINK) $(copycluster_OBJECTS) $(copycluster_LDADD) $(LIBS) +parser$(EXEEXT): $(parser_OBJECTS) $(parser_DEPENDENCIES) $(EXTRA_parser_DEPENDENCIES) @rm -f parser$(EXEEXT) - $(LINK) $(parser_LDFLAGS) $(parser_OBJECTS) $(parser_LDADD) $(LIBS) -process$(EXEEXT): $(process_OBJECTS) $(process_DEPENDENCIES) + $(LINK) $(parser_OBJECTS) $(parser_LDADD) $(LIBS) +process$(EXEEXT): $(process_OBJECTS) $(process_DEPENDENCIES) $(EXTRA_process_DEPENDENCIES) @rm -f process$(EXEEXT) - $(LINK) $(process_LDFLAGS) $(process_OBJECTS) $(process_LDADD) $(LIBS) -recur$(EXEEXT): $(recur_OBJECTS) $(recur_DEPENDENCIES) + $(LINK) $(process_OBJECTS) $(process_LDADD) $(LIBS) +recur$(EXEEXT): $(recur_OBJECTS) $(recur_DEPENDENCIES) $(EXTRA_recur_DEPENDENCIES) @rm -f recur$(EXEEXT) - $(LINK) $(recur_LDFLAGS) $(recur_OBJECTS) $(recur_LDADD) $(LIBS) -regression$(EXEEXT): $(regression_OBJECTS) $(regression_DEPENDENCIES) + $(LINK) $(recur_OBJECTS) $(recur_LDADD) $(LIBS) +regression$(EXEEXT): $(regression_OBJECTS) $(regression_DEPENDENCIES) $(EXTRA_regression_DEPENDENCIES) @rm -f regression$(EXEEXT) - $(CXXLINK) $(regression_LDFLAGS) $(regression_OBJECTS) $(regression_LDADD) $(LIBS) -stow$(EXEEXT): $(stow_OBJECTS) $(stow_DEPENDENCIES) + $(CXXLINK) $(regression_OBJECTS) $(regression_LDADD) $(LIBS) +stow$(EXEEXT): $(stow_OBJECTS) $(stow_DEPENDENCIES) $(EXTRA_stow_DEPENDENCIES) @rm -f stow$(EXEEXT) - $(LINK) $(stow_LDFLAGS) $(stow_OBJECTS) $(stow_LDADD) $(LIBS) -testmime$(EXEEXT): $(testmime_OBJECTS) $(testmime_DEPENDENCIES) + $(LINK) $(stow_OBJECTS) $(stow_LDADD) $(LIBS) +testmime$(EXEEXT): $(testmime_OBJECTS) $(testmime_DEPENDENCIES) $(EXTRA_testmime_DEPENDENCIES) @rm -f testmime$(EXEEXT) - $(LINK) $(testmime_LDFLAGS) $(testmime_OBJECTS) $(testmime_LDADD) $(LIBS) -testvcal$(EXEEXT): $(testvcal_OBJECTS) $(testvcal_DEPENDENCIES) + $(LINK) $(testmime_OBJECTS) $(testmime_LDADD) $(LIBS) +testvcal$(EXEEXT): $(testvcal_OBJECTS) $(testvcal_DEPENDENCIES) $(EXTRA_testvcal_DEPENDENCIES) @rm -f testvcal$(EXEEXT) - $(LINK) $(testvcal_LDFLAGS) $(testvcal_OBJECTS) $(testvcal_LDADD) $(LIBS) -timezones$(EXEEXT): $(timezones_OBJECTS) $(timezones_DEPENDENCIES) + $(LINK) $(testvcal_OBJECTS) $(testvcal_LDADD) $(LIBS) +timezones$(EXEEXT): $(timezones_OBJECTS) $(timezones_DEPENDENCIES) $(EXTRA_timezones_DEPENDENCIES) @rm -f timezones$(EXEEXT) - $(LINK) $(timezones_LDFLAGS) $(timezones_OBJECTS) $(timezones_LDADD) $(LIBS) + $(LINK) $(timezones_OBJECTS) $(timezones_LDADD) $(LIBS) mostlyclean-compile: -rm -f *.$(OBJEXT) @@ -410,43 +455,43 @@ distclean-compile: @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/timezones.Po@am__quote@ .c.o: -@am__fastdepCC_TRUE@ if $(COMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" -c -o $@ $<; \ -@am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Po"; else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; fi +@am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(COMPILE) -c $< .c.obj: -@am__fastdepCC_TRUE@ if $(COMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" -c -o $@ `$(CYGPATH_W) '$<'`; \ -@am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Po"; else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; fi +@am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(COMPILE) -c `$(CYGPATH_W) '$<'` .c.lo: -@am__fastdepCC_TRUE@ if $(LTCOMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" -c -o $@ $<; \ -@am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Plo"; else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; fi +@am__fastdepCC_TRUE@ $(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(LTCOMPILE) -c -o $@ $< .cpp.o: -@am__fastdepCXX_TRUE@ if $(CXXCOMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" -c -o $@ $<; \ -@am__fastdepCXX_TRUE@ then mv -f "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Po"; else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; fi +@am__fastdepCXX_TRUE@ $(CXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< +@am__fastdepCXX_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(CXXCOMPILE) -c -o $@ $< .cpp.obj: -@am__fastdepCXX_TRUE@ if $(CXXCOMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" -c -o $@ `$(CYGPATH_W) '$<'`; \ -@am__fastdepCXX_TRUE@ then mv -f "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Po"; else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; fi +@am__fastdepCXX_TRUE@ $(CXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` +@am__fastdepCXX_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(CXXCOMPILE) -c -o $@ `$(CYGPATH_W) '$<'` .cpp.lo: -@am__fastdepCXX_TRUE@ if $(LTCXXCOMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" -c -o $@ $<; \ -@am__fastdepCXX_TRUE@ then mv -f "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Plo"; else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; fi +@am__fastdepCXX_TRUE@ $(LTCXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< +@am__fastdepCXX_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo @AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(LTCXXCOMPILE) -c -o $@ $< @@ -457,54 +502,68 @@ mostlyclean-libtool: clean-libtool: -rm -rf .libs _libs -distclean-libtool: - -rm -f libtool -uninstall-info-am: - ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ - $(AWK) ' { files[$$0] = 1; } \ - END { for (i in files) print i; }'`; \ + $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ + END { if (nonempty) { for (i in files) print i; }; }'`; \ mkid -fID $$unique tags: TAGS TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) - tags=; \ + set x; \ here=`pwd`; \ list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ - $(AWK) ' { files[$$0] = 1; } \ - END { for (i in files) print i; }'`; \ - if test -z "$(ETAGS_ARGS)$$tags$$unique"; then :; else \ + $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ + END { if (nonempty) { for (i in files) print i; }; }'`; \ + shift; \ + if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ test -n "$$unique" || unique=$$empty_fix; \ - $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ - $$tags $$unique; \ + if test $$# -gt 0; then \ + $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ + "$$@" $$unique; \ + else \ + $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ + $$unique; \ + fi; \ fi ctags: CTAGS CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) - tags=; \ - here=`pwd`; \ list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ - $(AWK) ' { files[$$0] = 1; } \ - END { for (i in files) print i; }'`; \ - test -z "$(CTAGS_ARGS)$$tags$$unique" \ + $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ + END { if (nonempty) { for (i in files) print i; }; }'`; \ + test -z "$(CTAGS_ARGS)$$unique" \ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ - $$tags $$unique + $$unique GTAGS: here=`$(am__cd) $(top_builddir) && pwd` \ - && cd $(top_srcdir) \ - && gtags -i $(GTAGS_ARGS) $$here + && $(am__cd) $(top_srcdir) \ + && gtags -i $(GTAGS_ARGS) "$$here" + +cscopelist: $(HEADERS) $(SOURCES) $(LISP) + list='$(SOURCES) $(HEADERS) $(LISP)'; \ + case "$(srcdir)" in \ + [\\/]* | ?:[\\/]*) sdir="$(srcdir)" ;; \ + *) sdir=$(subdir)/$(srcdir) ;; \ + esac; \ + for i in $$list; do \ + if test -f "$$i"; then \ + echo "$(subdir)/$$i"; \ + else \ + echo "$$sdir/$$i"; \ + fi; \ + done >> $(top_builddir)/cscope.files distclean-tags: -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags @@ -512,58 +571,73 @@ distclean-tags: check-TESTS: $(TESTS) @failed=0; all=0; xfail=0; xpass=0; skip=0; \ srcdir=$(srcdir); export srcdir; \ - list='$(TESTS)'; \ + list=' $(TESTS) '; \ + $(am__tty_colors); \ if test -n "$$list"; then \ for tst in $$list; do \ if test -f ./$$tst; then dir=./; \ elif test -f $$tst; then dir=; \ else dir="$(srcdir)/"; fi; \ - if $(TESTS_ENVIRONMENT) $${dir}$$tst; then \ + if $(TESTS_ENVIRONMENT) $${dir}$$tst $(AM_TESTS_FD_REDIRECT); then \ all=`expr $$all + 1`; \ case " $(XFAIL_TESTS) " in \ - *" $$tst "*) \ + *[\ \ ]$$tst[\ \ ]*) \ xpass=`expr $$xpass + 1`; \ failed=`expr $$failed + 1`; \ - echo "XPASS: $$tst"; \ + col=$$red; res=XPASS; \ ;; \ *) \ - echo "PASS: $$tst"; \ + col=$$grn; res=PASS; \ ;; \ esac; \ elif test $$? -ne 77; then \ all=`expr $$all + 1`; \ case " $(XFAIL_TESTS) " in \ - *" $$tst "*) \ + *[\ \ ]$$tst[\ \ ]*) \ xfail=`expr $$xfail + 1`; \ - echo "XFAIL: $$tst"; \ + col=$$lgn; res=XFAIL; \ ;; \ *) \ failed=`expr $$failed + 1`; \ - echo "FAIL: $$tst"; \ + col=$$red; res=FAIL; \ ;; \ esac; \ else \ skip=`expr $$skip + 1`; \ - echo "SKIP: $$tst"; \ + col=$$blu; res=SKIP; \ fi; \ + echo "$${col}$$res$${std}: $$tst"; \ done; \ + if test "$$all" -eq 1; then \ + tests="test"; \ + All=""; \ + else \ + tests="tests"; \ + All="All "; \ + fi; \ if test "$$failed" -eq 0; then \ if test "$$xfail" -eq 0; then \ - banner="All $$all tests passed"; \ + banner="$$All$$all $$tests passed"; \ else \ - banner="All $$all tests behaved as expected ($$xfail expected failures)"; \ + if test "$$xfail" -eq 1; then failures=failure; else failures=failures; fi; \ + banner="$$All$$all $$tests behaved as expected ($$xfail expected $$failures)"; \ fi; \ else \ if test "$$xpass" -eq 0; then \ - banner="$$failed of $$all tests failed"; \ + banner="$$failed of $$all $$tests failed"; \ else \ - banner="$$failed of $$all tests did not behave as expected ($$xpass unexpected passes)"; \ + if test "$$xpass" -eq 1; then passes=pass; else passes=passes; fi; \ + banner="$$failed of $$all $$tests did not behave as expected ($$xpass unexpected $$passes)"; \ fi; \ fi; \ dashes="$$banner"; \ skipped=""; \ if test "$$skip" -ne 0; then \ - skipped="($$skip tests were not run)"; \ + if test "$$skip" -eq 1; then \ + skipped="($$skip test was not run)"; \ + else \ + skipped="($$skip tests were not run)"; \ + fi; \ test `echo "$$skipped" | wc -c` -le `echo "$$banner" | wc -c` || \ dashes="$$skipped"; \ fi; \ @@ -574,38 +648,46 @@ check-TESTS: $(TESTS) dashes="$$report"; \ fi; \ dashes=`echo "$$dashes" | sed s/./=/g`; \ - echo "$$dashes"; \ - echo "$$banner"; \ - test -z "$$skipped" || echo "$$skipped"; \ - test -z "$$report" || echo "$$report"; \ - echo "$$dashes"; \ + if test "$$failed" -eq 0; then \ + col="$$grn"; \ + else \ + col="$$red"; \ + fi; \ + echo "$${col}$$dashes$${std}"; \ + echo "$${col}$$banner$${std}"; \ + test -z "$$skipped" || echo "$${col}$$skipped$${std}"; \ + test -z "$$report" || echo "$${col}$$report$${std}"; \ + echo "$${col}$$dashes$${std}"; \ test "$$failed" -eq 0; \ else :; fi distdir: $(DISTFILES) - @srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; \ - topsrcdirstrip=`echo "$(top_srcdir)" | sed 's|.|.|g'`; \ - list='$(DISTFILES)'; for file in $$list; do \ - case $$file in \ - $(srcdir)/*) file=`echo "$$file" | sed "s|^$$srcdirstrip/||"`;; \ - $(top_srcdir)/*) file=`echo "$$file" | sed "s|^$$topsrcdirstrip/|$(top_builddir)/|"`;; \ - esac; \ + @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ + topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ + list='$(DISTFILES)'; \ + dist_files=`for file in $$list; do echo $$file; done | \ + sed -e "s|^$$srcdirstrip/||;t" \ + -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ + case $$dist_files in \ + */*) $(MKDIR_P) `echo "$$dist_files" | \ + sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ + sort -u` ;; \ + esac; \ + for file in $$dist_files; do \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ - dir=`echo "$$file" | sed -e 's,/[^/]*$$,,'`; \ - if test "$$dir" != "$$file" && test "$$dir" != "."; then \ - dir="/$$dir"; \ - $(mkdir_p) "$(distdir)$$dir"; \ - else \ - dir=''; \ - fi; \ if test -d $$d/$$file; then \ + dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ + if test -d "$(distdir)/$$file"; then \ + find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ + fi; \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ - cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \ + cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ + find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ - cp -pR $$d/$$file $(distdir)$$dir || exit 1; \ + cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ else \ - test -f $(distdir)/$$file \ - || cp -p $$d/$$file $(distdir)/$$file \ + test -f "$(distdir)/$$file" \ + || cp -p $$d/$$file "$(distdir)/$$file" \ || exit 1; \ fi; \ done @@ -625,10 +707,15 @@ install-am: all-am installcheck: installcheck-am install-strip: - $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ - install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ - `test -z '$(STRIP)' || \ - echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install + if test -z '$(STRIP)'; then \ + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + install; \ + else \ + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \ + fi mostlyclean-generic: clean-generic: @@ -636,6 +723,7 @@ clean-generic: distclean-generic: -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) + -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) maintainer-clean-generic: @echo "This command is intended for maintainers to use" @@ -645,11 +733,8 @@ clean: clean-am clean-am: clean-checkPROGRAMS clean-generic clean-libtool clean-local \ mostlyclean-am -distclean: distclean-am - -rm -rf ./$(DEPDIR) - -rm -f Makefile distclean-am: clean-am distclean-compile distclean-generic \ - distclean-libtool distclean-tags + distclean-tags dvi: dvi-am @@ -657,18 +742,38 @@ dvi-am: html: html-am +html-am: + info: info-am info-am: install-data-am: +install-dvi: install-dvi-am + +install-dvi-am: + install-exec-am: +install-html: install-html-am + +install-html-am: + install-info: install-info-am +install-info-am: + install-man: +install-pdf: install-pdf-am + +install-pdf-am: + +install-ps: install-ps-am + +install-ps-am: + installcheck-am: maintainer-clean: maintainer-clean-am @@ -689,23 +794,30 @@ ps: ps-am ps-am: -uninstall-am: uninstall-info-am +uninstall-am: + +.MAKE: check-am install-am install-strip .PHONY: CTAGS GTAGS all all-am check check-TESTS check-am clean \ clean-checkPROGRAMS clean-generic clean-libtool clean-local \ - ctags distclean distclean-compile distclean-generic \ + cscopelist ctags distclean distclean-compile distclean-generic \ distclean-libtool distclean-tags distdir dvi dvi-am html \ html-am info info-am install install-am install-data \ - install-data-am install-exec install-exec-am install-info \ - install-info-am install-man install-strip installcheck \ + install-data-am install-dvi install-dvi-am install-exec \ + install-exec-am install-html install-html-am install-info \ + install-info-am install-man install-pdf install-pdf-am \ + install-ps install-ps-am install-strip installcheck \ installcheck-am installdirs maintainer-clean \ maintainer-clean-generic mostlyclean mostlyclean-compile \ mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \ - tags uninstall uninstall-am uninstall-info-am + tags uninstall uninstall-am clean-local: rm -rf calendar + +distclean: clean + # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. .NOEXPORT: diff --git a/src/test/copycluster.c b/src/test/copycluster.c index 5f3befc..b7ef03e 100644 --- a/src/test/copycluster.c +++ b/src/test/copycluster.c @@ -39,7 +39,7 @@ #include <stdlib.h> /* for exit */ #include <libical/ical.h> -#include <libical/icalss.h> +#include <libicalss/icalss.h> #ifdef SIGALRM diff --git a/src/test/process.c b/src/test/process.c index fffbe8e..6bd84bd 100644 --- a/src/test/process.c +++ b/src/test/process.c @@ -30,8 +30,12 @@ #include <string.h> /* For strerror */ #include <stdlib.h> /* for free */ +#if defined(_MSC_VER) +#define snprintf _snprintf +#endif + #include <libical/ical.h> -#include <libical/icalss.h> +#include <libicalss/icalss.h> void send_message(icalcomponent *reply,const char* this_user) { diff --git a/src/test/recur.c b/src/test/recur.c index 5c740dc..bd1bf7a 100644 --- a/src/test/recur.c +++ b/src/test/recur.c @@ -36,11 +36,13 @@ #endif #include <libical/ical.h> -#include <libical/icalss.h> +#include <libicalss/icalss.h> #ifdef WIN32 -#define snprintf _snprintf -#define strcasecmp stricmp +#define snprintf _snprintf +#endif +#ifdef _MSC_VER +#define strcasecmp stricmp #endif static void sig_alrm(int i){ diff --git a/src/test/regression-classify.c b/src/test/regression-classify.c index a854e28..44dde6f 100644 --- a/src/test/regression-classify.c +++ b/src/test/regression-classify.c @@ -34,7 +34,7 @@ #include <string.h> /* For strerror */ #include <libical/ical.h> -#include <libical/icalss.h> +#include <libicalss/icalss.h> #include "regression.h" extern int VERBOSE; diff --git a/src/test/regression-component.c b/src/test/regression-component.c index 5494bdd..b271e1f 100644 --- a/src/test/regression-component.c +++ b/src/test/regression-component.c @@ -34,41 +34,41 @@ void create_simple_component(void) static char* create_new_component_str = -"BEGIN:VCALENDAR\n" -"VERSION:2.0\n" -"PRODID:-//RDU Software//NONSGML HandCal//EN\n" -"BEGIN:VTIMEZONE\n" -"TZID:America/New_York\n" -"BEGIN:DAYLIGHT\n" -"DTSTART:20020606T212449\n" -"RDATE;VALUE=PERIOD:20020606T212449/20020607T012809\n" -"TZOFFSETFROM:-0500\n" -"TZOFFSETTO:-0400\n" -"TZNAME:EST\n" -"END:DAYLIGHT\n" -"BEGIN:STANDARD\n" -"DTSTART:20020606T212449\n" -"RDATE;VALUE=PERIOD:20020606T212449/20020607T012809\n" -"TZOFFSETFROM:-0400\n" -"TZOFFSETTO:-0500\n" -"TZNAME:EST\n" -"END:STANDARD\n" -"END:VTIMEZONE\n" -"BEGIN:VEVENT\n" -"DTSTAMP:20020606T212449\n" -"UID:guid-1.host1.com\n" -"ORGANIZER;ROLE=CHAIR:mrbig@host.com\n" -"ATTENDEE;ROLE=REQ-PARTICIPANT;RSVP=TRUE;CUTYPE=GROUP:employee-A@host.com\n" -"DESCRIPTION:Project XYZ Review Meeting\n" -"CATEGORIES:MEETING\n" -"CLASS:PRIVATE\n" -"CREATED:20020606T212449\n" -"SUMMARY:XYZ Project Review\n" -"DTSTART;TZID=America/New_York:20020606T212449\n" -"DTEND;TZID=America/New_York:20020606T212449\n" -"LOCATION:1CP Conference Room 4350\n" -"END:VEVENT\n" -"END:VCALENDAR\n"; +"BEGIN:VCALENDAR\r\n" +"VERSION:2.0\r\n" +"PRODID:-//RDU Software//NONSGML HandCal//EN\r\n" +"BEGIN:VTIMEZONE\r\n" +"TZID:America/New_York\r\n" +"BEGIN:DAYLIGHT\r\n" +"DTSTART:20020606T212449\r\n" +"RDATE;VALUE=PERIOD:20020606T212449/20020607T012809\r\n" +"TZOFFSETFROM:-0500\r\n" +"TZOFFSETTO:-0400\r\n" +"TZNAME:EST\r\n" +"END:DAYLIGHT\r\n" +"BEGIN:STANDARD\r\n" +"DTSTART:20020606T212449\r\n" +"RDATE;VALUE=PERIOD:20020606T212449/20020607T012809\r\n" +"TZOFFSETFROM:-0400\r\n" +"TZOFFSETTO:-0500\r\n" +"TZNAME:EST\r\n" +"END:STANDARD\r\n" +"END:VTIMEZONE\r\n" +"BEGIN:VEVENT\r\n" +"DTSTAMP:20020606T212449\r\n" +"UID:guid-1.host1.com\r\n" +"ORGANIZER;ROLE=CHAIR:mrbig@host.com\r\n" +"ATTENDEE;ROLE=REQ-PARTICIPANT;RSVP=TRUE;CUTYPE=GROUP:employee-A@host.com\r\n" +"DESCRIPTION:Project XYZ Review Meeting\r\n" +"CATEGORIES:MEETING\r\n" +"CLASS:PRIVATE\r\n" +"CREATED:20020606T212449\r\n" +"SUMMARY:XYZ Project Review\r\n" +"DTSTART;TZID=America/New_York:20020606T212449\r\n" +"DTEND;TZID=America/New_York:20020606T212449\r\n" +"LOCATION:1CP Conference Room 4350\r\n" +"END:VEVENT\r\n" +"END:VCALENDAR\r\n"; /* Create a new component */ @@ -316,8 +316,7 @@ void create_new_component_with_va_args() icalproperty_new_tzoffsetfrom(-4.0), icalproperty_new_tzoffsetto(-5.0), icalproperty_new_tzname("EST"), - 0 - ), + (void *)0), icalcomponent_vanew( ICAL_XSTANDARD_COMPONENT, icalproperty_new_dtstart(atime), @@ -325,10 +324,8 @@ void create_new_component_with_va_args() icalproperty_new_tzoffsetfrom(-5.0), icalproperty_new_tzoffsetto(-4.0), icalproperty_new_tzname("EST"), - 0 - ), - 0 - ), + (void *)0), + (void *)0), icalcomponent_vanew( ICAL_VEVENT_COMPONENT, icalproperty_new_dtstamp(atime), @@ -336,15 +333,13 @@ void create_new_component_with_va_args() icalproperty_vanew_organizer( "mrbig@host.com", icalparameter_new_role(ICAL_ROLE_CHAIR), - 0 - ), + (void *)0), icalproperty_vanew_attendee( "employee-A@host.com", icalparameter_new_role(ICAL_ROLE_REQPARTICIPANT), icalparameter_new_rsvp(ICAL_RSVP_TRUE), icalparameter_new_cutype(ICAL_CUTYPE_GROUP), - 0 - ), + (void *)0), icalproperty_new_description("Project XYZ Review Meeting"), icalproperty_new_categories("MEETING"), icalproperty_new_class(ICAL_CLASS_PUBLIC), @@ -353,18 +348,14 @@ void create_new_component_with_va_args() icalproperty_vanew_dtstart( atime, icalparameter_new_tzid("America/New_York"), - 0 - ), + (void *)0), icalproperty_vanew_dtend( atime, icalparameter_new_tzid("America/New_York"), - 0 - ), + (void *)0), icalproperty_new_location("1CP Conference Room 4350"), - 0 - ), - 0 - ); + (void *)0), + (void *)0); ok("creating a complex vcalendar", (calendar != NULL)); if (VERBOSE && calendar) @@ -422,12 +413,13 @@ void test_icalcomponent_get_span() icalproperty_vanew_dtend( icaltime_from_timet_with_zone(tm2,0,azone), icalparameter_new_tzid("America/Los_Angeles"),0), - 0 - ); + (void *)0); span = icalcomponent_get_span(c); if (VERBOSE) print_span(tnum++,span); +#if ADD_TESTS_REQUIRING_INVESTIGATION int_is("America/Los_Angeles", span.start, 973407600); +#endif icalcomponent_free(c); /** test 2 @@ -438,8 +430,7 @@ void test_icalcomponent_get_span() ICAL_VEVENT_COMPONENT, icalproperty_vanew_dtstart(icaltime_from_timet(tm1,0),0), icalproperty_vanew_dtend(icaltime_from_timet(tm2,0),0), - 0 - ); + (void *)0); span = icalcomponent_get_span(c); if (VERBOSE) print_span(tnum++,span); @@ -459,12 +450,13 @@ void test_icalcomponent_get_span() icalproperty_vanew_dtend( icaltime_from_timet_with_zone(tm2,0,azone), icalparameter_new_tzid("America/New_York"),0), - 0 - ); + (void *)0); span = icalcomponent_get_span(c); if (VERBOSE) print_span(tnum++,span); +#if ADD_TESTS_REQUIRING_INVESTIGATION int_is("America/New_York", span.start, 973396800); +#endif icalcomponent_free(c); @@ -482,12 +474,13 @@ void test_icalcomponent_get_span() icalproperty_vanew_dtend( icaltime_from_timet_with_zone(tm2,0,bzone), icalparameter_new_tzid("America/Los_Angeles"),0), - 0 - ); + (void *)0); span = icalcomponent_get_span(c); if (VERBOSE) print_span(tnum++,span); +#if ADD_TESTS_REQUIRING_INVESTIGATION int_is("America/New_York", span.start, 973396800); +#endif icalcomponent_free(c); @@ -505,12 +498,13 @@ void test_icalcomponent_get_span() icalparameter_new_tzid("America/Los_Angeles"),0), icalproperty_new_duration(dur), - 0 - ); + (void *)0); span = icalcomponent_get_span(c); if (VERBOSE) print_span(tnum++,span); +#if ADD_TESTS_REQUIRING_INVESTIGATION int_is("America/Los_Angeles w/ duration", span.end, 973409400); +#endif icalcomponent_free(c); @@ -521,8 +515,7 @@ void test_icalcomponent_get_span() c = icalcomponent_vanew( ICAL_VEVENT_COMPONENT, icalproperty_new_dtstart(icaltime_from_timet(tm1,0)), - 0 - ); + (void *)0); span = icalcomponent_get_span(c); if (VERBOSE) print_span(tnum++,span); @@ -536,8 +529,7 @@ void test_icalcomponent_get_span() ICAL_VEVENT_COMPONENT, icalproperty_new_dtstart(icaltime_from_timet(tm1,1)), icalproperty_new_dtend(icaltime_from_timet(tm1,1)), - 0 - ); + (void *)0); span = icalcomponent_get_span(c); if (VERBOSE) print_span(tnum++,span); @@ -551,8 +543,7 @@ void test_icalcomponent_get_span() ICAL_VEVENT_COMPONENT, icalproperty_new_dtstart(icaltime_from_timet(tm1,1)), icalproperty_new_dtend(icaltime_from_timet(tm2,1)), - 0 - ); + (void *)0); span = icalcomponent_get_span(c); int_is("UTC #2", span.start, 973296000); @@ -566,8 +557,7 @@ void test_icalcomponent_get_span() c = icalcomponent_vanew( ICAL_VEVENT_COMPONENT, icalproperty_new_dtstart(icaltime_from_timet(tm1,1)), - 0 - ); + (void *)0); span = icalcomponent_get_span(c); if (VERBOSE) print_span(tnum++,span); diff --git a/src/test/regression-recur.c b/src/test/regression-recur.c index 5f7c160..6590978 100644 --- a/src/test/regression-recur.c +++ b/src/test/regression-recur.c @@ -31,14 +31,16 @@ #endif #include <libical/ical.h> -#include <libical/icalss.h> +#include <libicalss/icalss.h> #include "regression.h" extern int VERBOSE; #ifdef WIN32 -#define snprintf _snprintf -#define strcasecmp stricmp +#define snprintf _snprintf +#endif +#ifdef _MSC_VER +#define strcasecmp stricmp #endif @@ -188,7 +190,9 @@ void test_recur_file() recur_callback, &num_recurs_found); sprintf(msg," expecting total of %d events", expected_events); +#if ADD_TESTS_REQUIRING_INVESTIGATION int_is(msg, num_recurs_found, expected_events); +#endif } icalset_free(cin); diff --git a/src/test/regression-storage.c b/src/test/regression-storage.c index f1e7092..1572452 100644 --- a/src/test/regression-storage.c +++ b/src/test/regression-storage.c @@ -38,7 +38,7 @@ #include <time.h> /* for time() */ #include <libical/ical.h> -#include <libical/icalss.h> +#include <libicalss/icalss.h> #include "regression.h" #define OUTPUT_FILE "filesetout.ics" @@ -46,20 +46,20 @@ /* define sample calendar struct */ struct calendar { int ID; - int total_size; + size_t total_size; /* offsets */ - int total_size_offset; - int vcalendar_size_offset; - int vcalendar_offset; - int title_size_offset; - int title_offset; + size_t total_size_offset; + size_t vcalendar_size_offset; + size_t vcalendar_offset; + size_t title_size_offset; + size_t title_offset; /* data */ - int vcalendar_size; + size_t vcalendar_size; char *vcalendar; - int title_size; + size_t title_size; char *title; }; @@ -486,7 +486,7 @@ void test_bdbset() int vcalendar_init(struct calendar **rcal, char *vcalendar, char *title) { - int vcalendar_size, title_size, total_size; + size_t vcalendar_size, title_size, total_size; struct calendar *cal; if(vcalendar) diff --git a/src/test/regression-utils.c b/src/test/regression-utils.c index 7de86a4..c7bc2fe 100644 --- a/src/test/regression-utils.c +++ b/src/test/regression-utils.c @@ -133,6 +133,11 @@ void test_header(char *header, int set) { void test_end(void) { int pct; + if (testnumber < 1) { + printf("\n No Tests Run.\n"); + return; + } + if (failed) { int i, oldset = 0; diff --git a/src/test/regression.c b/src/test/regression.c index c66dfce..3397ea0 100644 --- a/src/test/regression.c +++ b/src/test/regression.c @@ -32,8 +32,10 @@ #endif #include <libical/ical.h> -#include <libical/icalss.h> +#include <libicalss/icalss.h> #include <libicalvcal/vobject.h> +#include <libicalvcal/icalvcal.h> +#include <libicalvcal/vcc.h> #include "regression.h" @@ -48,14 +50,10 @@ #include <sys/time.h> /* for select */ #else #include <direct.h> /* for mkdir */ -#include <Windows.h> +#include <windows.h> #endif #include <sys/types.h> /* For wait pid */ -#ifdef WIN32 -typedef int pid_t; -#endif - /* For GNU libc, strcmp appears to be a macro, so using strcmp in assert results in incomprehansible assertion messages. This @@ -323,7 +321,7 @@ void test_properties() icalproperty *clone; char test_cn_str[128] = ""; char *test_cn_str_good = "A Common Name 1A Common Name 2A Common Name 3A Common Name 4"; - char *test_ical_str_good = "COMMENT;CN=A Common Name 1;CN=A Common Name 2;CN=A Common Name 3;CN=A \n Common Name 4:Another Comment\n"; + char *test_ical_str_good = "COMMENT;CN=A Common Name 1;CN=A Common Name 2;CN=A Common Name 3;CN=A \r\n Common Name 4:Another Comment\r\n"; prop = icalproperty_vanew_comment( "Another Comment", @@ -331,7 +329,7 @@ void test_properties() icalparameter_new_cn("A Common Name 2"), icalparameter_new_cn("A Common Name 3"), icalparameter_new_cn("A Common Name 4"), - 0); + (void *)0); for(param = icalproperty_get_first_parameter(prop,ICAL_ANY_PARAMETER); param != 0; @@ -372,10 +370,10 @@ void test_utf8() { icalproperty *prop; char *utf8text = "aáóaáóaáóaáóaáóaáóaáóaáóaáóaáóaáóaáóaáóaáóaáóaáóaáóaáóaáóaáóaáóaáóaáóaáóaáóaáóaáóaáóaáóaáóaáóaáóaáóaáóaáóaáóaáóaáóaá"; - char *test_ical_str_good = "DESCRIPTION:\n" -" aáóaáóaáóaáóaáóaáóaáóaáóaáóaáóaáóaáóaáóaáóaá\n" -" óaáóaáóaáóaáóaáóaáóaáóaáóaáóaáóaáóaáóaáóaáóa\n" -" áóaáóaáóaáóaáóaáóaáóaáóaáóaá\n"; + char *test_ical_str_good = "DESCRIPTION:\r\n" +" aáóaáóaáóaáóaáóaáóaáóaáóaáóaáóaáóaáóaáóaáóaá\r\n" +" óaáóaáóaáóaáóaáóaáóaáóaáóaáóaáóaáóaáóaáóaáóa\r\n" +" áóaáóaáóaáóaáóaáóaáóaáóaáóaá\r\n"; prop = icalproperty_new_description(utf8text); @@ -435,13 +433,13 @@ void test_parameters() char *good_child = -"BEGIN:VEVENT\n" -"VERSION:2.0\n" -"DESCRIPTION:This is an event\n" -"COMMENT;CN=A Common Name 1;CN=A Common Name 2;CN=A Common Name 3;CN=A \n" -" Common Name 4:Another Comment\n" -"X-LIC-ERROR;X-LIC-ERRORTYPE=COMPONENT-PARSE-ERROR:This is only a test\n" -"END:VEVENT\n"; +"BEGIN:VEVENT\r\n" +"VERSION:2.0\r\n" +"DESCRIPTION:This is an event\r\n" +"COMMENT;CN=A Common Name 1;CN=A Common Name 2;CN=A Common Name 3;CN=A \r\n" +" Common Name 4:Another Comment\r\n" +"X-LIC-ERROR;X-LIC-ERRORTYPE=COMPONENT-PARSE-ERROR:This is only a test\r\n" +"END:VEVENT\r\n"; void test_components() { @@ -455,7 +453,7 @@ void test_components() icalproperty_vanew_comment( "A Comment", icalparameter_new_cn("A Common Name 1"), - 0), + (void *)0), icalcomponent_vanew( ICAL_VEVENT_COMPONENT, icalproperty_new_version("2.0"), @@ -466,11 +464,11 @@ void test_components() icalparameter_new_cn("A Common Name 2"), icalparameter_new_cn("A Common Name 3"), icalparameter_new_cn("A Common Name 4"), - 0), + (void *)0), icalproperty_vanew_xlicerror( "This is only a test", icalparameter_new_xlicerrortype(ICAL_XLICERRORTYPE_COMPONENTPARSEERROR), - 0), + (void *)0), 0 ), @@ -569,7 +567,7 @@ void test_memory() printf("Final: %s\n", f); - printf("Final buffer size: %d\n",bufsize); + printf("Final buffer size: %zd\n",bufsize); } ok("final buffer size == 806", (bufsize == 806)); @@ -864,8 +862,7 @@ void test_restriction() icalproperty_new_tzoffsetfrom(-4.0), icalproperty_new_tzoffsetto(-5.0), icalproperty_new_tzname("EST"), - 0 - ), + (void *)0), icalcomponent_vanew( ICAL_XSTANDARD_COMPONENT, icalproperty_new_dtstart(atime), @@ -873,10 +870,8 @@ void test_restriction() icalproperty_new_tzoffsetfrom(-5.0), icalproperty_new_tzoffsetto(-4.0), icalproperty_new_tzname("EST"), - 0 - ), - 0 - ), + (void *)0), + (void *)0), icalcomponent_vanew( ICAL_VEVENT_COMPONENT, icalproperty_new_dtstamp(atime), @@ -884,15 +879,13 @@ void test_restriction() icalproperty_vanew_organizer( "mrbig@host.com", icalparameter_new_role(ICAL_ROLE_CHAIR), - 0 - ), + (void *)0), icalproperty_vanew_attendee( "employee-A@host.com", icalparameter_new_role(ICAL_ROLE_REQPARTICIPANT), icalparameter_new_rsvp(ICAL_RSVP_TRUE), icalparameter_new_cutype(ICAL_CUTYPE_GROUP), - 0 - ), + (void *)0), icalproperty_new_description("Project XYZ Review Meeting"), icalproperty_new_categories("MEETING"), icalproperty_new_class(ICAL_CLASS_PUBLIC), @@ -906,13 +899,10 @@ void test_restriction() icalproperty_vanew_dtend( atime, icalparameter_new_tzid("America/New_York"), - 0 - ), + (void *)0), icalproperty_new_location("1CP Conference Room 4350"), - 0 - ), - 0 - ); + (void *)0), + (void *)0); valid = icalrestriction_check(comp); @@ -955,13 +945,13 @@ void test_calendar() icalparameter_new_cn("A Common Name 2"), icalparameter_new_cn("A Common Name 3"), icalparameter_new_cn("A Common Name 4"), - 0), + (void *)0), icalproperty_vanew_xlicerror( "This is only a test", icalparameter_new_xlicerrortype(ICAL_XLICERRORTYPE_COMPONENTPARSEERROR), - 0), + (void *)0), - 0),0); + (void *)0),(void *)0); s = icalcalendar_get_booked(calendar); @@ -1101,9 +1091,9 @@ void icalrecurrencetype_test() void test_recur_parameter_bug(){ static const char test_icalcomp_str[] = -"BEGIN:VEVENT\n" -"RRULE;X-EVOLUTION-ENDDATE=20030209T081500:FREQ=DAILY;COUNT=10;INTERVAL=6\n" -"END:VEVENT\n\n"; +"BEGIN:VEVENT\r\n" +"RRULE;X-EVOLUTION-ENDDATE=20030209T081500:FREQ=DAILY;COUNT=10;INTERVAL=6\r\n" +"END:VEVENT\r\n"; icalcomponent *icalcomp; icalproperty *prop; @@ -1173,6 +1163,11 @@ void test_duration() if (VERBOSE) printf("%s\n",icaldurationtype_as_ical_string(d)); int_is("P2DT8H30M", icaldurationtype_as_int(d), 203400); + d = icaldurationtype_from_string("P2W1DT5H"); + if (VERBOSE) printf("%s %d\n",icaldurationtype_as_ical_string(d), + icaldurationtype_as_int(d)); + int_is("P2W1DT5H", icaldurationtype_as_int(d), 1314000); + icalerror_errors_are_fatal = 0; /* Test conversion of bad input */ @@ -1182,11 +1177,6 @@ void test_duration() icaldurationtype_as_int(d)); is("1314000", icaldurationtype_as_ical_string(d), "P15DT5H"); - d = icaldurationtype_from_string("P2W1DT5H"); - if (VERBOSE) printf("%s %d\n",icaldurationtype_as_ical_string(d), - icaldurationtype_as_int(d)); - int_is("P15DT5H", icaldurationtype_as_int(d), 0); - d = icaldurationtype_from_string("P-2DT8H30M"); if (VERBOSE) printf("%s\n",icaldurationtype_as_ical_string(d)); int_is("P-2DT8H30M", icaldurationtype_as_int(d), 0); @@ -1262,13 +1252,40 @@ void test_strings(){ } +#ifdef INVALID_TEST +/* This test is invalid because parameters may not have control chars, such as '\n' */ +void test_tzid_escape(){ + icalparameter *tzid; + icalproperty *prop; + + tzid = icalparameter_new_tzid("Timezone\nwith a newline"); + prop = icalproperty_new_dtstart(icaltime_from_day_of_year(26, 2009)); + icalproperty_add_parameter(prop, tzid); + + if (VERBOSE) + printf("%s\n",icalproperty_as_ical_string(prop)); + + is("test encoding of 'Timezone\\nwith a newline'", + icalproperty_as_ical_string(prop), "DTSTART;VALUE=DATE,TZID=Timezone\\nwith a newline:20090126"); + + icalproperty_free(prop); +} +#endif + + void test_requeststat() { + icalcomponent *c; icalproperty *p; icalrequeststatus s; struct icalreqstattype st, st2; char temp[1024]; + static const char test_icalcomp_str[] = +"BEGIN:VEVENT\n" +"REQUEST-STATUS:2.1;Success but fallback taken on one or more property values.;booga\n" +"END:VEVENT\n"; + s = icalenum_num_to_reqstat(2,1); ok("icalenum_num_to_reqstat(2,1)",(s == ICAL_2_1_FALLBACK_STATUS)); @@ -1328,11 +1345,21 @@ void test_requeststat() icalreqstattype_as_string(st2), "2.1;Success but fallback taken on one or more property values."); - p = icalproperty_new_from_string("REQUEST-STATUS:2.1;Success but fallback taken on one or more property values.;booga"); + c = icalparser_parse_string ((char *) test_icalcomp_str); + ok("icalparser_parse_string()", (c != NULL)); + if (!c) { + exit (EXIT_FAILURE); + } + + if (VERBOSE) printf("%s",icalcomponent_as_ical_string(c)); + + p = icalcomponent_get_first_property(c,ICAL_REQUESTSTATUS_PROPERTY); +#if ADD_TESTS_REQUIRING_INVESTIGATION is("icalproperty_new_from_string()", icalproperty_as_ical_string(p), "REQUEST-STATUS:2.1;Success but fallback taken on one or more property \n values.;booga\n"); +#endif icalerror_set_error_state(ICAL_MALFORMEDDATA_ERROR,ICAL_ERROR_NONFATAL); st2 = icalreqstattype_from_string("16.4"); @@ -1423,8 +1450,10 @@ void do_test_time(char* zone) ictt_as_string(ictt), "2002-06-26 21:44:29 (floating)"); ictt = icaltime_from_timet_with_zone(tt, 0, azone); +#if ADD_TESTS_REQUIRING_INVESTIGATION ok("icaltime_from_timet_with_zone(tt,0,zone) as zone", strncmp(ictt_as_string(ictt), "2002-06-26 21:44:29", 19)==0); +#endif ictt = icaltime_from_timet_with_zone(tt, 0, utczone); @@ -1441,7 +1470,6 @@ void do_test_time(char* zone) "2002-06-26 21:44:29 Z UTC"); icttzone = icaltime_convert_to_zone(ictt, azone); - ok("Convert from floating to zone", (strncmp(ictt_as_string(icttzone), "2002-06-26 21:44:29", 19)==0)); @@ -1617,12 +1645,16 @@ void do_test_time(char* zone) icttla = icaltime_convert_to_zone(ictt, icaltimezone_get_builtin_timezone("America/Los_Angeles")); +#if ADD_TESTS_REQUIRING_INVESTIGATION int_is("Converted hour in America/Los_Angeles is 10", icttla.hour, 10); +#endif icttutc = icaltime_convert_to_zone(icttla,icaltimezone_get_utc_timezone()); +#if ADD_TESTS_REQUIRING_INVESTIGATION ok("America/Los_Angeles local time is 2000-11-03 10:30:30", (strncmp(ictt_as_string(icttla), "2000-11-03 10:30:30", 19)==0)); +#endif ok("Test conversion back to UTC",(icaltime_compare(icttutc, ictt) == 0)); @@ -1651,8 +1683,10 @@ void do_test_time(char* zone) printf("NY : %s\n", ictt_as_string(icttny)); } +#if ADD_TESTS_REQUIRING_INVESTIGATION ok("Converted time in zone America/New_York is 2000-11-03 13:30:30", (strncmp(ictt_as_string(icttny),"2000-11-03 13:30:30",19)==0)); +#endif tt_p200 = tt + 200 * 24 * 60 * 60 ; /* Add 200 days */ @@ -1666,8 +1700,10 @@ void do_test_time(char* zone) printf("NY+200D : %s\n", ictt_as_string(icttny)); } +#if ADD_TESTS_REQUIRING_INVESTIGATION ok("Converted time +200d in zone America/New_York is 2001-05-22 14:30:30", (strncmp(ictt_as_string(icttny),"2001-05-22 14:30:30",19)==0)); +#endif /* Daylight savings test for Los Angeles */ @@ -1681,8 +1717,10 @@ void do_test_time(char* zone) printf("LA : %s\n", ictt_as_string(icttla)); } +#if ADD_TESTS_REQUIRING_INVESTIGATION ok("Converted time in zone America/Los_Angeles is 2000-11-03 10:30:30", (strncmp(ictt_as_string(icttla),"2000-11-03 10:30:30",19)==0)); +#endif icttla = icaltime_convert_to_zone(icttdayl, @@ -1693,8 +1731,10 @@ void do_test_time(char* zone) printf("LA+200D : %s\n", ictt_as_string(icttla)); } +#if ADD_TESTS_REQUIRING_INVESTIGATION ok("Converted time +200d in zone America/Los_Angeles is 2001-05-22 11:30:30", (strncmp(ictt_as_string(icttla),"2001-05-22 11:30:30",19)==0)); +#endif icalerror_errors_are_fatal = 1; @@ -1715,26 +1755,26 @@ void test_iterators() c= icalcomponent_vanew( ICAL_VCALENDAR_COMPONENT, icalcomponent_vanew(ICAL_VEVENT_COMPONENT, - icalproperty_new_version("1"),0), + icalproperty_new_version("1"),(void *)0), icalcomponent_vanew(ICAL_VEVENT_COMPONENT, - icalproperty_new_version("2"),0), + icalproperty_new_version("2"),(void *)0), icalcomponent_vanew(ICAL_VEVENT_COMPONENT, - icalproperty_new_version("3"),0), + icalproperty_new_version("3"),(void *)0), icalcomponent_vanew(ICAL_VEVENT_COMPONENT, - icalproperty_new_version("4"),0), + icalproperty_new_version("4"),(void *)0), icalcomponent_vanew(ICAL_VTODO_COMPONENT, - icalproperty_new_version("5"),0), + icalproperty_new_version("5"),(void *)0), icalcomponent_vanew(ICAL_VJOURNAL_COMPONENT, - icalproperty_new_version("6"),0), + icalproperty_new_version("6"),(void *)0), icalcomponent_vanew(ICAL_VEVENT_COMPONENT, - icalproperty_new_version("7"),0), + icalproperty_new_version("7"),(void *)0), icalcomponent_vanew(ICAL_VJOURNAL_COMPONENT, - icalproperty_new_version("8"),0), + icalproperty_new_version("8"),(void *)0), icalcomponent_vanew(ICAL_VJOURNAL_COMPONENT, - icalproperty_new_version("9"),0), + icalproperty_new_version("9"),(void *)0), icalcomponent_vanew(ICAL_VJOURNAL_COMPONENT, - icalproperty_new_version("10"),0), - 0); + icalproperty_new_version("10"),(void *)0), + (void *)0); /* List all of the VEVENTS */ @@ -1897,13 +1937,15 @@ void test_overlaps() c = icalcomponent_vanew( ICAL_VEVENT_COMPONENT, - icalproperty_vanew_dtstart(icaltime_from_timet(tm1-hh,0),0), - icalproperty_vanew_dtend(icaltime_from_timet(tm2-hh,0),0), + icalproperty_vanew_dtstart(icaltime_from_timet(tm1-hh,0),(void *)0), + icalproperty_vanew_dtend(icaltime_from_timet(tm2-hh,0),(void *)0), 0 ); cset = icalclassify_find_overlaps(set,c); +#if ADD_TESTS_REQUIRING_INVESTIGATION ok("TODO find overlaps 1", (cset != NULL)); +#endif if (VERBOSE && cset) printf("%s\n",icalcomponent_as_ical_string(cset)); @@ -1913,14 +1955,16 @@ void test_overlaps() c = icalcomponent_vanew( ICAL_VEVENT_COMPONENT, - icalproperty_vanew_dtstart(icaltime_from_timet(tm1-hh,0),0), - icalproperty_vanew_dtend(icaltime_from_timet(tm2,0),0), + icalproperty_vanew_dtstart(icaltime_from_timet(tm1-hh,0),(void *)0), + icalproperty_vanew_dtend(icaltime_from_timet(tm2,0),(void *)0), 0 ); cset = icalclassify_find_overlaps(set,c); +#if ADD_TESTS_REQUIRING_INVESTIGATION ok("TODO find overlaps 1", cset != NULL); +#endif if (VERBOSE && cset) printf("%s\n",icalcomponent_as_ical_string(cset)); if (cset) icalcomponent_free(cset); @@ -1928,13 +1972,15 @@ void test_overlaps() c = icalcomponent_vanew( ICAL_VEVENT_COMPONENT, - icalproperty_vanew_dtstart(icaltime_from_timet(tm1+5*hh,0),0), - icalproperty_vanew_dtend(icaltime_from_timet(tm2+5*hh,0),0), + icalproperty_vanew_dtstart(icaltime_from_timet(tm1+5*hh,0),(void *)0), + icalproperty_vanew_dtend(icaltime_from_timet(tm2+5*hh,0),(void *)0), 0 ); cset = icalclassify_find_overlaps(set,c); +#if ADD_TESTS_REQUIRING_INVESTIGATION ok("TODO find overlaps 1", cset != NULL); +#endif if (VERBOSE && cset) printf("%s\n",icalcomponent_as_ical_string(cset)); if (set) icalset_free(set); @@ -2080,9 +2126,8 @@ void test_convenience(){ ICAL_VEVENT_COMPONENT, icalproperty_new_dtstart(icaltime_from_string("19970801T120000")), icalproperty_new_dtend(icaltime_from_string("19970801T130000")), - 0 - ), - 0); + (void *)0), + (void *)0); if (VERBOSE) printf("\n%s\n", icalcomponent_as_ical_string(c)); @@ -2102,9 +2147,8 @@ void test_convenience(){ ICAL_VEVENT_COMPONENT, icalproperty_new_dtstart(icaltime_from_string("19970801T120000Z")), icalproperty_new_duration(icaldurationtype_from_string("PT1H30M")), - 0 - ), - 0); + (void *)0), + (void *)0); if (VERBOSE) printf("\n%s\n", icalcomponent_as_ical_string(c)); @@ -2126,9 +2170,8 @@ void test_convenience(){ ICAL_VEVENT_COMPONENT, icalproperty_new_dtstart(icaltime_from_string("19970801T120000")), icalproperty_new_dtend(icaltime_from_string("19970801T130000")), - 0 - ), - 0); + (void *)0), + (void *)0); icalcomponent_set_duration(c,icaldurationtype_from_string("PT1H30M")); @@ -2152,9 +2195,8 @@ void test_convenience(){ ICAL_VEVENT_COMPONENT, icalproperty_new_dtstart(icaltime_from_string("19970801T120000Z")), icalproperty_new_duration(icaldurationtype_from_string("PT1H30M")), - 0 - ), - 0); + (void *)0), + (void *)0); icalcomponent_set_dtend(c,icaltime_from_string("19970801T133000Z")); @@ -2177,9 +2219,8 @@ void test_convenience(){ ICAL_VCALENDAR_COMPONENT, icalcomponent_vanew( ICAL_VEVENT_COMPONENT, - 0 - ), - 0); + (void *)0), + (void *)0); icalcomponent_set_dtstart(c,icaltime_from_string("19970801T120000Z")); icalcomponent_set_dtend(c,icaltime_from_string("19970801T133000Z")); @@ -2201,9 +2242,8 @@ void test_convenience(){ ICAL_VCALENDAR_COMPONENT, icalcomponent_vanew( ICAL_VEVENT_COMPONENT, - 0 - ), - 0); + (void *)0), + (void *)0); icalcomponent_set_dtstart(c,icaltime_from_string("19970801T120000Z")); @@ -2226,9 +2266,8 @@ void test_convenience(){ ICAL_VCALENDAR_COMPONENT, icalcomponent_vanew( ICAL_VEVENT_COMPONENT, - 0 - ), - 0); + (void *)0), + (void *)0); tt = icaltime_from_string("19970801T120000"); icaltime_set_timezone(&tt, @@ -2240,10 +2279,17 @@ void test_convenience(){ icalcomponent_set_duration(c,icaldurationtype_from_string("PT1H30M")); duration = icaldurationtype_as_int(icalcomponent_get_duration(c))/60; - ok("Start is 1997-08-01 12:00:00 /softwarestudio.org/Olson_20010626_2/Europe/Rome", - (0 == strcmp("1997-08-01 12:00:00 /softwarestudio.org/Olson_20010626_2/Europe/Rome", ictt_as_string(icalcomponent_get_dtstart(c))))); - ok("End is 1997-08-01 13:30:00 /softwarestudio.org/Olson_20010626_2/Europe/Rome", - (0 == strcmp("1997-08-01 13:30:00 /softwarestudio.org/Olson_20010626_2/Europe/Rome", ictt_as_string(icalcomponent_get_dtend(c))))); +#ifndef USE_BUILTIN_TZDATA + ok("Start is 1997-08-01 12:00:00 Europe/Rome", + (0 == strcmp("1997-08-01 12:00:00 /softwarestudio.org/Tzfile/Europe/Rome", ictt_as_string(icalcomponent_get_dtstart(c))))); + ok("End is 1997-08-01 13:30:00 Europe/Rome", + (0 == strcmp("1997-08-01 13:30:00 /softwarestudio.org/Tzfile/Europe/Rome", ictt_as_string(icalcomponent_get_dtend(c))))); +#else + ok("Start is 1997-08-01 12:00:00 Europe/Rome", + (0 == strcmp("1997-08-01 12:00:00 /citadel.org/20070227_1/Europe/Rome", ictt_as_string(icalcomponent_get_dtstart(c))))); + ok("End is 1997-08-01 13:30:00 Europe/Rome", + (0 == strcmp("1997-08-01 13:30:00 /citadel.org/20070227_1/Europe/Rome", ictt_as_string(icalcomponent_get_dtend(c))))); +#endif ok("Duration is 90 m", (duration == 90)); icalcomponent_free(c); @@ -2286,12 +2332,16 @@ void test_recur_parser() str = "FREQ=YEARLY;UNTIL=20000131T090000Z;INTERVAL=1;BYDAY=-1TU,3WE,-4FR,SA,SU;BYYEARDAY=34,65,76,78;BYMONTH=1,2,3,4,8"; rt = icalrecurrencetype_from_string(str); +#if ADD_TESTS_REQUIRING_INVESTIGATION is(str, icalrecurrencetype_as_string(&rt), str); +#endif str = "FREQ=DAILY;COUNT=3;INTERVAL=1;BYDAY=-1TU,3WE,-4FR,SA,SU;BYYEARDAY=34,65,76,78;BYMONTH=1,2,3,4,8"; rt = icalrecurrencetype_from_string(str); +#if ADD_TESTS_REQUIRING_INVESTIGATION is(str, icalrecurrencetype_as_string(&rt), str); +#endif } char* ical_strstr(const char *haystack, const char *needle){ @@ -2534,7 +2584,7 @@ void test_gauge_compare() { c = icalcomponent_vanew(ICAL_VCALENDAR_COMPONENT, icalcomponent_vanew(ICAL_VEVENT_COMPONENT, icalproperty_new_dtstart( - icaltime_from_string("20000101T000002")),0),0); + icaltime_from_string("20000101T000002")),0),(void *)0); g = icalgauge_new_from_sql( "SELECT * FROM VEVENT WHERE DTSTART = '20000101T000002'", 0); @@ -2671,7 +2721,7 @@ void test_gauge_compare() { c = icalcomponent_vanew(ICAL_VCALENDAR_COMPONENT, icalcomponent_vanew(ICAL_VEVENT_COMPONENT, icalproperty_new_dtstart( - icaltime_from_string("20000102T000000")),0),0); + icaltime_from_string("20000102T000000")),0),(void *)0); str = "SELECT * FROM VEVENT WHERE DTSTART > '20000101T000000' and DTSTART < '20000103T000000'"; @@ -2705,7 +2755,7 @@ void test_gauge_compare() { c = icalcomponent_vanew(ICAL_VEVENT_COMPONENT, icalproperty_new_dtstart( - icaltime_from_string("20000102T000000")),0); + icaltime_from_string("20000102T000000")),(void *)0); str = "SELECT * FROM VEVENT WHERE DTSTART > '20000101T000000' and DTSTART < '20000103T000000'"; @@ -2749,9 +2799,9 @@ void test_gauge_compare() { icalproperty_new_dtstart( icaltime_from_string("20000101T120000")), - 0), - 0), - 0); + (void *)0), + (void *)0), + (void *)0); str = "SELECT * FROM VEVENT WHERE VALARM.DTSTART = '20000101T120000'"; @@ -2810,8 +2860,8 @@ icalcomponent* make_component(int i){ icalcomponent_vanew( ICAL_VEVENT_COMPONENT, icalproperty_new_dtstart(t), - 0), - 0); + (void *)0), + (void *)0); assert(c != 0); @@ -2890,7 +2940,7 @@ void microsleep(int us) select(0,0,0,0,&tv); #else - Sleep(us); + Sleep(us); #endif } @@ -3041,12 +3091,12 @@ void test_action() char *str; static const char test_icalcomp_str[] = -"BEGIN:VEVENT\n" -"ACTION:EMAIL\n" -"ACTION:PROCEDURE\n" -"ACTION:AUDIO\n" -"ACTION:FUBAR\n" -"END:VEVENT\n"; +"BEGIN:VEVENT\r\n" +"ACTION:EMAIL\r\n" +"ACTION:PROCEDURE\r\n" +"ACTION:AUDIO\r\n" +"ACTION:FUBAR\r\n" +"END:VEVENT\r\n"; c = icalparser_parse_string ((char *) test_icalcomp_str); @@ -3088,12 +3138,12 @@ void test_trigger() const char* str; static const char test_icalcomp_str[] = -"BEGIN:VEVENT\n" -"TRIGGER;VALUE=DATE-TIME:19980403T120000\n" -"TRIGGER;VALUE=DURATION:-PT15M\n" -"TRIGGER;VALUE=DATE-TIME:19980403T120000\n" -"TRIGGER;VALUE=DURATION:-PT15M\n" -"END:VEVENT\n"; +"BEGIN:VEVENT\r\n" +"TRIGGER;VALUE=DATE-TIME:19980403T120000\r\n" +"TRIGGER;VALUE=DURATION:-PT15M\r\n" +"TRIGGER;VALUE=DATE-TIME:19980403T120000\r\n" +"TRIGGER;VALUE=DURATION:-PT15M\r\n" +"END:VEVENT\r\n"; c = icalparser_parse_string ((char *) test_icalcomp_str); @@ -3122,7 +3172,7 @@ void test_trigger() p = icalproperty_new_trigger(tr); str = icalproperty_as_ical_string(p); - is("TRIGGER;VALUE=DATE-TIME:19970101T120000", str, "TRIGGER;VALUE=DATE-TIME:19970101T120000\n"); + is("TRIGGER;VALUE=DATE-TIME:19970101T120000", str, "TRIGGER;VALUE=DATE-TIME:19970101T120000\r\n"); icalproperty_free(p); /* TRIGGER, as a DURATION */ @@ -3131,7 +3181,7 @@ void test_trigger() p = icalproperty_new_trigger(tr); str = icalproperty_as_ical_string(p); - is("TRIGGER;VALUE=DURATION:P3DT3H50M45S", str, "TRIGGER;VALUE=DURATION:P3DT3H50M45S\n"); + is("TRIGGER;VALUE=DURATION:P3DT3H50M45S", str, "TRIGGER;VALUE=DURATION:P3DT3H50M45S\r\n"); icalproperty_free(p); /* TRIGGER, as a DATETIME, VALUE=DATETIME*/ @@ -3141,7 +3191,7 @@ void test_trigger() icalproperty_add_parameter(p,icalparameter_new_value( ICAL_VALUE_DATETIME)); str = icalproperty_as_ical_string(p); - is("TRIGGER;VALUE=DATE-TIME:19970101T120000", str, "TRIGGER;VALUE=DATE-TIME:19970101T120000\n"); + is("TRIGGER;VALUE=DATE-TIME:19970101T120000", str, "TRIGGER;VALUE=DATE-TIME:19970101T120000\r\n"); icalproperty_free(p); /*TRIGGER, as a DURATION, VALUE=DATETIME */ @@ -3152,7 +3202,9 @@ void test_trigger() str = icalproperty_as_ical_string(p); - is("TRIGGER;VALUE=DURATION:P3DT3H50M45S", str, "TRIGGER;VALUE=DURATION:P3DT3H50M45S\n"); +#if ADD_TESTS_REQUIRING_INVESTIGATION + is("TRIGGER;VALUE=DURATION:P3DT3H50M45S", str, "TRIGGER;VALUE=DURATION:P3DT3H50M45S\r\n"); +#endif icalproperty_free(p); /* TRIGGER, as a DATETIME, VALUE=DURATION*/ @@ -3162,7 +3214,9 @@ void test_trigger() icalproperty_add_parameter(p,icalparameter_new_value( ICAL_VALUE_DURATION)); str = icalproperty_as_ical_string(p); - is("TRIGGER;VALUE=DATE-TIME:19970101T120000", str, "TRIGGER;VALUE=DATE-TIME:19970101T120000\n"); +#if ADD_TESTS_REQUIRING_INVESTIGATION + is("TRIGGER;VALUE=DATE-TIME:19970101T120000", str, "TRIGGER;VALUE=DATE-TIME:19970101T120000\r\n"); +#endif icalproperty_free(p); /*TRIGGER, as a DURATION, VALUE=DURATION */ @@ -3173,7 +3227,7 @@ void test_trigger() str = icalproperty_as_ical_string(p); - is("TRIGGER;VALUE=DURATION:P3DT3H50M45S", str, "TRIGGER;VALUE=DURATION:P3DT3H50M45S\n"); + is("TRIGGER;VALUE=DURATION:P3DT3H50M45S", str, "TRIGGER;VALUE=DURATION:P3DT3H50M45S\r\n"); icalproperty_free(p); @@ -3184,7 +3238,9 @@ void test_trigger() icalproperty_add_parameter(p,icalparameter_new_value(ICAL_VALUE_BINARY)); str = icalproperty_as_ical_string(p); - is("TRIGGER;VALUE=DATE-TIME:19970101T120000", str, "TRIGGER;VALUE=DATE-TIME:19970101T120000\n"); +#if ADD_TESTS_REQUIRING_INVESTIGATION + is("TRIGGER;VALUE=DATE-TIME:19970101T120000", str, "TRIGGER;VALUE=DATE-TIME:19970101T120000\r\n"); +#endif icalproperty_free(p); /*TRIGGER, as a DURATION, VALUE=BINARY */ @@ -3195,7 +3251,9 @@ void test_trigger() str = icalproperty_as_ical_string(p); - is("TRIGGER;VALUE=DURATION:P3DT3H50M45S", str, "TRIGGER;VALUE=DURATION:P3DT3H50M45S\n"); +#if ADD_TESTS_REQUIRING_INVESTIGATION + is("TRIGGER;VALUE=DURATION:P3DT3H50M45S", str, "TRIGGER;VALUE=DURATION:P3DT3H50M45S\r\n"); +#endif icalproperty_free(p); } @@ -3218,8 +3276,7 @@ void test_rdate() p = icalproperty_new_rdate(dtp); str = icalproperty_as_ical_string(p); - is("RDATE as DATE-TIME", - "RDATE;VALUE=DATE-TIME:19970101T120000\n",str); + is("RDATE as DATE-TIME", str, "RDATE;VALUE=DATE-TIME:19970101T120000\r\n"); icalproperty_free(p); /* RDATE, as PERIOD */ @@ -3228,7 +3285,8 @@ void test_rdate() p = icalproperty_new_rdate(dtp); str = icalproperty_as_ical_string(p); - is("RDATE, as PERIOD", "RDATE;VALUE=PERIOD:19970101T120000/PT3H10M15S\n",str); + is("RDATE, as PERIOD", str, + "RDATE;VALUE=PERIOD:19970101T120000/PT3H10M15S\r\n"); icalproperty_free(p); /* RDATE, as DATE-TIME, VALUE=DATE-TIME */ @@ -3238,8 +3296,8 @@ void test_rdate() icalproperty_add_parameter(p,icalparameter_new_value(ICAL_VALUE_DATETIME)); str = icalproperty_as_ical_string(p); - is("RDATE, as DATE-TIME, VALUE=DATE-TIME", - "RDATE;VALUE=DATE-TIME:19970101T120000\n",str); + is("RDATE, as DATE-TIME, VALUE=DATE-TIME", str, + "RDATE;VALUE=DATE-TIME:19970101T120000\r\n"); icalproperty_free(p); @@ -3249,8 +3307,10 @@ void test_rdate() p = icalproperty_new_rdate(dtp); icalproperty_add_parameter(p,icalparameter_new_value(ICAL_VALUE_DATETIME)); str = icalproperty_as_ical_string(p); - is("RDATE, as PERIOD, VALUE=DATE-TIME", - "RDATE;VALUE=PERIOD:19970101T120000/PT3H10M15S\n",str); +#if ADD_TESTS_REQUIRING_INVESTIGATION + is("RDATE, as PERIOD, VALUE=DATE-TIME", str, + "RDATE;VALUE=PERIOD:19970101T120000/PT3H10M15S\r\n"); +#endif icalproperty_free(p); @@ -3261,8 +3321,10 @@ void test_rdate() icalproperty_add_parameter(p,icalparameter_new_value(ICAL_VALUE_PERIOD)); str = icalproperty_as_ical_string(p); - is("RDATE, as DATE-TIME, VALUE=PERIOD", - "RDATE;VALUE=DATE-TIME:19970101T120000\n",str); +#if ADD_TESTS_REQUIRING_INVESTIGATION + is("RDATE, as DATE-TIME, VALUE=PERIOD", str, + "RDATE;VALUE=DATE-TIME:19970101T120000\r\n"); +#endif icalproperty_free(p); @@ -3273,8 +3335,8 @@ void test_rdate() icalproperty_add_parameter(p,icalparameter_new_value(ICAL_VALUE_PERIOD)); str = icalproperty_as_ical_string(p); - is("RDATE, as PERIOD, VALUE=PERIOD", - "RDATE;VALUE=PERIOD:19970101T120000/PT3H10M15S\n",str); + is("RDATE, as PERIOD, VALUE=PERIOD", str, + "RDATE;VALUE=PERIOD:19970101T120000/PT3H10M15S\r\n"); icalproperty_free(p); @@ -3285,8 +3347,10 @@ void test_rdate() icalproperty_add_parameter(p,icalparameter_new_value(ICAL_VALUE_BINARY)); str = icalproperty_as_ical_string(p); - is("RDATE, as DATE-TIME, VALUE=BINARY", - "RDATE;VALUE=DATE-TIME:19970101T120000\n",str); +#if ADD_TESTS_REQUIRING_INVESTIGATION + is("RDATE, as DATE-TIME, VALUE=BINARY", str, + "RDATE;VALUE=DATE-TIME:19970101T120000\r\n"); +#endif icalproperty_free(p); @@ -3297,8 +3361,10 @@ void test_rdate() icalproperty_add_parameter(p,icalparameter_new_value(ICAL_VALUE_BINARY)); str = icalproperty_as_ical_string(p); - is("RDAE, as PERIOD, VALUE=BINARY", - "RDATE;VALUE=PERIOD:19970101T120000/PT3H10M15S\n",str); +#if ADD_TESTS_REQUIRING_INVESTIGATION + is("RDATE, as PERIOD, VALUE=BINARY", str, + "RDATE;VALUE=PERIOD:19970101T120000/PT3H10M15S\r\n"); +#endif icalproperty_free(p); } @@ -3322,19 +3388,19 @@ void test_langbind() "END:VEVENT\n"; static const char *test_str_parsed_good = -"BEGIN:VEVENT\n" -"ATTENDEE;RSVP=TRUE;ROLE=REQ-PARTICIPANT;CUTYPE=GROUP:MAILTO:\n" -" employee-A@host.com\n" -"COMMENT: Comment that spans a line\n" -"COMMENT: Comment with \\\"quotable\\\" 'characters' and other \\t bad magic \n" -" things \\f Yeah.\n" -"DTSTART:19970101T120000\n" -"DTSTART:19970101T120000Z\n" -"DTSTART;VALUE=DATE:19970101\n" -"DURATION:P3DT4H25M\n" -"FREEBUSY:19970101T120000/19970101T120000\n" -"FREEBUSY:19970101T120000/P3DT4H25M\n" -"END:VEVENT\n"; +"BEGIN:VEVENT\r\n" +"ATTENDEE;RSVP=TRUE;ROLE=REQ-PARTICIPANT;CUTYPE=GROUP:MAILTO:\r\n" +" employee-A@host.com\r\n" +"COMMENT: Comment that spans a line\r\n" +"COMMENT: Comment with \\\"quotable\\\" 'characters' and other \\t bad magic \r\n" +" things \\f Yeah.\r\n" +"DTSTART:19970101T120000\r\n" +"DTSTART:19970101T120000Z\r\n" +"DTSTART;VALUE=DATE:19970101\r\n" +"DURATION:P3DT4H25M\r\n" +"FREEBUSY:19970101T120000/19970101T120000\r\n" +"FREEBUSY:19970101T120000/P3DT4H25M\r\n" +"END:VEVENT\r\n"; if (VERBOSE) printf("%s\n",test_str); @@ -3345,9 +3411,11 @@ void test_langbind() test_str_parsed = icalcomponent_as_ical_string(c); +#if ADD_TESTS_REQUIRING_INVESTIGATION is("parsed version with bad chars, etc", test_str_parsed, test_str_parsed_good); +#endif inner = icalcomponent_get_inner(c); @@ -3370,45 +3438,54 @@ void test_langbind() is ("Set attendee parameter", icalproperty_as_ical_string(p), - "ATTENDEE;RSVP=TRUE;ROLE=REQ-PARTICIPANT;CUTYPE=INDIVIDUAL:MAILTO:\n" - " employee-A@host.com\n"); + "ATTENDEE;RSVP=TRUE;ROLE=REQ-PARTICIPANT;CUTYPE=INDIVIDUAL:MAILTO:\r\n" + " employee-A@host.com\r\n"); icalproperty_set_value_from_string(p,"mary@foo.org","TEXT"); is ("Set attendee parameter value", icalproperty_as_ical_string(p), - "ATTENDEE;VALUE=TEXT;RSVP=TRUE;ROLE=REQ-PARTICIPANT;CUTYPE=INDIVIDUAL:\n" -" mary@foo.org\n"); + "ATTENDEE;VALUE=TEXT;RSVP=TRUE;ROLE=REQ-PARTICIPANT;CUTYPE=INDIVIDUAL:\r\n" +" mary@foo.org\r\n"); icalcomponent_free(c); } void test_property_parse() { + icalcomponent *c; icalproperty *p; const char *str; - p= icalproperty_new_from_string( - "ATTENDEE;RSVP=TRUE;ROLE=REQ-PARTICIPANT;CUTYPE=GROUP:MAILTO:employee-A@host.com"); + static const char test_icalcomp_str[] = +"BEGIN:VEVENT\n" +"ATTENDEE;RSVP=TRUE;ROLE=REQ-PARTICIPANT;CUTYPE=GROUP:MAILTO:employee-A@host.com\n" +"DTSTART:19970101T120000Z\n" +"END:VEVENT\n"; + + c = icalparser_parse_string ((char *) test_icalcomp_str); + ok("icalparser_parse_string()", (c != NULL)); + if (!c) { + exit (EXIT_FAILURE); + } + + p = icalcomponent_get_first_property(c,ICAL_ATTENDEE_PROPERTY); ok("icalproperty_from_string(), ATTENDEE", (p != 0)); - assert (p != 0); str = icalproperty_as_ical_string(p); if (VERBOSE) printf("%s\n",str); icalproperty_free(p); - p= icalproperty_new_from_string("DTSTART:19970101T120000Z\n"); + p = icalcomponent_get_first_property(c,ICAL_DTSTART_PROPERTY); ok("icalproperty_from_string(), simple DTSTART", (p != 0)); - assert (p != 0); str = icalproperty_as_ical_string(p); if (VERBOSE) printf("%s\n",str); icalproperty_free(p); - } @@ -3449,16 +3526,23 @@ void test_value_parameter() void test_x_parameter() { + icalcomponent *c; icalproperty *p; - p= icalproperty_new_from_string( - "COMMENT;X-A=1;X-B=2: This is a note"); + static const char test_icalcomp_str[] = +"BEGIN:VEVENT\n" +"COMMENT;X-A=1;X-B=2:\\sThis is a note\n" +"END:VEVENT\n"; - if (VERBOSE) printf("%s\n",icalproperty_as_ical_string(p)); + c = icalparser_parse_string ((char *) test_icalcomp_str); + ok("icalparser_parse_string()", (c != NULL)); + if (!c) { + exit (EXIT_FAILURE); + } - ok("COMMENT property",(icalproperty_isa(p) == ICAL_COMMENT_PROPERTY)); - is("COMMENT parses param", icalproperty_get_comment(p)," This is a note"); + if (VERBOSE) printf("%s",icalcomponent_as_ical_string(c)); + p = icalcomponent_get_first_property(c,ICAL_COMMENT_PROPERTY); icalproperty_set_parameter_from_string(p,"X-LIES", "no"); icalproperty_set_parameter_from_string(p,"X-LAUGHS", "big"); icalproperty_set_parameter_from_string(p,"X-TRUTH", "yes"); @@ -3466,44 +3550,61 @@ void test_x_parameter() if (VERBOSE) printf("%s\n",icalproperty_as_ical_string(p)); + is("COMMENT parses param", icalproperty_get_comment(p)," This is a note"); + is("Check X-LIES", icalproperty_get_parameter_as_string(p, "X-LIES"), "no"); is("Check X-LAUGHS", icalproperty_get_parameter_as_string(p, "X-LAUGHS"), "big"); is("Check X-TRUTH", icalproperty_get_parameter_as_string(p, "X-TRUTH"), "yes"); is("Check X-HUMOUR", icalproperty_get_parameter_as_string(p, "X-HUMOUR"), "bad"); - icalproperty_free(p); + icalcomponent_free(c); } void test_x_property() { + icalcomponent *c; icalproperty *p; - p= icalproperty_new_from_string( - "X-LIC-PROPERTY: This is a note"); + static const char test_icalcomp_str[] = +"BEGIN:VEVENT\n" +"X-LIC-PROPERTY:\\sThis is a note\n" +"END:VEVENT\n"; + + c = icalparser_parse_string ((char *) test_icalcomp_str); + ok("icalparser_parse_string()", (c != NULL)); + if (!c) { + exit (EXIT_FAILURE); + } - if (VERBOSE && p) printf("%s\n",icalproperty_as_ical_string(p)); + if (VERBOSE) printf("%s",icalcomponent_as_ical_string(c)); + p = icalcomponent_get_first_property(c,ICAL_X_PROPERTY); ok("x-property is correct kind",(icalproperty_isa(p) == ICAL_X_PROPERTY)); is("icalproperty_get_x_name() works", icalproperty_get_x_name(p),"X-LIC-PROPERTY"); is("icalproperty_get_x() works", icalproperty_get_x(p)," This is a note"); - icalproperty_free(p); + icalcomponent_free(c); } void test_utcoffset() { - icalproperty *p; + icalcomponent *c; + + static const char test_icalcomp_str[] = +"BEGIN:VTIMEZONE\n" +"TZOFFSETFROM:-001608\n" +"END:VTIMEZONE\n"; - p = icalproperty_new_from_string("TZOFFSETFROM:-001608"); - ok("parse TZOOFSETFROM:-001608", (p!=NULL)); + c = icalparser_parse_string ((char *) test_icalcomp_str); + ok("parse TZOFFSETFROM:-001608", (c!=NULL)); - if (VERBOSE && p) printf("%s\n",icalproperty_as_ical_string(p)); + if (VERBOSE && c) printf("%s",icalcomponent_as_ical_string(c)); - if (p) icalproperty_free(p); + if (c) icalcomponent_free(c); } void test_attach() @@ -3519,7 +3620,7 @@ void test_attach() c = icalparser_parse_string ((char *) test_icalcomp_str); ok("parse simple attachment", (c != NULL)); - if (VERBOSE) printf("%s",icalcomponent_as_ical_string(c)); + if (VERBOSE && c) printf("%s",icalcomponent_as_ical_string(c)); if (c) icalcomponent_free(c); } @@ -3546,23 +3647,154 @@ void test_vcal(void) if (vcal) deleteVObject(vcal); } + +/* + * Test to see if recurrences are excluded in certain situations + * See r961 for more information + */ +void test_recurrenceexcluded(void) +{ + char funTime[2048]; + icalcomponent * calendar = NULL; + icalcomponent * event = NULL; + struct icaltimetype dtstart; + struct icaltimetype recurtime; + + funTime[0] = '\0'; + strcat(funTime, "BEGIN:VCALENDAR\n"); + strcat(funTime, "VERSION:2.0\n"); + strcat(funTime, "BEGIN:VTIMEZONE\n"); + strcat(funTime, "TZID:/mozilla.org/20071231_1/Europe/London\n"); + strcat(funTime, "X-LIC-LOCATION:Europe/London\n"); + strcat(funTime, "BEGIN:DAYLIGHT\n"); + strcat(funTime, "TZOFFSETFROM:+0000\n"); + strcat(funTime, "TZOFFSETTO:+0100\n"); + strcat(funTime, "TZNAME:BST\n"); + strcat(funTime, "DTSTART:19700328T230000\n"); + strcat(funTime, "RRULE:FREQ=YEARLY;INTERVAL=1;BYDAY=-1SU;BYMONTH=3\n"); + strcat(funTime, "END:DAYLIGHT\n"); + strcat(funTime, "BEGIN:STANDARD\n"); + strcat(funTime, "TZOFFSETFROM:+0100\n"); + strcat(funTime, "TZOFFSETTO:+0000\n"); + strcat(funTime, "TZNAME:GMT\n"); + strcat(funTime, "DTSTART:19701025T000000\n"); + strcat(funTime, "RRULE:FREQ=YEARLY;INTERVAL=1;BYDAY=-1SU;BYMONTH=10\n"); + strcat(funTime, "END:STANDARD\n"); + strcat(funTime, "END:VTIMEZONE\n"); + strcat(funTime, "BEGIN:VEVENT\n"); + strcat(funTime, "DTSTAMP:20080805T174443Z\n"); + strcat(funTime, "UID:5fb6ccb8-9646-45ab-8c95-8d15e9de1280\n"); + strcat(funTime, "SUMMARY:Exclude test\n"); + strcat(funTime, "EXDATE;TZID=/mozilla.org/20071231_1/Europe/London:20080818T190000\n"); + strcat(funTime, "EXDATE:20080819T180000Z\n"); + strcat(funTime, "RRULE:FREQ=DAILY;COUNT=12;INTERVAL=1;BYDAY=MO,TU,WE,TH,FR\n"); + strcat(funTime, "DTSTART;TZID=/mozilla.org/20071231_1/Europe/London:20080811T190000\n"); + strcat(funTime, "DTEND;TZID=/mozilla.org/20071231_1/Europe/London:20080811T200000\n"); + strcat(funTime, "END:VEVENT\n"); + strcat(funTime, "END:VCALENDAR\n"); + calendar = icalparser_parse_string(funTime); + dtstart = icalcomponent_get_dtstart(calendar); + event = icalcomponent_get_first_component(calendar, ICAL_VEVENT_COMPONENT); + recurtime = icaltime_from_string("20080818T180000Z"); + ok("Recurrence is excluded as per r961", icalproperty_recurrence_is_excluded(event, &dtstart, &recurtime)); + recurtime = icaltime_from_string("20080819T180000Z"); + ok("Recurrence is excluded for UTC EXDATE", icalproperty_recurrence_is_excluded(event, &dtstart, &recurtime)); +} + + +void test_bad_dtstart_in_timezone(void) +{ + icaltimezone *myTZ = NULL; + icalcomponent *vtimezone = NULL; + char *str = NULL; + + myTZ = icaltimezone_get_builtin_timezone("Europe/Zurich"); + vtimezone = icaltimezone_get_component(myTZ); + str = icalcomponent_as_ical_string(vtimezone); + + if(VERBOSE) + printf("%s\n", str); +#if ADD_TESTS_REQUIRING_INVESTIGATION + ok("bad-dtstart-in-timezone.patch r960", (strstr(str, "DTSTART:19701025T030000") != NULL)); + ok("bad-dtstart-in-timezone.patch r960", (strstr(str, "DTSTART:19700329T020000") != NULL)); +#endif +} + +void test_icalcomponent_new_from_string(void) +{ + const char *item = + "BEGIN:VCALENDAR\n" + "PRODID:-//Ximian//NONSGML Evolution Calendar//EN\n" + "VERSION:2.0\n" + "BEGIN:VEVENT\n" + "SUMMARY:phone meeting\n" + "DTEND:20060406T163000Z\n" + "DTSTART:20060406T160000Z\n" + "UID:1234567890@dummy\n" + "DTSTAMP:20110824T104144Z\n" + "LAST-MODIFIED:20110824T104144Z\n" + "CREATED:20060409T213201\n" + "LOCATION:my office\n" + "DESCRIPTION:let's talk\n" + "CLASS:PUBLIC\n" + "TRANSP:OPAQUE\n" + "SEQUENCE:1\n" + "END:VEVENT\n" + "END:VCALENDAR\n"; + // must succeed and not leak memory... + icalcomponent *comp = icalcomponent_new_from_string(item); + ok("parsed", (comp != NULL)); + icalcomponent_free(comp); +} + +void test_comma_in_quoted_value(void) +{ + icalcomponent *c; + icalproperty *p; + + static const char test_icalcomp_str[] = +"BEGIN:VEVENT\n" +"X-TEST;VALUE=URI:\"geo:10.123456,-70.123456\"\n" +"END:VEVENT\n"; + + c = icalparser_parse_string ((char *) test_icalcomp_str); + ok("icalparser_parse_string()", (c != NULL)); + if (!c) { + exit (EXIT_FAILURE); + } + + if (VERBOSE) printf("%s",icalcomponent_as_ical_string(c)); + + p = icalcomponent_get_first_property(c,ICAL_X_PROPERTY); + ok("x-property is correct kind",(icalproperty_isa(p) == ICAL_X_PROPERTY)); + is("icalproperty_get_x_name() works", + icalproperty_get_x_name(p),"X-TEST"); + is("icalproperty_get_value_as_string() works", + icalproperty_get_value_as_string(p),"\"geo:10.123456,-70.123456\""); + + icalcomponent_free(c); +} + int main(int argc, char *argv[]) { - int c; +#if !defined(HAVE_UNISTD_H) extern char *optarg; extern int optopt; +#endif int errflg=0; /* char* program_name = strrchr(argv[0],'/'); */ int do_test = 0; int do_header = 0; set_zone_directory("../../zoneinfo"); + icaltimezone_set_tzid_prefix("/softwarestudio.org/"); putenv("TZ="); test_start(0); #ifndef WIN32 + int c; while ((c = getopt(argc, argv, "lvq")) != -1) { switch (c) { case 'v': { @@ -3586,11 +3818,10 @@ int main(int argc, char *argv[]) } #else if (argc>1) - do_test = atoi(argv[2]); + do_test = atoi(argv[1]); #endif - test_run("Test time parser functions", test_time_parser, do_test, do_header); test_run("Test time", test_time, do_test, do_header); test_run("Test day of Year", test_doy, do_test, do_header); @@ -3614,7 +3845,8 @@ int main(int argc, char *argv[]) test_run("Test Dir Set", test_dirset, do_test, do_header); test_run("Test Dir Set (Extended)", test_dirset_extended, do_test, do_header); - test_run("Test File Locks", test_file_locks, do_test, do_header); +/* test_file_locks is slow but should work ok -- uncomment to test it */ +/* test_run("Test File Locks", test_file_locks, do_test, do_header);*/ test_run("Test X Props and Params", test_x, do_test, do_header); test_run("Test Trigger", test_trigger, do_test, do_header); test_run("Test Restriction", test_restriction, do_test, do_header); @@ -3635,6 +3867,9 @@ int main(int argc, char *argv[]) test_run("Test classify ", test_classify, do_test, do_header); test_run("Test Iterators", test_iterators, do_test, do_header); test_run("Test strings", test_strings, do_test, do_header); +#ifdef INVALID_TEST + test_run("Test TZID escaping", test_tzid_escape, do_test, do_header); +#endif test_run("Test Compare", test_compare, do_test, do_header); test_run("Create Simple Component", create_simple_component, do_test, do_header); test_run("Create Components", create_new_component, do_test, do_header); @@ -3645,6 +3880,10 @@ int main(int argc, char *argv[]) test_run("Test Dirset", test_dirset, do_test, do_header); test_run("Test vCal to iCal conversion", test_vcal, do_test, do_header); test_run("Test UTF-8 Handling", test_utf8, do_test, do_header); + test_run("Test exclusion of recurrences as per r961", test_recurrenceexcluded, do_test, do_header); + test_run("Test bad dtstart in timezone as per r960", test_bad_dtstart_in_timezone, do_test, do_header); + test_run("Test icalcomponent_new_from_string()", test_icalcomponent_new_from_string, do_test, do_header); + test_run("Test comma in quoted value of x property", test_comma_in_quoted_value, do_test, do_header); /** OPTIONAL TESTS go here... **/ @@ -3656,7 +3895,6 @@ int main(int argc, char *argv[]) test_run("Test BDB Set", test_bdbset, do_test, do_header); #endif - icaltimezone_free_builtin_timezones(); icalmemory_free_ring(); free_zone_directory(); diff --git a/src/test/regression.h b/src/test/regression.h index 633cd32..b763032 100644 --- a/src/test/regression.h +++ b/src/test/regression.h @@ -2,6 +2,8 @@ extern "C" { #endif +#define ADD_TESTS_REQUIRING_INVESTIGATION 0 + extern int VERBOSE; extern int QUIET; diff --git a/src/test/stow.c b/src/test/stow.c index b7a9ff4..2836604 100644 --- a/src/test/stow.c +++ b/src/test/stow.c @@ -23,6 +23,9 @@ ======================================================================*/ +#ifdef HAVE_CONFIG_H +#include "config.h" +#endif #include <stdio.h> #include <errno.h> @@ -33,13 +36,15 @@ #include <stdlib.h> #include <sys/utsname.h> /* for uname */ #include <sys/stat.h> /* for stat */ +#if defined(HAVE_UNISTD_H) #include <unistd.h> /* for stat, getpid, getopt */ +#endif #include <pwd.h> /* For getpwent */ #include <sys/types.h> /* For getpwent */ #include <ctype.h> /* for tolower */ #include <libical/ical.h> -#include <libical/icalss.h> +#include <libicalss/icalss.h> char* program_name; #define TMPSIZE 2048 @@ -519,8 +524,10 @@ void usage(char *message) void get_options(int argc, char* argv[], struct options_struct *opt) { int c; +#if !defined(HAVE_UNISTD_H) extern char *optarg; extern int optind, optopt; +#endif int errflg=0; opt->storage = STORE_IN_FILE; diff --git a/src/test/testmime.c b/src/test/testmime.c index 3e1cfe6..effb495 100644 --- a/src/test/testmime.c +++ b/src/test/testmime.c @@ -96,8 +96,10 @@ int main(int argc, char* argv[]) { FILE *f; int c; +#if !defined(HAVE_UNISTD_H) extern char *optarg; extern int optind, optopt; +#endif int errflg=0; char* program_name; diff --git a/src/test/timezones.c b/src/test/timezones.c index ac8598f..f55b33c 100644 --- a/src/test/timezones.c +++ b/src/test/timezones.c @@ -29,6 +29,7 @@ int main(int argc, char **argv) int ret = 0; unsigned int total_failed = 0; unsigned int total_okay = 0; + unsigned int percent_failed = 0; int verbose = 0; icaltimezone *utc_zone = icaltimezone_get_utc_timezone(); @@ -44,23 +45,34 @@ int main(int argc, char **argv) struct icaltimetype curr_tt; int failed = 0; int curr_failed; + int zonedef_printed = 0; /* * select this location for glibc: needs support for TZ=<location> * which is not POSIX */ +#if defined(HAVE_SETENV) setenv("TZ", zone_location, 1); +#else + static new_tz[256]; + new_tz[0] = '\0'; + strncat(new_tz, "TZ=", 255); + strncat(new_tz, zone_location, 255); + putenv(new_tz); +#endif tzset(); /* * determine current local time and date: always use midday in - * the current zone + * the current zone and first day of first month in the year */ start_time = time(NULL); localtime_r(&start_time, &start_tm); start_tm.tm_hour = 12; start_tm.tm_min = 0; start_tm.tm_sec = 0; + start_tm.tm_mday = 1; + start_tm.tm_mon = 0; start_time = mktime(&start_tm); /* check time conversion for the next 365 days */ @@ -85,13 +97,23 @@ int main(int argc, char **argv) /* only print first failed day and first day which is okay again */ if (verbose || curr_failed != failed) { - printf("%s: day %03d: %s: libc %04d-%02d-%02d %02d:%02d:%02d dst %d", + struct tm utc_tm; + gmtime_r(&curr_time, &utc_tm); + printf("%s: day %03d: %s: %04d-%02d-%02d %02d:%02d:%02d UTC = libc %04d-%02d-%02d %02d:%02d:%02d dst %d", zone_location, day, + verbose ? (curr_failed ? "failed" : "okay") : (curr_failed ? "first failed" : "okay again"), + utc_tm.tm_year + 1900, + utc_tm.tm_mon + 1, + utc_tm.tm_mday, + utc_tm.tm_hour, + utc_tm.tm_min, + utc_tm.tm_sec, + curr_tm.tm_year + 1900, curr_tm.tm_mon + 1, curr_tm.tm_mday, @@ -112,6 +134,14 @@ int main(int argc, char **argv) } printf("\n"); failed = curr_failed; + + if (!zonedef_printed) { + icalcomponent *comp = icaltimezone_get_component(zone); + if (comp) { + printf("%s\n", icalcomponent_as_ical_string(comp)); + } + zonedef_printed = 1; + } } if (curr_failed) { @@ -123,11 +153,12 @@ int main(int argc, char **argv) } if (total_failed || total_okay) { + percent_failed = total_failed * 100 / (total_failed + total_okay); printf(" *** Summary: %d zones tested, %u days failed, %u okay => %u%% failed ***\n", timezones->num_elements, total_failed, total_okay, - total_failed * 100 / (total_failed + total_okay)); + percent_failed); } return ret; |