[BACK]Return to top.h CVS log [TXT][DIR] Up to [local] / src / usr.bin / top

Annotation of src/usr.bin/top/top.h, Revision 1.7

1.7     ! markus      1: /*     $OpenBSD: top.h,v 1.6 2005/06/08 22:36:43 millert Exp $ */
1.4       deraadt     2:
                      3: /*
                      4:  *  Top users/processes display for Unix
                      5:  *  Version 3
                      6:  *
                      7:  * Copyright (c) 1984, 1989, William LeFebvre, Rice University
                      8:  * Copyright (c) 1989, 1990, 1992, William LeFebvre, Northwestern University
                      9:  *
                     10:  * Redistribution and use in source and binary forms, with or without
                     11:  * modification, are permitted provided that the following conditions
                     12:  * are met:
                     13:  * 1. Redistributions of source code must retain the above copyright
                     14:  *    notice, this list of conditions and the following disclaimer.
                     15:  * 2. Redistributions in binary form must reproduce the above copyright
                     16:  *    notice, this list of conditions and the following disclaimer in the
                     17:  *    documentation and/or other materials provided with the distribution.
                     18:  *
                     19:  * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
                     20:  * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
                     21:  * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
                     22:  * IN NO EVENT SHALL THE AUTHOR OR HIS EMPLOYER BE LIABLE FOR ANY DIRECT, INDIRECT,
                     23:  * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
                     24:  * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
                     25:  * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
                     26:  * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
                     27:  * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
                     28:  * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
                     29:  */
1.1       downsj     30:
                     31: /*
                     32:  *  Top - a top users display for Berkeley Unix
                     33:  *
                     34:  *  General (global) definitions
                     35:  */
                     36:
1.2       downsj     37: #include <sys/cdefs.h>
                     38:
1.1       downsj     39: /* Current major version number */
                     40: #define VERSION                3
                     41:
                     42: /* Number of lines of header information on the standard screen */
1.6       millert    43: extern int Header_lines;
1.1       downsj     44:
                     45: /* Maximum number of columns allowed for display */
1.7     ! markus     46: #define MAX_COLS       256
1.1       downsj     47:
                     48: /* Log base 2 of 1024 is 10 (2^10 == 1024) */
                     49: #define LOG1024                10
                     50:
                     51: /* Special atoi routine returns either a non-negative number or one of: */
                     52: #define Infinity       -1
                     53: #define Invalid                -2
                     54:
                     55: /* maximum number we can have */
                     56: #define Largest                0x7fffffff
                     57:
                     58: /*
                     59:  * The entire display is based on these next numbers being defined as is.
                     60:  */
                     61:
                     62: #define NUM_AVERAGES    3
                     63:
1.2       downsj     64: /* externs */
                     65: extern const char copyright[];
                     66:
                     67: extern int overstrike;
                     68:
                     69: /* commands.c */
1.3       millert    70: extern void show_help(void);
                     71: extern int error_count(void);
                     72: extern void show_errors(void);
                     73: extern char *kill_procs(char *);
                     74: extern char *renice_procs(char *);
1.2       downsj     75:
                     76: /* top.c */
1.3       millert    77: extern void quit(int);
1.2       downsj     78:
                     79: /* username.c */
1.3       millert    80: extern char *username(uid_t);
                     81: extern uid_t userid(char *);
1.2       downsj     82:
                     83: /* version.c */
1.3       millert    84: extern char *version_string(void);
1.6       millert    85: extern int y_mem;
                     86: extern int y_message;
                     87: extern int y_header;
                     88: extern int y_idlecursor;
                     89: extern int y_procs;
                     90: extern int num_CPUS;