git.y1.nz

mtm

Ncurses-based terminal multiplexer
download: https://git.y1.nz/archives/mtm.tar.gz
Files | Log | Refs

commit 10d3388da29621d79d7c093d9e7e28a85814457e
parent da96d36b94df7d2246f7a1e743e99379b20bf37a
Author: Rob King <jking@deadpixi.com>
Date:   Fri, 17 Feb 2017 10:11:50 -0600

Style fixes.

Diffstat:
Mmtm.c19++++++++-----------
1 file changed, 8 insertions(+), 11 deletions(-)

diff --git a/mtm.c b/mtm.c @@ -226,12 +226,12 @@ focus(NODE *n) focus(n->c1? n->c1 : n->c2); } -#define IN(n, y, x) (y >= n->y && y <= n->y + n->h && \ - x >= n->x && x <= n->x + n->w) #define ABOVE(n) n->y - 2, n->x + n->w / 2 #define BELOW(n) n->y + n->h + 2, n->x + n->w / 2 #define LEFT(n) n->y + n->h / 2, n->x - 2 #define RIGHT(n) n->y + n->h / 2, n->x + n->w + 2 +#define IN(n, y, x) (y >= n->y && y <= n->y + n->h && \ + x >= n->x && x <= n->x + n->w) static NODE * findnode(NODE *n, int y, int x) @@ -479,9 +479,8 @@ curseskeytokeystroke(int k) case KEY_PPAGE: return TMT_KEY_PAGE_UP; case KEY_HOME: return TMT_KEY_HOME; case KEY_END: return TMT_KEY_END; + default: return NULL; } - - return NULL; } static void @@ -542,8 +541,7 @@ tocolor(tmt_color_t c) case TMT_COLOR_MAGENTA: return COLOR_MAGENTA; case TMT_COLOR_CYAN: return COLOR_CYAN; case TMT_COLOR_WHITE: return COLOR_WHITE; - default: - return -1; + default: return -1; } } @@ -571,10 +569,10 @@ main(int argc, char **argv) int c = 0; while ((c = getopt(argc, argv, "mc:s:")) != -1){ switch (c){ - case 'm': monochrome = true; break; - case 'c': commandkey = CTL(optarg[0]); break; - case 's': shell = optarg; break; - default: quit(EXIT_FAILURE, USAGE); break; + case 'm': monochrome = true; break; + case 'c': commandkey = CTL(optarg[0]); break; + case 's': shell = optarg; break; + default: quit(EXIT_FAILURE, USAGE); break; } } @@ -590,7 +588,6 @@ main(int argc, char **argv) root = newview(NULL, 0, 0, LINES, COLS); focus(root); - run(); return quit(EXIT_SUCCESS, NULL);

This webpage is intended to be an accessible preview of this repository. To get a fuller picture, clone it and use the git CLI.