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

Comparing ray/src/hd/rholo.c (file contents):
Revision 3.80 by greg, Fri Oct 5 19:19:16 2018 UTC vs.
Revision 3.83 by greg, Thu Feb 9 21:54:11 2023 UTC

# Line 458 | Line 458 | creatholo(                     /* create a holodeck output file */
458          int     fd;
459          FILE    *fp;
460                                          /* open & truncate file */
461 <        if ((fp = fopen(hdkfile, "w+")) == NULL) {
461 >        if ((fp = fopen(hdkfile, "wb+")) == NULL) {
462                  sprintf(errmsg, "cannot open \"%s\" for writing", hdkfile);
463                  error(SYSTEM, errmsg);
464          }
# Line 466 | Line 466 | creatholo(                     /* create a holodeck output file */
466          newheader("RADIANCE", fp);
467          fprintf(fp, "SOFTWARE= %s\n", VersionID);
468          printvars(fp);
469 +        fputendian(fp);
470          fputformat(HOLOFMT, fp);
471          fputc('\n', fp);
472          putw(HOLOMAGIC, fp);            /* put magic number */
# Line 525 | Line 526 | loadholo(void)                 /* start loading a holodeck from fnam
526          off_t   nextloc;
527          
528          if ((ncprocs > 0) & (force >= 0))
529 <                fp = fopen(hdkfile, "r+");
529 >                fp = fopen(hdkfile, "rb+");
530          else
531                  fp = NULL;
532          if (fp == NULL) {
533 <                if ((fp = fopen(hdkfile, "r")) == NULL) {
533 >                if ((fp = fopen(hdkfile, "rb")) == NULL) {
534                          sprintf(errmsg, "cannot open \"%s\"", hdkfile);
535                          error(SYSTEM, errmsg);
536                  }
# Line 631 | Line 632 | badvalue(                      /* report bad variable value and exit */
632  
633  
634   void
635 < eputs(s)                        /* put error message to stderr */
635 < char  *s;
635 > eputs(const char *s)            /* put error message to stderr */
636   {
637          static int  midline = 0;
638  
# Line 651 | Line 651 | char  *s;
651  
652  
653   void
654 < quit(ec)                        /* exit program gracefully */
655 < int     ec;
654 > quit(int ec)                    /* exit program gracefully */
655   {
656          int     status = 0;
657  

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines