Scicos_blocks: clean Sinks blocks interfaces 45/13245/2
Paul Bignier [Wed, 27 Nov 2013 09:03:58 +0000 (10:03 +0100)]
Removed unused 'job' and 'gr_i' values.

Change-Id: I3f2c305b8c6cb1c73305a8de365a72e7c14f84e2

21 files changed:
scilab/modules/scicos_blocks/macros/Sinks/AFFICH_m.sci
scilab/modules/scicos_blocks/macros/Sinks/BARXY.sci
scilab/modules/scicos_blocks/macros/Sinks/CANIMXY.sci
scilab/modules/scicos_blocks/macros/Sinks/CANIMXY3D.sci
scilab/modules/scicos_blocks/macros/Sinks/CEVENTSCOPE.sci
scilab/modules/scicos_blocks/macros/Sinks/CFSCOPE.sci
scilab/modules/scicos_blocks/macros/Sinks/CLKOUTV_f.sci
scilab/modules/scicos_blocks/macros/Sinks/CLKOUT_f.sci
scilab/modules/scicos_blocks/macros/Sinks/CMAT3D.sci
scilab/modules/scicos_blocks/macros/Sinks/CMATVIEW.sci
scilab/modules/scicos_blocks/macros/Sinks/CMSCOPE.sci
scilab/modules/scicos_blocks/macros/Sinks/CSCOPE.sci
scilab/modules/scicos_blocks/macros/Sinks/CSCOPXY.sci
scilab/modules/scicos_blocks/macros/Sinks/CSCOPXY3D.sci
scilab/modules/scicos_blocks/macros/Sinks/OUTIMPL_f.sci
scilab/modules/scicos_blocks/macros/Sinks/OUT_f.sci
scilab/modules/scicos_blocks/macros/Sinks/TOWS_c.sci
scilab/modules/scicos_blocks/macros/Sinks/TRASH_f.sci
scilab/modules/scicos_blocks/macros/Sinks/WFILE_f.sci
scilab/modules/scicos_blocks/macros/Sinks/WRITEAU_f.sci
scilab/modules/scicos_blocks/macros/Sinks/WRITEC_f.sci

index 4be099a..cdef16b 100644 (file)
@@ -25,23 +25,12 @@ function [x,y,typ] = AFFICH_m(job,arg1,arg2)
     //** 07 Aug 2008: this function has been update for Scilab 5.0 by
     //**              Simone Mannori and Jean-Baptiste Silvy
 
-    x=[]; y=[]; typ=[] ;
+    x=[];
+    y=[];
+    typ=[];
 
     select job
 
-    case "plot" then
-        ipar = arg1.model.ipar
-        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 ;
@@ -60,7 +49,9 @@ function [x,y,typ] = AFFICH_m(job,arg1,arg2)
             "Block inherits (1) or not (0)"],..
             list("mat",[1 2],"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 = [] ; //** no message
 
@@ -147,14 +138,7 @@ function [x,y,typ] = AFFICH_m(job,arg1,arg2)
         string(nd);
         string(0) ]
 
-        gr_i=["fnt=xget(''font'')"
-        "xset(''font'',ipar(1),ipar(2))";
-        "str='' ''+part(''0'',ones(1,ipar(5)-ipar(6)-2))+''.''+part(''0'',ones(1,ipar(6)))"
-        "str(1:model.in*model.in2)=str"
-        "str=matrix(str,model.in,model.in2)"
-        "rr=xstringl(orig(1),orig(2),str)"
-        "xstring(orig(1)+max(0,(sz(1)-rr(3))/2),orig(2)+max(0,(sz(2)-rr(4))/2),str)"
-        "xset(''font'',fnt(1),fnt(2))"]
+        gr_i=[]
 
         x = standard_define([3 2],model,exprs,gr_i)
 
index 485800a..ea39c3c 100644 (file)
 //
 
 function [x,y,typ]=BARXY(job,arg1,arg2)
-    x=[];y=[];typ=[];
+    x=[];
+    y=[];
+    typ=[];
     select job
-    case "plot" then
-        // deprecated
-    case "getinputs" then
-        // deprecater
-    case "getoutputs" then
-        // deprecated
-    case "getorigin" then
-        // deprecated
     case "set" then
         x=arg1;
         graphics=arg1.graphics;
index f654d4b..6aab410 100644 (file)
 
 function [x,y,typ]=CANIMXY(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
 
@@ -53,7 +48,9 @@ function [x,y,typ]=CANIMXY(job,arg1,arg2)
             "Buffer size"],..
             list("vec",1,"vec",1,"vec",1,"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(wpos,"*")<>0 &size(wpos,"*")<>2 then
@@ -94,23 +91,35 @@ function [x,y,typ]=CANIMXY(job,arg1,arg2)
                 in = nbr_curves*ones(2,1);
                 in2 = ones(2,1);
                 [model,graphics,ok]=set_io(model,graphics,list([in in2],ones(2,1)),list(),ones(1,1),[]);
-                if wpos==[] then wpos=[-1;-1];end
-                if wdim==[] then wdim=[-1;-1];end
+                if wpos==[] then
+                    wpos=[-1;-1];
+                end
+                if wdim==[] then
+                    wdim=[-1;-1];
+                end
                 rpar=[xmin;xmax;ymin;ymax]
                 ipar=[win;1;N;clrs;siz;0;wpos(:);wdim(:);nbr_curves]
                 //if prod(size(dstate))<>2*N+1 then dstate=zeros(2*N+1,1),end
                 //model.dstate=dstate;
-                model.rpar=rpar;model.ipar=ipar
+                model.rpar=rpar;
+                model.ipar=ipar
                 graphics.exprs=exprs;
-                x.graphics=graphics;x.model=model
+                x.graphics=graphics;
+                x.model=model
                 break
             end
         end
     case "define" then
-        win=-1; clrs=-4;
-        N=2; siz=1;
-        wpos=[-1;-1];wdim=[-1;-1];
-        xmin=-15;xmax=15;ymin=-15;ymax=+15
+        win=-1;
+        clrs=-4;
+        N=2;
+        siz=1;
+        wpos=[-1;-1];
+        wdim=[-1;-1];
+        xmin=-15;
+        xmax=15;
+        ymin=-15;
+        ymax=+15
         nbr_curves = 1;
 
         model=scicos_model()
@@ -136,12 +145,7 @@ function [x,y,typ]=CANIMXY(job,arg1,arg2)
         string(ymin);
         string(ymax);
         string(N)]
-        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 c44e15d..bd239ac 100644 (file)
 
 function [x,y,typ]=CANIMXY3D(job,arg1,arg2)
     //Scicos 3D 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;
         while %t do
             [ok,nbr_curves,clrs,siz,win,wpos,wdim,vec_x,vec_y,vec_z,param3ds,N,exprs]=scicos_getvalue(..
@@ -50,7 +45,9 @@ function [x,y,typ]=CANIMXY3D(job,arg1,arg2)
             "Alpha and Theta";
             "Buffer size"],..
             list("vec",1,"vec",-1,"vec",-1,"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(wpos,"*")<>0 &size(wpos,"*")<>2 then
                 mess=[mess;"Window position must be [] or a 2 vector";" "]
@@ -106,8 +103,12 @@ function [x,y,typ]=CANIMXY3D(job,arg1,arg2)
                 in = nbr_curves*ones(3,1);
                 in2 = ones(3,1);
                 [model,graphics,ok]=set_io(model,graphics,list([in in2],ones(3,1)),list(),ones(1,1),[]);
-                if wpos==[] then wpos=[-1;-1];end
-                if wdim==[] then wdim=[-1;-1];end
+                if wpos==[] then
+                    wpos=[-1;-1];
+                end
+                if wdim==[] then
+                    wdim=[-1;-1];
+                end
                 rpar=[vec_x(:);vec_y(:);vec_z(:);param3ds(:)]
                 size_siz = size(siz,"*");
                 ipar=[win;size_siz;N;clrs(:);siz(:);1;wpos(:);wdim(:);nbr_curves]
@@ -124,7 +125,8 @@ function [x,y,typ]=CANIMXY3D(job,arg1,arg2)
         N=2;
         clrs = [1;2;3;4;5;6;7;13]
         siz = [1;1;1;1;1;1;1;1]
-        wpos=[-1;-1];wdim=[-1;-1];
+        wpos=[-1;-1];
+        wdim=[-1;-1];
         param3ds=[50;280]
         vec_x = [-15;15]
         vec_y = [-15;15]
@@ -154,12 +156,7 @@ function [x,y,typ]=CANIMXY3D(job,arg1,arg2)
         strcat(string(vec_z)," ");
         strcat(string(param3ds)," ");
         string(N)]
-        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 afbcfc4..ce7ae85 100644 (file)
 //
 
 function [x,y,typ]=CEVENTSCOPE(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
         model=arg1.model;
         while %t do
             [ok,nclock,clrs,win,wpos,wdim,per,exprs]=scicos_getvalue(..
@@ -48,7 +43,9 @@ function [x,y,typ]=CEVENTSCOPE(job,arg1,arg2)
             clrs=int(clrs)
             win=int(win)
 
-            if ~ok then break,end //user cancel modification
+            if ~ok then
+                break,
+            end //user cancel modification
             mess=[]
             if size(wpos,"*")<>0 &size(wpos,"*")<>2 then
                 mess=[mess;"Window position must be [] or a 2 vector";" "]
@@ -81,19 +78,26 @@ function [x,y,typ]=CEVENTSCOPE(job,arg1,arg2)
                 " ";mess])
             end
             if ok then
-                if wpos==[] then wpos=[-1;-1];end
-                if wdim==[] then wdim=[-1;-1];end
+                if wpos==[] then
+                    wpos=[-1;-1];
+                end
+                if wdim==[] then
+                    wdim=[-1;-1];
+                end
                 rpar=per
                 ipar=[win;1;clrs(:);wpos(:);wdim(:)]
-                model.rpar=rpar;model.ipar=ipar
+                model.rpar=rpar;
+                model.ipar=ipar
                 graphics.exprs=exprs;
-                x.graphics=graphics;x.model=model
+                x.graphics=graphics;
+                x.model=model
                 break
             end
         end
     case "define" then
         nclock=1
-        win=-1; clrs=[1;3;5;7;9;11;13;15];
+        win=-1;
+        clrs=[1;3;5;7;9;11;13;15];
         wdim=[600;400]
         wpos=[-1;-1]
         per=30;
@@ -112,18 +116,7 @@ function [x,y,typ]=CEVENTSCOPE(job,arg1,arg2)
         sci2exp([]);
         sci2exp(wdim);
         string(per)]
-        gr_i=["thick=xget(''thickness'');xset(''thickness'',2);";
-        "xrect(orig(1)+sz(1)/10,orig(2)+(1-1/10)*sz(2),sz(1)*8/10,sz(2)*8/10);";
-        "xx=[orig(1)+sz(1)/5,orig(1)+sz(1)/5;";
-        "orig(1)+(1-1/5)*sz(1),orig(1)+sz(1)/5];";
-        "yy=[orig(2)+sz(2)/5,orig(2)+sz(2)/5;";
-        "orig(2)+sz(2)/5,orig(2)+(1-1/5)*sz(2)];";
-        "xarrows(xx,yy);";
-        "t=(0:0.3:2*%pi)'';";
-        "xx=orig(1)+(1/5+3*t/(10*%pi))*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 3f585db..4b482a7 100644 (file)
 //
 
 function [x,y,typ]=CFSCOPE(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
 
         model=arg1.model;
         //dstate=model.in
@@ -51,7 +46,9 @@ function [x,y,typ]=CFSCOPE(job,arg1,arg2)
             list("vec",8,"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(wpos,"*")<>0 &size(wpos,"*")<>2 then
                 mess=[mess;"Window position must be [] or a 2 vector";" "]
@@ -86,19 +83,29 @@ function [x,y,typ]=CFSCOPE(job,arg1,arg2)
                 " ";mess])
             end
             if ok then
-                if wpos==[] then wpos=[-1;-1];end
-                if wdim==[] then wdim=[-1;-1];end
+                if wpos==[] then
+                    wpos=[-1;-1];
+                end
+                if wdim==[] then
+                    wdim=[-1;-1];
+                end
                 rpar=[0;ymin;ymax;per]
-                if size(clrs,"*")>8 then clrs=clrs(1:8);end
-                if size(clrs,"*")<8 then clrs(8)=0;end
+                if size(clrs,"*")>8 then
+                    clrs=clrs(1:8);
+                end
+                if size(clrs,"*")<8 then
+                    clrs(8)=0;
+                end
                 ipar=[win;1;N;clrs(:);wpos(:);wdim(:);size(wu,"*");wu(:)]
                 //if prod(size(dstate))<>(8+1)*N+1 then dstate=-eye((8+1)*N+1,1),end
                 //model.dstate=dstate;
-                model.rpar=rpar;model.ipar=ipar
+                model.rpar=rpar;
+                model.ipar=ipar
                 model.firing=[] //compatibility
                 model.dep_ut=[%t %f] //compatibility
                 graphics.exprs=exprs;
-                x.graphics=graphics;x.model=model
+                x.graphics=graphics;
+                x.model=model
                 break
             end
         end
@@ -108,7 +115,9 @@ function [x,y,typ]=CFSCOPE(job,arg1,arg2)
         wpos=[-1;-1]
         clrs=[1;3;5;7;9;11;13;15];
         N=2;
-        ymin=-15;ymax=+15;per=30;
+        ymin=-15;
+        ymax=+15;
+        per=30;
         model=scicos_model()
         model.sim=list("cfscope",4)
         model.evtin=1
@@ -126,18 +135,7 @@ function [x,y,typ]=CFSCOPE(job,arg1,arg2)
         string(per);
         string(N);
         string([1])];
-        gr_i=["thick=xget(''thickness'');xset(''thickness'',2);";
-        "xrect(orig(1)+sz(1)/10,orig(2)+(1-1/10)*sz(2),sz(1)*8/10,sz(2)*8/10);";
-        "xx=[orig(1)+sz(1)/5,orig(1)+sz(1)/5;";
-        "orig(1)+(1-1/4)*sz(1),orig(1)+sz(1)/5];";
-        "yy=[orig(2)+sz(2)/5,orig(2)+sz(2)/5;";
-        "orig(2)+sz(2)/5,orig(2)+(1-1/3)*sz(2)];";
-        "xarrows(xx,yy);";
-        "t=(0:0.3:2*%pi)'';";
-        "xx=orig(1)+(1/5+3*t/(10*%pi))*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 4ab41aa..d1dd180 100644 (file)
@@ -21,7 +21,9 @@
 //
 
 function [x,y,typ]=CLKOUTV_f(job,arg1,arg2)
-    x=[];y=[];typ=[];
+    x=[];
+    y=[];
+    typ=[];
     select job
     case "plot" then
         xf=60;
@@ -30,15 +32,19 @@ function [x,y,typ]=CLKOUTV_f(job,arg1,arg2)
         sz=arg1.graphics.sz;
         orient=arg1.graphics.flip;
         prt=arg1.model.ipar;
-        pat=xget("pattern");xset("pattern",default_color(-1));
-        thick=xget("thickness");xset("thickness",2);
+        pat=xget("pattern");
+        xset("pattern",default_color(-1));
+        thick=xget("thickness");
+        xset("thickness",2);
         x=orig(1)+sz(1)*[1/2;1;  1;0;0  ];
         y=orig(2)+sz(2)*[0;  1/3;1;1;1/3];
-        xo=orig(1);yo=orig(2)+sz(2)/3;
+        xo=orig(1);
+        yo=orig(2)+sz(2)/3;
 
         gr_i=arg1.graphics.gr_i;
         if type(gr_i)==15 then
-            coli=gr_i(2);pcoli=xget("pattern");
+            coli=gr_i(2);
+            pcoli=xget("pattern");
             xfpolys(x,y,coli);
             xset("pattern",coli);
             xstringb(xo,yo,string(prt),sz(1),sz(2)/1.5);
@@ -75,7 +81,9 @@ function [x,y,typ]=CLKOUTV_f(job,arg1,arg2)
         y=orig(2)+sz(2)
         typ=-ones(x)
     case "getoutputs" then
-        x=[];y=[];typ=[];
+        x=[];
+        y=[];
+        typ=[];
     case "getorigin" then
         [x,y]=standard_origin(arg1)
     case "set" then
@@ -86,7 +94,9 @@ function [x,y,typ]=CLKOUTV_f(job,arg1,arg2)
         while %t do
             [ok,prt,exprs]=scicos_getvalue([msprintf(gettext("Set %s block parameters"),"CLKOUTV_f");" ";gettext("Event output port")],..
             gettext("Port number"),list("vec",1),exprs)
-            if ~ok then break,end
+            if ~ok then
+                break,
+            end
             prt=int(prt)
             if prt<=0 then
                 block_parameter_error(msprintf(gettext("Wrong value for ''Port Number'' parameter: %d."),prt), ..
index 567c2e6..298cfa8 100644 (file)
 //
 
 function [x,y,typ]=CLKOUT_f(job,arg1,arg2)
-    x=[];y=[];typ=[];
+    x=[];
+    y=[];
+    typ=[];
     select job
-    case "plot" then
-        xf=60
-        yf=40
-        orig=arg1.graphics.orig;
-        sz=arg1.graphics.sz;
-        orient=arg1.graphics.flip;
-        prt=arg1.model.ipar
-        pat=xget("pattern");xset("pattern",default_color(-1))
-        thick=xget("thickness");xset("thickness",2)
-        if orient then
-            x=orig(1)+sz(1)*[0;0;1/1.5;1;  1/1.5]
-            y=orig(2)+sz(2)*[0;1;1;    1/2;0    ]
-            xo=orig(1);yo=orig(2)
-            in= [-1/7  -1/14
-            0    0
-            -1/7   1/14
-            -1/7  -1/14]*diag([xf,yf])
-            xfpoly(in(:,1)+ones(4,1)*orig(1),..
-            in(:,2)+ones(4,1)*(orig(2)+sz(2)-sz(2)/2),1)
-        else
-            x=orig(1)+sz(1)*[0  ;1/3;1;1;1/3]
-            y=orig(2)+sz(2)*[1/2;1  ;1;0;0]
-            xo=orig(1)+sz(1)/3;yo=orig(2)
-            in= [1/7  -1/14
-            0    0
-            1/7   1/14
-            1/7  -1/14]*diag([xf,yf])
-            xfpoly(in(:,1)+ones(4,1)*(orig(1)+sz(1)),..
-            in(:,2)+ones(4,1)*(orig(2)+sz(2)-sz(2)/2),1)
-        end
-
-        gr_i=arg1.graphics.gr_i;
-        if type(gr_i)==15 then
-            coli=gr_i(2);pcoli=xget("pattern")
-            xfpolys(x,y,coli);
-            xset("pattern",coli)
-            xstringb(xo,yo,string(prt),sz(1)/1.5,sz(2))
-            xset("pattern",pcoli)
-            xstringb(xo,yo,string(prt),sz(1)/1.5,sz(2))
-        else
-            xstringb(xo,yo,string(prt),sz(1)/1.5,sz(2))
-            xpoly(x,y,"lines",1)
-        end
-
-        xset("thickness",thick)
-        xset("pattern",pat)
-        //identification
-        ident = arg1.graphics.id
-        if ident <> [] & ident <> "" then
-            font=xget("font")
-            xset("font", options.ID(1)(1), options.ID(1)(2))
-            rectangle = xstringl(orig(1)+3/2*sz(1), orig(2), ident)
-            w = rectangle(3)
-            h = rectangle(4)
-            xstringb(orig(1) - sz(1) /2 - w, orig(2) + sz(2) * 0.5 , ident , w, h)
-            xset("font", font(1), font(2))
-        end
-        x=[];y=[]
-    case "getinputs" then
-        orig=arg1.graphics.orig;
-        sz=arg1.graphics.sz;
-        if arg1.graphics.flip then
-            x=orig(1)
-            y=orig(2)+sz(2)/2
-        else
-            x=orig(1)+sz(1)
-            y=orig(2)+sz(2)/2
-        end
-        typ=-ones(x) //undefined type
-    case "getoutputs" then
-        x=[];y=[];typ=[];
-    case "getorigin" then
-        [x,y]=standard_origin(arg1)
     case "set" then
         x=arg1;
         graphics=arg1.graphics;
@@ -105,7 +34,9 @@ function [x,y,typ]=CLKOUT_f(job,arg1,arg2)
         while %t do
             [ok,prt,exprs]=scicos_getvalue("Set Event Output block parameters",..
             "Port number",list("vec",1),exprs)
-            if ~ok then break,end
+            if ~ok then
+                break,
+            end
             prt=int(prt)
             if prt<=0 then
                 message("Port number must be a positive integer")
index 2cf6e90..93cf6cd 100644 (file)
 //
 
 function [x,y,typ]=CMAT3D(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;
@@ -44,7 +38,9 @@ function [x,y,typ]=CMAT3D(job,arg1,arg2)
             "Zmin";
             "Zmax"],..
             list("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(vec_x,"*")<>size(vec_y,"*") then
                 mess=[mess;"Vector X and Vector Y must have the same size";" "]
@@ -96,7 +92,7 @@ function [x,y,typ]=CMAT3D(job,arg1,arg2)
         string("jetcolormap(25)");
         string(cmin);
         string(cmax)];
-        gr_i="xstringb(orig(1),orig(2),''Mat. 3D'',sz(1),sz(2),''fill'')"
+        gr_i=[]
         x=standard_define([2 2],model,exprs,gr_i)
     end
 endfunction
index ffdcba5..d4b476b 100644 (file)
 //
 
 function [x,y,typ]=CMATVIEW(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;
@@ -42,7 +36,9 @@ function [x,y,typ]=CMATVIEW(job,arg1,arg2)
             "Minimum level range";
             "Maximum level range"],..
             list("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 cmax<=cmin then
                 mess=[mess;"Error with minimum and maximum value";" "]
@@ -88,7 +84,7 @@ function [x,y,typ]=CMATVIEW(job,arg1,arg2)
         exprs=[string("jetcolormap(25)");
         string(cmin);
         string(cmax)];
-        gr_i="xstringb(orig(1),orig(2),''Mat. View'',sz(1),sz(2),''fill'')"
+        gr_i=[]
         x=standard_define([2 2],model,exprs,gr_i)
     end
 endfunction
index 24826d2..3cda405 100644 (file)
 //
 
 function [x,y,typ]=CMSCOPE(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
 
 
         model=arg1.model;
@@ -55,7 +50,9 @@ function [x,y,typ]=CMSCOPE(job,arg1,arg2)
             list("vec",-1,"vec",-1,"vec",1,"vec",-1,"vec",-1,..
             "vec","size(%1,''*'')","vec","size(%1,''*'')","vec","size(%1,''*'')",..
             "vec",1,"vec",1,"str",1),exprs)
-            if ~ok then break,end //user cancel modification
+            if ~ok then
+                break,
+            end //user cancel modification
             mess=[]
             if size(in,"*")<=0 then
                 mess=[mess;"Block must have at least one input port";" "]
@@ -114,8 +111,12 @@ function [x,y,typ]=CMSCOPE(job,arg1,arg2)
                 [model,graphics,ok]=set_io(model,graphics,list([in in2],ones(a,1)),list(),ones(1-heritance,1),[]);
             end
             if ok then
-                if wpos==[] then wpos=[-1;-1];end
-                if wdim==[] then wdim=[-1;-1];end
+                if wpos==[] then
+                    wpos=[-1;-1];
+                end
+                if wdim==[] then
+                    wdim=[-1;-1];
+                end
                 if ok then
                     period=per(:)';
                     yy=[ymin(:)';ymax(:)']
@@ -128,11 +129,13 @@ function [x,y,typ]=CMSCOPE(job,arg1,arg2)
                     model.evtin=ones(1-heritance,1)
                     model.dstate=[]
                     //model.dstate=dstate;
-                    model.rpar=rpar;model.ipar=ipar
+                    model.rpar=rpar;
+                    model.ipar=ipar
                     model.label=nom;
                     graphics.id=nom;
                     graphics.exprs=exprs;
-                    x.graphics=graphics;x.model=model
+                    x.graphics=graphics;
+                    x.model=model
                     //pause;
                     break
                 end
@@ -146,7 +149,9 @@ function [x,y,typ]=CMSCOPE(job,arg1,arg2)
         clrs=[1;3;5;7;9;11;13;15];
         N=20;
 
-        ymin=[-1;-5];ymax=[1;5];per=[30;30];
+        ymin=[-1;-5];
+        ymax=[1;5];
+        per=[30;30];
         yy=[ymin(:)';ymax(:)']
         period=per(:)'
         model=scicos_model()
@@ -171,7 +176,7 @@ function [x,y,typ]=CMSCOPE(job,arg1,arg2)
         string(N);
         string(0);
         emptystr()];
-        gr_i="xstringb(orig(1),orig(2),''MScope'',sz(1),sz(2),''fill'')"
+        gr_i=[]
         x=standard_define([2 2],model,exprs,gr_i)
     end
 endfunction
index bec3958..a12515c 100644 (file)
 //
 
 function [x,y,typ]=CSCOPE(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
 
         model=arg1.model;
         //dstate=model.in
@@ -52,7 +47,9 @@ function [x,y,typ]=CSCOPE(job,arg1,arg2)
             list("vec",8,"vec",1,"vec",-1,"vec",-1,"vec",1,..
             "vec",1,"vec",1,"vec",1,"vec",1,"str",1),..
             exprs)
-            if ~ok then break,end //user cancel modification
+            if ~ok then
+                break,
+            end //user cancel modification
             mess=[]
             if size(wpos,"*")<>0 &size(wpos,"*")<>2 then
                 mess=[mess;"Window position must be [] or a 2 vector";" "]
@@ -91,18 +88,24 @@ function [x,y,typ]=CSCOPE(job,arg1,arg2)
             end
 
             if ok then
-                if wpos==[] then wpos=[-1;-1];end
-                if wdim==[] then wdim=[-1;-1];end
+                if wpos==[] then
+                    wpos=[-1;-1];
+                end
+                if wdim==[] then
+                    wdim=[-1;-1];
+                end
                 rpar=[0;ymin;ymax;per]
                 ipar=[win;1;N;clrs(:);wpos(:);wdim(:)]
                 //if prod(size(dstate))<>(8+1)*N+1 then dstate=-eye((8+1)*N+1,1),end
                 //model.dstate=[];
-                model.rpar=rpar;model.ipar=ipar
+                model.rpar=rpar;
+                model.ipar=ipar
                 model.evtin=ones(1-heritance,1)
                 model.label=nom;
                 graphics.id=nom
                 graphics.exprs=exprs;
-                x.graphics=graphics;x.model=model
+                x.graphics=graphics;
+                x.model=model
                 break
             end
         end
@@ -112,7 +115,9 @@ function [x,y,typ]=CSCOPE(job,arg1,arg2)
         wpos=[-1;-1]
         clrs=[1;3;5;7;9;11;13;15];
         N=20;
-        ymin=-15;ymax=+15;per=30;
+        ymin=-15;
+        ymax=+15;
+        per=30;
 
         model=scicos_model()
         model.sim=list("cscope",4)
@@ -134,18 +139,7 @@ function [x,y,typ]=CSCOPE(job,arg1,arg2)
         string(N);
         string(0)';
         emptystr()]; //label-id
-        gr_i=["thick=xget(''thickness'');xset(''thickness'',2);";
-        "xrect(orig(1)+sz(1)/10,orig(2)+(1-1/10)*sz(2),sz(1)*8/10,sz(2)*8/10);";
-        "xx=[orig(1)+sz(1)/5,orig(1)+sz(1)/5;";
-        "orig(1)+(1-1/4)*sz(1),orig(1)+sz(1)/5];";
-        "yy=[orig(2)+sz(2)/5,orig(2)+sz(2)/5;";
-        "orig(2)+sz(2)/5,orig(2)+(1-1/3)*sz(2)];";
-        "xarrows(xx,yy);";
-        "t=(0:0.3:2*%pi)'';";
-        "xx=orig(1)+(1/5+3*t/(10*%pi))*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 867b9f5..dd00ae1 100644 (file)
 //
 
 function [x,y,typ]=CSCOPXY(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
         model=arg1.model;
         //dstate=model.dstate;
         while %t do
@@ -51,7 +46,9 @@ function [x,y,typ]=CSCOPXY(job,arg1,arg2)
             "Buffer size"],..
             list("vec",1,"vec",1,"vec",1,"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(wpos,"*")<>0 &size(wpos,"*")<>2 then
@@ -92,24 +89,34 @@ function [x,y,typ]=CSCOPXY(job,arg1,arg2)
                 in = nbr_curves*ones(2,1);
                 in2 = ones(2,1);
                 [model,graphics,ok]=set_io(model,graphics,list([in in2],ones(2,1)),list(),ones(1,1),[]);
-                if wpos==[] then wpos=[-1;-1];end
-                if wdim==[] then wdim=[-1;-1];end
+                if wpos==[] then
+                    wpos=[-1;-1];
+                end
+                if wdim==[] then
+                    wdim=[-1;-1];
+                end
                 rpar=[xmin;xmax;ymin;ymax]
                 ipar=[win;1;N;clrs;siz;1;wpos(:);wdim(:);nbr_curves]
                 //if prod(size(dstate))<>2*N+1 then dstate=-eye(2*N+1,1),end
                 //model.dstate=dstate;
-                model.rpar=rpar;model.ipar=ipar
+                model.rpar=rpar;
+                model.ipar=ipar
                 graphics.exprs=exprs;
-                x.graphics=graphics;x.model=model
+                x.graphics=graphics;
+                x.model=model
                 break
             end
         end
     case "define" then
-        win=-1; clrs=4;siz=1
+        win=-1;
+        clrs=4;siz=1
         wdim=[600;400]
         wpos=[-1;-1]
         N=2;
-        xmin=-15;xmax=15;ymin=-15;ymax=+15
+        xmin=-15;
+        xmax=15;
+        ymin=-15;
+        ymax=+15
         nbr_curves = 1;
 
         model=scicos_model()
@@ -134,12 +141,7 @@ function [x,y,typ]=CSCOPXY(job,arg1,arg2)
         string(ymin);
         string(ymax);
         string(N)];
-        gr_i=["thick=xget(''thickness'');xset(''thickness'',2);";
-        "t=(0:0.2:2*%pi)'';";
-        "xx=orig(1)+(1/5+(cos(3*t)+1)*3/10)*sz(1);";
-        "yy=orig(2)+(1/4.3+(sin(t+1)+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 9ddc44c..a7f03d6 100644 (file)
 //
 
 function [x,y,typ]=CSCOPXY3D(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
         model=arg1.model;
         while %t do
             [ok,nbr_curves,clrs,siz,win,wpos,wdim,vec_x,vec_y,vec_z,param3ds,N,exprs]=scicos_getvalue(..
@@ -50,7 +45,9 @@ function [x,y,typ]=CSCOPXY3D(job,arg1,arg2)
             "Buffer size"],..
             list("vec",1,"vec",-1,"vec",-1,"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(wpos,"*")<>0 &size(wpos,"*")<>2 then
                 mess=[mess;"Window position must be [] or a 2 vector";" "]
@@ -100,14 +97,20 @@ function [x,y,typ]=CSCOPXY3D(job,arg1,arg2)
                 in = nbr_curves*ones(3,1);
                 in2 = ones(3,1);
                 [model,graphics,ok]=set_io(model,graphics,list([in in2],ones(3,1)),list(),ones(1,1),[]);
-                if wpos==[] then wpos=[-1;-1];end
-                if wdim==[] then wdim=[-1;-1];end
+                if wpos==[] then
+                    wpos=[-1;-1];
+                end
+                if wdim==[] then
+                    wdim=[-1;-1];
+                end
                 rpar=[vec_x(:);vec_y(:);vec_z(:);param3ds(:)]
                 size_siz = size(siz,"*");
                 ipar=[win;size_siz;N;clrs(:);siz(:);1;wpos(:);wdim(:);nbr_curves]
-                model.rpar=rpar;model.ipar=ipar
+                model.rpar=rpar;
+                model.ipar=ipar
                 graphics.exprs=exprs;
-                x.graphics=graphics;x.model=model
+                x.graphics=graphics;
+                x.model=model
                 break
             else
                 message(mess);
@@ -148,12 +151,7 @@ function [x,y,typ]=CSCOPXY3D(job,arg1,arg2)
         strcat(string(vec_z)," ");
         strcat(string(param3ds)," ");
         string(N)];
-        gr_i=["thick=xget(''thickness'');xset(''thickness'',2);";
-        "t=(0:0.2:2*%pi)'';";
-        "xx=orig(1)+(1/5+(cos(3*t)+1)*3/10)*sz(1);";
-        "yy=orig(2)+(1/4.3+(sin(t+1)+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 edb30d4..cd3a9c6 100644 (file)
 //
 
 function [x,y,typ]=OUTIMPL_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=[];
-    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,"*")==2 then exprs=exprs(1),end //compatibility
+        if size(exprs,"*")==2 then
+            exprs=exprs(1),
+        end //compatibility
         while %t do
             [ok,prt,exprs]=scicos_getvalue([msprintf(gettext("Set %s block parameters"),"OUTIMPL_f");" ";gettext("Implicit output port")],..
             gettext("Port number"),list("vec",1),exprs)
-            if ~ok then break,end
+            if ~ok then
+                break,
+            end
             prt=int(prt)
             if prt<=0 then
                 block_parameter_error(msprintf(gettext("Wrong value for ''Port Number'' parameter: %d."),prt), ..
                 gettext("Strictly positive integer expected."));
             else
-                if model.ipar<>prt then needcompile=4;y=needcompile,end
+                if model.ipar<>prt then
+                    needcompile=4;
+                    y=needcompile,
+                end
                 model.ipar=prt
                 graphics.exprs=exprs
                 x.graphics=graphics
@@ -67,7 +69,7 @@ function [x,y,typ]=OUTIMPL_f(job,arg1,arg2)
         mo.inputs="n"
         model.equations=mo
         exprs="1"
-        gr_i=["prt=string(model.ipar);xstringb(orig(1),orig(2),prt,sz(1),sz(2))"]
+        gr_i=[]
         x=standard_define([1 1],model,exprs,gr_i)
         //  x.graphics.flip=%f //flip it
         x.graphics.in_implicit=["I"]
index 873bd75..23ecb20 100644 (file)
 //
 
 function [x,y,typ]=OUT_f(job,arg1,arg2)
-    x=[];y=[];typ=[];
+    x=[];
+    y=[];
+    typ=[];
     select job
-    case "plot" then
-        xf=60
-        yf=40
-        orig=arg1.graphics.orig;
-        sz=arg1.graphics.sz;
-        orient=arg1.graphics.flip;
-
-        prt=arg1.model.ipar
-        pat=xget("pattern");xset("pattern",default_color(1))
-        thick=xget("thickness");xset("thickness",2)
-        if orient then
-            x=orig(1)+sz(1)*[0;0;1/1.5;1;  1/1.5]
-            y=orig(2)+sz(2)*[0;1;1;    1/2;0    ]
-            xo=orig(1);yo=orig(2)
-            in= [-1/7  -1/14
-            0    0
-            -1/7   1/14
-            -1/7  -1/14]*diag([xf,yf])
-            xfpoly(in(:,1)+ones(4,1)*orig(1),..
-            in(:,2)+ones(4,1)*(orig(2)+sz(2)-sz(2)/2),1)
-        else
-            x=orig(1)+sz(1)*[0  ;1/3;1;1;1/3]
-            y=orig(2)+sz(2)*[1/2;1  ;1;0;0]
-            xo=orig(1)+sz(1)/3;yo=orig(2)
-            in= [1/7  -1/14
-            0    0
-            1/7   1/14
-            1/7  -1/14]*diag([xf,yf])
-            xfpoly(in(:,1)+ones(4,1)*(orig(1)+sz(1)),..
-            in(:,2)+ones(4,1)*(orig(2)+sz(2)-sz(2)/2),1)
-        end
-        gr_i=arg1.graphics.gr_i;
-        if type(gr_i)==15 then
-            coli=gr_i(2);pcoli=xget("pattern")
-            xfpolys(x,y,coli);
-            xset("pattern",coli)
-            xstringb(xo,yo,string(prt),sz(1)/1.5,sz(2))
-            xset("pattern",pcoli)
-            xstringb(xo,yo,string(prt),sz(1)/1.5,sz(2))
-        else
-            xstringb(xo,yo,string(prt),sz(1)/1.5,sz(2))
-            xpoly(x,y,"lines",1)
-        end
-
-        xset("thickness",thick)
-        xset("pattern",pat)
-        ident = arg1.graphics.id
-        if ident <> [] then
-            font=xget("font")
-            xset("font", options("ID")(1)(1), options("ID")(1)(2))
-            rectangle = xstringl(orig(1)+3/2*sz(1), orig(2), ident)
-            w = rectangle(3)
-            h = rectangle(4)
-            xstringb(orig(1) - sz(1) /2 - w, orig(2) + sz(2) * 0.5 , ident , w, h)
-            xset("font", font(1), font(2))
-        end
-        x=[];y=[]
-    case "getinputs" then
-        orig=arg1.graphics.orig;
-        sz=arg1.graphics.sz;
-        orient=arg1.graphics.flip;
-
-        if orient then
-            x=orig(1)
-            y=orig(2)+sz(2)/2
-        else
-            x=orig(1)+sz(1)
-            y=orig(2)+sz(2)/2
-        end
-        typ=ones(x)
-    case "getoutputs" then
-        x=[];y=[];typ=[];
-    case "getorigin" then
-        [x,y]=standard_origin(arg1)
     case "set" then
         x=arg1;
         graphics=arg1.graphics;
         model=arg1.model;
         exprs=graphics.exprs;
-        if size(exprs,"*")==2 then exprs=exprs(1),end //compatibility
+        if size(exprs,"*")==2 then
+            exprs=exprs(1),
+        end //compatibility
         while %t do
             [ok,prt,exprs]=scicos_getvalue([msprintf(gettext("Set %s block parameters"),"OUT_f");" ";gettext("Regular output port")],..
             gettext("Port number"),list("vec",1),exprs)
-            if ~ok then break,end
+            if ~ok then
+                break,
+            end
             prt=int(prt)
             if prt<=0 then
                 block_parameter_error(msprintf(gettext("Wrong value for ''Port Number'' parameter: %d."),prt), ..
@@ -132,7 +64,7 @@ function [x,y,typ]=OUT_f(job,arg1,arg2)
         model.dep_ut=[%f %f]
 
         exprs=string(prt)
-        gr_i=" "
+        gr_i=[]
         x=standard_define([1 1],model,exprs,gr_i)
     end
 endfunction
index d9fffbc..dd43a95 100644 (file)
 //
 
 function [x, y, typ] = TOWS_c(job, arg1, arg2)
-    x = []; y = []; typ = [];
+    x=[];
+    y=[];
+    typ=[];
     select job
-    case "plot" then
-        varnam = string(arg1.graphics.exprs(2));
-        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; model = arg1.model;
+        graphics = arg1.graphics;
+        model = arg1.model;
         exprs = graphics.exprs;
 
         while %t do
@@ -43,7 +37,9 @@ function [x, y, typ] = TOWS_c(job, arg1, arg2)
             "Inherit (no:0, yes:1)"], ...
             list("vec", 1, "str", 1, "vec", 1), exprs);
 
-            if ~ok then break, end;
+            if ~ok then
+                break,
+            end;
 
             if (nz <= 0) then
                 message("Size of buffer must be positive");
@@ -100,16 +96,7 @@ function [x, y, typ] = TOWS_c(job, arg1, arg2)
         model.blocktype = "d";
         model.firing    = [];
         model.dep_ut    = [%f %f];
-        gr_i = ["xstringb(orig(1), orig(2), ''To workspace'', sz(1), sz(2), ''fill'')"
-        "txt = varnam;"
-        "style = 5;"
-        "rectstr = stringbox(txt, orig(1), orig(2), 0, style, 1);"
-        "if ~exists(''%zoom'') then %zoom = 1, end;"
-        "w = (rectstr(1, 3)-rectstr(1, 2))*%zoom;"
-        "h = (rectstr(2, 2)-rectstr(2, 4))*%zoom;"
-        "xstringb(orig(1)+sz(1)/2-w/2, orig(2)-h-4, txt, w, h, ''fill'');"
-        "e = gce();"
-        "e.font_style = style;"];
+        gr_i = [];
         exprs = [string(nz); string(varnam); string(herit)];
         x = standard_define([4 2], model, exprs, gr_i);
     end
index ebb8fcb..77ef27f 100644 (file)
 //
 
 function [x,y,typ]=TRASH_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=[];
-    case "getorigin" then
-        [x,y]=standard_origin(arg1)
     case "set" then
         x=arg1;
     case "define" then
@@ -43,7 +37,7 @@ function [x,y,typ]=TRASH_f(job,arg1,arg2)
         model.dep_ut=[%f %f]
 
         exprs=" "
-        gr_i=["xstringb(orig(1),orig(2),''Trash'',sz(1),sz(2),''fill'')"]
+        gr_i=[]
         x=standard_define([2 2],model,exprs,gr_i)
     end
 endfunction
index 0f5a9af..a15df93 100644 (file)
 //
 
 function [x,y,typ]=WFILE_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=[];
-    case "getorigin" then
-        [x,y]=standard_origin(arg1)
     case "set" then
         warnobsolete("WRITEC_f", "6.0.0");
         warnMessage = msprintf(_("Feature %s is obsolete."), "WFILE_f");
@@ -38,7 +32,8 @@ function [x,y,typ]=WFILE_f(job,arg1,arg2)
         warnXcosMessage = msprintf("%s %s", warnMessage, warnAdvise);
         warnBlockByUID(arg1.model.label, warnXcosMessage);
         x=arg1;
-        graphics=arg1.graphics;exprs=graphics.exprs
+        graphics=arg1.graphics;
+        exprs=graphics.exprs
         model=arg1.model;
         dstate=model.dstate
         lunit=dstate(2)
@@ -50,7 +45,9 @@ function [x,y,typ]=WFILE_f(job,arg1,arg2)
             gettext("&nbsp; - A formatted text file if a  format (Fortran type) is given")], [gettext("Input Size"); gettext("Output File Name"); ..
             gettext("Output Format"); gettext("Buffer Size")], list("vec",1,"str",1,"str",1,"vec",1),exprs)
 
-            if ~ok then break,end //user cancel modification
+            if ~ok then
+                break,
+            end //user cancel modification
             in=int(in)
 
             nin=in
@@ -99,12 +96,14 @@ function [x,y,typ]=WFILE_f(job,arg1,arg2)
                 model.dstate=dstate;model.ipar=ipar
                 model.dep_ut=[%t %f] //compatibility
                 graphics.exprs=exprs;
-                x.graphics=graphics;x.model=model
+                x.graphics=graphics;
+                x.model=model
                 break
             end
         end
     case "define" then
-        in=1;nin=sum(in)
+        in=1;
+        nin=sum(in)
         frmt="(7(e10.3,1x))"
         fname="foo"
         lunit=0
@@ -123,8 +122,7 @@ function [x,y,typ]=WFILE_f(job,arg1,arg2)
         fname;
         frmt;
         string(N)]
-        gr_i=["txt=[''write to'';''output file''];";
-        "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 d0c1e1b..7cfed31 100644 (file)
 //
 
 function [x,y,typ]=WRITEAU_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=[];
-    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;
         ipar=model.ipar;
         dstate=model.dstate
@@ -42,7 +37,9 @@ function [x,y,typ]=WRITEAU_f(job,arg1,arg2)
             [ok,N,swap,exprs] = scicos_getvalue([msprintf(gettext("Set %s block parameters"), "WRITEAU_f");" "; ..
             gettext("Write ''.au'' sound file on audio device")],[gettext("Buffer Size"); gettext("Swap Mode (0:No, 1:Yes)")], ..
             list("vec",1,"vec",1),exprs)
-            if ~ok then break,end //user cancel modification
+            if ~ok then
+                break,
+            end //user cancel modification
 
             nin=1
 
@@ -70,15 +67,18 @@ function [x,y,typ]=WRITEAU_f(job,arg1,arg2)
                     dstate=[-1;lunit;zeros((nin+1)*N,1)]
                 end
                 model.in=1
-                model.dstate=dstate;model.ipar=ipar
+                model.dstate=dstate;
+                model.ipar=ipar
                 graphics.exprs=exprs;
-                x.graphics=graphics;x.model=model
+                x.graphics=graphics;
+                x.model=model
                 break
             end
 
         end
     case "define" then
-        in=1;nin=sum(in)
+        in=1;
+        nin=sum(in)
         frmt="uc "
         fname="/dev/audio"
         swap=0
@@ -96,8 +96,7 @@ function [x,y,typ]=WRITEAU_f(job,arg1,arg2)
 
         exprs=[string(N)
         string(swap)]
-        gr_i=["txt=[''write AU to'';''/dev/audio''];";
-        "xstringb(orig(1),orig(2),txt,sz(1),sz(2),''fill'')"]
+        gr_i=[]
         x=standard_define([4 2],model,exprs,gr_i)
     end
 endfunction
index a4a4b15..c07a52c 100644 (file)
 //
 
 function [x,y,typ]=WRITEC_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=[];
-    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;
         ipar=model.ipar;
         dstate=model.dstate
@@ -46,7 +41,9 @@ function [x,y,typ]=WRITEC_f(job,arg1,arg2)
             gettext("Output Format"); gettext("Buffer Size"); gettext("Swap Mode (0:No, 1:Yes)")], ..
             list("vec",1,"str",1,"str",1,"vec",1,"vec",1),exprs)
 
-            if ~ok then break,end //user cancel modification
+            if ~ok then
+                break,
+            end //user cancel modification
 
             in=int(in)
             nin=in
@@ -99,16 +96,19 @@ function [x,y,typ]=WRITEC_f(job,arg1,arg2)
                     dstate=[-1;lunit;zeros((nin+1)*N,1)]
                 end
                 model.in=nin
-                model.dstate=dstate;model.ipar=ipar
+                model.dstate=dstate;
+                model.ipar=ipar
                 //      model.firing=[] //compatibility
                 //      model.dep_ut=[%t %f] //compatibility
                 graphics.exprs=exprs;
-                x.graphics=graphics;x.model=model
+                x.graphics=graphics;
+                x.model=model
                 break
             end
         end
     case "define" then
-        in=1;nin=sum(in)
+        in=1;
+        nin=sum(in)
         frmt="c  "
         fname="foo"
         swap=0
@@ -128,8 +128,7 @@ function [x,y,typ]=WRITEC_f(job,arg1,arg2)
         frmt;
         string(N)
         string(swap)]
-        gr_i=["txt=[''write to'';''C binary file''];";
-        "xstringb(orig(1),orig(2),txt,sz(1),sz(2),''fill'')"]
+        gr_i=[]
         x=standard_define([4 2],model,exprs,gr_i)
     end
 endfunction