add: icalerror_set_error_state(ICAL_MALFORMEDDATA_ERROR,es);
context: icalcomponent* read_nonmime_component(struct options_struct *opt){    FILE *stream;    icalcomponent *comp;    icalparser* parser = icalparser_new();    char* line;    if(opt->input_source == INPUT_FROM_FILE){ 	stream = fopen(opt->input_file,"r"); 		if (stream == 0){	    perror("Can't open input file");	    exit(1);	}    } else { 	stream = stdin;  	 	    }    assert(stream != 0);    icalparser_set_gen_data(parser,stream);       do {		line = icalparser_get_line(parser,read_stream);		comp = icalparser_add_line(parser,line);		if (comp != 0){	    return comp;	}	    } while ( line != 0);    if(opt->input_source == INPUT_FROM_FILE){	fclose(stream);    }    return comp; }