summary refs log tree commit diff
path: root/search.c
diff options
context:
space:
mode:
authoroga <oga>2008-03-22 14:09:02 +0000
committeroga <oga>2008-03-22 14:09:02 +0000
commitcd46788d85428b539975d8923549bc282eb1b68d (patch)
tree433999402be4eb34a7dd9b7619a49698519fcf76 /search.c
parentfead0d511fef0f54cca29b3c4af68ab80289c117 (diff)
downloadcwm-cd46788d85428b539975d8923549bc282eb1b68d.tar.gz
cwm-cd46788d85428b539975d8923549bc282eb1b68d.tar.xz
cwm-cd46788d85428b539975d8923549bc282eb1b68d.zip
Remove a bunch of unused variables and incorrect comments.
"ok with me" okan@.
Diffstat (limited to 'search.c')
-rw-r--r--search.c16
1 files changed, 1 insertions, 15 deletions
diff --git a/search.c b/search.c
index 3645445..9e55783 100644
--- a/search.c
+++ b/search.c
@@ -32,11 +32,6 @@ search_init(struct screen_ctx *sc)
 }
 
 /*
- * 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
  * so, exactly like menus
@@ -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)