Add EN_openX function

EN_openX allows an EPANET input file to be opened even if it has errors. This required re-arranging code, mainly in input3.c, so that default values are assigned to an object before its input line is parsed.
This commit is contained in:
Lew Rossman
2023-10-04 09:53:05 -04:00
parent c84c6baee2
commit 10d5079d75
18 changed files with 994 additions and 724 deletions

View File

@@ -7,7 +7,7 @@
Authors: see AUTHORS
Copyright: see AUTHORS
License: see LICENSE
Last Updated: 02/01/2020
Last Updated: 09/28/2023
******************************************************************************
*/
@@ -99,6 +99,14 @@ int DLLEXPORT ENopen(const char *inpFile, const char *rptFile, const char *outFi
return errcode;
}
int DLLEXPORT ENopenX(const char *inpFile, const char *rptFile, const char *outFile)
{
int errcode = 0;
createtmpfiles();
errcode = EN_openX(_defaultProject, inpFile, rptFile, outFile);
return errcode;
}
int DLLEXPORT ENgettitle(char *line1, char *line2, char *line3)
{
return EN_gettitle(_defaultProject, line1, line2, line3) ;