I recently build kpilot 3.1b8 and ran into a snag with the conduit with korganizer. After syncing, korganizer would segfault when trying to read the updated .vcs file. I found that the conduit has split the code "NEEDS ACTION" into two lines. A bit of snooping found that the versit code in korganizer had a patch for this problem, but the patch was not included in kpilot. After applying the patch, kpilot seems to work wonderfully. Martin --- kpilot-3.1/conduits/vcalconduit/versit/vcc.y.orig Sat Jan 9 14:19:30 1999 +++ kpilot-3.1/conduits/vcalconduit/versit/vcc.y Tue Jan 19 14:10:31 1999 @@ -660,7 +660,10 @@ lexSkipWhite(); lexClearToken(); c = lexLookahead(); - while (c != EOF && !strchr("\t\n ;:=",c)) { + // some "words" have a space in them, like "NEEDS ACTION". + // this may be an oversight of the spec, but it is true nevertheless. + // while (c != EOF && !strchr("\t\n ;:=",c)) { + while (c != EOF && !strchr("\n;:=",c)) { lexAppendc(c); lexSkipLookahead(); c = lexLookahead(); @@ -1102,9 +1105,9 @@ case '=': DBG_(("db: EQ\n")); return EQ; - /* ignore whitespace in this mode */ - case '\t': - case ' ': continue; + /* ignore tabs/newlines in this mode. We can't ignore + * spaces, because values like NEEDS ACTION have a space. */ + case '\t': continue; case '\n': { ++mime_lineNum; continue; @@ -1113,7 +1116,7 @@ break; default: { lexPushLookaheadc(c); - if (isalpha(c)) { + if (isalpha(c) || c == " ") { char *t = lexGetWord(); yylval.str = t; if (!strcasecmp(t, "begin")) { --- kpilot-3.1/conduits/vcalconduit/versit/Makefile.am.orig Thu Mar 25 10:59:49 1999 +++ kpilot-3.1/conduits/vcalconduit/versit/Makefile.am Thu Mar 25 11:01:05 1999 @@ -28,6 +28,9 @@ # Which sources should be compiled for kpilot libversit_a_SOURCES = vcc.c vobject.c +$(srcdir)/vcc.c: vcc.y + bison $(srcdir)/vcc.y -o $(srcdir)/vcc.c + noinst_HEADERS = port.h vcc.h vobject.h # just to make sure, automake makes them
fixed for the next release (with kpilot-3.1b9).