xref: /freebsd/bin/ps/extern.h (revision 595e514d0df2bac5b813d35f83e32875dbf16a83)
1 /*-
2  * Copyright (c) 1991, 1993, 1994
3  *	The Regents of the University of California.  All rights reserved.
4  *
5  * Redistribution and use in source and binary forms, with or without
6  * modification, are permitted provided that the following conditions
7  * are met:
8  * 1. Redistributions of source code must retain the above copyright
9  *    notice, this list of conditions and the following disclaimer.
10  * 2. Redistributions in binary form must reproduce the above copyright
11  *    notice, this list of conditions and the following disclaimer in the
12  *    documentation and/or other materials provided with the distribution.
13  * 4. Neither the name of the University nor the names of its contributors
14  *    may be used to endorse or promote products derived from this software
15  *    without specific prior written permission.
16  *
17  * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
18  * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
19  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
20  * ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
21  * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
22  * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
23  * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
24  * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
25  * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
26  * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
27  * SUCH DAMAGE.
28  *
29  *	@(#)extern.h	8.3 (Berkeley) 4/2/94
30  * $FreeBSD$
31  */
32 
33 struct kinfo;
34 struct nlist;
35 struct var;
36 struct varent;
37 
38 extern fixpt_t ccpu;
39 extern int cflag, eval, fscale, nlistread, rawcpu;
40 extern unsigned long mempages;
41 extern time_t now;
42 extern int showthreads, sumrusage, termwidth;
43 extern STAILQ_HEAD(velisthead, varent) varlist;
44 
45 __BEGIN_DECLS
46 char	 *arguments(KINFO *, VARENT *);
47 char	 *command(KINFO *, VARENT *);
48 char	 *cputime(KINFO *, VARENT *);
49 int	 donlist(void);
50 char	 *elapsed(KINFO *, VARENT *);
51 char	 *elapseds(KINFO *, VARENT *);
52 char	 *emulname(KINFO *, VARENT *);
53 VARENT	*find_varentry(VAR *);
54 const	 char *fmt_argv(char **, char *, char *, size_t);
55 double	 getpcpu(const KINFO *);
56 char	 *kvar(KINFO *, VARENT *);
57 char	 *label(KINFO *, VARENT *);
58 char	 *loginclass(KINFO *, VARENT *);
59 char	 *logname(KINFO *, VARENT *);
60 char	 *longtname(KINFO *, VARENT *);
61 char	 *lstarted(KINFO *, VARENT *);
62 char	 *maxrss(KINFO *, VARENT *);
63 char	 *lockname(KINFO *, VARENT *);
64 char	 *mwchan(KINFO *, VARENT *);
65 char	 *nwchan(KINFO *, VARENT *);
66 char	 *pagein(KINFO *, VARENT *);
67 void	 parsefmt(const char *, int);
68 char	 *pcpu(KINFO *, VARENT *);
69 char	 *pmem(KINFO *, VARENT *);
70 char	 *pri(KINFO *, VARENT *);
71 void	 printheader(void);
72 char	 *priorityr(KINFO *, VARENT *);
73 char	 *egroupname(KINFO *, VARENT *);
74 char	 *rgroupname(KINFO *, VARENT *);
75 char	 *runame(KINFO *, VARENT *);
76 char	 *rvar(KINFO *, VARENT *);
77 void	 showkey(void);
78 char	 *started(KINFO *, VARENT *);
79 char	 *state(KINFO *, VARENT *);
80 char	 *systime(KINFO *, VARENT *);
81 char	 *tdev(KINFO *, VARENT *);
82 char	 *tdnam(KINFO *, VARENT *);
83 char	 *tname(KINFO *, VARENT *);
84 char	 *ucomm(KINFO *, VARENT *);
85 char	 *uname(KINFO *, VARENT *);
86 char	 *upr(KINFO *, VARENT *);
87 char	 *usertime(KINFO *, VARENT *);
88 char	 *vsize(KINFO *, VARENT *);
89 char	 *wchan(KINFO *, VARENT *);
90 __END_DECLS
91