dvtm

dynamic virtual terminal manager - with my changes
git clone https://pi.duncano.de/git/dvtm.git
Log | Files | Refs | README | LICENSE

commit 994668009d8e66b3d74241e2b0ff52ae0c5a8d05
parent 4bd4c3930fadd8cc6c493fa6668803c330220cf8
Author: Marc Andre Tanner <mat@brain-dump.org>
Date:   Wed,  3 Apr 2013 10:23:33 +0200

Use int instead of uint8_t for order field

Signed-off-by: Marc Andre Tanner <mat@brain-dump.org>

Diffstat:
dvtm.c | 10++++------
1 file changed, 4 insertions(+), 6 deletions(-)

diff --git a/dvtm.c b/dvtm.c @@ -59,7 +59,7 @@ struct Client { Vt *term; const char *cmd; char title[256]; - uint8_t order; + int order; pid_t pid; int pty; unsigned short int id; @@ -335,19 +335,17 @@ arrange() { static void attach(Client *c) { - uint8_t order; if (clients) clients->prev = c; c->next = clients; c->prev = NULL; clients = c; - for (order = 1; c; c = c->next, order++) - c->order = order; + for (int o = 1; c; c = c->next, o++) + c->order = o; } static void attachafter(Client *c, Client *a) { /* attach c after a */ - uint8_t o; if (c == a) return; if (!a) @@ -359,7 +357,7 @@ attachafter(Client *c, Client *a) { /* attach c after a */ c->next = a->next; c->prev = a; a->next = c; - for (o = a->order; c; c = c->next) + for (int o = a->order; c; c = c->next) c->order = ++o; } }