X-Git-Url: https://git.deb.at/?a=blobdiff_plain;f=list.c;h=00e149ad50b2ffc442a2769d01424ba41654fc2b;hb=4b8f9231090ada43f7e16987ec46ac7f45a914ec;hp=da6635e5a26d8da58784cff1bb153d32fe8254ca;hpb=392a8ae6d501ab5c20b8bb8176cac4aa9dbf99f3;p=pkg%2Fabook.git diff --git a/list.c b/list.c index da6635e..00e149a 100644 --- a/list.c +++ b/list.c @@ -14,9 +14,11 @@ #include "ui.h" #include "database.h" #include "edit.h" +#include "gettext.h" #include "list.h" #include "misc.h" #include "options.h" +#include "xmalloc.h" #define MIN_EXTRA_COLUMN ADDRESS /* 2 */ #define MAX_EXTRA_COLUMN LAST_FIELD @@ -163,10 +165,10 @@ list_headerline() #if defined(A_BOLD) && defined(A_NORMAL) attrset(A_BOLD); #endif - mvaddstr(2, NAMEPOS, abook_fields[NAME].name); - mvaddstr(2, EMAILPOS, abook_fields[EMAIL].name); + mvaddstr(2, NAMEPOS, gettext(abook_fields[NAME].name)); + mvaddstr(2, EMAILPOS, gettext(abook_fields[EMAIL].name)); if(extra_column > 0) - mvaddnstr(2, EXTRAPOS, abook_fields[extra_column].name, + mvaddnstr(2, EXTRAPOS, gettext(abook_fields[extra_column].name), COLS-EXTRAPOS); #if defined(A_BOLD) && defined(A_NORMAL) attrset(A_NORMAL); @@ -354,7 +356,7 @@ duplicate_item() return 1; for(i = 0; i < ITEM_FIELDS; i++) - item[i] = database[curitem][i] ? strdup(database[curitem][i]) : + item[i] = database[curitem][i] ? xstrdup(database[curitem][i]) : NULL; if(add_item2database(item))