updated window_procs

Add a non-string identifier to window_procs for use in runtime
identification of the current window port being used.

Use a macro WPID to add the identification at the top of the
various existing window_procs declarations. It expands to the
existing text string, as well as the newly added field wp_id
with a wp_ identifier.

For example, WPID(tty) expands to: "tty", wp_tty

The generated wp_tty must be present in the wp_ids enum at
the top of include/winprocs.h.

The WINDOWPORT(x) macro has been updated to expand to a simple
value comparison (port.wp_id == wp_x), instead of a
string comparison.
This commit is contained in:
nhmall
2022-06-29 23:21:19 -04:00
parent a518d82c54
commit f228fefabd
15 changed files with 39 additions and 18 deletions

View File

@@ -594,7 +594,7 @@ chainin_update_invent_slot(
}
struct window_procs chainin_procs = {
"-chainin", 0, /* wincap */
WPIDMINUS(chainin), 0, /* wincap */
0, /* wincap2 */
{1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1}, /* color availability */
/*

View File

@@ -717,7 +717,7 @@ chainout_update_invent_slot(
}
struct chain_procs chainout_procs = {
"-chainout", 0, /* wincap */
WPIDMINUS(chainout), 0, /* wincap */
0, /* wincap2 */
{1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1}, /* color availability */
/*