#ifdef DEBUG
fprintf(stderr, "init_abook():\n");
fprintf(stderr, " COLS = %d, LINES = %d\n", COLS, LINES);
#ifdef DEBUG
fprintf(stderr, "init_abook():\n");
fprintf(stderr, " COLS = %d, LINES = %d\n", COLS, LINES);
- static char findstr[81];
+ static char findstr[MAX_FIELD_LEN];
+ int search_fields[] = {NAME, EMAIL, NICK, -1};
- if( (item = find_item(findstr, next ? curitem+1 : curitem)) >= 0 ) {
+ if( (item = find_item(findstr, curitem + !!next,
+ search_fields )) >= 0 ) {