Hello people,

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.

void andrew()
{
    icalcomponent* component;
    icalproperty *desc, *dtstart, *rrule;
    struct icalrecurrencetype recur;
    struct icaltimetype start;
    icalrecur_iterator* ritr;
    struct icaltimetype next;
    const char *desc_str = "malformed component";
    const char* ical_text = "BEGIN:VEVENT\n\r"
"DESCRIPTION\n\r"
" :Repeat every thursday starting Tue 2nd April 2002\n\r"
"RRULE\n\r"
" :FREQ=WEEKLY;INTERVAL=1;COUNT=6;BYDAY=TH\n\r"
"DTSTART\n\r"
" :20020402T114500\n\r"
"DTEND\n\r"
" :20020402T124500\n\r"
"X-EXPECT-NUMEVENTS: 6\n\r"
"END:VEVENT";

    component = icalcomponent_new_from_string(ical_text);
    if (component == NULL)
    {
        printf("ANDREW: Parse error.\n");
    }

/* do other things... */

}

Regards,

Andrew Marlow
___________________________________________________________
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.