mirror of
https://github.com/tmux/tmux.git
synced 2026-10-11 04:44:25 +00:00
Merge master into command_parser
This commit is contained in:
15
hooks.c
15
hooks.c
@@ -1,4 +1,4 @@
|
||||
/* $OpenBSD: hooks.c,v 1.13 2026/07/10 15:20:06 nicm Exp $ */
|
||||
/* $OpenBSD: hooks.c,v 1.14 2026/07/13 22:03:08 nicm Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 2026 Nicholas Marriott <nicholas.marriott@gmail.com>
|
||||
@@ -261,6 +261,19 @@ hooks_add_event(const char *name)
|
||||
TAILQ_INSERT_TAIL(&hooks_events, he, entry);
|
||||
}
|
||||
|
||||
/* Return if a hook event sink exists. */
|
||||
int
|
||||
hooks_is_event(const char *name)
|
||||
{
|
||||
struct hooks_event *he;
|
||||
|
||||
TAILQ_FOREACH(he, &hooks_events, entry) {
|
||||
if (strcmp(he->name, name) == 0)
|
||||
return (1);
|
||||
}
|
||||
return (0);
|
||||
}
|
||||
|
||||
/* Return if an event name can be fired through the hooks path. */
|
||||
int
|
||||
hooks_valid_event_name(const char *name)
|
||||
|
||||
Reference in New Issue
Block a user