* Copyright (c) 1980 Regents of the University of California.
* All rights reserved. The Berkeley software License Agreement
* specifies the terms and conditions for redistribution.
static char sccsid
[] = "@(#)mbufs.c 5.3 (Berkeley) 5/11/89";
return (subwin(stdscr
, LINES
-5-1, 0, 5, 0));
wmove(wnd
, 0, 0); wclrtoeol(wnd
);
"/0 /5 /10 /15 /20 /25 /30 /35 /40 /45 /50 /55 /60");
#define NNAMES (sizeof (mtnames) / sizeof (mtnames[0]))
register int i
, j
, max
, index
;
for (j
= 0; j
< wnd
->_maxy
; j
++) {
for (i
= 0; i
< wnd
->_maxy
; i
++)
if (mb
->m_mtypes
[i
] > max
) {
mvwprintw(wnd
, 1+j
, 0, "%10d", index
);
mvwprintw(wnd
, 1+j
, 0, "%-10.10s", mtnames
[index
]);
sprintf(buf
, " %d", max
);
wmove(wnd
, 1+j
, 0); wclrtobot(wnd
);
static struct nlist nlst
[] = {
if (nlst
[X_MBSTAT
].n_type
== 0) {
if (nlst
[X_MBSTAT
].n_type
== 0) {
error("namelist on %s failed", _PATH_UNIX
);
mb
= (struct mbstat
*)calloc(1, sizeof (*mb
));
if (nlst
[X_MBSTAT
].n_type
== 0)
lseek(kmem
, nlst
[X_MBSTAT
].n_value
, L_SET
);
read(kmem
, mb
, sizeof (*mb
));