From 627bebd233fee0136a6ffbef005da3e62a87f99b Mon Sep 17 00:00:00 2001 From: Gerfried Fuchs Date: Thu, 22 Mar 2012 17:33:09 +0100 Subject: [PATCH] Imported Upstream version 0.5.6 --- BUGS | 16 +++++++++++++++- ChangeLog | 5 +++++ abook.spec | 2 +- config.guess | 0 config.sub | 0 configure | 2 +- configure.in | 2 +- filter.c | 42 ++++++++++++++++++++++-------------------- gettext.c | 7 +++---- gettext.h | 9 ++++----- help.h | 2 +- options.c | 12 ++++++------ po/abook.pot | 4 ++-- po/de.gmo | Bin 12795 -> 12795 bytes po/de.po | 6 +++--- po/fr.gmo | Bin 13489 -> 13489 bytes po/fr.po | 8 ++++---- po/ja.gmo | Bin 12249 -> 12249 bytes po/ja.po | 6 +++--- po/sv.gmo | Bin 11635 -> 11635 bytes po/sv.po | 6 +++--- ui.c | 8 ++++---- ui.h | 10 ++++++---- 23 files changed, 84 insertions(+), 63 deletions(-) mode change 100755 => 100644 config.guess mode change 100755 => 100644 config.sub diff --git a/BUGS b/BUGS index 8899c06..b1164c6 100644 --- a/BUGS +++ b/BUGS @@ -17,6 +17,20 @@ known bugs in abook * file format is not tolerant for character set changes +-- +[25] +name=Lastname, Firstname +email="Lastname, Firstname" + +but the command "abook --mutt-query lastname" returns two email addresses + +"Lastname Lastname, Firstname +Firstname" Lastname, Firstname + +In other words, the mutt-query doesn't treat the comma as protected by the +quotes, although the conversion from pine format did. +-- + Filters: * mutt / elm / pine export filters allow to create a file with duplicate aliases @@ -25,4 +39,4 @@ Filters: * fseek in ldif import filter should be eliminated -$Id: BUGS,v 1.16 2005/08/29 10:02:50 jheinonen Exp $ +$Id: BUGS,v 1.16.2.1 2006/02/23 13:39:13 jheinonen Exp $ diff --git a/ChangeLog b/ChangeLog index 22771a6..2f96df3 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +0.5.6 + - translation fixes + - fixed gcrd export format (\r\n line endings according to RFC, Marc Tardif) + - fix localized keybindings with --disable-nls + 0.5.5 - i18n support (Cedric Duval) - French translation (Cedric Duval) diff --git a/abook.spec b/abook.spec index e12060b..48ce4b4 100644 --- a/abook.spec +++ b/abook.spec @@ -1,6 +1,6 @@ Summary: Text-based addressbook program Name: abook -Version: 0.5.5 +Version: 0.5.6 Release: 1 License: GPL Group: Utilities diff --git a/config.guess b/config.guess old mode 100755 new mode 100644 diff --git a/config.sub b/config.sub old mode 100755 new mode 100644 diff --git a/configure b/configure index cd6b85a..0dc4124 100755 --- a/configure +++ b/configure @@ -1622,7 +1622,7 @@ fi # Define the identity of the package. PACKAGE=abook - VERSION=0.5.5 + VERSION=0.5.6 cat >>confdefs.h <<_ACEOF diff --git a/configure.in b/configure.in index f5f18b9..e6cc922 100644 --- a/configure.in +++ b/configure.in @@ -1,7 +1,7 @@ dnl abook configure.in AC_INIT(abook.c) -AM_INIT_AUTOMAKE(abook, 0.5.5) +AM_INIT_AUTOMAKE(abook, 0.5.6) AM_CONFIG_HEADER(config.h) dnl --------------- diff --git a/filter.c b/filter.c index 6749490..8d0faa9 100644 --- a/filter.c +++ b/filter.c @@ -1,6 +1,6 @@ /* - * $Id: filter.c,v 1.48.2.1 2005/10/26 19:45:23 jheinonen Exp $ + * $Id: filter.c,v 1.48.2.1.2.2 2006/04/10 16:02:10 jheinonen Exp $ * * by JH * @@ -908,7 +908,7 @@ pine_fixbuf(char *buf) { int i,j; - for(i=0,j=0; j < (int)strlen(buf); i++, j++) + for(i = 0,j = 0; j < (int)strlen(buf); i++, j++) buf[i] = buf[j] == '\n' ? buf[++j] : buf[j]; } @@ -921,18 +921,17 @@ pine_convert_emails(char *s) if(s == NULL || *s != '(') return; - for(i=0; s[i]; i++ ) - s[i] = s[i+1]; + for(i = 0; s[i]; i++) + s[i] = s[i + 1]; if( ( tmp = strchr(s,')')) ) - *tmp=0; + *tmp = '\0'; for(i = 1; ( tmp = strchr(s, ',') ) != NULL ; i++, s = tmp + 1) if(i > MAX_EMAILS - 1) { - *tmp = 0; + *tmp = '\0'; break; } - } static void @@ -943,11 +942,11 @@ pine_parse_buf(char *buf) char *end; char tmp[PINE_BUF_SIZE]; int i, len, last; - int pine_conv_table[]= {NICK, NAME, EMAIL, -1, NOTES}; + int pine_conv_table[] = {NICK, NAME, EMAIL, -1, NOTES}; memset(&item, 0, sizeof(item)); - for(i=0, last=0; !last ; i++) { + for(i = 0, last=0; !last ; i++) { if( !(end = strchr(start, '\t')) ) last=1; @@ -1510,7 +1509,7 @@ gcrd_export_database(FILE *out, struct db_enumerator e) char *name; db_enumerate_items(e) { - fprintf(out, "BEGIN:VCARD\nFN:%s\n", + fprintf(out, "BEGIN:VCARD\r\nFN:%s\r\n", safe_str(database[e.item][NAME])); name = get_surname(database[e.item][NAME]); @@ -1518,7 +1517,7 @@ gcrd_export_database(FILE *out, struct db_enumerator e) if(database[e.item][NAME][j] == ' ') break; } - fprintf(out, "N:%s;%.*s\n", + fprintf(out, "N:%s;%.*s\r\n", safe_str(name), j, safe_str(database[e.item][NAME]) @@ -1527,7 +1526,7 @@ gcrd_export_database(FILE *out, struct db_enumerator e) free(name); if ( database[e.item][ADDRESS] ) - fprintf(out, "ADR:;;%s;%s;%s;%s;%s;%s\n", + fprintf(out, "ADR:;;%s;%s;%s;%s;%s;%s\r\n", safe_str(database[e.item][ADDRESS]), safe_str(database[e.item][ADDRESS2]), safe_str(database[e.item][CITY]), @@ -1537,29 +1536,32 @@ gcrd_export_database(FILE *out, struct db_enumerator e) ); if (database[e.item][PHONE]) - fprintf(out, "TEL;HOME:%s\n", database[e.item][PHONE]); + fprintf(out, "TEL;HOME:%s\r\n", + database[e.item][PHONE]); if (database[e.item][WORKPHONE]) - fprintf(out, "TEL;WORK:%s\n", database[e.item][WORKPHONE]); + fprintf(out, "TEL;WORK:%s\r\n", + database[e.item][WORKPHONE]); + if (database[e.item][FAX]) - fprintf(out, "TEL;FAX:%s\n", database[e.item][FAX]); + fprintf(out, "TEL;FAX:%s\r\n", database[e.item][FAX]); if (database[e.item][MOBILEPHONE]) - fprintf(out, "TEL;CELL:%s\n", database[e.item][MOBILEPHONE]); + fprintf(out, "TEL;CELL:%s\r\n", database[e.item][MOBILEPHONE]); if ( database[e.item][EMAIL] ) { split_emailstr(e.item, emails); for(j=0; j < MAX_EMAILS ; j++) { if ( *emails[j] ) - fprintf(out, "EMAIL;INTERNET:%s\n", + fprintf(out, "EMAIL;INTERNET:%s\r\n", emails[j]); } } if ( database[e.item][NOTES] ) - fprintf(out, "NOTE:%s\n", database[e.item][NOTES]); + fprintf(out, "NOTE:%s\r\n", database[e.item][NOTES]); if (database[e.item][URL]) - fprintf(out, "URL:%s\n", database[e.item][URL]); + fprintf(out, "URL:%s\r\n", database[e.item][URL]); - fprintf(out, "END:VCARD\n\n"); + fprintf(out, "END:VCARD\r\n\r\n"); } diff --git a/gettext.c b/gettext.c index 949e843..0dd9dbf 100644 --- a/gettext.c +++ b/gettext.c @@ -2,18 +2,17 @@ # include "config.h" #endif -#ifdef ENABLE_NLS #include #include "gettext.h" -char * +const char * sgettext(const char *msgid) { - char *msgval = gettext(msgid); + const char *msgval = gettext(msgid); if(msgval == msgid) msgval = strrchr(msgid, '|') + 1; return msgval; } -#endif + diff --git a/gettext.h b/gettext.h index 332a7f6..6e2973c 100644 --- a/gettext.h +++ b/gettext.h @@ -1,15 +1,14 @@ #ifndef _GETTEXT_H #define _GETTEXT_H +const char *sgettext(const char *msgid); /* Strip context prefix */ + # if ENABLE_NLS # include -char *sgettext(const char *msgid); /* Strip context prefix */ # else # define gettext(Msgid) ((const char *) (Msgid)) -# define sgettext(Msgid) ((const char *) (Msgid)) - -# define textdomain(Domainname) ((const char *) (Domainname)) -# define bindtextdomain(Domainname, Dirname) ((const char *) (Dirname)) +# define textdomain(Domainname) do {} while(0) +# define bindtextdomain(Domainname, Dirname) do {} while(0) # endif /* ENABLE_NLS */ # define _(String) gettext (String) diff --git a/help.h b/help.h index 7de967e..776a000 100644 --- a/help.h +++ b/help.h @@ -44,7 +44,7 @@ N_(" A move current item up\n"), N_(" Z move current item down\n"), "\n", N_(" m send mail with mutt\n"), -N_(" u view URL with web browser\n"), +N_(" v view URL with web browser\n"), NULL }; diff --git a/options.c b/options.c index 235da40..3b8c338 100644 --- a/options.c +++ b/options.c @@ -1,6 +1,6 @@ /* - * $Id: options.c,v 1.27 2005/09/21 16:50:31 jheinonen Exp $ + * $Id: options.c,v 1.27.4.1 2006/04/09 18:57:34 jheinonen Exp $ * * by JH * @@ -226,7 +226,7 @@ find_token_end(buffer *b) } } -static char * +static const char * opt_set_set_option(char *var, char *p, struct option *opt) { int len; @@ -265,7 +265,7 @@ opt_set_set_option(char *var, char *p, struct option *opt) return NULL; } -static char * +static const char * opt_parse_set(buffer *b) { int i; @@ -288,7 +288,7 @@ opt_parse_set(buffer *b) #include "database.h" /* needed for change_custom_field_name */ -static char * +static const char * opt_parse_customfield(buffer *b) { char *p, num[5]; @@ -315,7 +315,7 @@ opt_parse_customfield(buffer *b) static struct { char *token; - char * (*func) (buffer *line); + const char * (*func) (buffer *line); } opt_parsers[] = { { "set", opt_parse_set }, { "customfield", opt_parse_customfield }, @@ -326,7 +326,7 @@ static bool opt_parse_line(char *line, int n, char *fn) { int i; - char *err = NULL; + const char *err = NULL; char *token; buffer b; diff --git a/po/abook.pot b/po/abook.pot index 72d5bb7..f68b46e 100644 --- a/po/abook.pot +++ b/po/abook.pot @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: PACKAGE VERSION\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2005-10-27 17:07+0300\n" +"POT-Creation-Date: 2005-12-06 07:50+0200\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" @@ -574,7 +574,7 @@ msgid "\tm\t\tsend mail with mutt\n" msgstr "" #: help.h:47 -msgid "\tu\t\tview URL with web browser\n" +msgid "\tv\t\tview URL with web browser\n" msgstr "" #: help.h:55 diff --git a/po/de.gmo b/po/de.gmo index bfc0405c8e6222179cfef54af2be417aafd2b120..3fe1872864821a4865a48f1a3a1deea76138f6a6 100644 GIT binary patch delta 122 zcmeyJ{5yHW7Dirq1_lNPVFm^{Af2%JAme8iUL_#&iYfzxB9Q*R`5;?1Go!_1U9QKB z44VbH;~5!ECl~VEXEfOy$oqkHa)Ph|cNr&VS!QavLTHfB<{aTxE?y&D12Y8!b1PE= YZ3Cmt|75STPyVi|%viShrz#T<0RB@V$^ZZW delta 129 zcmeyJ{5yHW7Diq<1_lNPVFm_yARWK?Ame8iUPU1DiYfzx5|IA3`5;?1Go#65U9QKB z7MlgR;~5zlCKvMDXEfa$$oqknyOfi&EHkxSAvDNmvahiCWEWxC%?-kZT)YOlM&=5J f=2iyg+6Km(|H)owXDprkQ&o|vjC1o(RVE$)=ddI< diff --git a/po/de.po b/po/de.po index 64d9c0e..13647d4 100644 --- a/po/de.po +++ b/po/de.po @@ -7,7 +7,7 @@ msgid "" msgstr "" "Project-Id-Version: abook 0.5.5pre1\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2005-10-27 17:07+0300\n" +"POT-Creation-Date: 2005-12-06 07:50+0200\n" "PO-Revision-Date: 2005-10-03 00:56+0200\n" "Last-Translator: Johannes Weißl \n" "Language-Team: German \n" @@ -599,8 +599,8 @@ msgid "\tm\t\tsend mail with mutt\n" msgstr "\tm\t\tE-Mail mit Mutt senden\n" #: help.h:47 -msgid "\tu\t\tview URL with web browser\n" -msgstr "\tu\t\tURL mit Web-Browser anzeigen\n" +msgid "\tv\t\tview URL with web browser\n" +msgstr "\tv\t\tURL mit Web-Browser anzeigen\n" #: help.h:55 msgid "\ta,c,p,o,C/arrows/h,l\tchange tab\n" diff --git a/po/fr.gmo b/po/fr.gmo index f4fd9cf7fa83b303821d57ab7195f40f2530a94d..a9790e99117db22dfcad74a0d85e17767bbbaec7 100644 GIT binary patch delta 134 zcmdm(xiNFY7Dirq1_p)%VFm^{AlmYG_v5E|q&IagSGa*D9*<^{rwxp)n9jm#Ac n&8-Z~wGE6n2grG`G8S*1tsKkDSUUNan*QY9YTBEF)#G>pfGs7; diff --git a/po/fr.po b/po/fr.po index d29a723..1a469d3 100644 --- a/po/fr.po +++ b/po/fr.po @@ -7,7 +7,7 @@ msgid "" msgstr "" "Project-Id-Version: abook\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2005-10-27 17:07+0300\n" +"POT-Creation-Date: 2005-12-06 07:50+0200\n" "PO-Revision-Date: 2005-10-03 10:53+0200\n" "Last-Translator: Cedric Duval \n" "Language-Team: french\n" @@ -563,7 +563,7 @@ msgstr "\ts\t\tclasser la base de données\n" #: help.h:37 msgid "\tS\t\t\"surname sort\"\n" -msgstr "\ts\t\tclassement par nom de famille\n" +msgstr "\tS\t\tclassement par nom de famille\n" #: help.h:38 msgid "\tF\t\tsort by field (defined in configuration file)\n" @@ -592,8 +592,8 @@ msgid "\tm\t\tsend mail with mutt\n" msgstr "\tm\t\tenvoyer un courrier électronique avec mutt\n" #: help.h:47 -msgid "\tu\t\tview URL with web browser\n" -msgstr "\tu\t\tvisualiser l'URL avec un navigateur web\n" +msgid "\tv\t\tview URL with web browser\n" +msgstr "\tv\t\tvisualiser l'URL avec un navigateur web\n" #: help.h:55 msgid "\ta,c,p,o,C/arrows/h,l\tchange tab\n" diff --git a/po/ja.gmo b/po/ja.gmo index c365b4267b0dffd78e7b3ce12530fc72b6c2bb1c..3acef2815f70cd2f8c443613c3ef5edd1133f04c 100644 GIT binary patch delta 132 zcmcZ^e=~l=7Dirq1_p)%VFm^{AlmYG_v5E|q&IagSGa*D9*<^{rwxp)n9jm#Ac m&8-Z~wGE6n2guE5V=SHgQALbp$<8IOC%;jV+pM9wkqZD$tR|xX diff --git a/po/ja.po b/po/ja.po index 8fbc545..8eb5e5b 100644 --- a/po/ja.po +++ b/po/ja.po @@ -5,7 +5,7 @@ msgid "" msgstr "" "Project-Id-Version: 0.5.5\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2005-10-27 17:07+0300\n" +"POT-Creation-Date: 2005-12-06 07:50+0200\n" "PO-Revision-Date: 2005-10-18 18:10+0200\n" "Last-Translator: TAKAHASHI Tamotsu \n" "Language-Team: japanese\n" @@ -583,8 +583,8 @@ msgid "\tm\t\tsend mail with mutt\n" msgstr "\tm\t\tMutt ¤Ç¥á¡¼¥ë¤òÁ÷¤ë\n" #: help.h:47 -msgid "\tu\t\tview URL with web browser\n" -msgstr "\tu\t\tURL ¤ò¥Ö¥é¥¦¥¶¤Ç±ÜÍ÷¤¹¤ë\n" +msgid "\tv\t\tview URL with web browser\n" +msgstr "\tv\t\tURL ¤ò¥Ö¥é¥¦¥¶¤Ç±ÜÍ÷¤¹¤ë\n" #: help.h:55 msgid "\ta,c,p,o,C/arrows/h,l\tchange tab\n" diff --git a/po/sv.gmo b/po/sv.gmo index 3aa41eea0c8bb9daac8e61934bfee820e7c2cd8b..72cc1247ef2747a918f16c31bb2d5d9054f41b1e 100644 GIT binary patch delta 120 zcmewy^*L(87Dirq1_p)=LJSOYK>EVwgN%n+cx8ahd}Rg(X&~LRc_Q0+W=7M^iCo_q z85t%=^7u2FY+lL3!8ZAVkOFrZCudn^YPmvakk95jLXDifM!E)O3I^s@rUu#uMw_!_ W*w`ocD9bXIO)gZH-n>%z6ej?&w;?M4 delta 124 zcmewy^*L(87Diq<1_p)=LJSP@K>GaVgN%n+c%^~Nd}Rg(86e%gc_Q0+W=4k1iCo_q z8BHcf^7u2FZeGd5!Ny(6$yt_}TCNZp+Lb97b2<39}8t59CD;Szv8JKGu a7;ny!VPj`3o!qA^J-I+xcJoT*Q=9-fT_T47 diff --git a/po/sv.po b/po/sv.po index d8862d6..03572f6 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-10-27 17:07+0300\n" +"POT-Creation-Date: 2005-12-06 07:50+0200\n" "PO-Revision-Date: 2005-09-23 22:13+0200\n" "Last-Translator: Susanna Björverud \n" "Language-Team: none\n" @@ -588,8 +588,8 @@ msgid "\tm\t\tsend mail with mutt\n" msgstr "\tm\t\tskicka post med mutt\n" #: help.h:47 -msgid "\tu\t\tview URL with web browser\n" -msgstr "\tu\t\tvisa URL i webbläsare\n" +msgid "\tv\t\tview URL with web browser\n" +msgstr "\tv\t\tvisa URL i webbläsare\n" #: help.h:55 msgid "\ta,c,p,o,C/arrows/h,l\tchange tab\n" diff --git a/ui.c b/ui.c index 0fc8273..d42f26e 100644 --- a/ui.c +++ b/ui.c @@ -1,6 +1,6 @@ /* - * $Id: ui.c,v 1.54 2005/10/05 11:03:36 jheinonen Exp $ + * $Id: ui.c,v 1.54.4.1 2006/04/09 18:57:34 jheinonen Exp $ * * by JH * @@ -306,7 +306,7 @@ statusline_askchoice(const char *msg, const char *choices, short dflt) } char * -ui_readline(char *prompt, char *s, size_t limit, bool use_completion) +ui_readline(const char *prompt, char *s, size_t limit, bool use_completion) { int y, x; char *ret; @@ -327,7 +327,7 @@ ui_readline(char *prompt, char *s, size_t limit, bool use_completion) } int -statusline_ask_boolean(char *msg, int def) +statusline_ask_boolean(const char *msg, int def) { int ret; char *msg2 = strconcat(msg, def ? _(" (Y/n)?") : _(" (y/N)?"), NULL); @@ -363,7 +363,7 @@ refresh_statusline() } char * -ask_filename(char *prompt) +ask_filename(const char *prompt) { char *buf = NULL; diff --git a/ui.h b/ui.h index 7e1b8a8..e811431 100644 --- a/ui.h +++ b/ui.h @@ -15,13 +15,15 @@ void close_ui(); void headerline(const char *str); void refresh_screen(); int statusline_msg(const char *msg); -int statusline_askchoice(const char *msg, const char *choices, short dflt); -char *ask_filename(char *prompt); -int statusline_ask_boolean(char *msg, int def); +int statusline_askchoice(const char *msg, const char *choices, + short dflt); +char *ask_filename(const char *prompt); +int statusline_ask_boolean(const char *msg, int def); void clear_statusline(); void display_help(int help); void statusline_addstr(const char *str); -char * ui_readline(char *prompt, char *s, size_t limit, bool use_completion); +char * ui_readline(const char *prompt, char *s, size_t limit, + bool use_completion); void refresh_statusline(); void get_commands(); void ui_remove_items(); -- 2.39.2