summaryrefslogtreecommitdiff
path: root/usr.bin
diff options
context:
space:
mode:
authorsimonb <simonb@NetBSD.org>1999-02-15 03:55:00 +0000
committersimonb <simonb@NetBSD.org>1999-02-15 03:55:00 +0000
commitc14394d4ecefd7a72d0a178a593ad34cbb7e75de (patch)
tree3e71c2a77ebe990005ac762d1234c1a6f95f8fe6 /usr.bin
parent0b2e590950677d8aeff9311c09d62323ab0e823a (diff)
Add patches (via Christos) based on pkgsrc contents. (These have been
forwarded to the top maintener.)
Diffstat (limited to 'usr.bin')
-rw-r--r--usr.bin/top/commands.c16
-rw-r--r--usr.bin/top/os.h4
-rw-r--r--usr.bin/top/top.c2
-rw-r--r--usr.bin/top/utils.c2
4 files changed, 16 insertions, 8 deletions
diff --git a/usr.bin/top/commands.c b/usr.bin/top/commands.c
index 084aa1b2de6..326a8e48356 100644
--- a/usr.bin/top/commands.c
+++ b/usr.bin/top/commands.c
@@ -23,8 +23,11 @@
#include <sys/time.h>
#include <sys/resource.h>
+#include "top.h"
+#include "top.local.h"
#include "sigdesc.h" /* generated automatically */
#include "boolean.h"
+#include "machine.h"
#include "utils.h"
extern int errno;
@@ -42,8 +45,8 @@ char *err_string();
* either 'h' or '?'.
*/
-show_help()
-
+show_help(statics)
+ struct statics *statics;
{
printf("Top version %s, %s\n", version_string(), copyright);
fputs("\n\n\
@@ -72,8 +75,15 @@ I - same as 'i'\n\
k - kill processes; send a signal to a list of processes\n\
n or # - change number of processes to display\n", stdout);
#ifdef ORDER
+ {
+ int i;
+
fputs("\
-o - specify sort order (size, res, cpu, time)\n", stdout);
+o - specify sort order (", stdout);
+ for (i = 0; statics->order_names[i] != NULL; i++)
+ printf("%s%s", i == 0 ? "" : ", ", statics->order_names[i]);
+ puts(")");
+ }
#endif
fputs("\
r - renice a process\n\
diff --git a/usr.bin/top/os.h b/usr.bin/top/os.h
index 8316a4c5bb1..167006f1531 100644
--- a/usr.bin/top/os.h
+++ b/usr.bin/top/os.h
@@ -30,9 +30,5 @@ caddr_t malloc();
/* some systems declare sys_errlist in stdio.h! */
#if defined(__NetBSD__) || defined(__FreeBSD__)
-#if !defined(__m68k__)
-# if !defined(__NetBSD132__)
#define SYS_ERRLIST_DECLARED
-# endif /* __NetBSD132__ */
-#endif
#endif
diff --git a/usr.bin/top/top.c b/usr.bin/top/top.c
index 5a1d0af8f2a..5756129a6c6 100644
--- a/usr.bin/top/top.c
+++ b/usr.bin/top/top.c
@@ -711,7 +711,7 @@ Usage: %s [-ISbinqu] [-d x] [-s x] [-o field] [-U username] [number]\n",
case CMD_help2:
reset_display();
clear();
- show_help();
+ show_help(&statics);
standout("Hit any key to continue: ");
fflush(stdout);
(void) read(0, &ch, 1);
diff --git a/usr.bin/top/utils.c b/usr.bin/top/utils.c
index e84fa3ab413..bf10eab9ac7 100644
--- a/usr.bin/top/utils.c
+++ b/usr.bin/top/utils.c
@@ -16,6 +16,8 @@
#include "top.h"
#include "os.h"
+#include <errno.h>
+
int atoiwi(str)
char *str;