Scicos_blocks: clean IntegerOp blocks interfaces 32/13232/3
Paul Bignier [Tue, 26 Nov 2013 12:00:25 +0000 (13:00 +0100)]
Removed unused 'job' and 'gr_i' values.

Change-Id: Ie73f9e53bde0dc2eed225ee9063a67eb3cc622fa

scilab/modules/scicos_blocks/macros/IntegerOp/BITCLEAR.sci
scilab/modules/scicos_blocks/macros/IntegerOp/BITSET.sci
scilab/modules/scicos_blocks/macros/IntegerOp/CONVERT.sci
scilab/modules/scicos_blocks/macros/IntegerOp/DFLIPFLOP.sci
scilab/modules/scicos_blocks/macros/IntegerOp/DLATCH.sci
scilab/modules/scicos_blocks/macros/IntegerOp/EXTRACTBITS.sci
scilab/modules/scicos_blocks/macros/IntegerOp/INTMUL.sci
scilab/modules/scicos_blocks/macros/IntegerOp/JKFLIPFLOP.sci
scilab/modules/scicos_blocks/macros/IntegerOp/LOGIC.sci
scilab/modules/scicos_blocks/macros/IntegerOp/SHIFT.sci
scilab/modules/scicos_blocks/macros/IntegerOp/SRFLIPFLOP.sci

index 319663c..0746228 100644 (file)
 //
 
 function [x,y,typ]=BITCLEAR(job,arg1,arg2)
-    x=[];y=[];typ=[]
+    x=[];
+    y=[];
+    typ=[];
     select job
-    case "plot" then
-        OPER=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;exprs=graphics.exprs
+        graphics=arg1.graphics;
+        exprs=graphics.exprs
         model=arg1.model;
         while %t do
 
@@ -42,7 +36,9 @@ function [x,y,typ]=BITCLEAR(job,arg1,arg2)
             [msprintf(gettext("Data Type %s"), "(3:int32, 4:int16, 5:int8, ...)"); gettext("Index of Bit (0 is least significant)")],..
             list("vec",1,"vec",1), exprs);
 
-            if ~ok then break,end
+            if ~ok then
+                break,
+            end
             in=[model.in model.in2];
 
             if floor(bit) <> bit then
@@ -97,7 +93,8 @@ function [x,y,typ]=BITCLEAR(job,arg1,arg2)
             if ok then
                 graphics.exprs=exprs;
                 model.opar=list(n)
-                x.graphics=graphics;x.model=model;
+                x.graphics=graphics;
+                x.model=model;
                 break
             end
         end
@@ -116,7 +113,7 @@ function [x,y,typ]=BITCLEAR(job,arg1,arg2)
         model.dep_ut=[%t %f]
 
         exprs=[sci2exp(3);sci2exp(0)]
-        gr_i=["xstringb(orig(1),orig(2),[''Clear'';''bit: ''+OPER],sz(1),sz(2),''fill'');"]
+        gr_i=[]
         x=standard_define([4 2],model,exprs,gr_i)
 
     end
index fb40193..58805c2 100644 (file)
 //
 
 function [x,y,typ]=BITSET(job,arg1,arg2)
-    x=[];y=[];typ=[]
+    x=[];
+    y=[];
+    typ=[];
     select job
-    case "plot" then
-        OPER=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;exprs=graphics.exprs
+        graphics=arg1.graphics;
+        exprs=graphics.exprs
         model=arg1.model;
         while %t do
             [ok,Datatype,bit,exprs]=scicos_getvalue([msprintf(gettext("Set %s block parameters"), "BITSET");" "; gettext("Set a bit");" "],..
             [msprintf(gettext("Data Type %s"), "(3:int32, 4:int16, 5:int8, ...)"); gettext("Index of Bit (0 is least significant)")],..
             list("vec",1,"vec",1), exprs);
 
-            if ~ok then break,end
+            if ~ok then
+                break,
+            end
             in=[model.in model.in2];
 
             if floor(bit) <> bit then
@@ -93,7 +89,8 @@ function [x,y,typ]=BITSET(job,arg1,arg2)
             if ok then
                 graphics.exprs=exprs;
                 model.opar=list(n);
-                x.graphics=graphics;x.model=model;
+                x.graphics=graphics;
+                x.model=model;
                 break
             end
         end
@@ -112,7 +109,7 @@ function [x,y,typ]=BITSET(job,arg1,arg2)
         model.dep_ut=[%t %f]
 
         exprs=[sci2exp(3);sci2exp(0)]
-        gr_i=["xstringb(orig(1),orig(2),['' Set'';''bit: ''+OPER],sz(1),sz(2),''fill'');"]
+        gr_i=[]
         x=standard_define([4 2],model,exprs,gr_i)
 
     end
index cc59967..e183b49 100644 (file)
 //
 
 function [x,y,typ]=CONVERT(job,arg1,arg2)
-    x=[];y=[];typ=[];
+    x=[];
+    y=[];
+    typ=[];
     select job
-    case "plot" then
-        sgn=arg1.model.ipar
-        VOP=["    double ","    double ","    int32 ","    int16 ",...
-        "    int8 ","    uint32 ","    uint16 ","    uint8 "]
-        OPER=VOP(evstr( 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
@@ -44,10 +34,16 @@ function [x,y,typ]=CONVERT(job,arg1,arg2)
             [gettext("Input Type (1:double, 3:int32, 4:int16, 5:int8, ...)"); gettext("Output Type (1:double, 3:int32, 4:int16, 5:int8, ...)"); ..
             gettext("Do on Overflow (0:Nothing, 1:Saturate, 2:Error)")], ..
             list("vec",1,"vec",1,"vec",1), exprs);
-            if ~ok then break,end
+            if ~ok then
+                break,
+            end
 
-            if it==2 then it =1;end
-            if ot==2 then ot=1;end
+            if it==2 then
+                it =1;
+            end
+            if ot==2 then
+                ot=1;
+            end
 
             if (np ~= 0 & np ~= 1 & np ~= 2) then
                 block_parameter_error(msprintf(gettext("Wrong value for ''%s'' parameter: %d."), gettext("Do on Overflow"), np), ..
@@ -69,176 +65,302 @@ function [x,y,typ]=CONVERT(job,arg1,arg2)
             else
                 if (np==0) then
                     if (it==1) then
-                        if (ot==3) then model.ipar=2;
-                        elseif (ot==4) then model.ipar=3;
-                        elseif (ot==5) then model.ipar=4;
-                        elseif (ot==6) then model.ipar=5;
-                        elseif (ot==7) then model.ipar=6;
-                        elseif (ot==8) then model.ipar=7;
+                        if (ot==3) then
+                            model.ipar=2;
+                        elseif (ot==4) then
+                            model.ipar=3;
+                        elseif (ot==5) then
+                            model.ipar=4;
+                        elseif (ot==6) then
+                            model.ipar=5;
+                        elseif (ot==7) then
+                            model.ipar=6;
+                        elseif (ot==8) then
+                            model.ipar=7;
                         end
                     elseif (it==3) then
-                        if (ot==1) then model.ipar=8;
-                        elseif (ot==4) then model.ipar=9;
-                        elseif (ot==5) then model.ipar=10;
-                        elseif (ot==6) then model.ipar=1;
-                        elseif (ot==7) then model.ipar=11;
-                        elseif (ot==8) then model.ipar=12;
+                        if (ot==1) then
+                            model.ipar=8;
+                        elseif (ot==4) then
+                            model.ipar=9;
+                        elseif (ot==5) then
+                            model.ipar=10;
+                        elseif (ot==6) then
+                            model.ipar=1;
+                        elseif (ot==7) then
+                            model.ipar=11;
+                        elseif (ot==8) then
+                            model.ipar=12;
                         end
                     elseif (it==4) then
-                        if (ot==1) then model.ipar=13;
-                        elseif (ot==3) then model.ipar=14;
-                        elseif (ot==5) then model.ipar=15;
-                        elseif (ot==6) then model.ipar=16;
-                        elseif (ot==7) then model.ipar=1;
-                        elseif (ot==8) then model.ipar=17;
+                        if (ot==1) then
+                            model.ipar=13;
+                        elseif (ot==3) then
+                            model.ipar=14;
+                        elseif (ot==5) then
+                            model.ipar=15;
+                        elseif (ot==6) then
+                            model.ipar=16;
+                        elseif (ot==7) then
+                            model.ipar=1;
+                        elseif (ot==8) then
+                            model.ipar=17;
                         end
                     elseif (it==5) then
-                        if (ot==1) then model.ipar=18;
-                        elseif (ot==3) then model.ipar=19;
-                        elseif (ot==4) then model.ipar=20;
-                        elseif (ot==6) then model.ipar=21;
-                        elseif (ot==7) then model.ipar=22;
-                        elseif (ot==8) then model.ipar=1;
+                        if (ot==1) then
+                            model.ipar=18;
+                        elseif (ot==3) then
+                            model.ipar=19;
+                        elseif (ot==4) then
+                            model.ipar=20;
+                        elseif (ot==6) then
+                            model.ipar=21;
+                        elseif (ot==7) then
+                            model.ipar=22;
+                        elseif (ot==8) then
+                            model.ipar=1;
                         end
                     elseif (it==6) then
-                        if (ot==1) then model.ipar=23;
-                        elseif (ot==3) then model.ipar=1;
-                        elseif (ot==4) then model.ipar=24;
-                        elseif (ot==5) then model.ipar=25;
-                        elseif (ot==7) then model.ipar=26;
-                        elseif (ot==8) then model.ipar=27;
+                        if (ot==1) then
+                            model.ipar=23;
+                        elseif (ot==3) then
+                            model.ipar=1;
+                        elseif (ot==4) then
+                            model.ipar=24;
+                        elseif (ot==5) then
+                            model.ipar=25;
+                        elseif (ot==7) then
+                            model.ipar=26;
+                        elseif (ot==8) then
+                            model.ipar=27;
                         end
                     elseif (it==7) then
-                        if (ot==1) then model.ipar=28;
-                        elseif (ot==3) then model.ipar=29;
-                        elseif (ot==4) then model.ipar=1;
-                        elseif (ot==5) then model.ipar=30;
-                        elseif (ot==6) then model.ipar=31;
-                        elseif (ot==8) then model.ipar=32;
+                        if (ot==1) then
+                            model.ipar=28;
+                        elseif (ot==3) then
+                            model.ipar=29;
+                        elseif (ot==4) then
+                            model.ipar=1;
+                        elseif (ot==5) then
+                            model.ipar=30;
+                        elseif (ot==6) then
+                            model.ipar=31;
+                        elseif (ot==8) then
+                            model.ipar=32;
                         end
                     elseif (it==8) then
-                        if (ot==1) then model.ipar=33;
-                        elseif (ot==3) then model.ipar=34;
-                        elseif (ot==4) then model.ipar=35;
-                        elseif (ot==5) then model.ipar=1;
-                        elseif (ot==6) then model.ipar=36;
-                        elseif (ot==7) then model.ipar=37;
+                        if (ot==1) then
+                            model.ipar=33;
+                        elseif (ot==3) then
+                            model.ipar=34;
+                        elseif (ot==4) then
+                            model.ipar=35;
+                        elseif (ot==5) then
+                            model.ipar=1;
+                        elseif (ot==6) then
+                            model.ipar=36;
+                        elseif (ot==7) then
+                            model.ipar=37;
                         end
                     end
                 elseif (np==1) then
                     if (it==1) then
-                        if (ot==3) then model.ipar=38;
-                        elseif (ot==4) then model.ipar=39;
-                        elseif (ot==5) then model.ipar=40;
-                        elseif (ot==6) then model.ipar=41;
-                        elseif (ot==7) then model.ipar=42;
-                        elseif (ot==8) then model.ipar=43;
+                        if (ot==3) then
+                            model.ipar=38;
+                        elseif (ot==4) then
+                            model.ipar=39;
+                        elseif (ot==5) then
+                            model.ipar=40;
+                        elseif (ot==6) then
+                            model.ipar=41;
+                        elseif (ot==7) then
+                            model.ipar=42;
+                        elseif (ot==8) then
+                            model.ipar=43;
                         end
                     elseif (it==3) then
-                        if (ot==1) then model.ipar=8;
-                        elseif (ot==4) then model.ipar=44;
-                        elseif (ot==5) then model.ipar=45;
-                        elseif (ot==6) then model.ipar=46;
-                        elseif (ot==7) then model.ipar=47;
-                        elseif (ot==8) then model.ipar=48;
+                        if (ot==1) then
+                            model.ipar=8;
+                        elseif (ot==4) then
+                            model.ipar=44;
+                        elseif (ot==5) then
+                            model.ipar=45;
+                        elseif (ot==6) then
+                            model.ipar=46;
+                        elseif (ot==7) then
+                            model.ipar=47;
+                        elseif (ot==8) then
+                            model.ipar=48;
                         end
                     elseif (it==4) then
-                        if (ot==1) then model.ipar=13;
-                        elseif (ot==3) then model.ipar=14;
-                        elseif (ot==5) then model.ipar=49;
-                        elseif (ot==6) then model.ipar=50;
-                        elseif (ot==7) then model.ipar=51;
-                        elseif (ot==8) then model.ipar=52;
+                        if (ot==1) then
+                            model.ipar=13;
+                        elseif (ot==3) then
+                            model.ipar=14;
+                        elseif (ot==5) then
+                            model.ipar=49;
+                        elseif (ot==6) then
+                            model.ipar=50;
+                        elseif (ot==7) then
+                            model.ipar=51;
+                        elseif (ot==8) then
+                            model.ipar=52;
                         end
                     elseif (it==5) then
-                        if (ot==1) then model.ipar=18;
-                        elseif (ot==3) then model.ipar=19;
-                        elseif (ot==4) then model.ipar=20;
-                        elseif (ot==6) then model.ipar=53;
-                        elseif (ot==7) then model.ipar=54;
-                        elseif (ot==8) then model.ipar=55;
+                        if (ot==1) then
+                            model.ipar=18;
+                        elseif (ot==3) then
+                            model.ipar=19;
+                        elseif (ot==4) then
+                            model.ipar=20;
+                        elseif (ot==6) then
+                            model.ipar=53;
+                        elseif (ot==7) then
+                            model.ipar=54;
+                        elseif (ot==8) then
+                            model.ipar=55;
                         end
                     elseif (it==6) then
-                        if (ot==1) then model.ipar=23;
-                        elseif (ot==3) then model.ipar=56;
-                        elseif (ot==4) then model.ipar=57;
-                        elseif (ot==5) then model.ipar=58;
-                        elseif (ot==7) then model.ipar=59;
-                        elseif (ot==8) then model.ipar=60;
+                        if (ot==1) then
+                            model.ipar=23;
+                        elseif (ot==3) then
+                            model.ipar=56;
+                        elseif (ot==4) then
+                            model.ipar=57;
+                        elseif (ot==5) then
+                            model.ipar=58;
+                        elseif (ot==7) then
+                            model.ipar=59;
+                        elseif (ot==8) then
+                            model.ipar=60;
                         end
                     elseif (it==7) then
-                        if (ot==1) then model.ipar=28;
-                        elseif (ot==3) then model.ipar=29;
-                        elseif (ot==4) then model.ipar=61;
-                        elseif (ot==5) then model.ipar=62;
-                        elseif (ot==6) then model.ipar=31;
-                        elseif (ot==8) then model.ipar=63;
+                        if (ot==1) then
+                            model.ipar=28;
+                        elseif (ot==3) then
+                            model.ipar=29;
+                        elseif (ot==4) then
+                            model.ipar=61;
+                        elseif (ot==5) then
+                            model.ipar=62;
+                        elseif (ot==6) then
+                            model.ipar=31;
+                        elseif (ot==8) then
+                            model.ipar=63;
                         end
                     elseif (it==8) then
-                        if (ot==1) then model.ipar=33;
-                        elseif (ot==3) then model.ipar=34;
-                        elseif (ot==4) then model.ipar=35;
-                        elseif (ot==5) then model.ipar=64;
-                        elseif (ot==6) then model.ipar=36;
-                        elseif (ot==7) then model.ipar=37;
+                        if (ot==1) then
+                            model.ipar=33;
+                        elseif (ot==3) then
+                            model.ipar=34;
+                        elseif (ot==4) then
+                            model.ipar=35;
+                        elseif (ot==5) then
+                            model.ipar=64;
+                        elseif (ot==6) then
+                            model.ipar=36;
+                        elseif (ot==7) then
+                            model.ipar=37;
                         end
                     end
                 elseif (np==2) then
                     if (it==1) then
-                        if (ot==3) then model.ipar=65;
-                        elseif (ot==4) then model.ipar=66;
-                        elseif (ot==5) then model.ipar=67;
-                        elseif (ot==6) then model.ipar=68;
-                        elseif (ot==7) then model.ipar=69;
-                        elseif (ot==8) then model.ipar=70;
+                        if (ot==3) then
+                            model.ipar=65;
+                        elseif (ot==4) then
+                            model.ipar=66;
+                        elseif (ot==5) then
+                            model.ipar=67;
+                        elseif (ot==6) then
+                            model.ipar=68;
+                        elseif (ot==7) then
+                            model.ipar=69;
+                        elseif (ot==8) then
+                            model.ipar=70;
                         end
                     elseif (it==3) then
-                        if (ot==1) then model.ipar=8;
-                        elseif (ot==4) then model.ipar=71;
-                        elseif (ot==5) then model.ipar=72;
-                        elseif (ot==6) then model.ipar=73;
-                        elseif (ot==7) then model.ipar=74;
-                        elseif (ot==8) then model.ipar=75;
+                        if (ot==1) then
+                            model.ipar=8;
+                        elseif (ot==4) then
+                            model.ipar=71;
+                        elseif (ot==5) then
+                            model.ipar=72;
+                        elseif (ot==6) then
+                            model.ipar=73;
+                        elseif (ot==7) then
+                            model.ipar=74;
+                        elseif (ot==8) then
+                            model.ipar=75;
                         end
                     elseif (it==4) then
-                        if (ot==1) then model.ipar=13;
-                        elseif (ot==3) then model.ipar=14;
-                        elseif (ot==5) then model.ipar=76;
-                        elseif (ot==6) then model.ipar=77;
-                        elseif (ot==7) then model.ipar=78;
-                        elseif (ot==8) then model.ipar=79;
+                        if (ot==1) then
+                            model.ipar=13;
+                        elseif (ot==3) then
+                            model.ipar=14;
+                        elseif (ot==5) then
+                            model.ipar=76;
+                        elseif (ot==6) then
+                            model.ipar=77;
+                        elseif (ot==7) then
+                            model.ipar=78;
+                        elseif (ot==8) then
+                            model.ipar=79;
                         end
                     elseif (it==5) then
-                        if (ot==1) then model.ipar=18;
-                        elseif (ot==3) then model.ipar=19;
-                        elseif (ot==4) then model.ipar=20;
-                        elseif (ot==6) then model.ipar=80;
-                        elseif (ot==7) then model.ipar=81;
-                        elseif (ot==8) then model.ipar=82;
+                        if (ot==1) then
+                            model.ipar=18;
+                        elseif (ot==3) then
+                            model.ipar=19;
+                        elseif (ot==4) then
+                            model.ipar=20;
+                        elseif (ot==6) then
+                            model.ipar=80;
+                        elseif (ot==7) then
+                            model.ipar=81;
+                        elseif (ot==8) then
+                            model.ipar=82;
                         end
                     elseif (it==6) then
-                        if (ot==1) then model.ipar=23;
-                        elseif (ot==3) then model.ipar=83;
-                        elseif (ot==4) then model.ipar=84;
-                        elseif (ot==5) then model.ipar=85;
-                        elseif (ot==7) then model.ipar=86;
-                        elseif (ot==8) then model.ipar=87;
+                        if (ot==1) then
+                            model.ipar=23;
+                        elseif (ot==3) then
+                            model.ipar=83;
+                        elseif (ot==4) then
+                            model.ipar=84;
+                        elseif (ot==5) then
+                            model.ipar=85;
+                        elseif (ot==7) then
+                            model.ipar=86;
+                        elseif (ot==8) then
+                            model.ipar=87;
                         end
                     elseif (it==7) then
-                        if (ot==1) then model.ipar=28;
-                        elseif (ot==3) then model.ipar=29;
-                        elseif (ot==4) then model.ipar=88;
-                        elseif (ot==5) then model.ipar=89;
-                        elseif (ot==6) then model.ipar=31;
-                        elseif (ot==8) then model.ipar=90;
+                        if (ot==1) then
+                            model.ipar=28;
+                        elseif (ot==3) then
+                            model.ipar=29;
+                        elseif (ot==4) then
+                            model.ipar=88;
+                        elseif (ot==5) then
+                            model.ipar=89;
+                        elseif (ot==6) then
+                            model.ipar=31;
+                        elseif (ot==8) then
+                            model.ipar=90;
                         end
                     elseif (it==8) then
-                        if (ot==1) then model.ipar=33;
-                        elseif (ot==3) then model.ipar=34;
-                        elseif (ot==4) then model.ipar=35;
-                        elseif (ot==5) then model.ipar=91;
-                        elseif (ot==6) then model.ipar=36;
-                        elseif (ot==7) then model.ipar=37;
+                        if (ot==1) then
+                            model.ipar=33;
+                        elseif (ot==3) then
+                            model.ipar=34;
+                        elseif (ot==4) then
+                            model.ipar=35;
+                        elseif (ot==5) then
+                            model.ipar=91;
+                        elseif (ot==6) then
+                            model.ipar=36;
+                        elseif (ot==7) then
+                            model.ipar=37;
                         end
                     end
                 end
@@ -252,7 +374,8 @@ function [x,y,typ]=CONVERT(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
@@ -274,7 +397,7 @@ function [x,y,typ]=CONVERT(job,arg1,arg2)
 
 
         exprs=[sci2exp(1);sci2exp(3);sci2exp(0)]
-        gr_i=["xstringb(orig(1),orig(2),[''convert to'';OPER],sz(1),sz(2),''fill'');"]
+        gr_i=[]
         x=standard_define([3 2],model, exprs,gr_i)
     end
 endfunction
index 3044c50..fb62b34 100644 (file)
 
 function [x,y,typ]=DFLIPFLOP(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
     case "define" then
@@ -60,11 +54,7 @@ function [x,y,typ]=DFLIPFLOP(job,arg1,arg2)
         pout=6,..
         pein=[],..
         peout=[],..
-        gr_i=list(..
-        ["dx=sz(1)/5;dy=sz(2)/10;";
-        "w=sz(1)-2*dx;h=sz(2)-2*dy;";
-        "txt=C;";
-        "xstringb(orig(1)+dx,orig(2)+dy,txt,w,h,''fill'');"],8),..
+        gr_i=[],..
         id="",..
         in_implicit=[],..
         out_implicit="E"),..
@@ -104,9 +94,7 @@ function [x,y,typ]=DFLIPFLOP(job,arg1,arg2)
         pout=[],..
         pein=22,..
         peout=[16;44],..
-        gr_i=list(..
-        ["txt=[''If in>0'';'' '';'' then    else''];";
-        "xstringb(orig(1),orig(2),txt,sz(1),sz(2),''fill'');"],8),..
+        gr_i=[],..
         id="",..
         in_implicit="E",..
         out_implicit=[]),..
@@ -146,8 +134,7 @@ function [x,y,typ]=DFLIPFLOP(job,arg1,arg2)
         pout=5,..
         pein=[],..
         peout=[],..
-        gr_i=list(..
-        "xstringb(orig(1),orig(2),['' Logical Op '';OPER],sz(1),sz(2),''fill'');",8),..
+        gr_i=[],..
         id="",..
         in_implicit=["E";"E"],..
         out_implicit="E"),..
@@ -187,7 +174,7 @@ function [x,y,typ]=DFLIPFLOP(job,arg1,arg2)
         pout=33,..
         pein=42,..
         peout=[],..
-        gr_i=list("xstringb(orig(1),orig(2),''S/H'',sz(1),sz(2),''fill'')",8),..
+        gr_i=[],..
         id="",..
         in_implicit="E",..
         out_implicit="E"),..
@@ -243,8 +230,7 @@ function [x,y,typ]=DFLIPFLOP(job,arg1,arg2)
         pout=13,..
         pein=[],..
         peout=[],..
-        gr_i=list(..
-        "xstringb(orig(1),orig(2),[''Logical Op '';OPER],sz(1),sz(2),''fill'');",8),..
+        gr_i=[],..
         id="",..
         in_implicit="E",..
         out_implicit="E"),..
@@ -284,7 +270,7 @@ function [x,y,typ]=DFLIPFLOP(job,arg1,arg2)
         pout=9,..
         pein=[],..
         peout=[],..
-        gr_i=list(" ",8),..
+        gr_i=[],..
         id="",..
         in_implicit=[],..
         out_implicit="E"),..
@@ -332,7 +318,7 @@ function [x,y,typ]=DFLIPFLOP(job,arg1,arg2)
         pout=11,..
         pein=[],..
         peout=[],..
-        gr_i=list(" ",8),..
+        gr_i=[],..
         id="",..
         in_implicit=[],..
         out_implicit="E"),..
@@ -380,7 +366,7 @@ function [x,y,typ]=DFLIPFLOP(job,arg1,arg2)
         pout=[],..
         pein=[],..
         peout=[],..
-        gr_i=list(" ",8),..
+        gr_i=[],..
         id="",..
         in_implicit="E",..
         out_implicit=[]),..
@@ -428,7 +414,7 @@ function [x,y,typ]=DFLIPFLOP(job,arg1,arg2)
         pout=[],..
         pein=[],..
         peout=[],..
-        gr_i=list(" ",8),..
+        gr_i=[],..
         id="",..
         in_implicit="E",..
         out_implicit=[]),..
@@ -482,9 +468,7 @@ function [x,y,typ]=DFLIPFLOP(job,arg1,arg2)
         pout=9,..
         pein=[4;11],..
         peout=[],..
-        gr_i=list(..
-        ["txt=[''LOGICAL'';'' '';'' AND ''];";
-        "xstringb(orig(1),orig(2),txt,sz(1),sz(2),''fill'');"],8),..
+        gr_i=[],..
         id="",..
         in_implicit=[],..
         out_implicit="E"),..
@@ -524,7 +508,7 @@ function [x,y,typ]=DFLIPFLOP(job,arg1,arg2)
         pout=[],..
         pein=[],..
         peout=4,..
-        gr_i=list(" ",8),..
+        gr_i=[],..
         id="",..
         in_implicit=[],..
         out_implicit=[]),..
@@ -564,7 +548,7 @@ function [x,y,typ]=DFLIPFLOP(job,arg1,arg2)
         pout=[],..
         pein=8,..
         peout=[],..
-        gr_i=list(" ",8),..
+        gr_i=[],..
         id="",..
         in_implicit=[],..
         out_implicit=[]),..
@@ -612,7 +596,7 @@ function [x,y,typ]=DFLIPFLOP(job,arg1,arg2)
         pout=[],..
         pein=[],..
         peout=6,..
-        gr_i=list(" ",8),..
+        gr_i=[],..
         id="",..
         in_implicit=[],..
         out_implicit=[]),..
@@ -660,9 +644,7 @@ function [x,y,typ]=DFLIPFLOP(job,arg1,arg2)
         pout=[],..
         pein=12,..
         peout=[8;0],..
-        gr_i=list(..
-        ["txt=[''If in>0'';'' '';'' then    else''];";
-        "xstringb(orig(1),orig(2),txt,sz(1),sz(2),''fill'');"],8),..
+        gr_i=[],..
         id="",..
         in_implicit="E",..
         out_implicit=[]),..
@@ -718,7 +700,7 @@ function [x,y,typ]=DFLIPFLOP(job,arg1,arg2)
         pout=[],..
         pein=6,..
         peout=[11;12],..
-        gr_i=list([],8),..
+        gr_i=[],..
         id="",..
         in_implicit=[],..
         out_implicit=[]),..
@@ -774,7 +756,7 @@ function [x,y,typ]=DFLIPFLOP(job,arg1,arg2)
         pout=[],..
         pein=[19;16],..
         peout=17,..
-        gr_i=list("xstringb(orig(1),orig(2),''ANDBLK'',sz(1),sz(2),''fill'')",8),..
+        gr_i=[],..
         id="",..
         in_implicit=[],..
         out_implicit=[]),..
@@ -844,7 +826,7 @@ function [x,y,typ]=DFLIPFLOP(job,arg1,arg2)
         pout=3,..
         pein=[],..
         peout=[],..
-        gr_i=list("xstringb(orig(1),orig(2),[''Edge'';''trigger''],sz(1),sz(2),''fill'');",8),..
+        gr_i=[],..
         id="",..
         in_implicit="E",..
         out_implicit="E"),..
@@ -884,9 +866,7 @@ function [x,y,typ]=DFLIPFLOP(job,arg1,arg2)
         pout=[],..
         pein=[],..
         peout=[7;0],..
-        gr_i=list(..
-        ["txt=[''If in>0'';'' '';'' then    else''];";
-        "xstringb(orig(1),orig(2),txt,sz(1),sz(2),''fill'');"],8),..
+        gr_i=[],..
         id="",..
         in_implicit="E",..
         out_implicit=[]),..
@@ -934,7 +914,7 @@ function [x,y,typ]=DFLIPFLOP(job,arg1,arg2)
         pout=5,..
         pein=[],..
         peout=[],..
-        gr_i=list(" ",8),..
+        gr_i=[],..
         id="",..
         in_implicit=[],..
         out_implicit="E"),..
@@ -982,7 +962,7 @@ function [x,y,typ]=DFLIPFLOP(job,arg1,arg2)
         pout=[],..
         pein=7,..
         peout=[],..
-        gr_i=list(" ",8),..
+        gr_i=[],..
         id="",..
         in_implicit=[],..
         out_implicit=[]),..
@@ -1030,7 +1010,7 @@ function [x,y,typ]=DFLIPFLOP(job,arg1,arg2)
         pout=[],..
         pein=[],..
         peout=19,..
-        gr_i=list("xstringb(orig(1),orig(2),[''EDGE'';''TRIGGER''],sz(1),sz(2),''fill'')",8),..
+        gr_i=[],..
         id="",..
         in_implicit="E",..
         out_implicit=[]),..
@@ -1078,7 +1058,7 @@ function [x,y,typ]=DFLIPFLOP(job,arg1,arg2)
         pout=23,..
         pein=[],..
         peout=[],..
-        gr_i=list(" ",8),..
+        gr_i=[],..
         id="",..
         in_implicit=[],..
         out_implicit="E"),..
@@ -1132,9 +1112,7 @@ function [x,y,typ]=DFLIPFLOP(job,arg1,arg2)
         pout=[],..
         pein=[],..
         peout=[3;4],..
-        gr_i=list(..
-        ["txt=[''If in>0'';'' '';'' then    else''];";
-        "xstringb(orig(1),orig(2),txt,sz(1),sz(2),''fill'');"],8),..
+        gr_i=[],..
         id="",..
         in_implicit="E",..
         out_implicit=[]),..
@@ -1174,9 +1152,7 @@ function [x,y,typ]=DFLIPFLOP(job,arg1,arg2)
         pout=[],..
         pein=[3;4;0],..
         peout=8,..
-        gr_i=list(..
-        ["rx=sz(1)*p/2;ry=sz(2)/2";
-        "xsegs(orig(1)+rx*[1/2.3 1;2-1/2.3 1],orig(2)+ry*[1 2-1/2.3;1,1/2.3],0)"],8),..
+        gr_i=[],..
         id="",..
         in_implicit=[],..
         out_implicit=[]),..
@@ -1232,7 +1208,7 @@ function [x,y,typ]=DFLIPFLOP(job,arg1,arg2)
         pout=6,..
         pein=[],..
         peout=[],..
-        gr_i=list(" ",8),..
+        gr_i=[],..
         id="",..
         in_implicit=[],..
         out_implicit="E"),..
@@ -1280,7 +1256,7 @@ function [x,y,typ]=DFLIPFLOP(job,arg1,arg2)
         pout=[],..
         pein=8,..
         peout=[],..
-        gr_i=list(" ",8),..
+        gr_i=[],..
         id="",..
         in_implicit=[],..
         out_implicit=[]),..
@@ -1328,8 +1304,7 @@ function [x,y,typ]=DFLIPFLOP(job,arg1,arg2)
         pout=[],..
         pein=[],..
         peout=22,..
-        gr_i=list(..
-        "xstringb(orig(1),orig(2),[''Extract'';''Activation''],sz(1),sz(2),''fill'')",8),..
+        gr_i=[],..
         id="",..
         in_implicit="E",..
         out_implicit=[]),..
@@ -1385,9 +1360,7 @@ function [x,y,typ]=DFLIPFLOP(job,arg1,arg2)
         pout=31,..
         pein=[],..
         peout=[],..
-        gr_i=list(..
-        ["rx=sz(1)*p/2;ry=sz(2)/2";
-        "xsegs(orig(1)+rx*[1/2.3 1;2-1/2.3 1],orig(2)+ry*[1 2-1/2.3;1,1/2 .3],0)"],8),..
+        gr_i=[],..
         id="",..
         in_implicit=["E";"E";"E"],..
         out_implicit="E"),..
@@ -1427,7 +1400,7 @@ function [x,y,typ]=DFLIPFLOP(job,arg1,arg2)
         pout=[26;27],..
         pein=[],..
         peout=[],..
-        gr_i=list([],8),..
+        gr_i=[],..
         id="",..
         in_implicit="E",..
         out_implicit=["E";"E";"E"]),..
@@ -1483,7 +1456,7 @@ function [x,y,typ]=DFLIPFLOP(job,arg1,arg2)
         pout=[29;30],..
         pein=[],..
         peout=[],..
-        gr_i=list([],8),..
+        gr_i=[],..
         id="",..
         in_implicit="E",..
         out_implicit=["E";"E";"E"]),..
@@ -1547,7 +1520,7 @@ function [x,y,typ]=DFLIPFLOP(job,arg1,arg2)
         pout=34,..
         pein=[43;44],..
         peout=[],..
-        gr_i=list("xstringb(orig(1),orig(2),''Selector'',sz(1),sz(2),''fill'');",8),..
+        gr_i=[],..
         id="",..
         in_implicit=["E";"E"],..
         out_implicit="E"),..
@@ -1603,7 +1576,7 @@ function [x,y,typ]=DFLIPFLOP(job,arg1,arg2)
         pout=[36;37],..
         pein=[],..
         peout=[],..
-        gr_i=list([],8),..
+        gr_i=[],..
         id="",..
         in_implicit="E",..
         out_implicit=["E";"E";"E"]),..
@@ -1659,7 +1632,7 @@ function [x,y,typ]=DFLIPFLOP(job,arg1,arg2)
         pout=[39;40],..
         pein=[],..
         peout=[],..
-        gr_i=list([],8),..
+        gr_i=[],..
         id="",..
         in_implicit="E",..
         out_implicit=["E";"E";"E"]),..
@@ -1715,7 +1688,7 @@ function [x,y,typ]=DFLIPFLOP(job,arg1,arg2)
         pout=[],..
         pein=17,..
         peout=[42;43],..
-        gr_i=list([],8),..
+        gr_i=[],..
         id="",..
         in_implicit=[],..
         out_implicit=[]),..
@@ -1779,43 +1752,7 @@ function [x,y,typ]=DFLIPFLOP(job,arg1,arg2)
         model.firing=%f
         model.dep_ut=[%t %f]
         model.rpar=scs_m
-        gr_i=["[x,y,typ]=standard_inputs(o) ";
-        "dd=sz(1)/8,de=5.5*sz(1)/8";
-        "if ~exists(''%zoom'') then %zoom=1, end;"
-        "txt=''D'';"
-        "rectstr=stringbox(txt,orig(1)+dd,y(1)-4,0,1,1);"
-        "w=(rectstr(1,3)-rectstr(1,2))*%zoom;"
-        "h=(rectstr(2,2)-rectstr(2,4))*%zoom;"
-        "xstringb(orig(1)+dd,y(1)-4,txt,w,h,''fill'')";
-        "txt=''clk'';"
-        "rectstr=stringbox(txt,orig(1)+dd,y(2)-4,0,1,1);"
-        "w=(rectstr(1,3)-rectstr(1,2))*%zoom;"
-        "h=(rectstr(2,2)-rectstr(2,4))*%zoom;"
-        "xstringb(orig(1)+dd,y(2)-4,txt,w,h,''fill'')";
-        "txt=''en'';"
-        "rectstr=stringbox(txt,orig(1)+dd,y(3)-4,0,1,1);"
-        "w=(rectstr(1,3)-rectstr(1,2))*%zoom;"
-        "h=(rectstr(2,2)-rectstr(2,4))*%zoom;"
-        "xstringb(orig(1)+dd,y(3)-4,txt,w,h,''fill'')";
-        "[x,y,typ]=standard_outputs(o) ";
-        "txt=''Q'';"
-        "rectstr=stringbox(txt,orig(1)+de,y(1)-4,0,1,1);"
-        "w=(rectstr(1,3)-rectstr(1,2))*%zoom;"
-        "h=(rectstr(2,2)-rectstr(2,4))*%zoom;"
-        "xstringb(orig(1)+de,y(1)-4,txt,w,h,''fill'')";
-        "txt=''!Q'';"
-        "rectstr=stringbox(txt,orig(1)+4.5*dd,y(2)-4,0,1,1);"
-        "w=(rectstr(1,3)-rectstr(1,2))*%zoom;"
-        "h=(rectstr(2,2)-rectstr(2,4))*%zoom;"
-        "xstringb(orig(1)+4.5*dd,y(2)-4,txt,w,h,''fill'')";
-        "txt=''D FLIP-FLOP'';"
-        "style=5;"
-        "rectstr=stringbox(txt,orig(1),orig(2),0,style,1);"
-        "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=[]
         x=standard_define([2 3],model,[],gr_i)
     end
 endfunction
index 04c9f55..f0a0fb4 100644 (file)
 function [x,y,typ]=DLATCH(job,arg1,arg2)
     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
@@ -59,11 +51,7 @@ function [x,y,typ]=DLATCH(job,arg1,arg2)
         pout=7,..
         pein=[],..
         peout=[],..
-        gr_i=list(..
-        ["dx=sz(1)/5;dy=sz(2)/10;";
-        "w=sz(1)-2*dx;h=sz(2)-2*dy;";
-        "txt=C;";
-        "xstringb(orig(1)+dx,orig(2)+dy,txt,w,h,''fill'');"],8),..
+        gr_i=[],..
         id="",..
         in_implicit=[],..
         out_implicit="E"),..
@@ -540,37 +528,7 @@ function [x,y,typ]=DLATCH(job,arg1,arg2)
         model.firing=%f
         model.dep_ut=[%t %f]
         model.rpar=scs_m
-        gr_i=["[x,y,typ]=standard_inputs(o) ";
-        "dd=sz(1)/8,de=5.5*sz(1)/8";
-        "txt=''D'';"
-        "if ~exists(''%zoom'') then %zoom=1, end;"
-        "rectstr=stringbox(txt,orig(1)+dd,y(1)-4,0,1,1);"
-        "w=(rectstr(1,3)-rectstr(1,2))*%zoom;"
-        "h=(rectstr(2,2)-rectstr(2,4))*%zoom;"
-        "xstringb(orig(1)+dd,y(1)-4,txt,w,h,''fill'')";
-        "txt=''C'';"
-        "rectstr=stringbox(txt,orig(1)+dd,y(2)-4,0,1,1);"
-        "w=(rectstr(1,3)-rectstr(1,2))*%zoom;"
-        "h=(rectstr(2,2)-rectstr(2,4))*%zoom;"
-        "xstringb(orig(1)+dd,y(2)-4,txt,w,h,''fill'')";
-        "txt=''Q'';"
-        "rectstr=stringbox(txt,orig(1)+de,y(1)-4,0,1,1);"
-        "w=(rectstr(1,3)-rectstr(1,2))*%zoom;"
-        "h=(rectstr(2,2)-rectstr(2,4))*%zoom;"
-        "xstringb(orig(1)+de,y(1)-4,txt,w,h,''fill'')";
-        "txt=''!Q'';"
-        "rectstr=stringbox(txt,orig(1)+4.5*dd,y(2)-4,0,1,1);"
-        "w=(rectstr(1,3)-rectstr(1,2))*%zoom;"
-        "h=(rectstr(2,2)-rectstr(2,4))*%zoom;"
-        "xstringb(orig(1)+4.5*dd,y(2)-4,txt,w,h,''fill'')";
-        "txt=''DLATCH'';"
-        "style=5;"
-        "rectstr=stringbox(txt,orig(1),orig(2),0,style,1);"
-        "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=[]
         x=standard_define([2 3],model,[],gr_i)
     end
 endfunction
index 74cf9dd..a0f1494 100644 (file)
 //
 
 function [x,y,typ]=EXTRACTBITS(job,arg1,arg2)
-    x=[];y=[];typ=[]
+    x=[];
+    y=[];
+    typ=[];
     select job
-    case "plot" then
-        if (size(arg1.model.ipar,"*")~=4) then numb=[];
-        else numb=arg1.model.ipar(3)
-        end
-        VOP=["Upper Half","Lower Half","Upper End","Lower End","      "+string(arg1.graphics.exprs(3))+"      "]
-        OPER=VOP(evstr( 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;exprs=graphics.exprs
@@ -52,7 +41,9 @@ function [x,y,typ]=EXTRACTBITS(job,arg1,arg2)
             gettext("Number of Bits or Index of Bit"); gettext("Treat Bit Field as an Integer (0:No, 1:Yes)")],..
             list("vec",1,"vec",1,"vec",-1,"vec",1), exprs);
 
-            if ~ok then break,end
+            if ~ok then
+                break,
+            end
             bitstr = strcat(string(bit(:))," ")
             if (rule < 1) | (rule > 5) then
                 block_parameter_error(msprintf(gettext("Wrong value for ''%s'' parameter: %d."), gettext("Bits to Extract"), rule), ..
@@ -64,14 +55,17 @@ function [x,y,typ]=EXTRACTBITS(job,arg1,arg2)
                 ok = %f
             else
 
-                in=[model.in model.in2];bit=int(bit);rule=int(rule);
+                in=[model.in model.in2];
+                bit=int(bit);
+                rule=int(rule);
 
                 if (rule==3)|(rule==4) then
                     if (size(bit,"*") ~= 1) then
                         block_parameter_error(msprintf(gettext("Wrong size for ''%s'' parameter: %s."), gettext("Number of Bits or Index of Bit"), bitstr), ..
                         gettext("Must be a single value."));
                         ok=%f;
-                    else numb=bit;
+                    else
+                        numb=bit;
                     end
                 elseif (rule==5)
                     if (size(bit,"*") ~= 2) then
@@ -82,9 +76,12 @@ function [x,y,typ]=EXTRACTBITS(job,arg1,arg2)
                         block_parameter_error(msprintf(gettext("Wrong values for ''%s'' parameter: %s."), gettext("Number of Bits or Index of Bit"), bitstr), ..
                         msprintf(gettext("''Start'' must be less than ''End''.")));
                         ok=%f;
-                    else numb=bit(2)-bit(1);
+                    else
+                        numb=bit(2)-bit(1);
                     end ;
-                else bit=0;numb=[]
+                else
+                    bit=0;
+                    numb=[]
                 end
             end
 
@@ -99,33 +96,42 @@ function [x,y,typ]=EXTRACTBITS(job,arg1,arg2)
                     select rule
                     case 1 then
                         select scal
-                        case 0 then model.sim=list("extract_bit_32_UH0",4)
+                        case 0 then
+                            model.sim=list("extract_bit_32_UH0",4)
                         case 1 then
                             select Datatype
-                            case 3 then model.sim=list("extract_bit_32_UH1",4)
-                            case 6 then model.sim=list("extract_bit_u32_UH1",4)
+                            case 3 then
+                                model.sim=list("extract_bit_32_UH1",4)
+                            case 6 then
+                                model.sim=list("extract_bit_u32_UH1",4)
                             end
                         end
                     case 2 then
                         model.sim=list("extract_bit_32_LH",4)
                     case 3 then
                         select scal
-                        case 0 then model.sim=list("extract_bit_32_MSB0",4)
+                        case 0 then
+                            model.sim=list("extract_bit_32_MSB0",4)
                         case 1 then
                             select Datatype
-                            case 3 then model.sim=list("extract_bit_32_MSB1",4)
-                            case 6 then model.sim=list("extract_bit_u32_MSB1",4)
+                            case 3 then
+                                model.sim=list("extract_bit_32_MSB1",4)
+                            case 6 then
+                                model.sim=list("extract_bit_u32_MSB1",4)
                             end
                         end
                     case 4 then
                         model.sim=list("extract_bit_32_LSB",4)
                     case 5 then
                         select scal
-                        case 0 then model.sim=list("extract_bit_32_RB0",4)
+                        case 0 then
+                            model.sim=list("extract_bit_32_RB0",4)
                         case 1 then
                             select Datatype
-                            case 3 then model.sim=list("extract_bit_32_RB1",4)
-                            case 6 then model.sim=list("extract_bit_u32_RB1",4)
+                            case 3 then
+                                model.sim=list("extract_bit_32_RB1",4)
+                            case 6 then
+                                model.sim=list("extract_bit_u32_RB1",4)
                             end
                         end
                     end
@@ -138,33 +144,42 @@ function [x,y,typ]=EXTRACTBITS(job,arg1,arg2)
                     select rule
                     case 1 then
                         select scal
-                        case 0 then model.sim=list("extract_bit_16_UH0",4)
+                        case 0 then
+                            model.sim=list("extract_bit_16_UH0",4)
                         case 1 then
                             select Datatype
-                            case 4 then model.sim=list("extract_bit_16_UH1",4)
-                            case 7 then model.sim=list("extract_bit_u16_UH1",4)
+                            case 4 then
+                                model.sim=list("extract_bit_16_UH1",4)
+                            case 7 then
+                                model.sim=list("extract_bit_u16_UH1",4)
                             end
                         end
                     case 2 then
                         model.sim=list("extract_bit_16_LH",4)
                     case 3 then
                         select scal
-                        case 0 then model.sim=list("extract_bit_16_MSB0",4)
+                        case 0 then
+                            model.sim=list("extract_bit_16_MSB0",4)
                         case 1 then
                             select Datatype
-                            case 4 then model.sim=list("extract_bit_16_MSB1",4)
-                            case 7 then model.sim=list("extract_bit_u16_MSB1",4)
+                            case 4 then
+                                model.sim=list("extract_bit_16_MSB1",4)
+                            case 7 then
+                                model.sim=list("extract_bit_u16_MSB1",4)
                             end
                         end
                     case 4 then
                         model.sim=list("extract_bit_16_LSB",4)
                     case 5 then
                         select scal
-                        case 0 then model.sim=list("extract_bit_16_RB0",4)
+                        case 0 then
+                            model.sim=list("extract_bit_16_RB0",4)
                         case 1 then
                             select Datatype
-                            case 4 then model.sim=list("extract_bit_16_RB1",4)
-                            case 7 then model.sim=list("extract_bit_u16_RB1",4)
+                            case 4 then
+                                model.sim=list("extract_bit_16_RB1",4)
+                            case 7 then
+                                model.sim=list("extract_bit_u16_RB1",4)
                             end
                         end
                     end
@@ -177,33 +192,42 @@ function [x,y,typ]=EXTRACTBITS(job,arg1,arg2)
                     select rule
                     case 1 then
                         select scal
-                        case 0 then model.sim=list("extract_bit_8_UH0",4)
+                        case 0 then
+                            model.sim=list("extract_bit_8_UH0",4)
                         case 1 then
                             select Datatype
-                            case 5 then model.sim=list("extract_bit_8_UH1",4)
-                            case 8 then model.sim=list("extract_bit_u8_UH1",4)
+                            case 5 then
+                                model.sim=list("extract_bit_8_UH1",4)
+                            case 8 then
+                                model.sim=list("extract_bit_u8_UH1",4)
                             end
                         end
                     case 2 then
                         model.sim=list("extract_bit_8_LH",4)
                     case 3 then
                         select scal
-                        case 0 then model.sim=list("extract_bit_8_MSB0",4)
+                        case 0 then
+                            model.sim=list("extract_bit_8_MSB0",4)
                         case 1 then
                             select Datatype
-                            case 5 then model.sim=list("extract_bit_8_MSB1",4)
-                            case 8 then model.sim=list("extract_bit_u8_MSB1",4)
+                            case 5 then
+                                model.sim=list("extract_bit_8_MSB1",4)
+                            case 8 then
+                                model.sim=list("extract_bit_u8_MSB1",4)
                             end
                         end
                     case 4 then
                         model.sim=list("extract_bit_8_LSB",4)
                     case 5 then
                         select scal
-                        case 0 then model.sim=list("extract_bit_8_RB0",4)
+                        case 0 then
+                            model.sim=list("extract_bit_8_RB0",4)
                         case 1 then
                             select Datatype
-                            case 5 then model.sim=list("extract_bit_8_RB1",4)
-                            case 8 then model.sim=list("extract_bit_u8_RB1",4)
+                            case 5 then
+                                model.sim=list("extract_bit_8_RB1",4)
+                            case 8 then
+                                model.sim=list("extract_bit_u8_RB1",4)
                             end
                         end
                     end
@@ -223,7 +247,8 @@ function [x,y,typ]=EXTRACTBITS(job,arg1,arg2)
             if ok then
                 graphics.exprs=exprs;
                 model.ipar=[int(bit(:));int(numb(:))];
-                x.graphics=graphics;x.model=model;
+                x.graphics=graphics;
+                x.model=model;
                 break
             end
         end
@@ -243,7 +268,7 @@ function [x,y,typ]=EXTRACTBITS(job,arg1,arg2)
         model.dep_ut=[%t %f]
 
         exprs=[sci2exp(3);sci2exp(1);sci2exp(0);sci2exp(0)]
-        gr_i=["xstringb(orig(1),orig(2),['' Extract ''+string(numb)+'' Bits'';OPER],sz(1),sz(2),''fill'');"]
+        gr_i=[]
         x=standard_define([4 2],model,exprs,gr_i)
 
     end
index e656c22..e577246 100644 (file)
 //
 
 function [x,y,typ]=INTMUL(job,arg1,arg2)
-    x=[];y=[];typ=[];
+    x=[];
+    y=[];
+    typ=[];
     select job
-    case "plot" then
-        sgn=arg1.model.ipar
-        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
@@ -42,7 +35,9 @@ function [x,y,typ]=INTMUL(job,arg1,arg2)
             [msprintf(gettext("Set %s block parameters"),"INTMUL"); " "; gettext("Integer matrix multiplication");" ";],..
             [msprintf(gettext("Data Type %s"), "(3:int32, 4:int16, 5:int8, ...)"); gettext("Do on Overflow (0:Nothing, 1:Saturate, 2:Error)")],..
             list("vec",1,"vec",1), exprs)
-            if ~ok then break,end
+            if ~ok then
+                break,
+            end
 
             it=Datatype*ones(1,2);
             ot=Datatype;
@@ -114,7 +109,8 @@ function [x,y,typ]=INTMUL(job,arg1,arg2)
             if ok then
                 model.ipar=np
                 graphics.exprs=exprs
-                x.graphics=graphics;x.model=model
+                x.graphics=graphics;
+                x.model=model
                 break
             end
         end
@@ -135,8 +131,7 @@ function [x,y,typ]=INTMUL(job,arg1,arg2)
 
 
         exprs=[sci2exp(3);sci2exp(0)]
-        gr_i=["txt=['' INTMUL ''];";
-        "xstringb(orig(1),orig(2),txt,sz(1),sz(2),''fill'')"]
+        gr_i=[]
         x=standard_define([2 2],model, exprs,gr_i)
     end
 endfunction
index 2189900..6740517 100644 (file)
 //
 
 function [x,y,typ] = JKFLIPFLOP(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 1/z block
         for i=1:length(arg1.model.rpar.objs) do
@@ -54,9 +48,13 @@ function [x,y,typ] = JKFLIPFLOP(job,arg1,arg2)
             gettext("Initial Value"), ..
             list("vec",1), exprs);
 
-            if ~ok then break,end
-            if init<=0 then init=int8(0);
-            elseif init >0 then init=int8(1);
+            if ~ok then
+                break,
+            end
+            if init<=0 then
+                init=int8(0);
+            elseif init >0 then
+                init=int8(1);
             end
             if ok then
                 xx.graphics.exprs(1)=exprs0
@@ -102,7 +100,7 @@ function [x,y,typ] = JKFLIPFLOP(job,arg1,arg2)
         pout=5,..
         pein=[],..
         peout=[],..
-        gr_i=list("xstringb(orig(1),orig(2),''1/z'',sz(1),sz(2),''fill'')",8),..
+        gr_i=[],..
         id="",..
         in_implicit="E",..
         out_implicit="E"),..
@@ -156,7 +154,7 @@ function [x,y,typ] = JKFLIPFLOP(job,arg1,arg2)
         pout=3,..
         pein=[],..
         peout=[],..
-        gr_i=list("xstringb(orig(1),orig(2),[''Edge'';''trigger''],sz(1),sz(2),''fill'');",8),..
+        gr_i=[],..
         id="",..
         in_implicit="E",..
         out_implicit="E"),..
@@ -196,9 +194,7 @@ function [x,y,typ] = JKFLIPFLOP(job,arg1,arg2)
         pout=[],..
         pein=[],..
         peout=[7;0],..
-        gr_i=list(..
-        ["txt=[''If in>0'';'' '';'' then    else''];";
-        "xstringb(orig(1),orig(2),txt,sz(1),sz(2),''fill'');"],8),..
+        gr_i=[],..
         id="",..
         in_implicit="E",..
         out_implicit=[]),..
@@ -246,7 +242,7 @@ function [x,y,typ] = JKFLIPFLOP(job,arg1,arg2)
         pout=5,..
         pein=[],..
         peout=[],..
-        gr_i=list(" ",8),..
+        gr_i=[],..
         id="",..
         in_implicit=[],..
         out_implicit="E"),..
@@ -294,7 +290,7 @@ function [x,y,typ] = JKFLIPFLOP(job,arg1,arg2)
         pout=[],..
         pein=7,..
         peout=[],..
-        gr_i=list(" ",8),..
+        gr_i=[],..
         id="",..
         in_implicit=[],..
         out_implicit=[]),..
@@ -342,7 +338,7 @@ function [x,y,typ] = JKFLIPFLOP(job,arg1,arg2)
         pout=[],..
         pein=[],..
         peout=8,..
-        gr_i=list("xstringb(orig(1),orig(2),[''EDGE'';''TRIGGER''],sz(1),sz(2),''fill'')",8),..
+        gr_i=[],..
         id="",..
         in_implicit="E",..
         out_implicit=[]),..
@@ -382,7 +378,7 @@ function [x,y,typ] = JKFLIPFLOP(job,arg1,arg2)
         pout=4,..
         pein=8,..
         peout=[],..
-        gr_i=list("xstringb(orig(1),orig(2),[''Logic''],sz(1),sz(2),''fill'');",8),..
+        gr_i=[],..
         id="",..
         in_implicit=["E";"E";"E"],..
         out_implicit="E"),..
@@ -438,7 +434,7 @@ function [x,y,typ] = JKFLIPFLOP(job,arg1,arg2)
         pout=[7;20],..
         pein=[],..
         peout=[],..
-        gr_i=list([],8),..
+        gr_i=[],..
         id="",..
         in_implicit="E",..
         out_implicit=["E";"E";"E"]),..
@@ -494,8 +490,7 @@ function [x,y,typ] = JKFLIPFLOP(job,arg1,arg2)
         pout=22,..
         pein=[],..
         peout=[],..
-        gr_i=list(..
-        "xstringb(orig(1),orig(2),[''Logical Op '';OPER],sz(1),sz(2),''fill'');",8),..
+        gr_i=[],..
         id="",..
         in_implicit="E",..
         out_implicit="E"),..
@@ -535,7 +530,7 @@ function [x,y,typ] = JKFLIPFLOP(job,arg1,arg2)
         pout=[11;12],..
         pein=[],..
         peout=[],..
-        gr_i=list([],8),..
+        gr_i=[],..
         id="",..
         in_implicit="E",..
         out_implicit=["E";"E";"E"]),..
@@ -591,7 +586,7 @@ function [x,y,typ] = JKFLIPFLOP(job,arg1,arg2)
         pout=14,..
         pein=[],..
         peout=[],..
-        gr_i=list(" ",8),..
+        gr_i=[],..
         id="",..
         in_implicit=[],..
         out_implicit="E"),..
@@ -639,7 +634,7 @@ function [x,y,typ] = JKFLIPFLOP(job,arg1,arg2)
         pout=16,..
         pein=[],..
         peout=[],..
-        gr_i=list(" ",8),..
+        gr_i=[],..
         id="",..
         in_implicit=[],..
         out_implicit="E"),..
@@ -687,7 +682,7 @@ function [x,y,typ] = JKFLIPFLOP(job,arg1,arg2)
         pout=18,..
         pein=[],..
         peout=[],..
-        gr_i=list(" ",8),..
+        gr_i=[],..
         id="",..
         in_implicit=[],..
         out_implicit="E"),..
@@ -735,7 +730,7 @@ function [x,y,typ] = JKFLIPFLOP(job,arg1,arg2)
         pout=[],..
         pein=[],..
         peout=[],..
-        gr_i=list(" ",8),..
+        gr_i=[],..
         id="",..
         in_implicit="E",..
         out_implicit=[]),..
@@ -783,7 +778,7 @@ function [x,y,typ] = JKFLIPFLOP(job,arg1,arg2)
         pout=[],..
         pein=[],..
         peout=[],..
-        gr_i=list(" ",8),..
+        gr_i=[],..
         id="",..
         in_implicit="E",..
         out_implicit=[]),..
@@ -831,43 +826,7 @@ function [x,y,typ] = JKFLIPFLOP(job,arg1,arg2)
         model.firing=%f
         model.dep_ut=[%t %f]
         model.rpar=scs_m
-        gr_i=["[x,y,typ]=standard_inputs(o) ";
-        "dd=sz(1)/8,de=5.5*sz(1)/8";
-        "txt=''J'';"
-        "if ~exists(''%zoom'') then %zoom=1, end;"
-        "rectstr=stringbox(txt,orig(1)+dd,y(1)-4,0,1,1);"
-        "w=(rectstr(1,3)-rectstr(1,2))*%zoom;"
-        "h=(rectstr(2,2)-rectstr(2,4))*%zoom;"
-        "xstringb(orig(1)+dd,y(1)-4,txt,w,h,''fill'')";
-        "txt=''clk'';"
-        "rectstr=stringbox(txt,orig(1)+dd,y(2)-4,0,1,1);"
-        "w=(rectstr(1,3)-rectstr(1,2))*%zoom;"
-        "h=(rectstr(2,2)-rectstr(2,4))*%zoom;"
-        "xstringb(orig(1)+dd,y(2)-4,txt,w,h,''fill'')";
-        "txt=''K'';"
-        "rectstr=stringbox(txt,orig(1)+dd,y(3)-4,0,1,1);"
-        "w=(rectstr(1,3)-rectstr(1,2))*%zoom;"
-        "h=(rectstr(2,2)-rectstr(2,4))*%zoom;"
-        "xstringb(orig(1)+dd,y(3)-4,txt,w,h,''fill'')";
-        "[x,y,typ]=standard_outputs(o) ";
-        "txt=''Q'';"
-        "rectstr=stringbox(txt,orig(1)+de,y(1)-4,0,1,1);"
-        "w=(rectstr(1,3)-rectstr(1,2))*%zoom;"
-        "h=(rectstr(2,2)-rectstr(2,4))*%zoom;"
-        "xstringb(orig(1)+de,y(1)-4,txt,w,h,''fill'')";
-        "txt=''!Q'';"
-        "rectstr=stringbox(txt,orig(1)+4.5*dd,y(2)-4,0,1,1);"
-        "w=(rectstr(1,3)-rectstr(1,2))*%zoom;"
-        "h=(rectstr(2,2)-rectstr(2,4))*%zoom;"
-        "xstringb(orig(1)+4.5*dd,y(2)-4,txt,w,h,''fill'')";
-        "txt=''JK FLIP-FLOP'';"
-        "style=5;"
-        "rectstr=stringbox(txt,orig(1),orig(2),0,style,1);"
-        "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=[]
         x=standard_define([2 3],model,[],gr_i)
     end
 endfunction
index 7defd72..c2778b8 100644 (file)
 //
 
 function [x,y,typ]=LOGIC(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,mat,herit,exprs]=scicos_getvalue([msprintf(gettext("Set %s block parameters"), "LOGIC"); " ";gettext("Combinatorial logic");" ";
@@ -42,7 +37,9 @@ function [x,y,typ]=LOGIC(job,arg1,arg2)
             [gettext("Truth Table (matrix of outputs)"); gettext("Accepts Inherited Events (0:No, 1:Yes)")], ..
             list("mat",[-1,-2],"vec",1), exprs);
 
-            if ~ok then break,end
+            if ~ok then
+                break,
+            end
             nout=size(mat,2)
             nin=(log(size(mat,1))/log(2))
             u1=floor(nin)
@@ -71,7 +68,8 @@ function [x,y,typ]=LOGIC(job,arg1,arg2)
                 graphics.exprs=exprs;
                 mat=int8(mat);
                 model.opar=list(mat);
-                x.graphics=graphics;x.model=model;
+                x.graphics=graphics;
+                x.model=model;
                 break
             end
         end
@@ -91,7 +89,7 @@ function [x,y,typ]=LOGIC(job,arg1,arg2)
         model.firing=%f
         model.dep_ut=[%t %f]
         exprs=[sci2exp(mat);sci2exp(0)]
-        gr_i=["xstringb(orig(1),orig(2),[''Logic''],sz(1),sz(2),''fill'');"]
+        gr_i=[]
         x=standard_define([2 2],model,exprs,gr_i)
     end
 endfunction
index 4278b13..01ce6bb 100644 (file)
 //
 
 function [x,y,typ]=SHIFT(job,arg1,arg2)
-    x=[];y=[];typ=[];
+    x=[];
+    y=[];
+    typ=[];
     select job
-    case "plot" then
-        sgn=arg1.model.ipar
-        VOP=["Arithmetic", "Circular"]
-        OPER=VOP(evstr( arg1.graphics.exprs(3))+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
@@ -45,7 +36,9 @@ function [x,y,typ]=SHIFT(job,arg1,arg2)
             gettext("Shift Type (0:Arithmetic, 1:Circular)")], ..
             list("vec",1,"vec",1,"vec",1), exprs);
 
-            if ~ok then break,end
+            if ~ok then
+                break,
+            end
             if (np ~= 0 & np ~= 1) then
                 block_parameter_error(msprintf( gettext("Wrong value for ''%s'' parameter: %d."), gettext("Shift Type"), np), ..
                 msprintf(gettext("Must be in the interval %s."), "[0, 1]"));
@@ -57,49 +50,64 @@ function [x,y,typ]=SHIFT(job,arg1,arg2)
             if (Datatype==3 | Datatype==6) then
                 if nb>0 then
                     select np
-                    case 0 then model.sim=list("shift_32_LA",4)
-                    case 1 then model.sim=list("shift_32_LC",4)
+                    case 0 then
+                        model.sim=list("shift_32_LA",4)
+                    case 1 then
+                        model.sim=list("shift_32_LC",4)
                     end
                 elseif nb<0
                     select np
                     case 0 then
                         select Datatype
-                        case 3 model.sim=list("shift_32_RA",4)
-                        case 6 model.sim=list("shift_u32_RA",4)
+                        case 3 then
+                            model.sim=list("shift_32_RA",4)
+                        case 6 then
+                            model.sim=list("shift_u32_RA",4)
                         end
-                    case 1 then model.sim=list("shift_32_RC",4)
+                    case 1 then
+                        model.sim=list("shift_32_RC",4)
                     end
                 end
             elseif (Datatype==4 | Datatype==7) then
                 if nb>0 then
                     select np
-                    case 0 then model.sim=list("shift_16_LA",4)
-                    case 1 then model.sim=list("shift_16_LC",4)
+                    case 0 then
+                        model.sim=list("shift_16_LA",4)
+                    case 1 then
+                        model.sim=list("shift_16_LC",4)
                     end
                 elseif nb<0
                     select np
                     case 0 then
                         select Datatype
-                        case 4 model.sim=list("shift_16_RA",4)
-                        case 7 model.sim=list("shift_u16_RA",4)
+                        case 4 then
+                            model.sim=list("shift_16_RA",4)
+                        case 7 then
+                            model.sim=list("shift_u16_RA",4)
                         end
-                    case 1 then model.sim=list("shift_16_RC",4)
+                    case 1 then
+                        model.sim=list("shift_16_RC",4)
                     end
                 end
             elseif (Datatype==5 | Datatype==8) then
                 if nb>0 then
                     select np
-                    case 0 then model.sim=list("shift_8_LA",4)
-                    case 1 then model.sim=list("shift_8_LC",4)
+                    case 0 then
+                        model.sim=list("shift_8_LA",4)
+                    case 1 then
+                        model.sim=list("shift_8_LC",4)
                     end
                 elseif nb<0
                     select np
                     case 0 then
                         select Datatype
-                        case 5 model.sim=list("shift_8_RA",4)
-                        case 8 model.sim=list("shift_u8_RA",4)
+                        case 5 then
+                            model.sim=list("shift_8_RA",4)
+                        case 8 then
+                            model.sim=list("shift_u8_RA",4)
                         end
-                    case 1 then model.sim=list("shift_8_RC",4)
+                    case 1 then
+                        model.sim=list("shift_8_RC",4)
                     end
                 end
             else
@@ -115,7 +123,8 @@ function [x,y,typ]=SHIFT(job,arg1,arg2)
             if ok then
                 model.ipar=nb
                 graphics.exprs=exprs
-                x.graphics=graphics;x.model=model
+                x.graphics=graphics;
+                x.model=model
                 break
             end
         end
@@ -137,7 +146,7 @@ function [x,y,typ]=SHIFT(job,arg1,arg2)
 
 
         exprs=[sci2exp(3);sci2exp(0);sci2exp(0)]
-        gr_i=["xstringb(orig(1),orig(2),[OPER;''   Shift  ''],sz(1),sz(2),''fill'')"]
+        gr_i=[]
         x=standard_define([3 2],model, exprs,gr_i)
     end
 endfunction
index 5ad91c6..f0d5264 100644 (file)
 //
 
 function [x,y,typ] = SRFLIPFLOP(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 1/z block
         for i=1:length(arg1.model.rpar.objs) do
@@ -53,9 +47,13 @@ function [x,y,typ] = SRFLIPFLOP(job,arg1,arg2)
             gettext("Initial Value"), ..
             list("vec",1), exprs)
 
-            if ~ok then break,end
-            if init<=0 then init=int8(0);
-            elseif init >0 then init=int8(1);
+            if ~ok then
+                break,
+            end
+            if init<=0 then
+                init=int8(0);
+            elseif init >0 then
+                init=int8(1);
             end
             if ok then
                 xx.graphics.exprs(1)=exprs0
@@ -101,7 +99,7 @@ function [x,y,typ] = SRFLIPFLOP(job,arg1,arg2)
         pout=[3;8],..
         pein=[],..
         peout=[],..
-        gr_i=list("xstringb(orig(1),orig(2),[''Logic''],sz(1),sz(2),''fill'');",8),..
+        gr_i=[],..
         id="",..
         in_implicit=["E";"E";"E"],..
         out_implicit=["E";"E"]),..
@@ -149,7 +147,7 @@ function [x,y,typ] = SRFLIPFLOP(job,arg1,arg2)
         pout=4,..
         pein=[],..
         peout=[],..
-        gr_i=list("xstringb(orig(1),orig(2),''1/z'',sz(1),sz(2),''fill'')",8),..
+        gr_i=[],..
         id="",..
         in_implicit="E",..
         out_implicit="E"),..
@@ -205,7 +203,7 @@ function [x,y,typ] = SRFLIPFLOP(job,arg1,arg2)
         pout=[6;14],..
         pein=[],..
         peout=[],..
-        gr_i=list([],8),..
+        gr_i=[],..
         id="",..
         in_implicit="E",..
         out_implicit=["E";"E";"E"]),..
@@ -253,7 +251,7 @@ function [x,y,typ] = SRFLIPFLOP(job,arg1,arg2)
         pout=[],..
         pein=[],..
         peout=[],..
-        gr_i=list(" ",8),..
+        gr_i=[],..
         id="",..
         in_implicit="E",..
         out_implicit=[]),..
@@ -301,7 +299,7 @@ function [x,y,typ] = SRFLIPFLOP(job,arg1,arg2)
         pout=10,..
         pein=[],..
         peout=[],..
-        gr_i=list(" ",8),..
+        gr_i=[],..
         id="",..
         in_implicit=[],..
         out_implicit="E"),..
@@ -349,7 +347,7 @@ function [x,y,typ] = SRFLIPFLOP(job,arg1,arg2)
         pout=12,..
         pein=[],..
         peout=[],..
-        gr_i=list(" ",8),..
+        gr_i=[],..
         id="",..
         in_implicit=[],..
         out_implicit="E"),..
@@ -397,7 +395,7 @@ function [x,y,typ] = SRFLIPFLOP(job,arg1,arg2)
         pout=[],..
         pein=[],..
         peout=[],..
-        gr_i=list(" ",8),..
+        gr_i=[],..
         id="",..
         in_implicit="E",..
         out_implicit=[]),..
@@ -446,38 +444,7 @@ function [x,y,typ] = SRFLIPFLOP(job,arg1,arg2)
         model.firing=%f
         model.dep_ut=[%t %f]
         model.rpar=scs_m
-        gr_i=["[x,y,typ]=standard_inputs(o) ";
-        "dd=sz(1)/8,de=5.5*sz(1)/8";
-        "txt=''S'';"
-        "if ~exists(''%zoom'') then %zoom=1, end;"
-        "rectstr=stringbox(txt,orig(1)+dd,y(1)-4,0,1,1);"
-        "w=(rectstr(1,3)-rectstr(1,2))*%zoom;"
-        "h=(rectstr(2,2)-rectstr(2,4))*%zoom;"
-        "xstringb(orig(1)+dd,y(1)-4,txt,w,h,''fill'')";
-        "txt=''R'';"
-        "rectstr=stringbox(txt,orig(1)+dd,y(2)-4,0,1,1);"
-        "w=(rectstr(1,3)-rectstr(1,2))*%zoom;"
-        "h=(rectstr(2,2)-rectstr(2,4))*%zoom;"
-        "xstringb(orig(1)+dd,y(2)-4,txt,w,h,''fill'')";
-        "[x,y,typ]=standard_outputs(o) ";
-        "txt=''Q'';"
-        "rectstr=stringbox(txt,orig(1)+de,y(1)-4,0,1,1);"
-        "w=(rectstr(1,3)-rectstr(1,2))*%zoom;"
-        "h=(rectstr(2,2)-rectstr(2,4))*%zoom;"
-        "xstringb(orig(1)+de,y(1)-4,txt,w,h,''fill'')";
-        "txt=''!Q'';"
-        "rectstr=stringbox(txt,orig(1)+4.5*dd,y(2)-4,0,1,1);"
-        "w=(rectstr(1,3)-rectstr(1,2))*%zoom;"
-        "h=(rectstr(2,2)-rectstr(2,4))*%zoom;"
-        "xstringb(orig(1)+4.5*dd,y(2)-4,txt,w,h,''fill'')";
-        "txt=''SR FLIP-FLOP'';"
-        "style=5;"
-        "rectstr=stringbox(txt,orig(1),orig(2),0,style,1);"
-        "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=[]
         x=standard_define([2 3],model,[],gr_i)
     end
 endfunction