--- ray/src/hd/rhoptimize.c 2003/06/30 14:59:12 3.12 +++ ray/src/hd/rhoptimize.c 2003/07/27 22:12:02 3.15 @@ -1,5 +1,5 @@ #ifndef lint -static const char RCSid[] = "$Id: rhoptimize.c,v 3.12 2003/06/30 14:59:12 schorsch Exp $"; +static const char RCSid[] = "$Id: rhoptimize.c,v 3.15 2003/07/27 22:12:02 schorsch Exp $"; #endif /* * Optimize holodeck for quick access. @@ -9,10 +9,8 @@ static const char RCSid[] = "$Id: rhoptimize.c,v 3.12 #include #include -#ifdef _WIN32 - #include /* getpid() */ -#endif +#include "rtprocess.h" /* getpid() */ #include "holo.h" #ifndef BKBSIZE @@ -40,7 +38,7 @@ char *argv[]; dupchecking++; argv++; argc--; } - if (argc < 1 | argc > 2) { + if ((argc < 1) | (argc > 2)) { fprintf(stderr, "Usage: %s [-u] input.hdk [output.hdk]\n", progname); exit(1); @@ -160,9 +158,9 @@ int n; rva[i].r[1][0]==rva[j].r[1][0] && rva[i].r[1][1]==rva[j].r[1][1] ) { n--; /* swap duplicate with end */ - copystruct(&rtmp, rva+n); - copystruct(rva+n, rva+i); - copystruct(rva+i, &rtmp); + rtmp = *(rva+n); + *(rva+n) = *(rva+i); + *(rva+i) = rtmp; i--; /* recheck one we swapped */ } return(n);