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.22 by greg, Fri Oct 5 19:19:16 2018 UTC vs.
Revision 3.23 by greg, Mon Oct 21 18:19:32 2019 UTC

# Line 112 | Line 112 | rhinitcopy(    /* open files and copy header */
112          FILE    *infp, *outfp;
113          long    ifpos;
114                                          /* open files for i/o */
115 <        if ((infp = fopen(infn, "r")) == NULL) {
115 >        if ((infp = fopen(infn, "rb")) == NULL) {
116                  sprintf(errmsg, "cannot open \"%s\" for reading", infn);
117                  error(SYSTEM, errmsg);
118          }
# Line 120 | Line 120 | rhinitcopy(    /* open files and copy header */
120                  sprintf(errmsg, "output file \"%s\" already exists!", outfn);
121                  error(USER, errmsg);
122          }
123 <        if ((outfp = fopen(outfn, "w+")) == NULL) {
123 >        if ((outfp = fopen(outfn, "wb+")) == NULL) {
124                  sprintf(errmsg, "cannot open \"%s\" for writing", outfn);
125                  error(SYSTEM, errmsg);
126          }

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines