--- ray/src/hd/rholo4.c 2016/08/18 00:52:48 3.37 +++ ray/src/hd/rholo4.c 2020/02/28 05:18:49 3.39 @@ -1,5 +1,5 @@ #ifndef lint -static const char RCSid[] = "$Id: rholo4.c,v 3.37 2016/08/18 00:52:48 greg Exp $"; +static const char RCSid[] = "$Id: rholo4.c,v 3.39 2020/02/28 05:18:49 greg Exp $"; #endif /* * Holodeck display process communication @@ -23,14 +23,14 @@ static const char RCSid[] = "$Id: rholo4.c,v 3.37 2016 #endif static int inp_flags; -static SUBPROC dpd; +static SUBPROC dpd = SP_INACTIVE; static FILE *dpout; static void disp_flush(void); static void disp_result(int type, int nbytes, char *p); -extern void +void disp_open( /* open the named display driver */ char *dname ) @@ -41,7 +41,7 @@ disp_open( /* open the named display driver */ if (!strcmp(dname, SLAVENAME)) { dpd.r = 0; /* read from stdin */ dpout = stdout; /* write to stdout */ - dpd.running = 0; /* we're the slave procees */ + dpd.flags = 0; /* we're the slave procees */ } else { /* get full display program name */ #ifdef DEVPATH @@ -98,16 +98,16 @@ disp_open( /* open the named display driver */ } -extern void +void disp_packet( /* display a packet */ - register PACKHEAD *p + PACKHEAD *p ) { disp_result(DS_BUNDLE, packsiz(p->nr), (char *)p); } -extern int +int disp_check( /* check display process */ int block ) @@ -251,7 +251,7 @@ readerr: } -extern int +int disp_close(void) /* close our display process */ { if (dpout == NULL) @@ -260,7 +260,7 @@ disp_close(void) /* close our display process */ disp_result(DS_SHUTDOWN, 0, NULL); fclose(dpout); dpout = NULL; - return(dpd.running ? close_process(&dpd) : 0); + return(dpd.flags&PF_RUNNING ? close_process(&dpd) : 0); }