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();
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);
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);
}
}
}
}
- cmd = strconcat(mutt_command, " \'", mailstr,
- "\'", NULL);
+ cmd = strconcat(mutt_command, " \'", mailstr, "\'", NULL);
free(mailstr);
#ifdef DEBUG
fprintf(stderr, "cmd: %s\n", cmd);
{
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);
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);
}
if(!ret)
- switch( export_file(dstformat, dstfile) ) {
+ switch(export_file(dstformat, dstfile)) {
case -1:
fprintf(stderr,
"output format %s not supported\n",
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);
}
ui_print_number_of_items();
- if( items < 1 ) {
+ if(items < 1) {
refresh();
wrefresh(list);
return;
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 {
void
scroll_up()
{
- if( curitem < 1 )
+ if(curitem < 1)
return;
curitem--;
void
scroll_down()
{
- if( curitem > items - 2 )
+ if(curitem > items - 2)
return;
curitem++;
void
page_up()
{
- if( curitem < 1 )
+ if(curitem < 1)
return;
curitem = curitem == first_list_item ?
void
page_down()
{
- if( curitem > items - 2 )
+ if(curitem > items - 2)
return;
curitem = curitem == LAST_LIST_ITEM ?
void
select_none()
{
- memset( selected, 0, items );
+ memset(selected, 0, items);
}
void
select_all()
{
- memset( selected, 1, items );
+ memset(selected, 1, items);
}
void
{
int i;
- if( items < 1 )
+ if(items < 1)
return;
for(i = 0; i < items; i++)
return items < 1;
}
-