1// Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
2// Copyright (C) DIGITEO - 2010-2010 - Clément DAVID <clement.david@scilab.org>
3//
4// This file is distributed under the same license as the Scilab package.
5// <-- XCOS TEST -->
6//
7// <-- Short Description -->
8// Check that all computational function are available.
9//
10// load the source file list for languages
11//
12ilib_verbose(0);
13BLOCKS_C = [
14"absblk",
15"absolute_value",
16"acos_blk",
17"acosh_blk",
18"affich2",
19"andlog",
20"asin_blk",
21"asinh_blk",
22"assignment",
23"atan_blk",
24"atanh_blk",
25"automat",
26"backlash",
27"bidon",
28"bit_clear_16",
29"bit_clear_32",
30"bit_clear_8",
31"bit_set_16",
32"bit_set_32",
33"bit_set_8",
34"bounce_ball",
35"bouncexy",
36"canimxy",
37"canimxy3d",
38"cdummy",
39"cevscpe",
40"cfscope",
41"cmat3d",
42"cmatview",
43"cmscope",
44"constraint_c",
45"convert",
46"cosblk",
47"cos_blk",
48"cosh_blk",
49"counter",
50"cscope",
51"cscopxy",
52"cscopxy3d",
53"csslti4",
54"cstblk4",
55"cstblk4_m",
56"cumsum_c",
57"cumsum_m",
58"cumsum_r",
59"cumsumz_c",
60"cumsumz_m",
61"cumsumz_r",
62"curve_c",
63"dband",
64"deadband",
65"delay4",
66"delay4_i16",
67"delay4_i32",
68"delay4_i8",
69"delay4_ui16",
70"delay4_ui32",
71"delay4_ui8",
72"deriv",
73"diffblk_c",
74"dmmul",
75"dmmul1",
76"dollar4",
77"dollar4_m",
78"dsslti4",
79"edgetrig",
80"evaluate_expr",
81"evtdly4",
82"evtvardly",
83"expblk_m",
84"extdiag",
85"extdiagz",
86"extract",
87"extract_bit_16_LH",
88"extract_bit_16_LSB",
89"extract_bit_16_MSB0",
90"extract_bit_16_MSB1",
91"extract_bit_16_RB0",
92"extract_bit_16_RB1",
93"extract_bit_16_UH0",
94"extract_bit_16_UH1",
95"extract_bit_32_LH",
96"extract_bit_32_LSB",
97"extract_bit_32_MSB0",
98"extract_bit_32_MSB1",
99"extract_bit_32_RB0",
100"extract_bit_32_RB1",
101"extract_bit_32_UH0",
102"extract_bit_32_UH1",
103"extract_bit_8_LH",
104"extract_bit_8_LSB",
105"extract_bit_8_MSB0",
106"extract_bit_8_MSB1",
107"extract_bit_8_RB0",
108"extract_bit_8_RB1",
109"extract_bit_8_UH0",
110"extract_bit_8_UH1",
111"extract_bit_u16_MSB1",
112"extract_bit_u16_RB1",
113"extract_bit_u16_UH1",
114"extract_bit_u32_MSB1",
115"extract_bit_u32_RB1",
116"extract_bit_u32_UH1",
117"extract_bit_u8_MSB1",
118"extract_bit_u8_RB1",
119"extract_bit_u8_UH1",
120"extractor",
121"extractz",
122"exttril",
123"exttrilz",
124"exttriu",
125"exttriuz",
126"foriterator",
127"fromws_c",
128"gain",
129"gainblk",
130"gainblk_i16e",
131"gainblk_i16n",
132"gainblk_i16s",
133"gainblk_i32e",
134"gainblk_i32n",
135"gainblk_i32s",
136"gainblk_i8e",
137"gainblk_i8n",
138"gainblk_i8s",
139"gainblk_ui16e",
140"gainblk_ui16n",
141"gainblk_ui16s",
142"gainblk_ui32e",
143"gainblk_ui32n",
144"gainblk_ui32s",
145"gainblk_ui8e",
146"gainblk_ui8n",
147"gainblk_ui8s",
148"hystheresis",
149"integral_func",
150"integralz_func",
151"invblk4",
152"logic",
153"logicalop",
154"logicalop_i16",
155"logicalop_i32",
156"logicalop_i8",
157"logicalop_m",
158"logicalop_ui16",
159"logicalop_ui32",
160"logicalop_ui8",
161"lookup2d",
162"lookup_c",
163"mat_bksl",
164"matbyscal",
165"matbyscal_e",
166"matbyscal_s",
167"mat_cath",
168"mat_catv",
169"mat_det",
170"mat_diag",
171"mat_div",
172"mat_expm",
173"mathermit_m",
174"mat_inv",
175"mat_lu",
176"matmul2_e",
177"matmul2_m",
178"matmul2_s",
179"matmul_i16e",
180"matmul_i16n",
181"matmul_i16s",
182"matmul_i32e",
183"matmul_i32n",
184"matmul_i32s",
185"matmul_i8e",
186"matmul_i8n",
187"matmul_i8s",
188"matmul_m",
189"matmul_ui16e",
190"matmul_ui16n",
191"matmul_ui16s",
192"matmul_ui32e",
193"matmul_ui32n",
194"matmul_ui32s",
195"matmul_ui8e",
196"matmul_ui8n",
197"matmul_ui8s",
198"mat_pinv",
199"mat_reshape",
200"mat_sing",
201"mat_sqrt",
202"mat_sum",
203"mat_sumc",
204"mat_suml",
205"mat_svd",
206"mattran_m",
207"mat_vps",
208"mat_vpv",
209"matz_abs",
210"matz_absc",
211"matz_bksl",
212"matz_cath",
213"matz_catv",
214"matz_conj",
215"matz_det",
216"matz_diag",
217"matz_div",
218"matz_expm",
219"matz_inv",
220"matz_lu",
221"matzmul2_m",
222"matzmul_m",
223"matz_pinv",
224"matz_reim",
225"matz_reimc",
226"matz_reshape",
227"matz_sing",
228"matz_sqrt",
229"matz_sum",
230"matz_sumc",
231"matz_suml",
232"matz_svd",
233"matztran_m",
234"matz_vps",
235"matz_vpv",
236"m_frequ",
237"minmax",
238"modulo_count",
239"mswitch",
240"multiplex",
241"plusblk",
242"prod",
243"product",
244"ramp",
245"ratelimiter",
246"readau",
247"readc",
248"relationalop",
249"relational_op",
250"relational_op_i16",
251"relational_op_i32",
252"relational_op_i8",
253"relational_op_ui16",
254"relational_op_ui32",
255"relational_op_ui8",
256"relay",
257"ricc_m",
258"rndblk_m",
259"rndblkz_m",
260"root_coef",
261"rootz_coef",
262"samphold4",
263"samphold4_m",
264"satur",
265"scalar2vector",
266"scicosexit",
267"selector",
268"selector_m",
269"shift_16_LA",
270"shift_16_LC",
271"shift_16_RA",
272"shift_16_RC",
273"shift_32_LA",
274"shift_32_LC",
275"shift_32_RA",
276"shift_32_RC",
277"shift_8_LA",
278"shift_8_LC",
279"shift_8_RA",
280"shift_8_RC",
281"shift_u16_RA",
282"shift_u32_RA",
283"shift_u8_RA",
284"signum",
285"sin_blk",
286"sinh_blk",
287"step_func",
288"submat",
289"submatz",
290"sum",
291"summation",
292"summation_i16e",
293"summation_i16n",
294"summation_i16s",
295"summation_i32e",
296"summation_i32n",
297"summation_i32s",
298"summation_i8e",
299"summation_i8n",
300"summation_i8s",
301"summation_ui16e",
302"summation_ui16n",
303"summation_ui16s",
304"summation_ui32e",
305"summation_ui32n",
306"summation_ui32s",
307"summation_ui8e",
308"summation_ui8n",
309"summation_ui8s",
310"summation_z",
311"switch2",
312"switch2_m",
313"switchn",
314"tablex2d_c",
315"tan_blk",
316"tanh_blk",
317"tcslti4",
318"tcsltj4",
319"time_delay",
320"tows_c",
321"variable_delay",
322"whileiterator",
323"writeau",
324"writec",
325"zcross2",
326];
327BLOCKS_FORTRAN = [
328"csslti",
329"cstblk",
330"delay",
331"delayv",
332"demux",
333"diffblk",
334"dlradp",
335"dollar",
336"dsslti",
337"eselect",
338"evtdly",
339"expblk",
340"forblk",
341"fsv",
342"gensin",
343"gensqr",
344"hltblk",
345"ifthel",
346"integr",
347"intplt",
348"intpol",
349"intrp2",
350"intrpl",
351"invblk",
352"iocopy",
353"logblk",
354"lookup",
355"lsplit",
356"lusat",
357"maxblk",
358"memo",
359"mfclck",
360"minblk",
361"mux",
362"pload",
363"powblk",
364"qzcel",
365"qzflr",
366"qzrnd",
367"qztrn",
368"readf",
369"rndblk",
370"samphold",
371"sawtth",
372"sciblk",
373"selblk",
374"sinblk",
375"sqrblk",
376"sum2",
377"sum3",
378"tanblk",
379"tcslti",
380"tcsltj",
381"timblk",
382"trash",
383"writef",
384"zcross",
385];
386BLOCKS_CPP = [
387"affich2",
388];
389//
390// load the scicos libs
391//
392//
393// Link them
394//
395// binary case or source case
396if getos() <> "Windows" then
397    LIB = SCI + "/../../lib/scilab/libsciscicos_blocks" + getdynlibext();
398    if ~isfile(LIB) then
399        LIB = SCI + "/modules/scicos_blocks/.libs/libsciscicos_blocks" + getdynlibext();
400        if ~isfile(LIB) then bugmes();quit;end
401    end
402    if execstr("link(LIB, BLOCKS_C, ""c"");", "errcatch") <> 0 then bugmes();quit;end
403    if execstr("link(LIB, BLOCKS_FORTRAN, ""f"");", "errcatch") <> 0 then bugmes();quit;end
404    if execstr("link(LIB, BLOCKS_CPP, ""c"");", "errcatch") <> 0 then bugmes();quit;end
405else
406    LIBCCPP = SCI + "/bin/scicos_blocks" + getdynlibext();
407    LIBFOR = SCI + "/bin/scicos_blocks_f" + getdynlibext();
408    if ~isfile(LIBCCPP) then bugmes();quit;end
409    if ~isfile(LIBFOR) then bugmes();quit;end
410    if execstr("link(LIBCCPP, BLOCKS_C, ""c"");", "errcatch") <> 0 then bugmes();quit;end
411    if execstr("link(LIBCCPP, BLOCKS_CPP, ""c"");", "errcatch") <> 0 then bugmes();quit;end
412    if execstr("link(LIBFOR, BLOCKS_FORTRAN, ""f"");", "errcatch") <> 0 then bugmes();quit;end
413end
414ulink();
415