]> diplodocus.org Git - nmh/blobdiff - sbr/icalendar.l
new.c: Order two return statements to match comment.
[nmh] / sbr / icalendar.l
index 11006e79cbb7d41f876c907a6c6f350b3e755f82..3a6522ce61fb9f5bf0d1456bb21d82032c06a528 100644 (file)
@@ -11,6 +11,7 @@
 #include "h/mh.h"
 #include "h/icalendar.h"
 #include "sbr/icalparse.h"
+#include "sbr/base64.h"
 
 static char *unfold (char *, size_t *);
 static void destroy_icallex(void);
@@ -257,7 +258,15 @@ folded-value         {VALUE-CHAR}*({fold}{VALUE-CHAR}*)+
 
 . {
     /* By default, flex will just pass unmatched text.  Catch it instead. */
-    inform("unexpected input: |%s|\n", icaltext);
+    contentline *clines = vevents.last->contentlines;
+    contentline *cline;
+
+    if (clines  &&  (cline = clines->last)) {
+        if (cline->unexpected == NULL) {
+            cline->unexpected = charstring_create (0);
+        }
+        charstring_append_cstring (cline->unexpected, icaltext);
+    }
 }
 
 <INITIAL>