=================================================================== RCS file: /cvsrepo/anoncvs/cvs/src/usr.bin/top/machine.c,v retrieving revision 1.104 retrieving revision 1.105 diff -c -r1.104 -r1.105 *** src/usr.bin/top/machine.c 2020/06/24 23:56:01 1.104 --- src/usr.bin/top/machine.c 2020/06/25 20:38:41 1.105 *************** *** 1,4 **** ! /* $OpenBSD: machine.c,v 1.104 2020/06/24 23:56:01 kn Exp $ */ /*- * Copyright (c) 1994 Thorsten Lockert --- 1,4 ---- ! /* $OpenBSD: machine.c,v 1.105 2020/06/25 20:38:41 kn Exp $ */ /*- * Copyright (c) 1994 Thorsten Lockert *************** *** 64,70 **** struct handle { struct kinfo_proc **next_proc; /* points to next valid proc pointer */ - int remaining; /* number of pointers remaining */ }; /* what we consider to be process size: */ --- 64,69 ---- *************** *** 493,499 **** /* pass back a handle */ handle.next_proc = pref; - handle.remaining = active_procs; return &handle; } --- 492,497 ---- *************** *** 539,549 **** } void ! skip_next_process(struct handle *hndl) { ! /* find and remember the next proc structure */ ! hndl->next_proc++; ! hndl->remaining--; } char * --- 537,545 ---- } void ! skip_processes(struct handle *hndl, int n) { ! hndl->next_proc += n; } char * *************** *** 558,564 **** /* find and remember the next proc structure */ pp = *(hndl->next_proc++); - hndl->remaining--; cputime = pp->p_rtime_sec + ((pp->p_rtime_usec + 500000) / 1000000); --- 554,559 ----