aboutsummaryrefslogtreecommitdiffstats
path: root/libical/examples/errors.c
diff options
context:
space:
mode:
authornobody <nobody@localhost>2002-05-16 00:19:25 +0800
committernobody <nobody@localhost>2002-05-16 00:19:25 +0800
commitacdd664f5104862243db8c3a0689d5ac4ede774e (patch)
tree9a14849dd3a40bd1667b88d689e2aa7d58d08bce /libical/examples/errors.c
parent74f4231f4eb650f0243ff39ab5a085b1df4f7697 (diff)
downloadgsoc2013-evolution-GNOME_UTILS_2_0_2.tar
gsoc2013-evolution-GNOME_UTILS_2_0_2.tar.gz
gsoc2013-evolution-GNOME_UTILS_2_0_2.tar.bz2
gsoc2013-evolution-GNOME_UTILS_2_0_2.tar.lz
gsoc2013-evolution-GNOME_UTILS_2_0_2.tar.xz
gsoc2013-evolution-GNOME_UTILS_2_0_2.tar.zst
gsoc2013-evolution-GNOME_UTILS_2_0_2.zip
This commit was manufactured by cvs2svn to create tagGNOME_UTILS_2_0_2
'GNOME_UTILS_2_0_2'. svn path=/tags/GNOME_UTILS_2_0_2/; revision=16870
Diffstat (limited to 'libical/examples/errors.c')
-rw-r--r--libical/examples/errors.c70
1 files changed, 0 insertions, 70 deletions
diff --git a/libical/examples/errors.c b/libical/examples/errors.c
deleted file mode 100644
index 86d963bd75..0000000000
--- a/libical/examples/errors.c
+++ /dev/null
@@ -1,70 +0,0 @@
-/* errors.c */
-
-#include "ical.h"
-#include <stdio.h>
-
-void program_errors()
-{
- /*Most routines will set icalerrno on errors. This is an
- enumeration defined in icalerror.h */
-
- icalcomponent *c;
-
- icalerror_clear_errno();
-
- c = icalcomponent_new(ICAL_VEVENT_COMPONENT);
-
- if (icalerrno != ICAL_NO_ERROR){
-
- fprintf(stderr,"Horrible libical error: %s\n",
- icalerror_strerror(icalerrno));
-
- }
-
-}
-
-void component_errors(icalcomponent *comp)
-{
- int errors;
- icalproperty *p;
-
- /* presume that we just got this component from the parser */
-
- errors = icalcomponent_count_errors(comp);
-
- printf("This component has %d parsing errors\n", errors);
-
- /* Print out all of the parsing errors. This is not strictly
- correct, because it does not descend into any sub-components,
- as icalcomponent_count_errors() does. */
-
- for(p = icalcomponent_get_first_property(comp,ICAL_XLICERROR_PROPERTY);
- p != 0;
- p = icalcomponent_get_next_property(comp,ICAL_XLICERROR_PROPERTY))
- {
-
- printf("-- The error is %s:\n",icalproperty_get_xlicerror(p));
- }
-
-
-
- /* Check the component for iTIP compilance, and add more
- X-LIC-ERROR properties if it is non-compilant. */
- icalrestriction_check(comp);
-
-
- /* Count the new errors. */
- if(errors != icalcomponent_count_errors(comp)){
- printf(" -- The component also has iTIP restriction errors \n");
- }
-
- /* Since there are iTIP restriction errors, it may be impossible
- to process this component as an iTIP request. In this case, the
- X-LIC-ERROR proeprties should be expressed as REQUEST-STATUS
- properties in the reply. This following routine makes this
- conversion */
-
-
- icalcomponent_convert_errors(comp);
-
-}