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

Comparing ray/src/gen/mkillum.c (file contents):
Revision 2.43 by greg, Mon Jul 20 15:54:29 2020 UTC vs.
Revision 2.47 by greg, Wed Apr 23 02:35:26 2025 UTC

# Line 10 | Line 10 | static const char RCSid[] = "$Id$";
10  
11   #include  "paths.h"             /* win_popen() */
12   #include  "mkillum.h"
13 + #include  "func.h"
14  
15                                  /* default parameters */
16   #define  SAMPDENS       48              /* points per projected steradian */
# Line 69 | Line 70 | main(          /* compute illum distributions using rtrace */
70          dstrsrc = 0.5;
71          directrelay = 3;
72          ambounce = 2;
73 +                                /* initialize calcomp routines */
74 +        initfunc();
75                                  /* get options from command line */
76          for (i = 1; i < argc; i++) {
77                  while ((rval = expandarg(&argc, &argv, i)) > 0)
# Line 148 | Line 151 | init(char *octnm, int np)              /* start rendering process(
151  
152   void
153   eputs(                          /* put string to stderr */
154 <        char  *s
154 >        const char  *s
155   )
156   {
157          static int  midline = 0;
# Line 164 | Line 167 | eputs(                         /* put string to stderr */
167  
168  
169   void
170 < wputs(s)                        /* print warning if enabled */
168 < char  *s;
170 > wputs(const char *s)                    /* print warning if enabled */
171   {
172          if (warnings)
173                  eputs(s);
# Line 173 | Line 175 | char  *s;
175  
176  
177   void
178 < quit(ec)                        /* make sure exit is called */
177 < int     ec;
178 > quit(int ec)                    /* make sure exit is called */
179   {
180          if (ray_pnprocs > 0)    /* close children if any */
181                  ray_pclose(0);
# Line 209 | Line 210 | filter(                /* process stream */
210                                  error(SYSTEM, errmsg);
211                          }
212                          filter(pfp, buf);
213 <                        pclose(pfp);
213 >                        if (pclose(pfp) != 0) {
214 >                                sprintf(errmsg, "bad status from \"%s\"", buf);
215 >                                error(WARNING, errmsg);
216 >                        }
217                  } else {                                /* object */
218                          ungetc(c, infp);
219                          xobject(infp, name);

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines