From ecf3db5f803747c6684b95d743871fa18cc5697f Mon Sep 17 00:00:00 2001 From: Michiel Broek Date: Mon, 21 Jan 2002 19:09:55 +0000 Subject: [PATCH] dupes database is updated after each scanned newsgroup --- mbfido/scannews.c | 4 ++++ mbsetup/ledit.c | 23 ++++++++++++----------- 2 files changed, 16 insertions(+), 11 deletions(-) diff --git a/mbfido/scannews.c b/mbfido/scannews.c index afc013b6..57d123e7 100644 --- a/mbfido/scannews.c +++ b/mbfido/scannews.c @@ -224,6 +224,10 @@ void ScanNews(void) Nopper(); if (do_one_group(&art, Msgs.Newsgroup, Msgs.Tag, Msgs.MaxArticles) == RETVAL_ERROR) break; + /* + * To be safe, update the dupes database after each area. + */ + CloseDupes(); } } fclose(pAreas); diff --git a/mbsetup/ledit.c b/mbsetup/ledit.c index 7330f220..ad03af2f 100644 --- a/mbsetup/ledit.c +++ b/mbsetup/ledit.c @@ -493,32 +493,33 @@ char *select_pick(int max, int items) -/* Select menu, max is the highest item to pick. Returns zero if - * "-" (previous level) is selected. +/* + * Select menu, max is the highest item to pick. Returns zero if + * "-" (previous level) is selected, -2 and -1 for the N and P keys. */ -int select_menu_sub(int, char *); +int select_menu_sub(int, int, char *); int select_menu(int max) { - return select_menu_sub(max, (char *)"Select menu item"); + return select_menu_sub(max, 50, (char *)"Select menu item"); } int select_tag(int max) { - return select_menu_sub(max, (char *)"Toggle item"); + return select_menu_sub(max, 40, (char *)"Toggle item"); } -int select_menu_sub(int max, char *hlp) +int select_menu_sub(int max, int items, char *hlp) { - static char *menu=(char *)"-"; - char help[80]; - int pick; + static char *menu=(char *)"-"; + char help[81]; + int pick; if (max == 0) sprintf(help, "Select ^\"-\"^ for previous level"); else - if (max > 40) + if (max > items) sprintf(help, "%s (1..%d), ^\"-\"^ prev. level, ^\"P\" or \"N\"^ to page", hlp, max); else sprintf(help, "%s (1..%d), ^\"-\"^ for previous level", hlp, max); @@ -537,7 +538,7 @@ int select_menu_sub(int max, char *hlp) if (strncmp(menu, "-", 1) == 0) return 0; - if (max > 40) { + if (max > items) { if (strncmp(menu, "N", 1) == 0) return -1; if (strncmp(menu, "P", 1) == 0)