Messages: merge macros with and without message code
authorPierre Le Marre <dev@wismill.eu>
Thu, 21 Sep 2023 18:06:27 +0000 (20:06 +0200)
committerWismill <dev@wismill.eu>
Sun, 24 Sep 2023 07:09:24 +0000 (09:09 +0200)
commitc0065c95a479c7111417a6547d26594a5e31378b
tree9fd55ccc2e0db97338f8d5f96d0b7432e73d5150
parenta83d745b62ea8ec89e939b00bb3754ad54280942
Messages: merge macros with and without message code

Previously we had two types of macros for logging: with and without
message code. They were intended to be merged afterwards.

The idea is to use a special code – `XKB_LOG_MESSAGE_NO_ID = 0` – that
should *not* be displayed. But we would like to avoid checking this
special code at run time. This is achieved using macro tricks; they
are detailed in the code (see: `PREPEND_MESSAGE_ID`).

Now it is also easier to spot the remaining undocumented log entries:
just search `XKB_LOG_MESSAGE_NO_ID`.
23 files changed:
src/compose/parser.c
src/compose/table.c
src/context-priv.c
src/context.c
src/context.h
src/messages-codes.h
src/messages-codes.h.jinja
src/x11/keymap.c
src/xkbcomp/action.c
src/xkbcomp/ast-build.c
src/xkbcomp/compat.c
src/xkbcomp/expr.c
src/xkbcomp/include.c
src/xkbcomp/keycodes.c
src/xkbcomp/keymap.c
src/xkbcomp/rules.c
src/xkbcomp/scanner.c
src/xkbcomp/symbols.c
src/xkbcomp/types.c
src/xkbcomp/vmod.c
src/xkbcomp/xkbcomp-priv.h
src/xkbcomp/xkbcomp.c
test/log.c