summaryrefslogtreecommitdiffstats
path: root/worms
diff options
context:
space:
mode:
authorcgd <cgd@NetBSD.org>1995-04-22 08:09:22 +0000
committercgd <cgd@NetBSD.org>1995-04-22 08:09:22 +0000
commit14f259962a6ba5f002861e2490bca2db874f843b (patch)
tree30a2a87413c904fec46afa1d23522c23efce85c7 /worms
parentd84578dcf9198f315c7855196b8bc8fffa86ce17 (diff)
downloadbsdgames-darwin-14f259962a6ba5f002861e2490bca2db874f843b.tar.gz
bsdgames-darwin-14f259962a6ba5f002861e2490bca2db874f843b.tar.zst
bsdgames-darwin-14f259962a6ba5f002861e2490bca2db874f843b.zip
fix window size update code.
Diffstat (limited to 'worms')
-rw-r--r--worms/worms.c10
1 files changed, 8 insertions, 2 deletions
diff --git a/worms/worms.c b/worms/worms.c
index cc39b28e..dbf9511a 100644
--- a/worms/worms.c
+++ b/worms/worms.c
@@ -1,4 +1,4 @@
-/* $NetBSD: worms.c,v 1.7 1995/04/22 08:08:05 cgd Exp $ */
+/* $NetBSD: worms.c,v 1.8 1995/04/22 08:09:22 cgd Exp $ */
/*
* Copyright (c) 1980, 1993
@@ -43,7 +43,7 @@ static char copyright[] =
#if 0
static char sccsid[] = "@(#)worms.c 8.1 (Berkeley) 5/31/93";
#else
-static char rcsid[] = "$NetBSD: worms.c,v 1.7 1995/04/22 08:08:05 cgd Exp $";
+static char rcsid[] = "$NetBSD: worms.c,v 1.8 1995/04/22 08:09:22 cgd Exp $";
#endif
#endif /* not lint */
@@ -65,10 +65,12 @@ static char rcsid[] = "$NetBSD: worms.c,v 1.7 1995/04/22 08:08:05 cgd Exp $";
*
*/
#include <sys/types.h>
+#include <sys/ioctl.h>
#include <signal.h>
#include <stdio.h>
#include <stdlib.h>
+#include <termios.h>
#include <unistd.h>
static struct options {
@@ -204,6 +206,10 @@ main(argc, argv)
char *AL, *BC, *CM, *EI, *HO, *IC, *IM, *IP, *SR;
char *field, tcb[100], *mp;
long random();
+ struct termios ti;
+#ifdef TIOCGWINSZ
+ struct winsize ws;
+#endif
length = 16;
number = 3;