ANSI style function declarations.
This commit is contained in:
parent
57afd0e8d2
commit
07d550ed3a
@ -52,8 +52,7 @@ static const char sccsid[] = "@(#)pr_time.c 8.2 (Berkeley) 4/4/94";
|
|||||||
* Print the time since the user logged in.
|
* Print the time since the user logged in.
|
||||||
*/
|
*/
|
||||||
void
|
void
|
||||||
pr_attime(started, now)
|
pr_attime(time_t *started, time_t *now)
|
||||||
time_t *started, *now;
|
|
||||||
{
|
{
|
||||||
static char buf[256];
|
static char buf[256];
|
||||||
struct tm tp, tm;
|
struct tm tp, tm;
|
||||||
@ -92,8 +91,7 @@ pr_attime(started, now)
|
|||||||
* Returns number of excess characters that were used for long idle time.
|
* Returns number of excess characters that were used for long idle time.
|
||||||
*/
|
*/
|
||||||
int
|
int
|
||||||
pr_idle(idle)
|
pr_idle(time_t idle)
|
||||||
time_t idle;
|
|
||||||
{
|
{
|
||||||
/* If idle more than 36 hours, print as a number of days. */
|
/* If idle more than 36 hours, print as a number of days. */
|
||||||
if (idle >= 36 * 3600) {
|
if (idle >= 36 * 3600) {
|
||||||
|
@ -75,8 +75,7 @@ __FBSDID("$FreeBSD$");
|
|||||||
#define BOTH 3
|
#define BOTH 3
|
||||||
|
|
||||||
int
|
int
|
||||||
proc_compare(p1, p2)
|
proc_compare(struct kinfo_proc *p1, struct kinfo_proc *p2)
|
||||||
struct kinfo_proc *p1, *p2;
|
|
||||||
{
|
{
|
||||||
|
|
||||||
if (p1 == NULL)
|
if (p1 == NULL)
|
||||||
|
@ -129,9 +129,7 @@ static int this_is_uptime(const char *s);
|
|||||||
char *fmt_argv(char **, char *, int); /* ../../bin/ps/fmt.c */
|
char *fmt_argv(char **, char *, int); /* ../../bin/ps/fmt.c */
|
||||||
|
|
||||||
int
|
int
|
||||||
main(argc, argv)
|
main(int argc, char *argv[])
|
||||||
int argc;
|
|
||||||
char **argv;
|
|
||||||
{
|
{
|
||||||
struct kinfo_proc *kp;
|
struct kinfo_proc *kp;
|
||||||
struct kinfo_proc *dkp;
|
struct kinfo_proc *dkp;
|
||||||
@ -419,9 +417,7 @@ main(argc, argv)
|
|||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
pr_header(nowp, nusers)
|
pr_header(time_t *nowp, int nusers)
|
||||||
time_t *nowp;
|
|
||||||
int nusers;
|
|
||||||
{
|
{
|
||||||
double avenrun[3];
|
double avenrun[3];
|
||||||
time_t uptime;
|
time_t uptime;
|
||||||
@ -489,9 +485,7 @@ pr_header(nowp, nusers)
|
|||||||
}
|
}
|
||||||
|
|
||||||
static struct stat *
|
static struct stat *
|
||||||
ttystat(line, sz)
|
ttystat(char *line, int sz)
|
||||||
char *line;
|
|
||||||
int sz;
|
|
||||||
{
|
{
|
||||||
static struct stat sb;
|
static struct stat sb;
|
||||||
char ttybuf[MAXPATHLEN];
|
char ttybuf[MAXPATHLEN];
|
||||||
@ -505,8 +499,7 @@ ttystat(line, sz)
|
|||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
usage(wcmd)
|
usage(int wcmd)
|
||||||
int wcmd;
|
|
||||||
{
|
{
|
||||||
if (wcmd)
|
if (wcmd)
|
||||||
(void)fprintf(stderr,
|
(void)fprintf(stderr,
|
||||||
@ -517,8 +510,7 @@ usage(wcmd)
|
|||||||
}
|
}
|
||||||
|
|
||||||
static int
|
static int
|
||||||
this_is_uptime(s)
|
this_is_uptime(const char *s)
|
||||||
const char *s;
|
|
||||||
{
|
{
|
||||||
const char *u;
|
const char *u;
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user