1: #include <stdio.h> 2: #include <signal.h> 3: #include <pwd.h> 4: #include <utmp.h> 5: #include <sgtty.h> 6: #include <sys/types.h> 7: #include <sys/timeb.h> 8: #include <sys/stat.h> 9: #include <time.h> 10: 11: #define gdadd(x) m.tdeliver += x 12: 13: #define ABSOLUTE 0100000 14: #define MAXRCVRS 50 15: #define MAXMSG 1000 16: #define DIRSIZE 254 /* No bigger than 254 */ 17: #define PRIORITY 01 /* bits */ 18: 19: struct dp_int 20: { char *unsgnd1; /* Unsigned dp integer */ 21: char *unsgnd2; 22: }; 23: 24: struct rmdblock 25: { time_t tdeliver; 26: int nobytes; 27: time_t tsent; 28: char sender[9]; 29: char bits; 30: char dirsize; 31: char nrcvrs; 32: int msgbytes; 33: }; 34: 35: extern int lflag; 36: extern int year, month, day, hour, minute; 37: extern char *loginfile; 38: extern char *usrfile; 39: extern char *ttname; 40: 41: extern char *rmdlock; /* exists while proc is busy */ 42: extern char *reminders; 43: extern char *rmdproc; /* contains proc id */ 44: extern char *rmdtemp; 45: 46: extern char *dummy; 47: extern char *nofile; 48: extern char *invalid; 49: extern char shell[]; 50: extern int Uid; 51: 52: extern struct rmdblock m; 53: 54: extern char rcvrlist[MAXRCVRS][8]; 55: extern char exdir[]; 56: extern char msg[]; 57: 58: extern int dmsize[]; 59: extern struct stat ttstat; 60: extern time_t time(); 61: struct tm *localtime(); 62: char *ctime(); 63: struct passwd *getpwnam(); 64: struct passwd *getpwuid();