Scicos_blocks: clean Misc blocks interfaces 42/13242/3
Paul Bignier [Tue, 26 Nov 2013 16:49:54 +0000 (17:49 +0100)]
Removed unused 'job' and 'gr_i' values.

Change-Id: I9a233310053f901ffb9047b35bbebb5c76c6c0d9

42 files changed:
scilab/modules/scicos_blocks/macros/Misc/AUTOMAT.sci
scilab/modules/scicos_blocks/macros/Misc/BACKLASH.sci
scilab/modules/scicos_blocks/macros/Misc/BOUNCE.sci
scilab/modules/scicos_blocks/macros/Misc/BOUNCEXY.sci
scilab/modules/scicos_blocks/macros/Misc/BPLATFORM.sci
scilab/modules/scicos_blocks/macros/Misc/CBLOCK.sci
scilab/modules/scicos_blocks/macros/Misc/CBLOCK4.sci
scilab/modules/scicos_blocks/macros/Misc/CONSTRAINT2_c.sci
scilab/modules/scicos_blocks/macros/Misc/CONSTRAINT_c.sci
scilab/modules/scicos_blocks/macros/Misc/DEADBAND.sci
scilab/modules/scicos_blocks/macros/Misc/DEBUG_SCICOS.sci
scilab/modules/scicos_blocks/macros/Misc/DIFF_f.sci
scilab/modules/scicos_blocks/macros/Misc/DSUPER.sci
scilab/modules/scicos_blocks/macros/Misc/EDGETRIGGER.sci
scilab/modules/scicos_blocks/macros/Misc/EDGE_TRIGGER.sci
scilab/modules/scicos_blocks/macros/Misc/ENDBLK.sci
scilab/modules/scicos_blocks/macros/Misc/EXPRESSION.sci
scilab/modules/scicos_blocks/macros/Misc/Extract_Activation.sci
scilab/modules/scicos_blocks/macros/Misc/HYSTHERESIS.sci
scilab/modules/scicos_blocks/macros/Misc/IMPSPLIT_f.sci
scilab/modules/scicos_blocks/macros/Misc/LOGICAL_OP.sci
scilab/modules/scicos_blocks/macros/Misc/MBLOCK.sci
scilab/modules/scicos_blocks/macros/Misc/MEMORY_f.sci
scilab/modules/scicos_blocks/macros/Misc/MPBLOCK.sci
scilab/modules/scicos_blocks/macros/Misc/PAL_f.sci
scilab/modules/scicos_blocks/macros/Misc/PENDULUM_ANIM.sci
scilab/modules/scicos_blocks/macros/Misc/RATELIMITER.sci
scilab/modules/scicos_blocks/macros/Misc/RELATIONALOP.sci
scilab/modules/scicos_blocks/macros/Misc/SPLIT_f.sci
scilab/modules/scicos_blocks/macros/Misc/SUPER_f.sci
scilab/modules/scicos_blocks/macros/Misc/TEXT_f.sci
scilab/modules/scicos_blocks/macros/Misc/anim_pen.sci
scilab/modules/scicos_blocks/macros/Misc/bplatform2.sci
scilab/modules/scicos_blocks/macros/Misc/c_block.sci
scilab/modules/scicos_blocks/macros/Misc/fortran_block.sci
scilab/modules/scicos_blocks/macros/Misc/func_block.sci
scilab/modules/scicos_blocks/macros/Misc/generic_block.sci
scilab/modules/scicos_blocks/macros/Misc/generic_block2.sci
scilab/modules/scicos_blocks/macros/Misc/generic_block3.sci
scilab/modules/scicos_blocks/macros/Misc/m_sin.sci
scilab/modules/scicos_blocks/macros/Misc/scifunc_block.sci
scilab/modules/scicos_blocks/macros/Misc/scifunc_block_m.sci

index 79bfbcb..6ef8271 100644 (file)
 //
 
 function [x,y,typ]=AUTOMAT(job,arg1,arg2)
-    x=[];y=[];typ=[]
+    x=[];
+    y=[];
+    typ=[];
     select job
-    case "plot" then
-        standard_draw(arg1)
-    case "getinputs" then
-        [x,y,typ]=standard_inputs(arg1)
-    case "getoutputs" then
-        [x,y,typ]=standard_outputs(arg1)
-    case "getorigin" then
-        [x,y]=standard_origin(arg1)
     case "set" then
         x=arg1;
-        graphics=arg1.graphics;exprs=graphics.exprs
-        model=arg1.model;ipar=model.ipar;
+        graphics=arg1.graphics;
+        exprs=graphics.exprs
+        model=arg1.model;
+        ipar=model.ipar;
         NMode=ipar(1)
         NX=ipar(3)
         while %t do
             CX="C1";
-            MSG0="''Jump from Mode "; MSG2=":[..;M_final(Guard=In(";MSG3=").i);..]''"
+            MSG0="''Jump from Mode ";
+            MSG2=":[..;M_final(Guard=In(";
+            MSG3=").i);..]''"
             MSG=MSG0+"1"+MSG2+"1"+MSG3;
             VEC="''mat'',[-1,1]";
             for i=2:NMode
@@ -50,7 +48,10 @@ function [x,y,typ]=AUTOMAT(job,arg1,arg2)
             GTV="[ok,NMode,Minitial,NX,X0,XP,"+CX+",exprs]=scicos_getvalue(''Set Finite state machine model'',..
             [''Number (finite-state) Modes'';''Initial Mode'';''Number of continuous-time states'';''Continuous-time states intial values'';''Xproperties of continuous-time states in each Mode'';"+MSG+"],..
             list(''vec'',1,''vec'',1,''vec'',1,''mat'',[-1,-1],''mat'',[-1,-1],"+VEC+"),exprs)"
-            execstr(GTV); if ~ok then break,end
+            execstr(GTV);
+            if ~ok then
+                break,
+            end
             NMode_old=size(exprs,"*")-5;//-number of fileds before CX
             ModifEncore=%f;
 
@@ -85,7 +86,11 @@ function [x,y,typ]=AUTOMAT(job,arg1,arg2)
                 ipar=[NMode;Minitial;NX;XP];
                 rpar=matrix(X0,NX,1);// put X0 in a column vector;
                 INP=ones(NMode,1);
-                if NX>0 then OUT=[2;2*NX];else OUT=[2];end
+                if NX>0 then
+                    OUT=[2;2*NX];
+                else
+                    OUT=[2];
+                end
                 MaxModes=1;
                 nzcross=0;
                 for i=1:NMode
@@ -113,7 +118,9 @@ function [x,y,typ]=AUTOMAT(job,arg1,arg2)
             end
             if ~ModifEncore then
                 [model,graphics,ok]=check_io(model,graphics,INP,OUT,[],[1])
-                if ~ok then break,end
+                if ~ok then
+                    break,
+                end
                 model.nzcross=nzcross;
                 model.state=ones(2*NX,1);
                 graphics.gr_i(1)(1)="txt=[''Automaton'';''nM="+string(NMode)+",nX="+string(NX)+"''];"
@@ -151,8 +158,7 @@ function [x,y,typ]=AUTOMAT(job,arg1,arg2)
         model.ipar=ipar;
         model.rpar=rpar;
 
-        gr_i=["txt=[''Automaton'';''nM="+string(NMode)+",nX="+string(NX)+"''];"..
-        ;"xstringb(orig(1),orig(2),txt,sz(1),sz(2),''fill'')"]
+        gr_i=[]
 
         x=standard_define([4 2],model,exprs,gr_i);
     end
index 230ed0b..9460d57 100644 (file)
 //
 
 function [x,y,typ]=BACKLASH(job,arg1,arg2)
-    x=[];y=[];typ=[]
+    x=[];
+    y=[];
+    typ=[];
     select job
-    case "plot" then
-        standard_draw(arg1)
-    case "getinputs" then
-        [x,y,typ]=standard_inputs(arg1)
-    case "getoutputs" then
-        [x,y,typ]=standard_outputs(arg1)
-    case "getorigin" then
-        [x,y]=standard_origin(arg1)
     case "set" then
         x=arg1;
-        graphics=arg1.graphics;exprs=graphics.exprs
+        graphics=arg1.graphics;
+        exprs=graphics.exprs
         model=arg1.model;
         rpar=model.rpar
         while %t do
@@ -42,17 +37,21 @@ function [x,y,typ]=BACKLASH(job,arg1,arg2)
             list("vec",1,"vec",1,"vec",1),exprs)
 
 
-            if ~ok then break,end
+            if ~ok then
+                break,
+            end
             if ok then
                 graphics.exprs=exprs;
-                rpar(1)=ini;rpar(2)=gap;
+                rpar(1)=ini;
+                rpar(2)=gap;
                 if zcr<>0 then
                     model.nzcross=2
                 else
                     model.nzcross=0
                 end
                 model.rpar=rpar
-                x.graphics=graphics;x.model=model
+                x.graphics=graphics;
+                x.model=model
                 break
             end
         end
@@ -67,7 +66,7 @@ function [x,y,typ]=BACKLASH(job,arg1,arg2)
         model.blocktype="c"
         model.dep_ut=[%t %f]
 
-        gr_i=["xstringb(orig(1),orig(2),[''backlash''],sz(1),sz(2),''fill'')"]
+        gr_i=[]
 
         x=standard_define([3 2],model,exprs,gr_i)
     end
index b6b30c3..a8ffb2d 100644 (file)
 //
 
 function [x,y,typ]=BOUNCE(job,arg1,arg2)
-    x=[];y=[];typ=[];
+    x=[];
+    y=[];
+    typ=[];
     select job
-    case "plot" then
-        standard_draw(arg1)
-    case "getinputs" then
-        x=[];y=[];typ=[];
-    case "getoutputs" then
-        [x,y,typ]=standard_outputs(arg1)
-    case "getorigin" then
-        [x,y]=standard_origin(arg1)
     case "set" then
         x=arg1;
-        graphics=arg1.graphics;exprs=graphics.exprs
+        graphics=arg1.graphics;
+        exprs=graphics.exprs
         model=arg1.model;
-        if size(exprs,"*")<9 then exprs(8)="9.81";exprs(9)="0";end
+        if size(exprs,"*")<9 then
+            exprs(8)="9.81";
+            exprs(9)="0";
+        end
         while %t do
             [ok,rpar1,rpar2,walls,xt,xd,y,yd,g,C,exprs]=scicos_getvalue(["Set Bounce Block"],..
             ["Mass";"Radius";"[xmin,xmax,ymin,ymax]";"xpos";"xdpos";"ypos";..
             "ydpos";"g (gravity)";"C (aerodynamic coeff"],..
             list("vec",-1,"vec",-1,"vec",-1,"vec",-1,"vec",-1,..
             "vec",-1,"vec",-1,"vec",1,"vec",1),exprs)
-            if ~ok then break,end
-            xt=xt(:);y=y(:);xd=xd(:);yd=yd(:);
-            rpar1=rpar1(:);rpar2=rpar2(:);
+            if ~ok then
+                break,
+            end
+            xt=xt(:);
+            y=y(:);
+            xd=xd(:);
+            yd=yd(:);
+            rpar1=rpar1(:);
+            rpar2=rpar2(:);
             n=size(xt,"*");
             walls=walls(:);
-            if walls(1)>walls(2) then walls=walls([2,1]);end
-            if walls(3)>walls(3) then walls=walls([3,4]);end
+            if walls(1)>walls(2) then
+                walls=walls([2,1]);
+            end
+            if walls(3)>walls(3) then
+                walls=walls([3,4]);
+            end
             if n<>size(y,"*")|n<>size(rpar1,"*")|n<>size(rpar2,"*")|..
                 n<>size(xd,"*")|n<>size(yd,"*") then
                 message("All vectors must have equal size")
                 ok=%f
-            elseif  ~(min([rpar1;rpar2])>0) then
+            elseif ~(min([rpar1;rpar2])>0) then
                 message("Mass and radius must be >0")
                 ok=%f
             end
-            if ~ok then break,end
+            if ~ok then
+                break,
+            end
             [model,graphics,ok]=check_io(model,graphics,[],[n,n],[],[])
             if ok then
                 k=1;ipar=[];
@@ -70,11 +80,13 @@ function [x,y,typ]=BOUNCE(job,arg1,arg2)
                 end
                 model.rpar=[rpar1;rpar2;walls;g;C];
                 model.ipar=ipar;
-                state=[xt,xd,y,yd];state=state';
+                state=[xt,xd,y,yd];
+                state=state';
                 model.state=state(:)
                 model.nzcross=n*(n-1)/2+4*n;
                 graphics.exprs=exprs;
-                x.graphics=graphics;x.model=model
+                x.graphics=graphics;
+                x.model=model
                 break
             end
         end
@@ -90,9 +102,16 @@ function [x,y,typ]=BOUNCE(job,arg1,arg2)
             end
         end
         walls=[0;5;0;5]
-        x=[2;2.5];xd=[0;0];y=[3;5];yd=[0;0];g=9.81;C=0
-        rpar1=ones(n,1);rpar2=rpar1;
-        state=[x,xd,y,yd];state=state';
+        x=[2;2.5];
+        xd=[0;0];
+        y=[3;5];
+        yd=[0;0];
+        g=9.81;
+        C=0
+        rpar1=ones(n,1);
+        rpar2=rpar1;
+        state=[x,xd,y,yd];
+        state=state';
         model=scicos_model()
         model.sim=list("bounce_ball",4)
         model.in=[]
@@ -105,8 +124,7 @@ function [x,y,typ]=BOUNCE(job,arg1,arg2)
         model.dep_ut=[%f %t]
 
         exprs=[strcat(sci2exp(rpar1));strcat(sci2exp(rpar2));strcat(sci2exp(walls));strcat(sci2exp(x));strcat(sci2exp(xd));strcat(sci2exp(y));strcat(sci2exp(yd))]
-        gr_i=["txt=[''Bouncing'';''balls''];";
-        "xstringb(orig(1),orig(2),txt,sz(1),sz(2),''fill'');"]
+        gr_i=[]
         x=standard_define([3 2],model,exprs,gr_i)
     end
 endfunction
index 26895c6..50e79ee 100644 (file)
 
 function [x,y,typ]=BOUNCEXY(job,arg1,arg2)
     //Scicos 2D animated visualization block
-    x=[];y=[];typ=[]
+    x=[];
+    y=[];
+    typ=[];
     select job
-    case "plot" then
-        standard_draw(arg1)
-    case "getinputs" then
-        [x,y,typ]=standard_inputs(arg1)
-    case "getoutputs" then
-        x=[];y=[];typ=[];
-    case "getorigin" then
-        [x,y]=standard_origin(arg1)
     case "set" then
         x=arg1;
-        graphics=arg1.graphics;exprs=graphics.exprs
+        graphics=arg1.graphics;
+        exprs=graphics.exprs
         model=arg1.model;
         dstate=model.dstate
         while %t do
@@ -49,7 +44,9 @@ function [x,y,typ]=BOUNCEXY(job,arg1,arg2)
             "Ymax";
             ],..
             list("vec",-1,"vec",-1,"vec",1,"vec",1,"vec",1,"vec",1,"vec",1,"vec",1),exprs)
-            if ~ok then break,end //user cancel modification
+            if ~ok then
+                break,
+            end //user cancel modification
 
             mess=[]
             if size(clrs,"*")<>size(siz,"*") then
@@ -90,9 +87,14 @@ function [x,y,typ]=BOUNCEXY(job,arg1,arg2)
             end
         end
     case "define" then
-        win=-1; imode=1;clrs=[1;2];
+        win=-1;
+        imode=1;
+        clrs=[1;2];
         siz=[1;1]
-        xmin=-5;xmax=5;ymin=0;ymax=15
+        xmin=-5;
+        xmax=5;
+        ymin=0;
+        ymax=15
 
         model=scicos_model()
         model.sim=list("bouncexy",4)
@@ -124,12 +126,7 @@ function [x,y,typ]=BOUNCEXY(job,arg1,arg2)
         strcat(sci2exp(xmax));
         strcat(sci2exp(ymin));
         strcat(sci2exp(ymax))]
-        gr_i=["thick=xget(''thickness'');xset(''thickness'',2);";
-        "t=(0:0.3:2*%pi)'';";
-        "xx=orig(1)+(1/5+(cos(2.2*t)+1)*3/10)*sz(1);";
-        "yy=orig(2)+(1/4.3+(sin(t)+1)*3/10)*sz(2);";
-        "xpoly(xx,yy,''lines'');"
-        "xset(''thickness'',thick);"]
+        gr_i=[]
         x=standard_define([2 2],model,exprs,gr_i)
     end
 endfunction
index 0cf894e..bc75347 100644 (file)
 //
 
 function [x,y,typ]=BPLATFORM(job,arg1,arg2)
-    x=[];y=[];typ=[]
+    x=[];
+    y=[];
+    typ=[];
     select job
-    case "plot" then
-        standard_draw(arg1)
-    case "getinputs" then
-        [x,y,typ]=standard_inputs(o)
-    case "getoutputs" then
-        x=[];y=[];typ=[];
-    case "getorigin" then
-        [x,y]=standard_origin(arg1)
     case "set" then
         x=arg1;
-        graphics=arg1.graphics;exprs=graphics.exprs
-        model=arg1.model;dstate=model.dstate
+        graphics=arg1.graphics;
+        exprs=graphics.exprs
+        model=arg1.model;
+        dstate=model.dstate
         while %t do
             [ok,plen,csiz,phi,xmin,xmax,ymin,ymax,exprs]=scicos_getvalue(..
             "Set Scope parameters",..
             ["pendulum length";"cart size (square side)";"slope";
             "Xmin";"Xmax";  "Ymin"; "Ymax"; ],..
             list("vec",1,"vec",1,"vec",1,"vec",1,"vec",1,"vec",1,"vec",1),exprs)
-            if ~ok then break,end
+            if ~ok then
+                break,
+            end
             mess=[]
             if plen<=0|csiz<=0 then
                 mess=[mess;"Pendulum length and cart size must be positive.";" "]
@@ -60,13 +58,19 @@ function [x,y,typ]=BPLATFORM(job,arg1,arg2)
                 rpar=[plen;csiz;phi;xmin;xmax;ymin;ymax]
                 model.rpar=rpar;
                 graphics.exprs=exprs;
-                x.graphics=graphics;x.model=model
+                x.graphics=graphics;
+                x.model=model
                 break
             end
         end
     case "define" then
-        plen=2; csiz=2; phi=0;
-        xmin=-5;xmax=5;ymin=0;ymax=15
+        plen=2;
+        csiz=2;
+        phi=0;
+        xmin=-5;
+        xmax=5;
+        ymin=0;
+        ymax=15
 
         model=scicos_model()
         model.sim=list("bplatform2",5)
@@ -78,15 +82,7 @@ function [x,y,typ]=BPLATFORM(job,arg1,arg2)
         model.dep_ut=[%f %f]
 
         exprs=string(model.rpar)
-        gr_i=["thick=xget(''thickness'');xset(''thickness'',2);Couleur=xget(''color'');";
-        "xx=orig(1)+sz(1)*[3 7 7 3 3]/10;";
-        "yy=orig(2)+sz(2)*[5 5 4 4 5 ]/10;";
-        "xpoly(xx,yy,''lines'');";
-        "xx=orig(1)+sz(1)*[5 4.5 5.5 4.5 5.5 4.5 5.5 4.5  5.5 4.5  5.5]/10;";
-        "yy=orig(2)+sz(2)*[4 3.5 3.0 3.5 3.0 2.5 2.0 1.5  1.0 0.5 0]/10;";
-        "xpoly(xx,yy,''lines'');";
-        "xarc(orig(1)+sz(1)*0.4,orig(2)+sz(2)*0.8,sz(1)*0.2,sz(2)*0.2,0,360*64);";
-        "xset(''thickness'',thick);"]
+        gr_i=[]
         x=standard_define([2 2],model,exprs,gr_i)
     end
 endfunction
index 6b41874..7cd31e6 100644 (file)
 //
 
 function [x,y,typ]=CBLOCK(job,arg1,arg2)
-    x=[];y=[];typ=[];
+    x=[];
+    y=[];
+    typ=[];
     select job
-    case "plot" then
-        standard_draw(arg1)
-    case "getinputs" then
-        [x,y,typ]=standard_inputs(arg1)
-    case "getoutputs" then
-        [x,y,typ]=standard_outputs(arg1)
-    case "getorigin" then
-        [x,y]=standard_origin(arg1)
     case "set" then
         x=arg1
-        model=arg1.model;graphics=arg1.graphics;
+        model=arg1.model;
+        graphics=arg1.graphics;
         label=graphics.exprs;
         while %t do
             [ok,function_name,impli,i,o,ci,co,xx,ng,z,rpar,ipar,auto0,depu,dept,lab]=..
@@ -54,25 +49,53 @@ function [x,y,typ]=CBLOCK(job,arg1,arg2)
             list("str",1,"str",1,"vec",-1,"vec",-1,"vec",-1,"vec",-1,..
             "vec",-1,"vec",1,"vec",-1,"vec",-1,"vec",-1,"vec","sum(%6)",..
             "str",1,"str",1),label(1))
-            if ~ok then break,end
+            if ~ok then
+                break,
+            end
             label(1)=lab
             funam=stripblanks(function_name)
-            xx=xx(:);z=z(:);rpar=rpar(:);ipar=int(ipar(:));
-            nx=size(xx,1);nz=size(z,1);
+            xx=xx(:);
+            z=z(:);
+            rpar=rpar(:);
+            ipar=int(ipar(:));
+            nx=size(xx,1);
+            nz=size(z,1);
             i=int(i(:));
-            o=int(o(:));nout=size(o,1);
-            ci=int(ci(:));nevin=size(ci,1);
-            co=int(co(:));nevout=size(co,1);
-            if part(impli,1)=="y" then funtyp=12004, else funtyp=2004,end
+            o=int(o(:));
+            nout=size(o,1);
+            ci=int(ci(:));
+            nevin=size(ci,1);
+            co=int(co(:));
+            nevout=size(co,1);
+            if part(impli,1)=="y" then
+                funtyp=12004,
+            else
+                funtyp=2004,
+            end
             if [ci;co]<>[] then
-                if max([ci;co])>1 then message("vector event links not supported");ok=%f;end
+                if max([ci;co])>1 then
+                    message("vector event links not supported");
+                    ok=%f;
+                end
+            end
+            depu=stripblanks(depu);
+            if part(depu,1)=="y" then
+                depu=%t;
+            else
+                depu=%f;
+            end
+            dept=stripblanks(dept);
+            if part(dept,1)=="y" then
+                dept=%t;
+            else
+                dept=%f;
             end
-            depu=stripblanks(depu);if part(depu,1)=="y" then depu=%t; else depu=%f;end
-            dept=stripblanks(dept);if part(dept,1)=="y" then dept=%t; else dept=%f;end
             dep_ut=[depu dept];
 
 
-            if funam==" " then break,end
+            if funam==" " then
+                break,
+            end
 
             if model.sim(1)<>funam|sign(size(model.state,"*"))<>sign(nx)|..
                 sign(size(model.dstate,"*"))<>sign(nz)|model.nzcross<>ng|..
@@ -85,7 +108,9 @@ function [x,y,typ]=CBLOCK(job,arg1,arg2)
 
                 [ok,tt,cancel]=CFORTR2(funam,tt)
                 if ~ok then
-                    if cancel then break,end
+                    if cancel then
+                        break,
+                    end
                 else
                     [model,graphics,ok]=check_io(model,graphics,i,o,ci,co)
                     if ok then
@@ -109,7 +134,9 @@ function [x,y,typ]=CBLOCK(job,arg1,arg2)
                     end
                 end
             end
-            if ok|cancel then break,end
+            if ok|cancel then
+                break,
+            end
         end
 
     case "define" then
@@ -145,7 +172,7 @@ function [x,y,typ]=CBLOCK(job,arg1,arg2)
         sci2exp(x0),sci2exp(0),sci2exp(z0),sci2exp(rpar),sci2exp(ipar),..
         sci2exp(auto),"y","n"]',[])
 
-        gr_i=["xstringb(orig(1),orig(2),''C block2'',sz(1),sz(2),''fill'');"]
+        gr_i=[]
         x=standard_define([4 2],model,label,gr_i)
     end
 endfunction
index f2541c2..cb1feca 100644 (file)
 function [x,y,typ]=CBLOCK4(job,arg1,arg2)
     //
     // Copyright INRIA
-    x=[];y=[];typ=[];
+    x=[];
+    y=[];
+    typ=[];
 
     select job
-    case "plot" then
-        standard_draw(arg1)
-    case "getinputs" then
-        [x,y,typ]=standard_inputs(arg1)
-    case "getoutputs" then
-        [x,y,typ]=standard_outputs(arg1)
-    case "getorigin" then
-        [x,y]=standard_origin(arg1)
     case "set" then
         x=arg1
         model=arg1.model;
@@ -127,7 +121,9 @@ function [x,y,typ]=CBLOCK4(job,arg1,arg2)
                 while %t
                     [ok,tt,cancel]=CC4(funam,tt)
                     if ~ok then
-                        if cancel then break,end
+                        if cancel then
+                            break,
+                        end
                     else
                         model.sim=list(funam,funtyp)
                         model.state=xx
@@ -189,7 +185,7 @@ function [x,y,typ]=CBLOCK4(job,arg1,arg2)
         "n"],...
         []);
 
-        gr_i=["xstringb(orig(1),orig(2),''C block4'',sz(1),sz(2),''fill'');"]
+        gr_i=[]
         x=standard_define([4 2],model,label,gr_i)
     end
 endfunction
index b0ab68d..e0db95f 100644 (file)
 
 function [x,y,typ]=CONSTRAINT2_c(job,arg1,arg2)
     // Copyright INRIA
-    x=[];y=[];typ=[]
+    x=[];
+    y=[];
+    typ=[];
     select job
-    case "plot" then
-        standard_draw(arg1)
-    case "getinputs" then
-        [x,y,typ]=standard_inputs(arg1)
-    case "getoutputs" then
-        [x,y,typ]=standard_outputs(arg1)
-    case "getorigin" then
-        [x,y]=standard_origin(arg1)
     case "set" then
         x=arg1
-        graphics=arg1.graphics;exprs=graphics.exprs
+        graphics=arg1.graphics;
+        exprs=graphics.exprs
         model=arg1.model;
         while %t do
             ask_again=%f
 
             [ok,x0,xd0,id,exprs]=scicos_getvalue("Set Constraint block parameters",["Initial guess values of states x";"Initial guess values of derivative x''";"Id(i)=1: if x''(i) is present in the feedback, else Id(i)=0"],list("vec",-1,"vec",-1,"vec",-1),exprs)
-            if ~ok then break,end
-            x0=x0(:);N=size(x0,"*");
-            xd0=xd0(:);Nxd=size(xd0,"*");
-            id=id(:);Nid=size(id,"*");
+            if ~ok then
+                break,
+            end
+            x0=x0(:);
+            N=size(x0,"*");
+            xd0=xd0(:);
+            Nxd=size(xd0,"*");
+            id=id(:);
+            Nid=size(id,"*");
 
             if (N~=Nxd)|(N~=Nid) then
                 message("incompatible sizes, states, their derivatives, and ID should be the same size ")
@@ -61,7 +61,9 @@ function [x,y,typ]=CONSTRAINT2_c(job,arg1,arg2)
                         x_message(["Id(i) must be either";"0 when x''(i) is not present in the feedback";"1: when x''(i) is present in the feedback"])
                         break
                     end
-                    if (id(i)==0) then id(i)=-1;end;
+                    if (id(i)==0) then
+                        id(i)=-1;
+                    end;
                 end
             end
 
@@ -71,7 +73,8 @@ function [x,y,typ]=CONSTRAINT2_c(job,arg1,arg2)
                 model.out=[N;N]
                 model.in=N
                 model.ipar=id
-                x.graphics=graphics;x.model=model
+                x.graphics=graphics;
+                x.model=model
                 break
             end
         end
@@ -90,10 +93,7 @@ function [x,y,typ]=CONSTRAINT2_c(job,arg1,arg2)
         model.dep_ut=[%f %t]
         exprs=list(strcat(sci2exp(x0)),strcat(sci2exp(xd0)),strcat(sci2exp(id)))
 
-        gr_i=["txt=[''=f(x'''',x)'']; xstringb(orig(1),orig(2)+sz(2)*0.2,txt,sz(1)/2,sz(2)/2,''fill'');";
-        "txt=[''x ''];xstringb(orig(1)+0.65*sz(1),orig(2)+sz(2)*0.5,txt,sz(1)/2,sz(2)/3);";
-        "txt=[''x''''''];xstringb(orig(1)+0.65*sz(1),orig(2)+sz(2)*0.1,txt,sz(1)/2,sz(2)/3);";
-        "txt=''solve f(x'''',x)=0'';xstringb(orig(1)+.01*sz(1), orig(2)+.25*sz(1), txt, sz(1)/1.1,sz(2)/1.1,''fill'')"]
+        gr_i=[]
 
         x=standard_define([3 2],model,exprs,gr_i)
     end
index 258f05b..e73a18f 100644 (file)
 
 function [x,y,typ]=CONSTRAINT_c(job,arg1,arg2)
     // Copyright INRIA
-    x=[];y=[];typ=[]
+    x=[];
+    y=[];
+    typ=[];
     select job
-    case "plot" then
-        standard_draw(arg1)
-    case "getinputs" then
-        [x,y,typ]=standard_inputs(arg1)
-    case "getoutputs" then
-        [x,y,typ]=standard_outputs(arg1)
-    case "getorigin" then
-        [x,y]=standard_origin(arg1)
     case "set" then
         x=arg1
-        graphics=arg1.graphics;exprs=graphics.exprs
+        graphics=arg1.graphics;
+        exprs=graphics.exprs
         model=arg1.model;
         while %t do
             [ok,x0,exprs]=scicos_getvalue("Set solver block parameters",..
             "Initial guess values",list("vec",-1),exprs)
-            if ~ok then break,end
-            x0=x0(:);N=size(x0,"*");
+            if ~ok then
+                break,
+            end
+            x0=x0(:);
+            N=size(x0,"*");
 
             if N<=0 then
                 message("number of states (constraints) must be > 0 ")
@@ -51,7 +49,8 @@ function [x,y,typ]=CONSTRAINT_c(job,arg1,arg2)
                     model.out=N
                     model.in=N
                     model.ipar=-1*ones(N,1);
-                    x.graphics=graphics;x.model=model
+                    x.graphics=graphics;
+                    x.model=model
                     break
                 end
             end
@@ -70,9 +69,7 @@ function [x,y,typ]=CONSTRAINT_c(job,arg1,arg2)
         model.dep_ut=[%f %t]
         exprs="0"
 
-        gr_i=["txt=[''=f(x)''];xstringb(orig(1),orig(2)+sz(2)*0.20,txt,sz(1)/2,sz(2)/2,''fill'');";
-        "txt=[''x''];xstringb(orig(1)+sz(1)*0.75,orig(2)+sz(2)*0.35,txt,sz(1)/5,sz(2)/5,''fill'');";
-        "txt=''solve f(x)=0'';xstringb(orig(1)+.01*sz(1), orig(2)+.4*sz(1), txt, sz(1),sz(2)/3,''fill'');"];
+        gr_i=[];
 
         x=standard_define([3 2],model,exprs,gr_i)
     end
index 1e56f62..ce7a261 100644 (file)
 //
 
 function [x,y,typ]=DEADBAND(job,arg1,arg2)
-    x=[];y=[];typ=[];
+    x=[];
+    y=[];
+    typ=[];
     select job
-    case "plot" then
-        standard_draw(arg1)
-    case "getinputs" then
-        [x,y,typ]=standard_inputs(arg1)
-    case "getoutputs" then
-        [x,y,typ]=standard_outputs(arg1)
-    case "getorigin" then
-        [x,y]=standard_origin(arg1)
     case "set" then
         x=arg1;
-        graphics=arg1.graphics;exprs=graphics.exprs
+        graphics=arg1.graphics;
+        exprs=graphics.exprs
         model=arg1.model;
         while %t do
             [ok,maxp,minp,zeroc,exprs]=scicos_getvalue("Set Deadband parameters",..
             ["End of dead band";"Start of dead band";"zero crossing (0:no, 1:yes)"],list("vec",1,"vec",1,"vec",1),exprs)
-            if ~ok then break,end
+            if ~ok then
+                break,
+            end
             if maxp<=minp  then
                 message("Upper limit must be > Lower limit")
             else
@@ -51,12 +48,15 @@ function [x,y,typ]=DEADBAND(job,arg1,arg2)
                     model.nmode=0
                 end
                 graphics.exprs=exprs
-                x.graphics=graphics;x.model=model
+                x.graphics=graphics;
+                x.model=model
                 break
             end
         end
     case "define" then
-        minp=-.5;maxp=.5;rpar=[maxp;minp]
+        minp=-.5;
+        maxp=.5;
+        rpar=[maxp;minp]
         model=scicos_model()
         model.sim=list("deadband",4)
         model.in=1
@@ -68,11 +68,7 @@ function [x,y,typ]=DEADBAND(job,arg1,arg2)
         model.dep_ut=[%t %f]
 
         exprs=[string(maxp);string(minp);string(model.nmode)]
-        gr_i=["thick=xget(''thickness'');xset(''thickness'',2);";
-        "xx=orig(1)+[4/5;3/5;2/5;1/5]*sz(1);";
-        "yy=orig(2)+[1-1/5;1/2;1/2;1/5]*sz(2);";
-        "xpoly(xx,yy,''lines'');";
-        "xset(''thickness'',thick)"]
+        gr_i=[]
         x=standard_define([2 2],model,exprs,gr_i)
     end
 endfunction
index 660cf2e..fe45132 100644 (file)
 //
 
 function [x,y,typ]=DEBUG_SCICOS(job,arg1,arg2)
-    x=[];y=[];typ=[]
+    x=[];
+    y=[];
+    typ=[];
     select job
-    case "plot" then
-        standard_draw(arg1)
-    case "getinputs" then
-        [x,y,typ]=standard_inputs(arg1)
-    case "getoutputs" then
-        x=[];y=[];typ=[];
-    case "getorigin" then
-        [x,y]=standard_origin(arg1)
     case "set" then
         x=arg1;
-        graphics=arg1.graphics;exprs=graphics.exprs
+        graphics=arg1.graphics;
+        exprs=graphics.exprs
         textmp=exprs(2)
         ok=%t
         while 1==1
@@ -57,7 +52,8 @@ function [x,y,typ]=DEBUG_SCICOS(job,arg1,arg2)
                     message(["Error in the instructions";lasterror()])
                 end
             else
-                ok=%f;break;
+                ok=%f;
+                break;
             end
         end
         if ok then
@@ -71,7 +67,7 @@ function [x,y,typ]=DEBUG_SCICOS(job,arg1,arg2)
         model.blocktype="d"
 
         exprs=list("","xcos_debug_gui(flag,block);")
-        gr_i=["xstringb(orig(1),orig(2),''Debug'',sz(1),sz(2),''fill'')"]
+        gr_i=[]
         x=standard_define([8 2],model,exprs,gr_i)
     end
 endfunction
index a54f0b8..0992a85 100644 (file)
 //
 
 function [x,y,typ]=DIFF_f(job,arg1,arg2)
-    x=[];y=[];typ=[]
+    x=[];
+    y=[];
+    typ=[];
     select job
-    case "plot" then
-        standard_draw(arg1)
-    case "getinputs" then
-        [x,y,typ]=standard_inputs(arg1)
-    case "getoutputs" then
-        [x,y,typ]=standard_outputs(arg1)
-    case "getorigin" then
-        [x,y]=standard_origin(arg1)
     case "set" then
         x=arg1
-        graphics=arg1.graphics;exprs=graphics.exprs
+        graphics=arg1.graphics;
+        exprs=graphics.exprs
         model=arg1.model;
         while %t do
             [ok,x0,xd0,exprs]=scicos_getvalue("Set continuous linear system parameters",..
             ["Initial state";"Initial Derivative"],list("vec",1,"vec",1),exprs)
 
 
-            if ~ok then break,end
+            if ~ok then
+                break,
+            end
             graphics.exprs=exprs;
             model.state=[x0(:);xd0(:)];
-            x.graphics=graphics;x.model=model
+            x.graphics=graphics;
+            x.model=model
             break
         end
         x.model.firing=[] //compatibility
@@ -57,7 +55,7 @@ function [x,y,typ]=DIFF_f(job,arg1,arg2)
         model.dep_ut=[%f %t]
 
         exprs=[strcat(sci2exp(x0(1)));strcat(sci2exp(x0(2)))]
-        gr_i=["xstringb(orig(1),orig(2),'' s   '',sz(1),sz(2),''fill'');"]
+        gr_i=[]
         x=standard_define([2 2],model,exprs,gr_i)
     end
 endfunction
index 18aa358..c0a522b 100644 (file)
 //
 
 function [x,y,typ] = DSUPER(job,arg1,arg2)
-    x=[];y=[],typ=[]
+    x=[];
+    y=[];
+    typ=[];
 
     select job
-    case "plot" then
-        standard_draw(arg1)
-    case "getinputs" then
-        [x,y,typ]=standard_inputs(arg1)
-    case "getoutputs" then
-        [x,y,typ]=standard_outputs(arg1)
-    case "getorigin" then
-        [x,y]=standard_origin(arg1)
     case "set" then
         y=needcompile // in case leaving with Exit x=arg1
         typ=list()
         graphics=arg1.graphics;
         if (length(graphics.exprs) == 0) then
             warnBlockByUID(arg1.model.label, gettext("Invalid masked block."));
-            x=arg1, return;
+            x=arg1,
+            return;
         end
 
         exprs=graphics.exprs(1)
         exprs0=graphics.exprs(2)(1)
         btitre=graphics.exprs(2)(2)(1)
         bitems=graphics.exprs(2)(2)(2:$)
-        if exprs0==[] then x=arg1,return,end
+        if exprs0==[] then
+            x=arg1,
+            return,
+        end
 
         // First evaluate the diagram context
         context = [arg1.model.rpar.props.context];
         [%scicos_context,ierr] = script2var(context,%scicos_context);
 
         if ierr <> 0 then
-            x=arg1, return;
+            x=arg1,
+            return;
         end
 
         // then update the context with the mask parameters
index 1dce544..2d6a06a 100644 (file)
 //
 
 function [x,y,typ]=EDGETRIGGER(job,arg1,arg2)
-    x=[];y=[];typ=[];
+    x=[];
+    y=[];
+    typ=[];
     select job
-    case "plot" then
-        standard_draw(arg1)
-    case "getinputs" then
-        [x,y,typ]=standard_inputs(arg1)
-    case "getoutputs" then
-        [x,y,typ]=standard_outputs(arg1)
-    case "getorigin" then
-        [x,y]=standard_origin(arg1)
     case "set" then
         x=arg1;
-        graphics=arg1.graphics;exprs=graphics.exprs
+        graphics=arg1.graphics;
+        exprs=graphics.exprs
         model=arg1.model;
         while %t do
             [ok,edge,exprs]=scicos_getvalue("Set edge trigger block parameters",..
             ["rising (1), falling (-1), both (0)"],list("vec",1),exprs)
-            if ~ok then break,end
+            if ~ok then
+                break,
+            end
             model.ipar=sign(edge)
             graphics.exprs=exprs
-            x.graphics=graphics;x.model=model
+            x.graphics=graphics;
+            x.model=model
             break
         end
     case "define" then
@@ -56,7 +54,7 @@ function [x,y,typ]=EDGETRIGGER(job,arg1,arg2)
         model.dep_ut=[%t %f]
 
         exprs=[string(edge)]
-        gr_i=["xstringb(orig(1),orig(2),[''Edge'';''trigger''],sz(1),sz(2),''fill'');"]
+        gr_i=[]
         x=standard_define([3 2],model,exprs,gr_i)
     end
 endfunction
index ecaa05f..b038860 100644 (file)
 //
 
 function [x,y,typ]=EDGE_TRIGGER(job,arg1,arg2)
-    x=[];y=[],typ=[]
+    x=[];
+    y=[];
+    typ=[];
     select job
-    case "plot" then
-        standard_draw(arg1)
-    case "getinputs" then
-        [x,y,typ]=standard_inputs(arg1)
-    case "getoutputs" then
-        [x,y,typ]=standard_outputs(arg1)
-    case "getorigin" then
-        [x,y]=standard_origin(arg1)
     case "set" then
         // look for the internal edge trigger block
         for i=1:length(arg1.model.rpar.objs) do
@@ -222,7 +216,7 @@ function [x,y,typ]=EDGE_TRIGGER(job,arg1,arg2)
         model.evtout = 1;
         model.rpar = scs_m_1;
 
-        gr_i="xstringb(orig(1),orig(2),[''EDGE'';''TRIGGER''],sz(1),sz(2),''fill'')";
+        gr_i=[];
         x=standard_define([3 2],model,[],gr_i)
     end
 endfunction
index ac25bc1..c0f6698 100644 (file)
 //
 
 function [x,y,typ]=ENDBLK(job,arg1,arg2)
-    x=[];y=[],typ=[]
+    x=[];
+    y=[];
+    typ=[];
     select job
-    case "plot" then
-        standard_draw(arg1)
-    case "getinputs" then
-        [x,y,typ]=standard_inputs(arg1)
-    case "getoutputs" then
-        [x,y,typ]=standard_outputs(arg1)
-    case "getorigin" then
-        [x,y]=standard_origin(arg1)
     case "set" then
         // look for the internal edge trigger block
         for i=1:length(arg1.model.rpar.objs) do
@@ -139,7 +133,7 @@ function [x,y,typ]=ENDBLK(job,arg1,arg2)
         pout=[],..
         pein=2,..
         peout=2,..
-        gr_i=list("xstringb(orig(1),orig(2),'' END '',sz(1),sz(2),''fill'');",8),..
+        gr_i=[],..
         id="",..
         in_implicit=[],..
         out_implicit=[]),..
@@ -198,7 +192,7 @@ function [x,y,typ]=ENDBLK(job,arg1,arg2)
         nzcross=0,..
         nmode=0,..
         equations=list())
-        gr_i="xstringb(orig(1),orig(2),'' END '',sz(1),sz(2),''fill'')";
+        gr_i=[];
         x=standard_define([2 2],model,[],gr_i)
     end
 endfunction
index 3fb05d7..aaf1fd2 100644 (file)
 //
 
 function [x,y,typ]=EXPRESSION(job,arg1,arg2)
-    x=[];y=[];typ=[];
+    x=[];
+    y=[];
+    typ=[];
     select job
-    case "plot" then
-        standard_draw(arg1)
-    case "getinputs" then
-        [x,y,typ]=standard_inputs(arg1)
-    case "getoutputs" then
-        [x,y,typ]=standard_outputs(arg1)
-    case "getorigin" then
-        [x,y]=standard_origin(arg1)
     case "set" then
         x=arg1
-        model=arg1.model;graphics=arg1.graphics;
+        model=arg1.model;
+        graphics=arg1.graphics;
         exprs=graphics.exprs
         %scicos_context=%scicos_context;
-        for ii=1:8,execstr("%scicos_context.u"+string(ii)+"=0"),end
+        for ii=1:8,
+            execstr("%scicos_context.u"+string(ii)+"=0"),
+        end
         ieee(2)
         while %t do
             [ok,%nin,%exx,%usenz,exprs]=scicos_getvalue(..
@@ -48,9 +45,13 @@ function [x,y,typ]=EXPRESSION(job,arg1,arg2)
             ieee(0)
             clear %scicos_context
 
-            if ~ok then break,end
+            if ~ok then
+                break,
+            end
             %exx=strsubst(exprs(2)," ","")
-            if %exx==emptystr() then %exx="0",end  //avoid empty
+            if %exx==emptystr() then
+                %exx="0",
+            end  //avoid empty
             //expression
 
             if %nin==1 then
@@ -59,7 +60,9 @@ function [x,y,typ]=EXPRESSION(job,arg1,arg2)
                 %nini=%nin
             end
             %head="%foo("
-            for %jji=1:%nini-1,%head=%head+"u"+string(%jji)+",",end
+            for %jji=1:%nini-1,
+                %head=%head+"u"+string(%jji)+",",
+            end
             %head=%head+"u"+string(%nini)+")"
             ok=execstr("deff(%head,%exx)","errcatch")==0
             if ~ok then
@@ -114,7 +117,7 @@ function [x,y,typ]=EXPRESSION(job,arg1,arg2)
         model.nmode=nz
         model.dep_ut=[%t %f]
         exprs=[string(size(in,"*"));txt;"1"]
-        gr_i=["xstringb(orig(1),orig(2),[''Mathematical'';''Expression''],sz(1),sz(2),''fill'');"]
+        gr_i=[]
         x=standard_define([5 2],model,exprs,gr_i)
     end
 endfunction
@@ -175,7 +178,9 @@ function [ok,%ipar,%rpar,%nz]=compile_expr(%foo)
                     return
                 else
                     %ipar=[%ipar;5;100+%jjk]
-                    if or(100+%jjk==%ZCR) then %nz=%nz+1,end
+                    if or(100+%jjk==%ZCR) then
+                        %nz=%nz+1,
+                    end
                     %ijk=%ijk+1
                 end
             else
@@ -213,7 +218,9 @@ function [ok,%ipar,%rpar,%nz]=compile_expr(%foo)
                 %ipar=[%ipar;5;99]
             else
                 %ipar=[%ipar;5;evstr(%lst(%ijk)(2))]
-                if or(evstr(%lst(%ijk)(2))==%ZCR) then %nz=%nz+1,end
+                if or(evstr(%lst(%ijk)(2))==%ZCR) then
+                    %nz=%nz+1,
+                end
             end
         case 6
             //      %ipar=[%ipar;6;evstr(%lst(%ijk)(2))]
index 3e8c4a6..0ba2c37 100644 (file)
 //
 
 function [x,y,typ]=Extract_Activation(job,arg1,arg2)
-    x=[];y=[],typ=[]
+    x=[];
+    y=[];
+    typ=[];
     select job
-    case "plot" then
-        standard_draw(arg1)
-    case "getinputs" then
-        [x,y,typ]=standard_inputs(arg1)
-    case "getoutputs" then
-        [x,y,typ]=standard_outputs(arg1)
-    case "getorigin" then
-        [x,y]=standard_origin(arg1)
     case "set" then
         x=arg1
     case "define" then
@@ -155,7 +149,7 @@ function [x,y,typ]=Extract_Activation(job,arg1,arg2)
         model.evtout = 1;
         model.rpar = scs_m_1;
 
-        gr_i="xstringb(orig(1),orig(2),[''Extract'';''Activation''],sz(1),sz(2),''fill'')";
+        gr_i=[];
         x=standard_define([3 2],model,[],gr_i)
     end
 endfunction
index 1e4a378..aa9e9b9 100644 (file)
 //
 
 function [x,y,typ]=HYSTHERESIS(job,arg1,arg2)
-    x=[];y=[];typ=[]
+    x=[];
+    y=[];
+    typ=[];
     select job
-    case "plot" then
-        standard_draw(arg1)
-    case "getinputs" then
-        [x,y,typ]=standard_inputs(arg1)
-    case "getoutputs" then
-        [x,y,typ]=standard_outputs(arg1)
-    case "getorigin" then
-        [x,y]=standard_origin(arg1)
     case "set" then
         x=arg1;
-        graphics=arg1.graphics;exprs=graphics.exprs
+        graphics=arg1.graphics;
+        exprs=graphics.exprs
         model=arg1.model;
         while %t do
             [ok,high_lim,low_lim,out_high,out_low,nzz,exprs]=scicos_getvalue("Set parameters",..
             ["switch on at";"switch off at";"output when on";
             "output when off";"use zero crossing: yes (1), no (0)"],..
             list("vec",1,"vec",1,"vec",1,"vec",1,"vec",1),exprs)
-            if ~ok then break,end
+            if ~ok then
+                break,
+            end
             if low_lim>high_lim then
                 message("switch on value must be larger than switch off value")
             else
                 graphics.exprs=exprs;
                 model.rpar=[high_lim,low_lim,out_high,out_low]'
-                if nzz>0 then nzz=2,end
+                if nzz>0 then
+                    nzz=2,
+                end
                 model.nzcross=nzz
-                x.graphics=graphics;x.model=model
+                x.graphics=graphics;
+                x.model=model
                 break
             end
         end
@@ -70,9 +70,7 @@ function [x,y,typ]=HYSTHERESIS(job,arg1,arg2)
         exprs=[string(rpar);string(sign(nzz))]
 
 
-        gr_i=["xrect(orig(1)+0.329*sz(1),orig(2)+0.843*sz(2),0.282*sz(1),0.686*sz(2))";
-        "xrect(orig(1)+0.613*sz(1),orig(2)+0.843*sz(2),0.256*sz(1),0.003*sz(2))";
-        "xrect(orig(1)+0.082*sz(1),orig(2)+0.16*sz(2),0.245*sz(1),0.003*sz(2))"]
+        gr_i=[]
 
         x=standard_define([2 2],model,exprs,gr_i)
     end
index e963cf4..f1759ff 100644 (file)
 //
 
 function [x,y,typ]=IMPSPLIT_f(job,arg1,arg2)
-    x=[];y=[],typ=[];
+    x=[];
+    y=[];
+    typ=[];
 
     select job
-    case "plot" then
-        //**--- This is the function that DRAW the object
-        //pause ; //** debug
-        orig = arg1.graphics.orig ;
-        xarc(orig(1), orig(2)+1.0 , 1.0 , 1.0 , 0, 360*64)
-
-    case "getinputs" then
-        graphics=arg1.graphics;orig=graphics.orig;
-        x=orig(1)
-        y=orig(2)
-        typ=ones(x)*2
-
-    case "getoutputs" then
-        graphics=arg1.graphics;orig=graphics.orig;
-        x=[1 1]*orig(1)
-        y=[1 1]*orig(2)
-        typ=ones(x)*2
-
-    case "getorigin" then
-        [x,y]=standard_origin(arg1)
-
     case "set" then
         x=arg1;
     case "define" then
index e53c749..fa170a3 100644 (file)
 //
 
 function [x,y,typ]=LOGICAL_OP(job,arg1,arg2)
-    x=[];y=[];typ=[]
+    x=[];
+    y=[];
+    typ=[];
     select job
-    case "plot" then
-        VOP=["AND", "OR", "NAND", "NOR", "XOR","NOT"]
-        OPER=VOP(evstr( arg1.graphics.exprs(2))+1)
-        standard_draw(arg1)
-    case "getinputs" then
-        [x,y,typ]=standard_inputs(arg1)
-    case "getoutputs" then
-        [x,y,typ]=standard_outputs(arg1)
-    case "getorigin" then
-        [x,y]=standard_origin(arg1)
     case "set" then
         x=arg1;
-        graphics=arg1.graphics;exprs=graphics.exprs
+        graphics=arg1.graphics;
+        exprs=graphics.exprs
         model=arg1.model;
-        if size(exprs,1)==2 then exprs=[exprs;sci2exp(1);sci2exp(0)];end
+        if size(exprs,1)==2 then
+            exprs=[exprs;sci2exp(1);sci2exp(0)];
+        end
         while %t do
             [ok,nin,rule,Datatype,tp,exprs]=scicos_getvalue("Set parameters",..
             ["number of inputs";..
@@ -44,20 +39,29 @@ function [x,y,typ]=LOGICAL_OP(job,arg1,arg2)
             "Datatype (1=double 3=int32 ...)";..
             "Bitwise Rule(0=No 1=yes)"],..
             list("vec",1,"vec",1,"vec",1,"vec",1),exprs)
-            if ~ok then break,end
-            nin=int(nin);rule=int(rule);tp=int(tp)
+            if ~ok then
+                break,
+            end
+            nin=int(nin);
+            rule=int(rule);
+            tp=int(tp)
             if nin<1 then
-                message("Number of inputs must be >=1 ");ok=%f
+                message("Number of inputs must be >=1 ");
+                ok=%f
             elseif (rule<0)|(rule>5) then
-                message("Incorrect operator "+string(rule)+" ; must be 0 to 5.");ok=%f
+                message("Incorrect operator "+string(rule)+" ; must be 0 to 5.");
+                ok=%f
             elseif (rule==5)&(nin>1) then
                 message("Only one input allowed for NOT operation")
                 nin=1
             elseif ((Datatype==1)&(tp~=0))
-                message ("Bitwise Rule is only activated when Data type is integer");ok=%f
+                message ("Bitwise Rule is only activated when Data type is integer");
+                ok=%f
             end
             if ok then
-                if (tp~=0) then tp=1; end
+                if (tp~=0) then
+                    tp=1;
+                end
                 if Datatype==1 then
                     model.sim=list("logicalop",4)
                     model.ipar=[rule],
@@ -74,7 +78,9 @@ function [x,y,typ]=LOGICAL_OP(job,arg1,arg2)
                         model.sim=list("logicalop_ui16",4)
                     elseif Datatype==8 then
                         model.sim=list("logicalop_ui8",4)
-                    else message ("Datatype is not supported");ok=%f;
+                    else
+                        message ("Datatype is not supported");
+                        ok=%f;
                     end
                     model.ipar=[rule;tp];
                 end
@@ -92,7 +98,8 @@ function [x,y,typ]=LOGICAL_OP(job,arg1,arg2)
                 end
                 if ok then
                     graphics.exprs=exprs;
-                    x.graphics=graphics;x.model=model
+                    x.graphics=graphics;
+                    x.model=model
                     break
                 end
             end
@@ -111,7 +118,7 @@ function [x,y,typ]=LOGICAL_OP(job,arg1,arg2)
         model.dep_ut=[%t %f]
 
         exprs=[string(nin);string(ipar)]
-        gr_i=["xstringb(orig(1),orig(2),[''Logical Op'';OPER],sz(1),sz(2),''fill'');"]
+        gr_i=[]
         x=standard_define([4 2],model,exprs,gr_i)
     end
 endfunction
index d8cf9dd..a5e6969 100644 (file)
 //
 
 function [x,y,typ]=MBLOCK(job,arg1,arg2)
-    x=[];y=[];typ=[];
+    x=[];
+    y=[];
+    typ=[];
     select job
-    case "plot" then
-        standard_draw(arg1)
-    case "getinputs" then
-        [x,y,typ]=standard_inputs(arg1)
-    case "getoutputs" then
-        [x,y,typ]=standard_outputs(arg1)
-    case "getorigin" then
-        [x,y]=standard_origin(arg1)
     case "set" then
         x=arg1
         model=arg1.model
@@ -464,8 +458,7 @@ function [x,y,typ]=MBLOCK(job,arg1,arg2)
         model.in=ones(size(mo.inputs,"r"),1)
         model.out=ones(size(mo.outputs,"r"),1)
         model.equations=mo
-        gr_i=["txt=[''Modelica'';'' "+nameF+" ''];";
-        "xstringb(orig(1),orig(2),txt,sz(1),sz(2),''fill'')"]
+        gr_i=[]
         //x=standard_define([3 2],model,label,gr_i)
         x=standard_define([3 2],model,exprs,gr_i)
         x.graphics.in_implicit =intype
index 129deb6..d4aef07 100644 (file)
 //
 
 function [x,y,typ]=MEMORY_f(job,arg1,arg2)
-    x=[];y=[];typ=[];
+    x=[];
+    y=[];
+    typ=[];
     select job
-    case "plot" then
-        standard_draw(arg1)
-    case "getinputs" then
-        [x,y,typ]=standard_inputs(arg1)
-    case "getoutputs" then
-        [x,y,typ]=standard_outputs(arg1)
-    case "getorigin" then
-        [x,y]=standard_origin(arg1)
     case "set" then
         x=arg1;
-        graphics=arg1.graphics;exprs=graphics.exprs
+        graphics=arg1.graphics;
+        exprs=graphics.exprs
         model=arg1.model;
         while %t do
             [ok,a,inh,exprs]=scicos_getvalue("Set memory block parameters",..
             ["initial condition";"Inherit (1: no, 0: yes)"],list("vec",-1,"vec",1),exprs)
-            if ~ok then break,end
-            if inh==0 then inh=[]; else inh=1;end
+            if ~ok then
+                break,
+            end
+            if inh==0 then
+                inh=[];
+            else
+                inh=1;
+            end
             [model,graphics,ok]=check_io(model,graphics,-1,-1,inh,[])
-            out=size(a,"*");if out==0 then ok=%f,messagebox("Initial condition empty","modal","error");end
+            out=size(a,"*");
+            if out==0 then
+                ok=%f,
+                messagebox("Initial condition empty","modal","error");
+            end
             in=out
             if ok then
                 graphics.exprs=exprs;
-                model.rpar=a;model.in=in;model.out=out
-                x.graphics=graphics;x.model=model
+                model.rpar=a;
+                model.in=in;
+                model.out=out
+                x.graphics=graphics;
+                x.model=model
                 break
             end
         end
@@ -63,7 +71,7 @@ function [x,y,typ]=MEMORY_f(job,arg1,arg2)
         model.blocktype="m"
         model.dep_ut=[%f %f]
 
-        gr_i="xstringb(orig(1),orig(2),''Mem'',sz(1),sz(2),''fill'')"
+        gr_i=[]
         x=standard_define([2 2],model,exprs,gr_i)
     end
 endfunction
index a19a947..d16f36b 100644 (file)
 function [x,y,typ]=MPBLOCK(job,arg1,arg2)
     //
     // Copyright INRIA Oct 2006
-    x=[];y=[];typ=[];
+    x=[];
+    y=[];
+    typ=[];
     select job
-    case "plot" then
-        standard_draw(arg1)
-    case "getinputs" then
-        [x,y,typ]=standard_inputs(arg1)
-    case "getoutputs" then
-        [x,y,typ]=standard_outputs(arg1)
-    case "getorigin" then
-        [x,y]=standard_origin(arg1)
     case "set" then
         x=arg1
         model=arg1.model
@@ -454,8 +448,7 @@ function [x,y,typ]=MPBLOCK(job,arg1,arg2)
         model.in=ones(size(mo.inputs,"r"),1)
         model.out=ones(size(mo.outputs,"r"),1)
         model.equations=mo
-        gr_i=["txt=['' "+nameF+" ''];";
-        "xstringb(orig(1),orig(2),txt,sz(1),sz(2),''fill'')"]
+        gr_i=[]
         x=standard_define([3 2],model,exprs,gr_i)
         x.graphics.in_implicit =intype
         x.graphics.out_implicit=outtype
index ccca6cd..2d0a7d2 100644 (file)
 
 function [x,y,typ]=PAL_f(job,arg1,arg2)
     // Copyright INRIA
-    x=[];y=[],typ=[]
+    x=[];
+    y=[];
+    typ=[];
 
     select job
-    case "plot" then
-        standard_draw(arg1)
-
-    case "getinputs" then
-        x=[];y=[];typ=[];
-
-    case "getoutputs" then
-        x=[];y=[];typ=[];
-
-    case "getorigin" then
-        [x,y]=standard_origin(arg1)
-
     case "set" then
         [x,newparameters,needcompile,edited]=scicos(arg1.model.rpar)
         arg1.graphics.id=x.props.title(1);
@@ -56,11 +46,7 @@ function [x,y,typ]=PAL_f(job,arg1,arg2)
         model.blocktype="h";
         model.dep_ut=[%f %f];
 
-        gr_i=["thick=xget(''thickness'');xset(''thickness'',2);";
-        "xx=orig(1)+      [1 3 5 1 3 5 1 3 5]*(sz(1)/7);";
-        "yy=orig(2)+sz(2)-[1 1 1 4 4 4 7 7 7]*(sz(2)/10);";
-        "xrects([xx;yy;[sz(1)/7;sz(2)/5]*ones(1,9)]);";
-        "xset(''thickness'',thick)"]
+        gr_i=[]
 
         x=standard_define([2 2],model,[],gr_i)
         x.graphics.id=scs.props.title(1);
index b0ea14e..dec193c 100644 (file)
 ///withoutPrompt
 function [x,y,typ]=PENDULUM_ANIM(job,arg1,arg2)
     // Animation of the cart-pendulum problem
-    x=[];y=[];typ=[]
+    x=[];
+    y=[];
+    typ=[];
     select job
-    case "plot" then
-        standard_draw(arg1)
-    case "getinputs" then
-        [x,y,typ]=standard_inputs(o)
-    case "getoutputs" then
-        x=[];y=[];typ=[];
-    case "getorigin" then
-        [x,y]=standard_origin(arg1)
     case "set" then
         x=arg1;
-        graphics=arg1.graphics;exprs=graphics.exprs
-        model=arg1.model;dstate=model.dstate
+        graphics=arg1.graphics;
+        exprs=graphics.exprs
+        model=arg1.model;
+        dstate=model.dstate
         while %t do
             [ok,plen,csiz,phi,xmin,xmax,ymin,ymax,exprs]=scicos_getvalue(..
             "Set Scope parameters",..
             ["pendulum length";"cart size (square side)";"slope";
             "Xmin";"Xmax";  "Ymin"; "Ymax"; ],..
             list("vec",1,"vec",1,"vec",1,"vec",1,"vec",1,"vec",1,"vec",1),exprs)
-            if ~ok then break,end
+            if ~ok then
+                break,
+            end
             mess=[]
             if plen<=0|csiz<=0 then
                 mess=[mess;"Pendulum length and cart size must be positive.";" "]
@@ -62,13 +60,19 @@ function [x,y,typ]=PENDULUM_ANIM(job,arg1,arg2)
                 rpar=[plen;csiz;phi;xmin;xmax;ymin;ymax]
                 model.rpar=rpar;
                 graphics.exprs=exprs;
-                x.graphics=graphics;x.model=model
+                x.graphics=graphics;
+                x.model=model
                 break
             end
         end
     case "define" then
-        plen=2; csiz=2; phi=0;
-        xmin=-5;xmax=5;ymin=-5;ymax=5
+        plen=2;
+        csiz=2;
+        phi=0;
+        xmin=-5;
+        xmax=5;
+        ymin=-5;
+        ymax=5
         model=scicos_model()
         model.sim=list("anim_pen",5)
         model.in=[1;1]
@@ -79,14 +83,7 @@ function [x,y,typ]=PENDULUM_ANIM(job,arg1,arg2)
         model.dep_ut=[%f %f]
 
         exprs=string(model.rpar)
-        gr_i=["thick=xget(''thickness'');xset(''thickness'',2);";
-        "xx=orig(1)+sz(1)*[.4 .6 .6 .4 .4]"
-        "yy=orig(2)+sz(2)*[.2 .2 .4 .4 .2]"
-        "xpoly(xx,yy,''lines'')"
-        "xx=orig(1)+sz(1)*[.5 .6]"
-        "yy=orig(2)+sz(2)*[.4 .8]"
-        "xpoly(xx,yy)"
-        "xset(''thickness'',thick);"]
+        gr_i=[]
         x=standard_define([3 3],model,exprs,gr_i)
     end
 
index 8fa190d..c7cbed4 100644 (file)
 //
 
 function [x,y,typ]=RATELIMITER(job,arg1,arg2)
-    x=[];y=[];typ=[];
+    x=[];
+    y=[];
+    typ=[];
     select job
-    case "plot" then
-        standard_draw(arg1)
-    case "getinputs" then
-        [x,y,typ]=standard_inputs(arg1)
-    case "getoutputs" then
-        [x,y,typ]=standard_outputs(arg1)
-    case "getorigin" then
-        [x,y]=standard_origin(arg1)
     case "set" then
         x=arg1;
-        graphics=arg1.graphics;exprs=graphics.exprs
+        graphics=arg1.graphics;
+        exprs=graphics.exprs
         model=arg1.model;
         while %t do
             [ok,maxp,minp,exprs]=scicos_getvalue("Set rate limiter parameters",..
             ["max slope";"min slope";],list("vec",1,"vec",1),exprs)
-            if ~ok then break,end
+            if ~ok then
+                break,
+            end
             if maxp<=minp|maxp<=0|minp>=0  then
                 message("We must have max_slope> 0 > min_slope.")
             else
                 rpar=[maxp;minp]
                 model.rpar=rpar
                 graphics.exprs=exprs
-                x.graphics=graphics;x.model=model
+                x.graphics=graphics;
+                x.model=model
                 break
             end
         end
     case "define" then
-        minp=-1;maxp=1;rpar=[maxp;minp]
+        minp=-1;
+        maxp=1;
+        rpar=[maxp;minp]
         model=scicos_model()
         model.sim=list("ratelimiter",4)
         model.in=1
@@ -59,7 +59,7 @@ function [x,y,typ]=RATELIMITER(job,arg1,arg2)
         model.dep_ut=[%t %f]
 
         exprs=[string(maxp);string(minp)]
-        gr_i="xstringb(orig(1),orig(2),''Rate limiter'',sz(1),sz(2),''fill'')"
+        gr_i=[]
         x=standard_define([3.5 2],model,exprs,gr_i)
     end
 endfunction
index 4830644..a4db6e5 100644 (file)
 //
 
 function [x,y,typ] = RELATIONALOP(job,arg1,arg2)
-    x=[];y=[];typ=[]
+    x=[];
+    y=[];
+    typ=[];
     select job
-    case "plot" then
-        VOP=["==", "~=", "<", "<=", ">",">="]
-        OPER=VOP(evstr( arg1.graphics.exprs(1))+1)
-        standard_draw(arg1)
-    case "getinputs" then
-        [x,y,typ]=standard_inputs(arg1)
-    case "getoutputs" then
-        [x,y,typ]=standard_outputs(arg1)
-    case "getorigin" then
-        [x,y]=standard_origin(arg1)
     case "set" then
         x=arg1;
-        graphics=arg1.graphics;exprs=graphics.exprs
+        graphics=arg1.graphics;
+        exprs=graphics.exprs
         model=arg1.model;
-        if size(exprs,1)==2 then exprs=[exprs;sci2exp(1)]; end
+        if size(exprs,1)==2 then
+            exprs=[exprs;sci2exp(1)];
+        end
         while %t do
             [ok,rule,zcr,Datatype,exprs]=scicos_getvalue("Set parameters",..
             ["Operator: == (0), ~= (1), < (2), <= (3), > (4), >= (5)";..
             "Use zero crossing (no: 0), (yes: 1)"
             "Datatype (1=double 3=int32 ...)"],..
             list("vec",1,"vec",1,"vec",1),exprs)
-            if ~ok then break,end
-            rule=int(rule);if zcr<>0 then zcr=1,end
+            if ~ok then
+                break,
+            end
+            rule=int(rule);
+            if zcr<>0 then
+                zcr=1,
+            end
             if (rule<0)|(rule>5) then
                 message("Incorrect operator "+string(rule)+" ; must be 0 to 5.")
             end
@@ -62,7 +62,9 @@ function [x,y,typ] = RELATIONALOP(job,arg1,arg2)
                 model.sim=list("relational_op_ui16",4)
             elseif(Datatype==8) then
                 model.sim=list("relational_op_ui8",4)
-            else message("Datatype is not supported");ok=%f;
+            else
+                message("Datatype is not supported");
+                ok=%f;
             end
             if ok then
                 it=Datatype*ones(1,2)
@@ -76,7 +78,8 @@ function [x,y,typ] = RELATIONALOP(job,arg1,arg2)
                 model.ipar=[rule],
                 model.nzcross=zcr,
                 model.nmode=zcr,
-                x.graphics=graphics;x.model=model
+                x.graphics=graphics;
+                x.model=model
                 break
             end
         end
@@ -91,7 +94,7 @@ function [x,y,typ] = RELATIONALOP(job,arg1,arg2)
         model.dep_ut=[%t %f]
 
         exprs=[string(ipar);string(0)]
-        gr_i=["xstringb(orig(1),orig(2),[''Relational'';''Op : ''+OPER],sz(1),sz(2),''fill'');"]
+        gr_i=[]
         x=standard_define([3 2],model,exprs,gr_i)
     end
 endfunction
index d37143b..49c757c 100644 (file)
 function [x,y,typ] = SPLIT_f(job,arg1,arg2)
 
 
-    x=[];y=[],typ=[];
+    x=[];
+    y=[];
+    typ=[];
 
     select job
 
-    case "plot" then
-        //**--- This is the function that DRAW the object
-        //pause ; //** debug
-        orig = arg1.graphics.orig ;
-        xarc(orig(1), orig(2)+1.0 , 1.0 , 1.0 , 0, 360*64)
-
-    case "getinputs" then
-        graphics = arg1.graphics ;
-        orig = graphics.orig;
-        x = orig(1)
-        y = orig(2)
-        typ = ones(x)
-
-    case "getoutputs" then
-        graphics=arg1.graphics;orig=graphics.orig;
-        x=[1 1]*orig(1)
-        y=[1 1]*orig(2)
-        typ=ones(x)
-
-    case "getorigin" then
-        [x,y]=standard_origin(arg1)
-
     case "set" then
         x=arg1;
 
index 0251a42..1eee3a5 100644 (file)
 //
 
 function [x,y,typ]=SUPER_f(job,arg1,arg2)
-    x=[];y=[],typ=[]
+    x=[];
+    y=[];
+    typ=[];
 
     select job
-    case "plot" then
-        standard_draw(arg1)
-    case "getinputs" then
-        [x,y,typ]=standard_inputs(arg1)
-    case "getoutputs" then
-        [x,y,typ]=standard_outputs(arg1)
-    case "getorigin" then
-        [x,y]=standard_origin(arg1)
     case "set" then
         // not used on Xcos, re-implemented for compatibility
         xcos(arg1.model.rpar);
@@ -60,14 +54,7 @@ function [x,y,typ]=SUPER_f(job,arg1,arg2)
         model.blocktype="h";
         model.dep_ut=[%f %f];
 
-        gr_i=["thick=xget(''thickness'');xset(''thickness'',2);";
-        "xx=orig(1)+      [2 4 4]*(sz(1)/7);";
-        "yy=orig(2)+sz(2)-[2 2 6]*(sz(2)/10);";
-        "xrects([xx;yy;[sz(1)/7;sz(2)/5]*ones(1,3)]);";
-        "xx=orig(1)+      [1 2 3 4 5 6 3.5 3.5 3.5 4 5 5.5 5.5 5.5]*sz(1)/7;";
-        "yy=orig(2)+sz(2)-[3 3 3 3 3 3 3   7   7   7 7 7   7   3  ]*sz(2)/10;";
-        "xsegs(xx,yy,0);";
-        "xset(''thickness'',thick)"]
+        gr_i=[]
         x=standard_define([2 2],model,[],gr_i)
     end
 endfunction
index c3fd02c..de7d62f 100644 (file)
 function [x,y,typ]=TEXT_f(job,arg1,arg2)
     //** 22-23 Aug 2006: some carefull adjustements for the fonts
     //**                 inside the new graphics datastructure
-    x=[]; y=[]; typ=[];
+    x=[];
+    y=[];
+    typ=[];
 
     select job
 
-    case "plot" then //normal  position
-        graphics = arg1.graphics;
-        model    = arg1.model;
-
-        if model.rpar==[] then
-            model.rpar=graphics.exprs(1)
-        end //compatibility
-
-        //** save the previous parameter
-        //** ppat    = xget('pattern'); //** Get the current pattern or the current color.
-        //** oldfont = xget('font')   ; //** Get font=[fontid,fontsize] .
-        gh_winpal = gca(); //** get the current Axes proprieties
-
-        default_font_style = gh_winpal.font_style ;
-        default_font_size  = gh_winpal.font_size  ;
-        default_font_color = gh_winpal.font_color ;
-
-        //** set the new parameters
-        //** xset('font',model.ipar(1),model.ipar(2))
-        gh_winpal.font_style = model.ipar(1) ;
-        gh_winpal.font_size  = model.ipar(2) ;
-
-
-        //** special case for Windows
-        if getos() == "Windows" then
-            //** xset('pattern',scs_m.props.options.Background(1))
-            gh_winpal.font_color = scs_m.props.options.Background(1) ;
-
-            xstring(graphics.orig(1),graphics.orig(2),model.rpar)
-        end
-
-        //** set the new parameters
-        //** xset('pattern', default_color(1))  ;
-        gh_winpal.font_color = default_color(1) ;
-
-        //** print the string
-        xstring(graphics.orig(1), graphics.orig(2), model.rpar)
-
-        //** restore the old settings
-        //** xset('font',oldfont(1),oldfont(2))
-        //** xset('pattern',ppat)
-        gh_winpal.font_style = default_font_style ;
-        gh_winpal.font_size  = default_font_size  ;
-        gh_winpal.font_color = default_font_color ;
-
-    case "getinputs" then
-
-    case "getoutputs" then
-
-    case "getorigin" then
-        [x,y] = standard_origin(arg1)
-
     case "set" then
         x = arg1 ;
         graphics = arg1.graphics ;
@@ -92,7 +42,9 @@ function [x,y,typ]=TEXT_f(job,arg1,arg2)
             [ok,txt,font,siz,exprs] = scicos_getvalue("Set Text block parameters",..
             ["Text";"Font number";"Font size"], list("str",-1,"vec",1,"vec",1),exprs)
 
-            if ~ok then break,end //**
+            if ~ok then
+                break,
+            end //**
 
             if font<=0|font>6 then
                 message("Font number must be greater than 0 and less than 7")
index 5ed68c1..fce7c12 100644 (file)
 ///withoutPrompt
 function [blocks] = anim_pen(blocks,flag)
     win=20000+curblock()
-    if flag<>4 then H=scf(win), end
+    if flag<>4 then
+        H=scf(win),
+    end
     xold=blocks.z
     rpar=blocks.rpar
-    plen=rpar(1)*1.6;csiz=rpar(2)/4;phi=rpar(3);
+    plen=rpar(1)*1.6;
+    csiz=rpar(2)/4;
+    phi=rpar(3);
     rcirc=csiz/3;
     if flag==4 then
         xset("window",win)
@@ -41,8 +45,12 @@ function [blocks] = anim_pen(blocks,flag)
         xset("color",3)
         xsegs(XY(1,:),XY(2,:)-rcirc)
 
-        x=0;theta=0;
-        x1=x-csiz;x2=x+csiz;y1=-csiz;y2=csiz
+        x=0;
+        theta=0;
+        x1=x-csiz;
+        x2=x+csiz;
+        y1=-csiz;
+        y2=csiz
         XY=S*[x1 x2 x2 x1 x1;y1,y1,y2,y2,y1]
         xset("color",5)
         xfpoly(XY(1,:),XY(2,:))// cart
@@ -67,7 +75,8 @@ function [blocks] = anim_pen(blocks,flag)
         XY=Axe.children(4).data'+ [cos(phi)*(x-xold-rcirc);sin(phi)*(x-xold-rcirc)]*ones(1,5)
         Axe.children(2).data(1)=XY(1,2)
         Axe.children(2).data(2)=XY(2,2)
-        x1=x*cos(phi);y1=x*sin(phi)
+        x1=x*cos(phi);
+        y1=x*sin(phi)
         XY=[x1,x1+plen*sin(theta);y1,y1+plen*cos(theta)]
         Axe.children(1).data=XY'
         drawnow();
index 08f446a..0cedbba 100644 (file)
@@ -27,8 +27,13 @@ function [blocks] = bplatform2(blocks,flag)
     end
     xold=blocks.z
     rpar=blocks.rpar
-    plen=rpar(1);csiz=rpar(2);phi=rpar(3);
-    xmin=rpar(4);xmax=rpar(5);ymin=rpar(6);ymax=rpar(7);
+    plen=rpar(1);
+    csiz=rpar(2);
+    phi=rpar(3);
+    xmin=rpar(4);
+    xmax=rpar(5);
+    ymin=rpar(6);
+    ymax=rpar(7);
     rcirc=1;
     tplat=0.2;
 
index 3e18a2d..a669540 100644 (file)
 
 function [x,y,typ]=c_block(job,arg1,arg2)
     //
-    x=[];y=[];typ=[];
+    x=[];
+    y=[];
+    typ=[];
     select job
-    case "plot" then
-        standard_draw(arg1)
-    case "getinputs" then
-        [x,y,typ]=standard_inputs(arg1)
-    case "getoutputs" then
-        [x,y,typ]=standard_outputs(arg1)
-    case "getorigin" then
-        [x,y]=standard_origin(arg1)
     case "set" then
         x=arg1
-        model=arg1.model;graphics=arg1.graphics;
+        model=arg1.model;
+        graphics=arg1.graphics;
         label=graphics.exprs;
         while %t do
             [ok,i,o,rpar,funam,lab]=..
@@ -43,19 +38,27 @@ function [x,y,typ]=c_block(job,arg1,arg2)
             "System parameters vector";
             "function name"],..
             list("vec",-1,"vec",-1,"vec",-1,"str",-1),label(1))
-            if ~ok then break,end
-            if funam==" " then break,end
+            if ~ok then
+                break,
+            end
+            if funam==" " then
+                break,
+            end
             label(1)=lab
             rpar=rpar(:)
-            i=int(i(:));ni=size(i,1);
-            o=int(o(:));no=size(o,1);
+            i=int(i(:));
+            ni=size(i,1);
+            o=int(o(:));
+            no=size(o,1);
             tt=label(2);
             if model.sim(1)<>funam|size(model.in,"*")<>size(i,"*")..
                 |size(model.out,"*")<>size(o,"*") then
                 tt=[]
             end
             [ok,tt]=CFORTR(funam,tt,i,o)
-            if ~ok then break,end
+            if ~ok then
+                break,
+            end
             [model,graphics,ok]=check_io(model,graphics,i,o,[],[])
             if ok then
                 model.sim(1)=funam
@@ -100,7 +103,7 @@ function [x,y,typ]=c_block(job,arg1,arg2)
         //**********************************************************************************
         label=list([sci2exp(in);sci2exp(out);  strcat(sci2exp(rpar));funam],..
         list([]))
-        gr_i=["xstringb(orig(1),orig(2),''C block'',sz(1),sz(2),''fill'');"]
+        gr_i=[]
         x=standard_define([3 2],model,label,gr_i)
     end
 endfunction
index b354155..f3abb85 100644 (file)
 
 function [x,y,typ]=fortran_block(job,arg1,arg2)
     //
-    x=[];y=[];typ=[];
+    x=[];
+    y=[];
+    typ=[];
     select job
-    case "plot" then
-        standard_draw(arg1)
-    case "getinputs" then
-        [x,y,typ]=standard_inputs(arg1)
-    case "getoutputs" then
-        [x,y,typ]=standard_outputs(arg1)
-    case "getorigin" then
-        [x,y]=standard_origin(arg1)
     case "set" then
         x=arg1;
-        model=arg1.model;graphics=arg1.graphics;
+        model=arg1.model;
+        graphics=arg1.graphics;
         label=graphics.exprs;
         while %t do
             [ok,i,o,rpar,funam,lab]=..
@@ -43,19 +38,27 @@ function [x,y,typ]=fortran_block(job,arg1,arg2)
             "System parameters vector";
             "function name"],..
             list("vec",-1,"vec",-1,"vec",-1,"str",-1),label(1))
-            if ~ok then break,end
-            if funam==" " then break,end
+            if ~ok then
+                break,
+            end
+            if funam==" " then
+                break,
+            end
             label(1)=lab
             rpar=rpar(:)
-            i=int(i(:));ni=size(i,1);
-            o=int(o(:));no=size(o,1);
+            i=int(i(:));
+            ni=size(i,1);
+            o=int(o(:));
+            no=size(o,1);
             tt=label(2);
             if model.sim(1)<>funam|size(model.in,"*")<>size(i,"*")..
                 |size(model.out,"*")<>size(o,"*") then
                 tt=[]
             end
             [ok,tt]=FORTR(funam,tt,i,o)
-            if ~ok then break,end
+            if ~ok then
+                break,
+            end
             [model,graphics,ok]=check_io(model,graphics,i,o,[],[])
             if ok then
                 model.sim(1)=funam
@@ -84,7 +87,7 @@ function [x,y,typ]=fortran_block(job,arg1,arg2)
         funam="forty"
         label=list([sci2exp(model.in);sci2exp(model.out);..
         strcat(sci2exp(model.rpar));funam],list([]))
-        gr_i=["xstringb(orig(1),orig(2),''Fortran'',sz(1),sz(2),''fill'');"]
+        gr_i=[]
         x=standard_define([4 2],model,label,gr_i)
     end
 endfunction
index b0d5336..03a1ade 100644 (file)
@@ -66,18 +66,14 @@ function [x,y,typ]=func_block(job,arg1,arg2)
     //                        'z' if zero-crossing.
     //          firing      - boolean initial clock firing if true
     //
-    x=[];y=[];typ=[];
+    x=[];
+    y=[];
+    typ=[];
     select job
-    case "plot" then
-        standard_draw(arg1)
-    case "getinputs" then
-        [x,y,typ]=standard_inputs(arg1)
-    case "getoutputs" then
-        [x,y,typ]=standard_outputs(arg1)
-    case "getorigin" then
-        [x,y]=standard_origin(arg1)
     case "set" then
-        model=arg1.model;graphics=arg1.graphics;exprs=graphics.exprs
+        model=arg1.model;
+        graphics=arg1.graphics;
+        exprs=graphics.exprs
         x=arg1
         model=x.model
         [ok,mac,exprs]=genfunc(exprs)
@@ -96,7 +92,7 @@ function [x,y,typ]=func_block(job,arg1,arg2)
         model.dep_ut=[%t %f]
 
         exprs="v=sin(u);y=u*v"
-        gr_i=["xstringb(orig(1),orig(2),''Func'',sz(1),sz(2),''fill'');"]
+        gr_i=[]
         x=standard_define([2 2],model,exprs,gr_i)
     end
 endfunction
index 48dfd1a..f40a589 100644 (file)
 
 function [x,y,typ]=generic_block(job,arg1,arg2)
     //
-    x=[];y=[];typ=[];
+    x=[];
+    y=[];
+    typ=[];
     select job
-    case "plot" then
-        standard_draw(arg1)
-    case "getinputs" then
-        [x,y,typ]=standard_inputs(arg1)
-    case "getoutputs" then
-        [x,y,typ]=standard_outputs(arg1)
-    case "getorigin" then
-        [x,y]=standard_origin(arg1)
     case "set" then
         x=arg1
-        model=arg1.model;graphics=arg1.graphics;label=graphics.exprs
-        if size(label,"*")==14 then label(9)=[],end //compatiblity
+        model=arg1.model;
+        graphics=arg1.graphics;
+        label=graphics.exprs
+        if size(label,"*")==14 then
+            label(9)=[],
+        end //compatiblity
         while %t do
             [ok,function_name,funtyp,i,o,ci,co,xx,z,rpar,ipar,auto0,depu,dept,lab]=..
             scicos_getvalue("Set GENERIC block parameters",..
@@ -54,28 +52,51 @@ function [x,y,typ]=generic_block(job,arg1,arg2)
             list("str",1,"vec",1,"vec",-1,"vec",-1,"vec",-1,"vec",-1,..
             "vec",-1,"vec",-1,"vec",-1,"vec",-1,"vec","sum(%6)",..
             "str",1,"str",1),label)
-            if ~ok then break,end
+            if ~ok then
+                break,
+            end
             label=lab
             function_name=stripblanks(function_name)
-            xx=xx(:);z=z(:);rpar=rpar(:);ipar=int(ipar(:));
+            xx=xx(:);
+            z=z(:);
+            rpar=rpar(:);
+            ipar=int(ipar(:));
             i=int(i(:));
             o=int(o(:));
             ci=int(ci(:));
             co=int(co(:));
             funtyp=int(funtyp)
-            if funtyp<0 then message("function type cannot be negative");ok=%f;end
+            if funtyp<0 then
+                message("function type cannot be negative");
+                ok=%f;
+            end
             if [ci;co]<>[] then
-                if max([ci;co])>1 then message("vector event links not supported");ok=%f;end
+                if max([ci;co])>1 then
+                    message("vector event links not supported");
+                    ok=%f;
+                end
+            end
+            depu=stripblanks(depu);
+            if part(depu,1)=="y" then
+                depu=%t;
+            else
+                depu=%f;
+            end
+            dept=stripblanks(dept);
+            if part(dept,1)=="y" then
+                dept=%t;
+            else
+                dept=%f;
             end
-            depu=stripblanks(depu);if part(depu,1)=="y" then depu=%t; else depu=%f;end
-            dept=stripblanks(dept);if part(dept,1)=="y" then dept=%t; else dept=%f;end
             dep_ut=[depu dept];
             if ok then
                 [model,graphics,ok]=check_io(model,graphics,i,o,ci,co)
             end
             if ok then
                 // AVERIFIER
-                if funtyp==3 then needcompile=4;end
+                if funtyp==3 then
+                    needcompile=4;
+                end
                 model.sim=list(function_name,funtyp);
                 model.state=xx
                 model.dstate=z
@@ -115,7 +136,7 @@ function [x,y,typ]=generic_block(job,arg1,arg2)
         sci2exp(model.state);sci2exp(model.dstate);
         sci2exp(model.rpar);sci2exp(model.ipar);
         sci2exp(model.firing);"y";"n"];
-        gr_i=["xstringb(orig(1),orig(2),''GENERIC'',sz(1),sz(2),''fill'');"]
+        gr_i=[]
         x=standard_define([2 2],model,label,gr_i)
     end
 endfunction
index 0607a7b..ae05dc2 100644 (file)
 
 function [x,y,typ]=generic_block2(job,arg1,arg2)
     //
-    x=[];y=[];typ=[];
+    x=[];
+    y=[];
+    typ=[];
     select job
-    case "plot" then
-        standard_draw(arg1)
-    case "getinputs" then
-        [x,y,typ]=standard_inputs(arg1)
-    case "getoutputs" then
-        [x,y,typ]=standard_outputs(arg1)
-    case "getorigin" then
-        [x,y]=standard_origin(arg1)
     case "set" then
         x=arg1
-        model=arg1.model;graphics=arg1.graphics;label=graphics.exprs
-        if size(label,"*")==14 then label(9)=[],end //compatiblity
+        model=arg1.model;
+        graphics=arg1.graphics;
+        label=graphics.exprs
+        if size(label,"*")==14 then
+            label(9)=[],
+        end //compatiblity
         while %t do
             [ok,function_name,funtyp,i,o,ci,co,xx,z,rpar,ipar,nmode,nzcr,auto0,depu,dept,lab]=..
             scicos_getvalue("Set GENERIC block parameters",..
@@ -56,28 +54,51 @@ function [x,y,typ]=generic_block2(job,arg1,arg2)
             list("str",1,"vec",1,"vec",-1,"vec",-1,"vec",-1,"vec",-1,..
             "vec",-1,"vec",-1,"vec",-1,"vec",-1,"vec",1,"vec",1,"vec","sum(%6)",..
             "str",1,"str",1),label)
-            if ~ok then break,end
+            if ~ok then
+                break,
+            end
             label=lab
             function_name=stripblanks(function_name)
-            xx=xx(:);z=z(:);rpar=rpar(:);ipar=int(ipar(:));
+            xx=xx(:);
+            z=z(:);
+            rpar=rpar(:);
+            ipar=int(ipar(:));
             i=int(i(:));
             o=int(o(:));
             ci=int(ci(:));
             co=int(co(:));
             funtyp=int(funtyp)
-            if funtyp<0 then message("function type cannot be negative");ok=%f;end
+            if funtyp<0 then
+                message("function type cannot be negative");
+                ok=%f;
+            end
             if [ci;co]<>[] then
-                if max([ci;co])>1 then message("vector event links not supported");ok=%f;end
+                if max([ci;co])>1 then
+                    message("vector event links not supported");
+                    ok=%f;
+                end
+            end
+            depu=stripblanks(depu);
+            if part(depu,1)=="y" then
+                depu=%t;
+            else
+                depu=%f;
+            end
+            dept=stripblanks(dept);
+            if part(dept,1)=="y" then
+                dept=%t;
+            else
+                dept=%f;
             end
-            depu=stripblanks(depu);if part(depu,1)=="y" then depu=%t; else depu=%f;end
-            dept=stripblanks(dept);if part(dept,1)=="y" then dept=%t; else dept=%f;end
             dep_ut=[depu dept];
             if ok then
                 [model,graphics,ok]=check_io(model,graphics,i,o,ci,co)
             end
             if ok then
                 // AVERIFIER
-                if funtyp==3 then needcompile=4;end
+                if funtyp==3 then
+                    needcompile=4;
+                end
                 model.sim=list(function_name,funtyp);
                 model.state=xx
                 model.dstate=z
@@ -120,7 +141,7 @@ function [x,y,typ]=generic_block2(job,arg1,arg2)
         sci2exp(model.rpar);sci2exp(model.ipar);
         sci2exp(model.nmode);sci2exp(model.nzcross);
         sci2exp(model.firing);"y";"n"];
-        gr_i=["xstringb(orig(1),orig(2),''GENERIC'',sz(1),sz(2),''fill'');"]
+        gr_i=[]
         x=standard_define([2 2],model,label,gr_i)
     end
 endfunction
index 5591d73..1ed616d 100644 (file)
 
 function [x,y,typ]=generic_block3(job,arg1,arg2)
     //
-    x=[];y=[];typ=[];
+    x=[];
+    y=[];
+    typ=[];
     select job
-    case "plot" then
-        standard_draw(arg1)
-    case "getinputs" then
-        [x,y,typ]=standard_inputs(arg1)
-    case "getoutputs" then
-        [x,y,typ]=standard_outputs(arg1)
-    case "getorigin" then
-        [x,y]=standard_origin(arg1)
     case "set" then
         x=arg1
-        model=arg1.model;graphics=arg1.graphics;label=graphics.exprs
-        if size(label,"*")==14 then label(9)=[],end //compatiblity
+        model=arg1.model;
+        graphics=arg1.graphics;
+        label=graphics.exprs
+        if size(label,"*")==14 then
+            label(9)=[],
+        end //compatiblity
         while %t do
             [ok,function_name,funtyp,in,it,out,ot,ci,co,xx,z,oz,...
             rpar,ipar,opar,nmode,nzcr,auto0,depu,dept,lab]=..
@@ -61,27 +59,56 @@ function [x,y,typ]=generic_block3(job,arg1,arg2)
             list("str",1,"vec",1,"mat",[-1 2],"vec",-1,"mat",[-1 2],"vec",-1,"vec",-1,"vec",-1,..
             "vec",-1,"vec",-1,"lis",-1,"vec",-1,"vec",-1,"lis",-1,"vec",1,"vec",1,"vec","sum(%8)",..
             "str",1,"str",1),label)
-            if ~ok then break,end
+            if ~ok then
+                break,
+            end
             label=lab
             function_name=stripblanks(function_name)
-            xx=xx(:);z=z(:);rpar=rpar(:);ipar=int(ipar(:));
+            xx=xx(:);
+            z=z(:);
+            rpar=rpar(:);
+            ipar=int(ipar(:));
             ci=int(ci(:));
             co=int(co(:));
             funtyp=funtyp
-            if funtyp<0 then message("function type cannot be negative");ok=%f;end
+            if funtyp<0 then
+                message("function type cannot be negative");
+                ok=%f;
+            end
             if [ci;co]<>[] then
-                if max([ci;co])>1 then message("vector event links not supported");ok=%f;end
+                if max([ci;co])>1 then
+                    message("vector event links not supported");
+                    ok=%f;
+                end
+            end
+            if type(opar)<>15 then
+                message("object parameter must be a list");
+                ok=%f;
+            end
+            if type(oz)<>15 then
+                message("discrete object state must be a list");
+                ok=%f;
+            end
+            depu=stripblanks(depu);
+            if part(depu,1)=="y" then
+                depu=%t;
+            else
+                depu=%f;
+            end
+            dept=stripblanks(dept);
+            if part(dept,1)=="y" then
+                dept=%t;
+            else
+                dept=%f;
             end
-            if type(opar)<>15 then message("object parameter must be a list");ok=%f;end
-            if type(oz)<>15 then message("discrete object state must be a list");ok=%f;end
-            depu=stripblanks(depu);if part(depu,1)=="y" then depu=%t; else depu=%f;end
-            dept=stripblanks(dept);if part(dept,1)=="y" then dept=%t; else dept=%f;end
             dep_ut=[depu dept];
             if ok then
                 [model,graphics,ok]=set_io(model,graphics,list(in,it),list(out,ot),ci,co)
             end
             if ok then
-                if funtyp==3 then needcompile=4;end
+                if funtyp==3 then
+                    needcompile=4;
+                end
                 model.sim=list(function_name,funtyp);
                 model.state=xx
                 model.dstate=z
@@ -130,7 +157,7 @@ function [x,y,typ]=generic_block3(job,arg1,arg2)
         sci2exp(model.nmode);
         sci2exp(model.nzcross);
         sci2exp(model.firing);"y";"n"];
-        gr_i=["xstringb(orig(1),orig(2),''GENERIC'',sz(1),sz(2),''fill'');"]
+        gr_i=[]
         x=standard_define([4 2],model,label,gr_i)
     end
 endfunction
index 147a2a2..fa37ea6 100644 (file)
@@ -21,7 +21,8 @@
 
 function [out1,out2]=m_sin(t,x,z,up,uc,clock,flag,rpar,ipar)
     //if flag>0 then write(0,'m_sin t='+string(t)+' flag ='+string(flag)),end
-    out1=[];out2=[];
+    out1=[];
+    out2=[];
     select flag
     case 1 then
         out1=sin(rpar(1)*t+rpar(2))
index c15579b..6407be9 100644 (file)
 
 function [x,y,typ]=scifunc_block(job,arg1,arg2)
     //%Description
-    // job=='plot' :      block drawing
-    //                    arg1 is block data structure
-    //                    arg2 :unused
-    // job=='getinputs' : return position and type of inputs ports
-    //                    arg1 is block data structure
-    //                    x  : x coordinates of ports
-    //                    x  : y coordinates of ports
-    //                    typ: type of ports
-    // job=='getoutputs' : return position and type of outputs ports
-    //                    arg1 is block data structure
-    //                    x  : x coordinates of ports
-    //                    x  : y coordinates of ports
-    //                    typ: type of ports
-    // job=='getorigin'  : return block origin coordinates
-    //                    x  : x coordinates of block origin
-    //                    x  : y coordinates of block origin
     // job=='set'        : block parameters acquisition
     //                    arg1 is block data structure
     //                    x is returned block data structure
@@ -66,23 +50,20 @@ function [x,y,typ]=scifunc_block(job,arg1,arg2)
     //                        'z' if zero-crossing.
     //          firing      - vector of initial output event firing times
     //
-    x=[];y=[];typ=[];
+    x=[];
+    y=[];
+    typ=[];
     select job
-    case "plot" then
-        standard_draw(arg1)
-    case "getinputs" then
-        [x,y,typ]=standard_inputs(arg1)
-    case "getoutputs" then
-        [x,y,typ]=standard_outputs(arg1)
-    case "getorigin" then
-        [x,y]=standard_origin(arg1)
     case "set" then
         needcompile=0
         x=arg1
-        model=arg1.model;graphics=arg1.graphics;
+        model=arg1.model;
+        graphics=arg1.graphics;
         exprs=graphics.exprs
 
-        if size(exprs(1),"*")==8 then exprs(1)(9)="0";end
+        if size(exprs(1),"*")==8 then
+            exprs(1)(9)="0";
+        end
         while %t do
             [ok,i,o,ci,co,xx,z,rpar,auto0,deptime,lab]=scicos_getvalue(..
             ["Set scifunc_block parameters";"only regular blocks supported"],..
@@ -97,19 +78,29 @@ function [x,y,typ]=scifunc_block(job,arg1,arg2)
             "is block always active (0:no, 1:yes)"  ],..
             list("vec",-1,"vec",-1,"vec",-1,"vec",-1,"vec",-1,"vec",-1,..
             "vec",-1,"vec","sum(%4)","vec",1),exprs(1))
-            if ~ok then break,end
+            if ~ok then
+                break,
+            end
             exprs(1)=lab
-            xx=xx(:);z=z(:);rpar=rpar(:)
+            xx=xx(:);
+            z=z(:);
+            rpar=rpar(:)
             nrp=prod(size(rpar))
             // create simulator
-            i=int(i(:));ni=size(i,1);
-            o=int(o(:));no=size(o,1);
-            ci=int(ci(:));nci=size(ci,1);
-            co=int(co(:));nco=size(co,1);
+            i=int(i(:));
+            ni=size(i,1);
+            o=int(o(:));
+            no=size(o,1);
+            ci=int(ci(:));
+            nci=size(ci,1);
+            co=int(co(:));
+            nco=size(co,1);
             [ok,tt,dep_ut]=genfunc1(exprs(2),i,o,nci,nco,size(xx,1),size(z,1),..
             nrp,"c")
             dep_ut(2)=(1==deptime)
-            if ~ok then break,end
+            if ~ok then
+                break,
+            end
             [model,graphics,ok]=check_io(model,graphics,i,o,ci,co)
             if ok then
                 auto=auto0
@@ -120,7 +111,9 @@ function [x,y,typ]=scifunc_block(job,arg1,arg2)
                     model.opar=model.ipar;
                     model.ipar=0;
                 end
-                if or(model.opar<>tt) then needcompile=4,end
+                if or(model.opar<>tt) then
+                    needcompile=4,
+                end
                 model.opar=tt
                 model.firing=auto
                 model.dep_ut=dep_ut
@@ -162,7 +155,7 @@ function [x,y,typ]=scifunc_block(job,arg1,arg2)
         strcat(sci2exp(x0));strcat(sci2exp(z0));
         strcat(sci2exp(rpar));sci2exp(auto)],..
         list("y1=sin(u1)"," "," ","y1=sin(u1)"," "," "," "))
-        gr_i=["xstringb(orig(1),orig(2),''Scifunc'',sz(1),sz(2),''fill'');"]
+        gr_i=[]
         x=standard_define([2 2],model,exprs,gr_i)
     end
 endfunction
index c36e00d..be0b17a 100644 (file)
 
 function [x,y,typ]=scifunc_block_m(job,arg1,arg2)
     //%Description
-    // job=='plot' :      block drawing
-    //                    arg1 is block data structure
-    //                    arg2 :unused
-    // job=='getinputs' : return position and type of inputs ports
-    //                    arg1 is block data structure
-    //                    x  : x coordinates of ports
-    //                    x  : y coordinates of ports
-    //                    typ: type of ports
-    // job=='getoutputs' : return position and type of outputs ports
-    //                    arg1 is block data structure
-    //                    x  : x coordinates of ports
-    //                    x  : y coordinates of ports
-    //                    typ: type of ports
-    // job=='getorigin'  : return block origin coordinates
-    //                    x  : x coordinates of block origin
-    //                    x  : y coordinates of block origin
     // job=='set'        : block parameters acquisition
     //                    arg1 is block data structure
     //                    x is returned block data structure
@@ -44,20 +28,15 @@ function [x,y,typ]=scifunc_block_m(job,arg1,arg2)
     //                    arg1: name of block parameters acquisition macro
     //                    x   : block data structure
     //
-    x=[];y=[];typ=[];
+    x=[];
+    y=[];
+    typ=[];
     select job
-    case "plot" then
-        standard_draw(arg1)
-    case "getinputs" then
-        [x,y,typ]=standard_inputs(arg1)
-    case "getoutputs" then
-        [x,y,typ]=standard_outputs(arg1)
-    case "getorigin" then
-        [x,y]=standard_origin(arg1)
     case "set" then
         needcompile=0
         x=arg1
-        model=arg1.model;graphics=arg1.graphics;
+        model=arg1.model;
+        graphics=arg1.graphics;
         exprs=graphics.exprs
 
         while %t do
@@ -74,9 +53,13 @@ function [x,y,typ]=scifunc_block_m(job,arg1,arg2)
             "is block always active (0:no, 1:yes)"],..
             list("mat",[-1 2],"mat",[-2 2],"vec",-1,"vec",-1,"vec",-1,"vec",-1,..
             "vec",-1,"vec",-1,"vec",1),exprs(1))
-            if ~ok then break,end
+            if ~ok then
+                break,
+            end
             exprs(1)=lab
-            xx=xx(:);z=z(:);rpar=rpar(:)
+            xx=xx(:);
+            z=z(:);
+            rpar=rpar(:)
             it=ones(1,size(i,1))
             ot=ones(1,size(o,1))
             nrp=prod(size(rpar))
@@ -85,12 +68,16 @@ function [x,y,typ]=scifunc_block_m(job,arg1,arg2)
             ni=size(i,1);
             //o=int(o(:));
             no=size(o,1);
-            ci=int(ci(:));nci=size(ci,1);
-            co=int(co(:));nco=size(co,1);
+            ci=int(ci(:));
+            nci=size(ci,1);
+            co=int(co(:));
+            nco=size(co,1);
             [ok,tt,dep_ut]=genfunc2(exprs(2),i,o,nci,nco,size(xx,1),size(z,1),..
             nrp,"c")
             dep_ut(2)=(1==deptime)
-            if ~ok then break,end
+            if ~ok then
+                break,
+            end
             //[model,graphics,ok]=check_io(model,graphics,i,o,ci,co)
             [model,graphics,ok]=set_io(model,graphics,list(i,it),list(o,ot),ci,co)
             if ok then
@@ -102,7 +89,9 @@ function [x,y,typ]=scifunc_block_m(job,arg1,arg2)
                     model.opar=model.ipar;
                     model.ipar=0;
                 end
-                if or(model.opar<>tt) then needcompile=4,end
+                if or(model.opar<>tt) then
+                    needcompile=4,
+                end
                 model.opar=tt
                 model.firing=auto
                 model.dep_ut=dep_ut
@@ -148,7 +137,7 @@ function [x,y,typ]=scifunc_block_m(job,arg1,arg2)
         strcat(sci2exp(x0));strcat(sci2exp(z0));
         strcat(sci2exp(rpar));sci2exp(auto);sci2exp(0)],..
         list("y1=sin(u1)"," "," ","y1=sin(u1)"," "," "," "))
-        gr_i=["xstringb(orig(1),orig(2),''Scifunc'',sz(1),sz(2),''fill'');"]
+        gr_i=[]
         x=standard_define([4 2],model,exprs,gr_i)
     end
 endfunction