commented function, closed file
This commit is contained in:
parent
7809fb64ab
commit
ad344b03ac
@ -12,15 +12,15 @@ int main(int argc, char **argv) {
|
|||||||
|
|
||||||
get_cli_args(argc, argv, &ics_path, &show_all_events);
|
get_cli_args(argc, argv, &ics_path, &show_all_events);
|
||||||
|
|
||||||
// initialize linked list
|
|
||||||
struct event *head = NULL;
|
|
||||||
|
|
||||||
static char current_date[] = "xxxxxxxxTxxxxxx";
|
static char current_date[] = "xxxxxxxxTxxxxxx";
|
||||||
get_date(current_date);
|
get_date(current_date);
|
||||||
printf ("Current date and time: ");
|
printf ("Current date and time: ");
|
||||||
pretty_print_date_time(current_date);
|
pretty_print_date_time(current_date);
|
||||||
printf ("\n\n");
|
printf ("\n\n");
|
||||||
|
|
||||||
|
// initialize linked list
|
||||||
|
struct event *head = NULL;
|
||||||
|
|
||||||
parse_ics_file(ics_path, &head);
|
parse_ics_file(ics_path, &head);
|
||||||
|
|
||||||
print_upcoming(head, current_date, show_all_events);
|
print_upcoming(head, current_date, show_all_events);
|
||||||
|
@ -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) {
|
void parse_ics_file(char *file_path, struct event **head) {
|
||||||
char my_event[8192] = "";
|
char my_event[8192] = "";
|
||||||
char unfolded_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));
|
memset(my_event, '\0', sizeof(my_event));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
close(myfd);
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user