merge with master (build windows)
Allan CORNET [Mon, 1 Feb 2010 14:18:32 +0000 (15:18 +0100)]
123 files changed:
1  2 
scilab/CHANGES_5.2.X
scilab/modules/core/includes/version.h
scilab/modules/dynamic_link/macros/ilib_compile.sci
scilab/modules/dynamic_link/macros/ilib_for_link.sci
scilab/modules/graphics/macros/%h_load.sci
scilab/modules/scicos/Makefile.in
scilab/modules/scicos/demos/Electrical/boost_conv.dem.sce
scilab/modules/scicos/demos/Electrical/bridge_rectifier.dem.sce
scilab/modules/scicos/demos/ModelicaBlocks/Transmission_Line.cosf
scilab/modules/scicos/demos/ModelicaBlocks/ball_platform.dem.sce
scilab/modules/scicos/demos/ModelicaBlocks/modelica_bouncing_ball.dem.sce
scilab/modules/scicos/demos/PENDULUM_ANIM.sci
scilab/modules/scicos/demos/bounce.dem.sce
scilab/modules/scicos/demos/bouncing_ball.dem.sce
scilab/modules/scicos/demos/cont_sys_disc_cont.dem.sce
scilab/modules/scicos/demos/demo_flipflop.dem.sce
scilab/modules/scicos/demos/demo_watertank.dem.sce
scilab/modules/scicos/demos/fibonacci.dem.sce
scilab/modules/scicos/demos/goto_demo.dem.sce
scilab/modules/scicos/demos/goto_from.dem.sce
scilab/modules/scicos/demos/if_scicos_block.dem.sce
scilab/modules/scicos/demos/inv_pend_anim.dem.sce
scilab/modules/scicos/demos/inverted_pend.dem.sce
scilab/modules/scicos/demos/kalman.dem.sce
scilab/modules/scicos/demos/simple_demo.dem.sce
scilab/modules/scicos/demos/table_lookup.dem.sce
scilab/modules/scicos/demos/temp_controller.dem.sce
scilab/modules/scicos/demos/zero_crossing.dem.sce
scilab/modules/scicos/etc/scicos.start
scilab/modules/scicos/help/en_US/palettes/matrix_pal/RICC.xml
scilab/modules/scicos/help/en_US/programming_scicos_blocks/c_computational_functions/C_struct.xml
scilab/modules/scicos/help/fr_FR/programming_scicos_blocks/c_computational_functions/C_struct.xml
scilab/modules/scicos/help/scicos_doc/man/eng/data_revB/data_desc.xml
scilab/modules/scicos/help/scicos_doc/man/fr/data_revB/data_desc.xml
scilab/modules/scicos/macros/scicos_auto/lincos.sci
scilab/modules/scicos/macros/scicos_auto/scicos.sci
scilab/modules/scicos/macros/scicos_menus/XcosMenuSaveAsInterfFunc.sci
scilab/modules/scicos/macros/scicos_scicos/FindSBParams.sci
scilab/modules/scicos/macros/scicos_scicos/c_pass2.sci
scilab/modules/scicos/macros/scicos_scicos/do_addnew.sci
scilab/modules/scicos/macros/scicos_scicos/do_compile_superblock42.sci
scilab/modules/scicos/macros/scicos_scicos/do_doc.sci
scilab/modules/scicos/macros/scicos_scicos/do_grid.sci
scilab/modules/scicos/macros/scicos_scicos/do_ident.sci
scilab/modules/scicos/macros/scicos_scicos/do_label.sci
scilab/modules/scicos/macros/scicos_scicos/do_options.sci
scilab/modules/scicos/macros/scicos_scicos/do_palettes.sci
scilab/modules/scicos/macros/scicos_scicos/do_rename.sci
scilab/modules/scicos/macros/scicos_scicos/do_resize.sci
scilab/modules/scicos/macros/scicos_scicos/do_saveblockgui.sci
scilab/modules/scicos/macros/scicos_scicos/do_setup.sci
scilab/modules/scicos/macros/scicos_scicos/get_dynamic_lib_dir.sci
scilab/modules/scicos/macros/scicos_scicos/hilite_obj.sci
scilab/modules/scicos/macros/scicos_scicos/translator.sci
scilab/modules/scicos/macros/scicos_scicos/unhilite_obj.sci
scilab/modules/scicos/macros/scicos_utils/with_modelica_compiler.sci
scilab/modules/scicos/scicos.iss
scilab/modules/scicos/src/c/Scicos_blocks_f_Import.def
scilab/modules/scicos/src/c/noscicos/noscicos.vcproj
scilab/modules/scicos/src/c/scicos.c
scilab/modules/scicos/src/scicos_sundials/scicos_sundials.vcproj
scilab/modules/scicos/tests/unit_tests/PENDULUM_ANIM.sci
scilab/modules/scicos/tests/unit_tests/lincos.dia.ref
scilab/modules/scicos/tests/unit_tests/steadycos.dia.ref
scilab/modules/scicos_blocks/Makefile.am
scilab/modules/scicos_blocks/Makefile.in
scilab/modules/scicos_blocks/includes/scicos_block.h
scilab/modules/scicos_blocks/macros/Branching/CLKGotoTagVisibility.sci
scilab/modules/scicos_blocks/macros/Branching/DEMUX.sci
scilab/modules/scicos_blocks/macros/Branching/GotoTagVisibility.sci
scilab/modules/scicos_blocks/macros/Branching/GotoTagVisibilityMO.sci
scilab/modules/scicos_blocks/macros/Branching/MUX.sci
scilab/modules/scicos_blocks/macros/Branching/M_SWITCH.sci
scilab/modules/scicos_blocks/macros/Branching/SELECT_m.sci
scilab/modules/scicos_blocks/macros/Branching/SWITCH2_m.sci
scilab/modules/scicos_blocks/macros/Electrical/Capacitor.sci
scilab/modules/scicos_blocks/macros/Electrical/Inductor.sci
scilab/modules/scicos_blocks/macros/Electrical/OpAmp.sci
scilab/modules/scicos_blocks/macros/Electrical/Resistor.sci
scilab/modules/scicos_blocks/macros/Events/IFTHEL_f.sci
scilab/modules/scicos_blocks/macros/Events/M_freq.sci
scilab/modules/scicos_blocks/macros/Hydraulics/Flowmeter.sci
scilab/modules/scicos_blocks/macros/Hydraulics/VanneReglante.sci
scilab/modules/scicos_blocks/macros/IntegerOp/JKFLIPFLOP.sci
scilab/modules/scicos_blocks/macros/IntegerOp/SRFLIPFLOP.sci
scilab/modules/scicos_blocks/macros/Linear/DIFF_c.sci
scilab/modules/scicos_blocks/macros/Linear/GAINBLK.sci
scilab/modules/scicos_blocks/macros/Linear/INTEGRAL_m.sci
scilab/modules/scicos_blocks/macros/Linear/PID.sci
scilab/modules/scicos_blocks/macros/MatrixOp/MATCATH.sci
scilab/modules/scicos_blocks/macros/MatrixOp/MATCATV.sci
scilab/modules/scicos_blocks/macros/MatrixOp/MATMUL.sci
scilab/modules/scicos_blocks/macros/Misc/CBLOCK.sci
scilab/modules/scicos_blocks/macros/Misc/CBLOCK4.sci
scilab/modules/scicos_blocks/macros/Misc/CONSTRAINT2_c.sci
scilab/modules/scicos_blocks/macros/Misc/CONSTRAINT_c.sci
scilab/modules/scicos_blocks/macros/Misc/DIFF_f.sci
scilab/modules/scicos_blocks/macros/Misc/DSUPER.sci
scilab/modules/scicos_blocks/macros/Misc/EXPRESSION.sci
scilab/modules/scicos_blocks/macros/Misc/MPBLOCK.sci
scilab/modules/scicos_blocks/macros/Misc/PENDULUM_ANIM.sci
scilab/modules/scicos_blocks/macros/Misc/RELATIONALOP.sci
scilab/modules/scicos_blocks/macros/Misc/TEXT_f.sci
scilab/modules/scicos_blocks/macros/NonLinear/LOOKUP2D.sci
scilab/modules/scicos_blocks/macros/NonLinear/LOOKUP_c.sci
scilab/modules/scicos_blocks/macros/NonLinear/PRODUCT.sci
scilab/modules/scicos_blocks/macros/PDE/PDE.sci
scilab/modules/scicos_blocks/macros/Sinks/TOWS_c.sci
scilab/modules/scicos_blocks/macros/Sources/Counter.sci
scilab/modules/scicos_blocks/macros/Sources/FROMWS_c.sci
scilab/modules/scicos_blocks/macros/Sources/GENSIN_f.sci
scilab/modules/scicos_blocks/macros/Sources/GEN_SQR.sci
scilab/modules/scicos_blocks/macros/Sources/PULSE_SC.sci
scilab/modules/scicos_blocks/macros/Sources/SLIDER_f.sci
scilab/modules/scicos_blocks/macros/Sources/STEP.sci
scilab/modules/scicos_blocks/scicos_blocks.iss
scilab/modules/scicos_blocks/src/c/affich.c
scilab/modules/scicos_blocks/src/c/cscope.c
scilab/modules/scicos_blocks/src/c/fromws_c.c
scilab/modules/scicos_blocks/src/c/scicos_blocks.vcproj
scilab/modules/scicos_blocks/src/c/scoWindowScope.c
scilab/modules/scicos_blocks/src/cpp/affich2.cpp
scilab/modules/xcos/tests/unit_tests/PENDULUM_ANIM.sci

++
 +Scicos:
 +=======
 +* bug 4156 fixed - scicos defines some temp. variables on stack without remove.
 +
- * bug 4705 fixed - scicos used a non existing file BEpsf
-                
-                Changes between version 5.1.X and 5.2.0 of Scilab
-                =================================================
++* bug 4705 fixed - scicos used a non existing file BEpsf
++
++               
+                 Changes between version 5.2.0 and 5.2.1 of Scilab
+                 =================================================
+ Text editor:
+ ============
+ * bug 5649 fixed - The Editor did not undo properly after a find/replace.
+ * bug 5651 fixed - closing find/replace box, remove highlights.
+ * bug 5707 fixed - cmd-e executed the wrong editor file.
+ Internationalization:
+ =====================
+ * Ukrainian localization added (Thanks Yuri Chornoivan)
+ * Many english typos have been fixed (Thanks Yuri Chornoivan)
+ Xcos:
+ =====
+ * The XML header of an xcos file is now checked before any other parsing.
+ * Superblock masks can now be used and a new window is created when user wants 
+   to configure the variable settings.
+ * Some performance improvements under Linux
+ * A rework to pass checkstyle metrics on the code has been started.
+ * Update to jgraphx version 1.2.0.7 has been performed.
+ * Refactoring:
+     - The port position algorithm has been reworked to take in account default
+        position and calculate placement according to it's default associated
+        side.
+     - The communication with the scilab interpreter is now easier to use and can
+       be synchronous or asynchronous (with callback).
+     - The simulation function identifier is now mapped to an enum to better 
+       follow java semantics.
+     - Blocks instanciations are performed through a Factory and reference
+       instances are shared.
+     - Java package (eg namespace) has been added to reduce the number of classes
+       per package and improve readability.
+     - org.scilab.modules.graph is independent from Xcos and can be safely used.
+ * bug 4206 fixed - The CreateMask action didn't generate a valid submatrix.
+ * bug 5165 fixed - The CreateMask/RemoveMask/CustomizeMask actions
+                    were not available.
+ * bug 5285 fixed - Scicos couldn't simulate modelica diagrams while it's 
+                    filename contains space.
+ * bug 5434 fixed - On the loading of Scicos files (cos and cosf files), some 
+                    blocks were not updated to the lastest Xcos/Scicos version.
+ * bug 5508 fixed - When loading a xcos project, hdf5 files used to be stored
+                    into /tmp/ instead of TMPDIR
+ * bug 5595 fixed - On the susp demo, DSUPER blocks were not SuperBlocks.
+ * bug 5625 fixed - The Ground block port position was not right.
+ * bug 5626 fixed - The VoltageSensor port positions were not right.
+ * bug 5627 fixed - It was not possible to place a port in a non-conventionnal
+                    side.
+ * bug 5660 fixed - An scicos block with negative simulation function type was 
+                    not working (espacially the ESELECT_f block).
+ * bug 5666 fixed - The CLKGOTO block wasn't valid anymore after setting
+                    its parameters.
+ * bug 5667 fixed - Simulation starts faster on Linux for huge diagram 
+                    (hdf5 export issue).
+ * bug 5683 fixed - Xcos code updated to work with jgraphx >= 1.2.0.X
+ * bug 5674 fixed - The Signal.notify didn't check is we are waiting for it
+                    (thus the next wait will block).
+ * bug 5701 fixed - The "AFFICH_m" block didn't simulate anymore.
+ * bug 6386 fixed - The Quit operation didn't work on SuperBlockDiagrams
+                    properly.
+ * bug 6414 fixed - Old Xcos diagrams without rotation fields didn't load.
+ * bug 6415 fixed - The SAWTOOTH_f block didn't allow parameters.
+ * bug 6463 fixed - The jgraphx library has been updated to 1.2.0.7.
+ * bug 6474 fixed - demo_watertank.xcoscrashed when any block parameter dialog 
+                    was closed the second time.
+ * bug 6490 fixed - The multiple-point link didn't work accordingly to the 
+                    zoom level.
+ Atoms:
+ ======
+ * atomsSetConfig("offLine","True"/"False") automatically calls atomsSystemUpdate()
+   if its value has changed.
+ * bug 6383 fixed - A message displayed by atomsRemove() (when the module to
+                    remove is loaded) wasn't correct.
+ * bug 6389 fixed - Atoms GUI : "Update" button just removed the selected module
+                    but didn't update it.
+                    
+ * bug 6518 fixed - atomsRepositoryAdd() didn't accept local repositories.
+ Compilation:
+ ============
+ * Under GNU/Linux, Mac OS X & Unix, a m4 macro called 
+   AC_JAVA_CHECK_VERSION_PACKAGE has been added to check the version of Java
+   packages used
+ * Check of the version of jgraphx added (Min: 1.2.0.7)
+ * Improved detection of Fedora/Redhat packages
+ * Better detection of JOGL
+ * When searching for Java packages files (jar), the oldest version was 
+   selected. Now, lastest version are now selected.
+ * bug 5503 fixed - add /usr/lib/*/ and /usr/lib64/*/ in the search path when
+                    looking for Java libraries (Fedora 12 for example)
+ * bug 5665 fixed - Under Linux, hdf5 module can now be compiled without Java
+ * bug 6453 fixed - ImplicitPointerConversions was triggered by some Debian/
+                    Ubuntu check tools
+ Scilab extensions:
+ ==================
+ * call_scilab: Complex examples have not been updated to use the new API Scilab.
+ * API_Scilab: a presentation page of the feature have been added.
+ Bug fixes:
+ ==========
+ * bug 4543 fixed - Waitbar command seemed not to work properly with message
+                    define by a string.
+ * bug 4979 fixed - Use unzoom on an empty figure resulted to a warning message.
+ * bug 5035 fixed - Demos --> tcl/tk --> Scroll Information printed on terminal
+                    was not displayed on Windows.
+ * bug 5140 fixed - 'Load into Scilab' did not work as expected.
+ * bug 5362 fixed - help type pointed to "Type" online help
+ * bug 5413 fixed - help_from_sci was replacing the < > in the examples by
+                    &gt; and &lt; causing issues in the build of documentation.
+ * bug 5436 fixed - The export to svg does not work with bar graphs.
+ * bug 5513 fixed - 'input' failed after Ctrl+C was typed.
+ * bug 5659 fixed - emptystr changed the value of an input variable.
+ * bug 5664 fixed - Demo Simulation > Wheel simulation > Simulation with ode failed.
+ * bug 5668 fixed - When using Scilab graphic with a LaTeX expression, the
+                    message
+                    "Jlatexmath: Could not access to createFont. Please update to
+                    java 6" was displayed
+ * bug 5669 fixed - fminsearch: optimsimplex_new has been improved for "randbounds"
+ * bug 5673 fixed - Under Linux, dependency on GLIBC_2.7 removed
+ * bug 5679 fixed - Latex texts were not displayed (replaced by a black box) if
+                    you use scilab in a terminal service session on Windows.
+ * bug 5687 fixed - When setting "figure_name" the window title was not set until
+                    the window is "touched" with the mouse.
+ * bug 5688 fixed - The xrpoly macro's rotation direction was inconsistent with
+                    that of xarc and related functions.
+ * bug 5691 fixed - PDF/EPS exports with LaTeX/MathML failed.
+ * bug 5695 fixed - 'uigetfile' failed when we used 'multiple selection'.
+ * bug 5696 semi/fixed - There was a lack of feedback when SELinux was 
+                    preventing Scilab to start under Fedora 12.
+                    
+ * bug 5699 fixed - FreePtr() is declared as a macro but it was not 
+                    exported on Windows.
+ * bug 5700 fixed - Compilation under RHE4 was failing on the includes of
+                    term.h and termcap.h.
+ * bug 5702 fixed - Calling legend disabled any previous call to drawlater.
+ * bug 5716 fixed - Some links in the documentation about hypermatrices were 
+                    missing.
+ * bug 5722 fixed - tand returns an error when called with ieee(0) mode
+ * bug 6387 fixed - 'dos' failed to execute very long command line and 
+                    returns an msg error : line too long
+                    
+ * bug 6388 fixed - javasci: methods getNumberOfColsFromScilab and 
+                    getNumberOfRowsFromScilab (SciAbstractArray) 
+                    returned a error message on stderr previously 
+                    (5.1) there was no message.
+ * bug 6399 fixed - m2sci failed and returs error 240.
+ * bug 6400 fixed - Msecs was not correctly handled in datevec/datenum functions
+ * bug 6420 fixed - It was not possible to use ax.x_ticks with LaTex commands.
+ * bug 6437 fixed - fileext('plop') crashed Scilab on linux.
+ * bug 6441 fixed - Callback of uimenus with option "Checked" is now executed 
+                    when the menu is clicked.
+ * bug 6456 fixed - SCI & SCIHOME added in getdebuginfo list
+ * bug 6461 fixed - Scilab External function executed by scifunction may make
+                    Scilab crash when they produce an error.
+ * bug 6488 fixed - the API function 'createMatrixOfUnsignedInteger32' creates good Scilab type variable.
+ * bug 6489 fixed - removed a wrong dependency on 'WININET.dll' (Windows).
+ * bug 6491 fixed - libinter.h was not installed under Linux (SEP #35 updated)
+ * bug 6521 fixed - 'getmd5' crashed with a wrong second input argument.
+                Changes between version 5.2.0-beta1 and 5.2.0 of Scilab
+                ==========================================================
+ Text editor:
+ ============
+ * Mnemonic added on View ("V") and Document ("D") in the menu bar
+ * Refactoring of some large part of the source code
+ * Thanks to right button click, a popup menu displays the following features:
+ - Execute in Scilab
+ - Edit selection into a new text editor
+ - Copy
+ - Select all
+ - History
+ - Help on the selected text
+ See bug #5387
+ * bug 4873 fixed - "undo" did not work if the last action affected several lines
+ * bug 4883 fixed - "Menu->Document->Auto Indent" preference was not saved
+ * bug 4886 fixed - Performance enhancements for colorization
+   (notable speed-up on opening large scripts)
+ * bug 5013 fixed - Find/Replace dialog box: Buttons were resized after the search
+ * bug 5103 fixed - File=>Save now opens the "Save" dialog box for
+                    Untitled files even if they are not modified
+ * bug 5125 fixed - An infinite loop is no more got when using the
+                    Undo functionnality
+ * bug 5137 fixed - Drag & drop on editor was not enabled
+ * bug 5140 fixed - "Load into Scilab" was executed line by line
+ * bug 5171 fixed - Problem with the highlight in the undo manager
+ * bug 5173 fixed - Better multi-thread correctness wrt Event Dispatching
+   Thread
+ * bug 5174 fixed - The undo did not work on tab
+ * bug 5189 fixed - No more error when a file selection
+                    for saving is cancelled
+ * bug 5219 fixed - Rename of the item menu "Indent" => "Reformat Selection"
+ * bug 5220 fixed - In editor, "Colorize" action in "Document" menu is now
+                    implemented as check box
+ * bug 5224 fixed - Maj+Tab modified the text selection
+ * bug 5270 fixed - In editor, shortcut for the line numbering (CTRL+L) changed
+                    and assigned to "Load into Scilab" in order to match the old
+                    behavior
+ * bug 5290 fixed - Function editorHighlightLine removed, and editor updated in order
+                    to have in argument files to open and lines to be highlighted
+                    for each files
+ * bug 5308 fixed - Editor did not check input argument type
+ * bug 5317 fixed - Inserting a tab inside a line tabified the whole line instead
+                    of only its queue
+ * bug 5318 fixed - When a "if" line took its "end" on the line, its indentation
+                    was one level too high
+ * bug 5319 fixed - Default filename proposed in 'Save As' dialog
+ * bug 5341 fixed - "Save All" functionality was missing
+ * bug 5386 fixed - Wrong title for auto indent action in menu
+ * bug 5460 fixed - 'Close All' and 'Close all but this' added menus in editor
+ * bug 5465 fixed - Better Undo/Redo support (works across "Save"/ "Save as..",
+                    undo / redo multiple edits on a region in one go)
+ * bug 5482 fixed - It was not possible to choose EOL type
+ * bug 5497 fixed - Selection drag was not available
+ * bug 5515 fixed - Encoding was not well managed
+                    Now:
+                    - default encoding is the system default one
+                    - user defined encoding save in Editor configuration file
+ * bug 5519 fixed - Message asking the user if he wants to exit the
+                    editor when he clicks on the cross added
+ Help Browser:
+ =============
+ * Thanks to right button click, a popup menu displays the following features:
+ - Execute in Scilab
+ - Edit in the text editor
+ - Copy
+ - Select all
+ - History
+ - Help on the selected text
+ * In the console and the text editor, in the menu associated to the right button
+ click, the item "Help on the selected text" has been added.
+ Text Rendering:
+ ===============
+ * New function "prettyprint" added
+   This function provides the capability to represent a Scilab variable to LaTeX,
+   TeX and Mathml.
+   See SEP #36 for more information
+ * pol2tex is now obsolete. Please use prettyprint instead
+ * texprint is now obsolete. Please use prettyprint instead
+ * bug 5303 fixed - pol2tex() could not be used straightforwardly with the new
+                    "$...$" LaTeX feature.
+ * bug 5304 fixed - texprint() could not be used with the new "$...$" LaTeX
+                    feature.
+ ATOMS:
+ ======
+ * An "offline" mode has been added. This mode allows the user to install modules
+   from a local repository or a local package even if the network is unreachable :
+   --> atomsSetConfig('offLine','True');
+   --> atomsInstall("/home/johnsmith/module_lycee_1.1.bin.i686.linux.tar.gz");
+ Graphic Export:
+ ===============
+ Refactoring of the graphic export for vectorial files (PDF, EPS, PS & SVG)
+ through FOP/Batik:
+ * Improved quality of the vectorial export
+ * Improved size of the PDF (PS & EPS are however bigger but this should be
+   fixed in Scilab > 5.2.0)
+ * Handles export of graphics with LaTeX/MathML text
+ * bug 4200 fixed - Export PDF was causing a "bad /BBox" with Acrobat
+ Localization:
+ =============
+ * Some strings were untranslatable/untranslated (Bug #4124)
+ * Some typos fixed
+ Documentation Improvements:
+ ===========================
+ * More examples with LaTeX use-cases (colors, etc)
+ Compilation:
+ ============
+ * Rebuild some C++/Java wrappers with a newest version of SWIG
+ * In some cases under Windows, the detection of libjogl.* could fail
+   because of a missing explicit link against libGL.*
+ Xcos:
+ =====
+ * Icon added in the main Scilab tool bar
+ * bug 4997 fixed - Now Scilab editor and Xcos ask to save unsaved documents
+                    when user closes Scilab
+ * bug 5026 fixed - Now palette browser appears only with a new diagram or by the
+                    menu View->Palette browser
+ * bug 5052 fixed - The context variables defined at an upper level were not known
+                    at a lower one
+ * bug 5053 fixed - Layout of in/out port of a block when modified, updated
+ * bug 5054 fixed - Remove ports on a block remove the connected links
+ * bug 5083 fixed - If lines are selected and user call the "Find/replace" dialog
+                    box, the radiobox "Selected lines" in the frame "Scope" is
+                    checked by default
+ * bug 5099 fixed - Diagram was not visible after a "Fit diagram to view"
+ * bug 5104 fixed - The block view was not updated on undo/redo
+ * bug 5111 fixed - "Save As" default path was not the current file path
+ * bug 5158 fixed - Region to SuperBlock now keeps links breaks inside and outside
+                    SuperBlock
+ * bug 5159 fixed - The region to superblock action could not be undone/redone
+ * bug 5167 fixed - xcos*.h5 and xcos*.h5 were not deleted
+ * bug 5179 fixed - The accented letters used in text in Scicos diagram were not
+                    visible with Xcos at least under Linux
+ * bug 5180 fixed - TEXT_f was not selectable on the palette
+ * bug 5182 fixed - In some cases, the main diagram dialog no more responded
+                    neither to the "validate" nor "cancel" menu
+ * bug 5183 fixed - Simulation menu was not disabled on a superblock diagram
+ * bug 5184 fixed - Setup menu values were not localized
+ * bug 5188 fixed - A function to reopen a parent diagram was added in the pop up
+                    menu of the diagram
+ * bug 5196 fixed - Opening a SuperBlock modified some positions
+ * bug 5202 fixed - The description of a module is now scrollable
+ * bug 5209 fixed - Bad French translation for "Optimisation and Simulation"
+ * bug 5218 fixed - Uicontrols of style 'text' are now scrollable
+ * bug 5221 fixed - libhdf5 is defined with the GLIBC_2.7 as mandatory
+ * bug 5235 fixed - Error message added when launching Scicos
+ * bug 5267 fixed - Scilab exited when closing Xcos setup window using the upper
+                    right cross
+ * bug 5281 fixed - The menu "View->"Palette Browser" is correctly checked at Xcos
+                    start
+ * bug 5299 fixed - When saving a Xcos diagram, when the selected file was
+                    already existing and did not contain the .xcos extension
+                    (~/foo), the 'Replace file' dialog appeared but did not
+                    overwrite the file
+ * bug 5301 fixed - When a superblock was created with the region to superblock,
+                    selected internal links were not included into the
+                    superblocks but were also not considered as IN_f OUT_F
+ * bug 5305 fixed - Display of filenames used by Xcos was wrong (under Windows)
+ * bug 5310 fixed - Closing a Xcos diagram closed all of Xcos
+ * bug 5312 fixed - 'Compile' information was not displayed
+ * bug 5313 fixed - Clicking repeatedly and quickly on a block in a diagram
+                    made Scilab quit
+ * bug 5327 fixed - When indenting a block, the selection area was shifted one
+                    line down with respect to the previously selected one
+ * bug 5328 fixed - The RegionToSuperblock action produced a poorly rendered
+                    diagram
+ * bug 5336 fixed - Xcos palette tabs now load much faster and use less
+                    memory
+ * bug 5343 fixed - The DLSS_f block was transparent when dropped in the working area
+ * bug 5344 fixed - Status of a modified file did not change on 'Save As'
+ * bug 5347 fixed - The 'Region to superblock' action crashed Xcos
+ * bug 5348 fixed - Opening a Superblock crashed Xcos
+ * bug 5349 fixed - The file predator.cos could not be opened
+ * bug 5351 fixed - Remove ports on a block remove the connected links
+ * bug 5353 fixed - Bad French localization for "set context"
+ * bug 5383 fixed - FROMWSB from workspace block was not working
+ * bug 5388 fixed - Editor dialogs was not centered on editor main window
+ * bug 5389 fixed - If there was no C compiler detected on Windows, Xcos
+                    tried to call dynamic link functions
+ * bug 5395 fixed - The Xcos block AFFICH_m did not bother with the max
+                    number of digits
+ * bug 5397 fixed - If there was a unconnected block in a superblock, the
+                    simulation did not start and the "Simulate/start" menu
+                    remained disabled
+ * bug 5403 fixed - A graphic window is created only when needed
+ * bug 5404 fixed - Open & close Editor created a java exception
+ * bug 5405 fixed - The whole diagram is now updated when a superblock
+                    is modified
+ * bug 5407 fixed - It was impossible to use the arrow keys to move a block
+ * bug 5410 fixed - Html4.0 specific symbols were used
+ * bug 5412 fixed - Context modifications were not saved for Superblocks
+ * bug 5416 fixed - Blocks modifications were not saved for Superblocks
+ * bug 5417 fixed - AUTOMAT and PDE blocks were in demo blocks
+ * bug 5418 fixed - DEBUG_SCICOS block was not in the palette
+ * bug 5419 fixed - French translation issues
+ * bug 5422 fixed - A file was not a unique diagram instance (opened twice)
+ * bug 5423 fixed - French translation issues
+ * bug 5424 fixed - French translation issues
+ * bug 5426 fixed - The icon of modelica blocks Resistor Inductor was not
+                    rotating while the block was
+ * bug 5428 fixed - Connecting Implicit I/O port to Link was not allowed
+ * bug 5437 fixed - Show error message during Xcos simulation initialization
+ * bug 5440 fixed - OUT* blocks were not in the sinks palette
+ * bug 5441 fixed - Xcos files (XML files) contained their own paths
+ * bug 5442 fixed - Undo a Mirror Action did not work as expected
+ * bug 5444 fixed - When the Xcos compiler failed to find the size of the data
+                    on some links it asked user for it into a bad window
+ * bug 5445 fixed - The modified state was not updated on undo/redo
+ * bug 5449 fixed - The palette tab position was modified even if invisible
+ * bug 5450 fixed - The Signal Builder demos did not work
+                    (xcos/demos/Signal_Builder.xcos does not exist)
+ * bug 5459 fixed - Editor "block" Scilab with example
+ * bug 5464 fixed - Actions were not disabled on file loading
+ * bug 5474 fixed - The demo Standard demos --> Scilab block was not working
+ * bug 5475 fixed - drag & drop .xcos file on console did not open Xcos diagram
+ * bug 5480 fixed - When creating a Superblock, input and output links were removed
+                    and input and output ports were not created
+ * bug 5528 fixed - ENDBLK and ENC_c blocks (Sinks palette) did not have icons
+ * bug 5529 fixed - The parent diagram was not updated when performing undo/redo
+                    on a SuperBlockDiagram
+ * bug 5530 fixed - IN_f, OUT_f and similars blocks did not accept expression as
+                    parameter
+ * bug 5531 fixed - Setup values were not strongly typed (use of spinner)
+ * bug 5533 fixed - SetupAction did not valid inputs
+ * bug 5592 fixed - The Xcos startup operations were performed on the Scilab
+                    execution thread
+ * bug 5594 fixed - The links did not move on arrow key typing
+ * bug 5598 fixed - The CLKOUT_f block was not an EventOutBlock
+ * bug 5634 fixed - The export functionnality did not work.
+ Tree functions :
+ ================
+ * Rename tree functions:
+   - insertNode      => uiInsertNode
+   - getParentNode   => uiGetParentNode
+   - getNodePosition => uiGetNodePosition
+   - getChildrenNode => uiGetChildrenNode
+   - findNode        => uiFindNode
+   - equalsTree      => uiEqualsTree
+   - dumpTree        => uiDumpTree
+   - deleteNode      => uiDeleteNode
+   - createTree      => uiCreateTree
+   - createNode      => uiCreateNode
+   - concatTree      => uiConcatTree
+   - displaytree     => uiDisplayTree
+ * bug 5170 fixed - displaytree() name was not homogeneous with other
+                    tree functions.
+ Bug fixes:
+ ==========
+ * bug 2588 fixed - Calling a function with no input argument contained in an
+                    mlist generated an error
+ * bug 3200 fixed - The add_help_chapter function returned a boolean
+ * bug 3478 fixed - file function returned a wrong error message when file did
+                    not exist
+ * bug 3593 fixed - Macros to read and write csv file format updated
+ * bug 3675 fixed - Issues when saving/loading gui (uicontrols,figure...) fixed
+ * bug 3849 fixed - Path selected for graphics export is now memorized and used
+                    as default for next export file selection
+ * bug 4401 fixed - isnum returned wrong values
+ * bug 4435 fixed - bench_run is now documented
+ * bug 4565 fixed - getvalue macro was defined twice
+ * bug 4670 fixed - ilib_build examples updated with api_scilab
+ * bug 4767 fixed - Typo in minreal was causing errors in some cases
+ * bug 4844 fixed - The help page for the deletefile function did not specify
+                    what was the meaning of the output variable
+ * bug 5025 fixed - The Tabbed palette manager became a Tree palette
+                    manager
+ * bug 5037 fixed - The link style menu did not have mnemonics
+ * bug 5077 fixed - demo neldermead/output Command failed under Windows (Release)
+ * bug 5106 fixed - mopen help page did not contain any example
+ * bug 5107 fixed - mgetstr help page did not contain any example
+ * bug 5163 fixed - Incorrectly resized text after having performed
+                    magnification+demagnification
+ * bug 5190 fixed - Context menus are now available under MacOS
+ * bug 5195 fixed - "get" crashed with "Lycee" module
+ * bug 5200 fixed - Adding a code generation error message when not applicable
+ * bug 5211 fixed - A non reg test was failing with the binary of Scilab
+ * bug 5213 fixed - ATOMS GUI: Module's author(s) was not displayed
+ * bug 5214 fixed - ATOMS GUI: The download size was not displayed
+ * bug 5233 fixed - The Windows installer bugged in some cases
+ * bug 5237 fixed - ATOMS: The load of an ATOMS module could produce an error.
+                    The error is now catched.
+ * bug 5249 fixed - Using the help or apropos functions, some words (stop word)
+                    were not taken into account during the search
+ * bug 5251 fixed - getversion help page updated
+ * bug 5258 fixed - diary help page had some erroneous timestamp prefix formats
+ * bug 5259 fixed - root_properties help page displayed mis-encoded characters
+ * bug 5263 fixed - diary returned incorrect path for automatically numbered
+                    filenames
+ * bug 5266 fixed - Modelica demos made available in MacOS binary version
+ * bug 5271 fixed - ATOMS GUI: Frames title was not emphasized
+ * bug 5283 fixed - Intel Fortran 11 compiler did not require to import some
+                    settings in Visual Studio
+ * bug 5284 fixed - Function "legend" drew line segments in its box in a
+                    reverse order
+ * bug 5286 fixed - Calling the 'lib' function with the wrong path made Scilab
+                    hung
+ * bug 5292 fixed - There was a conflict between bool and Scilab header mex.h
+                    (with Visual Studio and mex files)
+ * bug 5293 fixed - Undocumented features with function string(x)
+ * bug 5294 fixed - In mex.h, we had a bad type declaration
+ * bug 5295 fixed - configure: LibGL.so included at link time when
+                    linking with libjogl.so
+ * bug 5298 fixed - Obsolete Makefile in the mexlib module
+ * bug 5307 fixed - In Neldermead, inconsistent shape for the input argument x
+                    of the cost function
+ * bug 5325 fixed - Wrong default path on FileChooser
+ * bug 5326 fixed - graphic_export module was not loaded dynamically
+ * bug 5330 fixed - "help str1 str2" returned an error
+ * bug 5331 fixed - There was no example in the help page of matfile_*
+                    loadmatfile or savematfile
+ * bug 5339 fixed - Some macros had multiple definitions
+ * bug 5340 fixed - There was no example in the help of arma
+ * bug 5355 fixed - There was no automatic indentation in the editor when
+                    commands such as "try" or "catch" were entered
+ * bug 5359 fixed - ATOMS: Path of the non-existing loader file was not well
+                    displayed at Scilab startup
+ * bug 5360 fixed - "sciargs" documentation help page updated
+ * bug 5367 fixed - Incorrect %nan multiplication with vectors on 64-bit Vista
+ * bug 5368 fixed - input() behaved weird on carriage return response to prompt
+                    on 64-bit
+ * bug 5373 fixed - isalphanum() did not support non ascii chars
+ * bug 5375 fixed - isdigit() did not support non ascii chars
+ * bug 5376 fixed - tool_skeleton.iss had not been updated
+ * bug 5384 fixed - get_absolute_file_path was case sensitive with filename on
+                    Windows
+ * bug 5391 fixed - Bad warning/error messages in ATOMS
+ * bug 5402 fixed - Update status bar contents after saving canceled
+ * bug 5413 fixed - help_from_sci: An error was triggered when < or > where used
+                    in the comments
+ * bug 5431 fixed - When network is unreachable, ATOMS now displays an explicit
+                    warning and return softly
+ * bug 5433 fixed - LCC-Win32 did not work with Scicos
+ * bug 5452 fixed - legend reversed the order of plotted curves
+ * bug 5453 fixed - ATOMS: Sizes were displayed with French units
+ * bug 5456 fixed - TCL_UpVar(source,alias) returns %T even if the TCL variable
+                    source did not exist and then aliasing had not been
+                    performed
+ * bug 5457 fixed - Scilab could not start with Korean Win XP
+ * bug 5460 fixed - Added menus 'Close All' and 'Close all but this' in editor
+ * bug 5461 fixed - The savematfile did not work when a format argument was given
+ * bug 5462 fixed - savematfile() did not save correctly sparse matrices
+ * bug 5469 fixed - Force origin presence on axes with location property set
+                    to 'origin'
+ * bug 5470 fixed - The addcolor function help page did not contain example
+ * bug 5484 fixed - LCC-Win32 failed to generate makefile.lcc with this example
+ * bug 5487 fixed - help_from_sci was taking the first line of code as author
+                    when no empty line was provided
+ * bug 5488 fixed - When the documentation was extracted from a .sci file using
+                    help_from_sci function, the docbook refsynopsisdiv section
+                    was not correct
+ * bug 5489 fixed - When the documentation was extracted from a .sci file using
+                    help_from_sci function, the docbook Author refsection
+                    section was not correct
+ * bug 5494 fixed - On Windows 2000, stacksize with the argument 'max' set
+                    stack to minimum size if it failed
+ * bug 5499 fixed - tbx_build_loader() automatically added a test about
+                    version in the loader.sce even if the module has been 100%
+                    written in Scilab code
+ * bug 5505 fixed - getdebuginfo() output in French was partially translated,
+                    with few errors
+ * bug 5506 fixed - There were some memory leak with getMatrixOfWideString
+ * bug 5507 fixed - whereis(bin2dec) returned an error
+ * bug 5511 fixed - printf_conversion help page was not clear
+ * bug 5513 fixed - input("message") did not restore the original prompt after
+                    the input job was done
+ * bug 5532 fixed - added a "Save All" menu to save all modified files by editor
+ * bug 5546 fixed - Initialization trouble of the variable "compilerpath"
+ * bug 5577 fixed - help_skeleton macros encoded the generated xml file in
+                    ISO-8859-1 and not in UTF-8
+ * bug 5585 fixed - sysdiag(): Both examples were duplicated
+ * bug 5586 fixed - getscilabkeyworgs was broken
+ * bug 5604 fixed - Fminsearch: optimsimplex_new did not check for consistency
+                    of x0 and len for "axes" simplex
+ * bug 5607 fixed - 'mtlb_mode' did not work on Windows
+ * bug 5615 fixed - xls_open failed if there was a trailing space after the
+                    file extension
+ * bug 5619 fixed - bitset() could not set hypermatrix bits
+ * bug 5620 fixed - dec2bin() could not convert hypermatrices
+                Changes between version 5.1.1 and 5.2.0-beta1 of Scilab
+                =======================================================
++>>>>>>> refs/remotes/origin/master
  
  
  Xcos:
@@@ -13,9 -13,9 +13,9 @@@
  #define SCI_VERSION_H
  
  #define SCI_VERSION_MAJOR 5
- #define SCI_VERSION_MINOR 2
+ #define SCI_VERSION_MINOR 3
  #define SCI_VERSION_MAINTENANCE 0
 -#define SCI_VERSION_STRING "scilab-branch-master"
 +#define SCI_VERSION_STRING "scilab-branch-scicos"
  /* SCI_VERSION_REVISION --> hash key commit */
  #define SCI_VERSION_REVISION 0
  #define SCI_VERSION_TIMESTAMP 0
Simple merge
@@@ -6,5 -6,5 +6,6 @@@
  //
  
  thispath = get_absolute_file_path("boost_conv.dem.sce");
- scicos_demonstration(thispath+"/Boost_Converter.cosf");
+ xcos(thispath+"/Boost_Converter.cosf");
++
  clear thispath;
@@@ -6,5 -6,5 +6,6 @@@
  //
  
  thispath = get_absolute_file_path("bridge_rectifier.dem.sce");
- scicos_demonstration(thispath+"/Bridge_Rectifier.cosf");
+ xcos(thispath+"/Bridge_Rectifier.cosf");
++
  clear thispath;
index 64d799f,0000000..76fff3c
mode 100644,000000..100644
--- /dev/null
@@@ -1,1137 -1,0 +1,1138 @@@
- scs_m=scicos_diagram(..\r
-       version="scicos4.2",..\r
-       props=scicos_params(..\r
-             wpar=[-85.846644,516.65226,-27.673449,406.75324,1098,798,92,25,895,798,374,25,..\r
-             1.8726579],..\r
-             Title=["Transmission_Line","/home/najafi/SCILAB/scilab412/scilab/demos/scicos/MBlock/"],..\r
-             tol=[1.000D-08;1.000D-08;1.000D-10;100001;0;100;0],..\r
-             tf=1000000,..\r
-             context=["Tf=6";"Ts=0.01";"RL=1";"R=0.0018;";"L=1;";"C=1;";""],..\r
-             void1=[],..\r
-             options=tlist(["scsopt","3D","Background","Link","ID","Cmap"],list(%t,33),[8,1],[1,5],..\r
-             list([5,1],[4,1]),[0.8,0.8,0.8]),..\r
-             void2=[],..\r
-             void3=[],..\r
-             doc=list(..\r
-             ["This diagram was a part of modnum toolbox. ";\r
-             "This is given to Scicos for the purpose of";\r
-             "CANIMXY3D scope.";\r
-             "";\r
-             "Author : Alan Layec."])))\r
- scs_m.objs(1)=scicos_block(..\r
-               gui="CMSCOPE",..\r
-               graphics=scicos_graphics(..\r
-                        orig=[364.1858,157.39793],..\r
-                        sz=[40,40],..\r
-                        flip=%t,..\r
-                        theta=0,..\r
-                        exprs=["5 1";\r
-                        "1 2 3 4 5 6 7 8 9 10  5";\r
-                        "1";\r
-                        "[]";\r
-                        "[800;400]";\r
-                        "-0.1 -0.1";\r
-                        "2 2";\r
-                        "Tf  Tf";\r
-                        "50";\r
-                        "0";\r
-                        ""],..\r
-                        pin=[25;24],..\r
-                        pout=[],..\r
-                        pein=19,..\r
-                        peout=[],..\r
-                        gr_i=list("xstringb(orig(1),orig(2),''MScope'',sz(1),sz(2),''fill'')",8),..\r
-                        id="",..\r
-                        in_implicit=["E";"E"],..\r
-                        out_implicit=[]),..\r
-               model=scicos_model(..\r
-                        sim=list("cmscope",4),..\r
-                        in=[5;1],..\r
-                        in2=[1;1],..\r
-                        intyp=[1;1],..\r
-                        out=[],..\r
-                        out2=[],..\r
-                        outtyp=1,..\r
-                        evtin=1,..\r
-                        evtout=[],..\r
-                        state=[],..\r
-                        dstate=[],..\r
-                        odstate=list(),..\r
-                        rpar=[0;6;6;-0.1;2;-0.1;2],..\r
-                        ipar=[1;2;50;-1;-1;800;400;5;1;1;2;3;4;5;6;0],..\r
-                        opar=list(),..\r
-                        blocktype="c",..\r
-                        firing=[],..\r
-                        dep_ut=[%t,%f],..\r
-                        label="",..\r
-                        nzcross=0,..\r
-                        nmode=0,..\r
-                        equations=list()),..\r
-               doc=list())\r
- scs_m_1=scicos_diagram(..\r
-         version="scicos4.2",..\r
-         props=scicos_params(..\r
-               wpar=[600,450,0,0,600,450],..\r
-               Title="Untitled",..\r
-               tol=[0.0001,0.000001,1.000D-10,100001,0,0],..\r
-               tf=100000,..\r
-               context=[],..\r
-               void1=[],..\r
-               options=tlist(["scsopt","3D","Background","Link","ID","Cmap"],list(%t,33),[8,1],[1,5],..\r
-               list([5,1],[4,1]),[0.8,0.8,0.8]),..\r
-               void2=[],..\r
-               void3=[],..\r
-               doc=list()))\r
- scs_m_1.objs(1)=scicos_block(..\r
-                 gui="CLKOUT_f",..\r
-                 graphics=scicos_graphics(..\r
-                          orig=[399,162],..\r
-                          sz=[20,20],..\r
-                          flip=%t,..\r
-                          theta=0,..\r
-                          exprs="1",..\r
-                          pin=[],..\r
-                          pout=[],..\r
-                          pein=5,..\r
-                          peout=[],..\r
-                          gr_i=list(" ",8),..\r
-                          id="",..\r
-                          in_implicit=[],..\r
-                          out_implicit=[]),..\r
-                 model=scicos_model(..\r
-                          sim="output",..\r
-                          in=[],..\r
-                          in2=[],..\r
-                          intyp=1,..\r
-                          out=[],..\r
-                          out2=[],..\r
-                          outtyp=1,..\r
-                          evtin=1,..\r
-                          evtout=[],..\r
-                          state=[],..\r
-                          dstate=[],..\r
-                          odstate=list(),..\r
-                          rpar=[],..\r
-                          ipar=1,..\r
-                          opar=list(),..\r
-                          blocktype="d",..\r
-                          firing=[],..\r
-                          dep_ut=[%f,%f],..\r
-                          label="",..\r
-                          nzcross=0,..\r
-                          nmode=0,..\r
-                          equations=list()),..\r
-                 doc=list())\r
- scs_m_1.objs(2)=scicos_block(..\r
-                 gui="EVTDLY_f",..\r
-                 graphics=scicos_graphics(..\r
-                          orig=[320,232],..\r
-                          sz=[40,40],..\r
-                          flip=%t,..\r
-                          theta=0,..\r
-                          exprs=["Ts";"0"],..\r
-                          pin=[],..\r
-                          pout=[],..\r
-                          pein=6,..\r
-                          peout=3,..\r
-                          gr_i=list(..\r
-                          ["dt=o.model.rpar;";\r
-                          "txt=[''Delay'';string(dt)];";\r
-                          "xstringb(orig(1),orig(2),txt,sz(1),sz(2),''fill'');"],8),..\r
-                          id="",..\r
-                          in_implicit=[],..\r
-                          out_implicit=[]),..\r
-                 model=scicos_model(..\r
-                          sim="evtdly",..\r
-                          in=[],..\r
-                          in2=[],..\r
-                          intyp=1,..\r
-                          out=[],..\r
-                          out2=[],..\r
-                          outtyp=1,..\r
-                          evtin=1,..\r
-                          evtout=1,..\r
-                          state=[],..\r
-                          dstate=[],..\r
-                          odstate=list(),..\r
-                          rpar=0.01,..\r
-                          ipar=[],..\r
-                          opar=list(),..\r
-                          blocktype="d",..\r
-                          firing=0,..\r
-                          dep_ut=[%f,%f],..\r
-                          label="",..\r
-                          nzcross=0,..\r
-                          nmode=0,..\r
-                          equations=list()),..\r
-                 doc=list())\r
- scs_m_1.objs(3)=scicos_link(..\r
-                   xx=[340;340;380.71],..\r
-                   yy=[226.29;172;172],..\r
-                   id="drawlink",..\r
-                   thick=[0,0],..\r
-                   ct=[5,-1],..\r
-                   from=[2,1],..\r
-                   to=[4,1])\r
- scs_m_1.objs(4)=scicos_block(..\r
-                 gui="CLKSPLIT_f",..\r
-                 graphics=scicos_graphics(..\r
-                          orig=[380.71066;172],..\r
-                          sz=[0.3333333,0.3333333],..\r
-                          flip=%t,..\r
-                          theta=0,..\r
-                          exprs=[],..\r
-                          pin=[],..\r
-                          pout=[],..\r
-                          pein=3,..\r
-                          peout=[5;6],..\r
-                          gr_i=list([],8),..\r
-                          id="",..\r
-                          in_implicit=[],..\r
-                          out_implicit=[]),..\r
-                 model=scicos_model(..\r
-                          sim="split",..\r
-                          in=[],..\r
-                          in2=[],..\r
-                          intyp=1,..\r
-                          out=[],..\r
-                          out2=[],..\r
-                          outtyp=1,..\r
-                          evtin=1,..\r
-                          evtout=[1;1],..\r
-                          state=[],..\r
-                          dstate=[],..\r
-                          odstate=list(),..\r
-                          rpar=[],..\r
-                          ipar=[],..\r
-                          opar=list(),..\r
-                          blocktype="d",..\r
-                          firing=[%f,%f,%f],..\r
-                          dep_ut=[%f,%f],..\r
-                          label="",..\r
-                          nzcross=0,..\r
-                          nmode=0,..\r
-                          equations=list()),..\r
-                 doc=list())\r
- scs_m_1.objs(5)=scicos_link(..\r
-                   xx=[380.71;399],..\r
-                   yy=[172;172],..\r
-                   id="drawlink",..\r
-                   thick=[0,0],..\r
-                   ct=[5,-1],..\r
-                   from=[4,1],..\r
-                   to=[1,1])\r
- scs_m_1.objs(6)=scicos_link(..\r
-                   xx=[380.71;380.71;340;340],..\r
-                   yy=[172;302;302;277.71],..\r
-                   id="drawlink",..\r
-                   thick=[0,0],..\r
-                   ct=[5,-1],..\r
-                   from=[4,2],..\r
-                   to=[2,1])\r
- scs_m.objs(2)=scicos_block(..\r
-               gui="CLOCK_f",..\r
-               graphics=scicos_graphics(..\r
-                        orig=[363.90351,246.54935],..\r
-                        sz=[40,40],..\r
-                        flip=%t,..\r
-                        theta=0,..\r
-                        exprs=[],..\r
-                        pin=[],..\r
-                        pout=[],..\r
-                        pein=[],..\r
-                        peout=19,..\r
-                        gr_i=list(..\r
-                        ["wd=xget(''wdim'').*[1.016,1.12];";\r
-                        "thick=xget(''thickness'');xset(''thickness'',2);";\r
-                        "p=wd(2)/wd(1);p=1;";\r
-                        "rx=sz(1)*p/2;ry=sz(2)/2;";\r
-                        "xarcs([orig(1)+0.05*sz(1);";\r
-                        "orig(2)+0.95*sz(2);";\r
-                        "   0.9*sz(1)*p;";\r
-                        "   0.9*sz(2);";\r
-                        "   0;";\r
-                        "   360*64],scs_color(5));";\r
-                        "xset(''thickness'',1);";\r
-                        "xx=[orig(1)+rx    orig(1)+rx;";\r
-                        "    orig(1)+rx    orig(1)+rx+0.6*rx*cos(%pi/6)];";\r
-                        "yy=[orig(2)+ry    orig(2)+ry ;";\r
-                        "  orig(2)+1.8*ry  orig(2)+ry+0.6*ry*sin(%pi/6)];";\r
-                        "xsegs(xx,yy,scs_color(10));";\r
-                        "xset(''thickness'',thick);"],8),..\r
-                        id="",..\r
-                        in_implicit=[],..\r
-                        out_implicit=[]),..\r
-               model=scicos_model(..\r
-                        sim="csuper",..\r
-                        in=[],..\r
-                        in2=[],..\r
-                        intyp=1,..\r
-                        out=[],..\r
-                        out2=[],..\r
-                        outtyp=1,..\r
-                        evtin=[],..\r
-                        evtout=1,..\r
-                        state=[],..\r
-                        dstate=[],..\r
-                        odstate=list(),..\r
-                        rpar=scs_m_1,..\r
-                        ipar=[],..\r
-                        opar=list(),..\r
-                        blocktype="h",..\r
-                        firing=%f,..\r
-                        dep_ut=[%f,%f],..\r
-                        label="",..\r
-                        nzcross=0,..\r
-                        nmode=0,..\r
-                        equations=list()),..\r
-               doc=list())\r
- scs_m_1=scicos_diagram(..\r
-         version="scicos4.2",..\r
-         props=scicos_params(..\r
-               wpar=[-159.096,811.104,-121.216,617.984,1323,1008,331,284,630,480,0,7,1.4],..\r
-               Title="ENDBLK",..\r
-               tol=[0.0001,0.000001,1.000D-10,100001,0,0],..\r
-               tf=100000,..\r
-               context=" ",..\r
-               void1=[],..\r
-               options=tlist(["scsopt","3D","Background","Link","ID","Cmap"],list(%t,33),[8,1],[1,5],..\r
-               list([5,1],[4,1]),[0.8,0.8,0.8]),..\r
-               void2=[],..\r
-               void3=[],..\r
-               doc=list()))\r
- scs_m_1.objs(1)=scicos_block(..\r
-                 gui="END_c",..\r
-                 graphics=scicos_graphics(..\r
-                          orig=[272.104,249.11733],..\r
-                          sz=[40,40],..\r
-                          flip=%t,..\r
-                          theta=0,..\r
-                          exprs="Tf",..\r
-                          pin=[],..\r
-                          pout=[],..\r
-                          pein=2,..\r
-                          peout=2,..\r
-                          gr_i=list("xstringb(orig(1),orig(2),'' END '',sz(1),sz(2),''fill'');",8),..\r
-                          id="",..\r
-                          in_implicit=[],..\r
-                          out_implicit=[]),..\r
-                 model=scicos_model(..\r
-                          sim=list("scicosexit",4),..\r
-                          in=[],..\r
-                          in2=[],..\r
-                          intyp=1,..\r
-                          out=[],..\r
-                          out2=[],..\r
-                          outtyp=1,..\r
-                          evtin=1,..\r
-                          evtout=1,..\r
-                          state=[],..\r
-                          dstate=[],..\r
-                          odstate=list(),..\r
-                          rpar=[],..\r
-                          ipar=[],..\r
-                          opar=list(),..\r
-                          blocktype="d",..\r
-                          firing=6,..\r
-                          dep_ut=[%f,%f],..\r
-                          label="",..\r
-                          nzcross=0,..\r
-                          nmode=0,..\r
-                          equations=list()),..\r
-                 doc=list())\r
- scs_m_1.objs(2)=scicos_link(..\r
-                   xx=[292.104;292.104;261.83733;261.83733;292.104;292.104],..\r
-                   yy=[243.40305;234.45067;234.45067;305.584;305.584;294.83162],..\r
-                   id="drawlink",..\r
-                   thick=[0,0],..\r
-                   ct=[5,-1],..\r
-                   from=[1,1,0],..\r
-                   to=[1,1,1])\r
- scs_m.objs(3)=scicos_block(..\r
-               gui="ENDBLK",..\r
-               graphics=scicos_graphics(..\r
-                        orig=[323.09377,260.98059],..\r
-                        sz=[20;20],..\r
-                        flip=%t,..\r
-                        theta=0,..\r
-                        exprs=[],..\r
-                        pin=[],..\r
-                        pout=[],..\r
-                        pein=[],..\r
-                        peout=[],..\r
-                        gr_i=list("xstringb(orig(1),orig(2),'' END '',sz(1),sz(2),''fill'')",8),..\r
-                        id="",..\r
-                        in_implicit=[],..\r
-                        out_implicit=[]),..\r
-               model=scicos_model(..\r
-                        sim="csuper",..\r
-                        in=[],..\r
-                        in2=[],..\r
-                        intyp=1,..\r
-                        out=[],..\r
-                        out2=[],..\r
-                        outtyp=1,..\r
-                        evtin=[],..\r
-                        evtout=[],..\r
-                        state=[],..\r
-                        dstate=[],..\r
-                        odstate=list(),..\r
-                        rpar=scs_m_1,..\r
-                        ipar=[],..\r
-                        opar=list(),..\r
-                        blocktype="h",..\r
-                        firing=[],..\r
-                        dep_ut=[%f,%f],..\r
-                        label="",..\r
-                        nzcross=0,..\r
-                        nmode=0,..\r
-                        equations=list()),..\r
-               doc=list())\r
- scs_m.objs(4)=scicos_block(..\r
-               gui="MBLOCK",..\r
-               graphics=scicos_graphics(..\r
-                        orig=[157.11041,141.0428],..\r
-                        sz=[60;100],..\r
-                        flip=%t,..\r
-                        theta=0,..\r
-                        exprs=tlist(..\r
-                        ["MBLOCK","in","intype","out","outtype","param","paramv","pprop","nameF","funtxt"],..\r
-                        """In""","""I""","[""Out"";""y1"";""y2"";""y3"";""y4"";""y5""]",..\r
-                        "[""I"";""E"";""E"";""E"";""E"";""E""]","[""R"";""L"";""C"";""N""]",..\r
-                        list("R","L","C","int32(9)"),"[0;0;0;0]","Transmission_Line",..\r
-                        ["model Transmission_Line";\r
-                        "     parameter Integer N=100;";\r
-                        "     parameter Integer np1=N+1;";\r
-                        "     parameter Real R=0.0018;";\r
-                        "     parameter Real L=1;";\r
-                        "     parameter Real C=1;";\r
-                        "     parameter Real r=R/N;";\r
-                        "     parameter Real l=L/N;";\r
-                        "     parameter Real c=C/N;";\r
-                        "";\r
-                        "     Real y1,y2,y3,y4, y5;";\r
-                        "     Real V[np1](start={ 0.0 for i in 1 : np1 });";\r
-                        "     Real vl[N](start={ 0.0 for i in 1 : N });";\r
-                        "     Real I[np1](start={ 0.0 for i in 1 : np1 });";\r
-                        "     Pin In,Out;";\r
-                        "     ";\r
-                        "equation";\r
-                        "";\r
-                        "/*-- output variables to be displayed -------*/";\r
-                        "y1=V[1];";\r
-                        "y2=V[div(np1,4)];";\r
-                        "y3=V[div(np1,2)];";\r
-                        "y4=V[div(3*np1,4)];";\r
-                        "y5=V[np1];";\r
-                        "/*-------------------------------------------*/";\r
-                        "   In.v=V[1];  ";\r
-                        "   In.i=I[1];";\r
-                        "";\r
-                        "  for j in 1:N loop";\r
-                        "     V[j]-vl[j]=I[j]*r;";\r
-                        "     l*der(I[j])=vl[j]-V[j+1];";\r
-                        "     c*der(V[j+1])=I[j]-I[j+1];";\r
-                        "  end for;";\r
-                        "";\r
-                        "  Out.v=V[np1];";\r
-                        "  Out.i=-I[np1];";\r
-                        "";\r
-                        "end Transmission_Line;"]),..\r
-                        pin=10,..\r
-                        pout=[11;13;14;15;16;17],..\r
-                        pein=[],..\r
-                        peout=[],..\r
-                        gr_i=list(..\r
-                        ["txt=[''Modelica'';'' Transmission_Line ''];";\r
-                        "xstringb(orig(1),orig(2),txt,sz(1),sz(2),''fill'')"],8),..\r
-                        id="",..\r
-                        in_implicit="I",..\r
-                        out_implicit=["I";"E";"E";"E";"E";"E"]),..\r
-               model=scicos_model(..\r
-                        sim=list("Transmission_Line",30004),..\r
-                        in=1,..\r
-                        in2=1,..\r
-                        intyp=1,..\r
-                        out=[1;1;1;1;1;1],..\r
-                        out2=[1;1;1;1;1;1],..\r
-                        outtyp=[1;1;1;1;1;1],..\r
-                        evtin=[],..\r
-                        evtout=[],..\r
-                        state=[],..\r
-                        dstate=[],..\r
-                        odstate=list(),..\r
-                        rpar=[0.0018;1;1;9],..\r
-                        ipar=[],..\r
-                        opar=list(),..\r
-                        blocktype="c",..\r
-                        firing=[],..\r
-                        dep_ut=[%f,%t],..\r
-                        label="",..\r
-                        nzcross=0,..\r
-                        nmode=0,..\r
-                        equations=tlist(["modelica","model","inputs","outputs","parameters"],"Transmission_Line",..\r
-                        "In",["Out";"y1";"y2";"y3";"y4";"y5"],..\r
-                        list(["R","L","C","N"],list(0.0018,1,1,int32(9))))),..\r
-               doc=list())\r
- scs_m.objs(5)=scicos_block(..\r
-               gui="MUX",..\r
-               graphics=scicos_graphics(..\r
-                        orig=[250.37368,164.20821],..\r
-                        sz=[10,40],..\r
-                        flip=%t,..\r
-                        theta=0,..\r
-                        exprs="5",..\r
-                        pin=[13;14;15;16;17],..\r
-                        pout=25,..\r
-                        pein=[],..\r
-                        peout=[],..\r
-                        gr_i=list(" ",8),..\r
-                        id="Mux",..\r
-                        in_implicit=["E";"E";"E";"E";"E"],..\r
-                        out_implicit="E"),..\r
-               model=scicos_model(..\r
-                        sim=list("multiplex",4),..\r
-                        in=[-1;-2;-3;-4;-5],..\r
-                        in2=[],..\r
-                        intyp=1,..\r
-                        out=0,..\r
-                        out2=[],..\r
-                        outtyp=1,..\r
-                        evtin=[],..\r
-                        evtout=[],..\r
-                        state=[],..\r
-                        dstate=[],..\r
-                        odstate=list(),..\r
-                        rpar=[],..\r
-                        ipar=5,..\r
-                        opar=list(),..\r
-                        blocktype="c",..\r
-                        firing=[],..\r
-                        dep_ut=[%t,%f],..\r
-                        label="",..\r
-                        nzcross=0,..\r
-                        nmode=0,..\r
-                        equations=list()),..\r
-               doc=list())\r
- scs_m.objs(6)=scicos_block(..\r
-               gui="CVS",..\r
-               graphics=scicos_graphics(..\r
-                        orig=[84.951532,132.47525],..\r
-                        sz=[42,60],..\r
-                        flip=%t,..\r
-                        theta=0,..\r
-                        exprs=[],..\r
-                        pin=[23;10],..\r
-                        pout=9,..\r
-                        pein=[],..\r
-                        peout=[],..\r
-                        gr_i=list(..\r
-                        ["";\r
-                        "if orient then";\r
-                        "  xpolys(orig(1)+[0.7142857,0.7142857,0.3714286,0.0571429,0.3714286;0.7142857,0.7142857,0.4285714,0.4142857,0.4285714]*sz(1),orig(2)+[0.7,0,0.54,0.5,0.46;0.98,0.3,0.5,0.5,0.5]*sz(2),[2,2,6,6,6])";\r
-                        "  xstring(orig(1)+0.1428571*sz(1),orig(2)+0.75*sz(2),""CVS"")";\r
-                        "  xrects([orig(1)+0.4285714*sz(1); orig(2)+0.7*sz(2);0.5714286*sz(1);0.4*sz(2)],0)";\r
-                        "  xstring(orig(1)+0.7*sz(1),orig(2)+0.55*sz(2),""+"")";\r
-                        "  xstring(orig(1)+0.7*sz(1),orig(2)+0.35*sz(2),""-"")";\r
-                        "else";\r
-                        "  xpolys(orig(1)+[0.2857143,0.2857143,0.6285714,0.9428571,0.6285714;0.2857143,0.2857143,0.5714286,0.5857143,0.5714286]*sz(1),orig(2)+[0.7,0,0.54,0.5,0.46;0.98,0.3,0.5,0.5,0.5]*sz(2),[2,2,6,6,6])";\r
-                        "  xstring(orig(1)+0.6*sz(1),orig(2)+0.75*sz(2),""CVS"")";\r
-                        "  xrects([orig(1)+0*sz(1); orig(2)+0.7*sz(2);0.5714286*sz(1);0.4*sz(2)],0)";\r
-                        "  xstring(orig(1)+sz(1)-(0.7*sz(1)),orig(2)+0.55*sz(2),""+"")";\r
-                        "  xstring(orig(1)+sz(1)-(0.7*sz(1)),orig(2)+0.35*sz(2),""-"")";\r
-                        "end"],[]),..\r
-                        id="",..\r
-                        in_implicit=["E";"I"],..\r
-                        out_implicit="I"),..\r
-               model=scicos_model(..\r
-                        sim="CVS",..\r
-                        in=[1;1],..\r
-                        in2=[],..\r
-                        intyp=1,..\r
-                        out=1,..\r
-                        out2=[],..\r
-                        outtyp=1,..\r
-                        evtin=[],..\r
-                        evtout=[],..\r
-                        state=[],..\r
-                        dstate=[],..\r
-                        odstate=list(),..\r
-                        rpar=[],..\r
-                        ipar=[],..\r
-                        opar=list(),..\r
-                        blocktype="c",..\r
-                        firing=[],..\r
-                        dep_ut=[%f,%t],..\r
-                        label="",..\r
-                        nzcross=0,..\r
-                        nmode=0,..\r
-                        equations=tlist(["modelica","model","inputs","outputs","parameters"],"CVS",["vin";"p"],"n",..\r
-                        list([],[],[]))),..\r
-               doc=list())\r
- scs_m.objs(7)=scicos_block(..\r
-               gui="Resistor",..\r
-               graphics=scicos_graphics(..\r
-                        orig=[280.76037,224.59505],..\r
-                        sz=[40,3.6],..\r
-                        flip=%t,..\r
-                        theta=0,..\r
-                        exprs="RL",..\r
-                        pin=11,..\r
-                        pout=18,..\r
-                        pein=[],..\r
-                        peout=[],..\r
-                        gr_i=list(..\r
-                        ["xx=[0,1,1,7,7,8,7,7,1,1]/8;";\r
-                        "yy=[1,1,0,0,1,1,1,2,2,1]/2;";\r
-                        "xpoly(orig(1)+xx*sz(1),orig(2)+yy*sz(2)); ";\r
-                        "rect=xstringl(0,0,''R=''+R)";\r
-                        "xstring(orig(1)+(sz(1)-rect(3))/2,orig(2)-rect(4)*1.2,''R=''+R);"],[]),..\r
-                        id="",..\r
-                        in_implicit="I",..\r
-                        out_implicit="I"),..\r
-               model=scicos_model(..\r
-                        sim="resistor",..\r
-                        in=1,..\r
-                        in2=[],..\r
-                        intyp=1,..\r
-                        out=1,..\r
-                        out2=[],..\r
-                        outtyp=1,..\r
-                        evtin=[],..\r
-                        evtout=[],..\r
-                        state=[],..\r
-                        dstate=[],..\r
-                        odstate=list(),..\r
-                        rpar=1,..\r
-                        ipar=[],..\r
-                        opar=list(),..\r
-                        blocktype="c",..\r
-                        firing=[],..\r
-                        dep_ut=[%t,%f],..\r
-                        label="",..\r
-                        nzcross=0,..\r
-                        nmode=0,..\r
-                        equations=tlist(["modelica","model","inputs","outputs","parameters"],"Resistor","p","n",..\r
-                        list("R",list(1)))),..\r
-               doc=list())\r
- scs_m.objs(8)=scicos_block(..\r
-               gui="Ground",..\r
-               graphics=scicos_graphics(..\r
-                        orig=[104.67552,97.909117],..\r
-                        sz=[20,20],..\r
-                        flip=%t,..\r
-                        theta=0,..\r
-                        exprs="",..\r
-                        pin=9,..\r
-                        pout=[],..\r
-                        pein=[],..\r
-                        peout=[],..\r
-                        gr_i=list(..\r
-                        ["xset(''thickness'',3)";\r
-                        "xsegs(orig(1)+sz(1)*[1/2 1/2],orig(2)+sz(2)*[1 1/2],0);";\r
-                        "xsegs(orig(1)+sz(1)*[0 1],orig(2)+sz(2)*[1/2 1/2],0);";\r
-                        "xsegs(orig(1)+sz(1)*[2/8 6/8],orig(2)+sz(2)*[1/4 1/4],0);";\r
-                        "xsegs(orig(1)+sz(1)*[3/8 5/8],orig(2)+sz(2)*[0 0],0);"],[]),..\r
-                        id="",..\r
-                        in_implicit="I",..\r
-                        out_implicit="I"),..\r
-               model=scicos_model(..\r
-                        sim="Ground",..\r
-                        in=1,..\r
-                        in2=[],..\r
-                        intyp=1,..\r
-                        out=[],..\r
-                        out2=[],..\r
-                        outtyp=1,..\r
-                        evtin=[],..\r
-                        evtout=[],..\r
-                        state=[],..\r
-                        dstate=[],..\r
-                        odstate=list(),..\r
-                        rpar=[],..\r
-                        ipar=[],..\r
-                        opar=list(),..\r
-                        blocktype="c",..\r
-                        firing=[],..\r
-                        dep_ut=[%t,%f],..\r
-                        label="",..\r
-                        nzcross=0,..\r
-                        nmode=0,..\r
-                        equations=tlist(["modelica","model","inputs","outputs","parameters"],"Ground","p",[],..\r
-                        list([],list()))),..\r
-               doc=list())\r
- scs_m.objs(9)=scicos_link(..\r
-                 xx=[114.35153;114.67552],..\r
-                 yy=[133.67525;123.6234],..\r
-                 id="drawlink",..\r
-                 thick=[0,0],..\r
-                 ct=[1,2],..\r
-                 from=[6,1,0],..\r
-                 to=[8,1,1])\r
- scs_m.objs(10)=scicos_link(..\r
-                  xx=[114.35153;148.53898],..\r
-                  yy=[191.27525;191.0428],..\r
-                  id="drawlink",..\r
-                  thick=[0,0],..\r
-                  ct=[1,2],..\r
-                  from=[6,2,1],..\r
-                  to=[4,1,1])\r
- scs_m.objs(11)=scicos_link(..\r
-                  xx=[225.68184;272.18894],..\r
-                  yy=[226.75709;226.39505],..\r
-                  id="drawlink",..\r
-                  thick=[0,0],..\r
-                  ct=[1,2],..\r
-                  from=[4,1,0],..\r
-                  to=[7,1,1])\r
- scs_m.objs(12)=scicos_block(..\r
-                gui="Ground",..\r
-                graphics=scicos_graphics(..\r
-                         orig=[327.09985,200.53941],..\r
-                         sz=[20,20],..\r
-                         flip=%t,..\r
-                         theta=0,..\r
-                         exprs="",..\r
-                         pin=18,..\r
-                         pout=[],..\r
-                         pein=[],..\r
-                         peout=[],..\r
-                         gr_i=list(..\r
-                         ["xset(''thickness'',3)";\r
-                         "xsegs(orig(1)+sz(1)*[1/2 1/2],orig(2)+sz(2)*[1 1/2],0);";\r
-                         "xsegs(orig(1)+sz(1)*[0 1],orig(2)+sz(2)*[1/2 1/2],0);";\r
-                         "xsegs(orig(1)+sz(1)*[2/8 6/8],orig(2)+sz(2)*[1/4 1/4],0);";\r
-                         "xsegs(orig(1)+sz(1)*[3/8 5/8],orig(2)+sz(2)*[0 0],0);"],[]),..\r
-                         id="",..\r
-                         in_implicit="I",..\r
-                         out_implicit="I"),..\r
-                model=scicos_model(..\r
-                         sim="Ground",..\r
-                         in=1,..\r
-                         in2=[],..\r
-                         intyp=1,..\r
-                         out=[],..\r
-                         out2=[],..\r
-                         outtyp=1,..\r
-                         evtin=[],..\r
-                         evtout=[],..\r
-                         state=[],..\r
-                         dstate=[],..\r
-                         odstate=list(),..\r
-                         rpar=[],..\r
-                         ipar=[],..\r
-                         opar=list(),..\r
-                         blocktype="c",..\r
-                         firing=[],..\r
-                         dep_ut=[%t,%f],..\r
-                         label="",..\r
-                         nzcross=0,..\r
-                         nmode=0,..\r
-                         equations=tlist(["modelica","model","inputs","outputs","parameters"],"Ground","p",[],..\r
-                         list([],list()))),..\r
-                doc=list())\r
- scs_m.objs(13)=scicos_link(..\r
-                  xx=[225.68184;241.80225],..\r
-                  yy=[212.47137;197.54154],..\r
-                  id="drawlink",..\r
-                  thick=[0,0],..\r
-                  ct=[1,1],..\r
-                  from=[4,2,0],..\r
-                  to=[5,1,1])\r
- scs_m.objs(14)=scicos_link(..\r
-                  xx=[225.68184;241.80225],..\r
-                  yy=[198.18566;190.87487],..\r
-                  id="drawlink",..\r
-                  thick=[0,0],..\r
-                  ct=[1,1],..\r
-                  from=[4,3,0],..\r
-                  to=[5,2,1])\r
- scs_m.objs(15)=scicos_link(..\r
-                  xx=[225.68184;241.80225],..\r
-                  yy=[183.89994;184.20821],..\r
-                  id="drawlink",..\r
-                  thick=[0,0],..\r
-                  ct=[1,1],..\r
-                  from=[4,4,0],..\r
-                  to=[5,3,1])\r
- scs_m.objs(16)=scicos_link(..\r
-                  xx=[225.68184;241.80225],..\r
-                  yy=[169.61423;177.54154],..\r
-                  id="drawlink",..\r
-                  thick=[0,0],..\r
-                  ct=[1,1],..\r
-                  from=[4,5,0],..\r
-                  to=[5,4,1])\r
- scs_m.objs(17)=scicos_link(..\r
-                  xx=[225.68184;241.80225],..\r
-                  yy=[155.32851;170.87487],..\r
-                  id="drawlink",..\r
-                  thick=[0,0],..\r
-                  ct=[1,1],..\r
-                  from=[4,6,0],..\r
-                  to=[5,5,1])\r
- scs_m.objs(18)=scicos_link(..\r
-                  xx=[329.3318;337.09985],..\r
-                  yy=[226.39505;226.25369],..\r
-                  id="drawlink",..\r
-                  thick=[0,0],..\r
-                  ct=[1,2],..\r
-                  from=[7,1,0],..\r
-                  to=[12,1,1])\r
- scs_m.objs(19)=scicos_link(..\r
-                  xx=[383.90351;384.1858],..\r
-                  yy=[240.83506;203.11222],..\r
-                  id="drawlink",..\r
-                  thick=[0,0],..\r
-                  ct=[5,-1],..\r
-                  from=[2,1,0],..\r
-                  to=[1,1,1])\r
- scs_m_1=scicos_diagram(..\r
-         version="scicos4.2",..\r
-         props=scicos_params(..\r
-               wpar=[600,450,0,0,600,450],..\r
-               Title=["Sigbuilder","./"],..\r
-               tol=[0.0001;0.000001;1.000D-10;100001;0;0;0],..\r
-               tf=100,..\r
-               context=" ",..\r
-               void1=[],..\r
-               options=tlist(["scsopt","3D","Background","Link","ID","Cmap"],list(%t,33),[8,1],[1,5],..\r
-               list([5,1],[4,1]),[0.8,0.8,0.8]),..\r
-               void2=[],..\r
-               void3=[],..\r
-               doc=list()))\r
- scs_m_1.objs(1)=scicos_block(..\r
-                 gui="CURVE_c",..\r
-                 graphics=scicos_graphics(..\r
-                          orig=[329.63473,606.18517],..\r
-                          sz=[40,40],..\r
-                          flip=%t,..\r
-                          theta=0,..\r
-                          exprs=["0";"[0,1,2]";"[0,1,1]";"n";"n"],..\r
-                          pin=[],..\r
-                          pout=6,..\r
-                          pein=4,..\r
-                          peout=2,..\r
-                          gr_i=list(..\r
-                          ["rpar=arg1.model.rpar;n=model.ipar(1);order=model.ipar(2);";\r
-                          "xx=rpar(1:n);yy=rpar(n+1:2*n);";\r
-                          "[XX,YY,rpardummy]=Do_Spline(n,order,xx,yy)";\r
-                          "xmx=maxi(XX);xmn=mini(XX);";\r
-                          "ymx=maxi(YY);ymn=mini(YY);";\r
-                          "dx=xmx-xmn;if dx==0 then dx=maxi(xmx/2,1);end";\r
-                          "xmn=xmn-dx/20;xmx=xmx+dx/20;";\r
-                          "dy=ymx-ymn;if dy==0 then dy=maxi(ymx/2,1);end;";\r
-                          "ymn=ymn-dy/20;ymx=ymx+dy/20;";\r
-                          "xx2=orig(1)+sz(1)*((XX-xmn)/(xmx-xmn));";\r
-                          "yy2=orig(2)+sz(2)*((YY-ymn)/(ymx-ymn));";\r
-                          "xset(''color'',2)";\r
-                          "xpoly(xx2,yy2,''lines'');"],8),..\r
-                          id="",..\r
-                          in_implicit=[],..\r
-                          out_implicit="E"),..\r
-                 model=scicos_model(..\r
-                          sim=list("curve_c",4),..\r
-                          in=[],..\r
-                          in2=[],..\r
-                          intyp=1,..\r
-                          out=1,..\r
-                          out2=[],..\r
-                          outtyp=1,..\r
-                          evtin=1,..\r
-                          evtout=1,..\r
-                          state=[],..\r
-                          dstate=[],..\r
-                          odstate=list(),..\r
-                          rpar=[0;1;2;0;1;1],..\r
-                          ipar=[3;0;0],..\r
-                          opar=list(),..\r
-                          blocktype="c",..\r
-                          firing=0,..\r
-                          dep_ut=[%f,%t],..\r
-                          label="",..\r
-                          nzcross=0,..\r
-                          nmode=0,..\r
-                          equations=list()),..\r
-                 doc=list())\r
- scs_m_1.objs(2)=scicos_link(..\r
-                   xx=[349.63473;349.49528],..\r
-                   yy=[600.47089;565.10704],..\r
-                   id="drawlink",..\r
-                   thick=[0,0],..\r
-                   ct=[5,-1],..\r
-                   from=[1,1,0],..\r
-                   to=[3,1,1])\r
- scs_m_1.objs(3)=scicos_block(..\r
-                 gui="CLKSPLIT_f",..\r
-                 graphics=scicos_graphics(..\r
-                          orig=[349.49528;565.10704],..\r
-                          sz=[0.3333333,0.3333333],..\r
-                          flip=%t,..\r
-                          theta=0,..\r
-                          exprs=[],..\r
-                          pin=[],..\r
-                          pout=[],..\r
-                          pein=2,..\r
-                          peout=[8;4],..\r
-                          gr_i=list([],8),..\r
-                          id="",..\r
-                          in_implicit=[],..\r
-                          out_implicit=[]),..\r
-                 model=scicos_model(..\r
-                          sim="split",..\r
-                          in=[],..\r
-                          in2=[],..\r
-                          intyp=1,..\r
-                          out=[],..\r
-                          out2=[],..\r
-                          outtyp=1,..\r
-                          evtin=1,..\r
-                          evtout=[1;1],..\r
-                          state=[],..\r
-                          dstate=[],..\r
-                          odstate=list(),..\r
-                          rpar=[],..\r
-                          ipar=[],..\r
-                          opar=list(),..\r
-                          blocktype="d",..\r
-                          firing=[%f,%f,%f],..\r
-                          dep_ut=[%f,%f],..\r
-                          label="",..\r
-                          nzcross=0,..\r
-                          nmode=0,..\r
-                          equations=list()),..\r
-                 doc=list())\r
- scs_m_1.objs(4)=scicos_link(..\r
-                   xx=[349.49528;266.69602;266.69602;270.35525;342.80795;342.80795;349.63473],..\r
-                   yy=[565.10704;565.10704;680.99483;680.99483;680.99483;651.89946;651.89946],..\r
-                   id="drawlink",..\r
-                   thick=[0,0],..\r
-                   ct=[5,-1],..\r
-                   from=[3,2,0],..\r
-                   to=[1,1,1])\r
- scs_m_1.objs(5)=scicos_block(..\r
-                 gui="OUT_f",..\r
-                 graphics=scicos_graphics(..\r
-                          orig=[398.20616,616.18517],..\r
-                          sz=[20,20],..\r
-                          flip=%t,..\r
-                          theta=0,..\r
-                          exprs="1",..\r
-                          pin=6,..\r
-                          pout=[],..\r
-                          pein=[],..\r
-                          peout=[],..\r
-                          gr_i=list(" ",8),..\r
-                          id="",..\r
-                          in_implicit="E",..\r
-                          out_implicit=[]),..\r
-                 model=scicos_model(..\r
-                          sim="output",..\r
-                          in=-1,..\r
-                          in2=-2,..\r
-                          intyp=-1,..\r
-                          out=[],..\r
-                          out2=[],..\r
-                          outtyp=1,..\r
-                          evtin=[],..\r
-                          evtout=[],..\r
-                          state=[],..\r
-                          dstate=[],..\r
-                          odstate=list(),..\r
-                          rpar=[],..\r
-                          ipar=1,..\r
-                          opar=list(),..\r
-                          blocktype="c",..\r
-                          firing=[],..\r
-                          dep_ut=[%f,%f],..\r
-                          label="",..\r
-                          nzcross=0,..\r
-                          nmode=0,..\r
-                          equations=list()),..\r
-                 doc=list())\r
- scs_m_1.objs(6)=scicos_link(..\r
-                   xx=[378.20616;398.20616],..\r
-                   yy=[626.18517;626.18517],..\r
-                   id="drawlink",..\r
-                   thick=[0,0],..\r
-                   ct=[1,1],..\r
-                   from=[1,1,0],..\r
-                   to=[5,1,1])\r
- scs_m_1.objs(7)=scicos_block(..\r
-                 gui="CLKOUTV_f",..\r
-                 graphics=scicos_graphics(..\r
-                          orig=[339.49528,505.10704],..\r
-                          sz=[20,30],..\r
-                          flip=%t,..\r
-                          theta=0,..\r
-                          exprs="1",..\r
-                          pin=[],..\r
-                          pout=[],..\r
-                          pein=8,..\r
-                          peout=[],..\r
-                          gr_i=list(" ",8),..\r
-                          id="",..\r
-                          in_implicit=[],..\r
-                          out_implicit=[]),..\r
-                 model=scicos_model(..\r
-                          sim="output",..\r
-                          in=[],..\r
-                          in2=[],..\r
-                          intyp=1,..\r
-                          out=[],..\r
-                          out2=[],..\r
-                          outtyp=1,..\r
-                          evtin=1,..\r
-                          evtout=[],..\r
-                          state=[],..\r
-                          dstate=[],..\r
-                          odstate=list(),..\r
-                          rpar=[],..\r
-                          ipar=1,..\r
-                          opar=list(),..\r
-                          blocktype="d",..\r
-                          firing=[],..\r
-                          dep_ut=[%f,%f],..\r
-                          label="",..\r
-                          nzcross=0,..\r
-                          nmode=0,..\r
-                          equations=list()),..\r
-                 doc=list())\r
- scs_m_1.objs(8)=scicos_link(..\r
-                   xx=[349.49528;349.49528],..\r
-                   yy=[565.10704;535.10704],..\r
-                   id="drawlink",..\r
-                   thick=[0,0],..\r
-                   ct=[5,-1],..\r
-                   from=[3,1,0],..\r
-                   to=[7,1,1])\r
- scs_m.objs(20)=scicos_block(..\r
-                gui="Sigbuilder",..\r
-                graphics=scicos_graphics(..\r
-                         orig=[12.952744,142.61381],..\r
-                         sz=[40,40],..\r
-                         flip=%t,..\r
-                         theta=0,..\r
-                         exprs=[],..\r
-                         pin=[],..\r
-                         pout=21,..\r
-                         pein=[],..\r
-                         peout=0,..\r
-                         gr_i=list(..\r
-                         ["ipar=arg1.model.rpar.objs(1).model.ipar";\r
-                         "rpar=arg1.model.rpar.objs(1).model.rpar";\r
-                         "n=ipar(1);order=ipar(2);";\r
-                         "xx=rpar(1:n);yy=rpar(n+1:2*n);";\r
-                         "[XX,YY,rpardummy]=Do_Spline2(n,order,xx,yy)";\r
-                         "xmx=maxi(XX);xmn=mini(XX);";\r
-                         "ymx=maxi(YY);ymn=mini(YY);";\r
-                         "dx=xmx-xmn;if dx==0 then dx=maxi(xmx/2,1);end";\r
-                         "xmn=xmn-dx/20;xmx=xmx+dx/20;";\r
-                         "dy=ymx-ymn;if dy==0 then dy=maxi(ymx/2,1);end;";\r
-                         "ymn=ymn-dy/20;ymx=ymx+dy/20;";\r
-                         "rect=[xmn,ymn;xmx,ymx];";\r
-                         "xx2=orig(1)+sz(1)*((XX-xmn)/(xmx-xmn));";\r
-                         "yy2=orig(2)+sz(2)*((YY-ymn)/(ymx-ymn));";\r
-                         "xset(''color'',2)";\r
-                         "xpoly(xx2,yy2,''lines'');"],8),..\r
-                         id="",..\r
-                         in_implicit=[],..\r
-                         out_implicit="E"),..\r
-                model=scicos_model(..\r
-                         sim="csuper",..\r
-                         in=[],..\r
-                         in2=[],..\r
-                         intyp=1,..\r
-                         out=-1,..\r
-                         out2=[],..\r
-                         outtyp=1,..\r
-                         evtin=[],..\r
-                         evtout=1,..\r
-                         state=[],..\r
-                         dstate=[],..\r
-                         odstate=list(),..\r
-                         rpar=scs_m_1,..\r
-                         ipar=[],..\r
-                         opar=list(),..\r
-                         blocktype="h",..\r
-                         firing=[],..\r
-                         dep_ut=[%f,%f],..\r
-                         label="",..\r
-                         nzcross=0,..\r
-                         nmode=0,..\r
-                         equations=list()),..\r
-                doc=list())\r
- scs_m.objs(21)=scicos_link(..\r
-                  xx=[61.524173;71.778005],..\r
-                  yy=[162.61381;162.54959],..\r
-                  id="drawlink",..\r
-                  thick=[0,0],..\r
-                  ct=[1,1],..\r
-                  from=[20,1,0],..\r
-                  to=[22,1,1])\r
- scs_m.objs(22)=scicos_block(..\r
-                gui="SPLIT_f",..\r
-                graphics=scicos_graphics(..\r
-                         orig=[71.778005;162.54959],..\r
-                         sz=[0.3333333,0.3333333],..\r
-                         flip=%t,..\r
-                         theta=0,..\r
-                         exprs=[],..\r
-                         pin=21,..\r
-                         pout=[23;24],..\r
-                         pein=[],..\r
-                         peout=[],..\r
-                         gr_i=list([],8),..\r
-                         id="",..\r
-                         in_implicit="E",..\r
-                         out_implicit=["E";"E";"E"]),..\r
-                model=scicos_model(..\r
-                         sim="lsplit",..\r
-                         in=-1,..\r
-                         in2=[],..\r
-                         intyp=1,..\r
-                         out=[-1;-1;-1],..\r
-                         out2=[],..\r
-                         outtyp=1,..\r
-                         evtin=[],..\r
-                         evtout=[],..\r
-                         state=[],..\r
-                         dstate=[],..\r
-                         odstate=list(),..\r
-                         rpar=[],..\r
-                         ipar=[],..\r
-                         opar=list(),..\r
-                         blocktype="c",..\r
-                         firing=[],..\r
-                         dep_ut=[%t,%f],..\r
-                         label="",..\r
-                         nzcross=0,..\r
-                         nmode=0,..\r
-                         equations=list()),..\r
-                doc=list())\r
- scs_m.objs(23)=scicos_link(..\r
-                  xx=[71.778005;83.648675],..\r
-                  yy=[162.54959;162.47525],..\r
-                  id="drawlink",..\r
-                  thick=[0,0],..\r
-                  ct=[1,1],..\r
-                  from=[22,1,0],..\r
-                  to=[6,1,1])\r
- scs_m.objs(24)=scicos_link(..\r
-                  xx=[71.778005;71.778005;328.42557;328.42557;355.61437],..\r
-                  yy=[162.54959;79.189497;79.189497;170.73126;170.73126],..\r
-                  id="drawlink",..\r
-                  thick=[0,0],..\r
-                  ct=[1,1],..\r
-                  from=[22,2,0],..\r
-                  to=[1,2,1])\r
- scs_m.objs(25)=scicos_link(..\r
-                  xx=[268.94511;285.09075;355.61437],..\r
-                  yy=[184.20821;184.0646;184.0646],..\r
-                  id="drawlink",..\r
-                  thick=[0,0],..\r
-                  ct=[1,1],..\r
-                  from=[5,1,0],..\r
-                  to=[1,1,1])\r\r
++scs_m=scicos_diagram(..
++      version="scicos4.2",..
++      props=scicos_params(..
++            wpar=[-85.846644,516.65226,-27.673449,406.75324,1098,798,92,25,895,798,374,25,..
++            1.8726579],..
++            Title=["Transmission_Line","/home/najafi/SCILAB/scilab412/scilab/demos/scicos/MBlock/"],..
++            tol=[1.000D-08;1.000D-08;1.000D-10;100001;0;100;0],..
++            tf=1000000,..
++            context=["Tf=6";"Ts=0.01";"RL=1";"R=0.0018;";"L=1;";"C=1;";""],..
++            void1=[],..
++            options=tlist(["scsopt","3D","Background","Link","ID","Cmap"],list(%t,33),[8,1],[1,5],..
++            list([5,1],[4,1]),[0.8,0.8,0.8]),..
++            void2=[],..
++            void3=[],..
++            doc=list(..
++            ["This diagram was a part of modnum toolbox. ";
++            "This is given to Scicos for the purpose of";
++            "CANIMXY3D scope.";
++            "";
++            "Author : Alan Layec."])))
++scs_m.objs(1)=scicos_block(..
++              gui="CMSCOPE",..
++              graphics=scicos_graphics(..
++                       orig=[364.1858,157.39793],..
++                       sz=[40,40],..
++                       flip=%t,..
++                       theta=0,..
++                       exprs=["5 1";
++                       "1 2 3 4 5 6 7 8 9 10  5";
++                       "1";
++                       "[]";
++                       "[800;400]";
++                       "-0.1 -0.1";
++                       "2 2";
++                       "Tf  Tf";
++                       "50";
++                       "0";
++                       ""],..
++                       pin=[25;24],..
++                       pout=[],..
++                       pein=19,..
++                       peout=[],..
++                       gr_i=list("xstringb(orig(1),orig(2),''MScope'',sz(1),sz(2),''fill'')",8),..
++                       id="",..
++                       in_implicit=["E";"E"],..
++                       out_implicit=[]),..
++              model=scicos_model(..
++                       sim=list("cmscope",4),..
++                       in=[5;1],..
++                       in2=[1;1],..
++                       intyp=[1;1],..
++                       out=[],..
++                       out2=[],..
++                       outtyp=1,..
++                       evtin=1,..
++                       evtout=[],..
++                       state=[],..
++                       dstate=[],..
++                       odstate=list(),..
++                       rpar=[0;6;6;-0.1;2;-0.1;2],..
++                       ipar=[1;2;50;-1;-1;800;400;5;1;1;2;3;4;5;6;0],..
++                       opar=list(),..
++                       blocktype="c",..
++                       firing=[],..
++                       dep_ut=[%t,%f],..
++                       label="",..
++                       nzcross=0,..
++                       nmode=0,..
++                       equations=list()),..
++              doc=list())
++scs_m_1=scicos_diagram(..
++        version="scicos4.2",..
++        props=scicos_params(..
++              wpar=[600,450,0,0,600,450],..
++              Title="Untitled",..
++              tol=[0.0001,0.000001,1.000D-10,100001,0,0],..
++              tf=100000,..
++              context=[],..
++              void1=[],..
++              options=tlist(["scsopt","3D","Background","Link","ID","Cmap"],list(%t,33),[8,1],[1,5],..
++              list([5,1],[4,1]),[0.8,0.8,0.8]),..
++              void2=[],..
++              void3=[],..
++              doc=list()))
++scs_m_1.objs(1)=scicos_block(..
++                gui="CLKOUT_f",..
++                graphics=scicos_graphics(..
++                         orig=[399,162],..
++                         sz=[20,20],..
++                         flip=%t,..
++                         theta=0,..
++                         exprs="1",..
++                         pin=[],..
++                         pout=[],..
++                         pein=5,..
++                         peout=[],..
++                         gr_i=list(" ",8),..
++                         id="",..
++                         in_implicit=[],..
++                         out_implicit=[]),..
++                model=scicos_model(..
++                         sim="output",..
++                         in=[],..
++                         in2=[],..
++                         intyp=1,..
++                         out=[],..
++                         out2=[],..
++                         outtyp=1,..
++                         evtin=1,..
++                         evtout=[],..
++                         state=[],..
++                         dstate=[],..
++                         odstate=list(),..
++                         rpar=[],..
++                         ipar=1,..
++                         opar=list(),..
++                         blocktype="d",..
++                         firing=[],..
++                         dep_ut=[%f,%f],..
++                         label="",..
++                         nzcross=0,..
++                         nmode=0,..
++                         equations=list()),..
++                doc=list())
++scs_m_1.objs(2)=scicos_block(..
++                gui="EVTDLY_f",..
++                graphics=scicos_graphics(..
++                         orig=[320,232],..
++                         sz=[40,40],..
++                         flip=%t,..
++                         theta=0,..
++                         exprs=["Ts";"0"],..
++                         pin=[],..
++                         pout=[],..
++                         pein=6,..
++                         peout=3,..
++                         gr_i=list(..
++                         ["dt=o.model.rpar;";
++                         "txt=[''Delay'';string(dt)];";
++                         "xstringb(orig(1),orig(2),txt,sz(1),sz(2),''fill'');"],8),..
++                         id="",..
++                         in_implicit=[],..
++                         out_implicit=[]),..
++                model=scicos_model(..
++                         sim="evtdly",..
++                         in=[],..
++                         in2=[],..
++                         intyp=1,..
++                         out=[],..
++                         out2=[],..
++                         outtyp=1,..
++                         evtin=1,..
++                         evtout=1,..
++                         state=[],..
++                         dstate=[],..
++                         odstate=list(),..
++                         rpar=0.01,..
++                         ipar=[],..
++                         opar=list(),..
++                         blocktype="d",..
++                         firing=0,..
++                         dep_ut=[%f,%f],..
++                         label="",..
++                         nzcross=0,..
++                         nmode=0,..
++                         equations=list()),..
++                doc=list())
++scs_m_1.objs(3)=scicos_link(..
++                  xx=[340;340;380.71],..
++                  yy=[226.29;172;172],..
++                  id="drawlink",..
++                  thick=[0,0],..
++                  ct=[5,-1],..
++                  from=[2,1],..
++                  to=[4,1])
++scs_m_1.objs(4)=scicos_block(..
++                gui="CLKSPLIT_f",..
++                graphics=scicos_graphics(..
++                         orig=[380.71066;172],..
++                         sz=[0.3333333,0.3333333],..
++                         flip=%t,..
++                         theta=0,..
++                         exprs=[],..
++                         pin=[],..
++                         pout=[],..
++                         pein=3,..
++                         peout=[5;6],..
++                         gr_i=list([],8),..
++                         id="",..
++                         in_implicit=[],..
++                         out_implicit=[]),..
++                model=scicos_model(..
++                         sim="split",..
++                         in=[],..
++                         in2=[],..
++                         intyp=1,..
++                         out=[],..
++                         out2=[],..
++                         outtyp=1,..
++                         evtin=1,..
++                         evtout=[1;1],..
++                         state=[],..
++                         dstate=[],..
++                         odstate=list(),..
++                         rpar=[],..
++                         ipar=[],..
++                         opar=list(),..
++                         blocktype="d",..
++                         firing=[%f,%f,%f],..
++                         dep_ut=[%f,%f],..
++                         label="",..
++                         nzcross=0,..
++                         nmode=0,..
++                         equations=list()),..
++                doc=list())
++scs_m_1.objs(5)=scicos_link(..
++                  xx=[380.71;399],..
++                  yy=[172;172],..
++                  id="drawlink",..
++                  thick=[0,0],..
++                  ct=[5,-1],..
++                  from=[4,1],..
++                  to=[1,1])
++scs_m_1.objs(6)=scicos_link(..
++                  xx=[380.71;380.71;340;340],..
++                  yy=[172;302;302;277.71],..
++                  id="drawlink",..
++                  thick=[0,0],..
++                  ct=[5,-1],..
++                  from=[4,2],..
++                  to=[2,1])
++scs_m.objs(2)=scicos_block(..
++              gui="CLOCK_f",..
++              graphics=scicos_graphics(..
++                       orig=[363.90351,246.54935],..
++                       sz=[40,40],..
++                       flip=%t,..
++                       theta=0,..
++                       exprs=[],..
++                       pin=[],..
++                       pout=[],..
++                       pein=[],..
++                       peout=19,..
++                       gr_i=list(..
++                       ["wd=xget(''wdim'').*[1.016,1.12];";
++                       "thick=xget(''thickness'');xset(''thickness'',2);";
++                       "p=wd(2)/wd(1);p=1;";
++                       "rx=sz(1)*p/2;ry=sz(2)/2;";
++                       "xarcs([orig(1)+0.05*sz(1);";
++                       "orig(2)+0.95*sz(2);";
++                       "   0.9*sz(1)*p;";
++                       "   0.9*sz(2);";
++                       "   0;";
++                       "   360*64],scs_color(5));";
++                       "xset(''thickness'',1);";
++                       "xx=[orig(1)+rx    orig(1)+rx;";
++                       "    orig(1)+rx    orig(1)+rx+0.6*rx*cos(%pi/6)];";
++                       "yy=[orig(2)+ry    orig(2)+ry ;";
++                       "  orig(2)+1.8*ry  orig(2)+ry+0.6*ry*sin(%pi/6)];";
++                       "xsegs(xx,yy,scs_color(10));";
++                       "xset(''thickness'',thick);"],8),..
++                       id="",..
++                       in_implicit=[],..
++                       out_implicit=[]),..
++              model=scicos_model(..
++                       sim="csuper",..
++                       in=[],..
++                       in2=[],..
++                       intyp=1,..
++                       out=[],..
++                       out2=[],..
++                       outtyp=1,..
++                       evtin=[],..
++                       evtout=1,..
++                       state=[],..
++                       dstate=[],..
++                       odstate=list(),..
++                       rpar=scs_m_1,..
++                       ipar=[],..
++                       opar=list(),..
++                       blocktype="h",..
++                       firing=%f,..
++                       dep_ut=[%f,%f],..
++                       label="",..
++                       nzcross=0,..
++                       nmode=0,..
++                       equations=list()),..
++              doc=list())
++scs_m_1=scicos_diagram(..
++        version="scicos4.2",..
++        props=scicos_params(..
++              wpar=[-159.096,811.104,-121.216,617.984,1323,1008,331,284,630,480,0,7,1.4],..
++              Title="ENDBLK",..
++              tol=[0.0001,0.000001,1.000D-10,100001,0,0],..
++              tf=100000,..
++              context=" ",..
++              void1=[],..
++              options=tlist(["scsopt","3D","Background","Link","ID","Cmap"],list(%t,33),[8,1],[1,5],..
++              list([5,1],[4,1]),[0.8,0.8,0.8]),..
++              void2=[],..
++              void3=[],..
++              doc=list()))
++scs_m_1.objs(1)=scicos_block(..
++                gui="END_c",..
++                graphics=scicos_graphics(..
++                         orig=[272.104,249.11733],..
++                         sz=[40,40],..
++                         flip=%t,..
++                         theta=0,..
++                         exprs="Tf",..
++                         pin=[],..
++                         pout=[],..
++                         pein=2,..
++                         peout=2,..
++                         gr_i=list("xstringb(orig(1),orig(2),'' END '',sz(1),sz(2),''fill'');",8),..
++                         id="",..
++                         in_implicit=[],..
++                         out_implicit=[]),..
++                model=scicos_model(..
++                         sim=list("scicosexit",4),..
++                         in=[],..
++                         in2=[],..
++                         intyp=1,..
++                         out=[],..
++                         out2=[],..
++                         outtyp=1,..
++                         evtin=1,..
++                         evtout=1,..
++                         state=[],..
++                         dstate=[],..
++                         odstate=list(),..
++                         rpar=[],..
++                         ipar=[],..
++                         opar=list(),..
++                         blocktype="d",..
++                         firing=6,..
++                         dep_ut=[%f,%f],..
++                         label="",..
++                         nzcross=0,..
++                         nmode=0,..
++                         equations=list()),..
++                doc=list())
++scs_m_1.objs(2)=scicos_link(..
++                  xx=[292.104;292.104;261.83733;261.83733;292.104;292.104],..
++                  yy=[243.40305;234.45067;234.45067;305.584;305.584;294.83162],..
++                  id="drawlink",..
++                  thick=[0,0],..
++                  ct=[5,-1],..
++                  from=[1,1,0],..
++                  to=[1,1,1])
++scs_m.objs(3)=scicos_block(..
++              gui="ENDBLK",..
++              graphics=scicos_graphics(..
++                       orig=[323.09377,260.98059],..
++                       sz=[20;20],..
++                       flip=%t,..
++                       theta=0,..
++                       exprs=[],..
++                       pin=[],..
++                       pout=[],..
++                       pein=[],..
++                       peout=[],..
++                       gr_i=list("xstringb(orig(1),orig(2),'' END '',sz(1),sz(2),''fill'')",8),..
++                       id="",..
++                       in_implicit=[],..
++                       out_implicit=[]),..
++              model=scicos_model(..
++                       sim="csuper",..
++                       in=[],..
++                       in2=[],..
++                       intyp=1,..
++                       out=[],..
++                       out2=[],..
++                       outtyp=1,..
++                       evtin=[],..
++                       evtout=[],..
++                       state=[],..
++                       dstate=[],..
++                       odstate=list(),..
++                       rpar=scs_m_1,..
++                       ipar=[],..
++                       opar=list(),..
++                       blocktype="h",..
++                       firing=[],..
++                       dep_ut=[%f,%f],..
++                       label="",..
++                       nzcross=0,..
++                       nmode=0,..
++                       equations=list()),..
++              doc=list())
++scs_m.objs(4)=scicos_block(..
++              gui="MBLOCK",..
++              graphics=scicos_graphics(..
++                       orig=[157.11041,141.0428],..
++                       sz=[60;100],..
++                       flip=%t,..
++                       theta=0,..
++                       exprs=tlist(..
++                       ["MBLOCK","in","intype","out","outtype","param","paramv","pprop","nameF","funtxt"],..
++                       """In""","""I""","[""Out"";""y1"";""y2"";""y3"";""y4"";""y5""]",..
++                       "[""I"";""E"";""E"";""E"";""E"";""E""]","[""R"";""L"";""C"";""N""]",..
++                       list("R","L","C","int32(9)"),"[0;0;0;0]","Transmission_Line",..
++                       ["model Transmission_Line";
++                       "     parameter Integer N=100;";
++                       "     parameter Integer np1=N+1;";
++                       "     parameter Real R=0.0018;";
++                       "     parameter Real L=1;";
++                       "     parameter Real C=1;";
++                       "     parameter Real r=R/N;";
++                       "     parameter Real l=L/N;";
++                       "     parameter Real c=C/N;";
++                       "";
++                       "     Real y1,y2,y3,y4, y5;";
++                       "     Real V[np1](start={ 0.0 for i in 1 : np1 });";
++                       "     Real vl[N](start={ 0.0 for i in 1 : N });";
++                       "     Real I[np1](start={ 0.0 for i in 1 : np1 });";
++                       "     Pin In,Out;";
++                       "     ";
++                       "equation";
++                       "";
++                       "/*-- output variables to be displayed -------*/";
++                       "y1=V[1];";
++                       "y2=V[div(np1,4)];";
++                       "y3=V[div(np1,2)];";
++                       "y4=V[div(3*np1,4)];";
++                       "y5=V[np1];";
++                       "/*-------------------------------------------*/";
++                       "   In.v=V[1];  ";
++                       "   In.i=I[1];";
++                       "";
++                       "  for j in 1:N loop";
++                       "     V[j]-vl[j]=I[j]*r;";
++                       "     l*der(I[j])=vl[j]-V[j+1];";
++                       "     c*der(V[j+1])=I[j]-I[j+1];";
++                       "  end for;";
++                       "";
++                       "  Out.v=V[np1];";
++                       "  Out.i=-I[np1];";
++                       "";
++                       "end Transmission_Line;"]),..
++                       pin=10,..
++                       pout=[11;13;14;15;16;17],..
++                       pein=[],..
++                       peout=[],..
++                       gr_i=list(..
++                       ["txt=[''Modelica'';'' Transmission_Line ''];";
++                       "xstringb(orig(1),orig(2),txt,sz(1),sz(2),''fill'')"],8),..
++                       id="",..
++                       in_implicit="I",..
++                       out_implicit=["I";"E";"E";"E";"E";"E"]),..
++              model=scicos_model(..
++                       sim=list("Transmission_Line",30004),..
++                       in=1,..
++                       in2=1,..
++                       intyp=1,..
++                       out=[1;1;1;1;1;1],..
++                       out2=[1;1;1;1;1;1],..
++                       outtyp=[1;1;1;1;1;1],..
++                       evtin=[],..
++                       evtout=[],..
++                       state=[],..
++                       dstate=[],..
++                       odstate=list(),..
++                       rpar=[0.0018;1;1;9],..
++                       ipar=[],..
++                       opar=list(),..
++                       blocktype="c",..
++                       firing=[],..
++                       dep_ut=[%f,%t],..
++                       label="",..
++                       nzcross=0,..
++                       nmode=0,..
++                       equations=tlist(["modelica","model","inputs","outputs","parameters"],"Transmission_Line",..
++                       "In",["Out";"y1";"y2";"y3";"y4";"y5"],..
++                       list(["R","L","C","N"],list(0.0018,1,1,int32(9))))),..
++              doc=list())
++scs_m.objs(5)=scicos_block(..
++              gui="MUX",..
++              graphics=scicos_graphics(..
++                       orig=[250.37368,164.20821],..
++                       sz=[10,40],..
++                       flip=%t,..
++                       theta=0,..
++                       exprs="5",..
++                       pin=[13;14;15;16;17],..
++                       pout=25,..
++                       pein=[],..
++                       peout=[],..
++                       gr_i=list(" ",8),..
++                       id="Mux",..
++                       in_implicit=["E";"E";"E";"E";"E"],..
++                       out_implicit="E"),..
++              model=scicos_model(..
++                       sim=list("multiplex",4),..
++                       in=[-1;-2;-3;-4;-5],..
++                       in2=[],..
++                       intyp=1,..
++                       out=0,..
++                       out2=[],..
++                       outtyp=1,..
++                       evtin=[],..
++                       evtout=[],..
++                       state=[],..
++                       dstate=[],..
++                       odstate=list(),..
++                       rpar=[],..
++                       ipar=5,..
++                       opar=list(),..
++                       blocktype="c",..
++                       firing=[],..
++                       dep_ut=[%t,%f],..
++                       label="",..
++                       nzcross=0,..
++                       nmode=0,..
++                       equations=list()),..
++              doc=list())
++scs_m.objs(6)=scicos_block(..
++              gui="CVS",..
++              graphics=scicos_graphics(..
++                       orig=[84.951532,132.47525],..
++                       sz=[42,60],..
++                       flip=%t,..
++                       theta=0,..
++                       exprs=[],..
++                       pin=[23;10],..
++                       pout=9,..
++                       pein=[],..
++                       peout=[],..
++                       gr_i=list(..
++                       ["";
++                       "if orient then";
++                       "  xpolys(orig(1)+[0.7142857,0.7142857,0.3714286,0.0571429,0.3714286;0.7142857,0.7142857,0.4285714,0.4142857,0.4285714]*sz(1),orig(2)+[0.7,0,0.54,0.5,0.46;0.98,0.3,0.5,0.5,0.5]*sz(2),[2,2,6,6,6])";
++                       "  xstring(orig(1)+0.1428571*sz(1),orig(2)+0.75*sz(2),""CVS"")";
++                       "  xrects([orig(1)+0.4285714*sz(1); orig(2)+0.7*sz(2);0.5714286*sz(1);0.4*sz(2)],0)";
++                       "  xstring(orig(1)+0.7*sz(1),orig(2)+0.55*sz(2),""+"")";
++                       "  xstring(orig(1)+0.7*sz(1),orig(2)+0.35*sz(2),""-"")";
++                       "else";
++                       "  xpolys(orig(1)+[0.2857143,0.2857143,0.6285714,0.9428571,0.6285714;0.2857143,0.2857143,0.5714286,0.5857143,0.5714286]*sz(1),orig(2)+[0.7,0,0.54,0.5,0.46;0.98,0.3,0.5,0.5,0.5]*sz(2),[2,2,6,6,6])";
++                       "  xstring(orig(1)+0.6*sz(1),orig(2)+0.75*sz(2),""CVS"")";
++                       "  xrects([orig(1)+0*sz(1); orig(2)+0.7*sz(2);0.5714286*sz(1);0.4*sz(2)],0)";
++                       "  xstring(orig(1)+sz(1)-(0.7*sz(1)),orig(2)+0.55*sz(2),""+"")";
++                       "  xstring(orig(1)+sz(1)-(0.7*sz(1)),orig(2)+0.35*sz(2),""-"")";
++                       "end"],[]),..
++                       id="",..
++                       in_implicit=["E";"I"],..
++                       out_implicit="I"),..
++              model=scicos_model(..
++                       sim="CVS",..
++                       in=[1;1],..
++                       in2=[],..
++                       intyp=1,..
++                       out=1,..
++                       out2=[],..
++                       outtyp=1,..
++                       evtin=[],..
++                       evtout=[],..
++                       state=[],..
++                       dstate=[],..
++                       odstate=list(),..
++                       rpar=[],..
++                       ipar=[],..
++                       opar=list(),..
++                       blocktype="c",..
++                       firing=[],..
++                       dep_ut=[%f,%t],..
++                       label="",..
++                       nzcross=0,..
++                       nmode=0,..
++                       equations=tlist(["modelica","model","inputs","outputs","parameters"],"CVS",["vin";"p"],"n",..
++                       list([],[],[]))),..
++              doc=list())
++scs_m.objs(7)=scicos_block(..
++              gui="Resistor",..
++              graphics=scicos_graphics(..
++                       orig=[280.76037,224.59505],..
++                       sz=[40,3.6],..
++                       flip=%t,..
++                       theta=0,..
++                       exprs="RL",..
++                       pin=11,..
++                       pout=18,..
++                       pein=[],..
++                       peout=[],..
++                       gr_i=list(..
++                       ["xx=[0,1,1,7,7,8,7,7,1,1]/8;";
++                       "yy=[1,1,0,0,1,1,1,2,2,1]/2;";
++                       "xpoly(orig(1)+xx*sz(1),orig(2)+yy*sz(2)); ";
++                       "rect=xstringl(0,0,''R=''+R)";
++                       "xstring(orig(1)+(sz(1)-rect(3))/2,orig(2)-rect(4)*1.2,''R=''+R);"],[]),..
++                       id="",..
++                       in_implicit="I",..
++                       out_implicit="I"),..
++              model=scicos_model(..
++                       sim="resistor",..
++                       in=1,..
++                       in2=[],..
++                       intyp=1,..
++                       out=1,..
++                       out2=[],..
++                       outtyp=1,..
++                       evtin=[],..
++                       evtout=[],..
++                       state=[],..
++                       dstate=[],..
++                       odstate=list(),..
++                       rpar=1,..
++                       ipar=[],..
++                       opar=list(),..
++                       blocktype="c",..
++                       firing=[],..
++                       dep_ut=[%t,%f],..
++                       label="",..
++                       nzcross=0,..
++                       nmode=0,..
++                       equations=tlist(["modelica","model","inputs","outputs","parameters"],"Resistor","p","n",..
++                       list("R",list(1)))),..
++              doc=list())
++scs_m.objs(8)=scicos_block(..
++              gui="Ground",..
++              graphics=scicos_graphics(..
++                       orig=[104.67552,97.909117],..
++                       sz=[20,20],..
++                       flip=%t,..
++                       theta=0,..
++                       exprs="",..
++                       pin=9,..
++                       pout=[],..
++                       pein=[],..
++                       peout=[],..
++                       gr_i=list(..
++                       ["xset(''thickness'',3)";
++                       "xsegs(orig(1)+sz(1)*[1/2 1/2],orig(2)+sz(2)*[1 1/2],0);";
++                       "xsegs(orig(1)+sz(1)*[0 1],orig(2)+sz(2)*[1/2 1/2],0);";
++                       "xsegs(orig(1)+sz(1)*[2/8 6/8],orig(2)+sz(2)*[1/4 1/4],0);";
++                       "xsegs(orig(1)+sz(1)*[3/8 5/8],orig(2)+sz(2)*[0 0],0);"],[]),..
++                       id="",..
++                       in_implicit="I",..
++                       out_implicit="I"),..
++              model=scicos_model(..
++                       sim="Ground",..
++                       in=1,..
++                       in2=[],..
++                       intyp=1,..
++                       out=[],..
++                       out2=[],..
++                       outtyp=1,..
++                       evtin=[],..
++                       evtout=[],..
++                       state=[],..
++                       dstate=[],..
++                       odstate=list(),..
++                       rpar=[],..
++                       ipar=[],..
++                       opar=list(),..
++                       blocktype="c",..
++                       firing=[],..
++                       dep_ut=[%t,%f],..
++                       label="",..
++                       nzcross=0,..
++                       nmode=0,..
++                       equations=tlist(["modelica","model","inputs","outputs","parameters"],"Ground","p",[],..
++                       list([],list()))),..
++              doc=list())
++scs_m.objs(9)=scicos_link(..
++                xx=[114.35153;114.67552],..
++                yy=[133.67525;123.6234],..
++                id="drawlink",..
++                thick=[0,0],..
++                ct=[1,2],..
++                from=[6,1,0],..
++                to=[8,1,1])
++scs_m.objs(10)=scicos_link(..
++                 xx=[114.35153;148.53898],..
++                 yy=[191.27525;191.0428],..
++                 id="drawlink",..
++                 thick=[0,0],..
++                 ct=[1,2],..
++                 from=[6,2,1],..
++                 to=[4,1,1])
++scs_m.objs(11)=scicos_link(..
++                 xx=[225.68184;272.18894],..
++                 yy=[226.75709;226.39505],..
++                 id="drawlink",..
++                 thick=[0,0],..
++                 ct=[1,2],..
++                 from=[4,1,0],..
++                 to=[7,1,1])
++scs_m.objs(12)=scicos_block(..
++               gui="Ground",..
++               graphics=scicos_graphics(..
++                        orig=[327.09985,200.53941],..
++                        sz=[20,20],..
++                        flip=%t,..
++                        theta=0,..
++                        exprs="",..
++                        pin=18,..
++                        pout=[],..
++                        pein=[],..
++                        peout=[],..
++                        gr_i=list(..
++                        ["xset(''thickness'',3)";
++                        "xsegs(orig(1)+sz(1)*[1/2 1/2],orig(2)+sz(2)*[1 1/2],0);";
++                        "xsegs(orig(1)+sz(1)*[0 1],orig(2)+sz(2)*[1/2 1/2],0);";
++                        "xsegs(orig(1)+sz(1)*[2/8 6/8],orig(2)+sz(2)*[1/4 1/4],0);";
++                        "xsegs(orig(1)+sz(1)*[3/8 5/8],orig(2)+sz(2)*[0 0],0);"],[]),..
++                        id="",..
++                        in_implicit="I",..
++                        out_implicit="I"),..
++               model=scicos_model(..
++                        sim="Ground",..
++                        in=1,..
++                        in2=[],..
++                        intyp=1,..
++                        out=[],..
++                        out2=[],..
++                        outtyp=1,..
++                        evtin=[],..
++                        evtout=[],..
++                        state=[],..
++                        dstate=[],..
++                        odstate=list(),..
++                        rpar=[],..
++                        ipar=[],..
++                        opar=list(),..
++                        blocktype="c",..
++                        firing=[],..
++                        dep_ut=[%t,%f],..
++                        label="",..
++                        nzcross=0,..
++                        nmode=0,..
++                        equations=tlist(["modelica","model","inputs","outputs","parameters"],"Ground","p",[],..
++                        list([],list()))),..
++               doc=list())
++scs_m.objs(13)=scicos_link(..
++                 xx=[225.68184;241.80225],..
++                 yy=[212.47137;197.54154],..
++                 id="drawlink",..
++                 thick=[0,0],..
++                 ct=[1,1],..
++                 from=[4,2,0],..
++                 to=[5,1,1])
++scs_m.objs(14)=scicos_link(..
++                 xx=[225.68184;241.80225],..
++                 yy=[198.18566;190.87487],..
++                 id="drawlink",..
++                 thick=[0,0],..
++                 ct=[1,1],..
++                 from=[4,3,0],..
++                 to=[5,2,1])
++scs_m.objs(15)=scicos_link(..
++                 xx=[225.68184;241.80225],..
++                 yy=[183.89994;184.20821],..
++                 id="drawlink",..
++                 thick=[0,0],..
++                 ct=[1,1],..
++                 from=[4,4,0],..
++                 to=[5,3,1])
++scs_m.objs(16)=scicos_link(..
++                 xx=[225.68184;241.80225],..
++                 yy=[169.61423;177.54154],..
++                 id="drawlink",..
++                 thick=[0,0],..
++                 ct=[1,1],..
++                 from=[4,5,0],..
++                 to=[5,4,1])
++scs_m.objs(17)=scicos_link(..
++                 xx=[225.68184;241.80225],..
++                 yy=[155.32851;170.87487],..
++                 id="drawlink",..
++                 thick=[0,0],..
++                 ct=[1,1],..
++                 from=[4,6,0],..
++                 to=[5,5,1])
++scs_m.objs(18)=scicos_link(..
++                 xx=[329.3318;337.09985],..
++                 yy=[226.39505;226.25369],..
++                 id="drawlink",..
++                 thick=[0,0],..
++                 ct=[1,2],..
++                 from=[7,1,0],..
++                 to=[12,1,1])
++scs_m.objs(19)=scicos_link(..
++                 xx=[383.90351;384.1858],..
++                 yy=[240.83506;203.11222],..
++                 id="drawlink",..
++                 thick=[0,0],..
++                 ct=[5,-1],..
++                 from=[2,1,0],..
++                 to=[1,1,1])
++scs_m_1=scicos_diagram(..
++        version="scicos4.2",..
++        props=scicos_params(..
++              wpar=[600,450,0,0,600,450],..
++              Title=["Sigbuilder","./"],..
++              tol=[0.0001;0.000001;1.000D-10;100001;0;0;0],..
++              tf=100,..
++              context=" ",..
++              void1=[],..
++              options=tlist(["scsopt","3D","Background","Link","ID","Cmap"],list(%t,33),[8,1],[1,5],..
++              list([5,1],[4,1]),[0.8,0.8,0.8]),..
++              void2=[],..
++              void3=[],..
++              doc=list()))
++scs_m_1.objs(1)=scicos_block(..
++                gui="CURVE_c",..
++                graphics=scicos_graphics(..
++                         orig=[329.63473,606.18517],..
++                         sz=[40,40],..
++                         flip=%t,..
++                         theta=0,..
++                         exprs=["0";"[0,1,2]";"[0,1,1]";"n";"n"],..
++                         pin=[],..
++                         pout=6,..
++                         pein=4,..
++                         peout=2,..
++                         gr_i=list(..
++                         ["rpar=arg1.model.rpar;n=model.ipar(1);order=model.ipar(2);";
++                         "xx=rpar(1:n);yy=rpar(n+1:2*n);";
++                         "[XX,YY,rpardummy]=Do_Spline(n,order,xx,yy)";
++                         "xmx=maxi(XX);xmn=mini(XX);";
++                         "ymx=maxi(YY);ymn=mini(YY);";
++                         "dx=xmx-xmn;if dx==0 then dx=maxi(xmx/2,1);end";
++                         "xmn=xmn-dx/20;xmx=xmx+dx/20;";
++                         "dy=ymx-ymn;if dy==0 then dy=maxi(ymx/2,1);end;";
++                         "ymn=ymn-dy/20;ymx=ymx+dy/20;";
++                         "xx2=orig(1)+sz(1)*((XX-xmn)/(xmx-xmn));";
++                         "yy2=orig(2)+sz(2)*((YY-ymn)/(ymx-ymn));";
++                         "xset(''color'',2)";
++                         "xpoly(xx2,yy2,''lines'');"],8),..
++                         id="",..
++                         in_implicit=[],..
++                         out_implicit="E"),..
++                model=scicos_model(..
++                         sim=list("curve_c",4),..
++                         in=[],..
++                         in2=[],..
++                         intyp=1,..
++                         out=1,..
++                         out2=[],..
++                         outtyp=1,..
++                         evtin=1,..
++                         evtout=1,..
++                         state=[],..
++                         dstate=[],..
++                         odstate=list(),..
++                         rpar=[0;1;2;0;1;1],..
++                         ipar=[3;0;0],..
++                         opar=list(),..
++                         blocktype="c",..
++                         firing=0,..
++                         dep_ut=[%f,%t],..
++                         label="",..
++                         nzcross=0,..
++                         nmode=0,..
++                         equations=list()),..
++                doc=list())
++scs_m_1.objs(2)=scicos_link(..
++                  xx=[349.63473;349.49528],..
++                  yy=[600.47089;565.10704],..
++                  id="drawlink",..
++                  thick=[0,0],..
++                  ct=[5,-1],..
++                  from=[1,1,0],..
++                  to=[3,1,1])
++scs_m_1.objs(3)=scicos_block(..
++                gui="CLKSPLIT_f",..
++                graphics=scicos_graphics(..
++                         orig=[349.49528;565.10704],..
++                         sz=[0.3333333,0.3333333],..
++                         flip=%t,..
++                         theta=0,..
++                         exprs=[],..
++                         pin=[],..
++                         pout=[],..
++                         pein=2,..
++                         peout=[8;4],..
++                         gr_i=list([],8),..
++                         id="",..
++                         in_implicit=[],..
++                         out_implicit=[]),..
++                model=scicos_model(..
++                         sim="split",..
++                         in=[],..
++                         in2=[],..
++                         intyp=1,..
++                         out=[],..
++                         out2=[],..
++                         outtyp=1,..
++                         evtin=1,..
++                         evtout=[1;1],..
++                         state=[],..
++                         dstate=[],..
++                         odstate=list(),..
++                         rpar=[],..
++                         ipar=[],..
++                         opar=list(),..
++                         blocktype="d",..
++                         firing=[%f,%f,%f],..
++                         dep_ut=[%f,%f],..
++                         label="",..
++                         nzcross=0,..
++                         nmode=0,..
++                         equations=list()),..
++                doc=list())
++scs_m_1.objs(4)=scicos_link(..
++                  xx=[349.49528;266.69602;266.69602;270.35525;342.80795;342.80795;349.63473],..
++                  yy=[565.10704;565.10704;680.99483;680.99483;680.99483;651.89946;651.89946],..
++                  id="drawlink",..
++                  thick=[0,0],..
++                  ct=[5,-1],..
++                  from=[3,2,0],..
++                  to=[1,1,1])
++scs_m_1.objs(5)=scicos_block(..
++                gui="OUT_f",..
++                graphics=scicos_graphics(..
++                         orig=[398.20616,616.18517],..
++                         sz=[20,20],..
++                         flip=%t,..
++                         theta=0,..
++                         exprs="1",..
++                         pin=6,..
++                         pout=[],..
++                         pein=[],..
++                         peout=[],..
++                         gr_i=list(" ",8),..
++                         id="",..
++                         in_implicit="E",..
++                         out_implicit=[]),..
++                model=scicos_model(..
++                         sim="output",..
++                         in=-1,..
++                         in2=-2,..
++                         intyp=-1,..
++                         out=[],..
++                         out2=[],..
++                         outtyp=1,..
++                         evtin=[],..
++                         evtout=[],..
++                         state=[],..
++                         dstate=[],..
++                         odstate=list(),..
++                         rpar=[],..
++                         ipar=1,..
++                         opar=list(),..
++                         blocktype="c",..
++                         firing=[],..
++                         dep_ut=[%f,%f],..
++                         label="",..
++                         nzcross=0,..
++                         nmode=0,..
++                         equations=list()),..
++                doc=list())
++scs_m_1.objs(6)=scicos_link(..
++                  xx=[378.20616;398.20616],..
++                  yy=[626.18517;626.18517],..
++                  id="drawlink",..
++                  thick=[0,0],..
++                  ct=[1,1],..
++                  from=[1,1,0],..
++                  to=[5,1,1])
++scs_m_1.objs(7)=scicos_block(..
++                gui="CLKOUTV_f",..
++                graphics=scicos_graphics(..
++                         orig=[339.49528,505.10704],..
++                         sz=[20,30],..
++                         flip=%t,..
++                         theta=0,..
++                         exprs="1",..
++                         pin=[],..
++                         pout=[],..
++                         pein=8,..
++                         peout=[],..
++                         gr_i=list(" ",8),..
++                         id="",..
++                         in_implicit=[],..
++                         out_implicit=[]),..
++                model=scicos_model(..
++                         sim="output",..
++                         in=[],..
++                         in2=[],..
++                         intyp=1,..
++                         out=[],..
++                         out2=[],..
++                         outtyp=1,..
++                         evtin=1,..
++                         evtout=[],..
++                         state=[],..
++                         dstate=[],..
++                         odstate=list(),..
++                         rpar=[],..
++                         ipar=1,..
++                         opar=list(),..
++                         blocktype="d",..
++                         firing=[],..
++                         dep_ut=[%f,%f],..
++                         label="",..
++                         nzcross=0,..
++                         nmode=0,..
++                         equations=list()),..
++                doc=list())
++scs_m_1.objs(8)=scicos_link(..
++                  xx=[349.49528;349.49528],..
++                  yy=[565.10704;535.10704],..
++                  id="drawlink",..
++                  thick=[0,0],..
++                  ct=[5,-1],..
++                  from=[3,1,0],..
++                  to=[7,1,1])
++scs_m.objs(20)=scicos_block(..
++               gui="Sigbuilder",..
++               graphics=scicos_graphics(..
++                        orig=[12.952744,142.61381],..
++                        sz=[40,40],..
++                        flip=%t,..
++                        theta=0,..
++                        exprs=[],..
++                        pin=[],..
++                        pout=21,..
++                        pein=[],..
++                        peout=0,..
++                        gr_i=list(..
++                        ["ipar=arg1.model.rpar.objs(1).model.ipar";
++                        "rpar=arg1.model.rpar.objs(1).model.rpar";
++                        "n=ipar(1);order=ipar(2);";
++                        "xx=rpar(1:n);yy=rpar(n+1:2*n);";
++                        "[XX,YY,rpardummy]=Do_Spline2(n,order,xx,yy)";
++                        "xmx=maxi(XX);xmn=mini(XX);";
++                        "ymx=maxi(YY);ymn=mini(YY);";
++                        "dx=xmx-xmn;if dx==0 then dx=maxi(xmx/2,1);end";
++                        "xmn=xmn-dx/20;xmx=xmx+dx/20;";
++                        "dy=ymx-ymn;if dy==0 then dy=maxi(ymx/2,1);end;";
++                        "ymn=ymn-dy/20;ymx=ymx+dy/20;";
++                        "rect=[xmn,ymn;xmx,ymx];";
++                        "xx2=orig(1)+sz(1)*((XX-xmn)/(xmx-xmn));";
++                        "yy2=orig(2)+sz(2)*((YY-ymn)/(ymx-ymn));";
++                        "xset(''color'',2)";
++                        "xpoly(xx2,yy2,''lines'');"],8),..
++                        id="",..
++                        in_implicit=[],..
++                        out_implicit="E"),..
++               model=scicos_model(..
++                        sim="csuper",..
++                        in=[],..
++                        in2=[],..
++                        intyp=1,..
++                        out=-1,..
++                        out2=[],..
++                        outtyp=1,..
++                        evtin=[],..
++                        evtout=1,..
++                        state=[],..
++                        dstate=[],..
++                        odstate=list(),..
++                        rpar=scs_m_1,..
++                        ipar=[],..
++                        opar=list(),..
++                        blocktype="h",..
++                        firing=[],..
++                        dep_ut=[%f,%f],..
++                        label="",..
++                        nzcross=0,..
++                        nmode=0,..
++                        equations=list()),..
++               doc=list())
++scs_m.objs(21)=scicos_link(..
++                 xx=[61.524173;71.778005],..
++                 yy=[162.61381;162.54959],..
++                 id="drawlink",..
++                 thick=[0,0],..
++                 ct=[1,1],..
++                 from=[20,1,0],..
++                 to=[22,1,1])
++scs_m.objs(22)=scicos_block(..
++               gui="SPLIT_f",..
++               graphics=scicos_graphics(..
++                        orig=[71.778005;162.54959],..
++                        sz=[0.3333333,0.3333333],..
++                        flip=%t,..
++                        theta=0,..
++                        exprs=[],..
++                        pin=21,..
++                        pout=[23;24],..
++                        pein=[],..
++                        peout=[],..
++                        gr_i=list([],8),..
++                        id="",..
++                        in_implicit="E",..
++                        out_implicit=["E";"E";"E"]),..
++               model=scicos_model(..
++                        sim="lsplit",..
++                        in=-1,..
++                        in2=[],..
++                        intyp=1,..
++                        out=[-1;-1;-1],..
++                        out2=[],..
++                        outtyp=1,..
++                        evtin=[],..
++                        evtout=[],..
++                        state=[],..
++                        dstate=[],..
++                        odstate=list(),..
++                        rpar=[],..
++                        ipar=[],..
++                        opar=list(),..
++                        blocktype="c",..
++                        firing=[],..
++                        dep_ut=[%t,%f],..
++                        label="",..
++                        nzcross=0,..
++                        nmode=0,..
++                        equations=list()),..
++               doc=list())
++scs_m.objs(23)=scicos_link(..
++                 xx=[71.778005;83.648675],..
++                 yy=[162.54959;162.47525],..
++                 id="drawlink",..
++                 thick=[0,0],..
++                 ct=[1,1],..
++                 from=[22,1,0],..
++                 to=[6,1,1])
++scs_m.objs(24)=scicos_link(..
++                 xx=[71.778005;71.778005;328.42557;328.42557;355.61437],..
++                 yy=[162.54959;79.189497;79.189497;170.73126;170.73126],..
++                 id="drawlink",..
++                 thick=[0,0],..
++                 ct=[1,1],..
++                 from=[22,2,0],..
++                 to=[1,2,1])
++scs_m.objs(25)=scicos_link(..
++                 xx=[268.94511;285.09075;355.61437],..
++                 yy=[184.20821;184.0646;184.0646],..
++                 id="drawlink",..
++                 thick=[0,0],..
++                 ct=[1,1],..
++                 from=[5,1,0],..
++                 to=[1,1,1])
++ 
++ 
@@@ -6,5 -6,5 +6,6 @@@
  //
  
  thispath = get_absolute_file_path("ball_platform.dem.sce");
- scicos_demonstration(thispath+"/Ball_Platform.cosf");
+ xcos(thispath+"/Ball_Platform.cosf");
++
  clear thispath;
@@@ -6,5 -6,5 +6,6 @@@
  //
  
  thispath = get_absolute_file_path("modelica_bouncing_ball.dem.sce");
- scicos_demonstration(thispath+"/BouncingBall_Modelica.cosf");
+ xcos(thispath+"/BouncingBall_Modelica.cosf");
++
  clear thispath;
@@@ -16,7 -16,7 +16,7 @@@ function [x,y,typ]=PENDULUM_ANIM(job,ar
      graphics=arg1.graphics;exprs=graphics.exprs
      model=arg1.model;dstate=model.dstate
      while %t do
--      [ok,plen,csiz,phi,xmin,xmax,ymin,ymax,exprs]=getvalue(..
++      [ok,plen,csiz,phi,xmin,xmax,ymin,ymax,exprs]=scicos_getvalue(..
          'Set Scope parameters',..
          ['pendulum length';'cart size (square side)';'slope';
          'Xmin';'Xmax';  'Ymin'; 'Ymax'; ],..
@@@ -6,5 -6,9 +6,7 @@@
  //
  
  thispath = get_absolute_file_path("bounce.dem.sce");
- scicos_demonstration(thispath+"/bounce.cosf");
+ // scicos_demostration(thispath+"/bounce.cosf");
 -
+ //Open the cosf file with xcos
+ xcos(thispath+"/bounce.cosf"); 
 -
  clear thispath;
@@@ -6,5 -6,8 +6,7 @@@
  //
  
  thispath = get_absolute_file_path("bouncing_ball.dem.sce");
- scicos_demonstration(thispath+"/Bouncing_ball.cosf");
+ // scicos_demostration(thispath+"/Bouncing_ball.cosf");
 -
+ // Open the cosf file with xcos
+ xcos(thispath+"/Bouncing_ball.cosf");
  clear thispath;
@@@ -6,5 -6,9 +6,7 @@@
  //
  
  thispath = get_absolute_file_path("cont_sys_disc_cont.dem.sce");
- scicos_demonstration(thispath+"/Cont.Disc-Observer.cosf");
+ // scicos_demostration(thispath+"/Cont.Disc-Observer.cosf");
 -
+ // Open the cosf file with xcos
+ xcos(thispath+"/Cont.Disc-Observer.cosf");
 -
  clear thispath;
@@@ -6,5 -6,9 +6,7 @@@
  //
  
  thispath = get_absolute_file_path("demo_flipflop.dem.sce");
- scicos_demonstration(thispath+"/demo_flipflop.cos");
+ // scicos_demostration(thispath+"/demo_flipflop.cos");
 -
+ //Open the cosf file with xcos
+ xcos(thispath+"/demo_flipflop.cosf");
 -
  clear thispath;
@@@ -6,5 -6,9 +6,8 @@@
  //
  
  thispath = get_absolute_file_path("demo_watertank.dem.sce");
- scicos_demonstration(thispath+"/demo_watertank.cosf");
+ // scicos_demostration(thispath+"/demo_watertank.cosf");
+ //Open the cosf file with xcos
+ xcos(thispath+"/demo_watertank.cosf");
 -
  clear thispath;
@@@ -6,5 -6,8 +6,9 @@@
  //
  
  thispath = get_absolute_file_path("fibonacci.dem.sce");
- scicos_demonstration(thispath+"/Fibonacci.cosf");
+ // scicos_demostration(thispath+"/Fibonacci.cosf");
+ // Open the cosf file with xcos
+ xcos(thispath+"/Fibonacci.cosf");
++
  clear thispath;
@@@ -6,5 -6,8 +6,9 @@@
  //
  
  thispath = get_absolute_file_path("goto_demo.dem.sce");
- scicos_demonstration(thispath+"/goto_demo.cos");
+ // scicos_demostration(thispath+"/goto_demo.cos");
+ // Open the cosf file with xcos
+ xcos_demostration(thispath+"/goto_demo.cosf");
++
  clear thispath;
@@@ -6,5 -6,8 +6,9 @@@
  //
  
  thispath = get_absolute_file_path("goto_from.dem.sce");
- scicos_demonstration(thispath+"/goto_demo.cosf");
+ //scicos_demostration(thispath+"/goto_demo.cosf");
+ // Open the cosf file with xcos
+ xcos(thispath+"/goto_demo.cosf");
++
  clear thispath;
@@@ -6,5 -6,8 +6,9 @@@
  //
  
  thispath = get_absolute_file_path("if_scicos_block.dem.sce");
- scicos_demonstration(thispath+"/IF_block.cosf");
+ //scicos_demostration(thispath+"/IF_block.cosf");
+ // Open the cosf file with xcos
+ xcos(thispath+"/IF_block.cosf");
++
  clear thispath;
@@@ -5,8 -5,9 +5,8 @@@
  // This file is distributed under the same license as the Scilab package.
  //
  
- thispath = get_absolute_file_path("inv_pend_anim.dem.sce");
- exec(thispath+"/PENDULUM_ANIM.sci");
- exec(thispath+"/anim_pen.sci");
- scicos_demonstration(thispath+"/pendulum_anim5.cosf");
- clear th
+ exec("SCI/modules/xcos/demos/PENDULUM_ANIM.sci");
+ exec("SCI/modules/xcos/demos/anim_pen.sci");
+ // Open the cosf file with xcos
+ xcos("SCI/modules/scicos/demos/pendulum_anim5.cosf");
 -
@@@ -6,5 -6,8 +6,9 @@@
  //
  
  thispath = get_absolute_file_path("inverted_pend.dem.sce");
- scicos_demonstration(thispath+"/Inverted_pendulum.cosf");
+ // scicos_demostration(thispath+"/Inverted_pendulum.cosf");
+ // Open the cosf file with xcos
+ xcos(thispath+"/Inverted_pendulum.cosf");
++
  clear thispath;
@@@ -6,5 -6,9 +6,10 @@@
  //
  
  thispath = get_absolute_file_path("kalman.dem.sce");
- scicos_demonstration(thispath+"/Kalman.cosf");
+ // scicos_demostration(thispath+"/Kalman.cosf");
+ // Open the cosf file with xcos
+ xcos(thispath+"/Kalman.cosf");
++
  clear thispath;
@@@ -6,5 -6,8 +6,9 @@@
  //
  
  thispath = get_absolute_file_path("simple_demo.dem.sce");
- scicos_demonstration(thispath+"/Simple_Demo.cosf");
+ // scicos_demostration(thispath+"/Simple_Demo.cosf");
+ // Open the cosf file with xcos
+ xcos(thispath+"/Simple_Demo.cosf");
++
  clear thispath;
@@@ -6,5 -6,8 +6,9 @@@
  //
  
  thispath = get_absolute_file_path("table_lookup.dem.sce");
- scicos_demonstration(thispath+"/Table_Lookup.cosf");
+ //scicos_demostration(thispath+"/Table_Lookup.cosf");
+ // Open the cosf file with xcos
+ xcos(thispath+"/Table_Lookup.cosf");
++
  clear thispath;
@@@ -6,5 -6,8 +6,9 @@@
  //
  
  thispath = get_absolute_file_path("temp_controller.dem.sce");
- scicos_demonstration(thispath+"/Temperature_Controller.cosf");
+ // scicos_demostration(thispath+"/Temperature_Controller.cosf");
+ // Open the cosf file with xcos
+ xcos(thispath+"/Temperature_Controller.cosf");
++
  clear thispath;
@@@ -6,5 -6,8 +6,9 @@@
  //
  
  thispath = get_absolute_file_path("zero_crossing.dem.sce");
- scicos_demonstration(thispath+"/Threshold_ZeroCrossing.cosf");
+ // scicos_demostration(thispath+"/Threshold_ZeroCrossing.cosf");
+ // Open the cosf file with xcos
+ xcos(thispath+"/Threshold_ZeroCrossing.cosf");
++
  clear thispath;
@@@ -24,9 -24,24 +24,26 @@@ en
  // Add demos
  // =============================================================================
  if WITH_DEMOS then
-       pathdemos = pathconvert(SCI+"/modules/scicos/demos/scicos.dem.gateway.sce",%f,%t);
-       add_demo(gettext("Scicos"),pathdemos);
-       clear pathdemos;
+       //pathdemos = pathconvert(SCI+"/modules/scicos/demos/scicos.dem.gateway.sce",%f,%t);
+       //add_demo(gettext("Xcos"),pathdemos);
+       //clear pathdemos;
  end
  
+ // Define Scicos data tables ===========================================
+   if ( ~isdef("scicos_pal") | ~isdef("%scicos_menu") | ..
+        ~isdef("%scicos_short") | ~isdef("%scicos_help") | ..
+        ~isdef("%scicos_display_mode") | ~isdef("modelica_libs") | ..
+        ~isdef("scicos_pal_libs") ) then
 -    [scicos_pal, %scicos_menu, %scicos_short, %scicos_help, ...
 -     %scicos_display_mode, modelica_libs,scicos_pal_libs, ...
 -     %scicos_lhb_list, %CmenuTypeOneVector, %scicos_gif,...
 -       %scicos_contrib ] = initial_scicos_tables()
++    
++     [scicos_pal, %scicos_menu, %scicos_short, modelica_libs, scicos_pal_libs,...
++     %scicos_lhb_list, %CmenuTypeOneVector, %scicos_gif,%scicos_contrib, ..
++     %scicos_libs, %scicos_with_grid, %scs_wgrid] = initial_scicos_tables();
+     clear initial_scicos_tables
+   end
+ // Define Scicos data tables ===========================================
++
 +// =============================================================================
index 9d1b8a3,0000000..40b9719
mode 100644,000000..100644
--- /dev/null
@@@ -1,64 -1,0 +1,64 @@@
 +//  Scicos
 +//
 +//  Copyright (C) INRIA - METALAU Project <scicos@inria.fr>
 +//
 +// This program is free software; you can redistribute it and/or modify
 +// it under the terms of the GNU General Public License as published by
 +// the Free Software Foundation; either version 2 of the License, or
 +// (at your option) any later version.
 +//
 +// This program is distributed in the hope that it will be useful,
 +// but WITHOUT ANY WARRANTY; without even the implied warranty of
 +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 +// GNU General Public License for more details.
 +//
 +// You should have received a copy of the GNU General Public License
 +// along with this program; if not, write to the Free Software
 +// Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
 +//
 +// See the file ../license.txt
 +//
 +
 +function XcosMenuSaveasInterfFunc()
 +
 +    Cmenu = []
 +    ok = %f
 +    
 +    while ~ok then
 +      fname = savefile('*.sci')
 +      if fname<>emptystr() then 
 +      [Dir,name,ext] = splitfilepath_cos(fname)
 +      select ext
 +      case 'sci' then
 +        ok=%t
 +      else
 +        messagebox('Only *.sci files allowed','modal');
 +        ok = %f
 +      end
 +      else
 +      ok = %t
 +      end
 +    end
 +    
 +    if fname<>emptystr() then
 +      scs_m.props.title(1) = name
-       [ok, %wh] = getvalue(['Enter the type of Interf. Func. to create'],..
++      [ok, %wh] = scicos_getvalue(['Enter the type of Interf. Func. to create'],..
 +                         ['Block(0) or SuperBlock(1)'],list('vec','1'),..
 +                         ['1'])
 +      if ok then
 +      scs_m.props.title(1) = name
 +      if  %wh==0 then
 +        %path = save_csuper(scs_m,Dir)
 +      else
 +        %path = save_super(scs_m,Dir)
 +      end
 +      
 +      if %path<>[] then 
 +        if execstr('exec(%path)','errcatch')<>0 then
 +           messagebox([name+': error:'
 +                    lasterror()],'modal')
 +        end
 +      end
 +      end
 +    end
 +endfunction
@@@ -196,800 -147,555 +196,800 @@@ function [ok,XX,gui_path,flgcdgen,szclk
      return
    end
  
 -  //**
 -  nx=xptr(bk+1)-xptr(bk);
 -  nz=zptr(bk+1)-zptr(bk);
 -  nrpar=rpptr(bk+1)-rpptr(bk);
 -  nipar=ipptr(bk+1)-ipptr(bk);
 -  nin=inpptr(bk+1)-inpptr(bk);  //* number of input ports */
 -  nout=outptr(bk+1)-outptr(bk); //* number of output ports */
 +  //@@ Alan, 04/12/08, adjust scope win number if needed
 +  [bllst,ok]=adjust_id_scopes(list_of_scopes,bllst)
 +  if ~ok then
 +    %cpr=list()
 +    messagebox(_('Problem adjusting scope id number.'),'modal','error')
 +    return
 +  end
  
 -  //**
 -  //l'adresse du pointeur de ipar
 -  if nipar<>0 then ipar=ipptr(bk), else ipar=1;end
 -  //l'adresse du pointeur de rpar
 -  if nrpar<>0 then rpar=rpptr(bk), else rpar=1; end
 -  //l'adresse du pointeur de z attention -1 pas sur
 -  if nz<>0 then z=zptr(bk)-1, else z=0;end
 -  //l'adresse du pointeur de x
 -  if nx<>0 then x=xptr(bk)-1, else x=0;end
 +  //###########################//
 +  //## Detect implicit block ##//
  
 -  //**
 -  ftyp=funtyp(bk)
 -  if ftyp>2000 then ftyp=ftyp-2000,end
 -  if ftyp>1000 then ftyp=ftyp-1000,end
 +  //## Force here generation of implicit block
 +  //## impl_blk = %t;
 +  //## %scicos_solver=100;
  
 -  //** check function type
 -  if ftyp < 0 then //** ifthenelse eselect blocks
 -      txt = [];
 -      return;
 -  else
 -    if (ftyp<>0 & ftyp<>1 & ftyp<>2 & ftyp<>3 & ftyp<>4) then
 -      disp("types other than 0,1,2,3 or 4 are not supported.")
 -      txt = [];
 -      return;
 +  impl_blk = %f;
 +  for blki=bllst
 +    if type(blki.sim)==15 then
 +      if blki.sim(2)>10000 then
 +        impl_blk = %t;
 +        %scicos_solver=100;
 +        break;
 +      end
      end
    end
 +  //###########################//
  
 -  select ftyp
 +  if ~ALL then
 +    if flgcdgen<> szclkIN
 +      clkIN=[clkIN flgcdgen]
 +    end
 +    szclkINTemp=szclkIN;
 +    szclkIN=flgcdgen;
 +  end
  
 -    case 0 then
 -      //**** input/output addresses definition ****//
 -      if nin>1 then
 -        for k=1:nin
 -          uk=inplnk(inpptr(bk)-1+k);
 -          nuk=size(outtb(uk),'*');
 -          txt=[txt;
 -               'rdouttb['+string(k-1)+']=(double *)'+rdnom+'_block_outtbptr['+string(uk-1)+'];']
 -        end
 -        txt=[txt;
 -             'args[0]=&(rdouttb[0]);']
 -      elseif nin==0
 -        uk=0;
 -        nuk=0;
 -        txt=[txt;
 -             'args[0]=(double *)'+rdnom+'_block_outtbptr[0];']
 -      else
 -        uk=inplnk(inpptr(bk));
 -        nuk=size(outtb(uk),'*');
 -        txt=[txt;
 -             'args[0]=(double *)'+rdnom+'_block_outtbptr['+string(uk-1)+'];']
 -      end
 +  //Test for  ALWAYS_ACTIVE sblock (RN -25/06/07)
 +  ALWAYS_ACTIVE=%f;
 +  for blki=bllst
 +    if blki.dep_ut($) then
 +      ALWAYS_ACTIVE=%t;
 +      break;
 +    end
 +  end
  
 -      if nout>1 then
 -        for k=1:nout
 -          yk=outlnk(outptr(bk)-1+k);
 -          nyk=size(outtb(yk),'*');
 -          txt=[txt;
 -               'rdouttb['+string(k+nin-1)+']=(double *)'+rdnom+'_block_outtbptr['+string(yk-1)+'];'];
 +  if ALWAYS_ACTIVE then
 +    for Ii=1:length(bllst)
 +      if type(bllst(Ii).sim(1))==10 then
 +        if part(bllst(Ii).sim(1),1:7)=='capteur' then
 +          bllst(Ii).dep_ut($)=%t
          end
 -        txt=[txt;
 -             'args[1]=&(rdouttb['+string(nin)+']);'];
 -      elseif nout==0
 -        yk=0;
 -        nyk=0;
 -        txt=[txt;
 -             'args[1]=(double *)'+rdnom+'_block_outtbptr[0];'];
 -      else
 -        yk=outlnk(outptr(bk));
 -        nyk=size(outtb(yk),'*'),;
 -        txt=[txt;
 -             'args[1]=(double *)'+rdnom+'_block_outtbptr['+string(yk-1)+'];'];
        end
 -      //*******************************************//
 +    end
 +  end
  
 -      //*********** call seq definition ***********//
 -      txtc=['(&local_flag,&block_'+rdnom+'['+string(bk-1)+'].nevprt,&t,block_'+rdnom+'['+string(bk-1)+'].xd, \';
 -            'block_'+rdnom+'['+string(bk-1)+'].x,&block_'+rdnom+'['+string(bk-1)+'].nx, \';
 -            'block_'+rdnom+'['+string(bk-1)+'].z,&block_'+rdnom+'['+string(bk-1)+'].nz,block_'+rdnom+'['+string(bk-1)+'].evout, \';
 -            '&block_'+rdnom+'['+string(bk-1)+'].nevout,block_'+rdnom+'['+string(bk-1)+'].rpar,&block_'+rdnom+'['+string(bk-1)+'].nrpar, \';
 -            'block_'+rdnom+'['+string(bk-1)+'].ipar,&block_'+rdnom+'['+string(bk-1)+'].nipar, \';
 -            '(double *)args[0],&nrd_'+string(nuk)+',(double *)args[1],&nrd_'+string(nyk)+');'];
 -      if (funtyp(bk)>2000 & funtyp(bk)<3000)
 -        blank = get_blank(funs(bk)+'( ');
 -        txtc(1) = funs(bk)+txtc(1);
 -      elseif (funtyp(bk)<2000)
 -        txtc(1) = 'C2F('+funs(bk)+')'+txtc(1);
 -        blank = get_blank('C2F('+funs(bk)+') ');
 -      end
 -      txtc(2:$) = blank + txtc(2:$);
 -      txt = [txt;txtc];
 -      //*******************************************//
 +  // *********************************************************
 +  // build various index tables :
 +  // cap  : indices of sensors blk in bllst
 +  // act  : indices of actuators blk in bllst
 +  // allhowclk  : indices of evt sensors blk in bllst
 +  // allhowclk2 : indices of evt actuators blk in bllst
 +  // *********************************************************
  
 +  a=[];
 +  b=[];
 +  tt=[];
 +  howclk=[];
 +  allhowclk=[];
 +  allhowclk2=[];
 +  cap=[];
 +  act=[];
  
 -    //**
 -    case 1 then
 -      //*********** call seq definition ***********//
 -      txtc=['(&local_flag,&block_'+rdnom+'['+string(bk-1)+'].nevprt,&t,block_'+rdnom+'['+string(bk-1)+'].xd, \';
 -            'block_'+rdnom+'['+string(bk-1)+'].x,&block_'+rdnom+'['+string(bk-1)+'].nx, \';
 -            'block_'+rdnom+'['+string(bk-1)+'].z,&block_'+rdnom+'['+string(bk-1)+'].nz,block_'+rdnom+'['+string(bk-1)+'].evout, \';
 -            '&block_'+rdnom+'['+string(bk-1)+'].nevout,block_'+rdnom+'['+string(bk-1)+'].rpar,&block_'+rdnom+'['+string(bk-1)+'].nrpar, \';
 -            'block_'+rdnom+'['+string(bk-1)+'].ipar,&block_'+rdnom+'['+string(bk-1)+'].nipar'];
 -      if (funtyp(bk)>2000 & funtyp(bk)<3000)
 -        blank = get_blank(funs(bk)+'( ');
 -        txtc(1) = funs(bk)+txtc(1);
 -      elseif (funtyp(bk)<2000)
 -        txtc(1) = 'C2F('+funs(bk)+')'+txtc(1);
 -        blank = get_blank('C2F('+funs(bk)+') ');
 -      end
 -      if nin>=1 | nout>=1 then
 -        txtc($)=txtc($)+', \'
 -        txtc=[txtc;'']
 -        if nin>=1 then
 -          for k=1:nin
 -            uk=inplnk(inpptr(bk)-1+k);
 -            nuk=size(outtb(uk),'*');
 -            txtc($)=txtc($)+'(double *)'+rdnom+'_block_outtbptr['+string(uk-1)+'],&nrd_'+string(nuk)+',';
 -          end
 -          txtc($)=part(txtc($),1:length(txtc($))-1); //remove last ,
 +  for i=1:size(bllst)
 +    for j=1:size(bllst)
 +      if (bllst(i).sim(1)=='capteur'+string(j)) then
 +        if tt<>i then
 +          cap=[cap;i];
 +          tt=i;
          end
 -        if nout>=1 then
 -          if nin>=1 then
 -            txtc($)=txtc($)+', \'
 -            txtc=[txtc;'']
 -          end
 -          for k=1:nout
 -            yk=outlnk(outptr(bk)-1+k);
 -            nyk=size(outtb(yk),'*');
 -            txtc($)=txtc($)+'(double *)'+rdnom+'_block_outtbptr['+string(yk-1)+'],&nrd_'+string(nyk)+',';
 -          end
 -          txtc($)=part(txtc($),1:length(txtc($))-1); //remove last ,
 +      elseif (bllst(i).sim(1)=='actionneur'+string(j)) then
 +        if tt<>i then
 +          act=[act;i];
 +          tt=i;
 +        end
 +      elseif (bllst(i).sim(1)=='bidon') then
 +        if tt<>i then
 +          allhowclk=[allhowclk;i];
 +          tt=i;
 +        end
 +      elseif (bllst(i).sim(1)=='bidon2') then
 +        if tt<>i then
 +          allhowclk2=[allhowclk2;i];
 +          tt=i;
          end
        end
 +    end
 +  end
 +  ///**********************************************************
  
 -      if ztyp(bk) then
 -        txtc($)=txtc($)+', \'
 -        txtc=[txtc;
 -              'block_'+rdnom+'['+string(bk-1)+'].g,&block_'+rdnom+'['+string(bk-1)+'].ng);']
 -      else
 -        txtc($)=txtc($)+');';
 +  if szclkIN>1 then
 +    //replace the N Event inputs by a fictious block with
 +    // 2^N as many event outputs
 +    output=ones((2^szclkIN)-1,1)
 +    bllst($+1)=scicos_model(sim=list('bidon',1),evtout=output,..
 +                            blocktype='d',..
 +                            firing=-output',dep_ut=[%f %f])
 +    corinv(size(bllst))=size(bllst)+1;
 +    howclk=size(bllst)
 +    // adjust the links accordingly
 +    for i=1:(2^szclkIN)-1
 +      vec=codebinaire(i,szclkIN)
 +      for j=1:szclkIN
 +        if vec(j)*allhowclk(j)>=1 then
 +          for k=1:size(clkconnect,1)
 +            if clkconnect(k,1)==allhowclk(j) then
 +              clkconnect=[clkconnect;[howclk i clkconnect(k,3:4)]]
 +            end
 +          end
 +        end
 +      end
 +    end
 +  elseif szclkIN==[] then
 +    if ~ALL & ~ALWAYS_ACTIVE then
 +      //superblock has no Event input, add a fictious clock
 +      output=ones((2^(size(cap,'*')))-1,1)
 +      if (output == []) then
 +        output=0;
 +      end
 +      bllst($+1)=scicos_model(sim=list('bidon',1),evtout=output,..
 +                              firing=-output,blocktype='d',dep_ut=[%f %f])
 +      corinv(size(bllst))=size(bllst)+1;
 +      howclk=size(bllst);
 +    else
 +      //@@ find block with output events
 +      ind_evtout_blk=[]
 +      nb_evtout=0
 +      firing_evtout=[]
 +      for i=1:size(bllst)
 +        if bllst(i).evtout<>[] then
 +           if type(bllst(i).sim)==15 then
 +             if bllst(i).sim(2)<>-1 & bllst(i).sim(2)<>-2 then
 +               ind_evtout_blk=[ind_evtout_blk;i]
 +               for j=1:size(bllst(i).evtout,'*')
 +                 firing_evtout=[firing_evtout;bllst(i).firing(j)]
 +               end
 +               nb_evtout=nb_evtout+size(bllst(i).evtout,'*')
 +             end
 +           else
 +             ind_evtout_blk=[ind_evtout_blk;i]
 +             for j=1:size(bllst(i).evtout,'*')
 +               firing_evtout=[firing_evtout;bllst(i).firing(j)]
 +             end
 +             nb_evtout=nb_evtout+size(bllst(i).evtout,'*')
 +           end
 +        end
 +      end
 +      //@@ Add an agenda_blk
 +      if ind_evtout_blk<>[] then
 +        bllst($+1)=scicos_model(sim=list('agenda_blk',1),evtout=ones(size(firing_evtout,1),1),..
 +                                firing=-ones(size(firing_evtout,1),1),blocktype='d',dep_ut=[%f %f])
 +        agenda_blk = size(bllst);
 +        corinv(size(bllst))=size(bllst)+1;
 +        //@@ evt output connection from agenda_blk
 +        kk=1;
 +        for i=1:size(ind_evtout_blk,'*')
 +          for j=1:size(bllst(ind_evtout_blk(i)).evtout,'*')
 +            for jj=1:size(clkconnect,1)
 +               if clkconnect(jj,1)==ind_evtout_blk(i) & clkconnect(jj,2)==j then
 +                 clkconnect(jj,1) = agenda_blk;
 +                 clkconnect(jj,2) = kk;
 +               end
 +            end
 +            kk=kk+1
 +          end
 +        end
        end
  
 -      txtc(2:$) = blank + txtc(2:$);
 -      txt = [txt;txtc];
 -      //*******************************************//
 +    end
 +  elseif szclkIN==1  then
 +    howclk=allhowclk;
 +  end
  
 -    //**
 -    case 2 then
 +  //mise en ordre de clkconnect
 +  if szclkIN>1 then
 +    newclkconnect=clkconnect;
 +    clkconnect=[];
 +    for i=1:size(newclkconnect,1)-1
 +      if or(newclkconnect(i,:)<>newclkconnect(i+1,:)) then
 +        clkconnect=[clkconnect;newclkconnect(i,:)]
 +      end
 +    end
 +    if or(newclkconnect($-1,:)<>newclkconnect($,:)) then
 +      clkconnect=[clkconnect;newclkconnect($,:)]
 +    end
  
 -      //*********** call seq definition ***********//
 -      txtc=[funs(bk)+'(&local_flag,&block_'+rdnom+'['+string(bk-1)+'].nevprt,&t,block_'+rdnom+'['+string(bk-1)+'].xd, \';
 -            'block_'+rdnom+'['+string(bk-1)+'].x,&block_'+rdnom+'['+string(bk-1)+'].nx, \';
 -            'block_'+rdnom+'['+string(bk-1)+'].z,&block_'+rdnom+'['+string(bk-1)+'].nz,block_'+rdnom+'['+string(bk-1)+'].evout, \';
 -            '&block_'+rdnom+'['+string(bk-1)+'].nevout,block_'+rdnom+'['+string(bk-1)+'].rpar,&block_'+rdnom+'['+string(bk-1)+'].nrpar, \';
 -            'block_'+rdnom+'['+string(bk-1)+'].ipar,&block_'+rdnom+'['+string(bk-1)+'].nipar, \';
 -            '(double **)block_'+rdnom+'['+string(bk-1)+'].inptr,block_'+rdnom+'['+string(bk-1)+'].insz,&block_'+rdnom+'['+string(bk-1)+'].nin, \';
 -            '(double **)block_'+rdnom+'['+string(bk-1)+'].outptr,block_'+rdnom+'['+string(bk-1)+'].outsz, &block_'+rdnom+'['+string(bk-1)+'].nout'];
 -      if ~ztyp(bk) then
 -        txtc($)=txtc($)+');';
 +    //suppression des blocs bidons
 +    newclkconnect=clkconnect;nkt=[];
 +    for i=1:szclkIN
 +      for k=1:size(newclkconnect,1)
 +        if newclkconnect(k,1)~=allhowclk(i) then
 +          nkt=[nkt;newclkconnect(k,:)];
 +        end
 +      end
 +      newclkconnect=nkt;
 +      nkt=[];
 +    end
 +    clkconnect=newclkconnect;
 +  end
 +
 +  //**************************************************
 +  // nouveau clkconnect avec liaisons sur les capteurs
 +  //**************************************************
 +  if ~ALL then
 +    //Test for  ALWAYS_ACTIVE sblock (RN -25/06/07)
 +    // Fady 15/12/2008
 +    n=size(cap,1)
 +    if ~(szclkIN==[]) then  //triggered case
 +      for i=1:n
 +      if szclkIN>1 then
 +        for j=1:(2^szclkIN)-1
 +          clkconnect=[clkconnect;[howclk j cap(i) 1]];
 +        end
 +      elseif szclkIN==1 then
 +        clkconnect=[clkconnect;[howclk 1 cap(i) 1]];
 +      end
 +      end
 +    elseif ~ALWAYS_ACTIVE then
 +      //codage de l'activation des capteurs dans le cas de l'heritage
 +      for i=1:2^n-1
 +      vec=codebinaire(i,n);
 +      for j=1:n
 +        if (vec(j)==1) then
 +          clkconnect=[clkconnect;[howclk i cap(j) 1]];
 +        end
 +      end
 +      end
 +    end
 +  end
 +  //@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
 +  //@@ Alan, 04/12/08, Remove problematic scopes
 +  for i=1:lstsize(bllst)
 +    ind = find(bllst(i).sim(1)==sim_to_be_removed(:,1))
 +    if ind<>[] then
 +      mess=mprintf("%s  block is not allowed.\nIt will be not called.',sim_to_be_removed(ind,2))
 +      okk = messagebox(mess,[_('Ok');_('Go Back')],'modal')
 +      if okk==1 then
 +        bllst(i).sim(1)='bidon'
 +        if type(bllst(i).sim(1))==13 then
 +          bllst(i).sim(2)=0
 +        end
        else
 -        txtc($)=txtc($)+', \';
 -        txtc=[txtc;
 -              'block_'+rdnom+'['+string(bk-1)+'].g,&block_'+rdnom+'['+string(bk-1)+'].ng);']
 +        ok=%f
 +        %cpr=list()
 +        return
        end
 -      blank = get_blank(funs(bk)+'( ');
 -      txtc(2:$) = blank + txtc(2:$);
 -      txt = [txt;txtc];
 -      //*******************************************//
 +    end
 +  end
 +  //@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
  
 -    //**
 -    case 4 then
 -      txt=[txt;
 -           funs(bk)+'(&block_'+rdnom+'['+string(bk-1)+'],local_flag);'];
 +  FIRING=[]
 +  for i=1:size(allhowclk2,1)
 +    j = find(clkconnect(:,3)==allhowclk2(i))
 +    if j<>[] then
 +      FIRING=[FIRING;bllst(clkconnect(j,1)).firing(clkconnect(j,2))]
 +    end
 +  end
  
 +  Code_gene_run=[];
 +  //******************** To avoid asking for size or type more than one time in incidence_mat*******
 +  //************************** when creating atomicity *********************************************
 +  //************************** in other cases it can be done in adjust_all_scs_m *******************
 +  //************************** Fady 15/12/2008 *****************************************************
 +  c_pass2=c_pass2;
 +  if ok then
 +    [ok,bllst]=adjust_inout(bllst,connectmat);
 +  end
 +  
 +  if ok then
 +    [ok,bllst]=adjust_typ(bllst,connectmat);
    end
 +  //*************************************************************************************************
 +  //## second pass of compilation
 +  cpr=c_pass2(bllst,connectmat,clkconnect,cor,corinv,"silent")
  
 -  txt =[txt;'if(local_flag < 0) return(5 - local_flag);']
 +  if cpr==list() then
 +    ok=%f,
 +    messagebox(_("Compilation problem\n perhaps an algebraic loop."),'modal','error')
 +    return,
 +  end
  
 -endfunction
 +  // computing the incidence matrix to derive actual block's depu
 +  [depu_mat,ok]=incidence_mat(bllst,connectmat,clkconnect,cor,corinv)
 +  if ~ok then
 +    return
 +  else
 +    depu_vec=depu_mat*ones(size(depu_mat,2),1)>0
 +  end
  
 -//CallBlock : generate C calling sequence
 -//            of a scicos block
 -//
 -//inputs : bk   : bloc index
 -//         pt   :
 -//         flag :block_'+rdnom+'[
 -//
 -//output : txt  :
 -//
 -//16/06/07 Authors : R.Nikoukhah, A.Layec
 -function txt=call_block4(bk)
 -//   if flag==2 & ((zptr(bk+1)-zptr(bk))+(ozptr(bk+1)-ozptr(bk))==0 | pt<=0) then
 -//     return // block without discrete state or continuously activated
 -//            // If work allocated in the absence of z and oz, it does not work
 -//   end
 +  //## Detect synchro block and type1
 +  funs_save   = cpr.sim.funs;
 +  funtyp_save = cpr.sim.funtyp;
 +  with_work   = zeros(cpr.sim.nb,1)
 +  with_synchro = %f
 +  with_nrd     = %f
 +  with_type1   = %f
  
 -  //**
 -  nx=xptr(bk+1)-xptr(bk);
 -  nz=zptr(bk+1)-zptr(bk);
 -  nrpar=rpptr(bk+1)-rpptr(bk);
 -  nipar=ipptr(bk+1)-ipptr(bk);
 -  nin=inpptr(bk+1)-inpptr(bk);  //* number of input ports */
 -  nout=outptr(bk+1)-outptr(bk); //* number of output ports */
 +  //## loop on blocks
 +  for i=1:lstsize(cpr.sim.funs)
 +    //## look at for funs of type string
 +    if type(cpr.sim.funs(i))==10 then
 +      if part(cpr.sim.funs(i),1:10)=='actionneur' then
 +        cpr.sim.funs(i) ='bidon'
 +        cpr.sim.funtyp(i) = 0
 +      elseif part(cpr.sim.funs(i),1:7)=='capteur' then
 +        cpr.sim.funs(i) ='bidon'
 +        cpr.sim.funtyp(i) = 0
 +      elseif cpr.sim.funs(i)=='bidon2' then
 +        cpr.sim.funs(i) ='bidon'
 +        cpr.sim.funtyp(i) = 0
 +      elseif cpr.sim.funs(i)=='agenda_blk' then
 +        cpr.sim.funs(i) ='bidon'
 +        cpr.sim.funtyp(i) = 0
 +      elseif cpr.sim.funs(i)=='affich' then
 +        cpr.sim.funs(i) ='bidon'
 +        cpr.sim.funtyp(i) = 0
 +      elseif cpr.sim.funs(i)=='affich2' then
 +        cpr.sim.funs(i) ='bidon'
 +        cpr.sim.funtyp(i) = 0
 +      end
 +    end
 +    //## look at for type of block
 +    if cpr.sim.funtyp(i) < 0 then
 +       with_synchro = %t //## with_synchro flag comes global
 +    elseif cpr.sim.funtyp(i) == 0 then
 +       with_nrd = %t //## with_nrd flag comes global
 +    elseif cpr.sim.funtyp(i) == 1 then
 +       if cpr.sim.funs(i) ~= 'bidon' then
 +         with_type1 = %t //## with_type1 flag comes global
 +       end
 +    end
 +  end //## end of for
  
 -  //**
 -  //l'adresse du pointeur de ipar
 -  if nipar<>0 then ipar=ipptr(bk), else ipar=1;end
 -  //l'adresse du pointeur de rpar
 -  if nrpar<>0 then rpar=rpptr(bk), else rpar=1; end
 -  //l'adresse du pointeur de z attention -1 pas sur
 -  if nz<>0 then z=zptr(bk)-1, else z=0;end
 -  //l'adresse du pointeur de x
 -  if nx<>0 then x=xptr(bk)-1, else x=0;end
 +  //**** solve which blocks use work ****//
 +  BeforeCG_WinList = winsid();
  
 -  //**
 -  ftyp=funtyp(bk)
 -  if ftyp>2000 then ftyp=ftyp-2000,end
 -  if ftyp>1000 then ftyp=ftyp-1000,end
 +  ierr=execstr('[state,t]=scicosim(cpr.state,0,0,cpr.sim,'+..
 +               '''start'',scs_m.props.tol)','errcatch')
  
 -  //** check function type
 -  if ftyp < 0 then //** ifthenelse eselect blocks
 -      txt = [];
 -      return;
 -  else
 -    if (ftyp<>0 & ftyp<>1 & ftyp<>2 & ftyp<>3 & ftyp<>4) then
 -      disp("types other than 0,1,2,3 or 4 are not supported.")
 -      txt = [];
 -      return;
 +  //** retrieve all open Scilab windows with winsid()
 +  AfterCG_WinList = winsid();
 +
 +  if ierr==0 then
 +    for i=1:cpr.sim.nb
 +       if state.iz(i)<>0 then
 +          with_work(i)=%t
 +       end
      end
 +    ierr=execstr('[state,t]=scicosim(state,0,0,cpr.sim,'+..
 +                 '''finish'',scs_m.props.tol)','errcatch')
    end
  
 -  //** add comment
 -  txt=[get_comment('call_blk',list(funs(bk),funtyp(bk),bk));]
 +  //@@ Remove windows opened by simulation
 +  xdel(setdiff(AfterCG_WinList,BeforeCG_WinList))
 +  //*************************************//
  
 -  //** write nevprt activation
 -//   nclock=abs(pt);
 -  txt=[txt;
 -       'block_'+rdnom+'['+string(bk-1)+'].nevprt=nevprt;']
 +  //fix for slow computer
 +  xpause(10000)
  
 -  select ftyp
 -    //** zero funtyp
 -    case 0 then
 -      //**** input/output addresses definition ****//
 -      if nin>1 then
 -        for k=1:nin
 -          uk=inplnk(inpptr(bk)-1+k);
 -          nuk=size(outtb(uk),'*');
 -          TYPE=mat2scs_c_ptr(outtb(uk));//scilab index start from 1
 -          txt=[txt;
 -               'rdouttb['+string(k-1)+']=('+TYPE+' *)'+rdnom+'_block_outtbptr['+string(uk-1)+'];']
 -        end
 -        txt=[txt;
 -             'args[0]=&(rdouttb[0]);']
 -      elseif nin==0
 -        uk=0;
 -        nuk=0;
 -        txt=[txt;
 -             'args[0]=(SCSREAL_COP *)'+rdnom+'_block_outtbptr[0];']
 -      else
 -        uk=inplnk(inpptr(bk));
 -        nuk=size(outtb(uk),'*');
 -        TYPE=mat2scs_c_ptr(outtb(uk));//scilab index start from 1
 -        txt=[txt;
 -             'args[0]=('+TYPE+' *)'+rdnom+'_block_outtbptr['+string(uk-1)+'];']
 -      end
 +  //@@ retrieve original funs name
 +  cpr.sim.funs=funs_save;
 +  cpr.sim.funtyp=funtyp_save;
  
 -      if nout>1 then
 -        for k=1:nout
 -          yk=outlnk(outptr(bk)-1+k);
 -          nyk=size(outtb(yk),'*');
 -          TYPE=mat2scs_c_ptr(outtb(yk));//scilab index start from 1
 -          txt=[txt;
 -               'rdouttb['+string(k+nin-1)+']=('+TYPE+' *)'+rdnom+'_block_outtbptr['+string(yk-1)+'];'];
 -        end
 -        txt=[txt;
 -             'args[1]=&(rdouttb['+string(nin)+']);'];
 -      elseif nout==0
 -        yk=0;
 -        nyk=0;
 -        txt=[txt;
 -             'args[1]=(SCSREAL_COP *)'+rdnom+'_block_outtbptr[0];'];
 -      else
 -        yk=outlnk(outptr(bk));
 -        nyk=size(outtb(yk),'*'),;
 -        TYPE=mat2scs_c_ptr(outtb(yk));//scilab index start from 1
 -        txt=[txt;
 -             'args[1]=('+TYPE+' *)'+rdnom+'_block_outtbptr['+string(yk-1)+'];'];
 -      end
 -      //*******************************************//
 +  //@@ add a work ptr for agenda blk
 +  for i=cpr.sim.nb:-1:1
 +    if cpr.sim.funs(i)=='agenda_blk' then
 +      with_work(i)=%t
 +      break
 +    end
 +  end
  
 -      //*********** call seq definition ***********//
 -      txtc=['(&flag,&block_'+rdnom+'['+string(bk-1)+'].nevprt,told,block_'+rdnom+'['+string(bk-1)+'].xd, \';
 -            'block_'+rdnom+'['+string(bk-1)+'].x,&block_'+rdnom+'['+string(bk-1)+'].nx, \';
 -            'block_'+rdnom+'['+string(bk-1)+'].z,&block_'+rdnom+'['+string(bk-1)+'].nz,block_'+rdnom+'['+string(bk-1)+'].evout, \';
 -            '&block_'+rdnom+'['+string(bk-1)+'].nevout,block_'+rdnom+'['+string(bk-1)+'].rpar,&block_'+rdnom+'['+string(bk-1)+'].nrpar, \';
 -            'block_'+rdnom+'['+string(bk-1)+'].ipar,&block_'+rdnom+'['+string(bk-1)+'].nipar, \';
 -            '(double *)args[0],&nrd_'+string(nuk)+',(double *)args[1],&nrd_'+string(nyk)+');'];
 -      if (funtyp(bk)>2000 & funtyp(bk)<3000)
 -        blank = get_blank(funs(bk)+'( ');
 -        txtc(1) = funs(bk)+txtc(1);
 -      elseif (funtyp(bk)<2000)
 -        txtc(1) = 'C2F('+funs(bk)+')'+txtc(1);
 -        blank = get_blank('C2F('+funs(bk)+') ');
 -      end
 -      txtc(2:$) = blank + txtc(2:$);
 -      txt = [txt;txtc];
 -      //*******************************************//
 +  ///////////////////
 +  //les pointeurs de cpr :
 +  x=cpr.state.x;
 +  z=cpr.state.z;
 +  outtb=cpr.state.outtb;
  
 +  //RN
 +  zcptr=cpr.sim.zcptr;
 +  ozptr=cpr.sim.ozptr;
 +  rpptr=cpr.sim.rpptr;
 +  ipptr=cpr.sim.ipptr;
 +  opptr=cpr.sim.opptr;
 +  funs=cpr.sim.funs;
 +  xptr=cpr.sim.xptr;
 +  zptr=cpr.sim.zptr;
 +  inpptr=cpr.sim.inpptr;
 +  inplnk=cpr.sim.inplnk;
 +  outptr=cpr.sim.outptr;
 +  outlnk=cpr.sim.outlnk;
 +  ordclk=cpr.sim.ordclk;
 +  funtyp=cpr.sim.funtyp;
 +  cord=cpr.sim.cord;
 +  ncord=size(cord,1);
 +  nblk=cpr.sim.nb;
 +  ztyp=cpr.sim.ztyp;
 +  clkptr=cpr.sim.clkptr
 +  //taille totale de z : nztotal
 +  nztotal=size(z,1);
  
 -    //**
 -    case 1 then
 -      //**** input/output addresses definition ****//
 -//       if nin>=1 then
 -//         for k=1:nin
 -//           uk=inplnk(inpptr(i)-1+k);
 -//           nuk=size(outtb(uk),'*');
 -//         end
 -//       end
 -//       if nout>=1 then
 -//         for k=1:nout
 -//           yk=outlnk(outptr(i)-1+k);
 -//           nyk=size(outtb(yk),'*');
 -//         end
 -//       end
 -      //*******************************************//
 +  //*******************************
 +  //Checking if superblock is valid
 +  //*******************************
 +  msg=[]
 +  for i=1:length(funs)-1
 +    if funtyp(i)==3 | funtyp(i)==5 then
 +      msg=[msg;_('Scilab block''s not allowed')]
 +//RN   elseif ztyp(i)<>0 then
 +    //elseif (zcptr(i+1)-zcptr(i))<>0 then
 +//
 +      //msg=[msg;'Active zero crossing block''s not allowed']
 +     elseif (clkptr(i+1)-clkptr(i))<>0 &funtyp(i)>-1 &funs(i)~='bidon' then
 +//Alan      //msg=[msg;'Regular block generating activation not allowed yet']
 +    end
 +    if msg<>[] then messagebox(msg,'modal'),ok=%f,return,end
 +  end
  
 -      //*********** call seq definition ***********//
 -      txtc=['(&flag,&block_'+rdnom+'['+string(bk-1)+'].nevprt,told,block_'+rdnom+'['+string(bk-1)+'].xd, \';
 -            'block_'+rdnom+'['+string(bk-1)+'].x,&block_'+rdnom+'['+string(bk-1)+'].nx, \';
 -            'block_'+rdnom+'['+string(bk-1)+'].z,&block_'+rdnom+'['+string(bk-1)+'].nz,block_'+rdnom+'['+string(bk-1)+'].evout, \';
 -            '&block_'+rdnom+'['+string(bk-1)+'].nevout,block_'+rdnom+'['+string(bk-1)+'].rpar,&block_'+rdnom+'['+string(bk-1)+'].nrpar, \';
 -            'block_'+rdnom+'['+string(bk-1)+'].ipar,&block_'+rdnom+'['+string(bk-1)+'].nipar'];
 -      if (funtyp(bk)>2000 & funtyp(bk)<3000)
 -        blank = get_blank(funs(bk)+'( ');
 -        txtc(1) = funs(bk)+txtc(1);
 -      elseif (funtyp(bk)<2000)
 -        txtc(1) = 'C2F('+funs(bk)+')'+txtc(1);
 -        blank = get_blank('C2F('+funs(bk)+') ');
 +  //********************************************************
 +  // Change logical units for readf and writef blocks if any ???
 +  //********************************************************
 +  lunit=0
 +  for d=1:length(funs)
 +    if funs(d)=='readf'  then
 +      z(zptr(d)+2)=lunit
 +      lunit=lunit+1;
 +    elseif funs(d)=='writef'
 +      z(zptr(d)+1)=lunit
 +      lunit=lunit+1;
 +    end
 +  end
 +
 +  //***********************************
 +  // Get the name of the file
 +  //***********************************
 +  okk=%f;
 +  rdnom='foo';
 +  rpat=pwd();
 +  if %scicos_libs<>[] then
 +    libs=sci2exp(%scicos_libs(:)',0);
 +  else
 +    libs=''
 +  end
 +  label1=[hname;pwd()+filesep()+hname;libs];
 +
 +  while %t do //loop while the user answer are not ok
 +    ok=%t  // to avoid infinite loop
 +
 +    if atomicflag then
 +      rdnom=all_scs_m.props.title(1)+'_'+strcat(string(super_path),'_')+'_'+string(numk)
 +      rpat=TMPDIR;
 +    else
 +
 +      [okk,..
 +       rdnom,..
 +       rpat,..
 +       libs,..
-        label1]=getvalue(_('Set code generator parameters :'),..
++       label1]=scicos_getvalue(_('Set code generator parameters :'),..
 +                        [_('New block''s name :');
 +                         _('Created files Path :');
 +                         _('Other object files to link with (if any)')],..
 +                         list('str',1,'str',1,'str',1),label1);
 +      if okk==%f then ok=-1; return; end
 +      
 +      rpat=stripblanks(rpat);
 +
 +      //** 1/07/06 Alan trying to solve multiple libraries
 +      if strindex(libs,'''')<>[] | strindex(libs,'""')<>[] then
 +        ierr=execstr('libs=evstr(libs)','errcatch')
 +        if ierr<>0  then
 +          messagebox(_('Can''t solve other files to link'),'modal','error')
 +          ok=-1;
 +          return
 +        end
        end
 -      if nin>=1 | nout>=1 then
 -        txtc($)=txtc($)+', \'
 -        txtc=[txtc;'']
 -        if nin>=1 then
 -          for k=1:nin
 -            uk=inplnk(inpptr(bk)-1+k);
 -            nuk=size(outtb(uk),'*');
 -            txtc($)=txtc($)+'(SCSREAL_COP *)'+rdnom+'_block_outtbptr['+string(uk-1)+'],&nrd_'+string(nuk)+',';
 -          end
 -          txtc($)=part(txtc($),1:length(txtc($))-1); //remove last ,
 +    end  //if atomicflag then
 +
 +    if stripblanks(rdnom)==emptystr() then
 +      ok=%f;
 +      messagebox(_('sorry C file name is not defined'),'modal','error');
 +      if atomicflag then return, end
 +    end
 +
 +    if ok then
 +      //@@replace special character which may cause problem to the compiler
 +      if strindex(rdnom,[' ','-','.'])<>[] then
 +      new = strsubst(strsubst(strsubst(rdnom,' ','_'),'-','_'),'.','_');
 +        mess=msprintf(_(' Superblock name cannot contains space, ""."" and \n'+..
 +                      '""-"" characters. \n'+..
 +                      'The superblock will be renamed : %s'),new);
 +        okk=messagebox(mess,_('Scicos message'),'question',[_('Ok');_('Go Back')],'modal')
 +        if okk==1 then
 +          rdnom = new
 +          label1=[rdnom;label1(2);label1(3)];
 +        else
 +           ok=%f;
 +           if atomicflag then return, end
          end
 -        if nout>=1 then
 -          if nin>=1 then
 -            txtc($)=txtc($)+', \'
 -            txtc=[txtc;'']
 -          end
 -          for k=1:nout
 -            yk=outlnk(outptr(bk)-1+k);
 -            nyk=size(outtb(yk),'*');
 -            txtc($)=txtc($)+'(SCSREAL_COP *)'+rdnom+'_block_outtbptr['+string(yk-1)+'],&nrd_'+string(nyk)+',';
 -          end
 -          txtc($)=part(txtc($),1:length(txtc($))-1); //remove last ,
 +      end 
 +    end
 +    if ok then
 +      //@@ 13/12/08,
 +      //@@ Check if rdnom already exists in the linked routine table
 +      if c_link(rdnom) & ~atomicflag then
 +        mess=msprintf(_('Warning. An entry point with name ""%s"" is already linked.\n'+..
 +                      'The new generated block may have another name or the \n'+..
 +                      'old entry point will be unlinked\n'),rdnom);
 +        okk=messagebox(mess,_('Scicos message'),'question',[_('Change block name');_('Force unlink')],'modal')
 +        if okk==1 then //"Change block name" selected
 +          ok=%f
          end
        end
 -
 -      if ztyp(bk) then
 -        txtc($)=txtc($)+', \'
 -        txtc=[txtc;'w,&nrd_0);'];
 +    end
 +    
 +    if ok then
 +      //@@ create destination directory
 +      [status,mess]=mkdir(rpat)
 +      
 +      if and(status<>[1 2]) then
 +      messagebox(mess,'error','modal');
 +      ok=%f
 +      if atomicflag then return, end
 +      end
 +    end
 +    
 +    if ok then    
 +      //@@ 13/12/08,
 +      //@@ add a test for %scicos_libs
 +      if MSDOS then
 +      target_lib = rpat+'\lib'+rdnom+'.dll'
        else
 -        txtc($)=txtc($)+');';
 +      target_lib =  rpat+'/lib'+rdnom+'.so'
        end
 +      ind = find(libs==target_lib)
 +      if ind<>[] then
 +      mess=msprintf(_(' Warning. You want to link an external library\n'+..
 +                      'which is the same than the target library.\n'+..
 +                      'That library can be here removed from the\n'+..
 +                      'list of external libraries (only for expert user).'))
 +      okk=message(mess,_('Scicos Message'),'question',[_('Change block name');_('Ok')],'modal')
 +      if okk==2 then
 +        new_libs=[]
 +        for i=1:size(libs,'*')
 +          if find(i==ind)==[] then
 +            new_libs=[new_libs,libs(i)]
 +          end
 +        end
 +        libs=new_libs
 +      else
 +        ok=%f;
 +        if atomicflag then return, end
 +      end
 +      end
 +    end
 +    if ok then break;end
 +  end //end of while loop
 +
 +  //###################################################
 +  //generate blocs simulation function prototypes
 +  //and extract infos from ports for sensors/actuators
 +  //###################################################
 +
 +  nbcap=0;
 +  nbact=0;
 +  capt=[];
 +  actt=[];
 +  Protostalone=[];
 +  Protos=[];
 +  dfuns=[]
  
 -      txtc(2:$) = blank + txtc(2:$);
 -      txt = [txt;txtc];
 -      //*******************************************//
 -
 -    //**
 -    case 2 then
 -
 -      //*********** call seq definition ***********//
 -      txtc=[funs(bk)+'(&flag,&block_'+rdnom+'['+string(bk-1)+'].nevprt,told,block_'+rdnom+'['+string(bk-1)+'].xd, \';
 -            'block_'+rdnom+'['+string(bk-1)+'].x,&block_'+rdnom+'['+string(bk-1)+'].nx, \';
 -            'block_'+rdnom+'['+string(bk-1)+'].z,&block_'+rdnom+'['+string(bk-1)+'].nz,block_'+rdnom+'['+string(bk-1)+'].evout, \';
 -            '&block_'+rdnom+'['+string(bk-1)+'].nevout,block_'+rdnom+'['+string(bk-1)+'].rpar,&block_'+rdnom+'['+string(bk-1)+'].nrpar, \';
 -            'block_'+rdnom+'['+string(bk-1)+'].ipar,&block_'+rdnom+'['+string(bk-1)+'].nipar, \';
 -            '(double **)block_'+rdnom+'['+string(bk-1)+'].inptr,block_'+rdnom+'['+string(bk-1)+'].insz,&block_'+rdnom+'['+string(bk-1)+'].nin, \';
 -            '(double **)block_'+rdnom+'['+string(bk-1)+'].outptr,block_'+rdnom+'['+string(bk-1)+'].outsz, &block_'+rdnom+'['+string(bk-1)+'].nout'];
 -      if ~ztyp(bk) then
 -        txtc($)=txtc($)+');';
 +  //## loop on number of blk
 +  for i=1:length(funs)
 +    //## block is a sensor
 +    if or(i==cap) then
 +      nbcap = nbcap+1;
 +      //## number of output ports
 +      nout=outptr(i+1)-outptr(i);
 +      if nout==0 then
 +         //yk    = 0;
 +         //nyk_1 = 0;
 +         //nyk_2 = 0;
 +         //yk_t  = 1;
 +         disp('nout=0 pour un capteur');pause
        else
 -        txtc($)=txtc($)+', \';
 -        txtc=[txtc;
 -              'block_'+rdnom+'['+string(bk-1)+'].g,&block_'+rdnom+'['+string(bk-1)+'].ng);']
 +         yk    = outlnk(outptr(i));
 +         nyk_1 = size(outtb(yk),1);
 +         nyk_2 = size(outtb(yk),2);
 +         yk_t  = mat2scs_c_nb(outtb(yk));
 +      end
 +      capt=[capt;
 +            i yk nyk_1 nyk_2 yk_t bllst(i).ipar]
 +
 +      //## only one proto for sensor
 +      if nbcap==1 then
 +        Protostalone=[Protostalone;
 +                      '';
 +                      'void '+rdnom+'_sensor(int *, int *, int *, double *, void *, \';
 +                      get_blank(rdnom)+'             int *, int *, int *, int, void *);']
        end
 -      blank = get_blank(funs(bk)+'( ');
 -      txtc(2:$) = blank + txtc(2:$);
 -      txt = [txt;txtc];
 -      //*******************************************//
  
 -    //**
 -    case 4 then
 -      txt=[txt;
 -           funs(bk)+'(&block_'+rdnom+'['+string(bk-1)+'],flag);'];
 +    //## block is an actuator
 +    elseif or(i==act) then
 +      nbact = nbact+1;
 +      //## number of input ports
 +      nin=inpptr(i+1)-inpptr(i);
 +      if nin==0 then
 +        //uk    = 0;
 +        //nuk_1 = 0;
 +        //nuk_2 = 0;
 +        //uk_t  = 1;
 +        disp('nin=0 pour un actionneur');pause
 +      else
 +        uk    = inplnk(inpptr(i));
 +        nuk_1 = size(outtb(uk),1);
 +        nuk_2 = size(outtb(uk),2);
 +        uk_t  = mat2scs_c_nb(outtb(uk));
 +      end
 +      actt=[actt;
 +            i uk nuk_1 nuk_2 uk_t bllst(i).ipar]
 +
 +      //## only one proto for actuator
 +      if nbact==1 then
 +        Protostalone=[Protostalone;
 +                      ''
 +                      'void '+rdnom+'_actuator(int *, int *, int *, double *, void *, \';
 +                      get_blank(rdnom)+'               int *, int *, int *, int, void *);']
 +      end
  
 +    //## all other types of blocks excepts evt sensors and evt actuators
 +    else
 +      if funs(i)<>'bidon' & funs(i)<>'bidon2' then
 +        ki=find(funs(i)==dfuns)
 +        dfuns=[dfuns;funs(i)]
 +        if ki==[] then
 +          Protos=[Protos;'';BlockProto(i)];
 +          Protostalone=[Protostalone;'';BlockProto(i)];
 +        end
 +      end
 +    end
    end
 -endfunction
  
 -//
 -//16/06/07 Author : ?, A. Layec
 -//
 -function [Code,capt,proto]=call_sensor(i)
 -  nin=inpptr(i+1)-inpptr(i); ///* number of input ports */
 -  nout=outptr(i+1)-outptr(i); ///* number of output ports */
 -
 -  //declaration des I/O des blocs de type 1
 -  if funtyp(i)==0 then
 -    if nout==0 then
 -      yk    = 0;
 -      nyk_1 = 0;
 -      nyk_2 = 0;
 -      yk_t  = 1;
 -      //Code($+1)=+'  args[1]=(double *)(outtbptr[0]);';
 -    else
 -      yk    = outlnk(outptr(i));
 -      nyk_1 = size(outtb(yk),1);
 -      nyk_2 = size(outtb(yk),2);
 -      yk_t  = mat2scs_c_nb(outtb(yk));
 -      //Code($+1)='  args[1]=('+mat2scs_c_ptr(outtb(yk))+' *)(outtbptr['+string(yk-1)+']);';
 -    end
 -
 -  end
 -  capt=[i yk nyk_1 nyk_2 yk_t bllst(i).ipar]
 -  Code($+1)='block_'+rdnom+'['+string(i-1)+'].nevprt=nevprt;'
 -  Code=['/* Call of sensor (blk nb '+string(i)+') */'
 -        Code;
 -        'nport = '+string(nbcap)+';';
 -        rdnom+'_sensor(&flag, &nport, &block_'+rdnom+'['+string(i-1)+'].nevprt, '+..
 -        'told, ('+mat2scs_c_ptr(outtb(yk))+' *)(outtbptr['+string(yk-1)+']), &nrd_'+string(nyk_1)+..
 -        ', &nrd_'+string(nyk_2)+', &nrd_'+string(yk_t)+',aaa);'];
 -  proto='void '+rdnom+'_sensor('+..
 -        'int *, int *, int *, double *,void *, int *, int *,int *, int);'
 -  proto=cformatline(proto,70);
 -endfunction
 +  //**************************************
 +  //on prend en compte l'ordre des numerotation graphique des
 +  //capteur et des actionneur
 +  [junk,index]=gsort(-actt(:,$));
 +  actt=actt(index,1:$) ;
 +  [junk,index]=gsort(-capt(:,$));
 +  capt=capt(index,1:$) ;
  
 -//Generates Code for dynamically linked Fortran and C Blocks
 -function [CCode,FCode]=gen_blocks()
 -  CCode=[]
 -  FCode=[]
 +  //***************************************************
 +  // Compute the initial state and outtb (links) values
 +  //***************************************************
 +  //petite modification pour uniformiser les fichiers capteurs
 +  //et actionneurs ???
 +  rdcpr=cpr.sim.funs;
 +  for r=1:length(cap),rdcpr(cap(r))='bidon';end
 +  for r=1:length(act),rdcpr(act(r))='bidon';end
 +  Total_rdcpr=cpr.sim;Total_rdcpr.funs=rdcpr;
  
 -  kdyn=find(funtyp>1000) //dynamically linked blocs
 -                         //100X : Fortran blocks
 -                         //200X : C blocks
 +  //
 +  tcur=0;
 +  tf=scs_m.props.tf;
 +  tolerances=scs_m.props.tol;
 +  //[state,t]=scicosim(cpr.state,tcur,tf,Total_rdcpr,'start',tolerances);
 +  //cpr.state=state;
 +  z=cpr.state.z;
 +  outtb=cpr.state.outtb;
 +  //[junk_state,t]=scicosim(cpr.state,tcur,tf,Total_rdcpr,'finish',tolerances);
  
 -  if (size(kdyn,'*') >1)
 -    kfuns=[]; 
 -    //get the block data structure in the initial scs_m structure
 -    if size(corinv(kdyn(1)),'*')==1 then
 -      O=scs_m.objs(corinv(kdyn(1)));
 -    else
 -      path=list('objs');
 -      for l=corinv(kdyn(1))(1:$-1)
 -        path($+1)=l;
 -        path($+1)='model';
 -        path($+1)='rpar';
 -        path($+1)='objs';
 -      end
 -      path($+1)=corinv(kdyn(1))($);
 -      O=scs_m(path);
 +  //***********************************
 +  // Scilab and C files generation
 +  //***********************************
 +
 +  //** generate scilab interfacing function
 +  //   of the generated scicos block
 +  ok=gen_gui42();
 +
 +  //** generate code for atomic blocks
 +  // Fady*******************
 +  if ok & atomicflag then
 +    [ok,c_atomic_code]=gen_atomic_ccode42()
 +  else
 +    //***********************
 +    //** generate C files
 +    //   of the generated scicos block
 +    if ok then
 +      ok=gen_ccode42()
      end
 -    if funtyp(kdyn(1))>2000 then
 -      //C block
 -      CCode=[CCode;O.graphics.exprs(2)]
 -    else
 -      FCode=[FCode;O.graphics.exprs(2)]
 +
 +    //** Generates Makefile, loader
 +    //   and compile and link C files
 +
 +    //** def files to build
 +    files=[rdnom rdnom+'_Cblocks']
 + 
 +    //** def files to build for standalone
 +    filestan=[rdnom+'_standalone' rdnom+'_act_sens_events' rdnom+'_Cblocks']
 +
 +    //## def files to build for interfacing of the standalone
 +    filesint=[rdnom+'_void_io' rdnom+'_Cblocks' 'int'+rdnom rdnom+'_standalone']
 +
 +    //  In case of fortran blocks  (see =gen_ccode42)
 +    [fif,ierr]=fileinfo(rpat+'/'+rdnom+'f.f')
 +    if ierr==0&fif<>[] then 
 +      files=[files,rdnom+'f'],
 +      filestan=[filestan,rdnom+'f'],
 +      filesint=[filesint,rdnom+'f'],
      end
 -    kfuns=funs(kdyn(1));
 -    for i=2:size(kdyn,'*')
 -      //get the block data structure in the initial scs_m structure
 -      if size(corinv(kdyn(i)),'*')==1 then
 -        O=scs_m.objs(corinv(kdyn(i)));
 +    if ok then
 +      ok=buildnewblock(rdnom,files,filestan,filesint,libs,rpat,'','')
 +    end
 +  end
 +
 +  if ok then
 +
 +    if ~ALL then
 +      //global gui_path
 +      gui_path=rpat+'/'+rdnom+'_c.sci'
 +
 +      //exec the gui function
 +      exec(gui_path)
 +
 +      //Change diagram superblock to new generated block
 +      XX=update_block(XX)
 +
 +      //## update %scicos_libs if needed
 +      if MSDOS then
 +        libnam=rpat+'\lib'+rdnom+'.dll'
        else
 -        path=list('objs');
 -         for l=corinv(kdyn(i))(1:$-1)
 -           path($+1)=l;
 -           path($+1)='model';
 -           path($+1)='rpar';
 -           path($+1)='objs';
 -        end
 -        path($+1)=corinv(kdyn(i))($);
 -        O=scs_m(path);
 +        libnam=rpat+'/lib'+rdnom+'.so'
        end
 -      if (find(kfuns==funs(kdyn(i))) == [])
 -        kfuns=[kfuns;funs(kdyn(i))];
 -        if funtyp(kdyn(i))>2000  then
 -          //C block
 -          CCode=[CCode;O.graphics.exprs(2)]
 -        else
 -          FCode=[FCode;O.graphics.exprs(2)]
 +      if exists('%scicos_libs') then
 +        if find(libnam==%scicos_libs)==[] then
 +          %scicos_libs=[%scicos_libs,libnam];
          end
 +      else
 +        %scicos_libs=libnam
        end
 -    end
 -  elseif (size(kdyn,'*')==1)
 -    //get the block data structure in the initial scs_m structure
 -    if size(corinv(kdyn),'*')==1 then
 -      O=scs_m.objs(corinv(kdyn));
 -    else
 -      path=list('objs');
 -      for l=corinv(kdyn)(1:$-1)
 -        path($+1)=l;
 -        path($+1)='model';
 -        path($+1)='rpar';
 -        path($+1)='objs';
 -      end
 -      path($+1)=corinv(kdyn)($);
 -      O=scs_m(path);
 -    end
 -    if funtyp(kdyn)>2000 then
 -      //C block
 -      CCode=[CCode;O.graphics.exprs(2)]
 +
 +      //## resume the interfacing function to the upper-level
 +      execstr('['+rdnom+'_c,%scicos_libs]=resume('+rdnom+'_c,%scicos_libs)')
 +
      else
 -      FCode=[FCode;O.graphics.exprs(2)]
 +      //@@ get new generated block
 +      XX = gen_allblk()
 +
      end
    end
 -  if CCode==[]
 -    CCode=['void no_ccode()'
 -           '{'
 -           '  return;'
 -           '}']
 -  end
  endfunction
 +//**----------------------------------------------------------------------------------------
 +//** Subsidiary functions
 +//**----------------------------------------------------------------------------------------
  
 -//** Generates the C code for new block simulation
 +//CallBlock : generate C calling sequence
 +//            of a scicos block
  //
 -//12/07/07 Alan Layec
 -function ok=gen_ccode42();
 -
 -  //** Generate code for scicos block
 -  Code=make_computational42()
 +//inputs : bk   : bloc index
 +//         pt   : evt activation number
 +//         flag : flag
 +//
 +//output : txt  :
 +//
 +//Copyright INRIA
 +function txt=call_block42(bk,pt,flag)
 +  txt=[]
 +  //**
 +  if flag==2 & ((zcptr(bk+1)-zcptr(bk))<>0) & pt<0 then
  
 -  ierr=execstr('mputl(Code,rpat+''/''+rdnom+''.c'')','errcatch')
 -  if ierr<>0 then
 -    message(lasterror())
 -    ok=%f
 +  else
 +    if flag==2 & ((zptr(bk+1)-zptr(bk))+..
 +                  (ozptr(bk+1)-ozptr(bk))+..
 +                  (xptr(bk+1)-xptr(bk)+..
 +                  with_work(bk))==0 |..
 +                  pt<=0) & ~(stalone & or(bk==actt(:,1))) then
 +      return // block without state or continuously activated
 +    end
 +  end
 +  if flag==0 & ((xptr(bk+1)-xptr(bk))==0) then
 +    return // block without continuous state
 +  end
 +  if flag==7 & ((xptr(bk+1)-xptr(bk))==0) then
 +    return // block without continuous state
 +  end
 +  if flag==9 & ((zcptr(bk+1)-zcptr(bk))==0) then
 +    return // block without continuous state
 +  end
 +  if flag==3 & ((clkptr(bk+1)-clkptr(bk))==0) then
      return
    end
  
  //
  
  function [%scs_wgrid]=do_grid(%scs_wgrid)
 - exprs = [string(%scs_wgrid(1)),string(%scs_wgrid(2)),string(%scs_wgrid(3))]
 - while %t do
++
 +// ** 22/06/2009 Serge Steer INRIA
 +// - gh_window.children replaced by gh_axes because of uimenu which are
 +//   children of the figure as well as axes
 +  exprs = [string(%scs_wgrid(1)),string(%scs_wgrid(2)),string(%scs_wgrid(3))]
 +  while %t do
-     [ok,b1,b2,colorr,exprs]=getvalue(['Set Grid'],..
+     [ok,b1,b2,colorr,exprs]=scicos_getvalue(['Set Grid'],..
 -          ['x','y','color'],list('vec',1,'vec',1,'vec',1),exprs)
 +                                   ['x','y','color'],list('vec',1,'vec',1,'vec',1),exprs)
      if ~ok then
 -     break
 +      break
      else
 -     %scs_wgrid(1)=b1
 -     %scs_wgrid(2)=b2
 -     %scs_wgrid(3)=colorr
 -     drawgrid();
 -     
 -     gh_window = scf(%win)
 -     
 -     swap_handles(gh_window.children.children($),...
 -                  gh_window.children.children(1));
 -     delete(gh_window.children.children(1));
 -     drawnow();
 -     //** show_pixmap() ; //** not useful on Scilab 5
 -     break
 +      %scs_wgrid(1)=b1
 +      %scs_wgrid(2)=b2
 +      %scs_wgrid(3)=colorr
 +      drawlater()
 +      drawgrid();
 +      drawnow();
 +      break
      end
    end
  endfunction
@@@ -58,9 -58,9 +58,9 @@@ function scs_m = do_ident(scs_m
        identification = emptystr() ;
      end
      //** Use a dialog box to acquire/modify the id string
 -    texte_1 = "Set Block identification" ;
 +    texte_1 = _("Set Block identification") ;
      texte_2 = "ID"                       ;
-     [ok, identification] = getvalue(texte_1, texte_2, list('str', 1), identification) ;
+     [ok, identification] = scicos_getvalue(texte_1, texte_2, list('str', 1), identification) ;
  
      if ok then
        objet.graphics.id = stripblanks(identification); //** update the identification structure
@@@ -78,9 -81,9 +78,9 @@@
        identification = emptystr() ;
      end
      //** Use a dialog box to acquire/modify the id string
 -    texte_1 = "Set link Identification" ;
 +    texte_1 = _("Set link Identification") ;
      texte_2 = "ID"                      ;
-     [ok, identification] = getvalue(texte_1, texte_2, list('str', 1),identification) ;
+     [ok, identification] = scicos_getvalue(texte_1, texte_2, list('str', 1),identification) ;
      //
      if ok then
        identification = stripblanks(identification)  ;
@@@ -41,14 -41,9 +41,14 @@@ function [mod,scs_m]=do_label(%pt,scs_m
    end
    
    o = scs_m.objs(K)
 +  // avoid error with links
 +  if typeof(o)<>'Block' then 
 +    messagebox("No label can be placed on Links.","modal")  
 +    return,
 +  end
    model = o.model
    lab = model.label
-   [ok,lab] = getvalue('Give block label','label',list('str',1),lab)
+   [ok,lab] = scicos_getvalue('Give block label','label',list('str',1),lab)
    
    //** Output 
    if ok then
@@@ -146,10 -146,29 +146,30 @@@ function [edited,options] = do_options(
  
    if R<>[] & G<>[] & B<>[] then 
       R= R/255; G= G/255; B= B/255 ; //** normalize to one 
 -    options("Cmap") = [options("Cmap") ; [R, G, B]]
 +    options.Cmap = [options.Cmap ; [R, G, B]]
    end
  
 +
+ //** ---------------------- OLD CODE---------------------------------------------------- 
+ //     while %t do
+ //       [ok, R,G,B] = scicos_getvalue(["Enter RGB description of new colors"; ..
+ //                               "Each component must be greater or equal to 0"; ..
+ //                               "and less or equal to 1"], ..
+ //                               ["R","G","B"], ..
+ //                               list("vec", -1, "vec", -1, "vec", -1), ..
+ //                               [" ", " ", " "]) ; 
+ //       if ~ok then break, end
+ //       if or(R < 0 | R > 1) | or(G < 0 | G > 1) | or(B < 0 | B > 1) then
+ //         messagebox("One or several RGB components are out of [0 1]","modal","error");
+ //       else
+ //         break; //** EXIT from the input loop 
+ //       end
+ //     end
+ //     if ok then
+ //       //** add one or more color ad the palette 
+ //       options("Cmap") = [options("Cmap") ; [R(:), G(:), B(:)]]
+ //     end
    end // if flag == ...
    
    if ok then
@@@ -28,8 -25,9 +28,8 @@@ function [scs_m,edited,ok]=do_rename(sc
    else
      mess='Enter the new diagram name'
    end
 -
 -  new = dialog(mess,scs_m.props.title(1))
 -  new = new(1)
 +  
-   [ok,new]=getvalue(mess,"Name",list("str",[1,1]),scs_m.props.title(1))
++  [ok,new]=scicos_getvalue(mess,"Name",list("str",[1,1]),scs_m.props.title(1))
    
    if new<>[] then
      drawtitle(scs_m.props)     //erase title
@@@ -63,7 -63,7 +63,7 @@@ function [%pt, scs_m] = do_resize(%pt, 
        sz       = graphics.sz   ;
        orig     = graphics.orig ;
  
-       [ok,w,h] = getvalue(_("Set Block sizes"),[_("width");_("height")],..
 -      [ok,w,h] = scicos_getvalue('Set Block sizes',['width';'height'],..
++      [ok,w,h] = scicos_getvalue(_("Set Block sizes"),[_("width");_("height")],..
                           list('vec',1,'vec',1),string(sz(:)))
        //** in case of valid (w,h)
        if ok  then
@@@ -83,7 -83,7 +83,7 @@@
        Thick = pos(1) ;
        Type  = pos(2) ;
        //** open a dialog box to edit
-       [ok,Thick,Type] = getvalue(_("Link parameters"),[_("Thickness");_("Type")],..
 -      [ok,Thick,Type] = scicos_getvalue('Link parameters',['Thickness';'Type'],..
++      [ok,Thick,Type] = scicos_getvalue(_("Link parameters"),[_("Thickness");_("Type")],..
                                  list('vec','1','vec',1),[string(Thick);string(Type)])
        if ok then
        edited = or(scs_m.objs(K).thick<>[Thick,Type]) ; //** set flag if the parm are edited
@@@ -61,13 -61,10 +61,13 @@@ function fname=do_saveblockgui(o
            '    '+sci2exp(bitems)
            '  Ss=..'
            '    '+sci2exp(ss)
 -          '  %scicos_context=struct()'
 -          '  [ok,'+tt+',exprs]=scicos_getvalue(Btitre,Exprs0,Ss,exprs)'
 -          '  if ok then'
 +          '  scicos_context=struct()'
            '     x=arg1'
 +        '  ok=%f'
 +        '  while ~ok do'
-           '    [ok,'+tt+',exprs]=getvalue(Btitre,Bitems,Ss,exprs)'
++          '    [ok,'+tt+',exprs]=scicos_getvalue(Btitre,Bitems,Ss,exprs)'
 +        '    if ~ok then return;end'
 +        '     %scicos_context=scicos_context'
            '     sblock=x.model.rpar'
            '     [%scicos_context,ierr]=script2var(sblock.props.context,%scicos_context)'
            '     if ierr==0 then'
index a817b02,0000000..4f4045d
mode 100644,000000..100644
--- /dev/null
@@@ -1,52 -1,0 +1,52 @@@
 +//  Scicos
 +//
 +//  Copyright (C) INRIA - METALAU Project <scicos@inria.fr>
 +//
 +// This program is free software; you can redistribute it and/or modify
 +// it under the terms of the GNU General Public License as published by
 +// the Free Software Foundation; either version 2 of the License, or
 +// (at your option) any later version.
 +//
 +// This program is distributed in the hope that it will be useful,
 +// but WITHOUT ANY WARRANTY; without even the implied warranty of
 +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 +// GNU General Public License for more details.
 +//
 +// You should have received a copy of the GNU General Public License
 +// along with this program; if not, write to the Free Software
 +// Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
 +//
 +// See the file ../license.txt
 +//
 +function [libss,ok,cancel]=get_dynamic_lib_dir(tt,funam,flag)
 +// Copyright INRIA
 +  cancel=%f
 +  cur_wd = pwd();
 +  chdir(TMPDIR);
 +  mputl(tt,funam+'.'+flag);
 +  libss='';
 +  label='';
 +  ok=%f
 +  while ~ok then
-    [ok,libss,label]=getvalue('Linking the '+funam+' function','External libraries (if any)',list('str',1),label);
++   [ok,libss,label]=scicos_getvalue('Linking the '+funam+' function','External libraries (if any)',list('str',1),label);
 +   if ~ok then chdir(cur_wd);cancel=%t,return;end
 +   // for multiple libraries
 +   if strindex(libss,'''')<>[] | strindex(libss,'""')<>[] then
 +     ierr=execstr('libss=evstr(libss)','errcatch')
 +     if ierr<>0  then
 +        messagebox(['Can''t solve other files to link'],"modal")
 +      chdir(cur_wd);
 +        ok=%f;
 +      end
 +    else
 +      libss=tokens(libss,[' ',';'])
 +    end
 +    for i=1:size(libss,'*')
 +       lib_dll=libss(i) + getdynlibext();
 +       ifexst=fileinfo(lib_dll)
 +       if ifexst==[] then messagebox ('the library '+lib_dll+' doesn''t exists','modal');ok=%f;end
 +    end
 +  end
 +  chdir(cur_wd);
 +endfunction 
 + 
index e4ae444,0000000..924814f
mode 100644,000000..100644
--- /dev/null
@@@ -1,106 -1,0 +1,105 @@@
 +//  Scicos
 +//
 +//  Copyright (C) INRIA - METALAU Project <scicos@inria.fr>
 +//
 +// This program is free software; you can redistribute it and/or modify
 +// it under the terms of the GNU General Public License as published by
 +// the Free Software Foundation; either version 2 of the License, or
 +// (at your option) any later version.
 +//
 +// This program is distributed in the hope that it will be useful,
 +// but WITHOUT ANY WARRANTY; without even the implied warranty of
 +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 +// GNU General Public License for more details.
 +//
 +// You should have received a copy of the GNU General Public License
 +// along with this program; if not, write to the Free Software
 +// Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
 +//
 +// See the file ../license.txt
 +//
- function [ok]=translator(filemo,Mblocks,modelica_libs,Flat)
++function [ok]=translator(filemo,Mblocks,_Modelica_libs,Flat)
 +//Generate the flat model of the Modelica model given in the filemo file
 +//and the Modelica libraries. Interface to the external tool
 +//translator.
 +// if <name> is the basename of filemo this function produces
 +// - the flat Modelica model file in outpath+name+'f.mo'
 +// - the flat xml representation file in  outpath+name+'f_init.xml'
 +// - the flat xml  file in  outpath+name+'f_relations.xml'
-   
-   mlibs=pathconvert(modelica_libs,%f,%t)
++  mlibs=pathconvert(_Modelica_libs,%f,%t)
 +  filemo=pathconvert(filemo,%f,%t) 
 +  Flat=pathconvert(Flat,%f,%t) 
 +  
 +  name=basename(filemo)
 +  namef=name+'f';
 +
 +  molibs=[]
 +  mlibsM=pathconvert(TMPDIR+'/Modelica/',%f,%t)      
 +  for k=1:size(Mblocks,'r')
 +    funam=stripblanks(Mblocks(k))
 +    [dirF,nameF,extF]=fileparts(funam);
 +    if (extF=='.mo') then
 +      molibs=[molibs;""""+funam+""""];
 +    else
 +      molibs=[molibs;""""+mlibsM+funam+'.mo'+""""]
 +    end
 +  end
 +
 +  // directories for translator libraries
 +  for k=1:(size(mlibs,'*')-1)
 +    modelica_directories=mlibs(k); 
 +    if modelica_directories<> [] then 
 +      molibs=[molibs;""""+modelica_directories+""""];
 +    end
 +  end
 +  
 +  translator_libs=strcat(' -lib '+ molibs);
 +  
 +  // build the sequence of -lib arguments for translator
 +  if MSDOS then, Limit=1000;else, Limit=3500;end
 +  if (length(translator_libs)>Limit) then 
 +    // OS limitation may restrict the length of shell command line
 +    // arguments. If there are to many .mo file we catenate them into a
 +    // single MYMOPACKAGE.mo file
 +    messagebox(msprintf(_('There are too many Modelica files.\n'+..
 +                        'it would be better to define several \n'+..
 +                        'Modelica programs in a single file.')),'warning','modal')
 +    mymopac= pathconvert(outpath+'MYMOPACKAGE.mo',%f,%t)
 +    txt=[];
 +    for k=1:size(molibs,'*')
 +      [pathx,fnamex,extensionx]=fileparts(molibs(k));
 +      if (fnamex<>'MYMOPACKAGE') then 
 +      txt=[txt;mgetl(evstr(molibs(k)))];
 +      end
 +    end
 +    mputl(txt,mymopac);     
 +    translator_libs= ' -lib ""'+mymopac+'""';
 +  end 
 +  translator_libs=translator_libs+'  -lib ""'+filemo+'""'
 +
 +  //Build the shell instruction for calling the translator
 +  if MSDOS then
 +    exe='""'+pathconvert(SCI+'/bin/translator.exe',%f,%t)+'"" '
 +  else
 +    exe='""'+pathconvert(SCI+'/modules/scicos/translator',%f,%t)+'""'
 +  end
 +  
 +  out=' -o ""'+Flat+'""' //flat modelica
 +  Errfile=outpath+'S_translator.err""';
 +
 +  // without the with-init option
 +  // instr=exe+translator_libs+out+' -command ""'+name+' '+namef+';"" >""'+Errfile
 +  
 +  // with the with-init option 
 +   instr=exe+translator_libs+out+' -with-init -command ""'+name+' '+namef+';"" >""'+Errfile
 +  
 + if MSDOS then,   mputl(instr,outpath+'/gent.bat'), instr=outpath+'/gent.bat';end
 + 
 + if execstr('unix_s(instr)','errcatch')<>0 then
 +    messagebox([_('-------Modelica translator error message:-----');
 +              mgetl(outpath+'S_translator.err')],'error','modal');
 +    ok=%f,
 +  else
 +    ok=%t
 +  end
 +endfunction
  //
  
  function r = with_modelica_compiler()
-   // check if modelica compiler exists in current $PATH
+   
+   if exists('scicos_scicoslib') == 0 then
+     load("SCI/modules/scicos/macros/scicos_scicos/lib") ;
+   end
  
-   compilername = 'modelicac'
+   // check if modelica compiler exists in current $PATH
+   r = ~isempty(getmodelicacpath());
 +
-   // try to launch 'modelicac' with an '--help' switch and test result:
-   //  - ierr == 0 means that command completed successfully
-   //  - ierr != 0 means an error occurred (most likely file was not found)
-   try
-     [rep,ierr,err] = unix_g(compilername + ' --help')
-     if (ierr == 0) then
-       r = %t
-     else
-       r = %f
-     end
-   catch
-     r = %f
-   end
-   
-   // TEMP. WORKAROUND SINCE WE DONT HAVE MODELICA
-   
- //  r = %f
  endfunction
  
  ;
  #define SCICOS "scicos"
  
- Source: bin\noscicos.lib; DestDir: {app}\bin; DestName: scicos.lib; Components: not ({#COMPN_SCICOS})
- Source: bin\noscicos.dll; DestDir: {app}\bin; DestName: scicos.dll; Components: not ({#COMPN_SCICOS})
+ Source: bin\noscicos.lib; DestDir: {app}\bin; DestName: scicos.lib; Components: not ({#COMPN_XCOS})
+ Source: bin\noscicos.dll; DestDir: {app}\bin; DestName: scicos.dll; Components: not ({#COMPN_XCOS})
  ;
- Source: bin\scicos_f.lib; DestDir: {app}\bin; Components: {#COMPN_SCICOS}
- Source: bin\scicos_f.dll; DestDir: {app}\bin; Components: {#COMPN_SCICOS}
+ Source: bin\scicos_f.lib; DestDir: {app}\bin; Components: {#COMPN_XCOS}
+ Source: bin\scicos_f.dll; DestDir: {app}\bin; Components: {#COMPN_XCOS}
  ;
- Source: bin\scicos_sundials.dll; DestDir: {app}\bin; Components: {#COMPN_SCICOS}
+ Source: bin\scicos_sundials.dll; DestDir: {app}\bin; Components: {#COMPN_XCOS}
  ;
- Source: bin\scicos.lib; DestDir: {app}\bin; Components: {#COMPN_SCICOS}
- Source: bin\scicos.dll; DestDir: {app}\bin; Components: {#COMPN_SCICOS}
+ Source: bin\scicos.lib; DestDir: {app}\bin; Components: {#COMPN_XCOS}
+ Source: bin\scicos.dll; DestDir: {app}\bin; Components: {#COMPN_XCOS}
  ;
- Source: modules\{#SCICOS}\VERSION.xml; DestDir: {app}\modules\{#SCICOS}; Components: {#COMPN_SCICOS}
- Source: modules\{#SCICOS}\readme.txt; DestDir: {app}\modules\{#SCICOS}; Components: {#COMPN_SCICOS}
- Source: modules\{#SCICOS}\license.txt; DestDir: {app}\modules\{#SCICOS}; Components: {#COMPN_SCICOS}
- Source: modules\{#SCICOS}\changelog.txt; DestDir: {app}\modules\{#SCICOS}; Components: {#COMPN_SCICOS}
+ Source: modules\{#SCICOS}\VERSION.xml; DestDir: {app}\modules\{#SCICOS}; Components: {#COMPN_XCOS}
+ Source: modules\{#SCICOS}\readme.txt; DestDir: {app}\modules\{#SCICOS}; Components: {#COMPN_XCOS}
+ Source: modules\{#SCICOS}\license.txt; DestDir: {app}\modules\{#SCICOS}; Components: {#COMPN_XCOS}
+ Source: modules\{#SCICOS}\changelog.txt; DestDir: {app}\modules\{#SCICOS}; Components: {#COMPN_XCOS}
  ;
- Source: modules\{#SCICOS}\sci_gateway\scicos_gateway.xml; DestDir: {app}\modules\{#SCICOS}\sci_gateway; Components: {#COMPN_SCICOS}
+ Source: modules\{#SCICOS}\sci_gateway\scicos_gateway.xml; DestDir: {app}\modules\{#SCICOS}\sci_gateway; Components: {#COMPN_XCOS}
  ;
- Source: modules\{#SCICOS}\etc\{#SCICOS}.quit; DestDir: {app}\modules\{#SCICOS}\etc; Components: {#COMPN_SCICOS}
- Source: modules\{#SCICOS}\etc\{#SCICOS}.start; DestDir: {app}\modules\{#SCICOS}\etc; Components: {#COMPN_SCICOS}
+ Source: modules\{#SCICOS}\etc\{#SCICOS}.quit; DestDir: {app}\modules\{#SCICOS}\etc; Components: {#COMPN_XCOS}
+ Source: modules\{#SCICOS}\etc\{#SCICOS}.start; DestDir: {app}\modules\{#SCICOS}\etc; Components: {#COMPN_XCOS}
  ;
  ;
- Source: modules\{#SCICOS}\help\addchapter.sce; DestDir: {app}\modules\{#SCICOS}\help; Flags: recursesubdirs; Components:  {#COMPN_SCICOS}
+ Source: modules\{#SCICOS}\help\addchapter.sce; DestDir: {app}\modules\{#SCICOS}\help; Flags: recursesubdirs; Components:  {#COMPN_XCOS}
  ;
- Source: modules\{#SCICOS}\jar\*.jar; DestDir: {app}\modules\{#SCICOS}\jar; Flags: recursesubdirs; Components:  {#COMPN_SCICOS}
  ;
 +Source: modules\{#SCICOS}\palettes\*.cosf; DestDir: {app}\modules\{#SCICOS}\palettes; Flags: recursesubdirs; Components:  {#COMPN_SCICOS}
 +;
- #ifdef WITH_CHM
- Source: modules\{#SCICOS}\chm\*.chm; DestDir: {app}\modules\{#SCICOS}\chm; Components: {#COMPN_SCICOS}
- #endif
- ;
- ;Source: modules\{#SCICOS}\includes\*.h; DestDir: {app}\modules\{#SCICOS}\includes; Components: {#COMPN_SCICOS}
- Source: modules\{#SCICOS}\includes\scicos.h; DestDir: {app}\modules\{#SCICOS}\includes; Components: {#COMPN_SCICOS}
- Source: modules\{#SCICOS}\includes\scicos_free.h; DestDir: {app}\modules\{#SCICOS}\includes; Components: {#COMPN_SCICOS}
- Source: modules\{#SCICOS}\includes\scicos_malloc.h; DestDir: {app}\modules\{#SCICOS}\includes; Components: {#COMPN_SCICOS}
- Source: modules\{#SCICOS}\includes\scicos-def.h; DestDir: {app}\modules\{#SCICOS}\includes; Components: {#COMPN_SCICOS}
+ ;Source: modules\{#SCICOS}\includes\*.h; DestDir: {app}\modules\{#SCICOS}\includes; Components: {#COMPN_XCOS}
+ Source: modules\{#SCICOS}\includes\scicos.h; DestDir: {app}\modules\{#SCICOS}\includes; Components: {#COMPN_XCOS}
+ Source: modules\{#SCICOS}\includes\scicos_free.h; DestDir: {app}\modules\{#SCICOS}\includes; Components: {#COMPN_XCOS}
+ Source: modules\{#SCICOS}\includes\scicos_malloc.h; DestDir: {app}\modules\{#SCICOS}\includes; Components: {#COMPN_XCOS}
+ Source: modules\{#SCICOS}\includes\scicos-def.h; DestDir: {app}\modules\{#SCICOS}\includes; Components: {#COMPN_XCOS}
  
  ;
- Source: modules\{#SCICOS}\macros\buildmacros.sce; DestDir: {app}\modules\{#SCICOS}\macros; Flags: recursesubdirs; Components: {#COMPN_SCICOS}
- Source: modules\{#SCICOS}\macros\lib; DestDir: {app}\modules\{#SCICOS}\macros; Flags: recursesubdirs; Components: {#COMPN_SCICOS}
- Source: modules\{#SCICOS}\macros\names; DestDir: {app}\modules\{#SCICOS}\macros; Flags: recursesubdirs; Components: {#COMPN_SCICOS}
- Source: modules\{#SCICOS}\macros\*.bin; DestDir: {app}\modules\{#SCICOS}\macros; Flags: recursesubdirs; Components: {#COMPN_SCICOS}
- Source: modules\{#SCICOS}\macros\*.sci; DestDir: {app}\modules\{#SCICOS}\macros; Flags: recursesubdirs; Components: {#COMPN_SCICOS}
- Source: modules\{#SCICOS}\macros\*.sce; DestDir: {app}\modules\{#SCICOS}\macros; Flags: recursesubdirs; Components: {#COMPN_SCICOS}
- Source: modules\{#SCICOS}\macros\*.cosf; DestDir: {app}\modules\{#SCICOS}\macros; Flags: recursesubdirs; Components: {#COMPN_SCICOS}
+ ;Source: modules\{#SCICOS}\help\images\*.gif; DestDir: {app}\modules\{#SCICOS}\help\images; Components: {#COMPN_XCOS}
+ ;
+ ;
+ Source: modules\{#SCICOS}\macros\buildmacros.sce; DestDir: {app}\modules\{#SCICOS}\macros; Flags: recursesubdirs; Components: {#COMPN_XCOS}
+ Source: modules\{#SCICOS}\macros\lib; DestDir: {app}\modules\{#SCICOS}\macros; Flags: recursesubdirs; Components: {#COMPN_XCOS}
+ Source: modules\{#SCICOS}\macros\names; DestDir: {app}\modules\{#SCICOS}\macros; Flags: recursesubdirs; Components: {#COMPN_XCOS}
+ Source: modules\{#SCICOS}\macros\*.bin; DestDir: {app}\modules\{#SCICOS}\macros; Flags: recursesubdirs; Component