home *** CD-ROM | disk | FTP | other *** search
/ ftp.muug.mb.ca / 2014.06.ftp.muug.mb.ca.tar / ftp.muug.mb.ca / pub / src / top / top.h < prev    next >
C/C++ Source or Header  |  1992-02-01  |  1KB  |  45 lines

  1. /*
  2.  *  Top - a top users display for Berkeley Unix
  3.  *
  4.  *  General (global) definitions
  5.  */
  6.  
  7. /* Number of lines of header information on the standard screen */
  8. #define Header_lines    6
  9.  
  10. /* Number of columns needed for display */
  11. #define Display_width    80
  12.  
  13. /* Log base 2 of 1024 is 10 (2^10 == 1024) */
  14. #define LOG1024        10
  15.  
  16. /* Convert clicks (kernel pages) to kbytes ... */
  17. /* If there is no PGSHIFT defined, assume it is 11 */
  18. /* Is this needed for compatability with some old flavor of 4.2 or 4.1? */
  19. #ifndef PGSHIFT
  20. #define pagetok(size)    ((size) << 1)
  21. #else
  22. #if PGSHIFT>10
  23. #define pagetok(size)    ((size) << (PGSHIFT - LOG1024))
  24. #else
  25. #define pagetok(size)    ((size) >> (LOG1024 - PGSHIFT))
  26. #endif
  27. #endif
  28.  
  29. extern double logcpu;
  30.  
  31. double log();
  32. double exp();
  33.  
  34. char *itoa();
  35. char *itoa7();
  36.  
  37. /* Special atoi routine returns either a non-negative number or one of: */
  38. #define Infinity    -1
  39. #define Invalid        -2
  40.  
  41. /* Special hack to return the length of a converted string */
  42. #define idigits(str) (int)((str)[-1])
  43.  
  44. extern char (* screenbuf)[Display_width];
  45.