Merge commit '4cee19d768863d8f09b3629ee36a11e1a6030f33'

This commit is contained in:
Darth Vader 2021-04-19 23:23:32 +00:00
commit 8080cbce1e
83 changed files with 737 additions and 17 deletions

View File

@ -10,6 +10,15 @@
#include <iostream> #include <iostream>
#if defined(PHREEQCI_GUI)
#ifdef _DEBUG
#define new DEBUG_NEW
#undef THIS_FILE
static char THIS_FILE[] = __FILE__;
#endif
#endif
////////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////////
// Construction/Destruction // Construction/Destruction
////////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////////

View File

@ -18,6 +18,15 @@
#include "Form1.h" #include "Form1.h"
using namespace zdg_ui2; 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 // Construction/Destruction
////////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////////

View File

@ -8,6 +8,15 @@
#include "CurveObject.h" #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 // Construction/Destruction
////////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////////

View File

@ -1,4 +1,13 @@
#include "Dictionary.h" #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) Dictionary::Dictionary(void)
{ {
} }

View File

@ -15,6 +15,15 @@
#include "phqalloc.h" #include "phqalloc.h"
#include "Dictionary.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 // Construction/Destruction
////////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////////

View File

@ -16,6 +16,14 @@
#include "phqalloc.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 // Construction/Destruction
////////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////////

View File

@ -16,6 +16,13 @@
#include "Dictionary.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 // Construction/Destruction

View File

@ -15,6 +15,14 @@
#include "phqalloc.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 // Construction/Destruction
////////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////////

View File

@ -14,6 +14,14 @@
#include "phqalloc.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 // Construction/Destruction
////////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////////

View File

@ -9,6 +9,15 @@
#include "Solution.h" #include "Solution.h"
#include "phqalloc.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): cxxISolutionComp::cxxISolutionComp(PHRQ_io *io):
PHRQ_base(io), PHRQ_base(io),
moles(0.0), moles(0.0),

View File

@ -14,6 +14,15 @@
#include "phqalloc.h" #include "phqalloc.h"
#include "Dictionary.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 // Construction/Destruction
////////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////////

View File

@ -18,6 +18,14 @@
#include "ISolutionComp.h" #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 // Construction/Destruction
////////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////////

View File

@ -10,6 +10,15 @@
#include "Parser.h" #include "Parser.h"
#include "Utils.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 // Construction/Destruction
////////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////////

View File

@ -1,15 +1,6 @@
#if defined(WIN32) && !defined(__GNUC__)
#include <windows.h>
#if defined(PHREEQCI_GUI)
#include "../../resource.h"
#endif
#else
#include <assert.h>
#define _ASSERTE assert
#endif
#include <stdlib.h> #include <stdlib.h>
#include "PBasic.h"
#include "Phreeqc.h" #include "Phreeqc.h"
#include "PBasic.h"
#include "phqalloc.h" #include "phqalloc.h"
#include "NameDouble.h" #include "NameDouble.h"
#include "Utils.h" #include "Utils.h"
@ -29,6 +20,15 @@
#define toklength 20 #define toklength 20
typedef long chset[9]; 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 */ /* Output from p2c, the Pascal-to-C translator */
/* From input file "basic.p" */ /* From input file "basic.p" */

View File

@ -2,6 +2,15 @@
#include "Phreeqc.h" #include "Phreeqc.h"
#include "phqalloc.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:: int Phreeqc::
warning_msg(const char *err_str) warning_msg(const char *err_str)

View File

@ -14,6 +14,14 @@
#include "phqalloc.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 // Construction/Destruction
////////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////////

View File

@ -13,6 +13,15 @@
#include "Dictionary.h" #include "Dictionary.h"
#include "phqalloc.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 // Construction/Destruction
////////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////////

View File

@ -15,6 +15,14 @@
#include "Temperature.h" #include "Temperature.h"
#include "SSassemblage.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[] = { //const const_iso Phreeqc::iso_defaults[] = {
// {"13C", -10, 1}, // {"13C", -10, 1},
// {"13C(4)", -10, 1}, // {"13C(4)", -10, 1},

View File

@ -1,7 +1,16 @@
#ifndef _INC_PHREEQC_H #ifndef _INC_PHREEQC_H
#define _INC_PHREEQC_H #define _INC_PHREEQC_H
#if defined(WIN32) #if defined(WIN32)
#include <windows.h> # if defined(PHREEQCI_GUI)
# ifndef WINVER
# define WINVER 0x0400
# endif
# include <afx.h>
# endif
# include <windows.h>
# if defined(PHREEQCI_GUI)
# include "../../resource.h"
# endif
#endif #endif
#if defined(WIN32_MEMORY_DEBUG) #if defined(WIN32_MEMORY_DEBUG)
#define _CRTDBG_MAP_ALLOC #define _CRTDBG_MAP_ALLOC

View File

@ -1,6 +1,14 @@
#include "Keywords.h" #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) Keywords::Keywords(void)
{ {
} }

View File

@ -8,11 +8,20 @@
#include <algorithm> // std::sort #include <algorithm> // std::sort
#include "Utils.h" // define first #include "Utils.h" // define first
#include "Parser.h"
#include "Phreeqc.h" #include "Phreeqc.h"
#include "Parser.h"
#include "Pressure.h" #include "Pressure.h"
#include "phqalloc.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 // Construction/Destruction
////////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////////

View File

@ -13,6 +13,14 @@
#include "phqalloc.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 // Construction/Destruction
////////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////////

View File

@ -24,6 +24,15 @@
#include "Surface.h" #include "Surface.h"
#include "phqalloc.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:: int Phreeqc::
read_dump(void) read_dump(void)

View File

@ -14,6 +14,13 @@
#include "phqalloc.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 // Construction/Destruction

View File

@ -17,6 +17,14 @@
#include "Dictionary.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 // Construction/Destruction
////////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////////

View File

@ -13,6 +13,15 @@
#include "phqalloc.h" #include "phqalloc.h"
#include "Dictionary.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 // Construction/Destruction
////////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////////

View File

@ -1,5 +1,14 @@
#include "SelectedOutput.h" #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) SelectedOutput::SelectedOutput(int n, PHRQ_io *io)
: cxxNumKeyword(io) : cxxNumKeyword(io)
{ {

View File

@ -9,6 +9,15 @@
#include "PPassemblage.h" #include "PPassemblage.h"
#include "SSassemblage.h" #include "SSassemblage.h"
#include "Surface.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) Serializer::Serializer(PHRQ_io *io)
: PHRQ_base(io) : PHRQ_base(io)
{ {

View File

@ -16,6 +16,15 @@
#include "Dictionary.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 // Construction/Destruction
////////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////////

View File

@ -10,6 +10,15 @@
#include "phqalloc.h" #include "phqalloc.h"
#include "Dictionary.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) cxxSolutionIsotope::cxxSolutionIsotope(PHRQ_io *io)
: :
PHRQ_base(io), PHRQ_base(io),

View File

@ -28,6 +28,12 @@
#include "phqalloc.h" #include "phqalloc.h"
#include "Use.h" #include "Use.h"
#if defined(PHREEQCI_GUI)
#ifdef _DEBUG
#undef THIS_FILE
static char BASED_CODE THIS_FILE[] = __FILE__;
#endif
#endif
////////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////////
// Construction/Destruction // Construction/Destruction

View File

@ -2,6 +2,14 @@
#include "StorageBinList.h" #include "StorageBinList.h"
#include "Parser.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) StorageBinListItem::StorageBinListItem(void)
{ {
this->defined = false; this->defined = false;

View File

@ -13,6 +13,15 @@
#include "phqalloc.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 // Construction/Destruction
////////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////////

View File

@ -14,6 +14,14 @@
#include "Dictionary.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 // Construction/Destruction
////////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////////

View File

@ -13,6 +13,15 @@
#include "phqalloc.h" #include "phqalloc.h"
#include "Dictionary.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 // Construction/Destruction
////////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////////

View File

@ -15,6 +15,15 @@
#include "Reaction.h" #include "Reaction.h"
#include "Temperature.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) cxxSystem::cxxSystem(PHRQ_io *io)
: :
PHRQ_base(io) PHRQ_base(io)

View File

@ -8,12 +8,21 @@
#include <algorithm> // std::sort #include <algorithm> // std::sort
#include "Utils.h" // define first #include "Utils.h" // define first
#include "Parser.h"
#include "Phreeqc.h" #include "Phreeqc.h"
#include "Parser.h"
#include "Temperature.h" #include "Temperature.h"
#include "phqalloc.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 // Construction/Destruction

View File

@ -1,6 +1,15 @@
#include <stdio.h> #include <stdio.h>
#include "Use.h" #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() cxxUse::cxxUse()
{ {
this->init(); this->init();

View File

@ -1,5 +1,14 @@
#include "UserPunch.h" #include "UserPunch.h"
#include "Phreeqc.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) UserPunch::UserPunch(int n, PHRQ_io *io)
: cxxNumKeyword(io) : cxxNumKeyword(io)
{ {

View File

@ -4,6 +4,16 @@
#include "cxxKinetics.h" #include "cxxKinetics.h"
#include "Solution.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:: int Phreeqc::
advection(void) advection(void)

View File

@ -11,6 +11,15 @@
#include "cxxKinetics.h" #include "cxxKinetics.h"
#include "Solution.h" #include "Solution.h"
#include "Parser.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:: LDBLE Phreeqc::
activity(const char *species_name) activity(const char *species_name)

View File

@ -10,6 +10,15 @@
#define CHECK_ERRORS #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:: int Phreeqc::
cl1(int k, int l, int m, int n, cl1(int k, int l, int m, int n,
int l_nklmd, int l_n2d, int l_nklmd, int l_n2d,

View File

@ -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:: int Phreeqc::
cl1mp(int k, int l, int m, int n, cl1mp(int k, int l, int m, int n,
int nklmd, int n2d, int nklmd, int n2d,

View File

@ -11,6 +11,15 @@
#include "cxxKinetics.h" #include "cxxKinetics.h"
//#include <sys/signal.h> //#include <sys/signal.h>
//#include <fenv.h> //#include <fenv.h>
#if defined(PHREEQCI_GUI)
#ifdef _DEBUG
#define new DEBUG_NEW
#undef THIS_FILE
static char THIS_FILE[] = __FILE__;
#endif
#endif
/* ---------------------------------------------------------------------- /* ----------------------------------------------------------------------
* MAIN * MAIN
* ---------------------------------------------------------------------- */ * ---------------------------------------------------------------------- */

View File

@ -1,6 +1,16 @@
#include "Phreeqc.h"
#include "PHRQ_base.h" #include "PHRQ_base.h"
#include <iostream> #include <iostream>
#include "PHRQ_io.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
PHRQ_base:: PHRQ_base::
PHRQ_base(void) PHRQ_base(void)
{ {

View File

@ -1,4 +1,5 @@
#include <assert.h> #include <assert.h>
#include "Phreeqc.h"
#include "PHRQ_io.h" #include "PHRQ_io.h"
#include "Parser.h" #include "Parser.h"
@ -13,6 +14,15 @@
#include <stdio.h> #include <stdio.h>
#include <stdarg.h> #include <stdarg.h>
#if defined(PHREEQCI_GUI)
#ifdef _DEBUG
#define new DEBUG_NEW
#undef THIS_FILE
static char THIS_FILE[] = __FILE__;
#endif
#endif
PHRQ_io:: PHRQ_io::
PHRQ_io(void) PHRQ_io(void)
{ {

View File

@ -15,6 +15,15 @@
#include "Parser.h" #include "Parser.h"
#include "PHRQ_io.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 // Construction/Destruction
////////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////////

View File

@ -12,6 +12,15 @@
#include "float.h" #include "float.h"
#include "math.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 int
Utilities::strcmp_nocase_arg1(const char *str1, const char *str2) Utilities::strcmp_nocase_arg1(const char *str1, const char *str2)

View File

@ -63,6 +63,7 @@
#include <stdio.h> #include <stdio.h>
#include <stdlib.h> #include <stdlib.h>
#include <string.h> #include <string.h>
#include "Phreeqc.h"
#include "cvdense.h" #include "cvdense.h"
#include "cvode.h" #include "cvode.h"
#include "dense.h" #include "dense.h"
@ -71,7 +72,6 @@
#include "sundialsmath.h" #include "sundialsmath.h"
#include "Phreeqc.h"
#if !defined(WIN32_MEMORY_DEBUG) #if !defined(WIN32_MEMORY_DEBUG)
#define malloc PHRQ_malloc #define malloc PHRQ_malloc
#endif #endif
@ -150,6 +150,15 @@ static void CVDenseDQJac(integertype N, DenseMat J, RhsFn f, void *f_data,
N_Vector vtemp2, N_Vector vtemp3); 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 **************************************** /*************** CVDenseDQJac ****************************************
This routine generates a dense difference quotient approximation to This routine generates a dense difference quotient approximation to

View File

@ -59,6 +59,7 @@
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE * * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE *
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. * * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. *
**************************************************************************/ **************************************************************************/
#include "Phreeqc.h"
#include "nvector_serial.h" #include "nvector_serial.h"
#define Ith(v,i) NV_Ith_S(v,i-1) #define Ith(v,i) NV_Ith_S(v,i-1)
/************************************************************/ /************************************************************/
@ -71,7 +72,6 @@
#include "nvector.h" #include "nvector.h"
#include "sundialsmath.h" #include "sundialsmath.h"
#include "Phreeqc.h"
#if !defined(WIN32_MEMORY_DEBUG) #if !defined(WIN32_MEMORY_DEBUG)
#define malloc MACHENV_MALLOC PHRQ_malloc #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 *******************************
CVodeMalloc allocates and initializes memory for a problem. All CVodeMalloc allocates and initializes memory for a problem. All

View File

@ -15,6 +15,15 @@
#include "PHRQ_io.h" #include "PHRQ_io.h"
#include "Dictionary.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 // Construction/Destruction
////////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////////

View File

@ -8,11 +8,20 @@
#include <algorithm> // std::sort #include <algorithm> // std::sort
#include "Utils.h" // define first #include "Utils.h" // define first
#include "Parser.h"
#include "Phreeqc.h" #include "Phreeqc.h"
#include "Parser.h"
#include "cxxMix.h" #include "cxxMix.h"
#include "phqalloc.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 // Construction/Destruction
////////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////////

View File

@ -75,6 +75,15 @@
/* Implementation */ /* Implementation */
#if defined(PHREEQCI_GUI)
#ifdef _DEBUG
#define new DEBUG_NEW
#undef THIS_FILE
static char THIS_FILE[] = __FILE__;
#endif
#endif
DenseMat DenseMat
DenseAllocMat(integertype N) DenseAllocMat(integertype N)
{ {

View File

@ -4,6 +4,14 @@
#include "Parser.h" #include "Parser.h"
#include "PHRQ_io.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) dumper::dumper(PHRQ_io *io)
: :
PHRQ_base(io) PHRQ_base(io)

View File

@ -1,5 +1,14 @@
#include "Phreeqc.h" #include "Phreeqc.h"
#include "GasPhase.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:: int Phreeqc::
setup_fixed_volume_gas(void) setup_fixed_volume_gas(void)

View File

@ -5,6 +5,15 @@
#include <fstream> #include <fstream>
#include "phqalloc.h" #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:: void Phreeqc::
set_reading_database(int reading_database) set_reading_database(int reading_database)

View File

@ -6,6 +6,15 @@
#define MAX_QUAD 20 #define MAX_QUAD 20
#define K_POLY 5 #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:: int Phreeqc::
calc_all_g(void) calc_all_g(void)

View File

@ -12,6 +12,15 @@
#define SCALE_EPSILON .0009765625 #define SCALE_EPSILON .0009765625
#define SCALE_WATER 1. #define SCALE_WATER 1.
#define SCALE_ALL 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:: int Phreeqc::
inverse_models(void) inverse_models(void)

View File

@ -3,6 +3,14 @@
#include "Solution.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:: int Phreeqc::
read_isotopes(void) read_isotopes(void)

View File

@ -39,6 +39,15 @@
#define MAX_DIVIDE 2 #define MAX_DIVIDE 2
#define KINETICS_TOL 1e-8; #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:: int Phreeqc::
calc_kinetic_reaction(cxxKinetics *kinetics_ptr, LDBLE time_step) calc_kinetic_reaction(cxxKinetics *kinetics_ptr, LDBLE time_step)

View File

@ -17,6 +17,14 @@
#include <windows.h> #include <windows.h>
#endif #endif
#if defined(PHREEQCI_GUI)
#ifdef _DEBUG
#define new DEBUG_NEW
#undef THIS_FILE
static char THIS_FILE[] = __FILE__;
#endif
#endif
/* ---------------------------------------------------------------------- */ /* ---------------------------------------------------------------------- */
void Phreeqc:: void Phreeqc::
initialize(void) initialize(void)

View File

@ -8,6 +8,15 @@
#include "SSassemblage.h" #include "SSassemblage.h"
#include "Solution.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:: int Phreeqc::
model(void) model(void)

View File

@ -61,6 +61,15 @@
#include "nvector.h" /* generic M_Env and N_Vector */ #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_Vector
N_VNew(integertype n, M_Env machEnv) N_VNew(integertype n, M_Env machEnv)
{ {

View File

@ -98,6 +98,15 @@ static void Vaxpy_Serial(realtype a, N_Vector x, N_Vector y);
/* x <- ax */ /* x <- ax */
static void VScaleBy_Serial(realtype a, N_Vector x); 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 ************************/ /********************* Exported Functions ************************/
/* Serial implementation of the machine environment /* Serial implementation of the machine environment

View File

@ -1,6 +1,15 @@
#include "Phreeqc.h" #include "Phreeqc.h"
#include "phqalloc.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:: int Phreeqc::
parse_eq(char* eqn, std::vector<class elt_list>& new_elt_list, int association) parse_eq(char* eqn, std::vector<class elt_list>& new_elt_list, int association)

View File

@ -8,6 +8,17 @@
#define _CRTDBG_MAP_ALLOC #define _CRTDBG_MAP_ALLOC
#include <crtdbg.h> #include <crtdbg.h>
#endif #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(USE_PHRQ_ALLOC)
/* ---------------------------------------------------------------------- */ /* ---------------------------------------------------------------------- */
#if !defined(NDEBUG) #if !defined(NDEBUG)

View File

@ -5,6 +5,15 @@
#define PITZER_LISTS #define PITZER_LISTS
#define PITZER #define PITZER
#if defined(PHREEQCI_GUI)
#ifdef _DEBUG
#define new DEBUG_NEW
#undef THIS_FILE
static char THIS_FILE[] = __FILE__;
#endif
#endif
/* ---------------------------------------------------------------------- */ /* ---------------------------------------------------------------------- */
int Phreeqc:: int Phreeqc::
pitzer_init(void) pitzer_init(void)

View File

@ -4,6 +4,15 @@
#include <list> #include <list>
#include <string> #include <string>
#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" * Routines related to structure "pitz_param"

View File

@ -10,6 +10,15 @@
#include "SS.h" #include "SS.h"
#include "Solution.h" #include "Solution.h"
#include "cxxKinetics.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:: int Phreeqc::
prep(void) prep(void)

View File

@ -13,6 +13,15 @@
#include "cxxKinetics.h" #include "cxxKinetics.h"
#include "Solution.h" #include "Solution.h"
#include "Surface.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:: int Phreeqc::
array_print(LDBLE * array_l, int row_count, int column_count, array_print(LDBLE * array_l, int row_count, int column_count,

View File

@ -19,6 +19,15 @@
#include "SelectedOutput.h" #include "SelectedOutput.h"
#include "UserPunch.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:: int Phreeqc::
read_input(void) read_input(void)

View File

@ -1,12 +1,12 @@
#include <iostream> /* std::cout std::cerr */ #include <iostream> /* std::cout std::cerr */
#include <sstream> #include <sstream>
#include <fstream> #include <fstream>
#include "Phreeqc.h"
#include "StorageBin.h" #include "StorageBin.h"
#include "SS.h" #include "SS.h"
#ifndef boolean #ifndef boolean
typedef unsigned char boolean; typedef unsigned char boolean;
#endif #endif
#include "Phreeqc.h"
#include "phqalloc.h" #include "phqalloc.h"
#include "Utils.h" #include "Utils.h"
@ -17,6 +17,15 @@ typedef unsigned char boolean;
#define OPTION_DEFAULT -4 #define OPTION_DEFAULT -4
#define OPTION_DEFAULT2 -5 #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:: int Phreeqc::
read_transport(void) read_transport(void)

View File

@ -2,6 +2,15 @@
#include "Parser.h" #include "Parser.h"
#include "NA.h" #include "NA.h"
#include "Utils.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) runner::runner(PHRQ_io *io)
: :
PHRQ_base(io) PHRQ_base(io)

View File

@ -3,6 +3,15 @@
#include "Exchange.h" #include "Exchange.h"
#include "Solution.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:: int Phreeqc::
sit_init(void) sit_init(void)

View File

@ -70,6 +70,15 @@
/* Implementation */ /* Implementation */
#if defined(PHREEQCI_GUI)
#ifdef _DEBUG
#define new DEBUG_NEW
#undef THIS_FILE
static char THIS_FILE[] = __FILE__;
#endif
#endif
realtype ** realtype **
denalloc(integertype n) denalloc(integertype n)
{ {

View File

@ -16,6 +16,15 @@ typedef unsigned char boolean;
#define OPTION_ERROR -3 #define OPTION_ERROR -3
#define OPTION_DEFAULT -4 #define OPTION_DEFAULT -4
#define OPT_1 -5 #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:: int Phreeqc::
read_solution_spread(void) read_solution_spread(void)

View File

@ -17,6 +17,15 @@
#include "SSassemblage.h" #include "SSassemblage.h"
#include "cxxKinetics.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:: int Phreeqc::
step(LDBLE step_fraction) step(LDBLE step_fraction)

View File

@ -15,6 +15,13 @@
#include "Surface.h" #include "Surface.h"
#include "Solution.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:: int Phreeqc::

View File

@ -68,6 +68,14 @@
#define TWO RCONST(2.0) #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 realtype
UnitRoundoff(void) UnitRoundoff(void)
{ {

View File

@ -9,6 +9,16 @@
#include "SSassemblage.h" #include "SSassemblage.h"
#include "cxxKinetics.h" #include "cxxKinetics.h"
#include "Solution.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 Calling sequence

View File

@ -10,6 +10,15 @@
#define ZERO_TOL 1.0e-30 #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:: int Phreeqc::
tidy_model(void) tidy_model(void)

View File

@ -51,6 +51,15 @@ struct MOLES_ADDED /* total moles added to balance negative conc's */
} *moles_added; } *moles_added;
int count_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:: int Phreeqc::
transport(void) transport(void)

View File

@ -7,6 +7,15 @@
#include <time.h> #include <time.h>
#if defined(PHREEQCI_GUI)
#ifdef _DEBUG
#define new DEBUG_NEW
#undef THIS_FILE
static char THIS_FILE[] = __FILE__;
#endif
#endif
/* ---------------------------------------------------------------------- */ /* ---------------------------------------------------------------------- */
double Phreeqc:: double Phreeqc::
calc_alk(CReaction& rxn_ref) calc_alk(CReaction& rxn_ref)