--- ray/src/rt/devmain.c 1990/01/08 15:07:30 1.5 +++ ray/src/rt/devmain.c 1990/01/30 11:37:52 1.7 @@ -62,7 +62,7 @@ char *argv[]; if ((dev = dinit(argv[0], argv[3])) == NULL) quit(1); putw(COM_RECVM, devout); /* verify initialization */ - fwrite(&dev->pixaspect, sizeof(dev->pixaspect), 1, devout); + fwrite((char *)&dev->pixaspect, sizeof(dev->pixaspect), 1, devout); putw(dev->xsiz, devout); putw(dev->ysiz, devout); fflush(devout); @@ -103,7 +103,7 @@ r_paintr() /* paint a rectangle */ int xmin, ymin, xmax, ymax; nrays += 5; /* pretend */ - fread(col, sizeof(COLOR), 1, devin); + fread((char *)col, sizeof(COLOR), 1, devin); xmin = getw(devin); ymin = getw(devin); xmax = getw(devin); ymax = getw(devin); (*dev->paintr)(col, xmin, ymin, xmax, ymax); @@ -145,9 +145,15 @@ r_comout() /* print string to command line */ r_comin() /* read string from command line */ { - char buf[256]; + char buf[256], *prompt; + /* get prompt */ + if (getc(devin)) { + mygets(buf, devin); + prompt = buf; + } else + prompt = NULL; /* get string */ - (*dev->comin)(buf); + (*dev->comin)(buf, prompt); /* reply */ putc(COM_COMIN, devout); myputs(buf, devout);