* Bug #12162 fixed - tbx_build_blocks did not report errors.
+* Bug #12167 fixed - Text of ports in superblocks were not updated.
+
Documentation
==============
Compilation
============
-* Enforce a minimal version of Scirenderer (1.0.3).
+* Enforce a minimal version of Scirenderer (1.0.4).
* Enforce a minimal version of Flexdock (1.2.1).
* Bug #12204 fixed - Fix a typo in the French localization
+* Bug #12219 fixed - delete("all") does not recreate a basic axe within cleaned figure.
+
Changes between version 5.3.3 and 5.4.0
=======================================
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking minimal version (1.0.3) of scirenderer" >&5
-$as_echo_n "checking minimal version (1.0.3) of scirenderer... " >&6; }
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking minimal version (1.0.4) of scirenderer" >&5
+$as_echo_n "checking minimal version (1.0.4) of scirenderer... " >&6; }
saved_ac_java_classpath=$ac_java_classpath
export ac_java_classpath="$SCIRENDERER:$ac_java_classpath"
if test "x" == "x"; then
public class conftest {
public static void main(String[] argv) {
- String minVersion="1.0.3";
+ String minVersion="1.0.4";
System.out.println(PackageInfo.VERSION);
if (compare(minVersion, PackageInfo.VERSION) > 0) {
STDOUT=`cat conftest.java.output`
fi
echo "configure: CLASSPATH was $CLASSPATH" >&5
- as_fn_error $? "Wrong version of scirenderer. Expected at least 1.0.3. Found $STDOUT" "$LINENO" 5
+ as_fn_error $? "Wrong version of scirenderer. Expected at least 1.0.4. Found $STDOUT" "$LINENO" 5
fi
fi
if test -f conftest.java.output; then
echo "configure: failed program was:" >&5
cat conftest.java >&5
echo "configure: CLASSPATH was $CLASSPATH" >&5
- as_fn_error $? "Wrong version of scirenderer. Expected at least 1.0.3. Found $STDOUT" "$LINENO" 5
+ as_fn_error $? "Wrong version of scirenderer. Expected at least 1.0.4. Found $STDOUT" "$LINENO" 5
fi
else
public class conftest {
public static void main(String[] argv) {
- String minVersion="1.0.3";
+ String minVersion="1.0.4";
System.out.println(PackageInfo.VERSION);
if (compare(minVersion, PackageInfo.VERSION) != 0) {
STDOUT=`cat conftest.java.output`
fi
echo "configure: CLASSPATH was $CLASSPATH" >&5
- as_fn_error $? "Wrong version of scirenderer. Expected exact version 1.0.3. Found $STDOUT" "$LINENO" 5
+ as_fn_error $? "Wrong version of scirenderer. Expected exact version 1.0.4. Found $STDOUT" "$LINENO" 5
fi
fi
if test -f conftest.java.output; then
echo "configure: failed program was:" >&5
cat conftest.java >&5
echo "configure: CLASSPATH was $CLASSPATH" >&5
- as_fn_error $? "Wrong version of scirenderer. Expected exact version 1.0.3. Found $STDOUT" "$LINENO" 5
+ as_fn_error $? "Wrong version of scirenderer. Expected exact version 1.0.4. Found $STDOUT" "$LINENO" 5
fi
fi
SCIRENDERER=$PACKAGE_JAR_FILE
AC_SUBST(SCIRENDERER)
- AC_JAVA_CHECK_VERSION_PACKAGE([scirenderer],[import org.scilab.forge.scirenderer.PackageInfo;],$SCIRENDERER,[1.0.3],[PackageInfo.VERSION])
+ AC_JAVA_CHECK_VERSION_PACKAGE([scirenderer],[import org.scilab.forge.scirenderer.PackageInfo;],$SCIRENDERER,[1.0.4],[PackageInfo.VERSION])
# Docking system
AC_JAVA_CHECK_PACKAGE([flexdock],[org.flexdock.docking.DockingManager],[Scilab Gui])
<load on="documentationGeneration"/>
</path>
-<path value="$SCILAB/thirdparty/scirenderer-1.0.3.jar" load="onUse">
+<path value="$SCILAB/thirdparty/scirenderer-1.0.4.jar" load="onUse">
<load on="graphics"/>
<load on="graphic_ojects"/>
<load on="Xcos"/>
printf(gettext(" loading initial environment") + "\n");
end
-if ((getscilabmode() == "NWNI" | getscilabmode() == "NW") & sciargs()<>"-nb")
+if ((getscilabmode() == "NWNI" | getscilabmode() == "NW") & ~fromjava() & ~fromc() & sciargs()<>"-nb")
[v, opts] = getversion()
printf(strsubst(v, "scilab-", "Scilab ") + " (" + opts($-1) + ", " + opts($) + ")");
clear v, opts;
--- /dev/null
+// =============================================================================
+// Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
+// Copyright (C) 2012 - SE - Sylvestre Ledru
+//
+// This file is distributed under the same license as the Scilab package.
+// =============================================================================
+nx = 10;
+nev = 3;
+ncv = 6;
+bmat = 'I';
+which = 'LM';
+// Local Arrays
+iparam = zeros(11, 1);
+ipntr = zeros(14, 1);
+_select = zeros(ncv, 1);
+d = zeros(nev + 1, 1) + 0 * %i;
+z = zeros(nx, nev) + 0* %i;
+resid = zeros(nx, 1) + 0 * %i;
+v = zeros(nx, ncv) + 0 * %i;
+workd = zeros(3 * nx, 1) + 0 * %i;
+workev = zeros(2 * ncv, 1) + 0 * %i;
+rwork = zeros(ncv, 1);
+workl = zeros(3 * ncv * ncv + 5 *ncv, 1) + 0 * %i;
+// Build the complex test matrix
+A = diag(10 * ones(nx,1) + %i * ones(nx,1));
+A(1:$-1,2:$) = A(1:$-1,2:$) + diag(6 * ones(nx - 1,1));
+A(2:$,1:$-1) = A(2:$,1:$-1) + diag(-6 * ones(nx - 1,1));
+tol = 0;
+ido = 0;
+ishfts = 1;
+maxitr = 300;
+mode1 = 1;
+iparam(1) = ishfts;
+iparam(3) = maxitr;
+iparam(7) = mode1;
+sigma = complex(0);
+info_znaupd = 0;
+// M A I N L O O P (Reverse communication)
+while(ido <> 99)
+ // Repeatedly call the routine ZNAUPD and take actions indicated by parameter IDO until
+ // either convergence is indicated or maxitr has been exceeded.
+ [ido, resid, v, iparam, ipntr, workd, workl, info_znaupd] = znaupd(ido, bmat, nx, which, nev, tol, resid, ncv, v, iparam, ipntr, workd, workl, rwork, info_znaupd);
+ if(info_znaupd < 0)
+ printf('\nError with znaupd, info = %d\n', info_znaupd);
+ printf('Check the documentation of znaupd\n\n');
+ end
+ if(ido == -1 | ido == 1)
+ // Perform matrix vector multiplication
+ workd(ipntr(2):ipntr(2) + nx - 1) = A * workd(ipntr(1):ipntr(1) + nx - 1);
+ end
+end
+// Post-Process using ZNEUPD.
+rvec = 1;
+howmany = 'A';
+info_zneupd = 0;
+[d, z, resid, iparam, ipntr, workd, workl, rwork, info_zneupd] = zneupd(rvec, howmany, _select, d, z, sigma, workev, bmat, nx, which, nev, tol, resid, ncv, v, ...
+ iparam, ipntr, workd, workl, rwork, info_zneupd);
+assert_checkalmostequal(A * z, z * diag(d(1:3)), sqrt(%eps), 1.e-10);
--- /dev/null
+// =============================================================================
+// Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
+// Copyright (C) 2012 - SE - Sylvestre Ledru
+//
+// This file is distributed under the same license as the Scilab package.
+// =============================================================================
+// <-- WINDOWS ONLY -->
+nx = 10;
+
+nev = 3;
+ncv = 6;
+bmat = 'I';
+which = 'LM';
+
+// Local Arrays
+
+iparam = zeros(11, 1);
+ipntr = zeros(14, 1);
+_select = zeros(ncv, 1);
+d = zeros(nev + 1, 1) + 0 * %i;
+z = zeros(nx, nev) + 0* %i;
+resid = zeros(nx, 1) + 0 * %i;
+v = zeros(nx, ncv) + 0 * %i;
+workd = zeros(3 * nx, 1) + 0 * %i;
+workev = zeros(2 * ncv, 1) + 0 * %i;
+rwork = zeros(ncv, 1);
+workl = zeros(3 * ncv * ncv + 5 *ncv, 1) + 0 * %i;
+
+// Build the complex test matrix
+A = diag(10 * ones(nx,1) + %i * ones(nx,1));
+A(1:$-1,2:$) = A(1:$-1,2:$) + diag(6 * ones(nx - 1,1));
+A(2:$,1:$-1) = A(2:$,1:$-1) + diag(-6 * ones(nx - 1,1));
+
+tol = 0;
+ido = 0;
+
+ishfts = 1;
+maxitr = 300;
+mode1 = 1;
+
+iparam(1) = ishfts;
+iparam(3) = maxitr;
+iparam(7) = mode1;
+
+sigma = complex(0);
+info_znaupd = 0;
+// M A I N L O O P (Reverse communication)
+while(ido <> 99)
+ // Repeatedly call the routine ZNAUPD and take actions indicated by parameter IDO until
+ // either convergence is indicated or maxitr has been exceeded.
+
+ [ido, resid, v, iparam, ipntr, workd, workl, info_znaupd] = znaupd(ido, bmat, nx, which, nev, tol, resid, ncv, v, iparam, ipntr, workd, workl, rwork, info_znaupd);
+
+ if(info_znaupd < 0)
+ printf('\nError with znaupd, info = %d\n', info_znaupd);
+ printf('Check the documentation of znaupd\n\n');
+ end
+
+ if(ido == -1 | ido == 1)
+ // Perform matrix vector multiplication
+ workd(ipntr(2):ipntr(2) + nx - 1) = A * workd(ipntr(1):ipntr(1) + nx - 1);
+ end
+end
+
+// Post-Process using ZNEUPD.
+
+rvec = 1;
+howmany = 'A';
+info_zneupd = 0;
+
+[d, z, resid, iparam, ipntr, workd, workl, rwork, info_zneupd] = zneupd(rvec, howmany, _select, d, z, sigma, workev, bmat, nx, which, nev, tol, resid, ncv, v, ...
+ iparam, ipntr, workd, workl, rwork, info_zneupd);
+
+assert_checkalmostequal(A * z, z * diag(d(1:3)), sqrt(%eps), 1.e-10);
//
// This file is distributed under the same license as the Scilab package.
// =============================================================================
-
+// <-- UNIX ONLY -->
nx = 10;
nev = 3;
--- /dev/null
+// =============================================================================
+// Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
+// Copyright (C) 2012 - SE - Sylvestre Ledru
+//
+// This file is distributed under the same license as the Scilab package.
+// =============================================================================
+nx = 10;
+nev = 3;
+ncv = 6;
+bmat = 'I';
+which = 'LM';
+// Local Arrays
+iparam = zeros(11, 1);
+ipntr = zeros(14, 1);
+_select = zeros(ncv, 1);
+d = zeros(nev + 1, 1) + 0 * %i;
+z = zeros(nx, nev) + 0* %i;
+resid = zeros(nx, 1) + 0 * %i;
+v = zeros(nx, ncv) + 0 * %i;
+workd = zeros(3 * nx, 1) + 0 * %i;
+workev = zeros(2 * ncv, 1) + 0 * %i;
+rwork = zeros(ncv, 1);
+workl = zeros(3 * ncv * ncv + 5 *ncv, 1) + 0 * %i;
+// Build the complex test matrix
+A = diag(10 * ones(nx,1) + %i * ones(nx,1));
+A(1:$-1,2:$) = A(1:$-1,2:$) + diag(6 * ones(nx - 1,1));
+A(2:$,1:$-1) = A(2:$,1:$-1) + diag(-6 * ones(nx - 1,1));
+tol = 0;
+ido = 0;
+ishfts = 1;
+maxitr = 300;
+mode1 = 1;
+iparam(1) = ishfts;
+iparam(3) = maxitr;
+iparam(7) = mode1;
+sigma = complex(0);
+info_znaupd = 0;
+// M A I N L O O P (Reverse communication)
+while(ido <> 99)
+ // Repeatedly call the routine ZNAUPD and take actions indicated by parameter IDO until
+ // either convergence is indicated or maxitr has been exceeded.
+ [ido, resid, v, iparam, ipntr, workd, workl, info_znaupd] = znaupd(ido, bmat, nx, which, nev, tol, resid, ncv, v, iparam, ipntr, workd, workl, rwork, info_znaupd);
+ if(info_znaupd < 0)
+ printf('\nError with znaupd, info = %d\n', info_znaupd);
+ printf('Check the documentation of znaupd\n\n');
+ end
+ if(ido == -1 | ido == 1)
+ // Perform matrix vector multiplication
+ workd(ipntr(2):ipntr(2) + nx - 1) = A * workd(ipntr(1):ipntr(1) + nx - 1);
+ end
+end
+// Post-Process using ZNEUPD.
+rvec = 1;
+howmany = 'A';
+info_zneupd = 0;
+[d, z, resid, iparam, ipntr, workd, workl, rwork, info_zneupd] = zneupd(rvec, howmany, _select, d, z, sigma, workev, bmat, nx, which, nev, tol, resid, ncv, v, ...
+ iparam, ipntr, workd, workl, rwork, info_zneupd);
+assert_checkalmostequal(A * z, z * diag(d(1:3)), sqrt(%eps), 1.e-10);
--- /dev/null
+// =============================================================================
+// Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
+// Copyright (C) 2012 - SE - Sylvestre Ledru
+//
+// This file is distributed under the same license as the Scilab package.
+// =============================================================================
+// <-- WINDOWS ONLY -->
+nx = 10;
+
+nev = 3;
+ncv = 6;
+bmat = 'I';
+which = 'LM';
+
+// Local Arrays
+
+iparam = zeros(11, 1);
+ipntr = zeros(14, 1);
+_select = zeros(ncv, 1);
+d = zeros(nev + 1, 1) + 0 * %i;
+z = zeros(nx, nev) + 0* %i;
+resid = zeros(nx, 1) + 0 * %i;
+v = zeros(nx, ncv) + 0 * %i;
+workd = zeros(3 * nx, 1) + 0 * %i;
+workev = zeros(2 * ncv, 1) + 0 * %i;
+rwork = zeros(ncv, 1);
+workl = zeros(3 * ncv * ncv + 5 *ncv, 1) + 0 * %i;
+
+// Build the complex test matrix
+A = diag(10 * ones(nx,1) + %i * ones(nx,1));
+A(1:$-1,2:$) = A(1:$-1,2:$) + diag(6 * ones(nx - 1,1));
+A(2:$,1:$-1) = A(2:$,1:$-1) + diag(-6 * ones(nx - 1,1));
+
+tol = 0;
+ido = 0;
+
+ishfts = 1;
+maxitr = 300;
+mode1 = 1;
+
+iparam(1) = ishfts;
+iparam(3) = maxitr;
+iparam(7) = mode1;
+
+sigma = complex(0);
+info_znaupd = 0;
+// M A I N L O O P (Reverse communication)
+while(ido <> 99)
+ // Repeatedly call the routine ZNAUPD and take actions indicated by parameter IDO until
+ // either convergence is indicated or maxitr has been exceeded.
+
+ [ido, resid, v, iparam, ipntr, workd, workl, info_znaupd] = znaupd(ido, bmat, nx, which, nev, tol, resid, ncv, v, iparam, ipntr, workd, workl, rwork, info_znaupd);
+
+ if(info_znaupd < 0)
+ printf('\nError with znaupd, info = %d\n', info_znaupd);
+ printf('Check the documentation of znaupd\n\n');
+ end
+
+ if(ido == -1 | ido == 1)
+ // Perform matrix vector multiplication
+ workd(ipntr(2):ipntr(2) + nx - 1) = A * workd(ipntr(1):ipntr(1) + nx - 1);
+ end
+end
+
+// Post-Process using ZNEUPD.
+
+rvec = 1;
+howmany = 'A';
+info_zneupd = 0;
+
+[d, z, resid, iparam, ipntr, workd, workl, rwork, info_zneupd] = zneupd(rvec, howmany, _select, d, z, sigma, workev, bmat, nx, which, nev, tol, resid, ncv, v, ...
+ iparam, ipntr, workd, workl, rwork, info_zneupd);
+
+assert_checkalmostequal(A * z, z * diag(d(1:3)), sqrt(%eps), 1.e-10);
//
// This file is distributed under the same license as the Scilab package.
// =============================================================================
-
+// <-- UNIX ONLY -->
nx = 10;
nev = 3;
</member>
</simplelist>
</refsection>
+
+ <refsection>
+ <title>Examples</title>
+ <programlisting role="example"><![CDATA[
+a=0.5;
+b=1;
+c=2;
+sl=syslin('c',a,b,c);
+dtsi(sl)
+ ]]></programlisting>
+ </refsection>
<refsection>
<title>History</title>
<revhistory>
<para>
returns <literal>gm</literal> with <literal>gm</literal> and <literal>gm^-1</literal> stable such that:
</para>
- <programlisting><![CDATA[
+ <programlisting role="no-scilab-exec"><![CDATA[
gtild(g)*g = gtild(gm)*gm
]]></programlisting>
<para>
Imaginary-axis poles are forbidden.
</para>
</refsection>
+
+ <refsection>
+ <title>Examples</title>
+ <programlisting role="example"><![CDATA[
+a=0.5;
+b=1;
+c=2;
+sl=syslin('c',a,b,c);
+fspecg(sl)
+ ]]></programlisting>
+ </refsection>
<refsection>
<title>History</title>
<revhistory>
<literal>inv(S)</literal> when <literal>S</literal> is a <literal>syslin</literal> list.
</para>
</refsection>
+
+ <refsection>
+ <title>Examples</title>
+ <programlisting role="example"><![CDATA[
+a=0.5;
+b=1;
+c=2;
+sl=syslin('c',a,b,c);
+slInversed=invsyslin(sl)
+ ]]></programlisting>
+ </refsection>
<refsection role="see also">
<title>See Also</title>
<simplelist type="inline">
See example in <literal>lqg2stan</literal>.
</para>
</refsection>
+
+ <refsection>
+ <title>Examples</title>
+ <programlisting role="example"><![CDATA[
+ s=poly(0,'s');
+ Plant=syslin('c',[1/(s+1)*s/(s-1)^2]); //Nominal Plant
+ P22=tf2ss(Plant); //...in state-space form
+ [ny,nu,nx]=size(P22);
+ rand('seed',0);rand('normal');
+ bigQ=rand(nx+nu,nx+nu);
+ bigQ=bigQ*bigQ';
+ bigR=rand(nx+ny,nx+ny);
+ bigR=bigR*bigR'; //random weighting matrices
+ [Plqg,r]=lqg2stan(P22,bigQ,bigR); //LQG pb as a standard problem
+ Klqg=lqg(Plqg,r); //Controller
+ spec(h_cl(Plqg,r,Klqg)) //Check internal stability
+ [Slqg,Rlqg,Tlqg]=sensi(P22,Klqg); //Sensitivity functions
+ frq=logspace(-3,3); //10^-3 to 10^3
+ y=svplot(Slqg); //Computes singular values;
+ gainplot(frq,y) //Plot sing. values
+ ]]></programlisting>
+ <scilab:image>
+ s=poly(0,'s');
+ Plant=syslin('c',[1/(s+1)*s/(s-1)^2]); //Nominal Plant
+ P22=tf2ss(Plant); //...in state-space form
+ [ny,nu,nx]=size(P22);
+ rand('seed',0);rand('normal');
+ bigQ=rand(nx+nu,nx+nu);
+ bigQ=bigQ*bigQ';
+ bigR=rand(nx+ny,nx+ny);
+ bigR=bigR*bigR'; //random weighting matrices
+ [Plqg,r]=lqg2stan(P22,bigQ,bigR); //LQG pb as a standard problem
+ Klqg=lqg(Plqg,r); //Controller
+ spec(h_cl(Plqg,r,Klqg)) //Check internal stability
+ [Slqg,Rlqg,Tlqg]=sensi(P22,Klqg); //Sensitivity functions
+ frq=logspace(-3,3); //10^-3 to 10^3
+ y=svplot(Slqg); //Computes singular values;
+ gainplot(frq,y) //Plot sing. values
+ </scilab:image>
+ </refsection>
<refsection role="see also">
<title>See Also</title>
<simplelist type="inline">
<literal>R</literal> is strictly proper and <literal>- R~</literal> is stable
(i.e. <literal>R</literal> is anti stable).
</para>
- <programlisting role=""><![CDATA[
+ <programlisting role="no-scilab-exec"><![CDATA[
|| R - X ||oo = min || R - Y ||oo
Y in Hoo
]]></programlisting>
<refsynopsisdiv>
<title>Calling Sequence</title>
<synopsis>hallchart([ modules [,args [,colors]]])</synopsis>
- <synopsis/>
+
</refsynopsisdiv>
<refsection>
<title>Arguments</title>
with <literal>G=B/R*B'</literal>
</para>
</refsection>
+
+ <refsection>
+ <title>Examples</title>
+ <programlisting role="example"><![CDATA[
+h=[0.5,4;
+0,-0.5]
+x=ric_desc(h)
+ ]]></programlisting>
+ </refsection>
<refsection role="see also">
<title>See Also</title>
<simplelist type="inline">
such that <literal>X=X1/X2</literal>.
</para>
</refsection>
+ <refsection>
+ <title>Examples</title>
+ <programlisting role="example"><![CDATA[
+// Continuous
+n = 10;
+A = rand(n,n);
+B = rand(n,n);
+C = rand(n,n);
+C = C*C';
+R = rand(n,n);
+R = R*R'+eye();
+B = B*inv(R)*B';
+
+
+X = riccati(A,B,C,'c','eigen')
+ ]]></programlisting>
+ <programlisting role="example"><![CDATA[
+// Discrete
+
+n = 10;
+F = rand(n,n);
+G1 = rand(n,n);
+G2 = rand(n,n);
+G2 = G2*G2'+eye();
+G = G1/G2*G1';
+H = rand(n,n);
+H = H*H';
+
+[X1,X2]= riccati(F,G,H,'d','schur')
+ ]]></programlisting>
+ </refsection>
+
<refsection role="see also">
<title>See Also</title>
<simplelist type="inline">
<refsection>
<title>Examples</title>
<programlisting role="example"><![CDATA[
-G=ssrand(1,1,3);K=ssrand(1,1,3);
+G=ssrand(1,1,3);
+K=ssrand(1,1,3);
[Se,Re,Te]=sensi(G,K);
Se1=inv(eye()+G*K); //Other way to compute
ss2tf(Se) //Se seen in transfer form
of the linear system <literal>Sl</literal>. <literal>nx</literal> is the number of states of <literal>Sl</literal>.
</para>
</refsection>
+
+ <refsection>
+ <title>Examples</title>
+ <programlisting role="example"><![CDATA[
+
+a=[-2.2567e-02 -36.617 -18.897 -32.090 3.2509 -7.6257e-1;
+ 9.2572e-05 -1.8997 9.8312e-01 -7.2562e-04 -1.7080e-01 -4.9652e-03;
+ 1.2338e-02 11.720 -2.6316 8.7582e-04 -31.604 22.396;
+ 0 0 1 0 0 0 ;
+ 0 0 0 0 -30 0 ;
+ 0 0 0 0 0 -30 ];
+
+b=0*ones(6,2);
+b(5,1)=30;
+b(6,2)=30;
+c=0*ones(2,6);
+c(1,2)=1;
+c(2,4)=1;
+G=syslin('c',a,b,c);
+r=syssize(G)
+ ]]></programlisting>
+
+ </refsection>
+
<refsection role="see also">
<title>See Also</title>
<simplelist type="inline">
<refsynopsisdiv>
<title>呼び出し手順</title>
<synopsis>hallchart([ modules [,args [,colors]]])</synopsis>
- <synopsis/>
+
</refsynopsisdiv>
<refsection>
<title>パラメータ</title>
<refsynopsisdiv>
<title>呼び出し手順</title>
<synopsis>nicholschart([ modules [,args [,colors]]])</synopsis>
- <synopsis/>
+
</refsynopsisdiv>
<refsection>
<title>引数</title>
strcpy(JOB, lastjob);
}
else
+ {
strncpy(JOB, lastjob, nbcharsJOB);
+ }
return TRUE;
}
return FALSE;
else
{
fprintf(stderr, "Error: SendScilabJobs (2) 'jobs[%d] == NULL'.\n", i);
+ FREE(LOCALJOBS);
return retcode;
}
}
bOK = TRUE;
}
else
+ {
break;
+ }
}
return bOK;
}
}
if (idx >= 0)
+ {
line[idx] = '\0';
+ }
return FALSE;
}
// =============================================================================
macros_error_type_4 = ["max"; ..
"min"; ..
-"fprintf"; ..
"system"];
msg_error_ref_4 = _("%s: Wrong number of input argument(s).\n");
for i=1:size(macros_error_type_4, "*")
assert_checkerror (macros_error_type_4(i) + "()" , msg_error_ref_4 , [] , macros_error_type_4(i));
end
+wMode = warning("query");
+warning("off")
+assert_checkerror ("fprintf()" , msg_error_ref_4 , [] , "fprintf");
// =============================================================================
macros_error_type_5 = ["resize_matrix"];
msg_error_ref_5 = _("%s: Wrong number of input argument(s): %d to %d expected.\n");
assert_checkerror (macros_error_type_5(i) + "()" , msg_error_ref_5 , [] , macros_error_type_5(i) , 3, 4);
end
// =============================================================================
+warning(wMode);
\ No newline at end of file
// =============================================================================
macros_error_type_4 = ["max"; ..
"min"; ..
-"fprintf"; ..
"system"];
msg_error_ref_4 = _("%s: Wrong number of input argument(s).\n");
for i=1:size(macros_error_type_4, "*")
assert_checkerror (macros_error_type_4(i) + "()" , msg_error_ref_4 , [] , macros_error_type_4(i));
end
+wMode = warning("query");
+warning("off")
+assert_checkerror ("fprintf()" , msg_error_ref_4 , [] , "fprintf");
// =============================================================================
macros_error_type_5 = ["resize_matrix"];
msg_error_ref_5 = _("%s: Wrong number of input argument(s): %d to %d expected.\n");
assert_checkerror (macros_error_type_5(i) + "()" , msg_error_ref_5 , [] , macros_error_type_5(i) , 3, 4);
end
// =============================================================================
-
+warning(wMode);
checking is done on <literal>ai</literal>'s.
</para>
</refsection>
+ <refsection>
+ <title>Examples</title>
+ <programlisting role="example"><![CDATA[
+s=poly(0,'s');
+W=[1/s,1/(s+1)]
+W'*W
+Num=[s,s+2;1,s];
+Den=[s*s,s;s,s*s];
+rlist(Num,Den,[])
+ ]]></programlisting>
+ </refsection>
+
<refsection role="see also">
<title>See Also</title>
<simplelist type="inline">
<member>
<link linkend="syslin">syslin</link>
</member>
+ <member>
+ <link linkend="rational">rational</link>
+ </member>
</simplelist>
</refsection>
</refentry>
<para>
</para>
</refsection>
+ <refsection>
+ <title>Exemples</title>
+ <programlisting role="example"><![CDATA[
+s=poly(0,'s');
+W=[1/s,1/(s+1)]
+W'*W
+Num=[s,s+2;1,s];
+Den=[s*s,s;s,s*s];
+rlist(Num,Den,[])
+ ]]></programlisting>
+ </refsection>
<refsection role="see also">
<title>Voir aussi</title>
<simplelist type="inline">
<member>
<link linkend="syslin">syslin</link>
</member>
+ <member>
+ <link linkend="rational">rational</link>
+ </member>
</simplelist>
</refsection>
</refentry>
//
// <-- Short Description -->
// regression fscanf
+wMode = warning("query");
+warning("off");
fln = TMPDIR + filesep() +'bug_3905.txt';
strs = ['txt1','txt2','txt3'];
mputl(strs, fln);
file('close',fi);
ierr = execstr("fscanf(9999,''%s'');","errcatch");
if ierr <> 999 then bugmes();quit;end
+warning(wMode);
// <-- Short Description -->
// regression fscanf
+wMode = warning("query");
+warning("off");
+
fln = TMPDIR + filesep() +'bug_3905.txt';
strs = ['txt1','txt2','txt3'];
mputl(strs, fln);
ierr = execstr("fscanf(9999,''%s'');","errcatch");
if ierr <> 999 then pause,end
+
+warning(wMode);
\ No newline at end of file
// <-- Short Description -->
// fscanf did not manage file descriptor as input argument
//
+wMode = warning("query");
+warning("off");
text =["blablabla"];
mputl(text, TMPDIR + "/test1.txt");
s1 = fscanf(TMPDIR + "/test1.txt", "%s");
mclose(fd);
if text <> s2 then bugmes();quit;end
if s1 <> s2 then bugmes();quit;end
+warning(wMode);
// fscanf did not manage file descriptor as input argument
//
+wMode = warning("query");
+warning("off");
+
text =["blablabla"];
mputl(text, TMPDIR + "/test1.txt");
s1 = fscanf(TMPDIR + "/test1.txt", "%s");
if text <> s2 then pause, end
if s1 <> s2 then pause, end
+
+warning(wMode);
\ No newline at end of file
//
// <-- Short Description -->
// fscanf did not check number of input arguments
+wMode = warning("query");
+warning("off");
msgError = gettext("%s: Wrong number of input arguments: %d expected.\n");
assert_checkerror ("fscanf()", msgError , [] , "fscanf" , 2);
msgError = gettext("%s: Wrong number of input arguments: %d expected.\n");
mputl(string(1:4), TMPDIR + "/bug_9869.dat");
R = fscanf(TMPDIR + "/bug_9869.dat","%d");
assert_checkequal(R, 1);
+warning(wMode);
// <-- Short Description -->
// fscanf did not check number of input arguments
+wMode = warning("query");
+warning("off");
+
msgError = gettext("%s: Wrong number of input arguments: %d expected.\n");
assert_checkerror ("fscanf()", msgError , [] , "fscanf" , 2);
R = fscanf(TMPDIR + "/bug_9869.dat","%d");
assert_checkequal(R, 1);
+warning(wMode);
+
// <-- CLI SHELL MODE -->
// <-- NO CHECK ERROR OUTPUT -->
// =============================================================================
+wMode = warning("query");
+warning("off");
fprintf(0,'My error which is going to be displayed on the stderr');
fprintf(6,'My error which is going to be displayed on the stdout');
My error which is going to be displayed on the stdout
ierr = execstr('fprintf(6,FMTS,5)','errcatch');
if ierr <> 999 then bugmes();quit;end
// =============================================================================
+warning(wMode);
// <-- CLI SHELL MODE -->
// <-- NO CHECK ERROR OUTPUT -->
// =============================================================================
+wMode = warning("query");
+warning("off");
fprintf(0,'My error which is going to be displayed on the stderr');
fprintf(6,'My error which is going to be displayed on the stdout');
// =============================================================================
ierr = execstr('fprintf(6,FMTS,5)','errcatch');
if ierr <> 999 then pause,end
// =============================================================================
+warning(wMode);
\ No newline at end of file
// =========================================================================
fd = mopen(fileName+'_open','w');
if (fileinfo(fileName+'_open')==[]) then bugmes();quit;end
+ wMode = warning("query");
+ warning("off");
fprintf(fd,'%s %f',specialName+'3',%pi);
+ warning(wMode);
filestuff=fileinfo(fileName+'_open');
if (filestuff==[] & filestuff(1)>0) then bugmes();quit;end
mclose(fd);
// =========================================================================
fd = mopen(fileName+'_open','w');
if (fileinfo(fileName+'_open')==[]) then pause, end
+ wMode = warning("query");
+ warning("off");
fprintf(fd,'%s %f',specialName+'3',%pi);
+ warning(wMode);
filestuff=fileinfo(fileName+'_open');
if (filestuff==[] & filestuff(1)>0) then pause, end
mclose(fd);
// This file is distributed under the same license as the Scilab package.
// =============================================================================
// <-- CLI SHELL MODE -->
+wMode = warning("query");
+warning("off");
n = 50;
nstr = strcat(string(1:n),' ');
fstr = strcat(strsubst(string(ones(1,n)),'1','%d'), ' ');
123.
if a<>123|b<>456 then bugmes();quit;end
+warning(wMode);
// <-- CLI SHELL MODE -->
+wMode = warning("query");
+warning("off");
+
n = 50;
nstr = strcat(string(1:n),' ');
fstr = strcat(strsubst(string(ones(1,n)),'1','%d'), ' ');
if a<>4|b<>'test'|c<>23.45 then pause,end
[a,b]=sscanf('123\n456','%e%e')
-if a<>123|b<>456 then pause,end
\ No newline at end of file
+if a<>123|b<>456 then pause,end
+
+warning(wMode);
\ No newline at end of file
</refnamediv>
<refsynopsisdiv>
<title>Calling Sequence</title>
- <synopsis/>
+
</refsynopsisdiv>
<refsection>
<title>Description</title>
<title>Description</title>
<para>
returns as a character string
- the name of the library containing the function <literal>function-name</literal>.
+ the name of the library containing the function <literal>function-name</literal>.
The path of the library is returned by typing <literal>"librname"</literal>.
</para>
</refsection>
+ <refsection>
+ <title>Exemples</title>
+ <programlisting role="example"><![CDATA[
+whereis("ls") // Should return fileiolib
+whereis("plot") // Should return graphicslib
+ ]]></programlisting>
+ </refsection>
+
<refsection role="see also">
<title>See Also</title>
<simplelist type="inline">
//get execution profiles
plotprofile(foo) // click on Exit to exit
]]></programlisting>
+
+ <programlisting role="example"><![CDATA[
+// with the exec function
+tmpfile = TMPDIR + "/myFunction.sci";
+mputl(["function myFunction()"
+ "runs = 50;"
+ "b = 0;"
+ "for i = 1:runs"
+ " b = zeros(220, 220);"
+ " for j = 1:220"
+ " for k = 1:220"
+ " b(k,j) = abs(j - k) + 1;"
+ " end"
+ " end"
+ "end"
+ "endfunction"], tmpfile);
+
+exec(tmpfile)
+add_profiling("myFunction");
+myFunction();
+
+//get execution profiles
+plotprofile(myFunction) // click on Exit to exit
+ ]]></programlisting>
</refsection>
<refsection role="see also">
<title>See Also</title>
<refentry xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:svg="http://www.w3.org/2000/svg" xmlns:mml="http://www.w3.org/1998/Math/MathML" xmlns:db="http://docbook.org/ns/docbook" xmlns:scilab="http://www.scilab.org" xml:lang="fr" xml:id="whereis">
<refnamediv>
<refname>whereis</refname>
- <refpurpose>nom de la bibliothèque contenant une fonction </refpurpose>
+ <refpurpose>nom de la bibliothèque contenant une fonction</refpurpose>
</refnamediv>
<refsynopsisdiv>
<title>Séquence d'appel</title>
<title>Description</title>
<para>
Renvoie une chaîne de caractères contenant le nom de la bibliothèque contenant
- la fonction <literal>function-name</literal>.
+ la fonction <literal>function-name</literal>.
Le chemin d'accès à la bibliothèque peut être obtenu avec la fonction <literal>"librname"</literal>.
</para>
</refsection>
+ <refsection>
+ <title>Examples</title>
+ <programlisting role="example"><![CDATA[
+whereis("ls") // Devrait retourner fileiolib
+whereis("plot") // Devrait retourner graphicslib
+ ]]></programlisting>
+ </refsection>
+
<refsection role="see also">
<title>Voir aussi</title>
<simplelist type="inline">
</refnamediv>
<refsynopsisdiv>
<title>呼び出し手順</title>
- <synopsis/>
+
</refsynopsisdiv>
<refsection>
<title>説明</title>
</refnamediv>
<refsynopsisdiv>
<title>Seqüência de Chamamento</title>
- <synopsis/>
+
</refsynopsisdiv>
<refsection>
<title>Descrição</title>
return DataModel::get()->getGraphicObjectProperty(_pstID, _iName, _pvData);
}
- static void getGraphicObjectIntProperty(char const* _pstID, int _iName, void **_pvData)
- {
- return DataModel::get()->getGraphicObjectIntProperty(_pstID, _iName, _pvData);
- }
-
static char const* createDataObject(char const* _pstID, int _iType)
{
return DataModel::get()->createDataObject(_pstID, _iType);
/** Returns a graphic object vector property */
void getGraphicObjectProperty(char const* _pstID, int _iName, void **_pvData);
- /**
- * Returns a graphic object integer property
- * Implemented in order to avoid returning the address of a
- * static local variable across too many function calls (see the getProperty
- * methods of the different Data classes when integer values are returned)
- * Probably redundant with getGraphicObjectProperty
- */
- void getGraphicObjectIntProperty(char const* _pstID, int _iName, void **_pvData);
-
/** Creates a data object */
char const* createDataObject(char const* _pstID, int _iType);
dataObject->getDataProperty(property, _pvData);
}
-void DataModel::getGraphicObjectIntProperty(char const* _pstID, int _iName, void **_pvData)
-{
- Data3D* dataObject = NULL;
- int property = 0;
-
- property = (*m_dataMap)[std::string(_pstID)]->getPropertyFromName(_iName);
-
- dataObject->getDataProperty(property, _pvData);
-}
-
char const* DataModel::createDataObject(char const* _pstID, int _iType)
{
Data3D* newObject = NULL;
* (getTypeFromName) in order to avoid strcmp calls.
*/
- switch (_iType) {
- case __GO_GRAYPLOT__ :
- newObject = new NgonGridData();
- break;
- case __GO_MATPLOT__ :
- newObject = new NgonGridMatplotData();
- break;
- case __GO_FAC3D__ :
- newObject = new NgonGeneralData();
- break;
- case __GO_PLOT3D__ :
- newObject = new NgonGridData();
- break;
- case __GO_POLYLINE__ :
- newObject = new NgonPolylineData();
- break;
- case __GO_FEC__ :
- newObject = new TriangleMeshFecData();
- break;
- default :
- return NULL;
+ switch (_iType)
+ {
+ case __GO_GRAYPLOT__ :
+ newObject = new NgonGridData();
+ break;
+ case __GO_MATPLOT__ :
+ newObject = new NgonGridMatplotData();
+ break;
+ case __GO_FAC3D__ :
+ newObject = new NgonGeneralData();
+ break;
+ case __GO_PLOT3D__ :
+ newObject = new NgonGridData();
+ break;
+ case __GO_POLYLINE__ :
+ newObject = new NgonPolylineData();
+ break;
+ case __GO_FEC__ :
+ newObject = new TriangleMeshFecData();
+ break;
+ default :
+ return NULL;
}
(*m_dataMap)[std::string(_pstID)] = newObject;
deleteGraphicObject(childrenUID[i]);
}
}
+ /*
+ * Clone a new Axes object using the Axes model which is then
+ * attached to the 'cleaned' Figure.
+ */
+ cloneAxesModel(pFigureUID);
AssignOutputVariable(pvApiCtx, 1) = 0;
ReturnArguments(pvApiCtx);
}
}
+ if (isMatrixOfString)
+ {
+ freeArrayOfString((char **)_pvData, iRows3 * iCols3);
+ }
+
AssignOutputVariable(pvApiCtx, 1) = 0;
ReturnArguments(pvApiCtx);
}
--- /dev/null
+// =============================================================================
+// Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
+// Copyright (C) 2013 - Scilab Enterprises - Bruno JOFRET
+//
+// This file is distributed under the same license as the Scilab package.
+// =============================================================================
+//
+// <-- TEST WITH GRAPHIC -->
+//
+// <-- Non-regression test for bug 12219 -->
+//
+// <-- Bugzilla URL -->
+// http://bugzilla.scilab.org/show_bug.cgi?id=12219
+//
+// <-- Short Description -->
+// delete('all') delete current axes and does not create a new one
+f = gcf();
+oldAxeUID = f.children(1).UID;
+delete("all");
+assert_checkequal(size(f.children, '*'), 1);
+assert_checkequal(f.children(1).type, "Axes");
+assert_checktrue(f.children(1).UID <> oldAxeUID);
+plot2d();
+a = gca();
+assert_checkequal(size(a.children, '*'), 1);
+assert_checkequal(a.children(1).type, "Compound");
+delete('all');
+a = gca();
+assert_checkequal(size(a.children, '*'), 0);
+assert_checkequal(a.children, []);
--- /dev/null
+// =============================================================================
+// Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
+// Copyright (C) 2013 - Scilab Enterprises - Bruno JOFRET
+//
+// This file is distributed under the same license as the Scilab package.
+// =============================================================================
+//
+// <-- TEST WITH GRAPHIC -->
+//
+// <-- Non-regression test for bug 12219 -->
+//
+// <-- Bugzilla URL -->
+// http://bugzilla.scilab.org/show_bug.cgi?id=12219
+//
+// <-- Short Description -->
+// delete('all') delete current axes and does not create a new one
+
+f = gcf();
+oldAxeUID = f.children(1).UID;
+
+delete("all");
+
+assert_checkequal(size(f.children, '*'), 1);
+assert_checkequal(f.children(1).type, "Axes");
+assert_checktrue(f.children(1).UID <> oldAxeUID);
+
+plot2d();
+a = gca();
+assert_checkequal(size(a.children, '*'), 1);
+assert_checkequal(a.children(1).type, "Compound");
+delete('all');
+
+a = gca();
+assert_checkequal(size(a.children, '*'), 0);
+assert_checkequal(a.children, []);
+
status = H5Tset_size(memtype, iDim);
if (status < 0)
{
+ FREE(pstValue);
return NULL;
}
hsize_t* dims = (hsize_t*)MALLOC(sizeof(hsize_t) * *_iDims);
if (H5Sget_simple_extent_dims(space, dims, NULL) < 0)
{
+ FREE(dims);
return -1;
}
status = H5Dread(_iDatasetId, compoundId, H5S_ALL, H5S_ALL, H5P_DEFAULT, pData);
if (status < 0)
{
+ FREE(pData);
return -1;
}
#include "loadBackGroundClassPath.h"
#include "loadOnUseClassPath.h"
#include "localization.h"
+
+#ifdef _MSC_VER
+#include "getScilabJNIEnv.h"
+#include "getScilabJavaVM.h"
+#include "getScilabObject.h"
+#include "addToClasspath.h"
+#include "addToLibrarypath.h"
+#include "catchIfJavaException.h"
+#endif
+
/*--------------------------------------------------------------------------*/
JVM_IMPEXP int gw_jvm(void)
{
return 0;
}
+#ifdef _MSC_VER
+JNIEnv *getScilabJNIEnv(void)
+{
+ return NULL;
+}
+
+JavaVM *getScilabJavaVM(void)
+{
+ return NULL;
+}
+
+jobject getScilabObject(void)
+{
+ return NULL;
+}
+
+BOOL addToClasspath(char *classpathstring, typeOfLoad load)
+{
+ return FALSE;
+}
+
+BOOL addToLibrarypath(char *librarypathstring)
+{
+ return FALSE;
+}
+
+BOOL catchIfJavaException(char *errorMsg)
+{
+ return FALSE;
+}
+#endif
/*--------------------------------------------------------------------------*/
JVM_IMPEXP BOOL InitializeJVM(void)
{
/*--------------------------------------------------------------------------*/
/* BUG 10325: FORCE EXPORT canCloseMainScilabObject on Windows */
-JVM_IMPEXP BOOL canCloseMainScilabObject(void)
+BOOL canCloseMainScilabObject(void)
{
return TRUE;
}
/*--------------------------------------------------------------------------*/
/* BUG 10325: FORCE EXPORT forceCloseMainScilabObject on Windows */
-JVM_IMPEXP void forceCloseMainScilabObject(void)
+void forceCloseMainScilabObject(void)
{
}
<TargetMachine>MachineX86</TargetMachine>
<CLRUnmanagedCodeCheck>true</CLRUnmanagedCodeCheck>
<RandomizedBaseAddress>false</RandomizedBaseAddress>
+ <ModuleDefinitionFile>nolibjvm_export.def</ModuleDefinitionFile>
</Link>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
<TargetMachine>MachineX64</TargetMachine>
<CLRUnmanagedCodeCheck>true</CLRUnmanagedCodeCheck>
<RandomizedBaseAddress>false</RandomizedBaseAddress>
+ <ModuleDefinitionFile>nolibjvm_export.def</ModuleDefinitionFile>
</Link>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
<TargetMachine>MachineX86</TargetMachine>
<CLRUnmanagedCodeCheck>true</CLRUnmanagedCodeCheck>
<RandomizedBaseAddress>false</RandomizedBaseAddress>
+ <ModuleDefinitionFile>nolibjvm_export.def</ModuleDefinitionFile>
</Link>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
<TargetMachine>MachineX64</TargetMachine>
<CLRUnmanagedCodeCheck>true</CLRUnmanagedCodeCheck>
<RandomizedBaseAddress>false</RandomizedBaseAddress>
+ <ModuleDefinitionFile>nolibjvm_export.def</ModuleDefinitionFile>
</Link>
</ItemDefinitionGroup>
<ItemGroup>
<ReferenceOutputAssembly>false</ReferenceOutputAssembly>
</ProjectReference>
</ItemGroup>
+ <ItemGroup>
+ <None Include="nolibjvm_export.def" />
+ </ItemGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
<ImportGroup Label="ExtensionTargets">
</ImportGroup>
<Filter Include="Libraries Dependencies">
<UniqueIdentifier>{9c8bab13-f3d2-452b-9c1c-1694fefd0ef9}</UniqueIdentifier>
</Filter>
+ <Filter Include="Libraries Dependencies\Exports">
+ <UniqueIdentifier>{a507bbeb-a681-469c-b873-32951fed3162}</UniqueIdentifier>
+ </Filter>
</ItemGroup>
<ItemGroup>
<ClCompile Include="nojvm.c">
<Filter>Resource Files</Filter>
</ResourceCompile>
</ItemGroup>
+ <ItemGroup>
+ <None Include="nolibjvm_export.def">
+ <Filter>Libraries Dependencies\Exports</Filter>
+ </None>
+ </ItemGroup>
</Project>
\ No newline at end of file
--- /dev/null
+LIBRARY nolibjvm.dll
+
+
+EXPORTS
+; ---------------------------------------
+; jvm module explicit export (SEP 35)
+; ---------------------------------------
+getScilabJavaVM
+getScilabJNIEnv
+addToClasspath
+addToLibrarypath
+getScilabObject
+; ---------------------------------------
+canCloseMainScilabObject
+forceCloseMainScilabObject
\ No newline at end of file
if (ret==NULL)
{
fprintf(stderr, "Localization: Error while declaring the text domain %s\n", NAMELOCALIZATIONDOMAIN);
+ FREE(pathLocales);
return FALSE;
}
bind_textdomain_codeset (NAMELOCALIZATIONDOMAIN,"UTF-8"); /*such that gettext and dgettext return UTF8 string*/
/* MAXCHARSSCIPRINT_FULL is for sciprint_full - more than this gets truncated */
#define MAXCHARSSCIPRINT_FULL 5000
/*--------------------------------------------------------------------------*/
-void sciprint_full(char *fmt,...)
+void sciprint_full(char *fmt, ...)
{
- int lstr;
- va_list ap;
- char *s_buf=NULL;
- char *split_s_buf=NULL;
- int count=0;
- int p_s=0;
- static int colwidth;
+ int lstr;
+ va_list ap;
+ char *s_buf = NULL;
+ char *split_s_buf = NULL;
+ int count = 0;
+ int p_s = 0;
+ static int colwidth;
- s_buf=MALLOC(sizeof(char)*(MAXCHARSSCIPRINT_FULL+1));
- if (s_buf == (char *) 0)
- {
- sciprint(_("%s: No more memory.\n"),"sciprint_full");
- return;
- }
+ s_buf = MALLOC(sizeof(char) * (MAXCHARSSCIPRINT_FULL + 1));
+ if (s_buf == (char *) 0)
+ {
+ sciprint(_("%s: No more memory.\n"), "sciprint_full");
+ return;
+ }
- /* number of columns as set by command lines() */
- colwidth = getColumnsSize();
+ /* number of columns as set by command lines() */
+ colwidth = getColumnsSize();
- split_s_buf=MALLOC(sizeof(char)*(colwidth+1));
- if (split_s_buf == (char *) 0)
- {
- sciprint(_("%s: No more memory.\n"),"sciprint_full");
- return;
- }
+ split_s_buf = MALLOC(sizeof(char) * (colwidth + 1));
+ if (split_s_buf == (char *) 0)
+ {
+ sciprint(_("%s: No more memory.\n"), "sciprint_full");
+ FREE(s_buf);
+ return;
+ }
- va_start(ap,fmt);
+ va_start(ap, fmt);
#if defined(linux) || defined(_MSC_VER)
- count = vsnprintf (s_buf,MAXCHARSSCIPRINT_FULL-1, fmt, ap );
- if (count == -1)
- {
- s_buf[MAXCHARSSCIPRINT_FULL-1]='\0';
- }
+ count = vsnprintf (s_buf, MAXCHARSSCIPRINT_FULL - 1, fmt, ap );
+ if (count == -1)
+ {
+ s_buf[MAXCHARSSCIPRINT_FULL - 1] = '\0';
+ }
#else
- (void )vsprintf(s_buf, fmt, ap );
+ (void )vsprintf(s_buf, fmt, ap );
#endif
- va_end(ap);
+ va_end(ap);
- lstr=(int) strlen(s_buf);
+ lstr = (int) strlen(s_buf);
- if (lstr<colwidth)
- {
- sciprint("%s",s_buf);
- }
- else
- {
- strncpy(split_s_buf,s_buf+p_s,colwidth-1);
- split_s_buf[colwidth]='\0';
- p_s=p_s+colwidth-1;
- sciprint("%s",split_s_buf);
- sciprint("\n");
- while (p_s+colwidth-1<(int)lstr)
- {
- strncpy(split_s_buf,s_buf+p_s,colwidth-1);
- split_s_buf[colwidth]='\0';
- p_s=p_s+colwidth-1;
- sciprint(_(" (cont'd) %s\n"),split_s_buf);
- }
- strncpy(split_s_buf,s_buf+p_s,lstr-p_s);
- split_s_buf[lstr-p_s]='\0';
- sciprint(_(" (end) %s\n"),split_s_buf);
- }
+ if (lstr < colwidth)
+ {
+ sciprint("%s", s_buf);
+ }
+ else
+ {
+ strncpy(split_s_buf, s_buf + p_s, colwidth - 1);
+ split_s_buf[colwidth] = '\0';
+ p_s = p_s + colwidth - 1;
+ sciprint("%s", split_s_buf);
+ sciprint("\n");
+ while (p_s + colwidth - 1 < (int)lstr)
+ {
+ strncpy(split_s_buf, s_buf + p_s, colwidth - 1);
+ split_s_buf[colwidth] = '\0';
+ p_s = p_s + colwidth - 1;
+ sciprint(_(" (cont'd) %s\n"), split_s_buf);
+ }
+ strncpy(split_s_buf, s_buf + p_s, lstr - p_s);
+ split_s_buf[lstr - p_s] = '\0';
+ sciprint(_(" (end) %s\n"), split_s_buf);
+ }
- if (s_buf){FREE(s_buf);s_buf=NULL;}
- if (split_s_buf){FREE(split_s_buf);split_s_buf=NULL;}
+ if (s_buf)
+ {
+ FREE(s_buf);
+ s_buf = NULL;
+ }
+ if (split_s_buf)
+ {
+ FREE(split_s_buf);
+ split_s_buf = NULL;
+ }
}
/*--------------------------------------------------------------------------*/
Source: thirdparty\gluegen2-rt.jar; DestDir: {app}\thirdparty; Components: {#COMPN_GRAPHICS}
Source: thirdparty\jogl2.jar;DestDir: {app}\thirdparty; Components: {#COMPN_GRAPHICS}
;
-Source: thirdparty\scirenderer-1.0.3.jar;DestDir: {app}\thirdparty; Components: {#COMPN_GRAPHICS}
+Source: thirdparty\scirenderer-1.0.4.jar;DestDir: {app}\thirdparty; Components: {#COMPN_GRAPHICS}
;
Source: thirdparty\fonts\scilabsymbols.ttf;DestDir: {app}\thirdparty\fonts; Components: {#COMPN_GRAPHICS}
;
if (fd < 0)
{
sciprint(_("Error: cannot write to '%s' \n"), xmlfile);
+ for (i = 0; i < nvar; i++)
+ {
+ FREE(xv[i]);
+ }
+ FREE(xv);
return -3;/* cannot write to file*/
}
job = 0;
fx_(x, jac);
- if (*ierr < 0) return *ierr;
+ if (*ierr < 0)
+ {
+ FREE(work);
+ return *ierr;
+ }
inc_inv = ONE / inc;
#
# File: sci_gateway/c/sci_csvTextScan.c, line: 239
#, c-format
-msgid "%s: Wrong size for input argument #%d: Vector string expected.\n"
+msgid "%s: Wrong size for input argument #%d: String vector expected.\n"
msgstr ""
#
FREE(conversion);
conversion = NULL;
}
- Scierror(999, _("%s: Wrong size for input argument #%d: Vector string expected.\n"), fname, 1);
+ Scierror(999, _("%s: Wrong size for input argument #%d: String vector expected.\n"), fname, 1);
return 0;
}
--- /dev/null
+// =============================================================================
+// Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
+// Copyright (C) 2012 - Scilab Enterprises - Sylvestre Ledru
+//
+// This file is distributed under the same license as the Scilab package.
+// =============================================================================
+//
+// <-- JAVA NOT MANDATORY -->
+//
+// <-- Non-regression test for bug 12220 -->
+//
+// <-- Bugzilla URL -->
+// http://bugzilla.scilab.org/show_bug.cgi?id=12220
+//
+// <-- Short Description -->
+// csvTextScan unexpected behavior for missing data
+//
+content_ref = [ "26,12-10-2011 18:00,29.83,69.1,42,35.5,83,30.8,35.5,0,SSW,0,0,0" ..
+"27,12-10-2011 19:00,29.83,68.9,42,35.6,84,31.3,35.6,0,SSW,0,0,0" ..
+"28,12-10-2011 20:00,29.83,68.2,43,35.6,84,31.3,,,,,0,0" ..
+"29,12-10-2011 21:00,29.82,67.3,43,35.3,84,31,,,,,0,0" ];
+filename=TMPDIR+"/foo.csv";
+mputl(content_ref,filename);
+StrLines = mgetl(filename);
+StrMat1 = csvTextScan(StrLines(1), ',', '.', 'string');
+StrMat3 = csvTextScan(StrLines(3), ',', '.', 'string');
+assert_checkequal(size(StrMat1), size(StrMat3));
--- /dev/null
+// =============================================================================
+// Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
+// Copyright (C) 2012 - Scilab Enterprises - Sylvestre Ledru
+//
+// This file is distributed under the same license as the Scilab package.
+// =============================================================================
+//
+// <-- JAVA NOT MANDATORY -->
+//
+// <-- Non-regression test for bug 12220 -->
+//
+// <-- Bugzilla URL -->
+// http://bugzilla.scilab.org/show_bug.cgi?id=12220
+//
+// <-- Short Description -->
+// csvTextScan unexpected behavior for missing data
+//
+
+content_ref = [ "26,12-10-2011 18:00,29.83,69.1,42,35.5,83,30.8,35.5,0,SSW,0,0,0" ..
+"27,12-10-2011 19:00,29.83,68.9,42,35.6,84,31.3,35.6,0,SSW,0,0,0" ..
+"28,12-10-2011 20:00,29.83,68.2,43,35.6,84,31.3,,,,,0,0" ..
+"29,12-10-2011 21:00,29.82,67.3,43,35.3,84,31,,,,,0,0" ];
+filename=TMPDIR+"/foo.csv";
+
+mputl(content_ref,filename);
+
+StrLines = mgetl(filename);
+StrMat1 = csvTextScan(StrLines(1), ',', '.', 'string');
+StrMat3 = csvTextScan(StrLines(3), ',', '.', 'string');
+
+assert_checkequal(size(StrMat1), size(StrMat3));
int *piAllVariableBytes = (int *)MALLOC((iLocalVariablesUsed + iGlobalVariablesUsed) * sizeof(int));
char **pstAllVariableSizes = (char **)MALLOC((iLocalVariablesUsed + iGlobalVariablesUsed) * sizeof(char *));
int *piAllVariableTypes = (int *)MALLOC((iLocalVariablesUsed + iGlobalVariablesUsed) * sizeof(int));
- bool *piAllVariableFromUser = (bool *) MALLOC((iLocalVariablesUsed + iGlobalVariablesUsed) * sizeof(BOOL));
+ bool *piAllVariableFromUser = (bool *) MALLOC((iLocalVariablesUsed + iGlobalVariablesUsed) * sizeof(bool));
int nbRows, nbCols;
char *sizeStr = NULL;
</refnamediv>
<refsynopsisdiv>
<title>Description</title>
- <synopsis/>
+
</refsynopsisdiv>
<refsection id="Contents_C_struct">
<title>Contents</title>
import org.scilab.modules.xcos.utils.XcosEvent;
import org.scilab.modules.xcos.utils.XcosMessages;
+import com.mxgraph.model.mxCell;
import com.mxgraph.model.mxICell;
import com.mxgraph.util.mxEvent;
import com.mxgraph.util.mxEventObject;
+import com.mxgraph.util.mxUtils;
public final class SuperBlockDiagram extends XcosDiagram implements Serializable, Cloneable {
err = str.toString();
}
+ // Update the port labels on the superblock
+ if (err == null) {
+ mxCell identifier = this.getOrCreateCellIdentifier(block);
+ final Object current = this.getModel().getValue(identifier);
+ String text = "";
+ if (current == null) {
+ text = "";
+ } else {
+ text = mxUtils.getBodyMarkup(current.toString(), false);
+ }
+ this.fireEvent(new mxEventObject(mxEvent.LABEL_CHANGED, "cell", identifier, "value", text, "parent", block));
+ }
+
return err;
}
jgraphx.jar=${thirdparty.dir}/jgraphx.jar
-scirenderer.jar=${thirdparty.dir}/scirenderer-1.0.3.jar
+scirenderer.jar=${thirdparty.dir}/scirenderer-1.0.4.jar
jogl2.jar=${thirdparty.dir}/jogl2.jar