mirror of
https://git.gfz-potsdam.de/naaice/iphreeqc.git
synced 2025-12-15 16:18:22 +01:00
Made IPhreeqc a Fortran module when IPHREEQC_MODULE is defined.
fwrap routines are used if IPHREEQC_MODULE is not defined.
If IPHREEQC_MODULE is defined, then IPhreeqc_interface.F90 defines the Fortran Module.
compile it with the user Fortran code.
IPhreeqc_interface_F.cpp is a modification of fwrap.cpp, which the Fortran Module functions call.
IPhreeqc_interface_F.h is a modification of fwrap.h used only by IPhreeqc_interface_F.cpp.
git-svn-id: svn://136.177.114.72/svn_GW/IPhreeqc/trunk@9347 1feff8c3-07ed-0310-ac33-dd36852eb9cd
This commit is contained in:
parent
5f878fe396
commit
92f0ac92aa
1116
src/IPhreeqc_interface.F90
Normal file
1116
src/IPhreeqc_interface.F90
Normal file
File diff suppressed because it is too large
Load Diff
512
src/IPhreeqc_interface_F.cpp
Normal file
512
src/IPhreeqc_interface_F.cpp
Normal file
@ -0,0 +1,512 @@
|
||||
#ifdef IPHREEQC_MODULE
|
||||
#include <ctype.h> /* isgraph */
|
||||
#include <stdlib.h> /* malloc */
|
||||
#include <memory.h> /* memcpy */
|
||||
#include <assert.h> /* assert */
|
||||
#include <stdio.h> /* sprintf */
|
||||
#include "phrqtype.h"
|
||||
#include "IPhreeqc.h"
|
||||
|
||||
#include "IPhreeqc_interface_F.h"
|
||||
#ifdef SKIP
|
||||
char *
|
||||
f2cstring(char* fstring, size_t len)
|
||||
{
|
||||
char *cstr, *str;
|
||||
long i;
|
||||
|
||||
str = fstring;
|
||||
for (i = (long) len - 1; i >= 0 && !isgraph((int) str[i]); i--);
|
||||
cstr = (char *) malloc((size_t) (i + 2));
|
||||
if (!cstr) return 0;
|
||||
|
||||
cstr[i + 1] = '\0';
|
||||
if ((i + 1) > 0) memcpy(cstr, str, (size_t) (i + 1));
|
||||
return cstr;
|
||||
}
|
||||
#endif
|
||||
void
|
||||
padfstring(char *dest, const char *src, int* len)
|
||||
{
|
||||
size_t sofar;
|
||||
|
||||
for (sofar = 0; (sofar < *len) && (*src != '\0'); ++sofar)
|
||||
*dest++ = *src++;
|
||||
|
||||
while (sofar++ < *len)
|
||||
*dest++ = ' ';
|
||||
}
|
||||
|
||||
IPQ_RESULT
|
||||
AccumulateLineF(int *id, char *line)
|
||||
{
|
||||
IPQ_RESULT n;
|
||||
n = ::AccumulateLine(*id, line);
|
||||
return n;
|
||||
}
|
||||
int
|
||||
AddErrorF(int *id, char *error_msg)
|
||||
{
|
||||
int n;
|
||||
n = ::AddError(*id, error_msg);
|
||||
return n;
|
||||
}
|
||||
|
||||
int
|
||||
AddWarningF(int *id, char *warn_msg)
|
||||
{
|
||||
int n;
|
||||
n = ::AddWarning(*id, warn_msg);
|
||||
return n;
|
||||
}
|
||||
|
||||
IPQ_RESULT
|
||||
ClearAccumulatedLinesF(int *id)
|
||||
{
|
||||
return ::ClearAccumulatedLines(*id);
|
||||
}
|
||||
|
||||
int
|
||||
CreateIPhreeqcF(void)
|
||||
{
|
||||
return ::CreateIPhreeqc();
|
||||
}
|
||||
|
||||
int
|
||||
DestroyIPhreeqcF(int *id)
|
||||
{
|
||||
return ::DestroyIPhreeqc(*id);
|
||||
}
|
||||
|
||||
int
|
||||
GetComponentCountF(int *id)
|
||||
{
|
||||
return ::GetComponentCount(*id);
|
||||
}
|
||||
|
||||
void
|
||||
GetComponentF(int *id, int *n, char* comp, int* line_length)
|
||||
{
|
||||
padfstring(comp, ::GetComponent(*id, (*n) - 1), line_length);
|
||||
}
|
||||
|
||||
int
|
||||
GetCurrentSelectedOutputUserNumberF(int *id)
|
||||
{
|
||||
return ::GetCurrentSelectedOutputUserNumber(*id);
|
||||
}
|
||||
|
||||
void
|
||||
GetDumpFileNameF(int *id, char* fname, int* fname_length)
|
||||
{
|
||||
padfstring(fname, ::GetDumpFileName(*id), fname_length);
|
||||
}
|
||||
|
||||
int
|
||||
GetDumpFileOnF(int *id)
|
||||
{
|
||||
return ::GetDumpFileOn(*id);
|
||||
}
|
||||
|
||||
/*
|
||||
GetDumpStringF
|
||||
*/
|
||||
|
||||
int
|
||||
GetDumpStringLineCountF(int *id)
|
||||
{
|
||||
return ::GetDumpStringLineCount(*id);
|
||||
}
|
||||
|
||||
void
|
||||
GetDumpStringLineF(int *id, int* n, char* line, int* line_length)
|
||||
{
|
||||
padfstring(line, ::GetDumpStringLine(*id, (*n) - 1), line_length);
|
||||
}
|
||||
|
||||
int
|
||||
GetDumpStringOnF(int *id)
|
||||
{
|
||||
return ::GetDumpStringOn(*id);
|
||||
}
|
||||
|
||||
void
|
||||
GetErrorFileNameF(int *id, char* fname, int* fname_length)
|
||||
{
|
||||
padfstring(fname, ::GetErrorFileName(*id), fname_length);
|
||||
}
|
||||
|
||||
int
|
||||
GetErrorFileOnF(int *id)
|
||||
{
|
||||
return ::GetErrorFileOn(*id);
|
||||
}
|
||||
|
||||
/*
|
||||
GetErrorStringF
|
||||
*/
|
||||
|
||||
int
|
||||
GetErrorStringLineCountF(int *id)
|
||||
{
|
||||
return ::GetErrorStringLineCount(*id);
|
||||
}
|
||||
|
||||
void
|
||||
GetErrorStringLineF(int *id, int* n, char* line, int* line_length)
|
||||
{
|
||||
padfstring(line, ::GetErrorStringLine(*id, (*n) - 1), line_length);
|
||||
}
|
||||
|
||||
int
|
||||
GetErrorStringOnF(int *id)
|
||||
{
|
||||
return ::GetErrorStringOn(*id);
|
||||
}
|
||||
|
||||
void
|
||||
GetLogFileNameF(int *id, char* fname, int* fname_length)
|
||||
{
|
||||
padfstring(fname, ::GetLogFileName(*id), fname_length);
|
||||
}
|
||||
|
||||
int
|
||||
GetLogFileOnF(int *id)
|
||||
{
|
||||
return ::GetLogFileOn(*id);
|
||||
}
|
||||
|
||||
int
|
||||
GetLogStringLineCountF(int *id)
|
||||
{
|
||||
return ::GetLogStringLineCount(*id);
|
||||
}
|
||||
|
||||
void
|
||||
GetLogStringLineF(int *id, int* n, char* line, int* line_length)
|
||||
{
|
||||
padfstring(line, ::GetLogStringLine(*id, (*n) - 1), line_length);
|
||||
}
|
||||
|
||||
int
|
||||
GetLogStringOnF(int *id)
|
||||
{
|
||||
return ::GetLogStringOn(*id);
|
||||
}
|
||||
|
||||
int
|
||||
GetNthSelectedOutputUserNumberF(int *id, int* n)
|
||||
{
|
||||
return ::GetNthSelectedOutputUserNumber(*id, (*n) - 1);
|
||||
}
|
||||
|
||||
void
|
||||
GetOutputFileNameF(int *id, char* fname, int* fname_length)
|
||||
{
|
||||
padfstring(fname, ::GetOutputFileName(*id), fname_length);
|
||||
}
|
||||
|
||||
int
|
||||
GetOutputStringLineCountF(int *id)
|
||||
{
|
||||
return ::GetOutputStringLineCount(*id);
|
||||
}
|
||||
|
||||
void
|
||||
GetOutputStringLineF(int *id, int* n, char* line, int* line_length)
|
||||
{
|
||||
padfstring(line, ::GetOutputStringLine(*id, (*n) - 1), line_length);
|
||||
}
|
||||
|
||||
int
|
||||
GetOutputStringOnF(int *id)
|
||||
{
|
||||
return ::GetOutputStringOn(*id);
|
||||
}
|
||||
|
||||
int
|
||||
GetOutputFileOnF(int *id)
|
||||
{
|
||||
return ::GetOutputFileOn(*id);
|
||||
}
|
||||
|
||||
int
|
||||
GetSelectedOutputColumnCountF(int *id)
|
||||
{
|
||||
return ::GetSelectedOutputColumnCount(*id);
|
||||
}
|
||||
|
||||
int
|
||||
GetSelectedOutputCountF(int *id)
|
||||
{
|
||||
return ::GetSelectedOutputCount(*id);
|
||||
}
|
||||
|
||||
void
|
||||
GetSelectedOutputFileNameF(int *id, char* fname, int* fname_length)
|
||||
{
|
||||
padfstring(fname, ::GetSelectedOutputFileName(*id), fname_length);
|
||||
}
|
||||
|
||||
int
|
||||
GetSelectedOutputFileOnF(int *id)
|
||||
{
|
||||
return ::GetSelectedOutputFileOn(*id);
|
||||
}
|
||||
|
||||
/*
|
||||
GetSelectedOutputStringF
|
||||
*/
|
||||
|
||||
int
|
||||
GetSelectedOutputStringLineCountF(int *id)
|
||||
{
|
||||
return ::GetSelectedOutputStringLineCount(*id);
|
||||
}
|
||||
|
||||
void
|
||||
GetSelectedOutputStringLineF(int *id, int* n, char* line, int* line_length)
|
||||
{
|
||||
padfstring(line, ::GetSelectedOutputStringLine(*id, (*n) - 1), line_length);
|
||||
}
|
||||
|
||||
int
|
||||
GetSelectedOutputStringOnF(int *id)
|
||||
{
|
||||
return ::GetSelectedOutputStringOn(*id);
|
||||
}
|
||||
|
||||
int
|
||||
GetSelectedOutputRowCountF(int *id)
|
||||
{
|
||||
int rows = ::GetSelectedOutputRowCount(*id);
|
||||
if (rows > 0)
|
||||
{
|
||||
rows -= 1;
|
||||
}
|
||||
return rows;
|
||||
}
|
||||
|
||||
IPQ_RESULT
|
||||
GetSelectedOutputValueF(int *id, int *row, int *col, int *vtype, double* dvalue, char* svalue, int* svalue_length)
|
||||
{
|
||||
IPQ_RESULT result;
|
||||
VAR v;
|
||||
VarInit(&v);
|
||||
char buffer[100];
|
||||
|
||||
int adjcol = *col - 1;
|
||||
result = ::GetSelectedOutputValue(*id, *row, adjcol, &v);
|
||||
|
||||
switch (v.type)
|
||||
{
|
||||
case TT_EMPTY:
|
||||
*vtype = v.type;
|
||||
break;
|
||||
case TT_ERROR:
|
||||
*vtype = v.type;
|
||||
break;
|
||||
case TT_LONG:
|
||||
*vtype = TT_DOUBLE;
|
||||
*dvalue = (double)v.lVal;
|
||||
::sprintf(buffer, "%ld", v.lVal);
|
||||
padfstring(svalue, buffer, svalue_length);
|
||||
break;
|
||||
case TT_DOUBLE:
|
||||
*vtype = v.type;
|
||||
*dvalue = v.dVal;
|
||||
::sprintf(buffer, "%23.15e", v.dVal);
|
||||
padfstring(svalue, buffer, svalue_length);
|
||||
break;
|
||||
case TT_STRING:
|
||||
*vtype = v.type;
|
||||
padfstring(svalue, v.sVal, svalue_length);
|
||||
break;
|
||||
default:
|
||||
assert(0);
|
||||
}
|
||||
::VarClear(&v);
|
||||
return result;
|
||||
}
|
||||
|
||||
void
|
||||
GetVersionStringF(char* version, int* version_length)
|
||||
{
|
||||
padfstring(version, ::GetVersionString(), version_length);
|
||||
}
|
||||
|
||||
/*
|
||||
GetWarningStringF
|
||||
*/
|
||||
|
||||
int
|
||||
GetWarningStringLineCountF(int *id)
|
||||
{
|
||||
return ::GetWarningStringLineCount(*id);
|
||||
}
|
||||
|
||||
void
|
||||
GetWarningStringLineF(int *id, int* n, char* line, int* line_length)
|
||||
{
|
||||
padfstring(line, ::GetWarningStringLine(*id, (*n) - 1), line_length);
|
||||
}
|
||||
|
||||
int
|
||||
LoadDatabaseF(int *id, char* filename)
|
||||
{
|
||||
int n = ::LoadDatabase(*id, filename);
|
||||
return n;
|
||||
}
|
||||
|
||||
int
|
||||
LoadDatabaseStringF(int *id, char* input)
|
||||
{
|
||||
int n = ::LoadDatabaseString(*id, input);
|
||||
return n;
|
||||
}
|
||||
|
||||
void
|
||||
OutputAccumulatedLinesF(int *id)
|
||||
{
|
||||
::OutputAccumulatedLines(*id);
|
||||
}
|
||||
|
||||
void
|
||||
OutputErrorStringF(int *id)
|
||||
{
|
||||
::OutputErrorString(*id);
|
||||
}
|
||||
|
||||
void
|
||||
OutputWarningStringF(int *id)
|
||||
{
|
||||
::OutputWarningString(*id);
|
||||
}
|
||||
|
||||
int
|
||||
RunAccumulatedF(int *id)
|
||||
{
|
||||
return ::RunAccumulated(*id);
|
||||
}
|
||||
|
||||
int
|
||||
RunFileF(int *id, char* filename)
|
||||
{
|
||||
int n = ::RunFile(*id, filename);
|
||||
return n;
|
||||
}
|
||||
|
||||
int
|
||||
RunStringF(int *id, char* input)
|
||||
{
|
||||
int n = ::RunString(*id, input);
|
||||
return n;
|
||||
}
|
||||
|
||||
IPQ_RESULT
|
||||
SetBasicFortranCallbackF(int *id, double (*fcn)(double *x1, double *x2, char *str, size_t l))
|
||||
{
|
||||
return ::SetBasicFortranCallback(*id, fcn);
|
||||
}
|
||||
|
||||
IPQ_RESULT
|
||||
SetCurrentSelectedOutputUserNumberF(int *id, int *n)
|
||||
{
|
||||
return ::SetCurrentSelectedOutputUserNumber(*id, *n);
|
||||
}
|
||||
|
||||
IPQ_RESULT
|
||||
SetDumpFileNameF(int *id, char* fname)
|
||||
{
|
||||
IPQ_RESULT n = ::SetDumpFileName(*id, fname);
|
||||
return n;
|
||||
}
|
||||
|
||||
IPQ_RESULT
|
||||
SetDumpFileOnF(int *id, int* dump_on)
|
||||
{
|
||||
return ::SetDumpFileOn(*id, *dump_on);
|
||||
}
|
||||
|
||||
IPQ_RESULT
|
||||
SetDumpStringOnF(int *id, int* dump_string_on)
|
||||
{
|
||||
return ::SetDumpStringOn(*id, *dump_string_on);
|
||||
}
|
||||
|
||||
IPQ_RESULT
|
||||
SetErrorFileNameF(int *id, char* fname)
|
||||
{
|
||||
IPQ_RESULT n = ::SetErrorFileName(*id, fname);
|
||||
return n;
|
||||
}
|
||||
|
||||
IPQ_RESULT
|
||||
SetErrorFileOnF(int *id, int* error_file_on)
|
||||
{
|
||||
return ::SetErrorFileOn(*id, *error_file_on);
|
||||
}
|
||||
|
||||
IPQ_RESULT
|
||||
SetErrorStringOnF(int *id, int* error_string_on)
|
||||
{
|
||||
return ::SetErrorStringOn(*id, *error_string_on);
|
||||
}
|
||||
|
||||
IPQ_RESULT
|
||||
SetLogFileNameF(int *id, char* fname)
|
||||
{
|
||||
IPQ_RESULT n = ::SetLogFileName(*id, fname);
|
||||
return n;
|
||||
}
|
||||
|
||||
IPQ_RESULT
|
||||
SetLogFileOnF(int *id, int* log_on)
|
||||
{
|
||||
return ::SetLogFileOn(*id, *log_on);
|
||||
}
|
||||
|
||||
IPQ_RESULT
|
||||
SetLogStringOnF(int *id, int* log_string_on)
|
||||
{
|
||||
return ::SetLogStringOn(*id, *log_string_on);
|
||||
}
|
||||
|
||||
IPQ_RESULT
|
||||
SetOutputFileNameF(int *id, char* fname)
|
||||
{
|
||||
IPQ_RESULT n = ::SetOutputFileName(*id, fname);
|
||||
return n;
|
||||
}
|
||||
|
||||
IPQ_RESULT
|
||||
SetOutputFileOnF(int *id, int* output_on)
|
||||
{
|
||||
return ::SetOutputFileOn(*id, *output_on);
|
||||
}
|
||||
|
||||
IPQ_RESULT
|
||||
SetOutputStringOnF(int *id, int* output_string_on)
|
||||
{
|
||||
return ::SetOutputStringOn(*id, *output_string_on);
|
||||
}
|
||||
|
||||
IPQ_RESULT
|
||||
SetSelectedOutputFileNameF(int *id, char* fname)
|
||||
{
|
||||
IPQ_RESULT n = ::SetSelectedOutputFileName(*id, fname);
|
||||
return n;
|
||||
}
|
||||
|
||||
IPQ_RESULT
|
||||
SetSelectedOutputFileOnF(int *id, int* sel_on)
|
||||
{
|
||||
return ::SetSelectedOutputFileOn(*id, *sel_on);
|
||||
}
|
||||
|
||||
IPQ_RESULT
|
||||
SetSelectedOutputStringOnF(int *id, int* selected_output_string_on)
|
||||
{
|
||||
return ::SetSelectedOutputStringOn(*id, *selected_output_string_on);
|
||||
}
|
||||
#endif
|
||||
157
src/IPhreeqc_interface_F.h
Normal file
157
src/IPhreeqc_interface_F.h
Normal file
@ -0,0 +1,157 @@
|
||||
#ifndef __IPHREEQC_INTERFACE__H
|
||||
#define __IPHREEQC_INTERFACE__H
|
||||
|
||||
#if defined(_WINDLL)
|
||||
#define IPQ_DLL_EXPORT __declspec(dllexport)
|
||||
#else
|
||||
#define IPQ_DLL_EXPORT
|
||||
#endif
|
||||
|
||||
#if defined(FC_FUNC)
|
||||
#define AccumulateLineF FC_FUNC (accumulatelinef, ACCUMULATELINEF)
|
||||
#define AddErrorF FC_FUNC (adderrorf, ADDERRORF)
|
||||
#define AddWarningF FC_FUNC (addwarningf, ADDWARNINGF)
|
||||
#define ClearAccumulatedLinesF FC_FUNC (clearaccumulatedlinesf, CLEARACCUMULATEDLINESF)
|
||||
#define CreateIPhreeqcF FC_FUNC (createiphreeqcf, CREATEIPHREEQCF)
|
||||
#define DestroyIPhreeqcF FC_FUNC (destroyiphreeqcf, DESTROYIPHREEQCF)
|
||||
#define GetComponentF FC_FUNC (getcomponentf, GETCOMPONENTF)
|
||||
#define GetComponentCountF FC_FUNC (getcomponentcountf, GETCOMPONENTCOUNTF)
|
||||
#define GetCurrentSelectedOutputUserNumberF FC_FUNC (getcurrentselectedoutputusernumberf, GETCURRENTSELECTEDOUTPUTUSERNUMBERF)
|
||||
#define GetDumpFileNameF FC_FUNC (getdumpfilenamef, GETDUMPFILENAMEF)
|
||||
#define GetDumpFileOnF FC_FUNC (getdumpfileonf, GETDUMPFILEONF)
|
||||
#define GetDumpStringLineF FC_FUNC (getdumpstringlinef, GETDUMPSTRINGLINEF)
|
||||
#define GetDumpStringLineCountF FC_FUNC (getdumpstringlinecountf, GETDUMPSTRINGLINECOUNTF)
|
||||
#define GetDumpStringOnF FC_FUNC (getdumpstringonf, GETDUMPSTRINGONF)
|
||||
#define GetErrorFileNameF FC_FUNC (geterrorfilenamef, GETERRORFILENAMEF)
|
||||
#define GetErrorFileOnF FC_FUNC (geterrorfileonf, GETERRORFILEONF)
|
||||
#define GetErrorStringLineF FC_FUNC (geterrorstringlinef, GETERRORSTRINGLINEF)
|
||||
#define GetErrorStringLineCountF FC_FUNC (geterrorstringlinecountf, GETERRORSTRINGLINECOUNTF)
|
||||
#define GetErrorStringOnF FC_FUNC (geterrorstringonf, GETERRORSTRINGONF)
|
||||
#define GetLogFileNameF FC_FUNC (getlogfilenamef, GETLOGFILENAMEF)
|
||||
#define GetLogFileOnF FC_FUNC (getlogfileonf, GETLOGFILEONF)
|
||||
#define GetLogStringLineF FC_FUNC (getlogstringlinef, GETLOGSTRINGLINEF)
|
||||
#define GetLogStringLineCountF FC_FUNC (getlogstringlinecountf, GETLOGSTRINGLINECOUNTF)
|
||||
#define GetLogStringOnF FC_FUNC (getlogstringonf, GETLOGSTRINGONF)
|
||||
#define GetNthSelectedOutputUserNumberF FC_FUNC (getnthselectedoutputusernumberf, GETNTHSELECTEDOUTPUTUSERNUMBERF)
|
||||
#define GetOutputFileNameF FC_FUNC (getoutputfilenamef, GETOUTPUTFILENAMEF)
|
||||
#define GetOutputFileOnF FC_FUNC (getoutputfileonf, GETOUTPUTFILEONF)
|
||||
#define GetOutputStringLineF FC_FUNC (getoutputstringlinef, GETOUTPUTSTRINGLINEF)
|
||||
#define GetOutputStringLineCountF FC_FUNC (getoutputstringlinecountf, GETOUTPUTSTRINGLINECOUNTF)
|
||||
#define GetOutputStringOnF FC_FUNC (getoutputstringonf, GETOUTPUTSTRINGONF)
|
||||
#define GetSelectedOutputColumnCountF FC_FUNC (getselectedoutputcolumncountf, GETSELECTEDOUTPUTCOLUMNCOUNTF)
|
||||
#define GetSelectedOutputCountF FC_FUNC (getselectedoutputcountf, GETSELECTEDOUTPUTCOUNTF)
|
||||
#define GetSelectedOutputFileNameF FC_FUNC (getselectedoutputfilenamef, GETSELECTEDOUTPUTFILENAMEF)
|
||||
#define GetSelectedOutputFileOnF FC_FUNC (getselectedoutputfileonf, GETSELECTEDOUTPUTFILEONF)
|
||||
#define GetSelectedOutputRowCountF FC_FUNC (getselectedoutputrowcountf, GETSELECTEDOUTPUTROWCOUNTF)
|
||||
#define GetSelectedOutputStringLineF FC_FUNC (getselectedoutputstringlinef, GETSELECTEDOUTPUTSTRINGLINEF)
|
||||
#define GetSelectedOutputStringLineCountF FC_FUNC (getselectedoutputstringlinecountf, GETSELECTEDOUTPUTSTRINGLINECOUNTF)
|
||||
#define GetSelectedOutputStringOnF FC_FUNC (getselectedoutputstringonf, GETSELECTEDOUTPUTSTRINGONF)
|
||||
#define GetSelectedOutputValueF FC_FUNC (getselectedoutputvaluef, GETSELECTEDOUTPUTVALUEF)
|
||||
#define GetVersionStringF FC_FUNC (getversionstringf, GETVERSIONSTRINGF)
|
||||
#define GetWarningStringLineF FC_FUNC (getwarningstringlinef, GETWARNINGSTRINGLINEF)
|
||||
#define GetWarningStringLineCountF FC_FUNC (getwarningstringlinecountf, GETWARNINGSTRINGLINECOUNTF)
|
||||
#define LoadDatabaseF FC_FUNC (loaddatabasef, LOADDATABASEF)
|
||||
#define LoadDatabaseStringF FC_FUNC (loaddatabasestringf, LOADDATABASESTRINGF)
|
||||
#define OutputAccumulatedLinesF FC_FUNC (outputaccumulatedlinesf, OUTPUTACCUMULATEDLINESF)
|
||||
#define OutputErrorStringF FC_FUNC (outputerrorstringf, OUTPUTERRORSTRINGF)
|
||||
#define OutputWarningStringF FC_FUNC (outputwarningstringf, OUTPUTWARNINGSTRINGF)
|
||||
#define RunAccumulatedF FC_FUNC (runaccumulatedf, RUNACCUMULATEDF)
|
||||
#define RunFileF FC_FUNC (runfilef, RUNFILEF)
|
||||
#define RunStringF FC_FUNC (runstringf, RUNSTRINGF)
|
||||
#define SetBasicFortranCallbackF FC_FUNC (setbasicfortrancallbackf, SETFOTRANBASICCALLBACKF)
|
||||
#define SetCurrentSelectedOutputUserNumberF FC_FUNC (setcurrentselectedoutputusernumberf, SETCURRENTSELECTEDOUTPUTUSERNUMBERF)
|
||||
#define SetDumpFileNameF FC_FUNC (setdumpfilenamef, SETDUMPFILENAMEF)
|
||||
#define SetDumpFileOnF FC_FUNC (setdumpfileonf, SETDUMPFILEONF)
|
||||
#define SetDumpStringOnF FC_FUNC (setdumpstringonf, SETDUMPSTRINGONF)
|
||||
#define SetErrorFileNameF FC_FUNC (seterrorfilenamef, SETERRORFILENAMEF)
|
||||
#define SetErrorFileOnF FC_FUNC (seterrorfileonf, SETERRORFILEONF)
|
||||
#define SetErrorStringOnF FC_FUNC (seterrorstringonf, SETERRORSTRINGONF)
|
||||
#define SetLogFileNameF FC_FUNC (setlogfilenamef, SETLOGFILENAMEF)
|
||||
#define SetLogFileOnF FC_FUNC (setlogfileonf, SETLOGFILEONF)
|
||||
#define SetLogStringOnF FC_FUNC (setlogstringonf, SETLOGSTRINGONF)
|
||||
#define SetOutputFileNameF FC_FUNC (setoutputfilenamef, SETOUTPUTFILENAMEF)
|
||||
#define SetOutputFileOnF FC_FUNC (setoutputfileonf, SETOUTPUTFILEONF)
|
||||
#define SetOutputStringOnF FC_FUNC (setoutputstringonf, SETOUTPUTSTRINGONF)
|
||||
#define SetSelectedOutputFileNameF FC_FUNC (setselectedoutputfilenamef, SETSELECTEDOUTPUTFILENAMEF)
|
||||
#define SetSelectedOutputFileOnF FC_FUNC (setselectedoutputfileonf, SETSELECTEDOUTPUTFILEONF)
|
||||
#define SetSelectedOutputStringOnF FC_FUNC (setselectedoutputstringonf, SETSELECTEDOUTPUTSTRINGONF)
|
||||
#endif /* FC_FUNC */
|
||||
|
||||
#if defined(__cplusplus)
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
IPQ_RESULT AccumulateLineF(int *id, char *line);
|
||||
int AddErrorF(int *id, char *error_msg);
|
||||
int AddWarningF(int *id, char *warn_msg);
|
||||
IPQ_RESULT ClearAccumulatedLinesF(int *id);
|
||||
int CreateIPhreeqcF(void);
|
||||
int DestroyIPhreeqcF(int *id);
|
||||
void GetComponentF(int *id, int* n, char* line, int* line_length);
|
||||
int GetComponentCountF(int *id);
|
||||
int GetCurrentSelectedOutputUserNumberF(int *id);
|
||||
void GetDumpFileNameF(int *id, char* filename, int* filename_length);
|
||||
int GetDumpFileOnF(int *id);
|
||||
void GetDumpStringLineF(int *id, int* n, char* line, int* line_length);
|
||||
int GetDumpStringLineCountF(int *id);
|
||||
int GetDumpStringOnF(int *id);
|
||||
void GetErrorFileNameF(int *id, char* filename, int* filename_length);
|
||||
int GetErrorFileOnF(int *id);
|
||||
void GetErrorStringLineF(int *id, int* n, char* line, int* line_length);
|
||||
int GetErrorStringLineCountF(int *id);
|
||||
int GetErrorStringOnF(int *id);
|
||||
void GetLogFileNameF(int *id, char* filename, int* filename_length);
|
||||
int GetLogFileOnF(int *id);
|
||||
void GetLogStringLineF(int *id, int* n, char* line, int* line_length);
|
||||
int GetLogStringLineCountF(int *id);
|
||||
int GetLogStringOnF(int *id);
|
||||
int GetNthSelectedOutputUserNumberF(int *id, int* n);
|
||||
void GetOutputFileNameF(int *id, char* filename, int* filename_length);
|
||||
int GetOutputFileOnF(int *id);
|
||||
void GetOutputStringLineF(int *id, int* n, char* line, int* line_length);
|
||||
int GetOutputStringLineCountF(int *id);
|
||||
int GetOutputStringOnF(int *id);
|
||||
int GetSelectedOutputColumnCountF(int *id);
|
||||
int GetSelectedOutputCountF(int *id);
|
||||
void GetSelectedOutputFileNameF(int *id, char* filename, int* filename_length);
|
||||
int GetSelectedOutputFileOnF(int *id);
|
||||
int GetSelectedOutputRowCountF(int *id);
|
||||
void GetSelectedOutputStringLineF(int *id, int* n, char* line, int* line_length);
|
||||
int GetSelectedOutputStringLineCountF(int *id);
|
||||
int GetSelectedOutputStringOnF(int *id);
|
||||
IPQ_RESULT GetSelectedOutputValueF(int *id, int *row, int *col, int *vtype, double* dvalue, char* svalue, int* svalue_length);
|
||||
void GetVersionStringF(char* version, int* version_length);
|
||||
void GetWarningStringLineF(int *id, int* n, char* line, int* line_length);
|
||||
int GetWarningStringLineCountF(int *id);
|
||||
int LoadDatabaseF(int *id, char* filename);
|
||||
int LoadDatabaseStringF(int *id, char* input);
|
||||
void OutputAccumulatedLinesF(int *id);
|
||||
void OutputErrorStringF(int *id);
|
||||
void OutputWarningStringF(int *id);
|
||||
int RunAccumulatedF(int *id);
|
||||
int RunFileF(int *id, char* filename);
|
||||
int RunStringF(int *id, char* input);
|
||||
IPQ_RESULT SetBasicFortranCallbackF(int *id, double (*fcn)(double *x1, double *x2, char *str, size_t l));
|
||||
IPQ_RESULT SetCurrentSelectedOutputUserNumberF(int *id, int *n);
|
||||
IPQ_RESULT SetDumpFileNameF(int *id, char* fname);
|
||||
IPQ_RESULT SetDumpFileOnF(int *id, int* dump_on);
|
||||
IPQ_RESULT SetDumpStringOnF(int *id, int* dump_string_on);
|
||||
IPQ_RESULT SetErrorFileNameF(int *id, char* fname);
|
||||
IPQ_RESULT SetErrorFileOnF(int *id, int* error_file_on);
|
||||
IPQ_RESULT SetErrorStringOnF(int *id, int* error_string_on);
|
||||
IPQ_RESULT SetLogFileNameF(int *id, char* fname);
|
||||
IPQ_RESULT SetLogFileOnF(int *id, int* log_file_on);
|
||||
IPQ_RESULT SetLogStringOnF(int *id, int* log_string_on);
|
||||
IPQ_RESULT SetOutputFileNameF(int *id, char* fname);
|
||||
IPQ_RESULT SetOutputFileOnF(int *id, int* output_on);
|
||||
IPQ_RESULT SetOutputStringOnF(int *id, int* output_string_on);
|
||||
IPQ_RESULT SetSelectedOutputFileNameF(int *id, char* fname);
|
||||
IPQ_RESULT SetSelectedOutputFileOnF(int *id, int* selected_output_file_on);
|
||||
IPQ_RESULT SetSelectedOutputStringOnF(int *id, int* selected_output_string_on);
|
||||
|
||||
|
||||
#if defined(__cplusplus)
|
||||
}
|
||||
#endif
|
||||
void padfstring(char *dest, const char *src, unsigned int len);
|
||||
#endif /* __IPHREEQC_INTERFACE__H */
|
||||
@ -1,3 +1,5 @@
|
||||
|
||||
#ifndef IPHREEQC_MODULE
|
||||
#include <ctype.h> /* isgraph */
|
||||
#include <stdlib.h> /* malloc */
|
||||
#include <memory.h> /* memcpy */
|
||||
@ -629,3 +631,4 @@ SetSelectedOutputStringOnF(int *id, int* selected_output_string_on)
|
||||
{
|
||||
return ::SetSelectedOutputStringOn(*id, *selected_output_string_on);
|
||||
}
|
||||
#endif
|
||||
@ -1,3 +1,4 @@
|
||||
#ifndef IPHREEQC_MODULE
|
||||
#ifndef __FWRAP__H
|
||||
#define __FWRAP__H
|
||||
|
||||
@ -155,3 +156,4 @@ extern "C" {
|
||||
#endif
|
||||
void padfstring(char *dest, const char *src, unsigned int len);
|
||||
#endif /* __FWRAP__H */
|
||||
#endif
|
||||
@ -1,3 +1,4 @@
|
||||
#ifndef IPHREEQC_MODULE
|
||||
#include "IPhreeqc.h"
|
||||
#include "fwrap.h"
|
||||
|
||||
@ -19,4 +20,5 @@ extern "C" {
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif
|
||||
#endif
|
||||
@ -1,3 +1,4 @@
|
||||
#ifndef IPHREEQC_MODULE
|
||||
#include "IPhreeqc.h"
|
||||
#include "fwrap.h"
|
||||
|
||||
@ -20,3 +21,4 @@ extern "C" {
|
||||
#endif
|
||||
|
||||
#endif
|
||||
#endif
|
||||
|
||||
@ -1,3 +1,4 @@
|
||||
#ifndef IPHREEQC_MODULE
|
||||
#include "IPhreeqc.h"
|
||||
#include "fwrap.h"
|
||||
|
||||
@ -20,3 +21,4 @@ extern "C" {
|
||||
#endif
|
||||
|
||||
#endif
|
||||
#endif
|
||||
@ -1,3 +1,4 @@
|
||||
#ifndef IPHREEQC_MODULE
|
||||
#include "IPhreeqc.h"
|
||||
#include "fwrap.h"
|
||||
|
||||
@ -20,3 +21,4 @@ extern "C" {
|
||||
#endif
|
||||
|
||||
#endif
|
||||
#endif
|
||||
@ -1,3 +1,4 @@
|
||||
#ifndef IPHREEQC_MODULE
|
||||
#include "IPhreeqc.h"
|
||||
#include "fwrap.h"
|
||||
|
||||
@ -20,4 +21,5 @@ extern "C" {
|
||||
#endif
|
||||
|
||||
#endif // _WIN32
|
||||
#endif
|
||||
|
||||
|
||||
@ -1,3 +1,4 @@
|
||||
#ifndef IPHREEQC_MODULE
|
||||
#include "IPhreeqc.h"
|
||||
#include "fwrap.h"
|
||||
|
||||
@ -20,4 +21,5 @@ extern "C" {
|
||||
#endif
|
||||
|
||||
#endif // _WIN32
|
||||
#endif
|
||||
|
||||
|
||||
@ -1,3 +1,4 @@
|
||||
#ifndef IPHREEQC_MODULE
|
||||
#include "IPhreeqc.h"
|
||||
#include "fwrap.h"
|
||||
|
||||
@ -20,4 +21,4 @@ extern "C" {
|
||||
#endif
|
||||
|
||||
#endif // _WIN32
|
||||
|
||||
#endif
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user