/*
 * |-----------------------------------------------------------|
 * | Copyright (c) 1991, 1990 MIPS Computer Systems, Inc.      |
 * | All Rights Reserved                                       |
 * |-----------------------------------------------------------|
 * |          Restricted Rights Legend                         |
 * | Use, duplication, or disclosure by the Government is      |
 * | subject to restrictions as set forth in                   |
 * | subparagraph (c)(1)(ii) of the Rights in Technical        |
 * | Data and Computer Software Clause of DFARS 252.227-7013.  |
 * |         MIPS Computer Systems, Inc.                       |
 * |         950 DeGuigne Avenue                               |
 * |         Sunnyvale, CA 94088-3650, USA                     |
 * |-----------------------------------------------------------|
 */
/* $Header: top.h,v 1.9.3.1 92/06/24 14:12:44 marker Exp $ */
/*
 *  Top - a top users display for Berkeley Unix
 *
 *  General (global) definitions
 */

/* Number of lines of header information on the standard screen */
#define Header_lines	6

/* Number of columns needed for display */
#define Display_width	80

/* Log base 2 of 1024 is 10 (2^10 == 1024) */
#define LOG1024		10

/* Convert clicks (kernel pages) to kbytes ... */
/* If there is no PGSHIFT defined, assume it is 11 */
/* Is this needed for compatability with some old flavor of 4.2 or 4.1? */
#if defined(scs)
	/* the s/375 <machine/param.h> has this as 9, but it's really 10 */
# undef PGSHIFT
# define PGSHIFT 10
#endif scs

#ifdef RISCOS
#define pagetok(size)	((size) << (pfn_to_byte_shift - LOG1024))
#else RISCOS
#ifndef PGSHIFT
# define pagetok(size)	((size) << 1)
#else
# if PGSHIFT>10
#  define pagetok(size)	((size) << (PGSHIFT - LOG1024))
# else
#  define pagetok(size)	((size) >> (LOG1024 - PGSHIFT))
# endif
#endif
#endif RISCOS

extern double logcpu;

double log();
double exp();

extern char (* screenbuf)[Display_width];

#ifdef RISCOS
#define CPUSTATES 5
#define NUM_PROCSTATES 8
#else RISCOS
#define NUM_PROCSTATES 7
#endif RISCOS

/* proc info */
struct procinfo {
    struct prpsinfo info;
    struct prpsinfo_x info_x;
};
