You can subscribe to this list here.
2005 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
(17) |
Oct
(29) |
Nov
|
Dec
(4) |
---|---|---|---|---|---|---|---|---|---|---|---|---|
2006 |
Jan
|
Feb
(1) |
Mar
(2) |
Apr
(4) |
May
|
Jun
|
Jul
|
Aug
(28) |
Sep
(22) |
Oct
|
Nov
|
Dec
|
From: Jaakko H. <jhe...@us...> - 2006-04-10 16:02:15
|
Update of /cvsroot/abook/abook In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv24392 Modified Files: Tag: ver_0_5_6 configure configure.in filter.c Log Message: - whitespace cleanups - prepare for 0.5.6rc1 Index: configure =================================================================== RCS file: /cvsroot/abook/abook/configure,v retrieving revision 1.47.2.2 retrieving revision 1.47.2.2.2.1 diff -u -d -r1.47.2.2 -r1.47.2.2.2.1 --- configure 2 Dec 2005 12:44:08 -0000 1.47.2.2 +++ configure 10 Apr 2006 16:02:10 -0000 1.47.2.2.2.1 @@ -1622,7 +1622,7 @@ # Define the identity of the package. PACKAGE=abook - VERSION=0.5.5 + VERSION=0.5.6rc1 cat >>confdefs.h <<_ACEOF Index: configure.in =================================================================== RCS file: /cvsroot/abook/abook/configure.in,v retrieving revision 1.50.2.2 retrieving revision 1.50.2.2.2.1 diff -u -d -r1.50.2.2 -r1.50.2.2.2.1 --- configure.in 2 Dec 2005 12:44:08 -0000 1.50.2.2 +++ configure.in 10 Apr 2006 16:02:10 -0000 1.50.2.2.2.1 @@ -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.6rc1) AM_CONFIG_HEADER(config.h) dnl --------------- Index: filter.c =================================================================== RCS file: /cvsroot/abook/abook/filter.c,v retrieving revision 1.48.2.1.2.1 retrieving revision 1.48.2.1.2.2 diff -u -d -r1.48.2.1.2.1 -r1.48.2.1.2.2 --- filter.c 13 Mar 2006 20:04:48 -0000 1.48.2.1.2.1 +++ filter.c 10 Apr 2006 16:02:10 -0000 1.48.2.1.2.2 @@ -908,7 +908,7 @@ { 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 @@ 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 @@ 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; |
From: Jaakko H. <jhe...@us...> - 2006-04-10 16:01:50
|
Update of /cvsroot/abook/abook In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv24145 Modified Files: filter.c Log Message: - whitespace cleanups Index: filter.c =================================================================== RCS file: /cvsroot/abook/abook/filter.c,v retrieving revision 1.51 retrieving revision 1.52 diff -u -d -r1.51 -r1.52 --- filter.c 14 Mar 2006 15:06:10 -0000 1.51 +++ filter.c 10 Apr 2006 16:01:31 -0000 1.52 @@ -916,7 +916,7 @@ { 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]; } @@ -929,15 +929,15 @@ 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_LIST_ITEMS - 1) { - *tmp = 0; + *tmp = '\0'; break; } |
From: Jaakko H. <jhe...@us...> - 2006-04-10 08:15:50
|
Update of /cvsroot/abook/abook In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv2793 Modified Files: ChangeLog Makefile.in aclocal.m4 configure configure.in gettext.c gettext.h options.c ui.c ui.h Log Message: - fix localized keybindings with --disable-nls Index: ui.c =================================================================== RCS file: /cvsroot/abook/abook/ui.c,v retrieving revision 1.56 retrieving revision 1.57 diff -u -d -r1.56 -r1.57 --- ui.c 26 Oct 2005 19:29:17 -0000 1.56 +++ ui.c 10 Apr 2006 08:15:46 -0000 1.57 @@ -305,7 +305,7 @@ } 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; @@ -326,7 +326,7 @@ } 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); @@ -362,7 +362,7 @@ } char * -ask_filename(char *prompt) +ask_filename(const char *prompt) { char *buf = NULL; Index: configure =================================================================== RCS file: /cvsroot/abook/abook/configure,v retrieving revision 1.48 retrieving revision 1.49 diff -u -d -r1.48 -r1.49 --- configure 25 Oct 2005 23:27:24 -0000 1.48 +++ configure 10 Apr 2006 08:15:45 -0000 1.49 @@ -968,7 +968,7 @@ else echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2 fi - cd "$ac_popdir" + cd $ac_popdir done fi @@ -1622,7 +1622,7 @@ # Define the identity of the package. [...1110 lines suppressed...] + { echo "$as_me:$LINENO: creating $ac_file" >&5 +echo "$as_me: creating $ac_file" >&6;} + rm -f "$ac_file" + fi # Let's still pretend it is `configure' which instantiates (i.e., don't # use $as_me), people would be surprised to read: # /* config.h. Generated by config.status. */ @@ -15331,12 +15448,6 @@ fi;; esac done` || { (exit 1); exit 1; } - - if test x"$ac_file" != x-; then - { echo "$as_me:$LINENO: creating $ac_file" >&5 -echo "$as_me: creating $ac_file" >&6;} - rm -f "$ac_file" - fi _ACEOF cat >>$CONFIG_STATUS <<_ACEOF sed "$ac_vpsub Index: configure.in =================================================================== RCS file: /cvsroot/abook/abook/configure.in,v retrieving revision 1.50 retrieving revision 1.51 diff -u -d -r1.50 -r1.51 --- configure.in 22 Oct 2005 19:55:21 -0000 1.50 +++ configure.in 10 Apr 2006 08:15:46 -0000 1.51 @@ -1,7 +1,7 @@ dnl abook configure.in AC_INIT(abook.c) -AM_INIT_AUTOMAKE(abook, 0.5.5pre1) +AM_INIT_AUTOMAKE(abook, 0.5.5) AM_CONFIG_HEADER(config.h) dnl --------------- Index: ui.h =================================================================== RCS file: /cvsroot/abook/abook/ui.h,v retrieving revision 1.15 retrieving revision 1.16 diff -u -d -r1.15 -r1.16 --- ui.h 25 Oct 2005 23:27:24 -0000 1.15 +++ ui.h 10 Apr 2006 08:15:46 -0000 1.16 @@ -15,13 +15,15 @@ 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(); Index: options.c =================================================================== RCS file: /cvsroot/abook/abook/options.c,v retrieving revision 1.28 retrieving revision 1.29 diff -u -d -r1.28 -r1.29 --- options.c 25 Oct 2005 23:27:24 -0000 1.28 +++ options.c 10 Apr 2006 08:15:46 -0000 1.29 @@ -278,7 +278,7 @@ return NULL; } -static char * +static const char * opt_set_set_option(char *p, struct option *opt) { int len; @@ -360,7 +360,7 @@ /* * syntax: set <option> = <value> */ -static char * +static const char * opt_parse_set(buffer *b) { char *var, *err; @@ -374,7 +374,7 @@ return opt_set_option(var, b->ptr); } -static char * +static const char * opt_parse_customfield(buffer *b) { return _("customfield: obsolete command - please use the " @@ -445,7 +445,7 @@ static struct { char *token; - char * (*func) (buffer *line); + const char * (*func) (buffer *line); } opt_parsers[] = { { "set", opt_parse_set }, { "customfield", opt_parse_customfield }, /* obsolete */ @@ -458,7 +458,7 @@ opt_parse_line(char *line, int n, char *fn) { int i; - char *err = NULL; + const char *err = NULL; char *token; buffer b; Index: ChangeLog =================================================================== RCS file: /cvsroot/abook/abook/ChangeLog,v retrieving revision 1.71 retrieving revision 1.72 diff -u -d -r1.71 -r1.72 --- ChangeLog 14 Mar 2006 15:06:10 -0000 1.71 +++ ChangeLog 10 Apr 2006 08:15:45 -0000 1.72 @@ -1,8 +1,14 @@ +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 - fixed gcrd export format (Marc Tardif) - i18n support (Cedric Duval) - French translation (Cedric Duval) - Swedish translation (Susanna Björverud) + - Japanese translation (Takahashi Tamotsu) - palmcsv import filter (Marc Tardif) - use better common code for csv filters (Marc Tardif) - translation HOWTO (Cedric Duval) Index: Makefile.in =================================================================== RCS file: /cvsroot/abook/abook/Makefile.in,v retrieving revision 1.22 retrieving revision 1.23 diff -u -d -r1.22 -r1.23 --- Makefile.in 25 Oct 2005 23:27:24 -0000 1.22 +++ Makefile.in 10 Apr 2006 08:15:45 -0000 1.23 @@ -1,8 +1,8 @@ -# Makefile.in generated by automake 1.9.5 from Makefile.am. +# Makefile.in generated by automake 1.9.3 from Makefile.am. # @configure_input@ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, -# 2003, 2004, 2005 Free Software Foundation, Inc. +# 2003, 2004 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. @@ -373,13 +373,7 @@ # (which will cause the Makefiles to be regenerated when you run `make'); # (2) otherwise, pass the desired values on the `make' command line. $(RECURSIVE_TARGETS): - @failcom='exit 1'; \ - for f in x $$MAKEFLAGS; do \ - case $$f in \ - *=* | --[!k]*);; \ - *k*) failcom='fail=yes';; \ - esac; \ - done; \ + @set fnord $$MAKEFLAGS; amf=$$2; \ dot_seen=no; \ target=`echo $@ | sed s/-recursive//`; \ list='$(SUBDIRS)'; for subdir in $$list; do \ @@ -391,7 +385,7 @@ local_target="$$target"; \ fi; \ (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \ - || eval $$failcom; \ + || case "$$amf" in *=*) exit 1;; *k*) fail=yes;; *) exit 1;; esac; \ done; \ if test "$$dot_seen" = "no"; then \ $(MAKE) $(AM_MAKEFLAGS) "$$target-am" || exit 1; \ @@ -399,13 +393,7 @@ mostlyclean-recursive clean-recursive distclean-recursive \ maintainer-clean-recursive: - @failcom='exit 1'; \ - for f in x $$MAKEFLAGS; do \ - case $$f in \ - *=* | --[!k]*);; \ - *k*) failcom='fail=yes';; \ - esac; \ - done; \ + @set fnord $$MAKEFLAGS; amf=$$2; \ dot_seen=no; \ case "$@" in \ distclean-* | maintainer-clean-*) list='$(DIST_SUBDIRS)' ;; \ @@ -426,7 +414,7 @@ local_target="$$target"; \ fi; \ (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \ - || eval $$failcom; \ + || case "$$amf" in *=*) exit 1;; *k*) fail=yes;; *) exit 1;; esac; \ done && test -z "$$fail" tags-recursive: list='$(SUBDIRS)'; for subdir in $$list; do \ Index: gettext.c =================================================================== RCS file: /cvsroot/abook/abook/gettext.c,v retrieving revision 1.1 retrieving revision 1.2 diff -u -d -r1.1 -r1.2 --- gettext.c 23 Sep 2005 21:34:39 -0000 1.1 +++ gettext.c 10 Apr 2006 08:15:46 -0000 1.2 @@ -2,18 +2,17 @@ # include "config.h" #endif -#ifdef ENABLE_NLS #include <string.h> #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 + Index: aclocal.m4 =================================================================== RCS file: /cvsroot/abook/abook/aclocal.m4,v retrieving revision 1.28 retrieving revision 1.29 diff -u -d -r1.28 -r1.29 --- aclocal.m4 25 Oct 2005 23:27:24 -0000 1.28 +++ aclocal.m4 10 Apr 2006 08:15:45 -0000 1.29 @@ -1,7 +1,7 @@ -# generated automatically by aclocal 1.9.5 -*- Autoconf -*- +# generated automatically by aclocal 1.9.3 -*- Autoconf -*- -# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, -# 2005 Free Software Foundation, Inc. +# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004 +# Free Software Foundation, Inc. # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. @@ -11,11 +11,23 @@ # even the implied warranty of MERCHANTABILITY or FITNESS FOR A # PARTICULAR PURPOSE. -# Copyright (C) 2002, 2003, 2005 Free Software Foundation, Inc. -# -# This file is free software; the Free Software Foundation -# gives unlimited permission to copy and/or distribute it, -# with or without modifications, as long as this notice is preserved. +# -*- Autoconf -*- +# Copyright (C) 2002, 2003 Free Software Foundation, Inc. +# Generated from amversion.in; do not edit by hand. + +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 2, or (at your option) +# any later version. + +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. + +# You should have received a copy of the GNU General Public License +# along with this program; if not, write to the Free Software +# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA # AM_AUTOMAKE_VERSION(VERSION) # ---------------------------- @@ -28,15 +40,26 @@ # Call AM_AUTOMAKE_VERSION so it can be traced. # This function is AC_REQUIREd by AC_INIT_AUTOMAKE. AC_DEFUN([AM_SET_CURRENT_AUTOMAKE_VERSION], - [AM_AUTOMAKE_VERSION([1.9.5])]) + [AM_AUTOMAKE_VERSION([1.9.3])]) -# AM_AUX_DIR_EXPAND -*- Autoconf -*- +# AM_AUX_DIR_EXPAND -# Copyright (C) 2001, 2003, 2005 Free Software Foundation, Inc. -# -# This file is free software; the Free Software Foundation -# gives unlimited permission to copy and/or distribute it, -# with or without modifications, as long as this notice is preserved. +# Copyright (C) 2001, 2003 Free Software Foundation, Inc. + +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 2, or (at your option) +# any later version. + +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. + +# You should have received a copy of the GNU General Public License +# along with this program; if not, write to the Free Software +# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA +# 02111-1307, USA. # For projects using AC_CONFIG_AUX_DIR([foo]), Autoconf sets # $ac_aux_dir to `$srcdir/foo'. In other projects, it is set to @@ -83,16 +106,26 @@ am_aux_dir=`cd $ac_aux_dir && pwd` ]) -# AM_CONDITIONAL -*- Autoconf -*- +# AM_CONDITIONAL -*- Autoconf -*- -# Copyright (C) 1997, 2000, 2001, 2003, 2004, 2005 -# Free Software Foundation, Inc. -# -# This file is free software; the Free Software Foundation -# gives unlimited permission to copy and/or distribute it, -# with or without modifications, as long as this notice is preserved. +# Copyright (C) 1997, 2000, 2001, 2003, 2004 Free Software Foundation, Inc. -# serial 7 +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 2, or (at your option) +# any later version. + +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. + +# You should have received a copy of the GNU General Public License +# along with this program; if not, write to the Free Software +# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA +# 02111-1307, USA. + +# serial 6 # AM_CONDITIONAL(NAME, SHELL-CONDITION) # ------------------------------------- @@ -116,15 +149,26 @@ Usually this means the macro was only invoked conditionally.]]) fi])]) +# serial 7 -*- Autoconf -*- -# Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005 +# Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004 # Free Software Foundation, Inc. -# -# This file is free software; the Free Software Foundation -# gives unlimited permission to copy and/or distribute it, -# with or without modifications, as long as this notice is preserved. -# serial 8 +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 2, or (at your option) +# any later version. + +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. + +# You should have received a copy of the GNU General Public License +# along with this program; if not, write to the Free Software +# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA +# 02111-1307, USA. + # There are a few dirty hacks below to avoid letting `AC_PROG_CC' be # written in clear, in which case automake, when reading aclocal.m4, @@ -133,6 +177,7 @@ # CC etc. in the Makefile, will ask for an AC_PROG_CC use... + # _AM_DEPENDENCIES(NAME) # ---------------------- # See how the compiler implements dependency checking. @@ -272,16 +317,27 @@ AC_SUBST([AMDEPBACKSLASH]) ]) -# Generate code to set up dependency tracking. -*- Autoconf -*- +# Generate code to set up dependency tracking. -*- Autoconf -*- -# Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005 -# Free Software Foundation, Inc. -# -# This file is free software; the Free Software Foundation -# gives unlimited permission to copy and/or distribute it, -# with or without modifications, as long as this notice is preserved. +# Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004 +# Free Software Foundation, Inc. -#serial 3 +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 2, or (at your option) +# any later version. + +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. + +# You should have received a copy of the GNU General Public License +# along with this program; if not, write to the Free Software +# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA +# 02111-1307, USA. + +#serial 2 # _AM_OUTPUT_DEPENDENCY_COMMANDS # ------------------------------ @@ -340,31 +396,54 @@ [AMDEP_TRUE="$AMDEP_TRUE" ac_aux_dir="$ac_aux_dir"]) ]) -# Copyright (C) 1996, 1997, 2000, 2001, 2003, 2005 -# Free Software Foundation, Inc. -# -# This file is free software; the Free Software Foundation -# gives unlimited permission to copy and/or distribute it, -# with or without modifications, as long as this notice is preserved. +# Like AC_CONFIG_HEADER, but automatically create stamp file. -*- Autoconf -*- -# serial 8 +# Copyright (C) 1996, 1997, 2000, 2001, 2003 Free Software Foundation, Inc. + +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 2, or (at your option) +# any later version. + +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. + +# You should have received a copy of the GNU General Public License +# along with this program; if not, write to the Free Software +# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA +# 02111-1307, USA. + +# serial 7 # AM_CONFIG_HEADER is obsolete. It has been replaced by AC_CONFIG_HEADERS. AU_DEFUN([AM_CONFIG_HEADER], [AC_CONFIG_HEADERS($@)]) -# Do all the work for Automake. -*- Autoconf -*- +# Do all the work for Automake. -*- Autoconf -*- -# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005 +# This macro actually does too much some checks are only needed if +# your package does certain things. But this isn't really a big deal. + +# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004 # Free Software Foundation, Inc. -# -# This file is free software; the Free Software Foundation -# gives unlimited permission to copy and/or distribute it, -# with or without modifications, as long as this notice is preserved. -# serial 12 +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 2, or (at your option) +# any later version. -# This macro actually does too much. Some checks are only needed if -# your package does certain things. But this isn't really a big deal. +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. + +# You should have received a copy of the GNU General Public License +# along with this program; if not, write to the Free Software +# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA +# 02111-1307, USA. + +# serial 11 # AM_INIT_AUTOMAKE(PACKAGE, VERSION, [NO-DEFINE]) # AM_INIT_AUTOMAKE([OPTIONS]) @@ -466,27 +545,51 @@ done echo "timestamp for $1" >`AS_DIRNAME([$1])`/stamp-h[]$_am_stamp_count]) -# Copyright (C) 2001, 2003, 2005 Free Software Foundation, Inc. -# -# This file is free software; the Free Software Foundation -# gives unlimited permission to copy and/or distribute it, -# with or without modifications, as long as this notice is preserved. - # AM_PROG_INSTALL_SH # ------------------ # Define $install_sh. + +# Copyright (C) 2001, 2003 Free Software Foundation, Inc. + +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 2, or (at your option) +# any later version. + +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. + +# You should have received a copy of the GNU General Public License +# along with this program; if not, write to the Free Software +# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA +# 02111-1307, USA. + AC_DEFUN([AM_PROG_INSTALL_SH], [AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl install_sh=${install_sh-"$am_aux_dir/install-sh"} AC_SUBST(install_sh)]) -# Copyright (C) 2003, 2005 Free Software Foundation, Inc. -# -# This file is free software; the Free Software Foundation -# gives unlimited permission to copy and/or distribute it, -# with or without modifications, as long as this notice is preserved. +# -*- Autoconf -*- +# Copyright (C) 2003 Free Software Foundation, Inc. -# serial 2 +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 2, or (at your option) +# any later version. + +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. + +# You should have received a copy of the GNU General Public License +# along with this program; if not, write to the Free Software +# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA +# 02111-1307, USA. + +# serial 1 # Check whether the underlying file-system supports filenames # with a leading dot. For instance MS-DOS doesn't. @@ -501,15 +604,26 @@ rmdir .tst 2>/dev/null AC_SUBST([am__leading_dot])]) -# Check to see how 'make' treats includes. -*- Autoconf -*- +# Check to see how 'make' treats includes. -*- Autoconf -*- -# Copyright (C) 2001, 2002, 2003, 2005 Free Software Foundation, Inc. -# -# This file is free software; the Free Software Foundation -# gives unlimited permission to copy and/or distribute it, -# with or without modifications, as long as this notice is preserved. +# Copyright (C) 2001, 2002, 2003 Free Software Foundation, Inc. -# serial 3 +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 2, or (at your option) +# any later version. + +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. + +# You should have received a copy of the GNU General Public License +# along with this program; if not, write to the Free Software +# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA +# 02111-1307, USA. + +# serial 2 # AM_MAKE_INCLUDE() # ----------------- @@ -553,16 +667,27 @@ rm -f confinc confmf ]) -# Fake the existence of programs that GNU maintainers use. -*- Autoconf -*- +# -*- Autoconf -*- -# Copyright (C) 1997, 1999, 2000, 2001, 2003, 2005 -# Free Software Foundation, Inc. -# -# This file is free software; the Free Software Foundation -# gives unlimited permission to copy and/or distribute it, -# with or without modifications, as long as this notice is preserved. -# serial 4 +# Copyright (C) 1997, 1999, 2000, 2001, 2003 Free Software Foundation, Inc. + +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 2, or (at your option) +# any later version. + +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. + +# You should have received a copy of the GNU General Public License +# along with this program; if not, write to the Free Software +# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA +# 02111-1307, USA. + +# serial 3 # AM_MISSING_PROG(NAME, PROGRAM) # ------------------------------ @@ -588,16 +713,27 @@ fi ]) -# Copyright (C) 2003, 2004, 2005 Free Software Foundation, Inc. -# -# This file is free software; the Free Software Foundation -# gives unlimited permission to copy and/or distribute it, -# with or without modifications, as long as this notice is preserved. - # AM_PROG_MKDIR_P # --------------- # Check whether `mkdir -p' is supported, fallback to mkinstalldirs otherwise. -# + +# Copyright (C) 2003, 2004 Free Software Foundation, Inc. + +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 2, or (at your option) +# any later version. + +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. + +# You should have received a copy of the GNU General Public License +# along with this program; if not, write to the Free Software +# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA +# 02111-1307, USA. + # Automake 1.8 used `mkdir -m 0755 -p --' to ensure that directories # created by `make install' are always world readable, even if the # installer happens to have an overly restrictive umask (e.g. 077). @@ -651,15 +787,26 @@ fi AC_SUBST([mkdir_p])]) -# Helper functions for option handling. -*- Autoconf -*- +# Helper functions for option handling. -*- Autoconf -*- -# Copyright (C) 2001, 2002, 2003, 2005 Free Software Foundation, Inc. -# -# This file is free software; the Free Software Foundation -# gives unlimited permission to copy and/or distribute it, -# with or without modifications, as long as this notice is preserved. +# Copyright (C) 2001, 2002, 2003 Free Software Foundation, Inc. -# serial 3 +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 2, or (at your option) +# any later version. + +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. + +# You should have received a copy of the GNU General Public License +# along with this program; if not, write to the Free Software +# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA +# 02111-1307, USA. + +# serial 2 # _AM_MANGLE_OPTION(NAME) # ----------------------- @@ -684,14 +831,26 @@ AC_DEFUN([_AM_IF_OPTION], [m4_ifset(_AM_MANGLE_OPTION([$1]), [$2], [$3])]) -# Copyright (C) 1996, 1997, 1998, 2000, 2001, 2002, 2003, 2005 + +# Copyright (C) 1996, 1997, 1998, 2000, 2001, 2002, 2003 # Free Software Foundation, Inc. -# -# This file is free software; the Free Software Foundation -# gives unlimited permission to copy and/or distribute it, -# with or without modifications, as long as this notice is preserved. -# serial 4 +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 2, or (at your option) +# any later version. + +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. + +# You should have received a copy of the GNU General Public License +# along with this program; if not, write to the Free Software +# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA +# 02111-1307, USA. + +# serial 3 AC_DEFUN([AM_C_PROTOTYPES], [AC_REQUIRE([AC_C_PROTOTYPES]) @@ -709,16 +868,28 @@ AU_DEFUN([fp_C_PROTOTYPES], [AM_C_PROTOTYPES]) -# Check to make sure that the build environment is sane. -*- Autoconf -*- - -# Copyright (C) 1996, 1997, 2000, 2001, 2003, 2005 -# Free Software Foundation, Inc. # -# This file is free software; the Free Software Foundation -# gives unlimited permission to copy and/or distribute it, -# with or without modifications, as long as this notice is preserved. +# Check to make sure that the build environment is sane. +# -# serial 4 +# Copyright (C) 1996, 1997, 2000, 2001, 2003 Free Software Foundation, Inc. + +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 2, or (at your option) +# any later version. + +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. + +# You should have received a copy of the GNU General Public License +# along with this program; if not, write to the Free Software +# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA +# 02111-1307, USA. + +# serial 3 # AM_SANITY_CHECK # --------------- @@ -761,14 +932,25 @@ fi AC_MSG_RESULT(yes)]) -# Copyright (C) 2001, 2003, 2005 Free Software Foundation, Inc. -# -# This file is free software; the Free Software Foundation -# gives unlimited permission to copy and/or distribute it, -# with or without modifications, as long as this notice is preserved. - # AM_PROG_INSTALL_STRIP -# --------------------- + +# Copyright (C) 2001, 2003 Free Software Foundation, Inc. + +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 2, or (at your option) +# any later version. + +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. + +# You should have received a copy of the GNU General Public License +# along with this program; if not, write to the Free Software +# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA +# 02111-1307, USA. + # One issue with vendor `install' (even GNU) is that you can't # specify the program used to strip binaries. This is especially # annoying in cross-compiling environments, where the build's strip @@ -791,13 +973,25 @@ # Check how to create a tarball. -*- Autoconf -*- -# Copyright (C) 2004, 2005 Free Software Foundation, Inc. -# -# This file is free software; the Free Software Foundation -# gives unlimited permission to copy and/or distribute it, -# with or without modifications, as long as this notice is preserved. +# Copyright (C) 2004 Free Software Foundation, Inc. + +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 2, or (at your option) +# any later version. + +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. + +# You should have received a copy of the GNU General Public License +# along with this program; if not, write to the Free Software +# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA +# 02111-1307, USA. + +# serial 1 -# serial 2 # _AM_PROG_TAR(FORMAT) # -------------------- Index: gettext.h =================================================================== RCS file: /cvsroot/abook/abook/gettext.h,v retrieving revision 1.2 retrieving revision 1.3 diff -u -d -r1.2 -r1.3 --- gettext.h 23 Sep 2005 15:42:11 -0000 1.2 +++ gettext.h 10 Apr 2006 08:15:46 -0000 1.3 @@ -1,15 +1,14 @@ #ifndef _GETTEXT_H #define _GETTEXT_H +const char *sgettext(const char *msgid); /* Strip context prefix */ + # if ENABLE_NLS # include <libintl.h> -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) |
From: Jaakko H. <jhe...@us...> - 2006-04-09 18:57:43
|
Update of /cvsroot/abook/abook In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv13503 Modified Files: Tag: ver_0_5_6 ChangeLog gettext.c gettext.h options.c ui.c ui.h Log Message: - fix localized keybindings with --disable-nls Index: ui.c =================================================================== RCS file: /cvsroot/abook/abook/ui.c,v retrieving revision 1.54 retrieving revision 1.54.4.1 diff -u -d -r1.54 -r1.54.4.1 --- ui.c 5 Oct 2005 11:03:36 -0000 1.54 +++ ui.c 9 Apr 2006 18:57:34 -0000 1.54.4.1 @@ -306,7 +306,7 @@ } 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 @@ } 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 @@ } char * -ask_filename(char *prompt) +ask_filename(const char *prompt) { char *buf = NULL; Index: ChangeLog =================================================================== RCS file: /cvsroot/abook/abook/ChangeLog,v retrieving revision 1.70.2.1.2.1 retrieving revision 1.70.2.1.2.2 diff -u -d -r1.70.2.1.2.1 -r1.70.2.1.2.2 --- ChangeLog 13 Mar 2006 20:04:48 -0000 1.70.2.1.2.1 +++ ChangeLog 9 Apr 2006 18:57:34 -0000 1.70.2.1.2.2 @@ -1,6 +1,7 @@ 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) Index: ui.h =================================================================== RCS file: /cvsroot/abook/abook/ui.h,v retrieving revision 1.14 retrieving revision 1.14.4.1 diff -u -d -r1.14 -r1.14.4.1 --- ui.h 26 Sep 2005 15:59:04 -0000 1.14 +++ ui.h 9 Apr 2006 18:57:34 -0000 1.14.4.1 @@ -15,13 +15,15 @@ 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(); Index: options.c =================================================================== RCS file: /cvsroot/abook/abook/options.c,v retrieving revision 1.27 retrieving revision 1.27.4.1 diff -u -d -r1.27 -r1.27.4.1 --- options.c 21 Sep 2005 16:50:31 -0000 1.27 +++ options.c 9 Apr 2006 18:57:34 -0000 1.27.4.1 @@ -226,7 +226,7 @@ } } -static char * +static const char * opt_set_set_option(char *var, char *p, struct option *opt) { int len; @@ -265,7 +265,7 @@ return NULL; } -static char * +static const char * opt_parse_set(buffer *b) { int i; @@ -288,7 +288,7 @@ #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 @@ 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 @@ opt_parse_line(char *line, int n, char *fn) { int i; - char *err = NULL; + const char *err = NULL; char *token; buffer b; Index: gettext.c =================================================================== RCS file: /cvsroot/abook/abook/gettext.c,v retrieving revision 1.1 retrieving revision 1.1.4.1 diff -u -d -r1.1 -r1.1.4.1 --- gettext.c 23 Sep 2005 21:34:39 -0000 1.1 +++ gettext.c 9 Apr 2006 18:57:34 -0000 1.1.4.1 @@ -2,18 +2,17 @@ # include "config.h" #endif -#ifdef ENABLE_NLS #include <string.h> #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 + Index: gettext.h =================================================================== RCS file: /cvsroot/abook/abook/gettext.h,v retrieving revision 1.2 retrieving revision 1.2.4.1 diff -u -d -r1.2 -r1.2.4.1 --- gettext.h 23 Sep 2005 15:42:11 -0000 1.2 +++ gettext.h 9 Apr 2006 18:57:34 -0000 1.2.4.1 @@ -1,15 +1,14 @@ #ifndef _GETTEXT_H #define _GETTEXT_H +const char *sgettext(const char *msgid); /* Strip context prefix */ + # if ENABLE_NLS # include <libintl.h> -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) |
From: Jaakko H. <jhe...@us...> - 2006-03-14 15:06:14
|
Update of /cvsroot/abook/abook In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv3188 Modified Files: ChangeLog filter.c Log Message: - gnomecard filter fix from branch Index: ChangeLog =================================================================== RCS file: /cvsroot/abook/abook/ChangeLog,v retrieving revision 1.70 retrieving revision 1.71 diff -u -d -r1.70 -r1.71 --- ChangeLog 26 Oct 2005 16:50:42 -0000 1.70 +++ ChangeLog 14 Mar 2006 15:06:10 -0000 1.71 @@ -1,4 +1,5 @@ 0.5.5 + - fixed gcrd export format (Marc Tardif) - i18n support (Cedric Duval) - French translation (Cedric Duval) - Swedish translation (Susanna Björverud) Index: filter.c =================================================================== RCS file: /cvsroot/abook/abook/filter.c,v retrieving revision 1.50 retrieving revision 1.51 diff -u -d -r1.50 -r1.51 --- filter.c 26 Oct 2005 19:29:16 -0000 1.50 +++ filter.c 14 Mar 2006 15:06:10 -0000 1.51 @@ -1503,7 +1503,7 @@ abook_list *emails, *em; db_enumerate_items(e) { - fprintf(out, "BEGIN:VCARD\nFN:%s\n", + fprintf(out, "BEGIN:VCARD\r\nFN:%s\r\n", safe_str(db_name_get(e.item))); name = get_surname(db_name_get(e.item)); @@ -1511,7 +1511,7 @@ if((db_name_get(e.item))[j] == ' ') break; } - fprintf(out, "N:%s;%.*s\n", + fprintf(out, "N:%s;%.*s\r\n", safe_str(name), j, safe_str(db_name_get(e.item)) @@ -1520,7 +1520,7 @@ free(name); if(db_fget(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(db_fget(e.item, ADDRESS)), safe_str(db_fget(e.item, ADDRESS2)), safe_str(db_fget(e.item, CITY)), @@ -1530,35 +1530,35 @@ ); if(db_fget(e.item, PHONE)) - fprintf(out, "TEL;HOME:%s\n", + fprintf(out, "TEL;HOME:%s\r\n", db_fget(e.item, PHONE)); if(db_fget(e.item, WORKPHONE)) - fprintf(out, "TEL;WORK:%s\n", + fprintf(out, "TEL;WORK:%s\r\n", db_fget(e.item, WORKPHONE)); if(db_fget(e.item, FAX)) - fprintf(out, "TEL;FAX:%s\n", + fprintf(out, "TEL;FAX:%s\r\n", db_fget(e.item, FAX)); if(db_fget(e.item, MOBILEPHONE)) - fprintf(out, "TEL;CELL:%s\n", + fprintf(out, "TEL;CELL:%s\r\n", db_fget(e.item, MOBILEPHONE)); if(*db_email_get(e.item)) { emails = csv_to_abook_list(db_email_get(e.item)); for(em = emails; em; em = em->next) - fprintf(out, "EMAIL;INTERNET:%s\n", em->data); + fprintf(out, "EMAIL;INTERNET:%s\r\n", em->data); abook_list_free(&emails); } if(db_fget(e.item, NOTES)) - fprintf(out, "NOTE:%s\n", + fprintf(out, "NOTE:%s\r\n", db_fget(e.item, NOTES)); if(db_fget(e.item, URL)) - fprintf(out, "URL:%s\n", + fprintf(out, "URL:%s\r\n", db_fget(e.item, URL)); - fprintf(out, "END:VCARD\n\n"); + fprintf(out, "END:VCARD\r\n\r\n"); } |
From: Jaakko H. <jhe...@us...> - 2006-03-13 20:05:05
|
Update of /cvsroot/abook/abook In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv26020 Modified Files: Tag: ver_0_5_6 ChangeLog filter.c Log Message: - fixed gcrd export format (\r\n line endings according to RFC, Marc Tardif) Index: ChangeLog =================================================================== RCS file: /cvsroot/abook/abook/ChangeLog,v retrieving revision 1.70.2.1 retrieving revision 1.70.2.1.2.1 diff -u -d -r1.70.2.1 -r1.70.2.1.2.1 --- ChangeLog 27 Oct 2005 18:43:59 -0000 1.70.2.1 +++ ChangeLog 13 Mar 2006 20:04:48 -0000 1.70.2.1.2.1 @@ -1,3 +1,7 @@ +0.5.6 + - translation fixes + - fixed gcrd export format (\r\n line endings according to RFC, Marc Tardif) + 0.5.5 - i18n support (Cedric Duval) - French translation (Cedric Duval) Index: filter.c =================================================================== RCS file: /cvsroot/abook/abook/filter.c,v retrieving revision 1.48.2.1 retrieving revision 1.48.2.1.2.1 diff -u -d -r1.48.2.1 -r1.48.2.1.2.1 --- filter.c 26 Oct 2005 19:45:23 -0000 1.48.2.1 +++ filter.c 13 Mar 2006 20:04:48 -0000 1.48.2.1.2.1 @@ -1510,7 +1510,7 @@ 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 +1518,7 @@ 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 +1527,7 @@ 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 +1537,32 @@ ); 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"); } |
From: Jaakko H. <jhe...@us...> - 2006-02-23 13:39:25
|
Update of /cvsroot/abook/abook In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv16712 Modified Files: Tag: ver_0_5_5 BUGS Log Message: - problem with pine import filter & commas in e-mail addresses Index: BUGS =================================================================== RCS file: /cvsroot/abook/abook/BUGS,v retrieving revision 1.16 retrieving revision 1.16.2.1 diff -u -d -r1.16 -r1.16.2.1 --- BUGS 29 Aug 2005 10:02:50 -0000 1.16 +++ BUGS 23 Feb 2006 13:39:13 -0000 1.16.2.1 @@ -17,6 +17,20 @@ * file format is not tolerant for character set changes +-- +[25] +name=Lastname, Firstname +email="Lastname, Firstname" <fir...@ex...> + +but the command "abook --mutt-query lastname" returns two email addresses + +"Lastname Lastname, Firstname +Firstname" <fir...@ex...> 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 |
From: Jaakko H. <jhe...@us...> - 2005-12-06 17:59:42
|
Update of /cvsroot/abook/abook/po In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv22568/po Modified Files: Tag: ver_0_5_5 fr.po Log Message: - fix "surname sort" keybinding in fr.po Index: fr.po =================================================================== RCS file: /cvsroot/abook/abook/po/fr.po,v retrieving revision 1.9.2.3 retrieving revision 1.9.2.4 diff -u -d -r1.9.2.3 -r1.9.2.4 --- fr.po 6 Dec 2005 10:33:14 -0000 1.9.2.3 +++ fr.po 6 Dec 2005 17:59:31 -0000 1.9.2.4 @@ -563,7 +563,7 @@ #: 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" |
From: Jaakko H. <jhe...@us...> - 2005-12-06 10:33:26
|
Update of /cvsroot/abook/abook/po In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv14232/po Modified Files: Tag: ver_0_5_5 abook.pot de.po fr.po ja.po sv.po Log Message: - correct keybinding for "view UTL with web browser" in help Index: sv.po =================================================================== RCS file: /cvsroot/abook/abook/po/sv.po,v retrieving revision 1.9.2.2 retrieving revision 1.9.2.3 diff -u -d -r1.9.2.2 -r1.9.2.3 --- sv.po 27 Oct 2005 18:44:00 -0000 1.9.2.2 +++ sv.po 6 Dec 2005 10:33:14 -0000 1.9.2.3 @@ -7,7 +7,7 @@ msgstr "" "Project-Id-Version: abook 0.5.4\n" "Report-Msgid-Bugs-To: <ced...@fr...>\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 <sus...@te...>\n" "Language-Team: none\n" @@ -588,8 +588,8 @@ 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" Index: fr.po =================================================================== RCS file: /cvsroot/abook/abook/po/fr.po,v retrieving revision 1.9.2.2 retrieving revision 1.9.2.3 diff -u -d -r1.9.2.2 -r1.9.2.3 --- fr.po 27 Oct 2005 18:44:00 -0000 1.9.2.2 +++ fr.po 6 Dec 2005 10:33:14 -0000 1.9.2.3 @@ -7,7 +7,7 @@ msgstr "" "Project-Id-Version: abook\n" "Report-Msgid-Bugs-To: <ced...@fr...>\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 <ced...@fr...>\n" "Language-Team: french\n" @@ -592,8 +592,8 @@ 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" Index: de.po =================================================================== RCS file: /cvsroot/abook/abook/po/de.po,v retrieving revision 1.2.2.2 retrieving revision 1.2.2.3 diff -u -d -r1.2.2.2 -r1.2.2.3 --- de.po 27 Oct 2005 18:44:00 -0000 1.2.2.2 +++ de.po 6 Dec 2005 10:33:14 -0000 1.2.2.3 @@ -7,7 +7,7 @@ msgstr "" "Project-Id-Version: abook 0.5.5pre1\n" "Report-Msgid-Bugs-To: <ced...@fr...>\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 <ja...@mo...>\n" "Language-Team: German <de...@li...>\n" @@ -599,8 +599,8 @@ 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" Index: abook.pot =================================================================== RCS file: /cvsroot/abook/abook/po/abook.pot,v retrieving revision 1.10.2.2 retrieving revision 1.10.2.3 diff -u -d -r1.10.2.2 -r1.10.2.3 --- abook.pot 27 Oct 2005 18:44:00 -0000 1.10.2.2 +++ abook.pot 6 Dec 2005 10:33:14 -0000 1.10.2.3 @@ -8,7 +8,7 @@ msgstr "" "Project-Id-Version: PACKAGE VERSION\n" "Report-Msgid-Bugs-To: <ced...@fr...>\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 <EMAIL@ADDRESS>\n" "Language-Team: LANGUAGE <LL...@li...>\n" @@ -574,7 +574,7 @@ 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 Index: ja.po =================================================================== RCS file: /cvsroot/abook/abook/po/ja.po,v retrieving revision 1.1.2.2 retrieving revision 1.1.2.3 diff -u -d -r1.1.2.2 -r1.1.2.3 --- ja.po 27 Oct 2005 18:44:00 -0000 1.1.2.2 +++ ja.po 6 Dec 2005 10:33:14 -0000 1.1.2.3 @@ -5,7 +5,7 @@ msgstr "" "Project-Id-Version: 0.5.5\n" "Report-Msgid-Bugs-To: <ced...@fr...>\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 <tt...@la...>\n" "Language-Team: japanese\n" @@ -583,8 +583,8 @@ 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" |
From: Jaakko H. <jhe...@us...> - 2005-12-06 10:33:26
|
Update of /cvsroot/abook/abook In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv14232 Modified Files: Tag: ver_0_5_5 help.h Log Message: - correct keybinding for "view UTL with web browser" in help Index: help.h =================================================================== RCS file: /cvsroot/abook/abook/help.h,v retrieving revision 1.13 retrieving revision 1.13.2.1 diff -u -d -r1.13 -r1.13.2.1 --- help.h 21 Sep 2005 16:50:31 -0000 1.13 +++ help.h 6 Dec 2005 10:33:14 -0000 1.13.2.1 @@ -44,7 +44,7 @@ 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 }; |
From: Jaakko H. <jhe...@us...> - 2005-12-02 12:44:18
|
Update of /cvsroot/abook/abook In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv5764 Modified Files: Tag: ver_0_5_5 configure configure.in Log Message: - 0.5.5 Index: configure =================================================================== RCS file: /cvsroot/abook/abook/configure,v retrieving revision 1.47.2.1 retrieving revision 1.47.2.2 diff -u -d -r1.47.2.1 -r1.47.2.2 --- configure 26 Oct 2005 19:45:23 -0000 1.47.2.1 +++ configure 2 Dec 2005 12:44:08 -0000 1.47.2.2 @@ -1622,7 +1622,7 @@ # Define the identity of the package. PACKAGE=abook - VERSION=0.5.5pre2 + VERSION=0.5.5 cat >>confdefs.h <<_ACEOF Index: configure.in =================================================================== RCS file: /cvsroot/abook/abook/configure.in,v retrieving revision 1.50.2.1 retrieving revision 1.50.2.2 diff -u -d -r1.50.2.1 -r1.50.2.2 --- configure.in 26 Oct 2005 19:45:23 -0000 1.50.2.1 +++ configure.in 2 Dec 2005 12:44:08 -0000 1.50.2.2 @@ -1,7 +1,7 @@ dnl abook configure.in AC_INIT(abook.c) -AM_INIT_AUTOMAKE(abook, 0.5.5pre2) +AM_INIT_AUTOMAKE(abook, 0.5.5) AM_CONFIG_HEADER(config.h) dnl --------------- |
From: Cedric D. <cd...@us...> - 2005-10-31 06:30:33
|
Update of /cvsroot/abook/abook In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv27649 Modified Files: database.c Log Message: Fixed erroneous boundary. Index: database.c =================================================================== RCS file: /cvsroot/abook/abook/database.c,v retrieving revision 1.33 retrieving revision 1.34 diff -u -d -r1.33 -r1.34 --- database.c 31 Oct 2005 06:24:13 -0000 1.33 +++ database.c 31 Oct 2005 06:30:24 -0000 1.34 @@ -203,7 +203,7 @@ if(!database) return; - for(i = 0; i < fields_count; i++) + for(i = 0; i < items; i++) if(database[i]) { database[i] = xrealloc(database[i], ITEM_SIZE); database[i][fields_count - 1] = NULL; |
From: Cedric D. <cd...@us...> - 2005-10-31 06:24:21
|
Update of /cvsroot/abook/abook In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv26202 Modified Files: database.c Log Message: Fixed dangling pointers in database items after xrealloc'ing. Index: database.c =================================================================== RCS file: /cvsroot/abook/abook/database.c,v retrieving revision 1.32 retrieving revision 1.33 diff -u -d -r1.32 -r1.33 --- database.c 26 Oct 2005 19:29:16 -0000 1.32 +++ database.c 31 Oct 2005 06:24:13 -0000 1.33 @@ -204,8 +204,10 @@ return; for(i = 0; i < fields_count; i++) - if(database[i]) + if(database[i]) { database[i] = xrealloc(database[i], ITEM_SIZE); + database[i][fields_count - 1] = NULL; + } } /* |
From: Jaakko H. <jhe...@us...> - 2005-10-27 18:44:11
|
Update of /cvsroot/abook/abook In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv5677 Modified Files: Tag: ver_0_5_5 ChangeLog Log Message: - 0.5.5pre2 Index: ChangeLog =================================================================== RCS file: /cvsroot/abook/abook/ChangeLog,v retrieving revision 1.70 retrieving revision 1.70.2.1 diff -u -d -r1.70 -r1.70.2.1 --- ChangeLog 26 Oct 2005 16:50:42 -0000 1.70 +++ ChangeLog 27 Oct 2005 18:43:59 -0000 1.70.2.1 @@ -2,6 +2,7 @@ - i18n support (Cedric Duval) - French translation (Cedric Duval) - Swedish translation (Susanna Björverud) + - Japanese translation (Takahashi Tamotsu) - palmcsv import filter (Marc Tardif) - use better common code for csv filters (Marc Tardif) - translation HOWTO (Cedric Duval) |
From: Jaakko H. <jhe...@us...> - 2005-10-27 18:44:11
|
Update of /cvsroot/abook/abook/po In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv5677/po Modified Files: Tag: ver_0_5_5 abook.pot de.po fr.po ja.po sv.po Log Message: - 0.5.5pre2 Index: sv.po =================================================================== RCS file: /cvsroot/abook/abook/po/sv.po,v retrieving revision 1.9.2.1 retrieving revision 1.9.2.2 diff -u -d -r1.9.2.1 -r1.9.2.2 --- sv.po 26 Oct 2005 19:45:23 -0000 1.9.2.1 +++ sv.po 27 Oct 2005 18:44:00 -0000 1.9.2.2 @@ -7,7 +7,7 @@ msgstr "" "Project-Id-Version: abook 0.5.4\n" "Report-Msgid-Bugs-To: <ced...@fr...>\n" -"POT-Creation-Date: 2005-10-25 11:03+0300\n" +"POT-Creation-Date: 2005-10-27 17:07+0300\n" "PO-Revision-Date: 2005-09-23 22:13+0200\n" "Last-Translator: Susanna Björverud <sus...@te...>\n" "Language-Team: none\n" @@ -330,7 +330,7 @@ msgid "Custom5" msgstr "Egen5" -#: database.c:406 +#: database.c:424 msgid "Invalid field value defined in configuration" msgstr "Ogiltigt fältvärde i konfigurationen" Index: fr.po =================================================================== RCS file: /cvsroot/abook/abook/po/fr.po,v retrieving revision 1.9.2.1 retrieving revision 1.9.2.2 diff -u -d -r1.9.2.1 -r1.9.2.2 --- fr.po 26 Oct 2005 19:45:23 -0000 1.9.2.1 +++ fr.po 27 Oct 2005 18:44:00 -0000 1.9.2.2 @@ -7,7 +7,7 @@ msgstr "" "Project-Id-Version: abook\n" "Report-Msgid-Bugs-To: <ced...@fr...>\n" -"POT-Creation-Date: 2005-10-25 11:03+0300\n" +"POT-Creation-Date: 2005-10-27 17:07+0300\n" "PO-Revision-Date: 2005-10-03 10:53+0200\n" "Last-Translator: Cedric Duval <ced...@fr...>\n" "Language-Team: french\n" @@ -330,7 +330,7 @@ msgid "Custom5" msgstr "Personnalisé5" -#: database.c:406 +#: database.c:424 msgid "Invalid field value defined in configuration" msgstr "Valeur de champ invalide définie dans la configuration" Index: de.po =================================================================== RCS file: /cvsroot/abook/abook/po/de.po,v retrieving revision 1.2.2.1 retrieving revision 1.2.2.2 diff -u -d -r1.2.2.1 -r1.2.2.2 --- de.po 26 Oct 2005 19:45:23 -0000 1.2.2.1 +++ de.po 27 Oct 2005 18:44:00 -0000 1.2.2.2 @@ -7,7 +7,7 @@ msgstr "" "Project-Id-Version: abook 0.5.5pre1\n" "Report-Msgid-Bugs-To: <ced...@fr...>\n" -"POT-Creation-Date: 2005-10-25 11:03+0300\n" +"POT-Creation-Date: 2005-10-27 17:07+0300\n" "PO-Revision-Date: 2005-10-03 00:56+0200\n" "Last-Translator: Johannes WeiÃl <ja...@mo...>\n" "Language-Team: German <de...@li...>\n" @@ -335,7 +335,7 @@ msgid "Custom5" msgstr "Benutzer5" -#: database.c:406 +#: database.c:424 msgid "Invalid field value defined in configuration" msgstr "Ungültiger Feld-Wert in der Konfiguration festgelegt" Index: abook.pot =================================================================== RCS file: /cvsroot/abook/abook/po/abook.pot,v retrieving revision 1.10.2.1 retrieving revision 1.10.2.2 diff -u -d -r1.10.2.1 -r1.10.2.2 --- abook.pot 26 Oct 2005 19:45:23 -0000 1.10.2.1 +++ abook.pot 27 Oct 2005 18:44:00 -0000 1.10.2.2 @@ -8,7 +8,7 @@ msgstr "" "Project-Id-Version: PACKAGE VERSION\n" "Report-Msgid-Bugs-To: <ced...@fr...>\n" -"POT-Creation-Date: 2005-10-25 11:03+0300\n" +"POT-Creation-Date: 2005-10-27 17:07+0300\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME <EMAIL@ADDRESS>\n" "Language-Team: LANGUAGE <LL...@li...>\n" @@ -317,7 +317,7 @@ msgid "Custom5" msgstr "" -#: database.c:406 +#: database.c:424 msgid "Invalid field value defined in configuration" msgstr "" Index: ja.po =================================================================== RCS file: /cvsroot/abook/abook/po/ja.po,v retrieving revision 1.1.2.1 retrieving revision 1.1.2.2 diff -u -d -r1.1.2.1 -r1.1.2.2 --- ja.po 26 Oct 2005 19:45:23 -0000 1.1.2.1 +++ ja.po 27 Oct 2005 18:44:00 -0000 1.1.2.2 @@ -5,7 +5,7 @@ msgstr "" "Project-Id-Version: 0.5.5\n" "Report-Msgid-Bugs-To: <ced...@fr...>\n" -"POT-Creation-Date: 2005-10-25 11:03+0300\n" +"POT-Creation-Date: 2005-10-27 17:07+0300\n" "PO-Revision-Date: 2005-10-18 18:10+0200\n" "Last-Translator: TAKAHASHI Tamotsu <tt...@la...>\n" "Language-Team: japanese\n" @@ -326,7 +326,7 @@ msgid "Custom5" msgstr "³ÈÄ¥¾ðÊó5" -#: database.c:406 +#: database.c:424 msgid "Invalid field value defined in configuration" msgstr "ÉÔÀµ¤Ê¹àÌÜ̾¤¬ÀßÄꤵ¤ì¤Æ¤¤¤Þ¤¹" |
From: Jaakko H. <jhe...@us...> - 2005-10-26 19:45:32
|
Update of /cvsroot/abook/abook/po In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv11950/po Modified Files: Tag: ver_0_5_5 abook.pot de.po fr.po ja.po sv.po Log Message: - branch 0.5.5 Index: sv.po =================================================================== RCS file: /cvsroot/abook/abook/po/sv.po,v retrieving revision 1.9 retrieving revision 1.9.2.1 diff -u -d -r1.9 -r1.9.2.1 --- sv.po 18 Oct 2005 06:51:14 -0000 1.9 +++ sv.po 26 Oct 2005 19:45:23 -0000 1.9.2.1 @@ -7,7 +7,7 @@ msgstr "" "Project-Id-Version: abook 0.5.4\n" "Report-Msgid-Bugs-To: <ced...@fr...>\n" -"POT-Creation-Date: 2005-10-17 13:34+0300\n" +"POT-Creation-Date: 2005-10-25 11:03+0300\n" "PO-Revision-Date: 2005-09-23 22:13+0200\n" "Last-Translator: Susanna Björverud <sus...@te...>\n" "Language-Team: none\n" @@ -358,7 +358,7 @@ msgid "Tab name too wide for screen" msgstr "Flikrubrik för bred för skärmen" -#: edit.c:219 +#: edit.c:224 msgid "E-mail addresses:" msgstr "Ebrevsadresser:" Index: fr.po =================================================================== RCS file: /cvsroot/abook/abook/po/fr.po,v retrieving revision 1.9 retrieving revision 1.9.2.1 diff -u -d -r1.9 -r1.9.2.1 --- fr.po 18 Oct 2005 06:51:14 -0000 1.9 +++ fr.po 26 Oct 2005 19:45:23 -0000 1.9.2.1 @@ -7,7 +7,7 @@ msgstr "" "Project-Id-Version: abook\n" "Report-Msgid-Bugs-To: <ced...@fr...>\n" -"POT-Creation-Date: 2005-10-17 13:34+0300\n" +"POT-Creation-Date: 2005-10-25 11:03+0300\n" "PO-Revision-Date: 2005-10-03 10:53+0200\n" "Last-Translator: Cedric Duval <ced...@fr...>\n" "Language-Team: french\n" @@ -359,7 +359,7 @@ msgid "Tab name too wide for screen" msgstr "Intitulé de \"tab\" trop large pour l'écran" -#: edit.c:219 +#: edit.c:224 msgid "E-mail addresses:" msgstr "Adresses email:" Index: de.po =================================================================== RCS file: /cvsroot/abook/abook/po/de.po,v retrieving revision 1.2 retrieving revision 1.2.2.1 diff -u -d -r1.2 -r1.2.2.1 --- de.po 18 Oct 2005 06:51:14 -0000 1.2 +++ de.po 26 Oct 2005 19:45:23 -0000 1.2.2.1 @@ -7,7 +7,7 @@ msgstr "" "Project-Id-Version: abook 0.5.5pre1\n" "Report-Msgid-Bugs-To: <ced...@fr...>\n" -"POT-Creation-Date: 2005-10-17 13:34+0300\n" +"POT-Creation-Date: 2005-10-25 11:03+0300\n" "PO-Revision-Date: 2005-10-03 00:56+0200\n" "Last-Translator: Johannes WeiÃl <ja...@mo...>\n" "Language-Team: German <de...@li...>\n" @@ -363,7 +363,7 @@ msgid "Tab name too wide for screen" msgstr "Kartei-Name zu breit für den Bildschirm" -#: edit.c:219 +#: edit.c:224 msgid "E-mail addresses:" msgstr "E-Mail-Adressen:" Index: abook.pot =================================================================== RCS file: /cvsroot/abook/abook/po/abook.pot,v retrieving revision 1.10 retrieving revision 1.10.2.1 diff -u -d -r1.10 -r1.10.2.1 --- abook.pot 18 Oct 2005 06:51:14 -0000 1.10 +++ abook.pot 26 Oct 2005 19:45:23 -0000 1.10.2.1 @@ -8,7 +8,7 @@ msgstr "" "Project-Id-Version: PACKAGE VERSION\n" "Report-Msgid-Bugs-To: <ced...@fr...>\n" -"POT-Creation-Date: 2005-10-17 13:34+0300\n" +"POT-Creation-Date: 2005-10-25 11:03+0300\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME <EMAIL@ADDRESS>\n" "Language-Team: LANGUAGE <LL...@li...>\n" @@ -345,7 +345,7 @@ msgid "Tab name too wide for screen" msgstr "" -#: edit.c:219 +#: edit.c:224 msgid "E-mail addresses:" msgstr "" Index: ja.po =================================================================== RCS file: /cvsroot/abook/abook/po/ja.po,v retrieving revision 1.1 retrieving revision 1.1.2.1 diff -u -d -r1.1 -r1.1.2.1 --- ja.po 18 Oct 2005 16:14:48 -0000 1.1 +++ ja.po 26 Oct 2005 19:45:23 -0000 1.1.2.1 @@ -5,7 +5,7 @@ msgstr "" "Project-Id-Version: 0.5.5\n" "Report-Msgid-Bugs-To: <ced...@fr...>\n" -"POT-Creation-Date: 2005-10-17 13:34+0300\n" +"POT-Creation-Date: 2005-10-25 11:03+0300\n" "PO-Revision-Date: 2005-10-18 18:10+0200\n" "Last-Translator: TAKAHASHI Tamotsu <tt...@la...>\n" "Language-Team: japanese\n" @@ -60,7 +60,9 @@ msgid "" "Cannot combine options --mutt-query, --convert, --add-email or --add-email-" "quiet\n" -msgstr "¼¡¤Î¥ª¥×¥·¥ç¥ó¤òƱ»þ¤ËÊ£¿ô»ÈÍѤ¹¤ë¤³¤È¤Ï¤Ç¤¤Þ¤»¤ó: --mutt-query, --convert, --add-email, --add-email-quiet\n" +msgstr "" +"¼¡¤Î¥ª¥×¥·¥ç¥ó¤òƱ»þ¤ËÊ£¿ô»ÈÍѤ¹¤ë¤³¤È¤Ï¤Ç¤¤Þ¤»¤ó: --mutt-query, --convert, " +"--add-email, --add-email-quiet\n" #: abook.c:280 #, c-format @@ -78,18 +80,18 @@ #: abook.c:402 msgid " -C\t--config\t<file>\t\tuse an alternative configuration file" -msgstr " -C\t--config\t<¥Õ¥¡¥¤¥ë>\t\tÄ̾ï¤Î¾ì½ê°Ê³°¤Ë¤¢¤ëÀßÄê¥Õ¥¡¥¤¥ë¤ò»È¤¦" - +msgstr "" +" -C\t--config\t<¥Õ¥¡¥¤¥ë>\t\tÄ̾ï¤Î¾ì½ê°Ê³°¤Ë¤¢¤ëÀßÄê¥Õ¥¡¥¤¥ë¤ò»È¤¦" #: abook.c:403 msgid "\t--datafile\t<file>\t\tuse an alternative addressbook file" -msgstr "\t--datafile\t<¥Õ¥¡¥¤¥ë>\t\tÄ̾ï¤Î¾ì½ê°Ê³°¤Ë¤¢¤ë¥¢¥É¥ì¥¹Ä¢¥Õ¥¡¥¤¥ë¤ò»È¤¦" +msgstr "" +"\t--datafile\t<¥Õ¥¡¥¤¥ë>\t\tÄ̾ï¤Î¾ì½ê°Ê³°¤Ë¤¢¤ë¥¢¥É¥ì¥¹Ä¢¥Õ¥¡¥¤¥ë¤ò»È¤¦" #: abook.c:404 msgid "\t--mutt-query\t<string>\tmake a query for mutt" msgstr "\t--mutt-query\t<ʸ»úÎó>\tÌ䤤¹ç¤ï¤»¤ËÂФ·¤Æ mutt ÍѤËÀ°·Á½ÐÎϤ¹¤ë" - #: abook.c:405 msgid "" "\t--add-email\t\t\tread an e-mail message from stdin and\n" @@ -170,7 +172,8 @@ msgid "" "input and output formats are the same\n" "exiting...\n" -msgstr "ÆþÎϤȽÐÎϤηÁ¼°¤¬Æ±¤¸¤Ç¤¹\n" +msgstr "" +"ÆþÎϤȽÐÎϤηÁ¼°¤¬Æ±¤¸¤Ç¤¹\n" "½ªÎ»¤·¤Þ¤¹\n" #: abook.c:639 @@ -217,7 +220,8 @@ msgid "" "cannot open /dev/tty\n" "you may want to use --add-email-quiet\n" -msgstr "/dev/tty ¤¬³«¤±¤Þ¤»¤ó\n" +msgstr "" +"/dev/tty ¤¬³«¤±¤Þ¤»¤ó\n" "--add-email-quiet ¤ò¤´ÍøÍѤˤʤä¿Êý¤¬Îɤ¤¤«¤â¤·¤ì¤Þ¤»¤ó\n" #: abook.c:740 @@ -350,7 +354,7 @@ msgid "Tab name too wide for screen" msgstr "¥¿¥Ö̾¤¬²èÌ̤«¤é¤Ï¤ß½Ð¤Þ¤¹" -#: edit.c:219 +#: edit.c:224 msgid "E-mail addresses:" msgstr "¥á¡¼¥ë¥¢¥É¥ì¥¹: " @@ -701,4 +705,5 @@ #: ui.c:679 msgid "Sorry, the specified file appears not to be a valid abook addressbook" -msgstr "¿½¤·Ìõ¤¢¤ê¤Þ¤»¤ó¤¬¡¢¤´»ØÄê¤Î¥Õ¥¡¥¤¥ë¤ÏÀµµ¬¤Î abook ¥¢¥É¥ì¥¹Ä¢¤Ç¤Ï¤Ê¤¤¤è¤¦¤Ç¤¹" +msgstr "" +"¿½¤·Ìõ¤¢¤ê¤Þ¤»¤ó¤¬¡¢¤´»ØÄê¤Î¥Õ¥¡¥¤¥ë¤ÏÀµµ¬¤Î abook ¥¢¥É¥ì¥¹Ä¢¤Ç¤Ï¤Ê¤¤¤è¤¦¤Ç¤¹" |
From: Jaakko H. <jhe...@us...> - 2005-10-26 19:45:32
|
Update of /cvsroot/abook/abook In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv11950 Modified Files: Tag: ver_0_5_5 AUTHORS Makefile.in configure configure.in database.c filter.c Log Message: - branch 0.5.5 Index: configure.in =================================================================== RCS file: /cvsroot/abook/abook/configure.in,v retrieving revision 1.50 retrieving revision 1.50.2.1 diff -u -d -r1.50 -r1.50.2.1 --- configure.in 22 Oct 2005 19:55:21 -0000 1.50 +++ configure.in 26 Oct 2005 19:45:23 -0000 1.50.2.1 @@ -1,7 +1,7 @@ dnl abook configure.in AC_INIT(abook.c) -AM_INIT_AUTOMAKE(abook, 0.5.5pre1) +AM_INIT_AUTOMAKE(abook, 0.5.5pre2) AM_CONFIG_HEADER(config.h) dnl --------------- Index: filter.c =================================================================== RCS file: /cvsroot/abook/abook/filter.c,v retrieving revision 1.48 retrieving revision 1.48.2.1 diff -u -d -r1.48 -r1.48.2.1 --- filter.c 5 Oct 2005 11:03:36 -0000 1.48 +++ filter.c 26 Oct 2005 19:45:23 -0000 1.48.2.1 @@ -826,7 +826,7 @@ * html export filter */ -static void html_export_write_head(FILE *out, int extra_column); +static void html_export_write_head(FILE *out, int extra); static void html_export_write_tail(FILE *out); extern int extra_column; @@ -835,14 +835,15 @@ html_export_database(FILE *out, struct db_enumerator e) { char tmp[MAX_EMAILSTR_LEN]; + int extra; if(items < 1) return 2; - extra_column = (extra_column > 2 && extra_column < ITEM_FIELDS) ? + extra = (extra_column > 2 && extra_column < ITEM_FIELDS) ? extra_column : PHONE; - html_export_write_head(out, extra_column); + html_export_write_head(out, extra); db_enumerate_items(e) { get_first_email(tmp, e.item); @@ -856,7 +857,7 @@ fprintf(out, "<td>%s\n<td>%s\n", database[e.item][EMAIL], - safe_str(database[e.item][extra_column]) ); + safe_str(database[e.item][extra]) ); fprintf(out, "</tr>\n\n"); } @@ -867,7 +868,7 @@ static void -html_export_write_head(FILE *out, int extra_column) +html_export_write_head(FILE *out, int extra) { char *realname = get_real_name(); @@ -879,7 +880,7 @@ fprintf(out, "<table border=\"1\" align=\"center\">\n"); fprintf(out, "\n<tr><th>Name<th>E-mail address(es)<th>%s</tr>\n\n", - abook_fields[extra_column].name); + abook_fields[extra].name); free(realname); } Index: Makefile.in =================================================================== RCS file: /cvsroot/abook/abook/Makefile.in,v retrieving revision 1.21 retrieving revision 1.21.2.1 diff -u -d -r1.21 -r1.21.2.1 --- Makefile.in 30 Sep 2005 16:30:03 -0000 1.21 +++ Makefile.in 26 Oct 2005 19:45:23 -0000 1.21.2.1 @@ -79,7 +79,7 @@ getopt1.$(OBJEXT) gettext.$(OBJEXT) abook_rl.$(OBJEXT) \ mbswidth.$(OBJEXT) xmalloc.$(OBJEXT) abook_OBJECTS = $(am_abook_OBJECTS) -abook_LDADD = $(LDADD) +abook_DEPENDENCIES = DEFAULT_INCLUDES = -I. -I$(srcdir) -I. depcomp = $(SHELL) $(top_srcdir)/depcomp am__depfiles_maybe = depfiles @@ -178,6 +178,8 @@ SHELL = @SHELL@ STRIP = @STRIP@ U = @U@ +USE_INCLUDED_INTL_H_FALSE = @USE_INCLUDED_INTL_H_FALSE@ +USE_INCLUDED_INTL_H_TRUE = @USE_INCLUDED_INTL_H_TRUE@ USE_INCLUDED_LIBINTL = @USE_INCLUDED_LIBINTL@ USE_NLS = @USE_NLS@ VERSION = @VERSION@ @@ -233,8 +235,10 @@ EXTRA_DIST = config.rpath ANNOUNCE BUGS FAQ abook.1 abookrc.5 sample.abookrc \ abook.spec contrib doc/HOWTO.translating_abook +abook_LDADD = @LIBINTL@ SUBDIRS = intl po ACLOCAL_AMFLAGS = -I m4 +@USE_INCLUDED_INTL_H_TRUE@AM_CPPFLAGS = -Iintl all: config.h $(MAKE) $(AM_MAKEFLAGS) all-recursive Index: database.c =================================================================== RCS file: /cvsroot/abook/abook/database.c,v retrieving revision 1.29 retrieving revision 1.29.2.1 diff -u -d -r1.29 -r1.29.2.1 --- database.c 21 Sep 2005 16:50:31 -0000 1.29 +++ database.c 26 Oct 2005 19:45:23 -0000 1.29.2.1 @@ -189,23 +189,41 @@ save_database() { FILE *out; + int ret = 0; struct db_enumerator e = init_db_enumerator(ENUM_ALL); + char *datafile_new = strconcat(datafile, ".new", NULL); + char *datafile_old = strconcat(datafile, "~", NULL); - if( (out = abook_fopen(datafile, "w")) == NULL ) - return -1; + if( (out = abook_fopen(datafile_new, "w")) == NULL ) { + ret = -1; + goto out; + } if(list_is_empty()) { fclose(out); unlink(datafile); - return 1; + ret = 1; + goto out; } - + /* + * Possibly should check if write_database failed. + * Currently it returns always zero. + */ write_database(out, e); - fclose(out); - return 0; + if(access(datafile, F_OK) == 0 && + (rename(datafile, datafile_old)) == -1) + ret = -1; + + if((rename(datafile_new, datafile)) == -1) + ret = -1; + +out: + free(datafile_new); + free(datafile_old); + return ret; } static void Index: configure =================================================================== RCS file: /cvsroot/abook/abook/configure,v retrieving revision 1.47 retrieving revision 1.47.2.1 diff -u -d -r1.47 -r1.47.2.1 --- configure 18 Oct 2005 06:51:13 -0000 1.47 +++ configure 26 Oct 2005 19:45:23 -0000 1.47.2.1 @@ -309,7 +309,7 @@ # include <unistd.h> #endif" -ac_subst_vars='SHELL PATH_SEPARATOR PACKAGE_NAME PACKAGE_TARNAME PACKAGE_VERSION PACKAGE_STRING PACKAGE_BUGREPORT exec_prefix prefix program_transform_name bindir sbindir libexecdir datadir sysconfdir sharedstatedir localstatedir libdir includedir oldincludedir infodir mandir build_alias host_alias target_alias DEFS ECHO_C ECHO_N ECHO_T LIBS INSTALL_PROGRAM INSTALL_SCRIPT INSTALL_DATA CYGPATH_W PACKAGE VERSION ACLOCAL AUTOCONF AUTOMAKE AUTOHEADER MAKEINFO install_sh STRIP ac_ct_STRIP INSTALL_STRIP_PROGRAM mkdir_p AWK SET_MAKE am__leading_dot AMTAR am__tar am__untar MKINSTALLDIRS USE_NLS MSGFMT GMSGFMT XGETTEXT MSGMERGE CC CFLAGS LDFLAGS CPPFLAGS ac_ct_CC EXEEXT OBJEXT DEPDIR am__include am__quote AMDEP_TRUE AMDEP_FALSE AMDEPBACKSLASH CCDEPMODE am__fastdepCC_TRUE am__fastdepCC_FALSE build build_cpu build_vendor build_os host host_cpu host_vendor host_os CPP EGREP GLIBC2 RANLIB ac_ct_RANLIB ALLOCA GLIBC21 INTL_MACOSX_LIBS HAVE_POSIX_PRINTF HAVE_ASPRINTF HAVE_SNPRINTF HAVE_WPRINTF LIBICONV LTLIBICONV INTLBISON BUILD_INCLUDED_LIBINTL USE_INCLUDED_LIBINTL CATOBJEXT DATADIRNAME INSTOBJEXT GENCAT INTLOBJS INTL_LIBTOOL_SUFFIX_PREFIX INTLLIBS LIBINTL LTLIBINTL POSUB localedir U ANSI2KNR LIBOBJS LTLIBOBJS' +ac_subst_vars='SHELL PATH_SEPARATOR PACKAGE_NAME PACKAGE_TARNAME PACKAGE_VERSION PACKAGE_STRING PACKAGE_BUGREPORT exec_prefix prefix program_transform_name bindir sbindir libexecdir datadir sysconfdir sharedstatedir localstatedir libdir includedir oldincludedir infodir mandir build_alias host_alias target_alias DEFS ECHO_C ECHO_N ECHO_T LIBS INSTALL_PROGRAM INSTALL_SCRIPT INSTALL_DATA CYGPATH_W PACKAGE VERSION ACLOCAL AUTOCONF AUTOMAKE AUTOHEADER MAKEINFO install_sh STRIP ac_ct_STRIP INSTALL_STRIP_PROGRAM mkdir_p AWK SET_MAKE am__leading_dot AMTAR am__tar am__untar MKINSTALLDIRS USE_NLS MSGFMT GMSGFMT XGETTEXT MSGMERGE CC CFLAGS LDFLAGS CPPFLAGS ac_ct_CC EXEEXT OBJEXT DEPDIR am__include am__quote AMDEP_TRUE AMDEP_FALSE AMDEPBACKSLASH CCDEPMODE am__fastdepCC_TRUE am__fastdepCC_FALSE build build_cpu build_vendor build_os host host_cpu host_vendor host_os CPP EGREP GLIBC2 RANLIB ac_ct_RANLIB ALLOCA GLIBC21 INTL_MACOSX_LIBS HAVE_POSIX_PRINTF HAVE_ASPRINTF HAVE_SNPRINTF HAVE_WPRINTF LIBICONV LTLIBICONV INTLBISON BUILD_INCLUDED_LIBINTL USE_INCLUDED_LIBINTL CATOBJEXT DATADIRNAME INSTOBJEXT GENCAT INTLOBJS INTL_LIBTOOL_SUFFIX_PREFIX INTLLIBS LIBINTL LTLIBINTL POSUB localedir USE_INCLUDED_INTL_H_TRUE USE_INCLUDED_INTL_H_FALSE U ANSI2KNR LIBOBJS LTLIBOBJS' ac_subst_files='' # Initialize some variables set by options. @@ -1622,7 +1622,7 @@ # Define the identity of the package. PACKAGE=abook - VERSION=0.5.5pre1 + VERSION=0.5.5pre2 cat >>confdefs.h <<_ACEOF @@ -10217,6 +10217,17 @@ + +if test x$USE_INCLUDED_LIBINTL = xyes; then + USE_INCLUDED_INTL_H_TRUE= + USE_INCLUDED_INTL_H_FALSE='#' +else + USE_INCLUDED_INTL_H_TRUE='#' + USE_INCLUDED_INTL_H_FALSE= +fi + + + ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' @@ -14585,6 +14596,13 @@ Usually this means the macro was only invoked conditionally." >&2;} { (exit 1); exit 1; }; } fi +if test -z "${USE_INCLUDED_INTL_H_TRUE}" && test -z "${USE_INCLUDED_INTL_H_FALSE}"; then + { { echo "$as_me:$LINENO: error: conditional \"USE_INCLUDED_INTL_H\" was never defined. +Usually this means the macro was only invoked conditionally." >&5 +echo "$as_me: error: conditional \"USE_INCLUDED_INTL_H\" was never defined. +Usually this means the macro was only invoked conditionally." >&2;} + { (exit 1); exit 1; }; } +fi if test -z "${am__fastdepCC_TRUE}" && test -z "${am__fastdepCC_FALSE}"; then { { echo "$as_me:$LINENO: error: conditional \"am__fastdepCC\" was never defined. Usually this means the macro was only invoked conditionally." >&5 @@ -15215,6 +15233,8 @@ s,@LTLIBINTL@,$LTLIBINTL,;t t s,@POSUB@,$POSUB,;t t s,@localedir@,$localedir,;t t +s,@USE_INCLUDED_INTL_H_TRUE@,$USE_INCLUDED_INTL_H_TRUE,;t t +s,@USE_INCLUDED_INTL_H_FALSE@,$USE_INCLUDED_INTL_H_FALSE,;t t s,@U@,$U,;t t s,@ANSI2KNR@,$ANSI2KNR,;t t s,@LIBOBJS@,$LIBOBJS,;t t Index: AUTHORS =================================================================== RCS file: /cvsroot/abook/abook/AUTHORS,v retrieving revision 1.5 retrieving revision 1.5.2.1 diff -u -d -r1.5 -r1.5.2.1 --- AUTHORS 17 Sep 2005 10:10:25 -0000 1.5 +++ AUTHORS 26 Oct 2005 19:45:23 -0000 1.5.2.1 @@ -3,6 +3,10 @@ Jaakko Heinonen <jhe...@us...> +Cedric Duval <ced...@fr...> + - i18n + - etc. + Alan Ford <al...@wh...> - Debian package - manual pages @@ -20,7 +24,3 @@ - csv import filter - palmcsv export filter - fixes - -Cedric Duval <ced...@fr...> - - i18n - |
From: Jaakko H. <jhe...@us...> - 2005-10-26 19:29:26
|
Update of /cvsroot/abook/abook In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv8245 Modified Files: database.c database.h edit.c filter.c list.c list.h ui.c Log Message: - don't use items variable outside of database.c - curitem is now directly used only from database.c and list.c Index: database.c =================================================================== RCS file: /cvsroot/abook/abook/database.c,v retrieving revision 1.31 retrieving revision 1.32 diff -u -d -r1.31 -r1.32 --- database.c 26 Oct 2005 16:38:35 -0000 1.31 +++ database.c 26 Oct 2005 19:29:16 -0000 1.32 @@ -26,9 +26,10 @@ int fields_count = 0; list_item *database = NULL; -int items = 0; +static int items = 0; #define ITEM_SIZE (fields_count * sizeof(char *)) +#define LAST_ITEM (items - 1) #define INITIAL_LIST_CAPACITY 30 static int list_capacity = 0; @@ -660,6 +661,17 @@ return item <= LAST_ITEM && item >= 0; } +int +last_item() +{ + return LAST_ITEM; +} + +int +db_n_items() +{ + return items; +} int real_db_enumerate_items(struct db_enumerator e) Index: ui.c =================================================================== RCS file: /cvsroot/abook/abook/ui.c,v retrieving revision 1.55 retrieving revision 1.56 diff -u -d -r1.55 -r1.56 --- ui.c 25 Oct 2005 23:27:24 -0000 1.55 +++ ui.c 26 Oct 2005 19:29:17 -0000 1.56 @@ -38,8 +38,6 @@ * external variables */ -extern int curitem; -extern int items; extern char *datafile; extern bool alternative_datafile; @@ -434,7 +432,6 @@ */ extern char *selected; -extern int curitem; void get_commands() @@ -455,7 +452,7 @@ case 'q': return; case 'Q': quit_abook(QUIT_DONTSAVE); break; case 'P': print_stderr(selected_items() ? - -1 : list_current_item()); + -1 : list_get_curitem()); return; case '?': display_help(HELP_MAIN); @@ -499,8 +496,8 @@ case '/': ui_find(0); break; case '\\': ui_find(1); break; - case ' ': if(curitem >= 0) { - selected[curitem] = !selected[curitem]; + case ' ': if(list_get_curitem() >= 0) { + list_invert_curitem_selection(); ui_print_number_of_items(); refresh_list(); } @@ -520,13 +517,13 @@ break; case 'm': launch_mutt(selected_items() ? - -1 : list_current_item()); + -1 : list_get_curitem()); refresh_screen(); break; case 'p': ui_print_database(); break; - case 'v': launch_wwwbrowser(list_current_item()); + case 'v': launch_wwwbrowser(list_get_curitem()); refresh_screen(); break; } @@ -575,12 +572,13 @@ refresh_screen(); } - if( (item = find_item(findstr, curitem + !!next, search_fields)) < 0 && + if( (item = find_item(findstr, list_get_curitem() + !!next, + search_fields)) < 0 && (item = find_item(findstr, 0, search_fields)) >= 0) statusline_addstr(_("Search hit bottom, continuing at top")); if(item >= 0) { - curitem = item; + list_set_curitem(item); refresh_list(); } } @@ -588,7 +586,8 @@ void ui_print_number_of_items() { - char *str = strdup_printf(" " "|%3d/%3d", selected_items(), items); + char *str = strdup_printf(" " "|%3d/%3d", + selected_items(), db_n_items()); mvaddstr(0, COLS-strlen(str), str); @@ -600,7 +599,7 @@ { char *msg; - if(items > 0) { + if(!list_is_empty()) { msg = strdup_printf(_("Your current data will be lost - " "Press '%c' to continue"), *(S_("keybinding for yes|y"))); @@ -675,7 +674,7 @@ load_database(filename); - if(items == 0) { + if(list_is_empty()) { statusline_msg(_("Sorry, the specified file appears not to be a valid abook addressbook")); load_database(datafile); } else { Index: list.c =================================================================== RCS file: /cvsroot/abook/abook/list.c,v retrieving revision 1.28 retrieving revision 1.29 diff -u -d -r1.28 -r1.29 --- list.c 25 Oct 2005 23:27:24 -0000 1.28 +++ list.c 26 Oct 2005 19:29:16 -0000 1.29 @@ -28,7 +28,6 @@ int extra_column = -1; int extra_alternative = -1; -extern int items; extern abook_field_list *fields_list; static WINDOW *list = NULL; @@ -99,8 +98,9 @@ else if(curitem > LAST_LIST_ITEM) first_list_item = max(curitem - LIST_LINES + 1, 0); - for( line = 0, i = first_list_item ; i <= LAST_LIST_ITEM && i < items; - line++, i++ ) { + for(line = 0, i = first_list_item; + i <= LAST_LIST_ITEM && i < db_n_items(); + line++, i++) { print_list_line(i, line, i == curitem); } @@ -188,7 +188,7 @@ void scroll_down() { - if(curitem > items - 2) + if(curitem > db_n_items() - 2) return; curitem++; @@ -212,12 +212,15 @@ void page_down() { - if(curitem > items - 2) + if(curitem > db_n_items() - 2) return; - curitem = curitem == LAST_LIST_ITEM ? - ((curitem += LIST_LINES) > LAST_ITEM ? LAST_ITEM : curitem) : - min(LAST_LIST_ITEM, LAST_ITEM); + if(curitem == LAST_LIST_ITEM) { + if((curitem += LIST_LINES) > last_item()) + curitem = last_item(); + } else { + curitem = min(LAST_LIST_ITEM, last_item()); + } refresh_list(); } @@ -225,13 +228,29 @@ void select_none() { - memset(selected, 0, items); + memset(selected, 0, db_n_items()); } void select_all() { - memset(selected, 1, items); + memset(selected, 1, db_n_items()); +} + +void +list_set_selection(int item, int value) +{ + assert(is_valid_item(item)); + + selected[item] = !!value; +} + +void +list_invert_curitem_selection() +{ + assert(is_valid_item(curitem)); + + selected[curitem] = !selected[curitem]; } void @@ -239,7 +258,7 @@ { list_item tmp; - if( curitem < 0 || curitem > LAST_ITEM ) + if(curitem < 0 || curitem > last_item()) return; tmp = item_create(); @@ -256,7 +275,7 @@ break; case MOVE_ITEM_DOWN: - if( curitem >= LAST_ITEM ) + if(curitem >= last_item()) goto out_move; item_copy(db_item_get(curitem), db_item_get(curitem + 1)); @@ -272,7 +291,7 @@ void goto_home() { - if(items > 0) + if(db_n_items() > 0) curitem = 0; refresh_list(); @@ -281,8 +300,8 @@ void goto_end() { - if(items > 0) - curitem = LAST_ITEM; + if(db_n_items() > 0) + curitem = last_item(); refresh_list(); } @@ -319,7 +338,7 @@ { int i, n = 0; - for(i = 0; i < items; i++) + for(i = 0; i < db_n_items(); i++) if(selected[i]) n++; @@ -331,23 +350,29 @@ { int i; - if(items < 1) + if(list_is_empty()) return; - for(i = 0; i < items; i++) + for(i = 0; i < db_n_items(); i++) selected[i] = !selected[i]; } int -list_current_item() +list_is_empty() { - return curitem; + return db_n_items() < 1; } int -list_is_empty() +list_get_curitem() { - return items < 1; + return curitem; +} + +void +list_set_curitem(int i) +{ + curitem = i; } int @@ -366,7 +391,7 @@ } item_free(&item); - curitem = LAST_ITEM; + curitem = last_item(); refresh_list(); return 0; Index: database.h =================================================================== RCS file: /cvsroot/abook/abook/database.h,v retrieving revision 1.12 retrieving revision 1.13 diff -u -d -r1.12 -r1.13 --- database.h 25 Oct 2005 23:27:24 -0000 1.12 +++ database.h 26 Oct 2005 19:29:16 -0000 1.13 @@ -88,6 +88,8 @@ int find_item(char *str, int start, int search_fields[]); int is_selected(int item); int is_valid_item(int item); +int last_item(); +int db_n_items(); int real_db_enumerate_items(struct db_enumerator e); struct db_enumerator init_db_enumerator(int mode); @@ -134,8 +136,6 @@ * Various macros */ -#define LAST_ITEM (items - 1) - #define have_multiple_emails(item) \ strchr(db_email_get(item), ',') Index: list.h =================================================================== RCS file: /cvsroot/abook/abook/list.h,v retrieving revision 1.7 retrieving revision 1.8 diff -u -d -r1.7 -r1.8 --- list.h 25 Oct 2005 23:27:24 -0000 1.7 +++ list.h 26 Oct 2005 19:29:16 -0000 1.8 @@ -15,14 +15,17 @@ void page_down(); void select_none(); void select_all(); +void set_selection(int item, int value); +void list_invert_curitem_selection(); void move_curitem(int direction); void goto_home(); void goto_end(); void highlight_line(WINDOW *win, int line); int selected_items(); void invert_selection(); -int list_current_item(); int list_is_empty(); +int list_get_curitem(); +void list_set_curitem(int i); int duplicate_item(); @@ -45,6 +48,6 @@ #define EMAILLEN (EXTRAPOS - EMAILPOS - 1) #define EXTRALEN (COLS - EXTRAPOS) -#define LAST_LIST_ITEM ( first_list_item + LIST_LINES - 1 ) +#define LAST_LIST_ITEM (first_list_item + LIST_LINES - 1) #endif Index: filter.c =================================================================== RCS file: /cvsroot/abook/abook/filter.c,v retrieving revision 1.49 retrieving revision 1.50 diff -u -d -r1.49 -r1.50 --- filter.c 25 Oct 2005 23:27:24 -0000 1.49 +++ filter.c 26 Oct 2005 19:29:16 -0000 1.50 @@ -27,7 +27,6 @@ #include "xmalloc.h" #include <assert.h> -extern int items; extern abook_field_list *fields_list; extern int fields_count; @@ -194,7 +193,7 @@ { int filter; char *filename; - int tmp = items; + int tmp = db_n_items(); import_screen(); @@ -215,7 +214,7 @@ if(i_read_file(filename, i_filters[filter].func )) statusline_msg(_("Error occured while opening the file")); - else if(tmp == items) + else if(tmp == db_n_items()) statusline_msg(_("File does not seem to be a valid addressbook")); refresh_screen(); @@ -246,7 +245,7 @@ import_file(char filtname[FILTNAME_LEN], char *filename) { int i; - int tmp = items; + int tmp = db_n_items(); int ret = 0; for(i=0;; i++) { @@ -271,7 +270,7 @@ } else ret = i_read_file(filename, i_filters[i].func); - if(tmp == items) + if(tmp == db_n_items()) ret = 1; return ret; @@ -842,7 +841,7 @@ char tmp[MAX_EMAILSTR_LEN]; int extra_column; - if(items < 1) + if(list_is_empty()) return 2; extra_column = init_extra_field(STR_EXTRA_COLUMN); Index: edit.c =================================================================== RCS file: /cvsroot/abook/abook/edit.c,v retrieving revision 1.45 retrieving revision 1.46 diff -u -d -r1.45 -r1.46 --- edit.c 26 Oct 2005 15:28:57 -0000 1.45 +++ edit.c 26 Oct 2005 19:29:16 -0000 1.46 @@ -29,10 +29,7 @@ * some extern variables */ - -extern int curitem; extern int views_count; -extern int items; WINDOW *editw; @@ -510,17 +507,17 @@ void edit_item(int item) { - if( item < 0 ) { - if( curitem < 0 ) + if(item < 0) { + if(list_get_curitem() < 0) return; else - item = curitem; + item = list_get_curitem(); } init_editor(); while((item = edit_loop(item)) >= 0) - curitem = item; /* hmm, this is not very clean way to go */ + list_set_curitem(item); /* this is not very clean way to go */ close_editor(); } @@ -541,8 +538,8 @@ add_item2database(item); item_free(&item); - curitem = LAST_ITEM; + list_set_curitem(last_item()); - edit_item(LAST_ITEM); + edit_item(last_item()); } |
From: Jaakko H. <jhe...@us...> - 2005-10-26 16:50:50
|
Update of /cvsroot/abook/abook In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv2627 Modified Files: ChangeLog Log Message: - update 0.5.5 change log Index: ChangeLog =================================================================== RCS file: /cvsroot/abook/abook/ChangeLog,v retrieving revision 1.69 retrieving revision 1.70 diff -u -d -r1.69 -r1.70 --- ChangeLog 18 Oct 2005 06:51:13 -0000 1.69 +++ ChangeLog 26 Oct 2005 16:50:42 -0000 1.70 @@ -6,6 +6,9 @@ - use better common code for csv filters (Marc Tardif) - translation HOWTO (Cedric Duval) - wanderlust export filter (Josef Schugt) + - create a backup at save time + - editor undo fix + - ui_readline limit fix 0.5.4 - add show_cursor config option (idea from Cheryl Homiak) |
From: Jaakko H. <jhe...@us...> - 2005-10-26 16:38:47
|
Update of /cvsroot/abook/abook In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv301 Modified Files: database.c Log Message: - attempt to save database more safely - create a backup file when saving Index: database.c =================================================================== RCS file: /cvsroot/abook/abook/database.c,v retrieving revision 1.30 retrieving revision 1.31 diff -u -d -r1.30 -r1.31 --- database.c 25 Oct 2005 23:27:24 -0000 1.30 +++ database.c 26 Oct 2005 16:38:35 -0000 1.31 @@ -345,23 +345,41 @@ save_database() { FILE *out; + int ret = 0; struct db_enumerator e = init_db_enumerator(ENUM_ALL); + char *datafile_new = strconcat(datafile, ".new", NULL); + char *datafile_old = strconcat(datafile, "~", NULL); - if( (out = abook_fopen(datafile, "w")) == NULL ) - return -1; + if( (out = abook_fopen(datafile_new, "w")) == NULL ) { + ret = -1; + goto out; + } if(list_is_empty()) { fclose(out); unlink(datafile); - return 1; + ret = 1; + goto out; } - + /* + * Possibly should check if write_database failed. + * Currently it returns always zero. + */ write_database(out, e); - fclose(out); - return 0; + if(access(datafile, F_OK) == 0 && + (rename(datafile, datafile_old)) == -1) + ret = -1; + + if((rename(datafile_new, datafile)) == -1) + ret = -1; + +out: + free(datafile_new); + free(datafile_old); + return ret; } static void |
From: Jaakko H. <jhe...@us...> - 2005-10-26 15:29:05
|
Update of /cvsroot/abook/abook In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv14908 Modified Files: edit.c Log Message: - possibly improve error reporting when tabs are too wide to display Index: edit.c =================================================================== RCS file: /cvsroot/abook/abook/edit.c,v retrieving revision 1.44 retrieving revision 1.45 diff -u -d -r1.44 -r1.45 --- edit.c 25 Oct 2005 23:27:24 -0000 1.44 +++ edit.c 26 Oct 2005 15:28:57 -0000 1.45 @@ -51,10 +51,7 @@ int width = strwidth(tab_name) + 5; if(x_pos + width + 1 > EDITW_COLS) { - statusline_msg(_("Tab name too wide for screen")); - /* Disabling this field */ - /* TODO should be recomputed on window resize */ - views_count--; + statusline_addstr(_("Tab name too wide for screen")); break; } |
From: Cedric D. <cd...@us...> - 2005-10-25 23:27:41
|
Update of /cvsroot/abook/abook In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv8391 Modified Files: Makefile.am Makefile.in abook.c abook.h abookrc.5 aclocal.m4 configure database.c database.h edit.c edit.h filter.c help.h list.c list.h misc.c misc.h options.c options.h sample.abookrc ui.c ui.h Added Files: views.c views.h Log Message: Support for dynamic views. * Two new configuration commands: 'field' and 'view'. * A new configuration variable: 'preserve_fields'. * In absence of user configuration, abook behaves and displays mostly like previous releases. * More abstraction for database access. db_field_get(), db_field_put(), etc. * Functions for handling lists of strings (abook_list) * Functions for conversting abook_lists to CSV and vice-versa. * Arbitrary number of email addresses internally. Still limited to 9 for practical reasons with the UI. * Up to 35 fields per view. * Escape as a modifier key in the editor. * Addresses can be rolled both directions (esc-r). * Fixed html produced by export filter. * Updated abookrc man page and sample.abookrc accordingly. Index: ui.c =================================================================== RCS file: /cvsroot/abook/abook/ui.c,v retrieving revision 1.54 retrieving revision 1.55 diff -u -d -r1.54 -r1.55 --- ui.c 5 Oct 2005 11:03:36 -0000 1.54 +++ ui.c 25 Oct 2005 23:27:24 -0000 1.55 @@ -38,7 +38,8 @@ * external variables */ -extern int items, curitem; +extern int curitem; +extern int items; extern char *datafile; extern bool alternative_datafile; @@ -281,7 +282,7 @@ char *s; int ch; - assert((dflt < 0) || (dflt > strlen(choices))); + assert((dflt >= 0) && (dflt <= strlen(choices))); if(dflt) { s = strdup_printf("%s [%c]", msg, choices[dflt - 1]); @@ -491,9 +492,9 @@ case 'o': ui_open_datafile(); break; - case 's': sort_by_field(NAME); break; + case 's': sort_by_field("name");break; case 'S': sort_surname(); break; - case 'F': sort_by_field(-1); break; + case 'F': sort_by_field(NULL); break; case '/': ui_find(0); break; case '\\': ui_find(1); break; @@ -584,7 +585,6 @@ } } - void ui_print_number_of_items() { Index: ui.h =================================================================== RCS file: /cvsroot/abook/abook/ui.h,v retrieving revision 1.14 retrieving revision 1.15 diff -u -d -r1.14 -r1.15 --- ui.h 26 Sep 2005 15:59:04 -0000 1.14 +++ ui.h 25 Oct 2005 23:27:24 -0000 1.15 @@ -38,6 +38,8 @@ #define UI_HLINE_CHAR opt_get_bool(BOOL_USE_ASCII_ONLY) ? \ '-' : ACS_HLINE +#define UI_VLINE_CHAR opt_get_bool(BOOL_USE_ASCII_ONLY) ? \ + '|' : ACS_VLINE #define UI_TEE_CHAR opt_get_bool(BOOL_USE_ASCII_ONLY) ? \ '-' : ACS_BTEE #define UI_LBOXLINE_CHAR opt_get_bool(BOOL_USE_ASCII_ONLY) ? \ Index: abookrc.5 =================================================================== RCS file: /cvsroot/abook/abook/abookrc.5,v retrieving revision 1.13 retrieving revision 1.14 diff -u -d -r1.13 -r1.14 --- abookrc.5 29 May 2005 16:32:24 -0000 1.13 +++ abookrc.5 25 Oct 2005 23:27:24 -0000 1.14 @@ -1,4 +1,4 @@ -.TH ABOOKRC 5 "Jun 4, 2003" +.TH ABOOKRC 5 "Oct 25, 2005" .nh .SH NAME \fB$HOME/.abook/abookrc\fP \- configuration file for abook address book program @@ -27,6 +27,35 @@ .B abookrc are on lines beginning with '#'. +.SH COMMANDS + +.TP +\fBset\fP \fIoption\fP = \fIvalue\fP + +.TP +\fBfield\fP \fIidentifier\fP = \fIhuman_readable_name\fP [ , \fItype\fP ] +Defines a new custom field. \fItype\fP can be one of 'string' (default) +, 'emails', 'list', or 'day'. + +.TP +\fBview\fP \fIview name\fP = \fIfield1\fP [ , \fIfield2\fP, ... ] +Defines a view/tab, with \fIfieldN\fP being the identifier of a field +declared with the \fBfield\fP command, or the identifier of a standard field. +.IP +Standard fields: +.br + name, email, +.br + address, address2, city, state, zip, country, +.br + phone, workphone, fax, mobile, +.br + nick, url, notes, anniversary +.IP +Note: if you don't define any view, abook will use a default display based +on the above standard fields. + + .SH VARIABLES .TP @@ -34,6 +63,26 @@ Defines whether the addressbook is automatically saved on exit. Default is true. .TP +\fBpreserve_fields\fP=[all|standard|none] +Specifies how fields not declared with the \fBfield\fP command nor in a view +should be preserved while loading an abook database. +.RS +.TP +.B all +preserve any completely unknown field. +.TP +.B standard +only preserve the standard fields (see a list in the + description of the \fBview\fP command) and the legacy + 'custom[1-5]' fields. +.TP +.B none +discards any unknown field. +.IP +Default is \fIstandard\fP. +.RE + +.TP \fBshow_all_emails\fP=[true|false] Defines whether all email addresses for a contact are shown in the main list view. Default is true @@ -44,7 +93,7 @@ .TP \fBextra_column\fP=field Defines the field to display in the extra (third) column on the main list. Default is "phone" (Home Phone). -.br +.IP \fIfield\fP can be any of the following: .br -1 disabled @@ -113,6 +162,21 @@ # sample abook configuration file # +# Declare a few custom fields +field pager = Pager +field address_lines = Address, list +field birthday = Birthday, day + +# Define how fields should be displayed in tabs +view CONTACT = name, email +view ADDRESS = address_lines, city, state, zip, country +view PHONE = phone, workphone, pager, mobile, fax +view OTHER = url, birthday + + +# Preserve any unknown field while loading an abook database +set preserve_fields=all + # Automatically save database on exit set autosave=true @@ -171,8 +235,9 @@ .SH SEE ALSO .BR abook (1). .br -.SH AUTHOR -This manual page was written by Alan Ford <al...@wh...>. +.SH AUTHORS +This manual page was written by Alan Ford <al...@wh...> and +expanded by Cedric Duval <ced...@fr...>. .br .B abook Index: filter.c =================================================================== RCS file: /cvsroot/abook/abook/filter.c,v retrieving revision 1.48 retrieving revision 1.49 diff -u -d -r1.48 -r1.49 --- filter.c 5 Oct 2005 11:03:36 -0000 1.48 +++ filter.c 25 Oct 2005 23:27:24 -0000 1.49 @@ -28,8 +28,8 @@ #include <assert.h> extern int items; -extern list_item *database; -extern struct abook_field abook_fields[]; +extern abook_field_list *fields_list; +extern int fields_count; /* * function declarations @@ -281,7 +281,7 @@ * export */ -static int e_write_file(char *filename, +static int e_write_file(char *filename, int (*func) (FILE *in, struct db_enumerator e), int mode); static void @@ -531,10 +531,10 @@ static void ldif_add_item(ldif_item li) { - list_item abook_item; + list_item item; int i; - memset(abook_item, 0, sizeof(abook_item)); + item = item_create(); if(!li[LDIF_ITEM_FIELDS -1]) goto bail_out; @@ -542,14 +542,15 @@ for(i=0; i < LDIF_ITEM_FIELDS; i++) { if(ldif_conv_table[i] >= 0 && li[i] && *li[i]) - abook_item[ldif_conv_table[i]] = xstrdup(li[i]); + item_fput(item,ldif_conv_table[i],xstrdup(li[i])); } - add_item2database(abook_item); + add_item2database(item); bail_out: for(i=0; i < LDIF_ITEM_FIELDS; i++) xfree(li[i]); + item_free(&item); } @@ -568,9 +569,11 @@ if(i == LDIF_ITEM_FIELDS - 1) /* this is a dirty hack */ if(safe_strcmp("person", value)) break; - if(item[i]) - xfree(item[i]); - item[i] = xstrdup(value); + + if(item_fget(item, i)) + free(item_fget(item, i)); + + item_fput(item, i, xstrdup(value)); } } } @@ -638,8 +641,7 @@ if( !(line = ptr = getaline(in)) ) return 1; /* error / EOF */ - while( ISSPACE(*ptr) ) - ptr++; + SKIPWS(ptr); if(strncmp("alias", ptr, 5)) { free(line); @@ -648,8 +650,7 @@ ptr += 5; - while( ISSPACE(*ptr) ) - ptr++; + SKIPWS(ptr); tmp = ptr; @@ -658,13 +659,13 @@ alias_len = (size_t)(ptr - tmp); - *alias = xmalloc_inc(alias_len, 1); + if(alias) + *alias = xmalloc_inc(alias_len, 1); strncpy(*alias, tmp, alias_len); *(*alias + alias_len) = 0; - while(ISSPACE(*ptr)) - ptr++; + SKIPWS(ptr); *rest = xstrdup(ptr); @@ -695,7 +696,7 @@ static void mutt_parse_email(list_item item) { - char *line = item[NAME]; + char *line = item_fget(item, NAME); char *tmp; char *name, *email; #if 0 @@ -709,11 +710,12 @@ free(tmp); if(name) - item[NAME] = name; + item_fput(item, NAME, name); else return; + if(email) - item[EMAIL] = email; + item_fput(item, EMAIL, email); else return; @@ -742,22 +744,25 @@ static int mutt_parse_file(FILE *in) { - list_item item; + list_item item = item_create(); for(;;) { - memset(item, 0, sizeof(item)); + memset(item, 0, fields_count * sizeof(char *)); - if(!mutt_read_line(in, &item[NICK], - &item[NAME]) ) + if(!mutt_read_line(in, + (field_id(NICK) != -1) ? + &item[field_id(NICK)] : NULL, + &item[field_id(NAME)])) mutt_parse_email(item); if(feof(in)) { - free_list_item(item); + item_empty(item); break; } add_item2database(item); } + item_free(&item); return 0; } @@ -795,7 +800,8 @@ int j; get_first_email(email, e.item); - tmp = strdup_printf("cn=%s,mail=%s", database[e.item][NAME], email); + tmp = strdup_printf("cn=%s,mail=%s",db_name_get(e.item),email); + ldif_fput_type_and_value(out, "dn", tmp); free(tmp); @@ -804,10 +810,11 @@ if(ldif_conv_table[j] == EMAIL) ldif_fput_type_and_value(out, ldif_field_names[j], email); - else if(database[e.item][ldif_conv_table[j]]) + else if(db_fget(e.item,ldif_conv_table[j])) ldif_fput_type_and_value(out, ldif_field_names[j], - database[e.item][ldif_conv_table[j]]); + db_fget(e.item, + ldif_conv_table[j])); } } @@ -829,34 +836,33 @@ static void html_export_write_head(FILE *out, int extra_column); static void html_export_write_tail(FILE *out); -extern int extra_column; - static int html_export_database(FILE *out, struct db_enumerator e) { char tmp[MAX_EMAILSTR_LEN]; + int extra_column; if(items < 1) return 2; - extra_column = (extra_column > 2 && extra_column < ITEM_FIELDS) ? - extra_column : PHONE; - + extra_column = init_extra_field(STR_EXTRA_COLUMN); html_export_write_head(out, extra_column); db_enumerate_items(e) { get_first_email(tmp, e.item); if (*tmp) - fprintf(out, "<tr>\n<td><a href=\"mailto:%s\">%s</a>\n", + fprintf(out, "<tr>\n<td>" + "<a href=\"mailto:%s\">%s</a>" + "</td>\n", tmp, - database[e.item][NAME] ); + db_name_get(e.item)); else - fprintf(out, "<tr>\n<td>%s\n", - database[e.item][NAME] ); + fprintf(out, "<tr>\n<td>%s</td>\n", db_name_get(e.item)); - fprintf(out, "<td>%s\n<td>%s\n", - database[e.item][EMAIL], - safe_str(database[e.item][extra_column]) ); + fprintf(out, "<td>%s</td>\n", db_email_get(e.item)); + if(extra_column >= 0) + fprintf(out, "<td>%s</td>\n", + safe_str(db_fget_byid(e.item, extra_column))); fprintf(out, "</tr>\n\n"); } @@ -865,21 +871,25 @@ return 0; } - static void html_export_write_head(FILE *out, int extra_column) { - char *realname = get_real_name(); + char *realname = get_real_name(), *extra_column_name = NULL; fprintf(out, "<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.01 Transitional//EN\">\n"); - fprintf(out, "<html>\n<head>\n <title>%s's addressbook</title>", realname ); + fprintf(out, "<html>\n<head>\n <title>%s's addressbook</title>", + realname ); fprintf(out, "\n</head>\n<body>\n"); fprintf(out, "\n<h2>%s's addressbook</h2>\n", realname ); fprintf(out, "<br><br>\n\n"); fprintf(out, "<table border=\"1\" align=\"center\">\n"); - fprintf(out, "\n<tr><th>Name<th>E-mail address(es)<th>%s</tr>\n\n", - abook_fields[extra_column].name); + fprintf(out, "\n<tr><th>Name</th><th>E-mail address(es)</th>"); + if(extra_column >= 0) { + get_field_keyname(extra_column, NULL, &extra_column_name); + fprintf(out, "<th>%s</th>", safe_str(extra_column_name)); + } + fprintf(out, "</tr>\n\n"); free(realname); } @@ -927,7 +937,7 @@ *tmp=0; for(i = 1; ( tmp = strchr(s, ',') ) != NULL ; i++, s = tmp + 1) - if(i > MAX_EMAILS - 1) { + if(i > MAX_LIST_ITEMS - 1) { *tmp = 0; break; } @@ -944,7 +954,7 @@ int i, len, last; int pine_conv_table[]= {NICK, NAME, EMAIL, -1, NOTES}; - memset(&item, 0, sizeof(item)); + item = item_create(); for(i=0, last=0; !last ; i++) { if( !(end = strchr(start, '\t')) ) @@ -958,13 +968,15 @@ strncpy(tmp, start, len); tmp[len] = 0; if(*tmp) - item[pine_conv_table[i]] = xstrdup(tmp); + item_fput(item, pine_conv_table[i], + xstrdup(tmp)); } start = end + 1; } - pine_convert_emails(item[EMAIL]); + pine_convert_emails(item_fget(item, EMAIL)); add_item2database(item); + item_free(&item); } @@ -1027,10 +1039,10 @@ db_enumerate_items(e) { fprintf(out, have_multiple_emails(e.item) ? "%s\t%s\t(%s)\t\t%s\n" : "%s\t%s\t%s\t\t%s\n", - safe_str(database[e.item][NICK]), - safe_str(database[e.item][NAME]), - safe_str(database[e.item][EMAIL]), - safe_str(database[e.item][NOTES]) + safe_str(db_fget(e.item, NICK)), + safe_str(db_name_get(e.item)), + safe_str(db_email_get(e.item)), + safe_str(db_fget(e.item, NOTES)) ); } @@ -1080,11 +1092,7 @@ NICK, URL, NOTES, - CUSTOM1, - CUSTOM2, - CUSTOM3, - CUSTOM4, - CUSTOM5, + ANNIVERSARY }; static int palmcsv_conv_table[] = { @@ -1102,11 +1110,7 @@ STATE, ZIP, COUNTRY, - CUSTOM1, - CUSTOM2, - CUSTOM3, - CUSTOM4, - CUSTOM5, + ANNIVERSARY, }; static void @@ -1119,7 +1123,7 @@ return; for(i = 1; ( tmp = strchr(s, ',') ) != NULL ; i++, s = tmp + 1) - if(i > MAX_EMAILS - 1) { + if(i > MAX_LIST_ITEMS - 1) { *tmp = 0; break; } @@ -1156,7 +1160,7 @@ csv_field_to_item(int *table_base, size_t table_size, int field) { if(field < table_size) - return table_base[field]; + return field_id(table_base[field]); return -1; } @@ -1225,7 +1229,7 @@ bool in_quote = FALSE; list_item item; - memset(item, 0, sizeof(item)); + item = item_create(); for(p = start = line, field = 0; *p; p++) { if(in_quote) { @@ -1239,10 +1243,8 @@ if(*p == ',' && !in_quote) { *p = 0; - csv_field_to_item(table_base, table_size, field); csv_store_item(item, - csv_field_to_item(table_base, - table_size, field), + csv_field_to_item(table_base,table_size,field), start); field++; start = p + 1; @@ -1254,8 +1256,9 @@ csv_store_item(item, csv_field_to_item(table_base, table_size, field), start); - csv_convert_emails(item[EMAIL]); + csv_convert_emails(item_fget(item, EMAIL)); add_item2database(item); + item_free(&item); } static int @@ -1324,13 +1327,13 @@ (*special_func)(out, e.item, fields[i]); } else /*fprintf(out,( - strchr(safe_str(database[e.item][fields[i]]), ',') || - strchr(safe_str(database[e.item][fields[i]]), '\"')) ? + strchr(safe_str(database[e.item][field_idx(fields[i])]), ',') || + strchr(safe_str(database[e.item][field_idx(fields[i])]), '\"')) ? "\"%s\"" : "%s", - safe_str(database[e.item][fields[i]]) + safe_str(database[e.item][field_idx(fields[i])]) );*/ fprintf(out, "\"%s\"", - safe_str(database[e.item][fields[i]])); + safe_str(db_fget(e.item,fields[i]))); if(fields[i + 1] != CSV_LAST) fputc(',', out); @@ -1381,11 +1384,7 @@ NICK, URL, NOTES, - CUSTOM1, - CUSTOM2, - CUSTOM3, - CUSTOM4, - CUSTOM5, + ANNIVERSARY, CSV_LAST }; @@ -1405,11 +1404,7 @@ fprintf(out, "\"NICK\","); fprintf(out, "\"URL\","); fprintf(out, "\"NOTES\","); - fprintf(out, "\"CUSTOM1\","); - fprintf(out, "\"CUSTOM2\","); - fprintf(out, "\"CUSTOM3\","); - fprintf(out, "\"CUSTOM4\","); - fprintf(out, "\"CUSTOM5\"\n"); + fprintf(out, "\"ANNIVERSARY\"\n"); csv_export_common(out, e, allcsv_export_fields, NULL); @@ -1448,7 +1443,7 @@ { switch(field) { case PALM_CSV_NAME: - palm_split_and_write_name(out, database[item][NAME]); + palm_split_and_write_name(out, db_name_get(item)); break; case PALM_CSV_CAT: fprintf(out, "\"abook\""); @@ -1504,59 +1499,65 @@ static int gcrd_export_database(FILE *out, struct db_enumerator e) { - char emails[MAX_EMAILS][MAX_EMAIL_LEN]; int j; char *name; + abook_list *emails, *em; db_enumerate_items(e) { fprintf(out, "BEGIN:VCARD\nFN:%s\n", - safe_str(database[e.item][NAME])); + safe_str(db_name_get(e.item))); - name = get_surname(database[e.item][NAME]); - for( j = strlen(database[e.item][NAME]) - 1; j >= 0; j-- ) { - if(database[e.item][NAME][j] == ' ') + name = get_surname(db_name_get(e.item)); + for( j = strlen(db_name_get(e.item)) - 1; j >= 0; j-- ) { + if((db_name_get(e.item))[j] == ' ') break; } fprintf(out, "N:%s;%.*s\n", safe_str(name), j, - safe_str(database[e.item][NAME]) + safe_str(db_name_get(e.item)) ); free(name); - if ( database[e.item][ADDRESS] ) + if(db_fget(e.item, ADDRESS)) fprintf(out, "ADR:;;%s;%s;%s;%s;%s;%s\n", - safe_str(database[e.item][ADDRESS]), - safe_str(database[e.item][ADDRESS2]), - safe_str(database[e.item][CITY]), - safe_str(database[e.item][STATE]), - safe_str(database[e.item][ZIP]), - safe_str(database[e.item][COUNTRY]) + safe_str(db_fget(e.item, ADDRESS)), + safe_str(db_fget(e.item, ADDRESS2)), + safe_str(db_fget(e.item, CITY)), + safe_str(db_fget(e.item, STATE)), + safe_str(db_fget(e.item, ZIP)), + safe_str(db_fget(e.item, COUNTRY)) ); - if (database[e.item][PHONE]) - fprintf(out, "TEL;HOME:%s\n", database[e.item][PHONE]); - if (database[e.item][WORKPHONE]) - fprintf(out, "TEL;WORK:%s\n", database[e.item][WORKPHONE]); - if (database[e.item][FAX]) - fprintf(out, "TEL;FAX:%s\n", database[e.item][FAX]); - if (database[e.item][MOBILEPHONE]) - fprintf(out, "TEL;CELL:%s\n", database[e.item][MOBILEPHONE]); + if(db_fget(e.item, PHONE)) + fprintf(out, "TEL;HOME:%s\n", + db_fget(e.item, PHONE)); + if(db_fget(e.item, WORKPHONE)) + fprintf(out, "TEL;WORK:%s\n", + db_fget(e.item, WORKPHONE)); + if(db_fget(e.item, FAX)) + fprintf(out, "TEL;FAX:%s\n", + db_fget(e.item, FAX)); + if(db_fget(e.item, MOBILEPHONE)) + fprintf(out, "TEL;CELL:%s\n", + db_fget(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", - emails[j]); - } + if(*db_email_get(e.item)) { + emails = csv_to_abook_list(db_email_get(e.item)); + + for(em = emails; em; em = em->next) + fprintf(out, "EMAIL;INTERNET:%s\n", em->data); + + abook_list_free(&emails); } - if ( database[e.item][NOTES] ) - fprintf(out, "NOTE:%s\n", database[e.item][NOTES]); - if (database[e.item][URL]) - fprintf(out, "URL:%s\n", database[e.item][URL]); + if(db_fget(e.item, NOTES)) + fprintf(out, "NOTE:%s\n", + db_fget(e.item, NOTES)); + if(db_fget(e.item, URL)) + fprintf(out, "URL:%s\n", + db_fget(e.item, URL)); fprintf(out, "END:VCARD\n\n"); @@ -1579,10 +1580,10 @@ { char *tmp, *pos; - if(database[i][NICK]) - return xstrdup(database[i][NICK]); + if(db_fget(i, NICK)) + return xstrdup(db_fget(i, NICK)); - tmp = xstrdup(database[i][NAME]); + tmp = xstrdup(db_name_get(i)); if( ( pos = strchr(tmp, ' ') ) ) *pos = 0; @@ -1600,11 +1601,10 @@ db_enumerate_items(e) { alias = mutt_alias_genalias(e.item); - get_first_email(email, e.item); fprintf(out, *email ? "alias %s %s <%s>\n": "alias %s %s%s\n", alias, - database[e.item][NAME], + db_name_get(e.item), email); xfree(alias); } @@ -1624,29 +1624,29 @@ static void text_write_address_us(FILE *out, int i) { - fprintf(out, "\n%s", database[i][ADDRESS]); + fprintf(out, "\n%s", db_fget(i, ADDRESS)); - if (database[i][ADDRESS2]) - fprintf(out, "\n%s", database[i][ADDRESS2]); + if(db_fget(i, ADDRESS2)) + fprintf(out, "\n%s", db_fget(i, ADDRESS2)); - if (database[i][CITY]) - fprintf(out, "\n%s", database[i][CITY]); + if(db_fget(i, CITY)) + fprintf(out, "\n%s", db_fget(i, CITY)); - if (database[i][STATE] || database[i][ZIP]) { + if(db_fget(i, STATE) || db_fget(i, ZIP)) { fputc('\n', out); - if(database[i][STATE]) { - fprintf(out, "%s", database[i][STATE]); - if(database[i][ZIP]) + if(db_fget(i, STATE)) { + fprintf(out, "%s", db_fget(i, STATE)); + if(db_fget(i, ZIP)) fputc(' ', out); } - if(database[i][ZIP]) - fprintf(out, "%s", database[i][ZIP]); + if(db_fget(i, ZIP)) + fprintf(out, "%s", db_fget(i, ZIP)); } - if (database[i][COUNTRY]) - fprintf(out, "\n%s", database[i][COUNTRY]); + if(db_fget(i, COUNTRY)) + fprintf(out, "\n%s", db_fget(i, COUNTRY)); } @@ -1654,44 +1654,43 @@ text_write_address_uk(FILE *out, int i) { int j; - for (j = ADDRESS; j <= COUNTRY; j++) - if (database[i][j]) - fprintf(out, "\n%s", database[i][j]); + for(j = ADDRESS; j <= COUNTRY; j++) + if(db_fget(i, j)) + fprintf(out, "\n%s", db_fget(i, j)); } static void text_write_address_eu(FILE *out, int i) { - fprintf(out, "\n%s", database[i][ADDRESS]); + fprintf(out, "\n%s", db_fget(i, ADDRESS)); - if (database[i][ADDRESS2]) - fprintf(out, "\n%s", database[i][ADDRESS2]); + if(db_fget(i, ADDRESS2)) + fprintf(out, "\n%s", db_fget(i, ADDRESS2)); - if (database[i][ZIP] || database[i][CITY]) { + if(db_fget(i, ZIP) || db_fget(i, CITY)) { fputc('\n', out); - if(database[i][ZIP]) { - fprintf(out, "%s", database[i][ZIP]); - if(database[i][CITY]) + if(db_fget(i, ZIP)) { + fprintf(out, "%s", db_fget(i, ZIP)); + if(db_fget(i, CITY)) fputc(' ', out); } - if(database[i][CITY]) - fprintf(out, "%s", database[i][CITY]); + fprintf(out, "%s", safe_str(db_fget(i, CITY))); } - if (database[i][STATE]) - fprintf(out, "\n%s", database[i][STATE]); + if(db_fget(i, STATE)) + fprintf(out, "\n%s", db_fget(i, STATE)); - if (database[i][COUNTRY]) - fprintf(out, "\n%s", database[i][COUNTRY]); + if(db_fget(i, COUNTRY)) + fprintf(out, "\n%s", db_fget(i, COUNTRY)); } static int text_export_database(FILE * out, struct db_enumerator e) { - char emails[MAX_EMAILS][MAX_EMAIL_LEN]; + abook_list *emails, *em; int j; - char *realname = get_real_name(); + char *realname = get_real_name(), *str = NULL; char *style = opt_get_str(STR_ADDRESS_STYLE); fprintf(out, @@ -1703,23 +1702,25 @@ db_enumerate_items(e) { fprintf(out, "-----------------------------------------\n\n"); - fprintf(out, "%s", database[e.item][NAME]); - if (database[e.item][NICK] && *database[e.item][NICK]) - fprintf(out, "\n(%s)", database[e.item][NICK]); + fprintf(out, "%s", db_name_get(e.item)); + if(db_fget(e.item, NICK) && *db_fget(e.item, NICK)) + fprintf(out, "\n(%s)", db_fget(e.item, NICK)); fprintf(out, "\n"); - if (*database[e.item][EMAIL]) { + if(*db_email_get(e.item)) { + emails = csv_to_abook_list(db_email_get(e.item)); + fprintf(out, "\n"); - split_emailstr(e.item, emails); - for (j = 0; j < MAX_EMAILS; j++) - if (*emails[j]) - fprintf(out, "%s\n", emails[j]); + for(em = emails; em; em = em->next) + fprintf(out, "%s\n", em->data); + + abook_list_free(&emails); } /* Print address */ - if (database[e.item][ADDRESS]) { - if (!safe_strcmp(style, "us")) /* US like */ + if(db_fget(e.item, ADDRESS)) { + if(!safe_strcmp(style, "us")) /* US like */ text_write_address_us(out, e.item); - else if (!safe_strcmp(style, "uk")) /* UK like */ + else if(!safe_strcmp(style, "uk")) /* UK like */ text_write_address_uk(out, e.item); else /* EU like */ text_write_address_eu(out, e.item); @@ -1727,22 +1728,24 @@ fprintf(out, "\n"); } - if ((database[e.item][PHONE]) || - (database[e.item][WORKPHONE]) || - (database[e.item][FAX]) || - (database[e.item][MOBILEPHONE])) { + if((db_fget(e.item, PHONE)) || + (db_fget(e.item, WORKPHONE)) || + (db_fget(e.item, FAX)) || + (db_fget(e.item, MOBILEPHONE))) { fprintf(out, "\n"); - for (j = PHONE; j <= MOBILEPHONE; j++) - if (database[e.item][j]) - fprintf(out, "%s: %s\n", - abook_fields[j].name, - database[e.item][j]); + for(j = PHONE; j <= MOBILEPHONE; j++) + if(db_fget(e.item, j)) { + get_field_keyname(field_id(j), + NULL, &str); + fprintf(out, "%s: %s\n", str, + db_fget(e.item, j)); + } } - if (database[e.item][URL]) - fprintf(out, "\n%s\n", database[e.item][URL]); - if (database[e.item][NOTES]) - fprintf(out, "\n%s\n", database[e.item][NOTES]); + if(db_fget(e.item, URL)) + fprintf(out, "\n%s\n", db_fget(e.item, URL)); + if(db_fget(e.item, NOTES)) + fprintf(out, "\n%s\n", db_fget(e.item, NOTES)); fprintf(out, "\n"); } @@ -1769,10 +1772,7 @@ db_enumerate_items(e) { alias = mutt_alias_genalias(e.item); get_first_email(email, e.item); - fprintf(out, "%s = %s = %s\n", - alias, - database[e.item][NAME], - email); + fprintf(out, "%s = %s = %s\n",alias,db_name_get(e.item),email); xfree(alias); } @@ -1793,16 +1793,16 @@ { char email[MAX_EMAIL_LEN]; - fprintf (out, "# This is a generated file made by abook for the Spruce e-mail client.\n\n"); + fprintf(out, "# This is a generated file made by abook for the Spruce e-mail client.\n\n"); db_enumerate_items(e) { - if(strcmp (safe_str(database[e.item][EMAIL]), "")) { + if(strcmp(safe_str(db_email_get(e.item)), "")) { get_first_email(email, e.item); fprintf(out, "# Address %d\nName: %s\nEmail: %s\nMemo: %s\n\n", e.item, - database[e.item][NAME], + db_name_get(e.item), email, - safe_str(database[e.item][NOTES]) + safe_str(db_fget(e.item, NOTES)) ); } } @@ -1823,19 +1823,19 @@ static int wl_export_database(FILE *out, struct db_enumerator e) { - char emails[MAX_EMAILS][MAX_EMAIL_LEN]; + abook_list *emails; - fprintf (out, "# Wanderlust address book written by %s\n\n", PACKAGE); + fprintf(out, "# Wanderlust address book written by %s\n\n", PACKAGE); db_enumerate_items(e) { - split_emailstr(e.item, emails); - if (**emails) { + if((emails = csv_to_abook_list(db_email_get(e.item))) != NULL) { fprintf(out, "%s\t\"%s\"\t\"%s\"\n", - *emails, - safe_str(database[e.item][NICK]), - safe_str(database[e.item][NAME]) + emails->data, + safe_str(db_fget(e.item, NICK)), + safe_str(db_name_get(e.item)) ); } + abook_list_free(&emails); } fprintf (out, "\n# End of address book file.\n"); Index: aclocal.m4 =================================================================== RCS file: /cvsroot/abook/abook/aclocal.m4,v retrieving revision 1.27 retrieving revision 1.28 diff -u -d -r1.27 -r1.28 --- aclocal.m4 17 Sep 2005 10:10:25 -0000 1.27 +++ aclocal.m4 25 Oct 2005 23:27:24 -0000 1.28 @@ -1,7 +1,7 @@ -# generated automatically by aclocal 1.9.3 -*- Autoconf -*- +# generated automatically by aclocal 1.9.5 -*- Autoconf -*- -# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004 -# Free Software Foundation, Inc. +# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, +# 2005 Free Software Foundation, Inc. # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. @@ -11,23 +11,11 @@ # even the implied warranty of MERCHANTABILITY or FITNESS FOR A # PARTICULAR PURPOSE. -# -*- Autoconf -*- -# Copyright (C) 2002, 2003 Free Software Foundation, Inc. -# Generated from amversion.in; do not edit by hand. - -# This program is free software; you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation; either version 2, or (at your option) -# any later version. - -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. - -# You should have received a copy of the GNU General Public License -# along with this program; if not, write to the Free Software -# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA +# Copyright (C) 2002, 2003, 2005 Free Software Foundation, Inc. +# +# This file is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. # AM_AUTOMAKE_VERSION(VERSION) # ---------------------------- @@ -40,26 +28,15 @@ # Call AM_AUTOMAKE_VERSION so it can be traced. # This function is AC_REQUIREd by AC_INIT_AUTOMAKE. AC_DEFUN([AM_SET_CURRENT_AUTOMAKE_VERSION], - [AM_AUTOMAKE_VERSION([1.9.3])]) - -# AM_AUX_DIR_EXPAND - -# Copyright (C) 2001, 2003 Free Software Foundation, Inc. - -# This program is free software; you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation; either version 2, or (at your option) -# any later version. + [AM_AUTOMAKE_VERSION([1.9.5])]) -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. +# AM_AUX_DIR_EXPAND -*- Autoconf -*- -# You should have received a copy of the GNU General Public License -# along with this program; if not, write to the Free Software -# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA -# 02111-1307, USA. +# Copyright (C) 2001, 2003, 2005 Free Software Foundation, Inc. +# +# This file is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. # For projects using AC_CONFIG_AUX_DIR([foo]), Autoconf sets # $ac_aux_dir to `$srcdir/foo'. In other projects, it is set to @@ -106,26 +83,16 @@ am_aux_dir=`cd $ac_aux_dir && pwd` ]) -# AM_CONDITIONAL -*- Autoconf -*- - -# Copyright (C) 1997, 2000, 2001, 2003, 2004 Free Software Foundation, Inc. - -# This program is free software; you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation; either version 2, or (at your option) -# any later version. - -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. +# AM_CONDITIONAL -*- Autoconf -*- -# You should have received a copy of the GNU General Public License -# along with this program; if not, write to the Free Software -# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA -# 02111-1307, USA. +# Copyright (C) 1997, 2000, 2001, 2003, 2004, 2005 +# Free Software Foundation, Inc. +# +# This file is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. -# serial 6 +# serial 7 # AM_CONDITIONAL(NAME, SHELL-CONDITION) # ------------------------------------- @@ -149,26 +116,15 @@ Usually this means the macro was only invoked conditionally.]]) fi])]) -# serial 7 -*- Autoconf -*- -# Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004 +# Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005 # Free Software Foundation, Inc. +# +# This file is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. -# This program is free software; you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation; either version 2, or (at your option) -# any later version. - -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. - -# You should have received a copy of the GNU General Public License -# along with this program; if not, write to the Free Software -# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA -# 02111-1307, USA. - +# serial 8 # There are a few dirty hacks below to avoid letting `AC_PROG_CC' be # written in clear, in which case automake, when reading aclocal.m4, @@ -177,7 +133,6 @@ # CC etc. in the Makefile, will ask for an AC_PROG_CC use... - # _AM_DEPENDENCIES(NAME) # ---------------------- # See how the compiler implements dependency checking. @@ -317,27 +272,16 @@ AC_SUBST([AMDEPBACKSLASH]) ]) -# Generate code to set up dependency tracking. -*- Autoconf -*- - -# Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004 -# Free Software Foundation, Inc. - -# This program is free software; you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation; either version 2, or (at your option) -# any later version. - -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. +# Generate code to set up dependency tracking. -*- Autoconf -*- -# You should have received a copy of the GNU General Public License -# along with this program; if not, write to the Free Software -# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA -# 02111-1307, USA. +# Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005 +# Free Software Foundation, Inc. +# +# This file is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. -#serial 2 +#serial 3 # _AM_OUTPUT_DEPENDENCY_COMMANDS # ------------------------------ @@ -396,54 +340,31 @@ [AMDEP_TRUE="$AMDEP_TRUE" ac_aux_dir="$ac_aux_dir"]) ]) -# Like AC_CONFIG_HEADER, but automatically create stamp file. -*- Autoconf -*- - -# Copyright (C) 1996, 1997, 2000, 2001, 2003 Free Software Foundation, Inc. - -# This program is free software; you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation; either version 2, or (at your option) -# any later version. - -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. - -# You should have received a copy of the GNU General Public License -# along with this program; if not, write to the Free Software -# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA -# 02111-1307, USA. +# Copyright (C) 1996, 1997, 2000, 2001, 2003, 2005 +# Free Software Foundation, Inc. +# +# This file is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. -# serial 7 +# serial 8 # AM_CONFIG_HEADER is obsolete. It has been replaced by AC_CONFIG_HEADERS. AU_DEFUN([AM_CONFIG_HEADER], [AC_CONFIG_HEADERS($@)]) -# Do all the work for Automake. -*- Autoconf -*- - -# This macro actually does too much some checks are only needed if -# your package does certain things. But this isn't really a big deal. +# Do all the work for Automake. -*- Autoconf -*- -# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004 +# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005 # Free Software Foundation, Inc. +# +# This file is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. -# This program is free software; you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation; either version 2, or (at your option) -# any later version. - -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. - -# You should have received a copy of the GNU General Public License -# along with this program; if not, write to the Free Software -# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA -# 02111-1307, USA. +# serial 12 -# serial 11 +# This macro actually does too much. Some checks are only needed if +# your package does certain things. But this isn't really a big deal. # AM_INIT_AUTOMAKE(PACKAGE, VERSION, [NO-DEFINE]) # AM_INIT_AUTOMAKE([OPTIONS]) @@ -545,51 +466,27 @@ done echo "timestamp for $1" >`AS_DIRNAME([$1])`/stamp-h[]$_am_stamp_count]) +# Copyright (C) 2001, 2003, 2005 Free Software Foundation, Inc. +# +# This file is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + # AM_PROG_INSTALL_SH # ------------------ # Define $install_sh. - -# Copyright (C) 2001, 2003 Free Software Foundation, Inc. - -# This program is free software; you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation; either version 2, or (at your option) -# any later version. - -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. - -# You should have received a copy of the GNU General Public License -# along with this program; if not, write to the Free Software -# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA -# 02111-1307, USA. - AC_DEFUN([AM_PROG_INSTALL_SH], [AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl install_sh=${install_sh-"$am_aux_dir/install-sh"} AC_SUBST(install_sh)]) -# -*- Autoconf -*- -# Copyright (C) 2003 Free Software Foundation, Inc. - -# This program is free software; you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation; either version 2, or (at your option) -# any later version. - -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. - -# You should have received a copy of the GNU General Public License -# along with this program; if not, write to the Free Software -# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA -# 02111-1307, USA. +# Copyright (C) 2003, 2005 Free Software Foundation, Inc. +# +# This file is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. -# serial 1 +# serial 2 # Check whether the underlying file-system supports filenames # with a leading dot. For instance MS-DOS doesn't. @@ -604,26 +501,15 @@ rmdir .tst 2>/dev/null AC_SUBST([am__leading_dot])]) -# Check to see how 'make' treats includes. -*- Autoconf -*- - -# Copyright (C) 2001, 2002, 2003 Free Software Foundation, Inc. - -# This program is free software; you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation; either version 2, or (at your option) -# any later version. - -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. +# Check to see how 'make' treats includes. -*- Autoconf -*- -# You should have received a copy of the GNU General Public License -# along with this program; if not, write to the Free Software -# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA -# 02111-1307, USA. +# Copyright (C) 2001, 2002, 2003, 2005 Free Software Foundation, Inc. +# +# This file is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. -# serial 2 +# serial 3 # AM_MAKE_INCLUDE() # ----------------- @@ -667,27 +553,16 @@ rm -f confinc confmf ]) -# -*- Autoconf -*- - - -# Copyright (C) 1997, 1999, 2000, 2001, 2003 Free Software Foundation, Inc. - -# This program is free software; you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation; either version 2, or (at your option) -# any later version. - -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. +# Fake the existence of programs that GNU maintainers use. -*- Autoconf -*- -# You should have received a copy of the GNU General Public License -# along with this program; if not, write to the Free Software -# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA -# 02111-1307, USA. +# Copyright (C) 1997, 1999, 2000, 2001, 2003, 2005 +# Free Software Foundation, Inc. +# +# This file is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. -# serial 3 +# serial 4 # AM_MISSING_PROG(NAME, PROGRAM) # ------------------------------ @@ -713,27 +588,16 @@ fi ]) +# Copyright (C) 2003, 2004, 2005 Free Software Foundation, Inc. +# +# This file is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + # AM_PROG_MKDIR_P # --------------- # Check whether `mkdir -p' is supported, fallback to mkinstalldirs otherwise. - -# Copyright (C) 2003, 2004 Free Software Foundation, Inc. - -# This program is free software; you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation; either version 2, or (at your option) -# any later version. - -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. - -# You should have received a copy of the GNU General Public License -# along with this program; if not, write to the Free Software -# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA -# 02111-1307, USA. - +# # Automake 1.8 used `mkdir -m 0755 -p --' to ensure that directories # created by `make install' are always world readable, even if the # installer happens to have an overly restrictive umask (e.g. 077). @@ -787,26 +651,15 @@ fi AC_SUBST([mkdir_p])]) -# Helper functions for option handling. -*- Autoconf -*- - -# Copyright (C) 2001, 2002, 2003 Free Software Foundation, Inc. - -# This program is free software; you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation; either version 2, or (at your option) -# any later version. - -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. +# Helper functions for option handling. -*- Autoconf -*- -# You should have received a copy of the GNU General Public License -# along with this program; if not, write to the Free Software -# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA -# 02111-1307, USA. +# Copyright (C) 2001, 2002, 2003, 2005 Free Software Foundation, Inc. +# +# This file is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. -# serial 2 +# serial 3 # _AM_MANGLE_OPTION(NAME) # ----------------------- @@ -831,26 +684,14 @@ AC_DEFUN([_AM_IF_OPTION], [m4_ifset(_AM_MANGLE_OPTION([$1]), [$2], [$3])]) - -# Copyright (C) 1996, 1997, 1998, 2000, 2001, 2002, 2003 +# Copyright (C) 1996, 1997, 1998, 2000, 2001, 2002, 2003, 2005 # Free Software Foundation, Inc. +# +# This file is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. -# This program is free software; you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation; either version 2, or (at your option) -# any later version. - -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. - -# You should have received a copy of the GNU General Public License -# along with this program; if not, write to the Free Software -# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA -# 02111-1307, USA. - -# serial 3 +# serial 4 AC_DEFUN([AM_C_PROTOTYPES], [AC_REQUIRE([AC_C_PROTOTYPES]) @@ -868,28 +709,16 @@ AU_DEFUN([fp_C_PROTOTYPES], [AM_C_PROTOTYPES]) -# -# Check to make sure that the build environment is sane. -# - -# Copyright (C) 1996, 1997, 2000, 2001, 2003 Free Software Foundation, Inc. - -# This program is free software; you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation; either version 2, or (at your option) -# any later version. - -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. +# Check to make sure that the build environment is sane. -*- Autoconf -*- -# You should have received a copy of the GNU General Public License -# along with this program; if not, write to the Free Software -# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA -# 02111-1307, USA. +# Copyright (C) 1996, 1997, 2000, 2001, 2003, 2005 +# Free Software Foundation, Inc. +# +# This file is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. -# serial 3 +# serial 4 # AM_SANITY_CHECK # --------------- @@ -932,25 +761,14 @@ fi AC_MSG_RESULT(yes)]) -# AM_PROG_INSTALL_STRIP - -# Copyright (C) 2001, 2003 Free Software Foundation, Inc. - -# This program is free software; you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation; either version 2, or (at your option) -# any later version. - -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. - -# You should have received a copy of the GNU General Public License -# along with this program; if not, write to the Free Software -# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA -# 02111-1307, USA. +# Copyright (C) 2001, 2003, 2005 Free Software Foundation, Inc. +# +# This file is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. +# AM_PROG_INSTALL_STRIP +# --------------------- # One issue with vendor `install' (even GNU) is that you can't # specify the program used to strip binaries. This is especially # annoying in cross-compiling environments, where the build's strip @@ -973,25 +791,13 @@ # Check how to create a tarball. -*- Autoconf -*- -# Copyright (C) 2004 Free Software Foundation, Inc. - -# This program is free software; you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation; either version 2, or (at your option) -# any later version. - -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. - -# You should have received a copy of the GNU General Public License -# along with this program; if not, write to the Free Software -# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA -# 02111-1307, USA. - -# serial 1 +# Copyright (C) 2004, 2005 Free Software Foundation, Inc. +# +# This file is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. +# serial 2 # _AM_PROG_TAR(FORMAT) # -------------------- Index: options.h =================================================================== RCS file: /cvsroot/abook/abook/options.h,v retrieving revision 1.9 retrieving revision 1.10 diff -u -d -r1.9 -r1.10 --- options.h 29 May 2005 16:32:24 -0000 1.9 +++ options.h 25 Oct 2005 23:27:24 -0000 1.10 @@ -8,9 +8,16 @@ #endif /* - * bool options + * token parsing options */ +#define TOKEN_ALLOC (1<<1) /* allocate memory for the token */ +#define TOKEN_EQUAL (1<<2) /* left hand value of assignment */ +#define TOKEN_COMMA (1<<3) /* comma is a separator */ + +/* + * bool options + */ enum bool_opts { BOOL_AUTOSAVE, @@ -43,6 +50,7 @@ STR_PRINT_COMMAND, STR_WWW_COMMAND, STR_ADDRESS_STYLE, + STR_PRESERVE_FIELDS, STR_SORT_FIELD, STR_MAX }; Index: list.c =================================================================== RCS file: /cvsroot/abook/abook/list.c,v retrieving revision 1.27 retrieving revision 1.28 diff -u -d -r1.27 -r1.28 --- list.c 17 Sep 2005 10:10:26 -0000 1.27 +++ list.c 25 Oct 2005 23:27:24 -0000 1.28 @@ -20,8 +20,6 @@ #include "options.h" #include "xmalloc.h" -#define MIN_EXTRA_COLUMN ADDRESS /* 2 */ -#define MAX_EXTRA_COLUMN LAST_FIELD int curitem = -1; int first_list_item = -1; @@ -31,29 +29,24 @@ int extra_alternative = -1; extern int items; -extern list_item *database; -extern struct abook_field abook_fields[]; +extern abook_field_list *fields_list; static WINDOW *list = NULL; -static int + +int init_extra_field(enum str_opts option) { - int i, ret = -1; + int ret = -1; char *option_str; option_str = opt_get_str(option); if(option_str && *option_str) { - for(i = 0; i < ITEM_FIELDS; i++) { - if(!strcasecmp(option_str, abook_fields[i].key)) { - ret = i; - break; - } - } - if(ret < MIN_EXTRA_COLUMN || ret > MAX_EXTRA_COLUMN) { + find_field_number(option_str, &ret); + + if(!strcmp(option_str, "name") || !strcmp(option_str, "email")) ret = -1; - } } return ret; @@ -135,41 +128,47 @@ if(selected[i]) mvwaddch(list, line, 0, '*' ); - mvwaddnstr(list, line, NAMEPOS, database[i][NAME], - bytes2width(database[i][NAME], NAMELEN)); + mvwaddnstr(list, line, NAMEPOS, db_name_get(i), + bytes2width(db_name_get(i), NAMELEN)); + if(opt_get_bool(BOOL_SHOW_ALL_EMAILS)) - mvwaddnstr(list, line, EMAILPOS, database[i][EMAIL], - bytes2width(database[i][EMAIL], real_emaillen)); + mvwaddnstr(list, line, EMAILPOS, db_email_get(i), + bytes2width(db_email_get(i), real_emaillen)); else { get_first_email(tmp, i); mvwaddnstr(list, line, EMAILPOS, tmp, - bytes2width(tmp, real_emaillen)); + bytes2width(tmp, real_emaillen)); } - if(extra < 0 || !database[i][extra]) + if(extra < 0 || !db_fget_byid(i, extra)) extra = extra_alternative; if(extra >= 0) mvwaddnstr(list, line, EXTRAPOS, - safe_str(database[i][extra]), - bytes2width(safe_str(database[i][extra]), EXTRALEN)); + safe_str(db_fget_byid(i, extra)), + bytes2width(safe_str(db_fget_byid(i, extra)), + EXTRALEN)); scrollok(list, TRUE); if(highlight) wstandend(list); } - void list_headerline() { + char *str = NULL; + #if defined(A_BOLD) && defined(A_NORMAL) attrset(A_BOLD); #endif - mvaddstr(2, NAMEPOS, gettext(abook_fields[NAME].name)); - mvaddstr(2, EMAILPOS, gettext(abook_fields[EMAIL].name)); - if(extra_column > 0) - mvaddnstr(2, EXTRAPOS, gettext(abook_fields[extra_column].name), - COLS-EXTRAPOS); + + mvaddstr(2, NAMEPOS, find_field("name", NULL)->name); + mvaddstr(2, EMAILPOS, find_field("email", NULL)->name); + if(extra_column > 0) { + get_field_keyname(extra_column, NULL, &str); + mvaddnstr(2, EXTRAPOS, str, COLS - EXTRAPOS); + } + #if defined(A_BOLD) && defined(A_NORMAL) attrset(A_NORMAL); #endif @@ -243,25 +242,31 @@ if( curitem < 0 || curitem > LAST_ITEM ) return; - itemcpy(tmp, database[curitem]); + tmp = item_create(); + item_copy(tmp, db_item_get(curitem)); - switch(direction) { - case MOVE_ITEM_UP: - if( curitem < 1 ) - return; - itemcpy(database[curitem], database[curitem - 1]); - itemcpy(database[curitem-1], tmp); - scroll_up(); - break; + switch(direction) { + case MOVE_ITEM_UP: + if( curitem < 1 ) + goto out_move; + item_copy(db_item_get(curitem), + db_item_get(curitem - 1)); + item_copy(db_item_get(curitem-1), tmp); + scroll_up(); + break; - case MOVE_ITEM_DOWN: - if( curitem >= LAST_ITEM ) - return; - itemcpy(database[curitem], database[curitem + 1]); - itemcpy(database[curitem+1], tmp); - scroll_down(); - break; - } + case MOVE_ITEM_DOWN: + if( curitem >= LAST_ITEM ) + goto out_move; + item_copy(db_item_get(curitem), + db_item_get(curitem + 1)); + item_copy(db_item_get(curitem + 1), tmp); + scroll_down(); + break; + } + +out_move: + item_free(&tmp); } void @@ -282,7 +287,6 @@ refresh_list(); } - void highlight_line(WINDOW *win, int line) { @@ -349,18 +353,18 @@ int duplicate_item() { - int i; list_item item; - + if(curitem < 0) return 1; - for(i = 0; i < ITEM_FIELDS; i++) - item[i] = database[curitem][i] ? xstrdup(database[curitem][i]) : - NULL; - - if(add_item2database(item)) + item = item_create(); + item_duplicate(item, db_item_get(curitem)); + if(add_item2database(item)) { + item_free(&item); return 1; + } + item_free(&item); curitem = LAST_ITEM; refresh_list(); Index: options.c =================================================================== RCS file: /cvsroot/abook/abook/options.c,v retrieving revision 1.27 retrieving revision 1.28 diff -u -d -r1.27 -r1.28 --- options.c 21 Sep 2005 16:50:31 -0000 1.27 +++ options.c 25 Oct 2005 23:27:24 -0000 1.28 @@ -17,6 +17,7 @@ #include "abook.h" #include "gettext.h" #include "misc.h" +#include "views.h" #include "xmalloc.h" #ifndef FALSE @@ -67,6 +68,7 @@ { "use_ascii_only", OT_BOOL, BOOL_USE_ASCII_ONLY, FALSE }, { "add_email_prevent_duplicates", OT_BOOL, BOOL_ADD_EMAIL_PREVENT_DUPLICATES, FALSE }, + { "preserve_fields", OT_STR, STR_PRESERVE_FIELDS, UL "standard" }, { "sort_field", OT_STR, STR_SORT_FIELD, UL "nick" }, { "show_cursor", OT_BOOL, BOOL_SHOW_CURSOR, FALSE }, @@ -206,28 +208,78 @@ } } -void -find_token_start(buffer *b) +/* After calling, + * - b->data points to the found token, or NULL is end of parsing + * - b->ptr points to the begining of next token + * + * If the TOKEN_ALLOC option is used, the original string is not mangled + * and memory is allocated for the token. + */ +static char * +get_token(buffer *b, int options) { + char quote = 0, c; + char *end = NULL; + assert(b); - for(; ISSPACE(*b -> ptr); b -> ptr ++); -} + SKIPWS(b->ptr); + if(*b->ptr && strchr("\"'", *b->ptr)) + quote = *(b->ptr++); + b->data = b->ptr; -void -find_token_end(buffer *b) -{ - assert(b); + while(1) { + if(!(c = *b->ptr)) { + end = b->ptr; + break; + } - for(find_token_start(b); *(b -> ptr); b -> ptr ++) { - if(ISSPACE(*(b -> ptr))) { + if(!quote && ( + ISSPACE(c) || + ((options & TOKEN_EQUAL) && (c == '=')) || + ((options & TOKEN_COMMA) && (c == ','))) + ) { + end = b->ptr; + break; + } else if(c == quote) { + quote = 0; + end = b->ptr++; break; } + + b->ptr++; + } + + if(quote) + return _("quote mismatch"); + + if(options & (TOKEN_EQUAL | TOKEN_COMMA)) + SKIPWS(b->ptr); /* whitespaces can precede the sign */ + + if((options & TOKEN_EQUAL) && (*b->ptr != '=')) + return _("no assignment character found"); + + if((options & TOKEN_COMMA) && *b->ptr && (*b->ptr != ',')) + return _("error in comma separated list"); + + if(b->ptr == b->data) { + b->data = NULL; + return NULL; /* no error, just end of parsing */ } + + if(options & TOKEN_ALLOC) /* freeing is the caller's responsibility */ + b->data = xstrndup(b->data, end - b->data); + else + *end = 0; + + b->ptr++; /* advance to next token */ + SKIPWS(b->ptr); + + return NULL; } static char * -opt_set_set_option(char *var, char *p, struct option *opt) +opt_set_set_option(char *p, struct option *opt) { int len; @@ -266,59 +318,139 @@ } static char * -opt_parse_set(buffer *b) +opt_set_option(char *var, char *p) { int i; - char *p; - find_token_start(b); - if((p = strchr(b -> ptr, '='))) - *p++ = 0; - else - return _("invalid value assignment"); + for(i = 0; abook_vars[i].option; i++) + if(!strcmp(abook_vars[i].option, var)) + return opt_set_set_option(p, &abook_vars[i]); - strtrim(b -> ptr); + return _("unknown option"); +} - for(i = 0;abook_vars[i].option; i++) - if(!strcmp(abook_vars[i].option, b -> ptr)) - return opt_set_set_option(b -> ptr, p, &abook_vars[i]); +static int +check_options() +{ + char *str; + int err = 0; - return _("unknown option"); + str = opt_get_str(STR_PRESERVE_FIELDS); + if(strcasecmp(str, "all") && strcasecmp(str, "none") && + strcasecmp(str, "standard")) { + fprintf(stderr, _("valid values for the 'preserve_fields' " + "option are 'all', 'standard' " + "(default), and 'none'\n")); + restore_default(&abook_vars[STR_PRESERVE_FIELDS]); + err++; + } + str = opt_get_str(STR_ADDRESS_STYLE); + if(strcasecmp(str, "eu") && strcasecmp(str, "uk") && + strcasecmp(str, "us")) { + fprintf(stderr, _("valid values for the 'address_style' " + "option are 'eu' (default), 'uk', " + "and 'us'\n")); + restore_default(&abook_vars[STR_ADDRESS_STYLE]); + err++; + } + + return err; } -#include "database.h" /* needed for change_custom_field_name */ +/* + * syntax: set <option> = <value> + */ +static char * +opt_parse_set(buffer *b) +{ + char *var, *err; + + if((err = get_token(b, TOKEN_EQUAL))) + return err; + + if((var = b->data... [truncated message content] |
From: Cedric D. <cd...@us...> - 2005-10-25 23:27:41
|
Update of /cvsroot/abook/abook/po In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv8391/po Modified Files: POTFILES.in Log Message: Support for dynamic views. * Two new configuration commands: 'field' and 'view'. * A new configuration variable: 'preserve_fields'. * In absence of user configuration, abook behaves and displays mostly like previous releases. * More abstraction for database access. db_field_get(), db_field_put(), etc. * Functions for handling lists of strings (abook_list) * Functions for conversting abook_lists to CSV and vice-versa. * Arbitrary number of email addresses internally. Still limited to 9 for practical reasons with the UI. * Up to 35 fields per view. * Escape as a modifier key in the editor. * Addresses can be rolled both directions (esc-r). * Fixed html produced by export filter. * Updated abookrc man page and sample.abookrc accordingly. Index: POTFILES.in =================================================================== RCS file: /cvsroot/abook/abook/po/POTFILES.in,v retrieving revision 1.1 retrieving revision 1.2 diff -u -d -r1.1 -r1.2 --- POTFILES.in 17 Sep 2005 10:10:26 -0000 1.1 +++ POTFILES.in 25 Oct 2005 23:27:24 -0000 1.2 @@ -9,3 +9,4 @@ list.c options.c ui.c +views.c |
From: Cedric D. <cd...@us...> - 2005-10-22 19:55:29
|
Update of /cvsroot/abook/abook In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv1136 Modified Files: Makefile.am configure.in Log Message: Fix libintl build (thanks to TAKAHASHI Tamotsu). Index: Makefile.am =================================================================== RCS file: /cvsroot/abook/abook/Makefile.am,v retrieving revision 1.15 retrieving revision 1.16 diff -u -d -r1.15 -r1.16 --- Makefile.am 30 Sep 2005 16:30:03 -0000 1.15 +++ Makefile.am 22 Oct 2005 19:55:21 -0000 1.16 @@ -13,6 +13,8 @@ EXTRA_DIST = config.rpath ANNOUNCE BUGS FAQ abook.1 abookrc.5 sample.abookrc \ abook.spec contrib doc/HOWTO.translating_abook +abook_LDADD = @LIBINTL@ + install-data-local: $(mkinstalldirs) $(DESTDIR)$(mandir)/man1 $(DESTDIR)$(mandir)/man5 $(INSTALL_DATA) $(srcdir)/abook.1 $(DESTDIR)$(mandir)/man1/ @@ -26,3 +28,7 @@ SUBDIRS = intl po ACLOCAL_AMFLAGS = -I m4 + +if USE_INCLUDED_INTL_H +AM_CPPFLAGS = -Iintl +endif Index: configure.in =================================================================== RCS file: /cvsroot/abook/abook/configure.in,v retrieving revision 1.49 retrieving revision 1.50 diff -u -d -r1.49 -r1.50 --- configure.in 18 Oct 2005 06:51:14 -0000 1.49 +++ configure.in 22 Oct 2005 19:55:21 -0000 1.50 @@ -30,6 +30,8 @@ AC_DEFINE_UNQUOTED(LOCALEDIR, "$abook_localedir", [locale directory]) AC_SUBST(localedir) +AM_CONDITIONAL(USE_INCLUDED_INTL_H, test x$USE_INCLUDED_LIBINTL = xyes) + dnl ---------------------- dnl end of gettext support dnl ---------------------- |
From: Cedric D. <cd...@us...> - 2005-10-20 13:59:44
|
Update of /cvsroot/abook/abook In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv8171 Modified Files: edit.c Log Message: Fixed 'undo' command corrupting the database when used after changing of item within the editor. Index: edit.c =================================================================== RCS file: /cvsroot/abook/abook/edit.c,v retrieving revision 1.42 retrieving revision 1.43 diff -u -d -r1.42 -r1.43 --- edit.c 5 Oct 2005 11:03:36 -0000 1.42 +++ edit.c 20 Oct 2005 13:59:30 -0000 1.43 @@ -129,11 +129,12 @@ CLEAR_UNDO }; -static void +static int edit_undo(int item, int mode) { int i; static list_item *backup = NULL; + static int backed_up_item = -1; switch(mode) { case CLEAR_UNDO: @@ -154,17 +155,21 @@ else backup[0][i] = xstrdup(database[item][i]); + backed_up_item = item; break; case RESTORE_ITEM: if(backup) { - free_list_item(database[item]); - itemcpy(database[item], backup[0]); + free_list_item(database[backed_up_item]); + itemcpy(database[backed_up_item], backup[0]); xfree(backup); + return backed_up_item; } break; default: assert(0); } + + return item; } @@ -428,7 +433,7 @@ case 'j': if(is_valid_item(item + 1)) item++; break; case 'r': roll_emails(item); break; case '?': display_help(HELP_EDITOR); break; - case 'u': edit_undo(item, RESTORE_ITEM); break; + case 'u': item = edit_undo(item, RESTORE_ITEM); break; case 'm': launch_mutt(item); clearok(stdscr, 1); break; case 'v': launch_wwwbrowser(item); clearok(stdscr, 1); break; case 12 : clearok(stdscr, 1); break; /* ^L (refresh screen) */ |