diff options
author | Mattias Andrée <m@maandree.se> | 2025-02-16 14:23:16 +0100 |
---|---|---|
committer | Mattias Andrée <m@maandree.se> | 2025-02-16 14:23:16 +0100 |
commit | 16e00dd5f26ce342e9562bec08f529d98c23c01c (patch) | |
tree | a8389795475d59653930322e10e9f07025ff1e14 /libterminput_clear_flags.c | |
parent | interactive-test: add TEST_LIBTERMINPUT_PRINT_STATE (diff) | |
download | libterminput-16e00dd5f26ce342e9562bec08f529d98c23c01c.tar.gz libterminput-16e00dd5f26ce342e9562bec08f529d98c23c01c.tar.bz2 libterminput-16e00dd5f26ce342e9562bec08f529d98c23c01c.tar.xz |
Improve code organisation, documentation, and m code improvement
Signed-off-by: Mattias Andrée <m@maandree.se>
Diffstat (limited to '')
-rw-r--r-- | libterminput_clear_flags.c | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/libterminput_clear_flags.c b/libterminput_clear_flags.c new file mode 100644 index 0000000..9eba361 --- /dev/null +++ b/libterminput_clear_flags.c @@ -0,0 +1,11 @@ +/* See LICENSE file for copyright and license details. */ +#include "common.h" + + +int +libterminput_clear_flags(struct libterminput_state *ctx, enum libterminput_flags flags) +{ + ctx->flags |= flags; + ctx->flags ^= flags; + return 0; +} |