X-Git-Url: https://git.deb.at/?a=blobdiff_plain;f=abook.c;h=afd3eaebcc4c17201629d2e3de02f5cd05a00081;hb=2f465ba5e73ba05745d23f0fca9d5bdb1b350d8c;hp=9458cfd44db0777c9c1812840aed13412c751bdd;hpb=b7e40d5b0aef77bca4ee3e90b85daf94c5d95a26;p=pkg%2Fabook.git diff --git a/abook.c b/abook.c index 9458cfd..afd3eae 100644 --- a/abook.c +++ b/abook.c @@ -8,6 +8,7 @@ #include #include +#include #include #include #include @@ -134,7 +135,7 @@ init_abook() umask(DEFAULT_UMASK); if(!datafile_writeable()) { - char *s = mkstr(_("File %s is not writeable"), datafile); + char *s = strdup_printf(_("File %s is not writeable"), datafile); refresh_screen(); statusline_msg(s); free(s); @@ -502,12 +503,12 @@ make_mailstr(int item) { char email[MAX_EMAIL_LEN]; char *ret; - char *name = mkstr("\"%s\"", database[item][NAME]); + char *name = strdup_printf("\"%s\"", database[item][NAME]); get_first_email(email, item); ret = *database[item][EMAIL] ? - mkstr("%s <%s>", name, email) : + strdup_printf("%s <%s>", name, email) : xstrdup(name); free(name); @@ -577,7 +578,7 @@ launch_wwwbrowser(int item) return; if( database[item][URL] ) - cmd = mkstr("%s '%s'", + cmd = strdup_printf("%s '%s'", opt_get_str(STR_WWW_COMMAND), safe_str(database[item][URL])); else @@ -740,14 +741,14 @@ add_email_add_item(int quiet, char *name, char *email) name, email, datafile, - *_("keybinding for yes|y"), - *_("keybinding for no|n")); + *S_("keybinding for yes|y"), + *S_("keybinding for no|n")); c = tolower(getc(in)); - if(c == *_("keybinding for no|n")) { + if(c == *S_("keybinding for no|n")) { fclose(in); return 0; } - } while(c != *_("keybinding for yes|y")); + } while(c != *S_("keybinding for yes|y")); fclose(in); }