summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorVincent COUVERT <vincent.couvert@scilab-enterprises.com>2014-06-05 15:55:30 +0200
committerVincent COUVERT <vincent.couvert@scilab-enterprises.com>2014-06-05 16:06:28 +0200
commitd1cc18c8d236206dd0678d55e5713c7499c80097 (patch)
treed286f721e85f93519e0b287ea3a650e6b9d183cd
parentb8386aab14ce5a2cc8262380e6ec50b7345f79e0 (diff)
parentabe7100d9ddb80c57ea2b76e339cb71772cb514d (diff)
downloadscilab-scatter.zip
scilab-scatter.tar.gz
Merge remote-tracking branch 'origin/5.5'scatter
Change-Id: I07557f640b7f0f60d6553e69bd745ed54200f3e8
-rw-r--r--scilab/CHANGES_5.4.X2
-rw-r--r--scilab/CHANGES_5.5.X33
-rw-r--r--scilab/aclocal.m43
-rwxr-xr-xscilab/configure263
-rw-r--r--scilab/configure.ac22
-rw-r--r--scilab/desktop/images/scilab-desktop.pngbin89446 -> 98241 bytes
-rw-r--r--scilab/desktop/images/scilab-plot.pngbin46928 -> 59166 bytes
-rw-r--r--scilab/desktop/images/scilab-scinotes.pngbin0 -> 101979 bytes
-rw-r--r--scilab/desktop/images/scilab-xcos.pngbin45399 -> 98418 bytes
-rw-r--r--scilab/desktop/scilab.appdata.xml13
-rw-r--r--scilab/etc/librarypath.xml3
-rw-r--r--scilab/modules/console/src/c/clc.c13
-rw-r--r--scilab/modules/console/src/c/cmdLine/getKey.c14
-rw-r--r--scilab/modules/console/tests/nonreg_tests/bug_10777.tst23
-rw-r--r--scilab/modules/core/macros/edit.sci2
-rw-r--r--scilab/modules/core/src/fortran/typ2cod.f14
-rw-r--r--scilab/modules/data_structures/help/en_US/struct.xml35
-rw-r--r--scilab/modules/data_structures/help/fr_FR/struct.xml35
-rw-r--r--scilab/modules/differential_equations/demos/flow/blackhole_interface.sci212
-rw-r--r--scilab/modules/dynamic_link/macros/windows/dlwGenerateMakefile.sci6
-rw-r--r--scilab/modules/elementary_functions/src/c/qsort.c18
-rw-r--r--scilab/modules/elementary_functions/tests/nonreg_tests/bug_13358.dia.ref45
-rw-r--r--scilab/modules/elementary_functions/tests/nonreg_tests/bug_13358.tst48
-rw-r--r--scilab/modules/fileio/tests/nonreg_tests/bug_13119.dia.ref2
-rw-r--r--scilab/modules/fileio/tests/nonreg_tests/bug_13119.tst2
-rw-r--r--scilab/modules/graphics/demos/cmplxfunc/demo_custom.dem.sce537
-rw-r--r--scilab/modules/graphics/help/en_US/text/titlepage.xml26
-rw-r--r--scilab/modules/graphics/help/fr_FR/text/titlepage.xml26
-rw-r--r--scilab/modules/graphics/macros/edit_curv.sci137
-rw-r--r--scilab/modules/graphics/macros/surf.sci31
-rw-r--r--scilab/modules/graphics/src/c/sciCall.c2
-rw-r--r--scilab/modules/graphics/tests/nonreg_tests/bug_13180.dia.ref21
-rw-r--r--scilab/modules/graphics/tests/nonreg_tests/bug_13180.tst24
-rw-r--r--scilab/modules/graphics/tests/nonreg_tests/bug_13351.dia.ref22
-rw-r--r--scilab/modules/graphics/tests/nonreg_tests/bug_13351.tst27
-rw-r--r--scilab/modules/graphics/tests/nonreg_tests/bug_13365.dia.ref19
-rw-r--r--scilab/modules/graphics/tests/nonreg_tests/bug_13365.tst23
-rwxr-xr-xscilab/modules/gui/Makefile.am1
-rw-r--r--scilab/modules/gui/Makefile.in1
-rw-r--r--scilab/modules/gui/etc/graphics_menubar.xml6
-rw-r--r--scilab/modules/gui/help/en_US/layout/createConstraints.xml4
-rw-r--r--scilab/modules/gui/images/icons/16x16/mimetypes/application-mat.pngbin0 -> 730 bytes
-rw-r--r--scilab/modules/gui/src/java/org/scilab/modules/gui/editor/Editor.java384
-rw-r--r--scilab/modules/gui/src/java/org/scilab/modules/gui/editor/LegendHandler.java115
-rw-r--r--scilab/modules/helptools/etc/images_md5.txt4
-rw-r--r--scilab/modules/helptools/images/LOGICAL_OP.pngbin1074 -> 1047 bytes
-rw-r--r--scilab/modules/helptools/images/RELATIONALOP.pngbin913 -> 1327 bytes
-rw-r--r--scilab/modules/helptools/images/titlepage_en_US_2.pngbin0 -> 10153 bytes
-rw-r--r--scilab/modules/helptools/images/titlepage_fr_FR_2.pngbin0 -> 10185 bytes
-rw-r--r--scilab/modules/helptools/images/titlepage_ru_RU_2.pngbin0 -> 10153 bytes
-rw-r--r--scilab/modules/history_manager/sci_gateway/c/sci_historysize.c2
-rw-r--r--scilab/modules/javasci/Makefile.in2
-rw-r--r--scilab/modules/mexlib/examples/cppmex/builder.sce2
-rw-r--r--scilab/modules/output_stream/tests/nonreg_tests/bug_3070.dia.ref7
-rw-r--r--scilab/modules/output_stream/tests/nonreg_tests/bug_3070.tst6
-rw-r--r--scilab/modules/renderer/src/java/org/scilab/modules/renderer/JoGLView/util/TextObjectSpriteDrawer.java58
-rw-r--r--scilab/modules/scicos/macros/scicos_auto/scicos_simulate.sci2
-rw-r--r--scilab/modules/scicos/macros/scicos_scicos/do_delete1.sci6
-rw-r--r--scilab/modules/scicos_blocks/macros/Misc/LOGICAL_OP.sci2
-rw-r--r--scilab/modules/scicos_blocks/macros/Misc/RELATIONALOP.sci20
-rw-r--r--scilab/modules/signal_processing/tests/unit_tests/kalm.dia.ref52
-rw-r--r--scilab/modules/signal_processing/tests/unit_tests/kalm.tst4
-rw-r--r--scilab/modules/ui_data/src/java/org/scilab/modules/ui_data/filebrowser/FileUtils.java2
-rw-r--r--scilab/modules/ui_data/src/java/org/scilab/modules/ui_data/filebrowser/ScilabFileSelectorFilter.java1
-rw-r--r--scilab/modules/ui_data/src/java/org/scilab/modules/ui_data/filebrowser/SwingScilabTreeTable.java2
-rw-r--r--scilab/modules/ui_data/src/java/org/scilab/modules/ui_data/filebrowser/actions/ChangeCWDAction.java2
-rw-r--r--scilab/modules/ui_data/src/java/org/scilab/modules/ui_data/filebrowser/actions/ExecuteMatFileAction.java32
-rw-r--r--scilab/modules/ui_data/src/java/org/scilab/modules/ui_data/filebrowser/actions/ValidateAction.java1
-rw-r--r--scilab/modules/ui_data/src/java/org/scilab/modules/ui_data/utils/UiDataMessages.java5
-rw-r--r--scilab/modules/xcos/etc/Xcos-style.xml4
-rw-r--r--scilab/modules/xcos/images/palettes/LOGICAL_OP.pngbin1074 -> 924 bytes
-rw-r--r--scilab/modules/xcos/images/palettes/RELATIONALOP.pngbin913 -> 1279 bytes
-rw-r--r--scilab/scilab.pc.in4
73 files changed, 1509 insertions, 925 deletions
diff --git a/scilab/CHANGES_5.4.X b/scilab/CHANGES_5.4.X
index 771232a..468665b 100644
--- a/scilab/CHANGES_5.4.X
+++ b/scilab/CHANGES_5.4.X
@@ -64,7 +64,7 @@ Xcos
64* Two new fixed-size step ODE solvers added: Dormand-Prince 4(5) and Runge-Kutta 4(5). 64* Two new fixed-size step ODE solvers added: Dormand-Prince 4(5) and Runge-Kutta 4(5).
65 Added to the CVode package, they also benefit from the rootfinding feature. 65 Added to the CVode package, they also benefit from the rootfinding feature.
66 66
67* Implicit fixed-size stop ODE solver added: Implicit Runge-Kutta 4(5). 67* Implicit fixed-size step ODE solver added: Implicit Runge-Kutta 4(5).
68 Added to the CVode package, it also benefits from the CVode rootfinding feature. 68 Added to the CVode package, it also benefits from the CVode rootfinding feature.
69 69
70* Block parameter errors (types and sizes) reporting improved. 70* Block parameter errors (types and sizes) reporting improved.
diff --git a/scilab/CHANGES_5.5.X b/scilab/CHANGES_5.5.X
index 510e11d..466e514 100644
--- a/scilab/CHANGES_5.5.X
+++ b/scilab/CHANGES_5.5.X
@@ -10,21 +10,39 @@ Obsolete & Removed Functions
10Scilab Bug Fixes 10Scilab Bug Fixes
11================ 11================
12 12
13* Bug #7203 fixed - Help page of titlepage was unclear.
14
13* Bug #7549 fixed - edit_curv did not disable standard plot menus. 15* Bug #7549 fixed - edit_curv did not disable standard plot menus.
14 16
17* Bug #7804 fixed - Small improvements made in struct help page.
18
15* Bug #8646 fixed - The datatips contextual menu opened a selection list which 19* Bug #8646 fixed - The datatips contextual menu opened a selection list which
16 was not ergonomic. 20 was not ergonomic.
17 21
18* Bug #10555 fixed - Scilab failed to build with some configure options. 22* Bug #10555 fixed - Scilab failed to build with some configure options.
19 23
24* Bug #10777 fixed - Home and End keys were not trapped in CLI mode.
25
26* Bug #10784 fixed - clc function was not available in CLI & ADV-CLI modes.
27
20* Bug #12700 fixed - edit_curv (used by CURV_f) was broken. 28* Bug #12700 fixed - edit_curv (used by CURV_f) was broken.
21 29
30* Bug #12918 fixed - OpenSUSE 12.3 x64 did not have gluegen2-rt in librarypath.
31
32* Bug #13180 fixed - surf did not handle degenerate cases.
33
22* Bug #13291 fixed - xmltojar([],[],'ja_JP') might lead to a crash when the 34* Bug #13291 fixed - xmltojar([],[],'ja_JP') might lead to a crash when the
23 locale was not available system-wide. 35 locale was not available system-wide.
24 36
37* Bug #13299 fixed - The pkgconfig file did not used the right Tcl/Tk version.
38
25* Bug #13313 fixed - Setting datatips orientation did not disable 39* Bug #13313 fixed - Setting datatips orientation did not disable
26 auto_orientation mode. 40 auto_orientation mode.
27 41
42* Bug #13316 fixed - There were missing tooltips on File Browser buttons.
43
44* Bug #13324 fixed - Legends were completely modified when an item was clicked and modified.
45
28* Bug #13331 fixed - Users are no longer able to write inconsistent options to mopen, 46* Bug #13331 fixed - Users are no longer able to write inconsistent options to mopen,
29 mopen(file, "wr") now exits with a proper error. 47 mopen(file, "wr") now exits with a proper error.
30 48
@@ -33,6 +51,14 @@ Scilab Bug Fixes
33 51
34* Bug #13344 fixed - User defined ticks were not drawn at the right position. 52* Bug #13344 fixed - User defined ticks were not drawn at the right position.
35 53
54* Bug #13349 fixed - Double-clicking on a MAT-file in file browser did not load it.
55
56* Bug #13351 fixed - xstringb failed with LaTeX code.
57
58* Bug #13358 fixed - Intersect and unique were slow due to an issue in quicksort implementation.
59
60* Bug #13365 fixed - Data bounds werenot correctly updated in 3-D.
61
36* Bug #13378 fixed - The "Console" handle display was not homogeneous with others. 62* Bug #13378 fixed - The "Console" handle display was not homogeneous with others.
37 63
38* Bug #13381 fixed - eigs was failing when using a function as first input argument. 64* Bug #13381 fixed - eigs was failing when using a function as first input argument.
@@ -62,16 +88,16 @@ Scilab Bug Fixes
62 now permute treats extra dimensions as 1 88 now permute treats extra dimensions as 1
63 89
64 90
91
65Xcos Bug Fixes 92Xcos Bug Fixes
66============== 93==============
67 94
68* Bug #9996 fixed - The RELATION_OP box drawn in the work space is not compliant
69 to the programming.
70
71* Bug #11823 fixed - Ctrl+F2 shortcut did not work on a selected block. 95* Bug #11823 fixed - Ctrl+F2 shortcut did not work on a selected block.
72 96
73* Bug #12718 fixed - Modelica Generic block reshaped the output ports and the label was double-written. 97* Bug #12718 fixed - Modelica Generic block reshaped the output ports and the label was double-written.
74 98
99* Bug #12723 fixed - Loading a .scg file in the CURVE bloc produced an error.
100
75* Bug #12751 fixed - cdummy_ entry point was not found when using Code Generation. 101* Bug #12751 fixed - cdummy_ entry point was not found when using Code Generation.
76 102
77* Bug #13285 fixed - There was no appropriate example of the syntax for scifunc_block_m GUI 103* Bug #13285 fixed - There was no appropriate example of the syntax for scifunc_block_m GUI
@@ -88,6 +114,7 @@ Xcos Bug Fixes
88* Bug #13396 fixed - MBLOCK did not work with an external file containing the modelica class. 114* Bug #13396 fixed - MBLOCK did not work with an external file containing the modelica class.
89 115
90 116
117
91 Changes between version 5.4.1 and 5.5.0 118 Changes between version 5.4.1 and 5.5.0
92 ======================================= 119 =======================================
93 120
diff --git a/scilab/aclocal.m4 b/scilab/aclocal.m4
index f72ced9..9617522 100644
--- a/scilab/aclocal.m4
+++ b/scilab/aclocal.m4
@@ -2943,8 +2943,7 @@ to "yes", and re-run configure.
2943END 2943END
2944 AC_MSG_ERROR([Your 'rm' program is bad, sorry.]) 2944 AC_MSG_ERROR([Your 'rm' program is bad, sorry.])
2945 fi 2945 fi
2946fi 2946fi])
2947])
2948 2947
2949dnl Hook into '_AC_COMPILER_EXEEXT' early to learn its expansion. Do not 2948dnl Hook into '_AC_COMPILER_EXEEXT' early to learn its expansion. Do not
2950dnl add the conditional right here, as _AC_COMPILER_EXEEXT may be further 2949dnl add the conditional right here, as _AC_COMPILER_EXEEXT may be further
diff --git a/scilab/configure b/scilab/configure
index bd564c7..a337d30 100755
--- a/scilab/configure
+++ b/scilab/configure
@@ -6079,8 +6079,7 @@ to "yes", and re-run configure.
6079END 6079END
6080 as_fn_error $? "Your 'rm' program is bad, sorry." "$LINENO" 5 6080 as_fn_error $? "Your 'rm' program is bad, sorry." "$LINENO" 5
6081 fi 6081 fi
6082fi 6082fi # Not using -Werror because we override {C,F}FLAGS in order to disable optimisation
6083 # Not using -Werror because we override {C,F}FLAGS in order to disable optimisation
6084 6083
6085 6084
6086 6085
@@ -11049,7 +11048,7 @@ $as_echo "$ac_java_classpath" >&6; }
11049$as_echo_n "checking to see if the java compiler works... " >&6; } 11048$as_echo_n "checking to see if the java compiler works... " >&6; }
11050 11049
11051 cat << \EOF > conftest.java 11050 cat << \EOF > conftest.java
11052// #line 11052 "configure" 11051// #line 11051 "configure"
11053import java.util.regex.Pattern; 11052import java.util.regex.Pattern;
11054 11053
11055 11054
@@ -11136,7 +11135,7 @@ $as_echo_n "checking type of jvm... " >&6; }
11136 if test "x$ac_java_jvm_name" = "x" ; then 11135 if test "x$ac_java_jvm_name" = "x" ; then
11137 11136
11138 cat << \EOF > conftest.java 11137 cat << \EOF > conftest.java
11139// #line 11139 "configure" 11138// #line 11138 "configure"
11140import java.util.regex.Pattern; 11139import java.util.regex.Pattern;
11141 11140
11142import gnu.java.io.EncodingManager; 11141import gnu.java.io.EncodingManager;
@@ -11220,7 +11219,7 @@ $as_echo_n "checking java API version... " >&6; }
11220 # The class java.nio.charset.Charset is new to 1.4 11219 # The class java.nio.charset.Charset is new to 1.4
11221 11220
11222 cat << \EOF > conftest.java 11221 cat << \EOF > conftest.java
11223// #line 11223 "configure" 11222// #line 11222 "configure"
11224import java.util.regex.Pattern; 11223import java.util.regex.Pattern;
11225 11224
11226import java.nio.charset.Charset; 11225import java.nio.charset.Charset;
@@ -11285,7 +11284,7 @@ EOF
11285 # The class java.lang.StringBuilder is new to 1.5 11284 # The class java.lang.StringBuilder is new to 1.5
11286 11285
11287 cat << \EOF > conftest.java 11286 cat << \EOF > conftest.java
11288// #line 11288 "configure" 11287// #line 11287 "configure"
11289import java.util.regex.Pattern; 11288import java.util.regex.Pattern;
11290 11289
11291import java.lang.StringBuilder; 11290import java.lang.StringBuilder;
@@ -11350,7 +11349,7 @@ EOF
11350 # The class java.util.ArrayDeque is new to 1.6 11349 # The class java.util.ArrayDeque is new to 1.6
11351 11350
11352 cat << \EOF > conftest.java 11351 cat << \EOF > conftest.java
11353// #line 11353 "configure" 11352// #line 11352 "configure"
11354import java.util.regex.Pattern; 11353import java.util.regex.Pattern;
11355 11354
11356import java.util.ArrayDeque; 11355import java.util.ArrayDeque;
@@ -11415,7 +11414,7 @@ EOF
11415 # The class java.nio.file.Path is new to 1.7 11414 # The class java.nio.file.Path is new to 1.7
11416 11415
11417 cat << \EOF > conftest.java 11416 cat << \EOF > conftest.java
11418// #line 11418 "configure" 11417// #line 11417 "configure"
11419import java.util.regex.Pattern; 11418import java.util.regex.Pattern;
11420 11419
11421import java.nio.file.Path; 11420import java.nio.file.Path;
@@ -11480,7 +11479,7 @@ EOF
11480 # The class java.util.stream.DoubleStream is new to 1.8 11479 # The class java.util.stream.DoubleStream is new to 1.8
11481 11480
11482 cat << \EOF > conftest.java 11481 cat << \EOF > conftest.java
11483// #line 11483 "configure" 11482// #line 11482 "configure"
11484import java.util.regex.Pattern; 11483import java.util.regex.Pattern;
11485 11484
11486import java.util.stream.DoubleStream; 11485import java.util.stream.DoubleStream;
@@ -12858,7 +12857,7 @@ $as_echo_n "checking jgraphx... " >&6; }
12858 export ac_java_classpath="$jar_resolved:$ac_java_classpath" 12857 export ac_java_classpath="$jar_resolved:$ac_java_classpath"
12859 12858
12860 cat << \EOF > conftest.java 12859 cat << \EOF > conftest.java
12861// #line 12861 "configure" 12860// #line 12860 "configure"
12862import java.util.regex.Pattern; 12861import java.util.regex.Pattern;
12863 12862
12864import com.mxgraph.model.mxCell; 12863import com.mxgraph.model.mxCell;
@@ -12965,7 +12964,7 @@ $as_echo_n "checking minimal version (2.0.0.1) of jgraphx... " >&6; }
12965 if test "x" == "x"; then 12964 if test "x" == "x"; then
12966 12965
12967 cat << \EOF > conftest.java 12966 cat << \EOF > conftest.java
12968// #line 12968 "configure" 12967// #line 12967 "configure"
12969import java.util.regex.Pattern; 12968import java.util.regex.Pattern;
12970 12969
12971import com.mxgraph.view.mxGraph; 12970import com.mxgraph.view.mxGraph;
@@ -13037,7 +13036,7 @@ EOF
13037 else 13036 else
13038 13037
13039 cat << \EOF > conftest.java 13038 cat << \EOF > conftest.java
13040// #line 13040 "configure" 13039// #line 13039 "configure"
13041import java.util.regex.Pattern; 13040import java.util.regex.Pattern;
13042 13041
13043import com.mxgraph.view.mxGraph; 13042import com.mxgraph.view.mxGraph;
@@ -13131,7 +13130,7 @@ $as_echo_n "checking scirenderer... " >&6; }
13131 export ac_java_classpath="$jar_resolved:$ac_java_classpath" 13130 export ac_java_classpath="$jar_resolved:$ac_java_classpath"
13132 13131
13133 cat << \EOF > conftest.java 13132 cat << \EOF > conftest.java
13134// #line 13134 "configure" 13133// #line 13133 "configure"
13135import java.util.regex.Pattern; 13134import java.util.regex.Pattern;
13136 13135
13137import org.scilab.forge.scirenderer.PackageInfo; 13136import org.scilab.forge.scirenderer.PackageInfo;
@@ -13238,7 +13237,7 @@ $as_echo_n "checking minimal version (1.1.0) of scirenderer... " >&6; }
13238 if test "x" == "x"; then 13237 if test "x" == "x"; then
13239 13238
13240 cat << \EOF > conftest.java 13239 cat << \EOF > conftest.java
13241// #line 13241 "configure" 13240// #line 13240 "configure"
13242import java.util.regex.Pattern; 13241import java.util.regex.Pattern;
13243 13242
13244import org.scilab.forge.scirenderer.PackageInfo; 13243import org.scilab.forge.scirenderer.PackageInfo;
@@ -13310,7 +13309,7 @@ EOF
13310 else 13309 else
13311 13310
13312 cat << \EOF > conftest.java 13311 cat << \EOF > conftest.java
13313// #line 13313 "configure" 13312// #line 13312 "configure"
13314import java.util.regex.Pattern; 13313import java.util.regex.Pattern;
13315 13314
13316import org.scilab.forge.scirenderer.PackageInfo; 13315import org.scilab.forge.scirenderer.PackageInfo;
@@ -13409,7 +13408,7 @@ $as_echo_n "checking flexdock... " >&6; }
13409 export ac_java_classpath="$jar_resolved:$ac_java_classpath" 13408 export ac_java_classpath="$jar_resolved:$ac_java_classpath"
13410 13409
13411 cat << \EOF > conftest.java 13410 cat << \EOF > conftest.java
13412// #line 13412 "configure" 13411// #line 13411 "configure"
13413import java.util.regex.Pattern; 13412import java.util.regex.Pattern;
13414 13413
13415import org.flexdock.docking.DockingManager; 13414import org.flexdock.docking.DockingManager;
@@ -13516,7 +13515,7 @@ $as_echo_n "checking minimal version (1.2.4) of flexdock... " >&6; }
13516 if test "x" == "x"; then 13515 if test "x" == "x"; then
13517 13516
13518 cat << \EOF > conftest.java 13517 cat << \EOF > conftest.java
13519// #line 13519 "configure" 13518// #line 13518 "configure"
13520import java.util.regex.Pattern; 13519import java.util.regex.Pattern;
13521 13520
13522import org.flexdock.util.Utilities; 13521import org.flexdock.util.Utilities;
@@ -13588,7 +13587,7 @@ EOF
13588 else 13587 else
13589 13588
13590 cat << \EOF > conftest.java 13589 cat << \EOF > conftest.java
13591// #line 13591 "configure" 13590// #line 13590 "configure"
13592import java.util.regex.Pattern; 13591import java.util.regex.Pattern;
13593 13592
13594import org.flexdock.util.Utilities; 13593import org.flexdock.util.Utilities;
@@ -13679,7 +13678,7 @@ $as_echo_n "checking looks... " >&6; }
13679 export ac_java_classpath="$jar_resolved:$ac_java_classpath" 13678 export ac_java_classpath="$jar_resolved:$ac_java_classpath"
13680 13679
13681 cat << \EOF > conftest.java 13680 cat << \EOF > conftest.java
13682// #line 13682 "configure" 13681// #line 13681 "configure"
13683import java.util.regex.Pattern; 13682import java.util.regex.Pattern;
13684 13683
13685import com.jgoodies.looks.common.MenuItemRenderer; 13684import com.jgoodies.looks.common.MenuItemRenderer;
@@ -13796,7 +13795,7 @@ $as_echo_n "checking jgoodies-looks... " >&6; }
13796 export ac_java_classpath="$jar_resolved:$ac_java_classpath" 13795 export ac_java_classpath="$jar_resolved:$ac_java_classpath"
13797 13796
13798 cat << \EOF > conftest.java 13797 cat << \EOF > conftest.java
13799// #line 13799 "configure" 13798// #line 13798 "configure"
13800import java.util.regex.Pattern; 13799import java.util.regex.Pattern;
13801 13800
13802import com.jgoodies.looks.common.MenuItemRenderer; 13801import com.jgoodies.looks.common.MenuItemRenderer;
@@ -13914,7 +13913,7 @@ $as_echo_n "checking skinlf... " >&6; }
13914 export ac_java_classpath="$jar_resolved:$ac_java_classpath" 13913 export ac_java_classpath="$jar_resolved:$ac_java_classpath"
13915 13914
13916 cat << \EOF > conftest.java 13915 cat << \EOF > conftest.java
13917// #line 13917 "configure" 13916// #line 13916 "configure"
13918import java.util.regex.Pattern; 13917import java.util.regex.Pattern;
13919 13918
13920import com.l2fprod.util.AccessUtils; 13919import com.l2fprod.util.AccessUtils;
@@ -14031,7 +14030,7 @@ $as_echo_n "checking jogl2... " >&6; }
14031 export ac_java_classpath="$jar_resolved:$ac_java_classpath" 14030 export ac_java_classpath="$jar_resolved:$ac_java_classpath"
14032 14031
14033 cat << \EOF > conftest.java 14032 cat << \EOF > conftest.java
14034// #line 14034 "configure" 14033// #line 14033 "configure"
14035import java.util.regex.Pattern; 14034import java.util.regex.Pattern;
14036 14035
14037import javax.media.opengl.glu.GLUnurbs; 14036import javax.media.opengl.glu.GLUnurbs;
@@ -14254,7 +14253,7 @@ $as_echo_n "checking gluegen2-rt... " >&6; }
14254 export ac_java_classpath="$jar_resolved:$ac_java_classpath" 14253 export ac_java_classpath="$jar_resolved:$ac_java_classpath"
14255 14254
14256 cat << \EOF > conftest.java 14255 cat << \EOF > conftest.java
14257// #line 14257 "configure" 14256// #line 14256 "configure"
14258import java.util.regex.Pattern; 14257import java.util.regex.Pattern;
14259 14258
14260import jogamp.common.os.MachineDescriptionRuntime; 14259import jogamp.common.os.MachineDescriptionRuntime;
@@ -14428,7 +14427,7 @@ $as_echo_n "checking jhall... " >&6; }
14428 export ac_java_classpath="$jar_resolved:$ac_java_classpath" 14427 export ac_java_classpath="$jar_resolved:$ac_java_classpath"
14429 14428
14430 cat << \EOF > conftest.java 14429 cat << \EOF > conftest.java
14431// #line 14431 "configure" 14430// #line 14430 "configure"
14432import java.util.regex.Pattern; 14431import java.util.regex.Pattern;
14433 14432
14434import javax.help.JHelp; 14433import javax.help.JHelp;
@@ -14524,10 +14523,8 @@ $as_echo "$as_me: WARNING: Could not find or use the Java package/jar jhall used
14524 fi 14523 fi
14525 fi 14524 fi
14526 14525
14527 JHALL=$PACKAGE_JAR_FILE
14528
14529 # Named differently under Mandriva or Fedora 14526 # Named differently under Mandriva or Fedora
14530 if test -z "$JHALL"; then 14527 if test -z "$PACKAGE_JAR_FILE"; then
14531 14528
14532 { $as_echo "$as_me:${as_lineno-$LINENO}: checking javahelp2" >&5 14529 { $as_echo "$as_me:${as_lineno-$LINENO}: checking javahelp2" >&5
14533$as_echo_n "checking javahelp2... " >&6; } 14530$as_echo_n "checking javahelp2... " >&6; }
@@ -14545,7 +14542,7 @@ $as_echo_n "checking javahelp2... " >&6; }
14545 export ac_java_classpath="$jar_resolved:$ac_java_classpath" 14542 export ac_java_classpath="$jar_resolved:$ac_java_classpath"
14546 14543
14547 cat << \EOF > conftest.java 14544 cat << \EOF > conftest.java
14548// #line 14548 "configure" 14545// #line 14545 "configure"
14549import java.util.regex.Pattern; 14546import java.util.regex.Pattern;
14550 14547
14551import javax.help.JHelp; 14548import javax.help.JHelp;
@@ -14641,8 +14638,8 @@ $as_echo "$as_me: WARNING: Could not find or use the Java package/jar javahelp2
14641 fi 14638 fi
14642 fi 14639 fi
14643 14640
14644 JHALL=$PACKAGE_JAR_FILE
14645 fi 14641 fi
14642 JHALL=$PACKAGE_JAR_FILE
14646 14643
14647 14644
14648 # Console API 14645 # Console API
@@ -14663,7 +14660,7 @@ $as_echo_n "checking jrosetta-API... " >&6; }
14663 export ac_java_classpath="$jar_resolved:$ac_java_classpath" 14660 export ac_java_classpath="$jar_resolved:$ac_java_classpath"
14664 14661
14665 cat << \EOF > conftest.java 14662 cat << \EOF > conftest.java
14666// #line 14666 "configure" 14663// #line 14663 "configure"
14667import java.util.regex.Pattern; 14664import java.util.regex.Pattern;
14668 14665
14669import com.artenum.rosetta.interfaces.core.ConsoleConfiguration; 14666import com.artenum.rosetta.interfaces.core.ConsoleConfiguration;
@@ -14759,8 +14756,7 @@ $as_echo "$as_me: WARNING: Could not find or use the Java package/jar jrosetta-A
14759 fi 14756 fi
14760 fi 14757 fi
14761 14758
14762 JROSETTA_API=$PACKAGE_JAR_FILE 14759 if test -z "$PACKAGE_JAR_FILE"; then
14763 if test -z "$JROSETTA_API"; then
14764 14760
14765 { $as_echo "$as_me:${as_lineno-$LINENO}: checking jrosetta-api" >&5 14761 { $as_echo "$as_me:${as_lineno-$LINENO}: checking jrosetta-api" >&5
14766$as_echo_n "checking jrosetta-api... " >&6; } 14762$as_echo_n "checking jrosetta-api... " >&6; }
@@ -14778,7 +14774,7 @@ $as_echo_n "checking jrosetta-api... " >&6; }
14778 export ac_java_classpath="$jar_resolved:$ac_java_classpath" 14774 export ac_java_classpath="$jar_resolved:$ac_java_classpath"
14779 14775
14780 cat << \EOF > conftest.java 14776 cat << \EOF > conftest.java
14781// #line 14781 "configure" 14777// #line 14777 "configure"
14782import java.util.regex.Pattern; 14778import java.util.regex.Pattern;
14783 14779
14784import com.artenum.rosetta.interfaces.core.ConsoleConfiguration; 14780import com.artenum.rosetta.interfaces.core.ConsoleConfiguration;
@@ -14874,8 +14870,8 @@ $as_echo "$as_me: WARNING: Could not find or use the Java package/jar jrosetta-a
14874 fi 14870 fi
14875 fi 14871 fi
14876 14872
14877 JROSETTA_API=$PACKAGE_JAR_FILE 14873 fi
14878 fi 14874 JROSETTA_API=$PACKAGE_JAR_FILE
14879 14875
14880 14876
14881 # Console Core 14877 # Console Core
@@ -14896,7 +14892,7 @@ $as_echo_n "checking jrosetta-engine... " >&6; }
14896 export ac_java_classpath="$jar_resolved:$ac_java_classpath" 14892 export ac_java_classpath="$jar_resolved:$ac_java_classpath"
14897 14893
14898 cat << \EOF > conftest.java 14894 cat << \EOF > conftest.java
14899// #line 14899 "configure" 14895// #line 14895 "configure"
14900import java.util.regex.Pattern; 14896import java.util.regex.Pattern;
14901 14897
14902import com.artenum.rosetta.core.action.AbstractConsoleAction; 14898import com.artenum.rosetta.core.action.AbstractConsoleAction;
@@ -15002,7 +14998,7 @@ $as_echo_n "checking minimal version (1.0.4) of jrosetta-engine... " >&6; }
15002 if test "x" == "x"; then 14998 if test "x" == "x"; then
15003 14999
15004 cat << \EOF > conftest.java 15000 cat << \EOF > conftest.java
15005// #line 15005 "configure" 15001// #line 15001 "configure"
15006import java.util.regex.Pattern; 15002import java.util.regex.Pattern;
15007 15003
15008import com.artenum.rosetta.util.ConfigurationBuilder; 15004import com.artenum.rosetta.util.ConfigurationBuilder;
@@ -15074,7 +15070,7 @@ EOF
15074 else 15070 else
15075 15071
15076 cat << \EOF > conftest.java 15072 cat << \EOF > conftest.java
15077// #line 15077 "configure" 15073// #line 15073 "configure"
15078import java.util.regex.Pattern; 15074import java.util.regex.Pattern;
15079 15075
15080import com.artenum.rosetta.util.ConfigurationBuilder; 15076import com.artenum.rosetta.util.ConfigurationBuilder;
@@ -15167,7 +15163,7 @@ $as_echo_n "checking jeuclid-core... " >&6; }
15167 export ac_java_classpath="$jar_resolved:$ac_java_classpath" 15163 export ac_java_classpath="$jar_resolved:$ac_java_classpath"
15168 15164
15169 cat << \EOF > conftest.java 15165 cat << \EOF > conftest.java
15170// #line 15170 "configure" 15166// #line 15166 "configure"
15171import java.util.regex.Pattern; 15167import java.util.regex.Pattern;
15172 15168
15173import net.sourceforge.jeuclid.LayoutContext; 15169import net.sourceforge.jeuclid.LayoutContext;
@@ -15286,7 +15282,7 @@ $as_echo_n "checking fop... " >&6; }
15286 export ac_java_classpath="$jar_resolved:$ac_java_classpath" 15282 export ac_java_classpath="$jar_resolved:$ac_java_classpath"
15287 15283
15288 cat << \EOF > conftest.java 15284 cat << \EOF > conftest.java
15289// #line 15289 "configure" 15285// #line 15285 "configure"
15290import java.util.regex.Pattern; 15286import java.util.regex.Pattern;
15291 15287
15292import org.apache.fop.pdf.PDFInfo; 15288import org.apache.fop.pdf.PDFInfo;
@@ -15410,7 +15406,7 @@ $as_echo_n "checking freehep-graphics2d... " >&6; }
15410 export ac_java_classpath="$jar_resolved:$ac_java_classpath" 15406 export ac_java_classpath="$jar_resolved:$ac_java_classpath"
15411 15407
15412 cat << \EOF > conftest.java 15408 cat << \EOF > conftest.java
15413// #line 15413 "configure" 15409// #line 15409 "configure"
15414import java.util.regex.Pattern; 15410import java.util.regex.Pattern;
15415 15411
15416import org.freehep.graphics2d.VectorGraphics; 15412import org.freehep.graphics2d.VectorGraphics;
@@ -15527,7 +15523,7 @@ $as_echo_n "checking freehep-graphicsio-emf... " >&6; }
15527 export ac_java_classpath="$jar_resolved:$ac_java_classpath" 15523 export ac_java_classpath="$jar_resolved:$ac_java_classpath"
15528 15524
15529 cat << \EOF > conftest.java 15525 cat << \EOF > conftest.java
15530// #line 15530 "configure" 15526// #line 15526 "configure"
15531import java.util.regex.Pattern; 15527import java.util.regex.Pattern;
15532 15528
15533import org.freehep.graphicsio.emf.EMFGraphics2D; 15529import org.freehep.graphicsio.emf.EMFGraphics2D;
@@ -15644,7 +15640,7 @@ $as_echo_n "checking freehep-graphicsio... " >&6; }
15644 export ac_java_classpath="$jar_resolved:$ac_java_classpath" 15640 export ac_java_classpath="$jar_resolved:$ac_java_classpath"
15645 15641
15646 cat << \EOF > conftest.java 15642 cat << \EOF > conftest.java
15647// #line 15647 "configure" 15643// #line 15643 "configure"
15648import java.util.regex.Pattern; 15644import java.util.regex.Pattern;
15649 15645
15650import org.freehep.graphicsio.VectorGraphicsIO; 15646import org.freehep.graphicsio.VectorGraphicsIO;
@@ -15761,7 +15757,7 @@ $as_echo_n "checking freehep-io... " >&6; }
15761 export ac_java_classpath="$jar_resolved:$ac_java_classpath" 15757 export ac_java_classpath="$jar_resolved:$ac_java_classpath"
15762 15758
15763 cat << \EOF > conftest.java 15759 cat << \EOF > conftest.java
15764// #line 15764 "configure" 15760// #line 15760 "configure"
15765import java.util.regex.Pattern; 15761import java.util.regex.Pattern;
15766 15762
15767import org.freehep.util.io.XMLSequence; 15763import org.freehep.util.io.XMLSequence;
@@ -15878,7 +15874,7 @@ $as_echo_n "checking freehep-util... " >&6; }
15878 export ac_java_classpath="$jar_resolved:$ac_java_classpath" 15874 export ac_java_classpath="$jar_resolved:$ac_java_classpath"
15879 15875
15880 cat << \EOF > conftest.java 15876 cat << \EOF > conftest.java
15881// #line 15881 "configure" 15877// #line 15877 "configure"
15882import java.util.regex.Pattern; 15878import java.util.regex.Pattern;
15883 15879
15884import org.freehep.util.StringUtilities; 15880import org.freehep.util.StringUtilities;
@@ -15996,7 +15992,7 @@ $as_echo_n "checking batik-all... " >&6; }
15996 export ac_java_classpath="$jar_resolved:$ac_java_classpath" 15992 export ac_java_classpath="$jar_resolved:$ac_java_classpath"
15997 15993
15998 cat << \EOF > conftest.java 15994 cat << \EOF > conftest.java
15999// #line 15999 "configure" 15995// #line 15995 "configure"
16000import java.util.regex.Pattern; 15996import java.util.regex.Pattern;
16001 15997
16002import org.apache.batik.parser.Parser; 15998import org.apache.batik.parser.Parser;
@@ -16113,7 +16109,7 @@ $as_echo_n "checking batik... " >&6; }
16113 export ac_java_classpath="$jar_resolved:$ac_java_classpath" 16109 export ac_java_classpath="$jar_resolved:$ac_java_classpath"
16114 16110
16115 cat << \EOF > conftest.java 16111 cat << \EOF > conftest.java
16116// #line 16116 "configure" 16112// #line 16112 "configure"
16117import java.util.regex.Pattern; 16113import java.util.regex.Pattern;
16118 16114
16119import org.apache.batik.parser.Parser; 16115import org.apache.batik.parser.Parser;
@@ -16220,7 +16216,7 @@ $as_echo_n "checking minimal version (1.7) of batik... " >&6; }
16220 if test "x" == "x"; then 16216 if test "x" == "x"; then
16221 16217
16222 cat << \EOF > conftest.java 16218 cat << \EOF > conftest.java
16223// #line 16223 "configure" 16219// #line 16219 "configure"
16224import java.util.regex.Pattern; 16220import java.util.regex.Pattern;
16225 16221
16226import org.apache.batik.Version; 16222import org.apache.batik.Version;
@@ -16292,7 +16288,7 @@ EOF
16292 else 16288 else
16293 16289
16294 cat << \EOF > conftest.java 16290 cat << \EOF > conftest.java
16295// #line 16295 "configure" 16291// #line 16291 "configure"
16296import java.util.regex.Pattern; 16292import java.util.regex.Pattern;
16297 16293
16298import org.apache.batik.Version; 16294import org.apache.batik.Version;
@@ -16383,7 +16379,7 @@ $as_echo_n "checking commons-io... " >&6; }
16383 export ac_java_classpath="$jar_resolved:$ac_java_classpath" 16379 export ac_java_classpath="$jar_resolved:$ac_java_classpath"
16384 16380
16385 cat << \EOF > conftest.java 16381 cat << \EOF > conftest.java
16386// #line 16386 "configure" 16382// #line 16382 "configure"
16387import java.util.regex.Pattern; 16383import java.util.regex.Pattern;
16388 16384
16389import org.apache.commons.io.output.CountingOutputStream; 16385import org.apache.commons.io.output.CountingOutputStream;
@@ -16500,7 +16496,7 @@ $as_echo_n "checking xmlgraphics-commons... " >&6; }
16500 export ac_java_classpath="$jar_resolved:$ac_java_classpath" 16496 export ac_java_classpath="$jar_resolved:$ac_java_classpath"
16501 16497
16502 cat << \EOF > conftest.java 16498 cat << \EOF > conftest.java
16503// #line 16503 "configure" 16499// #line 16499 "configure"
16504import java.util.regex.Pattern; 16500import java.util.regex.Pattern;
16505 16501
16506import org.apache.xmlgraphics.util.Service; 16502import org.apache.xmlgraphics.util.Service;
@@ -16617,7 +16613,7 @@ $as_echo_n "checking avalon-framework... " >&6; }
16617 export ac_java_classpath="$jar_resolved:$ac_java_classpath" 16613 export ac_java_classpath="$jar_resolved:$ac_java_classpath"
16618 16614
16619 cat << \EOF > conftest.java 16615 cat << \EOF > conftest.java
16620// #line 16620 "configure" 16616// #line 16616 "configure"
16621import java.util.regex.Pattern; 16617import java.util.regex.Pattern;
16622 16618
16623import org.apache.avalon.framework.configuration.ConfigurationException; 16619import org.apache.avalon.framework.configuration.ConfigurationException;
@@ -16734,7 +16730,7 @@ $as_echo_n "checking xml-apis-ext... " >&6; }
16734 export ac_java_classpath="$jar_resolved:$ac_java_classpath" 16730 export ac_java_classpath="$jar_resolved:$ac_java_classpath"
16735 16731
16736 cat << \EOF > conftest.java 16732 cat << \EOF > conftest.java
16737// #line 16737 "configure" 16733// #line 16733 "configure"
16738import java.util.regex.Pattern; 16734import java.util.regex.Pattern;
16739 16735
16740import org.w3c.dom.svg.SVGDocument; 16736import org.w3c.dom.svg.SVGDocument;
@@ -16851,7 +16847,7 @@ $as_echo_n "checking xml-commons-apis-ext... " >&6; }
16851 export ac_java_classpath="$jar_resolved:$ac_java_classpath" 16847 export ac_java_classpath="$jar_resolved:$ac_java_classpath"
16852 16848
16853 cat << \EOF > conftest.java 16849 cat << \EOF > conftest.java
16854// #line 16854 "configure" 16850// #line 16850 "configure"
16855import java.util.regex.Pattern; 16851import java.util.regex.Pattern;
16856 16852
16857import org.w3c.dom.svg.SVGDocument; 16853import org.w3c.dom.svg.SVGDocument;
@@ -16972,7 +16968,7 @@ $as_echo_n "checking commons-logging... " >&6; }
16972 export ac_java_classpath="$jar_resolved:$ac_java_classpath" 16968 export ac_java_classpath="$jar_resolved:$ac_java_classpath"
16973 16969
16974 cat << \EOF > conftest.java 16970 cat << \EOF > conftest.java
16975// #line 16975 "configure" 16971// #line 16971 "configure"
16976import java.util.regex.Pattern; 16972import java.util.regex.Pattern;
16977 16973
16978import org.apache.commons.logging.LogFactory; 16974import org.apache.commons.logging.LogFactory;
@@ -17089,7 +17085,7 @@ $as_echo_n "checking jlatexmath... " >&6; }
17089 export ac_java_classpath="$jar_resolved:$ac_java_classpath" 17085 export ac_java_classpath="$jar_resolved:$ac_java_classpath"
17090 17086
17091 cat << \EOF > conftest.java 17087 cat << \EOF > conftest.java
17092// #line 17092 "configure" 17088// #line 17088 "configure"
17093import java.util.regex.Pattern; 17089import java.util.regex.Pattern;
17094 17090
17095import org.scilab.forge.jlatexmath.TeXFormula; 17091import org.scilab.forge.jlatexmath.TeXFormula;
@@ -17196,7 +17192,7 @@ $as_echo_n "checking minimal version (1.0.3) of jlatexmath... " >&6; }
17196 if test "x" == "x"; then 17192 if test "x" == "x"; then
17197 17193
17198 cat << \EOF > conftest.java 17194 cat << \EOF > conftest.java
17199// #line 17199 "configure" 17195// #line 17195 "configure"
17200import java.util.regex.Pattern; 17196import java.util.regex.Pattern;
17201 17197
17202import org.scilab.forge.jlatexmath.TeXFormula; 17198import org.scilab.forge.jlatexmath.TeXFormula;
@@ -17268,7 +17264,7 @@ EOF
17268 else 17264 else
17269 17265
17270 cat << \EOF > conftest.java 17266 cat << \EOF > conftest.java
17271// #line 17271 "configure" 17267// #line 17267 "configure"
17272import java.util.regex.Pattern; 17268import java.util.regex.Pattern;
17273 17269
17274import org.scilab.forge.jlatexmath.TeXFormula; 17270import org.scilab.forge.jlatexmath.TeXFormula;
@@ -17359,7 +17355,7 @@ $as_echo_n "checking jlatexmath-fop... " >&6; }
17359 export ac_java_classpath="$jar_resolved:$ac_java_classpath" 17355 export ac_java_classpath="$jar_resolved:$ac_java_classpath"
17360 17356
17361 cat << \EOF > conftest.java 17357 cat << \EOF > conftest.java
17362// #line 17362 "configure" 17358// #line 17358 "configure"
17363import java.util.regex.Pattern; 17359import java.util.regex.Pattern;
17364 17360
17365import org.scilab.forge.jlatexmath.fop.JLaTeXMathObj; 17361import org.scilab.forge.jlatexmath.fop.JLaTeXMathObj;
@@ -17482,7 +17478,7 @@ $as_echo_n "checking checkstyle... " >&6; }
17482 export ac_java_classpath="$jar_resolved:$ac_java_classpath" 17478 export ac_java_classpath="$jar_resolved:$ac_java_classpath"
17483 17479
17484 cat << \EOF > conftest.java 17480 cat << \EOF > conftest.java
17485// #line 17485 "configure" 17481// #line 17481 "configure"
17486import java.util.regex.Pattern; 17482import java.util.regex.Pattern;
17487 17483
17488import com.puppycrawl.tools.checkstyle.CheckStyleTask; 17484import com.puppycrawl.tools.checkstyle.CheckStyleTask;
@@ -17599,7 +17595,7 @@ $as_echo_n "checking commons-beanutils... " >&6; }
17599 export ac_java_classpath="$jar_resolved:$ac_java_classpath" 17595 export ac_java_classpath="$jar_resolved:$ac_java_classpath"
17600 17596
17601 cat << \EOF > conftest.java 17597 cat << \EOF > conftest.java
17602// #line 17602 "configure" 17598// #line 17598 "configure"
17603import java.util.regex.Pattern; 17599import java.util.regex.Pattern;
17604 17600
17605import org.apache.commons.beanutils.Converter; 17601import org.apache.commons.beanutils.Converter;
@@ -17716,7 +17712,7 @@ $as_echo_n "checking antlr... " >&6; }
17716 export ac_java_classpath="$jar_resolved:$ac_java_classpath" 17712 export ac_java_classpath="$jar_resolved:$ac_java_classpath"
17717 17713
17718 cat << \EOF > conftest.java 17714 cat << \EOF > conftest.java
17719// #line 17719 "configure" 17715// #line 17715 "configure"
17720import java.util.regex.Pattern; 17716import java.util.regex.Pattern;
17721 17717
17722import antlr.TokenStreamException; 17718import antlr.TokenStreamException;
@@ -17833,7 +17829,7 @@ $as_echo_n "checking junit4... " >&6; }
17833 export ac_java_classpath="$jar_resolved:$ac_java_classpath" 17829 export ac_java_classpath="$jar_resolved:$ac_java_classpath"
17834 17830
17835 cat << \EOF > conftest.java 17831 cat << \EOF > conftest.java
17836// #line 17836 "configure" 17832// #line 17832 "configure"
17837import java.util.regex.Pattern; 17833import java.util.regex.Pattern;
17838 17834
17839import org.junit.Assert; 17835import org.junit.Assert;
@@ -17929,6 +17925,124 @@ $as_echo "$as_me: WARNING: Could not find or use the Java package/jar junit4 use
17929 fi 17925 fi
17930 fi 17926 fi
17931 17927
17928 if test -z "$PACKAGE_JAR_FILE"; then
17929
17930 { $as_echo "$as_me:${as_lineno-$LINENO}: checking junit" >&5
17931$as_echo_n "checking junit... " >&6; }
17932 PACKAGE_JAR_FILE=
17933 found_jar=no
17934 saved_ac_java_classpath=$ac_java_classpath
17935 DEFAULT_JAR_DIR="/usr/share/java /usr/lib/java /usr/share/java /usr/share/java/jar /opt/java/lib /usr/local/java /usr/local/java/jar /usr/local/share/java /usr/local/share/java/jar /usr/local/lib/java $(find /usr/share/java/ -maxdepth 1 -type d 2>/dev/null) $(find /usr/lib64/ -maxdepth 1 -type d 2>/dev/null) $(find /usr/lib/ -maxdepth 1 -type d 2>/dev/null) $(find /usr/share/*/lib -maxdepth 1 -type d 2>/dev/null)"
17936 for jardir in "`pwd`/thirdparty" "`pwd`/jar" $DEFAULT_JAR_DIR; do
17937 for jar in "$jardir/junit.jar" "$jardir/libjunit.jar" "$jardir/libjunit-java.jar" "$jardir/junit*.jar"; do
17938
17939# TODO check the behaviour when spaces
17940 jars_resolved=`ls $jar 2>/dev/null`
17941 for jar_resolved in $jars_resolved; do # If several jars matches
17942 if test -e "$jar_resolved"; then
17943 export ac_java_classpath="$jar_resolved:$ac_java_classpath"
17944
17945 cat << \EOF > conftest.java
17946// #line 17946 "configure"
17947import java.util.regex.Pattern;
17948
17949import org.junit.Assert;
17950
17951public class conftest {
17952 public static void main(String[] argv) {
17953
17954 }
17955
17956 private static int compare(String v1, String v2) {
17957 String s1 = normalisedVersion(v1);
17958 String s2 = normalisedVersion(v2);
17959 return s1.compareTo(s2);
17960 }
17961
17962 private static String normalisedVersion(String version) {
17963 return normalisedVersion(version, ".", 4);
17964 }
17965
17966 private static String normalisedVersion(String version, String sep, int maxWidth) {
17967 String[] split = Pattern.compile(sep, Pattern.LITERAL).split(version);
17968 StringBuilder sb = new StringBuilder();
17969 for (String s : split) {
17970 sb.append(String.format("%" + maxWidth + 's', s));
17971 }
17972 return sb.toString();
17973 }
17974}
17975EOF
17976
17977 CLASSPATH=$ac_java_classpath
17978 export CLASSPATH
17979 cmd="$JAVAC ${JAVAC_FLAGS} conftest.java"
17980 if (echo $cmd >&5 ; eval $cmd >conftest.java.output 2>&5) ; then
17981 if test ""no"" = "no"; then
17982 echo "yes" >&5
17983
17984 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $jar_resolved" >&5
17985$as_echo "$jar_resolved" >&6; }
17986 found_jar=yes
17987 PACKAGE_JAR_FILE=$jar_resolved
17988 break 3
17989
17990 else
17991 cmd="$JAVA conftest"
17992 if (echo $cmd >&5 ; eval $cmd >conftest.java.output 2>&5); then
17993 echo "yes" >&5
17994
17995 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $jar_resolved" >&5
17996$as_echo "$jar_resolved" >&6; }
17997 found_jar=yes
17998 PACKAGE_JAR_FILE=$jar_resolved
17999 break 3
18000
18001 else
18002 echo "configure: failed program was:" >&5
18003 cat conftest.java >&5
18004 if test -s conftest.java.output; then
18005 STDOUT=`cat conftest.java.output`
18006 fi
18007 echo "configure: CLASSPATH was $CLASSPATH" >&5
18008
18009 ac_java_classpath=$saved_ac_java_classpath
18010
18011
18012 fi
18013 fi
18014 if test -f conftest.java.output; then
18015 rm conftest.java.output
18016 fi
18017 else
18018 echo "configure: failed program was:" >&5
18019 cat conftest.java >&5
18020 echo "configure: CLASSPATH was $CLASSPATH" >&5
18021
18022 ac_java_classpath=$saved_ac_java_classpath
18023
18024
18025 fi
18026
18027 fi
18028 done
18029 done
18030 done
18031 if test "$found_jar" = "no"; then
18032 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18033$as_echo "no" >&6; }
18034 if test ""yes"" = "yes"; then
18035 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Could not find or use the Java package/jar junit used by Junit4 -
18036Unit tests (looking for package org.junit.Assert)" >&5
18037$as_echo "$as_me: WARNING: Could not find or use the Java package/jar junit used by Junit4 -
18038Unit tests (looking for package org.junit.Assert)" >&2;}
18039 else
18040 as_fn_error $? "Could not find or use the Java package/jar junit used by Junit4 -
18041Unit tests (looking for package org.junit.Assert)" "$LINENO" 5
18042 fi
18043 fi
18044
18045 fi
17932 JUNIT4=$PACKAGE_JAR_FILE 18046 JUNIT4=$PACKAGE_JAR_FILE
17933 18047
17934 18048
@@ -17950,7 +18064,7 @@ $as_echo_n "checking cobertura... " >&6; }
17950 export ac_java_classpath="$jar_resolved:$ac_java_classpath" 18064 export ac_java_classpath="$jar_resolved:$ac_java_classpath"
17951 18065
17952 cat << \EOF > conftest.java 18066 cat << \EOF > conftest.java
17953// #line 17953 "configure" 18067// #line 18067 "configure"
17954import java.util.regex.Pattern; 18068import java.util.regex.Pattern;
17955 18069
17956import net.sourceforge.cobertura.merge.Main; 18070import net.sourceforge.cobertura.merge.Main;
@@ -18067,7 +18181,7 @@ $as_echo_n "checking asm3... " >&6; }
18067 export ac_java_classpath="$jar_resolved:$ac_java_classpath" 18181 export ac_java_classpath="$jar_resolved:$ac_java_classpath"
18068 18182
18069 cat << \EOF > conftest.java 18183 cat << \EOF > conftest.java
18070// #line 18070 "configure" 18184// #line 18184 "configure"
18071import java.util.regex.Pattern; 18185import java.util.regex.Pattern;
18072 18186
18073import org.objectweb.asm.Type; 18187import org.objectweb.asm.Type;
@@ -18163,8 +18277,6 @@ $as_echo "$as_me: WARNING: Could not find or use the Java package/jar asm3 used
18163 fi 18277 fi
18164 fi 18278 fi
18165 18279
18166 ASM3=$PACKAGE_JAR_FILE
18167
18168 if test -z "$ASM3"; then 18280 if test -z "$ASM3"; then
18169 18281
18170 { $as_echo "$as_me:${as_lineno-$LINENO}: checking asm" >&5 18282 { $as_echo "$as_me:${as_lineno-$LINENO}: checking asm" >&5
@@ -18183,7 +18295,7 @@ $as_echo_n "checking asm... " >&6; }
18183 export ac_java_classpath="$jar_resolved:$ac_java_classpath" 18295 export ac_java_classpath="$jar_resolved:$ac_java_classpath"
18184 18296
18185 cat << \EOF > conftest.java 18297 cat << \EOF > conftest.java
18186// #line 18186 "configure" 18298// #line 18298 "configure"
18187import java.util.regex.Pattern; 18299import java.util.regex.Pattern;
18188 18300
18189import org.objectweb.asm.Type; 18301import org.objectweb.asm.Type;
@@ -18279,8 +18391,9 @@ $as_echo "$as_me: WARNING: Could not find or use the Java package/jar asm used b
18279 fi 18391 fi
18280 fi 18392 fi
18281 18393
18282 ASM3=$PACKAGE_JAR_FILE
18283 fi 18394 fi
18395 ASM3=$PACKAGE_JAR_FILE
18396
18284 18397
18285 18398
18286 { $as_echo "$as_me:${as_lineno-$LINENO}: checking ecj" >&5 18399 { $as_echo "$as_me:${as_lineno-$LINENO}: checking ecj" >&5
@@ -18299,7 +18412,7 @@ $as_echo_n "checking ecj... " >&6; }
18299 export ac_java_classpath="$jar_resolved:$ac_java_classpath" 18412 export ac_java_classpath="$jar_resolved:$ac_java_classpath"
18300 18413
18301 cat << \EOF > conftest.java 18414 cat << \EOF > conftest.java
18302// #line 18302 "configure" 18415// #line 18415 "configure"
18303import java.util.regex.Pattern; 18416import java.util.regex.Pattern;
18304 18417
18305import org.eclipse.jdt.core.compiler.batch.BatchCompiler; 18418import org.eclipse.jdt.core.compiler.batch.BatchCompiler;
@@ -26842,7 +26955,7 @@ CPPFLAGS="$CPPFLAGS -I$CHK_TCL_INCLUDE_PATH"
26842{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if tcl is version $CHK_TCL_MAJOR.$CHK_TCL_MINOR or later" >&5 26955{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if tcl is version $CHK_TCL_MAJOR.$CHK_TCL_MINOR or later" >&5
26843$as_echo_n "checking if tcl is version $CHK_TCL_MAJOR.$CHK_TCL_MINOR or later... " >&6; } 26956$as_echo_n "checking if tcl is version $CHK_TCL_MAJOR.$CHK_TCL_MINOR or later... " >&6; }
26844cat > conftest.$ac_ext <<EOF 26957cat > conftest.$ac_ext <<EOF
26845#line 26845 "configure" 26958#line 26958 "configure"
26846#include "confdefs.h" 26959#include "confdefs.h"
26847 26960
26848#include "$CHK_TCL_INCLUDE_PATH/$CHK_TCL_INC_NAME" 26961#include "$CHK_TCL_INCLUDE_PATH/$CHK_TCL_INC_NAME"
@@ -27153,7 +27266,7 @@ CPPFLAGS="$CPPFLAGS $TCL_INC_PATH -I$CHK_TK_INCLUDE_PATH $X_CFLAGS"
27153$as_echo_n "checking if tk is version $CHK_TK_MAJOR.$CHK_TK_MINOR or later... " >&6; } 27266$as_echo_n "checking if tk is version $CHK_TK_MAJOR.$CHK_TK_MINOR or later... " >&6; }
27154 27267
27155cat > conftest.$ac_ext <<EOF 27268cat > conftest.$ac_ext <<EOF
27156#line 27156 "configure" 27269#line 27269 "configure"
27157#include "confdefs.h" 27270#include "confdefs.h"
27158 27271
27159#include "$CHK_TK_INCLUDE_PATH/$CHK_TK_INC_NAME" 27272#include "$CHK_TK_INCLUDE_PATH/$CHK_TK_INC_NAME"
@@ -27737,7 +27850,7 @@ $as_echo_n "checking saxon9he... " >&6; }
27737 export ac_java_classpath="$jar_resolved:$ac_java_classpath" 27850 export ac_java_classpath="$jar_resolved:$ac_java_classpath"
27738 27851
27739 cat << \EOF > conftest.java 27852 cat << \EOF > conftest.java
27740// #line 27740 "configure" 27853// #line 27853 "configure"
27741import java.util.regex.Pattern; 27854import java.util.regex.Pattern;
27742 27855
27743import net.sf.saxon.Version; 27856import net.sf.saxon.Version;
@@ -27852,7 +27965,7 @@ $as_echo_n "checking saxon... " >&6; }
27852 export ac_java_classpath="$jar_resolved:$ac_java_classpath" 27965 export ac_java_classpath="$jar_resolved:$ac_java_classpath"
27853 27966
27854 cat << \EOF > conftest.java 27967 cat << \EOF > conftest.java
27855// #line 27855 "configure" 27968// #line 27968 "configure"
27856import java.util.regex.Pattern; 27969import java.util.regex.Pattern;
27857 27970
27858import net.sf.saxon.Version; 27971import net.sf.saxon.Version;
@@ -27968,7 +28081,7 @@ $as_echo_n "checking saxon... " >&6; }
27968 export ac_java_classpath="$jar_resolved:$ac_java_classpath" 28081 export ac_java_classpath="$jar_resolved:$ac_java_classpath"
27969 28082
27970 cat << \EOF > conftest.java 28083 cat << \EOF > conftest.java
27971// #line 27971 "configure" 28084// #line 28084 "configure"
27972import java.util.regex.Pattern; 28085import java.util.regex.Pattern;
27973 28086
27974import com.icl.saxon.Loader; 28087import com.icl.saxon.Loader;
diff --git a/scilab/configure.ac b/scilab/configure.ac
index 0367a0b..e6423dc 100644
--- a/scilab/configure.ac
+++ b/scilab/configure.ac
@@ -949,22 +949,19 @@ interface for JOGL2 - or libGL (OpenGL library) are installed and if the version
949 949
950 # Jhall 950 # Jhall
951 AC_JAVA_CHECK_PACKAGE([jhall],[javax.help.JHelp],[Scilab Help Browser],"yes") 951 AC_JAVA_CHECK_PACKAGE([jhall],[javax.help.JHelp],[Scilab Help Browser],"yes")
952 JHALL=$PACKAGE_JAR_FILE
953
954 # Named differently under Mandriva or Fedora 952 # Named differently under Mandriva or Fedora
955 if test -z "$JHALL"; then 953 if test -z "$PACKAGE_JAR_FILE"; then
956 AC_JAVA_CHECK_PACKAGE([javahelp2],[javax.help.JHelp],[Scilab Help Browser]) 954 AC_JAVA_CHECK_PACKAGE([javahelp2],[javax.help.JHelp],[Scilab Help Browser])
957 JHALL=$PACKAGE_JAR_FILE
958 fi 955 fi
956 JHALL=$PACKAGE_JAR_FILE
959 AC_SUBST(JHALL) 957 AC_SUBST(JHALL)
960 958
961 # Console API 959 # Console API
962 AC_JAVA_CHECK_PACKAGE([jrosetta-API],[com.artenum.rosetta.interfaces.core.ConsoleConfiguration],[JRosetta : Console API Artenum / Scilab],"yes") 960 AC_JAVA_CHECK_PACKAGE([jrosetta-API],[com.artenum.rosetta.interfaces.core.ConsoleConfiguration],[JRosetta : Console API Artenum / Scilab],"yes")
963 JROSETTA_API=$PACKAGE_JAR_FILE 961 if test -z "$PACKAGE_JAR_FILE"; then
964 if test -z "$JROSETTA_API"; then
965 AC_JAVA_CHECK_PACKAGE([jrosetta-api],[com.artenum.rosetta.interfaces.core.ConsoleConfiguration],[JRosetta : Console API Artenum / Scilab]) 962 AC_JAVA_CHECK_PACKAGE([jrosetta-api],[com.artenum.rosetta.interfaces.core.ConsoleConfiguration],[JRosetta : Console API Artenum / Scilab])
966 JROSETTA_API=$PACKAGE_JAR_FILE 963 fi
967 fi 964 JROSETTA_API=$PACKAGE_JAR_FILE
968 AC_SUBST(JROSETTA_API) 965 AC_SUBST(JROSETTA_API)
969 966
970 # Console Core 967 # Console Core
@@ -1095,6 +1092,10 @@ interface for JOGL2 - or libGL (OpenGL library) are installed and if the version
1095 1092
1096 # Junit 4 (java unitary test) 1093 # Junit 4 (java unitary test)
1097 AC_JAVA_CHECK_PACKAGE([junit4],[org.junit.Assert],[Junit4 - Unit tests],"yes") 1094 AC_JAVA_CHECK_PACKAGE([junit4],[org.junit.Assert],[Junit4 - Unit tests],"yes")
1095 if test -z "$PACKAGE_JAR_FILE"; then
1096 AC_JAVA_CHECK_PACKAGE([junit],[org.junit.Assert],[Junit4 -
1097Unit tests],"yes")
1098 fi
1098 JUNIT4=$PACKAGE_JAR_FILE 1099 JUNIT4=$PACKAGE_JAR_FILE
1099 AC_SUBST(JUNIT4) 1100 AC_SUBST(JUNIT4)
1100 1101
@@ -1105,12 +1106,11 @@ interface for JOGL2 - or libGL (OpenGL library) are installed and if the version
1105 1106
1106 # ASM (a dependency of Cobertura) 1107 # ASM (a dependency of Cobertura)
1107 AC_JAVA_CHECK_PACKAGE([asm3],[org.objectweb.asm.Type],[Java bytecode manipulation (dep of cobertura)],"yes") 1108 AC_JAVA_CHECK_PACKAGE([asm3],[org.objectweb.asm.Type],[Java bytecode manipulation (dep of cobertura)],"yes")
1108 ASM3=$PACKAGE_JAR_FILE
1109 AC_SUBST(ASM3)
1110 if test -z "$ASM3"; then 1109 if test -z "$ASM3"; then
1111 AC_JAVA_CHECK_PACKAGE([asm],[org.objectweb.asm.Type],[Java bytecode manipulation (dep of cobertura)],"yes") 1110 AC_JAVA_CHECK_PACKAGE([asm],[org.objectweb.asm.Type],[Java bytecode manipulation (dep of cobertura)],"yes")
1112 ASM3=$PACKAGE_JAR_FILE
1113 fi 1111 fi
1112 ASM3=$PACKAGE_JAR_FILE
1113 AC_SUBST(ASM3)
1114 1114
1115 AC_JAVA_CHECK_PACKAGE([ecj],[org.eclipse.jdt.core.compiler.batch.BatchCompiler],[Eclipse Java compiler],"yes") 1115 AC_JAVA_CHECK_PACKAGE([ecj],[org.eclipse.jdt.core.compiler.batch.BatchCompiler],[Eclipse Java compiler],"yes")
1116 ECJ=$PACKAGE_JAR_FILE 1116 ECJ=$PACKAGE_JAR_FILE
diff --git a/scilab/desktop/images/scilab-desktop.png b/scilab/desktop/images/scilab-desktop.png
index 3bf96ec..0cf2736 100644
--- a/scilab/desktop/images/scilab-desktop.png
+++ b/scilab/desktop/images/scilab-desktop.png
Binary files differ
diff --git a/scilab/desktop/images/scilab-plot.png b/scilab/desktop/images/scilab-plot.png
index 1742e89..e99100e 100644
--- a/scilab/desktop/images/scilab-plot.png
+++ b/scilab/desktop/images/scilab-plot.png
Binary files differ
diff --git a/scilab/desktop/images/scilab-scinotes.png b/scilab/desktop/images/scilab-scinotes.png
new file mode 100644
index 0000000..fb84aee
--- /dev/null
+++ b/scilab/desktop/images/scilab-scinotes.png
Binary files differ
diff --git a/scilab/desktop/images/scilab-xcos.png b/scilab/desktop/images/scilab-xcos.png
index d1d4ae2..b44dfb1 100644
--- a/scilab/desktop/images/scilab-xcos.png
+++ b/scilab/desktop/images/scilab-xcos.png
Binary files differ
diff --git a/scilab/desktop/scilab.appdata.xml b/scilab/desktop/scilab.appdata.xml
index ccd2dd6..3dbf935 100644
--- a/scilab/desktop/scilab.appdata.xml
+++ b/scilab/desktop/scilab.appdata.xml
@@ -4,8 +4,8 @@
4 <id type="desktop">scilab.desktop</id> 4 <id type="desktop">scilab.desktop</id>
5 <licence>CC0</licence> 5 <licence>CC0</licence>
6 <description> 6 <description>
7 <p>Scilab includes hundreds of mathematical functions. It has a high level programming language allowing access to advanced data structures, 2-D and 3-D graphical functions.</p> 7 <p>Scilab is free and open source software for numerical computation providing a powerful computing environment for engineering and scientific applications. Scilab includes hundreds of mathematical functions. It has a high level programming language allowing access to advanced data structures, 2-D and 3-D graphical functions. A large number of functionalities is included in Scilab:
8 <p>A large number of functionalities is included in Scilab:</p> 8 </p>
9 <ul> 9 <ul>
10 <li>Maths &amp; Simulation: For usual engineering and science applications</li> 10 <li>Maths &amp; Simulation: For usual engineering and science applications</li>
11 <li>2-D &amp; 3-D Visualization: Graphics functions to visualize, annotate and export data</li> 11 <li>2-D &amp; 3-D Visualization: Graphics functions to visualize, annotate and export data</li>
@@ -16,11 +16,14 @@
16 <li>Application Development: Increase Scilab native functionalities and manage data exchanges</li> 16 <li>Application Development: Increase Scilab native functionalities and manage data exchanges</li>
17 <li>Xcos - Hybrid dynamic systems modeler and simulator: Modeling physical systems, control systems</li> 17 <li>Xcos - Hybrid dynamic systems modeler and simulator: Modeling physical systems, control systems</li>
18 </ul> 18 </ul>
19 <p>Thanks to its ability to interconnect with third-party technologies and applications, Scilab can also act as a unique platform to bring together codes written in different programming languages in a single, unified language, thus facilitating their distribution, their back-up and use.
20 </p>
19 </description> 21 </description>
20 <screenshots> 22 <screenshots>
21 <screenshot type="default" width="800" height="600">http://cgit.scilab.org/cgit.cgi/scilab/plain/scilab/desktop/images/scilab-desktop.png</screenshot> 23 <screenshot type="default" width="1200" height="675">http://cgit.scilab.org/cgit.cgi/scilab/plain/scilab/desktop/images/scilab-desktop.png</screenshot>
22 <screenshot width="800" height="600">http://cgit.scilab.org/cgit.cgi/scilab/plain/scilab/desktop/images/scilab-plot.png</screenshot> 24 <screenshot width="1200" height="675">http://cgit.scilab.org/cgit.cgi/scilab/plain/scilab/desktop/images/scilab-plot.png</screenshot>
23 <screenshot width="800" height="600">http://cgit.scilab.org/cgit.cgi/scilab/plain/scilab/desktop/images/scilab-xcos.png</screenshot> 25 <screenshot width="1200" height="675">http://cgit.scilab.org/cgit.cgi/scilab/plain/scilab/desktop/images/scilab-xcos.png</screenshot>
26 <screenshot width="1200" height="675">http://cgit.scilab.org/cgit.cgi/scilab/plain/scilab/desktop/images/scilab-scinotes.png</screenshot>
24 </screenshots> 27 </screenshots>
25 <url type="homepage">http://www.scilab.org</url> 28 <url type="homepage">http://www.scilab.org</url>
26 <updatecontact>dev@lists.scilab.org</updatecontact> 29 <updatecontact>dev@lists.scilab.org</updatecontact>
diff --git a/scilab/etc/librarypath.xml b/scilab/etc/librarypath.xml
index 8426afb..265db2e 100644
--- a/scilab/etc/librarypath.xml
+++ b/scilab/etc/librarypath.xml
@@ -50,7 +50,8 @@
50 <path value="/usr/lib64/gluegen2/"/> 50 <path value="/usr/lib64/gluegen2/"/>
51 51
52 <!-- Some distributions (like openSUSE) put gluegen-rt in /usr/lib instead pf /usr/lib/jni --> 52 <!-- Some distributions (like openSUSE) put gluegen-rt in /usr/lib instead pf /usr/lib/jni -->
53 <path value="/usr/lib" /> 53 <path value="/usr/lib/" />
54 <path value="/usr/lib64/" />
54 55
55 <!-- Make install with prefix --> 56 <!-- Make install with prefix -->
56 <path value="$SCILAB/../../lib/scilab/"/> 57 <path value="$SCILAB/../../lib/scilab/"/>
diff --git a/scilab/modules/console/src/c/clc.c b/scilab/modules/console/src/c/clc.c
index 635aca9..351fe80 100644
--- a/scilab/modules/console/src/c/clc.c
+++ b/scilab/modules/console/src/c/clc.c
@@ -1,6 +1,7 @@
1/* 1/*
2 * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab 2 * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
3 * Copyright (C) 2007 - INRIA - Allan CORNET 3 * Copyright (C) 2007 - INRIA - Allan CORNET
4 * Copyright (C) 2014 - Scilab Enterprises - Anais AUBERT
4 * 5 *
5 * This file must be used under the terms of the CeCILL. 6 * 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 * This source file is licensed as described in the file COPYING, which
@@ -11,6 +12,7 @@
11 */ 12 */
12/*--------------------------------------------------------------------------*/ 13/*--------------------------------------------------------------------------*/
13#include <stdlib.h> 14#include <stdlib.h>
15#include <stdio.h>
14#include "clc.h" 16#include "clc.h"
15#include "scilabmode.h" 17#include "scilabmode.h"
16#include "ClearConsole.h" 18#include "ClearConsole.h"
@@ -18,6 +20,8 @@
18#ifdef _MSC_VER 20#ifdef _MSC_VER
19#include "windows/clrscr_nw.h" 21#include "windows/clrscr_nw.h"
20#include "windows/clrscrPart_nw.h" 22#include "windows/clrscrPart_nw.h"
23#else
24#include "others/clrscr_nw.h"
21#endif 25#endif
22/*--------------------------------------------------------------------------*/ 26/*--------------------------------------------------------------------------*/
23BOOL clc(int nblines) 27BOOL clc(int nblines)
@@ -32,19 +36,14 @@ BOOL clc(int nblines)
32 clrscrPart_nw(nblines); 36 clrscrPart_nw(nblines);
33 bOK = TRUE; 37 bOK = TRUE;
34#else 38#else
35 /* impossible in this mode */ 39 printf("\033[%dA\033[J", nblines + 2);
36 bOK = FALSE; 40 bOK = TRUE;
37#endif 41#endif
38 } 42 }
39 else 43 else
40 { 44 {
41#ifdef _MSC_VER
42 clrscr_nw(); 45 clrscr_nw();
43 bOK = TRUE; 46 bOK = TRUE;
44#else
45 /* only on Windows */
46 bOK = FALSE;
47#endif
48 } 47 }
49 } 48 }
50 else 49 else
diff --git a/scilab/modules/console/src/c/cmdLine/getKey.c b/scilab/modules/console/src/c/cmdLine/getKey.c
index ea1ae2ae..671a4b3 100644
--- a/scilab/modules/console/src/c/cmdLine/getKey.c
+++ b/scilab/modules/console/src/c/cmdLine/getKey.c
@@ -86,10 +86,11 @@ static void caseHomeOrEndKey(wchar_t * commandLine, unsigned int *cursorLocation
86 86
87/* 87/*
88 * If second key was L'[' 88 * If second key was L'['
89 * It means this could be an arrow key or delete key. 89 * It means this could be an arrow key, a delete key or home/end key.
90 */ 90 */
91static void caseDelOrArrowKey(wchar_t ** commandLine, unsigned int *cursorLocation) 91static void caseDelOrArrowKey(wchar_t ** commandLine, unsigned int *cursorLocation)
92{ 92{
93 int * cmd = *commandLine;
93 switch (getwchar()) 94 switch (getwchar())
94 { 95 {
95 case L'A': 96 case L'A':
@@ -114,6 +115,13 @@ static void caseDelOrArrowKey(wchar_t ** commandLine, unsigned int *cursorLocati
114 updateTokenInScilabHistory(commandLine); 115 updateTokenInScilabHistory(commandLine);
115 break; 116 break;
116 } 117 }
118 //home or end key in some consoles
119 case L'H':
120 begLine(cmd, cursorLocation);
121 break;
122 case L'F':
123 endLine(cmd, cursorLocation);
124 break;
117 } 125 }
118} 126}
119 127
@@ -138,6 +146,7 @@ static void caseMetaKey(wchar_t ** commandLine, unsigned int *cursorLocation)
138 case L'O': 146 case L'O':
139 caseHomeOrEndKey(*commandLine, cursorLocation); 147 caseHomeOrEndKey(*commandLine, cursorLocation);
140 break; 148 break;
149
141 } 150 }
142} 151}
143 152
@@ -209,7 +218,7 @@ static void getKey(wchar_t ** commandLine, unsigned int *cursorLocation)
209 218
210 key = getwchar(); 219 key = getwchar();
211 220
212 // Need to clear the stdin 221 // Need to clear the stdin
213 if (key == WEOF && feof(stdin)) 222 if (key == WEOF && feof(stdin))
214 { 223 {
215 clearerr(stdin); 224 clearerr(stdin);
@@ -231,6 +240,7 @@ static void getKey(wchar_t ** commandLine, unsigned int *cursorLocation)
231 case CTRL_D: 240 case CTRL_D:
232 rmChar(*commandLine, SCI_DELETE, cursorLocation); 241 rmChar(*commandLine, SCI_DELETE, cursorLocation);
233 updateTokenInScilabHistory(commandLine); 242 updateTokenInScilabHistory(commandLine);
243 exit(0);
234 break; 244 break;
235 case CTRL_E: 245 case CTRL_E:
236 endLine(*commandLine, cursorLocation); 246 endLine(*commandLine, cursorLocation);
diff --git a/scilab/modules/console/tests/nonreg_tests/bug_10777.tst b/scilab/modules/console/tests/nonreg_tests/bug_10777.tst
new file mode 100644
index 0000000..e2f39e0
--- /dev/null
+++ b/scilab/modules/console/tests/nonreg_tests/bug_10777.tst
@@ -0,0 +1,23 @@
1// =============================================================================
2// Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
3// Copyright (C) 2014 -Scilab Enterprises - Anais AUBERT
4//
5// This file is distributed under the same license as the Scilab package.
6// =============================================================================
7
8// <-- INTERACTIVE TEST -->
9// <-- TEST WITH CONSOLE -->
10//
11// <-- Non-regression test for bug 10777 -->
12//
13// <-- Bugzilla URL -->
14// http://bugzilla.scilab.org/show_bug.cgi?id=10777
15//
16// <-- Short Description -->
17// In some consoles, home and end keys are not trapped
18
19// i) Have a console opened .
20// ii) Write anything
21// iii) Hit home key, cursor should move to the beginning of the line
22
23
diff --git a/scilab/modules/core/macros/edit.sci b/scilab/modules/core/macros/edit.sci
index 3f746cc..d3768ba 100644
--- a/scilab/modules/core/macros/edit.sci
+++ b/scilab/modules/core/macros/edit.sci
@@ -38,7 +38,7 @@ function edit(macroname,linenumber)
38 else 38 else
39 tmpfile = tmpdir + macroname + ".sci"; 39 tmpfile = tmpdir + macroname + ".sci";
40 if funptr(macroname)<>0 then 40 if funptr(macroname)<>0 then
41 error(msprintf(gettext("%s: %s is a uneditable hard coded function.\n"), "edit", macroname)); 41 error(msprintf(gettext("%s: %s is an uneditable hard coded function.\n"), "edit", macroname));
42 end 42 end
43 libr = whereis(macroname); 43 libr = whereis(macroname);
44 if libr <> [] then // macroname is the name of a defined function 44 if libr <> [] then // macroname is the name of a defined function
diff --git a/scilab/modules/core/src/fortran/typ2cod.f b/scilab/modules/core/src/fortran/typ2cod.f
index d7b00d5..415873f 100644
--- a/scilab/modules/core/src/fortran/typ2cod.f
+++ b/scilab/modules/core/src/fortran/typ2cod.f
@@ -1,10 +1,10 @@
1c Scilab ( http://www.scilab.org/ ) - This file is part of Scilab 1c Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
2c Copyright (C) INRIA 2c Copyright (C) INRIA
3c 3c
4c This file must be used under the terms of the CeCILL. 4c This file must be used under the terms of the CeCILL.
5c This source file is licensed as described in the file COPYING, which 5c This source file is licensed as described in the file COPYING, which
6c you should have received as part of this distribution. The terms 6c you should have received as part of this distribution. The terms
7c are also available at 7c are also available at
8c http://www.cecill.info/licences/Licence_CeCILL_V2.1-en.txt 8c http://www.cecill.info/licences/Licence_CeCILL_V2.1-en.txt
9 9
10 subroutine typ2cod(il,name,n) 10 subroutine typ2cod(il,name,n)
@@ -20,7 +20,7 @@ c following common defines the initial database of type names
20 integer tp(maxtyp),ptr(maxtyp),ln(maxtyp),namrec(nmmax),ptmax 20 integer tp(maxtyp),ptr(maxtyp),ln(maxtyp),namrec(nmmax),ptmax
21cDEC$ IF DEFINED (FORDLL) 21cDEC$ IF DEFINED (FORDLL)
22cDEC$ ATTRIBUTES DLLIMPORT:: /typnams/ 22cDEC$ ATTRIBUTES DLLIMPORT:: /typnams/
23cDEC$ ENDIF 23cDEC$ ENDIF
24 common /typnams/ tp,ptr,ln,namrec,ptmax 24 common /typnams/ tp,ptr,ln,namrec,ptmax
25 integer name(*) 25 integer name(*)
26 integer iadr,sadr 26 integer iadr,sadr
@@ -56,7 +56,7 @@ c look for itype in dynamically added types
56 n=ln(it) 56 n=ln(it)
57 call icopy(n,namrec(ptr(it)),1,name,1) 57 call icopy(n,namrec(ptr(it)),1,name,1)
58 endif 58 endif
59c 59c
60 return 60 return
61 9000 continue 61 9000 continue
62 n=0 62 n=0
@@ -74,12 +74,12 @@ c following common defines the initial database of type names
74 integer tp(maxtyp),ptr(maxtyp),ln(maxtyp),namrec(nmmax),ptmax 74 integer tp(maxtyp),ptr(maxtyp),ln(maxtyp),namrec(nmmax),ptmax
75cDEC$ IF DEFINED (FORDLL) 75cDEC$ IF DEFINED (FORDLL)
76cDEC$ ATTRIBUTES DLLIMPORT:: /typnams/ 76cDEC$ ATTRIBUTES DLLIMPORT:: /typnams/
77cDEC$ ENDIF 77cDEC$ ENDIF
78 common /typnams/ tp,ptr,ln,namrec,ptmax 78 common /typnams/ tp,ptr,ln,namrec,ptmax
79 character*15 nam1 79 character*15 nam1
80c 80c
81 ierr=0 81 ierr=0
82c 82c
83 n=len(nam) 83 n=len(nam)
84 if(n.gt.0) then 84 if(n.gt.0) then
85c add a type 85c add a type
@@ -115,7 +115,7 @@ c . check if new type is the same as old type
115 call cvstr(n,namrec(ptmax),nam,0) 115 call cvstr(n,namrec(ptmax),nam,0)
116 ptmax=ptmax+n 116 ptmax=ptmax+n
117 else 117 else
118c supress a type 118c suppress a type
119 if(typ.le.20) then 119 if(typ.le.20) then
120 pos=typ 120 pos=typ
121 if(ln(pos).eq.0) return 121 if(ln(pos).eq.0) return
diff --git a/scilab/modules/data_structures/help/en_US/struct.xml b/scilab/modules/data_structures/help/en_US/struct.xml
index 4104ee0..682b9eb 100644
--- a/scilab/modules/data_structures/help/en_US/struct.xml
+++ b/scilab/modules/data_structures/help/en_US/struct.xml
@@ -42,27 +42,40 @@
42 <title>Description</title> 42 <title>Description</title>
43 <para> 43 <para>
44 This function returns a struct with the fields names 44 This function returns a struct with the fields names
45 <varname>fields1</varname>, <varname>field2</varname>, ..., and the fields values 45 <varname>field1</varname>, <varname>field2</varname>, ..., and the fields values
46 corresponding <varname>value1</varname>, <varname>value2</varname>, ... 46 corresponding <varname>value1</varname>, <varname>value2</varname>, ...
47 </para> 47 </para>
48 <para>
49 Note that <literal>type(st)</literal> returns <literal>17</literal>, and <literal>typeof(st)</literal> returns <literal>st</literal>.
50 </para>
48 </refsection> 51 </refsection>
49 <refsection> 52 <refsection>
50 <title>Examples</title> 53 <title>Examples</title>
51 <programlisting role="example"><![CDATA[ 54 <programlisting role="example"><![CDATA[
52//create a struct date 55//create a struct date
53date_st=struct('day',25,'month' ,'DEC','year',2006) 56date_st=struct('day',25,'month' ,'DEC','year',2006)
54
55//change the month 57//change the month
56date_st.month='AUG'; 58date_st.month='AUG';
57
58//change the year 59//change the year
59date_st.year=1973; 60date_st.year=1973;
60
61//change the day 61//change the day
62date_st.day=19; 62date_st.day=19;
63
64//add a new field 63//add a new field
65date_st.semaine=32 64date_st.semaine=32
65
66//create a structure test
67test=struct('list1',list('testlist',1,2), 'matrix1', [1 2 3; 4 5 6], 'boolean1', %t);
68//add a polynom
69s=poly(0,'s')
70test.pol1=s;
71//add a state-space
72A=[0,1;0,0]; B=[1;1];C=[1,1];
73test.ss1=syslin('c',A,B,C);
74//Show the list
75test.list1
76getfield(3,test)
77//Show the type
78type(test)
66 ]]></programlisting> 79 ]]></programlisting>
67 </refsection> 80 </refsection>
68 <refsection role="see also"> 81 <refsection role="see also">
@@ -71,6 +84,18 @@ date_st.semaine=32
71 <member> 84 <member>
72 <link linkend="cell">cell</link> 85 <link linkend="cell">cell</link>
73 </member> 86 </member>
87 <member>
88 <link linkend="mlist">mlist</link>
89 </member>
90 <member>
91 <link linkend="tlist">tlist</link>
92 </member>
93 <member>
94 <link linkend="getfield">getfield</link>
95 </member>
96 <member>
97 <link linkend="setfield">setfield</link>
98 </member>
74 </simplelist> 99 </simplelist>
75 </refsection> 100 </refsection>
76</refentry> 101</refentry>
diff --git a/scilab/modules/data_structures/help/fr_FR/struct.xml b/scilab/modules/data_structures/help/fr_FR/struct.xml
index 5f0f02d..fedbf16 100644
--- a/scilab/modules/data_structures/help/fr_FR/struct.xml
+++ b/scilab/modules/data_structures/help/fr_FR/struct.xml
@@ -30,11 +30,14 @@
30 <refsection> 30 <refsection>
31 <title>Description</title> 31 <title>Description</title>
32 <para> 32 <para>
33 La fonction <literal>struc</literal>t retourne une struct avec des noms de 33 La fonction <function>struct</function> retourne une struct avec des noms de
34 champs <literal>field1</literal>, <literal>field2</literal>, .., et dont les valeurs 34 champs <varname>field1</varname>, <varname>field2</varname>, .., et dont les valeurs
35 respectives sont <literal>value</literal><literal>1</literal>, <literal>value2</literal>, 35 respectives sont <varname>value1</varname>, <varname>value2</varname>,
36 ... 36 ...
37 </para> 37 </para>
38 <para>
39 Notez que <literal>type(st)</literal> retourne <literal>17</literal> et que <literal>typeof(st)</literal> retourne <literal>st</literal>.
40 </para>
38 </refsection> 41 </refsection>
39 <refsection> 42 <refsection>
40 <title>Exemples</title> 43 <title>Exemples</title>
@@ -49,6 +52,20 @@ date_st.annee=1973;
49 52
50// ajouter un champ 'semaine' 53// ajouter un champ 'semaine'
51date_st.semaine=32 54date_st.semaine=32
55
56//creation d'une structure test
57test=struct('list1',list('testlist',1,2), 'matrix1', [1 2 3; 4 5 6], 'boolean1', %t);
58//ajout d'un polynôme
59s=poly(0,'s')
60test.pol1=s;
61//ajout d'un système linéaire (représentation d'état)
62A=[0,1;0,0]; B=[1;1];C=[1,1];
63test.ss1=syslin('c',A,B,C);
64//Affichage de la liste
65test.list1
66getfield(3,test)
67//Affichage du type
68type(test)
52 ]]></programlisting> 69 ]]></programlisting>
53 </refsection> 70 </refsection>
54 <refsection role="see also"> 71 <refsection role="see also">
@@ -57,6 +74,18 @@ date_st.semaine=32
57 <member> 74 <member>
58 <link linkend="cell">cell</link> 75 <link linkend="cell">cell</link>
59 </member> 76 </member>
77 <member>
78 <link linkend="mlist">mlist</link>
79 </member>
80 <member>
81 <link linkend="tlist">tlist</link>
82 </member>
83 <member>
84 <link linkend="getfield">getfield</link>
85 </member>
86 <member>
87 <link linkend="setfield">setfield</link>
88 </member>
60 </simplelist> 89 </simplelist>
61 </refsection> 90 </refsection>
62</refentry> 91</refentry>
diff --git a/scilab/modules/differential_equations/demos/flow/blackhole_interface.sci b/scilab/modules/differential_equations/demos/flow/blackhole_interface.sci
index 351d829..9656600 100644
--- a/scilab/modules/differential_equations/demos/flow/blackhole_interface.sci
+++ b/scilab/modules/differential_equations/demos/flow/blackhole_interface.sci
@@ -39,32 +39,32 @@ function exeblackhole()
39 39
40 //Simulation parameters 40 //Simulation parameters
41 speed = tlist(["sim_param", "name", "unit", "range", "default", "tag"], ... 41 speed = tlist(["sim_param", "name", "unit", "range", "default", "tag"], ...
42 "speed", ... 42 "speed", ...
43 "m/s", ... 43 "m/s", ...
44 [0 100], ... 44 [0 100], ...
45 1, ... 45 1, ...
46 "speed"); 46 "speed");
47 47
48 direction = tlist(["sim_param", "name", "unit", "range", "default", "tag"], ... 48 direction = tlist(["sim_param", "name", "unit", "range", "default", "tag"], ...
49 "direction", ... 49 "direction", ...
50 "deg", ... 50 "deg", ...
51 [0 100], ... 51 [0 100], ...
52 50, ... 52 50, ...
53 "dir"); 53 "dir");
54 54
55 r = tlist(["sim_param", "name", "unit", "range", "default", "tag"], ... 55 r = tlist(["sim_param", "name", "unit", "range", "default", "tag"], ...
56 "r", ... 56 "r", ...
57 "m", ... 57 "m", ...
58 [4 100], ... 58 [4 100], ...
59 1, ... 59 1, ...
60 "r"); 60 "r");
61 61
62 theta = tlist(["sim_param", "name", "unit", "range", "default", "tag"], ... 62 theta = tlist(["sim_param", "name", "unit", "range", "default", "tag"], ...
63 "theta", ... 63 "theta", ...
64 "deg", ... 64 "deg", ...
65 [0 100], ... 65 [0 100], ...
66 1, ... 66 1, ...
67 "theta"); 67 "theta");
68 68
69 //Create the controls in the window bottom 69 //Create the controls in the window bottom
70 param_list = list(r, theta, speed, direction); 70 param_list = list(r, theta, speed, direction);
@@ -192,24 +192,24 @@ function blackhole_create_gui()
192 gen_c = createConstraints("border", "bottom", [600 200]); 192 gen_c = createConstraints("border", "bottom", [600 200]);
193 193
194 //Create the layout options for the frame containing position and speed frames 194 //Create the layout options for the frame containing position and speed frames
195 //1by2 grid with 20 pixel horizontal space for minimum paddding 195 //1by2 grid with 20 pixel horizontal space for minimum padding
196 posspeed_lay_opt = createLayoutOptions("grid", [1 2], [20 0]); 196 posspeed_lay_opt = createLayoutOptions("grid", [1 2], [20 0]);
197 197
198 198
199 gui_frame = uicontrol(my_figure_handle, ... 199 gui_frame = uicontrol(my_figure_handle, ...
200 "style", "frame", ... 200 "style", "frame", ...
201 "backgroundcolor", [1 1 1], ... 201 "backgroundcolor", [1 1 1], ...
202 "layout", "border", ... 202 "layout", "border", ...
203 "constraint", gen_c); 203 "constraint", gen_c);
204 204
205 //Frame containing position and speed 205 //Frame containing position and speed
206 gen_c.position = "center"; 206 gen_c.position = "center";
207 frame_posspeed = uicontrol(gui_frame, ... 207 frame_posspeed = uicontrol(gui_frame, ...
208 "style", "frame", ... 208 "style", "frame", ...
209 "backgroundcolor", [1 1 1], ... 209 "backgroundcolor", [1 1 1], ...
210 "layout", "grid", ... 210 "layout", "grid", ...
211 "layout_options", posspeed_lay_opt, ... 211 "layout_options", posspeed_lay_opt, ...
212 "constraint", gen_c); 212 "constraint", gen_c);
213 213
214 //Borders and title around position or speed 214 //Borders and title around position or speed
215 b_f_posspeed = createBorderFont("", 16); 215 b_f_posspeed = createBorderFont("", 16);
@@ -225,28 +225,28 @@ function blackhole_create_gui()
225 //vertical grid: speed_frame | 10 | direction_frame 225 //vertical grid: speed_frame | 10 | direction_frame
226 b_posspeed.title = "initial speed"; 226 b_posspeed.title = "initial speed";
227 frame_initspeed = uicontrol(frame_posspeed, ... 227 frame_initspeed = uicontrol(frame_posspeed, ...
228 "style", "frame", ... 228 "style", "frame", ...
229 "backgroundcolor", [1 1 1], ... 229 "backgroundcolor", [1 1 1], ...
230 "layout", "gridbag", ... 230 "layout", "gridbag", ...
231 "border", b_posspeed); 231 "border", b_posspeed);
232 232
233 //speed and direction in initspeed 233 //speed and direction in initspeed
234 c = createConstraints("gridbag", [1 1 1 1], [1 1], "horizontal", "center", [0 0], [0 20]); 234 c = createConstraints("gridbag", [1 1 1 1], [1 1], "horizontal", "center", [0 0], [0 20]);
235 235
236 speed_frame = uicontrol(frame_initspeed, ... 236 speed_frame = uicontrol(frame_initspeed, ...
237 "style", "frame", ... 237 "style", "frame", ...
238 "backgroundcolor", [1 1 1], ... 238 "backgroundcolor", [1 1 1], ...
239 "layout", "gridbag", ... 239 "layout", "gridbag", ...
240 "constraints", c); 240 "constraints", c);
241 241
242 createSliderFrame(speed_frame, "speed", "speed", "(m/s)"); 242 createSliderFrame(speed_frame, "speed", "speed", "(m/s)");
243 243
244 c.grid = [1 2 1 1] 244 c.grid = [1 2 1 1]
245 direction_frame = uicontrol(frame_initspeed, ... 245 direction_frame = uicontrol(frame_initspeed, ...
246 "style", "frame", ... 246 "style", "frame", ...
247 "backgroundcolor", [1 1 1], ... 247 "backgroundcolor", [1 1 1], ...
248 "layout", "gridbag", ... 248 "layout", "gridbag", ...
249 "constraints", c); 249 "constraints", c);
250 250
251 createSliderFrame(direction_frame, "dir", "dir", "(deg)"); 251 createSliderFrame(direction_frame, "dir", "dir", "(deg)");
252 //Frame initpositiono 252 //Frame initpositiono
@@ -254,38 +254,38 @@ function blackhole_create_gui()
254 //vertical grid: r_frame | 10 | theta_frame 254 //vertical grid: r_frame | 10 | theta_frame
255 b_posspeed.title = "initial position"; 255 b_posspeed.title = "initial position";
256 frame_initposition = uicontrol(frame_posspeed, ... 256 frame_initposition = uicontrol(frame_posspeed, ...
257 "style", "frame", ... 257 "style", "frame", ...
258 "backgroundcolor", [1 1 1], ... 258 "backgroundcolor", [1 1 1], ...
259 "layout", "gridbag", ... 259 "layout", "gridbag", ...
260 "border", b_posspeed); 260 "border", b_posspeed);
261 261
262 c.grid = [1 1 1 1] 262 c.grid = [1 1 1 1]
263 r_frame = uicontrol(frame_initposition, ... 263 r_frame = uicontrol(frame_initposition, ...
264 "style", "frame", ... 264 "style", "frame", ...
265 "backgroundcolor", [1 1 1], ... 265 "backgroundcolor", [1 1 1], ...
266 "layout", "gridbag", ... 266 "layout", "gridbag", ...
267 "constraints", c); 267 "constraints", c);
268 268
269 createSliderFrame(r_frame, "r", "r", "(m)"); 269 createSliderFrame(r_frame, "r", "r", "(m)");
270 270
271 c.grid = [1 2 1 1] 271 c.grid = [1 2 1 1]
272 theta_frame = uicontrol(frame_initposition, ... 272 theta_frame = uicontrol(frame_initposition, ...
273 "style", "frame", ... 273 "style", "frame", ...
274 "backgroundcolor", [1 1 1], ... 274 "backgroundcolor", [1 1 1], ...
275 "layout", "gridbag", ... 275 "layout", "gridbag", ...
276 "constraints", c); 276 "constraints", c);
277 277
278 createSliderFrame(theta_frame, "theta", "theta", "(deg)"); 278 createSliderFrame(theta_frame, "theta", "theta", "(deg)");
279 279
280 //Button frame 280 //Button frame
281 //esthetic | button 1 | est | button2 | est | button 3 | est 281 //esthetic | button 1 | est | button2 | est | button 3 | est
282 gen_c.position = "bottom" 282 gen_c.position = "bottom"
283 gen_c.preferredsize = [0 30]; 283 gen_c.preferredsize = [0 30];
284 button_frame = uicontrol(gui_frame, ... 284 button_frame = uicontrol(gui_frame, ...
285 "style", "frame", ... 285 "style", "frame", ...
286 "backgroundcolor", [1 1 1], ... 286 "backgroundcolor", [1 1 1], ...
287 "layout", "gridbag", ... 287 "layout", "gridbag", ...
288 "constraints", gen_c); 288 "constraints", gen_c);
289 289
290 // Buttons 290 // Buttons
291 // est | buttons | est 291 // est | buttons | est
@@ -299,69 +299,69 @@ function blackhole_create_gui()
299 299
300 //Esthetic Empty panel 300 //Esthetic Empty panel
301 est_panel = uicontrol(button_frame, ... 301 est_panel = uicontrol(button_frame, ...
302 "style", "frame", ... 302 "style", "frame", ...
303 "backgroundcolor", [1 1 1], ... 303 "backgroundcolor", [1 1 1], ...
304 "constraints", c_button); 304 "constraints", c_button);
305 305
306 //Buttons 306 //Buttons
307 buttonBorder = createBorder("line", "darkgrey", 3); 307 buttonBorder = createBorder("line", "darkgrey", 3);
308 c_button = createConstraints("gridbag", [2 1 1 1], [0 0], "both", "left", [0 0]) 308 c_button = createConstraints("gridbag", [2 1 1 1], [0 0], "both", "left", [0 0])
309 //Button Start 309 //Button Start
310 c_button.anchor = "left" 310 c_button.anchor = "left"
311 start_button = uicontrol(button_frame, ... 311 start_button = uicontrol(button_frame, ...
312 "Style", "pushbutton", ... 312 "Style", "pushbutton", ...
313 "String", "Start", ... 313 "String", "Start", ...
314 "Fontsize", 14, ... 314 "Fontsize", 14, ...
315 "BackgroundColor", [0.9 0.9 0.9], ... 315 "BackgroundColor", [0.9 0.9 0.9], ...
316 "callback", "start_simu()", ... 316 "callback", "start_simu()", ...
317 "border", buttonBorder, ... 317 "border", buttonBorder, ...
318 "tag", "start_button", ... 318 "tag", "start_button", ...
319 "constraints", c_button); 319 "constraints", c_button);
320 320
321 //Empty panel 321 //Empty panel
322 c_button = createConstraints("gridbag", [3 1 1 1], [0 0], "none", "center", [0 0], [20 0]) 322 c_button = createConstraints("gridbag", [3 1 1 1], [0 0], "none", "center", [0 0], [20 0])
323 est_panel = uicontrol(button_frame, ... 323 est_panel = uicontrol(button_frame, ...
324 "style", "frame", ... 324 "style", "frame", ...
325 "backgroundcolor", [1 1 1], ... 325 "backgroundcolor", [1 1 1], ...
326 "constraints", c_button); 326 "constraints", c_button);
327 327
328 //Button Stop 328 //Button Stop
329 c_button = createConstraints("gridbag", [4 1 1 1], [0 0], "both", "center", [0 0]) 329 c_button = createConstraints("gridbag", [4 1 1 1], [0 0], "both", "center", [0 0])
330 stop_button = uicontrol(button_frame, ... 330 stop_button = uicontrol(button_frame, ...
331 "Style", "pushbutton", ... 331 "Style", "pushbutton", ...
332 "String", "Stop", ... 332 "String", "Stop", ...
333 "Fontsize", 14, ... 333 "Fontsize", 14, ...
334 "BackgroundColor", [0.9 0.9 0.9], ... 334 "BackgroundColor", [0.9 0.9 0.9], ...
335 "border", buttonBorder, ... 335 "border", buttonBorder, ...
336 "callback", "stop_simu", ... 336 "callback", "stop_simu", ...
337 "tag", "stop_button", ... 337 "tag", "stop_button", ...
338 "constraints", c_button); 338 "constraints", c_button);
339 339
340 //Empty panel 340 //Empty panel
341 c_button = createConstraints("gridbag", [5 1 1 1], [0 0], "none", "center", [0 0], [20 0]) 341 c_button = createConstraints("gridbag", [5 1 1 1], [0 0], "none", "center", [0 0], [20 0])
342 est_panel = uicontrol(button_frame, ... 342 est_panel = uicontrol(button_frame, ...
343 "style", "frame", ... 343 "style", "frame", ...
344 "backgroundcolor", [1 1 1], ... 344 "backgroundcolor", [1 1 1], ...
345 "constraints", c_button); 345 "constraints", c_button);
346 346
347 //Button Clear 347 //Button Clear
348 c_button = createConstraints("gridbag", [6 1 1 1], [0 0], "both", "center", [0 0]) 348 c_button = createConstraints("gridbag", [6 1 1 1], [0 0], "both", "center", [0 0])
349 clear_button = uicontrol(button_frame, ... 349 clear_button = uicontrol(button_frame, ...
350 "Style", "pushbutton", ... 350 "Style", "pushbutton", ...
351 "String", "Clear", ... 351 "String", "Clear", ...
352 "Fontsize", 14, ... 352 "Fontsize", 14, ...
353 "BackgroundColor", [0.9 0.9 0.9], ... 353 "BackgroundColor", [0.9 0.9 0.9], ...
354 "callback", "clear_simu", ... 354 "callback", "clear_simu", ...
355 "border", buttonBorder, ... 355 "border", buttonBorder, ...
356 "tag", "clear_button", ... 356 "tag", "clear_button", ...
357 "constraints", c_button); 357 "constraints", c_button);
358 358
359 //Empty panel 359 //Empty panel
360 c_button = createConstraints("gridbag", [7 1 1 1], [0 0], "none", "right", [100 0]); 360 c_button = createConstraints("gridbag", [7 1 1 1], [0 0], "none", "right", [100 0]);
361 est_panel = uicontrol(button_frame, ... 361 est_panel = uicontrol(button_frame, ...
362 "style", "frame", ... 362 "style", "frame", ...
363 "backgroundcolor", [1 1 1], ... 363 "backgroundcolor", [1 1 1], ...
364 "constraints", c_button); 364 "constraints", c_button);
365 365
366 return 366 return
367endfunction 367endfunction
@@ -385,9 +385,9 @@ function change_r(r)
385 r=slider_r.Value 385 r=slider_r.Value
386 r=0.007+r*(2-0.08)/100 386 r=0.007+r*(2-0.08)/100
387 end 387 end
388 value_r.String=msprintf("%.3f", r) 388 value_r.String=msprintf("%.3f", r)
389 draw_initial_point(0.007+slider_r.Value*(2-0.08)/100, slider_theta.value*360/100, ... 389 draw_initial_point(0.007+slider_r.Value*(2-0.08)/100, slider_theta.value*360/100, ...
390 slider_speed.Value*3/100, slider_dir.value*360/100, %F); 390 slider_speed.Value*3/100, slider_dir.value*360/100, %F);
391endfunction 391endfunction
392 392
393 393
@@ -407,9 +407,9 @@ function change_theta(theta)
407 theta=slider_theta.Value 407 theta=slider_theta.Value
408 theta=theta*360/100 408 theta=theta*360/100
409 end 409 end
410 value_theta.String=msprintf("%.0f", theta) 410 value_theta.String=msprintf("%.0f", theta)
411 draw_initial_point(0.007+slider_r.Value*(2-0.08)/100, slider_theta.value*360/100, .. 411 draw_initial_point(0.007+slider_r.Value*(2-0.08)/100, slider_theta.value*360/100, ..
412 slider_speed.Value*3/100, slider_dir.value*360/100, %F); 412 slider_speed.Value*3/100, slider_dir.value*360/100, %F);
413endfunction 413endfunction
414 414
415function change_speed(speed) 415function change_speed(speed)
@@ -450,7 +450,7 @@ function change_dir(dir)
450 450
451 value_dir.String = msprintf("%.0f", dir) 451 value_dir.String = msprintf("%.0f", dir)
452 draw_initial_point(0.007 + slider_r.Value * (2 - 0.08) / 100, slider_theta.value * 360 / 100, ... 452 draw_initial_point(0.007 + slider_r.Value * (2 - 0.08) / 100, slider_theta.value * 360 / 100, ...
453 slider_speed.Value * 3 / 100, slider_dir.value * 360 / 100, %F); 453 slider_speed.Value * 3 / 100, slider_dir.value * 360 / 100, %F);
454endfunction 454endfunction
455 455
456function start_simu() 456function start_simu()
@@ -464,7 +464,7 @@ function start_simu()
464 slider_dir = get("slider_dir"); 464 slider_dir = get("slider_dir");
465 t = 0:0.02:15; 465 t = 0:0.02:15;
466 Y = calculate_traj(0.007 + slider_r.Value * (2 - 0.08) / 100, slider_theta.value * 360 / 100, ... 466 Y = calculate_traj(0.007 + slider_r.Value * (2 - 0.08) / 100, slider_theta.value * 360 / 100, ...
467 slider_speed.Value * 3 / 100, slider_dir.value * 360 / 100, t) 467 slider_speed.Value * 3 / 100, slider_dir.value * 360 / 100, t)
468 x = Y(1, :) 468 x = Y(1, :)
469 y = Y(3, :) 469 y = Y(3, :)
470 r = 0.1; //bias to have the curve above the surface 470 r = 0.1; //bias to have the curve above the surface
diff --git a/scilab/modules/dynamic_link/macros/windows/dlwGenerateMakefile.sci b/scilab/modules/dynamic_link/macros/windows/dlwGenerateMakefile.sci
index 05263b0..cfa2c70 100644
--- a/scilab/modules/dynamic_link/macros/windows/dlwGenerateMakefile.sci
+++ b/scilab/modules/dynamic_link/macros/windows/dlwGenerateMakefile.sci
@@ -162,7 +162,11 @@ function ilib_gen_Make_win32(name, ..
162 MEXCFLAGS = "-Dmexfunction_=mex" + table(i,2) + "_ -DmexFunction=mex_" + table(i,2); 162 MEXCFLAGS = "-Dmexfunction_=mex" + table(i,2) + "_ -DmexFunction=mex_" + table(i,2);
163 MEXFFLAGS = "-Dmexfunction=mex" + table(i,2); 163 MEXFFLAGS = "-Dmexfunction=mex" + table(i,2);
164 if table(i,3)=="cmex" then 164 if table(i,3)=="cmex" then
165 filenameMex = table(i,2) + ".c"; 165 if find(listfiles() == table(i,2)+".cpp") then
166 filenameMex = table(i,2) + ".cpp";
167 else
168 filenameMex = table(i,2) + ".c";
169 end
166 else 170 else
167 filenameMex = table(i,2) + ".f"; 171 filenameMex = table(i,2) + ".f";
168 end 172 end
diff --git a/scilab/modules/elementary_functions/src/c/qsort.c b/scilab/modules/elementary_functions/src/c/qsort.c
index 1a6d4e8..cd912cb 100644
--- a/scilab/modules/elementary_functions/src/c/qsort.c
+++ b/scilab/modules/elementary_functions/src/c/qsort.c
@@ -65,10 +65,9 @@ void sciqsort(char *a, char *tab, int flag, int n, int es, int es1, int (*cmp)()
65{ 65{
66 char *pa, *pb, *pc, *pd, *pl, *pm, *pn; 66 char *pa, *pb, *pc, *pd, *pl, *pm, *pn;
67 char *taba, *tabb, *tabc, *tabd, *tabl, *tabm, *tabn; 67 char *taba, *tabb, *tabc, *tabd, *tabl, *tabm, *tabn;
68 int d, dind, r, r1, swap_cnt; 68 int d, dind, r, r1;
69 69
70loop: 70loop:
71 swap_cnt = 0;
72 if (n < 7) /* Insertion sort on smallest arrays */ 71 if (n < 7) /* Insertion sort on smallest arrays */
73 { 72 {
74 for (pm = a + es, tabm = tab + es1 ; pm < (char *) a + n * es; pm += es, tabm += es1 ) 73 for (pm = a + es, tabm = tab + es1 ; pm < (char *) a + n * es; pm += es, tabm += es1 )
@@ -134,7 +133,6 @@ loop:
134 if (r == 0) /*The pivot and value pointed to by pb are equal */ 133 if (r == 0) /*The pivot and value pointed to by pb are equal */
135 { 134 {
136 /* store the equal value at the location pa and increase pa */ 135 /* store the equal value at the location pa and increase pa */
137 swap_cnt = 1;
138 swapind(taba, tabb); 136 swapind(taba, tabb);
139 taba += es1; 137 taba += es1;
140 swap(pa, pb); 138 swap(pa, pb);
@@ -151,7 +149,6 @@ loop:
151 if (r == 0) /*The pivot and value pointed to by pc are equal */ 149 if (r == 0) /*The pivot and value pointed to by pc are equal */
152 { 150 {
153 /* store the equal value at the location pd and decrease pd */ 151 /* store the equal value at the location pd and decrease pd */
154 swap_cnt = 1;
155 swapind(tabc, tabd); 152 swapind(tabc, tabd);
156 tabd -= es1; 153 tabd -= es1;
157 swap(pc, pd); 154 swap(pc, pd);
@@ -180,7 +177,6 @@ loop:
180 tabb += es1; 177 tabb += es1;
181 tabc -= es1; 178 tabc -= es1;
182 swap(pb, pc); 179 swap(pb, pc);
183 swap_cnt = 1;
184 /* increase pb and decrease pc */ 180 /* increase pb and decrease pc */
185 pb += es; 181 pb += es;
186 pc -= es; 182 pc -= es;
@@ -190,18 +186,6 @@ loop:
190 */ 186 */
191 } 187 }
192 188
193 if (swap_cnt == 0) /* Switch to insertion sort */
194 {
195 for (pm = a + es, tabm = tab + es1 ; pm < (char *) a + n * es; pm += es, tabm += es1)
196 {
197 for (pl = pm, tabl = tabm ; pl > (char *) a && cmp(pl - es, pl, tabl - es1, tabl, flag) > 0; pl -= es, tabl -= es1)
198 {
199 swapind(tabl, tabl - es1);
200 swap(pl, pl - es);
201 }
202 }
203 return;
204 }
205 /* put the equal values in the middle */ 189 /* put the equal values in the middle */
206 pn = a + n * es; 190 pn = a + n * es;
207 r = (int)Min(pa - (char *)a, pb - pa); 191 r = (int)Min(pa - (char *)a, pb - pa);
diff --git a/scilab/modules/elementary_functions/tests/nonreg_tests/bug_13358.dia.ref b/scilab/modules/elementary_functions/tests/nonreg_tests/bug_13358.dia.ref
new file mode 100644
index 0000000..e0caf20
--- /dev/null
+++ b/scilab/modules/elementary_functions/tests/nonreg_tests/bug_13358.dia.ref
@@ -0,0 +1,45 @@
1// =============================================================================
2// Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
3// Copyright (C) 2014 - Scilab Enterprises - Pierre-Aime Agnel
4//
5// This file is distributed under the same license as the Scilab package.
6// =============================================================================
7//
8// <-- Non-regression test for bug 13358-->
9//
10// <-- Bugzilla URL -->
11// http://bugzilla.scilab.org/13358
12//
13// <-- Short Description -->
14// intersect and unique are slower due to gsort behaving in o(n^2) on sorted arrays
15//
16// <-- CLI SHELL MODE -->
17err = 0.15
18 err =
19
20 0.15
21seed = getdate("s");
22rand("seed", seed);
23nb_test = 5;
24A = 1:1E5;
25B = 2:2:2E5;
26delta_i = [];
27delta_u = [];
28delta_s = [];
29// Checks relative time between sort on a random table and a sorted one is within 15%
30for i = 1:nb_test
31 A_rand = rand(1, 1E5);
32 B_rand = rand(1, 1E5);
33 tic(); intersect(A, B); t_elapsed_sorted = toc();
34 tic(); intersect(A_rand, B_rand); t_elapsed_rand = toc();
35 delta_i = [delta_i, abs(t_elapsed_rand - t_elapsed_sorted) / (t_elapsed_rand + t_elapsed_sorted)];
36 tic(); unique(A); t_elapsed_sorted = toc();
37 tic(); unique(A_rand); t_elapsed_rand = toc();
38 delta_u = [delta_u, abs(t_elapsed_rand - t_elapsed_sorted) / (t_elapsed_rand + t_elapsed_sorted)];
39 tic(); gsort(1:1E6); t_elapsed_sorted = toc();
40 tic(); gsort(rand(1,1E6)); t_elapsed_rand = toc();
41 delta_s = [delta_s, abs(t_elapsed_rand - t_elapsed_sorted) / (t_elapsed_rand + t_elapsed_sorted)];
42end
43assert_checktrue(mean(delta_i) <= err);
44assert_checktrue(mean(delta_u) <= err);
45assert_checktrue(mean(delta_s) <= err);
diff --git a/scilab/modules/elementary_functions/tests/nonreg_tests/bug_13358.tst b/scilab/modules/elementary_functions/tests/nonreg_tests/bug_13358.tst
new file mode 100644
index 0000000..287fbbc
--- /dev/null
+++ b/scilab/modules/elementary_functions/tests/nonreg_tests/bug_13358.tst
@@ -0,0 +1,48 @@
1// =============================================================================
2// Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
3// Copyright (C) 2014 - Scilab Enterprises - Pierre-Aime Agnel
4//
5// This file is distributed under the same license as the Scilab package.
6// =============================================================================
7//
8// <-- Non-regression test for bug 13358-->
9//
10// <-- Bugzilla URL -->
11// http://bugzilla.scilab.org/13358
12//
13// <-- Short Description -->
14// intersect and unique are slower due to gsort behaving in o(n^2) on sorted arrays
15//
16
17// <-- CLI SHELL MODE -->
18
19err = 0.15
20seed = getdate("s");
21rand("seed", seed);
22nb_test = 5;
23A = 1:1E5;
24B = 2:2:2E5;
25delta_i = [];
26delta_u = [];
27delta_s = [];
28
29// Checks relative time between sort on a random table and a sorted one is within 15%
30for i = 1:nb_test
31 A_rand = rand(1, 1E5);
32 B_rand = rand(1, 1E5);
33 tic(); intersect(A, B); t_elapsed_sorted = toc();
34 tic(); intersect(A_rand, B_rand); t_elapsed_rand = toc();
35 delta_i = [delta_i, abs(t_elapsed_rand - t_elapsed_sorted) / (t_elapsed_rand + t_elapsed_sorted)];
36
37 tic(); unique(A); t_elapsed_sorted = toc();
38 tic(); unique(A_rand); t_elapsed_rand = toc();
39 delta_u = [delta_u, abs(t_elapsed_rand - t_elapsed_sorted) / (t_elapsed_rand + t_elapsed_sorted)];
40
41 tic(); gsort(1:1E6); t_elapsed_sorted = toc();
42 tic(); gsort(rand(1,1E6)); t_elapsed_rand = toc();
43 delta_s = [delta_s, abs(t_elapsed_rand - t_elapsed_sorted) / (t_elapsed_rand + t_elapsed_sorted)];
44end
45
46assert_checktrue(mean(delta_i) <= err);
47assert_checktrue(mean(delta_u) <= err);
48assert_checktrue(mean(delta_s) <= err);
diff --git a/scilab/modules/fileio/tests/nonreg_tests/bug_13119.dia.ref b/scilab/modules/fileio/tests/nonreg_tests/bug_13119.dia.ref
index 08191c5..df80a9f 100644
--- a/scilab/modules/fileio/tests/nonreg_tests/bug_13119.dia.ref
+++ b/scilab/modules/fileio/tests/nonreg_tests/bug_13119.dia.ref
@@ -16,7 +16,7 @@
16// mget and mgetl accepted decimal values as number of lines. 16// mget and mgetl accepted decimal values as number of lines.
17curdir = pwd(); 17curdir = pwd();
18cd(TMPDIR); 18cd(TMPDIR);
19fd = mopen("test", "wr"); // Open a file 19fd = mopen("test", "w"); // Open a file
20refMsg = msprintf(_("%s: Wrong value for input argument #%d: A positive integer value expected.\n"), "mget", 1); 20refMsg = msprintf(_("%s: Wrong value for input argument #%d: A positive integer value expected.\n"), "mget", 1);
21assert_checkerror("mget(-1, ""d"", fd)", refMsg); 21assert_checkerror("mget(-1, ""d"", fd)", refMsg);
22refMsg = msprintf(_("%s: Wrong value for input argument #%d: A positive integer value expected.\n"), "mget", 1); 22refMsg = msprintf(_("%s: Wrong value for input argument #%d: A positive integer value expected.\n"), "mget", 1);
diff --git a/scilab/modules/fileio/tests/nonreg_tests/bug_13119.tst b/scilab/modules/fileio/tests/nonreg_tests/bug_13119.tst
index 74206bc..5c96357 100644
--- a/scilab/modules/fileio/tests/nonreg_tests/bug_13119.tst
+++ b/scilab/modules/fileio/tests/nonreg_tests/bug_13119.tst
@@ -18,7 +18,7 @@
18curdir = pwd(); 18curdir = pwd();
19cd(TMPDIR); 19cd(TMPDIR);
20 20
21fd = mopen("test", "wr"); // Open a file 21fd = mopen("test", "w"); // Open a file
22 22
23refMsg = msprintf(_("%s: Wrong value for input argument #%d: A positive integer value expected.\n"), "mget", 1); 23refMsg = msprintf(_("%s: Wrong value for input argument #%d: A positive integer value expected.\n"), "mget", 1);
24assert_checkerror("mget(-1, ""d"", fd)", refMsg); 24assert_checkerror("mget(-1, ""d"", fd)", refMsg);
diff --git a/scilab/modules/graphics/demos/cmplxfunc/demo_custom.dem.sce b/scilab/modules/graphics/demos/cmplxfunc/demo_custom.dem.sce
index 1b74c69..4cbeefd 100644
--- a/scilab/modules/graphics/demos/cmplxfunc/demo_custom.dem.sce
+++ b/scilab/modules/graphics/demos/cmplxfunc/demo_custom.dem.sce
@@ -1,5 +1,6 @@
1// Scilab ( http://www.scilab.org/ ) - This file is part of Scilab 1// Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
2// Copyright (C) 2008 - DIGITEO 2// Copyright (C) 2008 - DIGITEO
3// Copyright (C) 2014 - Scilab Enterprises - Paul Bignier
3// 4//
4// This file is released under the 3-clause BSD license. See COPYING-BSD. 5// This file is released under the 3-clause BSD license. See COPYING-BSD.
5 6
@@ -7,36 +8,18 @@ funcprot(0);
7 8
8function demo_custom() 9function demo_custom()
9 10
10 global margin_x;
11 global margin_y;
12
13 global padding_x;
14 global padding_y;
15
16 global frame_w;
17 global frame_h;
18
19 global plot_w;
20 global plot_h;
21
22 // Parameters 11 // Parameters
23 // ========================================================================= 12 // =========================================================================
24 13
25 frame_w = 300; // Frame width 14 frame_w = 300; // Frame width
26 frame_h = 765; // Frame height 15 frame_h = 765; // Frame height
27 16
28 plot_w = 600; // Plot width 17 plot_w = 500; // Plot width
29 plot_h = frame_h; // Plot height 18 plot_h = frame_h; // Plot height
30 19
31 margin_x = 15; // Horizontal margin between each elements 20 margin_x = 15; // Horizontal margin between each elements
32 margin_y = 15; // Vertical margin between each elements 21 margin_y = 15; // Vertical margin between each elements
33 22
34 padding_x = 10; // Horizontal padding between each elements
35 padding_y = 10; // Vertical padding between each elements
36
37 button_w = 100; // Button width
38 button_h = 30; // Button height
39
40 defaultfont = "arial"; // Default Font 23 defaultfont = "arial"; // Default Font
41 24
42 // Figure creation 25 // Figure creation
@@ -45,64 +28,69 @@ function demo_custom()
45 axes_w = 3*margin_x + frame_w + plot_w; // axes width 28 axes_w = 3*margin_x + frame_w + plot_w; // axes width
46 axes_h = 2*margin_y + frame_h; // axes height (100 => toolbar height) 29 axes_h = 2*margin_y + frame_h; // axes height (100 => toolbar height)
47 30
48 demo_fig = figure(100001); 31 fig_handle = figure( ...
49 clf(demo_fig,"reset"); 32 "infobar_visible", "off", ...
33 "menubar", "none", ...
34 "toolbar", "none", ...
35 "default_axes", "on", ...
36 "layout", "gridbag", ...
37 "visible", "off", ...
38 "background", -2, ...
39 "figure_position", [0 0], ...
40 "axes_size", [axes_w axes_h], ...
41 "figure_name", _("Customize your complex function"));
42
43 // The plot will be in the right 2/3 of the figure
44 a = gca();
45 a.axes_bounds = [1/3 1 2/3 1];
46 a.tight_limits = "on";
47
48 c = createConstraints("gridbag", [2 1 2 1], [1 1], "vertical", "right");
49 // Create an empty panel on the right to occupy the 3/4 of the screen (figure plot)
50 empty_frame = uicontrol(fig_handle, "style", "frame","constraints", c);
51
52 c = createConstraints("gridbag", [1 1 1 5], [0.25 1], "both", "left", [0 0], [150 0]);
53 u = uicontrol(fig_handle, ...
54 "style", "frame", ...
55 "backgroundcolor", [1 1 1], ...
56 "layout", "border", ...
57 "constraints", c);
58
59 // Add top and bottom empty panels to pad the upcoming control panel
60 c = createConstraints("border", "top", [0 20]);
61 top = uicontrol(u, "style", "frame", "backgroundcolor", [1 1 1], "constraints", c);
62 c = createConstraints("border", "bottom", [0 20]);
63 bottom = uicontrol(u, "style", "frame", "backgroundcolor", [1 1 1], "constraints", c);
64
65 // Border for the control parameters frame
66 b_f_controlParams = createBorderFont("", 18);
67 b_l_controlParams = createBorder("line", "navy", 2);
68 b_controlParams = createBorder("titled", b_l_controlParams, _("Control panel"), "center", "top", b_f_controlParams, "navy");
69
70 control_frame = uicontrol(u, ...
71 "style", "frame", ...
72 "backgroundcolor", [1 1 1], ...
73 "border", b_controlParams, ...
74 "layout", "gridbag", ...
75 "tag", "control_frame");
76
50 demo_viewCode("demo_custom.dem.sce"); 77 demo_viewCode("demo_custom.dem.sce");
51 78
52 demo_fig.background = -2; 79 fig_handle.color_map = jetcolormap(128);
53 demo_fig.color_map = jetcolormap(128);
54 demo_fig.figure_position = [0 0];
55 demo_fig.axes_size = [axes_w axes_h];
56 demo_fig.figure_name = gettext("Customize your complex function");
57 80
58 // Frames creation [Control Panel] 81 // Frames creation [Control Panel]
59 // ========================================================================= 82 // =========================================================================
60 83
61 my_frame = uicontrol( ... 84 // Explanatory text
62 "parent" , demo_fig,...
63 "relief" , "groove",...
64 "style" , "frame",...
65 "units" , "pixels",...
66 "position" , [ margin_x margin_y frame_w frame_h],...
67 "fontname" , "arial",...
68 "fontunits" , "points",...
69 "fontsize" , 13,...
70 "fontweight" , "bold", ...
71 "horizontalalignment" , "center", ...
72 "background" , [1 1 1], ...
73 "tag" , "frame_control" ...
74 );
75
76 // Frame title
77 my_frame_title = uicontrol( ...
78 "parent" , demo_fig,...
79 "style" , "text",...
80 "string" , "Control Panel",...
81 "units" , "pixels",...
82 "position" , [ 30+margin_x margin_y+frame_h-10 frame_w-60 20 ],...
83 "fontname" , defaultfont,...
84 "fontunits" , "points",...
85 "fontsize" , 14,...
86 "horizontalalignment" , "center", ...
87 "background" , [1 1 1], ...
88 "tag" , "title_frame_control" ...
89 );
90
91 // explanatory text
92 // ========================================================================= 85 // =========================================================================
93 86
94 my_exptext_w = frame_w-2*padding_x
95 my_exptext_h = 350;
96 my_exptext_pos_x = padding_x+margin_x;
97 my_exptext_pos_y = (margin_y+frame_h) - 4*padding_y - my_exptext_h;
98
99 my_exptext_string = ""; 87 my_exptext_string = "";
100 88
101 my_exptext_string = my_exptext_string + "<html>"; 89 my_exptext_string = my_exptext_string + "<html>";
102 90
103 my_exptext_string = my_exptext_string + "<center>"; 91 my_exptext_string = my_exptext_string + "<center>";
104 my_exptext_string = my_exptext_string + "<img src=""file:///"+SCI+"/modules/graphics/demos/cmplxfunc/warning.png"+""">"; 92 my_exptext_string = my_exptext_string + "<img src=""file:///"+SCI+"/modules/graphics/demos/cmplxfunc/warning.png"+""">";
105 my_exptext_string = my_exptext_string + "BE CAREFUL NOTHING IS PROTECTED"; 93 my_exptext_string = my_exptext_string + "BE CAREFUL, NOTHING IS PROTECTED";
106 my_exptext_string = my_exptext_string + "</center>"; 94 my_exptext_string = my_exptext_string + "</center>";
107 95
108 my_exptext_string = my_exptext_string + "<hr><br />"; 96 my_exptext_string = my_exptext_string + "<hr><br />";
@@ -112,52 +100,68 @@ function demo_custom()
112 my_exptext_string = my_exptext_string + "<div style=''text-align:justify; margin-top:5px; width:260;''>"; 100 my_exptext_string = my_exptext_string + "<div style=''text-align:justify; margin-top:5px; width:260;''>";
113 101
114 my_exptext_string = my_exptext_string + "1. define the function by a correct "; 102 my_exptext_string = my_exptext_string + "1. define the function by a correct ";
115 my_exptext_string = my_exptext_string + "string where the complex var must "; 103 my_exptext_string = my_exptext_string + "string where the complex var must ";
116 my_exptext_string = my_exptext_string + "be z ; also as the function will "; 104 my_exptext_string = my_exptext_string + "be z. Also, as the function will ";
117 my_exptext_string = my_exptext_string + "be evaluated on a matrix don''t "; 105 my_exptext_string = my_exptext_string + "be evaluated on a matrix, don''t forget ";
118 my_exptext_string = my_exptext_string + "forget the . to operate in element "; 106 my_exptext_string = my_exptext_string + "the . to operate elementwise. Examples: ";
119 my_exptext_string = my_exptext_string + "wize meaning ; examples :";
120 107
121 my_exptext_string = my_exptext_string + "</div>"; 108 my_exptext_string = my_exptext_string + "</div>";
122 109
123 110
124 my_exptext_string = my_exptext_string + "<pre>z.^2 (z+1).*(z-1) (1)./(z+2)</pre>"; 111 my_exptext_string = my_exptext_string + "<pre> z.^2 (z+1).*(z-1) (1)./(z+2)</pre>";
125 my_exptext_string = my_exptext_string + "<pre>sqrt(z) (z+%i).*(z-%i) 1+2*z+z.^2</pre>"; 112 my_exptext_string = my_exptext_string + "<pre> sqrt(z) (z+%i).*(z-%i) 1+2*z+z.^2</pre>";
126 113
127 my_exptext_string = my_exptext_string + "<div style=''text-align:justify; margin-top:5px; width:260;''>"; 114 my_exptext_string = my_exptext_string + "<div style=''text-align:justify; margin-top:5px; width:260;''>";
128 my_exptext_string = my_exptext_string + "2. define the type of the domain string Square or Disk"; 115 my_exptext_string = my_exptext_string + "2. define the type of the domain: Square or Disk,";
129 my_exptext_string = my_exptext_string + "</div>"; 116 my_exptext_string = my_exptext_string + "</div>";
130 117
131 118
132 my_exptext_string = my_exptext_string + "<div style=''text-align:justify; margin-top:5px; width:260;''>"; 119 my_exptext_string = my_exptext_string + "<div style=''text-align:justify; margin-top:5px; width:260;''>";
133 my_exptext_string = my_exptext_string + "3. define the ""radius"" R of the domain"+ "<br />"; 120 my_exptext_string = my_exptext_string + "3. define the ""radius"" R of the domain,"+ "<br />";
134 my_exptext_string = my_exptext_string + "</div>"; 121 my_exptext_string = my_exptext_string + "</div>";
135 122
136 123
137 my_exptext_string = my_exptext_string + "<div style=''text-align:justify; margin-top:5px; width:260;''>"; 124 my_exptext_string = my_exptext_string + "<div style=''text-align:justify; margin-top:5px; width:260;''>";
138 my_exptext_string = my_exptext_string + "4. may be your function has a kind of "; 125 my_exptext_string = my_exptext_string + "4. should your function have some kind of ";
139 my_exptext_string = my_exptext_string + "discontinuity on Ox or Oy => put "; 126 my_exptext_string = my_exptext_string + "discontinuity on Ox or Oy => check ";
140 my_exptext_string = my_exptext_string + "the string Ox or Oy or No if not"; 127 my_exptext_string = my_exptext_string + "Ox or Oy. Otherwise check No.";
141 my_exptext_string = my_exptext_string + "</div>"; 128 my_exptext_string = my_exptext_string + "</div>";
142 129
143 my_exptext_string = my_exptext_string + "</html>"; 130 my_exptext_string = my_exptext_string + "</html>";
144 131
145 132
146 // Function definition : frame 133 // Explanatory text : frame
147 134
135 b_f_expTxt = createBorderFont("", 12);
136 b_l_expTxt = createBorder("line", "navy", 1);
137 b_expTxt = createBorder("titled", b_l_expTxt, _(""), "center", "top", b_f_expTxt, "navy");
138
139 // Border for the explanatory text frame
140 c = createConstraints("gridbag", [1 1 1 1], [1 1], "both", "upper");
141 my_exptext_frame = uicontrol( ...
142 "parent" , control_frame,...
143 "style" , "frame",...
144 "layout" , "gridbag", ...
145 "border" , b_expTxt, ...
146 "units" , "pixels",...
147 "background" , [1 1 1], ...
148 "constraint" , c, ...
149 "tag" , "my_exptext_frame" ...
150 );
151
152 // Explanatory text : actual text
153
154 c = createConstraints("gridbag", [1 1 1 1], [1 1], "both", "upper");
148 my_exptext_box = uicontrol( ... 155 my_exptext_box = uicontrol( ...
149 "parent" , demo_fig,... 156 "parent" , my_exptext_frame,...
150 "relief" , "groove",...
151 "style" , "text",... 157 "style" , "text",...
152 "units" , "pixels",... 158 "units" , "pixels",...
153 "string" , my_exptext_string,... 159 "string" , my_exptext_string,...
154 "position" , [ my_exptext_pos_x my_exptext_pos_y my_exptext_w my_exptext_h],... 160 "fontname" , defaultfont,...
155 "fontname" , "arial",...
156 "fontunits" , "points",... 161 "fontunits" , "points",...
157 "fontsize" , 9,... 162 "fontsize" , 9,...
158 "horizontalalignment" , "left", ...
159 "verticalalignment" , "top", ...
160 "background" , [1 1 1], ... 163 "background" , [1 1 1], ...
164 "constraint" , c, ...
161 "tag" , "my_exptext_box" ... 165 "tag" , "my_exptext_box" ...
162 ); 166 );
163 167
@@ -165,276 +169,262 @@ function demo_custom()
165 // Function definition 169 // Function definition
166 // ========================================================================= 170 // =========================================================================
167 171
168 my_fundef_frame_w = frame_w-2*padding_x
169 my_fundef_frame_h = 80;
170 my_fundef_frame_pos_x = padding_x+margin_x;
171 my_fundef_frame_pos_y = my_exptext_pos_y - 2*padding_y - my_fundef_frame_h;
172
173 // Function definition : frame 172 // Function definition : frame
174 173
174 // Border for the function definition frame
175 b_f_funDef = createBorderFont("", 12);
176 b_l_funDef = createBorder("line", "navy", 1);
177 b_funDef = createBorder("titled", b_l_funDef, _("Function definition"), "center", "top", b_f_funDef, "navy");
178
179 c = createConstraints("gridbag", [1 2 1 1], [1 1], "both", "upper");
175 my_fundef_frame = uicontrol( ... 180 my_fundef_frame = uicontrol( ...
176 "parent" , demo_fig,... 181 "parent" , control_frame,...
177 "relief" , "groove",...
178 "style" , "frame",... 182 "style" , "frame",...
183 "layout" , "gridbag", ...
184 "border" , b_funDef, ...
179 "units" , "pixels",... 185 "units" , "pixels",...
180 "position" , [ my_fundef_frame_pos_x my_fundef_frame_pos_y my_fundef_frame_w my_fundef_frame_h],... 186 "fontname" , defaultfont,...
181 "fontname" , "arial",...
182 "fontunits" , "points",... 187 "fontunits" , "points",...
183 "fontsize" , 13,... 188 "fontsize" , 13,...
184 "fontweight" , "bold", ... 189 "fontweight" , "bold", ...
185 "horizontalalignment" , "center", ...
186 "background" , [1 1 1], ... 190 "background" , [1 1 1], ...
191 "constraints" , c, ...
187 "tag" , "my_fundef_frame" ... 192 "tag" , "my_fundef_frame" ...
188 ); 193 );
189 194
190 // Function definition : Frame title 195 // Function definition : Text "f(z) = "
191 196
192 my_fundef_frame_title = uicontrol( ... 197 c = createConstraints("gridbag", [1 1 1 1], [1/12 1], "both", "upper");
193 "parent" , demo_fig,... 198 my_fundef_editbox = uicontrol( ...
194 "style" , "text",... 199 "parent" , my_fundef_frame,...
195 "string" , "Function definition",... 200 "style" , "text",...
196 "units" , "pixels",... 201 "string" , "f(z) = ", ...
197 "position" , [ 70+my_fundef_frame_pos_x my_fundef_frame_pos_y+my_fundef_frame_h-9 my_fundef_frame_w-140 18 ],... 202 "fontname" , defaultfont,...
198 "fontname" , defaultfont,... 203 "fontunits" , "points",...
199 "fontunits" , "points",... 204 "fontsize" , 11,...
200 "fontsize" , 11,... 205 "background" , [1 1 1], ...
201 "horizontalalignment" , "center", ... 206 "constraint" , c, ...
202 "background" , [1 1 1], ... 207 "tag" , "my_fundef_editbox");
203 "tag" , "my_fundef_frame_title" ...
204 );
205 208
206 // Function definition : Edit box 209 // Function definition : Edit box
207 210
211 c = createConstraints("gridbag", [2 1 1 1], [12 1], "both", "upper");
208 my_fundef_editbox = uicontrol( ... 212 my_fundef_editbox = uicontrol( ...
209 "parent" , demo_fig,... 213 "parent" , my_fundef_frame,...
210 "style" , "edit",... 214 "style" , "edit",...
211 "position" , [ my_fundef_frame_pos_x+10 my_fundef_frame_pos_y+my_fundef_frame_h-60 my_fundef_frame_w-25 30],...
212 "horizontalalignment", "left",...
213 "fontname" , defaultfont,... 215 "fontname" , defaultfont,...
214 "fontunits" , "points",... 216 "fontunits" , "points",...
215 "fontsize" , 11,... 217 "fontsize" , 11,...
216 "string" , "(1)./((z+2).*(2-z))", ... 218 "string" , "(1)./((z+2).*(2-z))", ...
217 "callback" , "update_fundef()",... 219 "callback" , "update_fundef()",...
220 "constraint" , c, ...
218 "tag" , "my_fundef_editbox"); 221 "tag" , "my_fundef_editbox");
219 222
223 // Function definition : message bar
224
225 c = createConstraints("gridbag", [1 2 2 1], [1 1], "both", "upper");
226 my_exptext_bar = uicontrol( ...
227 "parent" , my_fundef_frame,...
228 "style" , "text",...
229 "string" , " ", ...
230 "units" , "pixels",...
231 "fontname" , defaultfont,...
232 "fontunits" , "points",...
233 "fontsize" , 11,...
234 "background" , [1 1 1], ...
235 "constraint" , c, ...
236 "tag" , "my_funDef_bar" ...
237 );
220 238
221 239
222 // Domain type 240 // Domain type
223 // ========================================================================= 241 // =========================================================================
224 242
225 my_dt_frame_w = frame_w-2*padding_x
226 my_dt_frame_h = 60;
227 my_dt_frame_pos_x = padding_x+margin_x;
228 my_dt_frame_pos_y = my_fundef_frame_pos_y - 2*padding_y - my_dt_frame_h;
229
230 // Domain type : frame 243 // Domain type : frame
231 244
245 // Border for the domain type frame
246 b_f_domain = createBorderFont("", 12);
247 b_l_domain = createBorder("line", "navy", 1);
248 b_domain = createBorder("titled", b_l_domain, _("Domain type"), "center", "top", b_f_domain, "navy");
249
250 c = createConstraints("gridbag", [1 3 1 1], [1 1], "both", "upper");
232 my_dt_frame = uicontrol( ... 251 my_dt_frame = uicontrol( ...
233 "parent" , demo_fig,... 252 "parent" , control_frame,...
234 "relief" , "groove",...
235 "style" , "frame",... 253 "style" , "frame",...
254 "layout" , "gridbag", ...
255 "border" , b_domain, ...
236 "units" , "pixels",... 256 "units" , "pixels",...
237 "position" , [ my_dt_frame_pos_x my_dt_frame_pos_y my_dt_frame_w my_dt_frame_h],... 257 "fontname" , defaultfont,...
238 "fontname" , "arial",...
239 "fontunits" , "points",... 258 "fontunits" , "points",...
240 "fontsize" , 13,... 259 "fontsize" , 13,...
241 "fontweight" , "bold", ... 260 "fontweight" , "bold", ...
242 "horizontalalignment" , "center", ...
243 "background" , [1 1 1], ... 261 "background" , [1 1 1], ...
262 "constraint" , c, ...
244 "tag" , "my_dt_frame" ... 263 "tag" , "my_dt_frame" ...
245 ); 264 );
246 265
247 // Domain type : Frame title
248
249 my_dt_frame_title = uicontrol( ...
250 "parent" , demo_fig,...
251 "style" , "text",...
252 "string" , "Domain type",...
253 "units" , "pixels",...
254 "position" , [ 100+my_dt_frame_pos_x my_dt_frame_pos_y+my_dt_frame_h-9 my_dt_frame_w-200 18 ],...
255 "fontname" , defaultfont,...
256 "fontunits" , "points",...
257 "fontsize" , 9,...
258 "horizontalalignment" , "center", ...
259 "background" , [1 1 1], ...
260 "tag" , "my_dt_frame_title" ...
261 );
262
263 // Domain type : square 266 // Domain type : square
264 267
268 c = createConstraints("gridbag", [1 1 1 1], [1 1], "both", "upper");
265 square_radio = uicontrol( ... 269 square_radio = uicontrol( ...
266 "parent" , demo_fig,... 270 "parent" , my_dt_frame,...
267 "style" , "radiobutton",... 271 "style" , "radiobutton",...
268 "string" , "Square",... 272 "string" , "Square",...
269 "position" , [ my_dt_frame_pos_x+10 my_dt_frame_pos_y+my_dt_frame_h-42 ((my_dt_frame_w-25)/2) 20],...
270 "horizontalalignment", "left",...
271 "fontname" , defaultfont,... 273 "fontname" , defaultfont,...
272 "fontunits" , "points",... 274 "fontunits" , "points",...
273 "fontsize" , 10,... 275 "fontsize" , 11,...
274 "value" , 0, ... 276 "value" , 0, ...
275 "background" , [1 1 1], ... 277 "background" , [1 1 1], ...
276 "callback" , "update_domain_type();",... 278 "callback" , "update_domain_type();",...
279 "constraints" , c, ...
277 "tag" , "square_radio"); 280 "tag" , "square_radio");
278 281
279 // Domain type : Disk 282 // Domain type : Disk
280 283
284 c = createConstraints("gridbag", [2 1 1 1], [1 1], "both", "upper");
281 disk_radio = uicontrol( ... 285 disk_radio = uicontrol( ...
282 "parent" , demo_fig,... 286 "parent" , my_dt_frame,...
283 "style" , "radiobutton",... 287 "style" , "radiobutton",...
284 "string" , "Disk",... 288 "string" , "Disk",...
285 "position" , [ my_dt_frame_pos_x+(my_dt_frame_w/2) my_dt_frame_pos_y+my_dt_frame_h-42 ((my_dt_frame_w-25)/2) 20],...
286 "horizontalalignment", "left",...
287 "fontname" , defaultfont,... 289 "fontname" , defaultfont,...
288 "fontunits" , "points",... 290 "fontunits" , "points",...
289 "fontsize" , 10,... 291 "fontsize" , 11,...
290 "value" , 1, ... 292 "value" , 1, ...
291 "background" , [1 1 1], ... 293 "background" , [1 1 1], ...
292 "callback" , "update_domain_type();",... 294 "callback" , "update_domain_type();",...
295 "constraints" , c, ...
293 "tag" , "disk_radio"); 296 "tag" , "disk_radio");
294 297
298
295 // Radius of the domain 299 // Radius of the domain
296 // ========================================================================= 300 // =========================================================================
297 301
298 my_radius_frame_w = frame_w-2*padding_x 302 // Radius of the domain : frame
299 my_radius_frame_h = 80;
300 my_radius_frame_pos_x = padding_x+margin_x;
301 my_radius_frame_pos_y = my_dt_frame_pos_y - 2*padding_y - my_radius_frame_h;
302 303
303 // Function definition : frame 304 // Border for the radius frame
305 b_f_radius = createBorderFont("", 12);
306 b_l_radius = createBorder("line", "navy", 1);
307 b_radius = createBorder("titled", b_l_radius, _("Radius of the domain"), "center", "top", b_f_radius, "navy");
304 308
309 c = createConstraints("gridbag", [1 4 1 1], [1 1], "both", "upper");
305 my_radius_frame = uicontrol( ... 310 my_radius_frame = uicontrol( ...
306 "parent" , demo_fig,... 311 "parent" , control_frame,...
307 "relief" , "groove",...
308 "style" , "frame",... 312 "style" , "frame",...
313 "layout" , "gridbag", ...
314 "border" , b_radius, ...
309 "units" , "pixels",... 315 "units" , "pixels",...
310 "position" , [ my_radius_frame_pos_x my_radius_frame_pos_y my_radius_frame_w my_radius_frame_h],... 316 "fontname" , defaultfont,...
311 "fontname" , "arial",...
312 "fontunits" , "points",... 317 "fontunits" , "points",...
313 "fontsize" , 13,... 318 "fontsize" , 13,...
314 "fontweight" , "bold", ... 319 "fontweight" , "bold", ...
315 "horizontalalignment" , "center", ...
316 "background" , [1 1 1], ... 320 "background" , [1 1 1], ...
321 "constraint" , c, ...
317 "tag" , "my_radius_frame" ... 322 "tag" , "my_radius_frame" ...
318 ); 323 );
319 324
320 // Function definition : Frame title 325 // Radius of the domain : Edit box
321
322 my_radius_frame_title = uicontrol( ...
323 "parent" , demo_fig,...
324 "style" , "text",...
325 "string" , "Radius of the domain",...
326 "units" , "pixels",...
327 "position" , [ 50+my_radius_frame_pos_x my_radius_frame_pos_y+my_radius_frame_h-9 my_radius_frame_w-100 18 ],...
328 "fontname" , defaultfont,...
329 "fontunits" , "points",...
330 "fontsize" , 11,...
331 "horizontalalignment" , "center", ...
332 "background" , [1 1 1], ...
333 "tag" , "my_radius_frame_title" ...
334 );
335
336 // Function definition : Edit box
337 326
327 c = createConstraints("gridbag", [1 1 1 1], [1 1], "both", "upper");
338 my_radius_editbox = uicontrol( ... 328 my_radius_editbox = uicontrol( ...
339 "parent" , demo_fig,... 329 "parent" , my_radius_frame,...
340 "style" , "edit",... 330 "style" , "edit",...
341 "position" , [ my_radius_frame_pos_x+10 my_radius_frame_pos_y+my_radius_frame_h-60 my_radius_frame_w-25 30],...
342 "horizontalalignment", "left",...
343 "fontname" , defaultfont,... 331 "fontname" , defaultfont,...
344 "fontunits" , "points",... 332 "fontunits" , "points",...
345 "fontsize" , 11,... 333 "fontsize" , 11,...
346 "string" , "1.9", ... 334 "string" , "1.9", ...
347 "callback" , "update_radius()",... 335 "callback" , "update_radius()",...
336 "constraint" , c, ...
348 "tag" , "my_radius_editbox"); 337 "tag" , "my_radius_editbox");
349 338
339 // Radius of the domain : message bar
340
341 c = createConstraints("gridbag", [1 2 1 1], [1 1], "both", "upper");
342 my_exptext_bar = uicontrol( ...
343 "parent" , my_radius_frame,...
344 "style" , "text",...
345 "string" , " ", ...
346 "units" , "pixels",...
347 "fontname" , defaultfont,...
348 "fontunits" , "points",...
349 "fontsize" , 11,...
350 "background" , [1 1 1], ...
351 "constraint" , c, ...
352 "tag" , "my_radius_bar" ...
353 );
354
350 355
351 // Cut on axe 356 // Cut on axes
352 // ========================================================================= 357 // =========================================================================
353 358
354 my_coa_frame_w = frame_w-2*padding_x 359 // Cut on axes : frame
355 my_coa_frame_h = 60;
356 my_coa_frame_pos_x = padding_x+margin_x;
357 my_coa_frame_pos_y = my_radius_frame_pos_y - 2*padding_y - my_coa_frame_h;
358 360
359 // Cut on axe : frame 361 // Border for the cut on axes frame
362 b_f_cut = createBorderFont("", 12);
363 b_l_cut = createBorder("line", "navy", 1);
364 b_cut = createBorder("titled", b_l_cut, _("Cut on axes"), "center", "top", b_f_cut, "navy");
360 365
366 c = createConstraints("gridbag", [1 5 1 1], [1 1], "both", "upper");
361 my_coa_frame = uicontrol( ... 367 my_coa_frame = uicontrol( ...
362 "parent" , demo_fig,... 368 "parent" , control_frame,...
363 "relief" , "groove",...
364 "style" , "frame",... 369 "style" , "frame",...
370 "layout" , "gridbag", ...
371 "border" , b_cut, ...
365 "units" , "pixels",... 372 "units" , "pixels",...
366 "position" , [ my_coa_frame_pos_x my_coa_frame_pos_y my_coa_frame_w my_coa_frame_h],... 373 "fontname" , defaultfont,...
367 "fontname" , "arial",...
368 "fontunits" , "points",... 374 "fontunits" , "points",...
369 "fontsize" , 13,... 375 "fontsize" , 13,...
370 "fontweight" , "bold", ... 376 "fontweight" , "bold", ...
371 "horizontalalignment" , "center", ...
372 "background" , [1 1 1], ... 377 "background" , [1 1 1], ...
378 "constraint" , c, ...
373 "tag" , "my_coa_frame" ... 379 "tag" , "my_coa_frame" ...
374 ); 380 );
375 381
376 // Cut on axe : Frame title 382 // Cut on axes : Ox
377
378 my_coa_frame_title = uicontrol( ...
379 "parent" , demo_fig,...
380 "style" , "text",...
381 "string" , "Cut on axes",...
382 "units" , "pixels",...
383 "position" , [ 100+my_coa_frame_pos_x my_coa_frame_pos_y+my_coa_frame_h-9 my_coa_frame_w-200 18 ],...
384 "fontname" , defaultfont,...
385 "fontunits" , "points",...
386 "fontsize" , 9,...
387 "horizontalalignment" , "center", ...
388 "background" , [1 1 1], ...
389 "tag" , "my_coa_frame_title" ...
390 );
391
392 // Cut on axe : Ox
393 383
384 c = createConstraints("gridbag", [1 1 1 1], [1 1], "both", "upper");
394 ox_radio = uicontrol( ... 385 ox_radio = uicontrol( ...
395 "parent" , demo_fig,... 386 "parent" , my_coa_frame,...
396 "style" , "radiobutton",... 387 "style" , "radiobutton",...
397 "string" , "Ox",... 388 "string" , "Ox",...
398 "position" , [ my_coa_frame_pos_x+10 my_coa_frame_pos_y+my_coa_frame_h-42 (my_coa_frame_w-25)/3 20],...
399 "horizontalalignment", "left",...
400 "fontname" , defaultfont,... 389 "fontname" , defaultfont,...
401 "fontunits" , "points",... 390 "fontunits" , "points",...
402 "fontsize" , 10,... 391 "fontsize" , 11,...
403 "value" , 0, ... 392 "value" , 0, ...
404 "background" , [1 1 1], ... 393 "background" , [1 1 1], ...
405 "callback" , "update_cao();",... 394 "callback" , "update_cao();",...
395 "constraint" , c, ...
406 "tag" , "ox_radio"); 396 "tag" , "ox_radio");
407 397
408 // Cut on axe : Oy 398 // Cut on axes : Oy
409 399
400 c = createConstraints("gridbag", [2 1 1 1], [1 1], "both", "upper");
410 oy_radio = uicontrol( ... 401 oy_radio = uicontrol( ...
411 "parent" , demo_fig,... 402 "parent" , my_coa_frame,...
412 "style" , "radiobutton",... 403 "style" , "radiobutton",...
413 "string" , "Oy",... 404 "string" , "Oy",...
414 "position" , [ my_coa_frame_pos_x+(my_coa_frame_w/3) my_coa_frame_pos_y+my_coa_frame_h-42 (my_coa_frame_w-25)/3 20],...
415 "horizontalalignment", "left",...
416 "fontname" , defaultfont,... 405 "fontname" , defaultfont,...
417 "fontunits" , "points",... 406 "fontunits" , "points",...
418 "fontsize" , 10,... 407 "fontsize" , 11,...
419 "value" , 0, ... 408 "value" , 0, ...
420 "background" , [1 1 1], ... 409 "background" , [1 1 1], ...
421 "callback" , "update_cao();",... 410 "callback" , "update_cao();",...
411 "constraint" , c, ...
422 "tag" , "oy_radio"); 412 "tag" , "oy_radio");
423 413
424 // Cut on axe : No 414 // Cut on axes : No
425 415
416 c = createConstraints("gridbag", [3 1 1 1], [1 1], "both", "upper");
426 no_radio = uicontrol( ... 417 no_radio = uicontrol( ...
427 "parent" , demo_fig,... 418 "parent" , my_coa_frame,...
428 "style" , "radiobutton",... 419 "style" , "radiobutton",...
429 "string" , "No",... 420 "string" , "No",...
430 "position" , [ my_coa_frame_pos_x+(2*(my_coa_frame_w/3)) my_coa_frame_pos_y+my_coa_frame_h-42 (my_coa_frame_w-25)/3 20],...
431 "horizontalalignment", "left",...
432 "fontname" , defaultfont,... 421 "fontname" , defaultfont,...
433 "fontunits" , "points",... 422 "fontunits" , "points",...
434 "fontsize" , 10,... 423 "fontsize" , 11,...
435 "value" , 1, ... 424 "value" , 1, ...
436 "background" , [1 1 1], ... 425 "background" , [1 1 1], ...
437 "callback" , "update_cao();",... 426 "callback" , "update_cao();",...
427 "constraint" , c, ...
438 "tag" , "no_radio"); 428 "tag" , "no_radio");
439 429
440 // Default Values 430 // Default Values
@@ -447,20 +437,19 @@ function demo_custom()
447 global my_e; 437 global my_e;
448 438
449 439
450 my_fundef_val = "(1)./((z+2).*(2-z))"; 440 my_fundef_val = "(1)./((z+2).*(2-z))";
451 my_dt_val = "Disk"; 441 my_dt_val = "Disk";
452 my_radius = 1.9; 442 my_radius = 1.9;
453 my_typeCut = "No"; 443 my_typeCut = "No";
454 444
455 my_e = 0.001; 445 my_e = 0.001;
456 theta = -110; 446 theta = -110;
457 alpha = 75; 447 alpha = 75;
458 448
459 deff("Z=f(z)","Z="+my_fundef_val); 449 deff("Z=f(z)","Z="+my_fundef_val);
460 450
461 demo_fig.immediate_drawing = "off";
462 PlotCmplxFunc(my_radius,my_e,my_dt_val,my_typeCut,[40 20],"f",theta,alpha,[0;0]); 451 PlotCmplxFunc(my_radius,my_e,my_dt_val,my_typeCut,[40 20],"f",theta,alpha,[0;0]);
463 demo_fig.immediate_drawing = "on"; 452 fig_handle.visible = "on";
464 453
465endfunction 454endfunction
466 455
@@ -472,7 +461,24 @@ function update_fundef()
472 global my_typeCut; 461 global my_typeCut;
473 global my_e; 462 global my_e;
474 463
475 my_fundef_val = get(gcbo,"string"); 464 my_fundef_val_tmp = get(gcbo,"string");
465
466 if strchr(my_fundef_val_tmp, "z") == "" then
467 updateStatusBar("my_funDef_bar", _("Function should contain ""z"""), [1 0 0]);
468 return
469 end
470
471 try // Try f(z) on a simple matrix
472 ieeeMode = ieee();
473 ieee(2);
474 execstr(strsubst(my_fundef_val_tmp, "z", "[1 2 3; 1 2 3]"));
475 ieee(ieeeMode);
476 catch
477 updateStatusBar("my_funDef_bar", _("Wrong definition of f(z)"), [1 0 0]);
478 return
479 end
480
481 my_fundef_val = my_fundef_val_tmp;
476 482
477 // Delete the old plots 483 // Delete the old plots
478 484
@@ -483,8 +489,8 @@ function update_fundef()
483 a = gca(); delete(a); 489 a = gca(); delete(a);
484 a = gca(); delete(a); 490 a = gca(); delete(a);
485 491
486 theta = -110; 492 theta = -110;
487 alpha = 75; 493 alpha = 75;
488 494
489 deff("Z=f(z)","Z="+my_fundef_val); 495 deff("Z=f(z)","Z="+my_fundef_val);
490 496
@@ -520,8 +526,8 @@ function update_domain_type()
520 a = gca(); delete(a); 526 a = gca(); delete(a);
521 a = gca(); delete(a); 527 a = gca(); delete(a);
522 528
523 theta = -110; 529 theta = -110;
524 alpha = 75; 530 alpha = 75;
525 531
526 deff("Z=f(z)","Z="+my_fundef_val); 532 deff("Z=f(z)","Z="+my_fundef_val);
527 533
@@ -549,7 +555,19 @@ function update_radius()
549 global my_typeCut; 555 global my_typeCut;
550 global my_e; 556 global my_e;
551 557
552 my_radius = evstr(get(gcbo,"string")); 558 try
559 my_radius_tmp = evstr(get(gcbo,"string"));
560 catch
561 updateStatusBar("my_radius_bar", _("Radius should be real and finite"), [1 0 0]);
562 return
563 end
564
565 if ~isscalar(my_radius_tmp) | and(type(my_radius_tmp) <> [1 8]) | ~isreal(my_radius_tmp) | isinf(my_radius_tmp) then
566 updateStatusBar(_("Radius should be real and finite"), [1 0 0]);
567 return
568 else
569 my_radius = my_radius_tmp;
570 end
553 571
554 // Delete the old plots 572 // Delete the old plots
555 573
@@ -560,8 +578,8 @@ function update_radius()
560 a = gca(); delete(a); 578 a = gca(); delete(a);
561 a = gca(); delete(a); 579 a = gca(); delete(a);
562 580
563 theta = -110; 581 theta = -110;
564 alpha = 75; 582 alpha = 75;
565 583
566 deff("Z=f(z)","Z="+my_fundef_val); 584 deff("Z=f(z)","Z="+my_fundef_val);
567 585
@@ -598,8 +616,8 @@ function update_cao()
598 a = gca(); delete(a); 616 a = gca(); delete(a);
599 a = gca(); delete(a); 617 a = gca(); delete(a);
600 618
601 theta = -110; 619 theta = -110;
602 alpha = 75; 620 alpha = 75;
603 621
604 deff("Z=f(z)","Z="+my_fundef_val); 622 deff("Z=f(z)","Z="+my_fundef_val);
605 623
@@ -639,7 +657,7 @@ function []=PlotCmplxFunc(R,e,TypeDomain,TypeCut,n,StrFunc,theta,alpha,DomReal)
639 657
640 // computes the facets 658 // computes the facets
641 659
642 [xr,yr,zr,xi,yi,zi] = CmplxFacets(R,e,TypeDomain,TypeCut,n,StrFunc) 660 [xr,yr,zr,xi,yi,zi] = CmplxFacets(R,e,TypeDomain,TypeCut,n,StrFunc);
643 661
644 // draw 662 // draw
645 // ============================================ 663 // ============================================
@@ -656,22 +674,22 @@ function []=PlotCmplxFunc(R,e,TypeDomain,TypeCut,n,StrFunc,theta,alpha,DomReal)
656 Rs = string(R); 674 Rs = string(R);
657 675
658 if TypeDomain == "Square" then 676 if TypeDomain == "Square" then
659 end_title = " Function on [-"+Rs+","+Rs+"]x[-"+Rs+","+Rs+"]" 677 end_title = " function on [-"+Rs+","+Rs+"]x[-"+Rs+","+Rs+"]"
660 else 678 else
661 end_title = " Function on D(0,R="+Rs+")" 679 end_title = " function on D(0,R="+Rs+")"
662 end 680 end
663 681
664 if StrFunc == "f" then 682 if StrFunc == "f" then
665 the_title = "Your Custom (named f) Complex" + end_title; 683 the_title = "Your custom (named f) complex" + end_title;
666 else 684 else
667 the_title = "The Complex " + StrFunc + end_title; 685 the_title = "The complex " + StrFunc + end_title;
668 end 686 end
669 687
670 xtitle(the_title); 688 xtitle(the_title);
671 689
672 my_title_axes.title.text = the_title; 690 my_title_axes.title.text = the_title;
673 my_title_axes.title.font_size = 3; 691 my_title_axes.title.font_size = 3;
674 my_title_axes.margins = [ 0.08 0.08 0.08 0.08 ] 692 my_title_axes.margins = [ 0.15 0.08 0.08 0.08 ]
675 693
676 // plot Im(z) 694 // plot Im(z)
677 // ============================================ 695 // ============================================
@@ -680,12 +698,13 @@ function []=PlotCmplxFunc(R,e,TypeDomain,TypeCut,n,StrFunc,theta,alpha,DomReal)
680 plot3d(xi,yi,zi,theta,alpha,"Re(z)@Im(z)@",[2 6 4]); 698 plot3d(xi,yi,zi,theta,alpha,"Re(z)@Im(z)@",[2 6 4]);
681 699
682 my_IM_axes = gca(); 700 my_IM_axes = gca();
683 my_IM_axes.axes_bounds = [0.1, 0.05, 1, 0.5]; 701 my_IM_axes.axes_bounds = [0.16, 0.05, 1, 0.5];
684 my_IM_plot = my_IM_axes.children; 702 my_IM_plot = my_IM_axes.children;
685 my_IM_plot.color_flag = 1; 703 my_IM_plot.color_flag = 1;
686 704
687 xtitle("Im("+StrFunc+"(z))"); 705 xtitle("Im("+StrFunc+"(z))");
688 my_IM_axes.margins = [0.2, 0.2, 0.2, 0.2]; 706 my_IM_axes.margins = [0.2, 0.2, 0.2, 0.2];
707 my_IM_axes.cube_scaling = "on";
689 708
690 // plot Re(z) + the real restriction 709 // plot Re(z) + the real restriction
691 // ============================================ 710 // ============================================
@@ -694,13 +713,13 @@ function []=PlotCmplxFunc(R,e,TypeDomain,TypeCut,n,StrFunc,theta,alpha,DomReal)
694 plot3d(xr,yr,zr,theta,alpha,"Re(z)@Im(z)@",[2 6 4]); 713 plot3d(xr,yr,zr,theta,alpha,"Re(z)@Im(z)@",[2 6 4]);
695 714
696 my_RE_axes = gca(); 715 my_RE_axes = gca();
697 my_RE_axes.axes_bounds = [0.1, 0.5, 1, 0.5]; 716 my_RE_axes.axes_bounds = [0.16, 0.5, 1, 0.5];
698 my_RE_axes.margins = [ 0.2 0.2 0.2 0.2 ];
699 my_RE_plot = my_RE_axes.children; 717 my_RE_plot = my_RE_axes.children;
700 my_RE_plot.color_flag = 1; 718 my_RE_plot.color_flag = 1;
701 719
702 xtitle("Re("+StrFunc+"(z))"); 720 xtitle("Re("+StrFunc+"(z))");
703 my_RE_axes.margins = [ 0.2 0.2 0.2 0.2 ]; 721 my_RE_axes.margins = [0.2, 0.2, 0.2, 0.2];
722 my_RE_axes.cube_scaling = "on";
704 723
705 // real function in yellow 724 // real function in yellow
706 // ============================================ 725 // ============================================
@@ -769,6 +788,32 @@ function [xr,yr,zr,xi,yi,zi] = CmplxFacets(R,e,TypeDomain,TypeCut,n,StrFunc)
769 788
770endfunction 789endfunction
771 790
791// =============================================================================
792// updateStatusBar
793// + Update the string in the text frame
794// =============================================================================
795function updateStatusBar(tag,msg, msg_color)
796 time_active = 2; //Time the message is active in s
797
798 if argn(2) == 0 then
799 set(tag, "String", " ");
800 return
801 end
802
803 h = gcf();
804 set(tag, "Foregroundcolor", msg_color, "String", msg);
805
806 delta_time = 0;
807 timer()
808 while delta_time < time_active
809 delta_time = delta_time + timer();
810 end
811
812 if is_handle_valid(h)
813 updateStatusBar();
814 end
815endfunction
816
772funcprot(1); 817funcprot(1);
773 818
774demo_custom(); 819demo_custom();
diff --git a/scilab/modules/graphics/help/en_US/text/titlepage.xml b/scilab/modules/graphics/help/en_US/text/titlepage.xml
index 9591eca..afd2fe6 100644
--- a/scilab/modules/graphics/help/en_US/text/titlepage.xml
+++ b/scilab/modules/graphics/help/en_US/text/titlepage.xml
@@ -33,9 +33,9 @@
33 <refsection> 33 <refsection>
34 <title>Description</title> 34 <title>Description</title>
35 <para> 35 <para>
36 <literal>titlepage</literal> displays the matrix of strings <literal>str</literal> in the middle of 36 <function>titlepage</function> displays the matrix of strings <varname>str</varname> in the middle of
37 the current graphics window 37 the current graphics window
38 with a font as big as possible. 38 with a font as big as possible, depending on the current axes and its geometry.
39 </para> 39 </para>
40 </refsection> 40 </refsection>
41 41
@@ -48,6 +48,28 @@ titlepage("This is the title of the page");
48 titlepage("This is the title of the page"); 48 titlepage("This is the title of the page");
49 </scilab:image> 49 </scilab:image>
50 50
51 <programlisting role="example"><![CDATA[
52f=scf();
53a1=f.children;
54a1.margins(3)=0.61;
55a2=newaxes();
56a2.margins(4)=0.39;
57sca(a1);
58titlepage("Bottom title");
59sca(a2);
60titlepage("Top title");
61 ]]></programlisting>
62 <scilab:image localized="true">
63 f=scf();
64 a1=f.children;
65 a1.margins(3)=0.61;
66 a2=newaxes();
67 a2.margins(4)=0.39;
68 sca(a1);
69 titlepage("Bottom title");
70 sca(a2);
71 titlepage("Top title");
72 </scilab:image>
51 </refsection> 73 </refsection>
52 <refsection role="see also"> 74 <refsection role="see also">
53 <title>See Also</title> 75 <title>See Also</title>
diff --git a/scilab/modules/graphics/help/fr_FR/text/titlepage.xml b/scilab/modules/graphics/help/fr_FR/text/titlepage.xml
index a85f629..535efd9 100644
--- a/scilab/modules/graphics/help/fr_FR/text/titlepage.xml
+++ b/scilab/modules/graphics/help/fr_FR/text/titlepage.xml
@@ -23,8 +23,8 @@
23 <refsection> 23 <refsection>
24 <title>Description</title> 24 <title>Description</title>
25 <para> 25 <para>
26 <literal>titlepage</literal> affiche la matrice de chaînes de caractères <literal>str</literal> au milieu de 26 <function>titlepage</function> affiche la matrice de chaînes de caractères <varname>str</varname> au milieu de
27 la fenêtre graphique courante, avec la police la plus grande possible. 27 la fenêtre graphique courante, avec la police la plus grande possible, compte tenu de l'axe courant et de sa géométrie.
28 </para> 28 </para>
29 </refsection> 29 </refsection>
30 30
@@ -37,6 +37,28 @@ titlepage("Ceci est le titre de la page");
37 titlepage("Ceci est le titre de la page"); 37 titlepage("Ceci est le titre de la page");
38 </scilab:image> 38 </scilab:image>
39 39
40 <programlisting role="example"><![CDATA[
41f=scf();
42a1=f.children;
43a1.margins(3)=0.61;
44a2=newaxes();
45a2.margins(4)=0.39;
46sca(a1);
47titlepage("Bottom title");
48sca(a2);
49titlepage("Top title");
50 ]]></programlisting>
51 <scilab:image localized="true">
52 f=scf();
53 a1=f.children;
54 a1.margins(3)=0.61;
55 a2=newaxes();
56 a2.margins(4)=0.39;
57 sca(a1);
58 titlepage("Titre du haut");
59 sca(a2);
60 titlepage("Titre du bas");
61 </scilab:image>
40 </refsection> 62 </refsection>
41 63
42 <refsection role="see also"> 64 <refsection role="see also">
diff --git a/scilab/modules/graphics/macros/edit_curv.sci b/scilab/modules/graphics/macros/edit_curv.sci
index 7391df5..6164fd3 100644
--- a/scilab/modules/graphics/macros/edit_curv.sci
+++ b/scilab/modules/graphics/macros/edit_curv.sci
@@ -120,13 +120,16 @@ function [x,y,ok,gc]=edit_curv(x,y,job,tit,gc)
120 execstr("Data_"+string(curwin)+"=Data"); 120 execstr("Data_"+string(curwin)+"=Data");
121 menubar(curwin,menus) 121 menubar(curwin,menus)
122 // 122 //
123 f = gcf(); a = gca(); 123 edit_curv_figure = gcf();
124 a.data_bounds = [rect(1),rect(2);rect(3),rect(4)] 124 edit_curv_figure.figure_name = "edit_curv";
125 a.axes_visible="on"; 125
126 a.grid=[4 4]; 126 edit_curv_axes = gca();
127 edit_curv_axes.data_bounds = [rect(1),rect(2);rect(3),rect(4)]
128 edit_curv_axes.axes_visible="on";
129 edit_curv_axes.grid=[4 4];
127 if x<>[] then 130 if x<>[] then
128 xpolys(x*[1 1],y*[1 1],[1,-1]) 131 xpolys(x*[1 1],y*[1 1],[1,-1])
129 hdl=a.children.children 132 hdl=edit_curv_axes.children.children
130 else 133 else
131 hdl=[] 134 hdl=[]
132 end 135 end
@@ -155,15 +158,15 @@ function [x,y,ok,gc]=edit_curv(x,y,job,tit,gc)
155 break 158 break
156 159
157 case "Ok" then // -- ok menu 160 case "Ok" then // -- ok menu
158 rect = matrix(a.data_bounds',1,4); 161 rect = matrix(edit_curv_axes.data_bounds',1,4);
159 gc = list(rect,axisdata); 162 gc = list(rect,axisdata);
160 delete(f) 163 delete(edit_curv_figure)
161 return; 164 return;
162 165
163 case "Abort" then // -- abort menu 166 case "Abort" then // -- abort menu
164 x = xsav 167 x = xsav
165 y = ysav 168 y = ysav
166 delete(f) 169 delete(edit_curv_figure)
167 ok = %f; 170 ok = %f;
168 return 171 return
169 172
@@ -195,7 +198,7 @@ function [x,y,ok,gc]=edit_curv(x,y,job,tit,gc)
195 if dx==0 then dx=max(xmx/2,1),xmn=xmn-dx/10;xmx=xmx+dx/10;end 198 if dx==0 then dx=max(xmx/2,1),xmn=xmn-dx/10;xmx=xmx+dx/10;end
196 if dy==0 then dy=max(ymx/2,1),ymn=ymn-dy/5;ymx=ymx+dy/10;end 199 if dy==0 then dy=max(ymx/2,1),ymn=ymn-dy/5;ymx=ymx+dy/10;end
197 rect=[xmn,ymn,xmx,ymx]; 200 rect=[xmn,ymn,xmx,ymx];
198 a.data_bounds=[rect(1),rect(2);rect(3),rect(4)] 201 edit_curv_axes.data_bounds=[rect(1),rect(2);rect(3),rect(4)]
199 end 202 end
200 203
201 case "Clear" then 204 case "Clear" then
@@ -215,7 +218,7 @@ function [x,y,ok,gc]=edit_curv(x,y,job,tit,gc)
215 xmn=0;ymn=0;xmx=1;ymx=1;dx=1;dy=1 218 xmn=0;ymn=0;xmx=1;ymx=1;dx=1;dy=1
216 end 219 end
217 rect=[xmn,ymn,xmx,ymx]; 220 rect=[xmn,ymn,xmx,ymx];
218 a.data_bounds=[rect(1),rect(2);rect(3),rect(4)] 221 edit_curv_axes.data_bounds=[rect(1),rect(2);rect(3),rect(4)]
219 if x<>[]&y<>[] then 222 if x<>[]&y<>[] then
220 if hdl==[] then 223 if hdl==[] then
221 xpolys(x(1)*[1 1],y(1)*[1 1],[1,-1]) 224 xpolys(x(1)*[1 1],y(1)*[1 1],[1,-1])
@@ -298,7 +301,7 @@ function [x,y] = addpt(c1,x,y)
298 x = c1(1); 301 x = c1(1);
299 y = c1(2); 302 y = c1(2);
300 xpolys(x*[1 1],y*[1 1],[1,-1]); 303 xpolys(x*[1 1],y*[1 1],[1,-1]);
301 hdl = resume(a.children(1).children) 304 hdl = resume(edit_curv_axes.children(1).children)
302 end 305 end
303 //recherche des intervalles en x contenant l'abscisse designee 306 //recherche des intervalles en x contenant l'abscisse designee
304 kk=[] 307 kk=[]
@@ -361,31 +364,115 @@ endfunction
361 364
362 365
363function [x,y] = readxy() 366function [x,y] = readxy()
364 fn=uigetfile("*.xy") 367
365 if fn<>emptystr() then 368 function xy = findPolyline(children)
366 if execstr("load(fn)","errcatch")<>0 then 369 xy = [];
367 xy=read(fn,-1,2) 370 for i = 1:length(children)
368 x=xy(:,1);y=xy(:,2) 371 select children(i).type,
372 case "Polyline" then
373 xy = children(i).data;
374 return
375 case "Axes" then
376 xy = findPolyline(children(i).children);
377 return
378 case "Compound" then
379 xy = findPolyline(children(i).children);
380 return
381 end
382 end
383 endfunction
384
385 fn=uigetfile(["*.scg";"*.sod";"*.xy"], "", _("Select a file to load"));
386 if fn <> "" then
387 [pth, fnm, ext] = fileparts(fn);
388 flname = fnm + ext;
389
390 select ext
391 case ".scg" then
392 loaded_figure=figure("visible", "off");
393 if execstr("xload(fn, loaded_figure.figure_id)","errcatch") == 0 then
394 loaded_figure.visible = "off";
395 scf(edit_curv_figure);
396 xy = findPolyline(loaded_figure.children);
397 delete(loaded_figure);
398 if xy <> [] then
399 x=xy(:,1);y=xy(:,2);
400 else
401 messagebox(msprintf(_("%s: The file "'%s"' does not " +..
402 "contains any "'Polyline"' graphic entity.\n"), "edit_curve", flname));
403 return
404 end
405 else
406 messagebox(msprintf(_("%s: Cannot open file "'%s"' " +..
407 "for reading.\n"), "edit_curv", flname), "modal");
408 return
409 end
410 case ".xy" then
411 if execstr("xy = read(fn,-1,2)","errcatch") == 0 then
412 x=xy(:,1);y=xy(:,2);
413 else
414 messagebox(msprintf(_("%s: Cannot open file "'%s"' " +..
415 "for reading.\n"), "edit_curv", flname), "modal");
416 return
417 end
418 case ".sod" then
419 if execstr("load(fn)","errcatch") == 0 then
420 x=xy(:,1);y=xy(:,2);
421 else
422 messagebox(msprintf(_("%s: Cannot open file "'%s"' " +..
423 "for reading.\n"), "edit_curv", flname), "modal");
424 return
425 end
369 else 426 else
370 x=xy(:,1);y=xy(:,2) 427 messagebox(_("Error in file format."), "modal");
428 return
371 end 429 end
372 else 430 else
373 x=x 431 x=x
374 y=y 432 y=y
375 end 433 end
376
377endfunction 434endfunction
378 435
379 436
380function savexy(x,y) 437function savexy(x,y)
381 fn = uigetfile("*.xy") 438 fn=uiputfile(["*.sod";"*.xy"], "", _("Select a file to write"));
382 if fn<>emptystr() then 439 if fn <> "" then
440 [pth, fnm, ext] = fileparts(fn);
441 flname = fnm + ext;
383 xy = [x y]; 442 xy = [x y];
384 fil=fn+".xy" 443 fil = fn;
385 if execstr("save(fil,""xy"")","errcatch")<>0 then 444
386 messagebox(["Impossible to save in the selected file"; 445 select ext
387 "Check file and directory access"],"modal"); 446 case "" then
388 return 447 fil = fil + ".xy";
448 ext = ".xy";
449 case ".xy" then
450 // empty case fil = fn
451 case ".sod" then
452 // empty case fil = fn
453 else
454 fil = pth + fnm + ".xy";
455 ext = ".xy";
456 end
457
458 select ext
459 case ".sod" then
460 if execstr("save(fil,""xy"")","errcatch")<>0 then
461 messagebox(msprintf(_("%s: The file "'%s"' " +..
462 "cannot be written.\n"), "edit_curv", flname), "modal");
463 return
464 end
465 case ".xy" then
466 isErr = execstr("write(fil,xy)","errcatch")
467 if isErr == 240 then
468 mdelete(fil); // write cannot overwrite an existing file
469 isErr = execstr("write(fil,xy)","errcatch");
470 end
471 if isErr <> 0 then
472 messagebox(msprintf(_("%s: The file "'%s"' " +..
473 "cannot be written.\n"), "edit_curv", flname), "modal");
474 return
475 end
389 end 476 end
390 end 477 end
391endfunction 478endfunction
diff --git a/scilab/modules/graphics/macros/surf.sci b/scilab/modules/graphics/macros/surf.sci
index 5a6d80d..a52b9d6 100644
--- a/scilab/modules/graphics/macros/surf.sci
+++ b/scilab/modules/graphics/macros/surf.sci
@@ -8,7 +8,6 @@
8 8
9 9
10function surf(varargin) 10function surf(varargin)
11
12 [lhs,rhs]=argn(0); 11 [lhs,rhs]=argn(0);
13 12
14 if ~rhs 13 if ~rhs
@@ -171,8 +170,6 @@ function surf(varargin)
171 end 170 end
172 171
173 172
174
175
176 // P1 is the position of the first PropertyName field. 173 // P1 is the position of the first PropertyName field.
177 Property = P1; 174 Property = P1;
178 175
@@ -227,10 +224,10 @@ function surf(varargin)
227 Property = Property+2; 224 Property = Property+2;
228 end 225 end
229 226
230 227 if isempty(XX) | isempty(YY) | isempty(ZZ) then
231 228 // Nothing will be drawn so return (see http://bugzilla.scilab.org/13180 )
232 229 return
233 230 end
234 231
235 // surf is made now ! 232 // surf is made now !
236 // with default option to simulate the Matlab mode 233 // with default option to simulate the Matlab mode
@@ -250,12 +247,6 @@ function surf(varargin)
250 e.cdata_mapping = "scaled" 247 e.cdata_mapping = "scaled"
251 248
252 249
253
254
255
256
257
258
259 // F.Leray 250 // F.Leray
260 // Today: 17.03.05 251 // Today: 17.03.05
261 // XYZ-DataMode under Matlab seems really bugged (see following samples and read Matlab doc.): 252 // XYZ-DataMode under Matlab seems really bugged (see following samples and read Matlab doc.):
@@ -341,8 +332,6 @@ function surf(varargin)
341 332
342endfunction 333endfunction
343 334
344
345
346// 335//
347//function [C] = build_interp_color(C,colormap_size) 336//function [C] = build_interp_color(C,colormap_size)
348//// C is considered as a data value in Matlab 337//// C is considered as a data value in Matlab
@@ -369,13 +358,6 @@ function k=getIndexInStringTable(pattern,table)
369 358
370endfunction 359endfunction
371 360
372
373
374
375
376
377
378
379function [XX,YY,ZZ,CC] = CreateFacetsFromXYZ(X,Y,Z,current_figure, cur_draw_mode) 361function [XX,YY,ZZ,CC] = CreateFacetsFromXYZ(X,Y,Z,current_figure, cur_draw_mode)
380 362
381 if or(size(X)==1) & or(size(Y)==1) // X and Y are vector 363 if or(size(X)==1) & or(size(Y)==1) // X and Y are vector
@@ -488,10 +470,6 @@ function [XX,YY,ZZ,CC] = CreateFacetsFromXYZ(X,Y,Z,current_figure, cur_draw_mode
488 470
489endfunction 471endfunction
490 472
491
492
493
494
495function [XX,YY,ZZ,CC] = CreateFacetsFromXYZColor(X,Y,Z,C,current_figure, cur_draw_mode) 473function [XX,YY,ZZ,CC] = CreateFacetsFromXYZColor(X,Y,Z,C,current_figure, cur_draw_mode)
496 474
497 if or(size(X)==1) & or(size(Y)==1) // X and Y are vector 475 if or(size(X)==1) & or(size(Y)==1) // X and Y are vector
@@ -634,7 +612,6 @@ function [XX,YY,ZZ,CC] = CreateFacetsFromXYZColor(X,Y,Z,C,current_figure, cur_dr
634 612
635endfunction 613endfunction
636 614
637
638// If an error occurs in the surf code, we need to catch it 615// If an error occurs in the surf code, we need to catch it
639// order to reset some default values 616// order to reset some default values
640function processSurfError(cur_figure, cur_draw_mode) 617function processSurfError(cur_figure, cur_draw_mode)
diff --git a/scilab/modules/graphics/src/c/sciCall.c b/scilab/modules/graphics/src/c/sciCall.c
index 759df01..fc54e11 100644
--- a/scilab/modules/graphics/src/c/sciCall.c
+++ b/scilab/modules/graphics/src/c/sciCall.c
@@ -990,7 +990,7 @@ static void updateXYZDataBounds(int iSubwinUID, double rect[6])
990 int * piFirstPlot = &firstPlot; 990 int * piFirstPlot = &firstPlot;
991 991
992 getGraphicObjectProperty(iSubwinUID, __GO_FIRST_PLOT__, jni_bool, (void **)&piFirstPlot); 992 getGraphicObjectProperty(iSubwinUID, __GO_FIRST_PLOT__, jni_bool, (void **)&piFirstPlot);
993 if (firstPlot != 0) 993 if (!firstPlot)
994 { 994 {
995 double * dataBounds = NULL; 995 double * dataBounds = NULL;
996 getGraphicObjectProperty(iSubwinUID, __GO_DATA_BOUNDS__, jni_double_vector, (void **)&dataBounds); 996 getGraphicObjectProperty(iSubwinUID, __GO_DATA_BOUNDS__, jni_double_vector, (void **)&dataBounds);
diff --git a/scilab/modules/graphics/tests/nonreg_tests/bug_13180.dia.ref b/scilab/modules/graphics/tests/nonreg_tests/bug_13180.dia.ref
new file mode 100644
index 0000000..8a2edd0
--- /dev/null
+++ b/scilab/modules/graphics/tests/nonreg_tests/bug_13180.dia.ref
@@ -0,0 +1,21 @@
1// =============================================================================
2// Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
3// Copyright (C) 2014 - Scilab Enterprises - Calixte DENIZET
4//
5// This file is distributed under the same license as the Scilab package.
6// =============================================================================
7// <-- TEST WITH GRAPHIC -->
8// <-- Non-regression test for bug 13180 -->
9//
10// <-- Bugzilla URL -->
11// http://bugzilla.scilab.org/13180
12//
13// <-- Short Description -->
14// surf macro did not handle degenerate cases.
15nx = 1;
16ny = 10;
17clf;
18x = 1:nx;
19y = 1:ny;
20y = y';
21surf(x, y, x.*.y);