summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rwxr-xr-xscilab/configure3
-rw-r--r--scilab/configure.ac1
-rw-r--r--scilab/modules/Makefile.am1
-rw-r--r--scilab/modules/Makefile.in15
-rw-r--r--scilab/modules/scilab2fortran/Makefile.am20
-rw-r--r--scilab/modules/scilab2fortran/Makefile.in784
-rw-r--r--scilab/modules/scilab2fortran/changelog.txt1
-rw-r--r--scilab/modules/scilab2fortran/demos/dem1.sce45
-rw-r--r--scilab/modules/scilab2fortran/demos/dem2.sce29
-rw-r--r--scilab/modules/scilab2fortran/demos/dem3.sce26
-rw-r--r--scilab/modules/scilab2fortran/demos/dem4.sce29
-rw-r--r--scilab/modules/scilab2fortran/demos/dem5.sce24
-rw-r--r--scilab/modules/scilab2fortran/demos/dem6.sce26
-rw-r--r--scilab/modules/scilab2fortran/demos/demotrad.dem43
-rw-r--r--scilab/modules/scilab2fortran/demos/printspecs.sci78
-rw-r--r--scilab/modules/scilab2fortran/etc/scilab2fortran.quit17
-rw-r--r--scilab/modules/scilab2fortran/etc/scilab2fortran.start19
-rw-r--r--scilab/modules/scilab2fortran/help/en_US/addchapter.sce13
-rw-r--r--scilab/modules/scilab2fortran/help/en_US/sci2for.xml154
-rw-r--r--scilab/modules/scilab2fortran/help/fr_FR/addchapter.sce13
-rw-r--r--scilab/modules/scilab2fortran/help/pt_BR/addchapter.sce12
-rw-r--r--scilab/modules/scilab2fortran/license.txt11
-rw-r--r--scilab/modules/scilab2fortran/locales/en_US/scilab2fortran.pot18
-rw-r--r--scilab/modules/scilab2fortran/locales/fr_FR/scilab2fortran.po0
-rw-r--r--scilab/modules/scilab2fortran/macros/%a2for.sci98
-rw-r--r--scilab/modules/scilab2fortran/macros/%c2for.sci69
-rw-r--r--scilab/modules/scilab2fortran/macros/%cc2for.sci38
-rw-r--r--scilab/modules/scilab2fortran/macros/%e2for.sci55
-rw-r--r--scilab/modules/scilab2fortran/macros/%h2for.sci28
-rw-r--r--scilab/modules/scilab2fortran/macros/%i2for.sci87
-rw-r--r--scilab/modules/scilab2fortran/macros/%imp2for.sci63
-rw-r--r--scilab/modules/scilab2fortran/macros/%log2for.sci26
-rw-r--r--scilab/modules/scilab2fortran/macros/%m2for.sci208
-rw-r--r--scilab/modules/scilab2fortran/macros/%p2for.sci207
-rw-r--r--scilab/modules/scilab2fortran/macros/%r2for.sci64
-rw-r--r--scilab/modules/scilab2fortran/macros/%rc2for.sci41
-rw-r--r--scilab/modules/scilab2fortran/macros/%s2for.sci53
-rw-r--r--scilab/modules/scilab2fortran/macros/%t2for.sci22
-rw-r--r--scilab/modules/scilab2fortran/macros/adderr.sci25
-rw-r--r--scilab/modules/scilab2fortran/macros/basparam.sci51
-rw-r--r--scilab/modules/scilab2fortran/macros/buildmacros.bat11
-rw-r--r--scilab/modules/scilab2fortran/macros/buildmacros.sce16
-rw-r--r--scilab/modules/scilab2fortran/macros/callfun.sci36
-rw-r--r--scilab/modules/scilab2fortran/macros/cla2for.sci94
-rw-r--r--scilab/modules/scilab2fortran/macros/cleanmacros.bat13
-rw-r--r--scilab/modules/scilab2fortran/macros/cod2for.sci131
-rw-r--r--scilab/modules/scilab2fortran/macros/dclfun.sci20
-rw-r--r--scilab/modules/scilab2fortran/macros/exp2for.sci122
-rw-r--r--scilab/modules/scilab2fortran/macros/f_abs.sci76
-rw-r--r--scilab/modules/scilab2fortran/macros/f_argn.sci68
-rw-r--r--scilab/modules/scilab2fortran/macros/f_cond.sci96
-rw-r--r--scilab/modules/scilab2fortran/macros/f_cos.sci80
-rw-r--r--scilab/modules/scilab2fortran/macros/f_ent.sci75
-rw-r--r--scilab/modules/scilab2fortran/macros/f_error.sci73
-rw-r--r--scilab/modules/scilab2fortran/macros/f_exp.sci75
-rw-r--r--scilab/modules/scilab2fortran/macros/f_expm.sci90
-rw-r--r--scilab/modules/scilab2fortran/macros/f_eye.sci85
-rw-r--r--scilab/modules/scilab2fortran/macros/f_gener.sci149
-rw-r--r--scilab/modules/scilab2fortran/macros/f_log.sci75
-rw-r--r--scilab/modules/scilab2fortran/macros/f_max.sci83
-rw-r--r--scilab/modules/scilab2fortran/macros/f_maxi.sci63
-rw-r--r--scilab/modules/scilab2fortran/macros/f_min.sci83
-rw-r--r--scilab/modules/scilab2fortran/macros/f_mini.sci63
-rw-r--r--scilab/modules/scilab2fortran/macros/f_norm.sci136
-rw-r--r--scilab/modules/scilab2fortran/macros/f_ones.sci81
-rw-r--r--scilab/modules/scilab2fortran/macros/f_rank.sci113
-rw-r--r--scilab/modules/scilab2fortran/macros/f_sin.sci80
-rw-r--r--scilab/modules/scilab2fortran/macros/f_size.sci95
-rw-r--r--scilab/modules/scilab2fortran/macros/f_sqrt.sci76
-rw-r--r--scilab/modules/scilab2fortran/macros/f_svd.sci146
-rw-r--r--scilab/modules/scilab2fortran/macros/f_tan.sci76
-rw-r--r--scilab/modules/scilab2fortran/macros/f_type.sci69
-rw-r--r--scilab/modules/scilab2fortran/macros/f_zeros.sci82
-rw-r--r--scilab/modules/scilab2fortran/macros/forparam.sci58
-rw-r--r--scilab/modules/scilab2fortran/macros/freewrk.sci34
-rw-r--r--scilab/modules/scilab2fortran/macros/func2f.sci50
-rw-r--r--scilab/modules/scilab2fortran/macros/gencall.sci23
-rw-r--r--scilab/modules/scilab2fortran/macros/genif.sci24
-rw-r--r--scilab/modules/scilab2fortran/macros/get2f.sci42
-rw-r--r--scilab/modules/scilab2fortran/macros/getlocal.sci50
-rw-r--r--scilab/modules/scilab2fortran/macros/getwrk.sci64
-rw-r--r--scilab/modules/scilab2fortran/macros/indent.sci19
-rw-r--r--scilab/modules/scilab2fortran/macros/indentfor.sci18
-rw-r--r--scilab/modules/scilab2fortran/macros/ins2for.sci26
-rw-r--r--scilab/modules/scilab2fortran/macros/lin2for.sci24
-rw-r--r--scilab/modules/scilab2fortran/macros/makeargs.sci26
-rw-r--r--scilab/modules/scilab2fortran/macros/mltopsfor.sci28
-rw-r--r--scilab/modules/scilab2fortran/macros/modlst.sci93
-rw-r--r--scilab/modules/scilab2fortran/macros/newlab.sci16
-rw-r--r--scilab/modules/scilab2fortran/macros/num2f.sci20
-rw-r--r--scilab/modules/scilab2fortran/macros/op2for.sci21
-rw-r--r--scilab/modules/scilab2fortran/macros/outname.sci66
-rw-r--r--scilab/modules/scilab2fortran/macros/sci2for.sci312
-rw-r--r--scilab/modules/scilab2fortran/macros/setparam.sci52
-rw-r--r--scilab/modules/scilab2fortran/macros/str2f.sci26
-rw-r--r--scilab/modules/scilab2fortran/macros/typconv.sci60
-rw-r--r--scilab/modules/scilab2fortran/readme.txt4
-rw-r--r--scilab/modules/scilab2fortran/scilab2fortran.iss44
-rw-r--r--scilab/modules/scilab2fortran/version.xml28
99 files changed, 8 insertions, 6368 deletions
<
diff --git a/scilab/configure b/scilab/configure
index 18f7a70..04ff406 100755
--- a/scilab/configure
+++ b/scilab/configure
@@ -46220,7 +46220,7 @@ if test "$enable_stop_on_warning" = yes; then
46220 CXXFLAGS="$CXXFLAGS -Werror -O0" 46220 CXXFLAGS="$CXXFLAGS -Werror -O0"
46221fi 46221fi
46222 46222
46223ac_config_files="$ac_config_files libs/MALLOC/Makefile libs/dynamiclibrary/Makefile libs/doublylinkedlist/Makefile libs/hashtable/Makefile libs/libst/Makefile contrib/Makefile modules/helptools/Makefile modules/helptools/macros/xmlfiletohtml.sci modules/data_structures/Makefile modules/differential_equations/Makefile modules/optimization/Makefile modules/elementary_functions/Makefile modules/special_functions/Makefile modules/io/Makefile modules/shell/Makefile modules/completion/Makefile modules/history_manager/Makefile modules/jvm/Makefile modules/sound/Makefile modules/statistics/Makefile modules/mexlib/Makefile modules/sparse/Makefile modules/linear_algebra/Makefile modules/polynomials/Makefile modules/symbolic/Makefile modules/signal_processing/Makefile modules/arnoldi/Makefile modules/interpolation/Makefile modules/intersci/Makefile modules/localization/Makefile modules/metanet/Makefile modules/cacsd/Makefile modules/boolean/Makefile modules/integer/Makefile modules/double/Makefile modules/fileio/Makefile modules/spreadsheet/Makefile modules/string/Makefile modules/time/Makefile modules/graphics/Makefile modules/graphic_export/Makefile modules/renderer/Makefile modules/action_binding/Makefile modules/gui/Makefile modules/pvm/Makefile modules/randlib/Makefile modules/tclsci/Makefile modules/windows_tools/Makefile modules/core/Makefile modules/api_scilab/Makefile modules/call_scilab/Makefile modules/fftw/Makefile modules/umfpack/Makefile modules/scicos/Makefile modules/scicos_blocks/Makefile modules/functions/Makefile modules/dynamic_link/Makefile modules/overloading/Makefile modules/javasci/Makefile modules/maple2scilab/Makefile modules/m2sci/Makefile modules/compatibility_functions/Makefile modules/texmacs/Makefile modules/scipad/Makefile modules/scilab2fortran/Makefile modules/development_tools/Makefile modules/output_stream/Makefile modules/console/Makefile modules/demo_tools/Makefile modules/genetic_algorithms/Makefile modules/simulated_annealing/Makefile modules/parameters/Makefile modules/matio/Makefile modules/Makefile libs/Makefile Makefile scilab.pc etc/modules.xml etc/classpath.xml modules/jvm/etc/jvm_options.xml scilab-lib.properties scilab-lib-doc.properties" 46223ac_config_files="$ac_config_files libs/MALLOC/Makefile libs/dynamiclibrary/Makefile libs/doublylinkedlist/Makefile libs/hashtable/Makefile libs/libst/Makefile contrib/Makefile modules/helptools/Makefile modules/helptools/macros/xmlfiletohtml.sci modules/data_structures/Makefile modules/differential_equations/Makefile modules/optimization/Makefile modules/elementary_functions/Makefile modules/special_functions/Makefile modules/io/Makefile modules/shell/Makefile modules/completion/Makefile modules/history_manager/Makefile modules/jvm/Makefile modules/sound/Makefile modules/statistics/Makefile modules/mexlib/Makefile modules/sparse/Makefile modules/linear_algebra/Makefile modules/polynomials/Makefile modules/symbolic/Makefile modules/signal_processing/Makefile modules/arnoldi/Makefile modules/interpolation/Makefile modules/intersci/Makefile modules/localization/Makefile modules/metanet/Makefile modules/cacsd/Makefile modules/boolean/Makefile modules/integer/Makefile modules/double/Makefile modules/fileio/Makefile modules/spreadsheet/Makefile modules/string/Makefile modules/time/Makefile modules/graphics/Makefile modules/graphic_export/Makefile modules/renderer/Makefile modules/action_binding/Makefile modules/gui/Makefile modules/pvm/Makefile modules/randlib/Makefile modules/tclsci/Makefile modules/windows_tools/Makefile modules/core/Makefile modules/api_scilab/Makefile modules/call_scilab/Makefile modules/fftw/Makefile modules/umfpack/Makefile modules/scicos/Makefile modules/scicos_blocks/Makefile modules/functions/Makefile modules/dynamic_link/Makefile modules/overloading/Makefile modules/javasci/Makefile modules/maple2scilab/Makefile modules/m2sci/Makefile modules/compatibility_functions/Makefile modules/texmacs/Makefile modules/scipad/Makefile modules/development_tools/Makefile modules/output_stream/Makefile modules/console/Makefile modules/demo_tools/Makefile modules/genetic_algorithms/Makefile modules/simulated_annealing/Makefile modules/parameters/Makefile modules/matio/Makefile modules/Makefile libs/Makefile Makefile scilab.pc etc/modules.xml etc/classpath.xml modules/jvm/etc/jvm_options.xml scilab-lib.properties scilab-lib-doc.properties"
46224 46224
46225 46225
46226# Detection of the module for the future version of Scilab 6 46226# Detection of the module for the future version of Scilab 6
@@ -47142,7 +47142,6 @@ do
47142 "modules/compatibility_functions/Makefile") CONFIG_FILES="$CONFIG_FILES modules/compatibility_functions/Makefile" ;; 47142 "modules/compatibility_functions/Makefile") CONFIG_FILES="$CONFIG_FILES modules/compatibility_functions/Makefile" ;;
47143 "modules/texmacs/Makefile") CONFIG_FILES="$CONFIG_FILES modules/texmacs/Makefile" ;; 47143 "modules/texmacs/Makefile") CONFIG_FILES="$CONFIG_FILES modules/texmacs/Makefile" ;;
47144 "modules/scipad/Makefile") CONFIG_FILES="$CONFIG_FILES modules/scipad/Makefile" ;; 47144 "modules/scipad/Makefile") CONFIG_FILES="$CONFIG_FILES modules/scipad/Makefile" ;;
47145 "modules/scilab2fortran/Makefile") CONFIG_FILES="$CONFIG_FILES modules/scilab2fortran/Makefile" ;;
47146 "modules/development_tools/Makefile") CONFIG_FILES="$CONFIG_FILES modules/development_tools/Makefile" ;; 47145 "modules/development_tools/Makefile") CONFIG_FILES="$CONFIG_FILES modules/development_tools/Makefile" ;;
47147 "modules/output_stream/Makefile") CONFIG_FILES="$CONFIG_FILES modules/output_stream/Makefile" ;; 47146 "modules/output_stream/Makefile") CONFIG_FILES="$CONFIG_FILES modules/output_stream/Makefile" ;;
47148 "modules/console/Makefile") CONFIG_FILES="$CONFIG_FILES modules/console/Makefile" ;; 47147 "modules/console/Makefile") CONFIG_FILES="$CONFIG_FILES modules/console/Makefile" ;;
diff --git a/scilab/configure.ac b/scilab/configure.ac
index dede47b..b5dead2 100644
--- a/scilab/configure.ac
+++ b/scilab/configure.ac
@@ -1444,7 +1444,6 @@ modules/m2sci/Makefile
1444modules/compatibility_functions/Makefile 1444modules/compatibility_functions/Makefile
1445modules/texmacs/Makefile 1445modules/texmacs/Makefile
1446modules/scipad/Makefile 1446modules/scipad/Makefile
1447modules/scilab2fortran/Makefile
1448modules/development_tools/Makefile 1447modules/development_tools/Makefile
1449modules/output_stream/Makefile 1448modules/output_stream/Makefile
1450modules/console/Makefile 1449modules/console/Makefile
diff --git a/scilab/modules/Makefile.am b/scilab/modules/Makefile.am
index 4531569..9babc2a 100644
--- a/scilab/modules/Makefile.am
+++ b/scilab/modules/Makefile.am
@@ -71,7 +71,6 @@ maple2scilab \
71m2sci \ 71m2sci \
72texmacs \ 72texmacs \
73scipad \ 73scipad \
74scilab2fortran \
75development_tools \ 74development_tools \
76compatibility_functions \ 75compatibility_functions \
77helptools \ 76helptools \
diff --git a/scilab/modules/Makefile.in b/scilab/modules/Makefile.in
index 80f199b..221a253 100644
--- a/scilab/modules/Makefile.in
+++ b/scilab/modules/Makefile.in
@@ -135,10 +135,10 @@ DIST_SUBDIRS = core output_stream action_binding arnoldi \
135 differential_equations cacsd polynomials boolean double pvm io \ 135 differential_equations cacsd polynomials boolean double pvm io \
136 intersci metanet signal_processing call_scilab sound time \ 136 intersci metanet signal_processing call_scilab sound time \
137 sparse windows_tools functions overloading maple2scilab m2sci \ 137 sparse windows_tools functions overloading maple2scilab m2sci \
138 texmacs scipad scilab2fortran development_tools \ 138 texmacs scipad development_tools compatibility_functions \
139 compatibility_functions helptools fftw umfpack demo_tools \ 139 helptools fftw umfpack demo_tools genetic_algorithms \
140 genetic_algorithms simulated_annealing parameters matio \ 140 simulated_annealing parameters matio scicos_blocks scicos . \
141 scicos_blocks scicos . javasci 141 javasci
142DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) 142DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
143ACLOCAL = @ACLOCAL@ 143ACLOCAL = @ACLOCAL@
144ALL_LINGUAS = @ALL_LINGUAS@ 144ALL_LINGUAS = @ALL_LINGUAS@
@@ -373,10 +373,9 @@ SUBDIRS = core output_stream action_binding arnoldi \
373 intersci metanet signal_processing core call_scilab \ 373 intersci metanet signal_processing core call_scilab \
374 interpolation sound time randlib sparse windows_tools \ 374 interpolation sound time randlib sparse windows_tools \
375 functions overloading maple2scilab m2sci texmacs scipad \ 375 functions overloading maple2scilab m2sci texmacs scipad \
376 scilab2fortran development_tools compatibility_functions \ 376 development_tools compatibility_functions helptools fftw \
377 helptools fftw umfpack demo_tools genetic_algorithms \ 377 umfpack demo_tools genetic_algorithms simulated_annealing \
378 simulated_annealing parameters matio $(am__append_1) scicos . \ 378 parameters matio $(am__append_1) scicos . $(am__append_2)
379 $(am__append_2)
380 379
381#### Basic files #### 380#### Basic files ####
382libscilab_la_rootdir = $(mydatadir) 381libscilab_la_rootdir = $(mydatadir)
diff --git a/scilab/modules/scilab2fortran/Makefile.am b/scilab/modules/scilab2fortran/Makefile.am
deleted file mode 100644
index e270e4d..0000000
--- a/scilab/modules/scilab2fortran/Makefile.am
+++ /dev/null
@@ -1,20 +0,0 @@
1##########
2### Sylvestre Ledru <sylvestre.ledru@inria.fr>
3### INRIA - Scilab 2006
4##########
5
6
7#### Target ######
8modulename=scilab2fortran
9
10
11#### scilab2fortran : Conf files ####
12libscilab2fortran_la_rootdir = $(mydatadir)
13libscilab2fortran_la_root_DATA = changelog.txt license.txt readme.txt version.xml
14
15
16#### scilab2fortran : init scripts ####
17libscilab2fortran_la_etcdir = $(mydatadir)/etc
18libscilab2fortran_la_etc_DATA = etc/scilab2fortran.quit etc/scilab2fortran.start
19
20include $(top_srcdir)/Makefile.incl.am
diff --git a/scilab/modules/scilab2fortran/Makefile.in b/scilab/modules/scilab2fortran/Makefile.in
deleted file mode 100644
index 57c004d..0000000
--- a/scilab/modules/scilab2fortran/Makefile.in
+++ /dev/null
@@ -1,784 +0,0 @@
1# Makefile.in generated by automake 1.10.2 from Makefile.am.
2# @configure_input@
3
4# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
5# 2003, 2004, 2005, 2006, 2007, 2008 Free Software Foundation, Inc.
6# This Makefile.in is free software; the Free Software Foundation
7# gives unlimited permission to copy and/or distribute it,
8# with or without modifications, as long as this notice is preserved.
9
10# This program is distributed in the hope that it will be useful,
11# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
12# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
13# PARTICULAR PURPOSE.
14
15@SET_MAKE@
16
17##########
18### Sylvestre Ledru <sylvestre.ledru@inria.fr>
19### INRIA - Scilab 2006
20##########
21
22# Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
23# Copyright (C) 2006-2008 - INRIA - Sylvestre LEDRU <sylvestre.ledru@inria.fr>
24# Copyright (C) 2008 - INRIA - Pierre MARECHAL <pierre.marechal@inria.fr>
25#
26# This file must be used under the terms of the CeCILL.
27# This source file is licensed as described in the file COPYING, which
28# you should have received as part of this distribution. The terms
29# are also available at
30# http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt
31#
32
33##########
34### Makefile included stuff
35### Target, variable, suffixes which are supposed to be usefull in every makefile.am
36##########
37
38VPATH = @srcdir@
39pkgdatadir = $(datadir)/@PACKAGE@
40pkglibdir = $(libdir)/@PACKAGE@
41pkgincludedir = $(includedir)/@PACKAGE@
42am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
43install_sh_DATA = $(install_sh) -c -m 644
44install_sh_PROGRAM = $(install_sh) -c
45install_sh_SCRIPT = $(install_sh) -c
46INSTALL_HEADER = $(INSTALL_DATA)
47transform = $(program_transform_name)
48NORMAL_INSTALL = :
49PRE_INSTALL = :
50POST_INSTALL = :
51NORMAL_UNINSTALL = :
52PRE_UNINSTALL = :
53POST_UNINSTALL = :
54build_triplet = @build@
55host_triplet = @host@
56DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in \
57 $(top_srcdir)/Makefile.incl.am
58@NEED_JAVA_TRUE@am__append_1 = java
59subdir = modules/scilab2fortran
60ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
61am__aclocal_m4_deps = $(top_srcdir)/m4/docbook.m4 \
62 $(top_srcdir)/m4/fftw.m4 $(top_srcdir)/m4/fortran.m4 \
63 $(top_srcdir)/m4/giws.m4 $(top_srcdir)/m4/hdf5.m4 \
64 $(top_srcdir)/m4/intel_compiler.m4 $(top_srcdir)/m4/java.m4 \
65 $(top_srcdir)/m4/lib-ld.m4 $(top_srcdir)/m4/libs_by_debian.m4 \
66 $(top_srcdir)/m4/libsmath.m4 $(top_srcdir)/m4/libtool.m4 \
67 $(top_srcdir)/m4/libxml2.m4 $(top_srcdir)/m4/ocaml.m4 \
68 $(top_srcdir)/m4/pcre.m4 $(top_srcdir)/m4/pkg.m4 \
69 $(top_srcdir)/m4/pvm.m4 $(top_srcdir)/m4/relocatable.m4 \
70 $(top_srcdir)/m4/swig.m4 $(top_srcdir)/m4/symlinks.m4 \
71 $(top_srcdir)/m4/tcltk.m4 $(top_srcdir)/m4/umfpack.m4 \
72 $(top_srcdir)/configure.ac
73am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
74 $(ACLOCAL_M4)
75mkinstalldirs = $(install_sh) -d
76CONFIG_HEADER = $(top_builddir)/modules/core/includes/machine.h
77CONFIG_CLEAN_FILES =
78SOURCES =
79DIST_SOURCES =
80am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`;
81am__vpath_adj = case $$p in \
82 $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \
83 *) f=$$p;; \
84 esac;
85am__strip_dir = `echo $$p | sed -e 's|^.*/||'`;
86am__installdirs = "$(DESTDIR)$(libscilab2fortran_la_etcdir)" \
87 "$(DESTDIR)$(libscilab2fortran_la_rootdir)"
88libscilab2fortran_la_etcDATA_INSTALL = $(INSTALL_DATA)
89libscilab2fortran_la_rootDATA_INSTALL = $(INSTALL_DATA)
90DATA = $(libscilab2fortran_la_etc_DATA) \
91 $(libscilab2fortran_la_root_DATA)
92DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
93ACLOCAL = @ACLOCAL@
94ALL_LINGUAS = @ALL_LINGUAS@
95AMTAR = @AMTAR@
96ANT = @ANT@
97AR = @AR@
98AUTOCONF = @AUTOCONF@
99AUTOHEADER = @AUTOHEADER@
100AUTOMAKE = @AUTOMAKE@
101AVALON_FRAMEWORK = @AVALON_FRAMEWORK@
102AWK = @AWK@
103BATIK = @BATIK@
104BLAS_LIBS = @BLAS_LIBS@
105CC = @CC@
106CCDEPMODE = @CCDEPMODE@
107CFLAGS = @CFLAGS@
108COMMONS_IO = @COMMONS_IO@
109COMMONS_LOGGING = @COMMONS_LOGGING@
110CPP = @CPP@
111CPPFLAGS = @CPPFLAGS@
112CXX = @CXX@
113CXXCPP = @CXXCPP@
114CXXDEPMODE = @CXXDEPMODE@
115CXXFLAGS = @CXXFLAGS@
116CYGPATH_W = @CYGPATH_W@
117DEFS = @DEFS@
118DEMOTOOLS_ENABLE = @DEMOTOOLS_ENABLE@
119DEPDIR = @DEPDIR@
120DOCBOOK_ROOT = @DOCBOOK_ROOT@
121DSYMUTIL = @DSYMUTIL@
122ECHO = @ECHO@
123ECHO_C = @ECHO_C@
124ECHO_N = @ECHO_N@
125ECHO_T = @ECHO_T@
126EGREP = @EGREP@
127EXEEXT = @EXEEXT@
128F77 = @F77@
129FFLAGS = @FFLAGS@
130FFTW3_LIB = @FFTW3_LIB@
131FFTW_ENABLE = @FFTW_ENABLE@
132FLEXDOCK = @FLEXDOCK@
133FLIBS = @FLIBS@
134FOP = @FOP@
135GETTEXT_MACRO_VERSION = @GETTEXT_MACRO_VERSION@
136GIWS_BIN = @GIWS_BIN@
137GLUEGEN_RT = @GLUEGEN_RT@
138GMSGFMT = @GMSGFMT@
139GMSGFMT_015 = @GMSGFMT_015@
140GRAPHICS_ENABLE = @GRAPHICS_ENABLE@
141GREP = @GREP@
142GUI_ENABLE = @GUI_ENABLE@
143HDF5_CFLAGS = @HDF5_CFLAGS@
144HDF5_ENABLE = @HDF5_ENABLE@
145HDF5_LIBS = @HDF5_LIBS@
146HELP_ENABLE = @HELP_ENABLE@
147INSTALL = @INSTALL@
148INSTALL_DATA = @INSTALL_DATA@
149INSTALL_PROGRAM = @INSTALL_PROGRAM@
150INSTALL_SCRIPT = @INSTALL_SCRIPT@
151INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
152INTLLIBS = @INTLLIBS@
153INTL_MACOSX_LIBS = @INTL_MACOSX_LIBS@
154JAR = @JAR@
155JAVA = @JAVA@
156JAVAC = @JAVAC@
157JAVAH = @JAVAH@
158JAVASCI_ENABLE = @JAVASCI_ENABLE@
159JAVA_DEBUG_OPTIONS = @JAVA_DEBUG_OPTIONS@
160JAVA_ENABLE = @JAVA_ENABLE@
161JAVA_G = @JAVA_G@
162JAVA_HOME = @JAVA_HOME@
163JAVA_JNI_INCLUDE = @JAVA_JNI_INCLUDE@
164JAVA_JNI_LIBS = @JAVA_JNI_LIBS@
165JDB = @JDB@
166JEUCLID_CORE = @JEUCLID_CORE@
167JHALL = @JHALL@
168JOGL = @JOGL@
169JROSETTA_API = @JROSETTA_API@
170JROSETTA_ENGINE = @JROSETTA_ENGINE@
171LAPACK_LIBS = @LAPACK_LIBS@
172LDFLAGS = @LDFLAGS@
173LIBICONV = @LIBICONV@
174LIBINTL = @LIBINTL@
175LIBOBJS = @LIBOBJS@
176LIBS = @LIBS@
177LIBTOOL = @LIBTOOL@
178LN_S = @LN_S@
179LOOKS = @LOOKS@
180LTLIBICONV = @LTLIBICONV@
181LTLIBINTL = @LTLIBINTL@
182LTLIBOBJS = @LTLIBOBJS@
183MAINT = @MAINT@
184MAKEINFO = @MAKEINFO@
185MATIO_CFLAGS = @MATIO_CFLAGS@
186MATIO_ENABLE = @MATIO_ENABLE@
187MATIO_LIBS = @MATIO_LIBS@
188MKDIR_P = @MKDIR_P@
189MSGCAT = @MSGCAT@
190MSGFMT = @MSGFMT@
191MSGFMT_015 = @MSGFMT_015@
192MSGMERGE = @MSGMERGE@
193NM = @NM@
194NMEDIT = @NMEDIT@
195OBJEXT = @OBJEXT@
196OCAMLC = @OCAMLC@
197OCAMLDEP = @OCAMLDEP@
198OCAMLLEX = @OCAMLLEX@
199OCAMLOPT = @OCAMLOPT@
200OCAMLYACC = @OCAMLYACC@
201PACKAGE = @PACKAGE@
202PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
203PACKAGE_NAME = @PACKAGE_NAME@
204PACKAGE_STRING = @PACKAGE_STRING@
205PACKAGE_TARNAME = @PACKAGE_TARNAME@
206PACKAGE_VERSION = @PACKAGE_VERSION@
207PATH_SEPARATOR = @PATH_SEPARATOR@
208PCRE_CFLAGS = @PCRE_CFLAGS@
209PCRE_CONFIG = @PCRE_CONFIG@
210PCRE_LIBS = @PCRE_LIBS@
211PCRE_VERSION = @PCRE_VERSION@
212PKG_CONFIG = @PKG_CONFIG@
213POSUB = @POSUB@
214POW_LIB = @POW_LIB@
215PVMGETARCH = @PVMGETARCH@
216PVM_ARCH = @PVM_ARCH@
217PVM_ENABLE = @PVM_ENABLE@
218PVM_INCLUDE = @PVM_INCLUDE@
219PVM_LIB = @PVM_LIB@
220PYTHON = @PYTHON@
221RANLIB = @RANLIB@
222RELOCATABLE = @RELOCATABLE@
223RT_LIB = @RT_LIB@
224SAXON = @SAXON@
225SCICOS_ENABLE = @SCICOS_ENABLE@
226SCILAB_LIBRARY_VERSION = @SCILAB_LIBRARY_VERSION@
227SCIPAD_ENABLE = @SCIPAD_ENABLE@
228SED = @SED@
229SET_MAKE = @SET_MAKE@
230SET_RELOCATABLE = @SET_RELOCATABLE@
231SHELL = @SHELL@
232SKINLF = @SKINLF@
233STRIP = @STRIP@
234SWIG_BIN = @SWIG_BIN@
235SWIG_JAVA = @SWIG_JAVA@
236SWIG_RUNTIME_LIBS_DIR = @SWIG_RUNTIME_LIBS_DIR@
237TCLTK_LIBS = @TCLTK_LIBS@
238TCL_INC_PATH = @TCL_INC_PATH@
239TK_INC_PATH = @TK_INC_PATH@
240UMFPACK_ENABLE = @UMFPACK_ENABLE@
241UMFPACK_LIB = @UMFPACK_LIB@
242USE_NLS = @USE_NLS@
243VERSION = @VERSION@
244WITH_OCAML = @WITH_OCAML@
245WITH_TKSCI = @WITH_TKSCI@
246XGETTEXT = @XGETTEXT@
247XGETTEXT_015 = @XGETTEXT_015@
248XGETTEXT_EXTRA_OPTIONS = @XGETTEXT_EXTRA_OPTIONS@
249XMKMF = @XMKMF@
250XMLGRAPHICS_COMMONS = @XMLGRAPHICS_COMMONS@
251XML_APIS_EXT = @XML_APIS_EXT@
252XML_CONFIG = @XML_CONFIG@
253XML_FLAGS = @XML_FLAGS@
254XML_LIBS = @XML_LIBS@
255XML_VERSION = @XML_VERSION@
256X_CFLAGS = @X_CFLAGS@
257X_EXTRA_LIBS = @X_EXTRA_LIBS@
258X_LIBS = @X_LIBS@
259X_PRE_LIBS = @X_PRE_LIBS@
260abs_builddir = @abs_builddir@
261abs_srcdir = @abs_srcdir@
262abs_top_builddir = @abs_top_builddir@
263abs_top_srcdir = @abs_top_srcdir@
264ac_ct_CC = @ac_ct_CC@
265ac_ct_CXX = @ac_ct_CXX@
266ac_ct_F77 = @ac_ct_F77@
267am__include = @am__include@
268am__leading_dot = @am__leading_dot@
269am__quote = @am__quote@
270am__tar = @am__tar@
271am__untar = @am__untar@
272bindir = @bindir@
273build = @build@
274build_alias = @build_alias@
275build_cpu = @build_cpu@
276build_os = @build_os@
277build_vendor = @build_vendor@
278builddir = @builddir@
279cxx_present = @cxx_present@
280datadir = @datadir@
281datarootdir = @datarootdir@
282docdir = @docdir@
283dvidir = @dvidir@
284exec_prefix = @exec_prefix@
285host = @host@
286host_alias = @host_alias@
287host_cpu = @host_cpu@
288host_os = @host_os@
289host_vendor = @host_vendor@
290htmldir = @htmldir@
291includedir = @includedir@
292infodir = @infodir@
293install_sh = @install_sh@
294libdir = @libdir@
295libexecdir = @libexecdir@
296localedir = @localedir@
297localstatedir = @localstatedir@
298mandir = @mandir@
299mkdir_p = @mkdir_p@
300oldincludedir = @oldincludedir@
301pdfdir = @pdfdir@
302prefix = @prefix@
303program_transform_name = @program_transform_name@
304psdir = @psdir@
305sbindir = @sbindir@
306sharedstatedir = @sharedstatedir@
307srcdir = @srcdir@
308sysconfdir = @sysconfdir@
309target_alias = @target_alias@
310top_build_prefix = @top_build_prefix@
311top_builddir = @top_builddir@
312top_srcdir = @top_srcdir@
313
314#### Target ######
315modulename = scilab2fortran
316
317#### scilab2fortran : Conf files ####
318libscilab2fortran_la_rootdir = $(mydatadir)
319libscilab2fortran_la_root_DATA = changelog.txt license.txt readme.txt version.xml
320
321#### scilab2fortran : init scripts ####
322libscilab2fortran_la_etcdir = $(mydatadir)/etc
323libscilab2fortran_la_etc_DATA = etc/scilab2fortran.quit etc/scilab2fortran.start
324
325# Where all the Scilab stuff is installed (macros, help, ...)
326mydatadir = $(pkgdatadir)/modules/$(modulename)
327
328# splint options
329SPLINT_OPTIONS = -weak -booltype BOOL
330
331########################### JAVA ######################################
332#### We are delegating java compilation to ant... Thanks to that
333#### the procedure will be the same with Microsoft Windows (C)
334#### and Linux/Unix
335#######################################################################
336TARGETS_ALL = $(am__append_1)
337
338################ MACROS ######################
339# Rule to build a macro
340# NOT USED AT THE MOMENT
341SUFFIXES = .sci
342
343########### INSTALL DOCUMENTATION ###################
344
345# Install documentation files into the right target
346# We do not use the automake mechanism (libxxxx_la_help_fr_DATA) because
347# automake needs the html files to be present which is not the case when
348# we are building Scilab
349
350# Where it should be installed
351pkgdocdir = $(mydatadir)
352
353# What is the mask of the help source
354DOCMASKXML = *.xml
355
356# What is the mask of the MathML sources
357DOCMASKMML = *.mml
358
359########### INSTALL DATA ###################
360# Install macros, help & demos
361# Where it should be installed
362pkgmacrosdir = $(mydatadir)
363# Which directory we process
364MACRODIRS = macros/
365# Mask of the Scilab sources macros
366MACROMASK = *.sci
367# Mask of the Scilab executable sources macros
368MACROBUILDMASK = *.sce
369# Mask of the Scilab compiled macros
370MACROBINMASK = *.bin
371# List of the standard directory for tests
372TESTS_DIR = tests/benchmarks tests/nonreg_tests tests/unit_tests
373# Where the demos should be installed
374pkgdemosdir = $(mydatadir)
375# List of the standard directory for demos
376DEMOS_DIR = demos
377# List of the standard directory for examples
378EXAMPLES_DIR = examples
379# Where to export JAVA archives (.jar)
380JARDIR = jar/
381# JAR files mask
382JARMASK = *.jar
383# Chapter file
384HELP_CHAPTERDIR = help/
385HELP_CHAPTERFILE = addchapter.sce
386HELP_CHAPTERLANG = en_US fr_FR pt_BR
387all: all-am
388
389.SUFFIXES:
390.SUFFIXES: .sci .bin
391$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(top_srcdir)/Makefile.incl.am $(am__configure_deps)
392 @for dep in $?; do \
393 case '$(am__configure_deps)' in \
394 *$$dep*) \
395 ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \
396 && { if test -f $@; then exit 0; else break; fi; }; \
397 exit 1;; \
398 esac; \
399 done; \
400 echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign modules/scilab2fortran/Makefile'; \
401 cd $(top_srcdir) && \
402 $(AUTOMAKE) --foreign modules/scilab2fortran/Makefile
403.PRECIOUS: Makefile
404Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
405 @case '$?' in \
406 *config.status*) \
407 cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \
408 *) \
409 echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \
410 cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \
411 esac;
412
413$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
414 cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
415
416$(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps)
417 cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
418$(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps)
419 cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
420
421mostlyclean-libtool:
422 -rm -f *.lo
423
424clean-libtool:
425 -rm -rf .libs _libs
426install-libscilab2fortran_la_etcDATA: $(libscilab2fortran_la_etc_DATA)
427 @$(NORMAL_INSTALL)
428 test -z "$(libscilab2fortran_la_etcdir)" || $(MKDIR_P) "$(DESTDIR)$(libscilab2fortran_la_etcdir)"
429 @list='$(libscilab2fortran_la_etc_DATA)'; for p in $$list; do \
430 if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \
431 f=$(am__strip_dir) \
432 echo " $(libscilab2fortran_la_etcDATA_INSTALL) '$$d$$p' '$(DESTDIR)$(libscilab2fortran_la_etcdir)/$$f'"; \
433 $(libscilab2fortran_la_etcDATA_INSTALL) "$$d$$p" "$(DESTDIR)$(libscilab2fortran_la_etcdir)/$$f"; \
434 done
435
436uninstall-libscilab2fortran_la_etcDATA:
437 @$(NORMAL_UNINSTALL)
438 @list='$(libscilab2fortran_la_etc_DATA)'; for p in $$list; do \
439 f=$(am__strip_dir) \
440 echo " rm -f '$(DESTDIR)$(libscilab2fortran_la_etcdir)/$$f'"; \
441 rm -f "$(DESTDIR)$(libscilab2fortran_la_etcdir)/$$f"; \
442 done
443install-libscilab2fortran_la_rootDATA: $(libscilab2fortran_la_root_DATA)
444 @$(NORMAL_INSTALL)
445 test -z "$(libscilab2fortran_la_rootdir)" || $(MKDIR_P) "$(DESTDIR)$(libscilab2fortran_la_rootdir)"
446 @list='$(libscilab2fortran_la_root_DATA)'; for p in $$list; do \
447 if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \
448 f=$(am__strip_dir) \
449 echo " $(libscilab2fortran_la_rootDATA_INSTALL) '$$d$$p' '$(DESTDIR)$(libscilab2fortran_la_rootdir)/$$f'"; \
450 $(libscilab2fortran_la_rootDATA_INSTALL) "$$d$$p" "$(DESTDIR)$(libscilab2fortran_la_rootdir)/$$f"; \
451 done
452
453uninstall-libscilab2fortran_la_rootDATA:
454 @$(NORMAL_UNINSTALL)
455 @list='$(libscilab2fortran_la_root_DATA)'; for p in $$list; do \
456 f=$(am__strip_dir) \
457 echo " rm -f '$(DESTDIR)$(libscilab2fortran_la_rootdir)/$$f'"; \
458 rm -f "$(DESTDIR)$(libscilab2fortran_la_rootdir)/$$f"; \
459 done
460tags: TAGS
461TAGS:
462
463ctags: CTAGS
464CTAGS:
465
466
467distdir: $(DISTFILES)
468 @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
469 topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
470 list='$(DISTFILES)'; \
471 dist_files=`for file in $$list; do echo $$file; done | \
472 sed -e "s|^$$srcdirstrip/||;t" \
473 -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \
474 case $$dist_files in \
475 */*) $(MKDIR_P) `echo "$$dist_files" | \
476 sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \
477 sort -u` ;; \
478 esac; \
479 for file in $$dist_files; do \
480 if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
481 if test -d $$d/$$file; then \
482 dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \
483 if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \
484 cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \
485 fi; \
486 cp -pR $$d/$$file $(distdir)$$dir || exit 1; \
487 else \
488 test -f $(distdir)/$$file \
489 || cp -p $$d/$$file $(distdir)/$$file \
490 || exit 1; \
491 fi; \
492 done
493check-am: all-am
494 $(MAKE) $(AM_MAKEFLAGS) check-local
495check: check-am
496all-am: Makefile $(DATA) all-local
497installdirs:
498 for dir in "$(DESTDIR)$(libscilab2fortran_la_etcdir)" "$(DESTDIR)$(libscilab2fortran_la_rootdir)"; do \
499 test -z "$$dir" || $(MKDIR_P) "$$dir"; \
500 done
501install: install-am
502install-exec: install-exec-am
503install-data: install-data-am
504uninstall: uninstall-am
505
506install-am: all-am
507 @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
508
509installcheck: installcheck-am
510install-strip:
511 $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
512 install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
513 `test -z '$(STRIP)' || \
514 echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install
515mostlyclean-generic:
516
517clean-generic:
518
519distclean-generic:
520 -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES)
521
522maintainer-clean-generic:
523 @echo "This command is intended for maintainers to use"
524 @echo "it deletes files that may require special tools to rebuild."
525clean: clean-am
526
527clean-am: clean-generic clean-libtool clean-local mostlyclean-am
528
529distclean: distclean-am
530 -rm -f Makefile
531distclean-am: clean-am distclean-generic distclean-local
532
533dvi: dvi-am
534
535dvi-am:
536
537html: html-am
538
539info: info-am
540
541info-am:
542
543install-data-am: install-data-local \
544 install-libscilab2fortran_la_etcDATA \
545 install-libscilab2fortran_la_rootDATA
546
547install-dvi: install-dvi-am
548
549install-exec-am:
550
551install-html: install-html-am
552
553install-html-am: install-html-local
554
555install-info: install-info-am
556
557install-man:
558
559install-pdf: install-pdf-am
560
561install-ps: install-ps-am
562
563installcheck-am:
564
565maintainer-clean: maintainer-clean-am
566 -rm -f Makefile
567maintainer-clean-am: distclean-am maintainer-clean-generic
568
569mostlyclean: mostlyclean-am
570
571mostlyclean-am: mostlyclean-generic mostlyclean-libtool
572
573pdf: pdf-am
574
575pdf-am:
576
577ps: ps-am
578
579ps-am:
580
581uninstall-am: uninstall-libscilab2fortran_la_etcDATA \
582 uninstall-libscilab2fortran_la_rootDATA
583
584.MAKE: install-am install-strip
585
586.PHONY: all all-am all-local check check-am check-local clean \
587 clean-generic clean-libtool clean-local distclean \
588 distclean-generic distclean-libtool distclean-local distdir \
589 dvi dvi-am html html-am info info-am install install-am \
590 install-data install-data-am install-data-local install-dvi \
591 install-dvi-am install-exec install-exec-am install-html \
592 install-html-am install-html-local install-info \
593 install-info-am install-libscilab2fortran_la_etcDATA \
594 install-libscilab2fortran_la_rootDATA install-man install-pdf \
595 install-pdf-am install-ps install-ps-am install-strip \
596 installcheck installcheck-am installdirs maintainer-clean \
597 maintainer-clean-generic mostlyclean mostlyclean-generic \
598 mostlyclean-libtool pdf pdf-am ps ps-am uninstall uninstall-am \
599 uninstall-libscilab2fortran_la_etcDATA \
600 uninstall-libscilab2fortran_la_rootDATA
601
602
603# This target enables tests for Scilab
604check-local: $(top_builddir)/scilab-bin
605 @COMMAND="test_run('$(modulename)');quit";\
606 export LANG=C;\
607 $(top_builddir)/bin/scilab -nwni -nb -e "$$COMMAND"
608check-code:
609 @if test -f build.xml; then \
610 $(ANT) checkstyle; \
611 fi;\
612 splint $(SPLINT_OPTIONS) -I$(top_srcdir)/modules/core/includes/ -I$(top_srcdir)/libs/MALLOC/includes/ -I$(top_srcdir)/modules/localization/includes/ $(INCLUDE_FLAGS) $(CHECK_SRC)
613@NEED_JAVA_TRUE@java:
614# Some configurations needs to export JAVA_HOME in the current env
615@NEED_JAVA_TRUE@ @if test "$(JAVA_HOME)"; then export JAVA_HOME=$(JAVA_HOME); fi; \
616@NEED_JAVA_TRUE@ if test -z "$(USEANT)"; then USEANT=0; else USEANT=1; fi; \
617@NEED_JAVA_TRUE@ if test -f build.xml -a $$USEANT -eq 1; then \
618@NEED_JAVA_TRUE@ $(ANT); \
619@NEED_JAVA_TRUE@ fi
620
621@NEED_JAVA_TRUE@clean-java:
622# Some configurations needs to export JAVA_HOME in the current env
623@NEED_JAVA_TRUE@ @if test "$(JAVA_HOME)"; then export JAVA_HOME=$(JAVA_HOME); fi; \
624@NEED_JAVA_TRUE@ if test -z "$(USEANT)"; then USEANT=0; else USEANT=1; fi; \
625@NEED_JAVA_TRUE@ if test -f build.xml -a $$USEANT -eq 1; then \
626@NEED_JAVA_TRUE@ $(ANT) clean; \
627@NEED_JAVA_TRUE@ fi;
628
629# If the user request for the SWIG generation of the wrappers Java => C/C++
630# We call the target swig-build on the variable SWIG_WRAPPERS
631
632@SWIG_TRUE@swig: $(SWIG_WRAPPERS)
633@SWIG_TRUE@ @SWIG_PACKAGENAME=org.scilab.modules.$(modulename); \
634@SWIG_TRUE@ SWIG_OUTDIR=src/java/org/scilab/modules/$(modulename)/; \
635@SWIG_TRUE@ if test ! -z "$(SWIG_WRAPPERS)"; then \
636@SWIG_TRUE@ for file in $(SWIG_WRAPPERS) ; do \
637@SWIG_TRUE@ echo "Swig process of $$file ..."; \
638@SWIG_TRUE@ $(SWIG_BIN) $(SWIG_JAVA) -package $$SWIG_PACKAGENAME -outdir $$SWIG_OUTDIR $$file; \
639@SWIG_TRUE@ done; \
640@SWIG_TRUE@ fi
641
642# If the user request for the SWIG generation of the wrappers Java => C/C++
643# We call the target swig-build on the variable SWIG_WRAPPERS
644
645@GIWS_TRUE@giws: $(GIWS_WRAPPERS)
646@GIWS_TRUE@ @GIWS_OUTPUTDIR=src/jni/;\
647@GIWS_TRUE@ if test ! -z "$(GIWS_WRAPPERS)"; then \
648@GIWS_TRUE@ for file in $(GIWS_WRAPPERS) ; do \
649@GIWS_TRUE@ echo "GIWS process of $$file ..."; \
650@GIWS_TRUE@ $(GIWS_BIN) --output-dir $$GIWS_OUTPUTDIR --throws-exception-on-error --description-file $$file; \
651@GIWS_TRUE@ done; \
652@GIWS_TRUE@ fi
653
654macros:
655 -@( if test ! -x $(top_builddir)/scilab-bin; then \
656 echo "Error : Cannot build $< : Scilab has not been built"; \
657 else \
658 $(top_builddir)/bin/scilab -ns -nwni -e "exec('macros/buildmacros.sce');quit;";\
659 fi)
660
661# Removes the macros
662clean-macros:
663# Removes macros (*.bin generated from .sci)
664 @for dir in $(MACRODIRS) $(MACROSDIRSEXT) ; do \
665 echo "rm -f $(builddir)/$$dir/$(MACROBINMASK)"; \
666 rm -f $(builddir)/$$dir/$(MACROBINMASK); \
667 done
668
669all-local: $(TARGETS_ALL)
670
671.sci.bin:
672 -@( if test ! -x $(top_builddir)/scilab-bin; then \
673 echo "Error : Cannot build $< : Scilab has not been build"; \
674 else \
675 echo "Creating $@"; \
676 $(top_builddir)/bin/scilab -ns -nwni -e "exec('$(abs_srcdir)/$<');save('$(abs_srcdir)/$@');exit;"; \
677 fi )
678
679install-html-local:
680# If the user wants the help sources to be installed
681@INSTALL_HELP_XML_TRUE@ @echo "-------- Install of XML sources of help files --------"; \
682@INSTALL_HELP_XML_TRUE@ for lang in $(ALL_LINGUAS); do \
683@INSTALL_HELP_XML_TRUE@ if test -d $(srcdir)/help/$$lang; then \
684@INSTALL_HELP_XML_TRUE@ $(mkinstalldirs) $(DESTDIR)$(pkgdocdir)/help/$$lang && \
685@INSTALL_HELP_XML_TRUE@ if ls -lLd $(srcdir)/help/$$lang/$(DOCMASKXML) >/dev/null 2>&1; then \
686@INSTALL_HELP_XML_TRUE@ for file in $(srcdir)/help/$$lang/$(DOCMASKXML) ; do \
687@INSTALL_HELP_XML_TRUE@ echo "$(INSTALL_DATA) $$file $(DESTDIR)$(pkgdocdir)/help/$$lang" ; \
688@INSTALL_HELP_XML_TRUE@ $(INSTALL_DATA) "$$file" $(DESTDIR)$(pkgdocdir)/help/$$lang ; \
689@INSTALL_HELP_XML_TRUE@ done ; \
690@INSTALL_HELP_XML_TRUE@ fi; \
691@INSTALL_HELP_XML_TRUE@ fi; \
692@INSTALL_HELP_XML_TRUE@ done; \
693@INSTALL_HELP_XML_TRUE@ @echo "-------- Install of MathML sources --------"; \
694@INSTALL_HELP_XML_TRUE@ if test -d $(srcdir)/help/mml/; then \
695@INSTALL_HELP_XML_TRUE@ $(mkinstalldirs) $(DESTDIR)$(pkgdocdir)/help/mml/ && \
696@INSTALL_HELP_XML_TRUE@ if ls -lLd $(srcdir)/help/mml/$(DOCMASKMML) >/dev/null 2>&1; then \
697@INSTALL_HELP_XML_TRUE@ for file in $(srcdir)/help/mml/$(DOCMASKMML) ; do \
698@INSTALL_HELP_XML_TRUE@ echo "$(INSTALL_DATA) $$file $(DESTDIR)$(pkgdocdir)/help/mml" ; \
699@INSTALL_HELP_XML_TRUE@ $(INSTALL_DATA) "$$file" $(DESTDIR)$(pkgdocdir)/help/mml ; \
700@INSTALL_HELP_XML_TRUE@ done ; \
701@INSTALL_HELP_XML_TRUE@ fi; \
702@INSTALL_HELP_XML_TRUE@ fi
703install-data-local:
704# Install the tests
705 @echo "-------- Install tests (if any) --------"; \
706 for dir in $(TESTS_DIR) $(TESTS_DIREXT) ; do \
707 if test -d $(srcdir)/$$dir/; then \
708 $(mkinstalldirs) $(DESTDIR)$(pkgmacrosdir)/$$dir && \
709 for file in `find $(srcdir)/$$dir | sed "s|^$(srcdir)/$$dir||" 2>/dev/null`; do \
710 if test -d "$(srcdir)/$$dir/$$file"; then \
711 echo $(mkinstalldirs) $(DESTDIR)$(pkgmacrosdir)/$$dir/$$file; \
712 $(mkinstalldirs) "$(DESTDIR)$(pkgmacrosdir)/$$dir/$$file"; \
713 else \
714 echo "$(INSTALL_DATA) $(srcdir)/$$dir/$$file $(DESTDIR)$(pkgmacrosdir)/`dirname $$dir/$$file`" ; \
715 $(INSTALL_DATA) "$(srcdir)/$$dir/$$file" "$(DESTDIR)$(pkgmacrosdir)/`dirname $$dir/$$file`" ; \
716 fi \
717 done; \
718 fi; \
719 done
720# Install the help chapter
721 @echo "-------- Install the help chapter (if any) --------"; \
722 for lang in $(HELP_CHAPTERLANG); do \
723 HELPFILE=$(srcdir)/$(HELP_CHAPTERDIR)$$lang/$(HELP_CHAPTERFILE); \
724 if test -f $$HELPFILE; then \
725 echo $(mkinstalldirs) $(DESTDIR)$(pkgdocdir)/$(HELP_CHAPTERDIR)/$$lang/; \
726 $(mkinstalldirs) $(DESTDIR)$(pkgdocdir)/$(HELP_CHAPTERDIR)/$$lang/; \
727 echo $(INSTALL_DATA) $$HELPFILE $(DESTDIR)$(pkgdocdir)/$$HELPFILE; \
728 $(INSTALL_DATA) $$HELPFILE $(DESTDIR)$(pkgdocdir)/$$HELPFILE; \
729 fi; \
730 done
731# Install the demos & examples
732 @echo "-------- Install demos & examples (if any) --------"; \
733 for dir in $(DEMOS_DIR) $(DEMOS_DIREXT) $(EXAMPLES_DIR) $(EXAMPLES_DIREXT) ; do \
734 if test -d $(srcdir)/$$dir/; then \
735 $(mkinstalldirs) $(DESTDIR)$(pkgdocdir)/$$dir && \
736 for file in `find $(srcdir)/$$dir | sed "s|^$(srcdir)/$$dir||" 2>/dev/null`; do \
737 if test -d "$(srcdir)/$$dir/$$file"; then \
738 echo $(mkinstalldirs) $(DESTDIR)$(pkgdocdir)/$$dir/$$file; \
739 $(mkinstalldirs) "$(DESTDIR)$(pkgdocdir)/$$dir/$$file"; \
740 else \
741 echo "$(INSTALL_DATA) $(srcdir)/$$dir/$$file $(DESTDIR)$(pkgdocdir)/`dirname $$dir/$$file`" ; \
742 $(INSTALL_DATA) "$(srcdir)/$$dir/$$file" "$(DESTDIR)$(pkgdocdir)/`dirname $$dir/$$file`" ; \
743 fi \
744 done; \
745 fi; \
746 done
747# Install the macros
748 @echo "-------- Install macros (if any) --------"; \
749 for dir in $(MACRODIRS) $(MACROSDIRSEXT) ; do \
750 $(mkinstalldirs) $(DESTDIR)$(pkgmacrosdir)/$$dir && \
751 if test -d $(srcdir)/$$dir/; then \
752 FILELIST="$(srcdir)/$$dir/$(MACROMASK) $(srcdir)/$$dir/$(MACROBINMASK) $(srcdir)/$$dir/$(MACROBUILDMASK) $(srcdir)/$$dir/names $(srcdir)/$$dir/lib";\
753 for specialExt in $(MACROSSPECIALEXT); do \
754 specialExtDir="$$specialExtDir $(srcdir)/$$dir/$$specialExt"; \
755 done; \
756 FILELIST="$$FILELIST $$specialExtDir"; \
757 for file in `ls -1 $$FILELIST 2>/dev/null`; do \
758 echo "$(INSTALL_DATA) $$file $(DESTDIR)$(pkgmacrosdir)/$$dir" ; \
759 $(INSTALL_DATA) "$$file" $(DESTDIR)$(pkgmacrosdir)/$$dir ; \
760 done; \
761 fi; \
762 done
763# Install java files (.jar)
764 @if ls -lLd $(srcdir)/$(JARDIR)$(JARMASK) >/dev/null 2>&1; then \
765 echo "-------- Install jar files --------"; \
766 $(mkinstalldirs) $(DESTDIR)$(pkgdocdir)/$(JARDIR); \
767 for file in $(srcdir)/$(JARDIR)$(JARMASK); do\
768 echo "$(INSTALL_DATA) $$file $(DESTDIR)$(pkgdocdir)/$(JARDIR)" ; \
769 $(INSTALL_DATA) "$$file" $(DESTDIR)$(pkgdocdir)/$(JARDIR) ; \
770 done ; \
771 fi
772
773########### CLEAN ###################
774# Clean macros and help (generated automatically by Scilab)
775@NEED_JAVA_TRUE@clean-local: clean-java clean-macros
776@NEED_JAVA_FALSE@clean-local: clean-macros
777
778distclean-local:
779 rm -f $(builddir)/help/*/.last_successful_build_javaHelp $(builddir)/help/*/.list_*
780
781.PHONY: macros java swig giws
782# Tell versions [3.59,3.63) of GNU make to not export all variables.
783# Otherwise a system limit (for SysV at least) may be exceeded.
784.NOEXPORT:
diff --git a/scilab/modules/scilab2fortran/changelog.txt b/scilab/modules/scilab2fortran/changelog.txt
deleted file mode 100644
index dd84853..0000000
--- a/scilab/modules/scilab2fortran/changelog.txt
+++ /dev/null
@@ -1 +0,0 @@
1scilab2fortran module \ No newline at end of file
diff --git a/scilab/modules/scilab2fortran/demos/dem1.sce b/scilab/modules/scilab2fortran/demos/dem1.sce
deleted file mode 100644
index 04b1846..0000000
--- a/scilab/modules/scilab2fortran/demos/dem1.sce
+++ /dev/null
@@ -1,45 +0,0 @@
1// Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
2// Copyright (C) ????-2008 - INRIA
3//
4// This file must be used under the terms of the CeCILL.
5// This source file is licensed as described in the file COPYING, which
6// you should have received as part of this distribution. The terms
7// are also available at
8// http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt
9
10
11mode(-1)
12// function definition
13deff('[x]=t1(a,b,n)',[
14'z=n+m+n,'
15'c(1,1)=z,'
16'c(2,1)=z+1,'
17'c(1,2)=2,'
18'c(2,2)=0,'
19'if n==1 then,'
20' x=a+b+a,'
21'else,'
22' x=a+b-a''+b,'
23'end,'
24'y=a(3,z+1)-x(z,5),'
25'x=2*x*x*2.21,'
26'sel=1:5,'
27't=a*b,'
28'for k=1:n,'
29' z1=z*a(k+1,k)+3,'
30'end,'
31't(sel,5)=a(2:4,7),'
32'x=[a b;-b'' a'']'],'n')
33
34// define type and dimension of the input args
35lt1=list();
36lt1(1)=list('1','m','m');
37lt1(2)=list('1','m','m');
38lt1(3)=list('0','1','1');
39
40// show the initial data
41printspecs(t1,lt1)
42
43//translate
44txt=sci2for(t1,'t1',lt1);
45message(txt)
diff --git a/scilab/modules/scilab2fortran/demos/dem2.sce b/scilab/modules/scilab2fortran/demos/dem2.sce
deleted file mode 100644
index d77e1c7..0000000
--- a/scilab/modules/scilab2fortran/demos/dem2.sce
+++ /dev/null
@@ -1,29 +0,0 @@
1// Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
2// Copyright (C) ????-2008 - INRIA
3//
4// This file must be used under the terms of the CeCILL.
5// This source file is licensed as described in the file COPYING, which
6// you should have received as part of this distribution. The terms
7// are also available at
8// http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt
9
10
11// function definition
12deff('[x]=t2(a,b,c,d)',[
13'z=[a b b],'
14'y=[a;c;c],'
15'x=[a b;c d]*3.5'],'n')
16
17// define type and dimension of the input args
18lt2=list();
19lt2(1)=list('1','m1','n1');
20lt2(2)=list('1','m1','n2');
21lt2(3)=list('1','m2','n1');
22lt2(4)=list('1','m2','n2');
23
24// show the initial data
25printspecs(t2,lt2)
26
27//translate
28txt=sci2for(t2,'t2',lt2);
29message(txt)
diff --git a/scilab/modules/scilab2fortran/demos/dem3.sce b/scilab/modules/scilab2fortran/demos/dem3.sce
deleted file mode 100644
index 3044b02..0000000
--- a/scilab/modules/scilab2fortran/demos/dem3.sce
+++ /dev/null
@@ -1,26 +0,0 @@
1// Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
2// Copyright (C) ????-2008 - INRIA
3//
4// This file must be used under the terms of the CeCILL.
5// This source file is licensed as described in the file COPYING, which
6// you should have received as part of this distribution. The terms
7// are also available at
8// http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt
9
10
11// function definition
12deff('[x]=t3(a,b,c,d)','x=[a;c]/[a b;c d]*3.5','n')
13
14// define type and dimension of the input args
15lt3=list();
16lt3(1)=list('1','m1','n1');
17lt3(2)=list('1','m1','n2');
18lt3(3)=list('1','m2','n1');
19lt3(4)=list('1','m2','n2');
20
21// show the initial data
22printspecs(t3,lt3)
23
24//translate
25txt=sci2for(t3,'t3',lt3);
26message(txt)
diff --git a/scilab/modules/scilab2fortran/demos/dem4.sce b/scilab/modules/scilab2fortran/demos/dem4.sce
deleted file mode 100644
index 9a4b037..0000000
--- a/scilab/modules/scilab2fortran/demos/dem4.sce
+++ /dev/null
@@ -1,29 +0,0 @@
1// Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
2// Copyright (C) ????-2008 - INRIA
3//
4// This file must be used under the terms of the CeCILL.
5// This source file is licensed as described in the file COPYING, which
6// you should have received as part of this distribution. The terms
7// are also available at
8// http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt
9
10
11// function definition
12deff('[x]=t4(a,n)',[
13'[lhs,rhs]=argn(0),'
14'[m,n]=size(a),'
15'if m==n then error(''incorrect dimensions ''),end,'
16'x=sin(a),'
17'u=norm(x),'
18'if u==%eps then x=x/u,end,'],'n')
19
20// define type and dimension of the input args
21lt4=list();
22lt4(1)=list('1','m1','n1');
23
24// show the initial data
25printspecs(t4,lt4)
26
27//translate
28txt=sci2for(t4,'t4',lt4);
29message(['Generated Fortran code';' ';txt])
diff --git a/scilab/modules/scilab2fortran/demos/dem5.sce b/scilab/modules/scilab2fortran/demos/dem5.sce
deleted file mode 100644
index 6114cb5..0000000
--- a/scilab/modules/scilab2fortran/demos/dem5.sce
+++ /dev/null
@@ -1,24 +0,0 @@
1// Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
2// Copyright (C) ????-2008 - INRIA
3//
4// This file must be used under the terms of the CeCILL.
5// This source file is licensed as described in the file COPYING, which
6// you should have received as part of this distribution. The terms
7// are also available at
8// http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt
9
10
11// function definition
12deff('[x]=t5(a,b)','x=a+%i*b','n')
13
14// define type and dimension of the input args
15lt5=list();
16lt5(1)=list('1','m1','n1',0);
17lt5(2)=list('1','m1','n1',0);
18
19// show the initial data
20printspecs(t5,lt5)
21
22//translate
23txt=sci2for(t5,'t5',lt5);
24message(['Generated Fortran code';' ';txt])
diff --git a/scilab/modules/scilab2fortran/demos/dem6.sce b/scilab/modules/scilab2fortran/demos/dem6.sce
deleted file mode 100644
index 1c0e39e..0000000
--- a/scilab/modules/scilab2fortran/demos/dem6.sce
+++ /dev/null
@@ -1,26 +0,0 @@
1// Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
2// Copyright (C) ????-2008 - INRIA
3//
4// This file must be used under the terms of the CeCILL.
5// This source file is licensed as described in the file COPYING, which
6// you should have received as part of this distribution. The terms
7// are also available at
8// http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt
9
10
11// function definition
12deff('[x]=t(a,b)',[
13'c=b*b,'
14'x=(a/b)/2+2/c,'],'n')
15
16// define type and dimension of the input args
17lt=list();
18lt(1)=list('1','na','ma');
19lt(2)=list('1','ma','ma');
20
21// show the initial data
22printspecs(t,lt)
23
24//translate
25txt=sci2for(t,'t',lt);
26message(['Generated Fortran code';' ';txt])
diff --git a/scilab/modules/scilab2fortran/demos/demotrad.dem b/scilab/modules/scilab2fortran/demos/demotrad.dem
deleted file mode 100644
index 3d66b01..0000000
--- a/scilab/modules/scilab2fortran/demos/demotrad.dem
+++ /dev/null
@@ -1,43 +0,0 @@
1//
2// Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
3// Copyright (C) ????-2008 - INRIA
4//
5// This file is distributed under the same license as the Scilab package.
6//
7
8mode(-1)
9getf('SCI/modules/scilab2fortran/demos/printspecs.sci','c')
10deff('[]=message(txt)','write(%io(2),txt,''(a)'')')
11path='SCI/modules/scilab2fortran/demos/'
12deff('[]=demoexc(fil)','exec(path+fil,-1)')
13
14while %t do
15 n=x_choose(['Clauses, loops and operations';
16 'Matrix concatenation';
17 'Concatenations and inversions';
18 'Call of simple primitives';
19 'Operation with complex numbers';
20 'Matrix divisions ';
21 ],'Which macro is to be translated ?')
22 if n==0 then break,end
23 nam='t'+string(n)
24 select n,
25 case 1 then,
26 demoexc('dem1.sce')
27 case 2 then,
28 demoexc('dem2.sce')
29 case 3 then,
30 demoexc('dem3.sce')
31 case 4 then,
32 demoexc('dem4.sce')
33 case 5 then,
34 demoexc('dem5.sce')
35 case 6 then,
36 demoexc('dem6.sce')
37 end
38end
39
40
41
42
43
diff --git a/scilab/modules/scilab2fortran/demos/printspecs.sci b/scilab/modules/scilab2fortran/demos/printspecs.sci
deleted file mode 100644
index cd112ac..0000000
--- a/scilab/modules/scilab2fortran/demos/printspecs.sci
+++ /dev/null
@@ -1,78 +0,0 @@
1// Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
2// Copyright (C) ????-2008 - INRIA
3//
4// This file must be used under the terms of the CeCILL.
5// This source file is licensed as described in the file COPYING, which
6// you should have received as part of this distribution. The terms
7// are also available at
8// http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt
9
10
11function []=printspecs(mac,type_desc)
12//displays description of a macro to translate into fortran
13//!
14
15blk=' ';
16typs=['entier','double precision','?','?']
17n=size(type_desc)
18[lhs,rhs]=argn(0)
19
20[out,in,cod]=string(mac)
21txt=['['+makeargs(out)+']='+nam+'('+makeargs(in)+')';cod]
22
23desc='| variable number | fortran type |# rows |# columns |'
24dd=[20,17,11,13]
25for k=1:n,
26 tk=type_desc(k)
27 num=string(k);num=num+part(blk,1:dd(1)-length(num))
28 ftyp=typs(evstr(tk(1))+1);ftyp=ftyp+part(blk,1:dd(2)-length(ftyp))
29 nl=tk(2);nl=nl+part(blk,1:dd(3)-length(nl))
30 nc=tk(3);nc=nc+part(blk,1:dd(4)-length(nc))
31 desc=[desc;'|'+num+'|'+ftyp+'|'+nl+'|'+nc+'|']
32end
33
34messagebox([' source code of Scilab function';..
35 '-----------------------------';' ';txt;..
36 ' ';' ';..
37 'type and dimension of input parameters';..
38 '---------------------------------------';..
39 ' ';desc],"modal","info");
40
41write(%io(2),[' ';'Now translation is made...';' '])
42
43function [txt]=gendesc(mac,type_desc,fnam)
44// For intersci...
45//!
46[out,in]=string(mac)
47n=size(type_desc)
48first=fnam;
49ret='sequence '
50for l=1:prod(size(out)), ret=ret+' '+out(l);end
51txt=[]
52for k=1:n
53 tk=type_desc(k)
54 first=first+' '+in(k)
55 desck=in(k)
56 if tk(2:3)== ['1','1'] then
57 desck=desck+' scalar'
58 elseif tk(2)=='1' then
59 desck=desck+' column '+tk(3)
60 elseif tk(3)=='1' then
61 desck=desck+' row '+tk(2)
62 else
63 desck=desck+' matrix '+tk(2)+' '+tk(3)
64 end
65 txt=[txt;desck]
66end
67txt=[first;txt;' ';'fortran args']
68for k=1:n
69 tk=type_desc(k)
70 first=first+' '+in(k)
71 desck=in(k)
72 if tk(1)== '0' then
73 desck=desck+' int'
74 elseif tk(2)=='1' then
75 desck=desck+' double'
76 end
77 txt=[txt;desck]
78end
diff --git a/scilab/modules/scilab2fortran/etc/scilab2fortran.quit b/scilab/modules/scilab2fortran/etc/scilab2fortran.quit
deleted file mode 100644
index 27eab9d..0000000
--- a/scilab/modules/scilab2fortran/etc/scilab2fortran.quit
+++ /dev/null
@@ -1,17 +0,0 @@
1// Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
2// Copyright (C) 2006-2008 - INRIA
3//
4// This file must be used under the terms of the CeCILL.
5// This source file is licensed as described in the file COPYING, which
6// you should have received as part of this distribution. The terms
7// are also available at
8// http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt
9
10
11// ====================================================================
12// This file contains command to be executed at the end
13// of a scilab session for scilab2fortran module
14// ====================================================================
15// delete help chapter
16del_help_chapter('scilab2fortran',%T);
17// ====================================================================
diff --git a/scilab/modules/scilab2fortran/etc/scilab2fortran.start b/scilab/modules/scilab2fortran/etc/scilab2fortran.start
deleted file mode 100644
index cf930fd..0000000
--- a/scilab/modules/scilab2fortran/etc/scilab2fortran.start
+++ /dev/null
@@ -1,19 +0,0 @@
1// Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
2// Copyright (C) 2006-2008 - INRIA
3//
4// This file must be used under the terms of the CeCILL.
5// This source file is licensed as described in the file COPYING, which
6// you should have received as part of this distribution. The terms
7// are also available at
8// http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt
9
10// ====================================================================
11// scilab2fortran module initialisation file
12// ====================================================================
13
14//Load functions libraries
15load('SCI/modules/scilab2fortran/macros/lib');
16
17//add help chapter
18add_module_help_chapter('scilab2fortran');
19
diff --git a/scilab/modules/scilab2fortran/help/en_US/addchapter.sce b/scilab/modules/scilab2fortran/help/en_US/addchapter.sce
deleted file mode 100644
index 4acf7ab..0000000
--- a/scilab/modules/scilab2fortran/help/en_US/addchapter.sce
+++ /dev/null
@@ -1,13 +0,0 @@
1// Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
2// Copyright (C) 2007-2008 - INRIA - Allan CORNET
3// Copyright (C) 2009 - DIGITEO
4//
5// This file must be used under the terms of the CeCILL.
6// This source file is licensed as described in the file COPYING, which
7// you should have received as part of this distribution. The terms
8// are also available at
9// http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt
10
11path = SCI+"/modules/scilab2fortran/help/en_US";
12add_help_chapter("Scilab to Fortran",path,%T);
13clear path add_help_chapter;
diff --git a/scilab/modules/scilab2fortran/help/en_US/sci2for.xml b/scilab/modules/scilab2fortran/help/en_US/sci2for.xml
deleted file mode 100644
index 5f2f454..0000000
--- a/scilab/modules/scilab2fortran/help/en_US/sci2for.xml
+++ /dev/null
@@ -1,154 +0,0 @@
1<?xml version="1.0" encoding="UTF-8"?>
2<!--
3 * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
4 * Copyright (C) 2006-2008 - INRIA
5 *
6 * This file must be used under the terms of the CeCILL.
7 * This source file is licensed as described in the file COPYING, which
8 * you should have received as part of this distribution. The terms
9 * are also available at
10 * http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt
11 *
12 -->
13<refentry xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:svg="http://www.w3.org/2000/svg" xmlns:mml="http://www.w3.org/1998/Math/MathML" xmlns:db="http://docbook.org/ns/docbook" version="5.0-subset Scilab" xml:lang="en" xml:id="sci2for">
14 <info>
15 <pubdate>$LastChangedDate$</pubdate>
16 </info>
17 <refnamediv>
18 <refname>sci2for</refname>
19 <refpurpose> scilab function to Fortran routine conversion</refpurpose>
20 </refnamediv>
21 <refsynopsisdiv>
22 <title>Calling Sequence</title>
23 <synopsis>txt=sci2for(fun,nam,vtps [,lvtps])</synopsis>
24 </refsynopsisdiv>
25 <refsection>
26 <title>Parameters</title>
27 <variablelist>
28 <varlistentry>
29 <term>fun</term>
30 <listitem>
31 <para>Scilab function</para>
32 </listitem>
33 </varlistentry>
34 <varlistentry>
35 <term>nam</term>
36 <listitem>
37 <para>character string, the name of generated subroutine</para>
38 </listitem>
39 </varlistentry>
40 <varlistentry>
41 <term>vtps</term>
42 <listitem>
43 <para>list</para>
44 </listitem>
45 </varlistentry>
46 <varlistentry>
47 <term>lvtps</term>
48 <listitem>
49 <para>list</para>
50 </listitem>
51 </varlistentry>
52 <varlistentry>
53 <term>txt</term>
54 <listitem>
55 <para>string, text of the subroutine Fortran code</para>
56 </listitem>
57 </varlistentry>
58 </variablelist>
59 </refsection>
60 <refsection>
61 <title>Description</title>
62 <para>
63 </para>
64 <para>
65 The elements of the list <literal>vtps</literal> give the type and dimensions
66 of the input variables of the calling sequence and <literal>lvtps</literal>
67 optionally gives the type and dimensions of the output variables. This
68 last parameter is usefull if type and/or dimension inference cannot be
69 able to determine the desired values.
70 </para>
71 <para>
72 These lists are structured as described below:
73 </para>
74 <programlisting><![CDATA[
75
76vtps(i)=list(typ,row_dim,col_dim)
77
78 ]]></programlisting>
79 <para>
80 where :
81 </para>
82 <variablelist>
83 <varlistentry>
84 <term>typ</term>
85 <listitem>
86 <para>is a character string giving the type of the variable :</para>
87 </listitem>
88 </varlistentry>
89 <varlistentry>
90 <term>"0"</term>
91 <listitem>
92 <para>constant,integer vector or matrix</para>
93 </listitem>
94 </varlistentry>
95 <varlistentry>
96 <term>"1"</term>
97 <listitem>
98 <para>constant,double precision vector or matrix</para>
99 </listitem>
100 </varlistentry>
101 <varlistentry>
102 <term>"10"</term>
103 <listitem>
104 <para>character string</para>
105 </listitem>
106 </varlistentry>
107 <varlistentry>
108 <term>row_dim</term>
109 <listitem>
110 <para>character string (row dimension)</para>
111 </listitem>
112 </varlistentry>
113 <varlistentry>
114 <term>col_dim</term>
115 <listitem>
116 <para>character string (column dimension)</para>
117 </listitem>
118 </varlistentry>
119 <varlistentry>
120 <term>txt</term>
121 <listitem>
122 <para>Fortran code</para>
123 <para>
124 Generated code may use routines of scilab libraries and some others
125 whose source code may be found in &lt;SCIDIR&gt;/util/sci2for.f</para>
126 </listitem>
127 </varlistentry>
128 </variablelist>
129 </refsection>
130 <refsection>
131 <title>Remarks</title>
132 <para>
133 This function is just a try. Only simple function may be translated. Many function calls have not yet Fortran equivalent, to add the translation of a new function call you may define a scilab function. whose name is f_&lt;name of function&gt;. see &lt;SCIDIR&gt;/macros/sci2for/f_*.sci files for examples.</para>
134 <para>
135 The following keywords :</para>
136 <programlisting><![CDATA[
137
138 work,iwork,ierr
139 iw* iiw*
140 ilbN (N integer)
141
142 ]]></programlisting>
143 <para>
144 may not appear in the function code.</para>
145 </refsection>
146 <refsection>
147 <title>See Also</title>
148 <simplelist type="inline">
149 <member>
150 <link linkend="function">function</link>
151 </member>
152 </simplelist>
153 </refsection>
154</refentry>
diff --git a/scilab/modules/scilab2fortran/help/fr_FR/addchapter.sce b/scilab/modules/scilab2fortran/help/fr_FR/addchapter.sce
deleted file mode 100644
index fb142d8..0000000
--- a/scilab/modules/scilab2fortran/help/fr_FR/addchapter.sce
+++ /dev/null
@@ -1,13 +0,0 @@
1// Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
2// Copyright (C) 2007 - INRIA - Allan CORNET
3// Copyright (C) 2009 - DIGITEO
4//
5// This file must be used under the terms of the CeCILL.
6// This source file is licensed as described in the file COPYING, which
7// you should have received as part of this distribution. The terms
8// are also available at
9// http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt
10
11path = SCI+"/modules/scilab2fortran/help/fr_FR";
12add_help_chapter("Scilab vers Fortran",path,%T);
13clear path add_help_chapter;
diff --git a/scilab/modules/scilab2fortran/help/pt_BR/addchapter.sce b/scilab/modules/scilab2fortran/help/pt_BR/addchapter.sce
deleted file mode 100644
index 0532150..0000000
--- a/scilab/modules/scilab2fortran/help/pt_BR/addchapter.sce
+++ /dev/null
@@ -1,12 +0,0 @@
1// Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
2// Copyright (C) 2009 - DIGITEO
3//
4// This file must be used under the terms of the CeCILL.
5// This source file is licensed as described in the file COPYING, which
6// you should have received as part of this distribution. The terms
7// are also available at
8// http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt
9
10path = SCI+"/modules/scilab2fortran/help/pt_BR";
11add_help_chapter("Conversão Scilab-Fortran",path,%T);
12clear path add_help_chapter;
diff --git a/scilab/modules/scilab2fortran/license.txt b/scilab/modules/scilab2fortran/license.txt
deleted file mode 100644
index 67c3a41..0000000
--- a/scilab/modules/scilab2fortran/license.txt
+++ /dev/null
@@ -1,11 +0,0 @@
1Copyright:
2Copyright (c) 2008 - DIGITEO
3Copyright (c) 1989-2008 - INRIA
4
5License:
6This module must be used under the terms of the CeCILL.
7This module file is licensed as described in the file COPYING, which
8you should have received as part of this distribution. The terms
9are also available at
10http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt
11
diff --git a/scilab/modules/scilab2fortran/locales/en_US/scilab2fortran.pot b/scilab/modules/scilab2fortran/locales/en_US/scilab2fortran.pot
deleted file mode 100644
index 290c9b6..0000000
--- a/scilab/modules/scilab2fortran/locales/en_US/scilab2fortran.pot
+++ /dev/null
@@ -1,18 +0,0 @@
1# Localization of the module scilab2fortran
2# Please see in SCI/tools/localization for localization management
3# Copyright (C) 2007/2008 - INRIA / Scilab
4# This file is distributed under the same license as the Scilab package.
5# Sylvestre Ledru <sylvestre.ledru@inria.fr>, 2007/2008.
6#
7msgid ""
8msgstr ""
9"Project-Id-Version: Scilab\n"
10"Report-Msgid-Bugs-To: <localization@scilab.org>\n"
11"POT-Creation-Date: 2007-09-27 16:24+0200\n"
12"Last-Translator: Sylvestre Ledru <sylvestre.ledru@inria.fr>\n"
13"Language-Team: Scilab Localization <localization@scilab.org>\n"
14"MIME-Version: 1.0\n"
15"Content-Type: text/plain; charset=ISO-8859-1\n"
16"Content-Transfer-Encoding: 8bit\n"
17"Revision-Date: 2009-01-27 10:37+0100\n"
18
diff --git a/scilab/modules/scilab2fortran/locales/fr_FR/scilab2fortran.po b/scilab/modules/scilab2fortran/locales/fr_FR/scilab2fortran.po
deleted file mode 100644
index e69de29..0000000
--- a/scilab/modules/scilab2fortran/locales/fr_FR/scilab2fortran.po
+++ /dev/null
diff --git a/scilab/modules/scilab2fortran/macros/%a2for.sci b/scilab/modules/scilab2fortran/macros/%a2for.sci
deleted file mode 100644
index 310ae50..0000000
--- a/scilab/modules/scilab2fortran/macros/%a2for.sci
+++ /dev/null
@@ -1,98 +0,0 @@
1// Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
2// Copyright (C) ????-2008 - INRIA
3//
4// This file must be used under the terms of the CeCILL.
5// This source file is licensed as described in the file COPYING, which
6// you should have received as part of this distribution. The terms
7// are also available at
8// http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt
9
10
11function [stk,nwrk,txt,top]=%a2for(nwrk)
12//
13//!
14txt=[]
15s2=stk(top);s1=stk(top-1);
16[s1,te1,t1,m1,n1]=s1(1:5);
17[s2,te2,t2,m2,n2]=s2(1:5);
18mn1=mulf(m1,n1)
19it1=prod(size(s1))-1;it2=prod(size(s2))-1
20if t1<>t2 then
21 if t1=='0' then
22 t1='1',
23 elseif t2=='0' then
24 t2='1'
25 end
26end
27
28//
29if m1=='1'&n1=='1'&m2=='1'&m2=='1' then
30 if t1=='1' then
31 if isnum(s1(1)) then s1(1)=s1(1)+'D0', end
32 if it1==1 then if isnum(s1(2)) then s1(2)=s1(2)+'D0',end,end
33
34 if isnum(s2(1)) then s2(1)=s2(1)+'D0', end
35 if it2==1 then if isnum(s2(2)) then s2(2)=s2(2)+'D0',end,end
36 end
37 select it1+2*it2
38 case 0 then
39 stk=list(s1+'+'+s2,'2',t1,m1,n1)
40 case 1 then
41 stk=list([s1(1)+'+'+s2(1),s1(2)],'2',t1,m1,n1)
42 case 2 then
43 stk=list([s1(1)+'+'+s2(1),s2(2)],'2',t1,m1,n1)
44 case 3 then
45 stk=list([s1(1)+'+'+s2(1),s1(2)+'+'+s2(2)],'2',t1,m1,n1)
46 end
47else
48 select it1+2*it2
49 case 0 then
50 [out,nwrk,txt]=outname(nwrk,'1',m1,n1)
51 txt=[txt;
52 gencall(['dcopy',mn1,s1(1),'1',out,'1']);
53 gencall(['dadd',mn1,out,'1',s2(1),'1'])];
54 stk=list(out,'-1',t1,m1,n1)
55 case 1 then
56 [outr,nwrk,txt]=outname(nwrk,'1',m1,n1)
57 if part(outr,1:4)<>'work' then
58 outi=outr+'_i'
59 outr=outr+'_r'
60 else
61 [outi,nwrk,txt]=outname(nwrk,t2,m2,n2)
62 end
63 txt=[txt;
64 gencall(['dcopy',mn1,s1(1),'1',outr,'1']);
65 gencall(['dadd',mn1,s2(1),'1',outr,'1']);
66 gencall(['dcopy',mn1,s1(2),'1',outi,'1'])]
67 stk=list([outr,outi],'-1',t1,m1,n1)
68 case 2 then
69 [outr,nwrk,txt]=outname(nwrk,'1',m1,n1)
70 if part(outr,1:4)<>'work' then
71 outi=outr+'_i'
72 outr=outr+'_r'
73 else
74 [outi,nwrk,txt]=outname(nwrk,t2,m2,n2)
75 end
76 txt=[txt;
77 gencall(['dcopy',mn1,s1(1),'1',outr,'1']);
78 gencall(['dadd',mn1,s2(1),'1',outr,'1']);
79 gencall(['dcopy',mn1,s2(2),'1',outi,'1'])]
80 stk=list([outr,outi],'-1',t1,m1,n1)
81 case 3 then
82 [outr,nwrk,txt]=outname(nwrk,'1',m1,n1)
83 if part(outr,1:4)<>'work' then
84 outi=outr+'_i'
85 outr=outr+'_r'
86 else
87 [outi,nwrk,txt]=outname(nwrk,t2,m2,n2)
88 end
89 txt=[txt;
90 gencall(['dcopy',mn1,s1(1),'1',outr,'1']);
91 gencall(['dadd',mn1,s2(1),'1',outr,'1']);
92 gencall(['dcopy',mn1,s1(2),'1',outi,'1']);
93 gencall(['dadd',mn1,s2(2),'1',outi,'1'])];
94 stk=list([outr,outi],'-1',t1,m1,n1)
95 end
96end
97top=top-1
98endfunction
diff --git a/scilab/modules/scilab2fortran/macros/%c2for.sci b/scilab/modules/scilab2fortran/macros/%c2for.sci
deleted file mode 100644
index 60315ec..0000000
--- a/scilab/modules/scilab2fortran/macros/%c2for.sci
+++ /dev/null
@@ -1,69 +0,0 @@
1// Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
2// Copyright (C) ????-2008 - INRIA
3//
4// This file must be used under the terms of the CeCILL.
5// This source file is licensed as described in the file COPYING, which
6// you should have received as part of this distribution. The terms
7// are also available at
8// http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt
9
10
11function [stk,nwrk,txt,top]=%c2for(nwrk)
12//
13//!
14nrc=evstr(op(3))
15if op(2)=='27' then
16 ncc=1
17elseif op(2)=='23' then
18 ncc=nrc;nrc=1;
19else
20 ncc=evstr(op(4))
21end
22nc='0';typ=0
23top1=top-nrc*ncc
24for k=1:ncc
25 for l=1:nrc
26 sk=stk(top1+(l-1)*ncc+k)
27 typ=maxi(typ,evstr(sk(3)))
28 nc=addf(nc,sk(5))
29 if sk(5)<>'0' then break,end
30 end
31end
32nl='0'
33for l=1:nrc
34 for k=1:ncc
35 sk=stk(top1+(l-1)*ncc+k)
36 typ=maxi(typ,evstr(sk(3)))
37 nl=addf(nl,sk(4))
38 if sk(4)<>'0' then break,end
39 end
40end
41typ=string(typ)
42
43[out,nwrk,txt]=outname(nwrk,typ,nl,nc)
44lout=length(out)
45//
46rpos='1'
47for l=1:nrc
48 cpos='0';
49 for k=1:ncc
50 sk=stk(top1+k+(l-1)*ncc)
51 if part(out,lout)==')' then
52 o1=part(out,1:lout-1)+'+'+addf(mulf(cpos,nl),rpos)+')'
53 else
54 o1=out+'('+rpos+','+addf(cpos,'1')+')'
55 end
56 n1=sk(5)
57 m1=sk(4)
58 if m1=='1'&n1=='1' then
59 txt=[txt;' '+o1+'='+sk(1)]
60 else
61 txt=[txt;gencall(['dmcopy',sk(1),n1,o1,nl,n1,m1])];
62 end
63 cpos=addf(n1,cpos)
64 end
65 rpos=addf(m1,rpos)
66end
67stk=list(out,'-1',typ,nl,nc)
68top=top-nrc*ncc+1
69endfunction
diff --git a/scilab/modules/scilab2fortran/macros/%cc2for.sci b/scilab/modules/scilab2fortran/macros/%cc2for.sci
deleted file mode 100644
index 9f587f7..0000000
--- a/scilab/modules/scilab2fortran/macros/%cc2for.sci
+++ /dev/null
@@ -1,38 +0,0 @@
1// Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
2// Copyright (C) ????-2008 - INRIA
3//
4// This file must be used under the terms of the CeCILL.
5// This source file is licensed as described in the file COPYING, which
6// you should have received as part of this distribution. The terms
7// are also available at
8// http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt
9
10
11function [stk,nwrk,txt]=%cc2for(nwrk)
12//
13//!
14rhs=abs(evstr(op(3)))
15nc='0';typ=0
16for k=1:rhs
17 sk=stk(top-rhs+k)
18 typ=maxi(typ,evstr(sk(3)))
19 nc=addf(nc,sk(5))
20end
21nl=sk(4)
22typ=string(typ)
23
24[out,nwrk,txt]=outname(nwrk,typ,nl,nc)
25lout=length(out)
26nc='0'
27for k=1:rhs
28 sk=stk(top-rhs+k)
29 if part(out,lout)==')' then
30 o1=part(out,1:lout-1)+'+'+mulf(nl,nc)+')'
31 else
32 o1=out+'(1,'+nc+')'
33 end
34 txt=[txt;gencall(['dcopy',mulf(nl,sk(5)),sk(1),'1',o1,'1'])];
35 nc=addf(nc,sk(5))
36end
37stk=list(out,'-1',typ,nl,nc)
38endfunction
diff --git a/scilab/modules/scilab2fortran/macros/%e2for.sci b/scilab/modules/scilab2fortran/macros/%e2for.sci
deleted file mode 100644
index 542e63b..0000000
--- a/scilab/modules/scilab2fortran/macros/%e2for.sci
+++ /dev/null
@@ -1,55 +0,0 @@
1// Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
2// Copyright (C) ????-2008 - INRIA
3//
4// This file must be used under the terms of the CeCILL.
5// This source file is licensed as described in the file COPYING, which
6// you should have received as part of this distribution. The terms
7// are also available at
8// http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt
9
10
11function [stk,nwrk,txt,top]=%e2for(nwrk)
12// genere le code fortran relatif a l'extraction d'une sous matrice
13//!
14rhs=maxi(0,abs(evstr(op(3)))-1)
15sn=stk(top);top=top-1
16arg=[]
17s2=stk(top)
18mn2=mulf(s2(4),s2(5))
19if rhs==1 then
20 if s2(4)=='1'&s2(5)=='1' then
21 stk=list(sn(1)+'('+s2(1)+')','0',sn(3),'1','1')
22 else
23 [out,nwrk,txt]=outname(nwrk,sn(3),s2(4),s2(5))
24 txt=[txt;
25 gencall(['dmext',sn(1),mulf(sn(4),sn(5)),'1',s2(1),mn2,'0','-1',out])]
26 stk=list(out,'-1',sn(3),mn2,'1')
27 end
28else
29 s1=stk(top-1);top=top-1
30 if s2(4)=='1'&s2(5)=='1'&s1(4)=='1'&s1(5)=='1' then
31 stk=list(sn(1)+'('+makeargs([s1(1),s2(1)])+')','0',sn(3),'1','1')
32 else
33 if s1(4)=='-1' then
34 nrow='-1'
35 nr=sn(4)
36 s1(1)='0'
37 else
38 nrow=mulf(s1(4),s1(5))
39 nr=nrow
40 end
41 if s2(4)=='-1' then
42 ncol='-1'
43 nc=sn(5)
44 s2(1)='0'
45 else
46 ncol=mn2
47 nc=ncol
48 end
49
50 [out,nwrk,txt]=outname(nwrk,sn(3),mulf(s1(4),s1(5)),mn2)
51 txt=[txt;gencall(['dmext',sn(1),sn(4),sn(5),s1(1),nrow,s2(1),ncol,out])]
52 stk=list(out,'-1',sn(3),nr,nc)
53 end
54end
55endfunction
diff --git a/scilab/modules/scilab2fortran/macros/%h2for.sci b/scilab/modules/scilab2fortran/macros/%h2for.sci
deleted file mode 100644
index 190b142..0000000
--- a/scilab/modules/scilab2fortran/macros/%h2for.sci
+++ /dev/null
@@ -1,28 +0,0 @@
1// Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
2// Copyright (C) ????-2008 - INRIA
3//
4// This file must be used under the terms of the CeCILL.
5// This source file is licensed as described in the file COPYING, which
6// you should have received as part of this distribution. The terms
7// are also available at
8// http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt
9
10
11function [stk,nwrk,txt,top]=%h2for(nwrk)
12// &
13s2=stk(top);s1=stk(top-1);
14txt=[]
15[e1,te1]=s1(1:2);
16[e2,te2]=s2(1:2);
17//
18if te2=='2'|te2=='3' then e2='('+e2+')',end
19if te1=='2'|te1=='3' then e1='('+e1+')',end
20
21if s1(4)=='1'&s1(5)=='1'&s2(4)=='1'&s2(5)=='1' then
22 stk=list(e1+'.and.'+e2,'1','0',s2(4),s1(5))
23else
24 txt='c Warning: boolean and on matrices not yet handled'
25 stk=list(e1+'.and.'+e2,'1','0',s1(4),s1(5))
26end
27top=top-1
28endfunction
diff --git a/scilab/modules/scilab2fortran/macros/%i2for.sci b/scilab/modules/scilab2fortran/macros/%i2for.sci
deleted file mode 100644
index c99c2b5..0000000
--- a/scilab/modules/scilab2fortran/macros/%i2for.sci
+++ /dev/null
@@ -1,87 +0,0 @@
1// Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
2// Copyright (C) ????-2008 - INRIA
3//
4// This file must be used under the terms of the CeCILL.
5// This source file is licensed as described in the file COPYING, which
6// you should have received as part of this distribution. The terms
7// are also available at
8// http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt
9
10
11function [stk,nwrk,txt,top]=%i2for(nwrk)
12//
13//!
14
15rhs=abs(evstr(op(3)))-2
16sto=stk(top);top=top-1
17sfrom=stk(top);top=top-1
18if sto(3)=='1'|sfrom(3)=='1' then
19 typ='1'
20else
21 typ='0'
22end
23top=top-rhs+1
24arg=[]
25
26s2=stk(top)
27if rhs==1 then
28 if s2(4)=='1'&s2(5)=='1' then
29 txt=' '+sto(1)+'('+s2(1)+')='+sfrom(1)
30 out=sto(1)
31 if sto(4)=='0' then
32 sto(4)=s2(1);sto(5)='1'
33 elseif sto(4)=='1'&sto(5)=='1' then
34 sto(4)=s2(1)
35 elseif sto(4)=='1' then
36 if isnum(sto(5))&isnum(s2(1)) then
37 sto(5)=string(maxi(evstr(sto(5)),evstr(s2(1))))
38 else
39 sto(5)=callfun(['max',sto(5),s2(1)])
40 end
41 elseif sto(5)=='1' then
42 if isnum(sto(4))&isnum(s2(1)) then
43 sto(4)=string(maxi(evstr(sto(4)),evstr(s2(1))))
44 else
45 sto(4)=callfun(['max',sto(4),s2(1)])
46 end
47 else
48 error(15)
49 end
50 else
51 out=op(2);
52 txt=[gencall(['dmins',sto(1),mulf(sto(4),sto(5)),'1',..
53 s2(1),mulf(s2(4),s2(5)),'0','-1',sfrom(1),'1'])]
54 end
55else
56 s1=stk(top+1)
57 if s2(4)=='1'&s2(5)=='1'&s1(4)=='1'&s1(5)=='1' then
58 txt=' '+sto(1)+'('+makeargs([s2(1),s1(1)])+')='+sfrom(1)
59 out=sto(1)
60 if isnum(sto(4))&isnum(s2(1)) then
61 sto(4)=string(maxi(evstr(sto(4)),evstr(s2(1))))
62 else
63 sto(4)=callfun(['max',sto(4),s2(1)])
64 end
65 if isnum(sto(5))&isnum(s1(1)) then
66 sto(5)=string(maxi(evstr(sto(5)),evstr(s1(1))))
67 else
68 sto(5)=callfun(['max',sto(5),s1(1)])
69 end
70
71 else
72 out=op(2);
73 txt=[gencall(['dmins',sto(1),sto(4),sto(5),..
74 s2(1),mulf(s2(4),s2(5)),s1(1),mulf(s1(4),s1(5)),sfrom(1),sfrom(4)])]
75 end
76end
77
78if sto(4)=='0'|sto(5)=='0' then
79 WARNING('insertion : les dimensions de la matrice '+sto(1)+' sont inconnues')
80 write(%io(2),'entrez le nombre de ligne:')
81 sto(4)=read(%io(1),1,1,'(a)')
82 write(%io(2),'entrez le nombre de colonnes:')
83 sto(5)=read(%io(1),1,1,'(a)')
84
85end
86stk=list(out,'-1',typ,sto(4),sto(5))
87endfunction
diff --git a/scilab/modules/scilab2fortran/macros/%imp2for.sci b/scilab/modules/scilab2fortran/macros/%imp2for.sci
deleted file mode 100644
index b6c963e..0000000
--- a/scilab/modules/scilab2fortran/macros/%imp2for.sci
+++ /dev/null
@@ -1,63 +0,0 @@
1// Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
2// Copyright (C) ????-2008 - INRIA
3//
4// This file must be used under the terms of the CeCILL.
5// This source file is licensed as described in the file COPYING, which
6// you should have received as part of this distribution. The terms
7// are also available at
8// http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt
9
10
11function [stk,nwrk,txt,top]=%imp2for(nwrk)
12//fortran code for 1:n
13//
14// Voir s'il est possible d'ameliorer dans le cas ou ces vecteurs implicite
15// servent dans la designation d'une sous matrice
16//!
17if forexp==1 then
18 s1=stk(top-1);s2=stk(top)
19 if op(3)=='2' then
20 stk=list([s1(1),s2(1)],'2')
21 top=top-1
22 else
23 s0=stk(top-2)
24 stk=list([s0(1),s2(1),s1(1)],'2')
25 top=top-2
26 end
27 return
28end
29rhs=abs(evstr(op(3)))
30if rhs==2 then
31 fin=stk(top);
32 deb=stk(top-1);
33 pas=['1','0','0']
34 top=top-1
35else
36 fin=stk(top);
37 deb=stk(top-2);
38 pas=stk(top-1);
39 top=top-2
40end
41
42if pas(1)=='1' then
43 ln=addf(subf(fin(1),deb(1)),'1')
44else
45 ln=addf('('+subf(fin(1),deb(1))+')/'+pas(1),'1')
46end
47//
48if deb(3)=='1'|fin(3)=='1'|pas(3)=='1' then
49 typ='1'
50else
51 typ='0'
52end
53//
54 [out,nwrk,txt]=outname(nwrk,typ,'1',ln)
55 if typ=='1' then
56 txt=[txt;gencall(['dvimp',deb(1),fin(1),pas(1),out])]
57 else
58 txt=[txt;gencall(['ivimp',deb(1),fin(1),pas(1),out])]
59 end
60
61 stk=list(out,'-1',typ,'1',ln)
62//end
63endfunction
diff --git a/scilab/modules/scilab2fortran/macros/%log2for.sci b/scilab/modules/scilab2fortran/macros/%log2for.sci
deleted file mode 100644
index 1e9cc0f..0000000
--- a/scilab/modules/scilab2fortran/macros/%log2for.sci
+++ /dev/null
@@ -1,26 +0,0 @@
1// Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
2// Copyright (C) ????-2008 - INRIA
3//
4// This file must be used under the terms of the CeCILL.
5// This source file is licensed as described in the file COPYING, which
6// you should have received as part of this distribution. The terms
7// are also available at
8// http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt
9
10
11function [stk,nwrk,txt,top]=%log2for(nwrk)
12txt=[]
13iop=evstr(op(2))
14s2=stk(top);s1=stk(top-1);top=top-1
15if s1(4)=='1'&s1(5)=='1'&s2(4)=='1'&s2(5)=='1' then
16 if s2(2)=='2' then s2(1)='('+s2(1)+')',end
17 if s1(2)=='2' then s1(1)='('+s1(1)+')',end
18 stk=list(s1(1)+ops(iop,1)+s2(1),'1','0','1','1')
19else
20 nwrk=dclfun(nwrk,'mcompar','0')
21 if s1(1)=='[]' then s1(1)='0.0d0',end //void reference
22 if s2(1)=='[]' then s2(1)='0.0d0',end //void reference
23 out=callfun(['mcompar',s1(1),s1(4),s1(5),''''+ops(iop,1)+'''',s2(1),s2(4),s2(5)],'0')
24 stk=list(out+'.eq.1','-1','0','1','1')
25end
26endfunction
diff --git a/scilab/modules/scilab2fortran/macros/%m2for.sci b/scilab/modules/scilab2fortran/macros/%m2for.sci
deleted file mode 100644
index 9bd9022a..0000000
--- a/scilab/modules/scilab2fortran/macros/%m2for.sci
+++ /dev/null
@@ -1,208 +0,0 @@
1// Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
2// Copyright (C) ????-2008 - INRIA
3//
4// This file must be used under the terms of the CeCILL.
5// This source file is licensed as described in the file COPYING, which
6// you should have received as part of this distribution. The terms
7// are also available at
8// http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt
9
10
11function [stk,nwrk,txt,top]=%m2for(nwrk)
12// multiplications
13//!
14
15s2=stk(top);s1=stk(top-1);
16txt1=[]
17if s1(3)<>s2(3) then
18 if s1(3)=='0' then
19 [s1,nwrk,txt1]=typconv(s1,nwrk,'1'),
20 else
21 [s2,nwrk,txt1]=typconv(s2,nwrk,'1'),
22 end
23end
24[s1,te1,t1,m1,n1]=s1(1:5);
25[s2,te2,t2,m2,n2]=s2(1:5);
26it1=prod(size(s1))-1;it2=prod(size(s2))-1
27if t1<>t2 then
28 if t2=='0' then t2='1',end
29end
30//
31if m1=='1'&n1=='1'&m2=='1'&n2=='1' then // cas scalaire
32 select it1+2*it2
33 case 0 then
34 if te2=='2' then s2='('+s2+')',end
35 if te1=='2' then s1='('+s1+')',end
36 stk=list(mulf(s1,s2),'1',t2,m1,n1)
37 case 1 then
38 if te1=='2' then s1(1)='('+s1(1)+')',s1(2)='('+s1(2)+')', end
39 if te2=='2' then s2='('+s2+')',end
40 stk=list([mulf(s1(1),s2(1)),mulf(s1(2),s2(1))],'1',t2,m1,n1)
41 case 2 then
42 if te2=='2' then s2(1)='('+s2(1)+')',s2(2)='('+s2(2)+')', end
43 if te1=='2' then s1='('+s1+')',end
44 stk=list([mulf(s1(1),s2(1)),mulf(s1(1),s2(2))],'1',t2,m1,n1)
45 case 3 then
46 if te1=='2' then s1(1)='('+s1(1)+')',s1(2)='('+s1(2)+')', end
47 if te2=='2' then s2(1)='('+s2(1)+')',s2(2)='('+s2(2)+')', end
48 stk=list([subf(mulf(s1(1),s2(1)),mulf(s1(2),s2(2))),..
49 addf(mulf(s1(1),s2(2)),mulf(s1(2),s2(1))) ],'1',t2,m1,n1)
50 end
51 txt=[txt1;txt]
52 top=top-1
53 return
54end
55if m1=='1'&n1=='1' then
56 mn2=mulf(m2,n2)
57 select it1+2*it2
58 case 0 then
59 [out,nwrk,txt]=outname(nwrk,t2,m2,n2)
60 if out<>s2 then
61 txt=[txt;gencall(['dcopy',mn2,s2,'1',out,'1'])]
62 end
63 txt=[txt;gencall(['dscal',mn2,s1,out,'1'])]
64 if ~isnum(s1)&op(2)==s1 then
65 txt=[txt;gencall(['dcopy',mn2,out,'1',s1,'1'])]
66 out=s1
67 end
68 stk=list(out,'-1',t2,m2,n2)
69 case 1 then
70 [outr,nwrk,txt]=outname(nwrk,t2,m2,n2)
71 if part(outr,1:4)<>'work' then
72 outi=outr+'_i'
73 outr=outr+'_r'
74 else
75 [outi,nwrk,txt]=outname(nwrk,t2,m2,n2)
76 end
77 txt=[txt;
78 gencall(['dcopy',mn2,s2,'1',outr,'1']);
79 gencall(['dcopy',mn2,s2,'1',outi,'1']);
80 gencall(['dscal',mn2,s1(1),outr,'1']);
81 gencall(['dscal',mn2,s1(2),outi,'1'])];
82 stk=list([outr,outi],'-1',t2,m2,n2)
83 case 2 then
84 [outr,nwrk,txt]=outname(nwrk,t2,m2,n2)
85 if part(outr,1:4)<>'work' then
86 outi=outr+'_i'
87 outr=outr+'_r'
88 else
89 [outi,nwrk,txt]=outname(nwrk,t2,m2,n2)
90 end
91 txt=[txt;
92 gencall(['dcopy',mn2,s2(1),'1',outr,'1']);
93 gencall(['dcopy',mn2,s2(2),'1',outi,'1']);
94 gencall(['dscal',mn2,s1,outr,'1']);
95 gencall(['dscal',mn2,s1,outi,'1'])];
96 stk=list([outr,outi],'-1',t2,m2,n2)
97 case 3 then
98 [outr,nwrk,txt]=outname(nwrk,t2,m2,n2)
99 if part(outr,1:4)<>'work' then
100 outi=outr+'_i'
101 outr=outr+'_r'
102 else
103 [outi,nwrk,txt]=outname(nwrk,t2,m2,n2)
104 end
105 txt=[txt;
106 gencall(['dcopy',mn2,s2(1),'1',outr,'1']);
107 gencall(['dcopy',mn2,s2(2),'1',outi,'1']);
108 gencall(['wscal',mn2,s1(1),s1(2),outr,outi,'1'])];
109 stk=list([outr,outi],'-1',t2,m2,n2)
110 end
111 txt=[txt1;txt]
112 top=top-1
113 return
114end
115if m2=='1'&n2=='1' then
116 mn1=mulf(m1,n1)
117 select it1*2*it2
118 case 0 then
119 [out,nwrk,txt]=outname(nwrk,t2,m1,n1)
120 if out<>s1 then txt=[txt;gencall(['dcopy',mn1,s1,'1',out,'1'])], end
121 txt=[txt;gencall(['dscal',mn1,s2,out,'1'])]
122 if ~isnum(s2)&op(2)==s2 then
123 txt=[txt;gencall(['dcopy',mn1,out,'1',s2,'1'])]
124 out=s2
125 end
126 stk=list(out,'-1',t2,m1,n1)
127 case 1 then
128 [outr,nwrk,txt]=outname(nwrk,t1,m1,n1)
129 if part(outr,1:4)<>'work' then
130 outi=outr+'_i'
131 outr=outr+'_r'
132 else
133 [outi,nwrk,txt]=outname(nwrk,t2,m2,n2)
134 end
135 txt=[txt;
136 gencall(['dcopy',mn1,s1(1),'1',outr,'1']);
137 gencall(['dcopy',mn1,s1(2),'1',outi,'1']);
138 gencall(['dscal',mn1,s2,outr,'1']);
139 gencall(['dscal',mn1,s2,outi,'1'])];
140 stk=list([outr,outi],'-1',t2,m1,n1)
141 case 2 then
142 [outr,nwrk,txt]=outname(nwrk,t1,m1,n1)
143 if part(outr,1:4)<>'work' then
144 outi=outr+'_i'
145 outr=outr+'_r'
146 else
147 [outi,nwrk,txt]=outname(nwrk,t2,m2,n2)
148 end
149 txt=[txt;
150 gencall(['dcopy',mn1,s1,'1',outr,'1']);
151 gencall(['dcopy',mn1,s1,'1',outi,'1']);
152 gencall(['dscal',mn1,s2(1),outr,'1']);
153 gencall(['dscal',mn1,s2(2),outi,'1'])];
154 stk=list([outr,outi],'-1',t2,m1,n1)
155 case 3 then
156 [outr,nwrk,txt]=outname(nwrk,t1,m1,n1)
157 if part(outr,1:4)<>'work' then
158 outi=outr+'_i'
159 outr=outr+'_r'
160 else
161 [outi,nwrk,txt]=outname(nwrk,t2,m2,n2)
162 end
163 txt=[txt;
164 gencall(['dcopy',mn1,s1(1),'1',outr,'1']);
165 gencall(['dcopy',mn1,s1(2),'1',outi,'1']);
166 gencall(['wscal',mn1,s2(1),s2(2),outr,outi,'1'])]
167 stk=list([outr,outi],'-1',t2,m1,n1)
168 end
169 txt=[txt1;txt]
170 top=top-1
171 return
172end
173 select it1+2*it2
174 case 0 then
175 [out,nwrk,txt]=outname(nwrk,t2,m1,n2,[s1,s2])
176 txt=[txt;gencall(['dmmul',s1,m1,s2,m2,out,m1,m1,n1,n2])]
177 if ~isnum(s1)&op(2)==s1 then
178 txt=[txt;gencall(['dcopy',mulf(m1,n2),out,'1',s1,'1'])]
179 out=s1
180 elseif ~isnum(s2)&op(2)==s2 then
181 txt=[txt;gencall(['dcopy',mulf(m1,n2),out,'1',s2,'1'])]
182 out=s2
183 end
184 stk=list(out,'-1',t2,m1,n2)
185 case 1 then
186 [outr,nwrk,txt]=outname(nwrk,t2,m1,n2,[s1,s2])
187 [outi,nwrk,txt]=outname(nwrk,t2,m1,n2,[s1,s2])
188 txt=[txt;gencall(['dmmul',s1(1),m1,s2(1),m2,outr,m1,m1,n1,n2]);
189 gencall(['dmmul',s1(2),m1,s2(1),m2,outi,m1,m1,n1,n2])];
190 stk=list([outr,outi],'-1',t2,m1,n2)
191 case 2 then
192 [outr,nwrk,txt]=outname(nwrk,t2,m1,n2,[s1,s2])
193 [outi,nwrk,txt]=outname(nwrk,t2,m1,n2,[s1,s2])
194 txt=[txt;gencall(['dmmul',s1(1),m1,s2(1),m2,outr,m1,m1,n1,n2]);
195 gencall(['dmmul',s1(1),m1,s2(2),m2,outi,m1,m1,n1,n2])];
196 stk=list([outr,outi],'-1',t2,m1,n2)
197 case 3 then
198 [outr,nwrk,txt]=outname(nwrk,t2,m1,n2,[s1,s2])
199 [outi,nwrk,txt]=outname(nwrk,t2,m1,n2,[s1,s2])
200 txt=[txt;
201 gencall(['wmmul',s1(1),s1(2),m1,s2(1),s2(2),m2,outr,outi,..
202 m1,m1,n1,n2])]
203 stk=list([outr,outi],'-1',t2,m1,n2)
204 end
205 txt=[txt1;txt]
206 top=top-1
207 return
208endfunction
diff --git a/scilab/modules/scilab2fortran/macros/%p2for.sci b/scilab/modules/scilab2fortran/macros/%p2for.sci
deleted file mode 100644
index 872bf46..0000000
--- a/scilab/modules/scilab2fortran/macros/%p2for.sci
+++ /dev/null
@@ -1,207 +0,0 @@
1// Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
2// Copyright (C) ????-2008 - INRIA
3//
4// This file must be used under the terms of the CeCILL.
5// This source file is licensed as described in the file COPYING, which
6// you should have received as part of this distribution. The terms
7// are also available at
8// http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt
9
10
11function [stk,nwrk,txt,top]=%p2for(nwrk)
12// multiplications
13//!
14
15s2=stk(top);s1=stk(top-1);
16txt1=[]
17if s1(3)<>s2(3) then
18 if s1(3)=='0' then
19 [s1,nwrk,txt1]=typconv(s1,nwrk,'1'),
20 end
21end
22[s1,te1,t1,m1,n1]=s1(1:5);
23[s2,te2,t2,m2,n2]=s2(1:5);
24it1=prod(size(s1))-1;it2=prod(size(s2))-1
25//
26if m1=='1'&n1=='1'&m2=='1'&n2=='1' then // cas scalaire
27 select it1+2*it2
28 case 0 then
29 if te2=='2' then s2='('+s2+')',end
30 if te1=='2' then s1='('+s1+')',end
31 stk=list(s1+'**'+s2,'1',t1,m1,n1)
32 case 1 then
33 if te1=='2' then s1(1)='('+s1(1)+')',s1(2)='('+s1(2)+')', end
34 if te2=='2' then s2='('+s2+')',end
35 stk=list(s1(1)+'**'+s2(1),s1(2)+'**'+s2(1),'1',t1,m1,n1)
36 case 2 then
37 if te2=='2' then s2(1)='('+s2(1)+')',s2(2)='('+s2(2)+')', end
38 if te1=='2' then s1='('+s1+')',end
39 stk=list(s1(1)+'**'+s2(1),s1(1)+'**'+s2(2),'1',t1,m1,n1)
40 case 3 then
41 if te1=='2' then s1(1)='('+s1(1)+')',s1(2)='('+s1(2)+')', end
42 if te2=='2' then s2(1)='('+s2(1)+')',s2(2)='('+s2(2)+')', end
43 stk=list([subf(s1(1)+'**'+s2(1),s1(2)+'**'+s2(2)),..
44 addf(s1(1)+'**'+s2(2),s1(2)+'**'+s2(1)) ],'1',t1,m1,n1)
45 end
46 txt=[txt1;txt]
47 top=top-1
48 return
49end
50txt='c matrix exponentiation not yet handled'
51stk=list(s1+'**'+s2,'1',t2,m1,n1)
52warning('matrix exponentiation not yet handled')
53return
54if m1=='1'&n1=='1' then
55 mn2=mulf(m2,n2)
56 select it1+2*it2
57 case 0 then
58 [out,nwrk,txt]=outname(nwrk,t2,m2,n2)
59 if out<>s2 then
60 txt=[txt;gencall(['dcopy',mn2,s2,'1',out,'1'])]
61 end
62 txt=[txt;gencall(['dscal',mn2,s1,out,'1'])]
63 if ~isnum(s1)&op(2)==s1 then
64 txt=[txt;gencall(['dcopy',mn2,out,'1',s1,'1'])]
65 out=s1
66 end
67 stk=list(out,'-1',t2,m2,n2)
68 case 1 then
69 [outr,nwrk,txt]=outname(nwrk,t2,m2,n2)
70 if part(outr,1:4)<>'work' then
71 outi=outr+'_i'
72 outr=outr+'_r'
73 else
74 [outi,nwrk,txt]=outname(nwrk,t2,m2,n2)
75 end
76 txt=[txt;
77 gencall(['dcopy',mn2,s2,'1',outr,'1']);
78 gencall(['dcopy',mn2,s2,'1',outi,'1']);
79 gencall(['dscal',mn2,s1(1),outr,'1']);
80 gencall(['dscal',mn2,s1(2),outi,'1'])];
81 stk=list([outr,outi],'-1',t2,m2,n2)
82 case 2 then
83 [outr,nwrk,txt]=outname(nwrk,t2,m2,n2)
84 if part(outr,1:4)<>'work' then
85 outi=outr+'_i'
86 outr=outr+'_r'
87 else
88 [outi,nwrk,txt]=outname(nwrk,t2,m2,n2)
89 end
90 txt=[txt;
91 gencall(['dcopy',mn2,s2(1),'1',outr,'1']);
92 gencall(['dcopy',mn2,s2(2),'1',outi,'1']);
93 gencall(['dscal',mn2,s1,outr,'1']);
94 gencall(['dscal',mn2,s1,outi,'1'])];
95 stk=list([outr,outi],'-1',t2,m2,n2)
96 case 3 then
97 [outr,nwrk,txt]=outname(nwrk,t2,m2,n2)
98 if part(outr,1:4)<>'work' then
99 outi=outr+'_i'
100 outr=outr+'_r'
101 else
102 [outi,nwrk,txt]=outname(nwrk,t2,m2,n2)
103 end
104 txt=[txt;
105 gencall(['dcopy',mn2,s2(1),'1',outr,'1']);
106 gencall(['dcopy',mn2,s2(2),'1',outi,'1']);
107 gencall(['wscal',mn2,s1(1),s1(2),outr,outi,'1'])];
108 stk=list([outr,outi],'-1',t2,m2,n2)
109 end
110 txt=[txt1;txt]
111 top=top-1
112 return
113end
114if m2=='1'&n2=='1' then
115 mn1=mulf(m1,n1)
116 select it1*2*it2
117 case 0 then
118 [out,nwrk,txt]=outname(nwrk,t2,m1,n1)
119 if out<>s1 then txt=[txt;gencall(['dcopy',mn1,s1,'1',out,'1'])], end
120 txt=[txt;gencall(['dscal',mn1,s2,out,'1'])]
121 if ~isnum(s2)&op(2)==s2 then
122 txt=[txt;gencall(['dcopy',mn1,out,'1',s2,'1'])]
123 out=s2
124 end
125 stk=list(out,'-1',t2,m1,n1)
126 case 1 then
127 [outr,nwrk,txt]=outname(nwrk,t1,m1,n1)
128 if part(outr,1:4)<>'work' then
129 outi=outr+'_i'
130 outr=outr+'_r'
131 else
132 [outi,nwrk,txt]=outname(nwrk,t2,m2,n2)
133 end
134 txt=[txt;
135 gencall(['dcopy',mn1,s1(1),'1',outr,'1']);
136 gencall(['dcopy',mn1,s1(2),'1',outi,'1']);
137 gencall(['dscal',mn1,s2,outr,'1']);
138 gencall(['dscal',mn1,s2,outi,'1'])];
139 stk=list([outr,outi],'-1',t2,m1,n1)
140 case 2 then
141 [outr,nwrk,txt]=outname(nwrk,t1,m1,n1)
142 if part(outr,1:4)<>'work' then
143 outi=outr+'_i'
144 outr=outr+'_r'
145 else
146 [outi,nwrk,txt]=outname(nwrk,t2,m2,n2)
147 end
148 txt=[txt;
149 gencall(['dcopy',mn1,s1,'1',outr,'1']);
150 gencall(['dcopy',mn1,s1,'1',outi,'1']);
151 gencall(['dscal',mn1,s2(1),outr,'1']);
152 gencall(['dscal',mn1,s2(2),outi,'1'])];
153 stk=list([outr,outi],'-1',t2,m1,n1)
154 case 3 then
155 [outr,nwrk,txt]=outname(nwrk,t1,m1,n1)
156 if part(outr,1:4)<>'work' then
157 outi=outr+'_i'
158 outr=outr+'_r'
159 else
160 [outi,nwrk,txt]=outname(nwrk,t2,m2,n2)
161 end
162 txt=[txt;
163 gencall(['dcopy',mn1,s1(1),'1',outr,'1']);
164 gencall(['dcopy',mn1,s1(2),'1',outi,'1']);
165 gencall(['wscal',mn1,s2(1),s2(2),outr,outi,'1'])]
166 stk=list([outr,outi],'-1',t2,m1,n1)
167 end
168 txt=[txt1;txt]
169 top=top-1
170 return
171end
172 select it1+2*it2
173 case 0 then
174 [out,nwrk,txt]=outname(nwrk,t2,m1,n2,[s1,s2])
175 txt=[txt;gencall(['dmmul',s1,m1,s2,m2,out,m1,m1,n1,n2])]
176 if ~isnum(s1)&op(2)==s1 then
177 txt=[txt;gencall(['dcopy',mulf(m1,n2),out,'1',s1,'1'])]
178 out=s1
179 elseif ~isnum(s2)&op(2)==s2 then
180 txt=[txt;gencall(['dcopy',mulf(m1,n2),out,'1',s2,'1'])]
181 out=s2
182 end
183 stk=list(out,'-1',t2,m1,n2)
184 case 1 then
185 [outr,nwrk,txt]=outname(nwrk,t2,m1,n2,[s1,s2])
186 [outi,nwrk,txt]=outname(nwrk,t2,m1,n2,[s1,s2])
187 txt=[txt;gencall(['dmmul',s1(1),m1,s2(1),m2,outr,m1,m1,n1,n2]);
188 gencall(['dmmul',s1(2),m1,s2(1),m2,outi,m1,m1,n1,n2])];
189 stk=list([outr,outi],'-1',t2,m1,n2)
190 case 2 then
191 [outr,nwrk,txt]=outname(nwrk,t2,m1,n2,[s1,s2])
192 [outi,nwrk,txt]=outname(nwrk,t2,m1,n2,[s1,s2])
193 txt=[txt;gencall(['dmmul',s1(1),m1,s2(1),m2,outr,m1,m1,n1,n2]);
194 gencall(['dmmul',s1(1),m1,s2(2),m2,outi,m1,m1,n1,n2])];
195 stk=list([outr,outi],'-1',t2,m1,n2)
196 case 3 then
197 [outr,nwrk,txt]=outname(nwrk,t2,m1,n2,[s1,s2])
198 [outi,nwrk,txt]=outname(nwrk,t2,m1,n2,[s1,s2])
199 txt=[txt;
200 gencall(['wmmul',s1(1),s1(2),m1,s2(1),s2(2),m2,outr,outi,..
201 m1,m1,n1,n2])]
202 stk=list([outr,outi],'-1',t2,m1,n2)
203 end
204 txt=[txt1;txt]
205 top=top-1
206 return
207endfunction
diff --git a/scilab/modules/scilab2fortran/macros/%r2for.sci b/scilab/modules/scilab2fortran/macros/%r2for.sci
deleted file mode 100644
index ae987e2..0000000
--- a/scilab/modules/scilab2fortran/macros/%r2for.sci
+++ /dev/null
@@ -1,64 +0,0 @@
1// Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
2// Copyright (C) ????-2008 - INRIA
3//
4// This file must be used under the terms of the CeCILL.
5// This source file is licensed as described in the file COPYING, which
6// you should have received as part of this distribution. The terms
7// are also available at
8// http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt
9
10
11function [stk,nwrk,txt,top]=%r2for(nwrk)
12// genere le code Fortran relatif a la division a droite
13//!
14txt=[]
15s2=stk(top);s1=stk(top-1);top=top-1;
16if s1(4)=='1'&s1(5)=='1'&s2(4)=='1'&s2(5)=='1' then
17 if s2(2)=='2'|s2(2)=='1' then s2(1)='('+s2(1)+')',end
18 if s1(2)=='2' then s1(1)='('+s1(1)+')',end
19 stk=list(s1(1)+'/'+s2(1),'1','1',s1(4),s1(5))
20elseif s1(4)=='1'&s1(5)=='1' then
21
22 [out,nwrk,txt]=outname(nwrk,s2(3),s2(5),s2(4))
23 if out<>s2(1) then
24 txt=gencall(['dcopy',mulf(s2(4),s2(5)),s2(1),'1',out,'1'])
25 end
26 [wrk,nwrk,t1]=getwrk(nwrk,'1',s2(4),'1')
27 [ipvt,nwrk,t2]=getwrk(nwrk,'0',s2(4),'1')
28 [errn,nwrk]=adderr(nwrk,'singular '+s2(1)+' matrix')
29 txt=[txt;t1;t2;
30 gencall(['dgefa',out,s2(4),s2(5),ipvt,'ierr']);
31 genif('ierr.ne.0',[' ierr='+string(errn);' return']);
32 gencall(['dgedi',out,s2(4),s2(5),ipvt,'w',wrk,'1'])]
33 if op(2)==s1(1) then
34 txt=[txt;gencall([' dcopy',mulf(s2(4),s2(5)),out,'1',s1(1),'1'])]
35 out=s1(1)
36 end
37 stk=list(out,'-1','1',s2(4),s2(5))
38elseif s2(4)=='1'&s2(5)=='1' then
39 [out,nwrk,txt]=outname(nwrk,s2(3),s1(4),s1(5))
40 if out<>s1(1) then
41 txt=gencall(['dcopy',mulf(s1(4),s1(5)),s1(1),'1',out,'1'])
42 end
43 if s2(2)=='2'|s2(2)=='1' then s2(1)='('+s2(1)+')',end
44 txt=[txt;gencall(['dscal',mulf(s1(4),s1(5)),'1.0d0/'+s2(1),out,'1'])]
45
46 if op(2)==s2(1) then
47 txt=[txt;gencall(['dcopy',mulf(s1(4),s1(5)),out,'1',s2(1),'1'])]
48 out=s2(1)
49 end
50 stk=list(out,'-1','1',s1(4),s1(5))
51else
52 [res,nwrk,t1]=outname(nwrk,s2(3),s2(4),s2(5),[s1(1),s2(1)])
53 [mat,nwrk,t2]=getwrk(nwrk,'1',s2(4),s2(4))
54 [wrk,nwrk,t3]=getwrk(nwrk,'1',s2(4),'1')
55 [ipvt,nwrk,t4]=getwrk(nwrk,'0',s2(4),'1')
56 [errn,nwrk]=adderr(nwrk,'singular '+s2(1)+' matrix')
57 txt=[t1;t2;t3;
58 gencall(['dcopy',mulf(s2(4),s2(5)),s2(1),'1',mat,'1']);
59 gencall(['dgefa',mat,s2(4),s2(5),ipvt,'ierr']);
60 genif('ierr.ne.0',[' ierr='+string(errn);' return']);
61 gencall(['dgesl',mat,s2(4),s2(5),ipvt,res,'0'])]
62 stk=list(res,'-1',s1(3),s1(4),s1(5))
63end
64endfunction
diff --git a/scilab/modules/scilab2fortran/macros/%rc2for.sci b/scilab/modules/scilab2fortran/macros/%rc2for.sci
deleted file mode 100644
index 0172908..0000000
--- a/scilab/modules/scilab2fortran/macros/%rc2for.sci
+++ /dev/null
@@ -1,41 +0,0 @@
1// Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
2// Copyright (C) ????-2008 - INRIA
3//
4// This file must be used under the terms of the CeCILL.
5// This source file is licensed as described in the file COPYING, which
6// you should have received as part of this distribution. The terms
7// are also available at
8// http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt
9
10
11function [stk,nwrk,txt]=%rc2for(nwrk)
12// genere le code relatif a la concatenation en ligne des matrices
13//!
14
15rhs=abs(evstr(op(3)))
16nl='0';typ=0
17for k=1:rhs
18 sk=stk(top-rhs+k)
19 typ=maxi(typ,evstr(sk(3)))
20 nl=addf(nl,sk(4))
21end
22nc=sk(5)
23
24typ=string(typ)
25
26[out,nwrk,txt]=outname(nwrk,typ,nl,nc)
27lout=length(out)
28nl1='0'
29for k=1:rhs
30 sk=stk(top-rhs+k)
31 if part(out,lout)==')' then
32 o1=part(out,1:lout-1)+'+'+mulf(nl1,nc)+')'
33 else
34 o1=out+'('+addf(nl1,'1')+',1)'
35 end
36 n1=sk(4)
37 txt=[txt;gencall(['dmcopy',sk(1),n1,o1,nl,n1,nc])];
38 nl1=addf(nl1,n1)
39end
40stk=list(out,'-1',typ,nl,nc)
41endfunction
diff --git a/scilab/modules/scilab2fortran/macros/%s2for.sci b/scilab/modules/scilab2fortran/macros/%s2for.sci
deleted file mode 100644
index 4825b2d..0000000
--- a/scilab/modules/scilab2fortran/macros/%s2for.sci
+++ /dev/null
@@ -1,53 +0,0 @@
1// Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
2// Copyright (C) ????-2008 - INRIA
3//
4// This file must be used under the terms of the CeCILL.
5// This source file is licensed as described in the file COPYING, which
6// you should have received as part of this distribution. The terms
7// are also available at
8// http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt
9
10
11function [stk,nwrk,txt,top]=%s2for(nwrk)
12// genere le code frotran relatif a la soustraction et au changement de signe
13//!
14s2=stk(top)
15if s2(2)=='2' then s2(1)='('+s2(1)+')',end
16
17if op(3)=='2' then
18 s1=stk(top-1)
19 if s1(3)<>s2(3) then
20 if s1(3)=='0' then
21 s1(3)='1',
22 elseif s2(3)=='0' then
23 s2(3)='1'
24 end
25 end
26
27 if s1(4)=='1'&s1(5)=='1'&s2(4)=='1'&s2(5)=='1' then
28 if s1(3)=='1' then
29 if isnum(s1(1)) then s1(1)=s1(1)+'D0', end
30 if isnum(s2(1)) then s2(1)=s2(1)+'D0', end
31 end
32 stk=list(s1(1)+'-'+s2(1),'2',s1(3),s1(4),s1(5))
33 else
34 [out,nwrk,txt]=outname(nwrk,'1',s1(4),s1(5))
35 txt=[txt;gencall(['ddif',mulf(s1(4),s1(5)),s1(1),'1',s2(1),'1',out,'1'])]
36 stk=list(out,'-1',s1(3),s1(4),s1(5))
37 end
38 top=top-1
39else
40 if s2(4)=='1'&s2(5)=='1' then
41 stk=list('-'+s2(1),s2(2),s2(3),s2(4),s2(5))
42 else
43 if part(s2(1),1:5)<>'work('&part(s2(1),1:6)<>'iwork(' then
44 [out,nwrk,txt]=outname(nwrk,'1',s2(4),s2(5))
45 txt=[txt;gencall(['dcopy',mulf(s2(4),s2(5)),s2(1),'1',out,'1'])]
46 else
47 out=s2(1)
48 end
49 txt=[txt;gencall(['dscal',mulf(s2(4),s2(5)),'-1.0d0',out,'1'])]
50 stk=list(out,'-1',s2(3),s2(4),s2(5))
51 end
52end
53endfunction
diff --git a/scilab/modules/scilab2fortran/macros/%t2for.sci b/scilab/modules/scilab2fortran/macros/%t2for.sci
deleted file mode 100644
index 881c495..0000000
--- a/scilab/modules/scilab2fortran/macros/%t2for.sci
+++ /dev/null
@@ -1,22 +0,0 @@
1// Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
2// Copyright (C) ????-2008 - INRIA
3//
4// This file must be used under the terms of the CeCILL.
5// This source file is licensed as described in the file COPYING, which
6// you should have received as part of this distribution. The terms
7// are also available at
8// http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt
9
10
11function [stk,nwrk,txt,top]=%t2for(nwrk)
12// genere le code fortarn relatif a la transposition
13//!
14s2=stk(top)
15if s2(4)<>'1'&s2(5)<>'1' then
16 [out,nwrk,txt]=outname(nwrk,s2(3),s2(4),s2(5))
17 txt=[txt;gencall(['mtran',s2(1),s2(4),out,s2(5),s2(4),s2(5)])];
18 stk=list(out,'-1',s2(3),s2(5),s2(4))
19else
20 stk=list(s2(1),s2(2),s2(3),s2(5),s2(4))
21end
22endfunction
diff --git a/scilab/modules/scilab2fortran/macros/adderr.sci b/scilab/modules/scilab2fortran/macros/adderr.sci
deleted file mode 100644
index 2016f9b..0000000
--- a/scilab/modules/scilab2fortran/macros/adderr.sci
+++ /dev/null
@@ -1,25 +0,0 @@
1// Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
2// Copyright (C) ????-2008 - INRIA
3//
4// This file must be used under the terms of the CeCILL.
5// This source file is licensed as described in the file COPYING, which
6// you should have received as part of this distribution. The terms
7// are also available at
8// http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt
9
10
11function [errn,nwrk]=adderr(nwrk,txt)
12//Cette macro ajoute une erreur dont le texte du message est donne dans txt
13// dans la table des erreurs possibles et retourne
14// errn : le numero associe a cette erreur dans le sous programme fortran
15// il faut alors inserer dans le code fortran les lignes suivantes
16// if(.......) then
17// ierr=errn
18// return
19// endif
20//!
21nwrk(7)=nwrk(7)+1
22 errn=nwrk(7)
23 msgs=nwrk(8);msgs(nwrk(7))=txt
24 nwrk(8)=msgs
25endfunction
diff --git a/scilab/modules/scilab2fortran/macros/basparam.sci b/scilab/modules/scilab2fortran/macros/basparam.sci
deleted file mode 100644
index d73e537..0000000
--- a/scilab/modules/scilab2fortran/macros/basparam.sci
+++ /dev/null
@@ -1,51 +0,0 @@
1// Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
2// Copyright (C) ????-2008 - INRIA
3//
4// This file must be used under the terms of the CeCILL.
5// This source file is licensed as described in the file COPYING, which
6// you should have received as part of this distribution. The terms
7// are also available at
8// http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt
9
10
11function []=basparam()
12//utility
13//!
14%else='else',%end='end';%elseif='elseif';%if='if';%for='for';
15%select='select';%while='while';%case='case';%then='then'
16quote=''''
17logics=['==','<','>','<=','>=','<>']
18//
19// symbol type_result parenthes_od_operands
20ops =['+','2',' ';
21 '-','2',' r';
22 '*','1',' ';
23 '.*','1',' r';
24 '*.','1','lr';
25 '.*.','1','lr';
26 '/','1',' r';
27 './','1',' r';
28 '/.','1','lr';
29 './.','1','lr';
30 '\','1','l ';
31 '.\','1','l ';
32 '\.','1','l ';
33 '.\.','1','lr';
34 '**','0',' r';
35 '==','2','lr';
36 '<','2','lr';
37 '>','2','lr';
38 '<=','2','lr';
39 '>=','2','lr';
40 '<>','2','lr';
41 ':','0',' ';
42 '[]','0',' ';
43 'ins','0',' ';
44 'ext','0',' ';
45 quote,'0',' '
46 '|','2',' ';
47 '&','1',' '
48 '~','2',' r'];
49[logics,ops,quote,%else,%end,%elseif,%if,%for,%select,%while,%case,%then]=...
50resume(logics,ops,quote,%else,%end,%elseif,%if,%for,%select,%while,%case,%then)
51endfunction
diff --git a/scilab/modules/scilab2fortran/macros/buildmacros.bat b/scilab/modules/scilab2fortran/macros/buildmacros.bat
deleted file mode 100644
index d39fc8f..0000000
--- a/scilab/modules/scilab2fortran/macros/buildmacros.bat
+++ /dev/null
@@ -1,11 +0,0 @@
1rem Scilab ( http://mwww.scilab.org/ ) - This file is part of Scilab
2rem Copyright (C) ????-2008 - INRIA - Allan CORNET
3rem
4rem This file must be used under the terms of the CeCILL.
5rem This source file is licensed as described in the file COPYING, which
6rem you should have received as part of this distribution. The terms
7rem are also available at
8rem http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt
9
10
11@..\..\..\bin\scilex -nwni -ns -e exec('buildmacros.sce');quit; \ No newline at end of file
diff --git a/scilab/modules/scilab2fortran/macros/buildmacros.sce b/scilab/modules/scilab2fortran/macros/buildmacros.sce
deleted file mode 100644
index 60dd40dd..0000000
--- a/scilab/modules/scilab2fortran/macros/buildmacros.sce
+++ /dev/null
@@ -1,16 +0,0 @@
1// Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
2// Copyright (C) 2005-2008 - INRIA - Allan CORNET
3//
4// This file must be used under the terms of the CeCILL.
5// This source file is licensed as described in the file COPYING, which
6// you should have received as part of this distribution. The terms
7// are also available at
8// http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt
9
10//------------------------------------
11if (isdef('genlib') == %f) then
12 exec(SCI+'/modules/functions/scripts/buildmacros/loadgenlib.sce');
13end
14//------------------------------------
15genlib('scilab2fortranlib','SCI/modules/scilab2fortran/macros',%f,%t);
16//------------------------------------
diff --git a/scilab/modules/scilab2fortran/macros/callfun.sci b/scilab/modules/scilab2fortran/macros/callfun.sci
deleted file mode 100644
index 64ea462..0000000
--- a/scilab/modules/scilab2fortran/macros/callfun.sci
+++ /dev/null
@@ -1,36 +0,0 @@
1// Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
2// Copyright (C) ????-2008 - INRIA
3//
4// This file must be used under the terms of the CeCILL.
5// This source file is licensed as described in the file COPYING, which
6// you should have received as part of this distribution. The terms
7// are also available at
8// http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt
9
10
11function t=callfun(arg,typ)
12//permet de generer le code fortran relatif a l'appel d'une fonction et
13//gere la table des fonctions dont il faut specifier le type dans les
14//declarations
15//!
16
17[lhs,rhs]=argn(0)
18n=prod(size(arg))
19t=' '+arg(1)+'('
20if n==0 then return,end
21for k=2:n-1,
22 t=t+arg(k)+','
23end
24t=t+arg(n)+')'
25//
26if rhs==3 then
27 nwrk;
28 select typ
29 case '0' then
30 if find(arg(1)==nwrk(14))==[] then nwrk(14)=[nwrk(14);arg(1)],end
31 case '1' then
32 if find(arg(1)==nwrk(15))==[] then nwrk(15)=[nwrk(15);arg(1)],end
33 end
34end
35nwrk=resume(nwrk)
36endfunction
diff --git a/scilab/modules/scilab2fortran/macros/cla2for.sci b/scilab/modules/scilab2fortran/macros/cla2for.sci
deleted file mode 100644
index fa5ad22..0000000
--- a/scilab/modules/scilab2fortran/macros/cla2for.sci
+++ /dev/null
@@ -1,94 +0,0 @@
1// Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
2// Copyright (C) ????-2008 - INRIA
3//
4// This file must be used under the terms of the CeCILL.
5// This source file is licensed as described in the file COPYING, which
6// you should have received as part of this distribution. The terms
7// are also available at
8// http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt
9
10
11function [txt,vnms,vtps,nwrk]=cla2for(clause,vnms,vtps,nwrk)
12// traduit une clause (if while for select)
13//!
14typ=clause(1)
15//write(6,'cla2for '+typ(1))
16
17select typ(1)
18case %if then
19
20 ncl=size(clause)
21 ncas=(ncl-2)/2
22 [t1,t2,ilst,vnms,vtps,nwrk]=exp2for(clause(2),1,vnms,vtps,nwrk)
23 t1=t1(1);
24 txt=[t2;' '+%if+'('+t1(1)+') '+%then]
25 [t1,vnms,vtps,nwrk]=ins2for(clause(3),1,vnms,vtps,nwrk)
26 txt=[txt;indentfor(t1)];
27 for ic=2:ncas
28 [t1,t2,ilst,vnms,vtps,nwrk]=exp2for(clause(2*ic),1,vnms,vtps,nwrk)
29 txt=[txt;t2;' '+%elseif+'('+t1(1)(1)+') '+%then];
30 [t1,vnms,vtps,nwrk]=ins2for(clause(1+2*ic),1,vnms,vtps,nwrk)
31 txt=[txt;indentfor(t1)];
32 end;
33 [t1,vnms,vtps,nwrk]=ins2for(clause(ncl),1,vnms,vtps,nwrk)
34 if t1<>[] then
35 txt=[txt;' '+%else;indentfor(t1)];
36 end
37 txt=[txt;' endif']
38case %while then
39 [lbl,nwrk]=newlab(nwrk)
40 tl1=part(' '+string(10*lbl)'+' ',1:6)
41 [lbl,nwrk]=newlab(nwrk)
42 tl2=part(' '+string(10*lbl)'+' ',1:6)
43 [t1,t2,ilst,vnms,vtps,nwrk]=exp2for(clause(2),1,vnms,vtps,nwrk)
44 t1=t1(1);
45 txt=[t2;tl1+'continue';' '+%if+'(.not.'+t1(1)+') goto '+tl2]
46 [t1,vnms,vtps,nwrk]=ins2for(clause(3),1,vnms,vtps,nwrk)
47 txt=[txt;t1;'goto '+tl1;tl2+'continue']
48case %for then
49 name=typ(2)
50 if find(name==vnms(:,1))==[] then
51 nv=size(vtps)+1
52 vnms=[vnms;[name,name]]
53 vtps(nv)=list('0','1','1',0)
54 end
55 forexp=1
56 [lbl,nwrk]=newlab(nwrk)
57 tl1=part(string(10*lbl)+' ',1:6);
58 [t1,t2,ilst,vnms,vtps,nwrk]=exp2for(clause(2),1,vnms,vtps,nwrk)
59 if size(t1(1)(1),2)>1 then
60
61 t1=strcat(t1(1)(1),',')
62 txt=[t2;' do '+tl1+' '+name+' = '+t1];
63 else
64 t1=t1(1)
65 txt=[t2;' do '+tl1+' i_'+name+' = 0,'+t1(5)+'-1';
66 ' call dcopy('+t1(4)+','+t1(1)+'(1+i_'+name+'*'+t1(4)+'),1,'+name+',1)'] ;
67 end
68 forexp=0;
69 [t1,vnms,vtps,nwrk]=ins2for(clause(3),1,vnms,vtps,nwrk)
70 txt=[txt; indentfor(t1);tl1+'continue']
71case %select then
72 ncas=(size(clause)-3)/2
73 [exp1,t1,ilst,vnms,vtps,nwrk]=exp2for(clause(2),1,vnms,vtps,nwrk)
74 exp1=exp1(1)
75 [exp2,t2,ilst,vnms,vtps,nwrk]=exp2for(clause(3),1,vnms,vtps,nwrk)
76 exp2=exp2(1)
77 txt=[t1;t2;' '+%if+'('+exp1(1)+'.eq.'+exp2(1)+') '+%then];
78 [t1,vnms,vtps,nwrk]=ins2for(clause(4),1,vnms,vtps,nwrk)
79 txt=[txt;indentfor(t1)];
80 for ic=4:2:2*ncas
81 [exp2,t2,ilst,vnms,vtps,nwrk]=exp2for(clause(1+ic),1,vnms,vtps,nwrk)
82 exp2=exp2(1)
83 txt=[txt;' '+%elseif+'('+exp1(1)+'.eq.'+exp2(1)+' '+%then]
84 [t1,vnms,vtps,nwrk]=ins2for(clause(2+ic),1,vnms,vtps,nwrk)
85 txt=[txt;indentfor(t1)];
86 end;
87 [t1,vnms,vtps,nwrk]=ins2for(clause(3+2*ncas),1,vnms,vtps,nwrk)
88 if t1<>[] then
89 txt=[txt;' '+%else;indentfor(t1)];
90 end
91 txt=[txt;' endif']
92end
93//write(6,txt)
94endfunction
diff --git a/scilab/modules/scilab2fortran/macros/cleanmacros.bat b/scilab/modules/scilab2fortran/macros/cleanmacros.bat
deleted file mode 100644
index d549535..0000000
--- a/scilab/modules/scilab2fortran/macros/cleanmacros.bat
+++ /dev/null
@@ -1,13 +0,0 @@
1rem Scilab ( http://mwww.scilab.org/ ) - This file is part of Scilab
2rem Copyright (C) ????-2008 - INRIA - Allan CORNET
3rem
4rem This file must be used under the terms of the CeCILL.
5rem This source file is licensed as described in the file COPYING, which
6rem you should have received as part of this distribution. The terms
7rem are also available at
8rem http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt
9
10
11@del *.bin 2>NUL
12@del lib 2>NUL
13@del names 2>NUL \ No newline at end of file
diff --git a/scilab/modules/scilab2fortran/macros/cod2for.sci b/scilab/modules/scilab2fortran/macros/cod2for.sci
deleted file mode 100644
index 5b18660..0000000
--- a/scilab/modules/scilab2fortran/macros/cod2for.sci
+++ /dev/null
@@ -1,131 +0,0 @@
1// Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
2// Copyright (C) ????-2008 - INRIA
3//
4// This file must be used under the terms of the CeCILL.
5// This source file is licensed as described in the file COPYING, which
6// you should have received as part of this distribution. The terms
7// are also available at
8// http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt
9
10
11function [txt,ilst,vnms,vtps,nwrk]=cod2for(lst,ilst,vnms,vtps,nwrk)
12//
13//!
14nlst=size(lst)
15txt=[]
16ilst=ilst-1
17while ilst<nlst then
18 ilst=ilst+1
19 op=lst(ilst)
20 if type(op)==15 then return,end
21
22 //write(6,'cod2for '+op(1)+' '+string(ilst))
23 select op(1)
24 case '1' then //stackp
25 //write(6,'stackp '+op(2));
26 prev=lst(ilst-1)
27 if size(prev,'*')<2 then
28 lhs=1
29 elseif prev(1:2)==['5','25']|prev(1)=='20' then
30 lhs=evstr(prev(4))
31 else
32 lhs=1
33 end
34 ilst=ilst-1
35 for k=1:lhs
36 expk=stk(k);typ=expk(2)
37 it=prod(size(expk(1)))-1
38 ilst=ilst+1
39 opk=lst(ilst);
40 if expk(3)<>'-1' then
41 k3=find(opk(2)==vnms(:,2))
42 if or(opk(2)==nwrk(10))|or(opk(2)==nwrk(12)) then
43 nv=size(vtps)+1
44 vnms=[vnms;[expk(1),opk(2)]]
45 vtps(nv)=list(expk(3),expk(4),expk(5),it)
46 elseif k3==[] then
47// la variable n'existe pas il faut lui allouer de la place
48 if isnum(expk(4))&isnum(expk(5)) then
49// les dimensions sont des nombres on alloue localement
50 out=opk(2)
51// vnms=[vnms;[out,opk(2)]]
52 vnms=[vnms;[expk(1),out]]
53 nv=size(vtps)
54 vtps(nv+1)=list(expk(3),expk(4),expk(5),it)
55 else
56// dimensions formelles on alloue dans les tableau de travail
57 [out,nwrk,t1]=getlocal(nwrk,opk(2),expk(3),expk(4),expk(5))
58 txt=[txt;t1]
59 vnms=[vnms;[out,opk(2)]]
60 nv=size(vtps)
61 vtps(nv+1)=list(expk(3),expk(4),expk(5),it)
62 end
63 else
64// la variable existe deja on modifie eventuellement type et dim
65 v=vtps(k3)
66 if k3<=macrhs then
67 if v(1)==expk(3)&v(2)==expk(4)&v(3)==expk(5) then
68 out=opk(2)
69 else
70 warning('input variable :'+vnms(k3,2)+..
71 ' changed type or dimensions')
72 out=opk(2)
73 end
74 else
75 if v(1)=='?'|v(1)==expk(3) then
76 out=opk(2)
77 vtps(k3)=list(expk(3),expk(4),expk(5),it)
78 else
79 if v(1)=='1'&expk(3)=='0' then // int dans double
80 if isnum(expk(1)) then
81 if strindex(expk(1),'.')==[] then
82 expk(1)=expk(1)+'D0'
83 end
84 else
85 expk(1)='dble('+expk(1)+')'
86 end
87 else
88 txt=[txt;'C WARNING local variable :'+vnms(k3,2)+..
89 ' changed its type!']
90 vtps(k3)=list(expk(3),expk(4),expk(5),it) // added
91 end
92 end
93 end
94 end
95 out=opk(2)
96 if typ<>'-1' then
97 if expk(4)=='1'&expk(5)=='1' then
98 txt=[txt;' '+out+' = '+expk(1)]
99 elseif expk(4)=='0'|expk(5)=='0' then
100 else
101 select expk(3)
102 case '0' then routine='icopy'
103 case '1' then routine='dcopy'
104 else error('cod2for:this type is not implemented'),
105 end
106 mn=mulf(expk(4),expk(5))
107 txt=[txt;gencall([routine,mn,expk(1),'1',out,'1'])]
108 end
109 end
110 end
111 end
112 case '12' then //pause
113 txt=[txt;' pause']
114 case '13' then //break
115
116 txt=[txt;' break']
117 case '14' then //abort
118 txt=[txt;' abort']
119 case '15' then ,//eol
120// txt=[txt;'c']
121// write(6,'ligne')
122 case '99' then //return
123 txt=[txt;' return']
124 else
125 [stk,t1,ilst,vnms,vtps,nwrk]=exp2for(lst,ilst,vnms,vtps,nwrk);
126 txt=[txt;t1]
127 ilst=ilst-1
128 end
129end
130ilst=ilst+1
131endfunction
diff --git a/scilab/modules/scilab2fortran/macros/dclfun.sci b/scilab/modules/scilab2fortran/macros/dclfun.sci
deleted file mode 100644
index 24b910a..0000000
--- a/scilab/modules/scilab2fortran/macros/dclfun.sci
+++ /dev/null
@@ -1,20 +0,0 @@
1// Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
2// Copyright (C) ????-2008 - INRIA
3//
4// This file must be used under the terms of the CeCILL.
5// This source file is licensed as described in the file COPYING, which
6// you should have received as part of this distribution. The terms
7// are also available at
8// http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt
9
10
11function [nwrk]=dclfun(nwrk,nam,typ)
12//permet de declarer le type fortran du resultat d'une fonction
13//!
14select typ
15case '0' then
16 if find(nam==nwrk(14))==[] then nwrk(14)=[nwrk(14);nam],end
17case '1' then
18 if find(nam==nwrk(15))==[] then nwrk(15)=[nwrk(15);nam],end
19end
20endfunction
diff --git a/scilab/modules/scilab2fortran/macros/exp2for.sci b/scilab/modules/scilab2fortran/macros/exp2for.sci
deleted file mode 100644
index e2cd713..0000000
--- a/scilab/modules/scilab2fortran/macros/exp2for.sci
+++ /dev/null
@@ -1,122 +0,0 @@
1// Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
2// Copyright (C) ????-2008 - INRIA
3//
4// This file must be used under the terms of the CeCILL.
5// This source file is licensed as described in the file COPYING, which
6// you should have received as part of this distribution. The terms
7// are also available at
8// http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt
9
10
11function [stk,txt,ilst,vnms,vtps,nwrk]=exp2for(lst,ilst,vnms,vtps,nwrk)
12//
13//!
14 nlst=size(lst)
15 top=0
16 stk=list()
17 txt=[]
18 ilst=ilst-1
19 cmod=0;
20 nwrk3=nwrk(3)
21 nwrk6=nwrk(6)
22 nw2=nwrk(2)
23 nw5=nwrk(5)
24 tmp2=[]
25 tmp5=[]
26 //
27 ok=%t
28 while ilst<nlst&ok then
29 t1=[]
30 lhs=1
31 ilst=ilst+1
32 op=lst(ilst)
33 if type(op)==10 then
34 select op(1)
35 case '0' then
36
37 case '2' then //stackg
38 if whereis(op(2))==[] then
39 [stk,top,vnms,vtps]=get2f(op(2),stk,top,vnms,vtps)
40 else //appel des macros
41 nop=lst(ilst+1)
42 if nop(1)<>'5'|nop(2)<>'25'
43 [stk,top,vnms,vtps]=get2f(op(2),stk,top,vnms,vtps)
44 else
45 op(3)=string(evstr(nop(3))-1)
46 op(4)=nop(4)
47 [stk,nwrk,t1,top]=func2f(op,stk,nwrk)
48 txt=[txt;t1]
49 ilst=ilst+1
50 end
51 end
52 case '3' then //string
53 [stk,top]=str2f(op(2),stk)
54 case '4' then //matrice vide
55 top=top+1
56 stk(top)=list('[]','0','1','0','0')
57 case '5' then //allops
58 t1=[]
59 iop=evstr(op(2))
60 top1=top
61 if ops(iop,2)=='g' then pause,end
62 execstr('[stkr,nwrk,t1,top]=%'+ops(iop,2)+'2for(nwrk)')
63
64 for ktp=top:top1,ss=stk(top);nwrk=freewrk(nwrk,ss(1));end
65 stk(top)=stkr
66 txt=[txt;t1]
67 case '6' then //num
68 [stk,top]=num2f(op(2),stk)
69 case '20' then //functions
70
71 [stk,nwrk,t1,top]=func2f(op,stk,nwrk)
72 txt=[txt;t1]
73
74 else
75 ok=%f
76 end
77 // try to free working areas used by previous intermediate result
78 // foo1(foo2(..)), a+foo2(),...
79 if tmp2<>[] then nwrk(2)(2,tmp2)='0',tmp2=[],end
80 if tmp5<>[] then nwrk(5)(2,tmp5)='0',tmp5=[],end
81 if lhs==1 then
82 if or(nw2(2,:)<>nwrk(2)(2,:))|or(nw5(2,:)<>nwrk(5)(2,:)) then
83 //function has used new working areas for lhs args
84 tmp2=[find(nw2(2,:)<>nwrk(2)(2,:)) size(nw2,2)+1:size(nwrk(2),2)]
85 tmp5=[find(nw5(2,:)<>nwrk(5)(2,:)) size(nw5,2)+1:size(nwrk(5),2)]
86 end
87 end
88 nw2=nwrk(2)
89 nw5=nwrk(5)
90 else
91 ok=%f
92 end
93 end
94 //
95
96 used='0';for k=nwrk(2), used=addf(used,k(1)),end
97 iused='0';for k=nwrk(5), iused=addf(iused,k(1)),end
98
99
100 if used<>'0' then
101 n3=prod(size(nwrk3))
102 k=n3+1;ok=n3>0;delta=' '
103 while ok then
104 k=k-1
105 delta=subf(used,nwrk3(k))
106 ok=part(delta,1)<>'-' &k>1
107 end
108 if part(delta,1)<>'-'&delta<>'0' then nwrk(3)=[nwrk3,used];end
109 end
110 if iused<>'0' then
111 n6=prod(size(nwrk6))
112 k=n6+1;ok=n6>0;delta=' '
113 while ok then
114 k=k-1
115 delta=subf(iused,nwrk6(k))
116 ok=part(delta,1)<>'-' &k>1
117 end
118 if part(delta,1)<>'-'&delta<>'0' then nwrk(6)=[nwrk6,iused];end
119 end
120 nwrk(1)=1;nwrk(2)=[]
121 nwrk(4)=1;nwrk(5)=[]
122endfunction
diff --git a/scilab/modules/scilab2fortran/macros/f_abs.sci b/scilab/modules/scilab2fortran/macros/f_abs.sci
deleted file mode 100644
index 72e2b0a..0000000
--- a/scilab/modules/scilab2fortran/macros/f_abs.sci
+++ /dev/null
@@ -1,76 +0,0 @@
1// Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
2// Copyright (C) ????-2008 - INRIA
3//
4// This file must be used under the terms of the CeCILL.
5// This source file is licensed as described in the file COPYING, which
6// you should have received as part of this distribution. The terms
7// are also available at
8// http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt
9
10
11function [stk,nwrk,txt,top]=f_abs(nwrk)
12//!purpose
13// scilab abs function translation
14//!parameters
15// - stk :
16// On entry stk is a global variable of type list
17// entries indexed from top-1+rhs:top give the definition of the rhs
18// function input variables
19//
20// After execution stk(1:lhs) must contain the definition of the
21// lhs returned variables
22//
23// stk entries have the following structure:
24// stk(k)=list(definition,type_expr,type_var,nb_lig,nb_col)
25//
26// *definition may be:
27// - a character string containing a Fortran expression with
28// a scalar value ex:'a+2*b-3*c(1);
29// - a character string containing a reference to the first
30// entry of a Fortran array
31// 'a' if a is a defined matrix
32// 'work(iwn)' if variable is stored in the double
33// precision working array work
34// 'iwork(iiwn)' if variable is stored in the integer
35// working array iwork
36// remark: complex array are defined by a definition part
37// with 2 elements (real and imaginary parts definition)
38// *type_expr a character string: the expression type code (used
39// to indicate need of parenthesis )
40// '2' : the expression is a sum of terms
41// '1' : the expression is a product of factors
42// '0' : the expression is an atome
43// '-1': the value is stored in a Fortran array
44// *type_var a character string: codes the variable fortran type:
45// '1' : double precision
46// '0' : integer
47// '10': character
48//
49// *nb_lig (, nb_col) : character strings:number of rows
50// (columns) of the matrix
51// des chaines de caracteres
52
53//
54// nwrk : this variable contain information on working arrays, error
55// indicators. It only may be modified by call to scilab functions
56// outname adderr getwrk
57//
58// txt : is a column vector of character string which contain the
59// fortran code associated to the function translation if
60// necessary.
61// top : an integer
62// global variable on entry
63// after execution top must be equal to top-rhs+lhs
64//!
65
66nam='abs'
67txt=[]
68s2=stk(top)
69v=s2(1)
70it2=prod(size(v))-1
71if it2==0 then
72 [stk,nwrk,txt,top]=f_gener(nam,nwrk,[s2(3),s2(3)])
73else
74 error(nam+' of complex argument is not implemented')
75end
76endfunction
diff --git a/scilab/modules/scilab2fortran/macros/f_argn.sci b/scilab/modules/scilab2fortran/macros/f_argn.sci
deleted file mode 100644
index d2f103b..0000000
--- a/scilab/modules/scilab2fortran/macros/f_argn.sci
+++ /dev/null
@@ -1,68 +0,0 @@
1// Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
2// Copyright (C) ????-2008 - INRIA
3//
4// This file must be used under the terms of the CeCILL.
5// This source file is licensed as described in the file COPYING, which
6// you should have received as part of this distribution. The terms
7// are also available at
8// http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt
9
10
11function [stk,nwrk,txt,top]=f_argn(nwrk)
12//!purpose
13// Scilab argn function translation
14//!parameters
15// - stk :
16// On entry stk is a global variable of type list
17// entries indexed from top-1+rhs:top give the definition of the rhs
18// function input variables
19//
20// After execution stk(1:lhs) must contain the definition of the
21// lhs returned variables
22//
23// stk entries have the following structure:
24// stk(k)=list(definition,type_expr,type_var,nb_lig,nb_col)
25//
26// *definition may be:
27// - a character string containing a Fortran expression with
28// a scalar value ex:'a+2*b-3*c(1);
29// - a character string containing a reference to the first
30// entry of a Fortran array
31// 'a' if a is a defined matrix
32// 'work(iwn)' if variable is stored in the double
33// precision working array work
34// 'iwork(iiwn)' if variable is stored in the integer
35// working array iwork
36// remark: complex array are defined by a definition part
37// with 2 elements (real and imaginary parts definition)
38// *type_expr a character string: the expression type code (used
39// to indicate need of parenthesis )
40// '2' : the expression is a sum of terms
41// '1' : the expression is a product of factors
42// '0' : the expression is an atome
43// '-1': the value is stored in a Fortran array
44// *type_var a character string: codes the variable fortran type:
45// '1' : double precision
46// '0' : integer
47// '10': character
48//
49// *nb_lig (, nb_col) : character strings:number of rows
50// (columns) of the matrix
51// des chaines de caracteres
52
53//
54// nwrk : this variable contain information on working arrays, error
55// indicators. It only may be modified by call to scilab functions
56// outname adderr getwrk
57//
58// txt : is a column vector of character string which contain the
59// fortran code associated to the function translation if
60// necessary.
61// top : an integer
62// global variable on entry
63// after execution top must be equal to top-rhs+lhs
64//!
65
66stk=list(list(string(maclhs),'0','0','1','1'),..
67list(string(macrhs),'0','0','1','1'))
68endfunction
diff --git a/scilab/modules/scilab2fortran/macros/f_cond.sci b/scilab/modules/scilab2fortran/macros/f_cond.sci
deleted file mode 100644
index 596db89..0000000
--- a/scilab/modules/scilab2fortran/macros/f_cond.sci
+++ /dev/null
@@ -1,96 +0,0 @@
1// Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
2// Copyright (C) ????-2008 - INRIA
3//
4// This file must be used under the terms of the CeCILL.
5// This source file is licensed as described in the file COPYING, which
6// you should have received as part of this distribution. The terms
7// are also available at
8// http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt
9
10
11function [stk,nwrk,txt,top]=f_cond(nwrk)
12//!purpose
13// Scilab cond function translation
14//!parameters
15// - stk :
16// On entry stk is a global variable of type list
17// entries indexed from top-1+rhs:top give the definition of the rhs
18// function input variables
19//
20// After execution stk(1:lhs) must contain the definition of the
21// lhs returned variables
22//
23// stk entries have the following structure:
24// stk(k)=list(definition,type_expr,type_var,nb_lig,nb_col)
25//
26// *definition may be:
27// - a character string containing a Fortran expression with
28// a scalar value ex:'a+2*b-3*c(1);
29// - a character string containing a reference to the first
30// entry of a Fortran array
31// 'a' if a is a defined matrix
32// 'work(iwn)' if variable is stored in the double
33// precision working array work
34// 'iwork(iiwn)' if variable is stored in the integer
35// working array iwork
36// remark: complex array are defined by a definition part
37// with 2 elements (real and imaginary parts definition)
38// *type_expr a character string: the expression type code (used
39// to indicate need of parenthesis )
40// '2' : the expression is a sum of terms
41// '1' : the expression is a product of factors
42// '0' : the expression is an atome
43// '-1': the value is stored in a Fortran array
44// *type_var a character string: codes the variable fortran type:
45// '1' : double precision
46// '0' : integer
47// '10': character
48//
49// *nb_lig (, nb_col) : character strings:number of rows
50// (columns) of the matrix
51// des chaines de caracteres
52
53//
54// nwrk : this variable contain information on working arrays, error
55// indicators. It only may be modified by call to scilab functions
56// outname adderr getwrk
57//
58// txt : is a column vector of character string which contain the
59// fortran code associated to the function translation if
60// necessary.
61// top : an integer
62// global variable on entry
63// after execution top must be equal to top-rhs+lhs
64//!
65
66txt=[]
67nam='cond'
68s2=stk(top)
69v=s2(1)
70it2=prod(size(v))-1
71if it2<>0 then error(nam+' complex --> not implemented'),end
72
73[s2,nwrk,t0]=typconv(s2,nwrk,'1')
74n=s2(4);m=s2(5)
75if n==m then
76 n1=n
77 n2=n
78else
79 n1='min('+addf(n,'1')+','+m+')'
80 n2='min('+n+','+m+')'
81end
82[errn,nwrk]=adderr(nwrk,'Computation of conditioning fails')
83[s,nwrk,t1]=getwrk(nwrk,'1','1',n1)
84[e,nwrk,t2]=getwrk(nwrk,'1','1',m)
85[wrk,nwrk,t3]=getwrk(nwrk,'1','1',n)
86txt=[t0;t1;t2;t3;
87 gencall(['dsvdc',s2(1),n,n,m,s,e,'work',n,'work',m,wrk,..
88 n,wrk,'00','ierr']);
89 genif('ierr.ne.0',[' ierr='+string(errn);' return'])]
90out=e+'/'+part(e,1:length(e)-1)+'+'+n2+'-1)'
91[nwrk]=freewrk(nwrk,e)
92[nwrk]=freewrk(nwrk,s)
93[nwrk]=freewrk(nwrk,wrk)
94
95stk=list(out,'0','1','1','1')
96endfunction
diff --git a/scilab/modules/scilab2fortran/macros/f_cos.sci b/scilab/modules/scilab2fortran/macros/f_cos.sci
deleted file mode 100644
index 7be0077..0000000
--- a/scilab/modules/scilab2fortran/macros/f_cos.sci
+++ /dev/null
@@ -1,80 +0,0 @@
1// Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
2// Copyright (C) ????-2008 - INRIA
3//
4// This file must be used under the terms of the CeCILL.
5// This source file is licensed as described in the file COPYING, which
6// you should have received as part of this distribution. The terms
7// are also available at
8// http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt
9
10
11function [stk,nwrk,txt,top]=f_cos(nwrk)
12//!purpose
13// Scilab cos function translation
14//!parameters
15// - stk :
16// On entry stk is a global variable of type list
17// entries indexed from top-1+rhs:top give the definition of the rhs
18// function input variables
19//
20// After execution stk(1:lhs) must contain the definition of the
21// lhs returned variables
22//
23// stk entries have the following structure:
24// stk(k)=list(definition,type_expr,type_var,nb_lig,nb_col)
25//
26// *definition may be:
27// - a character string containing a Fortran expression with
28// a scalar value ex:'a+2*b-3*c(1);
29// - a character string containing a reference to the first
30// entry of a Fortran array
31// 'a' if a is a defined matrix
32// 'work(iwn)' if variable is stored in the double
33// precision working array work
34// 'iwork(iiwn)' if variable is stored in the integer
35// working array iwork
36// remark: complex array are defined by a definition part
37// with 2 elements (real and imaginary parts definition)
38// *type_expr a character string: the expression type code (used
39// to indicate need of parenthesis )
40// '2' : the expression is a sum of terms
41// '1' : the expression is a product of factors
42// '0' : the expression is an atome
43// '-1': the value is stored in a Fortran array
44// *type_var a character string: codes the variable fortran type:
45// '1' : double precision
46// '0' : integer
47// '10': character
48//
49// *nb_lig (, nb_col) : character strings:number of rows
50// (columns) of the matrix
51// des chaines de caracteres
52
53//
54// nwrk : this variable contain information on working arrays, error
55// indicators. It only may be modified by call to scilab functions
56// outname adderr getwrk
57//
58// txt : is a column vector of character string which contain the
59// fortran code associated to the function translation if
60// necessary.
61// top : an integer
62// global variable on entry
63// after execution top must be equal to top-rhs+lhs
64//!
65
66nam='cos'
67txt=[]
68s2=stk(top)
69if s2(4)<>s2(5)|(s2(4)=='1'&s2(5)=='1') then
70 v=s2(1)
71 it2=prod(size(v))-1
72 if it2==0 then
73 [stk,nwrk,txt,top]=f_gener(nam,nwrk)
74 else
75 error(nam+' of complex argument : not implemented')
76 end
77else
78 error(nam+' of non square not implemented ')
79end
80endfunction
diff --git a/scilab/modules/scilab2fortran/macros/f_ent.sci b/scilab/modules/scilab2fortran/macros/f_ent.sci
deleted file mode 100644
index e98f489..0000000
--- a/scilab/modules/scilab2fortran/macros/f_ent.sci
+++ /dev/null
@@ -1,75 +0,0 @@
1// Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
2// Copyright (C) ????-2008 - INRIA
3//
4// This file must be used under the terms of the CeCILL.
5// This source file is licensed as described in the file COPYING, which
6// you should have received as part of this distribution. The terms
7// are also available at
8// http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt
9
10
11function [stk,nwrk,txt,top]=f_ent(nwrk)
12//!purpose
13// Scilab ent function translation
14//!parameters
15// - stk :
16// On entry stk is a global variable of type list
17// entries indexed from top-1+rhs:top give the definition of the rhs
18// function input variables
19//
20// After execution stk(1:lhs) must contain the definition of the
21// lhs returned variables
22//
23// stk entries have the following structure:
24// stk(k)=list(definition,type_expr,type_var,nb_lig,nb_col)
25//
26// *definition may be:
27// - a character string containing a Fortran expression with
28// a scalar value ex:'a+2*b-3*c(1);
29// - a character string containing a reference to the first
30// entry of a Fortran array
31// 'a' if a is a defined matrix
32// 'work(iwn)' if variable is stored in the double
33// precision working array work
34// 'iwork(iiwn)' if variable is stored in the integer
35// working array iwork
36// remark: complex array are defined by a definition part
37// with 2 elements (real and imaginary parts definition)
38// *type_expr a character string: the expression type code (used
39// to indicate need of parenthesis )
40// '2' : the expression is a sum of terms
41// '1' : the expression is a product of factors
42// '0' : the expression is an atome
43// '-1': the value is stored in a Fortran array
44// *type_var a character string: codes the variable fortran type:
45// '1' : double precision
46// '0' : integer
47// '10': character
48//
49// *nb_lig (, nb_col) : character strings:number of rows
50// (columns) of the matrix
51// des chaines de caracteres
52
53//
54// nwrk : this variable contain information on working arrays, error
55// indicators. It only may be modified by call to scilab functions
56// outname adderr getwrk
57//
58// txt : is a column vector of character string which contain the
59// fortran code associated to the function translation if
60// necessary.
61// top : an integer
62// global variable on entry
63// after execution top must be equal to top-rhs+lhs
64//!
65txt=[]
66s2=stk(top)
67
68if s2(4)=='1'&s2(5)=='1' then
69 stk=list('int('+s2(1)+')','0','0',s2(4),s2(5))
70else
71 [out,nwrk,txt]=outname(nwrk,'0',s2(4),s2(5))
72 txt=[txt;gencall(['db2int',mulf(s2(4),s2(5)),s2(1),'1',out,'1'])]
73 stk=list(out,'-1',0,s2(4),s2(5))
74end
75endfunction
diff --git a/scilab/modules/scilab2fortran/macros/f_error.sci b/scilab/modules/scilab2fortran/macros/f_error.sci
deleted file mode 100644
index df42373..0000000
--- a/scilab/modules/scilab2fortran/macros/f_error.sci
+++ /dev/null
@@ -1,73 +0,0 @@
1// Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
2// Copyright (C) ????-2008 - INRIA
3//
4// This file must be used under the terms of the CeCILL.
5// This source file is licensed as described in the file COPYING, which
6// you should have received as part of this distribution. The terms
7// are also available at
8// http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt
9
10
11function [stk,nwrk,txt,top]=f_error(nwrk)
12//!purpose
13// Scilab error function translation
14//!parameters
15// - stk :
16// On entry stk is a global variable of type list
17// entries indexed from top-1+rhs:top give the definition of the rhs
18// function input variables
19//
20// After execution stk(1:lhs) must contain the definition of the
21// lhs returned variables
22//
23// stk entries have the following structure:
24// stk(k)=list(definition,type_expr,type_var,nb_lig,nb_col)
25//
26// *definition may be:
27// - a character string containing a Fortran expression with
28// a scalar value ex:'a+2*b-3*c(1);
29// - a character string containing a reference to the first
30// entry of a Fortran array
31// 'a' if a is a defined matrix
32// 'work(iwn)' if variable is stored in the double
33// precision working array work
34// 'iwork(iiwn)' if variable is stored in the integer
35// working array iwork
36// remark: complex array are defined by a definition part
37// with 2 elements (real and imaginary parts definition)
38// *type_expr a character string: the expression type code (used
39// to indicate need of parenthesis )
40// '2' : the expression is a sum of terms
41// '1' : the expression is a product of factors
42// '0' : the expression is an atome
43// '-1': the value is stored in a Fortran array
44// *type_var a character string: codes the variable fortran type:
45// '1' : double precision
46// '0' : integer
47// '10': character
48//
49// *nb_lig (, nb_col) : character strings:number of rows
50// (columns) of the matrix
51// des chaines de caracteres
52
53//
54// nwrk : this variable contain information on working arrays, error
55// indicators. It only may be modified by call to scilab functions
56// outname adderr getwrk
57//
58// txt : is a column vector of character string which contain the
59// fortran code associated to the function translation if
60// necessary.
61// top : an integer
62// global variable on entry
63// after execution top must be equal to top-rhs+lhs
64//!
65
66txt=[]
67s=stk(top);mess=s(1)
68if part(mess,1)=='''' then mess=part(mess,2:length(mess)-1),end
69
70[errn,nwrk]=adderr(nwrk,mess)
71txt=[' ierr='+string(errn);' return']
72stk=list(' ','-1','-1')
73endfunction
diff --git a/scilab/modules/scilab2fortran/macros/f_exp.sci b/scilab/modules/scilab2fortran/macros/f_exp.sci
deleted file mode 100644
index b0751af..0000000
--- a/scilab/modules/scilab2fortran/macros/f_exp.sci
+++ /dev/null
@@ -1,75 +0,0 @@
1// Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
2// Copyright (C) ????-2008 - INRIA
3//
4// This file must be used under the terms of the CeCILL.
5// This source file is licensed as described in the file COPYING, which
6// you should have received as part of this distribution. The terms
7// are also available at
8// http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt
9
10
11function [stk,nwrk,txt,top]=f_exp(nwrk)
12//!purpose
13// Scilab exp function translation
14//!parameters
15// - stk :
16// On entry stk is a global variable of type list
17// entries indexed from top-1+rhs:top give the definition of the rhs
18// function input variables
19//
20// After execution stk(1:lhs) must contain the definition of the
21// lhs returned variables
22//
23// stk entries have the following structure:
24// stk(k)=list(definition,type_expr,type_var,nb_lig,nb_col)
25//
26// *definition may be:
27// - a character string containing a Fortran expression with
28// a scalar value ex:'a+2*b-3*c(1);
29// - a character string containing a reference to the first
30// entry of a Fortran array
31// 'a' if a is a defined matrix
32// 'work(iwn)' if variable is stored in the double
33// precision working array work
34// 'iwork(iiwn)' if variable is stored in the integer
35// working array iwork
36// remark: complex array are defined by a definition part
37// with 2 elements (real and imaginary parts definition)
38// *type_expr a character string: the expression type code (used
39// to indicate need of parenthesis )
40// '2' : the expression is a sum of terms
41// '1' : the expression is a product of factors
42// '0' : the expression is an atome