diff -r 479209198de3 -r 5cee4cb5ad79 application/main.c --- a/application/main.c Wed Nov 22 08:47:52 2017 +0100 +++ b/application/main.c Wed Nov 22 09:49:26 2017 +0100 @@ -109,11 +109,10 @@ doc->progress = ui_double_new(ctx, "progress"); doc->list = ui_list_new(ctx, "list"); - printf("doc list: %d\n", doc->list); - Entry *e1 = malloc(sizeof(Entry)); + Entry *e1 = calloc(1, sizeof(Entry)); e1->name = "test"; e1->desc = "test file"; - Entry *e2 = malloc(sizeof(Entry)); + Entry *e2 = calloc(1, sizeof(Entry)); e2->name = str; e2->desc = "important document"; ui_list_append(doc->list, e1); @@ -134,10 +133,9 @@ } void action_newdoc(UiEvent *event, void *data) { - printf("new doc\n"); + printf("new doc;\n "); Document *newd = next_doc(); - printf("newd: %d\n", (int)(intptr_t)newd); ui_set_document(event->obj, newd); }