--- ray/src/util/eplus_adduvf.c 2020/01/17 17:33:48 2.20 +++ ray/src/util/eplus_adduvf.c 2020/01/20 17:53:40 2.21 @@ -1,5 +1,5 @@ #ifndef lint -static const char RCSid[] = "$Id: eplus_adduvf.c,v 2.20 2020/01/17 17:33:48 greg Exp $"; +static const char RCSid[] = "$Id: eplus_adduvf.c,v 2.21 2020/01/20 17:53:40 greg Exp $"; #endif /* * Add User View Factors to EnergyPlus Input Data File @@ -8,6 +8,7 @@ static const char RCSid[] = "$Id: eplus_adduvf.c,v 2.2 */ #include +#include #include "platform.h" #include "rtio.h" #include "rtmath.h" @@ -40,7 +41,7 @@ const char ADD_HEADER[] = #define NAME_FLD 1 /* name field always first? */ #define SS_BASE_FLD 4 /* subsurface base surface */ -#define SS_VERT_FLD 10 /* subsurface vertex count */ +#define SS_VERT_FLD 9 /* subsurface vertex count */ typedef struct { const char *pname; /* object type name */ @@ -204,7 +205,7 @@ get_vlist(IDF_OBJECT *param, const char *zname) } res = idf_getfield(param, surf_type[i].vert_fld); } - if (!res->val[0]) { /* hack for missing #vert */ + if (!res->val[0] || tolower(res->val[0]) == 'a') { /* autocalculate */ IDF_FIELD *fptr; if (next_fbp >= fld_buf+sizeof(fld_buf)) next_fbp = fld_buf; @@ -711,9 +712,9 @@ main(int argc, char *argv[]) } /* check version (warning) */ if ((pptr = idf_getobject(our_idf, "Version")) != NULL && - pptr->flist != NULL && atoi(pptr->flist->val) != 7) { + pptr->flist != NULL && pptr->flist->val[0] != '9') { fputs(progname, stderr); - fputs(": warning - written for IDF version 7.x, not ", + fputs(": warning - written for IDF version 9.x, not ", stderr); fputs(pptr->flist->val, stderr); fputc('\n', stderr);