<br><font size=2 face="sans-serif">Hello people,</font>
<br>
<br><font size=2 face="sans-serif">I am having trouble working out how
to use icalcomponent_new_from_string. It fails to parse an ical entry
taken from the test program recur. It gives a parse error when it gets
to the end of the string, i.e after it has read and processed END:VEVENT.
I have tried adding various combinations of newline and carriage return
but with no effect. Can some kind person please tell me what I am doing
wrong.</font>
<br>
<br><font size=2 face="sans-serif">void andrew()</font>
<br><font size=2 face="sans-serif">{</font>
<br><font size=2 face="sans-serif"> icalcomponent* component;</font>
<br><font size=2 face="sans-serif"> icalproperty *desc, *dtstart,
*rrule;</font>
<br><font size=2 face="sans-serif"> struct icalrecurrencetype
recur;</font>
<br><font size=2 face="sans-serif"> struct icaltimetype start;</font>
<br><font size=2 face="sans-serif"> icalrecur_iterator* ritr;</font>
<br><font size=2 face="sans-serif"> struct icaltimetype next;</font>
<br><font size=2 face="sans-serif"> const char *desc_str =
"malformed component";</font>
<br><font size=2 face="sans-serif"> const char* ical_text
= "BEGIN:VEVENT\n\r"</font>
<br><font size=2 face="sans-serif">"DESCRIPTION\n\r"</font>
<br><font size=2 face="sans-serif">" :Repeat every thursday starting
Tue 2nd April 2002\n\r"</font>
<br><font size=2 face="sans-serif">"RRULE\n\r"</font>
<br><font size=2 face="sans-serif">" :FREQ=WEEKLY;INTERVAL=1;COUNT=6;BYDAY=TH\n\r"</font>
<br><font size=2 face="sans-serif">"DTSTART\n\r"</font>
<br><font size=2 face="sans-serif">" :20020402T114500\n\r"</font>
<br><font size=2 face="sans-serif">"DTEND\n\r"</font>
<br><font size=2 face="sans-serif">" :20020402T124500\n\r"</font>
<br><font size=2 face="sans-serif">"X-EXPECT-NUMEVENTS: 6\n\r"</font>
<br><font size=2 face="sans-serif">"END:VEVENT";</font>
<br>
<br><font size=2 face="sans-serif"> component = icalcomponent_new_from_string(ical_text);</font>
<br><font size=2 face="sans-serif"> if (component == NULL)</font>
<br><font size=2 face="sans-serif"> {</font>
<br><font size=2 face="sans-serif"> printf("ANDREW:
Parse error.\n");</font>
<br><font size=2 face="sans-serif"> }</font>
<br>
<br><font size=2 face="sans-serif">/* do other things... */</font>
<br>
<br><font size=2 face="sans-serif">}</font>
<br>
<br><font size=2 face="sans-serif">Regards,<br>
<br>
Andrew Marlow<br>
</font><pre>
___________________________________________________________
This e-mail may contain confidential and/or privileged information. If you are not the intended recipient (or have received this e-mail in error) please notify the sender immediately and delete this e-mail. Any unauthorised copying, disclosure or distribution of the material in this e-mail is prohibited.
Please refer to http://www.bnpparibas.co.uk/en/information/legal_information.asp?Code=ECAS-845C5H for additional disclosures.
</pre>