mtm | Ncurses-based terminal multiplexer |
| download: https://git.y1.nz/archives/mtm.tar.gz | |
| Files | Log | Refs |
commit bbaf4efc76453aa2c581a5c2e1d33f1c703708fc parent fef78a1ab18a369be18a55a734588b926dc08bb1 Author: Rob King <jking@deadpixi.com> Date: Wed, 12 Apr 2017 23:18:44 -0500 Cleanup on how we handle repc. Diffstat:
| M | mtm.c | 11 | ++++------- |
1 file changed, 4 insertions(+), 7 deletions(-)
diff --git a/mtm.c b/mtm.c @@ -234,15 +234,13 @@ getshell(void) /* Get the user's preferred shell. */ getyx(win, y, x); \ getmaxyx(win, my, mx); -#define REPHANDLER(name) \ +#define HANDLER(name) \ static void \ name (VTPARSER *v, void *p, wchar_t w, int argc, int *argv) \ { \ COMMONVARS -#define HANDLER(name) \ - REPHANDLER(name) \ - n->repc = 0; #define ENDHANDLER \ + n->repc = 0; \ } HANDLER(bell) /* Terminal bell. */ @@ -578,14 +576,13 @@ HANDLER(print) /* Print a character to the terminal */ n->repc = w; wnoutrefresh(win); -ENDHANDLER +} /* we don't use ENDHANDLER here because we don't want to clear repc */ -REPHANDLER(rep) /* REP - Repeat Character */ +HANDLER(rep) /* REP - Repeat Character */ if (n->repc){ for (int i = 0; i < P1(0); i++) print(v, p, n->repc, 0, NULL); } - n->repc = 0; ENDHANDLER static void
This webpage is intended to be an accessible preview of this repository. To get a fuller picture, clone it and use the git CLI.