date and time created 83/07/18 21:05:15 by edward
authorEdward Wang <edward@ucbvax.Berkeley.EDU>
Tue, 19 Jul 1983 12:05:15 +0000 (04:05 -0800)
committerEdward Wang <edward@ucbvax.Berkeley.EDU>
Tue, 19 Jul 1983 12:05:15 +0000 (04:05 -0800)
SCCS-vsn: usr.bin/window/wwgets.c 1.1

usr/src/usr.bin/window/wwgets.c [new file with mode: 0644]

diff --git a/usr/src/usr.bin/window/wwgets.c b/usr/src/usr.bin/window/wwgets.c
new file mode 100644 (file)
index 0000000..c2b8c22
--- /dev/null
@@ -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;
+}