SCCS-vsn: usr.bin/window/main.c 1.7
SCCS-vsn: usr.bin/window/ww.h 1.6
SCCS-vsn: usr.bin/window/wwwrite.c 1.5
SCCS-vsn: usr.bin/window/cmd2.c 1.6
SCCS-vsn: usr.bin/window/wwgets.c 1.4
SCCS-vsn: usr.bin/window/defs.h 1.4
-static char *sccsid = "@(#)cmd2.c 1.5 83/07/26";
+static char *sccsid = "@(#)cmd2.c 1.6 83/07/27";
- if ((w = openwin(22, "IO Statics")) == 0) {
+ if ((w = openwin(6, "IO Statics")) == 0) {
wwputs("Can't open statistics window. ", cmdwin);
return;
}
wwputs("Can't open statistics window. ", cmdwin);
return;
}
- wwprintf(w, "nread: %d\r\n", nread);
+ wwprintf(w, "nread\tnreadz\tnreade\tnreadc\tnwrite\tnwritec\r\n");
+ wwprintf(w, "%d\t%d\t%d\t%d\t%d\t%d\r\n",
+ nread, nreadz, nreade, nreadc, wwnwrite, wwnwritec);
waitnl(w);
closewin(w);
}
waitnl(w);
closewin(w);
}
-/* @(#)defs.h 1.3 83/07/22 */
+/* @(#)defs.h 1.4 83/07/27 */
#include "ww.h"
#include <signal.h>
#include "ww.h"
#include <signal.h>
#define ESCAPE CTRL(p)
int nread;
#define ESCAPE CTRL(p)
int nread;
+int nreade;
+int nreadz;
+int nreadc;
struct timeval starttime;
struct timezone timezone;
struct timeval starttime;
struct timezone timezone;
-static char *sccsid = "@(#)main.c 1.6 83/07/22";
+static char *sccsid = "@(#)main.c 1.7 83/07/27";
continue;
/* NOTE: ibufc == 0 */
ibufp = ibuf;
continue;
/* NOTE: ibufc == 0 */
ibufp = ibuf;
- if ((ibufc = read(0, ibuf, sizeof ibuf)) < 0)
+ if ((ibufc = read(0, ibuf, sizeof ibuf)) < 0) {
+ nreade++;
+ } else if (ibufc == 0)
+ nreadz++;
+ else
+ nreadc += ibufc;
+ nread++;
}
/*
* Weird loop. Copy the buffer to the pty stopping
}
/*
* Weird loop. Copy the buffer to the pty stopping
-/* @(#)ww.h 1.5 83/07/22 */
+/* @(#)ww.h 1.6 83/07/27 */
#include <stdio.h>
#include <sgtty.h>
#include <stdio.h>
#include <sgtty.h>
extern struct ww *wwhead, *curwin;
extern struct ww_tty wwoldtty, wwnewtty;
extern int wwnwrite;
extern struct ww *wwhead, *curwin;
extern struct ww_tty wwoldtty, wwnewtty;
extern int wwnwrite;
extern int wwnrow, wwncol; /* the screen size */
#define wwputchar(c) wwputc((c), curwin)
extern int wwnrow, wwncol; /* the screen size */
#define wwputchar(c) wwputc((c), curwin)
-static char *sccsid = "@(#)wwgets.c 1.3 83/07/22";
+static char *sccsid = "@(#)wwgets.c 1.4 83/07/27";
p = ibufp + ibufc;
n = (ibuf + sizeof ibuf) - p;
}
p = ibufp + ibufc;
n = (ibuf + sizeof ibuf) - p;
}
- if ((n = read(0, p, n)) > 0)
+ if ((n = read(0, p, n)) > 0) {
+ nreadc += n;
+ } else if (n == 0)
+ nreadz++;
+ else
+ nreade++;
+ nread++;
-static char *sccsid = "@(#)wwwrite.c 1.4 83/07/22";
+static char *sccsid = "@(#)wwwrite.c 1.5 83/07/27";
+int wwnwrite;
+int wwnwritec;
wwwrite(w, p, n)
register struct ww *w;
wwwrite(w, p, n)
register struct ww *w;
if (w == 0 || w->ww_win == 0)
return -1;
if (w == 0 || w->ww_win == 0)
return -1;
+ wwnwrite++;
+ wwnwritec += n;
while (n-- > 0) {
c = *p++ & 0x7f;
switch (w->ww_wstate) {
while (n-- > 0) {
c = *p++ & 0x7f;
switch (w->ww_wstate) {