commented function, closed file

This commit is contained in:
bjt-user 2024-07-09 07:13:01 +02:00
parent 7809fb64ab
commit ad344b03ac
2 changed files with 9 additions and 3 deletions

View File

@ -12,15 +12,15 @@ int main(int argc, char **argv) {
get_cli_args(argc, argv, &ics_path, &show_all_events);
// initialize linked list
struct event *head = NULL;
static char current_date[] = "xxxxxxxxTxxxxxx";
get_date(current_date);
printf ("Current date and time: ");
pretty_print_date_time(current_date);
printf ("\n\n");
// initialize linked list
struct event *head = NULL;
parse_ics_file(ics_path, &head);
print_upcoming(head, current_date, show_all_events);

View File

@ -72,6 +72,10 @@ void unfolding_string(char *folded_string, char *unfolded_string) {
}
}
/* this function takes the head of an empty initialized event list
* and the path to the ics file
* it will "fill" the list
*/
void parse_ics_file(char *file_path, struct event **head) {
char my_event[8192] = "";
char unfolded_event[8192] = "";
@ -93,4 +97,6 @@ void parse_ics_file(char *file_path, struct event **head) {
}
memset(my_event, '\0', sizeof(my_event));
}
close(myfd);
}