X-Git-Url: https://git.deb.at/?a=blobdiff_plain;f=abook.c;h=4c9df4f1483465d1b320a8da7c652f4adc95f076;hb=ef379a20d142cb95ba08c7887c8e3245269b3fdd;hp=24d9f52d1df53d32907cf95271057e0c1f07367f;hpb=d052c08764e3761670103bbf39b160c31815d78d;p=pkg%2Fabook.git diff --git a/abook.c b/abook.c index 24d9f52..4c9df4f 100644 --- a/abook.c +++ b/abook.c @@ -189,7 +189,7 @@ main(int argc, char **argv) init_abook(); - get_commands(); + get_commands(); quit_abook(QUIT_SAVE); @@ -394,7 +394,7 @@ show_usage() { puts (PACKAGE " v " VERSION "\n"); puts (" -h --help show usage"); - puts (" -C --config use an alternative configuration file"); + puts (" -C --config use an alternative configuration file"); puts (" --datafile use an alternative addressbook file"); puts (" --mutt-query make a query for mutt"); puts (" --add-email " @@ -592,12 +592,12 @@ launch_wwwbrowser(int item) FILE * abook_fopen (const char *path, const char *mode) -{ +{ struct stat s; bool stat_ok; stat_ok = (stat(path, &s) != -1); - + if(strchr(mode, 'r')) return (stat_ok && S_ISREG(s.st_mode)) ? fopen(path, mode) : NULL; @@ -722,7 +722,7 @@ add_email_add_item(int quiet, char *name, char *email) return 0; } } - + if(!quiet) { FILE *in = fopen("/dev/tty", "r"); char c;