=================================================================== RCS file: /cvsrepo/anoncvs/cvs/src/usr.bin/top/machine.c,v retrieving revision 1.28 retrieving revision 1.29 diff -c -r1.28 -r1.29 *** src/usr.bin/top/machine.c 2002/07/02 03:05:47 1.28 --- src/usr.bin/top/machine.c 2003/06/12 22:30:23 1.29 *************** *** 1,4 **** ! /* $OpenBSD: machine.c,v 1.28 2002/07/02 03:05:47 tholo Exp $ */ /*- * Copyright (c) 1994 Thorsten Lockert --- 1,4 ---- ! /* $OpenBSD: machine.c,v 1.29 2003/06/12 22:30:23 pvalchev Exp $ */ /*- * Copyright (c) 1994 Thorsten Lockert *************** *** 170,176 **** int maxslp; int ! getstathz() { struct clockinfo cinf; size_t size = sizeof(cinf); --- 170,176 ---- int maxslp; int ! getstathz(void) { struct clockinfo cinf; size_t size = sizeof(cinf); *************** *** 184,191 **** } int ! machine_init(statics) ! struct statics *statics; { int pagesize; --- 184,190 ---- } int ! machine_init(struct statics *statics) { int pagesize; *************** *** 221,228 **** } char * ! format_header(uname_field) ! char *uname_field; { char *ptr; --- 220,226 ---- } char * ! format_header(char *uname_field) { char *ptr; *************** *** 293,301 **** static struct handle handle; struct kinfo_proc * ! getprocs(op, arg, cnt) ! int op, arg; ! int *cnt; { size_t size = sizeof(int); int mib[4] = {CTL_KERN, KERN_PROC, op, arg}; --- 291,297 ---- static struct handle handle; struct kinfo_proc * ! getprocs(int op, int arg, int *cnt) { size_t size = sizeof(int); int mib[4] = {CTL_KERN, KERN_PROC, op, arg}; *************** *** 336,346 **** } caddr_t ! get_process_info(si, sel, compare) ! struct system_info *si; ! struct process_select *sel; ! int (*compare)(const void *, const void *); ! { int show_idle, show_system, show_uid, show_command; int total_procs, active_procs, i; --- 332,339 ---- } caddr_t ! get_process_info(struct system_info *si, struct process_select *sel, ! int (*compare)(const void *, const void *)) { int show_idle, show_system, show_uid, show_command; int total_procs, active_procs, i; *************** *** 409,418 **** char fmt[MAX_COLS]; /* static area where result is built */ char * ! format_next_process(handle, get_userid) ! caddr_t handle; ! char *(*get_userid)(); ! { char waddr[sizeof(void *) * 2 + 3]; /* Hexify void pointer */ struct kinfo_proc *pp; --- 402,408 ---- char fmt[MAX_COLS]; /* static area where result is built */ char * ! format_next_process(caddr_t handle, char *(*get_userid)()) { char waddr[sizeof(void *) * 2 + 3]; /* Hexify void pointer */ struct kinfo_proc *pp; *************** *** 520,527 **** /* compare_cpu - the comparison function for sorting by cpu percentage */ int ! compare_cpu(v1, v2) ! const void *v1, *v2; { struct proc **pp1 = (struct proc **) v1; struct proc **pp2 = (struct proc **) v2; --- 510,516 ---- /* 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; struct proc **pp2 = (struct proc **) v2; *************** *** 546,553 **** /* compare_size - the comparison function for sorting by total memory usage */ int ! compare_size(v1, v2) ! const void *v1, *v2; { struct proc **pp1 = (struct proc **) v1; struct proc **pp2 = (struct proc **) v2; --- 535,541 ---- /* 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; struct proc **pp2 = (struct proc **) v2; *************** *** 572,579 **** /* compare_res - the comparison function for sorting by resident set size */ int ! compare_res(v1, v2) ! const void *v1, *v2; { struct proc **pp1 = (struct proc **) v1; struct proc **pp2 = (struct proc **) v2; --- 560,566 ---- /* 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; struct proc **pp2 = (struct proc **) v2; *************** *** 598,605 **** /* compare_time - the comparison function for sorting by CPU time */ int ! compare_time(v1, v2) ! const void *v1, *v2; { struct proc **pp1 = (struct proc **) v1; struct proc **pp2 = (struct proc **) v2; --- 585,591 ---- /* 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; struct proc **pp2 = (struct proc **) v2; *************** *** 624,631 **** /* compare_prio - the comparison function for sorting by CPU time */ int ! compare_prio(v1, v2) ! const void *v1, *v2; { struct proc **pp1 = (struct proc **) v1; struct proc **pp2 = (struct proc **) v2; --- 610,616 ---- /* 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; struct proc **pp2 = (struct proc **) v2; *************** *** 668,675 **** * reflects this ordering. */ int ! proc_compare(v1, v2) ! const void *v1, *v2; { struct proc **pp1 = (struct proc **) v1; struct proc **pp2 = (struct proc **) v2; --- 653,659 ---- * reflects this ordering. */ int ! proc_compare(const void *v1, const void *v2) { struct proc **pp1 = (struct proc **) v1; struct proc **pp2 = (struct proc **) v2; *************** *** 720,727 **** * and "renice" commands. */ int ! proc_owner(pid) ! pid_t pid; { struct kinfo_proc **prefp, *pp; int cnt; --- 704,710 ---- * and "renice" commands. */ int ! proc_owner(pid_t pid) { struct kinfo_proc **prefp, *pp; int cnt; *************** *** 742,750 **** * to be based on the new swapctl(2) system call. */ static int ! swapmode(used, total) ! int *used; ! int *total; { int nswap, rnswap, i; struct swapent *swdev; --- 725,731 ---- * to be based on the new swapctl(2) system call. */ static int ! swapmode(int *used, int *total) { int nswap, rnswap, i; struct swapent *swdev;