diff --git a/phreeqcpp/ChartHandler.cpp b/phreeqcpp/ChartHandler.cpp index edee12d4..d3e4e900 100644 --- a/phreeqcpp/ChartHandler.cpp +++ b/phreeqcpp/ChartHandler.cpp @@ -10,6 +10,15 @@ #include + +#if defined(PHREEQCI_GUI) +#ifdef _DEBUG +#define new DEBUG_NEW +#undef THIS_FILE +static char THIS_FILE[] = __FILE__; +#endif +#endif + ////////////////////////////////////////////////////////////////////// // Construction/Destruction ////////////////////////////////////////////////////////////////////// diff --git a/phreeqcpp/ChartObject.cpp b/phreeqcpp/ChartObject.cpp index f225594e..dc0c79f3 100644 --- a/phreeqcpp/ChartObject.cpp +++ b/phreeqcpp/ChartObject.cpp @@ -18,6 +18,15 @@ #include "Form1.h" using namespace zdg_ui2; + +#if defined(PHREEQCI_GUI) +#ifdef _DEBUG +#define new DEBUG_NEW +#undef THIS_FILE +static char THIS_FILE[] = __FILE__; +#endif +#endif + ////////////////////////////////////////////////////////////////////// // Construction/Destruction ////////////////////////////////////////////////////////////////////// diff --git a/phreeqcpp/CurveObject.cpp b/phreeqcpp/CurveObject.cpp index 42710b99..56279d89 100644 --- a/phreeqcpp/CurveObject.cpp +++ b/phreeqcpp/CurveObject.cpp @@ -8,6 +8,15 @@ #include "CurveObject.h" + +#if defined(PHREEQCI_GUI) +#ifdef _DEBUG +#define new DEBUG_NEW +#undef THIS_FILE +static char THIS_FILE[] = __FILE__; +#endif +#endif + ////////////////////////////////////////////////////////////////////// // Construction/Destruction ////////////////////////////////////////////////////////////////////// diff --git a/phreeqcpp/Dictionary.cpp b/phreeqcpp/Dictionary.cpp index bd5348d8..ed5ee933 100644 --- a/phreeqcpp/Dictionary.cpp +++ b/phreeqcpp/Dictionary.cpp @@ -1,4 +1,13 @@ #include "Dictionary.h" + +#if defined(PHREEQCI_GUI) +#ifdef _DEBUG +#define new DEBUG_NEW +#undef THIS_FILE +static char THIS_FILE[] = __FILE__; +#endif +#endif + Dictionary::Dictionary(void) { } diff --git a/phreeqcpp/ExchComp.cxx b/phreeqcpp/ExchComp.cxx index d38bbd3e..bcb81006 100644 --- a/phreeqcpp/ExchComp.cxx +++ b/phreeqcpp/ExchComp.cxx @@ -15,6 +15,15 @@ #include "phqalloc.h" #include "Dictionary.h" + +#if defined(PHREEQCI_GUI) +#ifdef _DEBUG +#define new DEBUG_NEW +#undef THIS_FILE +static char THIS_FILE[] = __FILE__; +#endif +#endif + ////////////////////////////////////////////////////////////////////// // Construction/Destruction ////////////////////////////////////////////////////////////////////// diff --git a/phreeqcpp/Exchange.cxx b/phreeqcpp/Exchange.cxx index 6703fe2b..73a3094f 100644 --- a/phreeqcpp/Exchange.cxx +++ b/phreeqcpp/Exchange.cxx @@ -16,6 +16,14 @@ #include "phqalloc.h" +#if defined(PHREEQCI_GUI) +#ifdef _DEBUG +#define new DEBUG_NEW +#undef THIS_FILE +static char THIS_FILE[] = __FILE__; +#endif +#endif + ////////////////////////////////////////////////////////////////////// // Construction/Destruction ////////////////////////////////////////////////////////////////////// diff --git a/phreeqcpp/GasComp.cxx b/phreeqcpp/GasComp.cxx index 59f3d796..68878546 100644 --- a/phreeqcpp/GasComp.cxx +++ b/phreeqcpp/GasComp.cxx @@ -16,6 +16,13 @@ #include "Dictionary.h" +#if defined(PHREEQCI_GUI) +#ifdef _DEBUG +#define new DEBUG_NEW +#undef THIS_FILE +static char THIS_FILE[] = __FILE__; +#endif +#endif ////////////////////////////////////////////////////////////////////// // Construction/Destruction diff --git a/phreeqcpp/GasPhase.cxx b/phreeqcpp/GasPhase.cxx index 859f3b81..81ceaa39 100644 --- a/phreeqcpp/GasPhase.cxx +++ b/phreeqcpp/GasPhase.cxx @@ -15,6 +15,14 @@ #include "phqalloc.h" +#if defined(PHREEQCI_GUI) +#ifdef _DEBUG +#define new DEBUG_NEW +#undef THIS_FILE +static char THIS_FILE[] = __FILE__; +#endif +#endif + ////////////////////////////////////////////////////////////////////// // Construction/Destruction ////////////////////////////////////////////////////////////////////// diff --git a/phreeqcpp/ISolution.cxx b/phreeqcpp/ISolution.cxx index 05aa2842..0f8d044d 100644 --- a/phreeqcpp/ISolution.cxx +++ b/phreeqcpp/ISolution.cxx @@ -14,6 +14,14 @@ #include "phqalloc.h" +#if defined(PHREEQCI_GUI) +#ifdef _DEBUG +#define new DEBUG_NEW +#undef THIS_FILE +static char THIS_FILE[] = __FILE__; +#endif +#endif + ////////////////////////////////////////////////////////////////////// // Construction/Destruction ////////////////////////////////////////////////////////////////////// diff --git a/phreeqcpp/ISolutionComp.cxx b/phreeqcpp/ISolutionComp.cxx index 58dfa083..00384207 100644 --- a/phreeqcpp/ISolutionComp.cxx +++ b/phreeqcpp/ISolutionComp.cxx @@ -9,6 +9,15 @@ #include "Solution.h" #include "phqalloc.h" + +#if defined(PHREEQCI_GUI) +#ifdef _DEBUG +#define new DEBUG_NEW +#undef THIS_FILE +static char THIS_FILE[] = __FILE__; +#endif +#endif + cxxISolutionComp::cxxISolutionComp(PHRQ_io *io): PHRQ_base(io), moles(0.0), diff --git a/phreeqcpp/KineticsComp.cxx b/phreeqcpp/KineticsComp.cxx index db21cedc..99098fd3 100644 --- a/phreeqcpp/KineticsComp.cxx +++ b/phreeqcpp/KineticsComp.cxx @@ -14,6 +14,15 @@ #include "phqalloc.h" #include "Dictionary.h" + +#if defined(PHREEQCI_GUI) +#ifdef _DEBUG +#define new DEBUG_NEW +#undef THIS_FILE +static char THIS_FILE[] = __FILE__; +#endif +#endif + ////////////////////////////////////////////////////////////////////// // Construction/Destruction ////////////////////////////////////////////////////////////////////// diff --git a/phreeqcpp/NameDouble.cxx b/phreeqcpp/NameDouble.cxx index 46ef9544..99cef9f4 100644 --- a/phreeqcpp/NameDouble.cxx +++ b/phreeqcpp/NameDouble.cxx @@ -18,6 +18,14 @@ #include "ISolutionComp.h" +#if defined(PHREEQCI_GUI) +#ifdef _DEBUG +#define new DEBUG_NEW +#undef THIS_FILE +static char THIS_FILE[] = __FILE__; +#endif +#endif + ////////////////////////////////////////////////////////////////////// // Construction/Destruction ////////////////////////////////////////////////////////////////////// diff --git a/phreeqcpp/NumKeyword.cxx b/phreeqcpp/NumKeyword.cxx index 3605af81..19cb1da3 100644 --- a/phreeqcpp/NumKeyword.cxx +++ b/phreeqcpp/NumKeyword.cxx @@ -10,6 +10,15 @@ #include "Parser.h" #include "Utils.h" + +#if defined(PHREEQCI_GUI) +#ifdef _DEBUG +#define new DEBUG_NEW +#undef THIS_FILE +static char THIS_FILE[] = __FILE__; +#endif +#endif + ////////////////////////////////////////////////////////////////////// // Construction/Destruction ////////////////////////////////////////////////////////////////////// diff --git a/phreeqcpp/PBasic.cpp b/phreeqcpp/PBasic.cpp index 0cb7b0cb..c92ffae7 100644 --- a/phreeqcpp/PBasic.cpp +++ b/phreeqcpp/PBasic.cpp @@ -1,15 +1,6 @@ -#if defined(WIN32) && !defined(__GNUC__) -#include -#if defined(PHREEQCI_GUI) -#include "../../resource.h" -#endif -#else -#include -#define _ASSERTE assert -#endif #include -#include "PBasic.h" #include "Phreeqc.h" +#include "PBasic.h" #include "phqalloc.h" #include "NameDouble.h" #include "Utils.h" @@ -29,6 +20,15 @@ #define toklength 20 typedef long chset[9]; + +#if defined(PHREEQCI_GUI) +#ifdef _DEBUG +#define new DEBUG_NEW +#undef THIS_FILE +static char THIS_FILE[] = __FILE__; +#endif +#endif + /* Output from p2c, the Pascal-to-C translator */ /* From input file "basic.p" */ diff --git a/phreeqcpp/PHRQ_io_output.cpp b/phreeqcpp/PHRQ_io_output.cpp index eeb8c3f9..3b0799fc 100644 --- a/phreeqcpp/PHRQ_io_output.cpp +++ b/phreeqcpp/PHRQ_io_output.cpp @@ -2,6 +2,15 @@ #include "Phreeqc.h" #include "phqalloc.h" + +#if defined(PHREEQCI_GUI) +#ifdef _DEBUG +#define new DEBUG_NEW +#undef THIS_FILE +static char THIS_FILE[] = __FILE__; +#endif +#endif + /* ---------------------------------------------------------------------- */ int Phreeqc:: warning_msg(const char *err_str) diff --git a/phreeqcpp/PPassemblage.cxx b/phreeqcpp/PPassemblage.cxx index 6b56ad82..a8c24a7b 100644 --- a/phreeqcpp/PPassemblage.cxx +++ b/phreeqcpp/PPassemblage.cxx @@ -14,6 +14,14 @@ #include "phqalloc.h" +#if defined(PHREEQCI_GUI) +#ifdef _DEBUG +#define new DEBUG_NEW +#undef THIS_FILE +static char THIS_FILE[] = __FILE__; +#endif +#endif + ////////////////////////////////////////////////////////////////////// // Construction/Destruction ////////////////////////////////////////////////////////////////////// diff --git a/phreeqcpp/PPassemblageComp.cxx b/phreeqcpp/PPassemblageComp.cxx index ab75edac..3496a25e 100644 --- a/phreeqcpp/PPassemblageComp.cxx +++ b/phreeqcpp/PPassemblageComp.cxx @@ -13,6 +13,15 @@ #include "Dictionary.h" #include "phqalloc.h" + +#if defined(PHREEQCI_GUI) +#ifdef _DEBUG +#define new DEBUG_NEW +#undef THIS_FILE +static char THIS_FILE[] = __FILE__; +#endif +#endif + ////////////////////////////////////////////////////////////////////// // Construction/Destruction ////////////////////////////////////////////////////////////////////// diff --git a/phreeqcpp/Phreeqc.cpp b/phreeqcpp/Phreeqc.cpp index 07d8c829..1e71ab9e 100644 --- a/phreeqcpp/Phreeqc.cpp +++ b/phreeqcpp/Phreeqc.cpp @@ -15,6 +15,14 @@ #include "Temperature.h" #include "SSassemblage.h" +#if defined(PHREEQCI_GUI) +#ifdef _DEBUG +#define new DEBUG_NEW +#undef THIS_FILE +static char THIS_FILE[] = __FILE__; +#endif +#endif + //const const_iso Phreeqc::iso_defaults[] = { // {"13C", -10, 1}, // {"13C(4)", -10, 1}, diff --git a/phreeqcpp/Phreeqc.h b/phreeqcpp/Phreeqc.h index a77f5ee5..e27c324b 100644 --- a/phreeqcpp/Phreeqc.h +++ b/phreeqcpp/Phreeqc.h @@ -1,7 +1,16 @@ #ifndef _INC_PHREEQC_H #define _INC_PHREEQC_H #if defined(WIN32) -#include +# if defined(PHREEQCI_GUI) +# ifndef WINVER +# define WINVER 0x0400 +# endif +# include +# endif +# include +# if defined(PHREEQCI_GUI) +# include "../../resource.h" +# endif #endif #if defined(WIN32_MEMORY_DEBUG) #define _CRTDBG_MAP_ALLOC diff --git a/phreeqcpp/PhreeqcKeywords/Keywords.cpp b/phreeqcpp/PhreeqcKeywords/Keywords.cpp index c17be459..956d0423 100644 --- a/phreeqcpp/PhreeqcKeywords/Keywords.cpp +++ b/phreeqcpp/PhreeqcKeywords/Keywords.cpp @@ -1,6 +1,14 @@ #include "Keywords.h" +#if defined(PHREEQCI_GUI) +#ifdef _DEBUG +#define new DEBUG_NEW +#undef THIS_FILE +static char THIS_FILE[] = __FILE__; +#endif +#endif + Keywords::Keywords(void) { } diff --git a/phreeqcpp/Pressure.cxx b/phreeqcpp/Pressure.cxx index 493bd532..6cb774ef 100644 --- a/phreeqcpp/Pressure.cxx +++ b/phreeqcpp/Pressure.cxx @@ -8,11 +8,20 @@ #include // std::sort #include "Utils.h" // define first -#include "Parser.h" #include "Phreeqc.h" +#include "Parser.h" #include "Pressure.h" #include "phqalloc.h" + +#if defined(PHREEQCI_GUI) +#ifdef _DEBUG +#define new DEBUG_NEW +#undef THIS_FILE +static char THIS_FILE[] = __FILE__; +#endif +#endif + ////////////////////////////////////////////////////////////////////// // Construction/Destruction ////////////////////////////////////////////////////////////////////// diff --git a/phreeqcpp/Reaction.cxx b/phreeqcpp/Reaction.cxx index 4eb19741..a5383db9 100644 --- a/phreeqcpp/Reaction.cxx +++ b/phreeqcpp/Reaction.cxx @@ -13,6 +13,14 @@ #include "phqalloc.h" +#if defined(PHREEQCI_GUI) +#ifdef _DEBUG +#define new DEBUG_NEW +#undef THIS_FILE +static char THIS_FILE[] = __FILE__; +#endif +#endif + ////////////////////////////////////////////////////////////////////// // Construction/Destruction ////////////////////////////////////////////////////////////////////// diff --git a/phreeqcpp/ReadClass.cxx b/phreeqcpp/ReadClass.cxx index cf3ec206..693e9ef3 100644 --- a/phreeqcpp/ReadClass.cxx +++ b/phreeqcpp/ReadClass.cxx @@ -24,6 +24,15 @@ #include "Surface.h" #include "phqalloc.h" + +#if defined(PHREEQCI_GUI) +#ifdef _DEBUG +#define new DEBUG_NEW +#undef THIS_FILE +static char THIS_FILE[] = __FILE__; +#endif +#endif + /* ---------------------------------------------------------------------- */ int Phreeqc:: read_dump(void) diff --git a/phreeqcpp/SS.cxx b/phreeqcpp/SS.cxx index 1e21e98a..8b86ca6a 100644 --- a/phreeqcpp/SS.cxx +++ b/phreeqcpp/SS.cxx @@ -14,6 +14,13 @@ #include "phqalloc.h" +#if defined(PHREEQCI_GUI) +#ifdef _DEBUG +#define new DEBUG_NEW +#undef THIS_FILE +static char THIS_FILE[] = __FILE__; +#endif +#endif ////////////////////////////////////////////////////////////////////// // Construction/Destruction diff --git a/phreeqcpp/SSassemblage.cxx b/phreeqcpp/SSassemblage.cxx index 8868f71d..3bf07fc5 100644 --- a/phreeqcpp/SSassemblage.cxx +++ b/phreeqcpp/SSassemblage.cxx @@ -17,6 +17,14 @@ #include "Dictionary.h" +#if defined(PHREEQCI_GUI) +#ifdef _DEBUG +#define new DEBUG_NEW +#undef THIS_FILE +static char THIS_FILE[] = __FILE__; +#endif +#endif + ////////////////////////////////////////////////////////////////////// // Construction/Destruction ////////////////////////////////////////////////////////////////////// diff --git a/phreeqcpp/SScomp.cxx b/phreeqcpp/SScomp.cxx index fbc52914..c48758a0 100644 --- a/phreeqcpp/SScomp.cxx +++ b/phreeqcpp/SScomp.cxx @@ -13,6 +13,15 @@ #include "phqalloc.h" #include "Dictionary.h" + +#if defined(PHREEQCI_GUI) +#ifdef _DEBUG +#define new DEBUG_NEW +#undef THIS_FILE +static char THIS_FILE[] = __FILE__; +#endif +#endif + ////////////////////////////////////////////////////////////////////// // Construction/Destruction ////////////////////////////////////////////////////////////////////// diff --git a/phreeqcpp/SelectedOutput.cpp b/phreeqcpp/SelectedOutput.cpp index b6941b5a..3fe632bb 100644 --- a/phreeqcpp/SelectedOutput.cpp +++ b/phreeqcpp/SelectedOutput.cpp @@ -1,5 +1,14 @@ #include "SelectedOutput.h" + +#if defined(PHREEQCI_GUI) +#ifdef _DEBUG +#define new DEBUG_NEW +#undef THIS_FILE +static char THIS_FILE[] = __FILE__; +#endif +#endif + SelectedOutput::SelectedOutput(int n, PHRQ_io *io) : cxxNumKeyword(io) { diff --git a/phreeqcpp/Serializer.cxx b/phreeqcpp/Serializer.cxx index 7b05d817..b4ebab76 100644 --- a/phreeqcpp/Serializer.cxx +++ b/phreeqcpp/Serializer.cxx @@ -9,6 +9,15 @@ #include "PPassemblage.h" #include "SSassemblage.h" #include "Surface.h" + +#if defined(PHREEQCI_GUI) +#ifdef _DEBUG +#define new DEBUG_NEW +#undef THIS_FILE +static char THIS_FILE[] = __FILE__; +#endif +#endif + Serializer::Serializer(PHRQ_io *io) : PHRQ_base(io) { diff --git a/phreeqcpp/Solution.cxx b/phreeqcpp/Solution.cxx index 41617ed8..58229fcb 100644 --- a/phreeqcpp/Solution.cxx +++ b/phreeqcpp/Solution.cxx @@ -16,6 +16,15 @@ #include "Dictionary.h" + +#if defined(PHREEQCI_GUI) +#ifdef _DEBUG +#define new DEBUG_NEW +#undef THIS_FILE +static char THIS_FILE[] = __FILE__; +#endif +#endif + ////////////////////////////////////////////////////////////////////// // Construction/Destruction ////////////////////////////////////////////////////////////////////// diff --git a/phreeqcpp/SolutionIsotope.cxx b/phreeqcpp/SolutionIsotope.cxx index d37c90c7..1d1296f9 100644 --- a/phreeqcpp/SolutionIsotope.cxx +++ b/phreeqcpp/SolutionIsotope.cxx @@ -10,6 +10,15 @@ #include "phqalloc.h" #include "Dictionary.h" + +#if defined(PHREEQCI_GUI) +#ifdef _DEBUG +#define new DEBUG_NEW +#undef THIS_FILE +static char THIS_FILE[] = __FILE__; +#endif +#endif + cxxSolutionIsotope::cxxSolutionIsotope(PHRQ_io *io) : PHRQ_base(io), diff --git a/phreeqcpp/StorageBin.cxx b/phreeqcpp/StorageBin.cxx index b533c599..458d79b0 100644 --- a/phreeqcpp/StorageBin.cxx +++ b/phreeqcpp/StorageBin.cxx @@ -28,6 +28,12 @@ #include "phqalloc.h" #include "Use.h" +#if defined(PHREEQCI_GUI) +#ifdef _DEBUG +#undef THIS_FILE +static char BASED_CODE THIS_FILE[] = __FILE__; +#endif +#endif ////////////////////////////////////////////////////////////////////// // Construction/Destruction diff --git a/phreeqcpp/StorageBinList.cpp b/phreeqcpp/StorageBinList.cpp index 71a89692..f968a66d 100644 --- a/phreeqcpp/StorageBinList.cpp +++ b/phreeqcpp/StorageBinList.cpp @@ -2,6 +2,14 @@ #include "StorageBinList.h" #include "Parser.h" +#if defined(PHREEQCI_GUI) +#ifdef _DEBUG +#define new DEBUG_NEW +#undef THIS_FILE +static char THIS_FILE[] = __FILE__; +#endif +#endif + StorageBinListItem::StorageBinListItem(void) { this->defined = false; diff --git a/phreeqcpp/Surface.cxx b/phreeqcpp/Surface.cxx index 459a2ab9..06a0c587 100644 --- a/phreeqcpp/Surface.cxx +++ b/phreeqcpp/Surface.cxx @@ -13,6 +13,15 @@ #include "phqalloc.h" + +#if defined(PHREEQCI_GUI) +#ifdef _DEBUG +#define new DEBUG_NEW +#undef THIS_FILE +static char THIS_FILE[] = __FILE__; +#endif +#endif + ////////////////////////////////////////////////////////////////////// // Construction/Destruction ////////////////////////////////////////////////////////////////////// diff --git a/phreeqcpp/SurfaceCharge.cxx b/phreeqcpp/SurfaceCharge.cxx index 6ee4ff1c..2ad3d1c7 100644 --- a/phreeqcpp/SurfaceCharge.cxx +++ b/phreeqcpp/SurfaceCharge.cxx @@ -14,6 +14,14 @@ #include "Dictionary.h" +#if defined(PHREEQCI_GUI) +#ifdef _DEBUG +#define new DEBUG_NEW +#undef THIS_FILE +static char THIS_FILE[] = __FILE__; +#endif +#endif + ////////////////////////////////////////////////////////////////////// // Construction/Destruction ////////////////////////////////////////////////////////////////////// diff --git a/phreeqcpp/SurfaceComp.cxx b/phreeqcpp/SurfaceComp.cxx index 247dfdd2..0c987df2 100644 --- a/phreeqcpp/SurfaceComp.cxx +++ b/phreeqcpp/SurfaceComp.cxx @@ -13,6 +13,15 @@ #include "phqalloc.h" #include "Dictionary.h" + +#if defined(PHREEQCI_GUI) +#ifdef _DEBUG +#define new DEBUG_NEW +#undef THIS_FILE +static char THIS_FILE[] = __FILE__; +#endif +#endif + ////////////////////////////////////////////////////////////////////// // Construction/Destruction ////////////////////////////////////////////////////////////////////// diff --git a/phreeqcpp/System.cxx b/phreeqcpp/System.cxx index 467363de..aab48a95 100644 --- a/phreeqcpp/System.cxx +++ b/phreeqcpp/System.cxx @@ -15,6 +15,15 @@ #include "Reaction.h" #include "Temperature.h" + +#if defined(PHREEQCI_GUI) +#ifdef _DEBUG +#define new DEBUG_NEW +#undef THIS_FILE +static char THIS_FILE[] = __FILE__; +#endif +#endif + cxxSystem::cxxSystem(PHRQ_io *io) : PHRQ_base(io) diff --git a/phreeqcpp/Temperature.cxx b/phreeqcpp/Temperature.cxx index 27563025..89aaeda2 100644 --- a/phreeqcpp/Temperature.cxx +++ b/phreeqcpp/Temperature.cxx @@ -8,12 +8,21 @@ #include // std::sort #include "Utils.h" // define first -#include "Parser.h" #include "Phreeqc.h" +#include "Parser.h" #include "Temperature.h" #include "phqalloc.h" +#if defined(PHREEQCI_GUI) +#ifdef _DEBUG +#define new DEBUG_NEW +#undef THIS_FILE +static char THIS_FILE[] = __FILE__; +#endif +#endif + + ////////////////////////////////////////////////////////////////////// // Construction/Destruction diff --git a/phreeqcpp/Use.cpp b/phreeqcpp/Use.cpp index e6f8c349..800d3a41 100644 --- a/phreeqcpp/Use.cpp +++ b/phreeqcpp/Use.cpp @@ -1,6 +1,15 @@ #include #include "Use.h" + +#if defined(PHREEQCI_GUI) +#ifdef _DEBUG +#define new DEBUG_NEW +#undef THIS_FILE +static char THIS_FILE[] = __FILE__; +#endif +#endif + cxxUse::cxxUse() { this->init(); diff --git a/phreeqcpp/UserPunch.cpp b/phreeqcpp/UserPunch.cpp index a00ce280..39ea8955 100644 --- a/phreeqcpp/UserPunch.cpp +++ b/phreeqcpp/UserPunch.cpp @@ -1,5 +1,14 @@ #include "UserPunch.h" #include "Phreeqc.h" + +#if defined(PHREEQCI_GUI) +#ifdef _DEBUG +#define new DEBUG_NEW +#undef THIS_FILE +static char THIS_FILE[] = __FILE__; +#endif +#endif + UserPunch::UserPunch(int n, PHRQ_io *io) : cxxNumKeyword(io) { diff --git a/phreeqcpp/advection.cpp b/phreeqcpp/advection.cpp index 86b80744..7d58edea 100644 --- a/phreeqcpp/advection.cpp +++ b/phreeqcpp/advection.cpp @@ -4,6 +4,16 @@ #include "cxxKinetics.h" #include "Solution.h" + +#if defined(PHREEQCI_GUI) +#ifdef _DEBUG +#define new DEBUG_NEW +#undef THIS_FILE +static char THIS_FILE[] = __FILE__; +#endif +#endif + + /* ---------------------------------------------------------------------- */ int Phreeqc:: advection(void) diff --git a/phreeqcpp/basicsubs.cpp b/phreeqcpp/basicsubs.cpp index 6bbabc65..c566c2e4 100644 --- a/phreeqcpp/basicsubs.cpp +++ b/phreeqcpp/basicsubs.cpp @@ -11,6 +11,15 @@ #include "cxxKinetics.h" #include "Solution.h" #include "Parser.h" + +#if defined(PHREEQCI_GUI) +#ifdef _DEBUG +#define new DEBUG_NEW +#undef THIS_FILE +static char THIS_FILE[] = __FILE__; +#endif +#endif + /* ---------------------------------------------------------------------- */ LDBLE Phreeqc:: activity(const char *species_name) diff --git a/phreeqcpp/cl1.cpp b/phreeqcpp/cl1.cpp index 358da191..ccbcd4b7 100644 --- a/phreeqcpp/cl1.cpp +++ b/phreeqcpp/cl1.cpp @@ -10,6 +10,15 @@ #define CHECK_ERRORS */ + +#if defined(PHREEQCI_GUI) +#ifdef _DEBUG +#define new DEBUG_NEW +#undef THIS_FILE +static char THIS_FILE[] = __FILE__; +#endif +#endif + int Phreeqc:: cl1(int k, int l, int m, int n, int l_nklmd, int l_n2d, diff --git a/phreeqcpp/cl1mp.cpp b/phreeqcpp/cl1mp.cpp index 0d1d2d1d..8b0209bf 100644 --- a/phreeqcpp/cl1mp.cpp +++ b/phreeqcpp/cl1mp.cpp @@ -15,6 +15,15 @@ */ + +#if defined(PHREEQCI_GUI) +#ifdef _DEBUG +#define new DEBUG_NEW +#undef THIS_FILE +static char THIS_FILE[] = __FILE__; +#endif +#endif + int Phreeqc:: cl1mp(int k, int l, int m, int n, int nklmd, int n2d, diff --git a/phreeqcpp/class_main.cpp b/phreeqcpp/class_main.cpp index 16084f78..9e6a0d0c 100644 --- a/phreeqcpp/class_main.cpp +++ b/phreeqcpp/class_main.cpp @@ -11,6 +11,15 @@ #include "cxxKinetics.h" //#include //#include + +#if defined(PHREEQCI_GUI) +#ifdef _DEBUG +#define new DEBUG_NEW +#undef THIS_FILE +static char THIS_FILE[] = __FILE__; +#endif +#endif + /* ---------------------------------------------------------------------- * MAIN * ---------------------------------------------------------------------- */ diff --git a/phreeqcpp/common/PHRQ_base.cxx b/phreeqcpp/common/PHRQ_base.cxx index 0e07d1f0..009e6471 100644 --- a/phreeqcpp/common/PHRQ_base.cxx +++ b/phreeqcpp/common/PHRQ_base.cxx @@ -1,6 +1,16 @@ +#include "Phreeqc.h" #include "PHRQ_base.h" #include #include "PHRQ_io.h" + +#if defined(PHREEQCI_GUI) +#ifdef _DEBUG +#define new DEBUG_NEW +#undef THIS_FILE +static char THIS_FILE[] = __FILE__; +#endif +#endif + PHRQ_base:: PHRQ_base(void) { diff --git a/phreeqcpp/common/PHRQ_io.cpp b/phreeqcpp/common/PHRQ_io.cpp index 876a92f0..86e95fc6 100644 --- a/phreeqcpp/common/PHRQ_io.cpp +++ b/phreeqcpp/common/PHRQ_io.cpp @@ -1,4 +1,5 @@ #include +#include "Phreeqc.h" #include "PHRQ_io.h" #include "Parser.h" @@ -13,6 +14,15 @@ #include #include + +#if defined(PHREEQCI_GUI) +#ifdef _DEBUG +#define new DEBUG_NEW +#undef THIS_FILE +static char THIS_FILE[] = __FILE__; +#endif +#endif + PHRQ_io:: PHRQ_io(void) { diff --git a/phreeqcpp/common/Parser.cxx b/phreeqcpp/common/Parser.cxx index 0c39edd7..29faf3fa 100644 --- a/phreeqcpp/common/Parser.cxx +++ b/phreeqcpp/common/Parser.cxx @@ -15,6 +15,15 @@ #include "Parser.h" #include "PHRQ_io.h" + +#if defined(PHREEQCI_GUI) +#ifdef _DEBUG +#define new DEBUG_NEW +#undef THIS_FILE +static char THIS_FILE[] = __FILE__; +#endif +#endif + ////////////////////////////////////////////////////////////////////// // Construction/Destruction ////////////////////////////////////////////////////////////////////// diff --git a/phreeqcpp/common/Utils.cxx b/phreeqcpp/common/Utils.cxx index 453218d3..2a4276ce 100644 --- a/phreeqcpp/common/Utils.cxx +++ b/phreeqcpp/common/Utils.cxx @@ -12,6 +12,15 @@ #include "float.h" #include "math.h" + +#if defined(PHREEQCI_GUI) +#ifdef _DEBUG +#define new DEBUG_NEW +#undef THIS_FILE +static char THIS_FILE[] = __FILE__; +#endif +#endif + //////////////////////////////////////////////////////////////////////////// int Utilities::strcmp_nocase_arg1(const char *str1, const char *str2) diff --git a/phreeqcpp/cvdense.cpp b/phreeqcpp/cvdense.cpp index 330ef02b..d4f6e3fa 100644 --- a/phreeqcpp/cvdense.cpp +++ b/phreeqcpp/cvdense.cpp @@ -63,6 +63,7 @@ #include #include #include +#include "Phreeqc.h" #include "cvdense.h" #include "cvode.h" #include "dense.h" @@ -71,7 +72,6 @@ #include "sundialsmath.h" -#include "Phreeqc.h" #if !defined(WIN32_MEMORY_DEBUG) #define malloc PHRQ_malloc #endif @@ -150,6 +150,15 @@ static void CVDenseDQJac(integertype N, DenseMat J, RhsFn f, void *f_data, N_Vector vtemp2, N_Vector vtemp3); + +#if defined(PHREEQCI_GUI) +#ifdef _DEBUG +#define new DEBUG_NEW +#undef THIS_FILE +static char THIS_FILE[] = __FILE__; +#endif +#endif + /*************** CVDenseDQJac **************************************** This routine generates a dense difference quotient approximation to diff --git a/phreeqcpp/cvode.cpp b/phreeqcpp/cvode.cpp index b81ac8d0..e9be57fc 100644 --- a/phreeqcpp/cvode.cpp +++ b/phreeqcpp/cvode.cpp @@ -59,6 +59,7 @@ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE * * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. * **************************************************************************/ +#include "Phreeqc.h" #include "nvector_serial.h" #define Ith(v,i) NV_Ith_S(v,i-1) /************************************************************/ @@ -71,7 +72,6 @@ #include "nvector.h" #include "sundialsmath.h" -#include "Phreeqc.h" #if !defined(WIN32_MEMORY_DEBUG) #define malloc MACHENV_MALLOC PHRQ_malloc @@ -544,6 +544,15 @@ static int CVHandleFailure(CVodeMem cv_mem, int kflag); /***************************************************************/ + +#if defined(PHREEQCI_GUI) +#ifdef _DEBUG +#define new DEBUG_NEW +#undef THIS_FILE +static char THIS_FILE[] = __FILE__; +#endif +#endif + /******************** CVodeMalloc ******************************* CVodeMalloc allocates and initializes memory for a problem. All diff --git a/phreeqcpp/cxxKinetics.cxx b/phreeqcpp/cxxKinetics.cxx index 337cb918..395ec424 100644 --- a/phreeqcpp/cxxKinetics.cxx +++ b/phreeqcpp/cxxKinetics.cxx @@ -15,6 +15,15 @@ #include "PHRQ_io.h" #include "Dictionary.h" + +#if defined(PHREEQCI_GUI) +#ifdef _DEBUG +#define new DEBUG_NEW +#undef THIS_FILE +static char THIS_FILE[] = __FILE__; +#endif +#endif + ////////////////////////////////////////////////////////////////////// // Construction/Destruction ////////////////////////////////////////////////////////////////////// diff --git a/phreeqcpp/cxxMix.cxx b/phreeqcpp/cxxMix.cxx index 763c31fc..cff3c3c6 100644 --- a/phreeqcpp/cxxMix.cxx +++ b/phreeqcpp/cxxMix.cxx @@ -8,11 +8,20 @@ #include // std::sort #include "Utils.h" // define first -#include "Parser.h" #include "Phreeqc.h" +#include "Parser.h" #include "cxxMix.h" #include "phqalloc.h" + +#if defined(PHREEQCI_GUI) +#ifdef _DEBUG +#define new DEBUG_NEW +#undef THIS_FILE +static char THIS_FILE[] = __FILE__; +#endif +#endif + ////////////////////////////////////////////////////////////////////// // Construction/Destruction ////////////////////////////////////////////////////////////////////// diff --git a/phreeqcpp/dense.cpp b/phreeqcpp/dense.cpp index 059fa6cc..34721470 100644 --- a/phreeqcpp/dense.cpp +++ b/phreeqcpp/dense.cpp @@ -75,6 +75,15 @@ /* Implementation */ + +#if defined(PHREEQCI_GUI) +#ifdef _DEBUG +#define new DEBUG_NEW +#undef THIS_FILE +static char THIS_FILE[] = __FILE__; +#endif +#endif + DenseMat DenseAllocMat(integertype N) { diff --git a/phreeqcpp/dumper.cpp b/phreeqcpp/dumper.cpp index bc89a50e..edc897e6 100644 --- a/phreeqcpp/dumper.cpp +++ b/phreeqcpp/dumper.cpp @@ -4,6 +4,14 @@ #include "Parser.h" #include "PHRQ_io.h" +#if defined(PHREEQCI_GUI) +#ifdef _DEBUG +#define new DEBUG_NEW +#undef THIS_FILE +static char THIS_FILE[] = __FILE__; +#endif +#endif + dumper::dumper(PHRQ_io *io) : PHRQ_base(io) diff --git a/phreeqcpp/gases.cpp b/phreeqcpp/gases.cpp index 02c35972..e2c5495c 100644 --- a/phreeqcpp/gases.cpp +++ b/phreeqcpp/gases.cpp @@ -1,5 +1,14 @@ #include "Phreeqc.h" #include "GasPhase.h" + +#if defined(PHREEQCI_GUI) +#ifdef _DEBUG +#define new DEBUG_NEW +#undef THIS_FILE +static char THIS_FILE[] = __FILE__; +#endif +#endif + /* ---------------------------------------------------------------------- */ int Phreeqc:: setup_fixed_volume_gas(void) diff --git a/phreeqcpp/input.cpp b/phreeqcpp/input.cpp index 10d120c8..d792dc8f 100644 --- a/phreeqcpp/input.cpp +++ b/phreeqcpp/input.cpp @@ -5,6 +5,15 @@ #include #include "phqalloc.h" + +#if defined(PHREEQCI_GUI) +#ifdef _DEBUG +#define new DEBUG_NEW +#undef THIS_FILE +static char THIS_FILE[] = __FILE__; +#endif +#endif + /* ---------------------------------------------------------------------- */ void Phreeqc:: set_reading_database(int reading_database) diff --git a/phreeqcpp/integrate.cpp b/phreeqcpp/integrate.cpp index 7318a54c..255a6e55 100644 --- a/phreeqcpp/integrate.cpp +++ b/phreeqcpp/integrate.cpp @@ -6,6 +6,15 @@ #define MAX_QUAD 20 #define K_POLY 5 + +#if defined(PHREEQCI_GUI) +#ifdef _DEBUG +#define new DEBUG_NEW +#undef THIS_FILE +static char THIS_FILE[] = __FILE__; +#endif +#endif + /* ---------------------------------------------------------------------- */ int Phreeqc:: calc_all_g(void) diff --git a/phreeqcpp/inverse.cpp b/phreeqcpp/inverse.cpp index 4cc7c5a5..7ce99fbb 100644 --- a/phreeqcpp/inverse.cpp +++ b/phreeqcpp/inverse.cpp @@ -12,6 +12,15 @@ #define SCALE_EPSILON .0009765625 #define SCALE_WATER 1. #define SCALE_ALL 1. + +#if defined(PHREEQCI_GUI) +#ifdef _DEBUG +#define new DEBUG_NEW +#undef THIS_FILE +static char THIS_FILE[] = __FILE__; +#endif +#endif + /* ---------------------------------------------------------------------- */ int Phreeqc:: inverse_models(void) diff --git a/phreeqcpp/isotopes.cpp b/phreeqcpp/isotopes.cpp index 58f54b6a..adf24341 100644 --- a/phreeqcpp/isotopes.cpp +++ b/phreeqcpp/isotopes.cpp @@ -3,6 +3,14 @@ #include "Solution.h" +#if defined(PHREEQCI_GUI) +#ifdef _DEBUG +#define new DEBUG_NEW +#undef THIS_FILE +static char THIS_FILE[] = __FILE__; +#endif +#endif + /* ---------------------------------------------------------------------- */ int Phreeqc:: read_isotopes(void) diff --git a/phreeqcpp/kinetics.cpp b/phreeqcpp/kinetics.cpp index 19ed0206..dab9ab62 100644 --- a/phreeqcpp/kinetics.cpp +++ b/phreeqcpp/kinetics.cpp @@ -39,6 +39,15 @@ #define MAX_DIVIDE 2 #define KINETICS_TOL 1e-8; + +#if defined(PHREEQCI_GUI) +#ifdef _DEBUG +#define new DEBUG_NEW +#undef THIS_FILE +static char THIS_FILE[] = __FILE__; +#endif +#endif + /* ---------------------------------------------------------------------- */ int Phreeqc:: calc_kinetic_reaction(cxxKinetics *kinetics_ptr, LDBLE time_step) diff --git a/phreeqcpp/mainsubs.cpp b/phreeqcpp/mainsubs.cpp index fc94b14f..f8d8b1a6 100644 --- a/phreeqcpp/mainsubs.cpp +++ b/phreeqcpp/mainsubs.cpp @@ -17,6 +17,14 @@ #include #endif +#if defined(PHREEQCI_GUI) +#ifdef _DEBUG +#define new DEBUG_NEW +#undef THIS_FILE +static char THIS_FILE[] = __FILE__; +#endif +#endif + /* ---------------------------------------------------------------------- */ void Phreeqc:: initialize(void) diff --git a/phreeqcpp/model.cpp b/phreeqcpp/model.cpp index 6f5145e6..60145bf9 100644 --- a/phreeqcpp/model.cpp +++ b/phreeqcpp/model.cpp @@ -8,6 +8,15 @@ #include "SSassemblage.h" #include "Solution.h" + +#if defined(PHREEQCI_GUI) +#ifdef _DEBUG +#define new DEBUG_NEW +#undef THIS_FILE +static char THIS_FILE[] = __FILE__; +#endif +#endif + /* ---------------------------------------------------------------------- */ int Phreeqc:: model(void) diff --git a/phreeqcpp/nvector.cpp b/phreeqcpp/nvector.cpp index 010ac16a..0c0377c6 100644 --- a/phreeqcpp/nvector.cpp +++ b/phreeqcpp/nvector.cpp @@ -61,6 +61,15 @@ #include "nvector.h" /* generic M_Env and N_Vector */ + +#if defined(PHREEQCI_GUI) +#ifdef _DEBUG +#define new DEBUG_NEW +#undef THIS_FILE +static char THIS_FILE[] = __FILE__; +#endif +#endif + N_Vector N_VNew(integertype n, M_Env machEnv) { diff --git a/phreeqcpp/nvector_serial.cpp b/phreeqcpp/nvector_serial.cpp index 8760a599..3999686b 100644 --- a/phreeqcpp/nvector_serial.cpp +++ b/phreeqcpp/nvector_serial.cpp @@ -98,6 +98,15 @@ static void Vaxpy_Serial(realtype a, N_Vector x, N_Vector y); /* x <- ax */ static void VScaleBy_Serial(realtype a, N_Vector x); + +#if defined(PHREEQCI_GUI) +#ifdef _DEBUG +#define new DEBUG_NEW +#undef THIS_FILE +static char THIS_FILE[] = __FILE__; +#endif +#endif + /********************* Exported Functions ************************/ /* Serial implementation of the machine environment diff --git a/phreeqcpp/parse.cpp b/phreeqcpp/parse.cpp index 0430c528..5158accf 100644 --- a/phreeqcpp/parse.cpp +++ b/phreeqcpp/parse.cpp @@ -1,6 +1,15 @@ #include "Phreeqc.h" #include "phqalloc.h" + +#if defined(PHREEQCI_GUI) +#ifdef _DEBUG +#define new DEBUG_NEW +#undef THIS_FILE +static char THIS_FILE[] = __FILE__; +#endif +#endif + /* ---------------------------------------------------------------------- */ int Phreeqc:: parse_eq(char* eqn, std::vector& new_elt_list, int association) diff --git a/phreeqcpp/phqalloc.cpp b/phreeqcpp/phqalloc.cpp index 08020dd8..9d7f9ff8 100644 --- a/phreeqcpp/phqalloc.cpp +++ b/phreeqcpp/phqalloc.cpp @@ -8,6 +8,17 @@ #define _CRTDBG_MAP_ALLOC #include #endif + + +#if defined(PHREEQCI_GUI) +#ifdef _DEBUG +#define new DEBUG_NEW +#undef THIS_FILE +static char THIS_FILE[] = __FILE__; +#endif +#endif + + #if defined(USE_PHRQ_ALLOC) /* ---------------------------------------------------------------------- */ #if !defined(NDEBUG) diff --git a/phreeqcpp/pitzer.cpp b/phreeqcpp/pitzer.cpp index 6ac2d5c6..91558749 100644 --- a/phreeqcpp/pitzer.cpp +++ b/phreeqcpp/pitzer.cpp @@ -5,6 +5,15 @@ #define PITZER_LISTS #define PITZER + +#if defined(PHREEQCI_GUI) +#ifdef _DEBUG +#define new DEBUG_NEW +#undef THIS_FILE +static char THIS_FILE[] = __FILE__; +#endif +#endif + /* ---------------------------------------------------------------------- */ int Phreeqc:: pitzer_init(void) diff --git a/phreeqcpp/pitzer_structures.cpp b/phreeqcpp/pitzer_structures.cpp index 6a5c6f30..5162f5ff 100644 --- a/phreeqcpp/pitzer_structures.cpp +++ b/phreeqcpp/pitzer_structures.cpp @@ -4,6 +4,15 @@ #include #include + +#if defined(PHREEQCI_GUI) +#ifdef _DEBUG +#define new DEBUG_NEW +#undef THIS_FILE +static char THIS_FILE[] = __FILE__; +#endif +#endif + /* ********************************************************************** * * Routines related to structure "pitz_param" diff --git a/phreeqcpp/prep.cpp b/phreeqcpp/prep.cpp index 897f5115..f9d995ed 100644 --- a/phreeqcpp/prep.cpp +++ b/phreeqcpp/prep.cpp @@ -10,6 +10,15 @@ #include "SS.h" #include "Solution.h" #include "cxxKinetics.h" + +#if defined(PHREEQCI_GUI) +#ifdef _DEBUG +#define new DEBUG_NEW +#undef THIS_FILE +static char THIS_FILE[] = __FILE__; +#endif +#endif + /* ---------------------------------------------------------------------- */ int Phreeqc:: prep(void) diff --git a/phreeqcpp/print.cpp b/phreeqcpp/print.cpp index be7be47c..cb01ea9f 100644 --- a/phreeqcpp/print.cpp +++ b/phreeqcpp/print.cpp @@ -13,6 +13,15 @@ #include "cxxKinetics.h" #include "Solution.h" #include "Surface.h" + +#if defined(PHREEQCI_GUI) +#ifdef _DEBUG +#define new DEBUG_NEW +#undef THIS_FILE +static char THIS_FILE[] = __FILE__; +#endif +#endif + /* ---------------------------------------------------------------------- */ int Phreeqc:: array_print(LDBLE * array_l, int row_count, int column_count, diff --git a/phreeqcpp/read.cpp b/phreeqcpp/read.cpp index 26c69f2a..0fdc23a3 100644 --- a/phreeqcpp/read.cpp +++ b/phreeqcpp/read.cpp @@ -19,6 +19,15 @@ #include "SelectedOutput.h" #include "UserPunch.h" + +#if defined(PHREEQCI_GUI) +#ifdef _DEBUG +#define new DEBUG_NEW +#undef THIS_FILE +static char THIS_FILE[] = __FILE__; +#endif +#endif + /* ---------------------------------------------------------------------- */ int Phreeqc:: read_input(void) diff --git a/phreeqcpp/readtr.cpp b/phreeqcpp/readtr.cpp index af09ff6d..49ee6233 100644 --- a/phreeqcpp/readtr.cpp +++ b/phreeqcpp/readtr.cpp @@ -1,12 +1,12 @@ #include /* std::cout std::cerr */ #include #include +#include "Phreeqc.h" #include "StorageBin.h" #include "SS.h" #ifndef boolean typedef unsigned char boolean; #endif -#include "Phreeqc.h" #include "phqalloc.h" #include "Utils.h" @@ -17,6 +17,15 @@ typedef unsigned char boolean; #define OPTION_DEFAULT -4 #define OPTION_DEFAULT2 -5 + +#if defined(PHREEQCI_GUI) +#ifdef _DEBUG +#define new DEBUG_NEW +#undef THIS_FILE +static char THIS_FILE[] = __FILE__; +#endif +#endif + /* ---------------------------------------------------------------------- */ int Phreeqc:: read_transport(void) diff --git a/phreeqcpp/runner.cpp b/phreeqcpp/runner.cpp index d8e78cb8..6aa07a0f 100644 --- a/phreeqcpp/runner.cpp +++ b/phreeqcpp/runner.cpp @@ -2,6 +2,15 @@ #include "Parser.h" #include "NA.h" #include "Utils.h" + +#if defined(PHREEQCI_GUI) +#ifdef _DEBUG +#define new DEBUG_NEW +#undef THIS_FILE +static char THIS_FILE[] = __FILE__; +#endif +#endif + runner::runner(PHRQ_io *io) : PHRQ_base(io) diff --git a/phreeqcpp/sit.cpp b/phreeqcpp/sit.cpp index 0c2c430f..8e954b9e 100644 --- a/phreeqcpp/sit.cpp +++ b/phreeqcpp/sit.cpp @@ -3,6 +3,15 @@ #include "Exchange.h" #include "Solution.h" + +#if defined(PHREEQCI_GUI) +#ifdef _DEBUG +#define new DEBUG_NEW +#undef THIS_FILE +static char THIS_FILE[] = __FILE__; +#endif +#endif + /* ---------------------------------------------------------------------- */ int Phreeqc:: sit_init(void) diff --git a/phreeqcpp/smalldense.cpp b/phreeqcpp/smalldense.cpp index 891ae99a..7df38cfb 100644 --- a/phreeqcpp/smalldense.cpp +++ b/phreeqcpp/smalldense.cpp @@ -70,6 +70,15 @@ /* Implementation */ + +#if defined(PHREEQCI_GUI) +#ifdef _DEBUG +#define new DEBUG_NEW +#undef THIS_FILE +static char THIS_FILE[] = __FILE__; +#endif +#endif + realtype ** denalloc(integertype n) { diff --git a/phreeqcpp/spread.cpp b/phreeqcpp/spread.cpp index dfd09291..8299ea08 100644 --- a/phreeqcpp/spread.cpp +++ b/phreeqcpp/spread.cpp @@ -16,6 +16,15 @@ typedef unsigned char boolean; #define OPTION_ERROR -3 #define OPTION_DEFAULT -4 #define OPT_1 -5 + +#if defined(PHREEQCI_GUI) +#ifdef _DEBUG +#define new DEBUG_NEW +#undef THIS_FILE +static char THIS_FILE[] = __FILE__; +#endif +#endif + /* ---------------------------------------------------------------------- */ int Phreeqc:: read_solution_spread(void) diff --git a/phreeqcpp/step.cpp b/phreeqcpp/step.cpp index 19049c0f..25484077 100644 --- a/phreeqcpp/step.cpp +++ b/phreeqcpp/step.cpp @@ -17,6 +17,15 @@ #include "SSassemblage.h" #include "cxxKinetics.h" + +#if defined(PHREEQCI_GUI) +#ifdef _DEBUG +#define new DEBUG_NEW +#undef THIS_FILE +static char THIS_FILE[] = __FILE__; +#endif +#endif + /* ---------------------------------------------------------------------- */ int Phreeqc:: step(LDBLE step_fraction) diff --git a/phreeqcpp/structures.cpp b/phreeqcpp/structures.cpp index 61bfbe29..ac1eaa40 100644 --- a/phreeqcpp/structures.cpp +++ b/phreeqcpp/structures.cpp @@ -15,6 +15,13 @@ #include "Surface.h" #include "Solution.h" +#if defined(PHREEQCI_GUI) +#ifdef _DEBUG +#define new DEBUG_NEW +#undef THIS_FILE +static char THIS_FILE[] = __FILE__; +#endif +#endif /* ---------------------------------------------------------------------- */ int Phreeqc:: diff --git a/phreeqcpp/sundialsmath.cpp b/phreeqcpp/sundialsmath.cpp index c060716f..cde4ecb1 100644 --- a/phreeqcpp/sundialsmath.cpp +++ b/phreeqcpp/sundialsmath.cpp @@ -68,6 +68,14 @@ #define TWO RCONST(2.0) +#if defined(PHREEQCI_GUI) +#ifdef _DEBUG +#define new DEBUG_NEW +#undef THIS_FILE +static char THIS_FILE[] = __FILE__; +#endif +#endif + realtype UnitRoundoff(void) { diff --git a/phreeqcpp/tally.cpp b/phreeqcpp/tally.cpp index 74d080a0..91b83391 100644 --- a/phreeqcpp/tally.cpp +++ b/phreeqcpp/tally.cpp @@ -9,6 +9,16 @@ #include "SSassemblage.h" #include "cxxKinetics.h" #include "Solution.h" + +#if defined(PHREEQCI_GUI) +#ifdef _DEBUG +#define new DEBUG_NEW +#undef THIS_FILE +static char THIS_FILE[] = __FILE__; +#endif +#endif + + /* Calling sequence diff --git a/phreeqcpp/tidy.cpp b/phreeqcpp/tidy.cpp index 47d3dee8..35be1ad2 100644 --- a/phreeqcpp/tidy.cpp +++ b/phreeqcpp/tidy.cpp @@ -10,6 +10,15 @@ #define ZERO_TOL 1.0e-30 + +#if defined(PHREEQCI_GUI) +#ifdef _DEBUG +#define new DEBUG_NEW +#undef THIS_FILE +static char THIS_FILE[] = __FILE__; +#endif +#endif + /* ---------------------------------------------------------------------- */ int Phreeqc:: tidy_model(void) diff --git a/phreeqcpp/transport.cpp b/phreeqcpp/transport.cpp index 29998930..5648f0d0 100644 --- a/phreeqcpp/transport.cpp +++ b/phreeqcpp/transport.cpp @@ -51,6 +51,15 @@ struct MOLES_ADDED /* total moles added to balance negative conc's */ } *moles_added; int count_moles_added; + +#if defined(PHREEQCI_GUI) +#ifdef _DEBUG +#define new DEBUG_NEW +#undef THIS_FILE +static char THIS_FILE[] = __FILE__; +#endif +#endif + /* ---------------------------------------------------------------------- */ int Phreeqc:: transport(void) diff --git a/phreeqcpp/utilities.cpp b/phreeqcpp/utilities.cpp index 23f310ec..75ae61e0 100644 --- a/phreeqcpp/utilities.cpp +++ b/phreeqcpp/utilities.cpp @@ -7,6 +7,15 @@ #include + +#if defined(PHREEQCI_GUI) +#ifdef _DEBUG +#define new DEBUG_NEW +#undef THIS_FILE +static char THIS_FILE[] = __FILE__; +#endif +#endif + /* ---------------------------------------------------------------------- */ double Phreeqc:: calc_alk(CReaction& rxn_ref)