move examples/callsci --> modules/core/examples/call_scilab
Allan Cornet [Fri, 23 Feb 2007 07:47:33 +0000 (07:47 +0000)]
43 files changed:
scilab/examples/callsci/.scicos_pal [deleted file]
scilab/examples/callsci/Makefile [deleted file]
scilab/examples/callsci/callsciC++/.scicos_pal [deleted file]
scilab/examples/callsci/callsciC++/Makefile [deleted file]
scilab/examples/callsci/callsciC++/config/Init [deleted file]
scilab/examples/callsci/callsciC++/config/Makefile [deleted file]
scilab/examples/callsci/callsciC++/config/Makefile.Top [deleted file]
scilab/examples/callsci/callsciC++/config/Makefile.all [deleted file]
scilab/examples/callsci/callsciC++/config/Makefile.incl [deleted file]
scilab/examples/callsci/callsciC/.scicos_pal [deleted file]
scilab/examples/callsci/callsciC/Makefile [deleted file]
scilab/examples/callsci/callsciC/README [deleted file]
scilab/examples/callsci/callsciC/config/Init [deleted file]
scilab/examples/callsci/callsciC/config/Makefile.all [deleted file]
scilab/examples/callsci/callsciC/config/Makefile.incl [deleted file]
scilab/examples/callsci/callsciC/config/README [deleted file]
scilab/examples/callsci/callsciC/config/callsci.sh [deleted file]
scilab/examples/callsci/callsciC/my_ode.c [deleted file]
scilab/examples/callsci/callsciC/myprog.sh [deleted file]
scilab/examples/callsci/callsciFortran/Makefile [deleted file]
scilab/examples/callsci/callsciFortran/README [deleted file]
scilab/examples/callsci/callsciFortran/config/Init [deleted file]
scilab/examples/callsci/callsciFortran/config/Makefile.all [deleted file]
scilab/examples/callsci/callsciFortran/config/Makefile.incl [deleted file]
scilab/examples/callsci/callsciFortran/config/callsci.sh [deleted file]
scilab/modules/core/core.iss
scilab/modules/core/examples/call_scilab/c/common/makefile.mak [moved from scilab/examples/callsci/callsciC/makefile.mak with 85% similarity]
scilab/modules/core/examples/call_scilab/c/common/myprog.c [moved from scilab/examples/callsci/callsciC/myprog.c with 50% similarity]
scilab/modules/core/examples/call_scilab/c/visual_studio/CallSciVC.sln [moved from scilab/examples/callsci/callsciC/CallSciVC/CallSciVC.sln with 89% similarity]
scilab/modules/core/examples/call_scilab/c/visual_studio/CallSciVC.vcproj [moved from scilab/examples/callsci/callsciC/CallSciVC/CallSciVC/CallSciVC.vcproj with 89% similarity]
scilab/modules/core/examples/call_scilab/c/visual_studio/CallsciC.c [moved from scilab/examples/callsci/callsciC/CallSciVC/CallSciVC/CallsciC.c with 84% similarity]
scilab/modules/core/examples/call_scilab/cpp/borlandcpp/readme.txt [moved from scilab/examples/callsci/callsciBC++/Readme.txt with 95% similarity]
scilab/modules/core/examples/call_scilab/cpp/common/Makefile.mak [moved from scilab/examples/callsci/callsciC++/Makefile.mak with 58% similarity]
scilab/modules/core/examples/call_scilab/cpp/common/ccmatrix.h [moved from scilab/examples/callsci/callsciC++/ccmatrix.h with 91% similarity]
scilab/modules/core/examples/call_scilab/cpp/common/ccmatrix1.cc [moved from scilab/examples/callsci/callsciC++/ccmatrix1.cc with 94% similarity]
scilab/modules/core/examples/call_scilab/cpp/common/ccmatrix1.cpp [moved from scilab/examples/callsci/callsciC++/ccmatrix1.cpp with 94% similarity]
scilab/modules/core/examples/call_scilab/cpp/common/my_ode.c [moved from scilab/examples/callsci/callsciC++/my_ode.c with 94% similarity]
scilab/modules/core/examples/call_scilab/cpp/common/myprog.c [moved from scilab/examples/callsci/callsciC++/myprog.c with 96% similarity]
scilab/modules/core/examples/call_scilab/cpp/common/readme.txt [moved from scilab/examples/callsci/callsciC++/README with 96% similarity]
scilab/modules/core/examples/call_scilab/fortran/callsci.f [moved from scilab/examples/callsci/callsciFortran/callsci.f with 96% similarity]
scilab/modules/core/examples/call_scilab/fortran/example.sln [moved from scilab/examples/callsci/callsciFortran/example.sln with 97% similarity]
scilab/modules/core/examples/call_scilab/fortran/example.vfproj [moved from scilab/examples/callsci/callsciFortran/example.vfproj with 74% similarity]
scilab/modules/core/examples/call_scilab/fortran/readme.txt [moved from scilab/examples/callsci/callsciFortran/Readme_Windows.txt with 73% similarity]

diff --git a/scilab/examples/callsci/.scicos_pal b/scilab/examples/callsci/.scicos_pal
deleted file mode 100755 (executable)
index 3bf37ad..0000000
Binary files a/scilab/examples/callsci/.scicos_pal and /dev/null differ
diff --git a/scilab/examples/callsci/Makefile b/scilab/examples/callsci/Makefile
deleted file mode 100644 (file)
index 60bf1d3..0000000
+++ /dev/null
@@ -1,32 +0,0 @@
-SHELL = /bin/sh
-
-SCIDIR=../../
-include ../../Makefile.incl
-
-all    :: info 
-
-info   :
-       @echo "How to call Scilab from Fortran C C++ Java "
-       @echo "walk through the subdirs to learn more "
-
-SUBDIRS = callsciC callsciC++ callsciFortran callsciJava
-distclean::
-       @case '${MFLAGS}' in *[ik]*) set +e;; esac; \
-       for i in $(SUBDIRS) ;\
-       do \
-               (cd $$i ; echo "making distclean in examples/$$i..."; \
-               $(MAKE) $(MFLAGS)  distclean); \
-       done
-
-clean::
-       @case '${MFLAGS}' in *[ik]*) set +e;; esac; \
-       for i in $(SUBDIRS) ;\
-       do \
-               (cd $$i ; echo "making clean in examples/$$i..."; \
-               $(MAKE) $(MFLAGS) clean); \
-       done
-
-tests::
-       @echo "How to call Scilab from Fortran C C++ Java "
-       @echo "Automatic tests are not performed" 
diff --git a/scilab/examples/callsci/callsciC++/.scicos_pal b/scilab/examples/callsci/callsciC++/.scicos_pal
deleted file mode 100755 (executable)
index 3bf37ad..0000000
Binary files a/scilab/examples/callsci/callsciC++/.scicos_pal and /dev/null differ
diff --git a/scilab/examples/callsci/callsciC++/Makefile b/scilab/examples/callsci/callsciC++/Makefile
deleted file mode 100644 (file)
index f852409..0000000
+++ /dev/null
@@ -1,27 +0,0 @@
-#--------------------------------------------------------
-# To be customized 
-#--------------------------------------------------------
-
-SCIDIR=../../..
-
-PROG=myprog 
-OBJS=myprog.o ccmatrix1.o
-
-#--------------------------------------------------------
-# do not modify below 
-#--------------------------------------------------------
-
-all    : .init 
-       make -f config/Makefile.all PROG=$(PROG) OBJS="$(OBJS)" SCIDIR=$(SCIDIR)
-
-.init  : Makefile 
-       config/Init $(PROG) $(SCIDIR) 
-       touch .init 
-
-clean  : 
-       @rm -f $(PROG) $(OBJS)
-
-distclean : 
-       @rm -f $(PROG) $(OBJS) callsci.sh .init 
-       @rm -f libodeex.* Makelib my_ode.o my_ode.lo 
-
diff --git a/scilab/examples/callsci/callsciC++/config/Init b/scilab/examples/callsci/callsciC++/config/Init
deleted file mode 100755 (executable)
index 697410b..0000000
+++ /dev/null
@@ -1,15 +0,0 @@
-#!/bin/sh 
-#-----------------------------------------------------------
-# Usage: Init prog_name SCIDIR
-#-----------------------------------------------------------
-config=`egrep "include[ ]*config" $2/Makefile | sed -e "s/include[ ]*//"`
-sed -e "s+bin/scilex+$1+" -e 's/scilex-lib/$(OBJS)/' -e 's/$(DEFAULTS)/$(OBJS) $(DEFAULTS)/'  -e 's/$(MAINSCI)//' $2/$config > config/Makefile
-
-cp $2/Makefile.OBJ  config/Makefile.Top
-
-# copy the original Makefile.incl 
-cp $2/Makefile.incl config/
-if [ -f config/callsci.sh ];then 
-    sed -e "s+@SCI@+$2+" -e "s+./callsci+./$1+" config/callsci.sh > $1.sh
-    chmod +x $1.sh 
-fi;
diff --git a/scilab/examples/callsci/callsciC++/config/Makefile b/scilab/examples/callsci/callsciC++/config/Makefile
deleted file mode 100644 (file)
index e6b40c0..0000000
+++ /dev/null
@@ -1,22 +0,0 @@
-# Copyright INRIA
-
-FFLAGS = $(FC_OPTIONS) -lstdc++
-
-myprog: $(OBJS) 
-       @x=1;if test -f $@; then  \
-               x=`find  $(OBJS) $(DEFAULTS) $(LIBR)  \( -name '*.a' -o -name '*.o' \) \
-               -newer $@ -print | wc -l `; \
-       fi;\
-       if test $$x -ne 0; then \
-               $(RM) $@; \
-               echo "linking"; \
-               $(FC) $(FFLAGS) -o $@  $(OBJS) $(DEFAULTS) $(FC_LDFLAGS) $(LIBR)\
-                       $(TCLTK_LIBS) $(XLIBS) $(TERMCAPLIB); \
-       else \
-               echo myprog is up to date ; \
-       fi
-
-
-show   :
-       @echo $(FC) $(FFLAGS) -o $@  $(OBJS) $(DEFAULTS) $(FC_LDFLAGS) $(LIBR)\
-               $(TCLTK_LIBS) $(XLIBS) $(TERMCAPLIB);
diff --git a/scilab/examples/callsci/callsciC++/config/Makefile.Top b/scilab/examples/callsci/callsciC++/config/Makefile.Top
deleted file mode 100644 (file)
index 49a6ff6..0000000
+++ /dev/null
@@ -1,52 +0,0 @@
-
-ATLASDIR=
-
-STD_BLAS=$(SCIDIR)/libs/blas.a  
-ATLAS_LAPACKBLAS= $(ATLASDIR)/liblapack.a $(ATLASDIR)/libcblas.a $(ATLASDIR)/libf77blas.a $(ATLASDIR)/libatlas.a
-
-BLAS=$(STD_BLAS) 
-
-LIBRSCI = $(SCIDIR)/libs/system.a $(SCIDIR)/libs/interf.a \
-       $(SCIDIR)/libs/system2.a $(SCIDIR)/libs/optim.a \
-        $(SCIDIR)/libs/integ.a $(SCIDIR)/libs/control.a \
-       $(SCIDIR)/libs/scicos.a $(SCIDIR)/libs/signal.a \
-        $(SCIDIR)/libs/poly.a $(SCIDIR)/libs/calelm.a \
-       $(SCIDIR)/libs/lapack.a $(SCIDIR)/libs/graphics.a \
-        $(SCIDIR)/libs/sparse.a $(SCIDIR)/libs/metanet.a \
-       $(SCIDIR)/libs/sun.a $(SCIDIR)/libs/gd.a  \
-        $(SCIDIR)/libs/intersci.a  $(SCIDIR)/libs/xsci.a \
-       $(SCIDIR)/libs/graphics.a $(SCIDIR)/libs/menusX.a \
-       $(SCIDIR)/libs/sound.a $(SCIDIR)/libs/dcd.a $(SCIDIR)/libs/rand.a \
-        $(BLAS) \
-       $(SCIDIR)/libs/int.a \
-        $(SCIDIR)/libs/slicot.a  \
-       $(SCIDIR)/libs/pvm.a  $(SCIDIR)/libs/tclsci.a
-
-LIBR = $(XAW_LOCAL_LIB) $(LIBRSCI) $(DLDLIB) $(PVMGLIB) $(PVMLIB)
-
-DEFAULTS = \
-        $(SCIDIR)/routines/default/FTables.o \
-        $(SCIDIR)/routines/default/Ex-colnew.o \
-        $(SCIDIR)/routines/default/Ex-corr.o \
-        $(SCIDIR)/routines/default/Ex-feval.o \
-        $(SCIDIR)/routines/default/Ex-fsolve.o \
-        $(SCIDIR)/routines/default/Ex-impl.o \
-        $(SCIDIR)/routines/default/Ex-intg.o \
-        $(SCIDIR)/routines/default/Ex-int2d.o \
-        $(SCIDIR)/routines/default/Ex-int3d.o \
-        $(SCIDIR)/routines/default/Ex-ode-more.o \
-        $(SCIDIR)/routines/default/Ex-ode.o \
-        $(SCIDIR)/routines/default/Ex-odedc.o \
-        $(SCIDIR)/routines/default/Ex-optim.o \
-        $(SCIDIR)/routines/default/Ex-schur.o \
-        $(SCIDIR)/routines/default/Ex-fort.o \
-        $(SCIDIR)/routines/default/Ex-dasrt.o \
-        $(SCIDIR)/routines/default/Ex-dassl.o \
-        $(SCIDIR)/routines/default/Ex-fbutn.o \
-        $(SCIDIR)/routines/default/matusr.o  \
-       $(SCIDIR)/routines/default/matus2.o \
-        $(SCIDIR)/routines/default/Funtab.o  \
-       $(SCIDIR)/routines/default/msgstxt.o \
-        $(SCIDIR)/routines/default/scimem.o \
-        $(SCIDIR)/routines/default/callinterf.o \
-        $(SCIDIR)/routines/default/mexlib.o
diff --git a/scilab/examples/callsci/callsciC++/config/Makefile.all b/scilab/examples/callsci/callsciC++/config/Makefile.all
deleted file mode 100644 (file)
index f04d1e3..0000000
+++ /dev/null
@@ -1,29 +0,0 @@
-#---------------------------------------------------------
-# This Makefile is to be run as 
-# make -f config/Makefile.all PROG=... SCIDIR=... OBJS=....
-#--------------------------------------------------------
-# do not modify below 
-#--------------------------------------------------------
-SHELL = /bin/sh
-
-include config/Makefile.incl
-
-CFLAGS = $(CC_OPTIONS) -I$(SCIDIR)/routines -DSCI=\"$(SCIDIR)\"
-FFLAGS = $(FC_OPTIONS) 
-CPPFLAGS= $(CC_OPTIONS) -I$(SCIDIR)/routines -DSCI=\"$(SCIDIR)\"
-
-
-all:: $(PROG) 
-
-world:: $(PROG) 
-
-include config/Makefile.Top
-include config/Makefile 
-
-distclean::
-       $(RM) $(PROG)
-       $(RM) -f -r  config ./configs 
-
-
-
-
diff --git a/scilab/examples/callsci/callsciC++/config/Makefile.incl b/scilab/examples/callsci/callsciC++/config/Makefile.incl
deleted file mode 100644 (file)
index 279e7ff..0000000
+++ /dev/null
@@ -1,89 +0,0 @@
-RM = rm -f
-AR = ar cru
-FILES_TO_CLEAN = *.CKP *.ln *.BAK *.bak core errs ,* *~ *.a .emacs_* tags TAGS make.log MakeOut .*~ *.trace so_locations *.orig *.cos *.obj
-
-all::
-
-clean::
-       @echo Cleaning 
-       @$(RM) $(FILES_TO_CLEAN)
-distclean::
-       @$(RM) $(FILES_TO_CLEAN)
-
-RANLIB = ranlib
-
-TERMCAPLIB = -lncurses
-
-##################################################################
-# NOTE: the following schemes for compiling and linking are not  #
-#       exactly used for the main executable scilex; for it, see #
-#       the files Makefile.<host>                                #
-##################################################################
-
-############
-# C compiler
-# typically, for compiling use: CFLAGS = $(CC_OPTIONS)
-# and for linking: $(CC) -o $(PROGRAM) $(OBJS) $(CC_LDFLAGS)
-###########
-CC = cc
-#CC_OPTIONS = -O -Dlinux -fwritable-strings -DNARROWPROTO  
-CC_OPTIONS = -O -Dlinux -fwritable-strings -DNARROWPROTO 
-CC_LDFLAGS = -lieee 
-CC_PICFLAGS = 
-
-##################
-# Fortran compiler
-# typically, for compiling use: FFLAGS = $(FC_OPTIONS)
-# and for linking: $(FC) -o $(PROGRAM) $(OBJS) $(FC_LDFLAGS)
-##################
-FC = g77
-FC_OPTIONS = -O
-FC_LDFLAGS = -lieee -ldl -rdynamic
-FC_PICFLAGS = 
-
-########
-# Linker
-# typically, for linking: $(LD) -o $(PROGRAM) $(OBJS) $(LD_LDFLAGS)
-########
-LD = ld
-LD_LDFLAGS = -lieee
-
-##########
-# X Window: use $(XFLAGS) for compilation and $(XLIBS) for linking
-# typically, for compiling use: CFLAGS = $(CC_OPTIONS) $(XFLAGS)
-# and for linking with X Window
-#  with C compiler: $(CC) -o $(PROGRAM) $(OBJS) $(CC_LDFLAGS) $(XLIBS)
-#  with Fortran compiler: $(FC) -o $(PROGRAM) $(OBJS) $(FC_LDFLAGS) $(XLIBS)
-#  with linker: $(LD) -o $(PROGRAM) $(OBJS) $(LD_LDFLAGS) $(XLIBS)
-##########
-DLDLIB = 
-DLD_SUBDIR = 
-PVMLIB = /usr/local/scilab-cvs/pvm3/lib/LINUX/libpvm3.a
-PVMGLIB = /usr/local/scilab-cvs/pvm3/lib/LINUX/libgpvm3.a
-PVMROOT = /usr/local/scilab-cvs/pvm3
-PVMINCLUDE = /usr/local/scilab-cvs/pvm3/include
-XAWLIB = -lXaw3d
-XMULIB = -lXmu
-XAW_LOCAL_SUBDIR = 
-XAW_LOCAL_LIB = 
-XFLAGS =  -I/usr/X11R6/include 
-X_EXTRA_LIBS = 
-XLIBS =   -L/usr/X11R6/lib $(XAWLIB) $(XMULIB) -lXt -lXext  -lSM -lICE -lX11 $(X_EXTRA_LIBS)
-
-#####################
-# TCL/TK
-#####################
-TK_INC_PATH = -I/usr/include
-TCL_INC_PATH = -I/usr/include
-TCLTK_LIBS =  -L/usr/lib -ltk8.3   -L/usr/lib -ltcl8.3  -ldl
-
-#####################
-# for WIN32 version 
-# win32 libraries for gcwin32 
-WIN32LIBS=-mwindows -lwsock32 -lshell32 -lcomctl32  -lwinspool -lm 
-WINLIBS = $(TCLTK_LIBS) $(WIN32LIBS)
-LINKEROPT= $(LD_LDFLAGS)
-# Ressource compiler 
-RC=windres 
-RCVARS=-O coff 
-
diff --git a/scilab/examples/callsci/callsciC/.scicos_pal b/scilab/examples/callsci/callsciC/.scicos_pal
deleted file mode 100755 (executable)
index 3bf37ad..0000000
Binary files a/scilab/examples/callsci/callsciC/.scicos_pal and /dev/null differ
diff --git a/scilab/examples/callsci/callsciC/Makefile b/scilab/examples/callsci/callsciC/Makefile
deleted file mode 100644 (file)
index 274289a..0000000
+++ /dev/null
@@ -1,30 +0,0 @@
-#--------------------------------------------------------
-# To be customized 
-#--------------------------------------------------------
-
-# SCIDIR must be defined here with absolute path 
-# SCIDIR=../../..
-include ../../../Path.incl 
-
-PROG=myprog 
-OBJS=myprog.o my_ode.o
-
-#--------------------------------------------------------
-# do not modify below 
-#--------------------------------------------------------
-
-all    : .init 
-       $(MAKE) $(MAKEFLAGS) -f config/Makefile.all PROG=$(PROG) OBJS="$(OBJS)" SCIDIR=$(SCIDIR)
-
-.init  : Makefile 
-       config/Init $(PROG) $(SCIDIR) 
-       touch .init 
-
-clean  : 
-       rm -f $(PROG) $(OBJS)
-
-distclean : 
-       rm -f $(PROG) $(OBJS) $(PROG).sh .init config/Makefile *.so *.a *.la *.lo
-       rm -f config/Makefile.Top 
-       rm -f -r .libs 
-
diff --git a/scilab/examples/callsci/callsciC/README b/scilab/examples/callsci/callsciC/README
deleted file mode 100644 (file)
index fdf1be0..0000000
+++ /dev/null
@@ -1,20 +0,0 @@
-       How to make calls to Scilab interpreter 
-       from a C program 
-       (Unix only since the proper Makefiles for windows 
-       are not still writen) 
-       
-In this directory we provide small examples of C calls to the Scilab 
-interpreter. 
-
-To make it run you have to edit the Makefile 
-and change the SCIDIR variable to fit your local Scilab installation 
-
-Then type 
-       make distclean 
-       make all 
-       ./myprog -nw 
-
-That's all 
-
-jpc
-
diff --git a/scilab/examples/callsci/callsciC/config/Init b/scilab/examples/callsci/callsciC/config/Init
deleted file mode 100755 (executable)
index bed3464..0000000
+++ /dev/null
@@ -1,14 +0,0 @@
-#!/bin/sh 
-#-----------------------------------------------------------
-# Usage: Init prog_name SCIDIR
-#-----------------------------------------------------------
-config=`egrep "include[ ]*config" $2/Makefile | sed -e "s/include[ ]*//"`
-sed -e "s+bin/scilex+$1+" -e 's/scilex-lib/$(OBJS)/' -e 's/$(DEFAULTS)/$(OBJS) $(DEFAULTS)/'  -e 's/$(MAINSCI)//' $2/$config > config/Makefile
-
-cp $2/Makefile.OBJ  config/Makefile.Top
-# copy the original Makefile.incl 
-cp $2/Makefile.incl config/
-if [ -f config/callsci.sh ];then 
-    sed -e "s+@SCI@+$2+" -e "s+./callsci+./$1+" config/callsci.sh > $1.sh
-    chmod +x $1.sh 
-fi;
diff --git a/scilab/examples/callsci/callsciC/config/Makefile.all b/scilab/examples/callsci/callsciC/config/Makefile.all
deleted file mode 100644 (file)
index b0141ef..0000000
+++ /dev/null
@@ -1,28 +0,0 @@
-#---------------------------------------------------------
-# This Makefile is to be run as 
-# make -f config/Makefile.all PROG=... SCIDIR=... OBJS=....
-#--------------------------------------------------------
-# do not modify below 
-#--------------------------------------------------------
-SHELL = /bin/sh
-
-include config/Makefile.incl
-
-CFLAGS = $(CC_OPTIONS) -I$(SCIDIR)/routines -DSCI=\"$(SCIDIR)\"
-FFLAGS = $(FC_OPTIONS) 
-CPPFLAGS= $(CC_OPTIONS) -I$(SCIDIR)/routines -DSCI=\"$(SCIDIR)\"
-
-all:: $(PROG) 
-
-world:: $(PROG) 
-
-include config/Makefile.Top
-include config/Makefile 
-
-distclean::
-       $(RM) $(PROG)
-       $(RM) -f -r  config ./configs 
-
-
-
-
diff --git a/scilab/examples/callsci/callsciC/config/Makefile.incl b/scilab/examples/callsci/callsciC/config/Makefile.incl
deleted file mode 100644 (file)
index 363934e..0000000
+++ /dev/null
@@ -1,88 +0,0 @@
-RM = rm -f
-AR = ar cru
-FILES_TO_CLEAN = *.CKP *.ln *.BAK *.bak core errs ,* *~ *.a .emacs_* tags TAGS make.log MakeOut .*~ *.trace so_locations *.orig *.cos *.obj
-
-all::
-
-clean::
-       @echo Cleaning 
-       @$(RM) $(FILES_TO_CLEAN)
-distclean::
-       @$(RM) $(FILES_TO_CLEAN)
-
-RANLIB = ranlib
-
-TERMCAPLIB = -lreadline -lncurses
-
-##################################################################
-# NOTE: the following schemes for compiling and linking are not  #
-#       exactly used for the main executable scilex; for it, see #
-#       the files Makefile.<host>                                #
-##################################################################
-
-############
-# C compiler
-# typically, for compiling use: CFLAGS = $(CC_OPTIONS)
-# and for linking: $(CC) -o $(PROGRAM) $(OBJS) $(CC_LDFLAGS)
-###########
-CC = cc
-CC_OPTIONS = -O -Dlinux -fwritable-strings -DNARROWPROTO `gnome-config --cflags gnome`
-CC_LDFLAGS = -lieee 
-CC_PICFLAGS = -fPIC
-
-##################
-# Fortran compiler
-# typically, for compiling use: FFLAGS = $(FC_OPTIONS)
-# and for linking: $(FC) -o $(PROGRAM) $(OBJS) $(FC_LDFLAGS)
-##################
-FC = g77
-FC_OPTIONS = -O
-FC_LDFLAGS = -lieee -ldl -rdynamic
-FC_PICFLAGS = -fPIC
-
-########
-# Linker
-# typically, for linking: $(LD) -o $(PROGRAM) $(OBJS) $(LD_LDFLAGS)
-########
-LD = ld
-LD_LDFLAGS = -lieee
-
-##########
-# X Window: use $(XFLAGS) for compilation and $(XLIBS) for linking
-# typically, for compiling use: CFLAGS = $(CC_OPTIONS) $(XFLAGS)
-# and for linking with X Window
-#  with C compiler: $(CC) -o $(PROGRAM) $(OBJS) $(CC_LDFLAGS) $(XLIBS)
-#  with Fortran compiler: $(FC) -o $(PROGRAM) $(OBJS) $(FC_LDFLAGS) $(XLIBS)
-#  with linker: $(LD) -o $(PROGRAM) $(OBJS) $(LD_LDFLAGS) $(XLIBS)
-##########
-DLDLIB = 
-DLD_SUBDIR = 
-PVMLIB = /usr/local/scilab/pvm3/lib/LINUX/libpvm3.a
-PVMGLIB = /usr/local/scilab/pvm3/lib/LINUX/libgpvm3.a
-PVMROOT = /usr/local/scilab/pvm3
-PVMINCLUDE = /usr/local/scilab/pvm3/include
-XAWLIB = -lXaw3d
-XMULIB = -lXmu
-XAW_LOCAL_SUBDIR = 
-XAW_LOCAL_LIB = 
-XFLAGS =  -I/usr/X11R6/include 
-X_EXTRA_LIBS = 
-XLIBS = `gtk-config --libs` `gnome-config --libs  gtkxmhtml`  -L/usr/X11R6/lib $(XAWLIB) $(XMULIB) -lXt -lXext  -lSM -lICE -lX11 $(X_EXTRA_LIBS)
-
-#####################
-# TCL/TK
-#####################
-TK_INC_PATH = -I/usr/include
-TCL_INC_PATH = -I/usr/include
-TCLTK_LIBS =  -L/usr/lib -ltk8.3   -L/usr/lib -ltcl8.3  -ldl
-
-#####################
-# for WIN32 version 
-# win32 libraries for gcwin32 
-WIN32LIBS=-mwindows -lwsock32 -lshell32 -lcomctl32  -lwinspool -lm 
-WINLIBS = $(TCLTK_LIBS) $(WIN32LIBS)
-LINKEROPT= $(LD_LDFLAGS)
-# Ressource compiler 
-RC=windres 
-RCVARS=-O coff 
-
diff --git a/scilab/examples/callsci/callsciC/config/README b/scilab/examples/callsci/callsciC/config/README
deleted file mode 100644 (file)
index 0328049..0000000
+++ /dev/null
@@ -1,4 +0,0 @@
-
-The strange link ln -s ../config .
-is only here because make on dec machines 
-does not have the same rules than other unix make
diff --git a/scilab/examples/callsci/callsciC/config/callsci.sh b/scilab/examples/callsci/callsciC/config/callsci.sh
deleted file mode 100755 (executable)
index 74a7f12..0000000
+++ /dev/null
@@ -1,44 +0,0 @@
-#!/bin/sh
-if test "$PRINTERS" = ""; then
-  PRINTERS="lp"
-fi
-#############################################################################
-#                                                                           #
-#                       DO NOT MODIFY BELOW THIS LINE                       #
-#                                                                           #
-#############################################################################
-if test "$SCI" = ""; then
-  SCI="@SCI@"
-fi
-export SCI
-if test "$DISPLAY" = ""; then
-  DISPLAY="unix:0.0"
-fi
-export DISPLAY
-if test "$MANCHAPTERS" = ""; then
-  MANCHAPTERS=$SCI/man/Chapters
-fi
-export  MANCHAPTERS
-export PRINTERS
-VERSION="Scilab-2.7"
-export VERSION
-
-PVM_ROOT=$SCI/pvm3
-PVM_DPATH=$PVM_ROOT/lib/pvmd
-export PVM_ROOT PVM_DPATH
-
-TMPDIR=/tmp
-export TMPDIR
-
-do_callsci()
-{
-    PATH=$PATH:$SCI:$SCI/util
-    export PATH
-    XAPPLRESDIR=$SCI/X11_defaults
-    export XAPPLRESDIR
-    tty -s && stty kill '^U' intr '^C' erase '^H' quit '^\' eof '^D' susp '^Z'
-    ./callsci $* 
-}
-
-do_callsci
-
diff --git a/scilab/examples/callsci/callsciC/my_ode.c b/scilab/examples/callsci/callsciC/my_ode.c
deleted file mode 100644 (file)
index 459e484..0000000
+++ /dev/null
@@ -1,6 +0,0 @@
-
-int odeex(int *neq,double * t,double *y,double * ydot)
-{
-  ydot[0] = -y[0] + 2.0;
-  return 0;
-}
diff --git a/scilab/examples/callsci/callsciC/myprog.sh b/scilab/examples/callsci/callsciC/myprog.sh
deleted file mode 100755 (executable)
index 8e29145..0000000
+++ /dev/null
@@ -1,44 +0,0 @@
-#!/bin/sh
-if test "$PRINTERS" = ""; then
-  PRINTERS="lp"
-fi
-#############################################################################
-#                                                                           #
-#                       DO NOT MODIFY BELOW THIS LINE                       #
-#                                                                           #
-#############################################################################
-if test "$SCI" = ""; then
-  SCI="/usr/local/scilab"
-fi
-export SCI
-if test "$DISPLAY" = ""; then
-  DISPLAY="unix:0.0"
-fi
-export DISPLAY
-if test "$MANCHAPTERS" = ""; then
-  MANCHAPTERS=$SCI/man/Chapters
-fi
-export  MANCHAPTERS
-export PRINTERS
-VERSION="Scilab-2.7"
-export VERSION
-
-PVM_ROOT=$SCI/pvm3
-PVM_DPATH=$PVM_ROOT/lib/pvmd
-export PVM_ROOT PVM_DPATH
-
-TMPDIR=/tmp
-export TMPDIR
-
-do_callsci()
-{
-    PATH=$PATH:$SCI:$SCI/util
-    export PATH
-    XAPPLRESDIR=$SCI/X11_defaults
-    export XAPPLRESDIR
-    tty -s && stty kill '^U' intr '^C' erase '^H' quit '^\' eof '^D' susp '^Z'
-    ./myprog $* 
-}
-
-do_callsci
-
diff --git a/scilab/examples/callsci/callsciFortran/Makefile b/scilab/examples/callsci/callsciFortran/Makefile
deleted file mode 100644 (file)
index 5af150b..0000000
+++ /dev/null
@@ -1,28 +0,0 @@
-#--------------------------------------------------------
-# To be customized 
-#--------------------------------------------------------
-
-SCIDIR=../../../
-
-PROG=callsci
-OBJS=callsci.o
-
-#--------------------------------------------------------
-# do not modify below 
-#--------------------------------------------------------
-
-all    : .init 
-       make -f config/Makefile.all PROG=$(PROG) OBJS="$(OBJS)" SCIDIR=$(SCIDIR)
-
-.init  : Makefile 
-       config/Init $(PROG) $(SCIDIR) 
-       touch .init 
-
-clean  : 
-       rm -f $(PROG) $(OBJS)
-
-distclean : 
-       rm -f $(PROG) $(OBJS) $(PROG).sh .init config/Makefile 
-       rm -f config/Makefile.Top
-
diff --git a/scilab/examples/callsci/callsciFortran/README b/scilab/examples/callsci/callsciFortran/README
deleted file mode 100644 (file)
index 79f1a8d..0000000
+++ /dev/null
@@ -1,29 +0,0 @@
-    An example of calling scilab as a subroutine of a user's main program
-
-
-Useful files
-============
-
-    * callsci.f: Fortran Example of a usermain program. This main program send matrices 
-                (call matz) and commands (call scirun) to scilab and 
-                 gets the results back (call matz).
-    * callsci.sh : a small script which runs callsci with proper environment variables 
-    * callsci.sh.in : used to produce callsci.sh 
-
-    * Init : a script mainly used by the Makefile 
-
-Usage
-=====
-       Under unix/linux systems, edit the Makefile and fill the
-       variables SCIDIR variable with the path of your installed scilab 
-       then type make 
-
-       In order to run the generated callsci program type callsci.sh 
-       you can edit callsci.sh or callsci.sh.in to change environement
-       variables. 
-
-       SCI  : path of main scilab directory (to load libraries if necessary)
-       PRINTERS : available printer names
-       DISPLAY: xwindow output display
-       see <SCIDIR>/bin/scilab for more details
-
diff --git a/scilab/examples/callsci/callsciFortran/config/Init b/scilab/examples/callsci/callsciFortran/config/Init
deleted file mode 100755 (executable)
index ed46200..0000000
+++ /dev/null
@@ -1,14 +0,0 @@
-#!/bin/sh 
-#-----------------------------------------------------------
-# Usage: Init prog_name SCIDIR
-#-----------------------------------------------------------
-config=`egrep "include[ ]*config" $2/Makefile | sed -e "s/include[ ]*//"`
-sed -e "s+bin/scilex+$1+" -e 's/scilex-lib/$(OBJS)/' -e 's/$(DEFAULTS)/$(OBJS) $(DEFAULTS)/'  \
--e 's/$(MAINSCI)//'  $2/$config > config/Makefile
-cp  $2/Makefile.OBJ  config/Makefile.Top
-# copy the original Makefile.incl 
-cp $2/Makefile.incl config/
-if [ -f config/callsci.sh ];then 
-    sed -e "s+@SCI@+$2+" -e "s+./callsci+./$1+" config/callsci.sh > $1.sh
-    chmod +x $1.sh 
-fi;
diff --git a/scilab/examples/callsci/callsciFortran/config/Makefile.all b/scilab/examples/callsci/callsciFortran/config/Makefile.all
deleted file mode 100644 (file)
index b0141ef..0000000
+++ /dev/null
@@ -1,28 +0,0 @@
-#---------------------------------------------------------
-# This Makefile is to be run as 
-# make -f config/Makefile.all PROG=... SCIDIR=... OBJS=....
-#--------------------------------------------------------
-# do not modify below 
-#--------------------------------------------------------
-SHELL = /bin/sh
-
-include config/Makefile.incl
-
-CFLAGS = $(CC_OPTIONS) -I$(SCIDIR)/routines -DSCI=\"$(SCIDIR)\"
-FFLAGS = $(FC_OPTIONS) 
-CPPFLAGS= $(CC_OPTIONS) -I$(SCIDIR)/routines -DSCI=\"$(SCIDIR)\"
-
-all:: $(PROG) 
-
-world:: $(PROG) 
-
-include config/Makefile.Top
-include config/Makefile 
-
-distclean::
-       $(RM) $(PROG)
-       $(RM) -f -r  config ./configs 
-
-
-
-
diff --git a/scilab/examples/callsci/callsciFortran/config/Makefile.incl b/scilab/examples/callsci/callsciFortran/config/Makefile.incl
deleted file mode 100644 (file)
index 9b96234..0000000
+++ /dev/null
@@ -1,96 +0,0 @@
-# Generated automatically from Makefile.incl.in by configure.
-RM = rm -f
-AR = ar cq
-FILES_TO_CLEAN = *.CKP *.ln *.BAK *.bak core errs ,* *~ *.a .emacs_* tags TAGS make.log MakeOut .*~ *.trace so_locations *.orig *.cos
-
-all::
-
-clean::
-       @echo Cleaning 
-       @$(RM) $(FILES_TO_CLEAN)
-distclean::
-       @$(RM) $(FILES_TO_CLEAN)
-
-RANLIB = ranlib
-
-TERMCAPLIB = -ltermcap
-
-##################################################################
-# NOTE: the following schemes for compiling and linking are not  #
-#       exactly used for the main executable scilex; for it, see #
-#       the files Makefile.<host>                                #
-##################################################################
-
-############
-# C compiler
-# typically, for compiling use: CFLAGS = $(CC_OPTIONS)
-# and for linking: $(CC) -o $(PROGRAM) $(OBJS) $(CC_LDFLAGS)
-###########
-CC = cc
-CC_OPTIONS = -g -ieee_with_inexact
-CC_LDFLAGS = -ieee_with_inexact
-CC_PICFLAGS = 
-
-##################
-# Fortran compiler
-# typically, for compiling use: FFLAGS = $(FC_OPTIONS)
-# and for linking: $(FC) -o $(PROGRAM) $(OBJS) $(FC_LDFLAGS)
-##################
-FC = f77
-FC_OPTIONS = -g -fpe3
-FC_LDFLAGS = 
-FC_PICFLAGS = 
-
-
-########
-# Linker
-# typically, for linking: $(LD) -o $(PROGRAM) $(OBJS) $(LD_LDFLAGS)
-########
-LD = ld
-LD_LDFLAGS = 
-
-##########
-# X Window: use $(XFLAGS) for compilation and $(XLIBS) for linking
-# typically, for compiling use: CFLAGS = $(CC_OPTIONS) $(XFLAGS)
-# and for linking with X Window
-#  with C compiler: $(CC) -o $(PROGRAM) $(OBJS) $(CC_LDFLAGS) $(XLIBS)
-#  with Fortran compiler: $(FC) -o $(PROGRAM) $(OBJS) $(FC_LDFLAGS) $(XLIBS)
-#  with linker: $(LD) -o $(PROGRAM) $(OBJS) $(LD_LDFLAGS) $(XLIBS)
-##########
-DLDLIB = 
-DLD_SUBDIR = 
-PVMLIB = /usr/local/lib/scilab-2.5.1/pvm3/lib/ALPHA/libpvm3.a
-PVMGLIB = /usr/local/lib/scilab-2.5.1/pvm3/lib/ALPHA/libgpvm3.a
-PVMROOT = /usr/local/lib/scilab-2.5.1/pvm3
-XAWLIB = -lXaw
-XMULIB = -lXmu
-XAW_LOCAL_SUBDIR = 
-XAW_LOCAL_LIB = 
-XFLAGS =  
-X_EXTRA_LIBS =  -ldnet_stub
-XLIBS =  $(XAWLIB) $(XMULIB) -lXt -lXext  -lSM -lICE -lX11 $(X_EXTRA_LIBS)
-
-#####################
-# TCL/TK
-#####################
-TK_INC_PATH = -I/usr/local/include
-TCL_INC_PATH = -I/usr/local/include
-TCLTK_LIBS =   -ltk8.0    -ltcl8.0 
-
-#####################
-# for WIN32 version 
-# win32 libraries for gcwin32 
-WIN32LIBS=-mwindows -lwsock32 -lshell32 -lcomctl32  -lwinspool -lm 
-WINLIBS = -lf2c $(WIN32LIBS)
-# Ressource compiler 
-#
-RC=/msdev/bin/rc.exe
-RCVARS=-r -DWIN32
-# an other free resource compiler 
-#
-#RC=/softs/lccpub/bin/lrc 
-#RCVARS=/iC:/softs/lccpub/include
-# from .res to .o  
-CVTRES= /SOFTS/gnuwin32/b18/H-i386-cygwin32/bin/cvtres.exe
-# link options 
-LINKEROPT=-Wl,-subsystem,console
diff --git a/scilab/examples/callsci/callsciFortran/config/callsci.sh b/scilab/examples/callsci/callsciFortran/config/callsci.sh
deleted file mode 100755 (executable)
index 74a7f12..0000000
+++ /dev/null
@@ -1,44 +0,0 @@
-#!/bin/sh
-if test "$PRINTERS" = ""; then
-  PRINTERS="lp"
-fi
-#############################################################################
-#                                                                           #
-#                       DO NOT MODIFY BELOW THIS LINE                       #
-#                                                                           #
-#############################################################################
-if test "$SCI" = ""; then
-  SCI="@SCI@"
-fi
-export SCI
-if test "$DISPLAY" = ""; then
-  DISPLAY="unix:0.0"
-fi
-export DISPLAY
-if test "$MANCHAPTERS" = ""; then
-  MANCHAPTERS=$SCI/man/Chapters
-fi
-export  MANCHAPTERS
-export PRINTERS
-VERSION="Scilab-2.7"
-export VERSION
-
-PVM_ROOT=$SCI/pvm3
-PVM_DPATH=$PVM_ROOT/lib/pvmd
-export PVM_ROOT PVM_DPATH
-
-TMPDIR=/tmp
-export TMPDIR
-
-do_callsci()
-{
-    PATH=$PATH:$SCI:$SCI/util
-    export PATH
-    XAPPLRESDIR=$SCI/X11_defaults
-    export XAPPLRESDIR
-    tty -s && stty kill '^U' intr '^C' erase '^H' quit '^\' eof '^D' susp '^Z'
-    ./callsci $* 
-}
-
-do_callsci
-
index 2ac64df..25de5fd 100644 (file)
@@ -39,4 +39,6 @@ Source: modules\{#CORE}\macros\*.sci; DestDir: {app}\modules\{#CORE}\macros; Com
 ;
 Source: modules\{#CORE}\demos\*.*; DestDir: {app}\modules\{#CORE}\demos; Flags: recursesubdirs; Components: {#COMPN_SCILAB}
 ;
+Source: modules\{#CORE}\examples\*.*; DestDir: {app}\modules\{#CORE}\examples; Flags: recursesubdirs; Components: {#COMPN_SCILAB}
+;
 ;--------------------------------------------------------------------------------------------------------------
@@ -1,34 +1,34 @@
-SHELL = /bin/sh
-
-SCIDIR=../../..
-SCIDIR1=..\..\..
-
-DUMPEXTS="$(SCIDIR1)\bin\dumpexts"
-SCIIMPLIB=$(SCIDIR)/bin/LibScilab.lib
-
-CFLAGS= $(CC_OPTIONS) -DFORDLL -I"$(SCIDIR)/routines"
-CPPFLAGS= $(CC_OPTIONS) -DFORDLL -I"$(SCIDIR)/routines"
-
-!include $(SCIDIR)/Makefile.incl.mak 
-
-
-OBJSC= myprog.obj my_ode.obj
-
-all:: $(OBJSC) $(SCIDIR)/bin/prog.exe 
-
-distclean:: clean
-
-clean  ::
-       @del *.obj 
-
-distclean:: clean 
-       @del $(SCIDIR1)\bin\prog.*
-
-
-RESOURCES= $(SCIDIR)/routines/wsci/Rscilab.res 
-
-$(SCIDIR)/bin/prog.exe : $(OBJSC)
-       @echo "Linking" 
-       $(LINKER) $(LINKER_FLAGS) -OUT:"$*.exe" \
-       $(OBJSC) $(SCIDIR)/bin/LibScilab.lib $(XLIBSBIN) 
-       @echo "done " $(SCIDIR)/bin/prog.exe 
+SHELL = /bin/sh\r
+\r
+SCIDIR=../../../../../..\r
+SCIDIR1=..\..\..\..\..\..\r
+\r
+DUMPEXTS="$(SCIDIR1)\bin\dumpexts"\r
+SCIIMPLIB=$(SCIDIR)/bin/LibScilab.lib\r
+\r
+CFLAGS= $(CC_OPTIONS) -DFORDLL -I"$(SCIDIR)/routines"\r
+CPPFLAGS= $(CC_OPTIONS) -DFORDLL -I"$(SCIDIR)/routines"\r
+\r
+!include $(SCIDIR)/Makefile.incl.mak \r
+\r
+\r
+OBJSC= myprog.obj\r
+\r
+all:: $(OBJSC) $(SCIDIR)/bin/prog.exe \r
+\r
+distclean:: clean\r
+\r
+clean  ::\r
+       @del *.obj \r
+\r
+distclean:: clean \r
+       @del $(SCIDIR1)\bin\prog.*\r
+\r
+\r
+RESOURCES= $(SCIDIR)/routines/wsci/Rscilab.res \r
+\r
+$(SCIDIR)/bin/prog.exe : $(OBJSC)\r
+       @echo "Linking" \r
+       $(LINKER) $(LINKER_FLAGS) -OUT:"$*.exe" \\r
+       $(OBJSC) $(SCIDIR)/bin/LibScilab.lib $(XLIBSBIN) \r
+       @echo "done " $(SCIDIR)/bin/prog.exe \r
-/*------------------------------------------------------------*/
-/* Modified by Allan CORNET INRIA Mars 2005 */
-/*------------------------------------------------------------*/
-#include <math.h>
-#include <stdio.h> 
-#ifdef WIN32
-  #include <windows.h> 
-#endif
-
-#include <string.h> 
-
-#include "machine.h"
-#include "stack-c.h"
-
-/*------------------------------------------------------------*/
-/* 
- * Initialisation de Scilab 
- * avec execution de la startup 
- */
-/*------------------------------------------------------------*/
-#ifndef SCI 
-#define SCI "../.."
-#endif 
-/*------------------------------------------------------------*/
-#define TRUE 1
-#define FALSE 0
-/*------------------------------------------------------------*/
-/* See routines/system/CallScilab.h */
-extern int StartScilab(char *SCIpath,char *ScilabStartup,int *Stacksize);
-extern int TerminateScilab(char *ScilabQuit);
-extern int SendScilabJob(char *job);
-/*------------------------------------------------------------*/
-static int premier_exemple()
-{
-  static double A[]={1,2,3,4};  int mA=2,nA=2;
-  static double b[]={4,5};  int mb=2,nb=1;
-  int m,n,lp,i;
-  
-  SendScilabJob("disp('A=');");
-       SendScilabJob("disp(A);");
-       SendScilabJob("disp('b=');");
-       SendScilabJob("disp(b);");
-       SendScilabJob("disp('x=A\\b');");
-
-  WriteMatrix("A", &mA, &nA, A);
-  WriteMatrix("b", &mb, &nb, b);
-
-  if ( SendScilabJob("A,b,x=A\\b;") != 0) 
-    {
-      fprintf(stdout,"Error occured during scilab execution\n");
-    }
-  else 
-    {
-      GetMatrixptr("x", &m, &n, &lp);
-      for ( i=0 ; i < m*n ; i++) fprintf(stdout,"x[%d] = %5.2f\n",i,*stk(i+lp));
-    }
-  return 1;
-} 
-/*------------------------------------------------------------*/
-static int deuxieme_exemple() 
-{
-  int m,n,lx,ly,i;
-  /* j'utilise scilab pour creer les abscisses 
-   * et reserver de la place pour les ordonnees 
-   */ 
-  SendScilabJob("x=1:0.1:10;y=x;");
-  GetMatrixptr("x", &m, &n, &lx);  
-  GetMatrixptr("y", &m, &n, &ly);  
-  for ( i=0; i < m*n ; i++) 
-    { 
-      double xi = *stk(lx+i);
-      *stk(ly+i) = xi*sin(xi);
-    }
-  SendScilabJob("disp(''Click on figure to continue'');");  
-  /* plot(x,y);  */
-  SendScilabJob("plot(x,y);xclick();quit");
-  return 1;
-}
-/*------------------------------------------------------------*/
-int troisieme_exemple() 
-{
-  double x[]={1,0,0} ; int mx=3,nx=1;
-  double time[]={0.4,4}; int mt=1,nt=2;
-  fprintf(stdout,"linking ... \n");
-  #ifdef WIN32
-  SendScilabJob("ilib_for_link('odeex',SCI+'/examples/callsci/callsciC/my_ode.o',[],'c');");
-  #else
-  SendScilabJob("ilib_for_link('odeex','my_ode.o',[],'c');");
-  #endif
-  fprintf(stdout,"end of link  \n");
-  SendScilabJob("link('show')");
-  WriteMatrix("x", &mx, &nx, x);
-  WriteMatrix("time", &mt, &nt,time);
-  /* pour que scilab <<linke>> mon_edo */
-  /* appel de ode */
-  SendScilabJob("y=ode(x,0,time,''mon_ode''),");
-  return 0;
-}
-/*------------------------------------------------------------*/
-#ifndef _MSC_VER
-int MAIN__(void)
-#else
-int main(void)
-#endif 
-{
-#ifdef WIN32
-       if ( StartScilab(NULL,NULL,NULL) == FALSE ) printf("Error : StartScilab \n");
-#else
-    if ( StartScilab(SCI,NULL,NULL) == FALSE ) printf("Error : StartScilab \n");
- #endif
-
-       printf("\nexample 1\n");  
-       premier_exemple();
-  
-       printf("\nexample 2\n");  
-       deuxieme_exemple() ;
-       printf("\nexample 3\n");  
-       troisieme_exemple() ;
-       printf("\n\n");  
-  
-       if ( TerminateScilab(NULL) == FALSE ) printf("Error : TerminateScilab \n");
-       return 0;
-}
-/*------------------------------------------------------------*/
+/*------------------------------------------------------------*/\r
+/* Modified by Allan CORNET INRIA Mars 2005 */\r
+/*------------------------------------------------------------*/\r
+#include <math.h>\r
+#include <stdio.h> \r
+#ifdef WIN32\r
+  #include <windows.h> \r
+#endif\r
+\r
+#include <string.h> \r
+\r
+#include "machine.h"\r
+#include "stack-c.h"\r
+#include "CallScilab.h"\r
+\r
+/*------------------------------------------------------------*/\r
+/* \r
+ * Initialisation de Scilab \r
+ * avec execution de la startup \r
+ */\r
+/*------------------------------------------------------------*/\r
+#ifndef SCI \r
+#define SCI "../.."\r
+#endif \r
+/*------------------------------------------------------------*/\r
+#define TRUE 1\r
+#define FALSE 0\r
+/*------------------------------------------------------------*/\r
+/* See SCI/modules/core/includes/CallScilab.h */\r
+/*------------------------------------------------------------*/\r
+static int premier_exemple()\r
+{\r
+ static double A[]={1,2,3,4};  int mA=2,nA=2;\r
+       static double b[]={4,5};  int mb=2,nb=1;\r
+\r
+\r
+       /* Create Scilab matrices A and b */\r
+       WriteMatrix("A", &mA, &nA, A);\r
+       WriteMatrix("b", &mb, &nb, b);\r
+\r
+       SendScilabJob("disp('A=');");\r
+       SendScilabJob("disp(A);");\r
+       SendScilabJob("disp('b=');");\r
+       SendScilabJob("disp(b);");\r
+       SendScilabJob("disp('x=A\\b');");\r
+\r
+       if ( SendScilabJob("A,b,x=A\\b;") != 0) \r
+       {\r
+               fprintf(stdout,"Error occured during scilab execution (SendScilabJob)\n");\r
+       }\r
+       else \r
+       {\r
+               double *cxtmp=NULL;\r
+               int m,n,lp,i;\r
+\r
+               /* Get m and n */\r
+               GetMatrixptr("x", &m, &n, &lp);\r
+\r
+               cxtmp=(double*)malloc((m*n)*sizeof(double));\r
+\r
+               ReadMatrix("x", &m, &n, cxtmp);\r
+\r
+               for(i=0;i<m*n;i++)\r
+               {\r
+                       fprintf(stdout,"x[%d] = %5.2f\n",i,cxtmp[i]);\r
+               }\r
+\r
+               if (cxtmp) \r
+               {\r
+                       free(cxtmp);\r
+                       cxtmp=NULL;\r
+               }\r
+       }\r
+  return 0;\r
+} \r
+/*------------------------------------------------------------*/\r
+static int deuxieme_exemple() \r
+{\r
+  SendScilabJob("plot3d();");\r
+       printf("\nClose Graphical Windows to close this example.\n");\r
+       while( ScilabHaveAGraph() )\r
+       {\r
+               ScilabDoOneEvent();\r
+               Sleep(1);\r
+       }\r
+  return 1;\r
+}\r
+/*------------------------------------------------------------*/\r
+int troisieme_exemple() \r
+{\r
+  int code=0;\r
+\r
+       char **JOBS=NULL;\r
+       const int SizeJOBS=6;\r
+       int i=0;\r
+\r
+       JOBS=(char**)malloc(sizeof(char**)*SizeJOBS);\r
+\r
+       for (i=0;i<SizeJOBS;i++)\r
+       {\r
+               JOBS[i]=(char*)malloc(sizeof(char*)*1024);\r
+       }\r
+\r
+       strcpy(JOBS[0],"A=1 ..");\r
+       strcpy(JOBS[1],"+3;");\r
+       strcpy(JOBS[2],"B = 8;");\r
+       /* strcpy(JOBS[2],"b = V_NOT_EXIST;"); */\r
+       strcpy(JOBS[3],"+3;");\r
+       strcpy(JOBS[4],"disp('C=');");\r
+       strcpy(JOBS[5],"C=A+B;disp(C);"); /* C = 12 */\r
+\r
+       code=SendScilabJobs(JOBS,SizeJOBS);\r
+\r
+       if (code)\r
+       {\r
+               char lastjob[4096]; // bsiz in scilab 4096 max\r
+               if (GetLastJob(lastjob,4096))\r
+               {\r
+                       printf("Error %s\n",lastjob);\r
+               }\r
+       }\r
+\r
+       for (i=0;i<SizeJOBS;i++)\r
+       {\r
+               if (JOBS[i]) {free(JOBS[i]);JOBS[i]=NULL;}\r
+       }\r
+  return 0;\r
+}\r
+/*------------------------------------------------------------*/\r
+#ifndef _MSC_VER\r
+int MAIN__(void)\r
+#else\r
+int main(void)\r
+#endif \r
+{\r
+#ifdef WIN32\r
+       if ( StartScilab(NULL,NULL,NULL) == FALSE ) printf("Error : StartScilab \n");\r
+#else\r
+    if ( StartScilab(SCI,NULL,NULL) == FALSE ) printf("Error : StartScilab \n");\r
+ #endif\r
+\r
+       printf("\nexample 1\n");  \r
+       premier_exemple();\r
+  \r
+       printf("\nexample 2\n");  \r
+       deuxieme_exemple() ;\r
+       printf("\nexample 3\n");  \r
+       troisieme_exemple() ;\r
+       printf("\n\n");  \r
+  \r
+       if ( TerminateScilab(NULL) == FALSE ) printf("Error : TerminateScilab \n");\r
+       return 0;\r
+}\r
+/*------------------------------------------------------------*/\r
@@ -1,19 +1,20 @@
-Microsoft Visual Studio Solution File, Format Version 9.00
-# Visual Studio 2005
-Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Callsci Example ", "CallSciVC\CallSciVC.vcproj", "{0A05EAA1-BB0E-4221-A475-8A4DAD003CCA}"
-EndProject
-Global
-       GlobalSection(SolutionConfigurationPlatforms) = preSolution
-               Debug|Win32 = Debug|Win32
-               Release|Win32 = Release|Win32
-       EndGlobalSection
-       GlobalSection(ProjectConfigurationPlatforms) = postSolution
-               {0A05EAA1-BB0E-4221-A475-8A4DAD003CCA}.Debug|Win32.ActiveCfg = Debug|Win32
-               {0A05EAA1-BB0E-4221-A475-8A4DAD003CCA}.Debug|Win32.Build.0 = Debug|Win32
-               {0A05EAA1-BB0E-4221-A475-8A4DAD003CCA}.Release|Win32.ActiveCfg = Release|Win32
-               {0A05EAA1-BB0E-4221-A475-8A4DAD003CCA}.Release|Win32.Build.0 = Release|Win32
-       EndGlobalSection
-       GlobalSection(SolutionProperties) = preSolution
-               HideSolutionNode = FALSE
-       EndGlobalSection
-EndGlobal
+\r
+Microsoft Visual Studio Solution File, Format Version 9.00\r
+# Visual Studio 2005\r
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Callsci Example ", "CallSciVC.vcproj", "{0A05EAA1-BB0E-4221-A475-8A4DAD003CCA}"\r
+EndProject\r
+Global\r
+       GlobalSection(SolutionConfigurationPlatforms) = preSolution\r
+               Debug|Win32 = Debug|Win32\r
+               Release|Win32 = Release|Win32\r
+       EndGlobalSection\r
+       GlobalSection(ProjectConfigurationPlatforms) = postSolution\r
+               {0A05EAA1-BB0E-4221-A475-8A4DAD003CCA}.Debug|Win32.ActiveCfg = Debug|Win32\r
+               {0A05EAA1-BB0E-4221-A475-8A4DAD003CCA}.Debug|Win32.Build.0 = Debug|Win32\r
+               {0A05EAA1-BB0E-4221-A475-8A4DAD003CCA}.Release|Win32.ActiveCfg = Release|Win32\r
+               {0A05EAA1-BB0E-4221-A475-8A4DAD003CCA}.Release|Win32.Build.0 = Release|Win32\r
+       EndGlobalSection\r
+       GlobalSection(SolutionProperties) = preSolution\r
+               HideSolutionNode = FALSE\r
+       EndGlobalSection\r
+EndGlobal\r
-<?xml version="1.0" encoding="Windows-1252"?>
-<VisualStudioProject
-       ProjectType="Visual C++"
-       Version="8,00"
-       Name="Callsci Example "
-       ProjectGUID="{0A05EAA1-BB0E-4221-A475-8A4DAD003CCA}"
-       Keyword="Win32Proj"
-       >
-       <Platforms>
-               <Platform
-                       Name="Win32"
-               />
-       </Platforms>
-       <ToolFiles>
-       </ToolFiles>
-       <Configurations>
-               <Configuration
-                       Name="Debug|Win32"
-                       OutputDirectory="Debug"
-                       IntermediateDirectory="Debug"
-                       ConfigurationType="1"
-                       InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops"
-                       CharacterSet="2"
-                       >
-                       <Tool
-                               Name="VCPreBuildEventTool"
-                       />
-                       <Tool
-                               Name="VCCustomBuildTool"
-                       />
-                       <Tool
-                               Name="VCXMLDataGeneratorTool"
-                       />
-                       <Tool
-                               Name="VCWebServiceProxyGeneratorTool"
-                       />
-                       <Tool
-                               Name="VCMIDLTool"
-                       />
-                       <Tool
-                               Name="VCCLCompilerTool"
-                               Optimization="0"
-                               PreprocessorDefinitions="_DEBUG;_CONSOLE"
-                               MinimalRebuild="true"
-                               BasicRuntimeChecks="3"
-                               RuntimeLibrary="1"
-                               UsePrecompiledHeader="0"
-                               WarningLevel="3"
-                               Detect64BitPortabilityProblems="true"
-                               DebugInformationFormat="4"
-                       />
-                       <Tool
-                               Name="VCManagedResourceCompilerTool"
-                       />
-                       <Tool
-                               Name="VCResourceCompilerTool"
-                       />
-                       <Tool
-                               Name="VCPreLinkEventTool"
-                       />
-                       <Tool
-                               Name="VCLinkerTool"
-                               OutputFile="../../../../../bin/CallSciVC.exe"
-                               LinkIncremental="2"
-                               GenerateDebugInformation="true"
-                               ProgramDatabaseFile="$(OutDir)/CallSciVC.pdb"
-                               SubSystem="1"
-                               TargetMachine="1"
-                       />
-                       <Tool
-                               Name="VCALinkTool"
-                       />
-                       <Tool
-                               Name="VCManifestTool"
-                       />
-                       <Tool
-                               Name="VCXDCMakeTool"
-                       />
-                       <Tool
-                               Name="VCBscMakeTool"
-                       />
-                       <Tool
-                               Name="VCFxCopTool"
-                       />
-                       <Tool
-                               Name="VCAppVerifierTool"
-                       />
-                       <Tool
-                               Name="VCWebDeploymentTool"
-                       />
-                       <Tool
-                               Name="VCPostBuildEventTool"
-                       />
-               </Configuration>
-               <Configuration
-                       Name="Release|Win32"
-                       OutputDirectory="Release"
-                       IntermediateDirectory="Release"
-                       ConfigurationType="1"
-                       InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops"
-                       CharacterSet="2"
-                       >
-                       <Tool
-                               Name="VCPreBuildEventTool"
-                       />
-                       <Tool
-                               Name="VCCustomBuildTool"
-                       />
-                       <Tool
-                               Name="VCXMLDataGeneratorTool"
-                       />
-                       <Tool
-                               Name="VCWebServiceProxyGeneratorTool"
-                       />
-                       <Tool
-                               Name="VCMIDLTool"
-                       />
-                       <Tool
-                               Name="VCCLCompilerTool"
-                               PreprocessorDefinitions="NDEBUG;_CONSOLE"
-                               RuntimeLibrary="0"
-                               UsePrecompiledHeader="0"
-                               WarningLevel="3"
-                               Detect64BitPortabilityProblems="true"
-                               DebugInformationFormat="3"
-                       />
-                       <Tool
-                               Name="VCManagedResourceCompilerTool"
-                       />
-                       <Tool
-                               Name="VCResourceCompilerTool"
-                       />
-                       <Tool
-                               Name="VCPreLinkEventTool"
-                       />
-                       <Tool
-                               Name="VCLinkerTool"
-                               OutputFile="../../../../../bin/CallSciVC.exe"
-                               LinkIncremental="1"
-                               GenerateDebugInformation="true"
-                               SubSystem="1"
-                               OptimizeReferences="2"
-                               EnableCOMDATFolding="2"
-                               TargetMachine="1"
-                       />
-                       <Tool
-                               Name="VCALinkTool"
-                       />
-                       <Tool
-                               Name="VCManifestTool"
-                       />
-                       <Tool
-                               Name="VCXDCMakeTool"
-                       />
-                       <Tool
-                               Name="VCBscMakeTool"
-                       />
-                       <Tool
-                               Name="VCFxCopTool"
-                       />
-                       <Tool
-                               Name="VCAppVerifierTool"
-                       />
-                       <Tool
-                               Name="VCWebDeploymentTool"
-                       />
-                       <Tool
-                               Name="VCPostBuildEventTool"
-                       />
-               </Configuration>
-       </Configurations>
-       <References>
-       </References>
-       <Files>
-               <Filter
-                       Name="Source Files"
-                       Filter="cpp;c;cxx;def;odl;idl;hpj;bat;asm;asmx"
-                       UniqueIdentifier="{4FC737F1-C7A5-4376-A066-2A32D752A2FF}"
-                       >
-                       <File
-                               RelativePath=".\CallsciC.c"
-                               >
-                       </File>
-               </Filter>
-               <Filter
-                       Name="Header Files"
-                       Filter="h;hpp;hxx;hm;inl;inc;xsd"
-                       UniqueIdentifier="{93995380-89BD-4b04-88EB-625FBE52EBFB}"
-                       >
-               </Filter>
-               <Filter
-                       Name="Resource Files"
-                       Filter="rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx"
-                       UniqueIdentifier="{67DA6AB6-F800-4c08-8B7A-83BB121AAD01}"
-                       >
-               </Filter>
-       </Files>
-       <Globals>
-       </Globals>
-</VisualStudioProject>
+<?xml version="1.0" encoding="Windows-1252"?>\r
+<VisualStudioProject\r
+       ProjectType="Visual C++"\r
+       Version="8,00"\r
+       Name="Callsci Example "\r
+       ProjectGUID="{0A05EAA1-BB0E-4221-A475-8A4DAD003CCA}"\r
+       Keyword="Win32Proj"\r
+       >\r
+       <Platforms>\r
+               <Platform\r
+                       Name="Win32"\r
+               />\r
+       </Platforms>\r
+       <ToolFiles>\r
+       </ToolFiles>\r
+       <Configurations>\r
+               <Configuration\r
+                       Name="Debug|Win32"\r
+                       OutputDirectory="Debug"\r
+                       IntermediateDirectory="Debug"\r
+                       ConfigurationType="1"\r
+                       InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops"\r
+                       CharacterSet="2"\r
+                       >\r
+                       <Tool\r
+                               Name="VCPreBuildEventTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCCustomBuildTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCXMLDataGeneratorTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCWebServiceProxyGeneratorTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCMIDLTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCCLCompilerTool"\r
+                               Optimization="0"\r
+                               PreprocessorDefinitions="_DEBUG;_CONSOLE;_CRT_SECURE_NO_WARNINGS"\r
+                               MinimalRebuild="true"\r
+                               BasicRuntimeChecks="3"\r
+                               RuntimeLibrary="1"\r
+                               UsePrecompiledHeader="0"\r
+                               WarningLevel="3"\r
+                               Detect64BitPortabilityProblems="true"\r
+                               DebugInformationFormat="4"\r
+                       />\r
+                       <Tool\r
+                               Name="VCManagedResourceCompilerTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCResourceCompilerTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCPreLinkEventTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCLinkerTool"\r
+                               OutputFile="../../../../../../bin/CallSciVC.exe"\r
+                               LinkIncremental="2"\r
+                               GenerateDebugInformation="true"\r
+                               ProgramDatabaseFile="$(OutDir)/CallSciVC.pdb"\r
+                               SubSystem="1"\r
+                               TargetMachine="1"\r
+                       />\r
+                       <Tool\r
+                               Name="VCALinkTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCManifestTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCXDCMakeTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCBscMakeTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCFxCopTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCAppVerifierTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCWebDeploymentTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCPostBuildEventTool"\r
+                       />\r
+               </Configuration>\r
+               <Configuration\r
+                       Name="Release|Win32"\r
+                       OutputDirectory="Release"\r
+                       IntermediateDirectory="Release"\r
+                       ConfigurationType="1"\r
+                       InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops"\r
+                       CharacterSet="2"\r
+                       >\r
+                       <Tool\r
+                               Name="VCPreBuildEventTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCCustomBuildTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCXMLDataGeneratorTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCWebServiceProxyGeneratorTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCMIDLTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCCLCompilerTool"\r
+                               PreprocessorDefinitions="NDEBUG;_CONSOLE;_CRT_SECURE_NO_WARNINGS"\r
+                               RuntimeLibrary="0"\r
+                               UsePrecompiledHeader="0"\r
+                               WarningLevel="3"\r
+                               Detect64BitPortabilityProblems="true"\r
+                               DebugInformationFormat="3"\r
+                       />\r
+                       <Tool\r
+                               Name="VCManagedResourceCompilerTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCResourceCompilerTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCPreLinkEventTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCLinkerTool"\r
+                               OutputFile="../../../../../../bin/CallSciVC.exe"\r
+                               LinkIncremental="1"\r
+                               GenerateDebugInformation="true"\r
+                               SubSystem="1"\r
+                               OptimizeReferences="2"\r
+                               EnableCOMDATFolding="2"\r
+                               TargetMachine="1"\r
+                       />\r
+                       <Tool\r
+                               Name="VCALinkTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCManifestTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCXDCMakeTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCBscMakeTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCFxCopTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCAppVerifierTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCWebDeploymentTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCPostBuildEventTool"\r
+                       />\r
+               </Configuration>\r
+       </Configurations>\r
+       <References>\r
+       </References>\r
+       <Files>\r
+               <Filter\r
+                       Name="Source Files"\r
+                       Filter="cpp;c;cxx;def;odl;idl;hpj;bat;asm;asmx"\r
+                       UniqueIdentifier="{4FC737F1-C7A5-4376-A066-2A32D752A2FF}"\r
+                       >\r
+                       <File\r
+                               RelativePath=".\CallsciC.c"\r
+                               >\r
+                       </File>\r
+               </Filter>\r
+               <Filter\r
+                       Name="Header Files"\r
+                       Filter="h;hpp;hxx;hm;inl;inc;xsd"\r
+                       UniqueIdentifier="{93995380-89BD-4b04-88EB-625FBE52EBFB}"\r
+                       >\r
+               </Filter>\r
+               <Filter\r
+                       Name="Resource Files"\r
+                       Filter="rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx"\r
+                       UniqueIdentifier="{67DA6AB6-F800-4c08-8B7A-83BB121AAD01}"\r
+                       >\r
+               </Filter>\r
+       </Files>\r
+       <Globals>\r
+       </Globals>\r
+</VisualStudioProject>\r
-/* Allan CORNET */
-/* Scilab, INRIA 2004 */
-/* Only For Windows */
-/*-----------------------------------------------------------------------------------*/
-#pragma comment(lib, "../../../../../bin/libScilab.lib")
-#pragma comment(lib, "../../../../../bin/MALLOC.lib")
-/*-----------------------------------------------------------------------------------*/
-
-#include <windows.h>
-#include <math.h>
-#include <stdio.h> 
-#include <string.h> 
-#include <conio.h> 
-
-#include "../../../../../modules/core/includes/machine.h"
-#include "../../../../../modules/core/includes/stack-c.h"
-#define TRUE 1
-#define FALSE 0
-/*-----------------------------------------------------------------------------------*/
-/* See routines/system/CallScilab.h */
-extern int StartScilab(char *SCIpath,char *ScilabStartup,int *Stacksize);
-extern int TerminateScilab(char *ScilabQuit);
-extern int SendScilabJob(char *job); 
-extern int SendScilabJobs(char **job,int numberjobs); 
-extern void ScilabDoOneEvent(void);
-extern int ScilabHaveAGraph(void);
-/*-----------------------------------------------------------------------------------*/
-static int example1(void)
-{
-       static double A[]={1,2,3,4};  int mA=2,nA=2;
-       static double b[]={4,5};  int mb=2,nb=1;
-
-
-       /* Create Scilab matrices A and b */
-       WriteMatrix("A", &mA, &nA, A);
-       WriteMatrix("b", &mb, &nb, b);
-
-       SendScilabJob("disp('A=');");
-       SendScilabJob("disp(A);");
-       SendScilabJob("disp('b=');");
-       SendScilabJob("disp(b);");
-       SendScilabJob("disp('x=A\\b');");
-
-       if ( SendScilabJob("A,b,x=A\\b;") != 0) 
-       {
-               fprintf(stdout,"Error occured during scilab execution (SendScilabJob)\n");
-       }
-       else 
-       {
-               double *cxtmp=NULL;
-               int m,n,lp,i;
-
-               /* Get m and n */
-               GetMatrixptr("x", &m, &n, &lp);
-
-               cxtmp=(double*)malloc((m*n)*sizeof(double));
-
-               ReadMatrix("x", &m, &n, cxtmp);
-
-               for(i=0;i<m*n;i++)
-               {
-                       fprintf(stdout,"x[%d] = %5.2f\n",i,cxtmp[i]);
-               }
-
-               if (cxtmp) 
-               {
-                       free(cxtmp);
-                       cxtmp=NULL;
-               }
-       }
-       return 0;
-}
-/*-----------------------------------------------------------------------------------*/
-static int example2(void)
-{
-       SendScilabJob("plot3d();");
-       printf("\nClose Graphical Windows to close this example.\n");
-       while( ScilabHaveAGraph() )
-       {
-               ScilabDoOneEvent();
-               Sleep(1);
-       }
-       return 1; 
-}
-/*-----------------------------------------------------------------------------------*/
-static int example3(void)
-{
-       int code=0;
-
-       char **JOBS=NULL;
-       const int SizeJOBS=6;
-       int i=0;
-
-       JOBS=(char**)malloc(sizeof(char**)*SizeJOBS);
-
-       for (i=0;i<SizeJOBS;i++)
-       {
-               JOBS[i]=(char*)malloc(sizeof(char*)*1024);
-       }
-
-       strcpy(JOBS[0],"A=1 ..");
-       strcpy(JOBS[1],"+3;");
-       strcpy(JOBS[2],"B = 8;");
-       /* strcpy(JOBS[2],"b = V_NOT_EXIST;"); */
-       strcpy(JOBS[3],"+3;");
-       strcpy(JOBS[4],"disp('C=');");
-       strcpy(JOBS[5],"C=A+B;disp(C);"); /* C = 12 */
-
-       code=SendScilabJobs(JOBS,SizeJOBS);
-
-       if (code)
-       {
-               char lastjob[4096]; // bsiz in scilab 4096 max
-               if (GetLastJob(lastjob))
-               {
-                       printf("Error %s\n",lastjob);
-               }
-       }
-
-       for (i=0;i<SizeJOBS;i++)
-       {
-               if (JOBS[i]) {free(JOBS[i]);JOBS[i]=NULL;}
-       }
-       return 1;
-}
-/*-----------------------------------------------------------------------------------*/
-int main(void)
-/* int WINAPI WinMain (HINSTANCE hInstance, HINSTANCE hPrevInstance,LPSTR szCmdLine, int iCmdShow) */
-{
-       if ( StartScilab(NULL,NULL,NULL) == FALSE ) printf("Error : StartScilab \n");
-
-       printf("\nexample 1\n");
-       example1();
-       system("pause");
-       printf("\nexample 2\n");
-       example2();
-       system("pause");
-       printf("\nexample 3\n");
-       example3();
-       system("pause");
-       
-       if ( TerminateScilab(NULL) == FALSE ) printf("Error : TerminateScilab \n");
-       return 0;
-}
-/*-----------------------------------------------------------------------------------*/
+/* Allan CORNET */\r
+/* Scilab, INRIA 2004 */\r
+/* Only For Windows */\r
+/*-----------------------------------------------------------------------------------*/\r
+#pragma comment(lib, "../../../../../../bin/libScilab.lib")\r
+#pragma comment(lib, "../../../../../../bin/MALLOC.lib")\r
+/*-----------------------------------------------------------------------------------*/\r
+#include <windows.h>\r
+#include <math.h>\r
+#include <stdio.h> \r
+#include <string.h> \r
+#include <conio.h> \r
+\r
+#include "../../../../../../modules/core/includes/machine.h"\r
+#include "../../../../../../modules/core/includes/stack-c.h"\r
+#include "../../../../../../modules/core/includes/CallScilab.h"\r
+#define TRUE 1\r
+#define FALSE 0\r
+/*-----------------------------------------------------------------------------------*/\r
+/* See SCI/modules/core/includes/CallScilab.h */\r
+/*-----------------------------------------------------------------------------------*/\r
+static int example1(void)\r
+{\r
+       static double A[]={1,2,3,4};  int mA=2,nA=2;\r
+       static double b[]={4,5};  int mb=2,nb=1;\r
+\r
+\r
+       /* Create Scilab matrices A and b */\r
+       WriteMatrix("A", &mA, &nA, A);\r
+       WriteMatrix("b", &mb, &nb, b);\r
+\r
+       SendScilabJob("disp('A=');");\r
+       SendScilabJob("disp(A);");\r
+       SendScilabJob("disp('b=');");\r
+       SendScilabJob("disp(b);");\r
+       SendScilabJob("disp('x=A\\b');");\r
+\r
+       if ( SendScilabJob("A,b,x=A\\b;") != 0) \r
+       {\r
+               fprintf(stdout,"Error occured during scilab execution (SendScilabJob)\n");\r
+       }\r
+       else \r
+       {\r
+               double *cxtmp=NULL;\r
+               int m,n,lp,i;\r
+\r
+               /* Get m and n */\r
+               GetMatrixptr("x", &m, &n, &lp);\r
+\r
+               cxtmp=(double*)malloc((m*n)*sizeof(double));\r
+\r
+               ReadMatrix("x", &m, &n, cxtmp);\r
+\r
+               for(i=0;i<m*n;i++)\r
+               {\r
+                       fprintf(stdout,"x[%d] = %5.2f\n",i,cxtmp[i]);\r
+               }\r
+\r
+               if (cxtmp) \r
+               {\r
+                       free(cxtmp);\r
+                       cxtmp=NULL;\r
+               }\r
+       }\r
+       return 0;\r
+}\r
+/*-----------------------------------------------------------------------------------*/\r
+static int example2(void)\r
+{\r
+       SendScilabJob("plot3d();");\r
+       printf("\nClose Graphical Windows to close this example.\n");\r
+       while( ScilabHaveAGraph() )\r
+       {\r
+               ScilabDoOneEvent();\r
+               Sleep(1);\r
+       }\r
+       return 1; \r
+}\r
+/*-----------------------------------------------------------------------------------*/\r
+static int example3(void)\r
+{\r
+       int code=0;\r
+\r
+       char **JOBS=NULL;\r
+       const int SizeJOBS=6;\r
+       int i=0;\r
+\r
+       JOBS=(char**)malloc(sizeof(char**)*SizeJOBS);\r
+\r
+       for (i=0;i<SizeJOBS;i++)\r
+       {\r
+               JOBS[i]=(char*)malloc(sizeof(char*)*1024);\r
+       }\r
+\r
+       strcpy(JOBS[0],"A=1 ..");\r
+       strcpy(JOBS[1],"+3;");\r
+       strcpy(JOBS[2],"B = 8;");\r
+       /* strcpy(JOBS[2],"b = V_NOT_EXIST;"); */\r
+       strcpy(JOBS[3],"+3;");\r
+       strcpy(JOBS[4],"disp('C=');");\r
+       strcpy(JOBS[5],"C=A+B;disp(C);"); /* C = 12 */\r
+\r
+       code=SendScilabJobs(JOBS,SizeJOBS);\r
+\r
+       if (code)\r
+       {\r
+               char lastjob[4096]; // bsiz in scilab 4096 max\r
+               if (GetLastJob(lastjob,4096))\r
+               {\r
+                       printf("Error %s\n",lastjob);\r
+               }\r
+       }\r
+\r
+       for (i=0;i<SizeJOBS;i++)\r
+       {\r
+               if (JOBS[i]) {free(JOBS[i]);JOBS[i]=NULL;}\r
+       }\r
+       return 1;\r
+}\r
+/*-----------------------------------------------------------------------------------*/\r
+int main(void)\r
+/* int WINAPI WinMain (HINSTANCE hInstance, HINSTANCE hPrevInstance,LPSTR szCmdLine, int iCmdShow) */\r
+{\r
+       if ( StartScilab(NULL,NULL,NULL) == FALSE ) printf("Error : StartScilab \n");\r
+\r
+       printf("\nexample 1\n");\r
+       example1();\r
+       system("pause");\r
+       printf("\nexample 2\n");\r
+       example2();\r
+       system("pause");\r
+       printf("\nexample 3\n");\r
+       example3();\r
+       system("pause");\r
+       \r
+       if ( TerminateScilab(NULL) == FALSE ) printf("Error : TerminateScilab \n");\r
+       return 0;\r
+}\r
+/*-----------------------------------------------------------------------------------*/\r
@@ -1,19 +1,19 @@
-How to make calls to Scilab interpreter from Borland C++ 6
-
-Import Scilab library (LibScilab.dll) to Borland
-
-on a Command line
-
-impdef Libscilab.def Libscilab.dll
-implib Libscilab.lib Libscilab.def
-
-Add Libscilab.lib in your Borland C++ project in "import library"
-
-
-(On Google see 'Borland import library')
-
-That's all 
-
-Allan CORNET
-September 2006
-Scilab Team
+How to make calls to Scilab interpreter from Borland C++ 6\r
+\r
+Import Scilab library (LibScilab.dll) to Borland\r
+\r
+on a Command line\r
+\r
+impdef Libscilab.def Libscilab.dll\r
+implib Libscilab.lib Libscilab.def\r
+\r
+Add Libscilab.lib in your Borland C++ project in "import library"\r
+\r
+\r
+(On Google see 'Borland import library')\r
+\r
+That's all \r
+\r
+Allan CORNET\r
+September 2006\r
+Scilab Team\r
@@ -1,32 +1,39 @@
-SHELL = /bin/sh
-
-SCIDIR=../../..
-SCIDIR1=..\..\..
-
-DUMPEXTS="$(SCIDIR1)\bin\dumpexts"
-SCIIMPLIB=$(SCIDIR)/bin/LibScilab.lib
-
-CFLAGS= $(CC_OPTIONS) -DFORDLL -I"$(SCIDIR)/routines" /EHsc
-CPPFLAGS= $(CC_OPTIONS) -DFORDLL -I"$(SCIDIR)/routines" /EHsc
-
-!include $(SCIDIR)/Makefile.incl.mak 
-
-OBJSC = myprog.obj ccmatrix1.obj 
-
-all:: $(OBJSC)  $(SCIDIR)/bin/prog.exe 
-
-distclean:: clean
-
-clean  ::
-       @del *.obj 
-
-distclean:: clean 
-       @del $(SCIDIR1)\bin\prog.*
-       @del libodeex.* loader.sce Makelib.mak
-
-
-$(SCIDIR)/bin/prog.exe : $(OBJSC)
-       @echo "Linking" 
-       $(LINKER) $(LINKER_FLAGS) -OUT:"$*.exe"  \
-       $(OBJSC) $(SCIDIR)/bin/LibScilab.lib $(TKLIBS) $(PVMLIB) $(GUI)  -NODEFAULTLIB:msvcrt.lib 
-       @echo "done " $(SCIDIR)/bin/prog.exe 
+SHELL = /bin/sh\r
+\r
+SCIDIR=../../../../../..\r
+SCIDIR1=..\..\..\..\..\..\r
+\r
+DUMPEXTS="$(SCIDIR1)\bin\dumpexts"\r
+SCIIMPLIB=$(SCIDIR)/bin/LibScilab.lib\r
+\r
+CFLAGS= $(CC_OPTIONS) -DFORDLL -I"$(SCIDIR)/modules/core/includes" /EHsc\r
+CPPFLAGS= $(CC_OPTIONS) -DFORDLL -I"$(SCIDIR)/modules/core/includes" /EHsc\r
+\r
+!include $(SCIDIR)/Makefile.incl.mak \r
+\r
+OBJSC = myprog.obj ccmatrix1.obj \r
+\r
+all:: $(OBJSC)  $(SCIDIR)/bin/prog.exe \r
+\r
+distclean:: clean\r
+\r
+clean  ::\r
+       @del *.obj \r
+       @del *.lib\r
+       @del *.dll\r
+       @del *.exp\r
+       @del *.def\r
+       @del Makelib.mak\r
+       @del loader.sce\r
+       \r
+\r
+distclean:: clean \r
+       @del $(SCIDIR1)\bin\prog.exe\r
+\r
+\r
+\r
+$(SCIDIR)/bin/prog.exe : $(OBJSC)\r
+       @echo "Linking" \r
+       $(LINKER) $(LINKER_FLAGS) -OUT:"$*.exe"  \\r
+       $(OBJSC) $(SCIDIR)/bin/LibScilab.lib $(TKLIBS) $(PVMLIB) $(GUI)  -NODEFAULTLIB:msvcrt.lib \r
+       @echo "done " $(SCIDIR)/bin/prog.exe \r
@@ -1,23 +1,23 @@
-#ifndef _cc_matrix_H_
-#define _cc_matrix_H_
-
-
-class CMatrix 
-{
- private: 
-  int m,n;
-  char *name;
-  double *v;
-
- public:
-  CMatrix(char *name1,char *job);
-  void scijob(char *jobname);
-  CMatrix& plus(CMatrix &B);
-  void print();
-  void inv();
-
-};
-
-#endif
-
-
+#ifndef _cc_matrix_H_\r
+#define _cc_matrix_H_\r
+\r
+\r
+class CMatrix \r
+{\r
+ private: \r
+  int m,n;\r
+  char *name;\r
+  double *v;\r
+\r
+ public:\r
+  CMatrix(char *name1,char *job);\r
+  void scijob(char *jobname);\r
+  CMatrix& plus(CMatrix &B);\r
+  void print();\r
+  void inv();\r
+\r
+};\r
+\r
+#endif\r
+\r
+\r
@@ -1,86 +1,86 @@
-#include <iostream>
-#include "ccmatrix.h"
-
-
-class SciError {};
-
-// CMatrix A(name,job);
-
-extern "C" {
-#include <stdio.h>
-#include <string.h>
-#undef _PARAMS
-#include "stack-c.h"
-int SendScilabJob(char *);
-void cc_test();
-
-}
-
-static char buf[256];
-
-CMatrix::CMatrix(char *name1,char *job)
-{
-  sprintf(buf,"%s=%s;",name1,job);
-  if ( SendScilabJob(buf) != 0) 
-    throw SciError();
-  else 
-    {
-      int lp;
-      C2F(cmatptr)(name1, &m, &n, &lp,strlen(name1));
-      v = stk(lp);
-    }
-  name = new char[strlen(name1)+1];
-  strcpy(name,name1);
-}
-
-
-void CMatrix::scijob(char *jobname)
-{
-  sprintf(buf,jobname,name);
-  if ( SendScilabJob(buf) != 0) 
-    throw SciError();
-}
-
-CMatrix& CMatrix::plus(CMatrix &B)
-{
-  sprintf(buf,"%s=%s+%s",this->name,this->name,B.name);
-  if ( SendScilabJob(buf) != 0) 
-    throw SciError();
-  int lp;
-  C2F(cmatptr)(name, &m, &n, &lp,strlen(name));
-  v = stk(lp);
-  return *this;
-}
-
-void CMatrix::print()
-{
-  fprintf(stdout,"Matrix %s=\n",name);
-  scijob("disp(%s)");
-}
-
-void CMatrix::inv()
-{
-  sprintf(buf,"%s=inv(%s)",name,name);
-  if ( SendScilabJob(buf) != 0) 
-    throw SciError();
-  int lp;
-  C2F(cmatptr)(name, &m, &n, &lp,strlen(name));
-  v = stk(lp);
-}
-
-
-void cc_test() 
-{
-  CMatrix A("a","ones(2,2)");
-  CMatrix B("b","8");
-  A.plus(B);
-  A.scijob("disp(%s);");
-  A.scijob("%s=rand(2,2)");
-  A.print();
-  A.inv();
-  A.print();
-}
-
-
-
-
+#include <iostream>\r
+#include "ccmatrix.h"\r
+\r
+\r
+class SciError {};\r
+\r
+// CMatrix A(name,job);\r
+\r
+extern "C" {\r
+#include <stdio.h>\r
+#include <string.h>\r
+#undef _PARAMS\r
+#include "stack-c.h"\r
+int SendScilabJob(char *);\r
+void cc_test();\r
+\r
+}\r
+\r
+static char buf[256];\r
+\r
+CMatrix::CMatrix(char *name1,char *job)\r
+{\r
+  sprintf(buf,"%s=%s;",name1,job);\r
+  if ( SendScilabJob(buf) != 0) \r
+    throw SciError();\r
+  else \r
+    {\r
+      int lp;\r
+      C2F(cmatptr)(name1, &m, &n, &lp,strlen(name1));\r
+      v = stk(lp);\r
+    }\r
+  name = new char[strlen(name1)+1];\r
+  strcpy(name,name1);\r
+}\r
+\r
+\r
+void CMatrix::scijob(char *jobname)\r
+{\r
+  sprintf(buf,jobname,name);\r
+  if ( SendScilabJob(buf) != 0) \r
+    throw SciError();\r
+}\r
+\r
+CMatrix& CMatrix::plus(CMatrix &B)\r
+{\r
+  sprintf(buf,"%s=%s+%s",this->name,this->name,B.name);\r
+  if ( SendScilabJob(buf) != 0) \r
+    throw SciError();\r
+  int lp;\r
+  C2F(cmatptr)(name, &m, &n, &lp,strlen(name));\r
+  v = stk(lp);\r
+  return *this;\r
+}\r
+\r
+void CMatrix::print()\r
+{\r
+  fprintf(stdout,"Matrix %s=\n",name);\r
+  scijob("disp(%s)");\r
+}\r
+\r
+void CMatrix::inv()\r
+{\r
+  sprintf(buf,"%s=inv(%s)",name,name);\r
+  if ( SendScilabJob(buf) != 0) \r
+    throw SciError();\r
+  int lp;\r
+  C2F(cmatptr)(name, &m, &n, &lp,strlen(name));\r
+  v = stk(lp);\r
+}\r
+\r
+\r
+void cc_test() \r
+{\r
+  CMatrix A("a","ones(2,2)");\r
+  CMatrix B("b","8");\r
+  A.plus(B);\r
+  A.scijob("disp(%s);");\r
+  A.scijob("%s=rand(2,2)");\r
+  A.print();\r
+  A.inv();\r
+  A.print();\r
+}\r
+\r
+\r
+\r
+\r
@@ -1,85 +1,85 @@
-#include <iostream>
-#include "ccmatrix.h"
-
-
-class SciError {};
-
-// CMatrix A(name,job);
-
-extern "C" {
-#include <stdio.h>
-#undef _PARAMS
-#include "stack-c.h"
-int send_scilab_job(char *,long int);
-void cc_test();
-
-}
-
-static char buf[256];
-
-CMatrix::CMatrix(char *name1,char *job)
-{
-  sprintf(buf,"%s=%s;",name1,job);
-  if ( send_scilab_job(buf,strlen(buf)) != 0) 
-    throw SciError();
-  else 
-    {
-      int lp;
-      C2F(cmatptr)(name1, &m, &n, &lp,strlen(name1));
-      v = stk(lp);
-    }
-  name = new char[strlen(name1)+1];
-  strcpy(name,name1);
-}
-
-
-void CMatrix::scijob(char *jobname)
-{
-  sprintf(buf,jobname,name);
-  if ( send_scilab_job(buf,strlen(buf)) != 0) 
-    throw SciError();
-}
-
-CMatrix& CMatrix::plus(CMatrix &B)
-{
-  sprintf(buf,"%s=%s+%s",this->name,this->name,B.name);
-  if ( send_scilab_job(buf,strlen(buf)) != 0) 
-    throw SciError();
-  int lp;
-  C2F(cmatptr)(name, &m, &n, &lp,strlen(name));
-  v = stk(lp);
-  return *this;
-}
-
-void CMatrix::print()
-{
-  fprintf(stdout,"Matrix %s=\n",name);
-  scijob("disp(%s)");
-}
-
-void CMatrix::inv()
-{
-  sprintf(buf,"%s=inv(%s)",name,name);
-  if ( send_scilab_job(buf,strlen(buf)) != 0) 
-    throw SciError();
-  int lp;
-  C2F(cmatptr)(name, &m, &n, &lp,strlen(name));
-  v = stk(lp);
-}
-
-
-void cc_test() 
-{
-  CMatrix A("a","ones(2,2)");
-  CMatrix B("b","8");
-  A.plus(B);
-  A.scijob("disp(%s);");
-  A.scijob("%s=rand(2,2)");
-  A.print();
-  A.inv();
-  A.print();
-}
-
-
-
-
+#include <iostream>\r
+#include "ccmatrix.h"\r
+\r
+\r
+class SciError {};\r
+\r
+// CMatrix A(name,job);\r
+\r
+extern "C" {\r
+#include <stdio.h>\r
+#undef _PARAMS\r
+#include "stack-c.h"\r
+int send_scilab_job(char *,long int);\r
+void cc_test();\r
+\r
+}\r
+\r
+static char buf[256];\r
+\r
+CMatrix::CMatrix(char *name1,char *job)\r
+{\r
+  sprintf(buf,"%s=%s;",name1,job);\r
+  if ( send_scilab_job(buf,strlen(buf)) != 0) \r
+    throw SciError();\r
+  else \r
+    {\r
+      int lp;\r
+      C2F(cmatptr)(name1, &m, &n, &lp,strlen(name1));\r
+      v = stk(lp);\r
+    }\r
+  name = new char[strlen(name1)+1];\r
+  strcpy(name,name1);\r
+}\r
+\r
+\r
+void CMatrix::scijob(char *jobname)\r
+{\r
+  sprintf(buf,jobname,name);\r
+  if ( send_scilab_job(buf,strlen(buf)) != 0) \r
+    throw SciError();\r
+}\r
+\r
+CMatrix& CMatrix::plus(CMatrix &B)\r
+{\r
+  sprintf(buf,"%s=%s+%s",this->name,this->name,B.name);\r
+  if ( send_scilab_job(buf,strlen(buf)) != 0) \r
+    throw SciError();\r
+  int lp;\r
+  C2F(cmatptr)(name, &m, &n, &lp,strlen(name));\r
+  v = stk(lp);\r
+  return *this;\r
+}\r
+\r
+void CMatrix::print()\r
+{\r
+  fprintf(stdout,"Matrix %s=\n",name);\r
+  scijob("disp(%s)");\r
+}\r
+\r
+void CMatrix::inv()\r
+{\r
+  sprintf(buf,"%s=inv(%s)",name,name);\r
+  if ( send_scilab_job(buf,strlen(buf)) != 0) \r
+    throw SciError();\r
+  int lp;\r
+  C2F(cmatptr)(name, &m, &n, &lp,strlen(name));\r
+  v = stk(lp);\r
+}\r
+\r
+\r
+void cc_test() \r
+{\r
+  CMatrix A("a","ones(2,2)");\r
+  CMatrix B("b","8");\r
+  A.plus(B);\r
+  A.scijob("disp(%s);");\r
+  A.scijob("%s=rand(2,2)");\r
+  A.print();\r
+  A.inv();\r
+  A.print();\r
+}\r
+\r
+\r
+\r
+\r
@@ -1,6 +1,6 @@
-
-int odeex(int *neq,double * t,double *y,double * ydot)
-{
-  ydot[0] = -y[0] + 2.0;
-  return 0;
-}
+\r
+int odeex(int *neq,double * t,double *y,double * ydot)\r
+{\r
+  ydot[0] = -y[0] + 2.0;\r
+  return 0;\r
+}\r
-#include <stdio.h> 
-#include "machine.h"
-#include "stack-c.h"
-/*-----------------------------------------------------------------------------------*/ 
-#ifndef SCI
-       #define SCI "SCI=../../.." 
-#endif 
-#define TRUE 1
-#define FALSE 0
-/*-----------------------------------------------------------------------------------*/ 
-/* See routines/system/CallScilab.h */
-extern int StartScilab(char *SCIpath,char *ScilabStartup,int *Stacksize);
-extern int TerminateScilab(char *ScilabQuit);
-extern int SendScilabJob(char *job); 
-/*-----------------------------------------------------------------------------------*/ 
-double f(double x)
-{
-  return x*x + 1;
-}
-/*-----------------------------------------------------------------------------------*/ 
-static int my_plot() 
-{
-  int m,n,lx,ly,i;
-  /* Scilab is called to build the abscissae vector and 
-     to allocate the ordinates */
-
-  SendScilabJob("x=1:0.1:10;y=x;");
-  GetMatrixptr("x", &m, &n, &lx);  
-  GetMatrixptr("y", &m, &n, &ly);  
-  /* 
-   * y(i)=f(x(i))
-   */
-  for ( i=0; i < m*n ; i++) 
-    *stk(ly+i) = f(*stk(lx+i));
-  /* 
-   * plot(x,y);
-   */
-  SendScilabJob("plot(y,x);");
-}
-/*-----------------------------------------------------------------------------------*/ 
-static int my_job()
-{
-  static char job[256];
-  /* storing a matrix inside scilab */
-  static double A[]={1,2,3,4};
-  int mA=2,nA=2;
-  static double b[]={4,5};
-  int mb=2,nb=1;
-  int m,n,lp,i;
-  WriteMatrix("A", &mA, &nA, A); /* if failed make my_job return O; */
-  WriteMatrix("b", &mb, &nb, b);
-
-  if ( SendScilabJob("A,b,x=0\\b;") == 27) 
-    fprintf(stdout,"division by zero...\n");
-  else 
-    {
-      GetMatrixptr("x", &m, &n, &lp);
-      for ( i=0 ; i < m*n ; i++) 
-       fprintf(stdout,"x[%d] = %5.2f\n",i,*stk(i+lp));
-    }
-
-  if ( SendScilabJob("A,b,x=A\\b;") != 0) 
-    {
-      fprintf(stdout,"Error occured during scilab execution\n");
-    }
-  else 
-    {
-      GetMatrixptr("x", &m, &n, &lp);
-      for ( i=0 ; i < m*n ; i++) 
-       fprintf(stdout,"x[%d] = %5.2f\n",i,*stk(i+lp));
-    }
-} 
-/*-----------------------------------------------------------------------------------*/ 
-/* I want to integrate the previous equation */
-int my_ode_job() 
-{
-  double x[]={1,0,0} ; int mx=3,nx=1;
-  double time[]={0.4,4}; int mt=1,nt=2;
-  fprintf(stdout,"linking \n");
-  SendScilabJob("ilib_for_link('odeex','my_ode.o',[],'c');");
-  fprintf(stdout,"link done  \n");
-  SendScilabJob("exec('loader.sce');link('show')");
-  WriteMatrix("x", &mx, &nx, x);
-  WriteMatrix("time", &mt, &nt,time);
-  /* scilab is called to solve the ODE */
-  SendScilabJob("y=ode(x,0,time,''mon_ode''),");
-}
-/*-----------------------------------------------------------------------------------*/ 
-#if _MSC_VER
-       int main(void)  
-#else
-       int MAIN__(void) 
-#endif
-{
-       if ( StartScilab(NULL,NULL,NULL) == FALSE ) printf("Error : StartScilab \n");
-  my_ode_job();
-  my_job();
-  my_plot() ;
-  cc_test();
-  if ( TerminateScilab(NULL) == FALSE ) printf("Error : TerminateScilab \n");
-  return 0;
-}
-/*-----------------------------------------------------------------------------------*/ 
+#include <stdio.h> \r
+#include "machine.h"\r
+#include "stack-c.h"\r
+/*-----------------------------------------------------------------------------------*/ \r
+#ifndef SCI\r
+       #define SCI "SCI=../../.." \r
+#endif \r
+#define TRUE 1\r
+#define FALSE 0\r
\r
+/*-----------------------------------------------------------------------------------*/ \r
+/* See routines/system/CallScilab.h */\r
+extern int StartScilab(char *SCIpath,char *ScilabStartup,int *Stacksize);\r
+extern int TerminateScilab(char *ScilabQuit);\r
+extern int SendScilabJob(char *job); \r
+/*-----------------------------------------------------------------------------------*/ \r
+double f(double x)\r
+{\r
+  return x*x + 1;\r
+}\r
+/*-----------------------------------------------------------------------------------*/ \r
+static int my_plot() \r
+{\r
+  int m,n,lx,ly,i;\r
+  /* Scilab is called to build the abscissae vector and \r
+     to allocate the ordinates */\r
+\r
+  SendScilabJob("x=1:0.1:10;y=x;");\r
+  GetMatrixptr("x", &m, &n, &lx);  \r
+  GetMatrixptr("y", &m, &n, &ly);  \r
+  /* \r
+   * y(i)=f(x(i))\r
+   */\r
+  for ( i=0; i < m*n ; i++) \r
+    *stk(ly+i) = f(*stk(lx+i));\r
+  /* \r
+   * plot(x,y);\r
+   */\r
+  SendScilabJob("plot(y,x);");\r
+}\r
+/*-----------------------------------------------------------------------------------*/ \r
+static int my_job()\r
+{\r
+  static char job[256];\r
+  /* storing a matrix inside scilab */\r
+  static double A[]={1,2,3,4};\r
+  int mA=2,nA=2;\r
+  static double b[]={4,5};\r
+  int mb=2,nb=1;\r
+  int m,n,lp,i;\r
+  WriteMatrix("A", &mA, &nA, A); /* if failed make my_job return O; */\r
+  WriteMatrix("b", &mb, &nb, b);\r
+\r
+  if ( SendScilabJob("A,b,x=0\\b;") == 27) \r
+    fprintf(stdout,"division by zero...\n");\r
+  else \r
+    {\r
+      GetMatrixptr("x", &m, &n, &lp);\r
+      for ( i=0 ; i < m*n ; i++) \r
+       fprintf(stdout,"x[%d] = %5.2f\n",i,*stk(i+lp));\r
+    }\r
+\r
+  if ( SendScilabJob("A,b,x=A\\b;") != 0) \r
+    {\r
+      fprintf(stdout,"Error occured during scilab execution\n");\r
+    }\r
+  else \r
+    {\r
+      GetMatrixptr("x", &m, &n, &lp);\r
+      for ( i=0 ; i < m*n ; i++) \r
+       fprintf(stdout,"x[%d] = %5.2f\n",i,*stk(i+lp));\r
+    }\r
+} \r
+/*-----------------------------------------------------------------------------------*/ \r
+/* I want to integrate the previous equation */\r
+int my_ode_job() \r
+{\r
+  double x[]={1,0,0} ; int mx=3,nx=1;\r
+  double time[]={0.4,4}; int mt=1,nt=2;\r
+  fprintf(stdout,"linking \n");\r
+  SendScilabJob("ilib_for_link('odeex','my_ode.o',[],'c');");\r
+  fprintf(stdout,"link done  \n");\r
+  SendScilabJob("exec('loader.sce');link('show')");\r
+  WriteMatrix("x", &mx, &nx, x);\r
+  WriteMatrix("time", &mt, &nt,time);\r
+  /* scilab is called to solve the ODE */\r
+  SendScilabJob("y=ode(x,0,time,''mon_ode''),");\r
+}\r
+/*-----------------------------------------------------------------------------------*/ \r
+#if _MSC_VER\r
+       int main(void)  \r
+#else\r
+       int MAIN__(void) \r
+#endif\r
+{\r
+       if ( StartScilab(NULL,NULL,NULL) == FALSE ) printf("Error : StartScilab \n");\r
+  my_ode_job();\r
+  my_job();\r
+  my_plot() ;\r
+  cc_test();\r
+  if ( TerminateScilab(NULL) == FALSE ) printf("Error : TerminateScilab \n");\r
+  return 0;\r
+}\r
+/*-----------------------------------------------------------------------------------*/ \r
@@ -1,26 +1,26 @@
-       
-       How to make calls to Scilab interpreter 
-       from a C++ program 
-       
-In this directory we provide small examples of C++ calls to the Scilab 
-interpreter. 
-
-[1] Unix ( soure are myprog.c and ccmatrix1.cc )
-To make it run you have to edit the Makefile 
-and change the SCIDIR variable to fit your local Scilab installation 
-
-Then type 
-       make distclean 
-       make all 
-       ./myprog 
-
-[2] Windows (soure are myprog.c and ccmatrix1.cpp )
-       nmake /f Makefile.mak all /a
-       
-       You have to set SCI to the Scilab directory 
-       set SCI=c:\program files\scilab-4.0
-       then run prog.exe in a console 
-       to make the program run 
-       ..\..\..\bin\prog.exe
-
-Update INRIA 2006
+       \r
+       How to make calls to Scilab interpreter \r
+       from a C++ program \r
+       \r
+In this directory we provide small examples of C++ calls to the Scilab \r
+interpreter. \r
+\r
+[1] Unix ( soure are myprog.c and ccmatrix1.cc )\r
+To make it run you have to edit the Makefile \r
+and change the SCIDIR variable to fit your local Scilab installation \r
+\r
+Then type \r
+       make distclean \r
+       make all \r
+       ./myprog \r
+\r
+[2] Windows (soure are myprog.c and ccmatrix1.cpp )\r
+       nmake /f Makefile.mak all /a\r
+       \r
+       You have to set SCI to the Scilab directory \r
+       set SCI=c:\program files\scilab-4.0\r
+       then run prog.exe in a console \r
+       to make the program run \r
+       ..\..\..\bin\prog.exe\r
+\r
+Update INRIA 2006\r
@@ -1,81 +1,81 @@
-      program callsci
-c!Purpose
-c     Example of calling scilab from an other C or Fortran program
-c!Description
-c     This program demonstrate on a simple example to use scilab as a 
-c     procedure for an other program
-c     The computations performed are:
-c      -1-  computation of x such that a*x=b  (a and b real matrices)
-c      -2-  computation of y=a*x-b
-c     All scilab functions and instructions may be used in this context
-c     for complex instruction, it may be usefull to defined it in a file 
-c     and use exec
-c!
-c     Copyright INRIA
-c
-      dimension a(2,2),b(2),x(2),y(2)
-      double precision a,b,x,y
-c
-c     a and b definition
-c
-      a(1,1)=1.d0
-      a(2,1)=2.d0
-      a(1,2)=3.d0
-      a(2,2)=4.d0
-      b(1)=1.d0
-      b(2)=0.d0
-c
-c     first call to inisci for Scilab initializations 
-c     10000 is the initial stack size
-c
-      call inisci(-1,10000, ierr)
-      if(ierr.gt.0) stop
-c
-c     scilab start-up execution. quit added to leave parser after 
-c     start-up execution
-c
-      call scirun('exec(''SCI/etc/scilab.start'',-1);quit')
-c     
-c     Program's variables  a and b sent to Scilab.
-c     .  2nd argument of matz not referenced here.
-c     .  3rd argument is the first dimension of the transmitted 
-c     .  variable (here dimension a(2,.) )
-c     .  arguments #3 and 4 represent the number of rows and columns
-c     .  respectively
-c     .  argument #5 is a character string name of the scilab variable
-c     .  argument #6 (here job=1) means direction fortran--->scilab
-c     
-      call matz(a,a,2,2,2,'a',1)
-      call matz(b,b,2,2,1,'b',1)
-c     
-c     call scirun to solve the problem
-c     . \\ needed to enter a \ in fortran string
-c
-      call scirun('x=a\\b;quit')
-c
-c     Scilab variable x get in program and displayed
-c     .  the numbers m and n (dimensions of x) are here given
-c     .  by scilab .Don't give numerical values to arguments
-c     .  4 and 5 of matz here.
-c     .  last argument (job=0) means:   scilab --->program
-
-      call matz(x,x,2,m,n,'x',0)
-      write(6,100) x(1),x(2)
- 100  format('x = [',2x,f10.5,2x,f10.5,']')
-c
-c     call scilab to check the result
-c     .  note  -1- a,x,b are still in the scilab stack
-c     .        -2- this computation might be done in the first call to scirun 
-      call scirun('y=a*x-b;quit')
-c
-c     Scilab variable y get in program and displayed
-c
-      call matz(y,y,2,m,n,'y',0)
-      write(6,110) y(1),y(2)
-110   format('a*x-b = [',2x,f10.5,2x,f10.5,']')
-c
-c     stop properly
-c
-      call sciquit
-      stop
-      end
+      program callsci\r
+c!Purpose\r
+c     Example of calling scilab from an other C or Fortran program\r
+c!Description\r
+c     This program demonstrate on a simple example to use scilab as a \r
+c     procedure for an other program\r
+c     The computations performed are:\r
+c      -1-  computation of x such that a*x=b  (a and b real matrices)\r
+c      -2-  computation of y=a*x-b\r
+c     All scilab functions and instructions may be used in this context\r
+c     for complex instruction, it may be usefull to defined it in a file \r
+c     and use exec\r
+c!\r
+c     Copyright INRIA\r
+c\r
+      dimension a(2,2),b(2),x(2),y(2)\r
+      double precision a,b,x,y\r
+c\r
+c     a and b definition\r
+c\r
+      a(1,1)=1.d0\r
+      a(2,1)=2.d0\r
+      a(1,2)=3.d0\r
+      a(2,2)=4.d0\r
+      b(1)=1.d0\r
+      b(2)=0.d0\r
+c\r
+c     first call to inisci for Scilab initializations \r
+c     10000 is the initial stack size\r
+c\r
+      call inisci(-1,10000, ierr)\r
+      if(ierr.gt.0) stop\r
+c\r
+c     scilab start-up execution. quit added to leave parser after \r
+c     start-up execution\r
+c\r
+      call scirun('exec(''SCI/etc/scilab.start'',-1);quit')\r
+c     \r
+c     Program's variables  a and b sent to Scilab.\r
+c     .  2nd argument of matz not referenced here.\r
+c     .  3rd argument is the first dimension of the transmitted \r
+c     .  variable (here dimension a(2,.) )\r
+c     .  arguments #3 and 4 represent the number of rows and columns\r
+c     .  respectively\r
+c     .  argument #5 is a character string name of the scilab variable\r
+c     .  argument #6 (here job=1) means direction fortran--->scilab\r
+c     \r
+      call matz(a,a,2,2,2,'a',1)\r
+      call matz(b,b,2,2,1,'b',1)\r
+c     \r
+c     call scirun to solve the problem\r
+c     . \\ needed to enter a \ in fortran string\r
+c\r
+      call scirun('x=a\\b;quit')\r
+c\r
+c     Scilab variable x get in program and displayed\r
+c     .  the numbers m and n (dimensions of x) are here given\r
+c     .  by scilab .Don't give numerical values to arguments\r
+c     .  4 and 5 of matz here.\r
+c     .  last argument (job=0) means:   scilab --->program\r
+\r
+      call matz(x,x,2,m,n,'x',0)\r
+      write(6,100) x(1),x(2)\r
+ 100  format('x = [',2x,f10.5,2x,f10.5,']')\r
+c\r
+c     call scilab to check the result\r
+c     .  note  -1- a,x,b are still in the scilab stack\r
+c     .        -2- this computation might be done in the first call to scirun \r
+      call scirun('y=a*x-b;quit')\r
+c\r
+c     Scilab variable y get in program and displayed\r
+c\r
+      call matz(y,y,2,m,n,'y',0)\r
+      write(6,110) y(1),y(2)\r
+110   format('a*x-b = [',2x,f10.5,2x,f10.5,']')\r
+c\r
+c     stop properly\r
+c\r
+      call sciquit\r
+      stop\r
+      end\r
@@ -1,20 +1,20 @@
-
-Microsoft Visual Studio Solution File, Format Version 9.00
-# Visual Studio 2005
-Project("{6989167D-11E4-40FE-8C1A-2192A86A7E90}") = "example", "example.vfproj", "{B6C96508-D326-4691-A49D-FD9D8A369A44}"
-EndProject
-Global
-       GlobalSection(SolutionConfigurationPlatforms) = preSolution
-               Debug|Win32 = Debug|Win32
-               Release|Win32 = Release|Win32
-       EndGlobalSection
-       GlobalSection(ProjectConfigurationPlatforms) = postSolution
-               {B6C96508-D326-4691-A49D-FD9D8A369A44}.Debug|Win32.ActiveCfg = Debug|Win32
-               {B6C96508-D326-4691-A49D-FD9D8A369A44}.Debug|Win32.Build.0 = Debug|Win32
-               {B6C96508-D326-4691-A49D-FD9D8A369A44}.Release|Win32.ActiveCfg = Release|Win32
-               {B6C96508-D326-4691-A49D-FD9D8A369A44}.Release|Win32.Build.0 = Release|Win32
-       EndGlobalSection
-       GlobalSection(SolutionProperties) = preSolution
-               HideSolutionNode = FALSE
-       EndGlobalSection
-EndGlobal
+\r
+Microsoft Visual Studio Solution File, Format Version 9.00\r
+# Visual Studio 2005\r
+Project("{6989167D-11E4-40FE-8C1A-2192A86A7E90}") = "example", "example.vfproj", "{B6C96508-D326-4691-A49D-FD9D8A369A44}"\r
+EndProject\r
+Global\r
+       GlobalSection(SolutionConfigurationPlatforms) = preSolution\r
+               Debug|Win32 = Debug|Win32\r
+               Release|Win32 = Release|Win32\r
+       EndGlobalSection\r
+       GlobalSection(ProjectConfigurationPlatforms) = postSolution\r
+               {B6C96508-D326-4691-A49D-FD9D8A369A44}.Debug|Win32.ActiveCfg = Debug|Win32\r
+               {B6C96508-D326-4691-A49D-FD9D8A369A44}.Debug|Win32.Build.0 = Debug|Win32\r
+               {B6C96508-D326-4691-A49D-FD9D8A369A44}.Release|Win32.ActiveCfg = Release|Win32\r
+               {B6C96508-D326-4691-A49D-FD9D8A369A44}.Release|Win32.Build.0 = Release|Win32\r
+       EndGlobalSection\r
+       GlobalSection(SolutionProperties) = preSolution\r
+               HideSolutionNode = FALSE\r
+       EndGlobalSection\r
+EndGlobal\r
@@ -1,29 +1,29 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<VisualStudioProject ProjectCreator="Intel Fortran" Keyword="Console Application" Version="9.10" ProjectIdGuid="{B6C96508-D326-4691-A49D-FD9D8A369A44}">
-       <Platforms>
-               <Platform Name="Win32"/></Platforms>
-       <Configurations>
-               <Configuration Name="Debug|Win32" DeleteExtensionsOnClean="*.obj;*.mod;*.pdb;*.asm;*.map;*.dyn;*.dpi;*.tmp;*.log;*.ilk;*.exe;$(TargetPath)">
-                               <Tool Name="VFMidlTool" SuppressStartupBanner="true" HeaderFileName="$(InputName).h" TypeLibraryName="$(IntDir)/$(InputName).tlb"/>
-                               <Tool Name="VFPreBuildEventTool"/>
-                               <Tool Name="VFFortranCompilerTool" SuppressStartupBanner="true" DebugInformationFormat="debugEnabled" Optimization="optimizeDisabled" ExternalNameInterpretation="extNameLowerCase" CallingConvention="callConventionCRef" ExternalNameUnderscore="true" ModulePath="$(INTDIR)/" ObjectFile="$(INTDIR)/" Traceback="true" BoundsCheck="true" RuntimeLibrary="rtMultiThreadedDebug" CompileOnly="true"/>
-                               <Tool Name="VFPostBuildEventTool"/>
-                               <Tool Name="VFCustomBuildTool"/>
-                               <Tool Name="VFLinkerTool" OutputFile="../../../bin/example.exe" LinkIncremental="linkIncrementalNo" SuppressStartupBanner="true" GenerateDebugInformation="true" ProgramDatabaseFile="$(OUTDIR)/example.pdb" SubSystem="subSystemConsole" AdditionalDependencies="../../../bin/libscilab.lib"/>
-                               <Tool Name="VFResourceCompilerTool" ResourceOutputFileName="$(IntDir)/$(InputName).res"/>
-                               <Tool Name="VFPreLinkEventTool"/></Configuration>
-               <Configuration Name="Release|Win32" DeleteExtensionsOnClean="*.obj;*.mod;*.pdb;*.asm;*.map;*.dyn;*.dpi;*.tmp;*.log;*.ilk;*.exe;$(TargetPath)" MustRebuild="true">
-                               <Tool Name="VFMidlTool" SwitchesHaveChanged="true" SuppressStartupBanner="true" HeaderFileName="$(InputName).h" TypeLibraryName="$(IntDir)/$(InputName).tlb"/>
-                               <Tool Name="VFPreBuildEventTool"/>
-                               <Tool Name="VFFortranCompilerTool" SwitchesHaveChanged="true" SuppressStartupBanner="true" ExternalNameInterpretation="extNameLowerCase" CallingConvention="callConventionCRef" ExternalNameUnderscore="true" ModulePath="$(INTDIR)/" ObjectFile="$(INTDIR)/" RuntimeLibrary="rtMultiThreaded" CompileOnly="true"/>
-                               <Tool Name="VFPostBuildEventTool"/>
-                               <Tool Name="VFCustomBuildTool"/>
-                               <Tool Name="VFLinkerTool" SwitchesHaveChanged="true" MustRebuild="true" OutputFile="../../../bin/example.exe" LinkIncremental="linkIncrementalNo" SuppressStartupBanner="true" SubSystem="subSystemConsole" AdditionalDependencies="../../../bin/libscilab.lib"/>
-                               <Tool Name="VFResourceCompilerTool" SwitchesHaveChanged="true" ResourceOutputFileName="$(IntDir)/$(InputName).res"/>
-                               <Tool Name="VFPreLinkEventTool"/></Configuration></Configurations>
-       <Files>
-               <Filter Name="Source Files" Filter="f90;for;f;fpp;ftn;def;odl;idl">
-               <File RelativePath="callsci.f"/></Filter>
-               <Filter Name="Header Files" Filter="fi;fd"/>
-               <Filter Name="Resource Files" Filter="rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe"/></Files>
-       <Globals/></VisualStudioProject>
+<?xml version="1.0" encoding="UTF-8"?>\r
+<VisualStudioProject ProjectCreator="Intel Fortran" Keyword="Console Application" Version="9.10" ProjectIdGuid="{B6C96508-D326-4691-A49D-FD9D8A369A44}">\r
+       <Platforms>\r
+               <Platform Name="Win32"/></Platforms>\r
+       <Configurations>\r
+               <Configuration Name="Debug|Win32" DeleteExtensionsOnClean="*.obj;*.mod;*.pdb;*.asm;*.map;*.dyn;*.dpi;*.tmp;*.log;*.ilk;*.exe;$(TargetPath)">\r
+                               <Tool Name="VFMidlTool" SuppressStartupBanner="true" HeaderFileName="$(InputName).h" TypeLibraryName="$(IntDir)/$(InputName).tlb"/>\r
+                               <Tool Name="VFPreBuildEventTool"/>\r
+                               <Tool Name="VFPostBuildEventTool"/>\r
+                               <Tool Name="VFFortranCompilerTool" SuppressStartupBanner="true" DebugInformationFormat="debugEnabled" Optimization="optimizeDisabled" ExternalNameInterpretation="extNameLowerCase" CallingConvention="callConventionCRef" ExternalNameUnderscore="true" ModulePath="$(INTDIR)/" ObjectFile="$(INTDIR)/" Traceback="true" BoundsCheck="true" RuntimeLibrary="rtMultiThreadedDebug" CompileOnly="true"/>\r
+                               <Tool Name="VFCustomBuildTool"/>\r
+                               <Tool Name="VFLinkerTool" SwitchesHaveChanged="true" OutputFile="../../../../../bin/example.exe" LinkIncremental="linkIncrementalNo" SuppressStartupBanner="true" GenerateDebugInformation="true" ProgramDatabaseFile="$(OUTDIR)/example.pdb" SubSystem="subSystemConsole" AdditionalDependencies="../../../../../bin/libscilab.lib"/>\r
+                               <Tool Name="VFPreLinkEventTool"/>\r
+                               <Tool Name="VFResourceCompilerTool" ResourceOutputFileName="$(IntDir)/$(InputName).res"/></Configuration>\r
+               <Configuration Name="Release|Win32" DeleteExtensionsOnClean="*.obj;*.mod;*.pdb;*.asm;*.map;*.dyn;*.dpi;*.tmp;*.log;*.ilk;*.exe;$(TargetPath)" MustRebuild="true">\r
+                               <Tool Name="VFMidlTool" SwitchesHaveChanged="true" SuppressStartupBanner="true" HeaderFileName="$(InputName).h" TypeLibraryName="$(IntDir)/$(InputName).tlb"/>\r
+                               <Tool Name="VFPreBuildEventTool"/>\r
+                               <Tool Name="VFPostBuildEventTool"/>\r
+                               <Tool Name="VFFortranCompilerTool" SwitchesHaveChanged="true" SuppressStartupBanner="true" ExternalNameInterpretation="extNameLowerCase" CallingConvention="callConventionCRef" ExternalNameUnderscore="true" ModulePath="$(INTDIR)/" ObjectFile="$(INTDIR)/" RuntimeLibrary="rtMultiThreaded" CompileOnly="true"/>\r
+                               <Tool Name="VFCustomBuildTool"/>\r
+                               <Tool Name="VFLinkerTool" SwitchesHaveChanged="true" MustRebuild="true" OutputFile="../../../../../bin/example.exe" LinkIncremental="linkIncrementalNo" SuppressStartupBanner="true" SubSystem="subSystemConsole" AdditionalDependencies="../../../../../bin/libscilab.lib"/>\r
+                               <Tool Name="VFPreLinkEventTool"/>\r
+                               <Tool Name="VFResourceCompilerTool" SwitchesHaveChanged="true" ResourceOutputFileName="$(IntDir)/$(InputName).res"/></Configuration></Configurations>\r
+       <Files>\r
+               <Filter Name="Source Files" Filter="f90;for;f;fpp;ftn;def;odl;idl">\r
+               <File RelativePath="callsci.f"/></Filter>\r
+               <Filter Name="Header Files" Filter="fi;fd"/>\r
+               <Filter Name="Resource Files" Filter="rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe"/></Files>\r
+       <Globals/></VisualStudioProject>\r
@@ -1,23 +1,25 @@
-    An example of calling scilab as a subroutine of a user's main program
-
-
-Useful files
-============
-
-    * callsci.f: Fortran Example of a usermain program. This main program send matrices 
-                (call matz) and commands (call scirun) to scilab and 
-                 gets the results back (call matz).
-
-Usage
-=====
-       from this directory :
-       
-       set SCI=<your current scilab path ex: d:/scilab> 
-       set TMPDIR=%TEMP%
-       set HOME=%SCI%
-       set TCL_LIBRARY=%SCI%\tcl\tcl8.4
-       set TK_LIBRARY=%SCI%\tcl\tk8.4
-       
-       ../../../bin/example.exe
-
-INRIA 2006 A.C
+    An example of calling scilab as a subroutine of a user's main program\r
+    \r
+    Requirements Intel Fortran 9.1 and Visual Studio 2005 IDE\r
+\r
+\r
+Useful files\r
+============\r
+\r
+    * callsci.f: Fortran Example of a usermain program. This main program send matrices \r
+                (call matz) and commands (call scirun) to scilab and \r
+                 gets the results back (call matz).\r
+\r
+Usage\r
+=====\r
+       from this directory :\r
+       \r
+       set SCI=<your current scilab path ex: d:/scilab \r
+       set TMPDIR=%TEMP%\r
+       set HOME=%SCI%\r
+       set TCL_LIBRARY=%SCI%\tcl\tcl8.4\r
+       set TK_LIBRARY=%SCI%\tcl\tk8.4\r
+       \r
+       ../../../../bin/example.exe\r
+\r
+INRIA 2006 A.C\r