merge master
antoine ELIAS [Thu, 20 Aug 2009 07:28:00 +0000 (09:28 +0200)]
23 files changed:
1  2 
scilab/modules/api_scilab/Makefile.am
scilab/modules/api_scilab/Makefile.in
scilab/modules/api_scilab/api_scilab.vcproj
scilab/modules/arnoldi/arnoldi.vcproj
scilab/modules/console/Makefile.in
scilab/modules/core/includes/stack-c.h
scilab/modules/dynamic_link/Makefile.am
scilab/modules/dynamic_link/Makefile.in
scilab/modules/elementary_functions/sci_gateway/c/sci_triu.c
scilab/modules/graphics/Makefile.am
scilab/modules/graphics/Makefile.in
scilab/modules/io/Makefile.am
scilab/modules/io/Makefile.in
scilab/modules/jvm/Makefile.am
scilab/modules/jvm/Makefile.in
scilab/modules/metanet/Makefile.am
scilab/modules/metanet/Makefile.in
scilab/modules/optimization/Makefile.am
scilab/modules/optimization/Makefile.in
scilab/modules/signal_processing/src/c/signal_processing.vcproj
scilab/modules/special_functions/Makefile.am
scilab/modules/special_functions/Makefile.in
scilab/modules/windows_tools/Makefile.in

@@@ -23,9 -25,17 +25,18 @@@ libsciapi_scilab_la_CFLAGS=-I$(srcdir)/
  -I$(top_srcdir)/libs/MALLOC/includes/ \
  -I$(top_srcdir)/modules/localization/includes \
  -I$(top_srcdir)/modules/output_stream/includes \
 --I$(top_srcdir)/modules/string/includes
 +-I$(top_srcdir)/modules/string/includes \
 +-I$(top_srcdir)/modules/operations/includes
  
+ libsciapi_scilab_la_CPPFLAGS=-I$(srcdir)/includes/ \
+ -I$(srcdir)/src/cpp/ \
+ -I$(top_srcdir)/modules/core/includes \
+ -I$(top_srcdir)/modules/call_scilab/includes \
+ -I$(top_srcdir)/libs/MALLOC/includes/ \
+ -I$(top_srcdir)/modules/localization/includes \
+ -I$(top_srcdir)/modules/output_stream/includes \
+ -I$(top_srcdir)/modules/string/includes
  
  pkglib_LTLIBRARIES = libsciapi_scilab.la
  
@@@ -381,12 -370,20 +380,21 @@@ libsciapi_scilab_la_CFLAGS = -I$(srcdir
  -I$(top_srcdir)/libs/MALLOC/includes/ \
  -I$(top_srcdir)/modules/localization/includes \
  -I$(top_srcdir)/modules/output_stream/includes \
 --I$(top_srcdir)/modules/string/includes
 +-I$(top_srcdir)/modules/string/includes \
 +-I$(top_srcdir)/modules/operations/includes
  
+ libsciapi_scilab_la_CPPFLAGS = -I$(srcdir)/includes/ \
+ -I$(srcdir)/src/cpp/ \
+ -I$(top_srcdir)/modules/core/includes \
+ -I$(top_srcdir)/modules/call_scilab/includes \
+ -I$(top_srcdir)/libs/MALLOC/includes/ \
+ -I$(top_srcdir)/modules/localization/includes \
+ -I$(top_srcdir)/modules/output_stream/includes \
+ -I$(top_srcdir)/modules/string/includes
  pkglib_LTLIBRARIES = libsciapi_scilab.la
  libsciapi_scilab_la_LDFLAGS = -version-info $(SCILAB_LIBRARY_VERSION)
- libsciapi_scilab_la_SOURCES = $(API_SCILAB_C_SOURCES) $(GATEWAY_C_SOURCES)
+ libsciapi_scilab_la_SOURCES = $(API_SCILAB_C_SOURCES) $(API_SCILAB_CPP_SOURCES) $(GATEWAY_C_SOURCES)
  
  # For the code check (splint)
  CHECK_SRC = $(libsciapi_scilab_la_SOURCES)
@@@ -44,7 -44,7 +44,7 @@@
                        <Tool
                                Name="VCCLCompilerTool"
                                Optimization="0"
-                               AdditionalIncludeDirectories="includes;src;../core/includes;../output_stream/includes;../../libs/intl;../../libs/MALLOC/includes;../operations/includes"
 -                              AdditionalIncludeDirectories="includes;src;../core/includes;../output_stream/includes;../../libs/intl;../../libs/MALLOC/includes;../api_scilab/includes"
++                              AdditionalIncludeDirectories="includes;src;../core/includes;../output_stream/includes;../../libs/intl;../../libs/MALLOC/includes;../operations/includes;../api_scilab/includes"
                                PreprocessorDefinitions="FORDLL;_DEBUG;_WINDOWS;_USRDLL;ARNOLDI_EXPORTS;_CRT_SECURE_NO_DEPRECATE"
                                MinimalRebuild="true"
                                BasicRuntimeChecks="0"
                        <Tool
                                Name="VCCLCompilerTool"
                                Optimization="0"
-                               AdditionalIncludeDirectories="includes;src;../core/includes;../output_stream/includes;../../libs/intl;../../libs/MALLOC/includes;../operations/includes"
 -                              AdditionalIncludeDirectories="includes;src;../core/includes;../output_stream/includes;../../libs/intl;../../libs/MALLOC/includes;../api_scilab/includes"
++                              AdditionalIncludeDirectories="includes;src;../core/includes;../output_stream/includes;../../libs/intl;../../libs/MALLOC/includes;../operations/includes;../api_scilab/includes"
                                PreprocessorDefinitions="FORDLL;_DEBUG;_WINDOWS;_USRDLL;ARNOLDI_EXPORTS;_CRT_SECURE_NO_DEPRECATE"
                                MinimalRebuild="true"
                                BasicRuntimeChecks="0"
                                InlineFunctionExpansion="1"
                                FavorSizeOrSpeed="1"
                                WholeProgramOptimization="false"
-                               AdditionalIncludeDirectories="includes;src;../core/includes;../output_stream/includes;../../libs/intl;../../libs/MALLOC/includes;../operations/includes"
 -                              AdditionalIncludeDirectories="includes;src;../core/includes;../output_stream/includes;../../libs/intl;../../libs/MALLOC/includes;../api_scilab/includes"
++                              AdditionalIncludeDirectories="includes;src;../core/includes;../output_stream/includes;../../libs/intl;../../libs/MALLOC/includes;../operations/includes;../api_scilab/includes"
                                PreprocessorDefinitions="FORDLL;NDEBUG;_WINDOWS;_USRDLL;ARNOLDI_EXPORTS;_CRT_SECURE_NO_DEPRECATE"
                                StringPooling="true"
                                RuntimeLibrary="2"
                                InlineFunctionExpansion="1"
                                FavorSizeOrSpeed="1"
                                WholeProgramOptimization="false"
-                               AdditionalIncludeDirectories="includes;src;../core/includes;../output_stream/includes;../../libs/intl;../../libs/MALLOC/includes;../operations/includes"
 -                              AdditionalIncludeDirectories="includes;src;../core/includes;../output_stream/includes;../../libs/intl;../../libs/MALLOC/includes;../api_scilab/includes"
++                              AdditionalIncludeDirectories="includes;src;../core/includes;../output_stream/includes;../../libs/intl;../../libs/MALLOC/includes;../operations/includes;../api_scilab/includes"
                                PreprocessorDefinitions="FORDLL;NDEBUG;_WINDOWS;_USRDLL;ARNOLDI_EXPORTS;_CRT_SECURE_NO_DEPRECATE"
                                StringPooling="true"
                                RuntimeLibrary="2"
Simple merge
@@@ -24,9 -24,9 +24,10 @@@ libscidynamic_link_la_CFLAGS = 
  -I$(top_srcdir)/modules/output_stream/includes \
  -I$(top_srcdir)/modules/fileio/includes \
  -I$(top_srcdir)/modules/io/includes \
 +-I$(top_srcdir)/modules/operations/includes \
  -I$(top_srcdir)/libs/dynamiclibrary/includes \
  -I$(srcdir)/src/c/ \
+ -I$(top_srcdir)/modules/api_scilab/includes \
  -I$(srcdir)/includes/
  
  pkglib_LTLIBRARIES = libscidynamic_link.la
@@@ -408,9 -398,9 +408,10 @@@ libscidynamic_link_la_CFLAGS = 
  -I$(top_srcdir)/modules/output_stream/includes \
  -I$(top_srcdir)/modules/fileio/includes \
  -I$(top_srcdir)/modules/io/includes \
 +-I$(top_srcdir)/modules/operations/includes \
  -I$(top_srcdir)/libs/dynamiclibrary/includes \
  -I$(srcdir)/src/c/ \
+ -I$(top_srcdir)/modules/api_scilab/includes \
  -I$(srcdir)/includes/
  
  pkglib_LTLIBRARIES = libscidynamic_link.la
   */
  /*--------------------------------------------------------------------------*/ 
  #include "gw_elementary_functions.h"
 +#include "stack-c.h"
++#include "Scierror.h"
 +#include "basic_functions.h"
 +
 +#define _NEW_TONIO_
  /*--------------------------------------------------------------------------*/
 -extern int C2F(inttriu)(int *id);
 +int triu_matrix(int _iOffset);
 +
 +extern int C2F(sci_ptriu) (char *fname,unsigned long fname_len);
  /*--------------------------------------------------------------------------*/
 -int C2F(sci_triu)(char *fname,unsigned long fname_len)
 +extern int C2F(inttriu) (int *id);
 +/*--------------------------------------------------------------------------*/
 +int C2F(sci_triu) (char *fname,unsigned long fname_len)
  {
        static int id[6];
 +#ifdef _NEW_TONIO_
 +      int iRows                               = 0;
 +      int iCols                               = 0;
 +      int iRealData                   = 0;
 +      int iOffset                             = 0;
 +
 +      CheckRhs(1,2);
 +      CheckLhs(1,1);
 +
 +      if(Rhs == 2)
 +      {//Get offset
 +              if(GetType(2) != sci_matrix)
 +              {
 +                      Error(53);
 +                      return 0;
 +              }
 +
 +              if(iIsComplex(2))
 +              {
 +                      Error(52);
 +                      return 0;
 +              }
 +
 +              GetVarDimension(2, &iRows, &iCols);
 +              if(iRows * iCols != 1)
 +              {
 +                      Error(89);
 +                      return 0;
 +              }
 +
 +              GetRhsVar(2, MATRIX_OF_DOUBLE_DATATYPE, &iRows, &iCols, &iRealData);
 +              iOffset = (int)stk(iRealData)[0];
 +      }
 +
 +      switch(GetType(1))
 +      {
 +      case sci_matrix :
 +              triu_matrix(iOffset);
 +              break;
 +      case sci_poly :
 +              C2F(sci_ptriu)(fname, fname_len);
 +      default : 
 +              OverLoad(1);
 +              break;
 +      }
 +#else
        C2F(inttriu)(id);
 +#endif
 +      return 0;
 +}
 +
 +int triu_matrix(int _iOffset)
 +{
 +      int iIndex                              = 0;
 +      int iRows                               = 0;
 +      int iCols                               = 0;
 +      int iRealData                   = 0;
 +      int iImgData                    = 0;
 +
 +      double *pReal                   = NULL;
 +      double *pImg                    = NULL;
 +
 +      double *pReturnReal             = NULL;
 +      double *pReturnImg              = NULL;
 +
 +      if(iIsComplex(1))
 +      {
 +              int iComplex    = 1;
 +              GetRhsCVar(1, MATRIX_OF_DOUBLE_DATATYPE, &iComplex, &iRows, &iCols, &iRealData, &iImgData);
 +              pReal                   = stk(iRealData);
 +              pImg                    = stk(iImgData);
 +
 +              iAllocComplexMatrixOfDouble(Rhs + 1, iRows, iCols, &pReturnReal, &pReturnImg);
 +              memset(pReturnReal      , 0x00  , sizeof(double) * iRows * iCols);
 +              memset(pReturnImg       , 0x00  , sizeof(double) * iRows * iCols);
 +
 +              for(iIndex = 0 ; iIndex < iCols ; iIndex++)
 +              {
 +                      int iSize       = Min(Max(iIndex + 1 - _iOffset, 0), iRows);
 +                      memcpy(&pReturnReal[iIndex * iRows]     , &pReal[iIndex * iRows]        , sizeof(double) * iSize);
 +                      memcpy(&pReturnImg[iIndex * iRows]      , &pImg[iIndex * iRows] , sizeof(double) * iSize);
 +              }
 +      }
 +      else
 +      {
 +              GetRhsVar(1, MATRIX_OF_DOUBLE_DATATYPE, &iRows, &iCols, &iRealData);
 +              pReal                   = stk(iRealData);
 +
 +              iAllocMatrixOfDouble(Rhs + 1, iRows, iCols, &pReturnReal);
 +              memset(pReturnReal      , 0x00  , sizeof(double) * iRows * iCols);
 +
 +              for(iIndex = 0 ; iIndex < iCols ; iIndex++)
 +              {
 +                      int iSize       = Min(Max(iIndex + 1 - _iOffset, 0), iRows);
 +                      memcpy(&pReturnReal[iIndex * iRows]     , &pReal[iIndex * iRows]        , sizeof(double) * iSize);
 +              }
 +      }
 +
 +      LhsVar(1) = Rhs + 1;
 +      PutLhsVar();
        return 0;
  }
  /*--------------------------------------------------------------------------*/
@@@ -31,9 -31,9 +31,10 @@@ libscigraphics_la_CFLAGS = -I$(top_srcd
        -I$(srcdir)/src/c/ \
        -I$(srcdir)/src/c/getHandleProperty/ \
        -I$(top_srcdir)/modules/gui/includes/ \
+       -I$(top_srcdir)/modules/api_scilab/includes/ \
        -I$(top_srcdir)/modules/fileio/includes/ \
 -      -I$(top_srcdir)/modules/string/includes/
 +      -I$(top_srcdir)/modules/string/includes/ \
 +      -I$(top_srcdir)/modules/operations/includes/
  
  
  GRAPHICS_C_SOURCES = src/c/GetCommandArg.c \
@@@ -759,18 -749,19 +759,20 @@@ libscigraphics_la_CFLAGS =  
        -I$(srcdir)/includes/ -I$(srcdir)/src/c/ \
        -I$(srcdir)/src/c/getHandleProperty/ \
        -I$(top_srcdir)/modules/gui/includes/ \
+       -I$(top_srcdir)/modules/api_scilab/includes/ \
        -I$(top_srcdir)/modules/fileio/includes/ \
 -      -I$(top_srcdir)/modules/string/includes/ $(JAVA_JNI_INCLUDE) \
 -      -Isrc/cpp $(TCL_INC_PATH) $(TK_INC_PATH) \
 +      -I$(top_srcdir)/modules/string/includes/ \
 +      -I$(top_srcdir)/modules/operations/includes/ \
 +      $(JAVA_JNI_INCLUDE) -Isrc/cpp $(TCL_INC_PATH) $(TK_INC_PATH) \
        -I$(top_srcdir)/libs/MALLOC/includes/ \
        -I$(top_srcdir)/libs/hashtable/ \
-       -I$(top_srcdir)/modules/jvm/includes \
+       -I$(top_srcdir)/modules/jvm/includes/ \
        -I$(top_srcdir)/modules/renderer/includes/ \
-       -I$(top_srcdir)/modules/action_binding/includes \
-       -I$(top_srcdir)/modules/output_stream/includes \
+       -I$(top_srcdir)/modules/action_binding/includes/ \
+       -I$(top_srcdir)/modules/output_stream/includes/ \
+       -I$(top_srcdir)/modules/api_scilab/includes/ \
        -I$(top_srcdir)/modules/graphic_export/includes/ \
-       -I$(top_srcdir)/modules/output_stream/includes
+       -I$(top_srcdir)/modules/output_stream/includes/
  GRAPHICS_C_SOURCES = src/c/GetCommandArg.c \
  src/c/WindowList.c \
  src/c/getHandleProperty/get_figure_position_property.c \
Simple merge
Simple merge
@@@ -34,9 -34,9 +34,10 @@@ libscijvm_la_CFLAGS=         $(JAVA_JNI_INCLU
                        -I$(top_srcdir)/modules/output_stream/includes/ \
                        -I$(top_srcdir)/modules/localization/includes/ \
                        -I$(top_srcdir)/modules/string/includes/ \
+                       -I$(top_srcdir)/modules/api_scilab/includes \
                        -I$(top_srcdir)/modules/call_scilab/includes \
 -                      -I$(top_srcdir)/modules/fileio/includes/
 +                      -I$(top_srcdir)/modules/fileio/includes/ \
 +                      -I$(top_srcdir)/modules/operations/includes/
  
  pkglib_LTLIBRARIES = libscijvm-disable.la
  
@@@ -412,9 -402,9 +412,10 @@@ libscijvm_la_CFLAGS = $(JAVA_JNI_INCLUD
                        -I$(top_srcdir)/modules/output_stream/includes/ \
                        -I$(top_srcdir)/modules/localization/includes/ \
                        -I$(top_srcdir)/modules/string/includes/ \
+                       -I$(top_srcdir)/modules/api_scilab/includes \
                        -I$(top_srcdir)/modules/call_scilab/includes \
 -                      -I$(top_srcdir)/modules/fileio/includes/
 +                      -I$(top_srcdir)/modules/fileio/includes/ \
 +                      -I$(top_srcdir)/modules/operations/includes/
  
  pkglib_LTLIBRARIES = libscijvm-disable.la $(am__append_1)
  libscijvm_la_LDFLAGS = -version-info $(SCILAB_LIBRARY_VERSION) \
@@@ -118,8 -118,8 +118,9 @@@ sci_gateway/fortran/sci_m6visitor.
  libscimetanet_la_CFLAGS=      -I$(srcdir)/includes/ \
                                -I$(top_srcdir)/modules/output_stream/includes/ \
                                -I$(top_srcdir)/modules/fileio/includes/ \
 +                              -I$(top_srcdir)/modules/operations/includes/ \
                                -I$(top_srcdir)/libs/MALLOC/includes/ \
+                               -I$(top_srcdir)/modules/api_scilab/includes \
                                -I$(top_srcdir)/libs/hashtable/
  
  pkglib_LTLIBRARIES = libscimetanet.la
@@@ -510,8 -500,8 +510,9 @@@ sci_gateway/fortran/sci_m6visitor.
  libscimetanet_la_CFLAGS = -I$(srcdir)/includes/ \
                                -I$(top_srcdir)/modules/output_stream/includes/ \
                                -I$(top_srcdir)/modules/fileio/includes/ \
 +                              -I$(top_srcdir)/modules/operations/includes/ \
                                -I$(top_srcdir)/libs/MALLOC/includes/ \
+                               -I$(top_srcdir)/modules/api_scilab/includes \
                                -I$(top_srcdir)/libs/hashtable/
  
  pkglib_LTLIBRARIES = libscimetanet.la
@@@ -119,9 -119,9 +119,10 @@@ sci_gateway/fortran/Ex-fsolve.f 
  sci_gateway/fortran/Ex-lsqrsolve.f
  
  libscioptimization_la_CFLAGS=         -I$(srcdir)/includes/ \
+ -I$(top_srcdir)/modules/api_scilab/includes \
  -I$(top_srcdir)/modules/output_stream/includes \
 --I$(top_srcdir)/modules/dynamic_link/includes
 +-I$(top_srcdir)/modules/dynamic_link/includes \
 +-I$(top_srcdir)/modules/operations/includes
  
  pkglib_LTLIBRARIES = libscioptimization.la
  
@@@ -511,9 -501,9 +511,10 @@@ sci_gateway/fortran/Ex-fsolve.f 
  sci_gateway/fortran/Ex-lsqrsolve.f
  
  libscioptimization_la_CFLAGS = -I$(srcdir)/includes/ \
+ -I$(top_srcdir)/modules/api_scilab/includes \
  -I$(top_srcdir)/modules/output_stream/includes \
 --I$(top_srcdir)/modules/dynamic_link/includes
 +-I$(top_srcdir)/modules/dynamic_link/includes \
 +-I$(top_srcdir)/modules/operations/includes
  
  pkglib_LTLIBRARIES = libscioptimization.la
  libscioptimization_la_LDFLAGS = -version-info $(SCILAB_LIBRARY_VERSION)
@@@ -37,9 -37,9 +37,10 @@@ libscispecial_functions_la_include_HEAD
  includes/gw_special_functions2.h
  
  libscispecial_functions_la_CFLAGS=    -I$(srcdir)/includes/ \
+ -I$(top_srcdir)/modules/api_scilab/includes \
  -I$(top_srcdir)/modules/elementary_functions/includes/ \
 --I$(top_srcdir)/modules/output_stream/includes/
 +-I$(top_srcdir)/modules/output_stream/includes/ \
 +-I$(top_srcdir)/modules/operations/includes/
  
  pkglib_LTLIBRARIES = libscispecial_functions.la
  
@@@ -419,9 -409,9 +419,10 @@@ libscispecial_functions_la_include_HEAD
  includes/gw_special_functions2.h
  
  libscispecial_functions_la_CFLAGS = -I$(srcdir)/includes/ \
+ -I$(top_srcdir)/modules/api_scilab/includes \
  -I$(top_srcdir)/modules/elementary_functions/includes/ \
 --I$(top_srcdir)/modules/output_stream/includes/
 +-I$(top_srcdir)/modules/output_stream/includes/ \
 +-I$(top_srcdir)/modules/operations/includes/
  
  pkglib_LTLIBRARIES = libscispecial_functions.la
  libscispecial_functions_la_LDFLAGS = -version-info $(SCILAB_LIBRARY_VERSION)