Add new define to declare scilab gateway in C / C++. 06/4206/2
Bruno JOFRET [Tue, 14 Jun 2011 10:59:18 +0000 (12:59 +0200)]
Correct some includes.

Change-Id: I8c9d796b35709909d5f4fa0993449c83ba556a60

152 files changed:
scilab/modules/action_binding/Makefile.am
scilab/modules/action_binding/Makefile.in
scilab/modules/action_binding/includes/gw_action_binding.h
scilab/modules/action_binding/src/c/action_binding.vcxproj
scilab/modules/boolean/includes/boolean_gw.hxx
scilab/modules/boolean/includes/gw_boolean.h
scilab/modules/boolean/src/c/boolean.vcxproj
scilab/modules/boolean/src/cpp/boolean_gw.cpp
scilab/modules/call_scilab/Makefile.am
scilab/modules/call_scilab/Makefile.in
scilab/modules/call_scilab/call_scilab.vcxproj
scilab/modules/core/includes/core_gw.hxx
scilab/modules/core/includes/gw_core.h
scilab/modules/core/sci_gateway/cpp/sci_abort.cpp
scilab/modules/core/sci_gateway/cpp/sci_argn.cpp
scilab/modules/core/sci_gateway/cpp/sci_banner.cpp
scilab/modules/core/sci_gateway/cpp/sci_clear.cpp
scilab/modules/core/sci_gateway/cpp/sci_clearglobal.cpp
scilab/modules/core/sci_gateway/cpp/sci_error.cpp
scilab/modules/core/sci_gateway/cpp/sci_exists.cpp
scilab/modules/core/sci_gateway/cpp/sci_exit.cpp
scilab/modules/core/sci_gateway/cpp/sci_getmd5.cpp
scilab/modules/core/sci_gateway/cpp/sci_getmodules.cpp
scilab/modules/core/sci_gateway/cpp/sci_getos.cpp
scilab/modules/core/sci_gateway/cpp/sci_getversion.cpp
scilab/modules/core/sci_gateway/cpp/sci_isglobal.cpp
scilab/modules/core/sci_gateway/cpp/sci_lasterror.cpp
scilab/modules/core/sci_gateway/cpp/sci_pause.cpp
scilab/modules/core/sci_gateway/cpp/sci_quit.cpp
scilab/modules/core/sci_gateway/cpp/sci_resume.cpp
scilab/modules/core/sci_gateway/cpp/sci_stacksize.cpp
scilab/modules/core/sci_gateway/cpp/sci_warning.cpp
scilab/modules/core/sci_gateway/cpp/sci_with_module.cpp
scilab/modules/dynamic_link/includes/dynamic_link_gw.hxx
scilab/modules/dynamic_link/sci_gateway/cpp/sci_c_link.cpp
scilab/modules/dynamic_link/sci_gateway/cpp/sci_getdynlibext.cpp
scilab/modules/dynamic_link/sci_gateway/cpp/sci_ilib_verbose.cpp
scilab/modules/dynamic_link/sci_gateway/cpp/sci_link.cpp
scilab/modules/dynamic_link/sci_gateway/cpp/sci_ulink.cpp
scilab/modules/elementary_functions/includes/elem_func_gw.hxx
scilab/modules/elementary_functions/includes/gw_elementary_functions.h
scilab/modules/elementary_functions/sci_gateway/cpp/elem_func_gw.cpp
scilab/modules/elementary_functions/sci_gateway/cpp/sci_ones.cpp
scilab/modules/elementary_functions/sci_gateway/cpp/sci_zeros.cpp
scilab/modules/elementary_functions/src/c/elementary_functions.vcxproj
scilab/modules/fileio/includes/fileio_gw.hxx
scilab/modules/fileio/includes/gw_fileio.h
scilab/modules/fileio/sci_gateway/cpp/fileio_gw.cpp
scilab/modules/fileio/sci_gateway/cpp/sci_basename.cpp
scilab/modules/fileio/sci_gateway/cpp/sci_createdir.cpp
scilab/modules/fileio/sci_gateway/cpp/sci_deletefile.cpp
scilab/modules/fileio/sci_gateway/cpp/sci_fileinfo.cpp
scilab/modules/fileio/sci_gateway/cpp/sci_findfiles.cpp
scilab/modules/fileio/sci_gateway/cpp/sci_getlongpathname.cpp
scilab/modules/fileio/sci_gateway/cpp/sci_getshortpathname.cpp
scilab/modules/fileio/sci_gateway/cpp/sci_isdir.cpp
scilab/modules/fileio/sci_gateway/cpp/sci_isfile.cpp
scilab/modules/fileio/sci_gateway/cpp/sci_mclearerr.cpp
scilab/modules/fileio/sci_gateway/cpp/sci_mclose.cpp
scilab/modules/fileio/sci_gateway/cpp/sci_meof.cpp
scilab/modules/fileio/sci_gateway/cpp/sci_merror.cpp
scilab/modules/fileio/sci_gateway/cpp/sci_mfscanf.cpp
scilab/modules/fileio/sci_gateway/cpp/sci_mget.cpp
scilab/modules/fileio/sci_gateway/cpp/sci_mgetl.cpp
scilab/modules/fileio/sci_gateway/cpp/sci_mgetstr.cpp
scilab/modules/fileio/sci_gateway/cpp/sci_mopen.cpp
scilab/modules/fileio/sci_gateway/cpp/sci_mput.cpp
scilab/modules/fileio/sci_gateway/cpp/sci_mputl.cpp
scilab/modules/fileio/sci_gateway/cpp/sci_mputstr.cpp
scilab/modules/fileio/sci_gateway/cpp/sci_mscanf.cpp
scilab/modules/fileio/sci_gateway/cpp/sci_mseek.cpp
scilab/modules/fileio/sci_gateway/cpp/sci_msscanf.cpp
scilab/modules/fileio/sci_gateway/cpp/sci_mtell.cpp
scilab/modules/fileio/sci_gateway/cpp/sci_newest.cpp
scilab/modules/fileio/sci_gateway/cpp/sci_pathconvert.cpp
scilab/modules/fileio/sci_gateway/cpp/sci_removedir.cpp
scilab/modules/fileio/src/cpp/mputl.h
scilab/modules/functions/includes/functions_gw.hxx
scilab/modules/functions/sci_gateway/cpp/functions_gw.cpp
scilab/modules/functions/sci_gateway/cpp/sci_getCurrentThreadId.cpp
scilab/modules/functions/sci_gateway/cpp/sci_getThreads.cpp
scilab/modules/functions/sci_gateway/cpp/sci_mode.cpp
scilab/modules/functions/sci_gateway/cpp/sci_whereis.cpp
scilab/modules/functions/src/c/functions.vcxproj
scilab/modules/gui/includes/gui_gw.hxx
scilab/modules/gui/includes/gw_gui.h
scilab/modules/hdf5/includes/hdf5_gw.hxx
scilab/modules/hdf5/sci_gateway/cpp/hdf5_gw.cpp
scilab/modules/hdf5/sci_gateway/cpp/sci_export_to_hdf5.cpp
scilab/modules/hdf5/sci_gateway/cpp/sci_import_from_hdf5.cpp
scilab/modules/integer/includes/integer_gw.hxx
scilab/modules/integer/sci_gateway/cpp/integer_gw.cpp
scilab/modules/integer/sci_gateway/cpp/sci_double.cpp
scilab/modules/integer/sci_gateway/cpp/sci_inttype.cpp
scilab/modules/io/includes/io_gw.hxx
scilab/modules/io/sci_gateway/cpp/sci_host.cpp
scilab/modules/io/sci_gateway/cpp/sci_unix.cpp
scilab/modules/io/src/cpp/io_gw.cpp
scilab/modules/jvm/includes/jvm_gw.hxx
scilab/modules/jvm/sci_gateway/cpp/jvm_gw.cpp
scilab/modules/localization/includes/localization_gw.hxx
scilab/modules/localization/sci_gateway/cpp/localization_gw.cpp
scilab/modules/localization/sci_gateway/cpp/sci_setlanguage.cpp
scilab/modules/output_stream/includes/gw_output_stream.h
scilab/modules/output_stream/includes/output_stream_gw.hxx
scilab/modules/output_stream/sci_gateway/cpp/output_stream_gw.cpp
scilab/modules/output_stream/src/c/output_stream.vcxproj
scilab/modules/shell/Makefile.am
scilab/modules/shell/Makefile.in
scilab/modules/shell/src/c/shell.vcxproj
scilab/modules/string/includes/gw_string.h
scilab/modules/string/includes/string_gw.hxx
scilab/modules/string/sci_gateway/c/sci_isalphanum.c
scilab/modules/string/sci_gateway/cpp/sci_ascii.cpp
scilab/modules/string/sci_gateway/cpp/sci_grep.cpp
scilab/modules/string/sci_gateway/cpp/sci_isletter.cpp
scilab/modules/string/sci_gateway/cpp/sci_length.cpp
scilab/modules/string/sci_gateway/cpp/sci_part.cpp
scilab/modules/string/sci_gateway/cpp/sci_strcat.cpp
scilab/modules/string/sci_gateway/cpp/sci_strcmp.cpp
scilab/modules/string/sci_gateway/cpp/sci_strcspn.cpp
scilab/modules/string/sci_gateway/cpp/sci_strindex.cpp
scilab/modules/string/sci_gateway/cpp/sci_string.cpp
scilab/modules/string/sci_gateway/cpp/sci_stripblanks.cpp
scilab/modules/string/sci_gateway/cpp/sci_strncpy.cpp
scilab/modules/string/sci_gateway/cpp/sci_strspn.cpp
scilab/modules/string/sci_gateway/cpp/sci_strsubst.cpp
scilab/modules/string/sci_gateway/cpp/sci_strtod.cpp
scilab/modules/string/sci_gateway/cpp/sci_tokens.cpp
scilab/modules/string/sci_gateway/cpp/string_gw.cpp
scilab/modules/types/includes/c_gateway_prototype.h [new file with mode: 0644]
scilab/modules/types/includes/cpp_gateway_prototype.hxx [new file with mode: 0644]
scilab/modules/types/includes/function.hxx
scilab/modules/types/includes/types_gw.hxx
scilab/modules/types/sci_gateway/cpp/sci_cell.cpp
scilab/modules/types/sci_gateway/cpp/sci_fieldnames.cpp
scilab/modules/types/sci_gateway/cpp/sci_getfield.cpp
scilab/modules/types/sci_gateway/cpp/sci_insert.cpp
scilab/modules/types/sci_gateway/cpp/sci_isfield.cpp
scilab/modules/types/sci_gateway/cpp/sci_list.cpp
scilab/modules/types/sci_gateway/cpp/sci_makecell.cpp
scilab/modules/types/sci_gateway/cpp/sci_mlist.cpp
scilab/modules/types/sci_gateway/cpp/sci_null.cpp
scilab/modules/types/sci_gateway/cpp/sci_struct.cpp
scilab/modules/types/sci_gateway/cpp/sci_tlist.cpp
scilab/modules/types/sci_gateway/cpp/sci_typeof.cpp
scilab/modules/types/sci_gateway/cpp/sci_usertype.cpp
scilab/modules/types/sci_gateway/cpp/types_gw.cpp
scilab/modules/types/sci_gateway/cpp/types_gw/types_gw.vcxproj
scilab/modules/types/sci_gateway/cpp/types_gw/types_gw.vcxproj.filters
scilab/modules/types/types.vcxproj
scilab/modules/types/types.vcxproj.filters

index 14648e6..2ab1c8a 100644 (file)
@@ -57,7 +57,8 @@ libsciaction_binding_la_CFLAGS=       $(JAVA_JNI_INCLUDE) \
 -I$(top_srcdir)/libs/MALLOC/includes/ \
 -I$(top_srcdir)/modules/jvm/includes/ \
 -I$(top_srcdir)/modules/api_scilab/includes \
--I$(top_srcdir)/modules/output_stream/includes
+-I$(top_srcdir)/modules/output_stream/includes \
+-I$(top_srcdir)/modules/types/includes
 
 # Includes need for the compilation
 libsciaction_binding_la_CPPFLAGS=      $(JAVA_JNI_INCLUDE) \
@@ -67,7 +68,8 @@ libsciaction_binding_la_CPPFLAGS=     $(JAVA_JNI_INCLUDE) \
 -I$(top_srcdir)/libs/MALLOC/includes/ \
 -I$(top_srcdir)/modules/jvm/includes/ \
 -I$(top_srcdir)/modules/api_scilab/includes \
--I$(top_srcdir)/modules/output_stream/includes
+-I$(top_srcdir)/modules/output_stream/includes \
+-I$(top_srcdir)/modules/types/includes
 
 # Name of the future library (.la will be replace by .so, .a, etc regarding
 # the system)
@@ -104,7 +106,7 @@ modulename=action_binding
 
 #### action_binding : Conf files ####
 libsciaction_binding_la_rootdir = $(mydatadir)
-libsciaction_binding_la_root_DATA =  license.txt 
+libsciaction_binding_la_root_DATA =  license.txt
 
 ####´┐Żaction_binding : init scripts ####
 libsciaction_binding_la_etcdir = $(mydatadir)/etc
index b958f18..16ac91c 100644 (file)
@@ -485,7 +485,8 @@ libsciaction_binding_la_CFLAGS = $(JAVA_JNI_INCLUDE) \
 -I$(top_srcdir)/libs/MALLOC/includes/ \
 -I$(top_srcdir)/modules/jvm/includes/ \
 -I$(top_srcdir)/modules/api_scilab/includes \
--I$(top_srcdir)/modules/output_stream/includes
+-I$(top_srcdir)/modules/output_stream/includes \
+-I$(top_srcdir)/modules/types/includes
 
 
 # Includes need for the compilation
@@ -496,7 +497,8 @@ libsciaction_binding_la_CPPFLAGS = $(JAVA_JNI_INCLUDE) \
 -I$(top_srcdir)/libs/MALLOC/includes/ \
 -I$(top_srcdir)/modules/jvm/includes/ \
 -I$(top_srcdir)/modules/api_scilab/includes \
--I$(top_srcdir)/modules/output_stream/includes
+-I$(top_srcdir)/modules/output_stream/includes \
+-I$(top_srcdir)/modules/types/includes
 
 
 # Name of the future library (.la will be replace by .so, .a, etc regarding
@@ -526,7 +528,7 @@ modulename = action_binding
 
 #### action_binding : Conf files ####
 libsciaction_binding_la_rootdir = $(mydatadir)
-libsciaction_binding_la_root_DATA = license.txt 
+libsciaction_binding_la_root_DATA = license.txt
 
 ####´┐Żaction_binding : init scripts ####
 libsciaction_binding_la_etcdir = $(mydatadir)/etc
index 4b75535..9ef7a11 100644 (file)
@@ -1,11 +1,12 @@
 /*
 * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
 * Copyright (C) 2010 - DIGITEO - Allan SIMON
-* 
+* Copyright (C) 2011 - DIGITEO - Bruno JOFRET
+*
 * 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    
+* are also available at
 * http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt
 *
 */
 #define __GW_ACTION_BINDING__
 /*--------------------------------------------------------------------------*/
 #include "dynlib_action_binding.h"
+#include "c_gateway_prototype.h"
 /*--------------------------------------------------------------------------*/
 ACTION_BINDING_IMPEXP int gw_action_binding(void);
-ACTION_BINDING_IMPEXP int sci_notify(char *fname, int*_piKey);
+ACTION_BINDING_IMPEXP C_GATEWAY_PROTOTYPE(sci_notify);
 /*--------------------------------------------------------------------------*/
 #endif /* __GW_ACTION_BINDING__ */
 /*--------------------------------------------------------------------------*/
index 9cf30bb..cae95e1 100644 (file)
@@ -81,7 +81,7 @@
     <ClCompile>
       <AdditionalOptions>%(AdditionalOptions)</AdditionalOptions>
       <Optimization>Disabled</Optimization>
-      <AdditionalIncludeDirectories>.;../../includes;../jni;../../../../libs/MALLOC/includes;../../../output_stream/includes;../../../core/includes;../../../jvm/includes;../../../../java/jdk/include;../../../api_scilab/includes;../../../../java/jdk/include/win32;../../../localization/includes;../../../../libs/intl;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+      <AdditionalIncludeDirectories>.;../../includes;../jni;../../../../libs/MALLOC/includes;../../../output_stream/includes;../../../core/includes;../../../jvm/includes;../../../../java/jdk/include;../../../api_scilab/includes;../../../../java/jdk/include/win32;../../../localization/includes;../../../../libs/intl;../../../types/includes;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
       <PreprocessorDefinitions>_CRT_SECURE_NO_DEPRECATE;FORDLL;_DEBUG;_WINDOWS;_USRDLL;ACTION_BINDING_EXPORTS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
       <MinimalRebuild>true</MinimalRebuild>
       <BasicRuntimeChecks>Default</BasicRuntimeChecks>
@@ -124,7 +124,7 @@ lib /DEF:"$(ProjectDir)localization_Import.def" /SUBSYSTEM:WINDOWS /MACHINE:$(Pl
     </Midl>
     <ClCompile>
       <Optimization>Disabled</Optimization>
-      <AdditionalIncludeDirectories>.;../../includes;../jni;../../../../libs/MALLOC/includes;../../../output_stream/includes;../../../core/includes;../../../jvm/includes;../../../../java/jdk/include;../../../api_scilab/includes;../../../../java/jdk/include/win32;../../../localization/includes;../../../../libs/intl;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+      <AdditionalIncludeDirectories>.;../../includes;../jni;../../../../libs/MALLOC/includes;../../../output_stream/includes;../../../core/includes;../../../jvm/includes;../../../../java/jdk/include;../../../api_scilab/includes;../../../../java/jdk/include/win32;../../../localization/includes;../../../../libs/intl;../../../types/includes;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
       <PreprocessorDefinitions>_CRT_SECURE_NO_DEPRECATE;FORDLL;_DEBUG;_WINDOWS;_USRDLL;ACTION_BINDING_EXPORTS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
       <MinimalRebuild>true</MinimalRebuild>
       <BasicRuntimeChecks>Default</BasicRuntimeChecks>
@@ -168,7 +168,7 @@ lib /DEF:"$(ProjectDir)localization_Import.def" /SUBSYSTEM:WINDOWS /MACHINE:$(Pl
       <InlineFunctionExpansion>OnlyExplicitInline</InlineFunctionExpansion>
       <FavorSizeOrSpeed>Speed</FavorSizeOrSpeed>
       <WholeProgramOptimization>false</WholeProgramOptimization>
-      <AdditionalIncludeDirectories>.;../../includes;../jni;../../../../libs/MALLOC/includes;../../../output_stream/includes;../../../core/includes;../../../jvm/includes;../../../../java/jdk/include;../../../api_scilab/includes;../../../../java/jdk/include/win32;../../../localization/includes;../../../../libs/intl;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+      <AdditionalIncludeDirectories>.;../../includes;../jni;../../../../libs/MALLOC/includes;../../../output_stream/includes;../../../core/includes;../../../jvm/includes;../../../../java/jdk/include;../../../api_scilab/includes;../../../../java/jdk/include/win32;../../../localization/includes;../../../../libs/intl;../../../types/includes;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
       <PreprocessorDefinitions>_CRT_SECURE_NO_DEPRECATE;FORDLL;NDEBUG;_WINDOWS;_USRDLL;ACTION_BINDING_EXPORTS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
       <StringPooling>true</StringPooling>
       <RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
@@ -219,7 +219,7 @@ lib /DEF:"$(ProjectDir)localization_Import.def" /SUBSYSTEM:WINDOWS /MACHINE:$(Pl
       <InlineFunctionExpansion>OnlyExplicitInline</InlineFunctionExpansion>
       <FavorSizeOrSpeed>Speed</FavorSizeOrSpeed>
       <WholeProgramOptimization>false</WholeProgramOptimization>
-      <AdditionalIncludeDirectories>.;../../includes;../jni;../../../../libs/MALLOC/includes;../../../output_stream/includes;../../../core/includes;../../../jvm/includes;../../../../java/jdk/include;../../../api_scilab/includes;../../../../java/jdk/include/win32;../../../localization/includes;../../../../libs/intl;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+      <AdditionalIncludeDirectories>.;../../includes;../jni;../../../../libs/MALLOC/includes;../../../output_stream/includes;../../../core/includes;../../../jvm/includes;../../../../java/jdk/include;../../../api_scilab/includes;../../../../java/jdk/include/win32;../../../localization/includes;../../../../libs/intl;../../../types/includes;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
       <PreprocessorDefinitions>_CRT_SECURE_NO_DEPRECATE;FORDLL;NDEBUG;_WINDOWS;_USRDLL;ACTION_BINDING_EXPORTS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
       <StringPooling>true</StringPooling>
       <RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
index 2c363c8..bb3c454 100644 (file)
@@ -13,9 +13,6 @@
 #ifndef __BOOLEAN_GW_HXX__
 #define __BOOLEAN_GW_HXX__
 
-#include "funcmanager.hxx"
-#include "context.hxx"
-
 #include "dynlib_boolean_gw.h"
 
 class BooleanModule
index bdac010..3331e52 100644 (file)
@@ -1,11 +1,11 @@
 /*
  * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
  * Copyright (C) INRIA - Allan CORNET
- * 
+ *
  * 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    
+ * are also available at
  * http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt
  *
  */
@@ -15,6 +15,7 @@
 /*--------------------------------------------------------------------------*/
 #include "machine.h"
 #include "api_scilab.h"
+#include "c_gateway_prototype.h"
 /*--------------------------------------------------------------------------*/
 int gw_boolean(void);
 /*--------------------------------------------------------------------------*/
@@ -23,8 +24,8 @@ int C2F(sci_find)(char *fname,unsigned long fname_len);
 int C2F(sci_bool2s)(char *fname,unsigned long fname_len);
 
 //YaSp
-int sci_or(char *fname, int* _piKey);
-int sci_and(char *fname, int* _piKey);
+C_GATEWAY_PROTOTYPE(sci_or);
+C_GATEWAY_PROTOTYPE(sci_and);
 /*--------------------------------------------------------------------------*/
 #endif /*  __GW_BOOLEAN__ */
 /*--------------------------------------------------------------------------*/
index 2fa04ae..dd27958 100644 (file)
@@ -77,7 +77,7 @@
     <ClCompile>
       <AdditionalOptions>%(AdditionalOptions)</AdditionalOptions>
       <Optimization>Disabled</Optimization>
-      <AdditionalIncludeDirectories>.;../../includes;../../../../libs/MALLOC/includes;../../../localization/includes;../../../api_scilab/includes;../../../core/includes;../../../output_stream/includes;../../../../libs/hashtable;../../../fileio/includes;../../../windows_tools/includes;../../../../libs/intl;../../../operations/includes;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+      <AdditionalIncludeDirectories>.;../../includes;../../../../libs/MALLOC/includes;../../../localization/includes;../../../api_scilab/includes;../../../core/includes;../../../output_stream/includes;../../../../libs/hashtable;../../../fileio/includes;../../../windows_tools/includes;../../../../libs/intl;../../../operations/includes;../../../types/includes;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
       <PreprocessorDefinitions>_CRT_SECURE_NO_DEPRECATE;FORDLL;_DEBUG;_WINDOWS;_USRDLL;BOOLEAN_EXPORTS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
       <MinimalRebuild>true</MinimalRebuild>
       <BasicRuntimeChecks>Default</BasicRuntimeChecks>
@@ -120,7 +120,7 @@ cd .. &gt;nul
     </Midl>
     <ClCompile>
       <Optimization>Disabled</Optimization>
-      <AdditionalIncludeDirectories>.;../../includes;../../../../libs/MALLOC/includes;../../../localization/includes;../../../api_scilab/includes;../../../core/includes;../../../output_stream/includes;../../../../libs/hashtable;../../../fileio/includes;../../../windows_tools/includes;../../../../libs/intl;../../../operations/includes;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+      <AdditionalIncludeDirectories>.;../../includes;../../../../libs/MALLOC/includes;../../../localization/includes;../../../api_scilab/includes;../../../core/includes;../../../output_stream/includes;../../../../libs/hashtable;../../../fileio/includes;../../../windows_tools/includes;../../../../libs/intl;../../../operations/includes;../../../types/includes;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
       <PreprocessorDefinitions>_CRT_SECURE_NO_DEPRECATE;FORDLL;_DEBUG;_WINDOWS;_USRDLL;BOOLEAN_EXPORTS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
       <MinimalRebuild>true</MinimalRebuild>
       <BasicRuntimeChecks>Default</BasicRuntimeChecks>
@@ -164,7 +164,7 @@ cd .. &gt;nul
       <InlineFunctionExpansion>OnlyExplicitInline</InlineFunctionExpansion>
       <FavorSizeOrSpeed>Speed</FavorSizeOrSpeed>
       <WholeProgramOptimization>false</WholeProgramOptimization>
-      <AdditionalIncludeDirectories>.;../../includes;../../../../libs/MALLOC/includes;../../../localization/includes;../../../api_scilab/includes;../../../core/includes;../../../output_stream/includes;../../../../libs/hashtable;../../../fileio/includes;../../../windows_tools/includes;../../../../libs/intl;../../../operations/includes;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+      <AdditionalIncludeDirectories>.;../../includes;../../../../libs/MALLOC/includes;../../../localization/includes;../../../api_scilab/includes;../../../core/includes;../../../output_stream/includes;../../../../libs/hashtable;../../../fileio/includes;../../../windows_tools/includes;../../../../libs/intl;../../../operations/includes;../../../types/includes;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
       <PreprocessorDefinitions>_CRT_SECURE_NO_DEPRECATE;FORDLL;NDEBUG;_WINDOWS;_USRDLL;BOOLEAN_EXPORTS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
       <StringPooling>true</StringPooling>
       <RuntimeLibrary>MultiThreaded</RuntimeLibrary>
@@ -215,7 +215,7 @@ cd .. &gt;nul
       <InlineFunctionExpansion>OnlyExplicitInline</InlineFunctionExpansion>
       <FavorSizeOrSpeed>Speed</FavorSizeOrSpeed>
       <WholeProgramOptimization>false</WholeProgramOptimization>
-      <AdditionalIncludeDirectories>.;../../includes;../../../../libs/MALLOC/includes;../../../localization/includes;../../../api_scilab/includes;../../../core/includes;../../../output_stream/includes;../../../../libs/hashtable;../../../fileio/includes;../../../windows_tools/includes;../../../../libs/intl;../../../operations/includes;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+      <AdditionalIncludeDirectories>.;../../includes;../../../../libs/MALLOC/includes;../../../localization/includes;../../../api_scilab/includes;../../../core/includes;../../../output_stream/includes;../../../../libs/hashtable;../../../fileio/includes;../../../windows_tools/includes;../../../../libs/intl;../../../operations/includes;../../../types/includes;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
       <PreprocessorDefinitions>_CRT_SECURE_NO_DEPRECATE;FORDLL;NDEBUG;_WINDOWS;_USRDLL;BOOLEAN_EXPORTS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
       <StringPooling>true</StringPooling>
       <RuntimeLibrary>MultiThreaded</RuntimeLibrary>
index 141ddfa..8e1ccbd 100644 (file)
@@ -11,6 +11,8 @@
 */
 
 #include "boolean_gw.hxx"
+#include "context.hxx"
+#include "function.hxx"
 
 #define MODULE_NAME L"boolean"
 extern "C"
index fec704f..046bc7d 100644 (file)
@@ -26,7 +26,8 @@ libscicall_scilab_la_CFLAGS=          -I$(srcdir)/includes/ \
                        -I$(top_srcdir)/modules/operations/includes \
                        -I$(top_srcdir)/modules/system_env/includes \
                        -I$(top_srcdir)/modules/string/includes \
-                       -I$(top_srcdir)/modules/core/src/c/
+                       -I$(top_srcdir)/modules/core/src/c/ \
+                       -I$(top_srcdir)/modules/types/includes/
 
 pkglib_LTLIBRARIES = libscicall_scilab.la
 noinst_LTLIBRARIES = libscicall_scilab-algo.la
@@ -52,7 +53,7 @@ modulename=call_scilab
 
 #### call_scilab : Conf files ####
 libscicall_scilab_la_rootdir = $(mydatadir)
-libscicall_scilab_la_root_DATA =  license.txt 
+libscicall_scilab_la_root_DATA =  license.txt
 
 
 #### call_scilab : init scripts ####
index 8cbbb9f..27650ca 100644 (file)
@@ -437,7 +437,8 @@ libscicall_scilab_la_CFLAGS = -I$(srcdir)/includes/ \
                        -I$(top_srcdir)/modules/operations/includes \
                        -I$(top_srcdir)/modules/system_env/includes \
                        -I$(top_srcdir)/modules/string/includes \
-                       -I$(top_srcdir)/modules/core/src/c/
+                       -I$(top_srcdir)/modules/core/src/c/ \
+                       -I$(top_srcdir)/modules/types/includes/
 
 pkglib_LTLIBRARIES = libscicall_scilab.la
 noinst_LTLIBRARIES = libscicall_scilab-algo.la
@@ -456,7 +457,7 @@ modulename = call_scilab
 
 #### call_scilab : Conf files ####
 libscicall_scilab_la_rootdir = $(mydatadir)
-libscicall_scilab_la_root_DATA = license.txt 
+libscicall_scilab_la_root_DATA = license.txt
 
 #### call_scilab : init scripts ####
 libscicall_scilab_la_etcdir = $(mydatadir)/etc
index d30493d..1b630a2 100644 (file)
@@ -77,7 +77,7 @@
     <ClCompile>
       <AdditionalOptions>%(AdditionalOptions)</AdditionalOptions>
       <Optimization>Disabled</Optimization>
-      <AdditionalIncludeDirectories>includes;src/c;../core/includes;../api_scilab/includes;../fileio/includes;../windows_tools/includes;../windows_tools/src/c/scilab_windows;../localization/includes;../action_binding/includes;../output_stream/includes;../graphics/includes;../../libs/MALLOC/includes;../../libs/intl;../../libs/doublylinkedlist/includes;../operations/includes;../system_env/includes;../string/includes;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+      <AdditionalIncludeDirectories>includes;src/c;../core/includes;../api_scilab/includes;../fileio/includes;../windows_tools/includes;../windows_tools/src/c/scilab_windows;../localization/includes;../action_binding/includes;../output_stream/includes;../graphics/includes;../../libs/MALLOC/includes;../../libs/intl;../../libs/doublylinkedlist/includes;../operations/includes;../system_env/includes;../string/includes;../types/includes;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
       <PreprocessorDefinitions>FORDLL;_DEBUG;_WINDOWS;_USRDLL;CALL_SCILAB_EXPORTS;_CRT_SECURE_NO_DEPRECATE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
       <MinimalRebuild>true</MinimalRebuild>
       <BasicRuntimeChecks>Default</BasicRuntimeChecks>
@@ -91,7 +91,6 @@
       <Message>Make dependencies</Message>
       <Command>lib /DEF:"$(ProjectDir)LibScilab_Import.def" /SUBSYSTEM:WINDOWS /MACHINE:$(PlatformShortName) /OUT:"$(ProjectDir)LibScilab.lib" 1&gt;NUL 2&gt;NUL
 </Command>
-
     </PreLinkEvent>
     <Link>
       <AdditionalDependencies>LibScilab.lib;%(AdditionalDependencies)</AdditionalDependencies>
     </Midl>
     <ClCompile>
       <Optimization>Disabled</Optimization>
-      <AdditionalIncludeDirectories>includes;src/c;../core/includes;../api_scilab/includes;../fileio/includes;../windows_tools/includes;../windows_tools/src/c/scilab_windows;../localization/includes;../action_binding/includes;../output_stream/includes;../graphics/includes;../../libs/MALLOC/includes;../../libs/intl;../../libs/doublylinkedlist/includes;../operations/includes;../system_env/includes;../string/includes;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+      <AdditionalIncludeDirectories>includes;src/c;../core/includes;../api_scilab/includes;../fileio/includes;../windows_tools/includes;../windows_tools/src/c/scilab_windows;../localization/includes;../action_binding/includes;../output_stream/includes;../graphics/includes;../../libs/MALLOC/includes;../../libs/intl;../../libs/doublylinkedlist/includes;../operations/includes;../system_env/includes;../string/includes;../types/includes;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
       <PreprocessorDefinitions>FORDLL;_DEBUG;_WINDOWS;_USRDLL;CALL_SCILAB_EXPORTS;_CRT_SECURE_NO_DEPRECATE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
       <MinimalRebuild>true</MinimalRebuild>
       <BasicRuntimeChecks>Default</BasicRuntimeChecks>
     </ClCompile>
     <PreLinkEvent>
       <Message>Make dependencies</Message>
-
       <Command>lib /DEF:"$(ProjectDir)LibScilab_Import.def" /SUBSYSTEM:WINDOWS /MACHINE:$(PlatformShortName) /OUT:"$(ProjectDir)LibScilab.lib" 1&gt;NUL 2&gt;NUL
 </Command>
-
     </PreLinkEvent>
     <Link>
       <AdditionalDependencies>LibScilab.lib;%(AdditionalDependencies)</AdditionalDependencies>
       <InlineFunctionExpansion>OnlyExplicitInline</InlineFunctionExpansion>
       <FavorSizeOrSpeed>Speed</FavorSizeOrSpeed>
       <WholeProgramOptimization>false</WholeProgramOptimization>
-      <AdditionalIncludeDirectories>includes;src/c;../core/includes;../api_scilab/includes;../fileio/includes;../windows_tools/includes;../windows_tools/src/c/scilab_windows;../localization/includes;../action_binding/includes;../output_stream/includes;../graphics/includes;../../libs/MALLOC/includes;../../libs/intl;../../libs/doublylinkedlist/includes;../operations/includes;../system_env/includes;../string/includes;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+      <AdditionalIncludeDirectories>includes;src/c;../core/includes;../api_scilab/includes;../fileio/includes;../windows_tools/includes;../windows_tools/src/c/scilab_windows;../localization/includes;../action_binding/includes;../output_stream/includes;../graphics/includes;../../libs/MALLOC/includes;../../libs/intl;../../libs/doublylinkedlist/includes;../operations/includes;../system_env/includes;../string/includes;../types/includes;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
       <PreprocessorDefinitions>FORDLL;NDEBUG;_WINDOWS;_USRDLL;CALL_SCILAB_EXPORTS;_CRT_SECURE_NO_DEPRECATE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
       <StringPooling>true</StringPooling>
       <RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
       <InlineFunctionExpansion>OnlyExplicitInline</InlineFunctionExpansion>
       <FavorSizeOrSpeed>Speed</FavorSizeOrSpeed>
       <WholeProgramOptimization>false</WholeProgramOptimization>
-      <AdditionalIncludeDirectories>includes;src/c;../core/includes;../api_scilab/includes;../fileio/includes;../windows_tools/includes;../windows_tools/src/c/scilab_windows;../localization/includes;../action_binding/includes;../output_stream/includes;../graphics/includes;../../libs/MALLOC/includes;../../libs/intl;../../libs/doublylinkedlist/includes;../operations/includes;../system_env/includes;../string/includes;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
-
+      <AdditionalIncludeDirectories>includes;src/c;../core/includes;../api_scilab/includes;../fileio/includes;../windows_tools/includes;../windows_tools/src/c/scilab_windows;../localization/includes;../action_binding/includes;../output_stream/includes;../graphics/includes;../../libs/MALLOC/includes;../../libs/intl;../../libs/doublylinkedlist/includes;../operations/includes;../system_env/includes;../string/includes;../types/includes;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
       <PreprocessorDefinitions>FORDLL;NDEBUG;_WINDOWS;_USRDLL;CALL_SCILAB_EXPORTS;_CRT_SECURE_NO_DEPRECATE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
       <StringPooling>true</StringPooling>
       <RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
index 5e3282d..1716a60 100644 (file)
@@ -14,9 +14,7 @@
 #ifndef __CORE_GW_HXX__
 #define __CORE_GW_HXX__
 
-#include "function.hxx"
-#include "context.hxx"
-
+#include "cpp_gateway_prototype.hxx"
 #include "dynlib_core_gw.h"
 
 class CoreModule
index e5a683c..50331d5 100644 (file)
@@ -14,6 +14,7 @@
 /*--------------------------------------------------------------------------*/
 #include "machine.h"
 #include "api_scilab.h"
+#include "c_gateway_prototype.h"
 /*--------------------------------------------------------------------------*/
 int gw_core(void);
 /*--------------------------------------------------------------------------*/
@@ -60,13 +61,13 @@ int C2F(sci_getvariablesonstack)(char *fname,unsigned long fname_len);
 int C2F(sci_readgateway)(char *fname,unsigned long fname_len);
 int C2F(sci_comp)(char *fname,unsigned long fname_len);
 
-int C2F(sci_typename)(char *fname,int* _piKey);
+C_GATEWAY_PROTOTYPE(C2F(sci_typename));
 int C2F(sci_funcprot)(char *fname,int* _piKey);
 int C2F(sci_newfun)(char *fname, int* _piKey);
 
 //Yasp
-int sci_type(char *fname, int* _piKey);
-int sci_getdebuginfo(char *fname, int* _piKey);
+C_GATEWAY_PROTOTYPE(sci_type);
+C_GATEWAY_PROTOTYPE(sci_getdebuginfo);
 /*--------------------------------------------------------------------------*/
 #endif /*  __GW_CORE__ */
 /*--------------------------------------------------------------------------*/
index fd3967b..2ad67f3 100644 (file)
@@ -10,7 +10,7 @@
  *
  */
 
-
+#include "core_gw.hxx"
 #include "function.hxx"
 #include "runner.hxx"
 #include "threadId.hxx"
@@ -46,6 +46,6 @@ types::Function::ReturnValue sci_abort(types::typed_list &in, int _iRetCount, ty
         pThreadId->abort();
         __WaitThreadDie(id);
     }
-   
+
     return types::Function::OK;
 }
index f17ae93..8d232d5 100644 (file)
  *
  */
 
+#include "core_gw.hxx"
 #include "function.hxx"
 #include "context.hxx"
-#include "arrayof.hxx"
+#include "double.hxx"
 
 extern "C"
 {
index 9d63389..755880d 100644 (file)
@@ -1,23 +1,19 @@
 /*
  *  Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
  *  Copyright (C) 2010-2010 - DIGITEO - Bruno JOFRET
- * 
+ *
  *  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 "core_gw.hxx"
 #include "banner.hxx"
-#include "yaspio.hxx"
 #include "function.hxx"
 
-extern "C" 
-{
-#include "version.h"
-}
 
 /*--------------------------------------------------------------------------*/
 types::Function::ReturnValue sci_banner(types::typed_list &in, int _iRetCount, types::typed_list &out)
index fb6834d..f4de002 100644 (file)
@@ -10,6 +10,7 @@
  *
  */
 
+#include "core_gw.hxx"
 #include "function.hxx"
 #include "callable.hxx"
 #include "context.hxx"
index ff29903..1ef973a 100644 (file)
@@ -10,6 +10,7 @@
  *
  */
 
+#include "core_gw.hxx"
 #include "function.hxx"
 #include "callable.hxx"
 #include "context.hxx"
index 99b25aa..efa856b 100644 (file)
@@ -10,6 +10,7 @@
  *
  */
 
+#include "core_gw.hxx"
 #include "types.hxx"
 #include "function.hxx"
 #include "double.hxx"
index a624f0f..3d1b001 100644 (file)
@@ -10,6 +10,7 @@
  *
  */
 
+#include "core_gw.hxx"
 #include "function.hxx"
 #include "context.hxx"
 #include "string.hxx"
index 076ea9c..31f3b00 100644 (file)
@@ -10,6 +10,7 @@
  *
  */
 
+#include "core_gw.hxx"
 #include "function.hxx"
 #include "configvariable.hxx"
 #include "double.hxx"
index 4dcdabf..a8c159c 100644 (file)
@@ -10,6 +10,7 @@
  *
  */
 
+#include "core_gw.hxx"
 #include "types.hxx"
 #include "function.hxx"
 #include "string.hxx"
index b30c061..501adb7 100644 (file)
  */
 /*--------------------------------------------------------------------------*/
 
-#include "funcmanager.hxx"
-#include "context.hxx"
+#include <list>
+
+#include "core_gw.hxx"
 #include "configvariable.hxx"
 #include "string.hxx"
+#include "function.hxx"
 
 using namespace types;
 
@@ -26,10 +28,10 @@ Function::ReturnValue sci_getmodules(types::typed_list &in, int _iRetCount, type
     }
 
 
-    list<wstring> sModuleList = ConfigVariable::getModuleList();
+    std::list<std::wstring> sModuleList = ConfigVariable::getModuleList();
     String *pOut  = new String(static_cast<int>(sModuleList.size()), 1);
 
-    list<wstring>::iterator it = sModuleList.begin();
+    std::list<std::wstring>::iterator it = sModuleList.begin();
     for(int i = 0; it != sModuleList.end() ; it++,i++)
     {
         pOut->set(i, it->c_str());
index 331ed08..62cb34c 100644 (file)
@@ -9,6 +9,8 @@
  * http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt
  *
  */
+
+#include "core_gw.hxx"
 #include "function.hxx"
 #include "context.hxx"
 #include "string.hxx"
index 653b146..f445805 100644 (file)
@@ -15,6 +15,8 @@
 #include "funcmanager.hxx"
 #include "core_gw.hxx"
 #include "string.hxx"
+#include "double.hxx"
+#include "function.hxx"
 
 extern "C"
 {
index e6f2395..7acbaaf 100644 (file)
@@ -10,6 +10,7 @@
  *
  */
 
+#include "core_gw.hxx"
 #include "function.hxx"
 #include "callable.hxx"
 #include "context.hxx"
index 9d28756..cf403f5 100644 (file)
@@ -9,9 +9,12 @@
  * http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt
  *
  */
+
+#include "core_gw.hxx"
 #include "function.hxx"
-#include "context.hxx"
 #include "string.hxx"
+#include "double.hxx"
+#include "bool.hxx"
 #include "configvariable.hxx"
 
 extern "C"
index 45f82fe..bc16acc 100644 (file)
@@ -10,6 +10,7 @@
  *
  */
 
+#include "core_gw.hxx"
 #include "function.hxx"
 #include "runner.hxx"
 #include "threadId.hxx"
index ad358fe..0704b76 100644 (file)
@@ -1,15 +1,16 @@
 /*
  *  Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
  *  Copyright (C) 2010-2010 - DIGITEO - Bruno JOFRET
- * 
+ *
  *  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 "core_gw.hxx"
 #include "function.hxx"
 #include "configvariable.hxx"
 
index a79146d..be3e9b4 100644 (file)
@@ -10,6 +10,7 @@
  *
  */
 
+#include "core_gw.hxx"
 #include "function.hxx"
 #include "runner.hxx"
 #include "threadId.hxx"
index 29b6c6d..ff1a768 100644 (file)
@@ -10,6 +10,7 @@
  *
  */
 
+#include "core_gw.hxx"
 #include "function.hxx"
 #include "double.hxx"
 #include "yaspio.hxx"
index ae73295..8970df7 100644 (file)
@@ -9,6 +9,8 @@
  *  http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt
  *
  */
+
+#include "core_gw.hxx"
 #include "function.hxx"
 #include "string.hxx"
 
index 907f02a..8210a75 100644 (file)
@@ -14,6 +14,7 @@
 #include "funcmanager.hxx"
 #include "function.hxx"
 #include "string.hxx"
+#include "bool.hxx"
 #include "configvariable.hxx"
 
 
index 1f7970f..52ad90d 100644 (file)
@@ -15,8 +15,7 @@
 
 #include "dynlib_dynamic_link_gw.h"
 
-#include "funcmanager.hxx"
-#include "context.hxx"
+#include "cpp_gateway_prototype.hxx"
 
 class DynamicLinkModule
 {
index 46989ca..f867aa6 100644 (file)
@@ -13,6 +13,7 @@
 
 /*--------------------------------------------------------------------------*/
 
+#include "dynamic_link_gw.hxx"
 #include "function.hxx"
 #include "double.hxx"
 #include "string.hxx"
index 0f73076..4d53bc2 100644 (file)
@@ -12,7 +12,7 @@
  */
 
 /*--------------------------------------------------------------------------*/
-
+#include "dynamic_link_gw.hxx"
 #include "function.hxx"
 #include "string.hxx"
 extern "C"
index 7fc9166..646fe95 100644 (file)
@@ -12,6 +12,7 @@
  */
 
 /*--------------------------------------------------------------------------*/
+#include "dynamic_link_gw.hxx"
 #include "function.hxx"
 #include "double.hxx"
 extern "C"
index c45ad0d..ea90ac4 100644 (file)
@@ -12,6 +12,7 @@
  */
 
 /*-----------------------------------------------------------------------------------*/
+#include "dynamic_link_gw.hxx"
 #include "function.hxx"
 #include "double.hxx"
 #include "string.hxx"
index 1550d12..62d5998 100644 (file)
@@ -12,6 +12,7 @@
  */
 
 /*--------------------------------------------------------------------------*/
+#include "dynamic_link_gw.hxx"
 #include "function.hxx"
 #include "double.hxx"
 
index e136921..0d05c6b 100644 (file)
@@ -1,7 +1,7 @@
 /*
 *  Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
 *  Copyright (C) 2008-2008 - DIGITEO - Antoine ELIAS
-*  Copyright (C) 2010-2010 - DIGITEO - Bruno JOFRET
+*  Copyright (C) 2010-2011 - DIGITEO - Bruno JOFRET
 *
 *  This file must be used under the terms of the CeCILL.
 *  This source file is licensed as described in the file COPYING, which
@@ -14,9 +14,7 @@
 #ifndef __ELEM_FUNC_GW_HXX__
 #define __ELEM_FUNC_GW_HXX__
 
-#include "funcmanager.hxx"
-#include "context.hxx"
-#include "function.hxx"
+#include "cpp_gateway_prototype.hxx"
 
 #ifdef _MSC_VER
        #if ELEM_FUNC_GW_EXPORTS
index 6cfbe48..cae1594 100644 (file)
@@ -1,20 +1,21 @@
 /*
  * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
  * Copyright (C) 2006 - INRIA - Allan CORNET
- * 
+ *
  * 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    
+ * are also available at
  * http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt
  *
  */
-/*--------------------------------------------------------------------------*/ 
+/*--------------------------------------------------------------------------*/
 #ifndef __GW_ELEMENTARIES_FUNCTIONS__
 #define __GW_ELEMENTARIES_FUNCTIONS__
 /*--------------------------------------------------------------------------*/
 #include "machine.h"
 #include "dynlib_elementary_functions.h"
+#include "c_gateway_prototype.h"
 /*--------------------------------------------------------------------------*/
 ELEMENTARY_FUNCTIONS_IMPEXP int gw_elementary_functions(void);
 /*--------------------------------------------------------------------------*/
@@ -23,48 +24,48 @@ int sci_spones(char *fname,unsigned long fname_len);
 int sci_isequalbitwise(char *fname, unsigned long fname_len);
 
 // YaSp
-ELEMENTARY_FUNCTIONS_IMPEXP int sci_abs(char *fname, int* _piKey);
-ELEMENTARY_FUNCTIONS_IMPEXP int sci_acos(char *fname, int* _piKey);
-ELEMENTARY_FUNCTIONS_IMPEXP int sci_asin(char *fname, int* _piKey);
-ELEMENTARY_FUNCTIONS_IMPEXP int sci_atan(char *fname, int* _piKey);
-ELEMENTARY_FUNCTIONS_IMPEXP int sci_ceil(char *fname, int* _piKey);
-ELEMENTARY_FUNCTIONS_IMPEXP int sci_clean(char *fname, int* _piKey);
-ELEMENTARY_FUNCTIONS_IMPEXP int sci_conj(char *fname, int* _piKey);
-ELEMENTARY_FUNCTIONS_IMPEXP int sci_cos(char *fname, int* _piKey);
-ELEMENTARY_FUNCTIONS_IMPEXP int sci_cumprod(char *fname, int* _piKey);
-ELEMENTARY_FUNCTIONS_IMPEXP int sci_cumsum(char *fname, int* _piKey);
-ELEMENTARY_FUNCTIONS_IMPEXP int sci_diag(char *fname, int* _piKey);
-ELEMENTARY_FUNCTIONS_IMPEXP int sci_dsearch(char *fname, int* _piKey);
-ELEMENTARY_FUNCTIONS_IMPEXP int sci_exp(char *fname, int* _piKey);
-ELEMENTARY_FUNCTIONS_IMPEXP int sci_expm(char *fname, int* _piKey);
-ELEMENTARY_FUNCTIONS_IMPEXP int sci_floor(char *fname, int* _piKey);
-ELEMENTARY_FUNCTIONS_IMPEXP int sci_frexp(char *fname, int* _piKey);
-ELEMENTARY_FUNCTIONS_IMPEXP int sci_gsort(char *fname, int* _piKey);
-ELEMENTARY_FUNCTIONS_IMPEXP int sci_imag(char *fname, int* _piKey);
-ELEMENTARY_FUNCTIONS_IMPEXP int sci_imult(char *fname, int* _piKey);
-ELEMENTARY_FUNCTIONS_IMPEXP int sci_int(char *fname, int* _piKey);
+ELEMENTARY_FUNCTIONS_IMPEXP C_GATEWAY_PROTOTYPE(sci_abs);
+ELEMENTARY_FUNCTIONS_IMPEXP C_GATEWAY_PROTOTYPE(sci_acos);
+ELEMENTARY_FUNCTIONS_IMPEXP C_GATEWAY_PROTOTYPE(sci_asin);
+ELEMENTARY_FUNCTIONS_IMPEXP C_GATEWAY_PROTOTYPE(sci_atan);
+ELEMENTARY_FUNCTIONS_IMPEXP C_GATEWAY_PROTOTYPE(sci_ceil);
+ELEMENTARY_FUNCTIONS_IMPEXP C_GATEWAY_PROTOTYPE(sci_clean);
+ELEMENTARY_FUNCTIONS_IMPEXP C_GATEWAY_PROTOTYPE(sci_conj);
+ELEMENTARY_FUNCTIONS_IMPEXP C_GATEWAY_PROTOTYPE(sci_cos);
+ELEMENTARY_FUNCTIONS_IMPEXP C_GATEWAY_PROTOTYPE(sci_cumprod);
+ELEMENTARY_FUNCTIONS_IMPEXP C_GATEWAY_PROTOTYPE(sci_cumsum);
+ELEMENTARY_FUNCTIONS_IMPEXP C_GATEWAY_PROTOTYPE(sci_diag);
+ELEMENTARY_FUNCTIONS_IMPEXP C_GATEWAY_PROTOTYPE(sci_dsearch);
+ELEMENTARY_FUNCTIONS_IMPEXP C_GATEWAY_PROTOTYPE(sci_exp);
+ELEMENTARY_FUNCTIONS_IMPEXP C_GATEWAY_PROTOTYPE(sci_expm);
+ELEMENTARY_FUNCTIONS_IMPEXP C_GATEWAY_PROTOTYPE(sci_floor);
+ELEMENTARY_FUNCTIONS_IMPEXP C_GATEWAY_PROTOTYPE(sci_frexp);
+ELEMENTARY_FUNCTIONS_IMPEXP C_GATEWAY_PROTOTYPE(sci_gsort);
+ELEMENTARY_FUNCTIONS_IMPEXP C_GATEWAY_PROTOTYPE(sci_imag);
+ELEMENTARY_FUNCTIONS_IMPEXP C_GATEWAY_PROTOTYPE(sci_imult);
+ELEMENTARY_FUNCTIONS_IMPEXP C_GATEWAY_PROTOTYPE(sci_int);
 //ELEMENTARY_FUNCTIONS_IMPEXP int sci_isequal(char *fname, int* _piKey); C++ interface
-ELEMENTARY_FUNCTIONS_IMPEXP int sci_isreal(char *fname, int* _piKey);
-ELEMENTARY_FUNCTIONS_IMPEXP int sci_kron(char *fname, int* _piKey);
-ELEMENTARY_FUNCTIONS_IMPEXP int sci_log(char *fname, int* _piKey);
-ELEMENTARY_FUNCTIONS_IMPEXP int sci_log1p(char *fname, int* _piKey);
-ELEMENTARY_FUNCTIONS_IMPEXP int sci_scimatrix(char *fname, int* _piKey);
-ELEMENTARY_FUNCTIONS_IMPEXP int sci_maxi(char *fname, int* _piKey);
-ELEMENTARY_FUNCTIONS_IMPEXP int sci_mini(char *fname, int* _piKey);
-ELEMENTARY_FUNCTIONS_IMPEXP int sci_nearfloat(char *fname, int* _piKey);
-ELEMENTARY_FUNCTIONS_IMPEXP int sci_number_properties(char *fname, int* _piKey);
-ELEMENTARY_FUNCTIONS_IMPEXP int sci_prod(char *fname, int* _piKey);
-ELEMENTARY_FUNCTIONS_IMPEXP int sci_rand(char *fname, int* _piKey);
-ELEMENTARY_FUNCTIONS_IMPEXP int sci_real(char *fname, int* _piKey);
-ELEMENTARY_FUNCTIONS_IMPEXP int sci_round(char *fname, int* _piKey);
-ELEMENTARY_FUNCTIONS_IMPEXP int sci_sign(char *fname, int* _piKey);
-ELEMENTARY_FUNCTIONS_IMPEXP int sci_sin(char *fname, int* _piKey);
-ELEMENTARY_FUNCTIONS_IMPEXP int sci_sqrt(char *fname, int* _piKey);
-ELEMENTARY_FUNCTIONS_IMPEXP int sci_sum(char *fname, int* _piKey);
-ELEMENTARY_FUNCTIONS_IMPEXP int sci_tan(char *fname, int* _piKey);
-ELEMENTARY_FUNCTIONS_IMPEXP int sci_testmatrix(char *fname, int* _piKey);
-ELEMENTARY_FUNCTIONS_IMPEXP int sci_tril(char *fname, int* _piKey);
-ELEMENTARY_FUNCTIONS_IMPEXP int sci_triu(char *fname, int* _piKey);
+ELEMENTARY_FUNCTIONS_IMPEXP C_GATEWAY_PROTOTYPE(sci_isreal);
+ELEMENTARY_FUNCTIONS_IMPEXP C_GATEWAY_PROTOTYPE(sci_kron);
+ELEMENTARY_FUNCTIONS_IMPEXP C_GATEWAY_PROTOTYPE(sci_log);
+ELEMENTARY_FUNCTIONS_IMPEXP C_GATEWAY_PROTOTYPE(sci_log1p);
+ELEMENTARY_FUNCTIONS_IMPEXP C_GATEWAY_PROTOTYPE(sci_scimatrix);
+ELEMENTARY_FUNCTIONS_IMPEXP C_GATEWAY_PROTOTYPE(sci_maxi);
+ELEMENTARY_FUNCTIONS_IMPEXP C_GATEWAY_PROTOTYPE(sci_mini);
+ELEMENTARY_FUNCTIONS_IMPEXP C_GATEWAY_PROTOTYPE(sci_nearfloat);
+ELEMENTARY_FUNCTIONS_IMPEXP C_GATEWAY_PROTOTYPE(sci_number_properties);
+ELEMENTARY_FUNCTIONS_IMPEXP C_GATEWAY_PROTOTYPE(sci_prod);
+ELEMENTARY_FUNCTIONS_IMPEXP C_GATEWAY_PROTOTYPE(sci_rand);
+ELEMENTARY_FUNCTIONS_IMPEXP C_GATEWAY_PROTOTYPE(sci_real);
+ELEMENTARY_FUNCTIONS_IMPEXP C_GATEWAY_PROTOTYPE(sci_round);
+ELEMENTARY_FUNCTIONS_IMPEXP C_GATEWAY_PROTOTYPE(sci_sign);
+ELEMENTARY_FUNCTIONS_IMPEXP C_GATEWAY_PROTOTYPE(sci_sin);
+ELEMENTARY_FUNCTIONS_IMPEXP C_GATEWAY_PROTOTYPE(sci_sqrt);
+ELEMENTARY_FUNCTIONS_IMPEXP C_GATEWAY_PROTOTYPE(sci_sum);
+ELEMENTARY_FUNCTIONS_IMPEXP C_GATEWAY_PROTOTYPE(sci_tan);
+ELEMENTARY_FUNCTIONS_IMPEXP C_GATEWAY_PROTOTYPE(sci_testmatrix);
+ELEMENTARY_FUNCTIONS_IMPEXP C_GATEWAY_PROTOTYPE(sci_tril);
+ELEMENTARY_FUNCTIONS_IMPEXP C_GATEWAY_PROTOTYPE(sci_triu);
 
 #endif /*  __GW_ELEMENTARIES_FUNCTIONS__ */
 /*--------------------------------------------------------------------------*/
index 1495bd8..fff3d0b 100644 (file)
@@ -1,6 +1,7 @@
 /*
 *  Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
 *  Copyright (C) 2008-2008 - DIGITEO - Antoine ELIAS
+*  Copyright (C) 2011-2011 - DIGITEO - Bruno JOFRET
 *
 *  This file must be used under the terms of the CeCILL.
 *  This source file is licensed as described in the file COPYING, which
@@ -11,6 +12,7 @@
 */
 
 #include "elem_func_gw.hxx"
+#include "context.hxx"
 
 #define MODULE_NAME L"elementary_functions"
 extern "C"
@@ -18,55 +20,53 @@ extern "C"
        #include "gw_elementary_functions.h"
 }
 
-using namespace types;
-
 bool ElemFuncModule::Load()
 {
-       symbol::Context::getInstance()->AddFunction(Function::createFunction(L"abs", &sci_abs, MODULE_NAME));
-       symbol::Context::getInstance()->AddFunction(Function::createFunction(L"acos", &sci_acos, MODULE_NAME));
-       symbol::Context::getInstance()->AddFunction(Function::createFunction(L"asin", &sci_asin, MODULE_NAME));
-       symbol::Context::getInstance()->AddFunction(Function::createFunction(L"atan", &sci_atan, MODULE_NAME));
-       symbol::Context::getInstance()->AddFunction(Function::createFunction(L"ceil", &sci_ceil, MODULE_NAME));
-       symbol::Context::getInstance()->AddFunction(Function::createFunction(L"clean", &sci_clean, MODULE_NAME));
-       symbol::Context::getInstance()->AddFunction(Function::createFunction(L"conj", &sci_conj, MODULE_NAME));
-       symbol::Context::getInstance()->AddFunction(Function::createFunction(L"cos", &sci_cos, MODULE_NAME));
-       symbol::Context::getInstance()->AddFunction(Function::createFunction(L"cumprod", &sci_cumprod, MODULE_NAME));
-       symbol::Context::getInstance()->AddFunction(Function::createFunction(L"cumsum", &sci_cumsum, MODULE_NAME));
-       symbol::Context::getInstance()->AddFunction(Function::createFunction(L"diag", &sci_diag, MODULE_NAME));
-       symbol::Context::getInstance()->AddFunction(Function::createFunction(L"dsearch", &sci_dsearch, MODULE_NAME));
-       symbol::Context::getInstance()->AddFunction(Function::createFunction(L"exp", &sci_exp, MODULE_NAME));
-       symbol::Context::getInstance()->AddFunction(Function::createFunction(L"expm", &sci_expm, MODULE_NAME));
-       symbol::Context::getInstance()->AddFunction(Function::createFunction(L"eye", &sci_eye, MODULE_NAME));
-       symbol::Context::getInstance()->AddFunction(Function::createFunction(L"floor", &sci_floor, MODULE_NAME));
-       symbol::Context::getInstance()->AddFunction(Function::createFunction(L"frexp", &sci_frexp, MODULE_NAME));
-       symbol::Context::getInstance()->AddFunction(Function::createFunction(L"gsort", &sci_gsort, MODULE_NAME));
-       symbol::Context::getInstance()->AddFunction(Function::createFunction(L"imag", &sci_imag, MODULE_NAME));
-       symbol::Context::getInstance()->AddFunction(Function::createFunction(L"imult", &sci_imult, MODULE_NAME));
-       symbol::Context::getInstance()->AddFunction(Function::createFunction(L"int", &sci_int, MODULE_NAME));
-       symbol::Context::getInstance()->AddFunction(Function::createFunction(L"isreal", &sci_isreal, MODULE_NAME));
-       symbol::Context::getInstance()->AddFunction(Function::createFunction(L"isequal", &sci_isequal, MODULE_NAME));
-       symbol::Context::getInstance()->AddFunction(Function::createFunction(L"kron", &sci_kron, MODULE_NAME));
-       symbol::Context::getInstance()->AddFunction(Function::createFunction(L"log", &sci_log, MODULE_NAME));
-       symbol::Context::getInstance()->AddFunction(Function::createFunction(L"log1p", &sci_log1p, MODULE_NAME));
-       symbol::Context::getInstance()->AddFunction(Function::createFunction(L"matrix", &sci_scimatrix, MODULE_NAME));
-       symbol::Context::getInstance()->AddFunction(Function::createFunction(L"max", &sci_maxi, MODULE_NAME));
-       symbol::Context::getInstance()->AddFunction(Function::createFunction(L"min", &sci_mini, MODULE_NAME));
-       symbol::Context::getInstance()->AddFunction(Function::createFunction(L"nearfloat", &sci_nearfloat, MODULE_NAME));
-       symbol::Context::getInstance()->AddFunction(Function::createFunction(L"number_properties", &sci_number_properties, MODULE_NAME));
-       symbol::Context::getInstance()->AddFunction(Function::createFunction(L"ones", &sci_ones, MODULE_NAME));
-       symbol::Context::getInstance()->AddFunction(Function::createFunction(L"prod", &sci_prod, MODULE_NAME));
-       symbol::Context::getInstance()->AddFunction(Function::createFunction(L"rand", &sci_rand, MODULE_NAME));
-       symbol::Context::getInstance()->AddFunction(Function::createFunction(L"real", &sci_real, MODULE_NAME));
-       symbol::Context::getInstance()->AddFunction(Function::createFunction(L"round", &sci_round, MODULE_NAME));
-       symbol::Context::getInstance()->AddFunction(Function::createFunction(L"sign", &sci_sign, MODULE_NAME));
-       symbol::Context::getInstance()->AddFunction(Function::createFunction(L"sin", &sci_sin, MODULE_NAME));
-       symbol::Context::getInstance()->AddFunction(Function::createFunction(L"size", &sci_size, MODULE_NAME));
-       symbol::Context::getInstance()->AddFunction(Function::createFunction(L"sqrt", &sci_sqrt, MODULE_NAME));
-       symbol::Context::getInstance()->AddFunction(Function::createFunction(L"sum", &sci_sum, MODULE_NAME));
-       symbol::Context::getInstance()->AddFunction(Function::createFunction(L"tan", &sci_tan, MODULE_NAME));
-       symbol::Context::getInstance()->AddFunction(Function::createFunction(L"testmatrix", &sci_testmatrix, MODULE_NAME));
-       symbol::Context::getInstance()->AddFunction(Function::createFunction(L"tril", &sci_tril, MODULE_NAME));
-       symbol::Context::getInstance()->AddFunction(Function::createFunction(L"zeros", &sci_zeros, MODULE_NAME));
+       symbol::Context::getInstance()->AddFunction(types::Function::createFunction(L"abs", &sci_abs, MODULE_NAME));
+       symbol::Context::getInstance()->AddFunction(types::Function::createFunction(L"acos", &sci_acos, MODULE_NAME));
+       symbol::Context::getInstance()->AddFunction(types::Function::createFunction(L"asin", &sci_asin, MODULE_NAME));
+       symbol::Context::getInstance()->AddFunction(types::Function::createFunction(L"atan", &sci_atan, MODULE_NAME));
+       symbol::Context::getInstance()->AddFunction(types::Function::createFunction(L"ceil", &sci_ceil, MODULE_NAME));
+       symbol::Context::getInstance()->AddFunction(types::Function::createFunction(L"clean", &sci_clean, MODULE_NAME));
+       symbol::Context::getInstance()->AddFunction(types::Function::createFunction(L"conj", &sci_conj, MODULE_NAME));
+       symbol::Context::getInstance()->AddFunction(types::Function::createFunction(L"cos", &sci_cos, MODULE_NAME));
+       symbol::Context::getInstance()->AddFunction(types::Function::createFunction(L"cumprod", &sci_cumprod, MODULE_NAME));
+       symbol::Context::getInstance()->AddFunction(types::Function::createFunction(L"cumsum", &sci_cumsum, MODULE_NAME));
+       symbol::Context::getInstance()->AddFunction(types::Function::createFunction(L"diag", &sci_diag, MODULE_NAME));
+       symbol::Context::getInstance()->AddFunction(types::Function::createFunction(L"dsearch", &sci_dsearch, MODULE_NAME));
+       symbol::Context::getInstance()->AddFunction(types::Function::createFunction(L"exp", &sci_exp, MODULE_NAME));
+       symbol::Context::getInstance()->AddFunction(types::Function::createFunction(L"expm", &sci_expm, MODULE_NAME));
+       symbol::Context::getInstance()->AddFunction(types::Function::createFunction(L"eye", &sci_eye, MODULE_NAME));
+       symbol::Context::getInstance()->AddFunction(types::Function::createFunction(L"floor", &sci_floor, MODULE_NAME));
+       symbol::Context::getInstance()->AddFunction(types::Function::createFunction(L"frexp", &sci_frexp, MODULE_NAME));
+       symbol::Context::getInstance()->AddFunction(types::Function::createFunction(L"gsort", &sci_gsort, MODULE_NAME));
+       symbol::Context::getInstance()->AddFunction(types::Function::createFunction(L"imag", &sci_imag, MODULE_NAME));
+       symbol::Context::getInstance()->AddFunction(types::Function::createFunction(L"imult", &sci_imult, MODULE_NAME));
+       symbol::Context::getInstance()->AddFunction(types::Function::createFunction(L"int", &sci_int, MODULE_NAME));
+       symbol::Context::getInstance()->AddFunction(types::Function::createFunction(L"isreal", &sci_isreal, MODULE_NAME));
+       symbol::Context::getInstance()->AddFunction(types::Function::createFunction(L"isequal", &sci_isequal, MODULE_NAME));
+       symbol::Context::getInstance()->AddFunction(types::Function::createFunction(L"kron", &sci_kron, MODULE_NAME));
+       symbol::Context::getInstance()->AddFunction(types::Function::createFunction(L"log", &sci_log, MODULE_NAME));
+       symbol::Context::getInstance()->AddFunction(types::Function::createFunction(L"log1p", &sci_log1p, MODULE_NAME));
+       symbol::Context::getInstance()->AddFunction(types::Function::createFunction(L"matrix", &sci_scimatrix, MODULE_NAME));
+       symbol::Context::getInstance()->AddFunction(types::Function::createFunction(L"max", &sci_maxi, MODULE_NAME));
+       symbol::Context::getInstance()->AddFunction(types::Function::createFunction(L"min", &sci_mini, MODULE_NAME));
+       symbol::Context::getInstance()->AddFunction(types::Function::createFunction(L"nearfloat", &sci_nearfloat, MODULE_NAME));
+       symbol::Context::getInstance()->AddFunction(types::Function::createFunction(L"number_properties", &sci_number_properties, MODULE_NAME));
+       symbol::Context::getInstance()->AddFunction(types::Function::createFunction(L"ones", &sci_ones, MODULE_NAME));
+       symbol::Context::getInstance()->AddFunction(types::Function::createFunction(L"prod", &sci_prod, MODULE_NAME));
+       symbol::Context::getInstance()->AddFunction(types::Function::createFunction(L"rand", &sci_rand, MODULE_NAME));
+       symbol::Context::getInstance()->AddFunction(types::Function::createFunction(L"real", &sci_real, MODULE_NAME));
+       symbol::Context::getInstance()->AddFunction(types::Function::createFunction(L"round", &sci_round, MODULE_NAME));
+       symbol::Context::getInstance()->AddFunction(types::Function::createFunction(L"sign", &sci_sign, MODULE_NAME));
+       symbol::Context::getInstance()->AddFunction(types::Function::createFunction(L"sin", &sci_sin, MODULE_NAME));
+       symbol::Context::getInstance()->AddFunction(types::Function::createFunction(L"size", &sci_size, MODULE_NAME));
+       symbol::Context::getInstance()->AddFunction(types::Function::createFunction(L"sqrt", &sci_sqrt, MODULE_NAME));
+       symbol::Context::getInstance()->AddFunction(types::Function::createFunction(L"sum", &sci_sum, MODULE_NAME));
+       symbol::Context::getInstance()->AddFunction(types::Function::createFunction(L"tan", &sci_tan, MODULE_NAME));
+       symbol::Context::getInstance()->AddFunction(types::Function::createFunction(L"testmatrix", &sci_testmatrix, MODULE_NAME));
+       symbol::Context::getInstance()->AddFunction(types::Function::createFunction(L"tril", &sci_tril, MODULE_NAME));
+       symbol::Context::getInstance()->AddFunction(types::Function::createFunction(L"zeros", &sci_zeros, MODULE_NAME));
 
        return true;
 }
index c7c8686..131d82f 100644 (file)
@@ -12,7 +12,8 @@
  */
 /*--------------------------------------------------------------------------*/
 #include "elem_func_gw.hxx"
-#include "funcmanager.hxx"
+#include "function.hxx"
+#include "double.hxx"
 
 extern "C"
 {
index 4ad4df4..18f0071 100644 (file)
@@ -12,7 +12,8 @@
  */
 /*--------------------------------------------------------------------------*/
 #include "elem_func_gw.hxx"
-#include "funcmanager.hxx"
+#include "function.hxx"
+#include "double.hxx"
 
 extern "C"
 {
index 198e09b..27d80ba 100644 (file)
@@ -77,7 +77,7 @@
     <ClCompile>
       <AdditionalOptions>%(AdditionalOptions)</AdditionalOptions>
       <Optimization>Disabled</Optimization>
-      <AdditionalIncludeDirectories>.;../../includes;../../../../libs/MALLOC/includes;../../../core/includes;../../../output_stream/includes;../../../dynamic_link/includes;../../../dynamic_link/src/c;../../../localization/includes;../../../core/src/c;../../../../libs/intl;../../../elementary_functions/includes;../../../api_scilab/includes;../../../operations/includes;../../../double/includes;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+      <AdditionalIncludeDirectories>.;../../includes;../../../../libs/MALLOC/includes;../../../core/includes;../../../output_stream/includes;../../../dynamic_link/includes;../../../dynamic_link/src/c;../../../localization/includes;../../../core/src/c;../../../../libs/intl;../../../elementary_functions/includes;../../../api_scilab/includes;../../../operations/includes;../../../double/includes;../../../types/includes;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
       <PreprocessorDefinitions>_CRT_SECURE_NO_DEPRECATE;FORDLL;_DEBUG;_WINDOWS;_USRDLL;ELEMENTARY_FUNCTIONS_EXPORTS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
       <MinimalRebuild>true</MinimalRebuild>
       <BasicRuntimeChecks>Default</BasicRuntimeChecks>
@@ -122,7 +122,7 @@ lib /DEF:"$(ProjectDir)linpack_f_Import.def" /SUBSYSTEM:WINDOWS /MACHINE:$(Platf
     </Midl>
     <ClCompile>
       <Optimization>Disabled</Optimization>
-      <AdditionalIncludeDirectories>.;../../includes;../../../../libs/MALLOC/includes;../../../core/includes;../../../output_stream/includes;../../../dynamic_link/includes;../../../dynamic_link/src/c;../../../localization/includes;../../../core/src/c;../../../../libs/intl;../../../elementary_functions/includes;../../../api_scilab/includes;../../../operations/includes;../../../double/includes;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+      <AdditionalIncludeDirectories>.;../../includes;../../../../libs/MALLOC/includes;../../../core/includes;../../../output_stream/includes;../../../dynamic_link/includes;../../../dynamic_link/src/c;../../../localization/includes;../../../core/src/c;../../../../libs/intl;../../../elementary_functions/includes;../../../api_scilab/includes;../../../operations/includes;../../../double/includes;../../../types/includes;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
       <PreprocessorDefinitions>_CRT_SECURE_NO_DEPRECATE;FORDLL;_DEBUG;_WINDOWS;_USRDLL;ELEMENTARY_FUNCTIONS_EXPORTS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
       <MinimalRebuild>true</MinimalRebuild>
       <BasicRuntimeChecks>Default</BasicRuntimeChecks>
@@ -168,7 +168,7 @@ lib /DEF:"$(ProjectDir)linpack_f_Import.def" /SUBSYSTEM:WINDOWS /MACHINE:$(Platf
       <InlineFunctionExpansion>OnlyExplicitInline</InlineFunctionExpansion>
       <FavorSizeOrSpeed>Speed</FavorSizeOrSpeed>
       <WholeProgramOptimization>false</WholeProgramOptimization>
-      <AdditionalIncludeDirectories>.;../../includes;../../../../libs/MALLOC/includes;../../../core/includes;../../../output_stream/includes;../../../dynamic_link/includes;../../../dynamic_link/src/c;../../../localization/includes;../../../core/src/c;../../../../libs/intl;../../../elementary_functions/includes;../../../api_scilab/includes;../../../operations/includes;../../../double/includes;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+      <AdditionalIncludeDirectories>.;../../includes;../../../../libs/MALLOC/includes;../../../core/includes;../../../output_stream/includes;../../../dynamic_link/includes;../../../dynamic_link/src/c;../../../localization/includes;../../../core/src/c;../../../../libs/intl;../../../elementary_functions/includes;../../../api_scilab/includes;../../../operations/includes;../../../double/includes;../../../types/includes;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
       <PreprocessorDefinitions>_CRT_SECURE_NO_DEPRECATE;FORDLL;NDEBUG;_WINDOWS;_USRDLL;ELEMENTARY_FUNCTIONS_EXPORTS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
       <StringPooling>true</StringPooling>
       <RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
@@ -221,7 +221,7 @@ lib /DEF:"$(ProjectDir)linpack_f_Import.def" /SUBSYSTEM:WINDOWS /MACHINE:$(Platf
       <InlineFunctionExpansion>OnlyExplicitInline</InlineFunctionExpansion>
       <FavorSizeOrSpeed>Speed</FavorSizeOrSpeed>
       <WholeProgramOptimization>false</WholeProgramOptimization>
-      <AdditionalIncludeDirectories>.;../../includes;../../../../libs/MALLOC/includes;../../../core/includes;../../../output_stream/includes;../../../dynamic_link/includes;../../../dynamic_link/src/c;../../../localization/includes;../../../core/src/c;../../../../libs/intl;../../../elementary_functions/includes;../../../api_scilab/includes;../../../operations/includes;../../../double/includes;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+      <AdditionalIncludeDirectories>.;../../includes;../../../../libs/MALLOC/includes;../../../core/includes;../../../output_stream/includes;../../../dynamic_link/includes;../../../dynamic_link/src/c;../../../localization/includes;../../../core/src/c;../../../../libs/intl;../../../elementary_functions/includes;../../../api_scilab/includes;../../../operations/includes;../../../double/includes;../../../types/includes;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
       <PreprocessorDefinitions>_CRT_SECURE_NO_DEPRECATE;FORDLL;NDEBUG;_WINDOWS;_USRDLL;ELEMENTARY_FUNCTIONS_EXPORTS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
       <StringPooling>true</StringPooling>
       <RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
index 71635fe..8c9a437 100644 (file)
@@ -13,8 +13,7 @@
 #ifndef __FILEIO_GW_HXX__
 #define __FILEIO_GW_HXX__
 
-#include "funcmanager.hxx"
-#include "context.hxx"
+#include "cpp_gateway_prototype.hxx"
 
 #ifdef _MSC_VER
        #if FILEIO_GW_EXPORTS
index 7439989..61e134b 100644 (file)
@@ -13,7 +13,7 @@
 #ifndef __GW_FILEIO_H__
 #define __GW_FILEIO_H__
 #include "dynlib_fileio.h"
-#include "api_scilab.h"
+#include "c_gateway_prototype.h"
 /*--------------------------------------------------------------------------*/
 FILEIO_IMPEXP int gw_fileio(void);
 /*--------------------------------------------------------------------------*/
@@ -22,12 +22,12 @@ FILEIO_IMPEXP int sci_maxfiles(char *fname,unsigned long fname_len);
 FILEIO_IMPEXP int sci_getdrives(char *fname,unsigned long fname_len);
 
 //YaSp
-FILEIO_IMPEXP int sci_pwd(char *fname, int* _piKey);
-FILEIO_IMPEXP int sci_chdir(char *fname, int* _piKey);
-FILEIO_IMPEXP int sci_copyfile(char *fname,int* _piKey);
-FILEIO_IMPEXP int sci_movefile(char *fname, int* _piKey);
-FILEIO_IMPEXP int sci_fscanfMat(char *fname, int *_piKey);
-FILEIO_IMPEXP int sci_fprintfMat(char *fname, int *_piKey);
+FILEIO_IMPEXP C_GATEWAY_PROTOTYPE(sci_pwd);
+FILEIO_IMPEXP C_GATEWAY_PROTOTYPE(sci_chdir);
+FILEIO_IMPEXP C_GATEWAY_PROTOTYPE(sci_copyfile);
+FILEIO_IMPEXP C_GATEWAY_PROTOTYPE(sci_movefile);
+FILEIO_IMPEXP C_GATEWAY_PROTOTYPE(sci_fscanfMat);
+FILEIO_IMPEXP C_GATEWAY_PROTOTYPE( sci_fprintfMat);
 
 /*--------------------------------------------------------------------------*/
 #endif /* __GW_FILEIO_H__ */
index 0c691b7..01f4c42 100644 (file)
@@ -11,6 +11,8 @@
  */
 
 #include "fileio_gw.hxx"
+#include "context.hxx"
+#include "function.hxx"
 
 #define MODULE_NAME L"fileio"
 
@@ -60,7 +62,7 @@ bool FileioModule::Load()
     symbol::Context::getInstance()->AddFunction(Function::createFunction(L"getrelativefilename", &sci_getrelativefilename, MODULE_NAME));
     symbol::Context::getInstance()->AddFunction(Function::createFunction(L"pathsep", &sci_pathsep, MODULE_NAME));
     symbol::Context::getInstance()->AddFunction(Function::createFunction(L"mfprintf", &sci_mfprintf, MODULE_NAME));
-    symbol::Context::getInstance()->AddFunction(Function::createFunction(L"mscanf", &sci_mscanf, MODULE_NAME));   
+    symbol::Context::getInstance()->AddFunction(Function::createFunction(L"mscanf", &sci_mscanf, MODULE_NAME));
     symbol::Context::getInstance()->AddFunction(Function::createFunction(L"mfscanf", &sci_mfscanf, MODULE_NAME));
     symbol::Context::getInstance()->AddFunction(Function::createFunction(L"msscanf", &sci_msscanf, MODULE_NAME));
 
index 8adee45..a8e5c3b 100644 (file)
 *
 */
 /*--------------------------------------------------------------------------*/
-#include "funcmanager.hxx"
-#include "filemanager.hxx"
 #include "fileio_gw.hxx"
 #include "function.hxx"
 #include "string.hxx"
+#include "bool.hxx"
+#include "double.hxx"
 
 extern "C"
 {
@@ -22,6 +22,9 @@ extern "C"
 #include "basename.h"
 #include "Scierror.h"
 }
+
+using namespace types;
+
 /*--------------------------------------------------------------------------*/
 Function::ReturnValue sci_basename(typed_list &in, int _iRetCount, typed_list &out)
 {
index 6995e4e..15f7b88 100644 (file)
  *
  */
 /*--------------------------------------------------------------------------*/
-#include "funcmanager.hxx"
 #include "fileio_gw.hxx"
 #include "function.hxx"
 #include "string.hxx"
+#include "bool.hxx"
 
 extern "C"
 {
index 87de93c..f36c939 100644 (file)
  *
  */
 /*--------------------------------------------------------------------------*/
-#include "funcmanager.hxx"
 #include "filemanager.hxx"
 #include "fileio_gw.hxx"
 #include "function.hxx"
 #include "string.hxx"
+#include "bool.hxx"
 
 extern "C"
 {
index 4826703..3ad9685 100644 (file)
@@ -15,7 +15,7 @@
 
 #include "function.hxx"
 #include "string.hxx"
-#include "funcmanager.hxx"
+#include "double.hxx"
 #include "filemanager.hxx"
 #include "fileio_gw.hxx"
 
@@ -26,6 +26,8 @@ extern "C"
 #include "Scierror.h"
 }
 
+using namespace types;
+
 /*--------------------------------------------------------------------------*/
 Function::ReturnValue sci_fileinfo(typed_list &in, int _iRetCount, typed_list &out)
 {
index 3a73bca..0a772a1 100644 (file)
  */
 /*--------------------------------------------------------------------------*/
 
-#include "funcmanager.hxx"
-#include "filemanager.hxx"
 #include "fileio_gw.hxx"
 #include "function.hxx"
 #include "string.hxx"
+#include "double.hxx"
 
 extern "C"
 {
@@ -31,6 +30,9 @@ extern "C"
 }
 /*--------------------------------------------------------------------------*/
 #define DEFAULT_FILESPEC L"*.*"
+
+using namespace types;
+
 /*--------------------------------------------------------------------------*/
 Function::ReturnValue sci_findfiles(typed_list &in, int _iRetCount, typed_list &out)
 {
index d8ddc0d..82615cd 100644 (file)
@@ -13,6 +13,7 @@
 #include "fileio_gw.hxx"
 #include "function.hxx"
 #include "string.hxx"
+#include "bool.hxx"
 
 extern "C"
 {
index 1796bf3..0667711 100644 (file)
@@ -18,9 +18,8 @@
 /*--------------------------------------------------------------------------*/
 #include "function.hxx"
 #include "string.hxx"
-#include "funcmanager.hxx"
-#include "filemanager.hxx"
 #include "fileio_gw.hxx"
+#include "bool.hxx"
 
 extern "C"
 {
@@ -30,6 +29,8 @@ extern "C"
 #include "isdir.h"
 }
 
+using namespace types;
+
 /*--------------------------------------------------------------------------*/
 Function::ReturnValue sci_isdir(typed_list &in, int _iRetCount, typed_list &out)
 {
index 4cd6edc..9ba4232 100644 (file)
@@ -13,6 +13,7 @@
 #include "fileio_gw.hxx"
 #include "function.hxx"
 #include "string.hxx"
+#include "bool.hxx"
 
 extern "C"
 {
index 35ab688..d00683c 100644 (file)
  *
  */
 /*--------------------------------------------------------------------------*/
-#include "funcmanager.hxx"
 #include "fileio_gw.hxx"
 #include "function.hxx"
 #include "string.hxx"
+#include "double.hxx"
+#include "bool.hxx"
 #include "filemanager.hxx"
 
 extern "C"
@@ -34,7 +35,7 @@ Function::ReturnValue sci_mclearerr(types::typed_list &in, int _iRetCount, types
 {
     int iRet  = 0;
     int iFile = -1; //default file : last opened file
-    
+
     if(in.size() > 1)
     {
         ScierrorW(77, _W("%ls: Wrong number of input argument(s): %d to %d expected.\n"), L"mclearerr", 0, 1);
index cc0fc5d..c465ad3 100644 (file)
@@ -12,6 +12,7 @@
 
 #include "function.hxx"
 #include "string.hxx"
+#include "double.hxx"
 #include "filemanager.hxx"
 #include "fileio_gw.hxx"
 
index 947dfa8..a61dcfd 100644 (file)
 /*--------------------------------------------------------------------------*/
 #include "fileio_gw.hxx"
 #include "string.hxx"
+#include "double.hxx"
+#include "bool.hxx"
 #include "filemanager.hxx"
+#include "function.hxx"
 
 extern "C"
 {
@@ -26,9 +29,7 @@ extern "C"
 #include "PATH_MAX.h"
 }
 /*--------------------------------------------------------------------------*/
-
-
-Function::ReturnValue sci_meof(types::typed_list &in, int _iRetCount, types::typed_list &out)
+types::Function::ReturnValue sci_meof(types::typed_list &in, int _iRetCount, types::typed_list &out)
 {
     int iRet  = 0;
     int iFile = -1; //default file : last opened file
index cb060b0..00875ea 100644 (file)
  *
  */
 /*--------------------------------------------------------------------------*/
-#include "funcmanager.hxx"
 #include "fileio_gw.hxx"
 #include "function.hxx"
 #include "string.hxx"
+#include "double.hxx"
+#include "bool.hxx"
 #include "filemanager.hxx"
 
 extern "C"
@@ -34,7 +35,7 @@ Function::ReturnValue sci_merror(types::typed_list &in, int _iRetCount, types::t
     int iRet  = 0;
     int iFile = -1; //default file : last opened file
     int dimsArray[2] = {1,1};
-    
+
     if(in.size() > 1)
     {
         ScierrorW(77, _W("%ls: Wrong number of input argument(s): %d to %d expected.\n"), L"merror", 0, 1);
@@ -62,7 +63,7 @@ Function::ReturnValue sci_merror(types::typed_list &in, int _iRetCount, types::t
         {
             sciprintW(_W("%ls: Cannot check the end of file whose descriptor is %d: File is not active.\n"), L"merror", iFile);
         }
-        
+
         types::Bool* pOut = new types::Bool(0);
         out.push_back(pOut);
         return types::Function::OK;
@@ -71,14 +72,14 @@ Function::ReturnValue sci_merror(types::typed_list &in, int _iRetCount, types::t
     types::Double* pDoubleOut = new types::Double(2, dimsArray);
     pDoubleOut->set(0, iRet);
     out.push_back(pDoubleOut);
-    
+
     if(_iRetCount == 2)
     {
         types::String* pStringOut = new types::String(2, dimsArray);
         pStringOut->set(0, to_wide_string(strerror(iRet)));
         out.push_back(pStringOut);
     }
-    
+
     return types::Function::OK;
 }
 /*--------------------------------------------------------------------------*/
index 28d02ff..3f52612 100644 (file)
@@ -17,6 +17,8 @@
 #include "string.hxx"
 #include "cell.hxx"
 #include "filemanager.hxx"
+#include "double.hxx"
+#include "function.hxx"
 
 extern "C"
 {
@@ -52,7 +54,7 @@ types::Function::ReturnValue sci_mfscanf(types::typed_list &in, int _iRetCount,
 
     if(size < 2 || size >3)
     {
-       ScierrorW(77, _W("%ls: Wrong number of input argument(s): %d to %d expected.\n"), L"mfscanf", 2, 3);
+        ScierrorW(77, _W("%ls: Wrong number of input argument(s): %d to %d expected.\n"), L"mfscanf", 2, 3);
         return types::Function::Error;
     }
 
@@ -79,8 +81,8 @@ types::Function::ReturnValue sci_mfscanf(types::typed_list &in, int _iRetCount,
     }
 
     iFile = static_cast<int>(in[size-2]->getAs<types::Double>()->get(0));
-       switch (iFile)
-       {
+    switch (iFile)
+    {
     case 0:
         // stderr
         ScierrorW(999, _W("%ls: Wrong file descriptor: %d.\n"), L"mfscanf", iFile);
@@ -105,7 +107,7 @@ types::Function::ReturnValue sci_mfscanf(types::typed_list &in, int _iRetCount,
     FILE* fDesc = pFile->getFiledesc();
     nrow = iNiter;
     //nrow = iLinesRead;
-       while(++rowcount < iNiter)
+    while(++rowcount < iNiter)
     {
         if((iNiter >= 0) && (rowcount >= iNiter)) break;
         // get data
@@ -120,19 +122,19 @@ types::Function::ReturnValue sci_mfscanf(types::typed_list &in, int _iRetCount,
         {
             switch(err)
             {
-                case DO_XXPRINTF_MISMATCH:
-                    if(iNiter >= 0)
-                    {
-                        Free_Scan(rowcount,ncol,type_s,&data);
-                        ScierrorW(999,_W("%ls: Data mismatch.\n"),L"mfscanf");
-                        return types::Function::Error;
-                    }
-                break;
-
-                case DO_XXPRINTF_MEM_LACK:
+            case DO_XXPRINTF_MISMATCH:
+                if(iNiter >= 0)
+                {
                     Free_Scan(rowcount,ncol,type_s,&data);
-                    ScierrorW(999,_W("%ls: No more memory.\n"),L"mfscanf");
+                    ScierrorW(999,_W("%ls: Data mismatch.\n"),L"mfscanf");
                     return types::Function::Error;
+                }
+                break;
+
+            case DO_XXPRINTF_MEM_LACK:
+                Free_Scan(rowcount,ncol,type_s,&data);
+                ScierrorW(999,_W("%ls: No more memory.\n"),L"mfscanf");
+                return types::Function::Error;
                 break;
             }
             if(err==DO_XXPRINTF_MISMATCH) break;
@@ -144,8 +146,8 @@ types::Function::ReturnValue sci_mfscanf(types::typed_list &in, int _iRetCount,
     {
         switch(type_s[i])
         {
-            case SF_C:
-            case SF_S:
+        case SF_C:
+        case SF_S:
             {
                 types::String* ps = new types::String(iNiter,1);
                 for(int j = 0 ; j < iNiter ; j++)
@@ -156,14 +158,14 @@ types::Function::ReturnValue sci_mfscanf(types::typed_list &in, int _iRetCount,
                 uiFormatUsed |= (1 << 1);
             }
             break;
-               case SF_LUI:
-            case SF_SUI:
-            case SF_UI:
-            case SF_LI:
-            case SF_SI:
-            case SF_I:
-            case SF_LF:
-            case SF_F:
+        case SF_LUI:
+        case SF_SUI:
+        case SF_UI:
+        case SF_LI:
+        case SF_SI:
+        case SF_I:
+        case SF_LF:
+        case SF_F:
             {
                 types::Double* p = new types::Double(iNiter,1);
                 for(int j=0; j<iNiter; j++)
@@ -203,7 +205,7 @@ types::Function::ReturnValue sci_mfscanf(types::typed_list &in, int _iRetCount,
 
         switch(uiFormatUsed)
         {
-            case (1 << 1) :
+        case (1 << 1) :
             {
                 int sizeOfString = (*pIT)[0]->getAs<types::String>()->getRows();
                 int dimsArrayOfRes[2] = {sizeOfString, sizeOfVector};
@@ -218,7 +220,7 @@ types::Function::ReturnValue sci_mfscanf(types::typed_list &in, int _iRetCount,
                 out.push_back(pString);
             }
             break;
-            case (1 << 2) :
+        case (1 << 2) :
             {
                 int sizeOfDouble = (*pIT)[0]->getAs<types::Double>()->getRows();
                 int dimsArrayOfRes[2] = {sizeOfDouble, sizeOfVector};
@@ -233,7 +235,7 @@ types::Function::ReturnValue sci_mfscanf(types::typed_list &in, int _iRetCount,
                 out.push_back(pDouble);
             }
             break;
-            default :
+        default :
             {
                 std::vector<types::InternalType*>* pITTemp = new std::vector<types::InternalType*>();
                 pITTemp->push_back((*pIT)[0]);
@@ -245,7 +247,7 @@ types::Function::ReturnValue sci_mfscanf(types::typed_list &in, int _iRetCount,
                     {
                         switch(pITTemp->back()->getType())
                         {
-                            case types::InternalType::RealString :
+                        case types::InternalType::RealString :
                             {
                                 int iRows               = pITTemp->back()->getAs<types::String>()->getRows();
                                 int iCols               = pITTemp->back()->getAs<types::String>()->getCols();
@@ -265,7 +267,7 @@ types::Function::ReturnValue sci_mfscanf(types::typed_list &in, int _iRetCount,
                                 pITTemp->push_back(pType);
                             }
                             break;
-                            case types::InternalType::RealDouble :
+                        case types::InternalType::RealDouble :
                             {
                                 int iRows               = pITTemp->back()->getAs<types::Double>()->getRows();
                                 int iCols               = pITTemp->back()->getAs<types::Double>()->getCols();
@@ -281,8 +283,8 @@ types::Function::ReturnValue sci_mfscanf(types::typed_list &in, int _iRetCount,
                                 pITTemp->push_back(pType);
                             }
                             break;
-                            default :
-                                return types::Function::Error;
+                        default :
+                            return types::Function::Error;
                         }
                     }
                     else
@@ -301,7 +303,7 @@ types::Function::ReturnValue sci_mfscanf(types::typed_list &in, int _iRetCount,
             }
         }
     }
-       Free_Scan(rowcount,ncol,type_s,&data);
+    Free_Scan(rowcount,ncol,type_s,&data);
     return types::Function::OK;
 }
 /*--------------------------------------------------------------------------*/
index 5315673..d7ec8a7 100644 (file)
@@ -15,7 +15,9 @@
 #include "filemanager.hxx"
 #include "fileio_gw.hxx"
 #include "string.hxx"
+#include "double.hxx"
 #include "file.hxx"
+#include "function.hxx"
 
 extern "C"
 {
index 42d080d..b784a3d 100644 (file)
@@ -14,6 +14,8 @@
 #include "filemanager.hxx"
 #include "fileio_gw.hxx"
 #include "string.hxx"
+#include "double.hxx"
+#include "function.hxx"
 
 extern "C"
 {
@@ -128,276 +130,5 @@ Function::ReturnValue sci_mgetl(typed_list &in, int _iRetCount, typed_list &out)
     }
 
     return Function::OK;
-    //SciErr sciErr;
-    //int *piAddressVarOne = NULL;
-
-    //Rhs = Max(0, Rhs);
-
-    //CheckRhs(1, 2);
-    //CheckLhs(1, 1);
-
-    //if (Rhs == 2)
-    //{
-    //    int *piAddressVarTwo = NULL;
-
-    //    sciErr = getVarAddressFromPosition(_piKey, 2, &piAddressVarTwo);
-    //    if(sciErr.iErr)
-    //    {
-    //        printError(&sciErr, 0);
-    //        return 0;
-    //    }
-
-    //    if ( isDoubleType(_piKey, piAddressVarTwo) )
-    //    {
-    //        double dValue = 0.;
-    //        if (!isScalar(_piKey, piAddressVarTwo))
-    //        {
-    //            Scierror(999,_("%s: Wrong size for input argument #%d: Integer expected.\n"), fname, 2);
-    //            return 0;
-    //        }
-
-    //        if ( getScalarDouble(_piKey, piAddressVarTwo, &dValue) == 0)
-    //        {
-    //            numberOfLinesToRead = (int)dValue;
-    //        }
-    //        else
-    //        {
-    //            Scierror(999,_("%s: Memory allocation error.\n"), fname);
-    //            return 0;
-    //        }
-    //    }
-    //    else
-    //    {
-    //        Scierror(999,_("%s: Wrong type for input argument #%d: Integer expected.\n"), fname, 2);
-    //        return 0;
-    //    }
-    //}
-
-    //sciErr = getVarAddressFromPosition(_piKey, 1, &piAddressVarOne);
-    //if(sciErr.iErr)
-    //{
-    //    printError(&sciErr, 0);
-    //    return 0;
-    //}
-
-    //if ( isStringType(_piKey, piAddressVarOne) || isDoubleType(_piKey, piAddressVarOne) )
-    //{
-    //    char **wcReadedStrings = NULL;
-    //    int numberOfLinesReaded = 0;
-    //    int fileDescriptor = -1;
-    //    int iErrorMgetl = 0;
-    //    BOOL bCloseFile = FALSE;
-
-    //    if (!isScalar(_piKey, piAddressVarOne))
-    //    {
-    //        Scierror(999,_("%s: Wrong size for input argument #%d: String or logical unit expected.\n"), fname, 1);
-    //        return 0;
-    //    }
-
-    //    if (isStringType(_piKey, piAddressVarOne))
-    //    {
-    //        char *fileName = NULL;
-    //        if (getAllocatedSingleString(_piKey, piAddressVarOne, &fileName) == 0)
-    //        {
-    //            char *expandedFileName = expandPathVariable(fileName);
-    //            freeAllocatedSingleString(fileName);
-    //            fileName = NULL;
-
-    //            if (IsAlreadyOpenedInScilab(expandedFileName))
-    //            {
-    //                int fd = GetIdFromFilename(expandedFileName);
-    //                fileDescriptor = fd;
-    //                if (expandedFileName) {FREE(expandedFileName); expandedFileName = NULL;}
-    //                bCloseFile = FALSE;
-    //            }
-    //            else
-    //            {
-    //                #define READ_ONLY_TEXT_MODE "rt"
-    //                int fd = 0;
-    //                int f_swap = 0;
-    //                double res = 0.0;
-    //                int ierr = 0;
-
-    //                C2F(mopen)(&fd, expandedFileName, READ_ONLY_TEXT_MODE, &f_swap, &res, &ierr);
-    //                bCloseFile = TRUE;
-
-    //                switch (ierr)
-    //                {
-    //                    case MOPEN_NO_ERROR:
-    //                        fileDescriptor = fd;
-    //                        if (expandedFileName) {FREE(expandedFileName); expandedFileName = NULL;}
-    //                        break;
-    //                    case MOPEN_NO_MORE_LOGICAL_UNIT:
-    //                        {
-    //                            Scierror(66, _("%s: Too many files opened!\n"), fname);
-    //                            if (expandedFileName) {FREE(expandedFileName); expandedFileName = NULL;}
-    //                            return 0;
-    //                        }
-    //                        break;
-    //                    case MOPEN_CAN_NOT_OPEN_FILE:
-    //                        {
-    //                            Scierror(999, _("%s: Cannot open file %s.\n"), fname, expandedFileName);
-    //                            if (expandedFileName) {FREE(expandedFileName); expandedFileName = NULL;}
-    //                            return 0;
-    //                        }
-    //                        break;
-    //                    case MOPEN_NO_MORE_MEMORY:
-    //                        {
-    //                            if (expandedFileName) {FREE(expandedFileName); expandedFileName = NULL;}
-    //                            Scierror(999, _("%s: No more memory.\n"), fname);
-    //                            return 0;
-    //                        }
-    //                        break;
-    //                    case MOPEN_INVALID_FILENAME:
-    //                        {
-    //                            Scierror(999, _("%s: invalid filename %s.\n"), fname, expandedFileName);
-    //                            if (expandedFileName) {FREE(expandedFileName); expandedFileName = NULL;}
-    //                            return 0;
-    //                        }
-    //                        break;
-    //                    case MOPEN_INVALID_STATUS: default:
-    //                        {
-    //                            if (expandedFileName) {FREE(expandedFileName); expandedFileName = NULL;}
-    //                            Scierror(999, _("%s: invalid status.\n"), fname);
-    //                            return 0;
-    //                        }
-    //                        break;
-    //                }
-    //            }
-    //        }
-    //        else
-    //        {
-    //            Scierror(999,_("%s: Memory allocation error.\n"), fname);
-    //            return 0;
-    //        }
-    //    }
-    //    else /* double */
-    //    {
-    //        double dValue = 0.;
-
-    //        if ( !getScalarDouble(_piKey, piAddressVarOne, &dValue) )
-    //        {
-    //            FILE *fd = NULL;
-    //            fileDescriptor = (int)dValue;
-    //            if ((fileDescriptor == STDIN_ID) || (fileDescriptor == STDOUT_ID))
-    //            {
-    //                SciError(244);
-    //                return 0;
-    //            }
-
-    //            fd = GetFileOpenedInScilab(fileDescriptor);
-    //            if (fd == NULL)
-    //            {
-    //                Scierror(245,_("%s: No input file associated to logical unit %d.\n"), fname, fileDescriptor);
-    //                return 0;
-    //            }
-    //        }
-    //        else
-    //        {
-    //            Scierror(999,_("%s: Memory allocation error.\n"), fname);
-    //            return 0;
-    //        }
-    //    }
-
-    //    wcReadedStrings = mgetl(fileDescriptor, numberOfLinesToRead, &numberOfLinesReaded, &iErrorMgetl);
-
-    //    if (bCloseFile)
-    //    {
-    //        double dErrClose = 0.;
-    //        C2F(mclose)(&fileDescriptor, &dErrClose);
-    //        bCloseFile = FALSE;
-    //    }
-
-    //    switch(iErrorMgetl)
-    //    {
-    //        case MGETL_NO_ERROR:
-    //        {
-    //            if (numberOfLinesReaded == 0)
-    //            {
-    //                if (createEmptyMatrix(_piKey, Rhs + 1) != 0)
-    //                {
-    //                    Scierror(999,_("%s: Memory allocation error.\n"), fname);
-    //                    return 0;
-    //                }
-    //            }
-    //            else
-    //            {
-    //                int m = numberOfLinesReaded;
-    //                int n = 1;
-
-    //                sciErr = createMatrixOfString(_piKey, Rhs + 1, m, n, wcReadedStrings);
-    //                if(sciErr.iErr)
-    //                {
-    //                    printError(&sciErr, 0);
-    //                    return 0;
-    //                }
-    //            }
-
-    //            freeArrayOfString(wcReadedStrings, numberOfLinesReaded);
-    //            wcReadedStrings = NULL;
-    //        }
-    //        break;
-
-    //        case MGETL_EOF:
-    //        {
-    //            if (numberOfLinesReaded == 0)
-    //            {
-    //                if (createEmptyMatrix(_piKey, Rhs + 1) != 0)
-    //                {
-    //                    Scierror(999,_("%s: Memory allocation error.\n"), fname);
-    //                    return 0;
-    //                }
-    //            }
-    //            else
-    //            {
-    //                int m = numberOfLinesReaded;
-    //                int n = 1;
-
-    //                sciErr = createMatrixOfString(_piKey, Rhs + 1, m, n, wcReadedStrings);
-    //                if(sciErr.iErr)
-    //                {
-    //                    printError(&sciErr, 0);
-    //                    return 0;
-    //                }
-    //                freeArrayOfString(wcReadedStrings, numberOfLinesReaded);
-    //                wcReadedStrings = NULL;
-    //            }
-    //        }
-    //        break;
-
-    //        case MGETL_MEMORY_ALLOCATION_ERROR:
-    //        {
-    //            if (wcReadedStrings)
-    //            {
-    //                freeArrayOfString(wcReadedStrings, numberOfLinesReaded);
-    //                wcReadedStrings = NULL;
-    //            }
-    //            Scierror(999,_("%s: Memory allocation error.\n"), fname);
-    //            return 0;
-    //        }
-    //        break;
-
-    //        case MGETL_ERROR:
-    //        {
-    //            if (wcReadedStrings)
-    //            {
-    //                freeArrayOfString(wcReadedStrings, numberOfLinesReaded);
-    //                wcReadedStrings = NULL;
-    //            }
-    //            Scierror(999,_("%s: error.\n"), fname);
-    //            return 0;
-    //        }
-    //        break;
-    //    }
-
-    //    LhsVar(1) = Rhs + 1;
-    //    C2F(putlhsvar)();
-    //}
-    //else
-    //{
-    //    Scierror(999,_("%s: Wrong type for input argument #%d: String or logical unit expected.\n"), fname, 1);
-    //}
-
-    //return 0;
 }
 /*--------------------------------------------------------------------------*/
index 2779791..1659522 100644 (file)
@@ -16,6 +16,8 @@
 #include "filemanager.hxx"
 #include "fileio_gw.hxx"
 #include "string.hxx"
+#include "double.hxx"
+#include "function.hxx"
 
 extern "C"
 {
@@ -34,6 +36,7 @@ Function::ReturnValue sci_mgetstr(types::typed_list &in, int _iRetCount, types::
     int iSizeToRead             = 0;
     wchar_t* pwstOut            = NULL;
 
+
     if(in.size() < 1 || in.size() > 2)
     {
         ScierrorW(77, _W("%ls: Wrong number of input argument(s): %d to %d expected.\n"), L"mgetstr", 1, 2);
@@ -59,14 +62,13 @@ Function::ReturnValue sci_mgetstr(types::typed_list &in, int _iRetCount, types::
     }
     switch (iFile)
     {
-        case 0: // stderr
-        case 6: // stdout
-            ScierrorW(999, _W("%ls: Wrong file descriptor: %d.\n"), L"mgetstr", iFile);
-            return types::Function::Error;
-        default :
-            pwstOut = mgetstr(iFile, iSizeToRead);
+    case 0: // stderr
+    case 6: // stdout
+        ScierrorW(999, _W("%ls: Wrong file descriptor: %d.\n"), L"mgetstr", iFile);
+        return types::Function::Error;
+    default :
+        pwstOut = mgetstr(iFile, iSizeToRead);
     }
-    pOutString = new types::String(iDims,iDimsArray);
 
     if(pwstOut == NULL)
     {
@@ -75,6 +77,7 @@ Function::ReturnValue sci_mgetstr(types::typed_list &in, int _iRetCount, types::
     }
     else
     {
+        pOutString = new types::String(iDims,iDimsArray);
         pOutString->set(0, pwstOut);
     }
 
index ca2f2ea..b4fa495 100644 (file)
@@ -11,6 +11,8 @@
  */
 
 #include "string.hxx"
+#include "double.hxx"
+#include "function.hxx"
 #include "filemanager.hxx"
 #include "fileio_gw.hxx"
 
index 04c2f22..15ad16c 100644 (file)
@@ -15,6 +15,8 @@
 #include "filemanager.hxx"
 #include "fileio_gw.hxx"
 #include "string.hxx"
+#include "double.hxx"
+#include "function.hxx"
 
 extern "C"
 {
@@ -81,9 +83,9 @@ Function::ReturnValue sci_mput(typed_list &in, int _iRetCount, typed_list &out)
 
     switch (iFile)
     {
-        case 5: // stdin
-            ScierrorW(999, _W("%ls: Wrong file descriptor: %d.\n"), L"mput", iFile);
-            return types::Function::Error;
+    case 5: // stdin
+        ScierrorW(999, _W("%ls: Wrong file descriptor: %d.\n"), L"mput", iFile);
+        return types::Function::Error;
     }
 
     C2F(mput)(&iFile, pData, &iSize, pstType, &iErr);
index c552802..af6d4bf 100644 (file)
@@ -13,6 +13,9 @@
 #include "filemanager.hxx"
 #include "fileio_gw.hxx"
 #include "string.hxx"
+#include "double.hxx"
+#include "bool.hxx"
+#include "function.hxx"
 
 extern "C"
 {
index df41652..21b74ca 100644 (file)
@@ -16,6 +16,9 @@
 #include "filemanager.hxx"
 #include "fileio_gw.hxx"
 #include "string.hxx"
+#include "double.hxx"
+#include "bool.hxx"
+#include "function.hxx"
 
 extern "C"
 {
@@ -30,7 +33,10 @@ Function::ReturnValue sci_mputstr(types::typed_list &in, int _iRetCount, types::
     int iFile               = -1; //default file : last opened file
     types::String* pString  = NULL;
     int iErr                = 1;
-    
+
+    types::Double* pdFileId = NULL;
+    File* pF                = NULL;
+
     if(in.size() < 1 || in.size() > 2)
     {
         ScierrorW(77, _W("%ls: Wrong number of input argument(s): %d to %d expected.\n"), L"mputstr", 1, 2);
@@ -57,11 +63,11 @@ Function::ReturnValue sci_mputstr(types::typed_list &in, int _iRetCount, types::
 
     switch (iFile)
     {
-        case 5: // stdin
-            ScierrorW(999, _W("%ls: Wrong file descriptor: %d.\n"), L"mputstr", iFile);
-            return types::Function::Error;
-        default :
-            iErr = mputl(iFile, pString->get(), 1);
+    case 5: // stdin
+        ScierrorW(999, _W("%ls: Wrong file descriptor: %d.\n"), L"mputstr", iFile);
+        return types::Function::Error;
+    default :
+        iErr = mputl(iFile, pString->get(), 1);
     }
 
     out.push_back(new Bool(!iErr));
index 4faecc9..9142211 100644 (file)
@@ -17,6 +17,8 @@
 #include "string.hxx"
 #include "yaspio.hxx"
 #include "cell.hxx"
+#include "function.hxx"
+#include "double.hxx"
 
 extern "C"
 {
index 90bc9f6..8dee31a 100644 (file)
@@ -16,6 +16,9 @@
 #include "filemanager.hxx"
 #include "fileio_gw.hxx"
 #include "string.hxx"
+#include "double.hxx"
+#include "bool.hxx"
+#include "function.hxx"
 
 extern "C"
 {
@@ -24,7 +27,7 @@ extern "C"
 #include "mseek.h"
 }
 /*--------------------------------------------------------------------------*/
-#if (defined(sun) && !defined(SYSV)) 
+#if (defined(sun) && !defined(SYSV))
 char *strerror (int errcode);
 #endif
 /*--------------------------------------------------------------------------*/
@@ -32,7 +35,7 @@ char *strerror (int errcode);
 #define SEEK_SET 0
 #define SEEK_CUR 1
 #define SEEK_END 2
-#endif 
+#endif
 /*--------------------------------------------------------------------------*/
 
 Function::ReturnValue sci_mseek(types::typed_list &in, int _iRetCount, types::typed_list &out)
@@ -86,7 +89,7 @@ Function::ReturnValue sci_mseek(types::typed_list &in, int _iRetCount, types::ty
             ScierrorW(999, _W("%ls: Wrong type for input argument #%d: A String expected.\n"), L"mseek", 3);
             return types::Function::Error;
         }
-        
+
         iFile = static_cast<int>(in[1]->getAs<types::Double>()->get(0));
         wcsFlag = in[2]->getAs<types::String>()->get(0);
     }
@@ -101,14 +104,14 @@ Function::ReturnValue sci_mseek(types::typed_list &in, int _iRetCount, types::ty
     }
 
     if(wcsFlag != NULL)
-    {  
+    {
         if(wcsncmp(wcsFlag, L"set",3) == 0)
         {
             iFlag = SEEK_SET;
         }
         else if(wcsncmp(wcsFlag, L"cur",3) == 0)
         {
-               iFlag = SEEK_CUR;
+            iFlag = SEEK_CUR;
         }
         else if(wcsncmp(wcsFlag, L"end",3) == 0)
         {
@@ -116,7 +119,7 @@ Function::ReturnValue sci_mseek(types::typed_list &in, int _iRetCount, types::ty
         }
         else
         {
-            ScierrorW(999, _W("%ls: Wrong value for input argument #%d: '%ls', '%ls' or '%ls' expected.\n"),L"mseek",3,L"set",L"cur",L"end");            
+            ScierrorW(999, _W("%ls: Wrong value for input argument #%d: '%ls', '%ls' or '%ls' expected.\n"),L"mseek",3,L"set",L"cur",L"end");
             return types::Function::Error;
         }
     }
index 82997da..06055b6 100644 (file)
@@ -16,6 +16,8 @@
 #include "fileio_gw.hxx"
 #include "string.hxx"
 #include "cell.hxx"
+#include "function.hxx"
+#include "double.hxx"
 
 extern "C"
 {
index 5208965..defa52d 100644 (file)
@@ -16,6 +16,8 @@
 #include "filemanager.hxx"
 #include "fileio_gw.hxx"
 #include "string.hxx"
+#include "double.hxx"
+#include "function.hxx"
 
 extern "C"
 {
@@ -25,7 +27,7 @@ extern "C"
 }
 
 
-Function::ReturnValue sci_mtell(types::typed_list &in, int _iRetCount, types::typed_list &out)
+types::Function::ReturnValue sci_mtell(types::typed_list &in, int _iRetCount, types::typed_list &out)
 {
     int iFile           = -1; //default file : last opened file
     int dims            = 2;
index f5d95ce..85d552c 100644 (file)
  *
  */
 /*--------------------------------------------------------------------------*/
-#include "funcmanager.hxx"
 #include "fileio_gw.hxx"
 #include "function.hxx"
 #include "string.hxx"
+#include "double.hxx"
 #include "filemanager.hxx"
 
 extern "C"
@@ -103,7 +103,7 @@ types::Function::ReturnValue sci_newest(types::typed_list &in, int _iRetCount, t
         pStringOutput->set(0, iRet);
         out.push_back(pStringOutput);
     }
-    
+
     return types::Function::OK;
 }
 /*--------------------------------------------------------------------------*/
index 6bae3f8..6bd61c3 100644 (file)
 *
 */
 /*--------------------------------------------------------------------------*/
-#include "funcmanager.hxx"
-#include "filemanager.hxx"
 #include "fileio_gw.hxx"
 #include "function.hxx"
 #include "string.hxx"
+#include "double.hxx"
+#include "bool.hxx"
 
 extern "C"
 {
@@ -26,6 +26,9 @@ extern "C"
 
 #define UNIX_TYPE       L"u"
 #define WINDOWS_TYPE    L"w"
+
+using namespace types;
+
 /*--------------------------------------------------------------------------*/
 Function::ReturnValue sci_pathconvert(typed_list &in, int _iRetCount, typed_list &out)
 {
index 5c2f53c..f2fac31 100644 (file)
@@ -1,7 +1,7 @@
 /*
  * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
  * Copyright (C) 2011 - Digiteo - 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
  *
  */
 /*--------------------------------------------------------------------------*/
-#include "funcmanager.hxx"
 #include "fileio_gw.hxx"
 #include "function.hxx"
 #include "string.hxx"
+#include "bool.hxx"
 
 extern "C"
 {
@@ -58,7 +58,7 @@ Function::ReturnValue sci_removedir(typed_list &in, int _iRetCount, typed_list &
     }
     else
     {
-        iRet = removedirW(pwstPath);       
+        iRet = removedirW(pwstPath);
     }
 
     FREE(pwstPath);
index 54d1362..f8a7308 100644 (file)
@@ -1,11 +1,11 @@
 /*
 * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
 * Copyright (C) 2010 - DIGITEO - Allan CORNET
-* 
+*
 * 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    
+* are also available at
 * http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt
 *
 */
@@ -14,8 +14,9 @@
 #define __MPUTL_H__
 
 #include "dynlib_fileio.h"
+#include "BOOL.h"
 
-typedef enum { 
+typedef enum {
     MPUTL_NO_ERROR = 0,
     MPUTL_ERROR = 1,
     MPUTL_INVALID_FILE_DESCRIPTOR = 2,
index 8afa061..e55eb70 100644 (file)
@@ -13,8 +13,7 @@
 #ifndef __FUNCTIONS_GW_HXX__
 #define __FUNCTIONS_GW_HXX__
 
-#include "funcmanager.hxx"
-#include "context.hxx"
+#include "cpp_gateway_prototype.hxx"
 
 #include "dynlib_functions_gw.h"
 
index 6eddcd9..cd4c7ee 100644 (file)
@@ -19,7 +19,7 @@ extern "C"
 
 #include "functions_gw.hxx"
 #include "configvariable.hxx"
-#include "funcmanager.hxx"
+#include "function.hxx"
 
 using namespace types;
 
index 93f436b..193370e 100644 (file)
@@ -12,9 +12,7 @@
 
 #include "functions_gw.hxx"
 #include "configvariable.hxx"
-#include "funcmanager.hxx"
-#include "cell.hxx"
-#include "threadId.hxx"
+#include "function.hxx"
 
 extern "C"
 {
index 55f34b4..b6535ce 100644 (file)
 *
 */
 /*--------------------------------------------------------------------------*/
-#include "funcmanager.hxx"
-#include "context.hxx"
+
+#include "functions_gw.hxx"
 #include "configvariable.hxx"
+#include "double.hxx"
+#include "function.hxx"
 
 extern "C"
 {
@@ -27,7 +29,7 @@ using namespace types;
 Function::ReturnValue sci_mode(types::typed_list &in, int _iRetCount, types::typed_list &out)
 {
        InternalType *pIT = NULL;
-       wstring stModule;
+    std::wstring stModule;
 
        /* Check the number of input argument */
        if(in.size() > 1)
index b4153c9..8f30482 100644 (file)
@@ -10,7 +10,8 @@
 *
 */
 /*--------------------------------------------------------------------------*/
-#include "funcmanager.hxx"
+
+#include "functions_gw.hxx"
 #include "context.hxx"
 #include "string.hxx"
 
index 814f32c..b31db9b 100644 (file)
@@ -77,7 +77,7 @@
     <ClCompile>
       <AdditionalOptions>%(AdditionalOptions)</AdditionalOptions>
       <Optimization>Disabled</Optimization>
-      <AdditionalIncludeDirectories>.;../../includes;../../../../libs/MALLOC/includes;../../../localization/includes;../../../call_scilab/includes;../../../string/includes;../../../output_stream/includes;../../../api_scilab/includes;../../../core/includes;../../../../libs/hashtable;../../../../libs/intl;../../../fileio/includes;../../../windows_tools/includes;../../../operations/includes;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+      <AdditionalIncludeDirectories>.;../../includes;../../../../libs/MALLOC/includes;../../../localization/includes;../../../call_scilab/includes;../../../string/includes;../../../output_stream/includes;../../../api_scilab/includes;../../../core/includes;../../../../libs/hashtable;../../../../libs/intl;../../../fileio/includes;../../../windows_tools/includes;../../../operations/includes;../../../types/includes;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
       <PreprocessorDefinitions>_CRT_SECURE_NO_DEPRECATE;FORDLL;_DEBUG;_WINDOWS;_USRDLL;FUNCTIONS_EXPORTS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
       <MinimalRebuild>true</MinimalRebuild>
       <BasicRuntimeChecks>Default</BasicRuntimeChecks>
@@ -120,7 +120,7 @@ cd .. &gt;nul
     </Midl>
     <ClCompile>
       <Optimization>Disabled</Optimization>
-      <AdditionalIncludeDirectories>.;../../includes;../../../../libs/MALLOC/includes;../../../localization/includes;../../../call_scilab/includes;../../../string/includes;../../../output_stream/includes;../../../api_scilab/includes;../../../core/includes;../../../../libs/hashtable;../../../../libs/intl;../../../fileio/includes;../../../windows_tools/includes;../../../operations/includes;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+      <AdditionalIncludeDirectories>.;../../includes;../../../../libs/MALLOC/includes;../../../localization/includes;../../../call_scilab/includes;../../../string/includes;../../../output_stream/includes;../../../api_scilab/includes;../../../core/includes;../../../../libs/hashtable;../../../../libs/intl;../../../fileio/includes;../../../windows_tools/includes;../../../operations/includes;../../../types/includes;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
       <PreprocessorDefinitions>_CRT_SECURE_NO_DEPRECATE;FORDLL;_DEBUG;_WINDOWS;_USRDLL;FUNCTIONS_EXPORTS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
       <MinimalRebuild>true</MinimalRebuild>
       <BasicRuntimeChecks>Default</BasicRuntimeChecks>
@@ -164,7 +164,7 @@ cd .. &gt;nul
       <InlineFunctionExpansion>OnlyExplicitInline</InlineFunctionExpansion>
       <FavorSizeOrSpeed>Speed</FavorSizeOrSpeed>
       <WholeProgramOptimization>false</WholeProgramOptimization>
-      <AdditionalIncludeDirectories>.;../../includes;../../../../libs/MALLOC/includes;../../../localization/includes;../../../call_scilab/includes;../../../string/includes;../../../output_stream/includes;../../../api_scilab/includes;../../../core/includes;../../../../libs/hashtable;../../../../libs/intl;../../../fileio/includes;../../../windows_tools/includes;../../../operations/includes;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+      <AdditionalIncludeDirectories>.;../../includes;../../../../libs/MALLOC/includes;../../../localization/includes;../../../call_scilab/includes;../../../string/includes;../../../output_stream/includes;../../../api_scilab/includes;../../../core/includes;../../../../libs/hashtable;../../../../libs/intl;../../../fileio/includes;../../../windows_tools/includes;../../../operations/includes;../../../types/includes;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
       <PreprocessorDefinitions>_CRT_SECURE_NO_DEPRECATE;FORDLL;NDEBUG;_WINDOWS;_USRDLL;FUNCTIONS_EXPORTS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
       <StringPooling>true</StringPooling>
       <RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
@@ -215,7 +215,7 @@ cd .. &gt;nul
       <InlineFunctionExpansion>OnlyExplicitInline</InlineFunctionExpansion>
       <FavorSizeOrSpeed>Speed</FavorSizeOrSpeed>
       <WholeProgramOptimization>false</WholeProgramOptimization>
-      <AdditionalIncludeDirectories>.;../../includes;../../../../libs/MALLOC/includes;../../../localization/includes;../../../call_scilab/includes;../../../string/includes;../../../output_stream/includes;../../../api_scilab/includes;../../../core/includes;../../../../libs/hashtable;../../../../libs/intl;../../../fileio/includes;../../../windows_tools/includes;../../../operations/includes;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+      <AdditionalIncludeDirectories>.;../../includes;../../../../libs/MALLOC/includes;../../../localization/includes;../../../call_scilab/includes;../../../string/includes;../../../output_stream/includes;../../../api_scilab/includes;../../../core/includes;../../../../libs/hashtable;../../../../libs/intl;../../../fileio/includes;../../../windows_tools/includes;../../../operations/includes;../../../types/includes;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
       <PreprocessorDefinitions>_CRT_SECURE_NO_DEPRECATE;FORDLL;NDEBUG;_WINDOWS;_USRDLL;FUNCTIONS_EXPORTS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
       <StringPooling>true</StringPooling>
       <RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
index 4c34f1c..2aa4f0d 100644 (file)
@@ -13,7 +13,7 @@
 #ifndef __GUI_GW_HXX__
 #define __GUI_GW_HXX__
 
-#include "function.hxx"
+#include "cpp_gateway_prototype.hxx"
 
 #ifdef _MSC_VER
        #if GUI_GW_EXPORTS
index b92eda1..99c1426 100644 (file)
@@ -38,7 +38,7 @@ GUI_IMPEXP int sci_x_choose_modeless(char *fname,unsigned long fname_len);
 GUI_IMPEXP int sci_messagebox(char *fname,unsigned long l);
 GUI_IMPEXP int sci_waitbar(char *fname,unsigned long l);
 GUI_IMPEXP int sci_progressionbar(char *fname,unsigned long l);
-GUI_IMPEXP int sci_helpbrowser(char *fname,unsigned long l);
+//GUI_IMPEXP int sci_helpbrowser(char *fname,unsigned long l); -> C++
 GUI_IMPEXP int sci_uigetfont(char *fname,unsigned long l);
 GUI_IMPEXP int sci_uigetcolor(char *fname,unsigned long l);
 GUI_IMPEXP int sci_getcallbackobject(char *fname,unsigned long fname_len);
index d51576f..7ebc082 100644 (file)
@@ -13,8 +13,8 @@
 #ifndef __HDF5_GW_HXX__
 #define __HDF5_GW_HXX__
 
-#include "funcmanager.hxx"
-#include "context.hxx"
+#include "cpp_gateway_prototype.hxx"
+
 extern "C"
 {
     #include "dynlib_hdf5_scilab.h"
index 964c783..ce7acba 100644 (file)
@@ -11,6 +11,7 @@
  */
 
 #include "hdf5_gw.hxx"
+#include "context.hxx"
 
 #define MODULE_NAME L"hdf5"
 
index d726232..c5b803a 100644 (file)
@@ -20,7 +20,7 @@
 #include "tlist.hxx"
 #include "mlist.hxx"
 #include "function.hxx"
-#include "funcmanager.hxx"
+#include "context.hxx"
 #include "hdf5_gw.hxx"
 
 extern "C"
@@ -530,7 +530,7 @@ static bool export_ints(int _iH5File, types::InternalType* pIT,wchar_t* _pwstNam
             iRet = writeInterger16Matrix(_iH5File, pstName, pInt->getRows(), pInt->getCols(), pInt->get());
             break;
         }
-        case types::InternalType::RealUInt16 : 
+        case types::InternalType::RealUInt16 :
         {
             types::UInt16* pInt    = pIT->getAs<types::UInt16>();
             iRet = writeUnsignedInterger16Matrix(_iH5File, pstName, pInt->getRows(), pInt->getCols(), pInt->get());
@@ -539,10 +539,10 @@ static bool export_ints(int _iH5File, types::InternalType* pIT,wchar_t* _pwstNam
         case types::InternalType::RealInt32 :
         {
             types::Int32* pInt    = pIT->getAs<types::Int32>();
-            iRet = writeInterger32Matrix(_iH5File, pstName, pInt->getRows(), pInt->getCols(), pInt->get()); 
+            iRet = writeInterger32Matrix(_iH5File, pstName, pInt->getRows(), pInt->getCols(), pInt->get());
             break;
         }
-        case types::InternalType::RealUInt32 : 
+        case types::InternalType::RealUInt32 :
         {
             types::UInt32* pInt    = pIT->getAs<types::UInt32>();
             iRet = writeUnsignedInterger32Matrix(_iH5File, pstName, pInt->getRows(), pInt->getCols(), pInt->get());
@@ -551,10 +551,10 @@ static bool export_ints(int _iH5File, types::InternalType* pIT,wchar_t* _pwstNam
         case types::InternalType::RealInt64 :
         {
             types::Int64* pInt    = pIT->getAs<types::Int64>();
-            iRet = writeInterger64Matrix(_iH5File, pstName, pInt->getRows(), pInt->getCols(), pInt->get()); 
+            iRet = writeInterger64Matrix(_iH5File, pstName, pInt->getRows(), pInt->getCols(), pInt->get());
             break;
         }
-        case types::InternalType::RealUInt64 : 
+        case types::InternalType::RealUInt64 :
         {
             types::UInt64* pInt    = pIT->getAs<types::UInt64>();
             iRet = writeUnsignedInterger64Matrix(_iH5File, pstName, pInt->getRows(), pInt->getCols(), pInt->get());
index 0c291b0..3fb4dd8 100644 (file)
@@ -18,7 +18,7 @@
 #include "tlist.hxx"
 #include "mlist.hxx"
 #include "function.hxx"
-#include "funcmanager.hxx"
+#include "context.hxx"
 #include "hdf5_gw.hxx"
 #include "listundefined.hxx"
 
@@ -312,7 +312,7 @@ static types::InternalType* import_string(int _iDatasetId)
     }
 
     pstData = (char **) MALLOC(iRows * iCols * sizeof(char*));
-    pwstData = (wchar_t **) MALLOC(iRows * iCols * sizeof(wchar_t*)); 
+    pwstData = (wchar_t **) MALLOC(iRows * iCols * sizeof(wchar_t*));
 
     iRet = readStringMatrix(_iDatasetId, iRows, iCols, pstData);
     if(iRet)
index b9ee918..b9974aa 100644 (file)
@@ -13,9 +13,7 @@
 #ifndef __INTEGER_GW_HXX__
 #define __INTEGER_GW_HXX__
 
-#include "funcmanager.hxx"
-#include "context.hxx"
-#include "function.hxx"
+#include "cpp_gateway_prototype.hxx"
 
 #include "dynlib_integer_gw.h"
 
index 133f80e..7c579c5 100644 (file)
@@ -11,6 +11,7 @@
 */
 
 #include "integer_gw.hxx"
+#include "context.hxx"
 
 #define MODULE_NAME L"integer"
 
index 0cf5d37..0b0cd49 100644 (file)
  *
  */
 
-#include "funcmanager.hxx"
 #include "integer_gw.hxx"
 #include "function.hxx"
 #include "int.hxx"
+#include "double.hxx"
 
 extern "C"
 {
@@ -30,7 +30,7 @@ types::Callable::ReturnValue sci_double(types::typed_list &in, int _iRetCount, t
         ScierrorW(999, _W("%ls: Wrong number of input arguments: %d expected.\n"), L"double", 1);
         return types::Function::Error;
     }
-    
+
     types::Double* pOut = NULL;
     if(in[0]->isDouble())
     {
@@ -68,7 +68,7 @@ types::Callable::ReturnValue sci_double(types::typed_list &in, int _iRetCount, t
             }
             break;
         }
-        
+
         case types::InternalType::RealInt16 :
         {
             types::Int16* pInt = in[0]->getAs<types::Int16>();
@@ -90,7 +90,7 @@ types::Callable::ReturnValue sci_double(types::typed_list &in, int _iRetCount, t
             }
             break;
         }
-        
+
         case types::InternalType::RealInt32 :
         {
             types::Int32* pInt = in[0]->getAs<types::Int32>();
@@ -112,7 +112,7 @@ types::Callable::ReturnValue sci_double(types::typed_list &in, int _iRetCount, t
             }
             break;
         }
-        
+
         case types::InternalType::RealInt64 :
         {
             types::Int64* pInt = in[0]->getAs<types::Int64>();
@@ -134,14 +134,14 @@ types::Callable::ReturnValue sci_double(types::typed_list &in, int _iRetCount, t
             }
             break;
         }
-        
+
         default :
         {
             ScierrorW(999, _W("Never occur"));
             return types::Function::Error;
         }
     }
+
     out.push_back(pOut);
     return types::Function::OK;
 }
index a6fc2da..a910be7 100644 (file)
@@ -10,6 +10,7 @@
  *
  */
 
+#include "integer_gw.hxx"
 #include "function.hxx"
 #include "double.hxx"
 #include "api_scilab.h"
index 87f4873..ccebfb9 100644 (file)
 #ifndef __IO_GW_HXX__
 #define __IO_GW_HXX__
 
-#include "funcmanager.hxx"
-#include "context.hxx"
+#include "cpp_gateway_prototype.hxx"
 
+extern "C"
+{
 #include "dynlib_io_gw.h"
+}
 
 class IoModule
 {
index 725246e..a64edc7 100644 (file)
 
 
 #include <string.h>
-#include "funcmanager.hxx"
 #include "io_gw.hxx"
 #include "string.hxx"
+#include "function.hxx"
+#include "double.hxx"
 
 extern "C"
 {
index fe31fd6..395e4d5 100644 (file)
@@ -12,7 +12,7 @@
 
 
 #include <string.h>
-#include "funcmanager.hxx"
+#include "function.hxx"
 #include "io_gw.hxx"
 
 extern "C"
index e71d477..d6bdc47 100644 (file)
@@ -11,6 +11,7 @@
 */
 
 #include "io_gw.hxx"
+#include "context.hxx"
 
 #define MODULE_NAME L"io"
 
index 8bc5bbc..088b447 100644 (file)
 #ifndef __JVM_GW_HXX__
 #define __JVM_GW_HXX__
 
+#include "cpp_gateway_prototype.hxx"
 
-#include "funcmanager.hxx"
-#include "context.hxx"
+extern "C"
+{
 #include "dynlib_jvm_gw.h"
+}
 
-class JvmModule 
+class JvmModule
 {
 private :
   JvmModule() {};
index f217fa6..8bdddfa 100644 (file)
@@ -11,6 +11,7 @@
  */
 
 #include "jvm_gw.hxx"
+#include "context.hxx"
 
 #pragma comment(lib,"../../../../bin/libintl.lib")
 
index 5cddf20..b0dad41 100644 (file)
@@ -14,9 +14,7 @@
 #ifndef __LOCALIZATION_GW_HXX__
 #define __LOCALIZATION_GW_HXX__
 
-
-#include "funcmanager.hxx"
-#include "context.hxx"
+#include "cpp_gateway_prototype.hxx"
 
 extern "C"
 {
index f89a962..1ac2a39 100644 (file)
@@ -13,6 +13,7 @@
 #include "localization_gw.hxx"
 #include "function.hxx"
 #include "string.hxx"
+#include "bool.hxx"
 
 extern "C"
 {
index a57aa4d..261489c 100644 (file)
@@ -1,11 +1,11 @@
 /*
 * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
 * Copyright (C) 2009 - DIGITEO - Allan CORNET
-* 
+*
 * 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    
+* are also available at
 * http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt
 *
 */
 #define __GW_OUTPUT_STREAM_H__
 
 #include "dynlib_output_stream.h"
+#include "c_gateway_prototype.h"
+
 /*--------------------------------------------------------------------------*/
 OUTPUT_STREAM_IMPEXP int gw_output_stream(void);
 /*--------------------------------------------------------------------------*/
 OUTPUT_STREAM_IMPEXP int sci_print(char *fname,unsigned long fname_len);
 
 //YaSp
-OUTPUT_STREAM_IMPEXP int sci_diary(char *fname, int* _piKey);
+OUTPUT_STREAM_IMPEXP C_GATEWAY_PROTOTYPE(sci_diary);
 /*--------------------------------------------------------------------------*/
 #endif /* __GW_OUTPUT_STREAM_H__ */
 /*--------------------------------------------------------------------------*/
index 0a59f59..65cf13b 100644 (file)
@@ -1,6 +1,6 @@
 /*
  *  Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
- *  Copyright (C) 2010-2010 - DIGITEO - Bruno JOFRET
+ *  Copyright (C) 2010-2011 - DIGITEO - Bruno JOFRET
  *
  *  This file must be used under the terms of the CeCILL.
  *  This source file is licensed as described in the file COPYING, which
 #ifndef __OUTPUTSTREAM_GW_HXX__
 #define __OUTPUTSTREAM_GW_HXX__
 
-
-
-#include "funcmanager.hxx"
-#include "context.hxx"
-#include "function.hxx" /* define CPP_GATEWAY_PROTOTYPE */
+#include "cpp_gateway_prototype.hxx"
 
 extern "C"
 {
index 623d9d8..0a201e1 100644 (file)
@@ -77,7 +77,7 @@
     <ClCompile>
       <AdditionalOptions>%(AdditionalOptions)</AdditionalOptions>
       <Optimization>Disabled</Optimization>
-      <AdditionalIncludeDirectories>.;../../includes;../jni;../cpp;../../../../libs/MALLOC/includes;../../../core/includes;../../../shell/includes;../../../api_scilab/includes;../../../jvm/includes;../../../../java/jdk/include;../../../../java/jdk/include/win32;../../../shell/src/c/windows;../../../localization/includes;../../../../libs/intl;../../../string/includes;../../../windows_tools/includes;../../../system_env/includes;../../../operations/includes;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+      <AdditionalIncludeDirectories>.;../../includes;../jni;../cpp;../../../../libs/MALLOC/includes;../../../core/includes;../../../shell/includes;../../../api_scilab/includes;../../../jvm/includes;../../../../java/jdk/include;../../../../java/jdk/include/win32;../../../shell/src/c/windows;../../../localization/includes;../../../../libs/intl;../../../string/includes;../../../windows_tools/includes;../../../system_env/includes;../../../operations/includes;../../../types/includes;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
       <PreprocessorDefinitions>_CRT_SECURE_NO_DEPRECATE;FORDLL;_DEBUG;_WINDOWS;_USRDLL;OUTPUT_STREAM_EXPORTS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
       <MinimalRebuild>true</MinimalRebuild>
       <BasicRuntimeChecks>Default</BasicRuntimeChecks>
@@ -125,7 +125,7 @@ lib /DEF:"$(ProjectDir)system_env_Import.def" /SUBSYSTEM:WINDOWS /MACHINE:$(Plat
     </Midl>
     <ClCompile>
       <Optimization>Disabled</Optimization>
-      <AdditionalIncludeDirectories>.;../../includes;../jni;../cpp;../../../../libs/MALLOC/includes;../../../core/includes;../../../shell/includes;../../../api_scilab/includes;../../../jvm/includes;../../../../java/jdk/include;../../../../java/jdk/include/win32;../../../shell/src/c/windows;../../../localization/includes;../../../../libs/intl;../../../string/includes;../../../windows_tools/includes;../../../system_env/includes;../../../operations/includes;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+      <AdditionalIncludeDirectories>.;../../includes;../jni;../cpp;../../../../libs/MALLOC/includes;../../../core/includes;../../../shell/includes;../../../api_scilab/includes;../../../jvm/includes;../../../../java/jdk/include;../../../../java/jdk/include/win32;../../../shell/src/c/windows;../../../localization/includes;../../../../libs/intl;../../../string/includes;../../../windows_tools/includes;../../../system_env/includes;../../../operations/includes;../../../types/includes;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
       <PreprocessorDefinitions>_CRT_SECURE_NO_DEPRECATE;FORDLL;_DEBUG;_WINDOWS;_USRDLL;OUTPUT_STREAM_EXPORTS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
       <MinimalRebuild>true</MinimalRebuild>
       <BasicRuntimeChecks>Default</BasicRuntimeChecks>
@@ -175,7 +175,7 @@ lib /DEF:"$(ProjectDir)system_env_Import.def" /SUBSYSTEM:WINDOWS /MACHINE:$(Plat
       <InlineFunctionExpansion>OnlyExplicitInline</InlineFunctionExpansion>
       <FavorSizeOrSpeed>Speed</FavorSizeOrSpeed>
       <WholeProgramOptimization>false</WholeProgramOptimization>
-      <AdditionalIncludeDirectories>.;../../includes;../jni;../cpp;../../../../libs/MALLOC/includes;../../../core/includes;../../../shell/includes;../../../api_scilab/includes;../../../jvm/includes;../../../../java/jdk/include;../../../../java/jdk/include/win32;../../../shell/src/c/windows;../../../localization/includes;../../../../libs/intl;../../../string/includes;../../../windows_tools/includes;../../../system_env/includes;../../../operations/includes;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+      <AdditionalIncludeDirectories>.;../../includes;../jni;../cpp;../../../../libs/MALLOC/includes;../../../core/includes;../../../shell/includes;../../../api_scilab/includes;../../../jvm/includes;../../../../java/jdk/include;../../../../java/jdk/include/win32;../../../shell/src/c/windows;../../../localization/includes;../../../../libs/intl;../../../string/includes;../../../windows_tools/includes;../../../system_env/includes;../../../operations/includes;../../../types/includes;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
       <PreprocessorDefinitions>_CRT_SECURE_NO_DEPRECATE;FORDLL;NDEBUG;_WINDOWS;_USRDLL;OUTPUT_STREAM_EXPORTS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
       <StringPooling>true</StringPooling>
       <RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
@@ -231,7 +231,7 @@ lib /DEF:"$(ProjectDir)system_env_Import.def" /SUBSYSTEM:WINDOWS /MACHINE:$(Plat
       <InlineFunctionExpansion>OnlyExplicitInline</InlineFunctionExpansion>
       <FavorSizeOrSpeed>Speed</FavorSizeOrSpeed>
       <WholeProgramOptimization>false</WholeProgramOptimization>
-      <AdditionalIncludeDirectories>.;../../includes;../jni;../cpp;../../../../libs/MALLOC/includes;../../../core/includes;../../../shell/includes;../../../api_scilab/includes;../../../jvm/includes;../../../../java/jdk/include;../../../../java/jdk/include/win32;../../../shell/src/c/windows;../../../localization/includes;../../../../libs/intl;../../../string/includes;../../../windows_tools/includes;../../../system_env/includes;../../../operations/includes;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+      <AdditionalIncludeDirectories>.;../../includes;../jni;../cpp;../../../../libs/MALLOC/includes;../../../core/includes;../../../shell/includes;../../../api_scilab/includes;../../../jvm/includes;../../../../java/jdk/include;../../../../java/jdk/include/win32;../../../shell/src/c/windows;../../../localization/includes;../../../../libs/intl;../../../string/includes;../../../windows_tools/includes;../../../system_env/includes;../../../operations/includes;../../../types/includes;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
       <PreprocessorDefinitions>_CRT_SECURE_NO_DEPRECATE;FORDLL;NDEBUG;_WINDOWS;_USRDLL;OUTPUT_STREAM_EXPORTS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
       <StringPooling>true</StringPooling>
       <RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
index 613424c..9037d58 100644 (file)
@@ -54,7 +54,8 @@ libscishell_la_CFLAGS=        $(JAVA_JNI_INCLUDE) \
                        -I$(top_srcdir)/modules/operations/includes/ \
                        -I$(top_srcdir)/modules/string/includes/ \
                        -I$(top_srcdir)/modules/fileio/includes/ \
-                       -I$(top_srcdir)/modules/ui_data/includes/
+                       -I$(top_srcdir)/modules/ui_data/includes/ \
+                       -I$(top_srcdir)/modules/types/includes/
 
 if IS_MACOSX
 libscishell_la_CFLAGS += -msse2
@@ -86,7 +87,7 @@ modulename=shell
 
 #### shell : Conf files ####
 libscishell_la_rootdir = $(mydatadir)
-libscishell_la_root_DATA =  license.txt 
+libscishell_la_root_DATA =  license.txt
 
 #### shell : init scripts ####
 libscishell_la_etcdir = $(mydatadir)/etc
index 7525cab..0b5f4a2 100644 (file)
@@ -473,7 +473,8 @@ libscishell_la_CFLAGS = $(JAVA_JNI_INCLUDE) -Iincludes/ -Isrc/c/ \
        -I$(top_srcdir)/modules/operations/includes/ \
        -I$(top_srcdir)/modules/string/includes/ \
        -I$(top_srcdir)/modules/fileio/includes/ \
-       -I$(top_srcdir)/modules/ui_data/includes/ $(am__append_1)
+       -I$(top_srcdir)/modules/ui_data/includes/ \
+       -I$(top_srcdir)/modules/types/includes/ $(am__append_1)
 
 # Name of the future library (.la will be replace by .so, .a, etc regarding
 # the system)
@@ -500,7 +501,7 @@ modulename = shell
 
 #### shell : Conf files ####
 libscishell_la_rootdir = $(mydatadir)
-libscishell_la_root_DATA = license.txt 
+libscishell_la_root_DATA = license.txt
 
 #### shell : init scripts ####
 libscishell_la_etcdir = $(mydatadir)/etc
index 7c9678f..d778821 100644 (file)
@@ -81,7 +81,7 @@
     <ClCompile>
       <AdditionalOptions>%(AdditionalOptions)</AdditionalOptions>
       <Optimization>Disabled</Optimization>
-      <AdditionalIncludeDirectories>.;windows;../../includes;../../../../libs/MALLOC/includes;../../../localization/includes;../../../../libs/intl;../../../console/includes/;../../../windows_tools/includes;../../../windows_tools/src/c/scilab_windows;../../../core/includes;../../../completion/includes;../../../operations/includes;../../../output_stream/includes;../../../../java/jdk/include;../../../../java/jdk/include/win32;../../../history_manager/includes/;../../../action_binding/includes;../../../fileio/includes;../../../api_scilab/includes;../../../system_env/includes;../../../string/includes;../../../ui_data/includes;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+      <AdditionalIncludeDirectories>.;windows;../../includes;../../../../libs/MALLOC/includes;../../../localization/includes;../../../../libs/intl;../../../console/includes/;../../../windows_tools/includes;../../../windows_tools/src/c/scilab_windows;../../../core/includes;../../../completion/includes;../../../operations/includes;../../../output_stream/includes;../../../../java/jdk/include;../../../../java/jdk/include/win32;../../../history_manager/includes/;../../../action_binding/includes;../../../fileio/includes;../../../api_scilab/includes;../../../system_env/includes;../../../string/includes;../../../ui_data/includes;../../../types/includes;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
       <PreprocessorDefinitions>_CRT_SECURE_NO_DEPRECATE;FORDLL;_DEBUG;_WINDOWS;_USRDLL;SCISHELL_EXPORTS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
       <MinimalRebuild>true</MinimalRebuild>
       <BasicRuntimeChecks>Default</BasicRuntimeChecks>
@@ -130,7 +130,7 @@ lib /DEF:"$(ProjectDir)ui_data_Import.def" /SUBSYSTEM:WINDOWS /MACHINE:$(Platfor
     </Midl>
     <ClCompile>
       <Optimization>Disabled</Optimization>
-      <AdditionalIncludeDirectories>.;windows;../../includes;../../../../libs/MALLOC/includes;../../../localization/includes;../../../../libs/intl;../../../console/includes/;../../../windows_tools/includes;../../../windows_tools/src/c/scilab_windows;../../../core/includes;../../../completion/includes;../../../operations/includes;../../../output_stream/includes;../../../../java/jdk/include;../../../../java/jdk/include/win32;../../../history_manager/includes/;../../../action_binding/includes;../../../fileio/includes;../../../api_scilab/includes;../../../system_env/includes;../../../string/includes;../../../ui_data/includes;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+      <AdditionalIncludeDirectories>.;windows;../../includes;../../../../libs/MALLOC/includes;../../../localization/includes;../../../../libs/intl;../../../console/includes/;../../../windows_tools/includes;../../../windows_tools/src/c/scilab_windows;../../../core/includes;../../../completion/includes;../../../operations/includes;../../../output_stream/includes;../../../../java/jdk/include;../../../../java/jdk/include/win32;../../../history_manager/includes/;../../../action_binding/includes;../../../fileio/includes;../../../api_scilab/includes;../../../system_env/includes;../../../string/includes;../../../ui_data/includes;../../../types/includes;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
       <PreprocessorDefinitions>_CRT_SECURE_NO_DEPRECATE;FORDLL;_DEBUG;_WINDOWS;_USRDLL;SCISHELL_EXPORTS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
       <MinimalRebuild>true</MinimalRebuild>
       <BasicRuntimeChecks>Default</BasicRuntimeChecks>
@@ -180,7 +180,7 @@ lib /DEF:"$(ProjectDir)ui_data_Import.def" /SUBSYSTEM:WINDOWS /MACHINE:$(Platfor
       <InlineFunctionExpansion>OnlyExplicitInline</InlineFunctionExpansion>
       <FavorSizeOrSpeed>Speed</FavorSizeOrSpeed>
       <WholeProgramOptimization>false</WholeProgramOptimization>
-      <AdditionalIncludeDirectories>.;windows;../../includes;../../../../libs/MALLOC/includes;../../../localization/includes;../../../../libs/intl;../../../console/includes/;../../../windows_tools/includes;../../../windows_tools/src/c/scilab_windows;../../../core/includes;../../../completion/includes;../../../operations/includes;../../../output_stream/includes;../../../../java/jdk/include;../../../../java/jdk/include/win32;../../../history_manager/includes/;../../../action_binding/includes;../../../fileio/includes;../../../api_scilab/includes;../../../system_env/includes;../../../string/includes;../../../ui_data/includes;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+      <AdditionalIncludeDirectories>.;windows;../../includes;../../../../libs/MALLOC/includes;../../../localization/includes;../../../../libs/intl;../../../console/includes/;../../../windows_tools/includes;../../../windows_tools/src/c/scilab_windows;../../../core/includes;../../../completion/includes;../../../operations/includes;../../../output_stream/includes;../../../../java/jdk/include;../../../../java/jdk/include/win32;../../../history_manager/includes/;../../../action_binding/includes;../../../fileio/includes;../../../api_scilab/includes;../../../system_env/includes;../../../string/includes;../../../ui_data/includes;../../../types/includes;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
       <PreprocessorDefinitions>_CRT_SECURE_NO_DEPRECATE;FORDLL;NDEBUG;_WINDOWS;_USRDLL;SCISHELL_EXPORTS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
       <StringPooling>true</StringPooling>
       <RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
@@ -237,7 +237,7 @@ lib /DEF:"$(ProjectDir)ui_data_Import.def" /SUBSYSTEM:WINDOWS /MACHINE:$(Platfor
       <InlineFunctionExpansion>OnlyExplicitInline</InlineFunctionExpansion>
       <FavorSizeOrSpeed>Speed</FavorSizeOrSpeed>
       <WholeProgramOptimization>false</WholeProgramOptimization>
-      <AdditionalIncludeDirectories>.;windows;../../includes;../../../../libs/MALLOC/includes;../../../localization/includes;../../../../libs/intl;../../../console/includes/;../../../windows_tools/includes;../../../windows_tools/src/c/scilab_windows;../../../core/includes;../../../completion/includes;../../../operations/includes;../../../output_stream/includes;../../../../java/jdk/include;../../../../java/jdk/include/win32;../../../history_manager/includes/;../../../action_binding/includes;../../../fileio/includes;../../../api_scilab/includes;../../../system_env/includes;../../../string/includes;../../../ui_data/includes;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+      <AdditionalIncludeDirectories>.;windows;../../includes;../../../../libs/MALLOC/includes;../../../localization/includes;../../../../libs/intl;../../../console/includes/;../../../windows_tools/includes;../../../windows_tools/src/c/scilab_windows;../../../core/includes;../../../completion/includes;../../../operations/includes;../../../output_stream/includes;../../../../java/jdk/include;../../../../java/jdk/include/win32;../../../history_manager/includes/;../../../action_binding/includes;../../../fileio/includes;../../../api_scilab/includes;../../../system_env/includes;../../../string/includes;../../../ui_data/includes;../../../types/includes;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
       <PreprocessorDefinitions>_CRT_SECURE_NO_DEPRECATE;FORDLL;NDEBUG;_WINDOWS;_USRDLL;SCISHELL_EXPORTS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
       <StringPooling>true</StringPooling>
       <RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
index 7d2f31f..0c25e59 100644 (file)
@@ -13,9 +13,8 @@
 /*--------------------------------------------------------------------------*/
 #ifndef __GW_STRING__
 #define __GW_STRING__
-#include "api_scilab.h"
 #include "dynlib_string.h"
-#include "BOOL.h"
+#include "c_gateway_prototype.h"
 
 /*--------------------------------------------------------------------------*/
 STRING_IMPEXP int gw_string(void);
@@ -26,10 +25,10 @@ STRING_IMPEXP int gw_string(void);
 //STRING_IMPEXP int sci_NumTokens(char *fname,unsigned long fname_len);
 
 //YaSp
-STRING_IMPEXP int sci_strsplit(char *fname, int* _piKey);
-STRING_IMPEXP int sci_isdigit(char *fname, int* _piKey);
-STRING_IMPEXP int sci_isalphanum(char *fname, int* _piKey);
-STRING_IMPEXP int sci_isascii(char *fname, int* _piKey);
+STRING_IMPEXP C_GATEWAY_PROTOTYPE(sci_strsplit);
+STRING_IMPEXP C_GATEWAY_PROTOTYPE(sci_isdigit);
+STRING_IMPEXP C_GATEWAY_PROTOTYPE(sci_isalphanum);
+STRING_IMPEXP C_GATEWAY_PROTOTYPE(sci_isascii);
 
 /*--------------------------------------------------------------------------*/
 #endif /*  __GW_STRING__ */
index f1b4c78..80df0b2 100644 (file)
@@ -1,6 +1,7 @@
 /*
  *  Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
  *  Copyright (C) 2010-2010 - DIGITEO - Antoine ELIAS
+ *  Copyright (C) 2010-2011 - DIGITEO - Bruno JOFRET
  *
  *  This file must be used under the terms of the CeCILL.
  *  This source file is licensed as described in the file COPYING, which
@@ -15,9 +16,7 @@
 
 #include "dynlib_string_gw.h"
 
-#include "funcmanager.hxx"
-#include "context.hxx"
-#include "function.hxx"
+#include "cpp_gateway_prototype.hxx"
 
 class StringModule
 {
index cc88640..f445162 100644 (file)
@@ -2,11 +2,11 @@
  * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
  * Copyright (C) INRIA - Allan CORNET
  * Copyright (C) DIGITEO - Allan CORNET - 2009
- * 
+ *
  * 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    
+ * are also available at
  * http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt
  *
  */
@@ -16,6 +16,7 @@
 #include <stdio.h>
 #include "gw_string.h"
 #include "stack-c.h"
+#include "api_scilab.h"
 #include "Scierror.h"
 #include "localization.h"
 #include "BOOL.h"
@@ -61,7 +62,7 @@ int sci_isalphanum(char *fname, int* _piKey)
                        return 0;
                }
 
-               if ( (m1 != n1) && (n1 != 1) ) 
+               if ( (m1 != n1) && (n1 != 1) )
                {
                        Scierror(999,_("%s: Wrong size for input argument #%d: A string expected.\n"),fname,1);
                        return 0;
index 8be1542..e8647ef 100644 (file)
@@ -20,6 +20,7 @@
 #include "string_gw.hxx"
 #include "function.hxx"
 #include "string.hxx"
+#include "double.hxx"
 
 extern "C"
 {
index b45efe7..f73e0e7 100644 (file)
 using regular express .                                         */
 /*------------------------------------------------------------------------*/
 
+#include "string_gw.hxx"
 #include "function.hxx"
 #include "double.hxx"
 #include "string.hxx"
-#include "funcmanager.hxx"
+
 extern "C"
 {
 #include "os_strdup.h"
index 1bdc161..57228ef 100644 (file)
@@ -14,7 +14,9 @@
 #include "function.hxx"
 #include "string.hxx"
 #include "list.hxx"
-#include "funcmanager.hxx"
+#include "bool.hxx"
+#include "double.hxx"
+#include "function.hxx"
 #include "string_gw.hxx"
 
 extern "C"
@@ -34,12 +36,12 @@ types::Function::ReturnValue sci_isletter(types::typed_list &in, int _iRetCount,
     int dimsArray[2]        = {1,0};
     int dims                = 2;
        BOOL *values            = NULL;
-       
+
     if(in.size() != 1)
     {
         ScierrorW(77, _W("%ls: Wrong number of input argument(s): %d expected.\n"), L"isletter", 1);
         return types::Function::Error;
-    }    
+    }
     if(_iRetCount != 1)
     {
         ScierrorW(78, _W("%ls: Wrong number of output argument(s): %d expected.\n"), L"isletter", 1);
@@ -50,7 +52,7 @@ types::Function::ReturnValue sci_isletter(types::typed_list &in, int _iRetCount,
                ScierrorW(999,_W("%ls: Wrong type for input argument #%d: String expected.\n"),L"isletter", 1);
                return types::Function::Error;
        }
-    
+
     pString = in[0]->getAs<types::String>();
     if(pString->isScalar() == false)
     {
@@ -62,9 +64,9 @@ types::Function::ReturnValue sci_isletter(types::typed_list &in, int _iRetCount,
         out.push_back(types::Double::Empty());
         return types::Function::OK;
     }
-    
+
     values = isletterW(pString->get(0), &dimsArray[1]);
-    
+
     if(dimsArray[1] > 0)
     {
         pOutBool  = new types::Bool(dims, dimsArray);
index 94c2f3d..dc1a289 100644 (file)
@@ -29,6 +29,7 @@
 #include "function.hxx"
 #include "string.hxx"
 #include "list.hxx"
+#include "double.hxx"
 #include "funcmanager.hxx"
 #include "string_gw.hxx"
 
index a024794..ebcaa32 100644 (file)
@@ -20,6 +20,7 @@
 #include "funcmanager.hxx"
 #include "function.hxx"
 #include "string.hxx"
+#include "double.hxx"
 
 extern "C"
 {
index e7acfea..2b513f3 100644 (file)
@@ -20,6 +20,7 @@
 #include "string_gw.hxx"
 #include "function.hxx"
 #include "string.hxx"
+#include "double.hxx"
 
 extern "C"
 {
index a2cad81..333484a 100644 (file)
@@ -14,7 +14,8 @@
 #include "function.hxx"
 #include "string.hxx"
 #include "list.hxx"
-#include "funcmanager.hxx"
+#include "double.hxx"
+#include "function.hxx"
 #include "string_gw.hxx"
 
 extern "C"
@@ -36,12 +37,12 @@ types::Function::ReturnValue sci_strcmp(types::typed_list &in, int _iRetCount, t
     types::String* pString2     = NULL;
     wchar_t* pwcChar3           = NULL;
     BOOL do_stricmp             = FALSE;
-    
+
     if(in.size() < 2 || in.size() > 3)
     {
         ScierrorW(77, _W("%ls: Wrong number of input argument(s): %d to %d expected.\n"), L"strcmp", 2, 3);
         return types::Function::Error;
-    }    
+    }
     if(_iRetCount != 1)
     {
         ScierrorW(78, _W("%ls: Wrong number of output argument(s): %d expected.\n"), L"strcmp", 1);
@@ -62,33 +63,33 @@ types::Function::ReturnValue sci_strcmp(types::typed_list &in, int _iRetCount, t
     pString2 = in[1]->getAs<types::String>();
 
 
-    
+
     if(pString1->getSize() != pString2->getSize() && pString2->isScalar() == false)
     {
         ScierrorW(999,_W("%ls: Wrong size for input argument #%d.\n"),L"strcmp", 2);
         return types::Function::Error;
     }
-    
-    if(in.size() == 3)   
+
+    if(in.size() == 3)
     {
         if(in[2]->isString() == false || in[2]->getAs<types::String>()->isScalar() == false || wcslen(in[2]->getAs<types::String>()->get(0)) != 1)
            {
                    ScierrorW(999,_W("%ls: Wrong type for input argument #%d: Char expected.\n"),L"strcmp", 3);
                    return types::Function::Error;
            }
-           
+
            pwcChar3 = in[2]->getAs<types::String>()->get(0);
            if ( (pwcChar3[0] != CHAR_I) && (pwcChar3[0] != CHAR_S))
                {
                        ScierrorW(999,_W("%ls: Wrong value for input argument #%d: %s or %s expected.\n"),L"strcmp", 3,"'i' (stricmp)","'s' (strcmp)");
-                       return types::Function::Error;  
+                       return types::Function::Error;
                }
-               
+
         if (pwcChar3[0] == CHAR_I) do_stricmp = TRUE;
     }
-    
+
        int *values = stringsCompare(pString1->get(),pString1->getSize(),pString2->get(),pString2->getSize(),do_stricmp);
-       
+
        if (values)
        {
         pOutDouble  = new types::Double(pString1->getDims(), pString1->getDimsArray());
@@ -99,7 +100,7 @@ types::Function::ReturnValue sci_strcmp(types::typed_list &in, int _iRetCount, t
         ScierrorW(999,_W("%ls : No more memory.\n"),L"strcmp");
     }
 
-    
+
     out.push_back(pOutDouble);
     return types::Function::OK;
 }
index ae32476..c010383 100644 (file)
@@ -14,7 +14,8 @@
 #include "function.hxx"
 #include "string.hxx"
 #include "list.hxx"
-#include "funcmanager.hxx"
+#include "double.hxx"
+#include "function.hxx"
 #include "string_gw.hxx"
 
 extern "C"
@@ -35,7 +36,7 @@ types::Function::ReturnValue sci_strcspn(types::typed_list &in, int _iRetCount,
     {
         ScierrorW(77, _W("%ls: Wrong number of input argument(s): %d expected.\n"), L"strcspn", 2);
         return types::Function::Error;
-    }    
+    }
     if(_iRetCount != 1)
     {
         ScierrorW(78, _W("%ls: Wrong number of output argument(s): %d expected.\n"), L"strcspn", 1);
@@ -54,8 +55,8 @@ types::Function::ReturnValue sci_strcspn(types::typed_list &in, int _iRetCount,
 
     pString     = in[0]->getAs<types::String>();
     pStrSample  = in[1]->getAs<types::String>();
-    
-    
+
+
     if(pString->getSize() != pStrSample->getSize() && pStrSample->isScalar() == false)
     {
         ScierrorW(999,_W("%ls: Wrong size for input argument #%d.\n"),L"strcspn", 2);
@@ -69,10 +70,10 @@ types::Function::ReturnValue sci_strcspn(types::typed_list &in, int _iRetCount,
         {
             j=i;
         }
-    
+
         pOutDouble->set(i, (double)wcscspn(pString->get(i), pStrSample->get(j)));
     }
-    
+
     out.push_back(pOutDouble);
     return types::Function::OK;
 }
index 4b9fe22..55837cf 100644 (file)
@@ -17,6 +17,7 @@
 #include "string_gw.hxx"
 #include "function.hxx"
 #include "string.hxx"
+#include "double.hxx"
 
 extern "C"
 {
index 88f1ed3..c67d36b 100644 (file)
@@ -13,6 +13,8 @@
 #include <math.h>
 #include <sstream>
 #include "string.hxx"
+#include "double.hxx"
+#include "function.hxx"
 #include "string_gw.hxx"
 #include "tostring_common.hxx"
 
@@ -25,7 +27,7 @@ extern "C"
 
 using namespace types;
 
-static void DoubleComplexMatrix2String(wostringstream *_postr,  double _dblR, double _dblI)
+static void DoubleComplexMatrix2String(std::wostringstream *_postr,  double _dblR, double _dblI)
 {
     /*
     if R && !C -> R
@@ -41,7 +43,7 @@ static void DoubleComplexMatrix2String(wostringstream *_postr,  double _dblR, do
 
             //0
             *_postr << (_dblI < 0 ? L"-" : L"");
-            *_postr << left << 0;
+            *_postr << std::left << 0;
         }
         else
         {//imaginary part
index 00b2cd3..e39c05f 100644 (file)
@@ -1,7 +1,7 @@
 /*
 * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
 *  Copyright (C) 2010 - DIGITEO - Allan CORNET
-* 
+*
 * 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
@@ -10,6 +10,7 @@
 *
 */
 /*--------------------------------------------------------------------------*/
+#include "string_gw.hxx"
 #include "function.hxx"
 #include "context.hxx"
 #include "types.hxx"
index 2709a5b..4d42800 100644 (file)
@@ -14,6 +14,7 @@
 #include "function.hxx"
 #include "string.hxx"
 #include "list.hxx"
+#include "double.hxx"
 #include "funcmanager.hxx"
 #include "string_gw.hxx"
 
@@ -30,17 +31,17 @@ types::Function::ReturnValue sci_strncpy(types::typed_list &in, int _iRetCount,
     types::String* pString      = NULL;
     types::Double* pDouble      = NULL;
     types::String* pOutString   = NULL;
-    
+
     if(in.size() != 2)
     {
         ScierrorW(77, _W("%ls: Wrong number of input argument(s): %d expected.\n"), L"strncpy", 2);
         return types::Function::Error;
-    }    
+    }
     if(_iRetCount != 1)
     {
         ScierrorW(78, _W("%ls: Wrong number of output argument(s): %d expected.\n"), L"strncpy", 1);
         return types::Function::Error;
-    }    
+    }
        if(in[0]->isString() == false)
        {
                ScierrorW(999,_W("%ls: Wrong type for input argument #%d: Matrix of strings expected.\n"),L"strncpy", 1);
@@ -55,29 +56,29 @@ types::Function::ReturnValue sci_strncpy(types::typed_list &in, int _iRetCount,
 
     pString = in[0]->getAs<types::String>();
     pDouble = in[1]->getAs<types::Double>();
-    
+
     if(pDouble->getSize() == 0)
     {
         ScierrorW(999,_W("%ls: Wrong size for input argument #%d: Non-empty matrix expected.\n"), L"strncpy",2);
         return types::Function::Error;
     }
-    
+
     //same dimension or 2nd arg scalar
     if(pString->getSize() != pDouble->getSize() && pDouble->isScalar() == false)
     {
         ScierrorW(999,_W("%ls: Wrong size for input argument #%d.\n"),L"strncpy", 2);
         return types::Function::Error;
     }
-    
+
     pOutString  = new types::String(pString->getDims(), pString->getDimsArray());
-    
+
     int j = 0; /* Input parameter two is dimension one */
     for(int i=0 ; i < pString->getSize() ; i++)
     {
         wchar_t *wcOutput   = NULL;
                int sizeOfCopy      = 0;
-        
-        if(pDouble->isScalar() == false) 
+
+        if(pDouble->isScalar() == false)
         {
             j = i; /* Input parameter One & two have same dimension */
         }
@@ -89,7 +90,7 @@ types::Function::ReturnValue sci_strncpy(types::typed_list &in, int _iRetCount,
             {
                 iLen = 0;
             }
-            
+
             wcOutput = (wchar_t*)MALLOC(sizeof(wchar_t) * (iLen + 1));
             sizeOfCopy = iLen;
         }
@@ -99,7 +100,7 @@ types::Function::ReturnValue sci_strncpy(types::typed_list &in, int _iRetCount,
             wcOutput = (wchar_t*)MALLOC(sizeof(wchar_t) * (iLen + 1));
             sizeOfCopy = iLen;
         }
-               
+
                if(wcOutput)
                {
                        wcsncpy(wcOutput, pString->get(i), sizeOfCopy);
@@ -116,7 +117,7 @@ types::Function::ReturnValue sci_strncpy(types::typed_list &in, int _iRetCount,
                        return types::Function::Error;
                }
     }
-    
+
     out.push_back(pOutString);
     return types::Function::OK;
 }
index 6655e69..7333321 100644 (file)
@@ -14,7 +14,8 @@
 #include "function.hxx"
 #include "string.hxx"
 #include "list.hxx"
-#include "funcmanager.hxx"
+#include "double.hxx"
+#include "function.hxx"
 #include "string_gw.hxx"
 
 extern "C"
@@ -35,7 +36,7 @@ types::Function::ReturnValue sci_strspn(types::typed_list &in, int _iRetCount, t
     {
         ScierrorW(77, _W("%ls: Wrong number of input argument(s): %d expected.\n"), L"strspn", 2);
         return types::Function::Error;
-    }    
+    }
     if(_iRetCount != 1)
     {
         ScierrorW(78, _W("%ls: Wrong number of output argument(s): %d expected.\n"), L"strspn", 1);
@@ -54,8 +55,8 @@ types::Function::ReturnValue sci_strspn(types::typed_list &in, int _iRetCount, t
 
     pString     = in[0]->getAs<types::String>();
     pStrSample  = in[1]->getAs<types::String>();
-    
-    
+
+
     if(pString->getSize() != pStrSample->getSize() && pStrSample->isScalar() == false)
     {
         ScierrorW(999,_W("%ls: Wrong size for input argument #%d.\n"),L"strspn", 2);
@@ -69,10 +70,10 @@ types::Function::ReturnValue sci_strspn(types::typed_list &in, int _iRetCount, t
         {
             j=i;
         }
-    
+
         pOutDouble->set(i, (double)wcsspn( pString->get(i), pStrSample->get(j)));
     }
-    
+
     out.push_back(pOutDouble);
     return types::Function::OK;
 }
index 5e21780..33ead9b 100644 (file)
@@ -15,6 +15,7 @@
 #include "string_gw.hxx"
 #include "function.hxx"
 #include "string.hxx"
+#include "double.hxx"
 
 extern "C"
 {
index 997bb7b..fc45202 100644 (file)
@@ -14,6 +14,7 @@
 #include "function.hxx"
 #include "string.hxx"
 #include "list.hxx"
+#include "double.hxx"
 #include "funcmanager.hxx"
 #include "string_gw.hxx"
 
@@ -29,26 +30,26 @@ types::Function::ReturnValue sci_strtod(types::typed_list &in, int _iRetCount, t
 {
     types::Double* pOutDouble = NULL;
     types::String* pOutString = NULL;
-    types::String* pString = NULL;       
-     
+    types::String* pString = NULL;
+
     if(in.size() != 1)
     {
         ScierrorW(77, _W("%ls: Wrong number of input argument(s): %d expected.\n"), L"strtod", 1);
         return types::Function::Error;
-    }    
+    }
     if(_iRetCount > 2)
     {
         ScierrorW(78, _W("%ls: Wrong number of output argument(s): %d to %d expected.\n"), L"strtod", 1, 2);
         return types::Function::Error;
     }
-    
+
     pString = in[0]->getAs<types::String>();
-    
+
     if(_iRetCount == 2)
     {
         pOutDouble = new types::Double(pString->getDims(),pString->getDimsArray());
         pOutString = new types::String(pString->getDims(),pString->getDimsArray());
-        
+
         for (int i = 0 ; i < pString->getSize() ; i++)
         {
             wchar_t *stopstring = NULL;
@@ -62,7 +63,7 @@ types::Function::ReturnValue sci_strtod(types::typed_list &in, int _iRetCount, t
                 pOutString->set(i,L"");
             }
         }
-        
+
         out.push_back(pOutDouble);
         out.push_back(pOutString);
     }
@@ -75,10 +76,10 @@ types::Function::ReturnValue sci_strtod(types::typed_list &in, int _iRetCount, t
             wchar_t *stopstring = NULL;
             pOutDouble->set(i,wcstod(pString->get(i),&stopstring));
         }
-                
+
         out.push_back(pOutDouble);
     }
-    
+
     return types::Function::OK;
 }
 
index fc959b0..dc313f2 100644 (file)
@@ -14,7 +14,8 @@
 #include "function.hxx"
 #include "string.hxx"
 #include "list.hxx"
-#include "funcmanager.hxx"
+#include "double.hxx"
+#include "function.hxx"
 #include "string_gw.hxx"
 
 extern "C"
@@ -35,18 +36,18 @@ types::Function::ReturnValue sci_tokens(types::typed_list &in, int _iRetCount, t
     types::String* pCharSample  = NULL;
     wchar_t* seps               = NULL;
     int sizeSeps                = 0;
-    
+
     if(in.size() > 2 || in.size() == 0)
     {
         ScierrorW(77, _W("%ls: Wrong number of input argument(s): %d to %d expected.\n"), L"tokens", 1, 2);
         return types::Function::Error;
-    }    
+    }
     if(_iRetCount != 1)
     {
         ScierrorW(78, _W("%ls: Wrong number of output argument(s): %d expected.\n"), L"tokens", 1);
         return types::Function::Error;
     }
-    
+
 // first arg
        if(in[0]->isString() == false)
        {
@@ -67,7 +68,7 @@ types::Function::ReturnValue sci_tokens(types::typed_list &in, int _iRetCount, t
     }
 
 // second arg
-    if(in.size() == 2) 
+    if(in.size() == 2)
     {
        if(in[1]->isString() == false)
            {
@@ -75,7 +76,7 @@ types::Function::ReturnValue sci_tokens(types::typed_list &in, int _iRetCount, t
                    return types::Function::Error;
            }
         pCharSample = in[1]->getAs<types::String>();
-        
+
         if(pCharSample->getSize() == 0)
         {
             ScierrorW(999,_W("%ls: Wrong size for input argument #%d.\n"),L"tokens", 2);
@@ -107,9 +108,9 @@ types::Function::ReturnValue sci_tokens(types::typed_list &in, int _iRetCount, t
     // perfom operation
     int dimsArray[2] = {0,1};
     int dims = 2;
-    
+
     wchar_t** Output_Strings = stringTokens(pString->get(0), seps, &dimsArray[0]);
-    
+
     if(Output_Strings == NULL)
     {//return empty matrix
         out.push_back(types::Double::Empty());
@@ -119,14 +120,14 @@ types::Function::ReturnValue sci_tokens(types::typed_list &in, int _iRetCount, t
     {
         pOutString  = new types::String(dims,dimsArray);
         pOutString->set(Output_Strings);
-        
+
         for(int i = 0 ; i < dimsArray[0] ; i++)
         {
             FREE(Output_Strings[i]);
         }
         FREE(Output_Strings);
     }
-    
+
     out.push_back(pOutString);
     return types::Function::OK;
 }
index aa65a53..e609c3c 100644 (file)
@@ -11,6 +11,9 @@
  */
 
 #include "string_gw.hxx"
+#include "context.hxx"
+#include "function.hxx"
+
 extern "C"
 {
     #include "gw_string.h"
@@ -44,6 +47,6 @@ bool StringModule::Load()
     symbol::Context::getInstance()->AddFunction(types::Function::createFunction(L"strcspn", &sci_strcspn, MODULE_NAME));
     symbol::Context::getInstance()->AddFunction(types::Function::createFunction(L"strtok", &sci_strtok, MODULE_NAME));
     symbol::Context::getInstance()->AddFunction(types::Function::createFunction(L"strspn", &sci_strspn, MODULE_NAME));
-                
+
     return true;
 }
diff --git a/scilab/modules/types/includes/c_gateway_prototype.h b/scilab/modules/types/includes/c_gateway_prototype.h
new file mode 100644 (file)
index 0000000..9569db7
--- /dev/null
@@ -0,0 +1,17 @@
+/*
+ *  Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
+ *  Copyright (C) 2011-2011 - DIGITEO - Bruno JOFRET
+ *
+ *  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
+ *
+ */
+#ifndef __C_GATEWAY_PROTOTYPE_H__
+#define __C_GATEWAY_PROTOTYPE_H__
+
+#define C_GATEWAY_PROTOTYPE(__gateway__) int __gateway__(char* fname, int* _piKey)
+
+#endif /* !__C_GATEWAY_PROTOTYPE_H__ */
diff --git a/scilab/modules/types/includes/cpp_gateway_prototype.hxx b/scilab/modules/types/includes/cpp_gateway_prototype.hxx
new file mode 100644 (file)
index 0000000..2f90bde
--- /dev/null
@@ -0,0 +1,21 @@
+/*
+ *  Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
+ *  Copyright (C) 2011-2011 - DIGITEO - Bruno JOFRET
+ *
+ *  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
+ *
+ */
+
+#ifndef __CPP_GATEWAY_PROTOTYPE_HXX__
+#define __CPP_GATEWAY_PROTOTYPE_HXX__
+
+#include "types.hxx"
+#include "callable.hxx"
+
+#define CPP_GATEWAY_PROTOTYPE(__gateway__) extern "C" types::Callable::ReturnValue (__gateway__)(types::typed_list &in, int _iRetCount, types::typed_list &out)
+
+#endif /* !__CPP_GATEWAY_PROTOTYPE_HXX__ */
index b228a3f..0e33f48 100644 (file)
@@ -26,8 +26,6 @@
 
 #define MAX_OUTPUT_VARIABLE            64
 
-#define CPP_GATEWAY_PROTOTYPE(__gateway__) types::Function::ReturnValue __gateway__(types::typed_list &in, int _iRetCount, types::typed_list &out)
-
 namespace types
 {
     class TYPES_IMPEXP Function : public Callable
index 623532d..fcac435 100644 (file)
@@ -1,6 +1,6 @@
 /*
  *  Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
- *  Copyright (C) 2010-2010 - DIGITEO - Bruno JOFRET
+ *  Copyright (C) 2010-2011 - DIGITEO - Bruno JOFRET
  *
  *  This file must be used under the terms of the CeCILL.
  *  This source file is licensed as described in the file COPYING, which
@@ -16,9 +16,7 @@
 
 #include "dynlib_types_gw.h"
 
-#include "funcmanager.hxx"
-#include "context.hxx"
-
+#include "cpp_gateway_prototype.hxx"
 
 class TypesModule
 {
index 315a294..c8fd1fb 100644 (file)
  *
  */
 
+#include "types_gw.hxx"
 #include "double.hxx"
 #include "cell.hxx"
 #include "function.hxx"
-#include "funcmanager.hxx"
 
 using namespace types;
 
index 479f599..6e0c378 100644 (file)
@@ -10,6 +10,7 @@
  *
  */
 
+#include "types_gw.hxx"
 #include "function.hxx"
 #include "struct.hxx"
 #include "double.hxx"
index a5fb168..b720853 100644 (file)
@@ -10,6 +10,7 @@
  *
  */
 
+#include "types_gw.hxx"
 #include "function.hxx"
 #include "double.hxx"
 #include "list.hxx"
index a250641..af5956e 100644 (file)
  *
  */
 
+#include "types_gw.hxx"
 #include "function.hxx"
 #include "listinsert.hxx"
 #include "listundefined.hxx"
-#include "funcmanager.hxx"
 
 using namespace types;
 
index 5ba6b9d..fba23e1 100644 (file)
@@ -10,6 +10,7 @@
  *
  */
 
+#include "types_gw.hxx"
 #include "function.hxx"
 #include "struct.hxx"
 #include "bool.hxx"
index d2cee60..ecbdb87 100644 (file)
@@ -10,9 +10,9 @@
  *
  */
 
+#include "types_gw.hxx"
 #include "list.hxx"
 #include "function.hxx"
-#include "funcmanager.hxx"
 
 using namespace types;
 
index bb6ac79..319a1ca 100644 (file)
@@ -10,6 +10,7 @@
  *
  */
 
+#include "types_gw.hxx"
 #include "double.hxx"
 #include "cell.hxx"
 #include "function.hxx"
index c2bd017..a919e34 100644 (file)
@@ -10,6 +10,7 @@
  *
  */
 
+#include "types_gw.hxx"
 #include "mlist.hxx"
 #include "function.hxx"
 #include "sci_tlist_or_mlist.hxx"
index fee9789..0e2f105 100644 (file)
@@ -10,9 +10,9 @@
  *
  */
 
+#include "types_gw.hxx"
 #include "function.hxx"
 #include "listdelete.hxx"
-#include "funcmanager.hxx"
 
 using namespace types;
 
index d024ba2..dfe8ea8 100644 (file)
  *
  */
 
+#include "types_gw.hxx"
 #include "function.hxx"
 #include "struct.hxx"
 #include "string.hxx"
 #include "cell.hxx"
-#include "funcmanager.hxx"
 
 extern "C"
 {
@@ -90,7 +90,7 @@ Function::ReturnValue sci_struct(typed_list &in, int _piRetCount, typed_list &ou
     }
 
     Struct *pOut = NULL;
-    
+
     if(piDimsRef)
     {
         pOut = new Struct(iDimsRef, piDimsRef);
@@ -103,7 +103,7 @@ Function::ReturnValue sci_struct(typed_list &in, int _piRetCount, typed_list &ou
     InternalType *pFieldValue = NULL;
     for (itInput = in.begin() ; itInput != in.end() ; itInput += 2)
     {//for each field
-        wstring wstField((*itInput)->getAs<String>()->get(0));
+        std::wstring wstField((*itInput)->getAs<String>()->get(0));
         InternalType* pData = (*(itInput + 1));
 
         //add field in struct
index f59c16f..55023dc 100644 (file)
@@ -11,8 +11,9 @@
  *
  */
 
-#include "tlist.hxx"
+#include "types_gw.hxx"
 #include "function.hxx"
+#include "tlist.hxx"
 #include "sci_tlist_or_mlist.hxx"
 
 Function::ReturnValue sci_tlist(typed_list &in, int _piRetCount, typed_list &out)
index f0e7f8c..3d71329 100644 (file)
@@ -10,6 +10,7 @@
  *
  */
 
+#include "types_gw.hxx"
 #include "types.hxx"
 #include "function.hxx"
 #include "string.hxx"
index c43e49f..2381a67 100644 (file)
@@ -10,6 +10,7 @@
  *
  */
 
+#include "types_gw.hxx"
 #include "types.hxx"
 #include "funcmanager.hxx"
 #include "user.hxx"
index 91cebf6..9a84650 100644 (file)
@@ -11,6 +11,7 @@
  */
 
 #include "types_gw.hxx"
+#include "context.hxx"
 
 #define MODULE_NAME L"types"
 bool TypesModule::Load()
index 8bf90d4..e6b1983 100644 (file)
     <ClInclude Include="..\..\..\includes\types_gw.hxx" />
   </ItemGroup>
   <ItemGroup>
-    <Library Include="..\..\..\..\..\bin\blasplus.lib" />
-    <Library Include="..\..\..\..\..\bin\lapack.lib" />
     <Library Include="..\..\..\..\..\bin\libintl.lib" />
   </ItemGroup>
   <ItemGroup>
index 3667c16..9e5ab00 100644 (file)
@@ -24,9 +24,6 @@
     <ClCompile Include="..\sci_fieldnames.cpp">
       <Filter>Source Files</Filter>
     </ClCompile>
-    <ClCompile Include="..\sci_getfield.cpp">
-      <Filter>Source Files</Filter>
-    </ClCompile>
     <ClCompile Include="..\sci_insert.cpp">
       <Filter>Source Files</Filter>
     </ClCompile>
@@ -60,6 +57,9 @@
     <ClCompile Include="..\types_gw.cpp">
       <Filter>Source Files</Filter>
     </ClCompile>
+    <ClCompile Include="..\sci_getfield.cpp">
+      <Filter>Source Files</Filter>
+    </ClCompile>
   </ItemGroup>
   <ItemGroup>
     <ClInclude Include="..\..\..\includes\dynlib_types_gw.h">
@@ -73,8 +73,6 @@
     </ClInclude>
   </ItemGroup>
   <ItemGroup>
-    <Library Include="..\..\..\..\..\bin\blasplus.lib" />
-    <Library Include="..\..\..\..\..\bin\lapack.lib" />
     <Library Include="..\..\..\..\..\bin\libintl.lib" />
   </ItemGroup>
 </Project>
\ No newline at end of file
index 9e15fb9..583d39d 100644 (file)
     <ClInclude Include="includes\cell.hxx" />
     <ClInclude Include="includes\colon.hxx" />
     <ClInclude Include="includes\container.hxx" />
+    <ClInclude Include="includes\cpp_gateway_prototype.hxx" />
+    <ClInclude Include="includes\c_gateway_prototype.h" />
     <ClInclude Include="includes\dollar.hxx" />
     <ClInclude Include="includes\double.hxx" />
     <ClInclude Include="includes\dynlib_types.h" />
index 8c66c0e..2fb1898 100644 (file)
     <ClInclude Include="includes\dynlib_types.h">
       <Filter>Header Files</Filter>
     </ClInclude>
+    <ClInclude Include="includes\c_gateway_prototype.h">
+      <Filter>Header Files</Filter>
+    </ClInclude>
+    <ClInclude Include="includes\cpp_gateway_prototype.hxx">
+      <Filter>Header Files</Filter>
+    </ClInclude>
   </ItemGroup>
   <ItemGroup>
     <Library Include="..\..\bin\blasplus.lib" />