From 2e951a7c8fbd11f8003bdfa5dac457c8556f4158 Mon Sep 17 00:00:00 2001 From: David L Parkhurst Date: Mon, 5 Aug 2013 20:53:54 +0000 Subject: [PATCH] Revised name to BasicFortran Added methods for C call SetBasicCallback. Need to check C side and documentation. git-svn-id: svn://136.177.114.72/svn_GW/IPhreeqc/trunk@7884 1feff8c3-07ed-0310-ac33-dd36852eb9cd --- IPhreeqc.MMS.vcxproj | 2 ++ IPhreeqc.MMS.vcxproj.filters | 6 ++++ src/IPhreeqc.cpp | 14 +++++--- src/IPhreeqc.f90.inc | 30 ++++++++-------- src/IPhreeqc.h | 69 +++++++++++++++++++++++++----------- src/IPhreeqc.hpp | 30 ++++++++++------ src/IPhreeqcF.f | 30 ++++++++-------- src/IPhreeqcLib.cpp | 35 +++++++++++------- src/fwrap.cpp | 19 +++++----- src/fwrap.h | 4 +-- src/fwrap2.cpp | 8 ++--- src/fwrap3.cpp | 8 ++--- src/fwrap4.cpp | 8 ++--- src/fwrap5.cpp | 8 ++--- src/fwrap6.cpp | 8 ++--- src/fwrap7.cpp | 8 ++--- src/fwrap8.cpp | 8 ++--- 17 files changed, 179 insertions(+), 116 deletions(-) diff --git a/IPhreeqc.MMS.vcxproj b/IPhreeqc.MMS.vcxproj index 5e7543e6..586fb240 100644 --- a/IPhreeqc.MMS.vcxproj +++ b/IPhreeqc.MMS.vcxproj @@ -507,6 +507,8 @@ + + diff --git a/IPhreeqc.MMS.vcxproj.filters b/IPhreeqc.MMS.vcxproj.filters index e7556d25..9830bf84 100644 --- a/IPhreeqc.MMS.vcxproj.filters +++ b/IPhreeqc.MMS.vcxproj.filters @@ -463,6 +463,12 @@ Header Files + + Header Files + + + Header Files + diff --git a/src/IPhreeqc.cpp b/src/IPhreeqc.cpp index d5d35a2b..65ad994c 100644 --- a/src/IPhreeqc.cpp +++ b/src/IPhreeqc.cpp @@ -728,6 +728,16 @@ int IPhreeqc::RunString(const char* input) return this->PhreeqcPtr->get_input_errors(); } +void IPhreeqc::SetBasicCallback(double (*cookie)(double *x1, double *x2, char *str)) +{ + this->PhreeqcPtr->register_basic_callback(cookie); +} + +void IPhreeqc::SetBasicFortranCallback(double (*cookie)(double *x1, double *x2, char *str, int l)) +{ + this->PhreeqcPtr->register_fortran_basic_callback(cookie); +} + void IPhreeqc::SetDumpFileName(const char *filename) { if (filename && ::strlen(filename)) @@ -800,10 +810,6 @@ void IPhreeqc::SetOutputFileOn(bool bValue) { this->OutputFileOn = bValue; } -void IPhreeqc::SetFortranBasicCallback(double (*cookie)(double *x1, double *x2, char *str, int l)) -{ - this->PhreeqcPtr->register_fortran_basic_callback(cookie); -} void IPhreeqc::SetSelectedOutputFileName(const char *filename) { diff --git a/src/IPhreeqc.f90.inc b/src/IPhreeqc.f90.inc index 9f32069d..8ec6f8e6 100644 --- a/src/IPhreeqc.f90.inc +++ b/src/IPhreeqc.f90.inc @@ -357,6 +357,21 @@ END INTERFACE + INTERFACE + FUNCTION SetBasicFortranCallback(ID,COOKIE) + INTEGER(KIND=4), INTENT(IN) :: ID + INTERFACE + DOUBLE PRECISION FUNCTION cookie(x1, x2, str) + DOUBLE PRECISION, INTENT(in) :: x1 + DOUBLE PRECISION, INTENT(in) :: x2 + CHARACTER(*), INTENT(in) :: str + END FUNCTION + END INTERFACE + INTEGER(KIND=4) :: SetBasicFortranCallback + END FUNCTION SetBasicFortranCallback + END INTERFACE + + INTERFACE FUNCTION SetDumpFileName(ID,FNAME) INTEGER(KIND=4), INTENT(IN) :: ID @@ -447,21 +462,6 @@ END INTERFACE - INTERFACE - FUNCTION SetFortranBasicCallback(ID,COOKIE) - INTEGER(KIND=4), INTENT(IN) :: ID - INTERFACE - DOUBLE PRECISION FUNCTION cookie(x1, x2, str) - DOUBLE PRECISION, INTENT(in) :: x1 - DOUBLE PRECISION, INTENT(in) :: x2 - CHARACTER(*), INTENT(in) :: str - END FUNCTION - END INTERFACE - INTEGER(KIND=4) :: SetFortranBasicCallback - END FUNCTION SetFortranBasicCallback - END INTERFACE - - INTERFACE FUNCTION SetOutputStringOn(ID,OUT_STRING_ON) INTEGER(KIND=4), INTENT(IN) :: ID diff --git a/src/IPhreeqc.h b/src/IPhreeqc.h index f4a6e1f3..b1f98c63 100644 --- a/src/IPhreeqc.h +++ b/src/IPhreeqc.h @@ -1523,6 +1523,54 @@ Headings */ IPQ_DLL_EXPORT int RunString(int id, const char* input); +/** + * Sets C callback function for the Basic interpreter. + * @param id The instance id returned from \ref CreateIPhreeqc. + * @param cookie The name of a double precision Fortran function with three arguments (two double precision, and one character). + * @retval IPQ_OK Success. + * @retval IPQ_BADINSTANCE The given id is invalid. + * @par Fortran90 Interface: + * @htmlonly + * + *
+ *  FUNCTION SetBasicCallback(ID,COOKIE)
+ *    INTEGER  :: ID
+ *    double (*cookie)(double *x1, double *x2, char *str)
+ *    INTEGER  :: SetBasicCallback
+ *  END FUNCTION SetBasicCallback
+ *  
+ *
+ * @endhtmlonly + */ + IPQ_DLL_EXPORT IPQ_RESULT SetBasicCallback(int id, double (*cookie)(double *x1, double *x2, char *str)); + +/** + * Sets Fortran callback function for the Basic interpreter. + * @param id The instance id returned from \ref CreateIPhreeqc. + * @param cookie The name of a double precision Fortran function with three arguments (two double precision, and one character). + * @retval IPQ_OK Success. + * @retval IPQ_BADINSTANCE The given id is invalid. + * @par Fortran90 Interface: + * @htmlonly + * + *
+ *  FUNCTION SetBasicFortranCallback(ID,COOKIE)
+ *    INTEGER(KIND=4),  INTENT(IN)  :: ID
+ *    INTERFACE
+ *      DOUBLE PRECISION FUNCTION cookie(x1, x2, str)
+ *        DOUBLE PRECISION, INTENT(in) :: x1
+ *        DOUBLE PRECISION, INTENT(in) :: x2
+ *        CHARACTER(*), INTENT(in)                   :: str
+ *      END FUNCTION 
+ *    END INTERFACE
+ *    INTEGER(KIND=4)               :: SetBasicFortranCallback
+ *  END FUNCTION SetBasicCallback
+ *  
+ *
+ * @endhtmlonly + */ + IPQ_DLL_EXPORT IPQ_RESULT SetBasicFortranCallback(int id, double (*cookie)(double *x1, double *x2, char *str, int l)); + /** * Sets the name of the dump file. This file name is used if not specified within DUMP input. @@ -1808,27 +1856,6 @@ Headings */ IPQ_DLL_EXPORT IPQ_RESULT SetOutputFileOn(int id, int output_on); -/** - * Sets Fortran callback function for the Basic interpreter. - * @param id The instance id returned from \ref CreateIPhreeqc. - * @param cookie The name of a double precision Fortran function with three arguments (two double precision, and one character). - * @retval IPQ_OK Success. - * @retval IPQ_BADINSTANCE The given id is invalid. - * @par Fortran90 Interface: - * @htmlonly - * - *
- *  FUNCTION SetFortranBasicCallback(ID,COOKIE)
- *    INTEGER(KIND=4),  INTENT(IN)  :: ID
- *    FUNCTION POINTER,  INTENT(IN) :: COOKIE
- *    INTEGER(KIND=4)               :: SetFortranBasicCallback
- *  END FUNCTION SetFortranBasicCallback
- *  
- *
- * @endhtmlonly - */ - IPQ_DLL_EXPORT IPQ_RESULT SetFortranBasicCallback(int id, double (*cookie)(double *x1, double *x2, char *str, int l)); - /** * Sets the output string switch on or off. This switch controls whether or not the data normally sent * to the output file are stored in a buffer for retrieval. The initial setting after calling diff --git a/src/IPhreeqc.hpp b/src/IPhreeqc.hpp index 2c769eed..9fc2936e 100644 --- a/src/IPhreeqc.hpp +++ b/src/IPhreeqc.hpp @@ -654,6 +654,26 @@ public: */ int RunFile(const char* filename); + /** + * Sets a C callback function for Basic programs. The syntax for the Basic command is + * 10 result = CALLBACK(x1, x2, string$) + * The syntax for the C function is + * double my_callback(double x1, double x2, char * string) + * @param cookie The name of a user-defined function + * @see SetBasicFortranCallback + */ + void SetBasicCallback(double (*cookie)(double *x1, double *x2, char *str)); + + /** + * Sets a Fortran callback function for Basic programs. The syntax for the Basic command is + * 10 result = CALLBACK(x1, x2, string$) + * The syntax for the Fortran function is + * double precision my_callback(x1, x2, string), where x1 and x2 are double precision and string is a character variable. + * @param cookie The name of a user-defined double precision function with three arguments (two double precision, one character). + * @see SetBasicCallback + */ + void SetBasicFortranCallback(double (*cookie)(double *x1, double *x2, char *str, int l)); + /** * Runs the specified string as input to phreeqc. * @param input String containing phreeqc input. @@ -756,16 +776,6 @@ public: */ void SetOutputFileOn(bool bValue); - /** - * Sets a Fortran callback function for Basic programs. The syntax for the Basic command is - * 10 result = CALLBACK(x1, x2, string$) - * The syntax for the Fortran function is - * double precision my_callback(x1, x2, string), where x1 and x2 are double precision and string is a character variable. - * @param cookie The name of a user-defined double precision function with three arguments (two double precision, one character). - * @see GetOutputFileOn - */ - void SetFortranBasicCallback(double (*cookie)(double *x1, double *x2, char *str, int l)); - /** * Sets the output string switch on or off. This switch controls whether or not the data normally sent * to the output file are stored in a buffer for retrieval. The initial setting is false. diff --git a/src/IPhreeqcF.f b/src/IPhreeqcF.f index b383415c..ac5a194c 100644 --- a/src/IPhreeqcF.f +++ b/src/IPhreeqcF.f @@ -433,6 +433,21 @@ INTEGER(KIND=4) :: RunStringF RunString = RunStringF(ID,INPUT) END FUNCTION RunString +!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! + FUNCTION SetBasicFortranCallback(ID,COOKIE) + IMPLICIT NONE + INTEGER(KIND=4) :: ID + INTERFACE + DOUBLE PRECISION FUNCTION cookie(x1, x2, str) + DOUBLE PRECISION, INTENT(in) :: x1 + DOUBLE PRECISION, INTENT(in) :: x2 + CHARACTER(*), INTENT(in) :: str + END FUNCTION + END INTERFACE + INTEGER(KIND=4) :: SetBasicFortranCallback + INTEGER(KIND=4) :: SetBasicFortranCallbackF + SetBasicFortranCallback = SetBasicFortranCallbackF(ID,COOKIE) + END FUNCTION SetBasicFortranCallback !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! FUNCTION SetDumpFileName(ID,FNAME) IMPLICIT NONE @@ -532,21 +547,6 @@ INTEGER(KIND=4) :: SetOutputFileOnF SetOutputFileOn = SetOutputFileOnF(ID,OUTPUT_FILE_ON) END FUNCTION SetOutputFileOn -!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! - FUNCTION SetFortranBasicCallback(ID,COOKIE) - IMPLICIT NONE - INTEGER(KIND=4) :: ID - INTERFACE - DOUBLE PRECISION FUNCTION cookie(x1, x2, str) - DOUBLE PRECISION, INTENT(in) :: x1 - DOUBLE PRECISION, INTENT(in) :: x2 - CHARACTER(*), INTENT(in) :: str - END FUNCTION - END INTERFACE - INTEGER(KIND=4) :: SetFortranBasicCallback - INTEGER(KIND=4) :: SetFortranBasicCallbackF - SetFortranBasicCallback = SetFortranBasicCallbackF(ID,COOKIE) - END FUNCTION SetFortranBasicCallback !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! FUNCTION SetOutputStringOn(ID,OUTPUT_STRING_ON) IMPLICIT NONE diff --git a/src/IPhreeqcLib.cpp b/src/IPhreeqcLib.cpp index 1289a670..8a209655 100644 --- a/src/IPhreeqcLib.cpp +++ b/src/IPhreeqcLib.cpp @@ -714,6 +714,29 @@ RunString(int id, const char* input) return IPQ_BADINSTANCE; } +IPQ_RESULT +SetBasicCallback(int id, double (*cookie)(double *x1, double *x2, char *str)) +{ + IPhreeqc* IPhreeqcPtr = IPhreeqcLib::GetInstance(id); + if (IPhreeqcPtr) + { + IPhreeqcPtr->SetBasicCallback(cookie); + return IPQ_OK; + } + return IPQ_BADINSTANCE; +} + +IPQ_RESULT +SetBasicFortranCallback(int id, double (*cookie)(double *x1, double *x2, char *str, int l)) +{ + IPhreeqc* IPhreeqcPtr = IPhreeqcLib::GetInstance(id); + if (IPhreeqcPtr) + { + IPhreeqcPtr->SetBasicFortranCallback(cookie); + return IPQ_OK; + } + return IPQ_BADINSTANCE; +} IPQ_RESULT SetDumpFileName(int id, const char* filename) { @@ -846,18 +869,6 @@ SetOutputFileOn(int id, int value) return IPQ_BADINSTANCE; } -IPQ_RESULT -SetFortranBasicCallback(int id, double (*cookie)(double *x1, double *x2, char *str, int l)) -{ - IPhreeqc* IPhreeqcPtr = IPhreeqcLib::GetInstance(id); - if (IPhreeqcPtr) - { - IPhreeqcPtr->SetFortranBasicCallback(cookie); - return IPQ_OK; - } - return IPQ_BADINSTANCE; -} - IPQ_RESULT SetOutputStringOn(int id, int value) { diff --git a/src/fwrap.cpp b/src/fwrap.cpp index 4755b7e4..37a30b6b 100644 --- a/src/fwrap.cpp +++ b/src/fwrap.cpp @@ -449,6 +449,12 @@ RunStringF(int *id, char* input, unsigned int input_length) return n; } +IPQ_RESULT +SetBasicFortranCallbackF(int *id, double (*cookie)(double *x1, double *x2, char *str, int l)) +{ + return ::SetBasicFortranCallback(*id, cookie); +} + IPQ_RESULT SetDumpFileNameF(int *id, char* fname, unsigned int fname_length) { @@ -559,11 +565,6 @@ SetOutputFileOnF(int *id, int* output_on) return ::SetOutputFileOn(*id, *output_on); } -IPQ_RESULT -SetFortranBasicCallbackF(int *id, double (*cookie)(double *x1, double *x2, char *str, int l)) -{ - return ::SetFortranBasicCallback(*id, cookie); -} IPQ_RESULT SetOutputStringOnF(int *id, int* output_string_on) { @@ -798,6 +799,10 @@ IPQ_DLL_EXPORT int __stdcall RUNSTRING(int *id, char *input, unsigned int len) { return RunStringF(id, input, len); } +IPQ_DLL_EXPORT int __stdcall SETBASICFORTRANCALBACK(int *id, double (*cookie)(double *x1, double *x2, char *str, int l)) +{ + return SetBasicFortranCallbackF(id, cookie); +} IPQ_DLL_EXPORT int __stdcall SETDUMPFILENAME(int *id, char *filename, unsigned int len) { return SetDumpFileNameF(id, filename, len); @@ -842,10 +847,6 @@ IPQ_DLL_EXPORT int __stdcall SETOUTPUTFILEON(int *id, int *output_on) { return SetOutputFileOnF(id, output_on); } -IPQ_DLL_EXPORT int __stdcall SETFORTRANBASICCALBACK(int *id, double (*cookie)(double *x1, double *x2, char *str, int l)) -{ - return SetFortranBasicCallbackF(id, cookie); -} IPQ_DLL_EXPORT int __stdcall SETOUTPUTSTRINGON(int *id, int *output_on) { return SetOutputStringOnF(id, output_on); diff --git a/src/fwrap.h b/src/fwrap.h index a666c126..1bdef4d7 100644 --- a/src/fwrap.h +++ b/src/fwrap.h @@ -69,7 +69,7 @@ #define SetSelectedOutputFileNameF FC_FUNC (setselectedoutputfilenamef, SETSELECTEDOUTPUTFILENAMEF) #define SetSelectedOutputFileOnF FC_FUNC (setselectedoutputfileonf, SETSELECTEDOUTPUTFILEONF) #define SetSelectedOutputStringOnF FC_FUNC (setselectedoutputstringonf, SETSELECTEDOUTPUTSTRINGONF) -#define SetFortranBasicCallbackF FC_FUNC (setfortranbasiccallbackf, SETFOTRANBASICCALLBACKF) +#define SetBasicFortranCallbackF FC_FUNC (setbasicfortrancallbackf, SETFOTRANBASICCALLBACKF) #endif /* FC_FUNC */ #if defined(__cplusplus) @@ -137,7 +137,7 @@ extern "C" { IPQ_RESULT SetSelectedOutputFileNameF(int *id, char* fname, unsigned int fname_length); IPQ_RESULT SetSelectedOutputFileOnF(int *id, int* selected_output_file_on); IPQ_RESULT SetSelectedOutputStringOnF(int *id, int* selected_output_string_on); - IPQ_RESULT SetFortranBasicCallbackF(int *id, double (*cookie)(double *x1, double *x2, char *str, int l)); + IPQ_RESULT SetBasicFortranCallbackF(int *id, double (*cookie)(double *x1, double *x2, char *str, int l)); #if defined(__cplusplus) } diff --git a/src/fwrap2.cpp b/src/fwrap2.cpp index 9e88d939..7bbd8081 100644 --- a/src/fwrap2.cpp +++ b/src/fwrap2.cpp @@ -199,6 +199,10 @@ IPQ_DLL_EXPORT int RUNSTRING(int *id, char *input, unsigned int len) { return RunStringF(id, input, len); } +IPQ_DLL_EXPORT int SETBASICFORTRANCALLBACK(int *id, double (*cookie)(double *x1, double *x2, char *str, int l)) +{ + return SetBasicFortranCallbackF(id, cookie); +} IPQ_DLL_EXPORT int SETDUMPFILENAME(int *id, char *filename, unsigned int len) { return SetDumpFileNameF(id, filename, len); @@ -243,10 +247,6 @@ IPQ_DLL_EXPORT int SETOUTPUTFILEON(int *id, int *output_on) { return SetOutputFileOnF(id, output_on); } -IPQ_DLL_EXPORT int SETFORTRANBASICCALLBACK(int *id, double (*cookie)(double *x1, double *x2, char *str, int l)) -{ - return SetFortranBasicCallbackF(id, cookie); -} IPQ_DLL_EXPORT int SETOUTPUTSTRINGON(int *id, int *output_on) { return SetOutputStringOnF(id, output_on); diff --git a/src/fwrap3.cpp b/src/fwrap3.cpp index 8ac0d8db..dd2e4568 100644 --- a/src/fwrap3.cpp +++ b/src/fwrap3.cpp @@ -200,6 +200,10 @@ IPQ_DLL_EXPORT int runstring_(int *id, char *input, unsigned int len) { return RunStringF(id, input, len); } +IPQ_DLL_EXPORT int setbasicfortrancallback_(int *id, double (*cookie)(double *x1, double *x2, char *str, int l)) +{ + return SetBasicFortranCallbackF(id, cookie); +} IPQ_DLL_EXPORT int setdumpfilename_(int *id, char *filename, unsigned int len) { return SetDumpFileNameF(id, filename, len); @@ -244,10 +248,6 @@ IPQ_DLL_EXPORT int setoutputfileon_(int *id, int *output_on) { return SetOutputFileOnF(id, output_on); } -IPQ_DLL_EXPORT int setfortranbasiccallback_(int *id, double (*cookie)(double *x1, double *x2, char *str, int l)) -{ - return SetFortranBasicCallbackF(id, cookie); -} IPQ_DLL_EXPORT int setoutputstringon_(int *id, int *output_on) { return SetOutputStringOnF(id, output_on); diff --git a/src/fwrap4.cpp b/src/fwrap4.cpp index a43f9427..6bf5e13b 100644 --- a/src/fwrap4.cpp +++ b/src/fwrap4.cpp @@ -200,6 +200,10 @@ IPQ_DLL_EXPORT int runstring(int *id, char *input, unsigned int len) { return RunStringF(id, input, len); } +IPQ_DLL_EXPORT int setbasicfortrancallback(int *id, double (*cookie)(double *x1, double *x2, char *str, int l)) +{ + return SetBasicFortranCallbackF(id, cookie); +} IPQ_DLL_EXPORT int setdumpfilename(int *id, char *filename, unsigned int len) { return SetDumpFileNameF(id, filename, len); @@ -244,10 +248,6 @@ IPQ_DLL_EXPORT int setoutputfileon(int *id, int *output_on) { return SetOutputFileOnF(id, output_on); } -IPQ_DLL_EXPORT int setfortranbasiccallback(int *id, double (*cookie)(double *x1, double *x2, char *str, int l)) -{ - return SetFortranBasicCallbackF(id, cookie); -} IPQ_DLL_EXPORT int setoutputstringon(int *id, int *output_on) { return SetOutputStringOnF(id, output_on); diff --git a/src/fwrap5.cpp b/src/fwrap5.cpp index ff02aa9c..5f3e3d4e 100644 --- a/src/fwrap5.cpp +++ b/src/fwrap5.cpp @@ -200,6 +200,10 @@ IPQ_DLL_EXPORT int RUNSTRING_(int *id, char *input, unsigned int len) { return RunStringF(id, input, len); } +IPQ_DLL_EXPORT int SETBASICFORTRANCALLBACK_(int *id, double (*cookie)(double *x1, double *x2, char *str, int l)) +{ + return SetBasicFortranCallbackF(id, cookie); +} IPQ_DLL_EXPORT int SETDUMPFILENAME_(int *id, char *filename, unsigned int len) { return SetDumpFileNameF(id, filename, len); @@ -244,10 +248,6 @@ IPQ_DLL_EXPORT int SETOUTPUTFILEON_(int *id, int *output_on) { return SetOutputFileOnF(id, output_on); } -IPQ_DLL_EXPORT int SETFORTRANBASICCALLBACK_(int *id, double (*cookie)(double *x1, double *x2, char *str, int l)) -{ - return SetFortranBasicCallbackF(id, cookie); -} IPQ_DLL_EXPORT int SETOUTPUTSTRINGON_(int *id, int *output_on) { return SetOutputStringOnF(id, output_on); diff --git a/src/fwrap6.cpp b/src/fwrap6.cpp index 60b5f958..777d2d2c 100644 --- a/src/fwrap6.cpp +++ b/src/fwrap6.cpp @@ -201,6 +201,10 @@ IPQ_DLL_EXPORT int __stdcall RUNSTRING_(int *id, char *input, unsigned int len) { return RunStringF(id, input, len); } +IPQ_DLL_EXPORT int __stdcall SETBASICFORTRANCALLBACK_(int *id, double (*cookie)(double *x1, double *x2, char *str, int l)) +{ + return SetBasicFortranCallbackF(id, cookie); +} IPQ_DLL_EXPORT int __stdcall SETDUMPFILENAME_(int *id, char *filename, unsigned int len) { return SetDumpFileNameF(id, filename, len); @@ -245,10 +249,6 @@ IPQ_DLL_EXPORT int __stdcall SETOUTPUTFILEON_(int *id, int *output_on) { return SetOutputFileOnF(id, output_on); } -IPQ_DLL_EXPORT int __stdcall SETFORTRANBASICCALLBACK_(int *id, double (*cookie)(double *x1, double *x2, char *str, int l)) -{ - return SetFortranBasicCallbackF(id, cookie); -} IPQ_DLL_EXPORT int __stdcall SETOUTPUTSTRINGON_(int *id, int *output_on) { return SetOutputStringOnF(id, output_on); diff --git a/src/fwrap7.cpp b/src/fwrap7.cpp index b968fa60..e29f9d64 100644 --- a/src/fwrap7.cpp +++ b/src/fwrap7.cpp @@ -200,6 +200,10 @@ IPQ_DLL_EXPORT int __stdcall runstring_(int *id, char *input, unsigned int len) { return RunStringF(id, input, len); } +IPQ_DLL_EXPORT int __stdcall setbasicfortrancallback_(int *id, double (*cookie)(double *x1, double *x2, char *str, int l)) +{ + return SetBasicFortranCallbackF(id, cookie); +} IPQ_DLL_EXPORT int __stdcall setdumpfilename_(int *id, char *filename, unsigned int len) { return SetDumpFileNameF(id, filename, len); @@ -244,10 +248,6 @@ IPQ_DLL_EXPORT int __stdcall setoutputfileon_(int *id, int *output_on) { return SetOutputFileOnF(id, output_on); } -IPQ_DLL_EXPORT int __stdcall setfortranbasiccallback_(int *id, double (*cookie)(double *x1, double *x2, char *str, int l)) -{ - return SetFortranBasicCallbackF(id, cookie); -} IPQ_DLL_EXPORT int __stdcall setoutputstringon_(int *id, int *output_on) { return SetOutputStringOnF(id, output_on); diff --git a/src/fwrap8.cpp b/src/fwrap8.cpp index 46a9d5bb..19143856 100644 --- a/src/fwrap8.cpp +++ b/src/fwrap8.cpp @@ -200,6 +200,10 @@ IPQ_DLL_EXPORT int __stdcall runstring(int *id, char *input, unsigned int len) { return RunStringF(id, input, len); } +IPQ_DLL_EXPORT int __stdcall setbasicfortrancallback(int *id, double (*cookie)(double *x1, double *x2, char *str, int l)) +{ + return SetBasicFortranCallbackF(id, cookie); +} IPQ_DLL_EXPORT int __stdcall setdumpfilename(int *id, char *filename, unsigned int len) { return SetDumpFileNameF(id, filename, len); @@ -244,10 +248,6 @@ IPQ_DLL_EXPORT int __stdcall setoutputfileon(int *id, int *output_on) { return SetOutputFileOnF(id, output_on); } -IPQ_DLL_EXPORT int __stdcall setfortranbasiccallback(int *id, double (*cookie)(double *x1, double *x2, char *str, int l)) -{ - return SetFortranBasicCallbackF(id, cookie); -} IPQ_DLL_EXPORT int __stdcall setoutputstringon(int *id, int *output_on) { return SetOutputStringOnF(id, output_on);