]> git.deb.at Git - pkg/abook.git/commitdiff
Corrected some references to MAX_EMAILS
authorJaakko Heinonen <jheinonen@users.sourceforge.net>
Sun, 19 Aug 2001 09:03:51 +0000 (09:03 +0000)
committerJaakko Heinonen <jheinonen@users.sourceforge.net>
Sun, 19 Aug 2001 09:03:51 +0000 (09:03 +0000)
database.h
edit.c

index 7d947aa529203301ee82a710e33b4bac0e382cec..4354c93f82b4004ef0b9cad03b41653cc024d5d5 100644 (file)
@@ -72,7 +72,7 @@ struct db_enumerator  init_db_enumerator(int mode);
        int _i,_j,_k,len; \
        memset(&emails, 0, sizeof(emails) ); \
        len = strlen(database[item][EMAIL]); \
-       for( _i=0,_j=0, _k=0; _i < len && _j < 4; _i++ ) { \
+       for( _i=0,_j=0, _k=0; _i < len && _j < MAX_EMAILS; _i++ ) { \
                if( database[item][EMAIL][_i] ==',' ) { \
                        _j++; \
                        _k = 0; \
diff --git a/edit.c b/edit.c
index 352ae49bd5630ec1c414ea0b048e0aa0cca0d5dd..66dae8b65d2e19aaf764bd744d912e22c4b01e0a 100644 (file)
--- a/edit.c
+++ b/edit.c
@@ -248,7 +248,7 @@ static void
 edit_emails(char c, int item)
 {
        char *field = NULL;
-       char emails[4][MAX_EMAIL_LEN];
+       char emails[MAX_EMAILS][MAX_EMAIL_LEN];
        char tmp[MAX_EMAILSTR_LEN] = "";
        int i, len;
 
@@ -268,7 +268,7 @@ edit_emails(char c, int item)
        
        my_free(database[item][EMAIL]);
 
-       for(i=0; i<4; i++) {
+       for(i=0; i<MAX_EMAILS; i++) {
                if( *emails[i] ) {
                        strcat(tmp, emails[i]);
                        strcat(tmp, ",");