summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--usr.bin/top/top.local.h14
-rw-r--r--usr.bin/top/utils.c18
-rw-r--r--usr.bin/top/utils.h3
3 files changed, 3 insertions, 32 deletions
diff --git a/usr.bin/top/top.local.h b/usr.bin/top/top.local.h
index f13a8ace66b..93f4abdd74b 100644
--- a/usr.bin/top/top.local.h
+++ b/usr.bin/top/top.local.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: top.local.h,v 1.4 2008/04/02 16:41:24 deraadt Exp $ */
+/* $OpenBSD: top.local.h,v 1.5 2018/09/22 17:10:28 millert Exp $ */
/*
* Top - a top users display for Berkeley Unix
@@ -21,18 +21,6 @@
#endif
/*
- * "Table_size" defines the size of the hash tables used to map uid to
- * username. The number of users in /etc/passwd CANNOT be greater than
- * this number. If the error message "table overflow: too many users"
- * is printed by top, then "Table_size" needs to be increased. Things will
- * work best if the number is a prime number that is about twice the number
- * of lines in /etc/passwd.
- */
-#ifndef Table_size
-#define Table_size 503
-#endif
-
-/*
* "Nominal_TOPN" is used as the default TOPN when Default_TOPN is Infinity
* and the output is a dumb terminal. If we didn't do this, then
* installations who use a default TOPN of Infinity will get every
diff --git a/usr.bin/top/utils.c b/usr.bin/top/utils.c
index 29fb3d84abe..044c49b5070 100644
--- a/usr.bin/top/utils.c
+++ b/usr.bin/top/utils.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: utils.c,v 1.28 2018/09/22 16:50:35 millert Exp $ */
+/* $OpenBSD: utils.c,v 1.29 2018/09/22 17:10:28 millert Exp $ */
/*
* Top users/processes display for Unix
@@ -102,22 +102,6 @@ format_uid(uid_t uid, int nouser)
}
/*
- * digits(val) - return number of decimal digits in val. Only works for
- * positive numbers. If val <= 0 then digits(val) == 0.
- */
-int
-digits(int val)
-{
- int cnt = 0;
-
- while (val > 0) {
- cnt++;
- val /= 10;
- }
- return (cnt);
-}
-
-/*
* string_index(string, array) - find string in array and return index
*/
int
diff --git a/usr.bin/top/utils.h b/usr.bin/top/utils.h
index 09fd9a3cef0..2495dbf7d9c 100644
--- a/usr.bin/top/utils.h
+++ b/usr.bin/top/utils.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: utils.h,v 1.10 2018/09/22 16:50:35 millert Exp $ */
+/* $OpenBSD: utils.h,v 1.11 2018/09/22 17:10:28 millert Exp $ */
/*
* Top users/processes display for Unix
@@ -33,7 +33,6 @@
int atoiwi(char *);
char *itoa(int);
const char *format_uid(uid_t, int);
-int digits(int);
int string_index(char *, char **);
char **argparse(char *, int *);
int percentages(int, int64_t *, int64_t *, int64_t *, int64_t *);