From: Daniel Liu Date: Sat, 20 Feb 2021 05:21:02 +0000 (-0500) Subject: fix sig X-Git-Url: https://git.danieliu.xyz/?a=commitdiff_plain;h=3b924bd8e3f3698fec5c31a20475597f0d749870;p=taskasaur.git fix sig --- diff --git a/makefile b/makefile index ac7d51b..810a1a4 100644 --- a/makefile +++ b/makefile @@ -1,16 +1,17 @@ CC=gcc CFLAGS=-g -Wall -Wno-unused-variable -Wno-switch +LIBS=-lncursesw -lmd4c make: taskasaur all: taskasaur %.o: %.c headers/%.h config.h - $(CC) $(CFLAGS) -c $< + $(CC) $(CFLAGS) -c $< $(LIBS) taskasaur: taskasaur.c menu.o parser.o render.o utils.o - $(CC) $(CFLAGS) -o $@ $^ -lncurses -lmd4c + $(CC) $(CFLAGS) -o $@ $^ $(LIBS) clean: rm taskasaur *.o diff --git a/menu.c b/menu.c index 7977896..ee50276 100644 --- a/menu.c +++ b/menu.c @@ -49,11 +49,21 @@ MenuItem* create_menuitem(char* title) { MenuItem* new_menuitem; + TodoItem* new_userdata; new_menuitem = malloc(sizeof(MenuItem)); new_menuitem->title = title; new_menuitem->description = strdup(""); //TEMP FOR NOW + new_userdata = malloc(sizeof(TodoItem)); + new_userdata->item_name = title; + new_userdata->description = strdup(""); + new_userdata->due = strdup(""); + new_userdata->subtask_list = malloc(0); + new_userdata->subtask_count = 0; + + new_menuitem->userdata = new_userdata; + return new_menuitem; }