summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSylvestre Ledru <sylvestre.ledru@scilab.org>2009-02-12 12:18:35 +0100
committerSylvestre Ledru <sylvestre.ledru@scilab.org>2009-02-12 12:18:35 +0100
commit91fbfb81b72b3d09175fec6a06a5567dac820bd5 (patch)
treeaac8be503cc990a028930ae5865d01736d8f6480
parent632d50208152dd420b67bf26954c18c46f3f4302 (diff)
parentc3ebdaa47b35459e0bc4c6eca899ef149fc344d3 (diff)
downloadscilab-91fbfb81b72b3d09175fec6a06a5567dac820bd5.zip
scilab-91fbfb81b72b3d09175fec6a06a5567dac820bd5.tar.gz
Merge branch '5.1' of git@git.scilab.org:scilab into 5.15.1
-rw-r--r--scilab/RELEASE_NOTES_5.1.X2
-rw-r--r--scilab/modules/fileio/tests/nonreg_tests/bug_4097.dia.ref24
-rw-r--r--scilab/modules/fileio/tests/nonreg_tests/bug_4097.tst31
-rw-r--r--scilab/modules/graphics/tests/nonreg_tests/bug_4081.tst45
-rw-r--r--scilab/modules/gui/locales/fr_FR/gui.po4
-rw-r--r--scilab/modules/output_stream/tests/nonreg_tests/bug_438.dia.ref3
-rw-r--r--scilab/modules/output_stream/tests/nonreg_tests/bug_438.tst4
-rw-r--r--scilab/modules/polynomials/tests/nonreg_tests/bug_201.dia.ref1
-rw-r--r--scilab/modules/polynomials/tests/nonreg_tests/bug_201.tst2
-rw-r--r--scilab/modules/polynomials/tests/nonreg_tests/bug_205.dia.ref2
-rw-r--r--scilab/modules/polynomials/tests/nonreg_tests/bug_205.tst2
-rw-r--r--scilab/modules/polynomials/tests/nonreg_tests/bug_2264.dia.ref10
-rw-r--r--scilab/modules/polynomials/tests/nonreg_tests/bug_2264.tst2
-rw-r--r--scilab/modules/polynomials/tests/nonreg_tests/bug_2391.dia.ref1
-rw-r--r--scilab/modules/polynomials/tests/nonreg_tests/bug_2391.tst2
-rw-r--r--scilab/modules/polynomials/tests/nonreg_tests/bug_2492.dia.ref1
-rw-r--r--scilab/modules/polynomials/tests/nonreg_tests/bug_2492.tst2
-rw-r--r--scilab/modules/polynomials/tests/nonreg_tests/bug_2834.dia.ref1
-rw-r--r--scilab/modules/polynomials/tests/nonreg_tests/bug_2834.tst2
-rw-r--r--scilab/modules/polynomials/tests/nonreg_tests/bug_3006.dia.ref1
-rw-r--r--scilab/modules/polynomials/tests/nonreg_tests/bug_3006.tst2
-rw-r--r--scilab/modules/polynomials/tests/nonreg_tests/bug_415.tst2
-rw-r--r--scilab/modules/polynomials/tests/unit_tests/polelm.dia.ref1
-rw-r--r--scilab/modules/polynomials/tests/unit_tests/polelm.tst2
-rw-r--r--scilab/modules/polynomials/tests/unit_tests/polops.dia.ref1
-rw-r--r--scilab/modules/polynomials/tests/unit_tests/polops.tst2
-rw-r--r--scilab/modules/polynomials/tests/unit_tests/poly_roots.dia.ref25
-rw-r--r--scilab/modules/polynomials/tests/unit_tests/poly_roots.tst2
-rw-r--r--scilab/modules/renderer/src/java/org/scilab/modules/renderer/utils/TexturedColorMap.java3
-rw-r--r--scilab/modules/scicos/tests/unit_tests/lincos.tst16
-rw-r--r--scilab/modules/scicos/tests/unit_tests/lincos.unix.dia.ref126
-rw-r--r--scilab/modules/scicos/tests/unit_tests/steadycos.tst16
-rw-r--r--scilab/modules/scicos/tests/unit_tests/steadycos.unix.dia.ref126
-rw-r--r--scilab/modules/shell/src/c/others/zzledt.c31
34 files changed, 223 insertions, 274 deletions
diff --git a/scilab/RELEASE_NOTES_5.1.X b/scilab/RELEASE_NOTES_5.1.X
index 2276e9c..31c574c 100644
--- a/scilab/RELEASE_NOTES_5.1.X
+++ b/scilab/RELEASE_NOTES_5.1.X
@@ -11,7 +11,7 @@
11 11
12- input('xxx') from Scipad (bug #2578): 12- input('xxx') from Scipad (bug #2578):
13 The function input('xxx') called from scipad is crashing Scilab. 13 The function input('xxx') called from scipad is crashing Scilab.
14 Due to internal issues, this bug 14 This bug is due to internal issues and will be fixed in a future version.
15 15
16- Scipad Debugger: 16- Scipad Debugger:
17 The Scipad debugger is still broken because of code reorganization that has 17 The Scipad debugger is still broken because of code reorganization that has
diff --git a/scilab/modules/fileio/tests/nonreg_tests/bug_4097.dia.ref b/scilab/modules/fileio/tests/nonreg_tests/bug_4097.dia.ref
new file mode 100644
index 0000000..d2ab0b3
--- /dev/null
+++ b/scilab/modules/fileio/tests/nonreg_tests/bug_4097.dia.ref
@@ -0,0 +1,24 @@
1// =============================================================================
2// Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
3// Copyright (C) 2009 - DIGITEO - Pierre MARECHAL
4//
5// This file is distributed under the same license as the Scilab package.
6// =============================================================================
7// <-- JVM NOT MANDATORY -->
8// <-- Non-regression test for bug 4097 -->
9//
10// <-- Bugzilla URL -->
11// http://bugzilla.scilab.org/show_bug.cgi?id=4097
12//
13// <-- Short Description -->
14// fscanfMat() crashes Scilab. It doesn't occur with scilab-5.0.3
15n = 50;
16a = rand(n,n,"u");
17fd = mopen(TMPDIR+"/bug_4097.mat","w");
18for i=1:n ,
19 for j=1:n, mfprintf(fd,"%5.2f ",a(i,j));end;
20 mfprintf(fd,'\n');
21end
22mclose(fd);
23b = fscanfMat(TMPDIR+"/bug_4097.mat");
24if size(b)<> [50,50] then bugmes();quit;end
diff --git a/scilab/modules/fileio/tests/nonreg_tests/bug_4097.tst b/scilab/modules/fileio/tests/nonreg_tests/bug_4097.tst
new file mode 100644
index 0000000..2c94191
--- /dev/null
+++ b/scilab/modules/fileio/tests/nonreg_tests/bug_4097.tst
@@ -0,0 +1,31 @@
1// =============================================================================
2// Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
3// Copyright (C) 2009 - DIGITEO - Pierre MARECHAL
4//
5// This file is distributed under the same license as the Scilab package.
6// =============================================================================
7
8// <-- JVM NOT MANDATORY -->
9
10// <-- Non-regression test for bug 4097 -->
11//
12// <-- Bugzilla URL -->
13// http://bugzilla.scilab.org/show_bug.cgi?id=4097
14//
15// <-- Short Description -->
16// fscanfMat() crashes Scilab. It doesn't occur with scilab-5.0.3
17
18n = 50;
19a = rand(n,n,"u");
20fd = mopen(TMPDIR+"/bug_4097.mat","w");
21
22for i=1:n ,
23 for j=1:n, mfprintf(fd,"%5.2f ",a(i,j));end;
24 mfprintf(fd,'\n');
25end
26
27mclose(fd);
28
29b = fscanfMat(TMPDIR+"/bug_4097.mat");
30
31if size(b)<> [50,50] then pause,end
diff --git a/scilab/modules/graphics/tests/nonreg_tests/bug_4081.tst b/scilab/modules/graphics/tests/nonreg_tests/bug_4081.tst
new file mode 100644
index 0000000..1667296
--- /dev/null
+++ b/scilab/modules/graphics/tests/nonreg_tests/bug_4081.tst
@@ -0,0 +1,45 @@
1// =============================================================================
2// Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
3// Copyright (C) 2008-2008 - Digiteo - Jean-Baptiste Silvy
4//
5// This file is distributed under the same license as the Scilab package.
6// =============================================================================
7
8// <-- INTERACTIVE TEST -->
9
10// <-- Non-regression test for bug 4081 -->
11//
12// <-- Bugzilla URL -->
13// http://bugzilla.scilab.org/show_bug.cgi?id=4081
14//
15// <-- Short Description -->
16// Colormap is sometime not updated when using new interpoated colors.
17
18
19clf()
20f=gcf();
21a=gca();a.data_bounds=[0,-10;40,30];
22x1=[0,10,20,10]';
23y1=[10,0,10,20]';
24c=linspace(2,100,4)';
25xpols=[x1 x1+20 x1+10 x1+10];
26ypols=[y1 y1 y1+10 y1-10];
27cols= [c c($:-1:1) c([3 4 1 2]) c]
28f.color_map=jetcolormap(max(cols));
29xfpolys(xpols,ypols,cols)
30// interpolated colors
31clf()
32f=gcf();
33x11=[0;20;20;0];y11=[10;10;30;30];c11=[10;10;30;30];
34x12=x11;y12=y11+20;c12=[20;20;1;1];c12=[30;30;10;10];
35x21=[0;30;30;0]+22;y21=[20;20;30;30];c21=[20;20;30;30];
36x22=x21;y22=y21+10;c22=[30;30;20;20];
37x31=[0;40;40;0]+55;y31=[0;0;30;30];c31=[0;0;30;30];
38x32=x31;y32=y31+30;c32=[30;30;0;0];
39X=[x11 x12 x21 x22 x31 x32];Y=[y11 y12 y21 y22 y31 y32];C=([c11 c12 c21 c22 c31 c32]+1)*5;
40a=gca();
41a.data_bounds=[min(X),min(Y);max(X),max(Y)];
42f=gcf();f.color_map=graycolormap(max(C));
43xfpolys(X,Y,C)
44
45// the rectangles should be gray and not using the jetcolormap
diff --git a/scilab/modules/gui/locales/fr_FR/gui.po b/scilab/modules/gui/locales/fr_FR/gui.po
index c8b2f18..7cc3ea2 100644
--- a/scilab/modules/gui/locales/fr_FR/gui.po
+++ b/scilab/modules/gui/locales/fr_FR/gui.po
@@ -867,7 +867,7 @@ msgid ""
867msgstr "" 867msgstr ""
868"disp(\"ATTENTION : A cause des limitations de votre configuration, Scilab " 868"disp(\"ATTENTION : A cause des limitations de votre configuration, Scilab "
869"est passé dans un mode dans lequel mélanger des uicontrols et des graphiques " 869"est passé dans un mode dans lequel mélanger des uicontrols et des graphiques "
870"n'est pas possible. Tapez \"\"help usecanvas\"\" pour plus d'information.\")" 870"n''est pas possible. Tapez \"\"help usecanvas\"\" pour plus d''information.\")"
871 871
872msgid "" 872msgid ""
873"disp(\"WARNING: Due to your video card drivers limitations, that are not " 873"disp(\"WARNING: Due to your video card drivers limitations, that are not "
@@ -885,7 +885,7 @@ msgid ""
885msgstr "" 885msgstr ""
886"disp(\"ATTENTION : Malgré notre avertissement précédent, vous avez choisi " 886"disp(\"ATTENTION : Malgré notre avertissement précédent, vous avez choisi "
887"d'utiliser Scilab avec des fonctionnalités graphiques avancées. Tapez " 887"d'utiliser Scilab avec des fonctionnalités graphiques avancées. Tapez "
888"\"\"help usecanvas\"\" pour plus d'information.\")" 888"\"\"help usecanvas\"\" pour plus d''information.\")"
889 889
890msgid "Loading help browser..." 890msgid "Loading help browser..."
891msgstr "Chargement du navigateur d'aide..." 891msgstr "Chargement du navigateur d'aide..."
diff --git a/scilab/modules/output_stream/tests/nonreg_tests/bug_438.dia.ref b/scilab/modules/output_stream/tests/nonreg_tests/bug_438.dia.ref
index 408ea07..cdca5d5 100644
--- a/scilab/modules/output_stream/tests/nonreg_tests/bug_438.dia.ref
+++ b/scilab/modules/output_stream/tests/nonreg_tests/bug_438.dia.ref
@@ -4,6 +4,7 @@
4// 4//
5// This file is distributed under the same license as the Scilab package. 5// This file is distributed under the same license as the Scilab package.
6// ============================================================================= 6// =============================================================================
7// <-- JVM NOT MANDATORY -->
7// <-- Non-regression test for bug 438 --> 8// <-- Non-regression test for bug 438 -->
8// 9//
9// <-- Bugzilla URL --> 10// <-- Bugzilla URL -->
@@ -27,5 +28,5 @@ dummy3 =sprintf('%e', 10000);
27if MSDOS then 28if MSDOS then
28 if dummy3 <> "1.000000e+004" then bugmes();quit;end 29 if dummy3 <> "1.000000e+004" then bugmes();quit;end
29else 30else
30 if dummy2 <> "1.000000e+04" then bugmes();quit;end 31 if dummy3 <> "1.000000e+04" then bugmes();quit;end
31end 32end
diff --git a/scilab/modules/output_stream/tests/nonreg_tests/bug_438.tst b/scilab/modules/output_stream/tests/nonreg_tests/bug_438.tst
index 1331b91..864ab56 100644
--- a/scilab/modules/output_stream/tests/nonreg_tests/bug_438.tst
+++ b/scilab/modules/output_stream/tests/nonreg_tests/bug_438.tst
@@ -5,6 +5,8 @@
5// This file is distributed under the same license as the Scilab package. 5// This file is distributed under the same license as the Scilab package.
6// ============================================================================= 6// =============================================================================
7 7
8// <-- JVM NOT MANDATORY -->
9
8// <-- Non-regression test for bug 438 --> 10// <-- Non-regression test for bug 438 -->
9// 11//
10// <-- Bugzilla URL --> 12// <-- Bugzilla URL -->
@@ -31,5 +33,5 @@ dummy3 =sprintf('%e', 10000);
31if MSDOS then 33if MSDOS then
32 if dummy3 <> "1.000000e+004" then pause, end 34 if dummy3 <> "1.000000e+004" then pause, end
33else 35else
34 if dummy2 <> "1.000000e+04" then pause, end 36 if dummy3 <> "1.000000e+04" then pause, end
35end 37end
diff --git a/scilab/modules/polynomials/tests/nonreg_tests/bug_201.dia.ref b/scilab/modules/polynomials/tests/nonreg_tests/bug_201.dia.ref
index f63df18..e4e1842 100644
--- a/scilab/modules/polynomials/tests/nonreg_tests/bug_201.dia.ref
+++ b/scilab/modules/polynomials/tests/nonreg_tests/bug_201.dia.ref
@@ -4,6 +4,7 @@
4// 4//
5// This file is distributed under the same license as the Scilab package. 5// This file is distributed under the same license as the Scilab package.
6// ============================================================================= 6// =============================================================================
7// <-- JVM NOT MANDATORY -->
7// <-- Non-regression test for bug 201 --> 8// <-- Non-regression test for bug 201 -->
8// 9//
9// <-- Bugzilla URL --> 10// <-- Bugzilla URL -->
diff --git a/scilab/modules/polynomials/tests/nonreg_tests/bug_201.tst b/scilab/modules/polynomials/tests/nonreg_tests/bug_201.tst
index b3d5939..61b936c 100644
--- a/scilab/modules/polynomials/tests/nonreg_tests/bug_201.tst
+++ b/scilab/modules/polynomials/tests/nonreg_tests/bug_201.tst
@@ -5,6 +5,8 @@
5// This file is distributed under the same license as the Scilab package. 5// This file is distributed under the same license as the Scilab package.
6// ============================================================================= 6// =============================================================================
7 7
8// <-- JVM NOT MANDATORY -->
9
8// <-- Non-regression test for bug 201 --> 10// <-- Non-regression test for bug 201 -->
9// 11//
10// <-- Bugzilla URL --> 12// <-- Bugzilla URL -->
diff --git a/scilab/modules/polynomials/tests/nonreg_tests/bug_205.dia.ref b/scilab/modules/polynomials/tests/nonreg_tests/bug_205.dia.ref
index ecdc847..0137f6f 100644
--- a/scilab/modules/polynomials/tests/nonreg_tests/bug_205.dia.ref
+++ b/scilab/modules/polynomials/tests/nonreg_tests/bug_205.dia.ref
@@ -4,6 +4,7 @@
4// 4//
5// This file is distributed under the same license as the Scilab package. 5// This file is distributed under the same license as the Scilab package.
6// ============================================================================= 6// =============================================================================
7// <-- JVM NOT MANDATORY -->
7// <-- Non-regression test for bug 205 --> 8// <-- Non-regression test for bug 205 -->
8// 9//
9// <-- Bugzilla URL --> 10// <-- Bugzilla URL -->
@@ -27,6 +28,7 @@
27// 28//
28// Gaubert on Linux PPC version 2.2.13 distribution with X/kde as window manager 29// Gaubert on Linux PPC version 2.2.13 distribution with X/kde as window manager
29// France February 10, 2001 at 11:55:40 30// France February 10, 2001 at 11:55:40
31// <-- ENGLISH IMPOSED -->
30N = 30; 32N = 30;
31A = rand(N,N); 33A = rand(N,N);
32s = poly(0,'s'); 34s = poly(0,'s');
diff --git a/scilab/modules/polynomials/tests/nonreg_tests/bug_205.tst b/scilab/modules/polynomials/tests/nonreg_tests/bug_205.tst
index 6166614..99d876b 100644
--- a/scilab/modules/polynomials/tests/nonreg_tests/bug_205.tst
+++ b/scilab/modules/polynomials/tests/nonreg_tests/bug_205.tst
@@ -5,6 +5,8 @@
5// This file is distributed under the same license as the Scilab package. 5// This file is distributed under the same license as the Scilab package.
6// ============================================================================= 6// =============================================================================
7 7
8// <-- JVM NOT MANDATORY -->
9
8// <-- Non-regression test for bug 205 --> 10// <-- Non-regression test for bug 205 -->
9// 11//
10// <-- Bugzilla URL --> 12// <-- Bugzilla URL -->
diff --git a/scilab/modules/polynomials/tests/nonreg_tests/bug_2264.dia.ref b/scilab/modules/polynomials/tests/nonreg_tests/bug_2264.dia.ref
index 5555d3c..c48aae5 100644
--- a/scilab/modules/polynomials/tests/nonreg_tests/bug_2264.dia.ref
+++ b/scilab/modules/polynomials/tests/nonreg_tests/bug_2264.dia.ref
@@ -1,3 +1,10 @@
1// =============================================================================
2// Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
3// Copyright (C) 2007-2008 - INRIA - Serge STEER <serge.steer@inria.fr>
4//
5// This file is distributed under the same license as the Scilab package.
6// =============================================================================
7// <-- JVM NOT MANDATORY -->
1// <-- Non-regression test for bug 2264 --> 8// <-- Non-regression test for bug 2264 -->
2// 9//
3// <-- Bugzilla URL --> 10// <-- Bugzilla URL -->
@@ -5,9 +12,6 @@
5// 12//
6// <-- Short Description --> 13// <-- Short Description -->
7// lcm gives wrong value for 3-element vectors(cf bug 666) 14// lcm gives wrong value for 3-element vectors(cf bug 666)
8// Serge Steer - Scilab Project
9// Copyright INRIA
10// 2 janv 2007
11[q,fact]=lcm(int32([-6 5 7 12 4])); 15[q,fact]=lcm(int32([-6 5 7 12 4]));
12if q<>int32(420) then bugmes();quit;end 16if q<>int32(420) then bugmes();quit;end
13[q,fact]=lcm(int32([6 5 7 3 4])) ; 17[q,fact]=lcm(int32([6 5 7 3 4])) ;
diff --git a/scilab/modules/polynomials/tests/nonreg_tests/bug_2264.tst b/scilab/modules/polynomials/tests/nonreg_tests/bug_2264.tst
index 9566369..2b36a08 100644
--- a/scilab/modules/polynomials/tests/nonreg_tests/bug_2264.tst
+++ b/scilab/modules/polynomials/tests/nonreg_tests/bug_2264.tst
@@ -5,6 +5,8 @@
5// This file is distributed under the same license as the Scilab package. 5// This file is distributed under the same license as the Scilab package.
6// ============================================================================= 6// =============================================================================
7 7
8// <-- JVM NOT MANDATORY -->
9
8// <-- Non-regression test for bug 2264 --> 10// <-- Non-regression test for bug 2264 -->
9// 11//
10// <-- Bugzilla URL --> 12// <-- Bugzilla URL -->
diff --git a/scilab/modules/polynomials/tests/nonreg_tests/bug_2391.dia.ref b/scilab/modules/polynomials/tests/nonreg_tests/bug_2391.dia.ref
index ed3169a..ec24522 100644
--- a/scilab/modules/polynomials/tests/nonreg_tests/bug_2391.dia.ref
+++ b/scilab/modules/polynomials/tests/nonreg_tests/bug_2391.dia.ref
@@ -4,6 +4,7 @@
4// 4//
5// This file is distributed under the same license as the Scilab package. 5// This file is distributed under the same license as the Scilab package.
6// ============================================================================= 6// =============================================================================
7// <-- JVM NOT MANDATORY -->
7// <-- Non-regression test for bug 2391 --> 8// <-- Non-regression test for bug 2391 -->
8// 9//
9// <-- Bugzilla URL --> 10// <-- Bugzilla URL -->
diff --git a/scilab/modules/polynomials/tests/nonreg_tests/bug_2391.tst b/scilab/modules/polynomials/tests/nonreg_tests/bug_2391.tst
index a65c6df..2d60ef6 100644
--- a/scilab/modules/polynomials/tests/nonreg_tests/bug_2391.tst
+++ b/scilab/modules/polynomials/tests/nonreg_tests/bug_2391.tst
@@ -5,6 +5,8 @@
5// This file is distributed under the same license as the Scilab package. 5// This file is distributed under the same license as the Scilab package.
6// ============================================================================= 6// =============================================================================
7 7
8// <-- JVM NOT MANDATORY -->
9
8// <-- Non-regression test for bug 2391 --> 10// <-- Non-regression test for bug 2391 -->
9// 11//
10// <-- Bugzilla URL --> 12// <-- Bugzilla URL -->
diff --git a/scilab/modules/polynomials/tests/nonreg_tests/bug_2492.dia.ref b/scilab/modules/polynomials/tests/nonreg_tests/bug_2492.dia.ref
index 37605b1..c32048d 100644
--- a/scilab/modules/polynomials/tests/nonreg_tests/bug_2492.dia.ref
+++ b/scilab/modules/polynomials/tests/nonreg_tests/bug_2492.dia.ref
@@ -4,6 +4,7 @@
4// 4//
5// This file is distributed under the same license as the Scilab package. 5// This file is distributed under the same license as the Scilab package.
6// ============================================================================= 6// =============================================================================
7// <-- JVM NOT MANDATORY -->
7// <-- Non-regression test for bug 2492 --> 8// <-- Non-regression test for bug 2492 -->
8// 9//
9// <-- Bugzilla URL --> 10// <-- Bugzilla URL -->
diff --git a/scilab/modules/polynomials/tests/nonreg_tests/bug_2492.tst b/scilab/modules/polynomials/tests/nonreg_tests/bug_2492.tst
index 3d96dc0..0f3278d 100644
--- a/scilab/modules/polynomials/tests/nonreg_tests/bug_2492.tst
+++ b/scilab/modules/polynomials/tests/nonreg_tests/bug_2492.tst
@@ -5,6 +5,8 @@
5// This file is distributed under the same license as the Scilab package. 5// This file is distributed under the same license as the Scilab package.
6// ============================================================================= 6// =============================================================================
7 7
8// <-- JVM NOT MANDATORY -->
9
8// <-- Non-regression test for bug 2492 --> 10// <-- Non-regression test for bug 2492 -->
9// 11//
10// <-- Bugzilla URL --> 12// <-- Bugzilla URL -->
diff --git a/scilab/modules/polynomials/tests/nonreg_tests/bug_2834.dia.ref b/scilab/modules/polynomials/tests/nonreg_tests/bug_2834.dia.ref
index f0062e8..4956357 100644
--- a/scilab/modules/polynomials/tests/nonreg_tests/bug_2834.dia.ref
+++ b/scilab/modules/polynomials/tests/nonreg_tests/bug_2834.dia.ref
@@ -4,6 +4,7 @@
4// 4//
5// This file is distributed under the same license as the Scilab package. 5// This file is distributed under the same license as the Scilab package.
6// ============================================================================= 6// =============================================================================
7// <-- JVM NOT MANDATORY -->
7// <-- Non-regression test for bug 2834 --> 8// <-- Non-regression test for bug 2834 -->
8// 9//
9// <-- Bugzilla URL --> 10// <-- Bugzilla URL -->
diff --git a/scilab/modules/polynomials/tests/nonreg_tests/bug_2834.tst b/scilab/modules/polynomials/tests/nonreg_tests/bug_2834.tst
index 9cd951f..8be272a 100644
--- a/scilab/modules/polynomials/tests/nonreg_tests/bug_2834.tst
+++ b/scilab/modules/polynomials/tests/nonreg_tests/bug_2834.tst
@@ -5,6 +5,8 @@
5// This file is distributed under the same license as the Scilab package. 5// This file is distributed under the same license as the Scilab package.
6// ============================================================================= 6// =============================================================================
7 7
8// <-- JVM NOT MANDATORY -->
9
8// <-- Non-regression test for bug 2834 --> 10// <-- Non-regression test for bug 2834 -->
9// 11//
10// <-- Bugzilla URL --> 12// <-- Bugzilla URL -->
diff --git a/scilab/modules/polynomials/tests/nonreg_tests/bug_3006.dia.ref b/scilab/modules/polynomials/tests/nonreg_tests/bug_3006.dia.ref
index 01958cc..18e7917 100644
--- a/scilab/modules/polynomials/tests/nonreg_tests/bug_3006.dia.ref
+++ b/scilab/modules/polynomials/tests/nonreg_tests/bug_3006.dia.ref
@@ -4,6 +4,7 @@
4// 4//
5// This file is distributed under the same license as the Scilab package. 5// This file is distributed under the same license as the Scilab package.
6// ============================================================================= 6// =============================================================================
7// <-- JVM NOT MANDATORY -->
7// <-- Non-regression test for bug 3006 --> 8// <-- Non-regression test for bug 3006 -->
8// 9//
9// <-- Bugzilla URL --> 10// <-- Bugzilla URL -->
diff --git a/scilab/modules/polynomials/tests/nonreg_tests/bug_3006.tst b/scilab/modules/polynomials/tests/nonreg_tests/bug_3006.tst
index 4943449..9e8f72c 100644
--- a/scilab/modules/polynomials/tests/nonreg_tests/bug_3006.tst
+++ b/scilab/modules/polynomials/tests/nonreg_tests/bug_3006.tst
@@ -5,6 +5,8 @@
5// This file is distributed under the same license as the Scilab package. 5// This file is distributed under the same license as the Scilab package.
6// ============================================================================= 6// =============================================================================
7 7
8// <-- JVM NOT MANDATORY -->
9
8// <-- Non-regression test for bug 3006 --> 10// <-- Non-regression test for bug 3006 -->
9// 11//
10// <-- Bugzilla URL --> 12// <-- Bugzilla URL -->
diff --git a/scilab/modules/polynomials/tests/nonreg_tests/bug_415.tst b/scilab/modules/polynomials/tests/nonreg_tests/bug_415.tst
index 0ddb017..029c93c 100644
--- a/scilab/modules/polynomials/tests/nonreg_tests/bug_415.tst
+++ b/scilab/modules/polynomials/tests/nonreg_tests/bug_415.tst
@@ -5,7 +5,7 @@
5// This file is distributed under the same license as the Scilab package. 5// This file is distributed under the same license as the Scilab package.
6// ============================================================================= 6// =============================================================================
7 7
8 8// <-- JVM NOT MANDATORY -->
9 9
10// <-- NO CHECK REF --> 10// <-- NO CHECK REF -->
11// <-- Non-regression test for bug 415 --> 11// <-- Non-regression test for bug 415 -->
diff --git a/scilab/modules/polynomials/tests/unit_tests/polelm.dia.ref b/scilab/modules/polynomials/tests/unit_tests/polelm.dia.ref
index c326b64..935c574 100644
--- a/scilab/modules/polynomials/tests/unit_tests/polelm.dia.ref
+++ b/scilab/modules/polynomials/tests/unit_tests/polelm.dia.ref
@@ -4,6 +4,7 @@
4// 4//
5// This file is distributed under the same license as the Scilab package. 5// This file is distributed under the same license as the Scilab package.
6// ============================================================================= 6// =============================================================================
7// <-- JVM NOT MANDATORY -->
7//poly (coeff) 8//poly (coeff)
8v=[1 2 3];nam='s';job='c';p=1+2*%s+3*%s^2; 9v=[1 2 3];nam='s';job='c';p=1+2*%s+3*%s^2;
9if poly(v,'s','c')<>p then bugmes();quit;end 10if poly(v,'s','c')<>p then bugmes();quit;end
diff --git a/scilab/modules/polynomials/tests/unit_tests/polelm.tst b/scilab/modules/polynomials/tests/unit_tests/polelm.tst
index cba4ed3..8ac7874 100644
--- a/scilab/modules/polynomials/tests/unit_tests/polelm.tst
+++ b/scilab/modules/polynomials/tests/unit_tests/polelm.tst
@@ -5,6 +5,8 @@
5// This file is distributed under the same license as the Scilab package. 5// This file is distributed under the same license as the Scilab package.
6// ============================================================================= 6// =============================================================================
7 7
8// <-- JVM NOT MANDATORY -->
9
8//poly (coeff) 10//poly (coeff)
9 11
10v=[1 2 3];nam='s';job='c';p=1+2*%s+3*%s^2; 12v=[1 2 3];nam='s';job='c';p=1+2*%s+3*%s^2;
diff --git a/scilab/modules/polynomials/tests/unit_tests/polops.dia.ref b/scilab/modules/polynomials/tests/unit_tests/polops.dia.ref
index f0f4d33..df0d543 100644
--- a/scilab/modules/polynomials/tests/unit_tests/polops.dia.ref
+++ b/scilab/modules/polynomials/tests/unit_tests/polops.dia.ref
@@ -4,6 +4,7 @@
4// 4//
5// This file is distributed under the same license as the Scilab package. 5// This file is distributed under the same license as the Scilab package.
6// ============================================================================= 6// =============================================================================
7// <-- JVM NOT MANDATORY -->
7mode(5) 8mode(5)
8lines(0) 9lines(0)
9s=poly(0,'s'); 10s=poly(0,'s');
diff --git a/scilab/modules/polynomials/tests/unit_tests/polops.tst b/scilab/modules/polynomials/tests/unit_tests/polops.tst
index 4f1dc55..e632eca 100644
--- a/scilab/modules/polynomials/tests/unit_tests/polops.tst
+++ b/scilab/modules/polynomials/tests/unit_tests/polops.tst
@@ -5,6 +5,8 @@
5// This file is distributed under the same license as the Scilab package. 5// This file is distributed under the same license as the Scilab package.
6// ============================================================================= 6// =============================================================================
7 7
8// <-- JVM NOT MANDATORY -->
9
8mode(5) 10mode(5)
9lines(0) 11lines(0)
10s=poly(0,'s'); 12s=poly(0,'s');
diff --git a/scilab/modules/polynomials/tests/unit_tests/poly_roots.dia.ref b/scilab/modules/polynomials/tests/unit_tests/poly_roots.dia.ref
index 204e41a..15bb5a2 100644
--- a/scilab/modules/polynomials/tests/unit_tests/poly_roots.dia.ref
+++ b/scilab/modules/polynomials/tests/unit_tests/poly_roots.dia.ref
@@ -4,6 +4,15 @@
4// 4//
5// This file is distributed under the same license as the Scilab package. 5// This file is distributed under the same license as the Scilab package.
6// ============================================================================= 6// =============================================================================
7// <-- JVM NOT MANDATORY -->
8// poly_roots.tst --
9// Check the computation of the roots of a polynomial
10// with different kinds of polynomials and different
11// kinds of roots :
12// - real poly,
13// - complex poly,
14// - real roots,
15// - complex roots.
7//roots : 3 real roots -> RPOLY 16//roots : 3 real roots -> RPOLY
8p=-6+11*%s-6*%s^2+%s^3; 17p=-6+11*%s-6*%s^2+%s^3;
9myroots=roots(p); 18myroots=roots(p);
@@ -76,6 +85,22 @@ myroots=roots(p,"e");
76computedroots = sort(myroots); 85computedroots = sort(myroots);
77expectedroots = [%pi;%pi]; 86expectedroots = [%pi;%pi];
78if (abs(computedroots-expectedroots)>10*%eps) then bugmes();quit;end 87if (abs(computedroots-expectedroots)>10*%eps) then bugmes();quit;end
88//
89// Caution !
90// The following are difficult root-finding problems
91// with expected precision problems.
92// See "Principles for testing polynomial
93// zerofinding programs"
94// Jenkins, Traub
95// 1975
96// p.28
97// "The accuracy which one may expect to achieve in calculating
98// zeros is limited by the condition of these zeros. In particular,
99// for multiple zeros perturbations of size epsilon in the
100// coefficients cause perturbations of size epsilon^(1/m)
101// in the zeros."
102//
103//
79// 3 real roots with a zero derivate at the root -> RPOLY 104// 3 real roots with a zero derivate at the root -> RPOLY
80// *** PRECISION PROBLEM : only simple precision computed, instead of double precision *** 105// *** PRECISION PROBLEM : only simple precision computed, instead of double precision ***
81p=(%s-%pi)^3 106p=(%s-%pi)^3
diff --git a/scilab/modules/polynomials/tests/unit_tests/poly_roots.tst b/scilab/modules/polynomials/tests/unit_tests/poly_roots.tst
index 70a18d1..2b22f1a 100644
--- a/scilab/modules/polynomials/tests/unit_tests/poly_roots.tst
+++ b/scilab/modules/polynomials/tests/unit_tests/poly_roots.tst
@@ -5,6 +5,8 @@
5// This file is distributed under the same license as the Scilab package. 5// This file is distributed under the same license as the Scilab package.
6// ============================================================================= 6// =============================================================================
7 7
8// <-- JVM NOT MANDATORY -->
9
8// poly_roots.tst -- 10// poly_roots.tst --
9// Check the computation of the roots of a polynomial 11// Check the computation of the roots of a polynomial
10// with different kinds of polynomials and different 12// with different kinds of polynomials and different
diff --git a/scilab/modules/renderer/src/java/org/scilab/modules/renderer/utils/TexturedColorMap.java b/scilab/modules/renderer/src/java/org/scilab/modules/renderer/utils/TexturedColorMap.java
index 8626d57..3a97a02 100644
--- a/scilab/modules/renderer/src/java/org/scilab/modules/renderer/utils/TexturedColorMap.java
+++ b/scilab/modules/renderer/src/java/org/scilab/modules/renderer/utils/TexturedColorMap.java
@@ -152,7 +152,7 @@ public class TexturedColorMap extends ColorMap {
152 * @return The buffered image used to draw the texture 152 * @return The buffered image used to draw the texture
153 */ 153 */
154 private BufferedImage getImage() { 154 private BufferedImage getImage() {
155 if (textureImage == null) { 155 if (textureImage == null || hasChanged) {
156 // create a new image 156 // create a new image
157 int colorMapSize = getSize(); 157 int colorMapSize = getSize();
158 textureImage = new BufferedImage(colorMapSize + 2, 1, BufferedImage.TYPE_INT_RGB); 158 textureImage = new BufferedImage(colorMapSize + 2, 1, BufferedImage.TYPE_INT_RGB);
@@ -193,7 +193,6 @@ public class TexturedColorMap extends ColorMap {
193 * @return a new texture data. 193 * @return a new texture data.
194 */ 194 */
195 private TextureData createTextureData() { 195 private TextureData createTextureData() {
196 textureImage = null;
197 return getTextureData(); 196 return getTextureData();
198 } 197 }
199 198
diff --git a/scilab/modules/scicos/tests/unit_tests/lincos.tst b/scilab/modules/scicos/tests/unit_tests/lincos.tst
index 10766a5..75f120e 100644
--- a/scilab/modules/scicos/tests/unit_tests/lincos.tst
+++ b/scilab/modules/scicos/tests/unit_tests/lincos.tst
@@ -1,6 +1,16 @@
1exec(fullfile(SCI,'modules','scicos','tests','unit_tests','PENDULUM_ANIM.sci')) 1// =============================================================================
2exec(fullfile(SCI,'modules','scicos','tests','unit_tests','anim_pen.sci')) 2// Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
3load(fullfile(SCI,'modules','scicos','tests','unit_tests','pendulum_anim45.cos')) 3// Copyright (C) 2008 - INRIA
4// Copyright (C) 2009 - DIGITEO
5//
6// This file is distributed under the same license as the Scilab package.
7// =============================================================================
8
9// <-- ENGLISH IMPOSED -->
10
11exec(fullfile(SCI,'modules','scicos','tests','unit_tests','PENDULUM_ANIM.sci'));
12exec(fullfile(SCI,'modules','scicos','tests','unit_tests','anim_pen.sci'));
13load(fullfile(SCI,'modules','scicos','tests','unit_tests','pendulum_anim45.cos'));
4M=10; 14M=10;
5m=3; 15m=3;
6l=3; 16l=3;
diff --git a/scilab/modules/scicos/tests/unit_tests/lincos.unix.dia.ref b/scilab/modules/scicos/tests/unit_tests/lincos.unix.dia.ref
index 28e12ac..1c275d9 100644
--- a/scilab/modules/scicos/tests/unit_tests/lincos.unix.dia.ref
+++ b/scilab/modules/scicos/tests/unit_tests/lincos.unix.dia.ref
@@ -1,120 +1,12 @@
1 1// =============================================================================
2///withoutPrompt 2// Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
3 3// Copyright (C) 2008 - INRIA
4function [x,y,typ]=PENDULUM_ANIM(job,arg1,arg2) 4// Copyright (C) 2009 - DIGITEO
5// Animation of the cart-pendulum problem 5//
6 x=[];y=[];typ=[] 6// This file is distributed under the same license as the Scilab package.
7 select job 7// =============================================================================
8 case 'plot' then 8// <-- ENGLISH IMPOSED -->
9 standard_draw(arg1) 9load(fullfile(SCI,'modules','scicos','tests','unit_tests','pendulum_anim45.cos'));
10 case 'getinputs' then
11 [x,y,typ]=standard_inputs(o)
12 case 'getoutputs' then
13 x=[];y=[];typ=[];
14 case 'getorigin' then
15 [x,y]=standard_origin(arg1)
16 case 'set' then
17 x=arg1;
18 graphics=arg1.graphics;exprs=graphics.exprs
19 model=arg1.model;dstate=model.dstate
20 while %t do
21 [ok,plen,csiz,phi,xmin,xmax,ymin,ymax,exprs]=getvalue(..
22 'Set Scope parameters',..
23 ['pendulum length';'cart size (square side)';'slope';
24 'Xmin';'Xmax'; 'Ymin'; 'Ymax'; ],..
25 list('vec',1,'vec',1,'vec',1,'vec',1,'vec',1,'vec',1,'vec',1),exprs)
26 if ~ok then break,end
27 mess=[]
28 if plen<=0|csiz<=0 then
29 mess=[mess;'Pendulum lenght and cart size must be positive.';' ']
30 ok=%f
31 end
32 if ymin>=ymax then
33 mess=[mess;'Ymax must be greater than Ymin';' ']
34 ok=%f
35 end
36 if xmin>=xmax then
37 mess=[mess;'Xmax must be greater than Xmin';' ']
38 ok=%f
39 end
40 if ~ok then
41 message(mess)
42 else
43 rpar=[plen;csiz;phi;xmin;xmax;ymin;ymax]
44 model.rpar=rpar;
45 graphics.exprs=exprs;
46 x.graphics=graphics;x.model=model
47 break
48 end
49 end
50 case 'define' then
51 plen=2; csiz=2; phi=0;
52 xmin=-5;xmax=5;ymin=-5;ymax=5
53 model=scicos_model()
54 model.sim=list('anim_pen',5)
55 model.in=[1;1]
56 model.evtin=1
57 model.dstate=0
58 model.rpar=[plen;csiz;phi;xmin;xmax;ymin;ymax]
59 model.blocktype='d'
60 model.dep_ut=[%f %f]
61 exprs=string(model.rpar)
62 gr_i=['thick=xget(''thickness'');xset(''thickness'',2);';
63 'xx=orig(1)+sz(1)*[.4 .6 .6 .4 .4]'
64 'yy=orig(2)+sz(2)*[.2 .2 .4 .4 .2]'
65 'xpoly(xx,yy,''lines'')'
66 'xx=orig(1)+sz(1)*[.5 .6]'
67 'yy=orig(2)+sz(2)*[.4 .8]'
68 'xpoly(xx,yy)'
69 'xset(''thickness'',thick);']
70 x=standard_define([3 3],model,exprs,gr_i)
71 end
72endfunction
73
74
75
76///withoutPrompt
77
78function [blocks] = anim_pen(blocks,flag)
79 win=20000+curblock()
80 if flag<>4 then H=scf(win), end
81 xold=blocks.z
82 rpar=blocks.rpar
83 plen=rpar(1);csiz=rpar(2);phi=rpar(3);
84 if flag==4 then
85 xset("window",win)
86 set("figure_style","new")
87 H=scf(win)
88 clf(H)
89 H.pixmap='on'
90 Axe=H.children
91 Axe.data_bounds=rpar(4:7)
92 Axe.isoview='on'
93 S=[cos(phi),-sin(phi);sin(phi),cos(phi)]
94 XY=S*[rpar(4),rpar(5);-csiz/2,-csiz/2]
95 xsegs(XY(1,:),XY(2,:))
96 x=0;theta=0;
97 x1=x-csiz/2;x2=x+csiz/2;y1=-csiz/2;y2=csiz/2
98 XY=S*[x1 x2 x2 x1 x1;y1,y1,y2,y2,y1]
99 xpoly(XY(1,:),XY(2,:),"lines",1)
100 XY=S*[x,x+plen*sin(theta);0,0+plen*cos(theta)]
101 xsegs(XY(1,:),XY(2,:))
102 elseif flag==2 then
103 Axe=H.children
104 x=blocks.inptr(1)(1)
105 theta=blocks.inptr(2)(1)
106 XY=Axe.children(2).data'+..
107 [cos(phi)*(x-xold);sin(phi)*(x-xold)]*ones(1,5)
108 Axe.children(2).data=XY'
109 x1=x*cos(phi);y1=x*sin(phi)
110 XY=[x1,x1+plen*sin(theta);y1,y1+plen*cos(theta)]
111 Axe.children(1).data=XY'
112 blocks.z=x
113 show_pixmap()
114 end
115endfunction
116
117load(fullfile(SCI,'modules','scicos','tests','unit_tests','pendulum_anim45.cos'))
118M=10; 10M=10;
119m=3; 11m=3;
120l=3; 12l=3;
diff --git a/scilab/modules/scicos/tests/unit_tests/steadycos.tst b/scilab/modules/scicos/tests/unit_tests/steadycos.tst
index 3085191..cdc0356 100644
--- a/scilab/modules/scicos/tests/unit_tests/steadycos.tst
+++ b/scilab/modules/scicos/tests/unit_tests/steadycos.tst
@@ -1,6 +1,16 @@
1exec(fullfile(SCI,'modules','scicos','tests','unit_tests','PENDULUM_ANIM.sci')) 1// =============================================================================
2exec(fullfile(SCI,'modules','scicos','tests','unit_tests','anim_pen.sci')) 2// Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
3load(fullfile(SCI,'modules','scicos','tests','unit_tests','pendulum_anim45.cos')) 3// Copyright (C) 2008 - INRIA
4// Copyright (C) 2009 - DIGITEO
5//
6// This file is distributed under the same license as the Scilab package.
7// =============================================================================
8
9// <-- ENGLISH IMPOSED -->
10
11exec(fullfile(SCI,'modules','scicos','tests','unit_tests','PENDULUM_ANIM.sci'));
12exec(fullfile(SCI,'modules','scicos','tests','unit_tests','anim_pen.sci'));
13load(fullfile(SCI,'modules','scicos','tests','unit_tests','pendulum_anim45.cos'));
4M=10; 14M=10;
5m=3; 15m=3;
6l=3; 16l=3;
diff --git a/scilab/modules/scicos/tests/unit_tests/steadycos.unix.dia.ref b/scilab/modules/scicos/tests/unit_tests/steadycos.unix.dia.ref
index 09286ec..f97d02f 100644
--- a/scilab/modules/scicos/tests/unit_tests/steadycos.unix.dia.ref
+++ b/scilab/modules/scicos/tests/unit_tests/steadycos.unix.dia.ref
@@ -1,120 +1,12 @@
1 1// =============================================================================
2///withoutPrompt 2// Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
3 3// Copyright (C) 2008 - INRIA
4function [x,y,typ]=PENDULUM_ANIM(job,arg1,arg2) 4// Copyright (C) 2009 - DIGITEO
5// Animation of the cart-pendulum problem 5//
6 x=[];y=[];typ=[] 6// This file is distributed under the same license as the Scilab package.
7 select job 7// =============================================================================
8 case 'plot' then 8// <-- ENGLISH IMPOSED -->
9 standard_draw(arg1) 9load(fullfile(SCI,'modules','scicos','tests','unit_tests','pendulum_anim45.cos'));
10 case 'getinputs' then
11 [x,y,typ]=standard_inputs(o)
12 case 'getoutputs' then
13 x=[];y=[];typ=[];
14 case 'getorigin' then
15 [x,y]=standard_origin(arg1)
16 case 'set' then
17 x=arg1;
18 graphics=arg1.graphics;exprs=graphics.exprs
19 model=arg1.model;dstate=model.dstate
20 while %t do
21 [ok,plen,csiz,phi,xmin,xmax,ymin,ymax,exprs]=getvalue(..
22 'Set Scope parameters',..
23 ['pendulum length';'cart size (square side)';'slope';
24 'Xmin';'Xmax'; 'Ymin'; 'Ymax'; ],..
25 list('vec',1,'vec',1,'vec',1,'vec',1,'vec',1,'vec',1,'vec',1),exprs)
26 if ~ok then break,end
27 mess=[]
28 if plen<=0|csiz<=0 then
29 mess=[mess;'Pendulum lenght and cart size must be positive.';' ']
30 ok=%f
31 end
32 if ymin>=ymax then
33 mess=[mess;'Ymax must be greater than Ymin';' ']
34 ok=%f
35 end
36 if xmin>=xmax then
37 mess=[mess;'Xmax must be greater than Xmin';' ']
38 ok=%f
39 end
40 if ~ok then
41 message(mess)
42 else
43 rpar=[plen;csiz;phi;xmin;xmax;ymin;ymax]
44 model.rpar=rpar;
45 graphics.exprs=exprs;
46 x.graphics=graphics;x.model=model
47 break
48 end
49 end
50 case 'define' then
51 plen=2; csiz=2; phi=0;
52 xmin=-5;xmax=5;ymin=-5;ymax=5
53 model=scicos_model()
54 model.sim=list('anim_pen',5)
55 model.in=[1;1]
56 model.evtin=1
57 model.dstate=0
58 model.rpar=[plen;csiz;phi;xmin;xmax;ymin;ymax]
59 model.blocktype='d'
60 model.dep_ut=[%f %f]
61 exprs=string(model.rpar)
62 gr_i=['thick=xget(''thickness'');xset(''thickness'',2);';
63 'xx=orig(1)+sz(1)*[.4 .6 .6 .4 .4]'
64 'yy=orig(2)+sz(2)*[.2 .2 .4 .4 .2]'
65 'xpoly(xx,yy,''lines'')'
66 'xx=orig(1)+sz(1)*[.5 .6]'
67 'yy=orig(2)+sz(2)*[.4 .8]'
68 'xpoly(xx,yy)'
69 'xset(''thickness'',thick);']
70 x=standard_define([3 3],model,exprs,gr_i)
71 end
72endfunction
73
74
75
76///withoutPrompt
77
78function [blocks] = anim_pen(blocks,flag)
79 win=20000+curblock()
80 if flag<>4 then H=scf(win), end
81 xold=blocks.z
82 rpar=blocks.rpar
83 plen=rpar(1);csiz=rpar(2);phi=rpar(3);
84 if flag==4 then
85 xset("window",win)
86 set("figure_style","new")
87 H=scf(win)
88 clf(H)
89 H.pixmap='on'
90 Axe=H.children
91 Axe.data_bounds=rpar(4:7)
92 Axe.isoview='on'
93 S=[cos(phi),-sin(phi);sin(phi),cos(phi)]
94 XY=S*[rpar(4),rpar(5);-csiz/2,-csiz/2]
95 xsegs(XY(1,:),XY(2,:))
96 x=0;theta=0;
97 x1=x-csiz/2;x2=x+csiz/2;y1=-csiz/2;y2=csiz/2
98 XY=S*[x1 x2 x2 x1 x1;y1,y1,y2,y2,y1]
99 xpoly(XY(1,:),XY(2,:),"lines",1)
100 XY=S*[x,x+plen*sin(theta);0,0+plen*cos(theta)]
101 xsegs(XY(1,:),XY(2,:))
102 elseif flag==2 then
103 Axe=H.children
104 x=blocks.inptr(1)(1)
105 theta=blocks.inptr(2)(1)
106 XY=Axe.children(2).data'+..
107 [cos(phi)*(x-xold);sin(phi)*(x-xold)]*ones(1,5)
108 Axe.children(2).data=XY'
109 x1=x*cos(phi);y1=x*sin(phi)
110 XY=[x1,x1+plen*sin(theta);y1,y1+plen*cos(theta)]
111 Axe.children(1).data=XY'
112 blocks.z=x
113 show_pixmap()
114 end
115endfunction
116
117load(fullfile(SCI,'modules','scicos','tests','unit_tests','pendulum_anim45.cos'))
118M=10; 10M=10;
119m=3; 11m=3;
120l=3; 12l=3;
diff --git a/scilab/modules/shell/src/c/others/zzledt.c b/scilab/modules/shell/src/c/others/zzledt.c
index 96b0541..e7bd5c3 100644
--- a/scilab/modules/shell/src/c/others/zzledt.c
+++ b/scilab/modules/shell/src/c/others/zzledt.c
@@ -817,7 +817,6 @@ static void TermCompletionOnFiles(char **dictionaryFiles, int sizedictionaryFile
817 if (new_line[l-1] == '.') strcat(new_line, &(dictionaryFiles[0][1])); 817 if (new_line[l-1] == '.') strcat(new_line, &(dictionaryFiles[0][1]));
818 else if (ptr_strrchar1) strcat(new_line, ptr_strrchar1); 818 else if (ptr_strrchar1) strcat(new_line, ptr_strrchar1);
819 819
820
821 CopyLineAtPrompt(wk_buf, new_line, cursor, cursor_max); 820 CopyLineAtPrompt(wk_buf, new_line, cursor, cursor_max);
822 FREE(new_line); 821 FREE(new_line);
823 return; 822 return;
@@ -847,23 +846,15 @@ static void TermCompletionOnFiles(char **dictionaryFiles, int sizedictionaryFile
847 if (ptr_strrchar1) 846 if (ptr_strrchar1)
848 { 847 {
849 char *ptr_strrchar2 = NULL; 848 char *ptr_strrchar2 = NULL;
850 char *new_line = NULL;
851 ptr_strrchar2 = strrstr(currentline, defaultPattern); 849 ptr_strrchar2 = strrstr(currentline, defaultPattern);
852 new_line = (char*)MALLOC(sizeof(char)*(strlen(currentline)+ strlen(ptr_strrchar1)));
853 850
854 if (new_line) 851 int l = strlen(currentline)- strlen(ptr_strrchar2);
855 { 852 if (l < 0) l = 0 - l;
856 int l = strlen(currentline)- strlen(ptr_strrchar2);
857 if (l < 0) l = 0 - l;
858 853
859 strncpy(new_line,currentline, l); 854 strncpy(wk_buf,currentline, l);
860 new_line[l] = '\0'; 855 wk_buf[l] = '\0';
861 strcat(new_line, ptr_strrchar1);
862
863 CopyLineAtPrompt(wk_buf, new_line, cursor, cursor_max);
864 856
865 FREE(new_line); 857 CopyLineAtPrompt(wk_buf, strcat(wk_buf, ptr_strrchar1), cursor, cursor_max);
866 }
867 } 858 }
868 else 859 else
869 { 860 {
@@ -977,19 +968,13 @@ static void TermCompletionOnAll(char *currentline, char *defaultPattern,
977 { 968 {
978 char *result = NULL; 969 char *result = NULL;
979 char *partResult = NULL; 970 char *partResult = NULL;
980 char *new_line = NULL;
981 971
982 result = commonAll; 972 result = commonAll;
983 partResult = &result[strlen(defaultPattern)]; 973 partResult = &result[strlen(defaultPattern)];
984 new_line = (char*)MALLOC(sizeof(char)*(strlen(currentline)+ strlen(partResult)));
985 974
986 if (new_line) 975 strcpy(wk_buf, currentline);
987 { 976 CopyLineAtPrompt(wk_buf, strcat(wk_buf,partResult), cursor, cursor_max);
988 strcpy(new_line, currentline); 977
989 strcat(new_line,partResult);
990 CopyLineAtPrompt(wk_buf, new_line, cursor, cursor_max);
991 FREE(new_line);
992 }
993 FREE(commonAll); 978 FREE(commonAll);
994 commonAll = NULL; 979 commonAll = NULL;
995 } 980 }