dvtm

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

commit e6bb4c2de9c7583eabee2814817f0f3b414198f2
parent 4d4bc7e09a81c25b6ab0cfc997539d66ffba4dcc
Author: Marc Andre Tanner <mat@brain-dump.org>
Date:   Sat, 21 Jul 2012 21:58:04 +0200

Fix compilation on Cygwin

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

Diffstat:
dvtm.c | 12++++++++----
vt.c | 2+-
2 files changed, 9 insertions(+), 5 deletions(-)

diff --git a/dvtm.c b/dvtm.c @@ -39,6 +39,10 @@ int ESCDELAY; #endif +#ifndef NCURSES_REENTRANT +# define set_escdelay(d) (ESCDELAY = (d)) +#endif + typedef struct { double mfact; int history; @@ -1220,7 +1224,7 @@ parse_args(int argc, char *argv[]) { bool init = false; if (!getenv("ESCDELAY")) - ESCDELAY = 100; + set_escdelay(100); for (arg = 1; arg < argc; arg++) { if (argv[arg][0] != '-') { const char *args[] = { argv[arg], NULL }; @@ -1246,11 +1250,11 @@ parse_args(int argc, char *argv[]) { break; } case 'd': - ESCDELAY = atoi(argv[++arg]); + set_escdelay(atoi(argv[++arg])); if (ESCDELAY < 50) - ESCDELAY = 50; + set_escdelay(50); else if (ESCDELAY > 1000) - ESCDELAY = 1000; + set_escdelay(1000); break; case 'h': screen.history = atoi(argv[++arg]); diff --git a/vt.c b/vt.c @@ -29,7 +29,7 @@ #include <sys/types.h> #include <termios.h> #include <wchar.h> -#ifdef __linux__ +#if defined(__linux__) || defined(__CYGWIN__) # include <pty.h> #elif defined(__FreeBSD__) # include <libutil.h>