ViewVC Help
View File | Revision Log | Show Annotations | Download File | Root Listing
root/Development/ray/src/common/loadvars.c
(Generate patch)

Comparing ray/src/common/loadvars.c (file contents):
Revision 2.22 by greg, Thu Feb 6 21:07:07 2025 UTC vs.
Revision 2.24 by greg, Sat Jun 7 05:09:45 2025 UTC

# Line 7 | Line 7 | static const char      RCSid[] = "$Id$";
7  
8   #include "copyright.h"
9  
10 #include <stdio.h>
11 #include <stdlib.h>
10   #include <ctype.h>
11  
12   #include "standard.h"
13 + #include "paths.h"
14   #include "vars.h"
15  
16   #define NOCHAR  127             /* constant for character to delete */
# Line 311 | Line 310 | fltvalue(                              /* check float variable for legal values
310   }
311  
312  
313 + int
314 + singlevar(                              /* assigned single value? */
315 +        VARIABLE *vp
316 + )
317 + {
318 +        if (vp->fixval == catvalues)
319 +                return(0);
320 +
321 +        return((vp->fixval == strvalue) |
322 +                        (vp->fixval == fltvalue) |
323 +                        (vp->fixval == intvalue) |
324 +                        (vp->fixval == qualvalue) |
325 +                        (vp->fixval == boolvalue));
326 + }
327 +
328   void
329   printvars(                              /* print variable values */
330          FILE    *fp
# Line 323 | Line 337 | printvars(                             /* print variable values */
337              for (j = 0; j < vdef(i); j++) {     /* print each assignment */
338                  fputs(vnam(i), fp);
339                  fputc('=', fp);
340 +                if (!singlevar(&vv[i]))
341 +                        fputc(' ', fp);
342                  k = clipline = ( vv[i].fixval == catvalues ? 64 : 236 )
343                                  - strlen(vnam(i)) ;
344                  cp = nvalue(i, j);

Diff Legend

Removed lines
+ Added lines
< Changed lines (old)
> Changed lines (new)