--- ray/src/util/eplus_adduvf.c 2016/03/06 01:13:18 2.18 +++ ray/src/util/eplus_adduvf.c 2020/01/17 17:33:48 2.20 @@ -1,5 +1,5 @@ #ifndef lint -static const char RCSid[] = "$Id: eplus_adduvf.c,v 2.18 2016/03/06 01:13:18 schorsch Exp $"; +static const char RCSid[] = "$Id: eplus_adduvf.c,v 2.20 2020/01/17 17:33:48 greg Exp $"; #endif /* * Add User View Factors to EnergyPlus Input Data File @@ -709,6 +709,15 @@ main(int argc, char *argv[]) fputs("'\n", stderr); return(1); } + /* check version (warning) */ + if ((pptr = idf_getobject(our_idf, "Version")) != NULL && + pptr->flist != NULL && atoi(pptr->flist->val) != 7) { + fputs(progname, stderr); + fputs(": warning - written for IDF version 7.x, not ", + stderr); + fputs(pptr->flist->val, stderr); + fputc('\n', stderr); + } /* remove existing UVFs */ if ((pptr = idf_getobject(our_idf, UVF_PNAME)) != NULL) { IDF_OBJECT *pnext; @@ -717,7 +726,7 @@ main(int argc, char *argv[]) do { pnext = pptr->pnext; idf_delobject(our_idf, pptr); - } while (pnext != NULL); + } while ((pptr = pnext) != NULL); } /* add to header */ if (our_idf->hrem == NULL ||