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

Comparing ray/src/hd/rhcopy.c (file contents):
Revision 3.14 by gwlarson, Mon Mar 8 17:32:26 1999 UTC vs.
Revision 3.15 by greg, Sat Feb 22 02:07:24 2003 UTC

# Line 1 | Line 1
1 /* Copyright (c) 1999 Silicon Graphics, Inc. */
2
1   #ifndef lint
2 < static char SCCSid[] = "$SunId$ SGI";
2 > static const char       RCSid[] = "$Id$";
3   #endif
6
4   /*
5   * Copy data into a holodeck file
6   */
7  
8   #include "holo.h"
9   #include "view.h"
13 #include "resolu.h"
10  
11   #ifndef BKBSIZE
12   #define BKBSIZE         256             /* beam clump size (kilobytes) */
# Line 124 | Line 120 | int    append;
120                  error(SYSTEM, errmsg);
121          }
122                                          /* check header and magic number */
123 <        if (getheader(fp, holheadline, &hflags) < 0 ||
123 >        if (getheader(fp, holheadline, (char *)&hflags) < 0 ||
124                          hflags&H_BADF || getw(fp) != HOLOMAGIC) {
125                  sprintf(errmsg, "file \"%s\" not in holodeck format", fname);
126                  error(USER, errmsg);
# Line 133 | Line 129 | int    append;
129          nextloc = ftell(fp);                    /* get stdio position */
130          fclose(fp);                             /* done with stdio */
131          for (n = 0; nextloc > 0L; n++) {        /* initialize each section */
132 <                lseek(fd, nextloc, 0);
132 >                lseek(fd, (off_t)nextloc, 0);
133                  read(fd, (char *)&nextloc, sizeof(nextloc));
134                  hdinit(fd, NULL)->priv = hflags&H_OBST ? &obstr :
135                                  hflags&H_OBSF ? &unobstr : (char *)NULL;
# Line 322 | Line 318 | char   *pcf, *zbf;
318          copystruct(&phd.vw, &stdview);
319          phd.expos = 1.0;
320          phd.badfmt = phd.gotview = phd.altprims = 0;
321 <        if (getheader(pfp, picheadline, &phd) < 0 ||
321 >        if (getheader(pfp, picheadline, (char *)&phd) < 0 ||
322                          phd.badfmt || !fgetsresolu(&prs, pfp)) {
323                  sprintf(errmsg, "bad format for picture file \"%s\"", pcf);
324                  error(USER, errmsg);
# Line 390 | Line 386 | char   *pcf, *zbf;
386                                  /* write output and free beams */
387          hdflush(NULL);
388                                  /* clean up */
389 <        free((char *)cscn);
390 <        free((char *)zscn);
389 >        free((void *)cscn);
390 >        free((void *)zscn);
391          fclose(pfp);
392          close(zfd);
393   }
394  
395  
396 + void
397   eputs(s)                        /* put error message to stderr */
398   register char  *s;
399   {
# Line 416 | Line 413 | register char  *s;
413   }
414  
415  
416 + void
417   quit(code)                      /* exit the program gracefully */
418   int     code;
419   {

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines