Chomp variable names using the power of XMacros - currently windows only

Removed almost 1000 lines of code!

Signed-off-by: Ian Bell <ian.h.bell@gmail.com>
This commit is contained in:
Ian Bell
2014-12-10 11:50:00 -05:00
parent e7afcdbe7b
commit 33d420b942
2 changed files with 165 additions and 819 deletions

View File

@@ -57,8 +57,6 @@ surface tension N/m
#include <cassert>
#include "crossplatform_shared_ptr.h"
#if defined(_MSC_VER)
#define _CRTDBG_MAP_ALLOC
#define _CRT_SECURE_NO_WARNINGS
@@ -114,116 +112,18 @@ std::string endings[number_of_endings] = {"", ".FLD", ".fld", ".PPF", ".ppf"};
static char rel_path_HMC_BNC[] = "HMX.BNC";
static char default_reference_state[] = "DEF";
// Define functions as pointers and initialise them to NULL
// Declare the functions for direct access
RPVersion_POINTER RPVersion;
SETPATHdll_POINTER SETPATHdll;
ABFL1dll_POINTER ABFL1dll;
ABFL2dll_POINTER ABFL2dll;
ACTVYdll_POINTER ACTVYdll;
AGdll_POINTER AGdll;
CCRITdll_POINTER CCRITdll;
CP0dll_POINTER CP0dll;
CRITPdll_POINTER CRITPdll;
CSATKdll_POINTER CSATKdll;
CV2PKdll_POINTER CV2PKdll;
CVCPKdll_POINTER CVCPKdll;
CVCPdll_POINTER CVCPdll;
DBDTdll_POINTER DBDTdll;
DBFL1dll_POINTER DBFL1dll;
DBFL2dll_POINTER DBFL2dll;
DDDPdll_POINTER DDDPdll;
DDDTdll_POINTER DDDTdll;
DEFLSHdll_POINTER DEFLSHdll;
DHD1dll_POINTER DHD1dll;
DHFLSHdll_POINTER DHFLSHdll;
DHFL1dll_POINTER DHFL1dll;
DHFL2dll_POINTER DHFL2dll;
DIELECdll_POINTER DIELECdll;
DOTFILLdll_POINTER DOTFILLdll;
DPDD2dll_POINTER DPDD2dll;
DPDDKdll_POINTER DPDDKdll;
DPDDdll_POINTER DPDDdll;
DPDTKdll_POINTER DPDTKdll;
DPDTdll_POINTER DPDTdll;
DPTSATKdll_POINTER DPTSATKdll;
DSFLSHdll_POINTER DSFLSHdll;
DSFL1dll_POINTER DSFL1dll;
DSFL2dll_POINTER DSFL2dll;
ENTHALdll_POINTER ENTHALdll;
ENTROdll_POINTER ENTROdll;
ESFLSHdll_POINTER ESFLSHdll;
FGCTYdll_POINTER FGCTYdll;
FPVdll_POINTER FPVdll;
FUGCOFdll_POINTER FUGCOFdll;
GERG04dll_POINTER GERG04dll;
GETFIJdll_POINTER GETFIJdll;
GETKTVdll_POINTER GETKTVdll;
GIBBSdll_POINTER GIBBSdll;
HSFLSHdll_POINTER HSFLSHdll;
INFOdll_POINTER INFOdll;
LIMITKdll_POINTER LIMITKdll;
LIMITSdll_POINTER LIMITSdll;
LIMITXdll_POINTER LIMITXdll;
MELTPdll_POINTER MELTPdll;
MELTTdll_POINTER MELTTdll;
MLTH2Odll_POINTER MLTH2Odll;
NAMEdll_POINTER NAMEdll;
PASSCMNdll_POINTER PASSCMNdll;
PDFL1dll_POINTER PDFL1dll;
PDFLSHdll_POINTER PDFLSHdll;
PEFLSHdll_POINTER PEFLSHdll;
PHFL1dll_POINTER PHFL1dll;
PHFLSHdll_POINTER PHFLSHdll;
PHIXdll_POINTER PHIXdll;
PHI0dll_POINTER PHI0dll;
PQFLSHdll_POINTER PQFLSHdll;
PREOSdll_POINTER PREOSdll;
PRESSdll_POINTER PRESSdll;
PSFL1dll_POINTER PSFL1dll;
PSFLSHdll_POINTER PSFLSHdll;
PUREFLDdll_POINTER PUREFLDdll;
QMASSdll_POINTER QMASSdll;
QMOLEdll_POINTER QMOLEdll;
RESIDUALdll_POINTER RESIDUALdll;
REDXdll_POINTER REDXdll;
RMIX2dll_POINTER RMIX2dll;
SATDdll_POINTER SATDdll;
SATEdll_POINTER SATEdll;
SATHdll_POINTER SATHdll;
SATPdll_POINTER SATPdll;
SATSdll_POINTER SATSdll;
SATTdll_POINTER SATTdll;
SATSPLNdll_POINTER SATSPLNdll;
SETAGAdll_POINTER SETAGAdll;
SETKTVdll_POINTER SETKTVdll;
SETMIXdll_POINTER SETMIXdll;
SETMODdll_POINTER SETMODdll;
SETREFdll_POINTER SETREFdll;
SETUPdll_POINTER SETUPdll;
// SPECGRdll_POINTER SPECGRdll; // not found in library
SUBLPdll_POINTER SUBLPdll;
SUBLTdll_POINTER SUBLTdll;
SURFTdll_POINTER SURFTdll;
SURTENdll_POINTER SURTENdll;
TDFLSHdll_POINTER TDFLSHdll;
TEFLSHdll_POINTER TEFLSHdll;
THERM0dll_POINTER THERM0dll;
THERM2dll_POINTER THERM2dll;
THERM3dll_POINTER THERM3dll;
THERMdll_POINTER THERMdll;
THFLSHdll_POINTER THFLSHdll;
TPFLSHdll_POINTER TPFLSHdll;
TPFL2dll_POINTER TPFL2dll;
TPRHOdll_POINTER TPRHOdll;
TQFLSHdll_POINTER TQFLSHdll;
TRNPRPdll_POINTER TRNPRPdll;
TSFLSHdll_POINTER TSFLSHdll;
VIRBdll_POINTER VIRBdll;
VIRCdll_POINTER VIRCdll;
WMOLdll_POINTER WMOLdll;
XMASSdll_POINTER XMASSdll;
XMOLEdll_POINTER XMOLEdll;
/* Define functions as pointers and initialise them to NULL
* Declare the functions for direct access
*
* Example: SETPATHdll_POINTER SETPATHdll;
*
* ***MAGIC WARNING**!! X Macros in use
* See http://stackoverflow.com/a/148610
* See http://stackoverflow.com/questions/147267/easy-way-to-use-variables-of-enum-types-as-string-in-c#202511
*/
#define X(name) name ## _POINTER name;
LIST_OF_REFPROP_FUNCTION_NAMES
#undef X
void *getFunctionPointer(const char * name)
{
@@ -239,10 +139,6 @@ void *getFunctionPointer(const char * name)
#endif
}
//#include <dlfcn.h>
//void *RefpropdllInstance=NULL;
//char refpropPath[] = "/opt/refprop";
//Moved pointer handling to a function, helps to maintain
//an overview and structures OS dependent parts
double setFunctionPointers()
@@ -252,109 +148,18 @@ double setFunctionPointers()
printf("REFPROP is not loaded, make sure you call this function after loading the library.\n");
return -_HUGE;
}
// set the pointers, platform independent
RPVersion = (RPVersion_POINTER) getFunctionPointer(STRINGIFY(RPVersion));
ABFL1dll = (ABFL1dll_POINTER) getFunctionPointer(STRINGIFY(ABFL1dll));
ABFL2dll = (ABFL2dll_POINTER) getFunctionPointer(STRINGIFY(ABFL2dll));
ACTVYdll = (ACTVYdll_POINTER) getFunctionPointer(STRINGIFY(ACTVYdll));
AGdll = (AGdll_POINTER) getFunctionPointer(STRINGIFY(AGdll));
CCRITdll = (CCRITdll_POINTER) getFunctionPointer(STRINGIFY(CCRITdll));
CP0dll = (CP0dll_POINTER) getFunctionPointer(STRINGIFY(CP0dll));
CRITPdll = (CRITPdll_POINTER) getFunctionPointer(STRINGIFY(CRITPdll));
CSATKdll = (CSATKdll_POINTER) getFunctionPointer(STRINGIFY(CSATKdll));
CV2PKdll = (CV2PKdll_POINTER) getFunctionPointer(STRINGIFY(CV2PKdll));
CVCPKdll = (CVCPKdll_POINTER) getFunctionPointer(STRINGIFY(CVCPKdll));
CVCPdll = (CVCPdll_POINTER) getFunctionPointer(STRINGIFY(CVCPdll));
DBDTdll = (DBDTdll_POINTER) getFunctionPointer(STRINGIFY(DBDTdll));
DBFL1dll = (DBFL1dll_POINTER) getFunctionPointer(STRINGIFY(DBFL1dll));
DBFL2dll = (DBFL2dll_POINTER) getFunctionPointer(STRINGIFY(DBFL2dll));
DDDPdll = (DDDPdll_POINTER) getFunctionPointer(STRINGIFY(DDDPdll));
DDDTdll = (DDDTdll_POINTER) getFunctionPointer(STRINGIFY(DDDTdll));
DEFLSHdll = (DEFLSHdll_POINTER) getFunctionPointer(STRINGIFY(DEFLSHdll));
DHD1dll = (DHD1dll_POINTER) getFunctionPointer(STRINGIFY(DHD1dll));
DHFLSHdll = (DHFLSHdll_POINTER) getFunctionPointer(STRINGIFY(DHFLSHdll));
DIELECdll = (DIELECdll_POINTER) getFunctionPointer(STRINGIFY(DIELECdll));
DOTFILLdll = (DOTFILLdll_POINTER) getFunctionPointer(STRINGIFY(DOTFILLdll));
DPDD2dll = (DPDD2dll_POINTER) getFunctionPointer(STRINGIFY(DPDD2dll));
DPDDKdll = (DPDDKdll_POINTER) getFunctionPointer(STRINGIFY(DPDDKdll));
DPDDdll = (DPDDdll_POINTER) getFunctionPointer(STRINGIFY(DPDDdll));
DPDTKdll = (DPDTKdll_POINTER) getFunctionPointer(STRINGIFY(DPDTKdll));
DPDTdll = (DPDTdll_POINTER) getFunctionPointer(STRINGIFY(DPDTdll));
DPTSATKdll = (DPTSATKdll_POINTER) getFunctionPointer(STRINGIFY(DPTSATKdll));
DSFLSHdll = (DSFLSHdll_POINTER) getFunctionPointer(STRINGIFY(DSFLSHdll));
ENTHALdll = (ENTHALdll_POINTER) getFunctionPointer(STRINGIFY(ENTHALdll));
ENTROdll = (ENTROdll_POINTER) getFunctionPointer(STRINGIFY(ENTROdll));
ESFLSHdll = (ESFLSHdll_POINTER) getFunctionPointer(STRINGIFY(ESFLSHdll));
FGCTYdll = (FGCTYdll_POINTER) getFunctionPointer(STRINGIFY(FGCTYdll));
FPVdll = (FPVdll_POINTER) getFunctionPointer(STRINGIFY(FPVdll));
FUGCOFdll = (FUGCOFdll_POINTER) getFunctionPointer(STRINGIFY(FUGCOFdll));
GERG04dll = (GERG04dll_POINTER) getFunctionPointer(STRINGIFY(GERG04dll));
GETFIJdll = (GETFIJdll_POINTER) getFunctionPointer(STRINGIFY(GETFIJdll));
GETKTVdll = (GETKTVdll_POINTER) getFunctionPointer(STRINGIFY(GETKTVdll));
GIBBSdll = (GIBBSdll_POINTER) getFunctionPointer(STRINGIFY(GIBBSdll));
HSFLSHdll = (HSFLSHdll_POINTER) getFunctionPointer(STRINGIFY(HSFLSHdll));
INFOdll = (INFOdll_POINTER) getFunctionPointer(STRINGIFY(INFOdll));
LIMITKdll = (LIMITKdll_POINTER) getFunctionPointer(STRINGIFY(LIMITKdll));
LIMITSdll = (LIMITSdll_POINTER) getFunctionPointer(STRINGIFY(LIMITSdll));
LIMITXdll = (LIMITXdll_POINTER) getFunctionPointer(STRINGIFY(LIMITXdll));
MELTPdll = (MELTPdll_POINTER) getFunctionPointer(STRINGIFY(MELTPdll));
MELTTdll = (MELTTdll_POINTER) getFunctionPointer(STRINGIFY(MELTTdll));
MLTH2Odll = (MLTH2Odll_POINTER) getFunctionPointer(STRINGIFY(MLTH2Odll));
NAMEdll = (NAMEdll_POINTER) getFunctionPointer(STRINGIFY(NAMEdll));
PASSCMNdll = (PASSCMNdll_POINTER) getFunctionPointer(STRINGIFY(PASSCMNdll));
PDFL1dll = (PDFL1dll_POINTER) getFunctionPointer(STRINGIFY(PDFL1dll));
PDFLSHdll = (PDFLSHdll_POINTER) getFunctionPointer(STRINGIFY(PDFLSHdll));
PEFLSHdll = (PEFLSHdll_POINTER) getFunctionPointer(STRINGIFY(PEFLSHdll));
PHFL1dll = (PHFL1dll_POINTER) getFunctionPointer(STRINGIFY(PHFL1dll));
PHFLSHdll = (PHFLSHdll_POINTER) getFunctionPointer(STRINGIFY(PHFLSHdll));
PHIXdll = (PHIXdll_POINTER) getFunctionPointer(STRINGIFY(PHIXdll));
PHI0dll = (PHI0dll_POINTER) getFunctionPointer(STRINGIFY(PHI0dll));
PQFLSHdll = (PQFLSHdll_POINTER) getFunctionPointer(STRINGIFY(PQFLSHdll));
PREOSdll = (PREOSdll_POINTER) getFunctionPointer(STRINGIFY(PREOSdll));
PRESSdll = (PRESSdll_POINTER) getFunctionPointer(STRINGIFY(PRESSdll));
PSFL1dll = (PSFL1dll_POINTER) getFunctionPointer(STRINGIFY(PSFL1dll));
PSFLSHdll = (PSFLSHdll_POINTER) getFunctionPointer(STRINGIFY(PSFLSHdll));
PUREFLDdll = (PUREFLDdll_POINTER) getFunctionPointer(STRINGIFY(PUREFLDdll));
RESIDUALdll = (RESIDUALdll_POINTER) getFunctionPointer(STRINGIFY(RESIDUALdll));
RMIX2dll = (RMIX2dll_POINTER) getFunctionPointer(STRINGIFY(RMIX2dll));
REDXdll = (REDXdll_POINTER) getFunctionPointer(STRINGIFY(REDXdll));
QMASSdll = (QMASSdll_POINTER) getFunctionPointer(STRINGIFY(QMASSdll));
QMOLEdll = (QMOLEdll_POINTER) getFunctionPointer(STRINGIFY(QMOLEdll));
SATDdll = (SATDdll_POINTER) getFunctionPointer(STRINGIFY(SATDdll));
SATEdll = (SATEdll_POINTER) getFunctionPointer(STRINGIFY(SATEdll));
SATHdll = (SATHdll_POINTER) getFunctionPointer(STRINGIFY(SATHdll));
SATPdll = (SATPdll_POINTER) getFunctionPointer(STRINGIFY(SATPdll));
SATSdll = (SATSdll_POINTER) getFunctionPointer(STRINGIFY(SATSdll));
SATTdll = (SATTdll_POINTER) getFunctionPointer(STRINGIFY(SATTdll));
SATSPLNdll = (SATSPLNdll_POINTER) getFunctionPointer(STRINGIFY(SATSPLNdll));
SETAGAdll = (SETAGAdll_POINTER) getFunctionPointer(STRINGIFY(SETAGAdll));
SETKTVdll = (SETKTVdll_POINTER) getFunctionPointer(STRINGIFY(SETKTVdll));
SETMIXdll = (SETMIXdll_POINTER) getFunctionPointer(STRINGIFY(SETMIXdll));
SETMODdll = (SETMODdll_POINTER) getFunctionPointer(STRINGIFY(SETMODdll));
SETREFdll = (SETREFdll_POINTER) getFunctionPointer(STRINGIFY(SETREFdll));
SETUPdll = (SETUPdll_POINTER) getFunctionPointer(STRINGIFY(SETUPdll));
// SPECGRdll = (SPECGRdll_POINTER) getFunctionPointer(STRINGIFY(SPECGRdll)); // not in library
SUBLPdll = (SUBLPdll_POINTER) getFunctionPointer(STRINGIFY(SUBLPdll));
SUBLTdll = (SUBLTdll_POINTER) getFunctionPointer(STRINGIFY(SUBLTdll));
SURFTdll = (SURFTdll_POINTER) getFunctionPointer(STRINGIFY(SURFTdll));
SURTENdll = (SURTENdll_POINTER) getFunctionPointer(STRINGIFY(SURTENdll));
TDFLSHdll = (TDFLSHdll_POINTER) getFunctionPointer(STRINGIFY(TDFLSHdll));
TEFLSHdll = (TEFLSHdll_POINTER) getFunctionPointer(STRINGIFY(TEFLSHdll));
THERM0dll = (THERM0dll_POINTER) getFunctionPointer(STRINGIFY(THERM0dll));
THERM2dll = (THERM2dll_POINTER) getFunctionPointer(STRINGIFY(THERM2dll));
THERM3dll = (THERM3dll_POINTER) getFunctionPointer(STRINGIFY(THERM3dll));
THERMdll = (THERMdll_POINTER) getFunctionPointer(STRINGIFY(THERMdll));
THFLSHdll = (THFLSHdll_POINTER) getFunctionPointer(STRINGIFY(THFLSHdll));
TPFLSHdll = (TPFLSHdll_POINTER) getFunctionPointer(STRINGIFY(TPFLSHdll));
TPRHOdll = (TPRHOdll_POINTER) getFunctionPointer(STRINGIFY(TPRHOdll));
TQFLSHdll = (TQFLSHdll_POINTER) getFunctionPointer(STRINGIFY(TQFLSHdll));
TRNPRPdll = (TRNPRPdll_POINTER) getFunctionPointer(STRINGIFY(TRNPRPdll));
TSFLSHdll = (TSFLSHdll_POINTER) getFunctionPointer(STRINGIFY(TSFLSHdll));
VIRBdll = (VIRBdll_POINTER) getFunctionPointer(STRINGIFY(VIRBdll));
VIRCdll = (VIRCdll_POINTER) getFunctionPointer(STRINGIFY(VIRCdll));
WMOLdll = (WMOLdll_POINTER) getFunctionPointer(STRINGIFY(WMOLdll));
XMASSdll = (XMASSdll_POINTER) getFunctionPointer(STRINGIFY(XMASSdll));
XMOLEdll = (XMOLEdll_POINTER) getFunctionPointer(STRINGIFY(XMOLEdll));
/* Set the pointers, platform independent
*
* Example: RPVersion = (RPVersion_POINTER) getFunctionPointer(STRINGIFY(RPVersion));
*
* ***MAGIC WARNING**!! X Macros in use
* See http://stackoverflow.com/a/148610
* See http://stackoverflow.com/questions/147267/easy-way-to-use-variables-of-enum-types-as-string-in-c#202511
*/
#define X(name) name = (name ## _POINTER) getFunctionPointer(STRINGIFY(name));
LIST_OF_REFPROP_FUNCTION_NAMES
#undef X
return COOLPROP_OK;
}
@@ -507,18 +312,7 @@ bool REFPROPMixtureBackend::REFPROP_supported () {
// Abort check if Refprop has been loaded.
if (RefpropdllInstance!=NULL) return true;
// This unloading does not make a difference
// // TODO: Remove this automatic unloading as soon as the bugs are fixed
// if (RefpropdllInstance!=NULL) {
// // Unload it on Linux and Mac, no problems on Windows
// #if defined(__ISLINUX__)
// dlclose (RefpropdllInstance);
// RefpropdllInstance = NULL;
// #elif defined(__ISAPPLE__)
// dlclose (RefpropdllInstance);
// RefpropdllInstance = NULL;
// #endif
// }
// Store result of previous check.
if (_REFPROP_supported) {

View File

@@ -2,490 +2,138 @@
#ifndef REFPROP_LIB_H
#define REFPROP_LIB_H
/*
// The idea here is to have a common header for Windows
// and gcc-like systems. The Windows branch should cover the
// functions provided by the .dll and the gcc part covers
// the compiled .so/.dym file. Name changes caused by gfortran
// are respected and should be accounted for.
*/
/* See http://stackoverflow.com/a/148610
* See http://stackoverflow.com/questions/147267/easy-way-to-use-variables-of-enum-types-as-string-in-c#202511
* This will be used to generate function names, pointers, etc. below
*/
#define LIST_OF_REFPROP_FUNCTION_NAMES \
X(RPVersion) \
X(SETPATHdll) \
X(ABFL1dll) \
X(ABFL2dll) \
X(ACTVYdll) \
X(AGdll) \
X(CCRITdll) \
X(CP0dll) \
X(CRITPdll) \
X(CSATKdll) \
X(CV2PKdll) \
X(CVCPKdll) \
X(CVCPdll) \
X(DBDTdll) \
X(DBFL1dll) \
X(DBFL2dll) \
X(DDDPdll) \
X(DDDTdll) \
X(DEFLSHdll) \
X(DHD1dll) \
X(DHFL1dll) \
X(DHFL2dll) \
X(DHFLSHdll) \
X(DIELECdll) \
X(DOTFILLdll) \
X(DPDD2dll) \
X(DPDDKdll) \
X(DPDDdll) \
X(DPDTKdll) \
X(DPDTdll) \
X(DPTSATKdll) \
X(DSFLSHdll) \
X(DSFL1dll) \
X(DSFL2dll) \
X(ENTHALdll) \
X(ENTROdll) \
X(ESFLSHdll) \
X(FGCTYdll) \
X(FUGCOFdll) \
X(FPVdll) \
X(GERG04dll) \
X(GETFIJdll) \
X(GETKTVdll) \
X(GIBBSdll) \
X(HSFLSHdll) \
X(INFOdll) \
X(LIMITKdll) \
X(LIMITSdll) \
X(LIMITXdll) \
X(MELTPdll) \
X(MELTTdll) \
X(MLTH2Odll) \
X(NAMEdll) \
X(PASSCMN) \
X(PDFL1dll) \
X(PDFLSHdll) \
X(PEFLSHdll) \
X(PHFL1dll) \
X(PHFLSHdll) \
X(PHIXdll) \
X(PHI0dll) \
X(PQFLSHdll) \
X(PREOSdll) \
X(PRESSdll) \
X(PSFL1dll) \
X(PSFLSHdll) \
X(PUREFLDdll) \
X(QMASSdll) \
X(QMOLEdll) \
X(RESIDUALdll) \
X(REDXdll) \
X(RMIX2dll) \
X(SATDdll) \
X(SATEdll) \
X(SATHdll) \
X(SATPdll) \
X(SATSdll) \
X(SATTdll) \
X(SATSPLNdll) \
X(SETAGAdll) \
X(SETKTVdll) \
X(SETMIXdll) \
X(SETMODdll) \
X(SETREFdll) \
X(SETUPdll) \
X(SPECGRdll) \
X(SUBLPdll) \
X(SUBLTdll) \
X(SURFTdll) \
X(SURTENdll) \
X(TDFLSHdll) \
X(TEFLSHdll) \
X(THERM0dll) \
X(THERM2dll) \
X(THERM3dll) \
X(THERMdll) \
X(THFLSHdll) \
X(TPFLSHdll) \
X(TPFL2dll) \
X(TPRHOdll) \
X(TQFLSHdll) \
X(TRNPRPdll) \
X(TSFLSHdll) \
X(VIRBdll) \
X(VIRCdll) \
X(WMOLdll) \
X(XMASSdll) \
X(XMOLEdll)
// Get the platform identifiers
#include "CoolPropTools.h"
// Do some manual changes to the function names
// if needed, uses CoolProp platform detection.
// Define compiler specific calling conventions
// for the shared library.
#if defined(__ISWINDOWS__)
// Define compiler specific calling conventions
// for the shared library.
# define CALLCONV __stdcall // __declspec(dllexport)
// Do not redefine function names for the shared library,
// in this case it is the REFPROP.dll and no special
// names are needed. Macros still need a value for the
// name function used below.
# define RPVersion RPVersion
# define SETPATHdll SETPATHdll
# define ABFL1dll ABFL1dll
# define ABFL2dll ABFL2dll
# define ACTVYdll ACTVYdll
# define AGdll AGdll
# define CCRITdll CCRITdll
# define CP0dll CP0dll
# define CRITPdll CRITPdll
# define CSATKdll CSATKdll
# define CV2PKdll CV2PKdll
# define CVCPKdll CVCPKdll
# define CVCPdll CVCPdll
# define DBDTdll DBDTdll
# define DBFL1dll DBFL1dll
# define DBFL2dll DBFL2dll
# define DDDPdll DDDPdll
# define DDDTdll DDDTdll
# define DEFLSHdll DEFLSHdll
# define DHD1dll DHD1dll
# define DHFL1dll DHFL1dll
# define DHFL2dll DHFL2dll
# define DHFLSHdll DHFLSHdll
# define DIELECdll DIELECdll
# define DOTFILLdll DOTFILLdll
# define DPDD2dll DPDD2dll
# define DPDDKdll DPDDKdll
# define DPDDdll DPDDdll
# define DPDTKdll DPDTKdll
# define DPDTdll DPDTdll
# define DPTSATKdll DPTSATKdll
# define DSFLSHdll DSFLSHdll
# define DSFL1dll DSFL1dll
# define DSFL2dll DSFL2dll
# define ENTHALdll ENTHALdll
# define ENTROdll ENTROdll
# define ESFLSHdll ESFLSHdll
# define FGCTYdll FGCTYdll
# define FUGCOFdll FUGCOFdll
# define FPVdll FPVdll
# define GERG04dll GERG04dll
# define GETFIJdll GETFIJdll
# define GETKTVdll GETKTVdll
# define GIBBSdll GIBBSdll
# define HSFLSHdll HSFLSHdll
# define INFOdll INFOdll
# define LIMITKdll LIMITKdll
# define LIMITSdll LIMITSdll
# define LIMITXdll LIMITXdll
# define MELTPdll MELTPdll
# define MELTTdll MELTTdll
# define MLTH2Odll MLTH2Odll
# define NAMEdll NAMEdll
# define PASSCMNdll PASSCMN
# define PDFL1dll PDFL1dll
# define PDFLSHdll PDFLSHdll
# define PEFLSHdll PEFLSHdll
# define PHFL1dll PHFL1dll
# define PHFLSHdll PHFLSHdll
# define PHIXdll PHIXdll
# define PHI0dll PHI0dll
# define PQFLSHdll PQFLSHdll
# define PREOSdll PREOSdll
# define PRESSdll PRESSdll
# define PSFL1dll PSFL1dll
# define PSFLSHdll PSFLSHdll
# define PUREFLDdll PUREFLDdll
# define QMASSdll QMASSdll
# define QMOLEdll QMOLEdll
# define RESIDUALdll RESIDUALdll
# define REDXdll REDXdll
# define RMIX2dll RMIX2dll
# define SATDdll SATDdll
# define SATEdll SATEdll
# define SATHdll SATHdll
# define SATPdll SATPdll
# define SATSdll SATSdll
# define SATTdll SATTdll
# define SATSPLNdll SATSPLNdll
# define SETAGAdll SETAGAdll
# define SETKTVdll SETKTVdll
# define SETMIXdll SETMIXdll
# define SETMODdll SETMODdll
# define SETREFdll SETREFdll
# define SETUPdll SETUPdll
//# define SPECGRdll SPECGRdll // not found in library
# define SUBLPdll SUBLPdll
# define SUBLTdll SUBLTdll
# define SURFTdll SURFTdll
# define SURTENdll SURTENdll
# define TDFLSHdll TDFLSHdll
# define TEFLSHdll TEFLSHdll
# define THERM0dll THERM0dll
# define THERM2dll THERM2dll
# define THERM3dll THERM3dll
# define THERMdll THERMdll
# define THFLSHdll THFLSHdll
# define TPFLSHdll TPFLSHdll
# define TPFL2dll TPFL2dll
# define TPRHOdll TPRHOdll
# define TQFLSHdll TQFLSHdll
# define TRNPRPdll TRNPRPdll
# define TSFLSHdll TSFLSHdll
# define VIRBdll VIRBdll
# define VIRCdll VIRCdll
# define WMOLdll WMOLdll
# define XMASSdll XMASSdll
# define XMOLEdll XMOLEdll
#elif defined(__ISLINUX__) // defined(__ISWINDOWS__)
// Define compiler specific calling conventions
// for the shared library.
# define CALLCONV
// Define function names for the shared library,
// in this case it is the librefprop.so and the
// names might change on some systems during
// the compilation of the Fortran files.
// Possible other branches for this code could be:
// # if !defined(_AIX)
// # if !defined(__hpux)
// # ifdef _CRAY
// However, I cannot test that and therefore do not include it.
# define RPVersion rpversion_
# define SETPATHdll setpathdll_
# define ABFL1dll abfl1dll_
# define ABFL2dll abfl2dll_
# define ACTVYdll actvydll_
# define AGdll agdll_
# define CCRITdll ccritdll_
# define CP0dll cp0dll_
# define CRITPdll critpdll_
# define CSATKdll csatkdll_
# define CV2PKdll cv2pkdll_
# define CVCPKdll cvcpkdll_
# define CVCPdll cvcpdll_
# define DBDTdll dbdtdll_
# define DBFL1dll dbfl1dll_
# define DBFL2dll dbfl2dll_
# define DDDPdll dddpdll_
# define DDDTdll dddtdll_
# define DEFLSHdll deflshdll_
# define DHD1dll dhd1dll_
# define DHFL1dll dhfl1dll_
# define DHFL2dll dhfl2dll_
# define DHFLSHdll dhflshdll_
# define DIELECdll dielecdll_
# define DOTFILLdll dotfilldll_
# define DPDD2dll dpdd2dll_
# define DPDDKdll dpddkdll_
# define DPDDdll dpdddll_
# define DPDTKdll dpdtkdll_
# define DPDTdll dpdtdll_
# define DPTSATKdll dptsatkdll_
# define DSFLSHdll dsflshdll_
# define DSFL1dll dsfl1dll_
# define DSFL2dll dsfl2dll_
# define ENTHALdll enthaldll_
# define ENTROdll entrodll_
# define ESFLSHdll esflshdll_
# define FGCTYdll fgctydll_
# define FUGCOFdll fugcofdll_
# define FPVdll fpvdll_
# define GERG04dll gerg04dll_
# define GETFIJdll getfijdll_
# define GETKTVdll getktvdll_
# define GIBBSdll gibbsdll_
# define HSFLSHdll hsflshdll_
# define INFOdll infodll_
# define LIMITKdll limitkdll_
# define LIMITSdll limitsdll_
# define LIMITXdll limitxdll_
# define MELTPdll meltpdll_
# define MELTTdll melttdll_
# define MLTH2Odll mlth2odll_
# define NAMEdll namedll_
# define PASSCMNdll passcmn_
# define PDFL1dll pdfl1dll_
# define PDFLSHdll pdflshdll_
# define PEFLSHdll peflshdll_
# define PHFL1dll phfl1dll_
# define PHFLSHdll phflshdll_
# define PHIXdll phixdll_
# define PHI0dll phi0dll_
# define PQFLSHdll pqflshdll_
# define PREOSdll preosdll_
# define PRESSdll pressdll_
# define PSFL1dll psfl1dll_
# define PSFLSHdll psflshdll_
# define PUREFLDdll pureflddll_
# define QMASSdll qmassdll_
# define QMOLEdll qmoledll_
# define RESIDUALdll residualdll_
# define RMIX2dll rmix2dll_
# define REDXdll redxdll_
# define SATDdll satddll_
# define SATEdll satedll_
# define SATHdll sathdll_
# define SATPdll satpdll_
# define SATSdll satsdll_
# define SATTdll sattdll_
# define SATSPLNdll satsplndll_
# define SETAGAdll setagadll_
# define SETKTVdll setktvdll_
# define SETMIXdll setmixdll_
# define SETMODdll setmoddll_
# define SETREFdll setrefdll_
# define SETUPdll setupdll_
//# define SPECGRdll specgrdll_ // not found in library
# define SUBLPdll sublpdll_
# define SUBLTdll subltdll_
# define SURFTdll surftdll_
# define SURTENdll surtendll_
# define TDFLSHdll tdflshdll_
# define TEFLSHdll teflshdll_
# define THERM0dll therm0dll_
# define THERM2dll therm2dll_
# define THERM3dll therm3dll_
# define THERMdll thermdll_
# define THFLSHdll thflshdll_
# define TPFLSHdll tpflshdll_
# define TPFL2dll tpfl2dll_
# define TPRHOdll tprhodll_
# define TQFLSHdll tqflshdll_
# define TRNPRPdll trnprpdll_
# define TSFLSHdll tsflshdll_
# define VIRBdll virbdll_
# define VIRCdll vircdll_
# define WMOLdll wmoldll_
# define XMASSdll xmassdll_
# define XMOLEdll xmoledll_
#elif defined(__ISAPPLE__) // defined(__ISLINUX__)
// Define compiler specific calling conventions
// for the shared library.
# define CALLCONV
# define RPVersion rpversion_
# define SETPATHdll setpathdll_
# define ABFL1dll abfl1dll_
# define ABFL2dll abfl2dll_
# define ACTVYdll actvydll_
# define AGdll agdll_
# define CCRITdll ccritdll_
# define CP0dll cp0dll_
# define CRITPdll critpdll_
# define CSATKdll csatkdll_
# define CV2PKdll cv2pkdll_
# define CVCPKdll cvcpkdll_
# define CVCPdll cvcpdll_
# define DBDTdll dbdtdll_
# define DBFL1dll dbfl1dll_
# define DBFL2dll dbfl2dll_
# define DDDPdll dddpdll_
# define DDDTdll dddtdll_
# define DEFLSHdll deflshdll_
# define DHD1dll dhd1dll_
# define DHFL1dll dhfl1dll_
# define DHFL2dll dhfl2dll_
# define DHFLSHdll dhflshdll_
# define DIELECdll dielecdll_
# define DOTFILLdll dotfilldll_
# define DPDD2dll dpdd2dll_
# define DPDDKdll dpddkdll_
# define DPDDdll dpdddll_
# define DPDTKdll dpdtkdll_
# define DPDTdll dpdtdll_
# define DPTSATKdll dptsatkdll_
# define DSFLSHdll dsflshdll_
# define DSFL1dll dsfl1dll_
# define DSFL2dll dsfl2dll_
# define ENTHALdll enthaldll_
# define ENTROdll entrodll_
# define ESFLSHdll esflshdll_
# define FGCTYdll fgctydll_
# define FUGCOFdll fugcofdll_
# define FPVdll fpvdll_
# define GERG04dll gerg04dll_
# define GETFIJdll getfijdll_
# define GETKTVdll getktvdll_
# define GIBBSdll gibbsdll_
# define HSFLSHdll hsflshdll_
# define INFOdll infodll_
# define LIMITKdll limitkdll_
# define LIMITSdll limitsdll_
# define LIMITXdll limitxdll_
# define MELTPdll meltpdll_
# define MELTTdll melttdll_
# define MLTH2Odll mlth2odll_
# define NAMEdll namedll_
# define PASSCMNdll passcmn_
# define PDFL1dll pdfl1dll_
# define PDFLSHdll pdflshdll_
# define PEFLSHdll peflshdll_
# define PHFL1dll phfl1dll_
# define PHFLSHdll phflshdll_
# define PHIXdll phixdll_
# define PHI0dll phi0dll_
# define PQFLSHdll pqflshdll_
# define PREOSdll preosdll_
# define PRESSdll pressdll_
# define PSFL1dll psfl1dll_
# define PSFLSHdll psflshdll_
# define PUREFLDdll pureflddll_
# define QMASSdll qmassdll_
# define QMOLEdll qmoledll_
# define RESIDUALdll residualdll_
# define REDXdll redxdll_
# define RMIX2dll rmix2dll_
# define SATDdll satddll_
# define SATEdll satedll_
# define SATHdll sathdll_
# define SATPdll satpdll_
# define SATSdll satsdll_
# define SATTdll sattdll_
# define SATSPLNdll satsplndll_
# define SETAGAdll setagadll_
# define SETKTVdll setktvdll_
# define SETMIXdll setmixdll_
# define SETMODdll setmoddll_
# define SETREFdll setrefdll_
# define SETUPdll setupdll_
//# define SPECGRdll specgrdll_ // not found in library
# define SUBLPdll sublpdll_
# define SUBLTdll subltdll_
# define SURFTdll surftdll_
# define SURTENdll surtendll_
# define TDFLSHdll tdflshdll_
# define TEFLSHdll teflshdll_
# define THERM0dll therm0dll_
# define THERM2dll therm2dll_
# define THERM3dll therm3dll_
# define THERMdll thermdll_
# define THFLSHdll thflshdll_
# define TPFLSHdll tpflshdll_
# define TPFL2dll tpfl2dll_
# define TPRHOdll tprhodll_
# define TQFLSHdll tqflshdll_
# define TRNPRPdll trnprpdll_
# define TSFLSHdll tsflshdll_
# define VIRBdll virbdll_
# define VIRCdll vircdll_
# define WMOLdll wmoldll_
# define XMASSdll xmassdll_
# define XMOLEdll xmoledll_
#else // #elif defined(__ISAPPLE__)
// Set some dummy names for the compiler
# define CALLCONV
# define RPVersion NOTAVAILABLE
# define SETPATHdll setpathdll
# define ABFL1dll abfl1dll
# define ABFL2dll abfl2dll
# define ACTVYdll actvydll
# define AGdll agdll
# define CCRITdll ccritdll
# define CP0dll cp0dll
# define CRITPdll critpdll
# define CSATKdll csatkdll
# define CV2PKdll cv2pkdll
# define CVCPKdll cvcpkdll
# define CVCPdll cvcpdll
# define DBDTdll dbdtdll
# define DBFL1dll dbfl1dll
# define DBFL2dll dbfl2dll
# define DDDPdll dddpdll
# define DDDTdll dddtdll
# define DEFLSHdll deflshdll
# define DHD1dll dhd1dll
# define DHFL1dll dhfl1dll
# define DHFL2dll dhfl2dll
# define DHFLSHdll dhflshdll
# define DIELECdll dielecdll
# define DOTFILLdll dotfilldll
# define DPDD2dll dpdd2dll
# define DPDDKdll dpddkdll
# define DPDDdll dpdddll
# define DPDTKdll dpdtkdll
# define DPDTdll dpdtdll
# define DPTSATKdll dptsatkdll
# define DSFLSHdll dsflshdll
# define DSFL1dll dsfl1dll
# define DSFL2dll dsfl2dll
# define ENTHALdll enthaldll
# define ENTROdll entrodll
# define ESFLSHdll esflshdll
# define FGCTYdll fgctydll
# define FPVdll fpvdll
# define GERG04dll gerg04dll
# define GETFIJdll getfijdll
# define GETKTVdll getktvdll
# define GIBBSdll gibbsdll
# define HSFLSHdll hsflshdll
# define INFOdll infodll
# define LIMITKdll limitkdll
# define LIMITSdll limitsdll
# define LIMITXdll limitxdll
# define MELTPdll meltpdll
# define MELTTdll melttdll
# define MLTH2Odll mlth2odll
# define NAMEdll namedll
# define PASSCMNdll passcmn
# define PDFL1dll pdfl1dll
# define PDFLSHdll pdflshdll
# define PEFLSHdll peflshdll
# define PHFL1dll phfl1dll
# define PHFLSHdll phflshdll
# define PHIXdll phixdll
# define PHI0dll phi0dll
# define PQFLSHdll pqflshdll
# define PREOSdll preosdll
# define PRESSdll pressdll
# define PSFL1dll psfl1dll
# define PSFLSHdll psflshdll
# define PUREFLDdll pureflddll
# define QMASSdll qmassdll
# define QMOLEdll qmoledll
# define RESIDUALdll residualdll
# define REDXdll redxdll
# define RMIX2dll rmix2dll
# define SATDdll satddll
# define SATEdll satedll
# define SATHdll sathdll
# define SATPdll satpdll
# define SATSdll satsdll
# define SATTdll sattdll
# define SATSPLNdll satsplndll
# define SETAGAdll setagadll
# define SETKTVdll setktvdll
# define SETMIXdll setmixdll
# define SETMODdll setmoddll
# define SETREFdll setrefdll
# define SETUPdll setupdll
//# define SPECGRdll specgrdll // not found in library
# define SUBLPdll sublpdll
# define SUBLTdll subltdll
# define SURFTdll surftdll
# define SURTENdll surtendll
# define TDFLSHdll tdflshdll
# define TEFLSHdll teflshdll
# define THERM0dll therm0dll
# define THERM2dll therm2dll
# define THERM3dll therm3dll
# define THERMdll thermdll
# define THFLSHdll thflshdll
# define TPFLSHdll tpflshdll
# define TPFL2dll tpfl2dll
# define TPRHOdll tprhodll
# define TQFLSHdll tqflshdll
# define TRNPRPdll trnprpdll
# define TSFLSHdll tsflshdll
# define VIRBdll virbdll
# define VIRCdll vircdll
# define WMOLdll wmoldll
# define XMASSdll xmassdll
# define XMOLEdll xmoledll
#endif // else branch
//
//
// Only continue if function names have been defined.
// We might want to include some more tests here...
#if defined(RPVersion)
#define CALLCONV __stdcall
#else
#define CALLCONV
#endif
// define new macros for function names
// http://stackoverflow.com/questions/195975/how-to-make-a-char-string-from-a-c-macros-value
#include <string.h>
#define STR_VALUE(arg) #arg
#define FUNCTION_NAME(name) STR_VALUE(name)
#define STRINGIFY(name) STR_VALUE(name)
//
// I'll try to follow this example from:
// http://www.gershnik.com/tips/cpp.asp
// function type: typedef void [compiler stuff] func_t(int, float);
@@ -494,6 +142,7 @@
#ifdef __cplusplus
extern "C" {
#endif
// For C calling conventions, replaced all "double &" with "double *", and "long &" with "long *"
typedef void (CALLCONV RPVersion_TYPE)( char* );
typedef void (CALLCONV SETPATHdll_TYPE)( const char* );
@@ -580,8 +229,7 @@ extern "C" {
typedef void (CALLCONV SETMODdll_TYPE)(long *,char*,char*,char*,long *,char*,long ,long ,long ,long );
typedef void (CALLCONV SETREFdll_TYPE)(char*,long *,double *,double *,double *,double *,double *,long *,char*,long ,long );
typedef void (CALLCONV SETUPdll_TYPE)(long *,char*,char*,char*,long *,char*,long ,long ,long ,long );
//typedef void (CALLCONV SETUPdll_TYPE)(long *,char*,char*,char*,long *,char*);
// typedef void (CALLCONV SPECGRdll_TYPE)(double *,double *,double *,double *); // not found in library
typedef void (CALLCONV SPECGRdll_TYPE)(double *,double *,double *,double *);
typedef void (CALLCONV SUBLPdll_TYPE)(double *,double *,double *,long *,char*,long );
typedef void (CALLCONV SUBLTdll_TYPE)(double *,double *,double *,long *,char*,long );
typedef void (CALLCONV SURFTdll_TYPE)(double *,double *,double *,double *,long *,char*,long );
@@ -604,118 +252,22 @@ extern "C" {
typedef void (CALLCONV WMOLdll_TYPE)(double *,double *);
typedef void (CALLCONV XMASSdll_TYPE)(double *,double *,double *);
typedef void (CALLCONV XMOLEdll_TYPE)(double *,double *,double *);
//
// Define explicit function pointers
typedef RPVersion_TYPE * RPVersion_POINTER;
typedef SETPATHdll_TYPE * SETPATHdll_POINTER;
typedef ABFL1dll_TYPE * ABFL1dll_POINTER;
typedef ABFL2dll_TYPE * ABFL2dll_POINTER;
typedef ACTVYdll_TYPE * ACTVYdll_POINTER;
typedef AGdll_TYPE * AGdll_POINTER;
typedef CCRITdll_TYPE * CCRITdll_POINTER;
typedef CP0dll_TYPE * CP0dll_POINTER;
typedef CRITPdll_TYPE * CRITPdll_POINTER;
typedef CSATKdll_TYPE * CSATKdll_POINTER;
typedef CV2PKdll_TYPE * CV2PKdll_POINTER;
typedef CVCPKdll_TYPE * CVCPKdll_POINTER;
typedef CVCPdll_TYPE * CVCPdll_POINTER;
typedef DBDTdll_TYPE * DBDTdll_POINTER;
typedef DBFL1dll_TYPE * DBFL1dll_POINTER;
typedef DBFL2dll_TYPE * DBFL2dll_POINTER;
typedef DDDPdll_TYPE * DDDPdll_POINTER;
typedef DDDTdll_TYPE * DDDTdll_POINTER;
typedef DEFLSHdll_TYPE * DEFLSHdll_POINTER;
typedef DHD1dll_TYPE * DHD1dll_POINTER;
typedef DHFLSHdll_TYPE * DHFLSHdll_POINTER;
typedef DHFL1dll_TYPE * DHFL1dll_POINTER;
typedef DHFL2dll_TYPE * DHFL2dll_POINTER;
typedef DIELECdll_TYPE * DIELECdll_POINTER;
typedef DOTFILLdll_TYPE * DOTFILLdll_POINTER;
typedef DPDD2dll_TYPE * DPDD2dll_POINTER;
typedef DPDDKdll_TYPE * DPDDKdll_POINTER;
typedef DPDDdll_TYPE * DPDDdll_POINTER;
typedef DPDTKdll_TYPE * DPDTKdll_POINTER;
typedef DPDTdll_TYPE * DPDTdll_POINTER;
typedef DPTSATKdll_TYPE * DPTSATKdll_POINTER;
typedef DSFLSHdll_TYPE * DSFLSHdll_POINTER;
typedef DSFL1dll_TYPE * DSFL1dll_POINTER;
typedef DSFL2dll_TYPE * DSFL2dll_POINTER;
typedef ENTHALdll_TYPE * ENTHALdll_POINTER;
typedef ENTROdll_TYPE * ENTROdll_POINTER;
typedef ESFLSHdll_TYPE * ESFLSHdll_POINTER;
typedef FGCTYdll_TYPE * FGCTYdll_POINTER;
typedef FPVdll_TYPE * FPVdll_POINTER;
typedef FUGCOFdll_TYPE * FUGCOFdll_POINTER;
typedef GERG04dll_TYPE * GERG04dll_POINTER;
typedef GETFIJdll_TYPE * GETFIJdll_POINTER;
typedef GETKTVdll_TYPE * GETKTVdll_POINTER;
typedef GIBBSdll_TYPE * GIBBSdll_POINTER;
typedef HSFLSHdll_TYPE * HSFLSHdll_POINTER;
typedef INFOdll_TYPE * INFOdll_POINTER;
typedef LIMITKdll_TYPE * LIMITKdll_POINTER;
typedef LIMITSdll_TYPE * LIMITSdll_POINTER;
typedef LIMITXdll_TYPE * LIMITXdll_POINTER;
typedef MELTPdll_TYPE * MELTPdll_POINTER;
typedef MELTTdll_TYPE * MELTTdll_POINTER;
typedef MLTH2Odll_TYPE * MLTH2Odll_POINTER;
typedef NAMEdll_TYPE * NAMEdll_POINTER;
typedef PASSCMNdll_TYPE * PASSCMNdll_POINTER;
typedef PDFL1dll_TYPE * PDFL1dll_POINTER;
typedef PDFLSHdll_TYPE * PDFLSHdll_POINTER;
typedef PEFLSHdll_TYPE * PEFLSHdll_POINTER;
typedef PHFL1dll_TYPE * PHFL1dll_POINTER;
typedef PHFLSHdll_TYPE * PHFLSHdll_POINTER;
typedef PHIXdll_TYPE * PHIXdll_POINTER;
typedef PHI0dll_TYPE * PHI0dll_POINTER;
typedef PQFLSHdll_TYPE * PQFLSHdll_POINTER;
typedef PREOSdll_TYPE * PREOSdll_POINTER;
typedef PRESSdll_TYPE * PRESSdll_POINTER;
typedef PSFL1dll_TYPE * PSFL1dll_POINTER;
typedef PSFLSHdll_TYPE * PSFLSHdll_POINTER;
typedef PUREFLDdll_TYPE * PUREFLDdll_POINTER;
typedef QMASSdll_TYPE * QMASSdll_POINTER;
typedef QMOLEdll_TYPE * QMOLEdll_POINTER;
typedef RESIDUALdll_TYPE * RESIDUALdll_POINTER;
typedef REDXdll_TYPE * REDXdll_POINTER;
typedef RMIX2dll_TYPE * RMIX2dll_POINTER;
typedef SATDdll_TYPE * SATDdll_POINTER;
typedef SATEdll_TYPE * SATEdll_POINTER;
typedef SATHdll_TYPE * SATHdll_POINTER;
typedef SATPdll_TYPE * SATPdll_POINTER;
typedef SATSdll_TYPE * SATSdll_POINTER;
typedef SATTdll_TYPE * SATTdll_POINTER;
typedef SATSPLNdll_TYPE * SATSPLNdll_POINTER;
typedef SETAGAdll_TYPE * SETAGAdll_POINTER;
typedef SETKTVdll_TYPE * SETKTVdll_POINTER;
typedef SETMIXdll_TYPE * SETMIXdll_POINTER;
typedef SETMODdll_TYPE * SETMODdll_POINTER;
typedef SETREFdll_TYPE * SETREFdll_POINTER;
typedef SETUPdll_TYPE * SETUPdll_POINTER;
// typedef SPECGRdll_TYPE * SPECGRdll_POINTER; // not found in library
typedef SUBLPdll_TYPE * SUBLPdll_POINTER;
typedef SUBLTdll_TYPE * SUBLTdll_POINTER;
typedef SURFTdll_TYPE * SURFTdll_POINTER;
typedef SURTENdll_TYPE * SURTENdll_POINTER;
typedef TDFLSHdll_TYPE * TDFLSHdll_POINTER;
typedef TEFLSHdll_TYPE * TEFLSHdll_POINTER;
typedef THERM0dll_TYPE * THERM0dll_POINTER;
typedef THERM2dll_TYPE * THERM2dll_POINTER;
typedef THERM3dll_TYPE * THERM3dll_POINTER;
typedef THERMdll_TYPE * THERMdll_POINTER;
typedef THFLSHdll_TYPE * THFLSHdll_POINTER;
typedef TPFLSHdll_TYPE * TPFLSHdll_POINTER;
typedef TPFL2dll_TYPE * TPFL2dll_POINTER;
typedef TPRHOdll_TYPE * TPRHOdll_POINTER;
typedef TQFLSHdll_TYPE * TQFLSHdll_POINTER;
typedef TRNPRPdll_TYPE * TRNPRPdll_POINTER;
typedef TSFLSHdll_TYPE * TSFLSHdll_POINTER;
typedef VIRBdll_TYPE * VIRBdll_POINTER;
typedef VIRCdll_TYPE * VIRCdll_POINTER;
typedef WMOLdll_TYPE * WMOLdll_POINTER;
typedef XMASSdll_TYPE * XMASSdll_POINTER;
typedef XMOLEdll_TYPE * XMOLEdll_POINTER;
/* Define explicit function pointers
* Each will look something like: typedef RPVersion_TYPE * RPVersion_POINTER;
*
* The ## are needed to escape the _ character in the variable names
*
* ***MAGIC WARNING**!! X Macros in use
* See http://stackoverflow.com/a/148610
* See http://stackoverflow.com/questions/147267/easy-way-to-use-variables-of-enum-types-as-string-in-c#202511
*/
#define X(name) typedef name ## _TYPE * name ## _POINTER;
LIST_OF_REFPROP_FUNCTION_NAMES
#undef X
#ifdef __cplusplus
} // extern "C"
#endif // __cplusplus
#endif // defined(RPversion)
#endif // REFPROP_LIB_H
#endif // REFPROP_LIB_H