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

Comparing ray/src/util/eplus_adduvf.c (file contents):
Revision 2.20 by greg, Fri Jan 17 17:33:48 2020 UTC vs.
Revision 2.21 by greg, Mon Jan 20 17:53:40 2020 UTC

# Line 8 | Line 8 | static const char RCSid[] = "$Id$";
8   */
9  
10   #include <stdlib.h>
11 + #include <ctype.h>
12   #include "platform.h"
13   #include "rtio.h"
14   #include "rtmath.h"
# Line 40 | Line 41 | const char     ADD_HEADER[] =
41   #define NAME_FLD        1                       /* name field always first? */
42  
43   #define SS_BASE_FLD     4                       /* subsurface base surface */
44 < #define SS_VERT_FLD     10                      /* subsurface vertex count */
44 > #define SS_VERT_FLD     9                       /* subsurface vertex count */
45  
46   typedef struct {
47          const char      *pname;                 /* object type name */
# Line 204 | Line 205 | get_vlist(IDF_OBJECT *param, const char *zname)
205                  }
206                  res = idf_getfield(param, surf_type[i].vert_fld);
207          }
208 <        if (!res->val[0]) {                     /* hack for missing #vert */
208 >        if (!res->val[0] || tolower(res->val[0]) == 'a') {  /* autocalculate */
209                  IDF_FIELD       *fptr;
210                  if (next_fbp >= fld_buf+sizeof(fld_buf))
211                          next_fbp = fld_buf;
# Line 711 | Line 712 | main(int argc, char *argv[])
712          }
713                                                  /* check version (warning) */
714          if ((pptr = idf_getobject(our_idf, "Version")) != NULL &&
715 <                        pptr->flist != NULL && atoi(pptr->flist->val) != 7) {
715 >                        pptr->flist != NULL && pptr->flist->val[0] != '9') {
716                  fputs(progname, stderr);
717 <                fputs(": warning - written for IDF version 7.x, not ",
717 >                fputs(": warning - written for IDF version 9.x, not ",
718                                  stderr);
719                  fputs(pptr->flist->val, stderr);
720                  fputc('\n', stderr);

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines