From: Jaakko Heinonen Date: Wed, 5 Oct 2005 11:03:36 +0000 (+0000) Subject: *** empty log message *** X-Git-Tag: upstream/0.6.1~2^2~134 X-Git-Url: https://git.deb.at/?a=commitdiff_plain;h=2f465ba5e73ba05745d23f0fca9d5bdb1b350d8c;p=pkg%2Fabook.git *** empty log message *** --- diff --git a/abook.c b/abook.c index 2f6c2d5..afd3eae 100644 --- a/abook.c +++ b/abook.c @@ -135,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); @@ -503,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); @@ -578,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 diff --git a/edit.c b/edit.c index a834987..c4f17af 100644 --- a/edit.c +++ b/edit.c @@ -383,7 +383,7 @@ edit_field(int tab, char c, int item) if(j != n) return 0; - str = mkstr("%s: ", gettext(abook_fields[i].name)); + str = strdup_printf("%s: ", gettext(abook_fields[i].name)); change_field(str, &database[item][i]); free(str); diff --git a/filter.c b/filter.c index 6c234e9..62394ca 100644 --- a/filter.c +++ b/filter.c @@ -795,7 +795,7 @@ ldif_export_database(FILE *out, struct db_enumerator e) int j; get_first_email(email, e.item); - tmp = mkstr("cn=%s,mail=%s", database[e.item][NAME], email); + tmp = strdup_printf("cn=%s,mail=%s", database[e.item][NAME], email); ldif_fput_type_and_value(out, "dn", tmp); free(tmp); diff --git a/misc.c b/misc.c index 90f41ac..22ebc80 100644 --- a/misc.c +++ b/misc.c @@ -80,7 +80,7 @@ strtrim(char *s) #endif char * -mkstr (const char *format, ... ) +strdup_printf (const char *format, ... ) { MY_VA_LOCAL_DECL; size_t size = 100; diff --git a/misc.h b/misc.h index 9b42d2c..b40a4a1 100644 --- a/misc.h +++ b/misc.h @@ -6,8 +6,8 @@ char *strupper(char *str); char *strlower(char *str); char *strtrim(char *); -char *mkstr (const char *format, ... ); -char *strconcat (const char *str, ...); +char *strdup_printf(const char *format, ... ); +char *strconcat(const char *str, ...); int safe_strcmp(const char *s1, const char *s2); int safe_strcoll(const char *s1, const char *s2); diff --git a/po/sv.po b/po/sv.po index 2aec520..ac98b37 100644 --- a/po/sv.po +++ b/po/sv.po @@ -7,7 +7,7 @@ msgid "" msgstr "" "Project-Id-Version: abook 0.5.4\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2005-09-30 19:27+0300\n" +"POT-Creation-Date: 2005-10-03 00:16+0200\n" "PO-Revision-Date: 2005-09-23 22:13+0200\n" "Last-Translator: Susanna Björverud \n" "Language-Team: none\n" @@ -231,7 +231,7 @@ msgstr "" msgid "Add \"%s <%s>\" to %s? (%c/%c)\n" msgstr "Lägg till \"%s <%s>\" i %s? (j/n)\n" -#: abook.c:744 abook.c:751 ui.c:344 +#: abook.c:744 abook.c:751 ui.c:344 ui.c:606 msgid "keybinding for yes|y" msgstr "j" @@ -458,7 +458,7 @@ msgstr "exportera databasen" msgid "Export ll, export elected, or ancel?" msgstr "" -#: filter.c:328 ui.c:621 +#: filter.c:328 ui.c:629 msgid "keybindings:all/selected/cancel|asc" msgstr "" @@ -650,8 +650,8 @@ msgid "Your terminal size is %dx%d\n" msgstr "Storleken på ditt terminalfönster är %dx%d\n" #: ui.c:147 -#, c-format -msgid "Terminal is too small. Minium terminal size for abook is %dx%d\n" +#, fuzzy, c-format +msgid "Terminal is too small. Minimum terminal size for abook is %dx%d\n" msgstr "" "Terminalfönstret är alltför litet. Den minsta tillåtna storleken för abook " "är %dx%d\n" @@ -684,27 +684,28 @@ msgstr "Nollställ HELA databasen" msgid "Search hit bottom, continuing at top" msgstr "Sök nådde slutet, fortsätter från början" -#: ui.c:602 -msgid "Your current data will be lost - Press 'y' to continue" +#: ui.c:604 +#, fuzzy, c-format +msgid "Your current data will be lost - Press '%c' to continue" msgstr "Nuvarande data kommer att förloras - Tryck på 'y' för att fortsätta" -#: ui.c:621 +#: ui.c:629 msgid "Print ll, print elected, or ancel?" msgstr "" -#: ui.c:627 +#: ui.c:635 msgid "No selected items" msgstr "Inga poster valda" -#: ui.c:653 +#: ui.c:661 msgid "File to open: " msgstr "Öppna fil: " -#: ui.c:663 +#: ui.c:671 msgid "Save current database" msgstr "Spara denna databas" -#: ui.c:671 +#: ui.c:679 msgid "Sorry, the specified file appears not to be a valid abook addressbook" msgstr "" "Förlåt, men den angivna filen verkar inte vara en giltig abook-adressbok" diff --git a/ui.c b/ui.c index e2833b5..20ec8fe 100644 --- a/ui.c +++ b/ui.c @@ -284,7 +284,7 @@ statusline_askchoice(const char *msg, const char *choices, short dflt) assert((dflt < 0) || (dflt > strlen(choices))); if(dflt) { - s = mkstr("%s [%c]", msg, choices[dflt - 1]); + s = strdup_printf("%s [%c]", msg, choices[dflt - 1]); statusline_addhlstr(s); free(s); } else @@ -588,7 +588,7 @@ ui_find(int next) void ui_print_number_of_items() { - char *str = mkstr(" " "|%3d/%3d", selected_items(), items); + char *str = strdup_printf(" " "|%3d/%3d", selected_items(), items); mvaddstr(0, COLS-strlen(str), str); @@ -601,7 +601,7 @@ ui_read_database() char *msg; if(items > 0) { - msg = mkstr(_("Your current data will be lost - " + msg = strdup_printf(_("Your current data will be lost - " "Press '%c' to continue"), *(S_("keybinding for yes|y"))); if(!statusline_ask_boolean(msg, FALSE)) {