X-Git-Url: https://git.deb.at/?a=blobdiff_plain;f=edit.c;h=2e773c39a201b86b3f1776094c862fe238413339;hb=d3c55f5a5fcd740475ae9a3195986b455465be69;hp=100488d78e866c9302bb9acd589363f903609c85;hpb=24be624311cedd42ed09acfc605cdf51546bb5ab;p=pkg%2Fabook.git diff --git a/edit.c b/edit.c index 100488d..2e773c3 100644 --- a/edit.c +++ b/edit.c @@ -38,7 +38,7 @@ editor_tab(const int tab) { int i; const int spacing = 12; - const char *tab_names[] = { + static char *tab_names[] = { "CONTACT", "ADDRESS", " PHONE ", @@ -147,7 +147,8 @@ print_editor_header(int item) else snprintf(header, EDITW_COLS, "%s", database[item][NAME]); - mvwaddstr(editw, 0, (EDITW_COLS - strlen(header)) / 2, + fprintf(stderr, "%d\n", strwidth(header)); + mvwaddstr(editw, 0, (EDITW_COLS - strwidth(header)) / 2, header); free(header);