=================================================================== RCS file: /cvsrepo/anoncvs/cvs/src/usr.bin/top/machine.c,v retrieving revision 1.35 retrieving revision 1.36 diff -c -r1.35 -r1.36 *** src/usr.bin/top/machine.c 2003/06/18 08:36:31 1.35 --- src/usr.bin/top/machine.c 2003/07/07 21:36:52 1.36 *************** *** 1,4 **** ! /* $OpenBSD: machine.c,v 1.35 2003/06/18 08:36:31 deraadt Exp $ */ /*- * Copyright (c) 1994 Thorsten Lockert --- 1,4 ---- ! /* $OpenBSD: machine.c,v 1.36 2003/07/07 21:36:52 deraadt Exp $ */ /*- * Copyright (c) 1994 Thorsten Lockert *************** *** 146,152 **** unsigned int maxslp; ! int getstathz(void) { struct clockinfo cinf; --- 146,152 ---- unsigned int maxslp; ! static int getstathz(void) { struct clockinfo cinf; *************** *** 260,266 **** static struct handle handle; ! struct kinfo_proc * getprocs(int op, int arg, int *cnt) { size_t size = sizeof(int); --- 260,266 ---- static struct handle handle; ! static struct kinfo_proc * getprocs(int op, int arg, int *cnt) { size_t size = sizeof(int); *************** *** 374,380 **** char fmt[MAX_COLS]; /* static area where result is built */ char * ! format_next_process(caddr_t handle, char *(*get_userid)()) { char *p_wait, waddr[sizeof(void *) * 2 + 3]; /* Hexify void pointer */ struct kinfo_proc *pp; --- 374,380 ---- char fmt[MAX_COLS]; /* static area where result is built */ char * ! format_next_process(caddr_t handle, char *(*get_userid)(uid_t)) { char *p_wait, waddr[sizeof(void *) * 2 + 3]; /* Hexify void pointer */ struct kinfo_proc *pp; *************** *** 470,476 **** if ((result = PROCSIZE(p2) - PROCSIZE(p1)) == 0) /* compare_cpu - the comparison function for sorting by cpu percentage */ ! int compare_cpu(const void *v1, const void *v2) { struct proc **pp1 = (struct proc **) v1; --- 470,476 ---- if ((result = PROCSIZE(p2) - PROCSIZE(p1)) == 0) /* compare_cpu - the comparison function for sorting by cpu percentage */ ! static int compare_cpu(const void *v1, const void *v2) { struct proc **pp1 = (struct proc **) v1; *************** *** 494,500 **** } /* compare_size - the comparison function for sorting by total memory usage */ ! int compare_size(const void *v1, const void *v2) { struct proc **pp1 = (struct proc **) v1; --- 494,500 ---- } /* compare_size - the comparison function for sorting by total memory usage */ ! static int compare_size(const void *v1, const void *v2) { struct proc **pp1 = (struct proc **) v1; *************** *** 518,524 **** } /* compare_res - the comparison function for sorting by resident set size */ ! int compare_res(const void *v1, const void *v2) { struct proc **pp1 = (struct proc **) v1; --- 518,524 ---- } /* compare_res - the comparison function for sorting by resident set size */ ! static int compare_res(const void *v1, const void *v2) { struct proc **pp1 = (struct proc **) v1; *************** *** 542,548 **** } /* compare_time - the comparison function for sorting by CPU time */ ! int compare_time(const void *v1, const void *v2) { struct proc **pp1 = (struct proc **) v1; --- 542,548 ---- } /* compare_time - the comparison function for sorting by CPU time */ ! static int compare_time(const void *v1, const void *v2) { struct proc **pp1 = (struct proc **) v1; *************** *** 566,572 **** } /* compare_prio - the comparison function for sorting by CPU time */ ! int compare_prio(const void *v1, const void *v2) { struct proc **pp1 = (struct proc **) v1; --- 566,572 ---- } /* compare_prio - the comparison function for sorting by CPU time */ ! static int compare_prio(const void *v1, const void *v2) { struct proc **pp1 = (struct proc **) v1;