From: Jaakko Heinonen Date: Fri, 31 Oct 2003 15:28:58 +0000 (+0000) Subject: some whitespace changes X-Git-Tag: upstream/0.6.1~2^2~241 X-Git-Url: https://git.deb.at/?a=commitdiff_plain;h=e0e2b1ebd0bbc1728e7117ff88e5046f2870cfaa;p=pkg%2Fabook.git some whitespace changes --- diff --git a/abook.c b/abook.c index d796509..7ce99ae 100644 --- a/abook.c +++ b/abook.c @@ -139,9 +139,9 @@ init_abook() void quit_abook() { - if( opt_get_bool(BOOL_AUTOSAVE) ) + if(opt_get_bool(BOOL_AUTOSAVE)) save_database(); - else if( statusline_ask_boolean("Save database", TRUE) ) + else if(statusline_ask_boolean("Save database", TRUE)) save_database(); free_opts(); @@ -162,7 +162,7 @@ int main(int argc, char **argv) { #if defined(HAVE_SETLOCALE) && defined(HAVE_LOCALE_H) - setlocale(LC_ALL, "" ); + setlocale(LC_ALL, ""); #endif parse_command_line(argc, argv); @@ -451,7 +451,7 @@ mutt_query(char *str) putchar('\n'); while(i >= 0) { muttq_print_item(stdout, i); - i = find_item(str, i+1, search_fields); + i = find_item(str, i + 1, search_fields); } } @@ -530,8 +530,7 @@ launch_mutt(int item) } } - cmd = strconcat(mutt_command, " \'", mailstr, - "\'", NULL); + cmd = strconcat(mutt_command, " \'", mailstr, "\'", NULL); free(mailstr); #ifdef DEBUG fprintf(stderr, "cmd: %s\n", cmd); @@ -591,11 +590,11 @@ abook_realloc(void *ptr, size_t size) { ptr = realloc(ptr, size); - if( size == 0 ) + if(size == 0) return NULL; - if( ptr == NULL ) { - if( is_ui_initialized() ) + if(ptr == NULL) { + if(is_ui_initialized()) quit_abook(); perror("realloc() failed"); exit(1); @@ -642,7 +641,7 @@ convert(char *srcformat, char *srcfile, char *dstformat, char *dstfile) init_opts(); load_opts(rcfile); - switch( import_file(srcformat, srcfile) ) { + switch(import_file(srcformat, srcfile)) { case -1: fprintf(stderr, "input format %s not supported\n", srcformat); @@ -655,7 +654,7 @@ convert(char *srcformat, char *srcfile, char *dstformat, char *dstfile) } if(!ret) - switch( export_file(dstformat, dstfile) ) { + switch(export_file(dstformat, dstfile)) { case -1: fprintf(stderr, "output format %s not supported\n", @@ -775,7 +774,7 @@ add_email(int quiet) char *name = NULL, *email = NULL; struct stat s; - if( (fstat(fileno(stdin), &s)) == -1 || S_ISDIR(s.st_mode)) { + if( (fstat(fileno(stdin), &s)) == -1 || S_ISDIR(s.st_mode) ) { fprintf(stderr, "stdin is a directory or cannot stat stdin\n"); exit(1); } diff --git a/configure b/configure index 6111671..8619287 100755 --- a/configure +++ b/configure @@ -1527,7 +1527,7 @@ fi # Define the identity of the package. PACKAGE=abook - VERSION=0.5.1pre + VERSION=0.5.1 cat >>confdefs.h <<_ACEOF diff --git a/list.c b/list.c index cd7fa14..25c5382 100644 --- a/list.c +++ b/list.c @@ -87,7 +87,7 @@ refresh_list() ui_print_number_of_items(); - if( items < 1 ) { + if(items < 1) { refresh(); wrefresh(list); return; @@ -125,11 +125,11 @@ print_list_line(int i, int line, int highlight) if(highlight) highlight_line(list, line); - if( selected[i] ) + if(selected[i]) mvwaddch(list, line, 0, '*' ); mvwaddnstr(list, line, NAMEPOS, database[i][NAME], NAMELEN); - if( opt_get_bool(BOOL_SHOW_ALL_EMAILS) ) + if(opt_get_bool(BOOL_SHOW_ALL_EMAILS)) mvwaddnstr(list, line, EMAILPOS, database[i][EMAIL], real_emaillen); else { @@ -171,7 +171,7 @@ list_headerline() void scroll_up() { - if( curitem < 1 ) + if(curitem < 1) return; curitem--; @@ -182,7 +182,7 @@ scroll_up() void scroll_down() { - if( curitem > items - 2 ) + if(curitem > items - 2) return; curitem++; @@ -194,7 +194,7 @@ scroll_down() void page_up() { - if( curitem < 1 ) + if(curitem < 1) return; curitem = curitem == first_list_item ? @@ -206,7 +206,7 @@ page_up() void page_down() { - if( curitem > items - 2 ) + if(curitem > items - 2) return; curitem = curitem == LAST_LIST_ITEM ? @@ -220,13 +220,13 @@ page_down() void select_none() { - memset( selected, 0, items ); + memset(selected, 0, items); } void select_all() { - memset( selected, 1, items ); + memset(selected, 1, items); } void @@ -321,7 +321,7 @@ invert_selection() { int i; - if( items < 1 ) + if(items < 1) return; for(i = 0; i < items; i++) @@ -340,4 +340,3 @@ list_is_empty() return items < 1; } -