xref: /openbsd/bin/ps/extern.h (revision 09467b48)
1 /*	$OpenBSD: extern.h,v 1.21 2019/06/23 17:18:50 deraadt Exp $	*/
2 /*	$NetBSD: extern.h,v 1.10 1995/05/21 13:38:27 mycroft Exp $	*/
3 
4 /*-
5  * Copyright (c) 1991, 1993, 1994
6  *	The Regents of the University of California.  All rights reserved.
7  *
8  * Redistribution and use in source and binary forms, with or without
9  * modification, are permitted provided that the following conditions
10  * are met:
11  * 1. Redistributions of source code must retain the above copyright
12  *    notice, this list of conditions and the following disclaimer.
13  * 2. Redistributions in binary form must reproduce the above copyright
14  *    notice, this list of conditions and the following disclaimer in the
15  *    documentation and/or other materials provided with the distribution.
16  * 3. Neither the name of the University nor the names of its contributors
17  *    may be used to endorse or promote products derived from this software
18  *    without specific prior written permission.
19  *
20  * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
21  * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
22  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
23  * ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
24  * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
25  * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
26  * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
27  * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
28  * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
29  * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
30  * SUCH DAMAGE.
31  *
32  *	@(#)extern.h	8.3 (Berkeley) 4/2/94
33  */
34 
35 struct nlist;
36 struct var;
37 struct varent;
38 
39 extern fixpt_t ccpu;
40 extern int eval, fscale, nlistread, maxslp;
41 extern u_int mempages;
42 extern int sumrusage, termwidth, totwidth, kvm_sysctl_only, needheader;
43 extern VAR var[];
44 extern VARENT *vhead;
45 
46 __BEGIN_DECLS
47 void	 command(const struct kinfo_proc *, VARENT *);
48 void	 cputime(const struct kinfo_proc *, VARENT *);
49 int	 donlist(void);
50 void	 emulname(const struct kinfo_proc *, VARENT *);
51 void	 elapsed(const struct kinfo_proc *, VARENT *);
52 double	 getpcpu(const struct kinfo_proc *);
53 double	 getpmem(const struct kinfo_proc *);
54 void	 gname(const struct kinfo_proc *, VARENT *);
55 void	 logname(const struct kinfo_proc *, VARENT *);
56 void	 longtname(const struct kinfo_proc *, VARENT *);
57 void	 lstarted(const struct kinfo_proc *, VARENT *);
58 void	 maxrss(const struct kinfo_proc *, VARENT *);
59 void	 nlisterr(struct nlist *);
60 void	 p_rssize(const struct kinfo_proc *, VARENT *);
61 void	 pagein(const struct kinfo_proc *, VARENT *);
62 void	 parsefmt(char *);
63 void	 pcpu(const struct kinfo_proc *, VARENT *);
64 void	 pmem(const struct kinfo_proc *, VARENT *);
65 void	 pri(const struct kinfo_proc *, VARENT *);
66 void	 printheader(void);
67 void	 pvar(const struct kinfo_proc *kp, VARENT *);
68 void	 pnice(const struct kinfo_proc *kp, VARENT *);
69 void	 rgname(const struct kinfo_proc *, VARENT *);
70 void	 rssize(const struct kinfo_proc *, VARENT *);
71 void	 runame(const struct kinfo_proc *, VARENT *);
72 void	 showkey(void);
73 void	 started(const struct kinfo_proc *, VARENT *);
74 void	 printstate(const struct kinfo_proc *, VARENT *);
75 void	 printpledge(const struct kinfo_proc *, VARENT *);
76 void	 tdev(const struct kinfo_proc *, VARENT *);
77 void	 tname(const struct kinfo_proc *, VARENT *);
78 void	 tsize(const struct kinfo_proc *, VARENT *);
79 void	 dsize(const struct kinfo_proc *, VARENT *);
80 void	 ssize(const struct kinfo_proc *, VARENT *);
81 void	 ucomm(const struct kinfo_proc *, VARENT *);
82 void	 curwd(const struct kinfo_proc *, VARENT *);
83 void	 euname(const struct kinfo_proc *, VARENT *);
84 void	 vsize(const struct kinfo_proc *, VARENT *);
85 void	 wchan(const struct kinfo_proc *, VARENT *);
86 __END_DECLS
87