From 200c48963c22fe4070b8fcf11f2c32f0b6d97a62 Mon Sep 17 00:00:00 2001 From: oga Date: Sat, 22 Mar 2008 14:09:02 +0000 Subject: Remove a bunch of unused variables and incorrect comments. "ok with me" okan@. --- search.c | 18 ++---------------- 1 file changed, 2 insertions(+), 16 deletions(-) (limited to 'search.c') diff --git a/search.c b/search.c index cc091dd..3e1be16 100644 --- a/search.c +++ b/search.c @@ -14,7 +14,7 @@ * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. * - * $Id: search.c,v 1.6 2008/01/16 11:39:20 oga Exp $ + * $Id: search.c,v 1.7 2008/03/22 14:09:02 oga Exp $ */ #include "headers.h" @@ -31,11 +31,6 @@ search_init(struct screen_ctx *sc) 1, 1, 1, sc->blackpixl, sc->whitepixl); } -/* - * ranking. each rank type is assigned a weight. multiply this by - * the rank given. add them up. simple linear combination. - */ - /* * Input: list of items, * Output: choose one @@ -45,7 +40,6 @@ search_init(struct screen_ctx *sc) struct menu * search_start(struct menu_q *menuq, void (*match)(struct menu_q *, struct menu_q *, char *), - void (*rank)(struct menu_q *resultq, char *search), void (*print)(struct menu *mi, int print), char *prompt, int dummy) { @@ -109,10 +103,6 @@ search_start(struct menu_q *menuq, switch (e.type) { case KeyPress: - /* - * XXX - C-s & C-r for next and prev. - */ - if (input_keycodetrans(e.xkey.keycode, e.xkey.state, &ctl, &chr, 1) < 0) continue; @@ -180,8 +170,6 @@ search_start(struct menu_q *menuq, if (mutated && strlen(searchstr) > 0) { (*match)(menuq, &resultq, searchstr); beobnoxious = TAILQ_EMPTY(&resultq); - if (!beobnoxious && rank != NULL) - (*rank)(&resultq, searchstr); } else if (mutated) TAILQ_INIT(&resultq); @@ -194,12 +182,10 @@ search_start(struct menu_q *menuq, case Expose: if (list) { if (TAILQ_EMPTY(&resultq) && list) { - /* Copy them over and rank them. */ + /* Copy them all over. */ TAILQ_FOREACH(mi, menuq, entry) TAILQ_INSERT_TAIL(&resultq, mi, resultentry); - if (rank != NULL) - (*rank)(&resultq, searchstr); listing = 1; } else if (mutated) -- cgit v1.2.3-2-gb3c3