summaryrefslogtreecommitdiffstats
path: root/scilab/modules/scicos
diff options
context:
space:
mode:
authorClément DAVID <clement.david@scilab.org>2010-03-24 15:00:52 +0100
committerClément DAVID <clement.david@scilab.org>2010-03-24 15:00:52 +0100
commit1c29e2eef98417182af2735be520b743601ad7f3 (patch)
tree7c85b195f8bbf24db7515dcf855943c3d576677f /scilab/modules/scicos
parenta05bd52f5d1a986206c5da6928bb9dd5543affa6 (diff)
parent9f14b9708d2ff95e30b0aacaf42d4108018ea6b0 (diff)
downloadscilab-1c29e2eef98417182af2735be520b743601ad7f3.zip
scilab-1c29e2eef98417182af2735be520b743601ad7f3.tar.gz
Merge commit 'origin/5.2'
Conflicts: scilab/modules/scicos/macros/scicos_scicos/check_io.sci
Diffstat (limited to 'scilab/modules/scicos')
-rw-r--r--scilab/modules/scicos/macros/scicos_scicos/check_io.sci40
1 files changed, 2 insertions, 38 deletions
diff --git a/scilab/modules/scicos/macros/scicos_scicos/check_io.sci b/scilab/modules/scicos/macros/scicos_scicos/check_io.sci
index 805bb0e..13884d3 100644
--- a/scilab/modules/scicos/macros/scicos_scicos/check_io.sci
+++ b/scilab/modules/scicos/macros/scicos_scicos/check_io.sci
@@ -45,7 +45,7 @@ function [model,graphics,ok]=check_io(model,graphics,in,out,clkin,clkout,in_impl
45 clkin=int(clkin(:));nclkin=size(clkin,1); 45 clkin=int(clkin(:));nclkin=size(clkin,1);
46 if nclkin>0 then 46 if nclkin>0 then
47 if mini(clkin)<1 then 47 if mini(clkin)<1 then
48 messagebox('Event input ports sizes must be positive','modal') 48 message('Event input ports sizes must be positive')
49 ok=%f 49 ok=%f
50 return 50 return
51 end 51 end
@@ -55,7 +55,7 @@ function [model,graphics,ok]=check_io(model,graphics,in,out,clkin,clkout,in_impl
55 clkout=int(clkout(:));nclkout=size(clkout,1); 55 clkout=int(clkout(:));nclkout=size(clkout,1);
56 if nclkout>0 then 56 if nclkout>0 then
57 if mini(clkout)<1 then 57 if mini(clkout)<1 then
58 messagebox('Event output ports sizes must be positive','modal') 58 message('Event output ports sizes must be positive')
59 ok=%f 59 ok=%f
60 return 60 return
61 end 61 end
@@ -69,11 +69,6 @@ function [model,graphics,ok]=check_io(model,graphics,in,out,clkin,clkout,in_impl
69 69
70 n1=size(in1(:,1),'*');n=size(in(:,1),'*') 70 n1=size(in1(:,1),'*');n=size(in(:,1),'*')
71 if n1>n then 71 if n1>n then
72 if or(ip1(n+1:$)>0) then
73 messagebox('Connected ports cannot be suppressed','modal')
74 ok=%f
75 return
76 end
77 ip1=ip1(1:n) 72 ip1=ip1(1:n)
78 else 73 else
79 ip1=[ip1;zeros(n-n1,1)] 74 ip1=[ip1;zeros(n-n1,1)]
@@ -81,11 +76,6 @@ function [model,graphics,ok]=check_io(model,graphics,in,out,clkin,clkout,in_impl
81 76
82 n1=size(out1,'*');n=size(out,'*') 77 n1=size(out1,'*');n=size(out,'*')
83 if n1>n then 78 if n1>n then
84 if or(op1(n+1:$)>0) then
85 messagebox('Connected ports cannot be suppressed','messagebox')
86 ok=%f
87 return
88 end
89 op1=op1(1:n) 79 op1=op1(1:n)
90 else 80 else
91 op1=[op1;zeros(n-n1,1)] 81 op1=[op1;zeros(n-n1,1)]
@@ -93,11 +83,6 @@ function [model,graphics,ok]=check_io(model,graphics,in,out,clkin,clkout,in_impl
93 83
94 n1=size(clkin1,'*');n=size(clkin,'*') 84 n1=size(clkin1,'*');n=size(clkin,'*')
95 if n1>n then 85 if n1>n then
96 if or(cip1(n+1:$)>0) then
97 messagebox('Connected ports cannot be suppressed','modal')
98 ok=%f
99 return
100 end
101 cip1=cip1(1:n) 86 cip1=cip1(1:n)
102 else 87 else
103 cip1=[cip1;zeros(n-n1,1)]; 88 cip1=[cip1;zeros(n-n1,1)];
@@ -105,11 +90,6 @@ function [model,graphics,ok]=check_io(model,graphics,in,out,clkin,clkout,in_impl
105 90
106 n1=size(clkout1,'*');n=size(clkout,'*') 91 n1=size(clkout1,'*');n=size(clkout,'*')
107 if n1>n then 92 if n1>n then
108 if or(cop1(n+1:$)>0) then
109 messagebox('Connected ports cannot be suppressed','modal')
110 ok=%f
111 return
112 end
113 cop1=cop1(1:n); 93 cop1=cop1(1:n);
114 else 94 else
115 cop1=[cop1;zeros(n-n1,1)]; 95 cop1=[cop1;zeros(n-n1,1)];
@@ -120,14 +100,6 @@ function [model,graphics,ok]=check_io(model,graphics,in,out,clkin,clkout,in_impl
120 100
121 if ip1<>[] then 101 if ip1<>[] then
122 in_impl=I(ones(ip1)); in_impl(in_implicit)='I'; 102 in_impl=I(ones(ip1)); in_impl(in_implicit)='I';
123 kk=size(graphics.in_implicit,'*')
124 k=find(ip1<>0) //connected links
125 k=k(find(k<=kk));
126 if or(graphics.in_implicit(k)<>in_impl(k)) then
127 messagebox('Connected ports types cannot be changed','modal')
128 ok=%f
129 return
130 end
131 else 103 else
132 in_impl=[] 104 in_impl=[]
133 end 105 end
@@ -135,14 +107,6 @@ function [model,graphics,ok]=check_io(model,graphics,in,out,clkin,clkout,in_impl
135 107
136 if op1<>[] then 108 if op1<>[] then
137 out_impl=I(ones(op1)); out_impl(out_implicit)='I'; 109 out_impl=I(ones(op1)); out_impl(out_implicit)='I';
138 kk=size(graphics.out_implicit,'*')
139 k=find(op1<>0) //connected links
140 k=k(find(k<=kk));
141 if or(graphics.out_implicit(k)<>out_impl(k)) then
142 messagebox('Connected ports types cannot be changed','modal')
143 ok=%f
144 return
145 end
146 else 110 else
147 out_impl=[] 111 out_impl=[]
148 end 112 end