Cleaning up include statements adding crtdbg.h
This commit is contained in:
@@ -11,13 +11,16 @@ Last Updated: 04/02/2019
|
||||
******************************************************************************
|
||||
*/
|
||||
|
||||
#ifdef _DEBUG
|
||||
#define _CRTDBG_MAP_ALLOC
|
||||
#include <stdlib.h>
|
||||
#include <crtdbg.h>
|
||||
#else
|
||||
#include <stdlib.h>
|
||||
#endif
|
||||
#include <stdio.h>
|
||||
#include <string.h>
|
||||
#ifndef __APPLE__
|
||||
#include <malloc.h>
|
||||
#else
|
||||
#include <stdlib.h>
|
||||
#endif
|
||||
|
||||
#include <math.h>
|
||||
|
||||
#include "types.h"
|
||||
@@ -38,7 +41,7 @@ extern char *TstatTxt[];
|
||||
extern char *RptFlagTxt[];
|
||||
extern char *SectTxt[];
|
||||
|
||||
void saveauxdata(Project *pr, FILE *f)
|
||||
void saveauxdata(Project *pr, FILE *f)
|
||||
/*
|
||||
------------------------------------------------------------
|
||||
Writes auxilary data from original input file to new file.
|
||||
@@ -51,7 +54,7 @@ void saveauxdata(Project *pr, FILE *f)
|
||||
char line[MAXLINE + 1];
|
||||
char s[MAXLINE + 1];
|
||||
FILE *InFile = pr->parser.InFile;
|
||||
|
||||
|
||||
// Re-open the input file
|
||||
if (InFile == NULL)
|
||||
{
|
||||
@@ -88,7 +91,7 @@ void saveauxdata(Project *pr, FILE *f)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
// Write line of auxilary data to file
|
||||
else
|
||||
{
|
||||
@@ -147,7 +150,7 @@ int saveinpfile(Project *pr, const char *fname)
|
||||
// Open the new text file
|
||||
if ((f = fopen(fname, "wt")) == NULL) return 302;
|
||||
|
||||
// Write [TITLE] section
|
||||
// Write [TITLE] section
|
||||
fprintf(f, s_TITLE);
|
||||
for (i = 0; i < 3; i++)
|
||||
{
|
||||
@@ -205,7 +208,7 @@ int saveinpfile(Project *pr, const char *fname)
|
||||
}
|
||||
}
|
||||
|
||||
// Write [PIPES] section
|
||||
// Write [PIPES] section
|
||||
fprintf(f, "\n\n");
|
||||
fprintf(f, s_PIPES);
|
||||
for (i = 1; i <= net->Nlinks; i++)
|
||||
@@ -244,7 +247,7 @@ int saveinpfile(Project *pr, const char *fname)
|
||||
// Pump has constant power
|
||||
if (pump->Ptype == CONST_HP) sprintf(s1, " POWER %.4f", link->Km);
|
||||
|
||||
// Pump has a head curve
|
||||
// Pump has a head curve
|
||||
else if ((j = pump->Hcurve) > 0)
|
||||
{
|
||||
sprintf(s1, " HEAD %s", net->Curve[j].ID);
|
||||
@@ -539,7 +542,7 @@ int saveinpfile(Project *pr, const char *fname)
|
||||
fprintf(f, "\n ORDER TANK %-.2f", qual->TankOrder);
|
||||
fprintf(f, "\n GLOBAL BULK %-.6f", qual->Kbulk * SECperDAY);
|
||||
fprintf(f, "\n GLOBAL WALL %-.6f", qual->Kwall * SECperDAY);
|
||||
|
||||
|
||||
if (qual->Climit > 0.0)
|
||||
{
|
||||
fprintf(f, "\n LIMITING POTENTIAL %-.6f", qual->Climit * pr->Ucf[QUALITY]);
|
||||
@@ -548,7 +551,7 @@ int saveinpfile(Project *pr, const char *fname)
|
||||
{
|
||||
fprintf(f, "\n ROUGHNESS CORRELATION %-.6f", qual->Rfactor);
|
||||
}
|
||||
|
||||
|
||||
// Pipe-specific parameters
|
||||
for (i = 1; i <= net->Nlinks; i++)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user