--- ray/src/rt/devcomm.c 2008/05/01 15:50:28 2.14 +++ ray/src/rt/devcomm.c 2016/03/06 01:13:17 2.18 @@ -1,5 +1,5 @@ #ifndef lint -static const char RCSid[] = "$Id: devcomm.c,v 2.14 2008/05/01 15:50:28 greg Exp $"; +static const char RCSid[] = "$Id: devcomm.c,v 2.18 2016/03/06 01:13:17 schorsch Exp $"; #endif /* * devcomm.c - communication routines for separate drivers. @@ -10,8 +10,11 @@ static const char RCSid[] = "$Id: devcomm.c,v 2.14 200 #include "copyright.h" #include -#include /* XXX platform specific */ +#if !defined(_WIN32) && !defined(_WIN64) +#include +#endif +#include "paths.h" #include "platform.h" #include "standard.h" #include "driver.h" @@ -54,13 +57,15 @@ final_connect(void) /* verify and initialize connec getstate(); /* set error vectors */ erract[COMMAND].pf = comm_comout; + /* doesn't work with raypcalls.c if (erract[WARNING].pf != NULL) erract[WARNING].pf = comm_comout; + */ return(&comm_driver); } -extern struct driver * +struct driver * slave_init( /* run rview in slave mode */ char *dname, char *id @@ -73,7 +78,7 @@ slave_init( /* run rview in slave mode */ } -extern struct driver * +struct driver * comm_init( /* set up and execute driver */ char *dname, char *id @@ -142,8 +147,10 @@ comm_close(void) /* done with driver */ fclose(devin); if (devchild < 0) return; +#if !defined(_WIN32) && !defined(_WIN64) while ((pid = wait(0)) != -1 && pid != devchild) ; +#endif } @@ -243,11 +250,11 @@ comm_comin( /* read string from command line */ static void mygets( /* get string from file (with nul) */ - register char *s, - register FILE *fp + char *s, + FILE *fp ) { - register int c; + int c; while ((c = getc(fp)) != EOF) if ((*s++ = c) == '\0') @@ -258,8 +265,8 @@ mygets( /* get string from file (with nul) */ static void myputs( /* put string to file (with nul) */ - register char *s, - register FILE *fp + char *s, + FILE *fp ) { do