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

Comparing ray/src/rt/lookamb.c (file contents):
Revision 2.1 by greg, Tue Nov 12 17:08:36 1991 UTC vs.
Revision 2.2 by greg, Mon Jul 13 16:17:42 1992 UTC

# Line 65 | Line 65 | char  *argv[];
65   lookamb(fp)                     /* get ambient values from a file */
66   FILE  *fp;
67   {
68 <        while (fread((char *)&av, sizeof(AMBVAL), 1, fp) == 1) {
68 >        while (readambval(&av, fp)) {
69                  if (dataonly) {
70                          printf("%f\t%f\t%f\t", av.pos[0], av.pos[1], av.pos[2]);
71                          printf("%f\t%f\t%f\t", av.dir[0], av.dir[1], av.dir[2]);
# Line 132 | Line 132 | FILE  *fp;
132                                  &av.gdir[0], &av.gdir[1], &av.gdir[2]) != 3)
133                          return;
134                  av.next = NULL;
135 <                fwrite((char *)&av, sizeof(AMBVAL), 1, stdout);
135 >                writambval(&av, stdout);
136                  if (ferror(stdout))
137                          exit(1);
138          }

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines