Plug Scinotes within YaSp 54/1454/4
Bruno JOFRET [Tue, 27 Jul 2010 16:19:06 +0000 (18:19 +0200)]
Change-Id: I2ee045fe9c0359fffa0489645cfe7b42d8026317

16 files changed:
scilab/Scilab.sln
scilab/etc/yasp_modules.xml
scilab/modules/Makefile.am
scilab/modules/Makefile.in
scilab/modules/functions_manager/includes/module_declaration.hxx
scilab/modules/functions_manager/src/cpp/funcmanager.cpp
scilab/modules/scinotes/Makefile.am
scilab/modules/scinotes/Makefile.in
scilab/modules/scinotes/includes/gw_scinotes.h
scilab/modules/scinotes/includes/scinotes_gw.hxx [new file with mode: 0644]
scilab/modules/scinotes/macros/buildmacros.sce
scilab/modules/scinotes/sci_gateway/cpp/sci_scinotes.cpp
scilab/modules/scinotes/sci_gateway/cpp/scinotes_gw.cpp [new file with mode: 0644]
scilab/modules/scinotes/src/c/ScilabKeywords.c
scilab/modules/scinotes/src/c/scinotes.vcproj
scilab/modules/scinotes/src/noscinotes/noscinotes_gw.cpp [new file with mode: 0644]

index d25437f..2b59b38 100644 (file)
@@ -1235,6 +1235,7 @@ Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "functions_manager", "module
                {2C60033B-0DBD-4CA4-80D3-176C9BE9CE2F} = {2C60033B-0DBD-4CA4-80D3-176C9BE9CE2F}
                {E1284D3E-4B3F-446B-B541-F661A8A166A7} = {E1284D3E-4B3F-446B-B541-F661A8A166A7}
                {4FC72D4A-80EE-4B1A-8724-0201C1A35621} = {4FC72D4A-80EE-4B1A-8724-0201C1A35621}
+               {BAE68B54-2C1A-44D0-A0E9-05156A784E79} = {BAE68B54-2C1A-44D0-A0E9-05156A784E79}
                {0D3FA25B-8116-44EC-A45E-260789DAA3D9} = {0D3FA25B-8116-44EC-A45E-260789DAA3D9}
                {719EC179-3AD3-4C6B-BBD8-B44C96B1A204} = {719EC179-3AD3-4C6B-BBD8-B44C96B1A204}
                {6A84AD8C-BA18-4A3F-9C72-EC3DF0939E9E} = {6A84AD8C-BA18-4A3F-9C72-EC3DF0939E9E}
@@ -1526,6 +1527,7 @@ EndProject
 Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "scinotes", "modules\scinotes\src\c\scinotes.vcproj", "{BAE68B54-2C1A-44D0-A0E9-05156A784E79}"
        ProjectSection(ProjectDependencies) = postProject
                {ECFFEB0C-1EDA-45EE-9A10-B18143852E17} = {ECFFEB0C-1EDA-45EE-9A10-B18143852E17}
+               {2C60033B-0DBD-4CA4-80D3-176C9BE9CE2F} = {2C60033B-0DBD-4CA4-80D3-176C9BE9CE2F}
                {4FC72D4A-80EE-4B1A-8724-0201C1A35621} = {4FC72D4A-80EE-4B1A-8724-0201C1A35621}
                {53A01263-92BE-4C87-AA9A-79297F882310} = {53A01263-92BE-4C87-AA9A-79297F882310}
                {6A84AD8C-BA18-4A3F-9C72-EC3DF0939E9E} = {6A84AD8C-BA18-4A3F-9C72-EC3DF0939E9E}
@@ -1533,6 +1535,7 @@ Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "scinotes", "modules\scinote
                {43C5BAB1-1DCA-4743-A183-77E0D42FE7D0} = {43C5BAB1-1DCA-4743-A183-77E0D42FE7D0}
                {3170E4C2-1173-4264-A222-7EE8CCB3DDF7} = {3170E4C2-1173-4264-A222-7EE8CCB3DDF7}
                {A5911CD7-F8E8-440C-A23E-4843A0636F3A} = {A5911CD7-F8E8-440C-A23E-4843A0636F3A}
+               {64E090DA-DCB5-4F4D-93D7-E88DDEC9C2EF} = {64E090DA-DCB5-4F4D-93D7-E88DDEC9C2EF}
                {7CA60AEF-9AFA-4D06-AF28-613C0AA27640} = {7CA60AEF-9AFA-4D06-AF28-613C0AA27640}
        EndProjectSection
 EndProject
index 30d6373..d33aa21 100644 (file)
@@ -28,4 +28,5 @@
     <module name="time" activate="yes"/>
     <module name="overloading" activate="yes"/>
     <module name="string" activate="yes"/>
+    <module name="scinotes" activate="yes"/>
 </modules>
index 44e552b..28530b1 100644 (file)
@@ -207,12 +207,6 @@ ENGINE_LIBS =      $(top_builddir)/modules/fileio/libscifileio.la \
        $(top_builddir)/modules/system_env/libscisystem_env.la \
        $(top_builddir)/modules/functions_manager/libscifunctions_manager.la \
        $(top_builddir)/modules/functions/libscifunctions.la \
-       $(top_builddir)/modules/abstractSyntaxTree/libsciabstractSyntaxTree.la \
-       $(top_builddir)/modules/symbol/libscisymbol.la \
-       $(top_builddir)/modules/parse/libsciparse.la \
-       $(top_builddir)/modules/types/libscitypes.la \
-       $(top_builddir)/modules/system_env/libscisystem_env.la \
-       $(top_builddir)/modules/functions_manager/libscifunctions_manager.la \
        $(top_builddir)/modules/parallel/libsciparallel.la
 
 # These libraries are loaded dynamically from Scilab.
index 64cd897..89d19d8 100644 (file)
@@ -541,12 +541,6 @@ ENGINE_LIBS = $(top_builddir)/modules/fileio/libscifileio.la \
        $(top_builddir)/modules/system_env/libscisystem_env.la \
        $(top_builddir)/modules/functions_manager/libscifunctions_manager.la \
        $(top_builddir)/modules/functions/libscifunctions.la \
-       $(top_builddir)/modules/abstractSyntaxTree/libsciabstractSyntaxTree.la \
-       $(top_builddir)/modules/symbol/libscisymbol.la \
-       $(top_builddir)/modules/parse/libsciparse.la \
-       $(top_builddir)/modules/types/libscitypes.la \
-       $(top_builddir)/modules/system_env/libscisystem_env.la \
-       $(top_builddir)/modules/functions_manager/libscifunctions_manager.la \
        $(top_builddir)/modules/parallel/libsciparallel.la
 
 
index 79dcaf1..2c4ebee 100644 (file)
@@ -26,5 +26,6 @@
 #include "../../gui/includes/gui_gw.hxx"
 #include "../../time/includes/time_gw.hxx"
 #include "../../string/includes/string_gw.hxx"
+#include "../../scinotes/includes/scinotes_gw.hxx"
 
 #endif /* !__MODULE_DECLARATION_HXX__ */
index 916ac44..b39fdbc 100644 (file)
@@ -309,6 +309,7 @@ bool FuncManager::CreateModuleList(void)
        m_ModuleMap.insert(pair<wstring, GW_MOD>(L"gui", &GuiModule::Load));
        m_ModuleMap.insert(pair<wstring, GW_MOD>(L"time", &TimeModule::Load));
        m_ModuleMap.insert(pair<wstring, GW_MOD>(L"string", &StringModule::Load));
+       m_ModuleMap.insert(pair<wstring, GW_MOD>(L"scinotes", &ScinotesModule::Load));
        return true;
 }
 
index 4a35e8c..1a5d6a7 100644 (file)
@@ -46,8 +46,9 @@ endif
 
 GATEWAY_C_SOURCES = sci_gateway/c/gw_scinotes.c
 
-GATEWAY_CPP_SOURCES = sci_gateway/cpp/sci_scinotes.cpp \
-sci_gateway/cpp/sci_closeSciNotesFromScilab.cpp
+GATEWAY_CPP_SOURCES =  sci_gateway/cpp/scinotes_gw.cpp \
+                                               sci_gateway/cpp/sci_scinotes.cpp \
+                                               sci_gateway/cpp/sci_closeSciNotesFromScilab.cpp
 
 libsciscinotes_la_CFLAGS= $(JAVA_JNI_INCLUDE) \
     -I$(top_srcdir)/libs/MALLOC/includes/ \
@@ -59,7 +60,8 @@ libsciscinotes_la_CFLAGS= $(JAVA_JNI_INCLUDE) \
     -I$(top_srcdir)/modules/system_env/includes \
     -I$(top_srcdir)/modules/core/includes \
     -I$(top_srcdir)/modules/operations/includes \
-    -I$(top_srcdir)/modules/functions/includes
+    -I$(top_srcdir)/modules/functions/includes \
+    -I$(top_srcdir)/modules/string/includes
 
 libsciscinotes_la_CPPFLAGS = $(JAVA_JNI_INCLUDE) \
     -I$(srcdir)/includes/ \
@@ -72,20 +74,26 @@ libsciscinotes_la_CPPFLAGS = $(JAVA_JNI_INCLUDE) \
     -I$(top_srcdir)/modules/localization/includes \
     -I$(top_srcdir)/modules/operations/includes \
     -I$(top_srcdir)/modules/system_env/includes \
-    -I$(top_srcdir)/modules/api_scilab/includes
+    -I$(top_srcdir)/modules/api_scilab/includes \
+       -I$(top_srcdir)/modules/abstractSyntaxTree/includes \
+       -I$(top_srcdir)/modules/functions_manager/includes \
+       -I$(top_srcdir)/modules/types/includes \
+       -I$(top_srcdir)/modules/symbol/includes
 
-# Without the scinotes module 
+# Without the scinotes module
 libsciscinotes_disable_la_CFLAGS = -Iincludes/ \
     -I$(top_srcdir)/modules/output_stream/includes
+libsciscinotes_disable_la_CPPFLAGS = -Iincludes/
 
 SCINOTES_DISABLE_C_SOURCES = src/noscinotes/noscinotes.c
+SCINOTES_DISABLE_CPP_SOURCES = src/noscinotes/noscinotes_gw.cpp
 libsciscinotes_disable_la_LDFLAGS = -version-info $(SCILAB_LIBRARY_VERSION) $(LD_FLAGS)
-libsciscinotes_disable_la_SOURCES = $(SCINOTES_DISABLE_C_SOURCES)
+libsciscinotes_disable_la_SOURCES = $(SCINOTES_DISABLE_C_SOURCES) $(SCINOTES_DISABLE_CPP_SOURCES)
 
 pkglib_LTLIBRARIES = libsciscinotes-disable.la
 
 if GUI
-    pkglib_LTLIBRARIES += libsciscinotes.la 
+    pkglib_LTLIBRARIES += libsciscinotes.la
 endif
 
 libsciscinotes_la_LDFLAGS = -version-info $(SCILAB_LIBRARY_VERSION) $(LD_FLAGS)  $(X_LIBS) $(X_EXTRA_LIBS)
@@ -98,7 +106,7 @@ INCLUDE_FLAGS = $(libsciscinotes_la_CFLAGS)
 
 
 #### SWIG Declaration ####
-SWIG_WRAPPERS = src/jni/ScilabKeywords.i 
+SWIG_WRAPPERS = src/jni/ScilabKeywords.i
 
 if SWIG
     BUILT_SOURCES=swig
index dba2349..aa88177 100644 (file)
@@ -68,7 +68,7 @@ DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in \
 
 # With --enable-compilation-tests, launch java unitary tests
 @COMPILATION_TESTS_TRUE@am__append_2 = test
-@GUI_TRUE@am__append_3 = libsciscinotes.la 
+@GUI_TRUE@am__append_3 = libsciscinotes.la
 subdir = modules/scinotes
 ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
 am__aclocal_m4_deps = $(top_srcdir)/m4/docbook.m4 \
@@ -119,27 +119,30 @@ am__installdirs = "$(DESTDIR)$(pkglibdir)" \
 LTLIBRARIES = $(pkglib_LTLIBRARIES)
 libsciscinotes_disable_la_LIBADD =
 am__objects_1 = libsciscinotes_disable_la-noscinotes.lo
-am_libsciscinotes_disable_la_OBJECTS = $(am__objects_1)
+am__objects_2 = libsciscinotes_disable_la-noscinotes_gw.lo
+am_libsciscinotes_disable_la_OBJECTS = $(am__objects_1) \
+       $(am__objects_2)
 libsciscinotes_disable_la_OBJECTS =  \
        $(am_libsciscinotes_disable_la_OBJECTS)
-libsciscinotes_disable_la_LINK = $(LIBTOOL) --tag=CC \
-       $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=link $(CCLD) \
-       $(libsciscinotes_disable_la_CFLAGS) $(CFLAGS) \
+libsciscinotes_disable_la_LINK = $(LIBTOOL) --tag=CXX \
+       $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=link $(CXXLD) \
+       $(AM_CXXFLAGS) $(CXXFLAGS) \
        $(libsciscinotes_disable_la_LDFLAGS) $(LDFLAGS) -o $@
 libsciscinotes_la_DEPENDENCIES =  \
        $(top_builddir)/modules/core/libscicore.la \
        $(top_builddir)/libs/MALLOC/libscimalloc.la \
        $(top_builddir)/modules/output_stream/libscioutput_stream.la
-am__objects_2 = libsciscinotes_la-ScilabKeywords.lo
-am__objects_3 = libsciscinotes_la-ScilabKeywords_wrap.lo
-am__objects_4 = libsciscinotes_la-gw_scinotes.lo
-am__objects_5 = libsciscinotes_la-sci_scinotes.lo \
+am__objects_3 = libsciscinotes_la-ScilabKeywords.lo
+am__objects_4 = libsciscinotes_la-ScilabKeywords_wrap.lo
+am__objects_5 = libsciscinotes_la-gw_scinotes.lo
+am__objects_6 = libsciscinotes_la-scinotes_gw.lo \
+       libsciscinotes_la-sci_scinotes.lo \
        libsciscinotes_la-sci_closeSciNotesFromScilab.lo
-am__objects_6 = libsciscinotes_la-SciNotes.lo \
+am__objects_7 = libsciscinotes_la-SciNotes.lo \
        libsciscinotes_la-callscinotes.lo \
        libsciscinotes_la-GiwsException.lo
-am_libsciscinotes_la_OBJECTS = $(am__objects_2) $(am__objects_3) \
-       $(am__objects_4) $(am__objects_5) $(am__objects_6)
+am_libsciscinotes_la_OBJECTS = $(am__objects_3) $(am__objects_4) \
+       $(am__objects_5) $(am__objects_6) $(am__objects_7)
 libsciscinotes_la_OBJECTS = $(am_libsciscinotes_la_OBJECTS)
 libsciscinotes_la_LINK = $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) \
        $(LIBTOOLFLAGS) --mode=link $(CXXLD) $(AM_CXXFLAGS) \
@@ -514,8 +517,9 @@ GIWS_WRAPPERS = src/jni/SciNotes.giws.xml
 @GIWS_TRUE@BUILT_SOURCES = giws
 @SWIG_TRUE@BUILT_SOURCES = swig
 GATEWAY_C_SOURCES = sci_gateway/c/gw_scinotes.c
-GATEWAY_CPP_SOURCES = sci_gateway/cpp/sci_scinotes.cpp \
-sci_gateway/cpp/sci_closeSciNotesFromScilab.cpp
+GATEWAY_CPP_SOURCES = sci_gateway/cpp/scinotes_gw.cpp \
+                                               sci_gateway/cpp/sci_scinotes.cpp \
+                                               sci_gateway/cpp/sci_closeSciNotesFromScilab.cpp
 
 libsciscinotes_la_CFLAGS = $(JAVA_JNI_INCLUDE) \
     -I$(top_srcdir)/libs/MALLOC/includes/ \
@@ -527,7 +531,8 @@ libsciscinotes_la_CFLAGS = $(JAVA_JNI_INCLUDE) \
     -I$(top_srcdir)/modules/system_env/includes \
     -I$(top_srcdir)/modules/core/includes \
     -I$(top_srcdir)/modules/operations/includes \
-    -I$(top_srcdir)/modules/functions/includes
+    -I$(top_srcdir)/modules/functions/includes \
+    -I$(top_srcdir)/modules/string/includes
 
 libsciscinotes_la_CPPFLAGS = $(JAVA_JNI_INCLUDE) \
     -I$(srcdir)/includes/ \
@@ -540,16 +545,22 @@ libsciscinotes_la_CPPFLAGS = $(JAVA_JNI_INCLUDE) \
     -I$(top_srcdir)/modules/localization/includes \
     -I$(top_srcdir)/modules/operations/includes \
     -I$(top_srcdir)/modules/system_env/includes \
-    -I$(top_srcdir)/modules/api_scilab/includes
+    -I$(top_srcdir)/modules/api_scilab/includes \
+       -I$(top_srcdir)/modules/abstractSyntaxTree/includes \
+       -I$(top_srcdir)/modules/functions_manager/includes \
+       -I$(top_srcdir)/modules/types/includes \
+       -I$(top_srcdir)/modules/symbol/includes
 
 
-# Without the scinotes module 
+# Without the scinotes module
 libsciscinotes_disable_la_CFLAGS = -Iincludes/ \
     -I$(top_srcdir)/modules/output_stream/includes
 
+libsciscinotes_disable_la_CPPFLAGS = -Iincludes/
 SCINOTES_DISABLE_C_SOURCES = src/noscinotes/noscinotes.c
+SCINOTES_DISABLE_CPP_SOURCES = src/noscinotes/noscinotes_gw.cpp
 libsciscinotes_disable_la_LDFLAGS = -version-info $(SCILAB_LIBRARY_VERSION) $(LD_FLAGS)
-libsciscinotes_disable_la_SOURCES = $(SCINOTES_DISABLE_C_SOURCES)
+libsciscinotes_disable_la_SOURCES = $(SCINOTES_DISABLE_C_SOURCES) $(SCINOTES_DISABLE_CPP_SOURCES)
 pkglib_LTLIBRARIES = libsciscinotes-disable.la $(am__append_3)
 libsciscinotes_la_LDFLAGS = -version-info $(SCILAB_LIBRARY_VERSION) $(LD_FLAGS)  $(X_LIBS) $(X_EXTRA_LIBS)
 libsciscinotes_la_SOURCES = $(SCINOTES_C_SOURCES) $(SCINOTES_JNI_SOURCES) $(GATEWAY_C_SOURCES) $(GATEWAY_CPP_SOURCES) $(SCINOTES_CPP_SOURCES)
@@ -559,7 +570,7 @@ CHECK_SRC = $(SCINOTES_C_SOURCES) $(GATEWAY_C_SOURCES)
 INCLUDE_FLAGS = $(libsciscinotes_la_CFLAGS)
 
 #### SWIG Declaration ####
-SWIG_WRAPPERS = src/jni/ScilabKeywords.i 
+SWIG_WRAPPERS = src/jni/ScilabKeywords.i
 libsciscinotes_la_LIBADD = $(top_builddir)/modules/core/libscicore.la \
     $(top_builddir)/libs/MALLOC/libscimalloc.la \
     $(top_builddir)/modules/output_stream/libscioutput_stream.la
@@ -647,6 +658,7 @@ distclean-compile:
        -rm -f *.tab.c
 
 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libsciscinotes_disable_la-noscinotes.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libsciscinotes_disable_la-noscinotes_gw.Plo@am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libsciscinotes_la-GiwsException.Plo@am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libsciscinotes_la-SciNotes.Plo@am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libsciscinotes_la-ScilabKeywords.Plo@am__quote@
@@ -655,6 +667,7 @@ distclean-compile:
 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libsciscinotes_la-gw_scinotes.Plo@am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libsciscinotes_la-sci_closeSciNotesFromScilab.Plo@am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libsciscinotes_la-sci_scinotes.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libsciscinotes_la-scinotes_gw.Plo@am__quote@
 
 .c.o:
 @am__fastdepCC_TRUE@   $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $<
@@ -678,11 +691,11 @@ distclean-compile:
 @am__fastdepCC_FALSE@  $(LTCOMPILE) -c -o $@ $<
 
 libsciscinotes_disable_la-noscinotes.lo: src/noscinotes/noscinotes.c
-@am__fastdepCC_TRUE@   $(LIBTOOL)  --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libsciscinotes_disable_la_CFLAGS) $(CFLAGS) -MT libsciscinotes_disable_la-noscinotes.lo -MD -MP -MF $(DEPDIR)/libsciscinotes_disable_la-noscinotes.Tpo -c -o libsciscinotes_disable_la-noscinotes.lo `test -f 'src/noscinotes/noscinotes.c' || echo '$(srcdir)/'`src/noscinotes/noscinotes.c
+@am__fastdepCC_TRUE@   $(LIBTOOL)  --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libsciscinotes_disable_la_CPPFLAGS) $(CPPFLAGS) $(libsciscinotes_disable_la_CFLAGS) $(CFLAGS) -MT libsciscinotes_disable_la-noscinotes.lo -MD -MP -MF $(DEPDIR)/libsciscinotes_disable_la-noscinotes.Tpo -c -o libsciscinotes_disable_la-noscinotes.lo `test -f 'src/noscinotes/noscinotes.c' || echo '$(srcdir)/'`src/noscinotes/noscinotes.c
 @am__fastdepCC_TRUE@   $(am__mv) $(DEPDIR)/libsciscinotes_disable_la-noscinotes.Tpo $(DEPDIR)/libsciscinotes_disable_la-noscinotes.Plo
 @AMDEP_TRUE@@am__fastdepCC_FALSE@      source='src/noscinotes/noscinotes.c' object='libsciscinotes_disable_la-noscinotes.lo' libtool=yes @AMDEPBACKSLASH@
 @AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@  $(LIBTOOL)  --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libsciscinotes_disable_la_CFLAGS) $(CFLAGS) -c -o libsciscinotes_disable_la-noscinotes.lo `test -f 'src/noscinotes/noscinotes.c' || echo '$(srcdir)/'`src/noscinotes/noscinotes.c
+@am__fastdepCC_FALSE@  $(LIBTOOL)  --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libsciscinotes_disable_la_CPPFLAGS) $(CPPFLAGS) $(libsciscinotes_disable_la_CFLAGS) $(CFLAGS) -c -o libsciscinotes_disable_la-noscinotes.lo `test -f 'src/noscinotes/noscinotes.c' || echo '$(srcdir)/'`src/noscinotes/noscinotes.c
 
 libsciscinotes_la-ScilabKeywords.lo: src/c/ScilabKeywords.c
 @am__fastdepCC_TRUE@   $(LIBTOOL)  --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libsciscinotes_la_CPPFLAGS) $(CPPFLAGS) $(libsciscinotes_la_CFLAGS) $(CFLAGS) -MT libsciscinotes_la-ScilabKeywords.lo -MD -MP -MF $(DEPDIR)/libsciscinotes_la-ScilabKeywords.Tpo -c -o libsciscinotes_la-ScilabKeywords.lo `test -f 'src/c/ScilabKeywords.c' || echo '$(srcdir)/'`src/c/ScilabKeywords.c
@@ -726,6 +739,20 @@ libsciscinotes_la-gw_scinotes.lo: sci_gateway/c/gw_scinotes.c
 @AMDEP_TRUE@@am__fastdepCXX_FALSE@     DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
 @am__fastdepCXX_FALSE@ $(LTCXXCOMPILE) -c -o $@ $<
 
+libsciscinotes_disable_la-noscinotes_gw.lo: src/noscinotes/noscinotes_gw.cpp
+@am__fastdepCXX_TRUE@  $(LIBTOOL)  --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libsciscinotes_disable_la_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT libsciscinotes_disable_la-noscinotes_gw.lo -MD -MP -MF $(DEPDIR)/libsciscinotes_disable_la-noscinotes_gw.Tpo -c -o libsciscinotes_disable_la-noscinotes_gw.lo `test -f 'src/noscinotes/noscinotes_gw.cpp' || echo '$(srcdir)/'`src/noscinotes/noscinotes_gw.cpp
+@am__fastdepCXX_TRUE@  $(am__mv) $(DEPDIR)/libsciscinotes_disable_la-noscinotes_gw.Tpo $(DEPDIR)/libsciscinotes_disable_la-noscinotes_gw.Plo
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@     source='src/noscinotes/noscinotes_gw.cpp' object='libsciscinotes_disable_la-noscinotes_gw.lo' libtool=yes @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@     DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCXX_FALSE@ $(LIBTOOL)  --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libsciscinotes_disable_la_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o libsciscinotes_disable_la-noscinotes_gw.lo `test -f 'src/noscinotes/noscinotes_gw.cpp' || echo '$(srcdir)/'`src/noscinotes/noscinotes_gw.cpp
+
+libsciscinotes_la-scinotes_gw.lo: sci_gateway/cpp/scinotes_gw.cpp
+@am__fastdepCXX_TRUE@  $(LIBTOOL)  --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libsciscinotes_la_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT libsciscinotes_la-scinotes_gw.lo -MD -MP -MF $(DEPDIR)/libsciscinotes_la-scinotes_gw.Tpo -c -o libsciscinotes_la-scinotes_gw.lo `test -f 'sci_gateway/cpp/scinotes_gw.cpp' || echo '$(srcdir)/'`sci_gateway/cpp/scinotes_gw.cpp
+@am__fastdepCXX_TRUE@  $(am__mv) $(DEPDIR)/libsciscinotes_la-scinotes_gw.Tpo $(DEPDIR)/libsciscinotes_la-scinotes_gw.Plo
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@     source='sci_gateway/cpp/scinotes_gw.cpp' object='libsciscinotes_la-scinotes_gw.lo' libtool=yes @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@     DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCXX_FALSE@ $(LIBTOOL)  --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libsciscinotes_la_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o libsciscinotes_la-scinotes_gw.lo `test -f 'sci_gateway/cpp/scinotes_gw.cpp' || echo '$(srcdir)/'`sci_gateway/cpp/scinotes_gw.cpp
+
 libsciscinotes_la-sci_scinotes.lo: sci_gateway/cpp/sci_scinotes.cpp
 @am__fastdepCXX_TRUE@  $(LIBTOOL)  --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libsciscinotes_la_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT libsciscinotes_la-sci_scinotes.lo -MD -MP -MF $(DEPDIR)/libsciscinotes_la-sci_scinotes.Tpo -c -o libsciscinotes_la-sci_scinotes.lo `test -f 'sci_gateway/cpp/sci_scinotes.cpp' || echo '$(srcdir)/'`sci_gateway/cpp/sci_scinotes.cpp
 @am__fastdepCXX_TRUE@  $(am__mv) $(DEPDIR)/libsciscinotes_la-sci_scinotes.Tpo $(DEPDIR)/libsciscinotes_la-sci_scinotes.Plo
index b9086c7..ca5c66c 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
 *
 */
@@ -16,8 +16,8 @@
 #include "dynlib_scinotes.h"
 /*--------------------------------------------------------------------------*/
 SCINOTES_IMPEXP int gw_scinotes(void);
-SCINOTES_IMPEXP int sci_scinotes(char* fname, unsigned long l);
-SCINOTES_IMPEXP int sci_closeSciNotesFromScilab(char *fname,unsigned long fname_len);
+SCINOTES_IMPEXP int sci_scinotes(char* fname, int* _piKey);
+SCINOTES_IMPEXP int sci_closeSciNotesFromScilab(char *fname, int* _piKey);
 /*--------------------------------------------------------------------------*/
 #endif /* __GW_SCINOTES__ */
 /*--------------------------------------------------------------------------*/
diff --git a/scilab/modules/scinotes/includes/scinotes_gw.hxx b/scilab/modules/scinotes/includes/scinotes_gw.hxx
new file mode 100644 (file)
index 0000000..75cabda
--- /dev/null
@@ -0,0 +1,35 @@
+/*
+ *  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
+ *
+ */
+
+#ifndef __SCINOTES_GW_HXX__
+#define __SCINOTES_GW_HXX__
+
+#ifdef _MSC_VER
+   #if SCINOTES_GW_EXPORTS
+      #define EXTERN_SCINOTES_GW __declspec (dllexport)
+   #else
+      #define EXTERN_SCINOTES_GW __declspec (dllimport)
+   #endif
+#else
+   #define EXTERN_SCINOTES_GW
+#endif
+
+class ScinotesModule
+{
+private :
+   ScinotesModule() {};
+   ~ScinotesModule() {};
+public :
+   EXTERN_SCINOTES_GW static bool Load();
+};
+
+#endif /* !__SCINOTES_GW_HXX__ */
index aaf60f4..079e3a6 100644 (file)
@@ -8,9 +8,5 @@
 // are also available at
 // http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt
 
-if (isdef('genlib') == %f) then
-  exec(SCI+'/modules/functions/scripts/buildmacros/loadgenlib.sce');
-end
-
-genlib("scinoteslib","SCI/modules/scinotes/macros",%f,%t);
+genlib('scinoteslib','SCI/modules/scinotes/macros',%f,%t);
 
index 87b3363..1195e68 100644 (file)
@@ -27,6 +27,7 @@ extern "C"
 #include "Scierror.h"
 #include "MALLOC.h"
 #include "freeArrayOfString.h"
+#include "api_oldstack.h"
 }
 
 /*--------------------------------------------------------------------------*/
diff --git a/scilab/modules/scinotes/sci_gateway/cpp/scinotes_gw.cpp b/scilab/modules/scinotes/sci_gateway/cpp/scinotes_gw.cpp
new file mode 100644 (file)
index 0000000..24320a1
--- /dev/null
@@ -0,0 +1,28 @@
+/*
+ *  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 "scinotes_gw.hxx"
+#include "funcmanager.hxx"
+#include "context.hxx"
+
+#define MODULE_NAME L"scinotes"
+
+extern "C"
+{
+#include "gw_scinotes.h"
+}
+
+bool ScinotesModule::Load()
+{
+    symbol::Context::getInstance()->AddFunction(types::Function::createFunction(L"editor", &sci_scinotes, MODULE_NAME));
+    return true;
+}
index 2141858..851164d 100644 (file)
@@ -1,15 +1,17 @@
 /*
  * 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
  *
  */
-/*--------------------------------------------------------------------------*/  
+/*--------------------------------------------------------------------------*/
+#include <string.h>
+
 #include "getvariablesname.h"
 #include "commandwords.h"
 #include "getfunctionslist.h"
 #include "BOOL.h"
 #include "ScilabKeywords.h"
 #include "MALLOC.h"
-/*--------------------------------------------------------------------------*/ 
+#include "os_strdup.h"
+/*--------------------------------------------------------------------------*/
+
+/*
+** INFO : char** results will be given back to Java
+** they should be NULL terminated in order Java can
+**
+*/
+
 char **GetVariablesName(void)
 {
+#pragma message ("WARNING : GetVariablesName return a static list should be linked to declared variables.")
+    int i = 0;
+    char *pstStaticVarName[] = {"%i", "%pi", "%eps", "%t", "%T", "%f", "%F"};
+    char **VarsName = MALLOC(8 * sizeof(char *));
+    for (i = 0 ; i < 7 ; ++i)
+    {
+        VarsName[i] = os_strdup(pstStaticVarName[i]);
+    }
+    VarsName[7] = NULL;
+    return VarsName;
+#if 0
        int returnedArraySize = 0;
        char **VarsName = getVariablesName(&returnedArraySize, TRUE);
        /* SWIG char array must be finished by NULL */
@@ -29,10 +50,27 @@ char **GetVariablesName(void)
                VarsName[returnedArraySize] = NULL;
        }
        return VarsName;
+#endif
 }
-/*--------------------------------------------------------------------------*/ 
+/*--------------------------------------------------------------------------*/
 char **GetCommandsName(void)
 {
+    /*
+    ** This function is now useless
+    ** will be removed by master-merge
+    ** See http://codereview.scilab.org/#change,1456
+    **
+    */
+#pragma message ("WARNING : GetCommandsName is now useless and will be removed by master-merge.")
+    int i = 0;
+    char *pstStaticCommandKeywords[2] = {"if", NULL };
+    char **CommandKeywords = MALLOC(2 * sizeof(char *));
+    for (i = 0 ; i < 2 ; ++i)
+    {
+        CommandKeywords[i] = os_strdup(pstStaticCommandKeywords[i]);
+    }
+    return CommandKeywords;
+#if 0
        int returnedArraySize = 0;
        char **CommandKeywords = getcommandkeywords(&returnedArraySize);
        if (CommandKeywords)
@@ -41,10 +79,22 @@ char **GetCommandsName(void)
                CommandKeywords[returnedArraySize] = NULL;
        }
        return CommandKeywords;
+#endif
 }
-/*--------------------------------------------------------------------------*/ 
+/*--------------------------------------------------------------------------*/
 char **GetFunctionsName(void)
 {
+#pragma message ("WARNING : GetFunctionsName return a static list should be linked to declared functions.")
+    int i = 0;
+    char *pstStaticFunctionsName[] = {"disp", "size"};
+    char **FunctionsName = MALLOC(3 * sizeof(char *));
+    for (i = 0 ; i < 2 ; ++i)
+    {
+        FunctionsName[i] = os_strdup(pstStaticFunctionsName[i]);
+    }
+    FunctionsName[2] = NULL;
+    return FunctionsName;
+#if 0
        int returnedArraySize = 0;
        char **FunctionsName = GetFunctionsList(&returnedArraySize);
        if (FunctionsName)
@@ -53,10 +103,23 @@ char **GetFunctionsName(void)
                FunctionsName[returnedArraySize] = NULL;
        }
        return FunctionsName;
+#endif
 }
-/*--------------------------------------------------------------------------*/ 
+/*--------------------------------------------------------------------------*/
 char **GetMacrosName(void)
 {
+#pragma message ("WARNING : GetFunctionsName return a static list should be linked to declared macros.")
+    int i = 0;
+       char *pstStaticMacrosName[] = {"plot3d", "acosh"};
+       char **MacrosName = MALLOC(3 * sizeof(char *));
+    for (i = 0 ; i < 2 ; ++i)
+    {
+        MacrosName[i] = os_strdup(pstStaticMacrosName[i]);
+    }
+    MacrosName[2] = NULL;
+    return MacrosName;
+
+#if 0
        int returnedArraySize = 0;
        char **MacrosName = getmacroslist(&returnedArraySize);
        if (MacrosName)
@@ -65,5 +128,6 @@ char **GetMacrosName(void)
                MacrosName[returnedArraySize] = NULL;
        }
        return MacrosName;
+#endif
 }
-/*--------------------------------------------------------------------------*/ 
+/*--------------------------------------------------------------------------*/
index bc24500..861f739 100644 (file)
@@ -45,7 +45,7 @@
                                Name="VCCLCompilerTool"
                                AdditionalOptions=""
                                Optimization="0"
-                               AdditionalIncludeDirectories=".;../jni;../../../../java/jdk/include;../../../../java/jdk/include/win32;../../../../libs/intl;../../includes;../../../../libs/MALLOC/includes;../../../api_scilab/includes;../../../core/includes;../../../localization/includes;../../../jvm/includes;../../../output_stream/includes;../cpp;../../../functions/includes;../../../fileio/includes;../../../operations/includes;../../../system_env/includes"
+                               AdditionalIncludeDirectories=".;../jni;../../../../java/jdk/include;../../../../java/jdk/include/win32;../../../../libs/intl;../../includes;../../../../libs/MALLOC/includes;../../../api_scilab/includes;../../../core/includes;../../../localization/includes;../../../jvm/includes;../../../output_stream/includes;../cpp;../../../functions/includes;../../../fileio/includes;../../../operations/includes;../../../system_env/includes;../../../string/includes;../../../functions_manager/includes;../../../abstractSyntaxTree/includes;../../../types/includes;../../../symbol/includes"
                                PreprocessorDefinitions="_CRT_SECURE_NO_DEPRECATE;FORDLL;_DEBUG;_WINDOWS;_USRDLL;SCINOTES_EXPORTS"
                                MinimalRebuild="true"
                                BasicRuntimeChecks="0"
                        <Tool
                                Name="VCCLCompilerTool"
                                Optimization="0"
-                               AdditionalIncludeDirectories=".;../jni;../../../../java/jdk/include;../../../../java/jdk/include/win32;../../../../libs/intl;../../includes;../../../../libs/MALLOC/includes;../../../api_scilab/includes;../../../core/includes;../../../localization/includes;../../../jvm/includes;../../../output_stream/includes;../cpp;../../../functions/includes;../../../fileio/includes;../../../operations/includes;../../../system_env/includes"
+                               AdditionalIncludeDirectories=".;../jni;../../../../java/jdk/include;../../../../java/jdk/include/win32;../../../../libs/intl;../../includes;../../../../libs/MALLOC/includes;../../../api_scilab/includes;../../../core/includes;../../../localization/includes;../../../jvm/includes;../../../output_stream/includes;../cpp;../../../functions/includes;../../../fileio/includes;../../../operations/includes;../../../system_env/includes;../../../string/includes;../../../functions_manager/includes;../../../abstractSyntaxTree/includes;../../../types/includes;../../../symbol/includes"
                                PreprocessorDefinitions="_CRT_SECURE_NO_DEPRECATE;FORDLL;_DEBUG;_WINDOWS;_USRDLL;SCINOTES_EXPORTS"
                                MinimalRebuild="true"
                                BasicRuntimeChecks="0"
                                InlineFunctionExpansion="1"
                                FavorSizeOrSpeed="1"
                                WholeProgramOptimization="false"
-                               AdditionalIncludeDirectories=".;../jni;../../../../java/jdk/include;../../../../java/jdk/include/win32;../../../../libs/intl;../../includes;../../../../libs/MALLOC/includes;../../../api_scilab/includes;../../../core/includes;../../../localization/includes;../../../jvm/includes;../../../output_stream/includes;../cpp;../../../functions/includes;../../../fileio/includes;../../../operations/includes;../../../system_env/includes"
+                               AdditionalIncludeDirectories=".;../jni;../../../../java/jdk/include;../../../../java/jdk/include/win32;../../../../libs/intl;../../includes;../../../../libs/MALLOC/includes;../../../api_scilab/includes;../../../core/includes;../../../localization/includes;../../../jvm/includes;../../../output_stream/includes;../cpp;../../../functions/includes;../../../fileio/includes;../../../operations/includes;../../../system_env/includes;../../../string/includes;../../../functions_manager/includes;../../../abstractSyntaxTree/includes;../../../types/includes;../../../symbol/includes"
                                PreprocessorDefinitions="_CRT_SECURE_NO_DEPRECATE;FORDLL;NDEBUG;_WINDOWS;_USRDLL;SCINOTES_EXPORTS"
                                StringPooling="true"
                                RuntimeLibrary="2"
                                InlineFunctionExpansion="1"
                                FavorSizeOrSpeed="1"
                                WholeProgramOptimization="false"
-                               AdditionalIncludeDirectories=".;../jni;../../../../java/jdk/include;../../../../java/jdk/include/win32;../../../../libs/intl;../../includes;../../../../libs/MALLOC/includes;../../../api_scilab/includes;../../../core/includes;../../../localization/includes;../../../jvm/includes;../../../output_stream/includes;../cpp;../../../functions/includes;../../../fileio/includes;../../../operations/includes;../../../system_env/includes"
+                               AdditionalIncludeDirectories=".;../jni;../../../../java/jdk/include;../../../../java/jdk/include/win32;../../../../libs/intl;../../includes;../../../../libs/MALLOC/includes;../../../api_scilab/includes;../../../core/includes;../../../localization/includes;../../../jvm/includes;../../../output_stream/includes;../cpp;../../../functions/includes;../../../fileio/includes;../../../operations/includes;../../../system_env/includes;../../../string/includes;../../../functions_manager/includes;../../../abstractSyntaxTree/includes;../../../types/includes;../../../symbol/includes"
                                PreprocessorDefinitions="_CRT_SECURE_NO_DEPRECATE;FORDLL;NDEBUG;_WINDOWS;_USRDLL;SCINOTES_EXPORTS"
                                StringPooling="true"
                                RuntimeLibrary="2"
                                RelativePath="..\jni\SciNotes.cpp"
                                >
                        </File>
+                       <File
+                               RelativePath="..\..\sci_gateway\cpp\scinotes_gw.cpp"
+                               >
+                       </File>
                </Filter>
                <Filter
                        Name="Header Files"
diff --git a/scilab/modules/scinotes/src/noscinotes/noscinotes_gw.cpp b/scilab/modules/scinotes/src/noscinotes/noscinotes_gw.cpp
new file mode 100644 (file)
index 0000000..bfba334
--- /dev/null
@@ -0,0 +1,20 @@
+/*
+ *  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 "scinotes_gw.hxx"
+
+
+bool ScinotesModule::Load()
+{
+    /* Do Nothing */
+    return true;
+}