]> git.deb.at Git - pkg/abook.git/blobdiff - options.c
try to work around abook_readline() misbehavior on Solaris
[pkg/abook.git] / options.c
index fa0531352973a04d35e8f72686002d0922403ef5..1eed8d489aa885da960c82236da8d9f6a6a8d5d2 100644 (file)
--- a/options.c
+++ b/options.c
@@ -64,6 +64,8 @@ static struct option abook_vars[] = {
 
        { "use_ascii_only", OT_BOOL, BOOL_USE_ASCII_ONLY, FALSE },
 
+       { "add_email_prevent_duplicates", OT_BOOL, BOOL_ADD_EMAIL_PREVENT_DUPLICATES, FALSE },
+
        { NULL }
 };
 
@@ -337,7 +339,7 @@ load_opts(char *filename)
        FILE *in;
        char *line = NULL;
        int n;
-       bool err = FALSE;
+       int err = 0;
        
        if((in = fopen(filename, "r")) == NULL)
                return -1;
@@ -352,7 +354,7 @@ load_opts(char *filename)
                if(line && *line) {
                        opt_line_remove_comments(line);
                        if(*line)
-                               err = opt_parse_line(line, n, filename);
+                               err += opt_parse_line(line, n, filename) ? 1:0;
                }
 
                my_free(line);
@@ -360,11 +362,6 @@ load_opts(char *filename)
 
        free(line);
 
-       if(err) {
-               printf("Press enter to continue...\n");
-               fgetc(stdin);
-       }
-       
        return err;
 }