summaryrefslogtreecommitdiffstats
path: root/scilab/modules/scicos
diff options
context:
space:
mode:
authorClément DAVID <clement.david@scilab.org>2010-03-24 14:56:11 +0100
committerClément DAVID <clement.david@scilab.org>2010-03-24 14:56:11 +0100
commit9f14b9708d2ff95e30b0aacaf42d4108018ea6b0 (patch)
tree73a8be6ca24901d295e8d693b3477d8160b4513f /scilab/modules/scicos
parent6718bf5391cac3cb6269eb3c1f08325967f9a782 (diff)
downloadscilab-9f14b9708d2ff95e30b0aacaf42d4108018ea6b0.zip
scilab-9f14b9708d2ff95e30b0aacaf42d4108018ea6b0.tar.gz
Xcos: Scicos patch
check_io must not refuse port deletion (model must be updated accordingly).
Diffstat (limited to 'scilab/modules/scicos')
-rw-r--r--scilab/modules/scicos/macros/scicos_scicos/check_io.sci36
1 files changed, 0 insertions, 36 deletions
diff --git a/scilab/modules/scicos/macros/scicos_scicos/check_io.sci b/scilab/modules/scicos/macros/scicos_scicos/check_io.sci
index a0d5818..13884d3 100644
--- a/scilab/modules/scicos/macros/scicos_scicos/check_io.sci
+++ b/scilab/modules/scicos/macros/scicos_scicos/check_io.sci
@@ -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 message('Connected ports cannot be suppressed')
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 message('Connected ports cannot be suppressed')
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 message('Connected ports cannot be suppressed')
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 message('Connected ports cannot be suppressed')
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 message('Connected ports types cannot be changed')
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 message('Connected ports types cannot be changed')
143 ok=%f
144 return
145 end
146 else 110 else
147 out_impl=[] 111 out_impl=[]
148 end 112 end