unfolding doesnt work correctly

This commit is contained in:
2024-01-20 19:19:39 +01:00
parent ce356065a7
commit ecfae506c9
4 changed files with 29 additions and 19 deletions

View File

@ -19,6 +19,7 @@ int main(int argc, char **argv) {
get_cli_args(argc, argv, &ics_path, &show_all_events);
char my_event[8192] = "";
char unfolded_event[8192] = "";
int myfd = open(ics_path, O_RDONLY);
if (myfd == -1) {
@ -39,7 +40,8 @@ int main(int argc, char **argv) {
if (strncmp(my_event, "BEGIN:VEVENT", 12) == 0) {
memset(my_event, '\0', sizeof(my_event));
read_until_string(myfd, my_event, "END:VEVENT");
parse_event(my_event, &head);
unfolding_string(my_event, unfolded_event);
parse_event(unfolded_event, &head);
}
memset(my_event, '\0', sizeof(my_event));
}