freebsd-src/usr.bin/top/utils.h
Kyle Evans 5f72125339 top: improve sort field storage/lookup
Switch up comparator mapping to avoid these kinds of errors, use a
simple array of (name, comparator) pairs rather than having to maintain
entries in two separate arrays that must have matching indices.

Reviewed by:	obiwac
MFC after:	1 week
Differential Revision:	https://reviews.freebsd.org/D37083
2025-08-09 11:00:31 -05:00

23 lines
576 B
C

/*
*
* Top users/processes display for Unix
*
* This program may be freely redistributed,
* but this entire comment MUST remain intact.
*
* Copyright (c) 1984, 1989, William LeFebvre, Rice University
* Copyright (c) 1989, 1990, 1992, William LeFebvre, Northwestern University
*/
#include <unistd.h>
int atoiwi(const char *);
char *itoa(unsigned int);
char *itoa7(int);
int digits(int);
const char **argparse(char *, int *);
long percentages(int, int *, long *, long *, long *);
const char *format_time(long);
char *format_k(int64_t);
int find_pid(pid_t pid);