dont put field name summary into summary field
This commit is contained in:
parent
7a5b3bc97a
commit
ff20bb92f7
@ -52,7 +52,7 @@ void print_upcoming(struct event *head, char current_start_date[], int show_all_
|
||||
if (strcmp(head->start_date, current_start_date) >= 0) {
|
||||
pretty_print_date_time(head->start_date);
|
||||
print_end_date(head->end_date, head->start_date);
|
||||
printf("\n%s\n", head->summary);
|
||||
printf("\nSUMMARY: %s\n", head->summary);
|
||||
|
||||
if (!show_all_events) {
|
||||
i++;
|
||||
|
@ -9,13 +9,14 @@
|
||||
|
||||
void parse_event(char event_string[], struct event **head)
|
||||
{
|
||||
char *start_date = strstr(event_string, "\nDTSTART");
|
||||
char *end_date = strstr(event_string, "\nDTEND");
|
||||
char *summary = strstr(event_string, "\nSUMMARY");
|
||||
char* start_date = strstr(event_string, "\nDTSTART");
|
||||
char* end_date = strstr(event_string, "\nDTEND");
|
||||
char* summary = strstr(event_string, "\nSUMMARY");
|
||||
summary = strchr(summary, ':') + 1;
|
||||
|
||||
char *start_date_str = malloc(256);
|
||||
char *end_date_str = malloc(256);
|
||||
char *summary_str = malloc(512);
|
||||
char* start_date_str = malloc(256);
|
||||
char* end_date_str = malloc(256);
|
||||
char* summary_str = malloc(512);
|
||||
|
||||
memset(start_date_str, '\0', 256);
|
||||
memset(end_date_str, '\0', 256);
|
||||
|
Loading…
Reference in New Issue
Block a user