From 20c927a9eeb504c4c1cc79d56bf6614cd555d29b Mon Sep 17 00:00:00 2001 From: Edward Wang Date: Tue, 19 Jul 1983 04:05:15 -0800 Subject: [PATCH] date and time created 83/07/18 21:05:15 by edward SCCS-vsn: usr.bin/window/wwgets.c 1.1 --- usr/src/usr.bin/window/wwgets.c | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) create mode 100644 usr/src/usr.bin/window/wwgets.c diff --git a/usr/src/usr.bin/window/wwgets.c b/usr/src/usr.bin/window/wwgets.c new file mode 100644 index 0000000000..c2b8c2214b --- /dev/null +++ b/usr/src/usr.bin/window/wwgets.c @@ -0,0 +1,23 @@ +#ifndef lint +static char *sccsid = "@(#)wwgets.c 1.1 83/07/18"; +#endif + +#include "defs.h" + +char *ibufp = ibuf; + +bread() +{ + register n; + int imask; + + imask = 1 << 0; + wwforce(&imask); + if ((imask & 1<<0) == 0) + return; + if (ibufc == 0) + ibufp = ibuf; + n = read(0, ibufp + ibufc, ibuf + sizeof ibuf - ibufp - ibufc); + if (n > 0) + ibufc += n; +} -- 2.20.1