aboutsummaryrefslogtreecommitdiffstats
path: root/search.c
diff options
context:
space:
mode:
authorokan2016-10-18 17:03:30 +0000
committerokan2016-10-18 17:03:30 +0000
commita10bee93be3f2ad370a6dfc360e1b05cb84e7f5c (patch)
tree40fc7c400bfe2a07cc92331d68f6cb4a9a2f4c69 /search.c
parent7b0b231bfe9465d7b2f57f5257ea719325b36666 (diff)
downloadcwm-a10bee93be3f2ad370a6dfc360e1b05cb84e7f5c.tar.gz
Refactor callbacks to take a void * so as to not try and generalize into
client_ctx in keypress and buttonpress event handlers; pass appropriate *ctx's based on context. While here, limit some globals, replace defines with appropriate variables and fix some naming.
Diffstat (limited to 'search.c')
-rw-r--r--search.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/search.c b/search.c
index f179e81..bf53015 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.52 2016/09/14 19:45:33 okan Exp $
+ * $OpenBSD: search.c,v 1.53 2016/10/18 17:03:30 okan Exp $
*/
#include <sys/types.h>
@@ -72,7 +72,7 @@ search_match_client(struct menu_q *menuq, struct menu_q *resultq, char *search)
/* Then, on window names. */
if (tier < 0) {
- TAILQ_FOREACH_REVERSE(wn, &cc->nameq, winname_q, entry)
+ TAILQ_FOREACH_REVERSE(wn, &cc->nameq, name_q, entry)
if (strsubmatch(search, wn->name, 0)) {
cc->matchname = wn->name;
tier = 2;
@@ -126,7 +126,7 @@ search_match_client(struct menu_q *menuq, struct menu_q *resultq, char *search)
void
search_print_cmd(struct menu *mi, int i)
{
- struct cmd *cmd = (struct cmd *)mi->ctx;
+ struct cmd_ctx *cmd = (struct cmd_ctx *)mi->ctx;
(void)snprintf(mi->print, sizeof(mi->print), "%s", cmd->name);
}