aboutsummaryrefslogtreecommitdiffstats
path: root/search.c
diff options
context:
space:
mode:
authorokan2016-12-06 21:54:10 +0000
committerokan2016-12-06 21:54:10 +0000
commit282cc4b1b068884308cccec1d615640fbbe6d9f7 (patch)
tree38b8a050891f42c77372996b7575fc3e7769aff1 /search.c
parentbeda23742b6a37852c4ede98d865a36c6bb953f1 (diff)
downloadcwm-282cc4b1b068884308cccec1d615640fbbe6d9f7.tar.gz
Add search_print_text(), a default callback for mi->print in menu_filter(). While
here, normalize the remaining search_print_* argument paramters.
Diffstat (limited to 'search.c')
-rw-r--r--search.c14
1 files changed, 10 insertions, 4 deletions
diff --git a/search.c b/search.c
index 80d0b1a..8c06f4d 100644
--- a/search.c
+++ b/search.c
@@ -15,7 +15,7 @@
* ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
* OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*
- * $OpenBSD: search.c,v 1.58 2016/12/01 20:28:19 okan Exp $
+ * $OpenBSD: search.c,v 1.59 2016/12/06 21:54:10 okan Exp $
*/
#include <sys/types.h>
@@ -105,7 +105,13 @@ search_match_client(struct menu_q *menuq, struct menu_q *resultq, char *search)
}
void
-search_print_cmd(struct menu *mi, int i)
+search_print_text(struct menu *mi, int listing)
+{
+ (void)snprintf(mi->print, sizeof(mi->print), "%s", mi->text);
+}
+
+void
+search_print_cmd(struct menu *mi, int listing)
{
struct cmd_ctx *cmd = (struct cmd_ctx *)mi->ctx;
@@ -113,7 +119,7 @@ search_print_cmd(struct menu *mi, int i)
}
void
-search_print_group(struct menu *mi, int i)
+search_print_group(struct menu *mi, int listing)
{
struct group_ctx *gc = (struct group_ctx *)mi->ctx;
@@ -123,7 +129,7 @@ search_print_group(struct menu *mi, int i)
}
void
-search_print_client(struct menu *mi, int list)
+search_print_client(struct menu *mi, int listing)
{
struct client_ctx *cc = (struct client_ctx *)mi->ctx;
char flag = ' ';