mirror of
https://git.gfz-potsdam.de/naaice/iphreeqc.git
synced 2025-12-16 00:28:23 +01:00
working on configure script and testing on linux
git-svn-id: svn://136.177.114.72/svn_GW/IPhreeqc/trunk@4271 1feff8c3-07ed-0310-ac33-dd36852eb9cd
This commit is contained in:
parent
74589b4d48
commit
0a2feb4ad1
@ -40,14 +40,17 @@
|
||||
UnLoadDatabase = UnLoadDatabaseF(ID)
|
||||
END FUNCTION UnLoadDatabase
|
||||
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
|
||||
SUBROUTINE OutputLastError
|
||||
SUBROUTINE OutputLastError(ID)
|
||||
IMPLICIT NONE
|
||||
CALL OutputLastErrorF
|
||||
INTEGER :: ID
|
||||
WRITE(*,*) "fortran OutputLastError ID = ", ID
|
||||
CALL OutputLastErrorF(ID)
|
||||
END SUBROUTINE OutputLastError
|
||||
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
|
||||
SUBROUTINE OutputLastWarning
|
||||
SUBROUTINE OutputLastWarning(ID)
|
||||
IMPLICIT NONE
|
||||
CALL OutputLastWarningF
|
||||
INTEGER :: ID
|
||||
CALL OutputLastWarningF(ID)
|
||||
END SUBROUTINE OutputLastWarning
|
||||
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
|
||||
FUNCTION AccumulateLine(ID,LINE)
|
||||
@ -18,18 +18,25 @@ private:
|
||||
int
|
||||
CreateIPhreeqc(void)
|
||||
{
|
||||
return IPhreeqcLib::CreateIPhreeqc();
|
||||
// return IPhreeqcLib::CreateIPhreeqc();
|
||||
int i = IPhreeqcLib::CreateIPhreeqc();
|
||||
std::cout << "CreateIPhreeqc " << i << "\n";
|
||||
return i;
|
||||
}
|
||||
|
||||
IPQ_RESULT
|
||||
DestroyIPhreeqc(int id)
|
||||
{
|
||||
return IPhreeqcLib::DestroyIPhreeqc(id);
|
||||
// return IPhreeqcLib::DestroyIPhreeqc(id);
|
||||
IPQ_RESULT i = IPhreeqcLib::DestroyIPhreeqc(id);
|
||||
std::cout << "DestroyIPhreeqc( " << id << ") = " << i << "\n";
|
||||
return i;
|
||||
}
|
||||
|
||||
int
|
||||
LoadDatabase(int id, const char* filename)
|
||||
{
|
||||
std::cout << "In LoadDatabase id = " << id << "\n";
|
||||
IPhreeqc* IPhreeqcPtr = IPhreeqcLib::GetInstance(id);
|
||||
if (IPhreeqcPtr)
|
||||
{
|
||||
@ -65,6 +72,7 @@ void
|
||||
OutputLastError(int id)
|
||||
{
|
||||
static const char err_msg[] = "OutputLastError: Bad instance.\n";
|
||||
std::cout << "In OutputLastError id = " << id << "\n";
|
||||
IPhreeqc* IPhreeqcPtr = IPhreeqcLib::GetInstance(id);
|
||||
if (IPhreeqcPtr)
|
||||
{
|
||||
@ -134,7 +142,7 @@ GetDumpLineCount(int id)
|
||||
return 0;
|
||||
}
|
||||
|
||||
const char*
|
||||
const char*
|
||||
GetDumpLine(int id, int n)
|
||||
{
|
||||
static const char err_msg[] = "GetDumpLine: Bad instance.\n";
|
||||
|
||||
@ -148,11 +148,11 @@ include_HEADERS=\
|
||||
if BUILD_FORTRAN
|
||||
|
||||
libiphreeqc_la_SOURCES+=\
|
||||
fwrap.cpp\
|
||||
fwrap.h\
|
||||
fwrap.cpp\
|
||||
fwrap2.cpp\
|
||||
fwrap3.cpp\
|
||||
IPhreeqcF.F
|
||||
IPhreeqcF.f
|
||||
|
||||
include_HEADERS+=\
|
||||
$(top_srcdir)/include/IPhreeqc.f90.inc\
|
||||
|
||||
62
fwrap.h
62
fwrap.h
@ -7,37 +7,37 @@
|
||||
#define DLL_EXPORT
|
||||
#endif
|
||||
|
||||
#if defined(F77_FUNC)
|
||||
#define CreateIPhreeqcF F77_FUNC (createiphreeqcf, CREATEIPHREEQCF)
|
||||
#define DestroyIPhreeqcF F77_FUNC (destroyiphreeqcf, DESTROYIPHREEQCF)
|
||||
#define LoadDatabaseF F77_FUNC (loaddatabasef, LOADDATABASEF)
|
||||
#define LoadDatabaseStringF F77_FUNC (loaddatabasestringf, LOADDATABASESTRINGF)
|
||||
#define UnLoadDatabaseF F77_FUNC (unloaddatabasef, UNLOADDATABASEF)
|
||||
#define AccumulateLineF F77_FUNC (accumulatelinef, ACCUMULATELINEF)
|
||||
#define RunAccumulatedF F77_FUNC (runaccumulatedf, RUNACCUMULATEDF)
|
||||
#define RunFileF F77_FUNC (runfilef, RUNFILEF)
|
||||
#define RunStringF F77_FUNC (runstringf, RUNSTRINGF)
|
||||
#define GetSelectedOutputRowCountF F77_FUNC (getselectedoutputrowcountf, GETSELECTEDOUTPUTROWCOUNTF)
|
||||
#define GetSelectedOutputColumnCountF F77_FUNC (getselectedoutputcolumncountf, GETSELECTEDOUTPUTCOLUMNCOUNTF)
|
||||
#define GetSelectedOutputValueF F77_FUNC (getselectedoutputvaluef, GETSELECTEDOUTPUTVALUEF)
|
||||
#define SetSelectedOutputOnF F77_FUNC (setselectedoutputonf, SETSELECTEDOUTPUTONF)
|
||||
#define SetOutputOnF F77_FUNC (setoutputonf, SETOUTPUTONF)
|
||||
#define SetErrorOnF F77_FUNC (seterroronf, SETERRORONF)
|
||||
#define SetLogOnF F77_FUNC (setlogonf, SETLOGONF)
|
||||
#define SetDumpOnF F77_FUNC (setdumponf, SETDUMPONF)
|
||||
#define SetDumpStringOnF F77_FUNC (setdumpstringonf, SETDUMPSTRINGONF)
|
||||
#define GetDumpLineCountF F77_FUNC (getdumplinecountf, GETDUMPLINECOUNTF)
|
||||
#define GetDumpLineF F77_FUNC (getdumplinef, GETDUMPLINEF)
|
||||
#define GetErrorLineCountF F77_FUNC (geterrorlinecountf, GETERRORLINECOUNTF)
|
||||
#define GetErrorLineF F77_FUNC (geterrorlinef, GETERRORLINEF)
|
||||
#define GetWarningLineCountF F77_FUNC (getwarninglinecountf, GETWARNINGLINECOUNTF)
|
||||
#define GetWarningLineF F77_FUNC (getwarninglinef, GETWARNINGLINEF)
|
||||
#define GetComponentCountF F77_FUNC (getcomponentcountf, GETCOMPONENTCOUNTF)
|
||||
#define GetComponentF F77_FUNC (getcomponentf, GETCOMPONENTF)
|
||||
#define OutputLastErrorF F77_FUNC (outputlasterrorf, OUTPUTLASTERRORF)
|
||||
#define OutputLastWarningF F77_FUNC (outputlastwarningf, OUTPUTLASTWARNINGF)
|
||||
#define OutputLinesF F77_FUNC (outputlinesf, OUTPUTLINESF)
|
||||
#endif /* F77_FUNC */
|
||||
#if defined(FC_FUNC)
|
||||
#define CreateIPhreeqcF FC_FUNC (createiphreeqcf, CREATEIPHREEQCF)
|
||||
#define DestroyIPhreeqcF FC_FUNC (destroyiphreeqcf, DESTROYIPHREEQCF)
|
||||
#define LoadDatabaseF FC_FUNC (loaddatabasef, LOADDATABASEF)
|
||||
#define LoadDatabaseStringF FC_FUNC (loaddatabasestringf, LOADDATABASESTRINGF)
|
||||
#define UnLoadDatabaseF FC_FUNC (unloaddatabasef, UNLOADDATABASEF)
|
||||
#define AccumulateLineF FC_FUNC (accumulatelinef, ACCUMULATELINEF)
|
||||
#define RunAccumulatedF FC_FUNC (runaccumulatedf, RUNACCUMULATEDF)
|
||||
#define RunFileF FC_FUNC (runfilef, RUNFILEF)
|
||||
#define RunStringF FC_FUNC (runstringf, RUNSTRINGF)
|
||||
#define GetSelectedOutputRowCountF FC_FUNC (getselectedoutputrowcountf, GETSELECTEDOUTPUTROWCOUNTF)
|
||||
#define GetSelectedOutputColumnCountF FC_FUNC (getselectedoutputcolumncountf, GETSELECTEDOUTPUTCOLUMNCOUNTF)
|
||||
#define GetSelectedOutputValueF FC_FUNC (getselectedoutputvaluef, GETSELECTEDOUTPUTVALUEF)
|
||||
#define SetSelectedOutputOnF FC_FUNC (setselectedoutputonf, SETSELECTEDOUTPUTONF)
|
||||
#define SetOutputOnF FC_FUNC (setoutputonf, SETOUTPUTONF)
|
||||
#define SetErrorOnF FC_FUNC (seterroronf, SETERRORONF)
|
||||
#define SetLogOnF FC_FUNC (setlogonf, SETLOGONF)
|
||||
#define SetDumpOnF FC_FUNC (setdumponf, SETDUMPONF)
|
||||
#define SetDumpStringOnF FC_FUNC (setdumpstringonf, SETDUMPSTRINGONF)
|
||||
#define GetDumpLineCountF FC_FUNC (getdumplinecountf, GETDUMPLINECOUNTF)
|
||||
#define GetDumpLineF FC_FUNC (getdumplinef, GETDUMPLINEF)
|
||||
#define GetErrorLineCountF FC_FUNC (geterrorlinecountf, GETERRORLINECOUNTF)
|
||||
#define GetErrorLineF FC_FUNC (geterrorlinef, GETERRORLINEF)
|
||||
#define GetWarningLineCountF FC_FUNC (getwarninglinecountf, GETWARNINGLINECOUNTF)
|
||||
#define GetWarningLineF FC_FUNC (getwarninglinef, GETWARNINGLINEF)
|
||||
#define GetComponentCountF FC_FUNC (getcomponentcountf, GETCOMPONENTCOUNTF)
|
||||
#define GetComponentF FC_FUNC (getcomponentf, GETCOMPONENTF)
|
||||
#define OutputLastErrorF FC_FUNC (outputlasterrorf, OUTPUTLASTERRORF)
|
||||
#define OutputLastWarningF FC_FUNC (outputlastwarningf, OUTPUTLASTWARNINGF)
|
||||
#define OutputLinesF FC_FUNC (outputlinesf, OUTPUTLINESF)
|
||||
#endif /* FC_FUNC */
|
||||
|
||||
#if defined(__cplusplus)
|
||||
extern "C" {
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user