#include #include #include #ifdef SYSV #include typedef struct dirent Directory; #else #include typedef struct direct Directory; #endif #include #include "gmac.h" #define MAX_BUF_SIZ 4096 #define MAX_HOST 300 #define FNLEN 64 #define NAMELEN 16 #define MAX_ORG 30 #define TITLE_LEN 100 #define MAXWHO (1024/sizeof(struct whoent)) #define INTERVAL 30 /* sec */ #define NIL 0 #define T 1 #define SSIZE sizeof(u_short) #define LSIZE sizeof(u_long) #define SPOOLDIR "/usr/spool/rwho" #define ORGAN_FILE "/etc/host_org" typedef char bool; typedef struct host_list { char *hostname; struct host_list *nexthost; } HostList; typedef struct org_host { char *organ; /* Organization of host */ u_char hostNum; /* Number of host */ HostList *h_list; /* List of hosts */ } OrgHost; global char HostBuffer[MAX_HOST][FNLEN]; global char *HostNames[MAX_HOST]; global short HostNum initialize(0); global long Currenttime; global OrgHost Organizations[MAX_ORG]; global short OrganNum initialize(0); global char *MyOrgan; global char Title[TITLE_LEN]; global struct whod Whodata[MAX_HOST]; global short WhNum initialize(0); global char *DisplayOrgans[MAX_ORG]; global short DisplayOrganNum initialize(0); global bool SortHosts initialize(1); extern char *allocStr(),*malloc(); extern HostList *hostuser();