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

Comparing ray/src/cv/rad2mgf.c (file contents):
Revision 2.27 by greg, Fri Apr 20 15:53:22 2018 UTC vs.
Revision 2.29 by greg, Tue Apr 22 04:45:25 2025 UTC

# Line 6 | Line 6 | static const char      RCSid[] = "$Id$";
6   */
7  
8   #include <ctype.h>
9 #include <string.h>
10 #include <stdio.h>
9  
10   #include "platform.h"
11   #include "rtmath.h"
# Line 195 | Line 193 | rad2mgf(               /* convert a Radiance file to MGF */
193                          }
194                          break;
195                  }
196 <        printf("# End conversion from: %s\n", inp);
197 <        if (inp[0] == '!')
198 <                pclose(fp);
199 <        else
196 >        if (inp[0] == '!') {
197 >                if (pclose(fp) != 0) {
198 >                        fprintf(stderr, "%s: bad exit status\n", inp);
199 >                        exit(1);
200 >                }
201 >        } else
202                  fclose(fp);
203 +        printf("# End conversion from: %s\n", inp);
204   }
205  
206  

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines