1 /* 2 * Copyright (c) 1987 by Ed James, UC Berkeley. All rights reserved. 3 * 4 * Copy permission is hereby granted provided that this notice is 5 * retained on all partial or complete copies. 6 * 7 * For more info on this and all of my stuff, mail edjames@berkeley.edu. 8 */ 9 10 #include <stdio.h> 11 #include <ctype.h> 12 #include <sys/types.h> 13 #include <pwd.h> 14 15 #ifdef BSD 16 #include <sgtty.h> 17 #include <sys/time.h> 18 #include <sys/file.h> 19 #endif 20 21 #ifdef SYSV 22 #include <fcntl.h> 23 #include <unistd.h> 24 #include <string.h> 25 #include <sys/utsname.h> 26 #endif 27 28 #include <signal.h> 29 #include <math.h> 30 31 #include <curses.h> 32 33 #ifdef SYSV 34 #define index strchr 35 #define rindex strrchr 36 #define bcopy(a,b,c) memcpy((b), (a), (c)) 37 #define bzero(a,b) memset((a), '\0', (b)) 38 #define srandom srand 39 #define random rand 40 #define sgttyb termio 41 #define sg_erase c_cc[2] 42 #define sg_kill c_cc[3] 43 #endif 44 45 #include "def.h" 46 #include "struct.h" 47 #include "extern.h" 48 #include "tunable.h" 49