New function clearreport added (see issue #383)

The newly added `gettitle` and `settitle` functions were moved from the Reporting Functions section to the Project (formerly System) Functions section of epanet2.c and epanet.c.
This commit is contained in:
Lew Rossman
2019-02-08 12:07:56 -05:00
parent 140c95214e
commit 36b78f28d3
12 changed files with 211 additions and 141 deletions

View File

@@ -57,6 +57,21 @@ static int checklimits(Report *, double *, int, int);
static char *fillstr(char *, char, int);
static int getnodetype(Network *, int);
int clearreport(Project *pr)
/*
**------------------------------------------------------
** Input: none
** Output: returns error code
** Purpose: clears contents of a project's report file
**------------------------------------------------------
*/
{
Report *rpt = &pr->report;
if (rpt->RptFile == NULL) return 0;
if (freopen(rpt->Rpt1Fname, "w", rpt->RptFile) == NULL) return 303;
writelogo(pr);
return 0;
}
int writereport(Project *pr)
/*