From: Jaakko Heinonen Date: Tue, 29 May 2001 08:52:20 +0000 (+0000) Subject: 0.4.13pre1 updates X-Git-Tag: upstream/0.6.1~2^2~374 X-Git-Url: https://git.deb.at/?a=commitdiff_plain;h=7d0f197384f747d26191efe1cd98405401afc806;p=pkg%2Fabook.git 0.4.13pre1 updates --- diff --git a/THANKS b/THANKS index 6a04e23..9153b4c 100644 --- a/THANKS +++ b/THANKS @@ -10,5 +10,6 @@ R. Shohn Trojacek ? Shao Zhang Gustavo Niemeyer +Koenraad Heijlen See also AUTHORS diff --git a/configure b/configure index 542db2b..2ac8ce6 100755 --- a/configure +++ b/configure @@ -697,7 +697,7 @@ fi PACKAGE=abook -VERSION=0.4.13-cvs +VERSION=0.4.13pre1 if test "`cd $srcdir && pwd`" != "`pwd`" && test -f $srcdir/config.status; then { echo "configure: error: source directory already configured; run "make distclean" there first" 1>&2; exit 1; } diff --git a/configure.in b/configure.in index a67423c..b8a13b7 100644 --- a/configure.in +++ b/configure.in @@ -1,7 +1,7 @@ dnl abook configure.in AC_INIT(abook.c) -AM_INIT_AUTOMAKE(abook, 0.4.13-cvs) +AM_INIT_AUTOMAKE(abook, 0.4.13pre1) AM_CONFIG_HEADER(config.h) AC_CANONICAL_HOST diff --git a/database.c b/database.c index e324810..ddc96ab 100644 --- a/database.c +++ b/database.c @@ -421,6 +421,12 @@ is_selected(int item) return selected[item]; } +int +is_valid_item(int item) +{ + return item <= LAST_ITEM && item >= 0; +} + int real_db_enumerate_items(struct db_enumerator e) { diff --git a/database.h b/database.h index 8676f71..eff0e59 100644 --- a/database.h +++ b/database.h @@ -43,12 +43,9 @@ enum { struct db_enumerator { int item; - int mode; /* boolean */ /* warning: read only */ + int mode; /* warning: read only */ }; -#define db_enumerate_items(e) \ - while( -1 != (e.item = real_db_enumerate_items(e))) - int parse_database(FILE *in); int write_database(FILE *out, struct db_enumerator e); int load_database(char *filename); @@ -62,6 +59,7 @@ void sort_database(); char *get_surname(char *s); int find_item(char *str, int start); int is_selected(int item); +int is_valid_item(int item); int real_db_enumerate_items(struct db_enumerator e); struct db_enumerator init_db_enumerator(int mode); @@ -87,4 +85,7 @@ struct db_enumerator init_db_enumerator(int mode); #define have_multiple_emails(item) \ strchr(database[item][EMAIL], ',') +#define db_enumerate_items(e) \ + while( -1 != (e.item = real_db_enumerate_items(e))) + #endif