projects
/
unix-history
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
tags
|
clone url
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
added depend label
[unix-history]
/
usr
/
src
/
usr.bin
/
systat
/
cmds.c
diff --git
a/usr/src/usr.bin/systat/cmds.c
b/usr/src/usr.bin/systat/cmds.c
index
f16878a
..
f7e38ac
100644
(file)
--- a/
usr/src/usr.bin/systat/cmds.c
+++ b/
usr/src/usr.bin/systat/cmds.c
@@
-1,6
+1,12
@@
+/*
+ * Copyright (c) 1980 Regents of the University of California.
+ * All rights reserved. The Berkeley software License Agreement
+ * specifies the terms and conditions for redistribution.
+ */
+
#ifndef lint
#ifndef lint
-static char sccsid[] = "@(#)cmds.c
1.7
(Berkeley) %G%";
-#endif
+static char sccsid[] = "@(#)cmds.c
5.5
(Berkeley) %G%";
+#endif
not lint
/*
* Command support.
/*
* Command support.
@@
-15,7
+21,7
@@
command(cmd)
register char *cp;
register struct cmdtab *p;
int interval, omask;
register char *cp;
register struct cmdtab *p;
int interval, omask;
-
char *arg
;
+
extern (*sigtstpdfl)()
;
omask = sigblock(sigmask(SIGALRM));
for (cp = cmd; *cp && !isspace(*cp); cp++)
omask = sigblock(sigmask(SIGALRM));
for (cp = cmd; *cp && !isspace(*cp); cp++)
@@
-89,11
+95,13
@@
command(cmd)
}
p = curcmd;
}
}
p = curcmd;
}
- curcmd = p;
if ((p->c_flags & CF_INIT) == 0) {
if ((p->c_flags & CF_INIT) == 0) {
- (*p->c_init)();
- p->c_flags |= CF_INIT;
+ if ((*p->c_init)())
+ p->c_flags |= CF_INIT;
+ else
+ goto done;
}
}
+ curcmd = p;
labels();
display();
status();
labels();
display();
status();
@@
-115,7
+123,7
@@
lookup(name)
longest = 0;
nmatches = 0;
longest = 0;
nmatches = 0;
- found = 0;
+ found =
(struct cmdtab *)
0;
for (c = cmdtab; p = c->c_name; c++) {
for (q = name; *q == *p++; q++)
if (*q == 0) /* exact match? */
for (c = cmdtab; p = c->c_name; c++) {
for (q = name; *q == *p++; q++)
if (*q == 0) /* exact match? */
@@
-150,7
+158,7
@@
suspend()
refresh();
echo();
nocrmode();
refresh();
echo();
nocrmode();
- signal(SIGTSTP,
SIG_DFL
);
+ signal(SIGTSTP,
sigtstpdfl
);
oldmask = sigsetmask(0);
kill(getpid(), SIGTSTP);
sigsetmask(oldmask);
oldmask = sigsetmask(0);
kill(getpid(), SIGTSTP);
sigsetmask(oldmask);
@@
-158,7
+166,6
@@
suspend()
crmode();
noecho();
move(CMDLINE, col);
crmode();
noecho();
move(CMDLINE, col);
- wrefresh(curscr);
alarm(naptime);
}
alarm(naptime);
}