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

Comparing ray/src/util/rpiece.c (file contents):
Revision 2.18 by greg, Fri Apr 16 12:03:59 1993 UTC vs.
Revision 2.19 by greg, Sat Apr 17 13:13:58 1993 UTC

# Line 1 | Line 1
1 < /* Copyright (c) 1992 Regents of the University of California */
1 > /* Copyright (c) 1993 Regents of the University of California */
2  
3   #ifndef lint
4   static char SCCSid[] = "$SunId$ LBL";
# Line 391 | Line 391 | int  xpos, ypos;
391   #else
392          pid = -1;               /* no forking */
393   #endif
394 <        fls.l_len = (long)vres*hmult*hres*sizeof(COLR);
395 <        fls.l_start = scanorig + (vmult-1-ypos)*fls.l_len;
394 >        fls.l_start = scanorig +
395 >                ((long)(vmult-1-ypos)*vres*hmult+xpos)*hres*sizeof(COLR);
396   #if NFS
397 +        fls.l_len = ((long)(vres-1)*hmult+1)*hres*sizeof(COLR);
398                                  /* lock file section so NFS doesn't mess up */
399          fls.l_whence = 0;
400          fls.l_type = F_WRLCK;
401          fcntl(outfd, F_SETLKW, &fls);
402   #endif
403                                  /* write new piece to file */
404 <        if (lseek(outfd, fls.l_start+(long)xpos*hres*sizeof(COLR), 0) == -1)
404 >        if (lseek(outfd, fls.l_start, 0) == -1)
405                  goto seekerr;
406          if (hmult == 1) {
407                  if (writebuf(outfd, (char *)pbuf,

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines