summaryrefslogtreecommitdiff
path: root/app/xterm/resize.c
diff options
context:
space:
mode:
authorMatthieu Herrb <matthieu@cvs.openbsd.org>2010-05-08 12:20:48 +0000
committerMatthieu Herrb <matthieu@cvs.openbsd.org>2010-05-08 12:20:48 +0000
commitca9af72c4f2136d12227a7761f8963ec23ecbd64 (patch)
tree3468e497065da090767c30e4be2c9312726bafd4 /app/xterm/resize.c
parent44f352c57ed103ad391992fdd93821e97f5ef4f2 (diff)
Update to xterm 258. lightly tested by krw@, thanks.
Diffstat (limited to 'app/xterm/resize.c')
-rw-r--r--app/xterm/resize.c18
1 files changed, 9 insertions, 9 deletions
diff --git a/app/xterm/resize.c b/app/xterm/resize.c
index 069c7cbae..bc1cd1f0f 100644
--- a/app/xterm/resize.c
+++ b/app/xterm/resize.c
@@ -1,7 +1,7 @@
-/* $XTermId: resize.c,v 1.109 2009/10/12 00:41:33 tom Exp $ */
+/* $XTermId: resize.c,v 1.111 2010/04/18 16:35:02 tom Exp $ */
/*
- * Copyright 2003-2008,2009 by Thomas E. Dickey
+ * Copyright 2003-2009,2010 by Thomas E. Dickey
*
* All Rights Reserved
*
@@ -341,16 +341,16 @@ main(int argc, char **argv ENVP_ARG)
#ifdef USE_ANY_SYSV_TERMIO
ioctl(tty, TCGETA, &tioorig);
tio = tioorig;
- tio.c_iflag &= ~(ICRNL | IUCLC);
- tio.c_lflag &= ~(ICANON | ECHO);
+ UIntClr(tio.c_iflag, (ICRNL | IUCLC));
+ UIntClr(tio.c_lflag, (ICANON | ECHO));
tio.c_cflag |= CS8;
tio.c_cc[VMIN] = 6;
tio.c_cc[VTIME] = 1;
#elif defined(USE_TERMIOS)
tcgetattr(tty, &tioorig);
tio = tioorig;
- tio.c_iflag &= ~ICRNL;
- tio.c_lflag &= ~(ICANON | ECHO);
+ UIntClr(tio.c_iflag, ICRNL);
+ UIntClr(tio.c_lflag, (ICANON | ECHO));
tio.c_cflag |= CS8;
tio.c_cc[VMIN] = 6;
tio.c_cc[VTIME] = 1;
@@ -358,7 +358,7 @@ main(int argc, char **argv ENVP_ARG)
ioctl(tty, TIOCGETP, &sgorig);
sg = sgorig;
sg.sg_flags |= RAW;
- sg.sg_flags &= ~ECHO;
+ UIntClr(sg.sg_flags, ECHO);
#endif /* USE_ANY_SYSV_TERMIO/USE_TERMIOS */
signal(SIGINT, onintr);
signal(SIGQUIT, onintr);
@@ -449,7 +449,7 @@ main(int argc, char **argv ENVP_ARG)
}
i = ptr - termcap + 3;
- strncpy(newtc, termcap, (unsigned) i);
+ strncpy(newtc, termcap, (size_t) i);
sprintf(newtc + i, "%d", cols);
ptr = strchr(ptr, ':');
strcat(newtc, ptr);
@@ -461,7 +461,7 @@ main(int argc, char **argv ENVP_ARG)
}
i = ptr - newtc + 3;
- strncpy(termcap, newtc, (unsigned) i);
+ strncpy(termcap, newtc, (size_t) i);
sprintf(termcap + i, "%d", rows);
ptr = strchr(ptr, ':');
strcat(termcap, ptr);