ViewVC Help
View File | Revision Log | Show Annotations | Download File | Root Listing
root/radiance/ray/src/hd/rhoptimize.c
(Generate patch)

Comparing ray/src/hd/rhoptimize.c (file contents):
Revision 3.12 by schorsch, Mon Jun 30 14:59:12 2003 UTC vs.
Revision 3.15 by schorsch, Sun Jul 27 22:12:02 2003 UTC

# Line 9 | Line 9 | static const char      RCSid[] = "$Id$";
9  
10   #include <signal.h>
11   #include <string.h>
12 #ifdef _WIN32
13  #include <process.h> /* getpid() */
14 #endif
12  
13 + #include "rtprocess.h" /* getpid() */
14   #include "holo.h"
15  
16   #ifndef BKBSIZE
# Line 40 | Line 38 | char   *argv[];
38                  dupchecking++;
39                  argv++; argc--;
40          }
41 <        if (argc < 1 | argc > 2) {
41 >        if ((argc < 1) | (argc > 2)) {
42                  fprintf(stderr, "Usage: %s [-u] input.hdk [output.hdk]\n",
43                                  progname);
44                  exit(1);
# Line 160 | Line 158 | int    n;
158                                          rva[i].r[1][0]==rva[j].r[1][0] &&
159                                          rva[i].r[1][1]==rva[j].r[1][1] ) {
160                                  n--;            /* swap duplicate with end */
161 <                                copystruct(&rtmp, rva+n);
162 <                                copystruct(rva+n, rva+i);
163 <                                copystruct(rva+i, &rtmp);
161 >                                rtmp = *(rva+n);
162 >                                *(rva+n) = *(rva+i);
163 >                                *(rva+i) = rtmp;
164                                  i--;            /* recheck one we swapped */
165                          }
166          return(n);

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines