Merge remote-tracking branch 'origin/master' into YaSp 77/10577/3
Sylvestre Ledru [Fri, 22 Feb 2013 12:13:35 +0000 (13:13 +0100)]
Conflicts:
scilab/modules/console/src/c/windows/TermLine.c
scilab/modules/core/Makefile.am
scilab/modules/core/Makefile.in
scilab/modules/core/src/c/getversion.c
scilab/modules/dynamic_link/src/c/dynamic_link.c
scilab/modules/special_functions/includes/gw_special_functions.h
scilab/modules/string/sci_gateway/c/sci_strtod.c
scilab/modules/ui_data/includes/gw_ui_data.h
scilab/modules/ui_data/sci_gateway/c/gw_ui_data.c

Change-Id: Ie629eb0d79731447c2f2fc223eec2cb49034f5d4

28 files changed:
1  2 
scilab/modules/arnoldi/includes/gw_arnoldi.h
scilab/modules/arnoldi/sci_gateway/c/sci_dnaupd.c
scilab/modules/arnoldi/sci_gateway/c/sci_dneupd.c
scilab/modules/arnoldi/sci_gateway/c/sci_dsaupd.c
scilab/modules/arnoldi/sci_gateway/c/sci_dseupd.c
scilab/modules/arnoldi/sci_gateway/c/sci_eigs.c
scilab/modules/arnoldi/sci_gateway/c/sci_znaupd.c
scilab/modules/arnoldi/sci_gateway/c/sci_zneupd.c
scilab/modules/console/src/c/windows/TermLine.c
scilab/modules/core/Makefile.am
scilab/modules/core/Makefile.in
scilab/modules/core/src/c/getversion.c
scilab/modules/core/src/fortran/core_f.vfproj
scilab/modules/core/src/fortran/core_f2c.vcxproj
scilab/modules/core/src/fortran/core_f2c.vcxproj.filters
scilab/modules/graphic_export/graphic_export.vcxproj.filters
scilab/modules/graphic_export/sci_gateway/c/xs2file.c
scilab/modules/hdf5/sci_gateway/cpp/sci_import_from_hdf5.cpp
scilab/modules/hdf5/sci_gateway/cpp/sci_listvar_in_hdf5.cpp
scilab/modules/hdf5/src/c/h5_readDataFromFile.c
scilab/modules/special_functions/includes/gw_special_functions.h
scilab/modules/string/sci_gateway/cpp/sci_strtod.cpp
scilab/modules/ui_data/Makefile.am
scilab/modules/ui_data/Makefile.in
scilab/modules/ui_data/includes/gw_ui_data.h
scilab/modules/ui_data/sci_gateway/cpp/sci_closeEditvar.cpp
scilab/modules/ui_data/src/c/ui_data.vcxproj
scilab/modules/ui_data/src/c/ui_data.vcxproj.filters

  /*--------------------------------------------------------------------------*/
  ARNOLDI_IMPEXP int gw_arnoldi(void);
  /*--------------------------------------------------------------------------*/
- ARNOLDI_IMPEXP int sci_dsaupd(char *fname, unsigned long fname_len);
- ARNOLDI_IMPEXP int sci_dnaupd(char *fname, unsigned long fname_len);
- ARNOLDI_IMPEXP int sci_znaupd(char *fname, unsigned long fname_len);
- ARNOLDI_IMPEXP int sci_dseupd(char *fname, unsigned long fname_len);
- ARNOLDI_IMPEXP int sci_dneupd(char *fname, unsigned long fname_len);
- ARNOLDI_IMPEXP int sci_zneupd(char *fname, unsigned long fname_len);
 -ARNOLDI_IMPEXP int sci_dsaupd(char *fname,unsigned long fname_len);
 -ARNOLDI_IMPEXP int sci_dnaupd(char *fname,unsigned long fname_len);
 -ARNOLDI_IMPEXP int sci_znaupd(char *fname,unsigned long fname_len);
 -ARNOLDI_IMPEXP int sci_dseupd(char *fname,unsigned long fname_len);
 -ARNOLDI_IMPEXP int sci_dneupd(char *fname,unsigned long fname_len);
 -ARNOLDI_IMPEXP int sci_zneupd(char *fname,unsigned long fname_len);
 -ARNOLDI_IMPEXP int sci_eigs(char *fname,unsigned long fname_len);
++ARNOLDI_IMPEXP int sci_dsaupd(char *fname, void* pvApiCtx);
++ARNOLDI_IMPEXP int sci_dnaupd(char *fname, void* pvApiCtx);
++ARNOLDI_IMPEXP int sci_znaupd(char *fname, void* pvApiCtx);
++ARNOLDI_IMPEXP int sci_dseupd(char *fname, void* pvApiCtx);
++ARNOLDI_IMPEXP int sci_dneupd(char *fname, void* pvApiCtx);
++ARNOLDI_IMPEXP int sci_zneupd(char *fname, void* pvApiCtx);
 +ARNOLDI_IMPEXP int sci_eigs(char *fname, void* pvApiCtx);
  /*--------------------------------------------------------------------------*/
  #endif /* __GW_ARNOLDI_H__ */
  /*--------------------------------------------------------------------------*/
@@@ -24,22 -24,53 +24,53 @@@ extern int C2F(dnaupd)(int *ido, char *
                         double *workl, int *lworkl, int *info,
                         unsigned long bmat_len, unsigned long which_len);
  /*--------------------------------------------------------------------------*/
--int sci_dnaupd(char *fname, unsigned long fname_len)
++int sci_dnaupd(char *fname, void *pvApiCtx)
  {
-     int IDO,   mIDO,   nIDO,    pIDO;
-     int mBMAT,  nBMAT,   pBMAT;
-     int mN,     nN,      pN;
-     int mWHICH, nWHICH,  pWHICH;
-     int mNEV,   nNEV,    pNEV;
-     int mTOL,   nTOL,    pTOL;
-     int RESID, mRESID, nRESID,  pRESID;
-     int mNCV,   nNCV,    pNCV;
-     int V,     mV,     nV,      pV;
-     int IPARAM, mIPARAM, nIPARAM, pIPARAM;
-     int IPNTR, mIPNTR, nIPNTR,  pIPNTR;
-     int WORKD, mWORKD, nWORKD,  pWORKD;
-     int WORKL, mWORKL, nWORKL,  pWORKL;
-     int INFO,  mINFO,  nINFO,   pINFO;
+     SciErr sciErr;
+     int* piAddrpIDO     = NULL;
+     int* pIDO           = NULL;
+     int* piAddrpBMAT    = NULL;
+     char* pBMAT         = NULL;
+     int* piAddrpN       = NULL;
+     int* pN             = NULL;
+     int* piAddrpWHICH   = NULL;
+     char* pWHICH        = NULL;
+     int* piAddrpNEV     = NULL;
+     int* pNEV           = NULL;
+     int* piAddrpTOL     = NULL;
+     double* pTOL        = NULL;
+     int* piAddrpRESID   = NULL;
+     double* pRESID      = NULL;
+     int* piAddrpNCV     = NULL;
+     int* pNCV           = NULL;
+     int* piAddrpV       = NULL;
+     double* pV          = NULL;
+     int* piAddrpIPARAM  = NULL;
+     int* pIPARAM        = NULL;
+     int* piAddrpIPNTR   = NULL;
+     int* pIPNTR         = NULL;
+     int* piAddrpWORKD   = NULL;
+     double* pWORKD      = NULL;
+     int* piAddrpWORKL   = NULL;
+     double* pWORKL      = NULL;
+     int* piAddrpINFO    = NULL;
+     int* pINFO          = NULL;
+     int IDO,   mIDO,   nIDO;
+     int mBMAT,  nBMAT;
+     int mN,     nN;
+     int mWHICH, nWHICH;
+     int mNEV,   nNEV;
+     int mTOL,   nTOL;
+     int RESID, mRESID, nRESID;
+     int mNCV,   nNCV;
+     int V,     mV,     nV;
+     int IPARAM, mIPARAM, nIPARAM;
+     int IPNTR, mIPNTR, nIPNTR;
+     int WORKD, mWORKD, nWORKD;
+     int WORKL, mWORKL, nWORKL;
+     int INFO,  mINFO,  nINFO;
  
      int minlhs = 1, minrhs = 14, maxlhs = 8, maxrhs = 14;
      int LDV, LWORKL;
@@@ -25,30 -25,77 +25,77 @@@ extern int C2F(dneupd)(int *rvec, char 
                         int *ncv, double *v, int *ldv, int *iparam, int *ipntr,
                         double *workd, double *workl, int *lworkl, int *info);
  /*--------------------------------------------------------------------------*/
--int sci_dneupd(char *fname, unsigned long fname_len)
++int sci_dneupd(char *fname, void *pvApiCtx)
  {
-     int mRVEC,     nRVEC,      pRVEC;
-     int mHOWMANY,  nHOWMANY,   pHOWMANY;
-     int mSELECT,   nSELECT,    pSELECT;
-     int Dr,       mDr,       nDr,        pDr;
-     int Di,       mDi,       nDi,        pDi;
-     int Z,        mZ,        nZ,         pZ;
-     int mSIGMAr,   nSIGMAr,    pSIGMAr;
-     int mSIGMAi,   nSIGMAi,    pSIGMAi;
-     int mWORKev,   nWORKev,    pWORKev;
-     int mBMAT,     nBMAT,      pBMAT;
-     int mN,        nN,         pN;
-     int mWHICH,    nWHICH,     pWHICH;
-     int mNEV,      nNEV,       pNEV;
-     int mTOL,      nTOL,       pTOL;
-     int RESID,    mRESID,    nRESID,     pRESID;
-     int mNCV,      nNCV,       pNCV;
-     int V,        mV,        nV,         pV;
-     int IPARAM,   mIPARAM,   nIPARAM,    pIPARAM;
-     int IPNTR,    mIPNTR,    nIPNTR,     pIPNTR;
-     int WORKD,    mWORKD,    nWORKD,     pWORKD;
-     int WORKL,    mWORKL,    nWORKL,     pWORKL;
-     int INFO,     mINFO,     nINFO,      pINFO;
+     SciErr sciErr;
+     int* piAddrpRVEC    = NULL;
+     int* pRVEC          = NULL;
+     int* piAddrpHOWMANY = NULL;
+     char* pHOWMANY      = NULL;
+     int* piAddrpSELECT  = NULL;
+     int* pSELECT        = NULL;
+     int* piAddrpDr      = NULL;
+     double* pDr         = NULL;
+     int* piAddrpDi      = NULL;
+     double* pDi         = NULL;
+     int* piAddrpZ       = NULL;
+     double* pZ          = NULL;
+     int* piAddrpSIGMAr  = NULL;
+     double* pSIGMAr     = NULL;
+     int* piAddrpSIGMAi  = NULL;
+     double* pSIGMAi     = NULL;
+     int* piAddrpWORKev  = NULL;
+     double* pWORKev     = NULL;
+     int* piAddrpBMAT    = NULL;
+     char* pBMAT         = NULL;
+     int* piAddrpN       = NULL;
+     int* pN             = NULL;
+     int* piAddrpWHICH   = NULL;
+     char* pWHICH        = NULL;
+     int* piAddrpNEV     = NULL;
+     int* pNEV           = NULL;
+     int* piAddrpTOL     = NULL;
+     double* pTOL        = NULL;
+     int* piAddrpRESID   = NULL;
+     double* pRESID      = NULL;
+     int* piAddrpNCV     = NULL;
+     int* pNCV           = NULL;
+     int* piAddrpV       = NULL;
+     double* pV          = NULL;
+     int* piAddrpIPARAM  = NULL;
+     int* pIPARAM        = NULL;
+     int* piAddrpIPNTR   = NULL;
+     int* pIPNTR         = NULL;
+     int* piAddrpWORKD   = NULL;
+     double* pWORKD      = NULL;
+     int* piAddrpWORKL   = NULL;
+     double* pWORKL      = NULL;
+     int* piAddrpINFO    = NULL;
+     int* pINFO          = NULL;
+     int mRVEC,     nRVEC;
+     int mHOWMANY,  nHOWMANY;
+     int mSELECT,   nSELECT;
+     int Dr,        mDr,       nDr;
+     int Di,        mDi,       nDi;
+     int Z,         mZ,        nZ;
+     int mSIGMAr,   nSIGMAr;
+     int mSIGMAi,   nSIGMAi;
+     int mWORKev,   nWORKev;
+     int mBMAT,     nBMAT;
+     int mN,        nN;
+     int mWHICH,    nWHICH;
+     int mNEV,      nNEV;
+     int mTOL,      nTOL;
+     int RESID,    mRESID,    nRESID;
+     int mNCV,      nNCV;
+     int V,        mV,        nV;
+     int IPARAM,   mIPARAM,   nIPARAM;
+     int IPNTR,    mIPNTR,    nIPNTR;
+     int WORKD,    mWORKD,    nWORKD;
+     int WORKL,    mWORKL,    nWORKL;
+     int INFO,     mINFO,     nINFO;
  
      int minlhs = 1, minrhs = 22, maxlhs = 10, maxrhs = 22;
      int LDZ, LDV, LWORKL;
@@@ -23,22 -23,53 +23,53 @@@ extern int C2F(dsaupd)(int *ido, char *
                         int *ldv, int *iparam, int *ipntr, double *workd,
                         double *workl, int *lworkl, int *info);
  /*--------------------------------------------------------------------------*/
--int sci_dsaupd(char *fname, unsigned long fname_len)
++int sci_dsaupd(char *fname, void *pvApiCtx)
  {
-     int IDO,   mIDO,   nIDO,    pIDO;
-     int mBMAT,  nBMAT,   pBMAT;
-     int mN,     nN,      pN;
-     int mWHICH, nWHICH,  pWHICH;
-     int mNEV,   nNEV,    pNEV;
-     int mTOL,   nTOL,    pTOL;
-     int RESID, mRESID, nRESID,  pRESID;
-     int mNCV,   nNCV,    pNCV;
-     int V,     mV,     nV,      pV;
-     int IPARAM, mIPARAM, nIPARAM, pIPARAM;
-     int IPNTR, mIPNTR, nIPNTR,  pIPNTR;
-     int WORKD, mWORKD, nWORKD,  pWORKD;
-     int WORKL, mWORKL, nWORKL,  pWORKL;
-     int INFO,  mINFO,  nINFO,   pINFO;
+     SciErr sciErr;
+     int* piAddrpIDO     = NULL;
+     int* pIDO           = NULL;
+     int* piAddrpBMAT    = NULL;
+     char* pBMAT         = NULL;
+     int* piAddrpN       = NULL;
+     int* pN             = NULL;
+     int* piAddrpWHICH   = NULL;
+     char* pWHICH        = NULL;
+     int* piAddrpNEV     = NULL;
+     int* pNEV           = NULL;
+     int* piAddrpTOL     = NULL;
+     double* pTOL        = NULL;
+     int* piAddrpRESID   = NULL;
+     double* pRESID      = NULL;
+     int* piAddrpNCV     = NULL;
+     int* pNCV           = NULL;
+     int* piAddrpV       = NULL;
+     double* pV          = NULL;
+     int* piAddrpIPARAM  = NULL;
+     int* pIPARAM        = NULL;
+     int* piAddrpIPNTR   = NULL;
+     int* pIPNTR         = NULL;
+     int* piAddrpWORKD   = NULL;
+     double* pWORKD      = NULL;
+     int* piAddrpWORKL   = NULL;
+     double* pWORKL      = NULL;
+     int* piAddrpINFO    = NULL;
+     int* pINFO          = NULL;
+     int IDO,   mIDO,   nIDO;
+     int mBMAT,  nBMAT;
+     int mN,     nN;
+     int mWHICH, nWHICH;
+     int mNEV,   nNEV;
+     int mTOL,   nTOL;
+     int RESID, mRESID, nRESID;
+     int mNCV,   nNCV;
+     int V,     mV,     nV;
+     int IPARAM, mIPARAM, nIPARAM;
+     int IPNTR, mIPNTR, nIPNTR;
+     int WORKD, mWORKD, nWORKD;
+     int WORKL, mWORKL, nWORKL;
+     int INFO,  mINFO,  nINFO;
  
      int minlhs = 1, minrhs = 14, maxlhs = 8, maxrhs = 14;
      int LDV, LWORKL;
@@@ -27,27 -27,68 +27,68 @@@ extern int C2F(dseupd)(int *rvec, char 
                         unsigned long howmany_length,
                         unsigned long bmat_length, unsigned long which_len);
  /*--------------------------------------------------------------------------*/
--int sci_dseupd(char *fname, unsigned long fname_len)
++int sci_dseupd(char *fname, void *pvApiCtx)
  {
-     int mRVEC,     nRVEC,      pRVEC;
-     int mHOWMANY,  nHOWMANY,   pHOWMANY;
-     int mSELECT,   nSELECT,    pSELECT;
-     int D,        mD,        nD,         pD;
-     int Z,        mZ,        nZ,         pZ;
-     int mSIGMA,    nSIGMA,     pSIGMA;
-     int mBMAT,     nBMAT,      pBMAT;
-     int mN,        nN,         pN;
-     int mWHICH,    nWHICH,     pWHICH;
-     int mNEV,      nNEV,       pNEV;
-     int mTOL,      nTOL,       pTOL;
-     int RESID,    mRESID,    nRESID,     pRESID;
-     int mNCV,      nNCV,       pNCV;
-     int V,        mV,        nV,         pV;
-     int IPARAM,   mIPARAM,   nIPARAM,    pIPARAM;
-     int IPNTR,    mIPNTR,    nIPNTR,     pIPNTR;
-     int WORKD,    mWORKD,    nWORKD,     pWORKD;
-     int WORKL,    mWORKL,    nWORKL,     pWORKL;
-     int INFO,     mINFO,     nINFO,      pINFO;
+     SciErr sciErr;
+     int* piAddrpRVEC    = NULL;
+     int* pRVEC          = NULL;
+     int* piAddrpHOWMANY = NULL;
+     char* pHOWMANY      = NULL;
+     int* piAddrpSELECT  = NULL;
+     int* pSELECT        = NULL;
+     int* piAddrpD       = NULL;
+     double* pD          = NULL;
+     int* piAddrpZ       = NULL;
+     double* pZ          = NULL;
+     int* piAddrpSIGMA   = NULL;
+     double* pSIGMA      = NULL;
+     int* piAddrpBMAT    = NULL;
+     char* pBMAT         = NULL;
+     int* piAddrpN       = NULL;
+     int* pN             = NULL;
+     int* piAddrpWHICH   = NULL;
+     char* pWHICH        = NULL;
+     int* piAddrpNEV     = NULL;
+     int* pNEV           = NULL;
+     int* piAddrpTOL     = NULL;
+     double* pTOL        = NULL;
+     int* piAddrpRESID   = NULL;
+     double* pRESID      = NULL;
+     int* piAddrpNCV     = NULL;
+     int* pNCV           = NULL;
+     int* piAddrpV       = NULL;
+     double* pV          = NULL;
+     int* piAddrpIPARAM  = NULL;
+     int* pIPARAM        = NULL;
+     int* piAddrpIPNTR   = NULL;
+     int* pIPNTR         = NULL;
+     int* piAddrpWORKD   = NULL;
+     double* pWORKD      = NULL;
+     int* piAddrpWORKL   = NULL;
+     double* pWORKL      = NULL;
+     int* piAddrpINFO    = NULL;
+     int* pINFO          = NULL;
+     int mRVEC,     nRVEC;
+     int mHOWMANY,  nHOWMANY;
+     int mSELECT,   nSELECT;
+     int D,        mD,        nD;
+     int Z,        mZ,        nZ;
+     int mSIGMA,    nSIGMA;
+     int mBMAT,     nBMAT;
+     int mN,        nN;
+     int mWHICH,    nWHICH;
+     int mNEV,      nNEV;
+     int mTOL,      nTOL;
+     int RESID,    mRESID,    nRESID;
+     int mNCV,      nNCV;
+     int V,        mV,        nV;
+     int IPARAM,   mIPARAM,   nIPARAM;
+     int IPNTR,    mIPNTR,    nIPNTR;
+     int WORKD,    mWORKD,    nWORKD;
+     int WORKL,    mWORKL,    nWORKL;
+     int INFO,     mINFO,     nINFO;
  
      int minlhs = 1, minrhs = 19, maxlhs = 9, maxrhs = 19;
      int LDZ, LDV, LWORKL;
  #include "MALLOC.h"
  #include "eigs.h"
  
 -int sci_eigs(char *fname, unsigned long fname_len)
 +int sci_eigs(char *fname, void* pvApiCtx)
  {
+     SciErr sciErr;
      int *piAddressVarOne      = NULL;
      int iRowsOne                      = 0;
      int iColsOne                      = 0;
  
  #include <math.h>
  #include <string.h>
- #include "stack-c.h"
+ #include "api_scilab.h"
  #include "core_math.h"
  #include "gw_arnoldi.h"
 +#include "doublecomplex.h"
  #include "localization.h"
  #include "Scierror.h"
  /*--------------------------------------------------------------------------*/
@@@ -26,23 -25,57 +26,57 @@@ extern int C2F(znaupd)(int * ido, char 
                         doublecomplex * workl, int * lworkl, double * rwork,
                         int * info);
  /*--------------------------------------------------------------------------*/
--int sci_znaupd(char *fname, unsigned long fname_len)
++int sci_znaupd(char *fname, void *pvApiCtx)
  {
-     int IDO,   mIDO,   nIDO,    pIDO;
-     int mBMAT,  nBMAT,   pBMAT;
-     int mN,     nN,      pN;
-     int mWHICH, nWHICH,  pWHICH;
-     int mNEV,   nNEV,    pNEV;
-     int mTOL,   nTOL,    pTOL;
-     int RESID, mRESID, nRESID,  pRESID;
-     int mNCV,   nNCV,    pNCV;
-     int V,     mV,     nV,      pV;
-     int IPARAM, mIPARAM, nIPARAM, pIPARAM;
-     int IPNTR, mIPNTR, nIPNTR,  pIPNTR;
-     int WORKD, mWORKD, nWORKD,  pWORKD;
-     int WORKL, mWORKL, nWORKL,  pWORKL;
-     int RWORK, mRWORK, nRWORK,  pRWORK;
-     int INFO,  mINFO,  nINFO,   pINFO;
+     SciErr sciErr;
+     int* piAddrpIDO     = NULL;
+     int* pIDO           = NULL;
+     int* piAddrpBMAT    = NULL;
+     char* pBMAT         = NULL;
+     int* piAddrpN       = NULL;
+     int* pN             = NULL;
+     int* piAddrpWHICH   = NULL;
+     char* pWHICH        = NULL;
+     int* piAddrpNEV     = NULL;
+     int* pNEV           = NULL;
+     int* piAddrpTOL     = NULL;
+     double* pTOL        = NULL;
+     int* piAddrpNCV     = NULL;
+     int* pNCV           = NULL;
+     int* piAddrpIPARAM  = NULL;
+     int* pIPARAM        = NULL;
+     int* piAddrpIPNTR   = NULL;
+     int* pIPNTR         = NULL;
+     int* piAddrpRWORK   = NULL;
+     double* pRWORK      = NULL;
+     int* piAddrpINFO    = NULL;
+     int* pINFO          = NULL;
+     int* piAddrpV       = NULL;
+     doublecomplex* pV       = NULL;
+     int* piAddrpRESID       = NULL;
+     doublecomplex* pRESID   = NULL;
+     int* piAddrpWORKD       = NULL;
+     doublecomplex* pWORKD   = NULL;
+     int* piAddrpWORKL       = NULL;
+     doublecomplex* pWORKL   = NULL;
+     int IDO,   mIDO,   nIDO;
+     int mBMAT,  nBMAT;
+     int mN,     nN;
+     int mWHICH, nWHICH;
+     int mNEV,   nNEV;
+     int mTOL,   nTOL;
+     int RESID, mRESID, nRESID;
+     int mNCV,   nNCV;
+     int V,     mV,     nV;
+     int IPARAM, mIPARAM, nIPARAM;
+     int IPNTR, mIPNTR, nIPNTR;
+     int WORKD, mWORKD, nWORKD;
+     int WORKL, mWORKL, nWORKL;
+     int RWORK, mRWORK, nRWORK;
+     int INFO,  mINFO,  nINFO;
  
      int minlhs = 1, minrhs = 15, maxlhs = 9, maxrhs = 15;
      int LDV, LWORKL;
  
  #include <math.h>
  #include <string.h>
- #include "stack-c.h"
+ #include "api_scilab.h"
  #include "gw_arnoldi.h"
  #include "core_math.h"
 +#include "doublecomplex.h"
  #include "localization.h"
  #include "Scierror.h"
  /*--------------------------------------------------------------------------*/
@@@ -28,29 -27,75 +28,75 @@@ extern int C2F(zneupd)(int * rvec, cha
                         doublecomplex * workd, doublecomplex * workl,
                         int * lworkl, double * rwork, int * info);
  /*--------------------------------------------------------------------------*/
--int sci_zneupd(char *fname, unsigned long fname_len)
++int sci_zneupd(char *fname, void *pvApiCtx)
  {
-     int mRVEC,     nRVEC,      pRVEC;
-     int mHOWMANY,  nHOWMANY,   pHOWMANY;
-     int mSELECT,   nSELECT,    pSELECT;
-     int D,        mD,        nD,         pD;
-     int Z,        mZ,        nZ,         pZ;
-     int mSIGMA,    nSIGMA,     pSIGMA;
-     int mWORKev,   nWORKev,    pWORKev;
-     int mBMAT,     nBMAT,      pBMAT;
-     int mN,        nN,         pN;
-     int mWHICH,    nWHICH,     pWHICH;
-     int mNEV,      nNEV,       pNEV;
-     int mTOL,      nTOL,       pTOL;
-     int RESID,    mRESID,    nRESID,     pRESID;
-     int mNCV,      nNCV,       pNCV;
-     int mV,        nV,         pV;
-     int IPARAM,   mIPARAM,   nIPARAM,    pIPARAM;
-     int IPNTR,    mIPNTR,    nIPNTR,     pIPNTR;
-     int WORKD,    mWORKD,    nWORKD,     pWORKD;
-     int WORKL,    mWORKL,    nWORKL,     pWORKL;
-     int RWORK,    mRWORK,    nRWORK,     pRWORK;
-     int INFO,     mINFO,     nINFO,      pINFO;
+     SciErr sciErr;
+     int* piAddrpRVEC    = NULL;
+     int* pRVEC          = NULL;
+     int* piAddrpHOWMANY = NULL;
+     char* pHOWMANY      = NULL;
+     int* piAddrpSELECT  = NULL;
+     int* pSELECT        = NULL;
+     int* piAddrpBMAT    = NULL;
+     char* pBMAT         = NULL;
+     int* piAddrpN       = NULL;
+     int* pN             = NULL;
+     int* piAddrpWHICH   = NULL;
+     char* pWHICH        = NULL;
+     int* piAddrpNEV     = NULL;
+     int* pNEV           = NULL;
+     int* piAddrpTOL     = NULL;
+     double* pTOL        = NULL;
+     int* piAddrpNCV     = NULL;
+     int* pNCV           = NULL;
+     int* piAddrpIPARAM  = NULL;
+     int* pIPARAM        = NULL;
+     int* piAddrpIPNTR   = NULL;
+     int* pIPNTR         = NULL;
+     int* piAddrpRWORK   = NULL;
+     double* pRWORK      = NULL;
+     int* piAddrpINFO    = NULL;
+     int* pINFO          = NULL;
+     int* piAddrpD           = NULL;
+     doublecomplex* pD       = NULL;
+     int* piAddrpZ           = NULL;
+     doublecomplex* pZ       = NULL;
+     int* piAddrpSIGMA       = NULL;
+     doublecomplex* pSIGMA   = NULL;
+     int* piAddrpWORKev      = NULL;
+     doublecomplex* pWORKev  = NULL;
+     int* piAddrpRESID       = NULL;
+     doublecomplex* pRESID   = NULL;
+     int* piAddrpWORKD       = NULL;
+     doublecomplex* pV       = NULL;
+     int* piAddrpV           = NULL;
+     doublecomplex* pWORKD   = NULL;
+     int* piAddrpWORKL       = NULL;
+     doublecomplex* pWORKL   = NULL;
+     int mRVEC,     nRVEC;
+     int mHOWMANY,  nHOWMANY;
+     int mSELECT,   nSELECT;
+     int D,        mD,        nD;
+     int Z,        mZ,        nZ;
+     int mSIGMA,    nSIGMA;
+     int mWORKev,   nWORKev;
+     int mBMAT,     nBMAT;
+     int mN,        nN;
+     int mWHICH,    nWHICH;
+     int mNEV,      nNEV;
+     int mTOL,      nTOL;
+     int RESID,    mRESID,    nRESID;
+     int mNCV,      nNCV;
+     int mV,        nV;
+     int IPARAM,   mIPARAM,   nIPARAM;
+     int IPNTR,    mIPNTR,    nIPNTR;
+     int WORKD,    mWORKD,    nWORKD;
+     int WORKL,    mWORKL,    nWORKL;
+     int RWORK,    mRWORK,    nRWORK;
+     int INFO,     mINFO,     nINFO;
  
      int minlhs = 1, minrhs = 21, maxlhs = 9, maxrhs = 21;
      int LDZ, LDV, LWORKL;
  #include "TermConsole.h"
  #include "localization.h"
  #include "MALLOC.h"
 -#include "strdup_windows.h"
  #include "TermPosition.h"
  #include "../../../windows_tools/src/c/scilab_windows/console.h"
 -#include "strdup_windows.h"
 +#include "os_strdup.h"
  /*--------------------------------------------------------------------------*/
  static int CURRENT_MAX_LINE_SIZE = bsiz;
- static char *cur_line = NULL; /* current contents of the line */      
+ static char *cur_line = NULL; /* current contents of the line */
  static char *currentPrompt = NULL;
  static int cur_pos = 0;               /* current position of the cursor */
  static int max_pos = 0;
@@@ -374,41 -415,44 +414,44 @@@ void displayPrompt(void
  /*--------------------------------------------------------------------------*/
  char *getCurrentLine(void)
  {
-       char *line = NULL;
+     char *line = NULL;
  
-       reallocLineBuffer();
+     reallocLineBuffer();
  
-       cur_line[max_pos + 1] = '\0';
-       line = os_strdup(cur_line);
-       if (line) OemToChar(cur_line, line);
-       return line;
+     cur_line[max_pos + 1] = '\0';
 -    line = strdup_windows(cur_line);
++    line = os_strdup(cur_line);
+     if (line)
+     {
+         OemToChar(cur_line, line);
+     }
+     return line;
  }
  /*--------------------------------------------------------------------------*/
  char *getLineBeforeCaret(void)
  {
-       char *line = NULL;
+     char *line = NULL;
  
-       reallocLineBuffer();
-       line = os_strdup(cur_line);
-       line[cur_pos] = '\0';
-       return line;
+     reallocLineBuffer();
 -    line = strdup_windows(cur_line);
++    line = os_strdup(cur_line);
+     line[cur_pos] = '\0';
+     return line;
  }
  /*--------------------------------------------------------------------------*/
  char *getLineAfterCaret(void)
  {
-       char *line = NULL;
-       reallocLineBuffer();
-       if (cur_pos != max_pos)
-       {
-               line = os_strdup(&cur_line[cur_pos]);
-               line[(max_pos - cur_pos) + 1] = '\0';
-       }
-       else
-       {
-               line = os_strdup("");
-       }
-       return line;
+     char *line = NULL;
+     reallocLineBuffer();
+     if (cur_pos != max_pos)
+     {
 -        line = strdup_windows(&cur_line[cur_pos]);
++        line = os_strdup(&cur_line[cur_pos]);
+         line[(max_pos - cur_pos) + 1] = '\0';
+     }
+     else
+     {
 -        line = strdup_windows("");
++        line = os_strdup("");
+     }
+     return line;
  }
  /*--------------------------------------------------------------------------*/
  void addCharacterCurrentLine(unsigned char ch)
@@@ -156,7 -183,10 +157,8 @@@ src/fortran/ptrback.f 
  src/fortran/getch.f \
  src/fortran/ftob.f \
  src/fortran/seteol.f \
 -src/fortran/basin.f \
 -src/fortran/clause.f \
  src/fortran/compcl.f \
+ src/fortran/termf.f \
  src/fortran/expsum.f \
  src/fortran/copyvar.f \
  src/fortran/putid.f \
@@@ -163,52 -169,57 +163,53 @@@ am__libscicore_algo_la_SOURCES_DIST = s
        src/c/callFunctionFromGateway.c src/c/getvariablesname.c \
        src/c/commandwords.c src/c/freeArrayOfString.c \
        src/c/getstaticdebuginfo.c src/c/getdynamicdebuginfo.c \
 -      src/c/callDynamicGateway.c src/c/gw_dynamic_generic.c \
 -      src/c/dynamic_gateways.c src/c/readGateway.c \
 -      src/c/comparehandles.c src/c/setPrecisionFPU.c \
 -      src/c/LaunchScilabSignal.c src/c/getos.c src/c/mode_exec.c \
 -      src/c/predef.c src/c/transposeMatrix.c \
 -      src/c/recursionFunction.c src/c/typename.c \
 -      src/c/inittypenames.c src/c/funcprot.c src/c/eqid.c \
 -      src/c/exitCodeValue.c src/c/getversion.c \
 +      src/c/gw_dynamic_generic.c src/c/dynamic_gateways.c \
 +      src/c/readGateway.c src/c/comparehandles.c \
 +      src/c/setPrecisionFPU.c src/c/LaunchScilabSignal.c \
 +      src/c/getos.c src/c/mode_exec.c src/c/predef.c \
 +      src/c/transposeMatrix.c src/c/recursionFunction.c \
 +      src/c/typename.c src/c/inittypenames.c src/c/funcprot.c \
 +      src/c/eqid.c src/c/exitCodeValue.c src/c/getversion.c \
        src/c/dynamic_tclsci.c src/c/dynamic_parallel.c \
 -      src/c/storeCommand.c src/c/backtrace.c src/c/signal_mgmt.c \
 -      src/c/suspendProcess.c src/c/windowsChangeManagement.c \
 -      src/c/setieee.c src/c/setlines.c src/c/setformat.c \
 -      src/c/InitializePreferences.c src/c/sci_tools.c \
 -      src/c/scimem64.c src/cpp/hashtable_core.cpp src/cpp/namstr.cpp \
 +      src/c/backtrace.c src/c/signal_mgmt.c src/c/suspendProcess.c \
 +      src/c/windowsChangeManagement.c src/c/setlines.c \
 +      src/c/setformat.c src/c/InitializePreferences.c \
 +      src/c/scimem64.c src/cpp/core_gw.cpp \
 +      src/cpp/hashtable_core.cpp src/cpp/namstr.cpp \
        src/cpp/search_functions.cpp src/cpp/demangle.cpp \
 -      src/cpp/backtrace_print.cpp src/fortran/clunit.f \
 -      src/fortran/getlin.f src/fortran/allowptr.f \
 -      src/fortran/isany.f src/fortran/hmcreate.f src/fortran/nextj.f \
 +      src/cpp/backtrace_print.cpp src/cpp/storeCommand.cpp \
 +      src/cpp/banner.cpp src/cpp/with_module.cpp src/cpp/runner.cpp \
 +      src/fortran/clunit.f src/fortran/getlin.f \
 +      src/fortran/allowptr.f src/fortran/isany.f \
 +      src/fortran/hmcreate.f src/fortran/nextj.f \
        src/fortran/setgetmode.f src/fortran/showstack.f \
 -      src/fortran/misops.f src/fortran/iseye.f \
        src/fortran/setippty.f src/fortran/compil.f \
-       src/fortran/funnam.f src/fortran/cmdstr.f \
+       src/fortran/funnam.f src/fortran/isnum.f src/fortran/cmdstr.f \
        src/fortran/hndlops.f src/fortran/cmplxt.f \
        src/fortran/skpins.f src/fortran/folhp.f src/fortran/cvname.f \
 -      src/fortran/funs.f src/fortran/fact.f src/fortran/typ2cod.f \
 -      src/fortran/prompt.f src/fortran/intstr.f \
 -      src/fortran/createref.f src/fortran/btof.f \
 -      src/fortran/getnum.f src/fortran/btofm.f src/fortran/getsym.f \
 -      src/fortran/findequal.f src/fortran/stackg.f \
 -      src/fortran/find.f src/fortran/setlnb.f src/fortran/mrknmd.f \
 -      src/fortran/stackgl.f src/fortran/allops.f src/fortran/mname.f \
 -      src/fortran/command.f src/fortran/ref2val.f \
 -      src/fortran/stack.f src/fortran/isbrk.f src/fortran/xerbla.f \
 -      src/fortran/dtosci.f src/fortran/bexec.f \
 -      src/fortran/varfunptr.f src/fortran/getfun.f \
 -      src/fortran/savlod.f src/fortran/error.f src/fortran/cvdm.f \
 -      src/fortran/tradsl.f src/fortran/mkindx.f src/fortran/whatln.f \
 -      src/fortran/errmgr.f src/fortran/defmat.f src/fortran/mklist.f \
 -      src/fortran/sigbas.f src/fortran/indxg.f src/fortran/istrue.f \
 -      src/fortran/inisci.f src/fortran/ptover.f \
 -      src/fortran/getfunction.f src/fortran/stackp.f \
 -      src/fortran/dbasin.f src/fortran/macro.f src/fortran/extlarg.f \
 +      src/fortran/typ2cod.f src/fortran/prompt.f \
 +      src/fortran/intstr.f src/fortran/createref.f \
 +      src/fortran/btof.f src/fortran/getnum.f src/fortran/btofm.f \
 +      src/fortran/getsym.f src/fortran/findequal.f \
 +      src/fortran/stackg.f src/fortran/find.f src/fortran/setlnb.f \
 +      src/fortran/mrknmd.f src/fortran/ref2val.f src/fortran/stack.f \
 +      src/fortran/isbrk.f src/fortran/xerbla.f src/fortran/dtosci.f \
 +      src/fortran/bexec.f src/fortran/varfunptr.f \
 +      src/fortran/getfun.f src/fortran/savlod.f src/fortran/error.f \
 +      src/fortran/cvdm.f src/fortran/tradsl.f src/fortran/mkindx.f \
 +      src/fortran/whatln.f src/fortran/errmgr.f src/fortran/defmat.f \
 +      src/fortran/mklist.f src/fortran/sigbas.f src/fortran/indxg.f \
 +      src/fortran/istrue.f src/fortran/inisci.f \
 +      src/fortran/getfunction.f src/fortran/extlarg.f \
        src/fortran/getstr.f src/fortran/cvwm.f \
        src/fortran/storeglobal.f src/fortran/lst2vars.f \
        src/fortran/basnms.f src/fortran/ptrback.f src/fortran/getch.f \
 -      src/fortran/ftob.f src/fortran/seteol.f src/fortran/basin.f \
 -      src/fortran/clause.f src/fortran/compcl.f src/fortran/termf.f \
 -      src/fortran/expsum.f src/fortran/copyvar.f src/fortran/putid.f \
 -      src/fortran/itosci.f src/fortran/stackr2d.f \
 -      src/fortran/stacki2d.f src/fortran/stackc2i.f \
 -      src/fortran/isinstring.f src/fortran/relocstack.f
 +      src/fortran/ftob.f src/fortran/seteol.f src/fortran/compcl.f \
-       src/fortran/expsum.f src/fortran/copyvar.f src/fortran/putid.f \
-       src/fortran/itosci.f src/fortran/stackr2d.f \
-       src/fortran/stacki2d.f src/fortran/stackc2i.f \
-       src/fortran/isinstring.f src/fortran/relocstack.f
++      src/fortran/termf.f src/fortran/expsum.f src/fortran/copyvar.f \
++      src/fortran/putid.f src/fortran/itosci.f \
++      src/fortran/stackr2d.f src/fortran/stacki2d.f \
++      src/fortran/stackc2i.f src/fortran/isinstring.f \
++      src/fortran/relocstack.f
  @USE_DYNAMIC_STACK_TRUE@am__objects_1 =  \
  @USE_DYNAMIC_STACK_TRUE@      libscicore_algo_la-scimem64.lo
  am__objects_2 = libscicore_algo_la-inffic.lo \
@@@ -268,24 -295,24 +269,25 @@@ am__objects_3 = libscicore_algo_la-core
        libscicore_algo_la-namstr.lo \
        libscicore_algo_la-search_functions.lo \
        libscicore_algo_la-demangle.lo \
 -      libscicore_algo_la-backtrace_print.lo
 +      libscicore_algo_la-backtrace_print.lo \
 +      libscicore_algo_la-storeCommand.lo \
 +      libscicore_algo_la-banner.lo libscicore_algo_la-with_module.lo \
 +      libscicore_algo_la-runner.lo
  @USE_DYNAMIC_STACK_TRUE@am__objects_4 = relocstack.lo
  am__objects_5 = clunit.lo getlin.lo allowptr.lo isany.lo hmcreate.lo \
 -      nextj.lo setgetmode.lo showstack.lo misops.lo iseye.lo \
 -      setippty.lo compil.lo funnam.lo isnum.lo cmdstr.lo hndlops.lo \
 -      cmplxt.lo skpins.lo folhp.lo cvname.lo funs.lo fact.lo \
 -      typ2cod.lo prompt.lo intstr.lo createref.lo btof.lo getnum.lo \
 -      btofm.lo getsym.lo findequal.lo stackg.lo find.lo setlnb.lo \
 -      mrknmd.lo stackgl.lo allops.lo mname.lo command.lo ref2val.lo \
 -      stack.lo isbrk.lo xerbla.lo dtosci.lo bexec.lo varfunptr.lo \
 -      getfun.lo savlod.lo error.lo cvdm.lo tradsl.lo mkindx.lo \
 -      whatln.lo errmgr.lo defmat.lo mklist.lo sigbas.lo indxg.lo \
 -      istrue.lo inisci.lo ptover.lo getfunction.lo stackp.lo \
 -      dbasin.lo macro.lo extlarg.lo getstr.lo cvwm.lo storeglobal.lo \
 +      nextj.lo setgetmode.lo showstack.lo setippty.lo compil.lo \
-       funnam.lo cmdstr.lo hndlops.lo cmplxt.lo skpins.lo folhp.lo \
-       cvname.lo typ2cod.lo prompt.lo intstr.lo createref.lo btof.lo \
-       getnum.lo btofm.lo getsym.lo findequal.lo stackg.lo find.lo \
-       setlnb.lo mrknmd.lo ref2val.lo stack.lo isbrk.lo xerbla.lo \
-       dtosci.lo bexec.lo varfunptr.lo getfun.lo savlod.lo error.lo \
-       cvdm.lo tradsl.lo mkindx.lo whatln.lo errmgr.lo defmat.lo \
-       mklist.lo sigbas.lo indxg.lo istrue.lo inisci.lo \
++      funnam.lo isnum.lo cmdstr.lo hndlops.lo cmplxt.lo skpins.lo \
++      folhp.lo cvname.lo typ2cod.lo prompt.lo intstr.lo createref.lo \
++      btof.lo getnum.lo btofm.lo getsym.lo findequal.lo stackg.lo \
++      find.lo setlnb.lo mrknmd.lo ref2val.lo stack.lo isbrk.lo \
++      xerbla.lo dtosci.lo bexec.lo varfunptr.lo getfun.lo savlod.lo \
++      error.lo cvdm.lo tradsl.lo mkindx.lo whatln.lo errmgr.lo \
++      defmat.lo mklist.lo sigbas.lo indxg.lo istrue.lo inisci.lo \
 +      getfunction.lo extlarg.lo getstr.lo cvwm.lo storeglobal.lo \
        lst2vars.lo basnms.lo ptrback.lo getch.lo ftob.lo seteol.lo \
-       compcl.lo expsum.lo copyvar.lo putid.lo itosci.lo stackr2d.lo \
-       stacki2d.lo stackc2i.lo isinstring.lo $(am__objects_4)
 -      basin.lo clause.lo compcl.lo termf.lo expsum.lo copyvar.lo \
 -      putid.lo itosci.lo stackr2d.lo stacki2d.lo stackc2i.lo \
 -      isinstring.lo $(am__objects_4)
++      compcl.lo termf.lo expsum.lo copyvar.lo putid.lo itosci.lo \
++      stackr2d.lo stacki2d.lo stackc2i.lo isinstring.lo \
++      $(am__objects_4)
  am_libscicore_algo_la_OBJECTS = $(am__objects_2) $(am__objects_3) \
        $(am__objects_5)
  libscicore_algo_la_OBJECTS = $(am_libscicore_algo_la_OBJECTS)
@@@ -684,107 -707,116 +686,108 @@@ CORE_FORTRAN_SOURCES = src/fortran/clun
        src/fortran/allowptr.f src/fortran/isany.f \
        src/fortran/hmcreate.f src/fortran/nextj.f \
        src/fortran/setgetmode.f src/fortran/showstack.f \
 -      src/fortran/misops.f src/fortran/iseye.f \
        src/fortran/setippty.f src/fortran/compil.f \
-       src/fortran/funnam.f src/fortran/cmdstr.f \
+       src/fortran/funnam.f src/fortran/isnum.f src/fortran/cmdstr.f \
        src/fortran/hndlops.f src/fortran/cmplxt.f \
        src/fortran/skpins.f src/fortran/folhp.f src/fortran/cvname.f \
 -      src/fortran/funs.f src/fortran/fact.f src/fortran/typ2cod.f \
 -      src/fortran/prompt.f src/fortran/intstr.f \
 -      src/fortran/createref.f src/fortran/btof.f \
 -      src/fortran/getnum.f src/fortran/btofm.f src/fortran/getsym.f \
 -      src/fortran/findequal.f src/fortran/stackg.f \
 -      src/fortran/find.f src/fortran/setlnb.f src/fortran/mrknmd.f \
 -      src/fortran/stackgl.f src/fortran/allops.f src/fortran/mname.f \
 -      src/fortran/command.f src/fortran/ref2val.f \
 -      src/fortran/stack.f src/fortran/isbrk.f src/fortran/xerbla.f \
 -      src/fortran/dtosci.f src/fortran/bexec.f \
 -      src/fortran/varfunptr.f src/fortran/getfun.f \
 -      src/fortran/savlod.f src/fortran/error.f src/fortran/cvdm.f \
 -      src/fortran/tradsl.f src/fortran/mkindx.f src/fortran/whatln.f \
 -      src/fortran/errmgr.f src/fortran/defmat.f src/fortran/mklist.f \
 -      src/fortran/sigbas.f src/fortran/indxg.f src/fortran/istrue.f \
 -      src/fortran/inisci.f src/fortran/ptover.f \
 -      src/fortran/getfunction.f src/fortran/stackp.f \
 -      src/fortran/dbasin.f src/fortran/macro.f src/fortran/extlarg.f \
 +      src/fortran/typ2cod.f src/fortran/prompt.f \
 +      src/fortran/intstr.f src/fortran/createref.f \
 +      src/fortran/btof.f src/fortran/getnum.f src/fortran/btofm.f \
 +      src/fortran/getsym.f src/fortran/findequal.f \
 +      src/fortran/stackg.f src/fortran/find.f src/fortran/setlnb.f \
 +      src/fortran/mrknmd.f src/fortran/ref2val.f src/fortran/stack.f \
 +      src/fortran/isbrk.f src/fortran/xerbla.f src/fortran/dtosci.f \
 +      src/fortran/bexec.f src/fortran/varfunptr.f \
 +      src/fortran/getfun.f src/fortran/savlod.f src/fortran/error.f \
 +      src/fortran/cvdm.f src/fortran/tradsl.f src/fortran/mkindx.f \
 +      src/fortran/whatln.f src/fortran/errmgr.f src/fortran/defmat.f \
 +      src/fortran/mklist.f src/fortran/sigbas.f src/fortran/indxg.f \
 +      src/fortran/istrue.f src/fortran/inisci.f \
 +      src/fortran/getfunction.f src/fortran/extlarg.f \
        src/fortran/getstr.f src/fortran/cvwm.f \
        src/fortran/storeglobal.f src/fortran/lst2vars.f \
        src/fortran/basnms.f src/fortran/ptrback.f src/fortran/getch.f \
 -      src/fortran/ftob.f src/fortran/seteol.f src/fortran/basin.f \
 -      src/fortran/clause.f src/fortran/compcl.f src/fortran/termf.f \
 -      src/fortran/expsum.f src/fortran/copyvar.f src/fortran/putid.f \
 -      src/fortran/itosci.f src/fortran/stackr2d.f \
 -      src/fortran/stacki2d.f src/fortran/stackc2i.f \
 -      src/fortran/isinstring.f $(am__append_2)
 -GATEWAY_C_SOURCES = sci_gateway/c/sci_stacksize.c \
 -sci_gateway/c/sci_resume.c \
 -sci_gateway/c/sci_mtlb_mode.c \
 -sci_gateway/c/sci_banner.c \
 -sci_gateway/c/sci_where.c \
 -sci_gateway/c/sci_errcatch.c \
 -sci_gateway/c/sci_getos.c \
 -sci_gateway/c/sci_format.c \
 -sci_gateway/c/sci_getmemory.c \
 -sci_gateway/c/sci_havewindow.c \
 -sci_gateway/c/sci_delbpt.c \
 -sci_gateway/c/sci_macr2lst.c \
 -sci_gateway/c/sci_isdef.c \
 -sci_gateway/c/sci_isglobal.c \
 -sci_gateway/c/sci_who.c \
 -sci_gateway/c/sci_errclear.c \
 -sci_gateway/c/sci_global.c \
 -sci_gateway/c/sci_funcprot.c \
 -sci_gateway/c/sci_newfun.c \
 -sci_gateway/c/sci_warning.c \
 -sci_gateway/c/sci_dispbpt.c \
 -sci_gateway/c/sci_intppty.c \
 -sci_gateway/c/sci_ieee.c \
 -sci_gateway/c/sci_gstacksize.c \
 -sci_gateway/c/sci_lasterror.c \
 -sci_gateway/c/sci_funptr.c \
 -sci_gateway/c/sci_return.c \
 -sci_gateway/c/sci_exists.c \
 -sci_gateway/c/sci_getmd5.c \
 -sci_gateway/c/sci_clear.c \
 -sci_gateway/c/sci_clearfun.c \
 -sci_gateway/c/sci_setbpt.c \
 -sci_gateway/c/sci_getmodules.c \
 -sci_gateway/c/sci_what.c \
 -sci_gateway/c/sci_predef.c \
 -sci_gateway/c/sci_clearglobal.c \
 -sci_gateway/c/sci_arg.c \
 -sci_gateway/c/sci_type.c \
 -sci_gateway/c/sci_typename.c \
 -sci_gateway/c/sci_mode.c \
 -sci_gateway/c/sci_macr2tree.c \
 -sci_gateway/c/sci_iserror.c \
 -sci_gateway/c/sci_getversion.c \
 -sci_gateway/c/sci_getdebuginfo.c \
 -sci_gateway/c/sci_debug.c \
 -sci_gateway/c/gw_core.c \
 -sci_gateway/c/gw_user.c \
 -sci_gateway/c/gw_user2.c \
 -sci_gateway/c/sci_error.c \
 -sci_gateway/c/sci_sciargs.c \
 -sci_gateway/c/sci_with_module.c \
 -sci_gateway/c/sci_getscilabmode.c \
 -sci_gateway/c/sci_getvariablesonstack.c \
 -sci_gateway/c/sci_readgateway.c \
 -sci_gateway/c/sci_comp.c \
 -sci_gateway/c/sci_exit.c
 -
 -GATEWAY_FORTRAN_SOURCES = sci_gateway/fortran/sci_f_global.f \
 +      src/fortran/ftob.f src/fortran/seteol.f src/fortran/compcl.f \
-       src/fortran/expsum.f src/fortran/copyvar.f src/fortran/putid.f \
-       src/fortran/itosci.f src/fortran/stackr2d.f \
-       src/fortran/stacki2d.f src/fortran/stackc2i.f \
-       src/fortran/isinstring.f $(am__append_2)
++      src/fortran/termf.f src/fortran/expsum.f src/fortran/copyvar.f \
++      src/fortran/putid.f src/fortran/itosci.f \
++      src/fortran/stackr2d.f src/fortran/stacki2d.f \
++      src/fortran/stackc2i.f src/fortran/isinstring.f \
++      $(am__append_2)
 +GATEWAY_C_SOURCES = \
 +      sci_gateway/c/sci_mtlb_mode.c \
 +      sci_gateway/c/sci_where.c \
 +      sci_gateway/c/sci_errcatch.c \
 +      sci_gateway/c/sci_getmemory.c \
 +      sci_gateway/c/sci_havewindow.c \
 +      sci_gateway/c/sci_delbpt.c \
 +      sci_gateway/c/sci_macr2lst.c \
 +      sci_gateway/c/sci_errclear.c \
 +      sci_gateway/c/sci_funcprot.c \
 +      sci_gateway/c/sci_newfun.c \
 +      sci_gateway/c/sci_dispbpt.c \
 +      sci_gateway/c/sci_intppty.c \
 +      sci_gateway/c/sci_gstacksize.c \
 +      sci_gateway/c/sci_funptr.c \
 +      sci_gateway/c/sci_return.c \
 +      sci_gateway/c/sci_clearfun.c \
 +      sci_gateway/c/sci_setbpt.c \
 +      sci_gateway/c/sci_what.c \
 +      sci_gateway/c/sci_predef.c \
 +      sci_gateway/c/sci_type.c \
 +      sci_gateway/c/sci_typename.c \
 +      sci_gateway/c/sci_mode.c \
 +      sci_gateway/c/sci_macr2tree.c \
 +      sci_gateway/c/sci_iserror.c \
 +      sci_gateway/c/sci_getdebuginfo.c \
 +      sci_gateway/c/sci_debug.c \
 +      sci_gateway/c/gw_core.c \
 +      sci_gateway/c/gw_user.c \
 +      sci_gateway/c/gw_user2.c \
 +      sci_gateway/c/sci_getvariablesonstack.c \
 +      sci_gateway/c/sci_readgateway.c \
 +      sci_gateway/c/sci_comp.c
 +
 +GATEWAY_FORTRAN_SOURCES = \
  sci_gateway/fortran/sci_f_mtlb_mode.f \
 -sci_gateway/fortran/sci_f_resume.f \
  sci_gateway/fortran/sci_f_dispbpt.f \
  sci_gateway/fortran/sci_f_intppty.f \
 -sci_gateway/fortran/sci_f_ieee.f \
  sci_gateway/fortran/sci_f_macrovar.f \
 -sci_gateway/fortran/sci_f_exists.f \
  sci_gateway/fortran/sci_f_errcatch.f \
 -sci_gateway/fortran/sci_f_clear.f \
 -sci_gateway/fortran/sci_f_argn.f \
  sci_gateway/fortran/sci_f_setbpt.f \
 -sci_gateway/fortran/sci_f_clearglobal.f \
  sci_gateway/fortran/sci_f_delbpt.f \
  sci_gateway/fortran/where.f \
 -sci_gateway/fortran/sci_f_iserror.f \
 -sci_gateway/fortran/sci_f_comp.f \
 -sci_gateway/fortran/sci_f_isglobal.f
 +sci_gateway/fortran/sci_f_iserror.f
 +
 +GATEWAY_CPP_SOURCES = \
 +      sci_gateway/cpp/sci_getmodules.cpp \
 +      sci_gateway/cpp/sci_clear.cpp \
 +      sci_gateway/cpp/sci_banner.cpp \
 +      sci_gateway/cpp/sci_quit.cpp \
 +      sci_gateway/cpp/sci_exit.cpp \
 +      sci_gateway/cpp/sci_argn.cpp \
 +      sci_gateway/cpp/sci_clearglobal.cpp \
 +      sci_gateway/cpp/sci_global.cpp \
 +      sci_gateway/cpp/sci_isglobal.cpp \
 +      sci_gateway/cpp/sci_getscilabmode.cpp \
 +      sci_gateway/cpp/sci_getos.cpp \
 +      sci_gateway/cpp/sci_exists.cpp \
 +      sci_gateway/cpp/sci_with_module.cpp \
 +      sci_gateway/cpp/sci_lasterror.cpp \
 +      sci_gateway/cpp/sci_getversion.cpp \
 +      sci_gateway/cpp/sci_warning.cpp \
 +      sci_gateway/cpp/sci_getmd5.cpp \
 +      sci_gateway/cpp/sci_error.cpp \
 +      sci_gateway/cpp/sci_pause.cpp \
 +      sci_gateway/cpp/sci_resume.cpp \
 +      sci_gateway/cpp/sci_abort.cpp \
 +      sci_gateway/cpp/sci_who.cpp \
 +      sci_gateway/cpp/sci_stacksize.cpp \
 +      sci_gateway/cpp/sci_format.cpp \
 +      sci_gateway/cpp/sci_sciargs.cpp \
 +      sci_gateway/cpp/sci_ieee.cpp
  
  libscicore_la_CPPFLAGS = -I$(srcdir)/includes/ -I$(srcdir)/src/c/ \
 -      -I$(srcdir)/src/cpp/ -I$(top_srcdir)/libs/MALLOC/includes/ \
 +      -I$(top_srcdir)/libs/MALLOC/includes/ \
        -I$(top_srcdir)/libs/dynamiclibrary/includes/ \
        -I$(top_srcdir)/libs/doublylinkedlist/includes/ \
        -I$(top_srcdir)/modules/intersci/includes/ \
                <File RelativePath="stackg.f"/>
                <File RelativePath="stackgl.f"/>
                <File RelativePath=".\stacki2d.f"/>
 -              <File RelativePath="stackp.f"/>
                <File RelativePath=".\stackr2d.f"/>
                <File RelativePath="storeglobal.f"/>
+               <File RelativePath="termf.f"/>
                <File RelativePath="tradsl.f"/>
                <File RelativePath="typ2cod.f"/>
                <File RelativePath="varfunptr.f"/>
@@@ -398,8 -416,10 +400,9 @@@ cd .
      <ClCompile Include="stackg.c" />
      <ClCompile Include="stackgl.c" />
      <ClCompile Include="stacki2d.c" />
 -    <ClCompile Include="stackp.c" />
      <ClCompile Include="stackr2d.c" />
      <ClCompile Include="storeglobal.c" />
+     <ClCompile Include="termf.c" />
      <ClCompile Include="tradsl.c" />
      <ClCompile Include="typ2cod.c" />
      <ClCompile Include="varfunptr.c" />
      <f2c_rule Include="stackg.f" />
      <f2c_rule Include="stackgl.f" />
      <f2c_rule Include="stacki2d.f" />
 -    <f2c_rule Include="stackp.f" />
      <f2c_rule Include="stackr2d.f" />
      <f2c_rule Include="storeglobal.f" />
+     <f2c_rule Include="termf.f" />
      <f2c_rule Include="tradsl.f" />
      <f2c_rule Include="typ2cod.f" />
      <f2c_rule Include="varfunptr.f" />
  /*--------------------------------------------------------------------------*/
  SPECIAL_FUNCTIONS_IMPEXP int gw_special_functions(void);
  /*--------------------------------------------------------------------------*/
 -int sci_besselh(char *fname, unsigned long fname_len);
 -int sci_besseli(char *fname, unsigned long fname_len);
 -int sci_besselj(char *fname, unsigned long fname_len);
 -int sci_besselk(char *fname, unsigned long fname_len);
 -int sci_bessely(char *fname, unsigned long fname_len);
 -int sci_beta(char *fname, unsigned long fname_len);
 -int sci_legendre(char *fname, unsigned long fname_len);
 -int sci_gamma(char *fname, unsigned long fname_len);
 -int sci_lgamma(char *fname, unsigned long fname_len);
 -int sci_dlgamma(char *fname, unsigned long fname_len);
 -int sci_Faddeeva_erf(char *fname, unsigned long fname_len);
 -int sci_Faddeeva_erfc(char *fname, unsigned long fname_len);
 -int sci_Faddeeva_erfcx(char *fname, unsigned long fname_len);
 -int sci_Faddeeva_erfi(char *fname, unsigned long fname_len);
 -int sci_Faddeeva_dawson(char *fname, unsigned long fname_len);
 +SPECIAL_FUNCTIONS_IMPEXP int sci_besselh(char *fname, void* pvApiCtx);
 +SPECIAL_FUNCTIONS_IMPEXP int sci_besseli(char *fname, void* pvApiCtx);
 +SPECIAL_FUNCTIONS_IMPEXP int sci_besselj(char *fname, void* pvApiCtx);
 +SPECIAL_FUNCTIONS_IMPEXP int sci_besselk(char *fname, void* pvApiCtx);
 +SPECIAL_FUNCTIONS_IMPEXP int sci_bessely(char *fname, void* pvApiCtx);
 +SPECIAL_FUNCTIONS_IMPEXP int sci_beta(char *fname, void* pvApiCtx);
 +SPECIAL_FUNCTIONS_IMPEXP int sci_legendre(char *fname, void* pvApiCtx);
 +SPECIAL_FUNCTIONS_IMPEXP int sci_gamma(char *fname, void* pvApiCtx);
 +SPECIAL_FUNCTIONS_IMPEXP int sci_lgamma(char *fname, void* pvApiCtx);
 +SPECIAL_FUNCTIONS_IMPEXP int sci_dlgamma(char *fname, void* pvApiCtx);
- SPECIAL_FUNCTIONS_IMPEXP int sci_calerf(char *fname, void* pvApiCtx);
 +SPECIAL_FUNCTIONS_IMPEXP int sci_Faddeeva_erf(char *fname, void* pvApiCtx);
 +SPECIAL_FUNCTIONS_IMPEXP int sci_Faddeeva_erfc(char *fname, void* pvApiCtx);
 +SPECIAL_FUNCTIONS_IMPEXP int sci_Faddeeva_erfcx(char *fname, void* pvApiCtx);
 +SPECIAL_FUNCTIONS_IMPEXP int sci_Faddeeva_erfi(char *fname, void* pvApiCtx);
 +SPECIAL_FUNCTIONS_IMPEXP int sci_Faddeeva_dawson(char *fname, void* pvApiCtx);
  /*--------------------------------------------------------------------------*/
  #endif /* __GW_SPECIAL_FUNCTIONS_H__ */
  /*--------------------------------------------------------------------------*/
index cb993f9,0000000..6159239
mode 100644,000000..100644
--- /dev/null
@@@ -1,85 -1,0 +1,109 @@@
 +/*
 + * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
 + * Copyright (C) Digiteo 2011 - Cedric DELAMARRE
 + *
 + * This file must be used under the terms of the CeCILL.
 + * This source file is licensed as described in the file COPYING, which
 + * you should have received as part of this distribution.  The terms
 + * are also available at
 + * http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt
 + *
 + */
 +
 +
 +#include "function.hxx"
 +#include "string.hxx"
 +#include "list.hxx"
 +#include "double.hxx"
 +#include "funcmanager.hxx"
 +#include "string_gw.hxx"
 +
 +extern "C"
 +{
 +#include "core_math.h"
 +#include "localization.h"
 +#include "Scierror.h"
 +}
 +
 +
 +types::Function::ReturnValue sci_strtod(types::typed_list &in, int _iRetCount, types::typed_list &out)
 +{
 +    types::Double* pOutDouble = NULL;
 +    types::String* pOutString = NULL;
 +    types::String* pString = NULL;
 +
-     if(in.size() != 1)
++    wchar_t pwstKey[] = L"1234567890";
++    unsigned long long ullNan = 0x7ff8000000000000;
++    double dblNan = *( double* )&ullNan;
++
++    if (in.size() != 1)
 +    {
 +        Scierror(77, _("%s: Wrong number of input argument(s): %d expected.\n"), "strtod", 1);
 +        return types::Function::Error;
 +    }
-     if(_iRetCount > 2)
++    if (_iRetCount > 2)
 +    {
 +        Scierror(78, _("%s: Wrong number of output argument(s): %d to %d expected.\n"), "strtod", 1, 2);
 +        return types::Function::Error;
 +    }
 +
 +    pString = in[0]->getAs<types::String>();
 +
-     if(_iRetCount == 2)
++    pOutDouble = new types::Double(pString->getDims(), pString->getDimsArray());
++    if (_iRetCount == 2)
++    {
++        pOutString = new types::String(pString->getDims(), pString->getDimsArray());
++    }
++
++    for (int i = 0 ; i < pString->getSize() ; i++)
 +    {
-         pOutDouble = new types::Double(pString->getDims(),pString->getDimsArray());
-         pOutString = new types::String(pString->getDims(),pString->getDimsArray());
++        bool bStop = false;
++        wchar_t *pwstStop = NULL;
++        wchar_t* pstStr = pString->get(i);
++        int iPos = (int)wcscspn(pstStr, pwstKey);
 +
-         for (int i = 0 ; i < pString->getSize() ; i++)
++        if (iPos)
 +        {
-             wchar_t *stopstring = NULL;
-             pOutDouble->set(i,wcstod(pString->get(i),&stopstring));
-             if(stopstring)
++            for (int j = 0 ; j < iPos ; j++)
 +            {
-                 pOutString->set(i,stopstring);
++                if (pstStr[j] != ' ')
++                {
++                    pOutDouble->set(i, dblNan);
++                    bStop = true;
++                    pwstStop = pstStr;
++                }
 +            }
-             else
++
++            if (bStop == false)
 +            {
-                 pOutString->set(i,L"");
++                pOutDouble->set(i, wcstod(pstStr, &pwstStop));
 +            }
 +        }
++        else
++        {
++            pOutDouble->set(i, wcstod(pstStr, &pwstStop));
++        }
 +
-         out.push_back(pOutDouble);
-         out.push_back(pOutString);
-     }
-     else // _iRetCount == 1
-     {
-         pOutDouble = new types::Double(pString->getDims(),pString->getDimsArray());
-         for (int i = 0 ; i < pString->getSize() ; i++)
++        if (_iRetCount == 2)
 +        {
-             wchar_t *stopstring = NULL;
-             pOutDouble->set(i,wcstod(pString->get(i),&stopstring));
++            if (pwstStop)
++            {
++                pOutString->set(i, pwstStop);
++            }
++            else
++            {
++                pOutString->set(i, L"");
++            }
 +        }
++    }
++
++    out.push_back(pOutDouble);
 +
-         out.push_back(pOutDouble);
++    if (_iRetCount == 2)
++    {
++        out.push_back(pOutString);
 +    }
 +
 +    return types::Function::OK;
 +}
 +
Simple merge
Simple merge
  #include "dynlib_ui_data.h"
  /*--------------------------------------------------------------------------*/
  UI_DATA_IMPEXP int gw_ui_data(void);
 -UI_DATA_IMPEXP int sci_editvar(char* fname, unsigned long l);
 -UI_DATA_IMPEXP int sci_browsevar(char* fname, unsigned long l);
 -UI_DATA_IMPEXP int sci_filebrowser(char* fname, unsigned long l);
 -UI_DATA_IMPEXP int sci_updatebrowsevar(char* fname, unsigned long l);
 -UI_DATA_IMPEXP int sci_closeEditvar(char* fname, unsigned long l);
 +UI_DATA_IMPEXP int sci_editvar(char* fname, void* pvApiCtx);
 +UI_DATA_IMPEXP int sci_browsevar(char* fname, void* pvApiCtx);
 +UI_DATA_IMPEXP int sci_filebrowser(char* fname, void* pvApiCtx);
 +UI_DATA_IMPEXP int sci_updatebrowsevar(char* fname, void* pvApiCtx);
++UI_DATA_IMPEXP int sci_closeEditvar(char* fname, void* pvApiCtx);
  /*--------------------------------------------------------------------------*/
  #endif /* __GW_UI_DATA__ */
  /*--------------------------------------------------------------------------*/
index 0000000,1046b61..16d2ace
mode 000000,100644..100644
--- /dev/null
@@@ -1,0 -1,37 +1,37 @@@
+ /*
+  * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
+  * Copyright (C) 2012 - Scilab Enterprises - Calixte DENIZET
+  *
+  * This file must be used under the terms of the CeCILL.
+  * This source file is licensed as described in the file COPYING, which
+  * you should have received as part of this distribution.  The terms
+  * are also available at
+  * http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt
+  *
+  */
+ #include "EditVar.hxx"
+ #include "GiwsException.hxx"
+ extern "C"
+ {
+ #include "gw_ui_data.h"
+ #include "getScilabJavaVM.h"
+ #include "api_scilab.h"
+ }
+ using namespace org_scilab_modules_ui_data;
+ /*--------------------------------------------------------------------------*/
 -int sci_closeEditvar(char *fname, unsigned long fname_len)
++int sci_closeEditvar(char *fname, void *pvApiCtx)
+ {
+     CheckOutputArgument(pvApiCtx, 1, 1);
+     CheckInputArgument(pvApiCtx, 0, 0);
+     EditVar::closeVariableEditor(getScilabJavaVM());
+     AssignOutputVariable(pvApiCtx, 1) = 0;
+     ReturnArguments(pvApiCtx);
+     return 0;
+ }
      <ClCompile Include="PutScilabVariable.c">
        <Filter>Source Files</Filter>
      </ClCompile>
 -    <ClCompile Include="..\jni\ui_data_wrap.c">
 -      <Filter>Source Files</Filter>
 -    </ClCompile>
 -    <ClCompile Include="..\..\sci_gateway\cpp\sci_updatebrowsevar.cpp">
 +    <ClCompile Include="..\jni\FileBrowser.cpp">
        <Filter>Source Files</Filter>
      </ClCompile>
+     <ClCompile Include="..\..\sci_gateway\cpp\sci_closeEditvar.cpp">
+       <Filter>Source Files</Filter>
+     </ClCompile>
    </ItemGroup>
    <ItemGroup>
      <ClInclude Include="..\jni\BrowseVar.hxx">