Fixed post-build in project

Phreeqc.h was jacked up??? The has_infinite block did not end until the end of the file.

Made the arguments for the C callback double, double, const char *.

git-svn-id: svn://136.177.114.72/svn_GW/phreeqc3/trunk@7888 1feff8c3-07ed-0310-ac33-dd36852eb9cd
This commit is contained in:
David L Parkhurst 2013-08-07 17:01:30 +00:00
parent 305cd8631d
commit 88742cdb36
2 changed files with 13 additions and 9 deletions

View File

@ -83,7 +83,7 @@ public:
int basic_run(char *commands, void *lnbase, void *vbase, void *lpbase);
void basic_free(void);
double basic_callback(double x1, double x2, char * str);
void register_basic_callback(double ( *cookie)(double *x1, double *x2, char *str));
void register_basic_callback(double ( *cookie)(double x1, double x2, const char *str));
void register_fortran_basic_callback(double ( *cookie)(double *x1, double *x2, char *str, int l));
LDBLE activity(const char *species_name);
@ -1695,7 +1695,7 @@ protected:
/* Basic */
PBasic * basic_interpreter;
double (*basic_callback_ptr) (double *x1, double *x2, char *str);
double (*basic_callback_ptr) (double x1, double x2, const char *str);
double (*basic_fortran_callback_ptr) (double *x1, double *x2, char *str, int l);
/* cl1.cpp ------------------------------- */
@ -1912,7 +1912,12 @@ protected:
std::vector<int> keycount; // used to mark keywords that have been read
public:
static const struct const_iso iso_defaults[];
static const int count_iso_defaults;
};
#endif /* _INC_PHREEQC_H */
#ifndef _INC_ISFINITE_H
#define _INC_ISFINITE_H
/*********************************
@ -1938,11 +1943,7 @@ protected:
#else
# define PHR_ISFINITE(x) ( ((x) == 0.0) || (((x) == (x)) && ((x) != (2.0 * (x)))) )
#endif
public:
static const struct const_iso iso_defaults[];
static const int count_iso_defaults;
};
#endif // _INC_ISFINITE_H
namespace Utilities
{
@ -2093,4 +2094,3 @@ void PhreeqcIWait(Phreeqc *phreeqc);
char * _string_duplicate(const char *token, const char *szFileName, int nLine);
#endif
#endif

View File

@ -3605,6 +3605,10 @@ basic_callback(double x1, double x2, char * str)
double local_x1 = x1;
double local_x2 = x2;
if (basic_callback_ptr != NULL)
{
return (*basic_callback_ptr) (x1, x2, (const char *) str);
}
if (basic_fortran_callback_ptr != NULL)
{
return (*basic_fortran_callback_ptr) (&local_x1, &local_x2, str, strlen(str));
@ -3613,7 +3617,7 @@ basic_callback(double x1, double x2, char * str)
}
void
Phreeqc::register_basic_callback(double ( *cookie)(double *x1, double *x2, char *str))
Phreeqc::register_basic_callback(double ( *cookie)(double x1, double x2, const char *str))
{
this->basic_callback_ptr = cookie;
}