mirror of
https://git.gfz-potsdam.de/naaice/iphreeqc.git
synced 2025-12-16 08:38:23 +01:00
updated for linux
git-svn-id: svn://136.177.114.72/svn_GW/IPhreeqc/branches/class@4210 1feff8c3-07ed-0310-ac33-dd36852eb9cd
This commit is contained in:
parent
724085012c
commit
68534b0934
@ -1,13 +1,11 @@
|
||||
#include "IPhreeqc2.h"
|
||||
#include "Phreeqc.h" // Phreeqc
|
||||
|
||||
// COMMENT: {3/25/2010 7:28:15 PM}#define protected public
|
||||
#include "Phreeqc.h" /* Phreeqc */
|
||||
// COMMENT: {3/25/2010 7:28:18 PM}#undef protected
|
||||
|
||||
#include <cassert>
|
||||
#include "ErrorReporter.hxx"
|
||||
#include "SelectedOutput.hxx"
|
||||
#include "dumper.h"
|
||||
#include <cassert> // assert
|
||||
#include <memory> // auto_ptr
|
||||
#include "ErrorReporter.hxx" // CErrorReporter
|
||||
#include "SelectedOutput.hxx" // CSelectedOutput
|
||||
#include "dumper.h" // dumper
|
||||
|
||||
int istream_getc(void *cookie);
|
||||
|
||||
@ -22,16 +20,16 @@ const char LOG_FILENAME[] = "phreeqc.log";
|
||||
const char PUNCH_FILENAME[] = "selected.out";
|
||||
|
||||
IPhreeqc2::IPhreeqc2(void)
|
||||
: ErrorReporter(0)
|
||||
, WarningReporter(0)
|
||||
, SelectedOutput(0)
|
||||
, DatabaseLoaded(false)
|
||||
: DatabaseLoaded(false)
|
||||
, SelectedOutputOn(false)
|
||||
, OutputOn(false)
|
||||
, LogOn(false)
|
||||
, ErrorOn(false)
|
||||
, DumpOn(false)
|
||||
, DumpStringOn(false)
|
||||
, ErrorReporter(0)
|
||||
, WarningReporter(0)
|
||||
, SelectedOutput(0)
|
||||
, PhreeqcPtr(0)
|
||||
{
|
||||
this->ErrorReporter = new CErrorReporter<std::ostringstream>;
|
||||
|
||||
@ -51,16 +51,16 @@
|
||||
AccumulateLine = AccumulateLineF(LINE)
|
||||
END FUNCTION AccumulateLine
|
||||
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
|
||||
FUNCTION Run(OUTPUT_ON, ERROR_ON, LOG_ON, SELECTED_ON)
|
||||
FUNCTION RunAccumulated(OUTPUT_ON, ERROR_ON, LOG_ON, SELECTED_ON)
|
||||
IMPLICIT NONE
|
||||
LOGICAL :: OUTPUT_ON
|
||||
LOGICAL :: ERROR_ON
|
||||
LOGICAL :: LOG_ON
|
||||
LOGICAL :: SELECTED_ON
|
||||
INTEGER :: Run
|
||||
INTEGER :: RunAccumulated
|
||||
#if defined(_WIN32)
|
||||
INTERFACE
|
||||
FUNCTION RunF(OUTPUT_ON, ERROR_ON, LOG_ON, SELECTED_ON)
|
||||
FUNCTION RunAccumulatedF(OUTPUT_ON, ERROR_ON, LOG_ON, SELECTED_ON)
|
||||
!DEC$ ATTRIBUTES C,REFERENCE::RunF
|
||||
!DEC$ ATTRIBUTES ALIAS:'_RunF'::RunF
|
||||
LOGICAL(KIND=4) :: OUTPUT_ON
|
||||
@ -68,13 +68,14 @@
|
||||
LOGICAL(KIND=4) :: LOG_ON
|
||||
LOGICAL(KIND=4) :: SELECTED_ON
|
||||
INTEGER(KIND=4) :: RunF
|
||||
END FUNCTION RunF
|
||||
END FUNCTION RunAccumulatedF
|
||||
END INTERFACE
|
||||
#else
|
||||
INTEGER :: RunF
|
||||
INTEGER :: RunAccumulatedF
|
||||
#endif
|
||||
Run = RunF(OUTPUT_ON, ERROR_ON, LOG_ON, SELECTED_ON)
|
||||
END FUNCTION Run
|
||||
RunAccumulated = RunAccumulatedF(OUTPUT_ON, ERROR_ON,
|
||||
& LOG_ON, SELECTED_ON)
|
||||
END FUNCTION RunAccumulated
|
||||
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
|
||||
FUNCTION RunFile(FILENAME,OUTPUT_ON,ERROR_ON,LOG_ON,SELECTED_ON)
|
||||
IMPLICIT NONE
|
||||
@ -161,7 +162,6 @@
|
||||
REAL*8 :: DVALUE
|
||||
CHARACTER(LEN=*) :: SVALUE
|
||||
INTEGER :: GetSelectedOutputValue
|
||||
INTEGER :: adjcol
|
||||
#if defined(_WIN32)
|
||||
INTERFACE
|
||||
FUNCTION Get(ROW,COL,VTYPE,DVALUE,SVALUE)
|
||||
@ -179,9 +179,8 @@
|
||||
GetSelectedOutputValue = Get(ROW,adjcol,VTYPE,DVALUE,SVALUE)
|
||||
#else
|
||||
INTEGER :: GetSelectedOutputValueF
|
||||
adjcol = col - 1
|
||||
GetSelectedOutputValue = GetSelectedOutputValueF(ROW,
|
||||
& adjcol,VTYPE,DVALUE,SVALUE)
|
||||
& COL,VTYPE,DVALUE,SVALUE)
|
||||
#endif
|
||||
END FUNCTION GetSelectedOutputValue
|
||||
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
|
||||
|
||||
@ -2,6 +2,7 @@
|
||||
#include <stdlib.h> /* malloc */
|
||||
#include <memory.h> /* memcpy */
|
||||
#include <assert.h> /* assert */
|
||||
#include <stdio.h> /* sprintf */
|
||||
#include "phrqtype.h"
|
||||
#include "IPhreeqc.h"
|
||||
|
||||
@ -257,7 +258,7 @@ GetSelectedOutputValueF(int *row, int *col, int *vtype, double* dvalue, char* sv
|
||||
case TT_LONG:
|
||||
*vtype = TT_DOUBLE;
|
||||
*dvalue = (double)v.lVal;
|
||||
::sprintf(buffer, "%d", v.lVal);
|
||||
::sprintf(buffer, "%ld", v.lVal);
|
||||
padfstring(svalue, buffer, svalue_length);
|
||||
break;
|
||||
case TT_DOUBLE:
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user