Xcos tests: fix computational_functions, cumsum, error_reporting_nw, model2blk, bug_1... 82/16682/2
Paul Bignier [Wed, 3 Jun 2015 07:51:10 +0000 (09:51 +0200)]
Fixed tests:
 * computational_functions: "two dots spacing" doesn't work in YaSp
 * cumsum: had trouble when 'opar' contained complex values
 * error_reporting_nw: fixed deliberate wrong 'ipar' in an inner input/output Superblock block yielding an error
by arbitrarily replacing the wrong value with the maximum possible value (like in Scilab 5)
 * model2blk: squaring with Scilab 5's createblklist
 * bug_12998: inserting an empty diagram in 'block.model.rpar' failed
 * bug_8235: modified script2var logic to not use the stack at all anymore, because it changed a lot between Scilab 5 and 6

In progress / missing in YaSp:
 * bug_9478: in ModelAdapter, allowed 'dep_ut' to be a row OR column vector, but test doesn't pass yet because of export_to_hdf5
 * DEBUG_SCICOS: made a big leap forward, but cannot test yet because YaSp doesn't allow saving functions in files yet!
 * scicos_diagram: need fieldnames(scs_m) to work.
So far I am able to return ["props" "objs "version" "contrib"] but not with "diagram" at the beginning.
How should it be detected by sci_fieldnames.cpp? By hardcoding it? By including "DiagramAdapter.hxx" to call get getSharedTypeStr()?

 * Regenerated bug_13396, fromws_c, fromws_tows_c and post_xcos_simulate ref files

Change-Id: I3f830e679878f09024ab04982cab8ac7976d0646

12 files changed:
scilab/modules/scicos/macros/scicos_scicos/script2var.sci
scilab/modules/scicos/sci_gateway/cpp/sci_scicosim.cpp
scilab/modules/scicos/src/c/scicos.c
scilab/modules/scicos/src/cpp/createblklist.cpp
scilab/modules/scicos/src/cpp/view_scilab/ModelAdapter.cpp
scilab/modules/types/sci_gateway/cpp/sci_fieldnames.cpp
scilab/modules/xcos/tests/nonreg_tests/bug_13396.unix.dia.ref
scilab/modules/xcos/tests/unit_tests/computational_functions.dia.ref
scilab/modules/xcos/tests/unit_tests/computational_functions.tst
scilab/modules/xcos/tests/unit_tests/fromws_c.dia.ref
scilab/modules/xcos/tests/unit_tests/fromws_tows_c.dia.ref
scilab/modules/xcos/tests/unit_tests/post_xcos_simulate.dia.ref

index 4c17f3c..5ce89b2 100644 (file)
@@ -54,18 +54,20 @@ function [%ll,%ierr]=getvardef(%txt,%ll)
     //local variable names are prefixed with a %  to limit conflicts with
     //variables  defined in %txt instructions
 
-    %nww="";%ierr=0;  // to make sure %nww and %ierr does not enter the difference
+    %ierr = 0;  // to make sure %ierr does not enter the difference
     if isempty(%txt) then return,end
-    %nww=who("get")
 
-    %ierr=execstr(%txt,"errcatch")
+    %ierr = execstr(%txt,"errcatch");
     if %ierr<>0 then mprintf("%s\n",lasterror()), return,end
 
-    %mm=who("get")
-    // Compare the new list of variables with the old one to find new variables
-    %mm=%mm(members(%mm,%nww)==0)
-    //%mm contains the list of the variables defined by execstr(%txt,'errcatch')
-    for %mi=%mm(:)'
+    // Use macrovar to extract the variable names present in %txt:
+    // listvar(3) contains the names already present in the context (case Superblock's context overlapping main diagram's one)
+    // listvar(5) contains the new variables (main diagram's context)
+    deff("foo()", %txt);
+    listvar = macrovar(foo);
+    %mm = [listvar(3); listvar(5)];
+
+    for %mi=%mm'
         if %mi=="scs_m" then
             mprintf(_("The variable name %s cannot be used as block parameter: ignored"),"scs_m");
             continue
index 8b3fe73..5b763fa 100644 (file)
@@ -1672,7 +1672,32 @@ types::Function::ReturnValue sci_scicosim(types::typed_list &in, int _iRetCount,
                     else
                     {
                         opartyp[j] = SCSCOMPLEX_N; // Double complex matrix
-                        opar[j] = (SCSCOMPLEX_COP *) oparDouble->get();
+                        // Allocate a long array in order to make the real and complex parts contiguous (oparDouble->get() and oparDouble->getImg())
+                        if ((opar[j] = new (std::nothrow) double[2 * oparDouble->getSize()]) == nullptr)
+                        {
+                            Scierror(999, _("%s: Memory allocation error.\n"), funname.data());
+                            il_state->DecreaseRef();
+                            il_state->killMe();
+                            il_tcur->DecreaseRef();
+                            il_tcur->killMe();
+                            il_sim->DecreaseRef();
+                            il_sim->killMe();
+                            delete[] il_sim_labptr;
+                            delete[] l_sim_lab;
+                            delete[] il_sim_uidptr;
+                            delete[] l_sim_uid;
+                            delete[] lfunpt;
+                            delete[] oz;
+                            delete[] ozsz;
+                            delete[] oztyp;
+                            delete[] opar;
+                            delete[] oparsz;
+                            delete[] opartyp;
+                            return types::Function::Error;
+                        }
+                        memcpy(opar[j], oparDouble->get(), oparDouble->getSize() * sizeof(double)); // Real part
+                        memcpy((double*)(opar[j]) + sizeof(double)*oparDouble->getSize(), oparDouble->getImg(), oparDouble->getSize() * sizeof(double)); // Complex part
+                        // FIXME: delete oparDouble because we copied it instead of using it?
                     }
                     oparsz[j] = oparDouble->getRows();
                     oparsz[j + nopar] = oparDouble->getCols();
@@ -1861,7 +1886,34 @@ types::Function::ReturnValue sci_scicosim(types::typed_list &in, int _iRetCount,
                     else
                     {
                         outtbtyp[j] = SCSCOMPLEX_N; // Double complex matrix
-                        outtbptr[j] = (SCSCOMPLEX_COP *) outtbDouble->get();
+                        // Allocate a long array in order to make the real and complex parts contiguous (outtbDouble->get() and outtbDouble->getImg())
+                        if ((outtbptr[j] = new (std::nothrow) double[2 * outtbDouble->getSize()]) == nullptr)
+                        {
+                            Scierror(999, _("%s: Memory allocation error.\n"), funname.data());
+                            il_state->DecreaseRef();
+                            il_state->killMe();
+                            il_tcur->DecreaseRef();
+                            il_tcur->killMe();
+                            il_sim->DecreaseRef();
+                            il_sim->killMe();
+                            delete[] il_sim_labptr;
+                            delete[] l_sim_lab;
+                            delete[] il_sim_uidptr;
+                            delete[] l_sim_uid;
+                            delete[] lfunpt;
+                            delete[] oz;
+                            delete[] ozsz;
+                            delete[] oztyp;
+                            delete[] opar;
+                            delete[] oparsz;
+                            delete[] opartyp;
+                            delete[] outtbptr;
+                            delete[] outtbsz;
+                            return types::Function::Error;
+                        }
+                        memcpy(outtbptr[j], outtbDouble->get(), outtbDouble->getSize() * sizeof(double)); // Real part
+                        memcpy((double*)(outtbptr[j]) + sizeof(double)*outtbDouble->getSize(), outtbDouble->getImg(), outtbDouble->getSize() * sizeof(double)); // Complex part
+                        // FIXME: delete outtbDouble because we copied it instead of using it?
                     }
                     outtbsz[j] = outtbDouble->getRows();
                     outtbsz[j + nlnk] = outtbDouble->getCols();
@@ -2137,7 +2189,7 @@ types::Function::ReturnValue sci_scicosim(types::typed_list &in, int _iRetCount,
             case 26  :
                 error = _("The number of parameter provided by Scicos blocks is different from what expected by the code generated by the Modelica compiler. You might have relaxed a parameter using FIXED property (i.e., fixed=false) in a Modelica model. This will be corrected in the next version");
                 break;
-                // In this case, you need to turn off the parameter embedded code generation mode by setting 'Modelica_ParEmb=%f' in the Scilab command window, and recompile the Scicos diagram
+            // In this case, you need to turn off the parameter embedded code generation mode by setting 'Modelica_ParEmb=%f' in the Scilab command window, and recompile the Scicos diagram
 
             default  :
                 if (ierr >= 1000)
index 6266d4a..72632aa 100644 (file)
@@ -571,7 +571,7 @@ int C2F(scicos)(double *x_in, int *xptr_in, double *z__,
                     break;
                 case DEBUG_BLOCK: /* debugging block */
                     Blocks[kf].funpt = (voidg)sciblk4;
-                    /*Blocks[kf].type=4;*/
+                    Blocks[kf].type *= -1;
                     debug_block = kf;
                     break;
 
@@ -3590,7 +3590,7 @@ void callf(double *t, scicos_block *block, scicos_flag *flag)
 
     /* debug block is never called */
     /*if (kf==(debug_block+1)) return;*/
-    if (block->type == 99)
+    if (block->type == DEBUG_BLOCK)
     {
         return;
     }
@@ -4051,7 +4051,7 @@ static void call_debug_scicos(scicos_block *block, scicos_flag *flag, int flagi,
     double *ptr_d = NULL;
 
     C2F(cosdebugcounter).counter = C2F(cosdebugcounter).counter + 1;
-    C2F(scsptr).ptr = Blocks[deb_blk].scsptr;
+    C2F(scsptr).ptr = block->scsptr;
 
     loc  = Blocks[deb_blk].funpt; /* GLOBAL */
     loc4 = (ScicosF4) loc;
@@ -4063,7 +4063,10 @@ static void call_debug_scicos(scicos_block *block, scicos_flag *flag, int flagi,
         block->xd  = block->res;
     }
 
+    // Temporarily replacing the block's computational function with DEBUG_BLOCK's so that sciblk4 will call %debug_scicos()
+    block->scsptr = Blocks[deb_blk].scsptr;
     (*loc4)(block, *flag);
+    block->scsptr = C2F(scsptr).ptr;
 
     /* Implicit Solver & explicit block & flag==0 */
     /* adjust continuous state vector after call */
index d04a4f3..be511cc 100644 (file)
@@ -322,9 +322,9 @@ types::InternalType* createblklist(const scicos_block* const Blocks, const int f
     m->append(new types::Double(static_cast<double>(Blocks->nin)));
 
     /* 17 - insz */
-    types::Double* insz = new types::Double(Blocks->nin, 1);
+    types::Double* insz = new types::Double(3 * Blocks->nin, 1);
     d = insz->get();
-    for (int i = 0; i < Blocks->nin; ++i)
+    for (int i = 0; i < 3 * Blocks->nin; ++i)
     {
         d[i] = static_cast<double>(Blocks->insz[i]);
     }
index 247d3e0..ab2b611 100644 (file)
@@ -490,7 +490,15 @@ bool setInnerBlocksRefs(ModelAdapter& adaptor, const std::vector<ScicosID>& chil
                 controller.getObjectProperty(adaptee, BLOCK, kind, superPorts);
                 if (static_cast<int>(superPorts.size()) < portIndex)
                 {
-                    return false;
+                    if (!superPorts.empty())
+                    {
+                        // Arbitrarily take the highest possible value in case the user enters a wrong number
+                        portIndex = superPorts.size();
+                    }
+                    else
+                    {
+                        return false;
+                    }
                 }
 
                 ScicosID port = superPorts[portIndex - 1];
@@ -602,6 +610,11 @@ struct rpar
             // set the diagram children as block children ; referencing them
             std::vector<ScicosID> diagramChildren;
             controller.getObjectProperty(diagram->getAdaptee()->id(), DIAGRAM, CHILDREN, diagramChildren);
+            if (diagramChildren.empty())
+            {
+                // bug_12998: If inserting an empty diagram in 'rpar', simulate an empty object
+                diagramChildren.push_back(0ll);
+            }
             std::vector<ScicosID> oldDiagramChildren;
             controller.getObjectProperty(adaptor.getAdaptee()->id(), BLOCK, CHILDREN, oldDiagramChildren);
 
@@ -842,7 +855,7 @@ struct dep_ut
         }
 
         types::Bool* current = v->getAs<types::Bool>();
-        if (current->getRows() != 1 || current->getCols() != 2)
+        if (current->getSize() != 2)
         {
             return false;
         }
index b89beb0..68440be 100644 (file)
@@ -16,6 +16,7 @@
 #include "double.hxx"
 #include "string.hxx"
 #include "list.hxx"
+#include "user.hxx"
 
 extern "C"
 {
@@ -36,8 +37,8 @@ Function::ReturnValue sci_fieldnames(typed_list &in, int _iRetCount, typed_list
 
 
     // FIXME : iso-functionnal to Scilab < 6
-    // Works on other types excepts {m,t}list and struct
-    if (in[0]->isStruct() == false && in[0]->isMList() == false && in[0]->isTList() == false)
+    // Works on other types except userType, {m,t}list and struct
+    if (in[0]->isStruct() == false && in[0]->isMList() == false && in[0]->isTList() == false && in[0]->isUserType() == false)
     {
         out.push_back(Double::Empty());
         return Function::OK;
@@ -59,17 +60,43 @@ Function::ReturnValue sci_fieldnames(typed_list &in, int _iRetCount, typed_list
         return Function::OK;
     }
 
+    InternalType* pIT;
+
     // TLIST or MLIST
-    // We only need list capabilities so retrieve first argument as List.
-    List *pInList = in[0]->getAs<List>();
-    InternalType *pIT = pInList->get(0);
+    if (in[0]->isList() == true)
+    {
+        // We only need list capabilities to retrieve first argument as List.
+        List *pInList = in[0]->getAs<List>();
+        pIT = pInList->get(0);
+
+        if (pIT == nullptr || pIT->isString() == false)
+        {
+            // FIXME : iso-functionnal to Scilab < 6
+            // Works on other types except userType, {m,t}list and struct
+            out.push_back(Double::Empty());
+            return Function::OK;
+        }
+    }
 
-    if (pIT == NULL || pIT->isString() == false)
+    // USER-TYPE (typically a Xcos object)
+    if (in[0]->isUserType() == true)
     {
-        // FIXME : iso-functionnal to Scilab < 6
-        // Works on other types excepts {m,t}list and struct
-        out.push_back(Double::Empty());
-        return Function::OK;
+        // We only need userType capabilities to retrieve first argument as UserType.
+        UserType *pInUser = in[0]->getAs<UserType>();
+
+        // Extract "diagram" first then the properties, or all in one shot?? Should DiagramA implement such a routine or should fieldnames include DiagramA?
+        //std::cout<<"diag "<<pInUser->getSharedTypeStr()<<std::endl;
+
+        // Extract the properties
+        typed_list one (1, new types::Double(1));
+        InternalType* pProperties = pInUser->extract(&one);
+        if (pProperties == nullptr || pProperties->isString() == false)
+        {
+            // FIXME : iso-functionnal to Scilab < 6
+            // Works on other types except userType, {m,t}list and struct
+            out.push_back(Double::Empty());
+            return Function::OK;
+        }
     }
 
     String *pAllFields = pIT->getAs<String>();
@@ -78,7 +105,6 @@ Function::ReturnValue sci_fieldnames(typed_list &in, int _iRetCount, typed_list
     //    ++pwcsAllStrings;
 
 
-
     String *pNewString = new String(pAllFields->getSize() - 1, 1, pwcsAllStrings + 1);
 
     out.push_back(pNewString);
index 200d440..2df88d9 100644 (file)
@@ -63,7 +63,6 @@ end
 [cpr, ok] = xcos_compile(scs_m);
 --------------------------------------------\
  Main Modelica : TMPDIR/bug_13396_im.mo
-
  Flat Modelica : TMPDIR/bug_13396_imf.mo
  Simulation C code :TMPDIR/bug_13396_im.c
 WARNING: Diagram contains implicit blocks, compiling for implicit Solver.
@@ -72,13 +71,11 @@ assert_checktrue(ok);
 xcos_simulate(scs_m, 4);
 --------------------------------------------\
  Main Modelica : TMPDIR/bug_13396_im.mo
-
  Flat Modelica : TMPDIR/bug_13396_imf.mo
  Simulation C code :TMPDIR/bug_13396_im.c
 WARNING: Diagram contains implicit blocks, compiling for implicit Solver.
 WARNING: Diagram has been compiled for implicit solver
-         switching to implicit Solver
-
+WARNING: switching to implicit Solver
 funcprot(prot);
 ilib_verbose(level);
 mdelete(TMPDIR+"/bug_13396.mo");
index 6f4266c..9447fda 100644 (file)
 // load the source file list for languages
 //
 ilib_verbose(0);
-BLOCKS_C = [..
-"absblk", ..
-"absolute_value", ..
-"acos_blk", ..
-"acosh_blk", ..
-"affich2", ..
-"andlog", ..
-"asin_blk", ..
-"asinh_blk", ..
-"assignment", ..
-"atan_blk", ..
-"atanh_blk", ..
-"automat", ..
-"backlash", ..
-"bidon", ..
-"bit_clear_16", ..
-"bit_clear_32", ..
-"bit_clear_8", ..
-"bit_set_16", ..
-"bit_set_32", ..
-"bit_set_8", ..
-"bounce_ball", ..
-"bouncexy", ..
-"canimxy", ..
-"canimxy3d", ..
-"cdummy", ..
-"cevscpe", ..
-"cfscope", ..
-"cmat3d", ..
-"cmatview", ..
-"cmscope", ..
-"constraint_c", ..
-"convert", ..
-"cosblk", ..
-"cos_blk", ..
-"cosh_blk", ..
-"counter", ..
-"cscope", ..
-"cscopxy", ..
-"cscopxy3d", ..
-"csslti4", ..
-"cstblk4", ..
-"cstblk4_m", ..
-"cumsum_c", ..
-"cumsum_m", ..
-"cumsum_r", ..
-"cumsumz_c", ..
-"cumsumz_m", ..
-"cumsumz_r", ..
-"curve_c", ..
-"dband", ..
-"deadband", ..
-"delay4", ..
-"delay4_i16", ..
-"delay4_i32", ..
-"delay4_i8", ..
-"delay4_ui16", ..
-"delay4_ui32", ..
-"delay4_ui8", ..
-"deriv", ..
-"diffblk_c", ..
-"dmmul", ..
-"dmmul1", ..
-"dollar4", ..
-"dollar4_m", ..
-"dsslti4", ..
-"edgetrig", ..
-"evaluate_expr", ..
-"evtdly4", ..
-"evtvardly", ..
-"expblk_m", ..
-"extdiag", ..
-"extdiagz", ..
-"extract", ..
-"extract_bit_16_LH", ..
-"extract_bit_16_LSB", ..
-"extract_bit_16_MSB0", ..
-"extract_bit_16_MSB1", ..
-"extract_bit_16_RB0", ..
-"extract_bit_16_RB1", ..
-"extract_bit_16_UH0", ..
-"extract_bit_16_UH1", ..
-"extract_bit_32_LH", ..
-"extract_bit_32_LSB", ..
-"extract_bit_32_MSB0", ..
-"extract_bit_32_MSB1", ..
-"extract_bit_32_RB0", ..
-"extract_bit_32_RB1", ..
-"extract_bit_32_UH0", ..
-"extract_bit_32_UH1", ..
-"extract_bit_8_LH", ..
-"extract_bit_8_LSB", ..
-"extract_bit_8_MSB0", ..
-"extract_bit_8_MSB1", ..
-"extract_bit_8_RB0", ..
-"extract_bit_8_RB1", ..
-"extract_bit_8_UH0", ..
-"extract_bit_8_UH1", ..
-"extract_bit_u16_MSB1", ..
-"extract_bit_u16_RB1", ..
-"extract_bit_u16_UH1", ..
-"extract_bit_u32_MSB1", ..
-"extract_bit_u32_RB1", ..
-"extract_bit_u32_UH1", ..
-"extract_bit_u8_MSB1", ..
-"extract_bit_u8_RB1", ..
-"extract_bit_u8_UH1", ..
-"extractor", ..
-"extractz", ..
-"exttril", ..
-"exttrilz", ..
-"exttriu", ..
-"exttriuz", ..
-"foriterator", ..
-"fromws_c", ..
-"gain", ..
-"gainblk", ..
-"gainblk_i16e", ..
-"gainblk_i16n", ..
-"gainblk_i16s", ..
-"gainblk_i32e", ..
-"gainblk_i32n", ..
-"gainblk_i32s", ..
-"gainblk_i8e", ..
-"gainblk_i8n", ..
-"gainblk_i8s", ..
-"gainblk_ui16e", ..
-"gainblk_ui16n", ..
-"gainblk_ui16s", ..
-"gainblk_ui32e", ..
-"gainblk_ui32n", ..
-"gainblk_ui32s", ..
-"gainblk_ui8e", ..
-"gainblk_ui8n", ..
-"gainblk_ui8s", ..
-"hystheresis", ..
-"integral_func", ..
-"integralz_func", ..
-"invblk4", ..
-"logic", ..
-"logicalop", ..
-"logicalop_i16", ..
-"logicalop_i32", ..
-"logicalop_i8", ..
-"logicalop_m", ..
-"logicalop_ui16", ..
-"logicalop_ui32", ..
-"logicalop_ui8", ..
-"lookup2d", ..
-"lookup_c", ..
-"mat_bksl", ..
-"matbyscal", ..
-"matbyscal_e", ..
-"matbyscal_s", ..
-"mat_cath", ..
-"mat_catv", ..
-"mat_det", ..
-"mat_diag", ..
-"mat_div", ..
-"mat_expm", ..
-"mathermit_m", ..
-"mat_inv", ..
-"mat_lu", ..
-"matmul2_e", ..
-"matmul2_m", ..
-"matmul2_s", ..
-"matmul_i16e", ..
-"matmul_i16n", ..
-"matmul_i16s", ..
-"matmul_i32e", ..
-"matmul_i32n", ..
-"matmul_i32s", ..
-"matmul_i8e", ..
-"matmul_i8n", ..
-"matmul_i8s", ..
-"matmul_m", ..
-"matmul_ui16e", ..
-"matmul_ui16n", ..
-"matmul_ui16s", ..
-"matmul_ui32e", ..
-"matmul_ui32n", ..
-"matmul_ui32s", ..
-"matmul_ui8e", ..
-"matmul_ui8n", ..
-"matmul_ui8s", ..
-"mat_pinv", ..
-"mat_reshape", ..
-"mat_sing", ..
-"mat_sqrt", ..
-"mat_sum", ..
-"mat_sumc", ..
-"mat_suml", ..
-"mat_svd", ..
-"mattran_m", ..
-"mat_vps", ..
-"mat_vpv", ..
-"matz_abs", ..
-"matz_absc", ..
-"matz_bksl", ..
-"matz_cath", ..
-"matz_catv", ..
-"matz_conj", ..
-"matz_det", ..
-"matz_diag", ..
-"matz_div", ..
-"matz_expm", ..
-"matz_inv", ..
-"matz_lu", ..
-"matzmul2_m", ..
-"matzmul_m", ..
-"matz_pinv", ..
-"matz_reim", ..
-"matz_reimc", ..
-"matz_reshape", ..
-"matz_sing", ..
-"matz_sqrt", ..
-"matz_sum", ..
-"matz_sumc", ..
-"matz_suml", ..
-"matz_svd", ..
-"matztran_m", ..
-"matz_vps", ..
-"matz_vpv", ..
-"m_frequ", ..
-"minmax", ..
-"modulo_count", ..
-"mswitch", ..
-"multiplex", ..
-"plusblk", ..
-"prod", ..
-"product", ..
-"ramp", ..
-"ratelimiter", ..
-"readau", ..
-"readc", ..
-"relationalop", ..
-"relational_op", ..
-"relational_op_i16", ..
-"relational_op_i32", ..
-"relational_op_i8", ..
-"relational_op_ui16", ..
-"relational_op_ui32", ..
-"relational_op_ui8", ..
-"relay", ..
-"ricc_m", ..
-"rndblk_m", ..
-"rndblkz_m", ..
-"root_coef", ..
-"rootz_coef", ..
-"samphold4", ..
-"samphold4_m", ..
-"satur", ..
-"scalar2vector", ..
-"scicosexit", ..
-"selector", ..
-"selector_m", ..
-"shift_16_LA", ..
-"shift_16_LC", ..
-"shift_16_RA", ..
-"shift_16_RC", ..
-"shift_32_LA", ..
-"shift_32_LC", ..
-"shift_32_RA", ..
-"shift_32_RC", ..
-"shift_8_LA", ..
-"shift_8_LC", ..
-"shift_8_RA", ..
-"shift_8_RC", ..
-"shift_u16_RA", ..
-"shift_u32_RA", ..
-"shift_u8_RA", ..
-"signum", ..
-"sin_blk", ..
-"sinh_blk", ..
-"step_func", ..
-"submat", ..
-"submatz", ..
-"sum", ..
-"summation", ..
-"summation_i16e", ..
-"summation_i16n", ..
-"summation_i16s", ..
-"summation_i32e", ..
-"summation_i32n", ..
-"summation_i32s", ..
-"summation_i8e", ..
-"summation_i8n", ..
-"summation_i8s", ..
-"summation_ui16e", ..
-"summation_ui16n", ..
-"summation_ui16s", ..
-"summation_ui32e", ..
-"summation_ui32n", ..
-"summation_ui32s", ..
-"summation_ui8e", ..
-"summation_ui8n", ..
-"summation_ui8s", ..
-"summation_z", ..
-"switch2", ..
-"switch2_m", ..
-"switchn", ..
-"tablex2d_c", ..
-"tan_blk", ..
-"tanh_blk", ..
-"tcslti4", ..
-"tcsltj4", ..
-"time_delay", ..
-"tows_c", ..
-"variable_delay", ..
-"whileiterator", ..
-"writeau", ..
-"writec", ..
-"zcross2", ..
+BLOCKS_C = [
+"absblk",
+"absolute_value",
+"acos_blk",
+"acosh_blk",
+"affich2",
+"andlog",
+"asin_blk",
+"asinh_blk",
+"assignment",
+"atan_blk",
+"atanh_blk",
+"automat",
+"backlash",
+"bidon",
+"bit_clear_16",
+"bit_clear_32",
+"bit_clear_8",
+"bit_set_16",
+"bit_set_32",
+"bit_set_8",
+"bounce_ball",
+"bouncexy",
+"canimxy",
+"canimxy3d",
+"cdummy",
+"cevscpe",
+"cfscope",
+"cmat3d",
+"cmatview",
+"cmscope",
+"constraint_c",
+"convert",
+"cosblk",
+"cos_blk",
+"cosh_blk",
+"counter",
+"cscope",
+"cscopxy",
+"cscopxy3d",
+"csslti4",
+"cstblk4",
+"cstblk4_m",
+"cumsum_c",
+"cumsum_m",
+"cumsum_r",
+"cumsumz_c",
+"cumsumz_m",
+"cumsumz_r",
+"curve_c",
+"dband",
+"deadband",
+"delay4",
+"delay4_i16",
+"delay4_i32",
+"delay4_i8",
+"delay4_ui16",
+"delay4_ui32",
+"delay4_ui8",
+"deriv",
+"diffblk_c",
+"dmmul",
+"dmmul1",
+"dollar4",
+"dollar4_m",
+"dsslti4",
+"edgetrig",
+"evaluate_expr",
+"evtdly4",
+"evtvardly",
+"expblk_m",
+"extdiag",
+"extdiagz",
+"extract",
+"extract_bit_16_LH",
+"extract_bit_16_LSB",
+"extract_bit_16_MSB0",
+"extract_bit_16_MSB1",
+"extract_bit_16_RB0",
+"extract_bit_16_RB1",
+"extract_bit_16_UH0",
+"extract_bit_16_UH1",
+"extract_bit_32_LH",
+"extract_bit_32_LSB",
+"extract_bit_32_MSB0",
+"extract_bit_32_MSB1",
+"extract_bit_32_RB0",
+"extract_bit_32_RB1",
+"extract_bit_32_UH0",
+"extract_bit_32_UH1",
+"extract_bit_8_LH",
+"extract_bit_8_LSB",
+"extract_bit_8_MSB0",
+"extract_bit_8_MSB1",
+"extract_bit_8_RB0",
+"extract_bit_8_RB1",
+"extract_bit_8_UH0",
+"extract_bit_8_UH1",
+"extract_bit_u16_MSB1",
+"extract_bit_u16_RB1",
+"extract_bit_u16_UH1",
+"extract_bit_u32_MSB1",
+"extract_bit_u32_RB1",
+"extract_bit_u32_UH1",
+"extract_bit_u8_MSB1",
+"extract_bit_u8_RB1",
+"extract_bit_u8_UH1",
+"extractor",
+"extractz",
+"exttril",
+"exttrilz",
+"exttriu",
+"exttriuz",
+"foriterator",
+"fromws_c",
+"gain",
+"gainblk",
+"gainblk_i16e",
+"gainblk_i16n",
+"gainblk_i16s",
+"gainblk_i32e",
+"gainblk_i32n",
+"gainblk_i32s",
+"gainblk_i8e",
+"gainblk_i8n",
+"gainblk_i8s",
+"gainblk_ui16e",
+"gainblk_ui16n",
+"gainblk_ui16s",
+"gainblk_ui32e",
+"gainblk_ui32n",
+"gainblk_ui32s",
+"gainblk_ui8e",
+"gainblk_ui8n",
+"gainblk_ui8s",
+"hystheresis",
+"integral_func",
+"integralz_func",
+"invblk4",
+"logic",
+"logicalop",
+"logicalop_i16",
+"logicalop_i32",
+"logicalop_i8",
+"logicalop_m",
+"logicalop_ui16",
+"logicalop_ui32",
+"logicalop_ui8",
+"lookup2d",
+"lookup_c",
+"mat_bksl",
+"matbyscal",
+"matbyscal_e",
+"matbyscal_s",
+"mat_cath",
+"mat_catv",
+"mat_det",
+"mat_diag",
+"mat_div",
+"mat_expm",
+"mathermit_m",
+"mat_inv",
+"mat_lu",
+"matmul2_e",
+"matmul2_m",
+"matmul2_s",
+"matmul_i16e",
+"matmul_i16n",
+"matmul_i16s",
+"matmul_i32e",
+"matmul_i32n",
+"matmul_i32s",
+"matmul_i8e",
+"matmul_i8n",
+"matmul_i8s",
+"matmul_m",
+"matmul_ui16e",
+"matmul_ui16n",
+"matmul_ui16s",
+"matmul_ui32e",
+"matmul_ui32n",
+"matmul_ui32s",
+"matmul_ui8e",
+"matmul_ui8n",
+"matmul_ui8s",
+"mat_pinv",
+"mat_reshape",
+"mat_sing",
+"mat_sqrt",
+"mat_sum",
+"mat_sumc",
+"mat_suml",
+"mat_svd",
+"mattran_m",
+"mat_vps",
+"mat_vpv",
+"matz_abs",
+"matz_absc",
+"matz_bksl",
+"matz_cath",
+"matz_catv",
+"matz_conj",
+"matz_det",
+"matz_diag",
+"matz_div",
+"matz_expm",
+"matz_inv",
+"matz_lu",
+"matzmul2_m",
+"matzmul_m",
+"matz_pinv",
+"matz_reim",
+"matz_reimc",
+"matz_reshape",
+"matz_sing",
+"matz_sqrt",
+"matz_sum",
+"matz_sumc",
+"matz_suml",
+"matz_svd",
+"matztran_m",
+"matz_vps",
+"matz_vpv",
+"m_frequ",
+"minmax",
+"modulo_count",
+"mswitch",
+"multiplex",
+"plusblk",
+"prod",
+"product",
+"ramp",
+"ratelimiter",
+"readau",
+"readc",
+"relationalop",
+"relational_op",
+"relational_op_i16",
+"relational_op_i32",
+"relational_op_i8",
+"relational_op_ui16",
+"relational_op_ui32",
+"relational_op_ui8",
+"relay",
+"ricc_m",
+"rndblk_m",
+"rndblkz_m",
+"root_coef",
+"rootz_coef",
+"samphold4",
+"samphold4_m",
+"satur",
+"scalar2vector",
+"scicosexit",
+"selector",
+"selector_m",
+"shift_16_LA",
+"shift_16_LC",
+"shift_16_RA",
+"shift_16_RC",
+"shift_32_LA",
+"shift_32_LC",
+"shift_32_RA",
+"shift_32_RC",
+"shift_8_LA",
+"shift_8_LC",
+"shift_8_RA",
+"shift_8_RC",
+"shift_u16_RA",
+"shift_u32_RA",
+"shift_u8_RA",
+"signum",
+"sin_blk",
+"sinh_blk",
+"step_func",
+"submat",
+"submatz",
+"sum",
+"summation",
+"summation_i16e",
+"summation_i16n",
+"summation_i16s",
+"summation_i32e",
+"summation_i32n",
+"summation_i32s",
+"summation_i8e",
+"summation_i8n",
+"summation_i8s",
+"summation_ui16e",
+"summation_ui16n",
+"summation_ui16s",
+"summation_ui32e",
+"summation_ui32n",
+"summation_ui32s",
+"summation_ui8e",
+"summation_ui8n",
+"summation_ui8s",
+"summation_z",
+"switch2",
+"switch2_m",
+"switchn",
+"tablex2d_c",
+"tan_blk",
+"tanh_blk",
+"tcslti4",
+"tcsltj4",
+"time_delay",
+"tows_c",
+"variable_delay",
+"whileiterator",
+"writeau",
+"writec",
+"zcross2",
 ];
 BLOCKS_FORTRAN = [
-"csslti", ..
-"cstblk", ..
-"delay", ..
-"delayv", ..
-"demux", ..
-"diffblk", ..
-"dlradp", ..
-"dollar", ..
-"dsslti", ..
-"eselect", ..
-"evtdly", ..
-"expblk", ..
-"forblk", ..
-"fsv", ..
-"gensin", ..
-"gensqr", ..
-"hltblk", ..
-"ifthel", ..
-"integr", ..
-"intplt", ..
-"intpol", ..
-"intrp2", ..
-"intrpl", ..
-"invblk", ..
-"iocopy", ..
-"logblk", ..
-"lookup", ..
-"lsplit", ..
-"lusat", ..
-"maxblk", ..
-"memo", ..
-"mfclck", ..
-"minblk", ..
-"mux", ..
-"pload", ..
-"powblk", ..
-"qzcel", ..
-"qzflr", ..
-"qzrnd", ..
-"qztrn", ..
-"readf", ..
-"rndblk", ..
-"samphold", ..
-"sawtth", ..
-"sciblk", ..
-"selblk", ..
-"sinblk", ..
-"sqrblk", ..
-"sum2", ..
-"sum3", ..
-"tanblk", ..
-"tcslti", ..
-"tcsltj", ..
-"timblk", ..
-"trash", ..
-"writef", ..
-"zcross", ..
+"csslti",
+"cstblk",
+"delay",
+"delayv",
+"demux",
+"diffblk",
+"dlradp",
+"dollar",
+"dsslti",
+"eselect",
+"evtdly",
+"expblk",
+"forblk",
+"fsv",
+"gensin",
+"gensqr",
+"hltblk",
+"ifthel",
+"integr",
+"intplt",
+"intpol",
+"intrp2",
+"intrpl",
+"invblk",
+"iocopy",
+"logblk",
+"lookup",
+"lsplit",
+"lusat",
+"maxblk",
+"memo",
+"mfclck",
+"minblk",
+"mux",
+"pload",
+"powblk",
+"qzcel",
+"qzflr",
+"qzrnd",
+"qztrn",
+"readf",
+"rndblk",
+"samphold",
+"sawtth",
+"sciblk",
+"selblk",
+"sinblk",
+"sqrblk",
+"sum2",
+"sum3",
+"tanblk",
+"tcslti",
+"tcsltj",
+"timblk",
+"trash",
+"writef",
+"zcross",
 ];
 BLOCKS_CPP = [
-"affich2", ..
+"affich2",
 ];
 //
 // load the scicos libs
index de5f486..bfdd386 100644 (file)
 
 ilib_verbose(0);
 
-BLOCKS_C = [..
-"absblk", ..
-"absolute_value", ..
-"acos_blk", ..
-"acosh_blk", ..
-"affich2", ..
-"andlog", ..
-"asin_blk", ..
-"asinh_blk", ..
-"assignment", ..
-"atan_blk", ..
-"atanh_blk", ..
-"automat", ..
-"backlash", ..
-"bidon", ..
-"bit_clear_16", ..
-"bit_clear_32", ..
-"bit_clear_8", ..
-"bit_set_16", ..
-"bit_set_32", ..
-"bit_set_8", ..
-"bounce_ball", ..
-"bouncexy", ..
-"canimxy", ..
-"canimxy3d", ..
-"cdummy", ..
-"cevscpe", ..
-"cfscope", ..
-"cmat3d", ..
-"cmatview", ..
-"cmscope", ..
-"constraint_c", ..
-"convert", ..
-"cosblk", ..
-"cos_blk", ..
-"cosh_blk", ..
-"counter", ..
-"cscope", ..
-"cscopxy", ..
-"cscopxy3d", ..
-"csslti4", ..
-"cstblk4", ..
-"cstblk4_m", ..
-"cumsum_c", ..
-"cumsum_m", ..
-"cumsum_r", ..
-"cumsumz_c", ..
-"cumsumz_m", ..
-"cumsumz_r", ..
-"curve_c", ..
-"dband", ..
-"deadband", ..
-"delay4", ..
-"delay4_i16", ..
-"delay4_i32", ..
-"delay4_i8", ..
-"delay4_ui16", ..
-"delay4_ui32", ..
-"delay4_ui8", ..
-"deriv", ..
-"diffblk_c", ..
-"dmmul", ..
-"dmmul1", ..
-"dollar4", ..
-"dollar4_m", ..
-"dsslti4", ..
-"edgetrig", ..
-"evaluate_expr", ..
-"evtdly4", ..
-"evtvardly", ..
-"expblk_m", ..
-"extdiag", ..
-"extdiagz", ..
-"extract", ..
-"extract_bit_16_LH", ..
-"extract_bit_16_LSB", ..
-"extract_bit_16_MSB0", ..
-"extract_bit_16_MSB1", ..
-"extract_bit_16_RB0", ..
-"extract_bit_16_RB1", ..
-"extract_bit_16_UH0", ..
-"extract_bit_16_UH1", ..
-"extract_bit_32_LH", ..
-"extract_bit_32_LSB", ..
-"extract_bit_32_MSB0", ..
-"extract_bit_32_MSB1", ..
-"extract_bit_32_RB0", ..
-"extract_bit_32_RB1", ..
-"extract_bit_32_UH0", ..
-"extract_bit_32_UH1", ..
-"extract_bit_8_LH", ..
-"extract_bit_8_LSB", ..
-"extract_bit_8_MSB0", ..
-"extract_bit_8_MSB1", ..
-"extract_bit_8_RB0", ..
-"extract_bit_8_RB1", ..
-"extract_bit_8_UH0", ..
-"extract_bit_8_UH1", ..
-"extract_bit_u16_MSB1", ..
-"extract_bit_u16_RB1", ..
-"extract_bit_u16_UH1", ..
-"extract_bit_u32_MSB1", ..
-"extract_bit_u32_RB1", ..
-"extract_bit_u32_UH1", ..
-"extract_bit_u8_MSB1", ..
-"extract_bit_u8_RB1", ..
-"extract_bit_u8_UH1", ..
-"extractor", ..
-"extractz", ..
-"exttril", ..
-"exttrilz", ..
-"exttriu", ..
-"exttriuz", ..
-"foriterator", ..
-"fromws_c", ..
-"gain", ..
-"gainblk", ..
-"gainblk_i16e", ..
-"gainblk_i16n", ..
-"gainblk_i16s", ..
-"gainblk_i32e", ..
-"gainblk_i32n", ..
-"gainblk_i32s", ..
-"gainblk_i8e", ..
-"gainblk_i8n", ..
-"gainblk_i8s", ..
-"gainblk_ui16e", ..
-"gainblk_ui16n", ..
-"gainblk_ui16s", ..
-"gainblk_ui32e", ..
-"gainblk_ui32n", ..
-"gainblk_ui32s", ..
-"gainblk_ui8e", ..
-"gainblk_ui8n", ..
-"gainblk_ui8s", ..
-"hystheresis", ..
-"integral_func", ..
-"integralz_func", ..
-"invblk4", ..
-"logic", ..
-"logicalop", ..
-"logicalop_i16", ..
-"logicalop_i32", ..
-"logicalop_i8", ..
-"logicalop_m", ..
-"logicalop_ui16", ..
-"logicalop_ui32", ..
-"logicalop_ui8", ..
-"lookup2d", ..
-"lookup_c", ..
-"mat_bksl", ..
-"matbyscal", ..
-"matbyscal_e", ..
-"matbyscal_s", ..
-"mat_cath", ..
-"mat_catv", ..
-"mat_det", ..
-"mat_diag", ..
-"mat_div", ..
-"mat_expm", ..
-"mathermit_m", ..
-"mat_inv", ..
-"mat_lu", ..
-"matmul2_e", ..
-"matmul2_m", ..
-"matmul2_s", ..
-"matmul_i16e", ..
-"matmul_i16n", ..
-"matmul_i16s", ..
-"matmul_i32e", ..
-"matmul_i32n", ..
-"matmul_i32s", ..
-"matmul_i8e", ..
-"matmul_i8n", ..
-"matmul_i8s", ..
-"matmul_m", ..
-"matmul_ui16e", ..
-"matmul_ui16n", ..
-"matmul_ui16s", ..
-"matmul_ui32e", ..
-"matmul_ui32n", ..
-"matmul_ui32s", ..
-"matmul_ui8e", ..
-"matmul_ui8n", ..
-"matmul_ui8s", ..
-"mat_pinv", ..
-"mat_reshape", ..
-"mat_sing", ..
-"mat_sqrt", ..
-"mat_sum", ..
-"mat_sumc", ..
-"mat_suml", ..
-"mat_svd", ..
-"mattran_m", ..
-"mat_vps", ..
-"mat_vpv", ..
-"matz_abs", ..
-"matz_absc", ..
-"matz_bksl", ..
-"matz_cath", ..
-"matz_catv", ..
-"matz_conj", ..
-"matz_det", ..
-"matz_diag", ..
-"matz_div", ..
-"matz_expm", ..
-"matz_inv", ..
-"matz_lu", ..
-"matzmul2_m", ..
-"matzmul_m", ..
-"matz_pinv", ..
-"matz_reim", ..
-"matz_reimc", ..
-"matz_reshape", ..
-"matz_sing", ..
-"matz_sqrt", ..
-"matz_sum", ..
-"matz_sumc", ..
-"matz_suml", ..
-"matz_svd", ..
-"matztran_m", ..
-"matz_vps", ..
-"matz_vpv", ..
-"m_frequ", ..
-"minmax", ..
-"modulo_count", ..
-"mswitch", ..
-"multiplex", ..
-"plusblk", ..
-"prod", ..
-"product", ..
-"ramp", ..
-"ratelimiter", ..
-"readau", ..
-"readc", ..
-"relationalop", ..
-"relational_op", ..
-"relational_op_i16", ..
-"relational_op_i32", ..
-"relational_op_i8", ..
-"relational_op_ui16", ..
-"relational_op_ui32", ..
-"relational_op_ui8", ..
-"relay", ..
-"ricc_m", ..
-"rndblk_m", ..
-"rndblkz_m", ..
-"root_coef", ..
-"rootz_coef", ..
-"samphold4", ..
-"samphold4_m", ..
-"satur", ..
-"scalar2vector", ..
-"scicosexit", ..
-"selector", ..
-"selector_m", ..
-"shift_16_LA", ..
-"shift_16_LC", ..
-"shift_16_RA", ..
-"shift_16_RC", ..
-"shift_32_LA", ..
-"shift_32_LC", ..
-"shift_32_RA", ..
-"shift_32_RC", ..
-"shift_8_LA", ..
-"shift_8_LC", ..
-"shift_8_RA", ..
-"shift_8_RC", ..
-"shift_u16_RA", ..
-"shift_u32_RA", ..
-"shift_u8_RA", ..
-"signum", ..
-"sin_blk", ..
-"sinh_blk", ..
-"step_func", ..
-"submat", ..
-"submatz", ..
-"sum", ..
-"summation", ..
-"summation_i16e", ..
-"summation_i16n", ..
-"summation_i16s", ..
-"summation_i32e", ..
-"summation_i32n", ..
-"summation_i32s", ..
-"summation_i8e", ..
-"summation_i8n", ..
-"summation_i8s", ..
-"summation_ui16e", ..
-"summation_ui16n", ..
-"summation_ui16s", ..
-"summation_ui32e", ..
-"summation_ui32n", ..
-"summation_ui32s", ..
-"summation_ui8e", ..
-"summation_ui8n", ..
-"summation_ui8s", ..
-"summation_z", ..
-"switch2", ..
-"switch2_m", ..
-"switchn", ..
-"tablex2d_c", ..
-"tan_blk", ..
-"tanh_blk", ..
-"tcslti4", ..
-"tcsltj4", ..
-"time_delay", ..
-"tows_c", ..
-"variable_delay", ..
-"whileiterator", ..
-"writeau", ..
-"writec", ..
-"zcross2", ..
+BLOCKS_C = [
+"absblk",
+"absolute_value",
+"acos_blk",
+"acosh_blk",
+"affich2",
+"andlog",
+"asin_blk",
+"asinh_blk",
+"assignment",
+"atan_blk",
+"atanh_blk",
+"automat",
+"backlash",
+"bidon",
+"bit_clear_16",
+"bit_clear_32",
+"bit_clear_8",
+"bit_set_16",
+"bit_set_32",
+"bit_set_8",
+"bounce_ball",
+"bouncexy",
+"canimxy",
+"canimxy3d",
+"cdummy",
+"cevscpe",
+"cfscope",
+"cmat3d",
+"cmatview",
+"cmscope",
+"constraint_c",
+"convert",
+"cosblk",
+"cos_blk",
+"cosh_blk",
+"counter",
+"cscope",
+"cscopxy",
+"cscopxy3d",
+"csslti4",
+"cstblk4",
+"cstblk4_m",
+"cumsum_c",
+"cumsum_m",
+"cumsum_r",
+"cumsumz_c",
+"cumsumz_m",
+"cumsumz_r",
+"curve_c",
+"dband",
+"deadband",
+"delay4",
+"delay4_i16",
+"delay4_i32",
+"delay4_i8",
+"delay4_ui16",
+"delay4_ui32",
+"delay4_ui8",
+"deriv",
+"diffblk_c",
+"dmmul",
+"dmmul1",
+"dollar4",
+"dollar4_m",
+"dsslti4",
+"edgetrig",
+"evaluate_expr",
+"evtdly4",
+"evtvardly",
+"expblk_m",
+"extdiag",
+"extdiagz",
+"extract",
+"extract_bit_16_LH",
+"extract_bit_16_LSB",
+"extract_bit_16_MSB0",
+"extract_bit_16_MSB1",
+"extract_bit_16_RB0",
+"extract_bit_16_RB1",
+"extract_bit_16_UH0",
+"extract_bit_16_UH1",
+"extract_bit_32_LH",
+"extract_bit_32_LSB",
+"extract_bit_32_MSB0",
+"extract_bit_32_MSB1",
+"extract_bit_32_RB0",
+"extract_bit_32_RB1",
+"extract_bit_32_UH0",
+"extract_bit_32_UH1",
+"extract_bit_8_LH",
+"extract_bit_8_LSB",
+"extract_bit_8_MSB0",
+"extract_bit_8_MSB1",
+"extract_bit_8_RB0",
+"extract_bit_8_RB1",
+"extract_bit_8_UH0",
+"extract_bit_8_UH1",
+"extract_bit_u16_MSB1",
+"extract_bit_u16_RB1",
+"extract_bit_u16_UH1",
+"extract_bit_u32_MSB1",
+"extract_bit_u32_RB1",
+"extract_bit_u32_UH1",
+"extract_bit_u8_MSB1",
+"extract_bit_u8_RB1",
+"extract_bit_u8_UH1",
+"extractor",
+"extractz",
+"exttril",
+"exttrilz",
+"exttriu",
+"exttriuz",
+"foriterator",
+"fromws_c",
+"gain",
+"gainblk",
+"gainblk_i16e",
+"gainblk_i16n",
+"gainblk_i16s",
+"gainblk_i32e",
+"gainblk_i32n",
+"gainblk_i32s",
+"gainblk_i8e",
+"gainblk_i8n",
+"gainblk_i8s",
+"gainblk_ui16e",
+"gainblk_ui16n",
+"gainblk_ui16s",
+"gainblk_ui32e",
+"gainblk_ui32n",
+"gainblk_ui32s",
+"gainblk_ui8e",
+"gainblk_ui8n",
+"gainblk_ui8s",
+"hystheresis",
+"integral_func",
+"integralz_func",
+"invblk4",
+"logic",
+"logicalop",
+"logicalop_i16",
+"logicalop_i32",
+"logicalop_i8",
+"logicalop_m",
+"logicalop_ui16",
+"logicalop_ui32",
+"logicalop_ui8",
+"lookup2d",
+"lookup_c",
+"mat_bksl",
+"matbyscal",
+"matbyscal_e",
+"matbyscal_s",
+"mat_cath",
+"mat_catv",
+"mat_det",
+"mat_diag",
+"mat_div",
+"mat_expm",
+"mathermit_m",
+"mat_inv",
+"mat_lu",
+"matmul2_e",
+"matmul2_m",
+"matmul2_s",
+"matmul_i16e",
+"matmul_i16n",
+"matmul_i16s",
+"matmul_i32e",
+"matmul_i32n",
+"matmul_i32s",
+"matmul_i8e",
+"matmul_i8n",
+"matmul_i8s",
+"matmul_m",
+"matmul_ui16e",
+"matmul_ui16n",
+"matmul_ui16s",
+"matmul_ui32e",
+"matmul_ui32n",
+"matmul_ui32s",
+"matmul_ui8e",
+"matmul_ui8n",
+"matmul_ui8s",
+"mat_pinv",
+"mat_reshape",
+"mat_sing",
+"mat_sqrt",
+"mat_sum",
+"mat_sumc",
+"mat_suml",
+"mat_svd",
+"mattran_m",
+"mat_vps",
+"mat_vpv",
+"matz_abs",
+"matz_absc",
+"matz_bksl",
+"matz_cath",
+"matz_catv",
+"matz_conj",
+"matz_det",
+"matz_diag",
+"matz_div",
+"matz_expm",
+"matz_inv",
+"matz_lu",
+"matzmul2_m",
+"matzmul_m",
+"matz_pinv",
+"matz_reim",
+"matz_reimc",
+"matz_reshape",
+"matz_sing",
+"matz_sqrt",
+"matz_sum",
+"matz_sumc",
+"matz_suml",
+"matz_svd",
+"matztran_m",
+"matz_vps",
+"matz_vpv",
+"m_frequ",
+"minmax",
+"modulo_count",
+"mswitch",
+"multiplex",
+"plusblk",
+"prod",
+"product",
+"ramp",
+"ratelimiter",
+"readau",
+"readc",
+"relationalop",
+"relational_op",
+"relational_op_i16",
+"relational_op_i32",
+"relational_op_i8",
+"relational_op_ui16",
+"relational_op_ui32",
+"relational_op_ui8",
+"relay",
+"ricc_m",
+"rndblk_m",
+"rndblkz_m",
+"root_coef",
+"rootz_coef",
+"samphold4",
+"samphold4_m",
+"satur",
+"scalar2vector",
+"scicosexit",
+"selector",
+"selector_m",
+"shift_16_LA",
+"shift_16_LC",
+"shift_16_RA",
+"shift_16_RC",
+"shift_32_LA",
+"shift_32_LC",
+"shift_32_RA",
+"shift_32_RC",
+"shift_8_LA",
+"shift_8_LC",
+"shift_8_RA",
+"shift_8_RC",
+"shift_u16_RA",
+"shift_u32_RA",
+"shift_u8_RA",
+"signum",
+"sin_blk",
+"sinh_blk",
+"step_func",
+"submat",
+"submatz",
+"sum",
+"summation",
+"summation_i16e",
+"summation_i16n",
+"summation_i16s",
+"summation_i32e",
+"summation_i32n",
+"summation_i32s",
+"summation_i8e",
+"summation_i8n",
+"summation_i8s",
+"summation_ui16e",
+"summation_ui16n",
+"summation_ui16s",
+"summation_ui32e",
+"summation_ui32n",
+"summation_ui32s",
+"summation_ui8e",
+"summation_ui8n",
+"summation_ui8s",
+"summation_z",
+"switch2",
+"switch2_m",
+"switchn",
+"tablex2d_c",
+"tan_blk",
+"tanh_blk",
+"tcslti4",
+"tcsltj4",
+"time_delay",
+"tows_c",
+"variable_delay",
+"whileiterator",
+"writeau",
+"writec",
+"zcross2",
 ];
 
 BLOCKS_FORTRAN = [
-"csslti", ..
-"cstblk", ..
-"delay", ..
-"delayv", ..
-"demux", ..
-"diffblk", ..
-"dlradp", ..
-"dollar", ..
-"dsslti", ..
-"eselect", ..
-"evtdly", ..
-"expblk", ..
-"forblk", ..
-"fsv", ..
-"gensin", ..
-"gensqr", ..
-"hltblk", ..
-"ifthel", ..
-"integr", ..
-"intplt", ..
-"intpol", ..
-"intrp2", ..
-"intrpl", ..
-"invblk", ..
-"iocopy", ..
-"logblk", ..
-"lookup", ..
-"lsplit", ..
-"lusat", ..
-"maxblk", ..
-"memo", ..
-"mfclck", ..
-"minblk", ..
-"mux", ..
-"pload", ..
-"powblk", ..
-"qzcel", ..
-"qzflr", ..
-"qzrnd", ..
-"qztrn", ..
-"readf", ..
-"rndblk", ..
-"samphold", ..
-"sawtth", ..
-"sciblk", ..
-"selblk", ..
-"sinblk", ..
-"sqrblk", ..
-"sum2", ..
-"sum3", ..
-"tanblk", ..
-"tcslti", ..
-"tcsltj", ..
-"timblk", ..
-"trash", ..
-"writef", ..
-"zcross", ..
+"csslti",
+"cstblk",
+"delay",
+"delayv",
+"demux",
+"diffblk",
+"dlradp",
+"dollar",
+"dsslti",
+"eselect",
+"evtdly",
+"expblk",
+"forblk",
+"fsv",
+"gensin",
+"gensqr",
+"hltblk",
+"ifthel",
+"integr",
+"intplt",
+"intpol",
+"intrp2",
+"intrpl",
+"invblk",
+"iocopy",
+"logblk",
+"lookup",
+"lsplit",
+"lusat",
+"maxblk",
+"memo",
+"mfclck",
+"minblk",
+"mux",
+"pload",
+"powblk",
+"qzcel",
+"qzflr",
+"qzrnd",
+"qztrn",
+"readf",
+"rndblk",
+"samphold",
+"sawtth",
+"sciblk",
+"selblk",
+"sinblk",
+"sqrblk",
+"sum2",
+"sum3",
+"tanblk",
+"tcslti",
+"tcsltj",
+"timblk",
+"trash",
+"writef",
+"zcross",
 ];
 
 BLOCKS_CPP = [
-"affich2", ..
+"affich2",
 ];
 
 //
@@ -403,24 +403,24 @@ BLOCKS_CPP = [
 
 // binary case or source case
 if getos() <> "Windows" then
-  LIB = SCI + "/../../lib/scilab/libsciscicos_blocks" + getdynlibext();
-  if ~isfile(LIB) then
-    LIB = SCI + "/modules/scicos_blocks/.libs/libsciscicos_blocks" + getdynlibext();
-    if ~isfile(LIB) then pause, end
-  end
-  if execstr("link(LIB, BLOCKS_C, ""c"");", "errcatch") <> 0 then pause, end
-  if execstr("link(LIB, BLOCKS_FORTRAN, ""f"");", "errcatch") <> 0 then pause, end
-  if execstr("link(LIB, BLOCKS_CPP, ""c"");", "errcatch") <> 0 then pause, end
+    LIB = SCI + "/../../lib/scilab/libsciscicos_blocks" + getdynlibext();
+    if ~isfile(LIB) then
+        LIB = SCI + "/modules/scicos_blocks/.libs/libsciscicos_blocks" + getdynlibext();
+        if ~isfile(LIB) then pause, end
+    end
+    if execstr("link(LIB, BLOCKS_C, ""c"");", "errcatch") <> 0 then pause, end
+    if execstr("link(LIB, BLOCKS_FORTRAN, ""f"");", "errcatch") <> 0 then pause, end
+    if execstr("link(LIB, BLOCKS_CPP, ""c"");", "errcatch") <> 0 then pause, end
 
 else
-  LIBCCPP = SCI + "/bin/scicos_blocks" + getdynlibext();
-  LIBFOR = SCI + "/bin/scicos_blocks_f" + getdynlibext();
-  if ~isfile(LIBCCPP) then pause, end
-  if ~isfile(LIBFOR) then pause, end
+    LIBCCPP = SCI + "/bin/scicos_blocks" + getdynlibext();
+    LIBFOR = SCI + "/bin/scicos_blocks_f" + getdynlibext();
+    if ~isfile(LIBCCPP) then pause, end
+    if ~isfile(LIBFOR) then pause, end
 
-  if execstr("link(LIBCCPP, BLOCKS_C, ""c"");", "errcatch") <> 0 then pause, end
-  if execstr("link(LIBCCPP, BLOCKS_CPP, ""c"");", "errcatch") <> 0 then pause, end
-  if execstr("link(LIBFOR, BLOCKS_FORTRAN, ""f"");", "errcatch") <> 0 then pause, end
+    if execstr("link(LIBCCPP, BLOCKS_C, ""c"");", "errcatch") <> 0 then pause, end
+    if execstr("link(LIBCCPP, BLOCKS_CPP, ""c"");", "errcatch") <> 0 then pause, end
+    if execstr("link(LIBFOR, BLOCKS_FORTRAN, ""f"");", "errcatch") <> 0 then pause, end
 end
 
 ulink();
index 49a1b90..e674cee 100644 (file)
@@ -1,10 +1,17 @@
 // =============================================================================
 // Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
+// Copyright (C) 2015 - Scilab Enterprises - Paul Bignier
 // Copyright (C) 2012 - Scilab Enterprises - ClĂ©ment DAVID
 //
 //  This file is distributed under the same license as the Scilab package.
 // =============================================================================
+//
 // <-- XCOS TEST -->
 assert_checktrue(importXcosDiagram(SCI + "/modules/xcos/tests/unit_tests/fromws_c.zcos"));
-V = struct('time', (1:100)', 'values', sin((0:0.1:9.9)'));
+V = struct("time", (1:100)', "values", sin((0:0.1:9.9)'));
+scicos_simulate(scs_m, list());
+assert_checkequal(scs_m.objs(4).gui, "GAINBLK_f");
+scs_m.objs(4).graphics.exprs = "[1 1 1]";
+scs_m.objs(4).model.rpar = [1 1 1];
+V.values = [V.values V.values V.values];
 scicos_simulate(scs_m, list());
index 12a474e..a3c5b40 100644 (file)
@@ -4,30 +4,31 @@
 //
 //  This file is distributed under the same license as the Scilab package.
 // =============================================================================
+//
 // <-- XCOS TEST -->
 //
 // Test Diagram with fromws after end behavior
 // Input random values
 //
-assert_checktrue(importXcosDiagram(SCI + "/modules/xcos/tests/unit_tests/fromws_tows_c.zcos"));
+assert_checktrue(importXcosDiagram(SCI+"/modules/xcos/tests/unit_tests/fromws_tows_c.zcos"));
 // V_in size feat simulation final time and asked values
-V_in = struct('time', (0:0.5:5000)', 'values', rand(10001, 1));
+V_in = struct("time", (0:0.5:5000)', "values", rand(10001, 1));
 scicos_simulate(scs_m, list());
-assert_checkequal(V_in.time, V_out_zero.time);
+assert_checkequal(V_in.time,   V_out_zero.time);
 assert_checkequal(V_in.values, V_out_zero.values);
-assert_checkequal(V_in.time, V_out_hold.time);
+assert_checkequal(V_in.time,   V_out_hold.time);
 assert_checkequal(V_in.values, V_out_hold.values);
-assert_checkequal(V_in.time, V_out_repeat.time);
+assert_checkequal(V_in.time,   V_out_repeat.time);
 assert_checkequal(V_in.values, V_out_repeat.values);
 // V_in is shorter than simulation time
-V_in = struct('time', (0:0.5:1000)', 'values', rand(2001, 1));
+V_in = struct("time", (0:0.5:1000)', "values", rand(2001, 1));
 scicos_simulate(scs_m, list());
-assert_checkequal(V_in.time, V_out_zero.time(1:2001));
+assert_checkequal(V_in.time,   V_out_zero.time(1:2001));
 assert_checkequal(V_in.values, V_out_zero.values(1:2001));
 assert_checkequal(V_out_zero.values(2002:10001), zeros(10001 - 2002 + 1, 1));
-assert_checkequal(V_in.time, V_out_hold.time(1:2001));
+assert_checkequal(V_in.time,   V_out_hold.time(1:2001));
 assert_checkequal(V_in.values, V_out_hold.values(1:2001));
-assert_checkequal(V_out_hold.values(2002:10001), ones(10001 - 2002 + 1, 1) .* V_in.values($));
-assert_checkequal(V_in.time, V_out_repeat.time(1:2001));
+assert_checkequal(V_out_hold.values(2002:10001), ones(10001 - 2002 + 1, 1).*V_in.values($));
+assert_checkequal(V_in.time,   V_out_repeat.time(1:2001));
 assert_checkequal(V_in.values, V_out_repeat.values(1:2001));
 //assert_checkequal(V_in.values, V_out_repeat.values(2002:4002));
index f7cf730..0a9c1e7 100644 (file)
@@ -14,16 +14,14 @@ endfunction
 // Register function
 post_xcos_simulate = list("disp_post_simulate");
 xcos_simulate(scs_m, 4);
- Calling disp_post_simulate   
+ Calling disp_post_simulate
 assert_checktrue(isdef('cumsum_r'));
 clear('cumsum_r');
 // Register function
 clear post_xcos_simulate
 post_xcos_simulate = disp_post_simulate;
 xcos_simulate(scs_m, 4);
- Calling disp_post_simulate   
+ Calling disp_post_simulate
 assert_checktrue(isdef('cumsum_r'));
 function analyze_post_simulate(%cpr, scs_m, needcompile)
 // Retrieve all objects
@@ -54,26 +52,18 @@ clear('cumsum_r');
 clear post_xcos_simulate
 post_xcos_simulate = list("analyze_post_simulate");
 xcos_simulate(scs_m, 4);
- Diagram Analysis:   
- Found 24 Blocks.   
- Found 22 Links.   
- Found 0 Other component.   
+ Diagram Analysis:
+ Found 24 Blocks.
+ Found 22 Links.
+ Found 0 Other component.
 assert_checktrue(isdef('cumsum_r'));
 clear('cumsum_r');
 // Register function
 clear post_xcos_simulate
 post_xcos_simulate = analyze_post_simulate;
 xcos_simulate(scs_m, 4);
- Diagram Analysis:   
- Found 24 Blocks.   
- Found 22 Links.   
- Found 0 Other component.   
+ Diagram Analysis:
+ Found 24 Blocks.
+ Found 22 Links.
+ Found 0 Other component.
 assert_checktrue(isdef('cumsum_r'));