add a new api to create / get parameters list 12/312/20
Yann Collette [Mon, 3 May 2010 12:10:21 +0000 (14:10 +0200)]
Sylvestre: modules/Makefile.in was missing and modules/parameters/Makefile.in
removed

Change-Id: Idec9c961ffbf8395b295dfe42710aa449a423d26

17 files changed:
scilab/Scilab.sln
scilab/Scilab_f2c.sln
scilab/modules/Makefile.am
scilab/modules/Makefile.in
scilab/modules/parameters/.gitignore [new file with mode: 0644]
scilab/modules/parameters/LibScilab_Import.def [new file with mode: 0644]
scilab/modules/parameters/Localization_Import.def [new file with mode: 0644]
scilab/modules/parameters/Makefile.am
scilab/modules/parameters/Makefile.in
scilab/modules/parameters/Scilab_windows_Import.def [new file with mode: 0644]
scilab/modules/parameters/includes/parameters.h [new file with mode: 0644]
scilab/modules/parameters/parameters.iss
scilab/modules/parameters/parameters.vcproj [new file with mode: 0644]
scilab/modules/parameters/parameters_header.def [new file with mode: 0644]
scilab/modules/parameters/src/c/DllmainParameters.c [new file with mode: 0644]
scilab/modules/parameters/src/c/parameters.c [new file with mode: 0644]
scilab/modules/parameters/src/c/parameters.rc [new file with mode: 0644]

index d8496a5..33fc0dc 100644 (file)
@@ -1089,6 +1089,14 @@ Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "types-Ant", "modules\types\
 EndProject
 Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "rename-vc-files", "Visual-Studio-settings\rename-vc-files\rename-vc-files.vcproj", "{DD8A0506-8D31-4CF8-856A-C10ECE9C13A4}"
 EndProject
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "parameters", "modules\parameters\parameters.vcproj", "{A09E8584-0713-48A5-97BA-ACED0F3728F8}"
+       ProjectSection(ProjectDependencies) = postProject
+               {DD8A0506-8D31-4CF8-856A-C10ECE9C13A4} = {DD8A0506-8D31-4CF8-856A-C10ECE9C13A4}
+               {6A84AD8C-BA18-4A3F-9C72-EC3DF0939E9E} = {6A84AD8C-BA18-4A3F-9C72-EC3DF0939E9E}
+               {43C5BAB1-1DCA-4743-A183-77E0D42FE7D0} = {43C5BAB1-1DCA-4743-A183-77E0D42FE7D0}
+               {A5911CD7-F8E8-440C-A23E-4843A0636F3A} = {A5911CD7-F8E8-440C-A23E-4843A0636F3A}
+       EndProjectSection
+EndProject
 Global
        GlobalSection(SolutionConfigurationPlatforms) = preSolution
                Debug|Win32 = Debug|Win32
@@ -2201,6 +2209,14 @@ Global
                {DD8A0506-8D31-4CF8-856A-C10ECE9C13A4}.Release|Win32.Build.0 = Release|Win32
                {DD8A0506-8D31-4CF8-856A-C10ECE9C13A4}.Release|x64.ActiveCfg = Release|x64
                {DD8A0506-8D31-4CF8-856A-C10ECE9C13A4}.Release|x64.Build.0 = Release|x64
+               {A09E8584-0713-48A5-97BA-ACED0F3728F8}.Debug|Win32.ActiveCfg = Debug|Win32
+               {A09E8584-0713-48A5-97BA-ACED0F3728F8}.Debug|Win32.Build.0 = Debug|Win32
+               {A09E8584-0713-48A5-97BA-ACED0F3728F8}.Debug|x64.ActiveCfg = Debug|x64
+               {A09E8584-0713-48A5-97BA-ACED0F3728F8}.Debug|x64.Build.0 = Debug|x64
+               {A09E8584-0713-48A5-97BA-ACED0F3728F8}.Release|Win32.ActiveCfg = Release|Win32
+               {A09E8584-0713-48A5-97BA-ACED0F3728F8}.Release|Win32.Build.0 = Release|Win32
+               {A09E8584-0713-48A5-97BA-ACED0F3728F8}.Release|x64.ActiveCfg = Release|x64
+               {A09E8584-0713-48A5-97BA-ACED0F3728F8}.Release|x64.Build.0 = Release|x64
        EndGlobalSection
        GlobalSection(SolutionProperties) = preSolution
                HideSolutionNode = FALSE
index 1fe0ccc..5e548aa 100644 (file)
@@ -1090,6 +1090,13 @@ Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "types-Ant", "modules\types\
 EndProject
 Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "rename-vc-files", "Visual-Studio-settings\rename-vc-files\rename-vc-files.vcproj", "{DD8A0506-8D31-4CF8-856A-C10ECE9C13A4}"
 EndProject
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "parameters", "modules\parameters\parameters.vcproj", "{A09E8584-0713-48A5-97BA-ACED0F3728F8}"
+       ProjectSection(ProjectDependencies) = postProject
+               {DD8A0506-8D31-4CF8-856A-C10ECE9C13A4} = {DD8A0506-8D31-4CF8-856A-C10ECE9C13A4}
+               {43C5BAB1-1DCA-4743-A183-77E0D42FE7D0} = {43C5BAB1-1DCA-4743-A183-77E0D42FE7D0}
+               {A5911CD7-F8E8-440C-A23E-4843A0636F3A} = {A5911CD7-F8E8-440C-A23E-4843A0636F3A}
+       EndProjectSection
+EndProject
 Global
        GlobalSection(SolutionConfigurationPlatforms) = preSolution
                Debug|Win32 = Debug|Win32
@@ -2204,6 +2211,14 @@ Global
                {DD8A0506-8D31-4CF8-856A-C10ECE9C13A4}.Release|Win32.Build.0 = Release|Win32
                {DD8A0506-8D31-4CF8-856A-C10ECE9C13A4}.Release|x64.ActiveCfg = Release|x64
                {DD8A0506-8D31-4CF8-856A-C10ECE9C13A4}.Release|x64.Build.0 = Release|x64
+               {A09E8584-0713-48A5-97BA-ACED0F3728F8}.Debug|Win32.ActiveCfg = Debug|Win32
+               {A09E8584-0713-48A5-97BA-ACED0F3728F8}.Debug|Win32.Build.0 = Debug|Win32
+               {A09E8584-0713-48A5-97BA-ACED0F3728F8}.Debug|x64.ActiveCfg = Debug|x64
+               {A09E8584-0713-48A5-97BA-ACED0F3728F8}.Debug|x64.Build.0 = Debug|x64
+               {A09E8584-0713-48A5-97BA-ACED0F3728F8}.Release|Win32.ActiveCfg = Release|Win32
+               {A09E8584-0713-48A5-97BA-ACED0F3728F8}.Release|Win32.Build.0 = Release|Win32
+               {A09E8584-0713-48A5-97BA-ACED0F3728F8}.Release|x64.ActiveCfg = Release|x64
+               {A09E8584-0713-48A5-97BA-ACED0F3728F8}.Release|x64.Build.0 = Release|x64
        EndGlobalSection
        GlobalSection(SolutionProperties) = preSolution
                HideSolutionNode = FALSE
index 9647c96..dd122b8 100644 (file)
@@ -152,6 +152,7 @@ NO_GUI_LIBS += $(top_builddir)/modules/hdf5/libscihdf5-forceload-disable.la
 endif
 ENGINE_LIBS =  $(top_builddir)/modules/fileio/libscifileio.la \
        $(top_builddir)/modules/mexlib/libmex.la \
+       $(top_builddir)/modules/parameters/libsciparameters.la \
        $(top_builddir)/modules/boolean/libsciboolean.la \
        $(top_builddir)/modules/cacsd/libscicacsd.la \
        $(top_builddir)/modules/core/libscicore.la \
index 7e6f420..cd34418 100644 (file)
@@ -483,6 +483,7 @@ NO_GUI_LIBS = $(top_builddir)/modules/gui/libscigui-disable.la \
 # HDF5 is here because it needs the JVM (see bug #5481)
 ENGINE_LIBS = $(top_builddir)/modules/fileio/libscifileio.la \
        $(top_builddir)/modules/mexlib/libmex.la \
+       $(top_builddir)/modules/parameters/libsciparameters.la \
        $(top_builddir)/modules/boolean/libsciboolean.la \
        $(top_builddir)/modules/cacsd/libscicacsd.la \
        $(top_builddir)/modules/core/libscicore.la \
diff --git a/scilab/modules/parameters/.gitignore b/scilab/modules/parameters/.gitignore
new file mode 100644 (file)
index 0000000..43d6d39
--- /dev/null
@@ -0,0 +1,4 @@
+#
+#generated .def files (windows)
+#
+parameters_export.def
diff --git a/scilab/modules/parameters/LibScilab_Import.def b/scilab/modules/parameters/LibScilab_Import.def
new file mode 100644 (file)
index 0000000..58cb582
--- /dev/null
@@ -0,0 +1,9 @@
+LIBRARY    LibScilab.dll
+
+
+EXPORTS
+vstk_
+iop_
+com_
+stack_
+freeArrayOfString
diff --git a/scilab/modules/parameters/Localization_Import.def b/scilab/modules/parameters/Localization_Import.def
new file mode 100644 (file)
index 0000000..27f6e9b
--- /dev/null
@@ -0,0 +1,7 @@
+       LIBRARY    scilocalization.dll
+
+
+EXPORTS
+       to_wide_string
+       wide_string_to_UTF8
+       IsValidUTF8
\ No newline at end of file
index 3b42454..af9a7cd 100644 (file)
@@ -7,6 +7,30 @@
 # are also available at
 # http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt
 
+### SOURCES ###
+
+PARAMETERS_C_SOURCES = src/c/parameters.c
+
+libsciparameters_la_CFLAGS=-I$(srcdir)/includes/ \
+-I$(srcdir)/src/c/ \
+-I$(top_srcdir)/modules/api_scilab/includes \
+-I$(top_srcdir)/modules/core/includes \
+-I$(top_srcdir)/libs/MALLOC/includes/ \
+-I$(top_srcdir)/modules/output_stream/includes/ \
+-I$(top_srcdir)/modules/localization/includes 
+
+pkglib_LTLIBRARIES = libsciparameters.la
+
+libsciparameters_la_LDFLAGS = -version-info $(SCILAB_LIBRARY_VERSION)
+
+libsciparameters_la_SOURCES = $(PARAMETERS_C_SOURCES)
+
+# For the code check (splint)
+CHECK_SRC= $(libsciparameters_la_SOURCES)
+INCLUDE_FLAGS = $(libsciparameters_la_CFLAGS) 
+
+libsciparameters_la_LIBADD =  $(top_builddir)/modules/api_scilab/libsciapi_scilab.la
+
 #### Target ######
 modulename=parameters
 
index 4f75c15..7cf48f5 100644 (file)
@@ -24,6 +24,8 @@
 # are also available at
 # http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt
 
+### SOURCES ###
+
 # Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
 # Copyright (C) 2006-2008 - INRIA - Sylvestre LEDRU <sylvestre.ledru@inria.fr>
 # Copyright (C) 2008      - INRIA - Pierre MARECHAL <pierre.marechal@inria.fr>
@@ -40,6 +42,7 @@
 ### Target, variable, suffixes which are supposed to be usefull in every makefile.am
 ##########
 
+
 VPATH = @srcdir@
 pkgdatadir = $(datadir)/@PACKAGE@
 pkgincludedir = $(includedir)/@PACKAGE@
@@ -84,8 +87,6 @@ mkinstalldirs = $(SHELL) $(top_srcdir)/config/mkinstalldirs
 CONFIG_HEADER = $(top_builddir)/modules/core/includes/machine.h
 CONFIG_CLEAN_FILES =
 CONFIG_CLEAN_VPATH_FILES =
-SOURCES =
-DIST_SOURCES =
 am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`;
 am__vpath_adj = case $$p in \
     $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \
@@ -107,9 +108,37 @@ am__nobase_list = $(am__nobase_strip_setup); \
 am__base_list = \
   sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \
   sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g'
-am__installdirs = "$(DESTDIR)$(libparameters_la_etcdir)" \
+am__installdirs = "$(DESTDIR)$(pkglibdir)" \
+       "$(DESTDIR)$(libparameters_la_etcdir)" \
        "$(DESTDIR)$(libparameters_la_rootdir)"
+LTLIBRARIES = $(pkglib_LTLIBRARIES)
+libsciparameters_la_DEPENDENCIES =  \
+       $(top_builddir)/modules/api_scilab/libsciapi_scilab.la
+am__objects_1 = libsciparameters_la-parameters.lo
+am_libsciparameters_la_OBJECTS = $(am__objects_1)
+libsciparameters_la_OBJECTS = $(am_libsciparameters_la_OBJECTS)
+libsciparameters_la_LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) \
+       $(LIBTOOLFLAGS) --mode=link $(CCLD) \
+       $(libsciparameters_la_CFLAGS) $(CFLAGS) \
+       $(libsciparameters_la_LDFLAGS) $(LDFLAGS) -o $@
+DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir)/modules/core/includes
+depcomp = $(SHELL) $(top_srcdir)/config/depcomp
+am__depfiles_maybe = depfiles
+am__mv = mv -f
+COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \
+       $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
+LTCOMPILE = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \
+       --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \
+       $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
+CCLD = $(CC)
+LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \
+       --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) \
+       $(LDFLAGS) -o $@
+SOURCES = $(libsciparameters_la_SOURCES)
+DIST_SOURCES = $(libsciparameters_la_SOURCES)
 DATA = $(libparameters_la_etc_DATA) $(libparameters_la_root_DATA)
+ETAGS = etags
+CTAGS = ctags
 DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
 ACLOCAL = @ACLOCAL@
 ALL_LINGUAS = @ALL_LINGUAS@
@@ -351,6 +380,23 @@ target_alias = @target_alias@
 top_build_prefix = @top_build_prefix@
 top_builddir = @top_builddir@
 top_srcdir = @top_srcdir@
+PARAMETERS_C_SOURCES = src/c/parameters.c
+libsciparameters_la_CFLAGS = -I$(srcdir)/includes/ \
+-I$(srcdir)/src/c/ \
+-I$(top_srcdir)/modules/api_scilab/includes \
+-I$(top_srcdir)/modules/core/includes \
+-I$(top_srcdir)/libs/MALLOC/includes/ \
+-I$(top_srcdir)/modules/output_stream/includes/ \
+-I$(top_srcdir)/modules/localization/includes 
+
+pkglib_LTLIBRARIES = libsciparameters.la
+libsciparameters_la_LDFLAGS = -version-info $(SCILAB_LIBRARY_VERSION)
+libsciparameters_la_SOURCES = $(PARAMETERS_C_SOURCES)
+
+# For the code check (splint)
+CHECK_SRC = $(libsciparameters_la_SOURCES)
+INCLUDE_FLAGS = $(libsciparameters_la_CFLAGS) 
+libsciparameters_la_LIBADD = $(top_builddir)/modules/api_scilab/libsciapi_scilab.la
 
 #### Target ######
 modulename = parameters
@@ -428,7 +474,7 @@ HELP_CHAPTERLANG = en_US fr_FR pt_BR
 all: all-am
 
 .SUFFIXES:
-.SUFFIXES: .sci .bin
+.SUFFIXES: .sci .bin .c .lo .o .obj
 $(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(top_srcdir)/Makefile.incl.am $(am__configure_deps)
        @for dep in $?; do \
          case '$(am__configure_deps)' in \
@@ -459,6 +505,75 @@ $(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps)
 $(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps)
        cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
 $(am__aclocal_m4_deps):
+install-pkglibLTLIBRARIES: $(pkglib_LTLIBRARIES)
+       @$(NORMAL_INSTALL)
+       test -z "$(pkglibdir)" || $(MKDIR_P) "$(DESTDIR)$(pkglibdir)"
+       @list='$(pkglib_LTLIBRARIES)'; test -n "$(pkglibdir)" || list=; \
+       list2=; for p in $$list; do \
+         if test -f $$p; then \
+           list2="$$list2 $$p"; \
+         else :; fi; \
+       done; \
+       test -z "$$list2" || { \
+         echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL) $(INSTALL_STRIP_FLAG) $$list2 '$(DESTDIR)$(pkglibdir)'"; \
+         $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL) $(INSTALL_STRIP_FLAG) $$list2 "$(DESTDIR)$(pkglibdir)"; \
+       }
+
+uninstall-pkglibLTLIBRARIES:
+       @$(NORMAL_UNINSTALL)
+       @list='$(pkglib_LTLIBRARIES)'; test -n "$(pkglibdir)" || list=; \
+       for p in $$list; do \
+         $(am__strip_dir) \
+         echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f '$(DESTDIR)$(pkglibdir)/$$f'"; \
+         $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f "$(DESTDIR)$(pkglibdir)/$$f"; \
+       done
+
+clean-pkglibLTLIBRARIES:
+       -test -z "$(pkglib_LTLIBRARIES)" || rm -f $(pkglib_LTLIBRARIES)
+       @list='$(pkglib_LTLIBRARIES)'; for p in $$list; do \
+         dir="`echo $$p | sed -e 's|/[^/]*$$||'`"; \
+         test "$$dir" != "$$p" || dir=.; \
+         echo "rm -f \"$${dir}/so_locations\""; \
+         rm -f "$${dir}/so_locations"; \
+       done
+libsciparameters.la: $(libsciparameters_la_OBJECTS) $(libsciparameters_la_DEPENDENCIES) 
+       $(libsciparameters_la_LINK) -rpath $(pkglibdir) $(libsciparameters_la_OBJECTS) $(libsciparameters_la_LIBADD) $(LIBS)
+
+mostlyclean-compile:
+       -rm -f *.$(OBJEXT)
+
+distclean-compile:
+       -rm -f *.tab.c
+
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libsciparameters_la-parameters.Plo@am__quote@
+
+.c.o:
+@am__fastdepCC_TRUE@   $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $<
+@am__fastdepCC_TRUE@   $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@  $(COMPILE) -c $<
+
+.c.obj:
+@am__fastdepCC_TRUE@   $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'`
+@am__fastdepCC_TRUE@   $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@  $(COMPILE) -c `$(CYGPATH_W) '$<'`
+
+.c.lo:
+@am__fastdepCC_TRUE@   $(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $<
+@am__fastdepCC_TRUE@   $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@  $(LTCOMPILE) -c -o $@ $<
+
+libsciparameters_la-parameters.lo: src/c/parameters.c
+@am__fastdepCC_TRUE@   $(LIBTOOL)  --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libsciparameters_la_CFLAGS) $(CFLAGS) -MT libsciparameters_la-parameters.lo -MD -MP -MF $(DEPDIR)/libsciparameters_la-parameters.Tpo -c -o libsciparameters_la-parameters.lo `test -f 'src/c/parameters.c' || echo '$(srcdir)/'`src/c/parameters.c
+@am__fastdepCC_TRUE@   $(am__mv) $(DEPDIR)/libsciparameters_la-parameters.Tpo $(DEPDIR)/libsciparameters_la-parameters.Plo
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      source='src/c/parameters.c' object='libsciparameters_la-parameters.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) $(libsciparameters_la_CFLAGS) $(CFLAGS) -c -o libsciparameters_la-parameters.lo `test -f 'src/c/parameters.c' || echo '$(srcdir)/'`src/c/parameters.c
 
 mostlyclean-libtool:
        -rm -f *.lo
@@ -505,12 +620,58 @@ uninstall-libparameters_la_rootDATA:
        test -n "$$files" || exit 0; \
        echo " ( cd '$(DESTDIR)$(libparameters_la_rootdir)' && rm -f" $$files ")"; \
        cd "$(DESTDIR)$(libparameters_la_rootdir)" && rm -f $$files
+
+ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES)
+       list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
+       unique=`for i in $$list; do \
+           if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
+         done | \
+         $(AWK) '{ files[$$0] = 1; nonempty = 1; } \
+             END { if (nonempty) { for (i in files) print i; }; }'`; \
+       mkid -fID $$unique
 tags: TAGS
-TAGS:
 
+TAGS:  $(HEADERS) $(SOURCES)  $(TAGS_DEPENDENCIES) \
+               $(TAGS_FILES) $(LISP)
+       set x; \
+       here=`pwd`; \
+       list='$(SOURCES) $(HEADERS)  $(LISP) $(TAGS_FILES)'; \
+       unique=`for i in $$list; do \
+           if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
+         done | \
+         $(AWK) '{ files[$$0] = 1; nonempty = 1; } \
+             END { if (nonempty) { for (i in files) print i; }; }'`; \
+       shift; \
+       if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \
+         test -n "$$unique" || unique=$$empty_fix; \
+         if test $$# -gt 0; then \
+           $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
+             "$$@" $$unique; \
+         else \
+           $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
+             $$unique; \
+         fi; \
+       fi
 ctags: CTAGS
-CTAGS:
-
+CTAGS:  $(HEADERS) $(SOURCES)  $(TAGS_DEPENDENCIES) \
+               $(TAGS_FILES) $(LISP)
+       list='$(SOURCES) $(HEADERS)  $(LISP) $(TAGS_FILES)'; \
+       unique=`for i in $$list; do \
+           if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
+         done | \
+         $(AWK) '{ files[$$0] = 1; nonempty = 1; } \
+             END { if (nonempty) { for (i in files) print i; }; }'`; \
+       test -z "$(CTAGS_ARGS)$$unique" \
+         || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \
+            $$unique
+
+GTAGS:
+       here=`$(am__cd) $(top_builddir) && pwd` \
+         && $(am__cd) $(top_srcdir) \
+         && gtags -i $(GTAGS_ARGS) "$$here"
+
+distclean-tags:
+       -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags
 
 distdir: $(DISTFILES)
        @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
@@ -545,9 +706,9 @@ distdir: $(DISTFILES)
 check-am: all-am
        $(MAKE) $(AM_MAKEFLAGS) check-local
 check: check-am
-all-am: Makefile $(DATA) all-local
+all-am: Makefile $(LTLIBRARIES) $(DATA) all-local
 installdirs:
-       for dir in "$(DESTDIR)$(libparameters_la_etcdir)" "$(DESTDIR)$(libparameters_la_rootdir)"; do \
+       for dir in "$(DESTDIR)$(pkglibdir)" "$(DESTDIR)$(libparameters_la_etcdir)" "$(DESTDIR)$(libparameters_la_rootdir)"; do \
          test -z "$$dir" || $(MKDIR_P) "$$dir"; \
        done
 install: install-am
@@ -577,11 +738,14 @@ maintainer-clean-generic:
        @echo "it deletes files that may require special tools to rebuild."
 clean: clean-am
 
-clean-am: clean-generic clean-libtool clean-local mostlyclean-am
+clean-am: clean-generic clean-libtool clean-local \
+       clean-pkglibLTLIBRARIES mostlyclean-am
 
 distclean: distclean-am
+       -rm -rf ./$(DEPDIR)
        -rm -f Makefile
-distclean-am: clean-am distclean-generic distclean-local
+distclean-am: clean-am distclean-compile distclean-generic \
+       distclean-local distclean-tags
 
 dvi: dvi-am
 
@@ -602,7 +766,7 @@ install-dvi: install-dvi-am
 
 install-dvi-am:
 
-install-exec-am:
+install-exec-am: install-pkglibLTLIBRARIES
 
 install-html: install-html-am
 
@@ -625,12 +789,14 @@ install-ps-am:
 installcheck-am:
 
 maintainer-clean: maintainer-clean-am
+       -rm -rf ./$(DEPDIR)
        -rm -f Makefile
 maintainer-clean-am: distclean-am maintainer-clean-generic
 
 mostlyclean: mostlyclean-am
 
-mostlyclean-am: mostlyclean-generic mostlyclean-libtool
+mostlyclean-am: mostlyclean-compile mostlyclean-generic \
+       mostlyclean-libtool
 
 pdf: pdf-am
 
@@ -641,25 +807,30 @@ ps: ps-am
 ps-am:
 
 uninstall-am: uninstall-libparameters_la_etcDATA \
-       uninstall-libparameters_la_rootDATA
+       uninstall-libparameters_la_rootDATA \
+       uninstall-pkglibLTLIBRARIES
 
 .MAKE: check-am install-am install-strip
 
-.PHONY: all all-am all-local check check-am check-local clean \
-       clean-generic clean-libtool clean-local distclean \
-       distclean-generic distclean-libtool distclean-local distdir \
-       dvi dvi-am html html-am info info-am install install-am \
-       install-data install-data-am install-data-local install-dvi \
-       install-dvi-am install-exec install-exec-am install-html \
-       install-html-am install-html-local install-info \
-       install-info-am install-libparameters_la_etcDATA \
+.PHONY: CTAGS GTAGS all all-am all-local check check-am check-local \
+       clean clean-generic clean-libtool clean-local \
+       clean-pkglibLTLIBRARIES ctags distclean distclean-compile \
+       distclean-generic distclean-libtool distclean-local \
+       distclean-tags distdir dvi dvi-am html html-am info info-am \
+       install install-am install-data install-data-am \
+       install-data-local install-dvi install-dvi-am install-exec \
+       install-exec-am install-html install-html-am \
+       install-html-local install-info install-info-am \
+       install-libparameters_la_etcDATA \
        install-libparameters_la_rootDATA install-man install-pdf \
-       install-pdf-am install-ps install-ps-am install-strip \
-       installcheck installcheck-am installdirs maintainer-clean \
-       maintainer-clean-generic mostlyclean mostlyclean-generic \
-       mostlyclean-libtool pdf pdf-am ps ps-am uninstall uninstall-am \
-       uninstall-libparameters_la_etcDATA \
-       uninstall-libparameters_la_rootDATA
+       install-pdf-am install-pkglibLTLIBRARIES install-ps \
+       install-ps-am install-strip installcheck installcheck-am \
+       installdirs maintainer-clean maintainer-clean-generic \
+       mostlyclean mostlyclean-compile mostlyclean-generic \
+       mostlyclean-libtool pdf pdf-am ps ps-am tags uninstall \
+       uninstall-am uninstall-libparameters_la_etcDATA \
+       uninstall-libparameters_la_rootDATA \
+       uninstall-pkglibLTLIBRARIES
 
 
 # This target enables tests for Scilab
diff --git a/scilab/modules/parameters/Scilab_windows_Import.def b/scilab/modules/parameters/Scilab_windows_Import.def
new file mode 100644 (file)
index 0000000..af2ead7
--- /dev/null
@@ -0,0 +1,7 @@
+LIBRARY    scilab_windows.dll
+
+
+EXPORTS
+ strdup_windows
+ wstrdup_windows
\ No newline at end of file
diff --git a/scilab/modules/parameters/includes/parameters.h b/scilab/modules/parameters/includes/parameters.h
new file mode 100644 (file)
index 0000000..5c7cca7
--- /dev/null
@@ -0,0 +1,192 @@
+/*
+ * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
+ * Copyright (C) 2010 - DIGITEO - Yann COLLETTE
+ *
+ * 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 PARAMETERS_H
+#define PARAMETERS_H
+
+#include "api_scilab.h"
+
+enum type_check {
+  CHECK_NONE, 
+  CHECK_SIZE, 
+  CHECK_MIN, 
+  CHECK_MAX, 
+  CHECK_BOTH, 
+  CHECK_VALUES};
+
+/**
+ * Get a pointer to an existing plist
+ * @param[in] _iVar position on the stack
+ * @param[out] _piAddress variable address
+ * @return a SciErr structure
+ */
+SciErr initPList(void* _pvCtx, int _iVar, int ** _piAddress);
+
+/**
+ * Check that a pointer points to an existing plist
+ * @param[in] _piAddress variable address
+ * @return !0 if it's a plist 0 otherwise
+ */
+int checkPList(void* _pvCtx, int * _piAddress);
+
+/**
+ * Check that a label exists in a plist
+ * @param[in] _piAddress variable address
+ * @param[in] _pstLabel the label to be checked
+ * @return the position of the label in the plist -1 otherwise
+ */
+int hasLabelInPList(void* _pvCtx, int * _piAddress, const char * _pstLabel);
+
+/**
+ * Check that a label is partially matched in a plist
+ * @param[in] _piAddress variable address
+ * @param[in] _pstLabel the label to be checked
+ * @return the position of the label in the plist -1 otherwise
+ */
+int hasPartialLabelInPList(void* _pvCtx, int * _piAddress, const char * _pstLabel);
+
+/**
+ * Get a C int associated to a label from a plist
+ * @param[in] _piAddress variable address
+ * @param[in] _pstLabel the label to be checked
+ * @param[out] _piValue the value stored in the plist
+ * @param[out] _piFound !-1 if the label has been found -1 otherwise
+ * @param[in] _iDefaultValue the value returned in '_piValue' if the label has not been found
+ * @param[in] _iLog display information messages during type_check
+ * @param[in] check a type of checking in the value returned in '_piValue'
+ * @return a SciErr structure
+ */
+SciErr getIntInPList(void* _pvCtx, int * _piAddress, const char * _pstLabel, int * _piValue, int * _piFound, 
+                     int _iDefaultValue, int _iLog, enum type_check check, ...);
+
+/**
+ * Get a C double associated to a label from a plist
+ * @param[in] _piAddress variable address
+ * @param[in] _pstLabel the label to be checked
+ * @param[out] _pdblValue the value stored in the plist
+ * @param[out] _piFound !-1 if the label has been found -1 otherwise
+ * @param[in] _dblDefaultValue the value returned in '_pdblValue' if the label has not been found
+ * @param[in] _iLog display information messages during type_check
+ * @param[in] check a type of checking in the value returned in '_pdblValue'
+ * @return a SciErr structure
+ */
+SciErr getDoubleInPList(void* _pvCtx, int * _piAddress, const char * _pstLabel, double * _pdblValue, int * _piFound, 
+                        double _dblDefaultValue, int _iLog, enum type_check check, ...);
+
+/**
+ * Get a C string associated to a label from a plist
+ * @param[in] _piAddress variable address
+ * @param[in] _pstLabel the label to be checked
+ * @param[out] _pstValue the value stored in the plist
+ * @param[out] _piFound !-1 if the label has been found -1 otherwise
+ * @param[in] _pstDefaultValue the value returned in '_pstValue' if the label has not been found
+ * @param[in] _iLog display information messages during type_check
+ * @param[in] check a type of checking in the value returned in '_pstValue'
+ * @return a SciErr structure
+ */
+SciErr getStringInPList(void* _pvCtx, int * _piAddress, const char * _pstLabel, char ** _pstValue, int * _piFound, 
+                        const char * _pstDefaultValue, int _iLog, enum type_check check, ...);
+
+/**
+ * Get a C column vector of int associated to a label from a plist
+ * @param[in] _piAddress variable address
+ * @param[in] _pstLabel the label to be checked
+ * @param[out] _piValue the value stored in the plist
+ * @param[out] _piFound !-1 if the label has been found -1 otherwise
+ * @param[in] _iDefaultValue the value returned in '_piValue' if the label has not been found
+ * @param[in] _iDefaultSize the size of the vector of int that must be returned
+ * @param[out] _piSize the size of the vector of int that has been read
+ * @param[in] _iLog display information messages during type_check
+ * @param[in] check a type of checking in the value returned in '_piValue'
+ * @return a SciErr structure
+ */
+SciErr getColVectorOfIntInPList(void* _pvCtx, int * _piAddress, const char * _pstLabel, int * _piValue, int * _piFound, 
+                                int _iDefaultValue, int _iDefaultSize, int * _piSize, int _iLog, enum type_check check, ...);
+
+/**
+ * Get a C column vector of double associated to a label from a plist
+ * @param[in] _piAddress variable address
+ * @param[in] _pstLabel the label to be checked
+ * @param[out] _pdblValue the value stored in the plist
+ * @param[out] _piFound !-1 if the label has been found -1 otherwise
+ * @param[in] _dblDefaultValue the value returned in '_pdblValue' if the label has not been found
+ * @param[in] _iDefaultSize the size of the vector of int that must be returned
+ * @param[out] _piSize the size of the vector of int that has been read
+ * @param[in] _iLog display information messages during type_check
+ * @param[in] check a type of checking in the value returned in '_pdblValue'
+ * @return a SciErr structure
+ */
+SciErr getColVectorOfDoubleInPList(void* _pvCtx, int * _piAddress, const char * _pstLabel, double * _pdblValue, int * _piFound, 
+                                   double _dblDefaultValue, int _iDefaultSize, int * _piSize, int _iLog, enum type_check check, ...);
+
+/**
+ * Create a plist
+ * @param[in] _iVar the position on the stack of the plist
+ * @param[in] _piAddress variable address
+ * @param[in] _pstLabelNames a vector of labels for the plist
+ * @param[in] _iNbParams the number of labels
+ * @return a SciErr structure
+ */
+SciErr createPList(void* _pvCtx, int _iVar, int ** _piAddress, char ** _pstLabelNames, int _iNbParams);
+
+/**
+ * Store a C int value in a plist and associates it to the given label
+ * @param[in] _iVar the position on the stack of the plist
+ * @param[in] _piAddress variable address
+ * @param[in] _pstLabelName the label to which the value must be associated
+ * @param[in] _iValue the value to be stored in the plist
+ * @return a SciErr structure
+ */
+SciErr createIntInPList(void* _pvCtx, int _iVar, int * _piAddress, char * _pstLabelName, int _iValue);
+
+/**
+ * Store a C double value in a plist and associates it to the given label
+ * @param[in] _iVar the position on the stack of the plist
+ * @param[in] _piAddress variable address
+ * @param[in] _pstLabelName the label to which the value must be associated
+ * @param[in] _dblValue the value to be stored in the plist
+ * @return a SciErr structure
+ */
+SciErr createDoubleInPList(void* _pvCtx, int _iVar, int * _piAddress, char * _pstLabelName, double _dblValue);
+
+/**
+ * Store a C string value in a plist and associates it to the given label
+ * @param[in] _iVar the position on the stack of the plist
+ * @param[in] _piAddress variable address
+ * @param[in] _pstLabelName the label to which the value must be associated
+ * @param[in] _pstValue the value to be stored in the plist
+ * @return a SciErr structure
+ */
+SciErr createStringInPList(void* _pvCtx, int _iVar, int * _piAddress, char * _pstLabelName, char * _pstValue);
+
+/**
+ * Store a C column vector of int values in a plist and associates it to the given label
+ * @param[in] _iVar the position on the stack of the plist
+ * @param[in] _piAddress variable address
+ * @param[in] _pstLabelName the label to which the value must be associated
+ * @param[in] _iNbValues the size of the vector to be stored in the plist
+ * @param[in] _piValue the value to be stored in the plist
+ * @return a SciErr structure
+ */
+SciErr createColVectorOfIntInPList(void* _pvCtx, int _iVar, int * _piAddress, char * _pstLabelName, int _iNbValues, int * _piValue);
+
+/**
+ * Store a C column vector of double values in a plist and associates it to the given label
+ * @param[in] _iVar the position on the stack of the plist
+ * @param[in] _piAddress variable address
+ * @param[in] _pstLabelName the label to which the value must be associated
+ * @param[in] _iNbValues the size of the vector to be stored in the plist
+ * @param[in] _pdblValue the value to be stored in the plist
+ * @return a SciErr structure
+ */
+SciErr createColVectorOfDoubleInPList(void* _pvCtx, int _iVar, int * _piAddress, char * _pstLabelName, int _iNbValues, double * _pdblValue);
+
+#endif
index 2c06b47..41018ba 100644 (file)
@@ -1,7 +1,5 @@
 ; ==============================================================================
 ; Script d'installation Inno Setup pour scilab
-; Version TRUNK
-; Copyright INRIA 2008
 ; ==============================================================================
 ;
 ;-------------------------------------------------------------------------------
@@ -10,6 +8,9 @@
 ;
 #define PARAMETERS "parameters"
 ;
+Source: bin\parameters.dll; DestDir: {app}\bin; Components: {#COMPN_SCILAB}
+Source: modules\{#PARAMETERS}\includes\parameters.h; DestDir: {app}\modules\{#PARAMETERS}\includes; Components: {#COMPN_SCILAB}
+;
 Source: modules\{#PARAMETERS}\VERSION.xml; DestDir: {app}\modules\{#PARAMETERS}; Components: {#COMPN_SCILAB}
 Source: modules\{#PARAMETERS}\readme.txt; DestDir: {app}\modules\{#PARAMETERS}; Components: {#COMPN_SCILAB}
 Source: modules\{#PARAMETERS}\license.txt; DestDir: {app}\modules\{#PARAMETERS}; Components: {#COMPN_SCILAB}
diff --git a/scilab/modules/parameters/parameters.vcproj b/scilab/modules/parameters/parameters.vcproj
new file mode 100644 (file)
index 0000000..43b3e56
--- /dev/null
@@ -0,0 +1,461 @@
+<?xml version="1.0" encoding="Windows-1252"?>
+<VisualStudioProject
+       ProjectType="Visual C++"
+       Version="9,00"
+       Name="parameters"
+       ProjectGUID="{A09E8584-0713-48A5-97BA-ACED0F3728F8}"
+       RootNamespace="parameters"
+       Keyword="Win32Proj"
+       TargetFrameworkVersion="0"
+       >
+       <Platforms>
+               <Platform
+                       Name="Win32"
+               />
+               <Platform
+                       Name="x64"
+               />
+       </Platforms>
+       <ToolFiles>
+       </ToolFiles>
+       <Configurations>
+               <Configuration
+                       Name="Debug|Win32"
+                       OutputDirectory="$(SolutionDir)$(ConfigurationName)"
+                       IntermediateDirectory="$(ConfigurationName)"
+                       ConfigurationType="2"
+                       CharacterSet="2"
+                       >
+                       <Tool
+                               Name="VCPreBuildEventTool"
+                       />
+                       <Tool
+                               Name="VCCustomBuildTool"
+                       />
+                       <Tool
+                               Name="VCXMLDataGeneratorTool"
+                       />
+                       <Tool
+                               Name="VCWebServiceProxyGeneratorTool"
+                       />
+                       <Tool
+                               Name="VCMIDLTool"
+                       />
+                       <Tool
+                               Name="VCCLCompilerTool"
+                               AdditionalOptions=""
+                               Optimization="0"
+                               AdditionalIncludeDirectories="includes;src/c;../core/includes;../api_scilab/includes;../../libs/MALLOC/includes;../output_stream/includes;../localization/includes;../../libs/intl;../windows_tools/includes"
+                               PreprocessorDefinitions="FORDLL;_DEBUG;_WINDOWS;_USRDLL;PARAMETERS_EXPORTS;_CRT_SECURE_NO_DEPRECATE"
+                               MinimalRebuild="true"
+                               BasicRuntimeChecks="0"
+                               RuntimeLibrary="3"
+                               UsePrecompiledHeader="0"
+                               WarningLevel="3"
+                               Detect64BitPortabilityProblems="false"
+                               DebugInformationFormat="3"
+                       />
+                       <Tool
+                               Name="VCManagedResourceCompilerTool"
+                       />
+                       <Tool
+                               Name="VCResourceCompilerTool"
+                       />
+                       <Tool
+                               Name="VCPreLinkEventTool"
+                               Description="Make dependencies"
+                               CommandLine="lib /DEF:&quot;$(InputDir)LibScilab_Import.def&quot; /SUBSYSTEM:WINDOWS /MACHINE:X86 /OUT:&quot;$(InputDir)LibScilab.lib&quot; 1&gt;NUL 2&gt;NUL&#x0D;&#x0A;lib /DEF:&quot;$(InputDir)Localization_Import.def&quot; /SUBSYSTEM:WINDOWS /MACHINE:X86 /OUT:&quot;$(InputDir)scilocalization.lib&quot; 1&gt;NUL 2&gt;NUL&#x0D;&#x0A;lib /DEF:&quot;$(InputDir)Scilab_windows_Import.def&quot; /SUBSYSTEM:WINDOWS /MACHINE:X86 /OUT:&quot;$(InputDir)scilab_windows.lib&quot; 1&gt;NUL 2&gt;NUL&#x0D;&#x0A;cd $(IntDir) &gt;nul&#x0D;&#x0A;for %%f in (*.obj) do  ..\..\..\bin\dumpexts -o %%~nf.def -n parameters.dll %%f &gt;nul&#x0D;&#x0A;copy *.def parameterstmp.def &gt;nul&#x0D;&#x0A;copy ..\parameters_header.def+parameterstmp.def  ..\parameters_export.def &gt;nul&#x0D;&#x0A;del *.def &gt;nul&#x0D;&#x0A;cd .. &gt;nul&#x0D;&#x0A;"
+                       />
+                       <Tool
+                               Name="VCLinkerTool"
+                               AdditionalDependencies="LibScilab.lib scilocalization.lib scilab_windows.lib"
+                               OutputFile="../../bin/$(ProjectName).dll"
+                               LinkIncremental="1"
+                               ModuleDefinitionFile="parameters_export.def"
+                               GenerateDebugInformation="true"
+                               SubSystem="2"
+                               RandomizedBaseAddress="1"
+                               DataExecutionPrevention="0"
+                               ImportLibrary="../../bin/$(ProjectName).lib"
+                               TargetMachine="1"
+                               CLRUnmanagedCodeCheck="true"
+                       />
+                       <Tool
+                               Name="VCALinkTool"
+                       />
+                       <Tool
+                               Name="VCManifestTool"
+                       />
+                       <Tool
+                               Name="VCXDCMakeTool"
+                       />
+                       <Tool
+                               Name="VCBscMakeTool"
+                       />
+                       <Tool
+                               Name="VCFxCopTool"
+                       />
+                       <Tool
+                               Name="VCAppVerifierTool"
+                       />
+                       <Tool
+                               Name="VCPostBuildEventTool"
+                       />
+               </Configuration>
+               <Configuration
+                       Name="Debug|x64"
+                       OutputDirectory="$(SolutionDir)$(ConfigurationName)"
+                       IntermediateDirectory="$(ConfigurationName)"
+                       ConfigurationType="2"
+                       CharacterSet="2"
+                       >
+                       <Tool
+                               Name="VCPreBuildEventTool"
+                       />
+                       <Tool
+                               Name="VCCustomBuildTool"
+                       />
+                       <Tool
+                               Name="VCXMLDataGeneratorTool"
+                       />
+                       <Tool
+                               Name="VCWebServiceProxyGeneratorTool"
+                       />
+                       <Tool
+                               Name="VCMIDLTool"
+                               TargetEnvironment="3"
+                       />
+                       <Tool
+                               Name="VCCLCompilerTool"
+                               Optimization="0"
+                               AdditionalIncludeDirectories="includes;src/c;../core/includes;../api_scilab/includes;../../libs/MALLOC/includes;../output_stream/includes;../localization/includes;../../libs/intl;../windows_tools/includes"
+                               PreprocessorDefinitions="FORDLL;_DEBUG;_WINDOWS;_USRDLL;PARAMETERS_EXPORTS;_CRT_SECURE_NO_DEPRECATE"
+                               MinimalRebuild="true"
+                               BasicRuntimeChecks="0"
+                               RuntimeLibrary="3"
+                               UsePrecompiledHeader="0"
+                               WarningLevel="3"
+                               Detect64BitPortabilityProblems="false"
+                               DebugInformationFormat="3"
+                       />
+                       <Tool
+                               Name="VCManagedResourceCompilerTool"
+                       />
+                       <Tool
+                               Name="VCResourceCompilerTool"
+                       />
+                       <Tool
+                               Name="VCPreLinkEventTool"
+                               Description="Make dependencies"
+                               CommandLine="lib /DEF:&quot;$(InputDir)LibScilab_Import.def&quot; /SUBSYSTEM:WINDOWS /MACHINE:X64 /OUT:&quot;$(InputDir)LibScilab.lib&quot; 1&gt;NUL 2&gt;NUL&#x0D;&#x0A;lib /DEF:&quot;$(InputDir)Localization_Import.def&quot; /SUBSYSTEM:WINDOWS /MACHINE:X64 /OUT:&quot;$(InputDir)scilocalization.lib&quot; 1&gt;NUL 2&gt;NUL&#x0D;&#x0A;lib /DEF:&quot;$(InputDir)Scilab_windows_Import.def&quot; /SUBSYSTEM:WINDOWS /MACHINE:X64 /OUT:&quot;$(InputDir)scilab_windows.lib&quot; 1&gt;NUL 2&gt;NUL&#x0D;&#x0A;cd $(IntDir) &gt;nul&#x0D;&#x0A;for %%f in (*.obj) do  ..\..\..\bin\dumpexts -o %%~nf.def -n parameters.dll %%f &gt;nul&#x0D;&#x0A;copy *.def parameterstmp.def &gt;nul&#x0D;&#x0A;copy ..\parameters_header.def+parameterstmp.def  ..\parameters_export.def &gt;nul&#x0D;&#x0A;del *.def &gt;nul&#x0D;&#x0A;cd .. &gt;nul&#x0D;&#x0A;"
+                       />
+                       <Tool
+                               Name="VCLinkerTool"
+                               AdditionalDependencies="LibScilab.lib scilocalization.lib scilab_windows.lib"
+                               OutputFile="../../bin/$(ProjectName).dll"
+                               LinkIncremental="1"
+                               ModuleDefinitionFile="parameters_export.def"
+                               GenerateDebugInformation="true"
+                               SubSystem="2"
+                               RandomizedBaseAddress="1"
+                               DataExecutionPrevention="0"
+                               ImportLibrary="../../bin/$(ProjectName).lib"
+                               TargetMachine="17"
+                               CLRUnmanagedCodeCheck="true"
+                       />
+                       <Tool
+                               Name="VCALinkTool"
+                       />
+                       <Tool
+                               Name="VCManifestTool"
+                       />
+                       <Tool
+                               Name="VCXDCMakeTool"
+                       />
+                       <Tool
+                               Name="VCBscMakeTool"
+                       />
+                       <Tool
+                               Name="VCFxCopTool"
+                       />
+                       <Tool
+                               Name="VCAppVerifierTool"
+                       />
+                       <Tool
+                               Name="VCPostBuildEventTool"
+                       />
+               </Configuration>
+               <Configuration
+                       Name="Release|Win32"
+                       OutputDirectory="$(SolutionDir)$(ConfigurationName)"
+                       IntermediateDirectory="$(ConfigurationName)"
+                       ConfigurationType="2"
+                       CharacterSet="2"
+                       WholeProgramOptimization="0"
+                       >
+                       <Tool
+                               Name="VCPreBuildEventTool"
+                       />
+                       <Tool
+                               Name="VCCustomBuildTool"
+                       />
+                       <Tool
+                               Name="VCXMLDataGeneratorTool"
+                       />
+                       <Tool
+                               Name="VCWebServiceProxyGeneratorTool"
+                       />
+                       <Tool
+                               Name="VCMIDLTool"
+                       />
+                       <Tool
+                               Name="VCCLCompilerTool"
+                               AdditionalOptions=""
+                               InlineFunctionExpansion="1"
+                               FavorSizeOrSpeed="1"
+                               WholeProgramOptimization="false"
+                               AdditionalIncludeDirectories="includes;src/c;../core/includes;../api_scilab/includes;../../libs/MALLOC/includes;../output_stream/includes;../localization/includes;../../libs/intl;../windows_tools/includes"
+                               PreprocessorDefinitions="FORDLL;NDEBUG;_WINDOWS;_USRDLL;PARAMETERS_EXPORTS;_CRT_SECURE_NO_DEPRECATE"
+                               StringPooling="true"
+                               RuntimeLibrary="2"
+                               EnableFunctionLevelLinking="true"
+                               EnableEnhancedInstructionSet="0"
+                               UsePrecompiledHeader="0"
+                               WarningLevel="3"
+                               Detect64BitPortabilityProblems="false"
+                               DebugInformationFormat="0"
+                       />
+                       <Tool
+                               Name="VCManagedResourceCompilerTool"
+                       />
+                       <Tool
+                               Name="VCResourceCompilerTool"
+                       />
+                       <Tool
+                               Name="VCPreLinkEventTool"
+                               Description="Make dependencies"
+                               CommandLine="lib /DEF:&quot;$(InputDir)LibScilab_Import.def&quot; /SUBSYSTEM:WINDOWS /MACHINE:X86 /OUT:&quot;$(InputDir)LibScilab.lib&quot; 1&gt;NUL 2&gt;NUL&#x0D;&#x0A;lib /DEF:&quot;$(InputDir)Localization_Import.def&quot; /SUBSYSTEM:WINDOWS /MACHINE:X86 /OUT:&quot;$(InputDir)scilocalization.lib&quot; 1&gt;NUL 2&gt;NUL&#x0D;&#x0A;lib /DEF:&quot;$(InputDir)Scilab_windows_Import.def&quot; /SUBSYSTEM:WINDOWS /MACHINE:X86 /OUT:&quot;$(InputDir)scilab_windows.lib&quot; 1&gt;NUL 2&gt;NUL&#x0D;&#x0A;cd $(IntDir) &gt;nul&#x0D;&#x0A;for %%f in (*.obj) do  ..\..\..\bin\dumpexts -o %%~nf.def -n parameters.dll %%f &gt;nul&#x0D;&#x0A;copy *.def parameterstmp.def &gt;nul&#x0D;&#x0A;copy ..\parameters_header.def+parameterstmp.def  ..\parameters_export.def &gt;nul&#x0D;&#x0A;del *.def &gt;nul&#x0D;&#x0A;cd .. &gt;nul&#x0D;&#x0A;"
+                       />
+                       <Tool
+                               Name="VCLinkerTool"
+                               AdditionalDependencies="LibScilab.lib scilocalization.lib scilab_windows.lib"
+                               OutputFile="../../bin/$(ProjectName).dll"
+                               LinkIncremental="1"
+                               ModuleDefinitionFile="parameters_export.def"
+                               GenerateDebugInformation="false"
+                               SubSystem="2"
+                               OptimizeReferences="2"
+                               EnableCOMDATFolding="2"
+                               LinkTimeCodeGeneration="0"
+                               RandomizedBaseAddress="1"
+                               DataExecutionPrevention="0"
+                               ImportLibrary="../../bin/$(ProjectName).lib"
+                               TargetMachine="1"
+                               CLRUnmanagedCodeCheck="true"
+                       />
+                       <Tool
+                               Name="VCALinkTool"
+                       />
+                       <Tool
+                               Name="VCManifestTool"
+                       />
+                       <Tool
+                               Name="VCXDCMakeTool"
+                       />
+                       <Tool
+                               Name="VCBscMakeTool"
+                       />
+                       <Tool
+                               Name="VCFxCopTool"
+                       />
+                       <Tool
+                               Name="VCAppVerifierTool"
+                       />
+                       <Tool
+                               Name="VCPostBuildEventTool"
+                       />
+               </Configuration>
+               <Configuration
+                       Name="Release|x64"
+                       OutputDirectory="$(SolutionDir)$(ConfigurationName)"
+                       IntermediateDirectory="$(ConfigurationName)"
+                       ConfigurationType="2"
+                       CharacterSet="2"
+                       WholeProgramOptimization="0"
+                       >
+                       <Tool
+                               Name="VCPreBuildEventTool"
+                       />
+                       <Tool
+                               Name="VCCustomBuildTool"
+                       />
+                       <Tool
+                               Name="VCXMLDataGeneratorTool"
+                       />
+                       <Tool
+                               Name="VCWebServiceProxyGeneratorTool"
+                       />
+                       <Tool
+                               Name="VCMIDLTool"
+                               TargetEnvironment="3"
+                       />
+                       <Tool
+                               Name="VCCLCompilerTool"
+                               InlineFunctionExpansion="1"
+                               FavorSizeOrSpeed="1"
+                               WholeProgramOptimization="false"
+                               AdditionalIncludeDirectories="includes;src/c;../core/includes;../api_scilab/includes;../../libs/MALLOC/includes;../output_stream/includes;../localization/includes;../../libs/intl;../windows_tools/includes"
+                               PreprocessorDefinitions="FORDLL;NDEBUG;_WINDOWS;_USRDLL;PARAMETERS_EXPORTS;_CRT_SECURE_NO_DEPRECATE"
+                               StringPooling="true"
+                               RuntimeLibrary="2"
+                               EnableFunctionLevelLinking="true"
+                               EnableEnhancedInstructionSet="0"
+                               UsePrecompiledHeader="0"
+                               WarningLevel="3"
+                               Detect64BitPortabilityProblems="false"
+                               DebugInformationFormat="0"
+                       />
+                       <Tool
+                               Name="VCManagedResourceCompilerTool"
+                       />
+                       <Tool
+                               Name="VCResourceCompilerTool"
+                       />
+                       <Tool
+                               Name="VCPreLinkEventTool"
+                               Description="Make dependencies"
+                               CommandLine="lib /DEF:&quot;$(InputDir)LibScilab_Import.def&quot; /SUBSYSTEM:WINDOWS /MACHINE:X64 /OUT:&quot;$(InputDir)LibScilab.lib&quot; 1&gt;NUL 2&gt;NUL&#x0D;&#x0A;lib /DEF:&quot;$(InputDir)Localization_Import.def&quot; /SUBSYSTEM:WINDOWS /MACHINE:X64 /OUT:&quot;$(InputDir)scilocalization.lib&quot; 1&gt;NUL 2&gt;NUL&#x0D;&#x0A;lib /DEF:&quot;$(InputDir)Scilab_windows_Import.def&quot; /SUBSYSTEM:WINDOWS /MACHINE:X64 /OUT:&quot;$(InputDir)scilab_windows.lib&quot; 1&gt;NUL 2&gt;NUL&#x0D;&#x0A;cd $(IntDir) &gt;nul&#x0D;&#x0A;for %%f in (*.obj) do  ..\..\..\bin\dumpexts -o %%~nf.def -n parameters.dll %%f &gt;nul&#x0D;&#x0A;copy *.def parameterstmp.def &gt;nul&#x0D;&#x0A;copy ..\parameters_header.def+parameterstmp.def  ..\parameters_export.def &gt;nul&#x0D;&#x0A;del *.def &gt;nul&#x0D;&#x0A;cd .. &gt;nul&#x0D;&#x0A;"
+                       />
+                       <Tool
+                               Name="VCLinkerTool"
+                               AdditionalDependencies="LibScilab.lib scilocalization.lib scilab_windows.lib"
+                               OutputFile="../../bin/$(ProjectName).dll"
+                               LinkIncremental="1"
+                               ModuleDefinitionFile="parameters_export.def"
+                               GenerateDebugInformation="false"
+                               SubSystem="2"
+                               OptimizeReferences="2"
+                               EnableCOMDATFolding="2"
+                               LinkTimeCodeGeneration="0"
+                               RandomizedBaseAddress="1"
+                               DataExecutionPrevention="0"
+                               ImportLibrary="../../bin/$(ProjectName).lib"
+                               TargetMachine="17"
+                               CLRUnmanagedCodeCheck="true"
+                       />
+                       <Tool
+                               Name="VCALinkTool"
+                       />
+                       <Tool
+                               Name="VCManifestTool"
+                       />
+                       <Tool
+                               Name="VCXDCMakeTool"
+                       />
+                       <Tool
+                               Name="VCBscMakeTool"
+                       />
+                       <Tool
+                               Name="VCFxCopTool"
+                       />
+                       <Tool
+                               Name="VCAppVerifierTool"
+                       />
+                       <Tool
+                               Name="VCPostBuildEventTool"
+                       />
+               </Configuration>
+       </Configurations>
+       <References>
+       </References>
+       <Files>
+               <Filter
+                       Name="Source Files"
+                       Filter="cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx"
+                       UniqueIdentifier="{4FC737F1-C7A5-4376-A066-2A32D752A2FF}"
+                       >
+                       <File
+                               RelativePath=".\src\c\DllmainParameters.c"
+                               >
+                       </File>
+                       <File
+                               RelativePath=".\src\c\parameters.c"
+                               >
+                       </File>
+               </Filter>
+               <Filter
+                       Name="Header Files"
+                       Filter="h;hpp;hxx;hm;inl;inc;xsd"
+                       UniqueIdentifier="{93995380-89BD-4b04-88EB-625FBE52EBFB}"
+                       >
+                       <File
+                               RelativePath=".\includes\parameters.h"
+                               >
+                       </File>
+               </Filter>
+               <Filter
+                       Name="Resource Files"
+                       Filter="rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav"
+                       UniqueIdentifier="{67DA6AB6-F800-4c08-8B7A-83BB121AAD01}"
+                       >
+                       <File
+                               RelativePath=".\src\c\parameters.rc"
+                               >
+                       </File>
+               </Filter>
+               <Filter
+                       Name="localization"
+                       >
+               </Filter>
+               <Filter
+                       Name="Libraries Dependencies"
+                       >
+                       <Filter
+                               Name="Imports"
+                               >
+                               <File
+                                       RelativePath=".\LibScilab_Import.def"
+                                       >
+                               </File>
+                               <File
+                                       RelativePath=".\Localization_Import.def"
+                                       >
+                               </File>
+                               <File
+                                       RelativePath=".\Scilab_windows_Import.def"
+                                       >
+                               </File>
+                       </Filter>
+                       <Filter
+                               Name="Export"
+                               >
+                               <File
+                                       RelativePath=".\parameters_export.def"
+                                       >
+                               </File>
+                               <File
+                                       RelativePath=".\parameters_header.def"
+                                       >
+                               </File>
+                       </Filter>
+               </Filter>
+               <File
+                       RelativePath="..\..\bin\blasplus.lib"
+                       >
+               </File>
+               <File
+                       RelativePath=".\Makefile.am"
+                       >
+               </File>
+               <File
+                       RelativePath=".\parameters.iss"
+                       >
+               </File>
+               <File
+                       RelativePath=".\version.xml"
+                       >
+               </File>
+       </Files>
+       <Globals>
+       </Globals>
+</VisualStudioProject>
diff --git a/scilab/modules/parameters/parameters_header.def b/scilab/modules/parameters/parameters_header.def
new file mode 100644 (file)
index 0000000..e775fbb
--- /dev/null
@@ -0,0 +1,8 @@
+LIBRARY    parameters.dll
+
+
+
+EXPORTS
+; --------------------------------------- 
+; parameters explicit export (SEP 35)
+; --------------------------------------- 
diff --git a/scilab/modules/parameters/src/c/DllmainParameters.c b/scilab/modules/parameters/src/c/DllmainParameters.c
new file mode 100644 (file)
index 0000000..ed9f54f
--- /dev/null
@@ -0,0 +1,33 @@
+/*
+ * 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    
+ * http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt
+ *
+ */
+/*--------------------------------------------------------------------------*/ 
+#include <windows.h> 
+/*--------------------------------------------------------------------------*/ 
+#pragma comment(lib,"../../bin/libintl.lib")
+/*--------------------------------------------------------------------------*/ 
+int WINAPI DllMain (HINSTANCE hInstance , DWORD reason, PVOID pvReserved)
+{
+  switch (reason) 
+    {
+    case DLL_PROCESS_ATTACH:
+      break;
+    case DLL_PROCESS_DETACH:
+      break;
+    case DLL_THREAD_ATTACH:
+      break;
+    case DLL_THREAD_DETACH:
+      break;
+    }
+  return 1;
+}
+/*--------------------------------------------------------------------------*/ 
+
diff --git a/scilab/modules/parameters/src/c/parameters.c b/scilab/modules/parameters/src/c/parameters.c
new file mode 100644 (file)
index 0000000..be4804f
--- /dev/null
@@ -0,0 +1,1138 @@
+/*
+* Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
+* Copyright (C) 2010 - DIGITEO - Yann COLLETTE
+*
+* 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 <string.h>
+#include <stdarg.h>
+/*--------------------------------------------------------------------------*/ 
+#include "parameters.h"
+#include "stack-c.h"
+#include "MALLOC.h"
+#include "freeArrayOfString.h"
+#include "Scierror.h"
+#include "sciprint.h"
+#include "api_scilab.h"
+#include "localization.h"
+#ifdef _MSC_VER
+#include "strdup_windows.h"
+#endif
+/*--------------------------------------------------------------------------*/ 
+static int commonFindLabel(void* _pvCtx, int * _piAddress, char const * const _pstLabelToFind);
+static int commonFindLabelPartial(void* _pvCtx, int * _piAddress, char const * const _pstLabelToFind);
+/*--------------------------------------------------------------------------*/ 
+SciErr initPList(void* _pvCtx, int _iVar, int ** _piAddress)
+{
+    SciErr _SciErr; 
+    _SciErr.iErr = 0; 
+    _SciErr.iMsgCount = 0;
+    _SciErr = getVarAddressFromPosition(_pvCtx, _iVar, _piAddress);
+    return _SciErr;
+}
+/*--------------------------------------------------------------------------*/ 
+int checkPList(void* _pvCtx, int * _piAddress)
+{
+    int nb_param = 0, i = 0, var_type = 0;
+    int m_label = 0, n_label = 0;
+    int * len_label = NULL;
+    char ** label_list = NULL;
+    int result = 0;
+    SciErr _SciErr; 
+
+    _SciErr.iErr = 0; 
+    _SciErr.iMsgCount = 0;
+
+    _SciErr = getVarType(_pvCtx, _piAddress, &var_type);
+    if (var_type != sci_mlist) 
+    {
+        return 0;
+    }
+
+    _SciErr = getListItemNumber(_pvCtx, _piAddress, &nb_param);
+
+    if (nb_param != 0) 
+    {
+        _SciErr = getMatrixOfStringInList(_pvCtx, _piAddress, 1, &m_label, &n_label, NULL, NULL);
+
+        len_label = (int *)MALLOC(m_label * n_label * sizeof(int));
+        _SciErr = getMatrixOfStringInList(_pvCtx, _piAddress, 1, &m_label, &n_label, len_label, NULL);
+
+        label_list = (char **)MALLOC(m_label*n_label*sizeof(char *));
+        for(i = 0; i < n_label * m_label; i++) 
+        {
+            label_list[i] = (char *)MALLOC((len_label[i]+1)*sizeof(char));
+        }
+        _SciErr = getMatrixOfStringInList(_pvCtx, _piAddress, 1, &m_label, &n_label, len_label, label_list);
+        if (strcmp(label_list[0], "plist") != 0) 
+        {
+            if (len_label) 
+            {
+                FREE(len_label);
+                len_label = NULL;
+            }
+            freeArrayOfString(label_list, m_label * n_label);
+
+            return 0;
+        }
+
+        if (len_label) 
+        {
+            FREE(len_label);
+            len_label = NULL;
+        }
+        freeArrayOfString(label_list, m_label * n_label);
+    }
+
+    result = 1;
+
+    return result;
+}
+/*--------------------------------------------------------------------------*/ 
+int hasPartialLabelInPList(void* _pvCtx, int * _piAddress, const char * _pstLabel)
+{
+    SciErr _SciErr;
+    _SciErr.iErr = 0;
+    _SciErr.iMsgCount = 0;
+
+    return commonFindLabelPartial(_pvCtx, _piAddress, _pstLabel);
+}
+/*--------------------------------------------------------------------------*/ 
+int hasLabelInPList(void* _pvCtx, int * _piAddress, const char * _pstLabel)
+{
+    SciErr _SciErr;
+    _SciErr.iErr = 0;
+    _SciErr.iMsgCount = 0;
+
+    return commonFindLabel(_pvCtx, _piAddress, _pstLabel);
+}
+/*--------------------------------------------------------------------------*/ 
+SciErr getIntInPList(void* _pvCtx, int * _piAddress, const char * _pstLabel, int * _piValue, int * _piFound, 
+                     int _iDefaultValue, int _iLog, enum type_check _eCheck, ...)
+{
+    int pos_label = 0, i = 0;
+    int m_tmp = 0, n_tmp = 0;
+    double * tmp_dbl = NULL;
+    SciErr _SciErr; 
+
+    _SciErr.iErr = 0;
+    _SciErr.iMsgCount = 0;
+
+    pos_label = commonFindLabel(_pvCtx, _piAddress, _pstLabel);
+    *_piFound = pos_label;
+
+    if (pos_label != -1) 
+    {
+        _SciErr = getMatrixOfDoubleInList(_pvCtx, _piAddress, pos_label+1, &m_tmp, &n_tmp, &tmp_dbl);
+        if (!_SciErr.iErr) 
+        {
+            *_piValue = (int)tmp_dbl[0];
+        } else 
+        {
+            if (_iLog) 
+            {
+                sciprint(_("%s: wrong parameter type. %s expected. Return default value %d.\n"), "getIntInPList","int",_iDefaultValue);
+            }
+            *_piValue = _iDefaultValue;
+        }
+    } 
+    else 
+    {
+        if (_iLog) 
+        {
+            sciprint(_("%s: parameter not found. Return default value %d.\n"), "getIntInPList",_iDefaultValue);
+        }
+        *_piValue = _iDefaultValue;
+    }
+
+    /* Now check parameters */
+
+    if (_eCheck!=CHECK_NONE) 
+    {
+        va_list vl;
+        int nb_value_to_check = 0;
+        int value_to_check = 0;
+        int check_res = 0;
+
+        va_start(vl, _eCheck);
+
+        switch(_eCheck) 
+        {
+        case CHECK_MIN:
+            value_to_check = va_arg(vl, int);
+            va_end(vl);
+            if (value_to_check > *_piValue) 
+            {
+                if ((*_piFound!=-1)&&(_iLog)) 
+                {
+                    sciprint(_("%s: wrong min bound for parameter %s: min bound %d, value %d\n"), "getIntInPList", _pstLabel, value_to_check, *_piValue);
+                }
+                *_piValue = _iDefaultValue;
+                addErrorMessage(&_SciErr, 999, _("%s: wrong min bound for parameter %s: min bound %d, value %d\n"), "getIntInPList", _pstLabel, value_to_check, *_piValue);
+                return _SciErr;
+            }
+            break;
+        case CHECK_MAX:
+            value_to_check = va_arg(vl, int);
+            va_end(vl);
+            if (value_to_check < *_piValue) 
+            {
+                if ((*_piFound != -1) && (_iLog)) 
+                {
+                    sciprint(_("%s: wrong max bound for parameter %s: max bound %d, value %d\n"), "getIntInPList", _pstLabel, value_to_check, *_piValue);
+                }
+                *_piValue = _iDefaultValue;
+                addErrorMessage(&_SciErr, 999, _("%s: wrong max bound for parameter %s: max bound %d, value %d\n"), "getIntInPList", _pstLabel, value_to_check, *_piValue);
+                return _SciErr;
+            }
+            break;
+        case CHECK_BOTH:
+            // First value is the min bound
+            value_to_check = va_arg(vl, int);
+            if (value_to_check > *_piValue) 
+            {
+                if ((*_piFound != -1) && (_iLog)) 
+                {
+                    sciprint(_("%s: wrong min bound for parameter %s: min bound %d, value %d\n"), "getIntInPList", _pstLabel, value_to_check, *_piValue);
+                }
+                *_piValue = _iDefaultValue;
+                va_end(vl);
+                addErrorMessage(&_SciErr, 999, _("%s: wrong min bound for parameter %s: min bound %d, value %d\n"), "getIntInPList", _pstLabel, value_to_check, *_piValue);
+                return _SciErr;
+            }
+            // Second value is the max bound
+            value_to_check = va_arg(vl, int);
+            va_end(vl);
+            if (value_to_check < *_piValue) 
+            {
+                if ((*_piFound != -1) && (_iLog)) 
+                {
+                    sciprint(_("%s: wrong max bound for parameter %s: max bound %d, value %d\n"), "getIntInPList", _pstLabel, value_to_check, *_piValue);
+                }
+                *_piValue = _iDefaultValue;
+                addErrorMessage(&_SciErr, 999, _("%s: wrong max bound for parameter %s: max bound %d, value %d\n"), "getIntInPList", _pstLabel, value_to_check, *_piValue);
+                return _SciErr;
+            }
+            break;
+        case CHECK_VALUES:
+            // First parameters is int and contains the number of values to check
+            nb_value_to_check = va_arg(vl, int);
+            check_res = 0;
+            for(i = 0; i < nb_value_to_check; i++) 
+            {
+                value_to_check = va_arg(vl, int);
+                check_res = check_res || (value_to_check == *_piValue);
+            }
+
+            if (!check_res) 
+            {
+                if ((*_piFound != -1) && (_iLog)) 
+                {
+                    sciprint(_("%s: wrong value for parameter %s: value %d\n"), "getIntInPList", _pstLabel, *_piValue);
+                    sciprint(_("%s: awaited parameters: "), "getIntInPList");
+                    va_start(vl, _eCheck);
+                    nb_value_to_check = va_arg(vl, int);
+                    for(i = 0; i < nb_value_to_check; i++) 
+                    {
+                        value_to_check = va_arg(vl,int);
+                        sciprint(" %d", value_to_check);
+                    }
+                    sciprint("\n");
+                }
+
+                *_piValue = _iDefaultValue;
+
+                va_end(vl);
+                addErrorMessage(&_SciErr, 999, _("%s: wrong value for parameter %s: value %d\n"), "getIntInPList", _pstLabel, *_piValue);
+                return _SciErr;
+            }
+
+            va_end(vl);
+            break;
+        }
+    }
+    return _SciErr;
+}
+/*--------------------------------------------------------------------------*/ 
+SciErr getDoubleInPList(void* _pvCtx, int * _piAddress, const char * _pstLabel, double * _pdblValue, int * _piFound, 
+                        double _dblDefaultValue, int _iLog, enum type_check _eCheck, ...)
+{
+    int pos_label = 0, i = 0;
+    int m_tmp = 0, n_tmp = 0;
+    double * tmp_values = NULL;
+    SciErr _SciErr; 
+
+    _SciErr.iErr = 0;
+    _SciErr.iMsgCount = 0;
+
+    pos_label = commonFindLabel(_pvCtx, _piAddress, _pstLabel);
+    *_piFound = pos_label;
+
+    if (pos_label != -1) 
+    {
+        _SciErr = getMatrixOfDoubleInList(_pvCtx, _piAddress, pos_label+1, &m_tmp, &n_tmp, &tmp_values);
+        if (!_SciErr.iErr) 
+        {
+            *_pdblValue = tmp_values[0];
+        } else 
+        {
+            if (_iLog) 
+            {
+                sciprint(_("%s: wrong parameter type. %s expected. Return default value %f.\n"), "getDoubleInPList","double",_dblDefaultValue);
+            }
+            *_pdblValue = _dblDefaultValue;
+        }
+    } 
+    else 
+    {
+        if (_iLog) 
+        {
+            sciprint(_("%s: parameter not found. Return default value %f.\n"), "getDoubleInPList",_dblDefaultValue);
+        }
+        *_pdblValue = _dblDefaultValue;
+    }
+
+    /* Now check parameters */
+
+    if (_eCheck != CHECK_NONE) 
+    {
+        va_list vl;
+        int nb_value_to_check = 0;
+        double value_to_check = 0;
+        int check_res = 0;
+
+        va_start(vl, _eCheck);
+
+        switch(_eCheck) 
+        {
+        case CHECK_MIN:
+            value_to_check = va_arg(vl, double);
+            va_end(vl);
+            if (value_to_check > *_pdblValue) 
+            {
+                if ((*_piFound != -1) && (_iLog)) 
+                {
+                    sciprint(_("%s: wrong min bound for parameter %s: min bound %f, value %f\n"), "getDoubleInPList", _pstLabel, value_to_check, *_pdblValue);
+                }
+                *_pdblValue = _dblDefaultValue;
+                addErrorMessage(&_SciErr, 999, _("%s: wrong min bound for parameter %s: min bound %f, value %f\n"), "getDoubleInPList", _pstLabel, value_to_check, *_pdblValue);
+                return _SciErr;
+            }
+            break;
+        case CHECK_MAX:
+            value_to_check = va_arg(vl, double);
+            va_end(vl);
+            if (value_to_check < *_pdblValue) 
+            {
+                if ((*_piFound != -1) && (_iLog)) 
+                {
+                    sciprint(_("%s: wrong max bound for parameter %s: max bound %f, value %f\n"), "getDoubleInPList", _pstLabel, value_to_check, *_pdblValue);
+                }
+                *_pdblValue = _dblDefaultValue;
+                addErrorMessage(&_SciErr, 999, _("%s: wrong max bound for parameter %s: max bound %f, value %f\n"), "getDoubleInPList", _pstLabel, value_to_check, *_pdblValue);
+                return _SciErr;
+            }
+            break;
+        case CHECK_BOTH:
+            /* First value is the min bound */
+            value_to_check = va_arg(vl, double);
+            if (value_to_check > *_pdblValue) 
+            {
+                if ((*_piFound != -1) && (_iLog)) 
+                {
+                    sciprint(_("%s: wrong min bound for parameter %s: min bound %f, value %f\n"), "getDoubleInPList", _pstLabel, value_to_check, *_pdblValue);
+                }
+                *_pdblValue = _dblDefaultValue;
+                va_end(vl);
+                addErrorMessage(&_SciErr, 999, _("%s: wrong min bound for parameter %s: min bound %f, value %f\n"), "getDoubleInPList", _pstLabel, value_to_check, *_pdblValue);
+                return _SciErr;
+            }
+            /* Second value is the max bound */
+            value_to_check = va_arg(vl, double);
+            va_end(vl);
+            if (value_to_check < *_pdblValue) 
+            {
+                if ((*_piFound != -1) && (_iLog)) 
+                {
+                    sciprint(_("%s: wrong max bound for parameter %s: max bound %f, value %f\n"), "getDoubleInPList", _pstLabel, value_to_check, *_pdblValue);
+                }
+                *_pdblValue = _dblDefaultValue;
+                addErrorMessage(&_SciErr, 999, _("%s: wrong max bound for parameter %s: max bound %f, value %f\n"), "getDoubleInPList", _pstLabel, value_to_check, *_pdblValue);
+                return _SciErr;
+            }
+            break;
+        case CHECK_VALUES:
+            /* First parameters is int and contains the number of values to check */
+            nb_value_to_check = va_arg(vl, int);
+            check_res = 0;
+            for(i = 0; i < nb_value_to_check; i++) 
+            {
+                value_to_check = va_arg(vl, double);
+                check_res = check_res || (value_to_check == *_pdblValue);
+            }
+
+            if (!check_res) 
+            {
+                if ((*_piFound != -1) && (_iLog)) 
+                {
+                    sciprint(_("%s: wrong value for parameter %s: value %f\n"), "getDoubleInPList", _pstLabel, *_pdblValue);
+                    sciprint(_("%s: awaited parameters: "), "getDoubleInPList");
+                    va_start(vl, _eCheck);
+                    nb_value_to_check = va_arg(vl,int);
+                    for(i = 0; i < nb_value_to_check; i++) 
+                    {
+                        value_to_check = va_arg(vl, double);
+                        sciprint(" %f", value_to_check);
+                    }
+                    sciprint("\n");
+                }
+
+                *_pdblValue = _dblDefaultValue;
+
+                va_end(vl);
+                addErrorMessage(&_SciErr, 999, _("%s: wrong value for parameter %s: value %f\n"), "getDoubleInPList", _pstLabel, *_pdblValue);
+                return _SciErr;
+            }
+
+            va_end(vl);
+            break;
+        }
+    }
+
+    return _SciErr;
+}
+/*--------------------------------------------------------------------------*/ 
+SciErr getStringInPList(void* _pvCtx, int * _piAddress, const char * _pstLabel, char ** _pstValue, int * _piFound, 
+                        const char * _pstDefaultValue, int _iLog, enum type_check _eCheck, ...)
+{
+    int pos_label = 0, i = 0;
+    int m_label = 0, n_label = 0;
+    int * len_label = NULL;
+    char ** label_list = NULL;
+    SciErr _SciErr; 
+
+    _SciErr.iErr = 0; 
+    _SciErr.iMsgCount = 0;
+
+    pos_label = commonFindLabel(_pvCtx, _piAddress, _pstLabel);
+    *_piFound = pos_label;
+
+    if (pos_label != -1) 
+    {
+        _SciErr = getMatrixOfStringInList(_pvCtx, _piAddress, pos_label+1, &m_label, &n_label, NULL, NULL);
+        len_label = (int *)MALLOC(m_label * n_label * sizeof(int));
+        _SciErr = getMatrixOfStringInList(_pvCtx, _piAddress, pos_label+1, &m_label, &n_label, len_label, NULL);
+        label_list = (char **)MALLOC(m_label * n_label * sizeof(char *));
+        for(i = 0; i < n_label * m_label; i++) 
+        {
+            label_list[i] = (char *)MALLOC((len_label[i] + 1) * sizeof(char));
+        }
+        _SciErr = getMatrixOfStringInList(_pvCtx, _piAddress, pos_label+1, &m_label, &n_label, len_label, label_list);
+
+        if (!_SciErr.iErr) 
+        {
+            if (label_list[0]) 
+            {
+                *_pstValue = strdup(label_list[0]);
+            } 
+            else 
+            {
+                if (_iLog) 
+                {
+                    sciprint(_("%s: wrong parameter type. %s expected. Return default value %s.\n"), "getStringInPList","string",_pstDefaultValue);
+                }
+                *_pstValue = strdup(_pstDefaultValue);
+            }
+        }
+        else 
+        {
+            if (_iLog) 
+            {
+                sciprint(_("%s: parameter not found. Return default value %s.\n"), "getStringInPList", _pstDefaultValue);
+            }
+            *_pstValue = strdup(_pstDefaultValue);
+        }
+
+        if (len_label) 
+        {
+            FREE(len_label);
+            len_label = NULL;
+        }
+        freeArrayOfString(label_list, m_label * n_label);
+    }
+    else 
+    {
+        *_pstValue = strdup(_pstDefaultValue);
+    }
+
+    /* Now check parameters */
+
+    if (_eCheck != CHECK_NONE) 
+    {
+        va_list vl;
+        int nb_value_to_check = 0;
+        char * value_to_check = 0;
+        int check_res = 0;
+
+        va_start(vl, _eCheck);
+
+        switch(_eCheck) 
+        {
+        case CHECK_VALUES:
+            /* First parameters is int and contains the number of values to check */
+            nb_value_to_check = va_arg(vl, int);
+            check_res = 0;
+            for(i = 0; i < nb_value_to_check; i++) 
+            {
+                value_to_check = va_arg(vl, char *);
+                check_res = check_res || (strcmp(value_to_check, *_pstValue) == 0);
+            }
+
+            if (!check_res) 
+            {
+                if ((*_piFound != -1) && (_iLog)) 
+                {
+                    sciprint(_("%s: wrong value for parameter %s: value %s\n"), "getStringInPList", _pstLabel, *_pstValue);
+                    sciprint(_("%s: awaited parameters: "), "getStringInPList");
+                    va_start(vl, _eCheck);
+                    nb_value_to_check = va_arg(vl, int);
+                    for(i = 0; i < nb_value_to_check; i++) 
+                    {
+                        value_to_check = va_arg(vl, char *);
+                        sciprint(" \"%s\"", value_to_check);
+                    }
+                    sciprint("\n");
+                }
+
+                if (*_pstValue)
+                {
+                    FREE(*_pstValue);
+                    *_pstValue = NULL;
+                }
+
+                *_pstValue = strdup(_pstDefaultValue);
+
+                va_end(vl);
+                addErrorMessage(&_SciErr, 999, _("%s: wrong value for parameter %s: value %s\n"), "getStringInPList", _pstLabel, *_pstValue);
+                return _SciErr;
+            }
+
+            va_end(vl);
+            break;
+        }
+    }
+
+    return _SciErr;
+}
+/*--------------------------------------------------------------------------*/ 
+/* get vector of double / integers */
+SciErr getColVectorOfIntInPList(void* _pvCtx, int * _piAddress, const char * _pstLabel, int * _piValue, int * _piFound, 
+                                int _iDefaultValue, int _iDefaultSize, int * _piSize, int _iLog, enum type_check _eCheck, ...)
+{
+    int pos_label = 0, i = 0;
+    int m_tmp = 0, n_tmp = 0;
+    double * tmp_dbl = 0;
+    SciErr _SciErr; 
+
+    _SciErr.iErr = 0;
+    _SciErr.iMsgCount = 0;
+
+    *_piSize = -1;
+
+    pos_label = commonFindLabel(_pvCtx, _piAddress, _pstLabel);
+    *_piFound = pos_label;
+
+    if (pos_label != -1) 
+    {
+        _SciErr = getMatrixOfDoubleInList(_pvCtx, _piAddress, pos_label+1, &m_tmp, &n_tmp, &tmp_dbl);
+        if (!_SciErr.iErr) 
+        {
+            *_piSize  = m_tmp * n_tmp;
+            *_piValue = (int)tmp_dbl[0];
+        } 
+        else 
+        {
+            if (_iLog) 
+            {
+                sciprint(_("%s: wrong parameter type. %s expected. Return default value %d.\n"), "getColVectorOfIntInPList","int",_iDefaultValue);
+            }
+            *_piSize  = _iDefaultSize;
+            *_piValue = _iDefaultValue;
+        }
+    }
+    else
+    {
+        if (_iLog) 
+        {
+            sciprint(_("%s: parameter not found. Return default value %d.\n"), "getColVectorOfIntInPList",_iDefaultValue);
+        }
+        *_piSize  = _iDefaultSize;
+        *_piValue = _iDefaultValue;
+    }
+
+    /* Now check parameters */
+
+    if (_eCheck!=CHECK_NONE) 
+    {
+        va_list vl;
+        int nb_value_to_check = 0;
+        int value_to_check = 0;
+        int check_res = 0;
+
+        va_start(vl, _eCheck);
+
+        switch(_eCheck) 
+        {
+        case CHECK_SIZE:
+            value_to_check = va_arg(vl, int);
+            va_end(vl);
+            if (value_to_check != *_piSize) 
+            {
+                if ((*_piFound != -1) && (_iLog)) 
+                {
+                    sciprint(_("%s: wrong size for parameter %s: %d requested, got %d\n"), "getColVectorOfIntInPList", _pstLabel, value_to_check, *_piSize);
+                }
+                *_piValue = _iDefaultValue;
+                addErrorMessage(&_SciErr, 999, _("%s: wrong size for parameter %s: %d requested, got %d\n"), "getColVectorOfIntInPList", _pstLabel, value_to_check, *_piSize);
+                return _SciErr;
+            }
+            break;
+        case CHECK_MIN:
+            value_to_check = va_arg(vl, int);
+            va_end(vl);
+            if (value_to_check > *_piValue) 
+            {
+                if ((*_piFound != -1) && (_iLog)) 
+                {
+                    sciprint(_("%s: wrong min bound for parameter %s: min bound %d, value %d\n"), "getColVectorOfIntInPList", _pstLabel, value_to_check, *_piValue);
+                }
+                *_piValue = _iDefaultValue;
+                addErrorMessage(&_SciErr, 999, _("%s: wrong min bound for parameter %s: min bound %d, value %d\n"), "getColVectorOfIntInPList", _pstLabel, value_to_check, *_piValue);
+                return _SciErr;
+            }
+            break;
+        case CHECK_MAX:
+            value_to_check = va_arg(vl, int);
+            va_end(vl);
+            if (value_to_check < *_piValue) 
+            {
+                if ((*_piFound != -1) && (_iLog)) 
+                {
+                    sciprint(_("%s: wrong max bound for parameter %s: max bound %d, value %d\n"), "getColVectorOfIntInPList", _pstLabel, value_to_check, *_piValue);
+                }
+                *_piValue = _iDefaultValue;
+                addErrorMessage(&_SciErr, 999, _("%s: wrong max bound for parameter %s: max bound %d, value %d\n"), "getColVectorOfIntInPList", _pstLabel, value_to_check, *_piValue);
+                return _SciErr;
+            }
+            break;
+        case CHECK_BOTH:
+            /* First value is the min bound */
+            value_to_check = va_arg(vl, int);
+            if (value_to_check > *_piValue) 
+            {
+                if ((*_piFound != -1) && (_iLog)) 
+                {
+                    sciprint(_("%s: wrong min bound for parameter %s: min bound %d, value %d\n"), "getColVectorOfIntInPList", _pstLabel, value_to_check, *_piValue);
+                }
+                *_piValue = _iDefaultValue;
+                va_end(vl);
+                addErrorMessage(&_SciErr, 999, _("%s: wrong min bound for parameter %s: min bound %d, value %d\n"), "getColVectorOfIntInPList", _pstLabel, value_to_check, *_piValue);
+                return _SciErr;
+            }
+            /* Second value is the max bound */
+            value_to_check = va_arg(vl, int);
+            va_end(vl);
+            if (value_to_check < *_piValue) 
+            {
+                if ((*_piFound != -1) && (_iLog)) 
+                {
+                    sciprint(_("%s: wrong max bound for parameter %s: max bound %d, value %d\n"), "getColVectorOfIntInPList", _pstLabel, value_to_check, *_piValue);
+                }
+                *_piValue = _iDefaultValue;
+                addErrorMessage(&_SciErr, 999, _("%s: wrong max bound for parameter %s: max bound %d, value %d\n"), "getColVectorOfIntInPList", _pstLabel, value_to_check, *_piValue);
+                return _SciErr;
+            }
+            break;
+        case CHECK_VALUES:
+            /* First parameters is int and contains the number of values to check */
+            nb_value_to_check = va_arg(vl, int);
+            check_res = 0;
+            for( i = 0; i < nb_value_to_check; i++) 
+            {
+                value_to_check = va_arg(vl, int);
+                check_res = check_res || (value_to_check == *_piValue);
+            }
+
+            if (!check_res) 
+            {
+                if ((*_piFound != -1) && (_iLog)) 
+                {
+                    sciprint(_("%s: wrong value for parameter %s: value %d\n"), "getColVectorOfIntInPList", _pstLabel, *_piValue);
+                    sciprint(_("%s: awaited parameters: "), "getColVectorOfIntInPList");
+                    va_start(vl, _eCheck);
+                    nb_value_to_check = va_arg(vl, int);
+                    for( i = 0; i < nb_value_to_check; i++) 
+                    {
+                        value_to_check = va_arg(vl, int);
+                        sciprint(" %d", value_to_check);
+                    }
+                    sciprint("\n");
+                }
+
+                *_piValue = _iDefaultValue;
+
+                va_end(vl);
+                addErrorMessage(&_SciErr, 999, _("%s: wrong value for parameter %s: value %d\n"), "getColVectorOfIntInPList", _pstLabel, *_piValue);
+                return _SciErr;
+            }
+
+            va_end(vl);
+            break;
+        }
+    }
+
+    return _SciErr;
+}
+
+SciErr getColVectorOfDoubleInPList(void* _pvCtx, int * _piAddress, const char * _pstLabel, double * _pdblValue, int * _piFound, 
+                                   double _dblDefaultValue, int _iDefaultSize, int * _piSize, int _iLog, enum type_check _eCheck, ...)
+{
+    int pos_label = 0, i = 0;
+    int m_label = 0, n_label = 0;
+    int m_tmp = 0, n_tmp = 0;
+    int * len_label = NULL;
+    double * tmp_values = NULL;
+    char ** label_list = NULL;
+    SciErr _SciErr; 
+
+    _SciErr.iErr = 0; 
+    _SciErr.iMsgCount = 0;
+
+    *_piSize = -1;
+
+    pos_label = commonFindLabel(_pvCtx, _piAddress, _pstLabel);
+    *_piFound = pos_label;
+
+    if (len_label) 
+    {
+        FREE(len_label);
+        len_label = NULL;
+    }
+    freeArrayOfString(label_list, m_label * n_label);
+
+    if (pos_label != -1) 
+    {
+        _SciErr = getMatrixOfDoubleInList(_pvCtx, _piAddress, pos_label+1, &m_tmp, &n_tmp, &tmp_values);
+        if (!_SciErr.iErr) 
+        {
+            *_piSize  = m_tmp*n_tmp;
+            *_pdblValue = tmp_values[0];
+        }
+        else 
+        {
+            if (_iLog) 
+            {
+                sciprint(_("%s: wrong parameter type. %s expected. Return default value %f.\n"), "getColVectorOfDoubleInPList","double",_dblDefaultValue);
+            }
+            *_piSize  = _iDefaultSize;
+            *_pdblValue = _dblDefaultValue;
+        }
+    }
+    else
+    {
+        if (_iLog) 
+        {
+            sciprint(_("%s: parameter not found. Return default value %f.\n"), "getColVectorOfDoubleInPList",_dblDefaultValue);
+        }
+        *_piSize  = _iDefaultSize;
+        *_pdblValue = _dblDefaultValue;
+    }
+
+    /* Now check parameters */
+
+    if (_eCheck!=CHECK_NONE) 
+    {
+        va_list vl;
+        int nb_value_to_check = 0;
+        double value_to_check = 0;
+        int check_res = 0;
+
+        va_start(vl, _eCheck);
+
+        switch(_eCheck) 
+        {
+        case CHECK_SIZE:
+            value_to_check = va_arg(vl, double);
+            va_end(vl);
+            if (value_to_check != *_piSize) 
+            {
+                if ((*_piFound != -1) && (_iLog)) 
+                {
+                    sciprint(_("%s: wrong size for parameter %s: %d requested, got %d\n"), "getColVectorOfDoubleInPList", _pstLabel, value_to_check, *_piSize);
+                }
+                *_pdblValue = _dblDefaultValue;
+                addErrorMessage(&_SciErr, 999, _("%s: wrong size for parameter %s: %d requested, got %d\n"), "getColVectorOfDoubleInPList", _pstLabel, value_to_check, *_piSize);
+                return _SciErr;
+            }
+            break;
+        case CHECK_MIN:
+            value_to_check = va_arg(vl, double);
+            va_end(vl);
+            if (value_to_check > *_pdblValue) 
+            {
+                if ((*_piFound != -1) && (_iLog)) 
+                {
+                    sciprint(_("%s: wrong min bound for parameter %s: min bound %f, value %f\n"), "getColVectorOfDoubleInPList", _pstLabel, value_to_check, *_pdblValue);
+                }
+                *_pdblValue = _dblDefaultValue;
+                addErrorMessage(&_SciErr, 999, _("%s: wrong min bound for parameter %s: min bound %f, value %f\n"), "getColVectorOfDoubleInPList", _pstLabel, value_to_check, *_pdblValue);
+                return _SciErr;
+            }
+            break;
+        case CHECK_MAX:
+            value_to_check = va_arg(vl, double);
+            va_end(vl);
+            if (value_to_check < *_pdblValue) 
+            {
+                if ((*_piFound != -1) && (_iLog)) 
+                {
+                    sciprint(_("%s: wrong max bound for parameter %s: max bound %f, value %f\n"), "getColVectorOfDoubleInPList", _pstLabel, value_to_check, *_pdblValue);
+                }
+                *_pdblValue = _dblDefaultValue;
+                addErrorMessage(&_SciErr, 999, _("%s: wrong max bound for parameter %s: max bound %f, value %f\n"), "getColVectorOfDoubleInPList", _pstLabel, value_to_check, *_pdblValue);
+                return _SciErr;
+            }
+            break;
+        case CHECK_BOTH:
+            /* First value is the min bound */
+            value_to_check = va_arg(vl, double);
+            if (value_to_check > *_pdblValue) 
+            {
+                if ((*_piFound != -1) && (_iLog)) 
+                {
+                    sciprint(_("%s: wrong min bound for parameter %s: min bound %f, value %f\n"), "getColVectorOfDoubleInPList", _pstLabel, value_to_check, *_pdblValue);
+                }
+                *_pdblValue = _dblDefaultValue;
+                va_end(vl);
+                addErrorMessage(&_SciErr, 999, _("%s: wrong min bound for parameter %s: min bound %f, value %f\n"), "getColVectorOfDoubleInPList", _pstLabel, value_to_check, *_pdblValue);
+                return _SciErr;
+            }
+            /* Second value is the max bound */
+            value_to_check = va_arg(vl, double);
+            va_end(vl);
+            if (value_to_check < *_pdblValue) 
+            {
+                if ((*_piFound != -1) && (_iLog)) 
+                {
+                    sciprint(_("%s: wrong max bound for parameter %s: max bound %f, value %f\n"), "getColVectorOfDoubleInPList", _pstLabel, value_to_check, *_pdblValue);
+                }
+                *_pdblValue = _dblDefaultValue;
+                addErrorMessage(&_SciErr, 999, _("%s: wrong max bound for parameter %s: max bound %f, value %f\n"), "getColVectorOfDoubleInPList", _pstLabel, value_to_check, *_pdblValue);
+                return _SciErr;
+            }
+            break;
+        case CHECK_VALUES:
+            /* First parameters is int and contains the number of values to check */
+            nb_value_to_check = va_arg(vl,int);
+            check_res = 0;
+            for(i = 0; i < nb_value_to_check; i++) 
+            {
+                value_to_check = va_arg(vl, double);
+                check_res = check_res || (value_to_check == *_pdblValue);
+            }
+            if (!check_res) 
+            {
+                if ((*_piFound != -1) && (_iLog)) 
+                {
+                    sciprint(_("%s: wrong value for parameter %s: value %f\n"), "getColVectorOfDoubleInPList", _pstLabel, *_pdblValue);
+                    sciprint(_("%s: awaited parameters: "), "getColVectorOfDoubleInPList");
+                    va_start(vl, _eCheck);
+                    nb_value_to_check = va_arg(vl,int);
+                    for( i = 0; i < nb_value_to_check; i++) 
+                    {
+                        value_to_check = va_arg(vl,double);
+                        sciprint(" %f", value_to_check);
+                    }
+                    sciprint("\n");
+                }
+
+                *_pdblValue = _dblDefaultValue;
+
+                va_end(vl);
+                addErrorMessage(&_SciErr, 999, _("%s: wrong value for parameter %s: value %f\n"), "getColVectorOfDoubleInPList", _pstLabel, *_pdblValue);
+                return _SciErr;
+            }
+            va_end(vl);
+            break;
+        }
+    }
+
+    return _SciErr;
+}
+/*--------------------------------------------------------------------------*/ 
+SciErr createPList(void* _pvCtx, int _iVar, int ** _piAddress, char ** _pstLabelNames, int _iNbParams)
+{
+    SciErr _SciErr;
+    int i = 0;
+    char ** label_list = NULL;
+
+    _SciErr.iErr = 0; 
+    _SciErr.iMsgCount = 0;
+
+    _SciErr = createMList(_pvCtx, _iVar, _iNbParams+1, _piAddress);
+    label_list = (char **)MALLOC((_iNbParams + 1) * sizeof(char *));
+    label_list[0] = strdup("plist");
+
+    for(i = 1; i <= _iNbParams; i++) 
+    {
+        label_list[i] = strdup(_pstLabelNames[i-1]);
+    }
+
+    _SciErr = createMatrixOfStringInList(_pvCtx, _iVar, *_piAddress, 1, 1, _iNbParams+1, label_list);
+
+    if (label_list) 
+    {
+        freeArrayOfString(label_list, _iNbParams + 1);
+    }
+
+    return _SciErr;
+}
+/*--------------------------------------------------------------------------*/ 
+SciErr createIntInPList(void* _pvCtx, int _iVar, int * _piAddress, char * _pstLabelName, int _iValue)
+{
+    int itemPos = -1;
+    double tmp_val[1];
+    SciErr _SciErr;
+
+    _SciErr.iErr = 0;
+    _SciErr.iMsgCount = 0;
+
+    itemPos = commonFindLabel(_pvCtx, _piAddress, _pstLabelName) + 1;
+
+#ifdef DEBUG
+    sciprint("DEBUG: addIntInPList - itemPos = %d _pstLabelName = %s\n", itemPos, _pstLabelName);
+#endif
+
+    tmp_val[0] = (double)_iValue;
+    _SciErr = createMatrixOfDoubleInList(_pvCtx, _iVar, _piAddress, itemPos, 1, 1, tmp_val);
+
+    return _SciErr;
+}
+/*--------------------------------------------------------------------------*/ 
+SciErr createDoubleInPList(void* _pvCtx, int _iVar, int * _piAddress, char * _pstLabelName, double _dblValue)
+{
+    int itemPos = -1;
+    double tmp_val[1];
+    SciErr _SciErr; 
+
+    _SciErr.iErr = 0; 
+    _SciErr.iMsgCount = 0;
+
+    itemPos = commonFindLabel(_pvCtx, _piAddress, _pstLabelName) + 1;
+
+#ifdef DEBUG
+    sciprint("DEBUG: addDoubleInPList - itemPos = %d _pstLabelName = %s\n", itemPos, _pstLabelName);
+#endif
+
+    tmp_val[0] = _dblValue;
+    _SciErr = createMatrixOfDoubleInList(_pvCtx, _iVar, _piAddress, itemPos, 1, 1, tmp_val);
+
+    return _SciErr;
+}
+/*--------------------------------------------------------------------------*/ 
+SciErr createStringInPList(void* _pvCtx, int _iVar, int * _piAddress, char * _pstLabelName, char * _pstValue)
+{
+    int itemPos = -1;
+    char * tmp_val[1];
+    SciErr _SciErr; 
+
+    _SciErr.iErr = 0; 
+    _SciErr.iMsgCount = 0;
+
+    itemPos = commonFindLabel(_pvCtx, _piAddress, _pstLabelName) + 1;
+
+#ifdef DEBUG
+    sciprint("DEBUG: addStringInPList - itemPos = %d _pstLabelName = %s\n", itemPos, _pstLabelName);
+#endif
+
+    tmp_val[0] = strdup(_pstValue);
+    _SciErr = createMatrixOfStringInList(_pvCtx, _iVar, _piAddress, itemPos, 1, 1, tmp_val);
+
+    if (tmp_val[0]) 
+    {
+        FREE(tmp_val[0]);
+        tmp_val[0] = NULL;
+
+    }
+
+    return _SciErr;
+}
+/*--------------------------------------------------------------------------*/ 
+SciErr createColVectorOfIntInPList(void* _pvCtx, int _iVar, int * _piAddress, char * _pstLabelName, int _iNbValues, int * _piValue)
+{
+    int itemPos = -1, i = 0;
+    double * tmp_val = NULL;
+    SciErr _SciErr; 
+
+    _SciErr.iErr = 0;
+    _SciErr.iMsgCount = 0;
+
+    itemPos = commonFindLabel(_pvCtx, _piAddress, _pstLabelName) + 1;
+
+#ifdef DEBUG
+    sciprint("DEBUG: addVectorOfIntInPList - itemPos = %d _pstLabelName = %s\n", itemPos, _pstLabelName);
+#endif
+
+    tmp_val = (double *)MALLOC(_iNbValues * sizeof(double));
+    for(i = 0; i < _iNbValues; i++) 
+    {
+        tmp_val[i] = (double)_piValue[i];
+    }
+    _SciErr = createMatrixOfDoubleInList(_pvCtx, _iVar, _piAddress, itemPos, _iNbValues, 1, tmp_val);
+
+    if (tmp_val) 
+    {
+        FREE(tmp_val);
+        tmp_val = NULL;
+    }
+
+    return _SciErr;
+}
+/*--------------------------------------------------------------------------*/ 
+SciErr createColVectorOfDoubleInPList(void* _pvCtx, int _iVar, int * _piAddress, char * _pstLabelName, int _iNbValues, double * _pdblValue)
+{
+    int itemPos = -1;
+    SciErr _SciErr; 
+
+    _SciErr.iErr = 0;
+    _SciErr.iMsgCount = 0;
+
+    itemPos = commonFindLabel(_pvCtx, _piAddress, _pstLabelName) + 1;
+
+#ifdef DEBUG
+    sciprint("DEBUG: addVectorOfDoubleInPList - itemPos = %d _pstLabelName = %s\n", itemPos, _pstLabelName);
+#endif
+
+    _SciErr = createMatrixOfDoubleInList(_pvCtx, _iVar, _piAddress, itemPos, _iNbValues, 1, _pdblValue);
+
+    return _SciErr;
+}
+/*--------------------------------------------------------------------------*/ 
+/* Utility functions */
+static int commonFindLabelPartial(void* _pvCtx, int * _piAddress, char const * const _pstLabelToFind)
+{
+    int Pos = -1, i = 0;
+    int m_label = 0, n_label = 0;
+    int * len_label = NULL;
+    char ** label_list = NULL;
+    SciErr _SciErr; 
+
+    _SciErr.iErr = 0;
+    _SciErr.iMsgCount = 0;
+
+    _SciErr = getMatrixOfStringInList(_pvCtx, _piAddress, 1, &m_label, &n_label, NULL, NULL);
+    len_label = (int *)MALLOC(m_label * n_label * sizeof(int));
+    _SciErr = getMatrixOfStringInList(_pvCtx, _piAddress, 1, &m_label, &n_label, len_label, NULL);
+    label_list = (char **)MALLOC(m_label * n_label * sizeof(char *));
+
+    for(i = 0;  i < n_label * m_label; i++) 
+    {
+        label_list[i] = (char *)MALLOC((len_label[i] + 1) * sizeof(char));
+    }
+    _SciErr = getMatrixOfStringInList(_pvCtx, _piAddress, 1, &m_label, &n_label, len_label, label_list);
+
+    if (label_list != NULL) 
+    {
+        for(i = 0; i < m_label * n_label; i++) 
+        {
+            /* A bug in scilab: if the mlist contains only the type, the C API returns m_label*n_label==2 !! */
+            if (label_list[i] != NULL) 
+            {
+                if (strncmp(label_list[i], _pstLabelToFind, strlen(_pstLabelToFind)) == 0) 
+                {
+                    Pos = i;
+
+                    if (len_label) 
+                    {
+                        FREE(len_label);
+                        len_label = NULL;
+                    }
+                    freeArrayOfString(label_list, m_label * n_label);
+
+                    return Pos;
+                } 
+            }
+        } 
+    }
+
+    if (len_label) 
+    {
+        FREE(len_label);
+        len_label = NULL;
+    }
+    freeArrayOfString(label_list, m_label * n_label);
+
+    return Pos;
+} 
+/*--------------------------------------------------------------------------*/ 
+static int commonFindLabel(void* _pvCtx, int * _piAddress, char const * const _pstLabelToFind)
+{
+    int Pos = -1, i = 0;
+    int m_label = 0, n_label = 0;
+    int * len_label = NULL;
+    char ** label_list = NULL;
+    SciErr _SciErr; 
+
+    _SciErr.iErr = 0; 
+    _SciErr.iMsgCount = 0;
+
+    _SciErr = getMatrixOfStringInList(_pvCtx, _piAddress, 1, &m_label, &n_label, NULL, NULL);
+    len_label = (int *)MALLOC(m_label * n_label * sizeof(int));
+    _SciErr = getMatrixOfStringInList(_pvCtx, _piAddress, 1, &m_label, &n_label, len_label, NULL);
+    label_list = (char **)MALLOC(m_label * n_label * sizeof(char *));
+    for(i = 0; i < n_label * m_label; i++) 
+    {
+        label_list[i] = (char *)MALLOC((len_label[i] + 1) * sizeof(char));
+    }
+    _SciErr = getMatrixOfStringInList(_pvCtx, _piAddress, 1, &m_label, &n_label, len_label, label_list);
+
+    if (label_list != NULL) 
+    {
+        for(i = 0; i < m_label * n_label; i++) 
+        {
+            /* A bug in scilab: if the mlist contains only the type, the C API returns m_label*n_label==2 !! */
+            if (label_list[i] != NULL) 
+            {
+                if (strcmp(label_list[i], (char *)_pstLabelToFind) == 0) 
+                {
+                    Pos = i;
+
+                    if (len_label) 
+                    {
+                        FREE(len_label);
+                        len_label = NULL;
+                    }
+                    freeArrayOfString(label_list, m_label * n_label);
+
+                    return Pos;
+                } 
+            }
+        } 
+    }
+
+    if (len_label) 
+    {
+        FREE(len_label);
+        len_label = NULL;
+    }
+    freeArrayOfString(label_list, m_label * n_label);
+
+    return Pos;
+}
+/*--------------------------------------------------------------------------*/ 
+
diff --git a/scilab/modules/parameters/src/c/parameters.rc b/scilab/modules/parameters/src/c/parameters.rc
new file mode 100644 (file)
index 0000000..cdc7184
--- /dev/null
@@ -0,0 +1,97 @@
+// Microsoft Visual C++ generated resource script.
+//
+
+
+#define APSTUDIO_READONLY_SYMBOLS
+/////////////////////////////////////////////////////////////////////////////
+//
+// Generated from the TEXTINCLUDE 2 resource.
+//
+//#include "afxres.h"
+#define APSTUDIO_HIDDEN_SYMBOLS
+#include "windows.h"
+/////////////////////////////////////////////////////////////////////////////
+#undef APSTUDIO_READONLY_SYMBOLS
+
+/////////////////////////////////////////////////////////////////////////////
+// French (France) resources
+
+#if !defined(AFX_RESOURCE_DLL) || defined(AFX_TARG_FRA)
+#ifdef _WIN32
+LANGUAGE LANG_FRENCH, SUBLANG_FRENCH
+#pragma code_page(1252)
+#endif //_WIN32
+
+#ifdef APSTUDIO_INVOKED
+/////////////////////////////////////////////////////////////////////////////
+//
+// TEXTINCLUDE
+//
+
+1 TEXTINCLUDE 
+BEGIN
+    "resource.h\0"
+END
+
+
+3 TEXTINCLUDE 
+BEGIN
+    "\r\n"
+    "\0"
+END
+
+#endif    // APSTUDIO_INVOKED
+
+
+/////////////////////////////////////////////////////////////////////////////
+//
+// Version
+//
+
+VS_VERSION_INFO VERSIONINFO
+ FILEVERSION 5,3,0,0
+ PRODUCTVERSION 5,3,0,0
+ FILEFLAGSMASK 0x17L
+#ifdef _DEBUG
+ FILEFLAGS 0x1L
+#else
+ FILEFLAGS 0x0L
+#endif
+ FILEOS 0x4L
+ FILETYPE 0x0L
+ FILESUBTYPE 0x0L
+BEGIN
+    BLOCK "StringFileInfo"
+    BEGIN
+        BLOCK "040c04b0"
+        BEGIN
+            VALUE "FileDescription", "parameters module"
+            VALUE "FileVersion", "5, 3, 0, 0"
+            VALUE "InternalName", "parameters module"
+            VALUE "LegalCopyright", "Copyright (C) 2010"
+            VALUE "OriginalFilename", "parameters.dll"
+            VALUE "ProductName", " parameters"
+            VALUE "ProductVersion", "5, 3, 0, 0"
+        END
+    END
+    BLOCK "VarFileInfo"
+    BEGIN
+        VALUE "Translation", 0x40c, 1200
+    END
+END
+
+#endif    // French (France) resources
+/////////////////////////////////////////////////////////////////////////////
+
+
+
+#ifndef APSTUDIO_INVOKED
+/////////////////////////////////////////////////////////////////////////////
+//
+// Generated from the TEXTINCLUDE 3 resource.
+//
+
+
+/////////////////////////////////////////////////////////////////////////////
+#endif    // not APSTUDIO_INVOKED
+