--- ray/src/hd/rhdisp.c 2003/02/22 02:07:24 3.43 +++ ray/src/hd/rhdisp.c 2003/07/21 22:30:18 3.48 @@ -1,15 +1,17 @@ #ifndef lint -static const char RCSid[] = "$Id: rhdisp.c,v 3.43 2003/02/22 02:07:24 greg Exp $"; +static const char RCSid[] = "$Id: rhdisp.c,v 3.48 2003/07/21 22:30:18 schorsch Exp $"; #endif /* * Holodeck display process. */ +#include +#include + #include "rholo.h" #include "rhdisp.h" #include "rhdriver.h" #include "selcall.h" -#include #ifndef VIEWHISTLEN #define VIEWHISTLEN 4 /* number of remembered views */ @@ -216,14 +218,14 @@ char *gfn, *pfn; hdlist[hd] = (HOLO *)malloc(sizeof(HOLO)); if (hdlist[hd] == NULL) error(SYSTEM, "out of memory in add_holo"); - bcopy((char *)hdg, (char *)hdlist[hd], sizeof(HDGRID)); + memcpy((void *)hdlist[hd], (void *)hdg, sizeof(HDGRID)); hdcompgrid(hdlist[hd]); hdgfn[hd] = savestr(gfn); hdpfn[hd] = pfn && *pfn ? savestr(pfn) : (char *)NULL; if (hd) return; /* set initial viewpoint */ - copystruct(&nv, &odev.v); + nv = odev.v; VSUM(nv.vp, hdlist[0]->orig, hdlist[0]->xv[0], 0.5); VSUM(nv.vp, nv.vp, hdlist[0]->xv[1], 0.5); VSUM(nv.vp, nv.vp, hdlist[0]->xv[2], 0.5); @@ -275,7 +277,7 @@ register VIEW *v; static unsigned nhist; VIEW *dv; int i, res[2]; - int2 *slist; + int16 *slist; char *err; /* restore previous view? */ if (v == NULL) { @@ -304,7 +306,7 @@ again: error(COMMAND, "invalid starting view"); return; } - copystruct(v, viewhist + ((nhist-1)%VIEWHISTLEN)); + *v = *(viewhist + ((nhist-1)%VIEWHISTLEN)); goto again; /* poss. overloading dev_section()? */ } DCHECK(*slist < 0, WARNING, "no visible sections in new_view"); @@ -317,7 +319,7 @@ again: imm_mode = beam_sync(odev.firstuse) > 0; /* record new view */ if (v < viewhist || v >= viewhist+VIEWHISTLEN) { - copystruct(viewhist + (nhist%VIEWHISTLEN), v); + *(viewhist + (nhist%VIEWHISTLEN)) = *v; nhist++; } } @@ -347,7 +349,7 @@ char *args; beam_init(0); /* add basic views */ for (i = 0; (dv = dev_auxview(i, res)) != NULL; i++) beam_view(dv, res[0]>>4, res[1]>>4); - copystruct(&vwfocus, &odev.v); /* add focus view */ + vwfocus = odev.v; /* add focus view */ switch (odev.v.type) { case VT_PER: vwfocus.horiz = 2.*180./PI*atan( @@ -413,7 +415,7 @@ usr_input() /* get user input and process it */ } switch (i) { case DC_SETVIEW: /* set the view */ - copystruct(&vparams, &odev.v); + vparams = odev.v; if (!sscanview(&vparams, args)) error(COMMAND, "missing view options"); else @@ -479,7 +481,8 @@ serv_result() /* get next server result and process if (buf == NULL) buf = (char *)malloc(bufsiz=msg.nbytes); else - buf = (char *)realloc(buf, bufsiz=msg.nbytes); + buf = (char *)realloc((void *)buf, + bufsiz=msg.nbytes); if (buf == NULL) error(SYSTEM, "out of memory in serv_result"); }