-/* $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
#define LoadMax 5.0
#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
-/* $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
return (buffer);
}
-/*
- * 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
*/
-/* $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
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 *);