diff options
53 files changed, 1179 insertions, 174 deletions
diff --git a/2.3-1/demos/FULLRF.dem.sce b/2.3-1/demos/FULLRF.dem.sce new file mode 100644 index 00000000..3aeeba20 --- /dev/null +++ b/2.3-1/demos/FULLRF.dem.sce @@ -0,0 +1,18 @@ +// Copyright (C) 2017 - IIT Bombay - FOSSEE +// This file must be used under the terms of the CeCILL. +// This source file is licensed as described in the file COPYING, which +// you should have received as part of this distribution. The terms +// are also available at +// http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt +// Author: Sandeep Gupta +// Organization: FOSSEE, IIT Bombay +// Email: toolbox@scilab.in + + +lines(0); + +global SCI2CHOME + +scilab2c(SCI2CHOME+"/tests/unit_tests/testLinearAlgebra/testfullrf/testfullrf.sci", TMPDIR,SCI2CHOME+"/tests/unit_tests/testLinearAlgebra/testfullrf"); + +editor(TMPDIR+"/main.c"); diff --git a/2.3-1/demos/GIVENS.dem.sce b/2.3-1/demos/GIVENS.dem.sce new file mode 100644 index 00000000..0ab2d2a7 --- /dev/null +++ b/2.3-1/demos/GIVENS.dem.sce @@ -0,0 +1,18 @@ +// Copyright (C) 2017 - IIT Bombay - FOSSEE +// This file must be used under the terms of the CeCILL. +// This source file is licensed as described in the file COPYING, which +// you should have received as part of this distribution. The terms +// are also available at +// http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt +// Author: Sandeep Gupta +// Organization: FOSSEE, IIT Bombay +// Email: toolbox@scilab.in + + +lines(0); + +global SCI2CHOME + +scilab2c(SCI2CHOME+"/tests/unit_tests/testLinearAlgebra/testgivens/testgivens.sci", TMPDIR,SCI2CHOME+"/tests/unit_tests/testLinearAlgebra/testgivens"); + +editor(TMPDIR+"/main.c"); diff --git a/2.3-1/demos/HESS.dem.sce b/2.3-1/demos/HESS.dem.sce new file mode 100644 index 00000000..4c70d67b --- /dev/null +++ b/2.3-1/demos/HESS.dem.sce @@ -0,0 +1,18 @@ +// Copyright (C) 2017 - IIT Bombay - FOSSEE +// This file must be used under the terms of the CeCILL. +// This source file is licensed as described in the file COPYING, which +// you should have received as part of this distribution. The terms +// are also available at +// http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt +// Author: Sandeep Gupta +// Organization: FOSSEE, IIT Bombay +// Email: toolbox@scilab.in + + +lines(0); + +global SCI2CHOME + +scilab2c(SCI2CHOME+"/tests/unit_tests/testLinearAlgebra/testhess/testhess.sci", TMPDIR,SCI2CHOME+"/tests/unit_tests/testLinearAlgebra/testhess"); + +editor(TMPDIR+"/main.c"); diff --git a/2.3-1/demos/HOUSEHOLDER.dem.sce b/2.3-1/demos/HOUSEHOLDER.dem.sce new file mode 100644 index 00000000..74474071 --- /dev/null +++ b/2.3-1/demos/HOUSEHOLDER.dem.sce @@ -0,0 +1,18 @@ +// Copyright (C) 2017 - IIT Bombay - FOSSEE +// This file must be used under the terms of the CeCILL. +// This source file is licensed as described in the file COPYING, which +// you should have received as part of this distribution. The terms +// are also available at +// http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt +// Author: Sandeep Gupta +// Organization: FOSSEE, IIT Bombay +// Email: toolbox@scilab.in + + +lines(0); + +global SCI2CHOME + +scilab2c(SCI2CHOME+"/tests/unit_tests/testLinearAlgebra/testhouseholder/testhouseholder.sci", TMPDIR,SCI2CHOME+"/tests/unit_tests/testLinearAlgebra/testhouseholder"); + +editor(TMPDIR+"/main.c"); diff --git a/2.3-1/demos/NORM.dem.sce b/2.3-1/demos/NORM.dem.sce new file mode 100644 index 00000000..1de3feba --- /dev/null +++ b/2.3-1/demos/NORM.dem.sce @@ -0,0 +1,18 @@ +// Copyright (C) 2017 - IIT Bombay - FOSSEE +// This file must be used under the terms of the CeCILL. +// This source file is licensed as described in the file COPYING, which +// you should have received as part of this distribution. The terms +// are also available at +// http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt +// Author: Sandeep Gupta +// Organization: FOSSEE, IIT Bombay +// Email: toolbox@scilab.in + + +lines(0); + +global SCI2CHOME + +scilab2c(SCI2CHOME+"/tests/unit_tests/testLinearAlgebra/testnorm/testnorm.sci", TMPDIR,SCI2CHOME+"/tests/unit_tests/testLinearAlgebra/testnorm"); + +editor(TMPDIR+"/main.c"); diff --git a/2.3-1/demos/QR.dem.sce b/2.3-1/demos/QR.dem.sce new file mode 100644 index 00000000..7d2fc1a3 --- /dev/null +++ b/2.3-1/demos/QR.dem.sce @@ -0,0 +1,18 @@ +// Copyright (C) 2017 - IIT Bombay - FOSSEE +// This file must be used under the terms of the CeCILL. +// This source file is licensed as described in the file COPYING, which +// you should have received as part of this distribution. The terms +// are also available at +// http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt +// Author: Sandeep Gupta +// Organization: FOSSEE, IIT Bombay +// Email: toolbox@scilab.in + + +lines(0); + +global SCI2CHOME + +scilab2c(SCI2CHOME+"/tests/unit_tests/testLinearAlgebra/testqr/testQR.sci", TMPDIR,SCI2CHOME+"/tests/unit_tests/testLinearAlgebra/testqr"); + +editor(TMPDIR+"/main.c"); diff --git a/2.3-1/demos/ROWCOMP.dem.sce b/2.3-1/demos/ROWCOMP.dem.sce new file mode 100644 index 00000000..6557eb4c --- /dev/null +++ b/2.3-1/demos/ROWCOMP.dem.sce @@ -0,0 +1,18 @@ +// Copyright (C) 2017 - IIT Bombay - FOSSEE +// This file must be used under the terms of the CeCILL. +// This source file is licensed as described in the file COPYING, which +// you should have received as part of this distribution. The terms +// are also available at +// http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt +// Author: Sandeep Gupta +// Organization: FOSSEE, IIT Bombay +// Email: toolbox@scilab.in + + +lines(0); + +global SCI2CHOME + +scilab2c(SCI2CHOME+"/tests/unit_tests/testLinearAlgebra/testrowcomp/testrcomp.sci", TMPDIR,SCI2CHOME+"/tests/unit_tests/testLinearAlgebra/testrowcomp"); + +editor(TMPDIR+"/main.c"); diff --git a/2.3-1/demos/SPEC.dem.sce b/2.3-1/demos/SPEC.dem.sce new file mode 100644 index 00000000..423c1520 --- /dev/null +++ b/2.3-1/demos/SPEC.dem.sce @@ -0,0 +1,18 @@ +// Copyright (C) 2017 - IIT Bombay - FOSSEE +// This file must be used under the terms of the CeCILL. +// This source file is licensed as described in the file COPYING, which +// you should have received as part of this distribution. The terms +// are also available at +// http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt +// Author: Sandeep Gupta +// Organization: FOSSEE, IIT Bombay +// Email: toolbox@scilab.in + + +lines(0); + +global SCI2CHOME + +scilab2c(SCI2CHOME+"/tests/unit_tests/testLinearAlgebra/testspec/testspec.sci", TMPDIR,SCI2CHOME+"/tests/unit_tests/testLinearAlgebra/testspec"); + +editor(TMPDIR+"/main.c"); diff --git a/2.3-1/demos/SQROOT.dem.sce b/2.3-1/demos/SQROOT.dem.sce new file mode 100644 index 00000000..676d5e52 --- /dev/null +++ b/2.3-1/demos/SQROOT.dem.sce @@ -0,0 +1,18 @@ +// Copyright (C) 2017 - IIT Bombay - FOSSEE +// This file must be used under the terms of the CeCILL. +// This source file is licensed as described in the file COPYING, which +// you should have received as part of this distribution. The terms +// are also available at +// http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt +// Author: Sandeep Gupta +// Organization: FOSSEE, IIT Bombay +// Email: toolbox@scilab.in + + +lines(0); + +global SCI2CHOME + +scilab2c(SCI2CHOME+"/tests/unit_tests/testLinearAlgebra/testsqroot/testsqroot.sci", TMPDIR,SCI2CHOME+"/tests/unit_tests/testLinearAlgebra/testsqroot"); + +editor(TMPDIR+"/main.c"); diff --git a/2.3-1/demos/SVA.dem.sce b/2.3-1/demos/SVA.dem.sce new file mode 100644 index 00000000..3ced74f5 --- /dev/null +++ b/2.3-1/demos/SVA.dem.sce @@ -0,0 +1,18 @@ +// Copyright (C) 2017 - IIT Bombay - FOSSEE +// This file must be used under the terms of the CeCILL. +// This source file is licensed as described in the file COPYING, which +// you should have received as part of this distribution. The terms +// are also available at +// http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt +// Author: Sandeep Gupta +// Organization: FOSSEE, IIT Bombay +// Email: toolbox@scilab.in + + +lines(0); + +global SCI2CHOME + +scilab2c(SCI2CHOME+"/tests/unit_tests/testLinearAlgebra/testsva/testsva.sci", TMPDIR,SCI2CHOME+"/tests/unit_tests/testLinearAlgebra/testsva"); + +editor(TMPDIR+"/main.c"); diff --git a/2.3-1/demos/SVD.dem.sce b/2.3-1/demos/SVD.dem.sce index d466964a..aa35cce9 100644 --- a/2.3-1/demos/SVD.dem.sce +++ b/2.3-1/demos/SVD.dem.sce @@ -13,8 +13,6 @@ lines(0); global SCI2CHOME -scilab2c(SCI2CHOME+"tests/unit_tests/testLinearAlgebra/testsvd/testsvd.sci", TMPDIR); +scilab2c(SCI2CHOME+"/tests/unit_tests/testLinearAlgebra/test_svd/testsvd.sci", TMPDIR,SCI2CHOME+"/tests/unit_tests/testLinearAlgebra/test_svd"); editor(TMPDIR+"/main.c"); - - diff --git a/2.3-1/demos/scilab2c.dem.gateway.sce b/2.3-1/demos/scilab2c.dem.gateway.sce index c1031048..1c57d18c 100644 --- a/2.3-1/demos/scilab2c.dem.gateway.sce +++ b/2.3-1/demos/scilab2c.dem.gateway.sce @@ -15,18 +15,31 @@ demopath = get_absolute_file_path("scilab2c.dem.gateway.sce"); subdemolist = ["Trigonometric Identity" , "TrigonometricIdentity.dem.sce"; "Linear Regression" , "LinearRegression.dem.sce"; "Symbols", "Symbols.dem.sce"; - "High Pass Filter", "Filter.dem.sce"; + "High Pass Filter", "Filter.dem.sce"; "Jacobi functions","Jacobi.dem.sce"; "Analog Filters","analogFilter.dem.sce"; + "Discrete Cosine Transform" , "test_dct.dem.sce"; + "Inverse Cosine Transform" , "test_idct.dem.sce"; "String Functions","string.dem.sce"; "Filter Responses","FilterResponse.dem.sce"; -======= + "Arduino blink", "blink.dem.sce"; "Arduino digital input", "digital_in.dem.sce"; "Arduino analog voltage i/o", "analog_in_out_volt.dem.sce"; "Arduino analog output", "analog_out.dem.sce"; "Arduino DC motor", "dc_motor.dem.sce"; "Arduino Master write", "master_write.dem.sce"; + "Singular Value Decomposition", "SVD.dem.sce"; + "Singular Value Approximation", "SVA.dem.sce"; + "SQROOT", "SQROOT.dem.sce"; + "SPEC", "SPEC.dem.sce"; + "ROWCOMP","ROWCOMP.dem.sce"; + "QR Decomposition", "QR.dem.sce"; + "NORM type 2", "NORM.dem.sce"; + "HOUSEHOLDER","HOUSEHOLDER.dem.sce"; + "HESS", "HESS.dem.sce"; + "GIVENS Transformation", "GIVENS.dem.sce"; + "Full rank factorization","FULLRF.dem.sce"; ]; subdemolist(:,2) = demopath + subdemolist(:,2); diff --git a/2.3-1/demos/test_dct.dem.sce b/2.3-1/demos/test_dct.dem.sce new file mode 100644 index 00000000..b1b62475 --- /dev/null +++ b/2.3-1/demos/test_dct.dem.sce @@ -0,0 +1,18 @@ +// +// Scilab ( http://www.scilab.org/ ) - This file is part of Scilab +// Copyright (C) 2010-2010 - DIGITEO - Bruno JOFRET +// +// This file must be used under the terms of the CeCILL. +// This source file is licensed as described in the file COPYING, which +// you should have received as part of this distribution. The terms +// are also available at +// http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt +// Author : Ukasha Noor +// + +lines(0); + +global SCI2CHOME + +scilab2c(SCI2CHOME + "/tests/unit_tests/test01_DCT/scilabcode/main.sci", TMPDIR,SCI2CHOME + "/tests/unit_tests/test01_DCT/scilabcode"); + diff --git a/2.3-1/demos/test_idct.dem.sce b/2.3-1/demos/test_idct.dem.sce new file mode 100644 index 00000000..b1d33392 --- /dev/null +++ b/2.3-1/demos/test_idct.dem.sce @@ -0,0 +1,18 @@ +// +// Scilab ( http://www.scilab.org/ ) - This file is part of Scilab +// Copyright (C) 2010-2010 - DIGITEO - Bruno JOFRET +// +// This file must be used under the terms of the CeCILL. +// This source file is licensed as described in the file COPYING, which +// you should have received as part of this distribution. The terms +// are also available at +// http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt +// Author : Ukasha Noor +// + +lines(0); + +global SCI2CHOME + +scilab2c(SCI2CHOME + "/tests/unit_tests/test02_IDCT/scilabcode/testidct.sci", TMPDIR,SCI2CHOME + "/tests/unit_tests/test02_IDCT/scilabcode"); + diff --git a/2.3-1/help/en_US/scilab_en_US_help/ScilabCaution.png b/2.3-1/help/en_US/scilab_en_US_help/ScilabCaution.png Binary files differnew file mode 100644 index 00000000..231159a5 --- /dev/null +++ b/2.3-1/help/en_US/scilab_en_US_help/ScilabCaution.png diff --git a/2.3-1/help/en_US/scilab_en_US_help/ScilabEdit.png b/2.3-1/help/en_US/scilab_en_US_help/ScilabEdit.png Binary files differnew file mode 100644 index 00000000..ff0cca72 --- /dev/null +++ b/2.3-1/help/en_US/scilab_en_US_help/ScilabEdit.png diff --git a/2.3-1/help/en_US/scilab_en_US_help/ScilabExecute.png b/2.3-1/help/en_US/scilab_en_US_help/ScilabExecute.png Binary files differnew file mode 100644 index 00000000..4acd4b93 --- /dev/null +++ b/2.3-1/help/en_US/scilab_en_US_help/ScilabExecute.png diff --git a/2.3-1/help/en_US/scilab_en_US_help/ScilabImportant.png b/2.3-1/help/en_US/scilab_en_US_help/ScilabImportant.png Binary files differnew file mode 100644 index 00000000..73931b2c --- /dev/null +++ b/2.3-1/help/en_US/scilab_en_US_help/ScilabImportant.png diff --git a/2.3-1/help/en_US/scilab_en_US_help/ScilabNote.png b/2.3-1/help/en_US/scilab_en_US_help/ScilabNote.png Binary files differnew file mode 100644 index 00000000..6607ece6 --- /dev/null +++ b/2.3-1/help/en_US/scilab_en_US_help/ScilabNote.png diff --git a/2.3-1/help/en_US/scilab_en_US_help/ScilabTip.png b/2.3-1/help/en_US/scilab_en_US_help/ScilabTip.png Binary files differnew file mode 100644 index 00000000..6607ece6 --- /dev/null +++ b/2.3-1/help/en_US/scilab_en_US_help/ScilabTip.png diff --git a/2.3-1/help/en_US/scilab_en_US_help/ScilabWarning.png b/2.3-1/help/en_US/scilab_en_US_help/ScilabWarning.png Binary files differnew file mode 100644 index 00000000..231159a5 --- /dev/null +++ b/2.3-1/help/en_US/scilab_en_US_help/ScilabWarning.png diff --git a/2.3-1/help/en_US/scilab_en_US_help/c_code.css b/2.3-1/help/en_US/scilab_en_US_help/c_code.css new file mode 100644 index 00000000..948d2eea --- /dev/null +++ b/2.3-1/help/en_US/scilab_en_US_help/c_code.css @@ -0,0 +1,54 @@ +.ccomment { + font-style: italic; + color: #b22222 +} + +.cdefault { + font-style: normal; + color: #000000 +} + +.copenclose { + font-style: normal; + color: #000000 +} + +.coperator { + font-style: normal; + color: #000000 +} + +.cstring { + font-style: normal; + color: #a6557a +} + +.ctype { + font-style: normal; + color: #55a655 +} + +.cpreprocessor { + font-style: normal; + color: #9965a6 +} + +.cid { + font-style: normal; + color: #000000 +} + +.ckeyword { + font-style: normal; + color: #ad3ff2 +} + +.cmodifier { + font-style: normal; + color: #ad3ff2 +} + +.cnumber { + font-style: normal; + color: #008b8b +} diff --git a/2.3-1/help/en_US/scilab_en_US_help/jhelpset.hs b/2.3-1/help/en_US/scilab_en_US_help/jhelpset.hs new file mode 100644 index 00000000..04f9fef5 --- /dev/null +++ b/2.3-1/help/en_US/scilab_en_US_help/jhelpset.hs @@ -0,0 +1,28 @@ +<?xml version="1.0" encoding="utf-8" standalone="no"?> +<!DOCTYPE helpset + PUBLIC "-//Sun Microsystems Inc.//DTD JavaHelp HelpSet Version 1.0//EN" "http://java.sun.com/products/javahelp/helpset_1_0.dtd"> +<helpset version="1.0"> +<title>Scilab 2 C Converter</title> +<maps> +<homeID>top</homeID> +<mapref location="jhelpmap.jhm"/> +</maps> +<view> +<name>TOC</name> +<label>Table Of Contents</label> +<type>javax.help.TOCView</type> +<data>jhelptoc.xml</data> +</view> +<view> +<name>Index</name> +<label>Index</label> +<type>javax.help.IndexView</type> +<data>jhelpidx.xml</data> +</view> +<view> +<name>Search</name> +<label>Search</label> +<type>javax.help.SearchView</type> +<data engine="com.sun.java.help.search.DefaultSearchEngine">JavaHelpSearch</data> +</view> +</helpset>
\ No newline at end of file diff --git a/2.3-1/help/en_US/scilab_en_US_help/scilab_code.css b/2.3-1/help/en_US/scilab_en_US_help/scilab_code.css new file mode 100644 index 00000000..658f42e0 --- /dev/null +++ b/2.3-1/help/en_US/scilab_en_US_help/scilab_code.css @@ -0,0 +1,96 @@ +.scilabcomment { + font-style: italic; + color: #01a801 +} + +.scilabdefault { + font-style: normal; + color: #000000 +} + +.scilabspecial { + font-style: normal; + color: #ffaa00 +} + +.scilabconstants { + font-style: normal; + color: #da70d6 +} + +.scilaboperator { + font-style: normal; + color: #5c5c5c +} + +.scilabnumber { + font-style: normal; + color: #bc8f8f +} + +.scilabfkeyword { + font-style: normal; + color: #b01813 +} + +.scilabskeyword { + font-style: normal; + color: #a020f0 +} + +.scilabckeyword { + font-style: normal; + color: #5f9ea0 +} + +.scilabcommand { + font-style: normal; + color: #32b9b9 +} + +.scilabmacro { + font-style: normal; + color: #ae5cb0 +} + +a.scilabcommand { + font-style: normal; + text-decoration: underline; + color: #32b9b9 +} + +a.scilabmacro { + font-style: normal; + text-decoration: underline; + color: #ae5cb0 +} + +.scilabstring { + font-style: normal; + color: #bc8f8f +} + +.scilabid { + font-style: normal; + color: #000000 +} + +.scilabinputoutputargs { + font-weight: bold; + color: #834310 +} + +.scilabfunctionid { + font-weight: bold; + color: #000000 +} + +.scilabfield { + font-style: normal; + color: #aaaaaa +} + +.scilabopenclose { + font-style: normal; + color: #4a55db +} diff --git a/2.3-1/help/en_US/scilab_en_US_help/style.css b/2.3-1/help/en_US/scilab_en_US_help/style.css new file mode 100644 index 00000000..0fe8923d --- /dev/null +++ b/2.3-1/help/en_US/scilab_en_US_help/style.css @@ -0,0 +1,350 @@ +body { + color:#000000; + background-color:#ffffff; + font-family:sans-serif; + font-size:100%; + margin:5px; + padding:0; + background : url("/img/body.png"); + background-repeat : repeat-x; +} + +.para { + padding-left: 10px; +} + +.refname { + color: #ff6c0a; +} +.refpurpose { + font-size: 110%; +} + +.synopsis { + border: 1px solid black; + width:80%; + padding: 0.5em; +} + +.editbar { + text-align: right; +} + +.term { + color:#800000; + font-size:100%; +} + +h3 { + color: #000063; + font-weight: bold; + font-size:130%; + margin-bottom: 10px; +} + +.programlisting { + font-family: monospace; + font-size: 100%; + background-color:#EEEEFF; + border-color:#CCCCCC; + border-style:solid; + border-width:2px medium; + width:80%; + color:#333333; + line-height:120%; + padding:10px; +} + +.literal { + font-family: monospace; + font-size: 100%; +} + +.option { + font-family: monospace; + font-style: italic; + font-size: 100%; +} + +.command { + font-family: monospace; + font-size: 100%; + color: #32b9b9; +} + +.function { + font-family: monospace; + font-size: 100%; + color: #32b9b9; +} + +.varname { + font-family: monospace; + font-weight: bold; + font-size: 100%; +} + +.constant { + font-family: monospace; + font-size: 100%; + color: #da70d6; +} + +a { + color: blue; + text-decoration:none; +} + +a:hover { + text-decoration:underline; +} + +.itemizedlist { + list-style-type: disk; +} + +.inline-list li { + display: inline; + list-style-type: disk; +} + +.vert-list { + list-style-type: disk; +} + +pre { + margin-bottom: 0px; + margin-top: 0px; +} + +.leftpart { + position:absolute; + float:left; + width: 186px; + padding: 5px; + font-size: smaller; +} + +.content { + margin-top: 100px; + margin-left: 196px +} + +.container { + margin: 0 auto; + width:1024px; +} + +ul.toc li.list-active { + list-style-type:disc; + font-weight:bold; +} + +ul.toc li.parent { + font-size: 115%; + padding: 5px 0px 5px 11px; + border-bottom: 1px solid #cccccc; + margin-bottom: 5px; +} + +ul.toc li.root { + font-size: 135%; + padding: 5px 0px 5px 11px; + border-bottom: 1px solid #cccccc; + margin-bottom: 5px; +} + +ul.toc li { + font-size: 85%; + margin: 1px 0 1px 1px; + padding: 1px 0 1px 11px; + background-repeat: no-repeat; + background-position: center left; + list-style-type: circle; +} + +.next { + float:right; + text-align: right; +} + +.center { + text-align: center; +} + +.screen { + font-family: monospace; + font-size: 100%; + background-color:#FFFFFF; + border-color:#CCCCCC; + border-style:solid; + border-width:2px medium; + width:80%; + color:#333333; + line-height:120%; + padding:10px; +} + +/* Top and bottom navigation controls on manual pages --------------------- */ +div.manualnavbar { + background-color: #E0E0E0; + color: inherit; + padding: 4px; + margin-bottom: 10px; +} +div.manualnavbar .prev { + padding-right: 4px; +} +div.manualnavbar .next { + text-align: right; + padding-left: 4px; +} + +div.manualnavbar .top { + text-align: center; + display: block; +} + +div.manualnavbar hr { + color: #cccccc; + background-color: #cccccc; +} + +/* Footer navigation area ------------------------------------------------- */ + +#pagefooter { + position: relative; + font-size: 75%; + color: inherit; + background-color: #e5e5e5; + width: 100%; +} + +#pagefooterleft { + top: 0px; + left: 0px; + padding: 6px; + margin-right: 30%; +} + +#pagefooterright { + text-align: right; + margin-left: 50%; + padding: 6px; +} +#footnav { + color: inherit; + background-color: #9999cc; + border-width: 1px 0px; + border-color: #333366; + border-style: solid; + text-align: right; + padding-right: 6px; +} + + + + + #global{ +/* width: 90%; */ + max-width: 90em; +/* min-width: 850px; */ + margin-left: auto; + margin-right: auto; + } + + #myHeader{ + background-color:#000000; + color:white; + margin-bottom : 10px; + position : relative; + text-align: center; +/* width : 1024px;*/ + height : 100px; + padding-left : 20px; + background : url("http://atoms.scilab.org/images/homepage/cadre_head.png"); + background-repeat : no-repeat; + background-position : 0px 0px; + + } + + #myFooter{ + background-color:#E5E5E5; + font-color:black; +/* width: 90%;*/ + max-width: 90em; +/* min-width: 850px; + margin-left: 5%; + margin-right: 5%;*/ + margin-top:10px; + padding:10px; + } + + #mainArea{ + width: 100%; + overflow: hidden; + } + + #myLeftArea{ + color:white; + float: left; + width: 180px; + padding:5px; + } + + #myMiddleArea{ + color:black; + margin-left: 200px; + padding: 10px 20px; + } + + #myRightArea{ + color:white; + float: right; + width: 200px; + padding: 12px 20px; + } + + +div#cadre_head +{ + position : relative; + text-align: center; +/* width : 1024px;*/ + height : 100px; + padding-left : 20px; + background : url("/img/cadre_head.png"); + background-repeat : no-repeat; + background-position : 0px 0px; +} + + +div#slogan{ + position: absolute; + top : 50px; + left:251px; + color:#0000AA; + font: 120%, Georgia,Serif; +} +div#cadre_help +{ + position: absolute; + top:45px; + right:0px; + font-size:0.8em; + color:#0000AA; +} + +table.revhistory +{ + width:80%; + border-color:#CCCCCC; + border-style:solid; + border-width:2px medium; + margin-bottom: 10px; +} + +table.revhistory tr.title td +{ + background-color: #9999CC; +}
\ No newline at end of file diff --git a/2.3-1/help/en_US/scilab_en_US_help/xml_code.css b/2.3-1/help/en_US/scilab_en_US_help/xml_code.css new file mode 100644 index 00000000..9e4c27f9 --- /dev/null +++ b/2.3-1/help/en_US/scilab_en_US_help/xml_code.css @@ -0,0 +1,94 @@ +.xmlcomment { + font-style: italic; + color: #01a801 +} + +.xmldefault { + font-style: normal; + color: #000000 +} + +.xmlentity { + font-style: normal; + color: #ffaa00 +} + +.xmlopeninstr { + font-style: normal; + color: #000000 +} + +.xmlcloseinstr { + font-style: normal; + color: #000000 +} + +.xmlinstrname { + font-style: normal; + color: #9965a6 +} + +.xmllowtag { + font-style: normal; + color: #000000 +} + +.xmltagname { + font-style: normal; + color: #0303ff +} + +.xmllowclose { + font-style: normal; + color: #000000 +} + +.xmlopencomment { + font-style: italic; + color: #01a801 +} + +.xmlcommentend { + font-style: italic; + color: #01a801 +} + +.xmlcomment { + font-style: italic; + color: #01a801 +} + +.xmlopencdata { + font-style: normal; + color: #c45555 +} + +.xmlcdataend { + font-style: normal; + color: #c45555 +} + +.xmlcdata { + font-style: normal; + color: #000000 +} + +.xmlattributename { + font-style: normal; + color: #9965a6 +} + +.xmlequal { + font-style: normal; + color: #000000 +} + +.xmlattributevalue { + font-style: normal; + color: #973964 +} + +.xmlautoclose { + font-style: normal; + color: #000000 +} diff --git a/2.3-1/macros/ASTManagement/%funcall_string.sci b/2.3-1/macros/ASTManagement/%funcall_string.sci index c3101cbe..449cc744 100644 --- a/2.3-1/macros/ASTManagement/%funcall_string.sci +++ b/2.3-1/macros/ASTManagement/%funcall_string.sci @@ -5,6 +5,8 @@ function txt=%funcall_string(F) // rhs : a list // name : string, the name of the function // lhsnb: number, the number of function lhs +// Modified By: Ukasha Noor + <<<<<<< HEAD if F.name <> 'disp' diff --git a/2.3-1/macros/ASTManagement/AST2Ccode.sci b/2.3-1/macros/ASTManagement/AST2Ccode.sci index 5cceaf18..136c5a18 100644 --- a/2.3-1/macros/ASTManagement/AST2Ccode.sci +++ b/2.3-1/macros/ASTManagement/AST2Ccode.sci @@ -11,6 +11,7 @@ function AST2Ccode(FileInfoDatFile) // // Status: // 11-May-2007 -- Raffaele Nutricato: Author. +// 15-June-2017 -- Ukasha Noor: Revised By // // Copyright 2007 Raffaele Nutricato. // Contact: raffaele.nutricato@tiscali.it @@ -42,16 +43,13 @@ load(FileInfo.SharedInfoDatFile,'SharedInfo'); nxtscifunname = SharedInfo.NextSCIFunName; nxtscifunnumber = SharedInfo.NextSCIFunNumber; ReportFileName = FileInfo.Funct(nxtscifunnumber).ReportFileName; -<<<<<<< HEAD -======= + SharedInfo.Function_list = []; SharedInfo.Function_list_index = 1; ->>>>>>> 9e5793a7b05b23e6044a6d7a9ddd5db39ba375f0 // --------------------------------- // --- Parameter Initialization. --- // --------------------------------- -<<<<<<< HEAD global cc_count cc_count = 0; @@ -59,8 +57,6 @@ cc_count = 0; global rc_count rc_count = 0; -======= ->>>>>>> 9e5793a7b05b23e6044a6d7a9ddd5db39ba375f0 global SCI2CSTACK SCI2CSTACK = ['EMPTYSTACK']; @@ -69,12 +65,11 @@ StackPosition = 1; global STACKDEDUG STACKDEDUG = 0; // 1 -> Every Pop and Push operation on the stack, the stack content will be printed on screen. -<<<<<<< HEAD global disp_isthere disp_isthere = 0; -======= ->>>>>>> 9e5793a7b05b23e6044a6d7a9ddd5db39ba375f0 + +FName = null // ------------------------------------- // --- End parameter Initialization. --- // ------------------------------------- @@ -153,16 +148,15 @@ while ~meof(fidAST) //NUT: qui puoi anche aggiunger piu' case per specificare meglio la struttura della funcall //NUT: i case aggiunti ovviamente faranno solo il push della treeline. case 'EndOperation' then -<<<<<<< HEAD [disp_isthere,FileInfo,SharedInfo] = AST_HandleEndGenFun(disp_isthere,FileInfo,SharedInfo,'Operation'); case 'EndFuncall' then + if rc_count > 0 & cc_count == 0 + [EqualInArgName,EqualInArgScope,EqualNInArg,FName] = AST_HandleFuncArray(FileInfo,SharedInfo); + elseif cc_count > 0 + [EqualInArgName,EqualInArgScope,EqualNInArg,FName] = AST_HandleFuncArray2D(FileInfo,SharedInfo); + else [disp_isthere,FileInfo,SharedInfo] = AST_HandleEndGenFun(disp_isthere,FileInfo,SharedInfo,'Funcall'); -======= - [FileInfo,SharedInfo] = AST_HandleEndGenFun(FileInfo,SharedInfo,'Operation'); - case 'EndFuncall' then - [FileInfo,SharedInfo] = AST_HandleEndGenFun(FileInfo,SharedInfo,'Funcall'); ->>>>>>> 9e5793a7b05b23e6044a6d7a9ddd5db39ba375f0 - + end // -------------- // --- Equal. --- // -------------- @@ -171,12 +165,12 @@ while ~meof(fidAST) //NUT: per fare in modo di coprire le ins, anche se ci puo' essere qualche rischio quando //NUT: ho miste ins e variabili, per esempio [c(1,1), a] = twooutfun(); //NUT: in questo caso solo una delle due equal va scartata. -<<<<<<< HEAD + if rc_count > 0 & cc_count == 0 - [FileInfo,SharedInfo] = AST_HandleFunRC(FileInfo,SharedInfo); + [FileInfo,SharedInfo] = AST_HandleFunRC(FName,FileInfo,SharedInfo); rc_count = 0; elseif cc_count > 0 - [FileInfo,SharedInfo] = AST_HandleFunCC(cc_count,FileInfo,SharedInfo); + [FileInfo,SharedInfo] = AST_HandleFunCC(FName,cc_count,FileInfo,SharedInfo); rc_count = 0; cc_count = 0; else @@ -186,16 +180,13 @@ while ~meof(fidAST) end end disp_isthere = 0; + FName = null -======= - [FileInfo,SharedInfo] = AST_HandleEndGenFun(FileInfo,SharedInfo,'Equal'); - SharedInfo = INIT_SharedInfoEqual(SharedInfo); ->>>>>>> 9e5793a7b05b23e6044a6d7a9ddd5db39ba375f0 case 'Equal' then SharedInfo.Equal.Enabled = 1; // 1 means enabled -> we are inside an equal AST block. AST_PushASTStack(treeline); case 'Lhs :' then -<<<<<<< HEAD + if rc_count > 0 & cc_count == 0 SharedInfo.Equal.Lhs = 1; [EqualInArgName,EqualInArgScope,EqualNInArg] = AST_HandleRC(FileInfo,SharedInfo); @@ -230,21 +221,6 @@ while ~meof(fidAST) end AST_PushASTStack(treeline); end -======= - SharedInfo.Equal.Lhs = 1; // 1 means that we are inside the Lhs block of the Equal - [EqualInArgName,EqualInArgScope,EqualNInArg] = AST_ReadEqualRhsNames(FileInfo,SharedInfo); - - // lengthNumber = length('Number_'); - // if (part(EqualInArgScope,1:lengthNumber) == 'Number_') - // SharedInfo.SkipNextEqual = 1 - // end - SharedInfo.Equal.NInArg = EqualNInArg; - for tmpcnt = 1:SharedInfo.Equal.NInArg - SharedInfo.Equal.InArg(tmpcnt).Name = EqualInArgName(tmpcnt); - SharedInfo.Equal.InArg(tmpcnt).Scope = EqualInArgScope(tmpcnt); - end - AST_PushASTStack(treeline); ->>>>>>> 9e5793a7b05b23e6044a6d7a9ddd5db39ba375f0 // ---------------- // --- If/Else. --- @@ -278,10 +254,8 @@ while ~meof(fidAST) // ----------------- case 'EndProgram' SharedInfo = AST_HandleEndProgram(FileInfo,SharedInfo); -<<<<<<< HEAD + disp_isthere = 0; -======= ->>>>>>> 9e5793a7b05b23e6044a6d7a9ddd5db39ba375f0 //NUT: per essere precisi si puo' pensare di mettere un check //NUT: alla fine dell'albero per accertarsi che c'e' end program li' dove ce lo aspettiamo @@ -315,7 +289,6 @@ while ~meof(fidAST) SharedInfo = AST_HandleEndWhile(FileInfo,SharedInfo); SharedInfo.While.Level = SharedInfo.While.Level - 1; -<<<<<<< HEAD case 'Endrc' then rc_count = rc_count + 1; @@ -325,8 +298,6 @@ while ~meof(fidAST) //[FileInfo,SharedInfo] = AST_HandleRC(FileInfo,SharedInfo); -======= ->>>>>>> 9e5793a7b05b23e6044a6d7a9ddd5db39ba375f0 // ---------------- // --- Default. --- // ---------------- @@ -334,9 +305,6 @@ while ~meof(fidAST) AST_PushASTStack(treeline); end end -<<<<<<< HEAD -======= - // ------------------------------------ // -----List of functions Used-------- // ------------------------------------- @@ -350,7 +318,6 @@ SharedInfo.Function_list = unique(SharedInfo.Function_list); SharedInfo.Function_list = SharedInfo.Function_list(1:SharedInfo.Function_list_index); ->>>>>>> 9e5793a7b05b23e6044a6d7a9ddd5db39ba375f0 // -------------------------------------- // --- End main loop to read the AST. --- // -------------------------------------- diff --git a/2.3-1/macros/ASTManagement/AST_HandleCC.sci b/2.3-1/macros/ASTManagement/AST_HandleCC.sci index cc411549..897a06f1 100644 --- a/2.3-1/macros/ASTManagement/AST_HandleCC.sci +++ b/2.3-1/macros/ASTManagement/AST_HandleCC.sci @@ -8,7 +8,9 @@ // Author: Ukasha Noor // Organization: FOSSEE, IIT Bombay // Email: toolbox@scilab.in - +// This function is used for 2D array declaration +// This function extracts the input arguments in the array and check there Name and Scope. +// Then repush everything back to stack function [RhsNames,RhsScope,NRhs] = AST_HandleCC(FileInfo,SharedInfo) SCI2CNInArgCheck(argn(2),2,2) @@ -56,14 +58,6 @@ for cntpush = cntpop:-1:1 end -//for counterinputargs = 1:NRhs - //#RNU_RES_B - //disp(counterinputargs); - //PrintStringInfo('Input Argument Number '+string(counterinputargs)+': '+RhsNames(counterinputargs).Name,... - // ReportFileName,'file','y'); - //PrintStringInfo(' Scope: '+RhsNames(counterinputargs).Scope,... - // ReportFileName,'file','y'); - //#RNU_RES_E -//end + endfunction diff --git a/2.3-1/macros/ASTManagement/AST_HandleEndGenFun.sci b/2.3-1/macros/ASTManagement/AST_HandleEndGenFun.sci index b5208e51..fad638a3 100644 --- a/2.3-1/macros/ASTManagement/AST_HandleEndGenFun.sci +++ b/2.3-1/macros/ASTManagement/AST_HandleEndGenFun.sci @@ -1,9 +1,7 @@ -<<<<<<< HEAD function [disp_isthere,FileInfo,SharedInfo] = AST_HandleEndGenFun(disp_isthere,FileInfo,SharedInfo,ASTFunType) -======= function [FileInfo,SharedInfo] = AST_HandleEndGenFun(FileInfo,SharedInfo,ASTFunType) ->>>>>>> 9e5793a7b05b23e6044a6d7a9ddd5db39ba375f0 + // function [FileInfo,SharedInfo] = AST_HandleEndGenFun(FileInfo,SharedInfo,ASTFunType) // ----------------------------------------------------------------- // #RNU_RES_B @@ -32,19 +30,18 @@ function [FileInfo,SharedInfo] = AST_HandleEndGenFun(FileInfo,SharedInfo,ASTFunT // // Status: // 11-Apr-2007 -- Raffaele Nutricato: Author. +// 15-June-2017 -- Ukasha Noor : Revised By // // Copyright 2007 Raffaele Nutricato. // Contact: raffaele.nutricato@tiscali.it // ----------------------------------------------------------------- + // ------------------------------ // --- Check input arguments. --- // ------------------------------ -<<<<<<< HEAD + SCI2CNInArgCheck(argn(2),4,4); -======= -SCI2CNInArgCheck(argn(2),3,3); ->>>>>>> 9e5793a7b05b23e6044a6d7a9ddd5db39ba375f0 // ----------------------- // --- Initialization. --- @@ -69,11 +66,8 @@ PrintStepInfo('Handling Funcall/Operation/Equal',FileInfo.Funct(nxtscifunnumber) global SCI2CSTACK global StackPosition; global STACKDEDUG -<<<<<<< HEAD disp_isthere = 0; -======= ->>>>>>> 9e5793a7b05b23e6044a6d7a9ddd5db39ba375f0 // --------------------------- // --- End Initialization. --- // --------------------------- @@ -85,7 +79,6 @@ disp_isthere = 0; //NUT: verifica se ASTFunType e' veramente importante // #RNU_RES_E [ASTFunName,InArg,NInArg,OutArg,NOutArg] = AST_GetFuncallPrm(FileInfo,SharedInfo,ASTFunType); -<<<<<<< HEAD NOutArg_mod = NOutArg if ASTFunName == 'OpLogAnd' AST_PushASTStack('&&'); @@ -100,13 +93,11 @@ NOutArg_mod = NOutArg disp_isthere = 1; end -======= if (ASTFunType=='Funcall') SharedInfo.Function_list(SharedInfo.Function_list_index) = ASTFunName; SharedInfo.Function_list_index = SharedInfo.Function_list_index + 1; end NOutArg_mod = NOutArg ->>>>>>> 9e5793a7b05b23e6044a6d7a9ddd5db39ba375f0 if(mtlb_strcmp(part(ASTFunName,1:2),'CV') == %T) SharedInfo.OpenCVUsed = %T; end diff --git a/2.3-1/macros/ASTManagement/AST_HandleFunCC.sci b/2.3-1/macros/ASTManagement/AST_HandleFunCC.sci index 1942c749..8669ad1f 100644 --- a/2.3-1/macros/ASTManagement/AST_HandleFunCC.sci +++ b/2.3-1/macros/ASTManagement/AST_HandleFunCC.sci @@ -8,11 +8,14 @@ // Author: Ukasha Noor // Organization: FOSSEE, IIT Bombay // Email: toolbox@scilab.in +// This function put the input elements of array in InArg and +// output in OutArg from the stack. +// Then finds the number of columns and rows in matrix and the type of matrix. +// The call the function to generate the C code for declaration. +function [FileInfo,SharedInfo] = AST_HandleFunCC(FName,NCol,FileInfo,SharedInfo) -function [FileInfo,SharedInfo] = AST_HandleFunCC(NCol,FileInfo,SharedInfo) - -SCI2CNInArgCheck(argn(2),3,3) +SCI2CNInArgCheck(argn(2),4,4) // ------------------------------ // --- Check input arguments. --- @@ -140,30 +143,56 @@ for i = 1:NInArg end -if com_type == 0 - PrintStringInfo(' Generating Out Arg names.',ReportFileName,'file','y'); - OutArg(1).Type = InArg(1).Type; - OutArg(1).Size(1) = string(NCol); - OutArg(1).Size(2) = string(NRow); - OutArg(1).Dimension = 2; - OutArg(1).Value = InArg(1).Value; - OutArg(1).FindLike = InArg(1).FindLike; -elseif com_type == 1 - PrintStringInfo(' Generating Out Arg names.',ReportFileName,'file','y'); - OutArg(1).Type = 'z'; - OutArg(1).Size(1) = string(NCol); - OutArg(1).Size(2) = string(NRow); - OutArg(1).Dimension = 2; - OutArg(1).Value = InArg(1).Value; - OutArg(1).FindLike = InArg(1).FindLike; +if FName <> null + PrintStringInfo(' Generating Out Arg names.',ReportFileName,'file','y'); + if FName == 'float' + OutArg(1).Type = 's'; + elseif FName == 'uint8' + OutArg(1).Type = 'u8'; + elseif FName == 'int16' + OutArg(1).Type = 'i16'; + elseif FName == 'uint16' + OutArg(1).Type = 'u16'; + elseif FName == 'int8' + OutArg(1).Type = 'i8'; + elseif FName == 'uint32' + OutArg(1).Type = 'u32'; + elseif FName == 'int32' + OutArg(1).Type = 'i32'; + else + OutArg(1).Type = 'd'; + end + OutArg(1).Size(1) = string(NCol); + OutArg(1).Size(2) = string(NRow); + OutArg(1).Dimension = 2; + OutArg(1).Value = InArg(1).Value; + OutArg(1).FindLike = InArg(1).FindLike; else - PrintStringInfo(' Generating Out Arg names.',ReportFileName,'file','y'); - OutArg(1).Type = 'c'; - OutArg(1).Size(1) = string(NCol); - OutArg(1).Size(2) = string(NRow); - OutArg(1).Dimension = 2; - OutArg(1).Value = InArg(1).Value; - OutArg(1).FindLike = InArg(1).FindLike; + if com_type == 0 + PrintStringInfo(' Generating Out Arg names.',ReportFileName,'file','y'); + OutArg(1).Type = InArg(1).Type; + OutArg(1).Size(1) = string(NCol); + OutArg(1).Size(2) = string(NRow); + OutArg(1).Dimension = 2; + OutArg(1).Value = InArg(1).Value; + OutArg(1).FindLike = InArg(1).FindLike; + elseif com_type == 1 + PrintStringInfo(' Generating Out Arg names.',ReportFileName,'file','y'); + OutArg(1).Type = 'z'; + OutArg(1).Size(1) = string(NCol); + OutArg(1).Size(2) = string(NRow); + OutArg(1).Dimension = 2; + OutArg(1).Value = InArg(1).Value; + OutArg(1).FindLike = InArg(1).FindLike; + else + PrintStringInfo(' Generating Out Arg names.',ReportFileName,'file','y'); + OutArg(1).Type = 'c'; + OutArg(1).Size(1) = string(NCol); + OutArg(1).Size(2) = string(NRow); + OutArg(1).Dimension = 2; + OutArg(1).Value = InArg(1).Value; + OutArg(1).FindLike = InArg(1).FindLike; + end end //--- Check for output Argument in symbol table ---// diff --git a/2.3-1/macros/ASTManagement/AST_HandleFunRC.sci b/2.3-1/macros/ASTManagement/AST_HandleFunRC.sci index d3169249..a5885d57 100644 --- a/2.3-1/macros/ASTManagement/AST_HandleFunRC.sci +++ b/2.3-1/macros/ASTManagement/AST_HandleFunRC.sci @@ -8,10 +8,13 @@ // Author: Ukasha Noor // Organization: FOSSEE, IIT Bombay // Email: toolbox@scilab.in +// This function is used for 1D array declaration. +// Checks the input and output argumnets and put them in respective variables. +// Then calls the function to generate the C code for 1D array declaration. -function [FileInfo,SharedInfo] = AST_HandleFunRC(FileInfo,SharedInfo) +function [FileInfo,SharedInfo] = AST_HandleFunRC(FName,FileInfo,SharedInfo) -SCI2CNInArgCheck(argn(2),2,2) +SCI2CNInArgCheck(argn(2),3,3) // ------------------------------ // --- Check input arguments. --- @@ -142,30 +145,56 @@ for i = 1:NInArg end -if com_type == 0 - PrintStringInfo(' Generating Out Arg names.',ReportFileName,'file','y'); - OutArg(1).Type = InArg(1).Type; - OutArg(1).Size(1) = '1' - OutArg(1).Size(2) = string(size_count); - OutArg(1).Dimension = 2; - OutArg(1).Value = InArg(1).Value; - OutArg(1).FindLike = InArg(1).FindLike; -elseif com_type == 1 - PrintStringInfo(' Generating Out Arg names.',ReportFileName,'file','y'); - OutArg(1).Type = 'z'; - OutArg(1).Size(1) = '1' - OutArg(1).Size(2) = string(size_count); - OutArg(1).Dimension = 2; - OutArg(1).Value = InArg(1).Value; - OutArg(1).FindLike = InArg(1).FindLike; +if FName <> null + PrintStringInfo(' Generating Out Arg names.',ReportFileName,'file','y'); + if FName == 'float' + OutArg(1).Type = 's'; + elseif FName == 'uint8' + OutArg(1).Type = 'u8'; + elseif FName == 'int16' + OutArg(1).Type = 'i16'; + elseif FName == 'uint16' + OutArg(1).Type = 'u16'; + elseif FName == 'int8' + OutArg(1).Type = 'i8'; + elseif FName == 'uint32' + OutArg(1).Type = 'u32'; + elseif FName == 'int32' + OutArg(1).Type = 'i32'; + else + OutArg(1).Type = 'd'; + end + OutArg(1).Size(1) = '1' + OutArg(1).Size(2) = string(size_count); + OutArg(1).Dimension = 2; + OutArg(1).Value = InArg(1).Value; + OutArg(1).FindLike = InArg(1).FindLike; else - PrintStringInfo(' Generating Out Arg names.',ReportFileName,'file','y'); - OutArg(1).Type = 'c'; - OutArg(1).Size(1) = '1' - OutArg(1).Size(2) = string(size_count); - OutArg(1).Dimension = 2; - OutArg(1).Value = InArg(1).Value; - OutArg(1).FindLike = InArg(1).FindLike; + if com_type == 0 + PrintStringInfo(' Generating Out Arg names.',ReportFileName,'file','y'); + OutArg(1).Type = InArg(1).Type; + OutArg(1).Size(1) = '1' + OutArg(1).Size(2) = string(size_count); + OutArg(1).Dimension = 2; + OutArg(1).Value = InArg(1).Value; + OutArg(1).FindLike = InArg(1).FindLike; + elseif com_type == 1 + PrintStringInfo(' Generating Out Arg names.',ReportFileName,'file','y'); + OutArg(1).Type = 'z'; + OutArg(1).Size(1) = '1' + OutArg(1).Size(2) = string(size_count); + OutArg(1).Dimension = 2; + OutArg(1).Value = InArg(1).Value; + OutArg(1).FindLike = InArg(1).FindLike; + else + PrintStringInfo(' Generating Out Arg names.',ReportFileName,'file','y'); + OutArg(1).Type = 'c'; + OutArg(1).Size(1) = '1' + OutArg(1).Size(2) = string(size_count); + OutArg(1).Dimension = 2; + OutArg(1).Value = InArg(1).Value; + OutArg(1).FindLike = InArg(1).FindLike; + end end //--- Check for output Argument in symbol table ---// diff --git a/2.3-1/macros/ASTManagement/AST_HandleFuncArray.sci b/2.3-1/macros/ASTManagement/AST_HandleFuncArray.sci new file mode 100644 index 00000000..364e305e --- /dev/null +++ b/2.3-1/macros/ASTManagement/AST_HandleFuncArray.sci @@ -0,0 +1,63 @@ +function [RhsNames,RhsScope,NRhs,FName] = AST_HandleFuncArray(FileInfo,SharedInfo) +// Copyright (C) 2017 - IIT Bombay - FOSSEE + +// This file must be used under the terms of the CeCILL. +// This source file is licensed as described in the file COPYING, which +// you should have received as part of this distribution. The terms +// are also available at +// http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt +// Author: Ukasha Noor +// Organization: FOSSEE, IIT Bombay +// Email: toolbox@scilab.in +// This function is used for 1D array declaration. + +SCI2CNInArgCheck(argn(2),2,2) + +ReportFileName = FileInfo.Funct(nxtscifunnumber).ReportFileName; + +// ------------------------------ +// --- Check input arguments. --- +// ------------------------------ + + +global SCI2CSTACK +global StackPosition; +global STACKDEDUG +// --------------------------- +// --- End Initialization. --- +// --------------------------- + + +// ------------------------------ +// --- Read input parameters. --- +// ------------------------------ +cntpop = 1; +NRhs = 0; +RhsField(cntpop) = AST_PopASTStack(); +RhsNames = []; +while (RhsField(cntpop) ~= 'Rhs :') + NRhs = NRhs + 1; + if RhsField(cntpop) <> 'Operands:' + [RhsNames(NRhs),RhsScope(NRhs)] = AST_ExtractNameAndScope(RhsField(cntpop)); + end + cntpop = cntpop + 1; + RhsField(cntpop) = AST_PopASTStack(); +end +first = AST_PopASTStack(); +second = AST_PopASTStack(); + +FName = stripblanks(part(second,12:length(second))); + +RhsNames = SCI2Cflipud(RhsNames); +RhsScope = SCI2Cflipud(RhsScope); + +// --- Repush everything into the stack. --- +for cntpush = cntpop:-1:1 + if RhsField(cntpush) <> 'Operands:' & RhsField(cntpush) <> 'Rhs :' + AST_PushASTStack(RhsField(cntpush)); + end +end + + + +endfunction diff --git a/2.3-1/macros/ASTManagement/AST_HandleFuncArray2D.sci b/2.3-1/macros/ASTManagement/AST_HandleFuncArray2D.sci new file mode 100644 index 00000000..859c9942 --- /dev/null +++ b/2.3-1/macros/ASTManagement/AST_HandleFuncArray2D.sci @@ -0,0 +1,69 @@ +// Copyright (C) 2017 - IIT Bombay - FOSSEE + +// This file must be used under the terms of the CeCILL. +// This source file is licensed as described in the file COPYING, which +// you should have received as part of this distribution. The terms +// are also available at +// http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt +// Author: Ukasha Noor +// Organization: FOSSEE, IIT Bombay +// Email: toolbox@scilab.in +// This function is used for 2D array declaration +// This function extracts the input arguments in the array and check there Name and Scope. +// Then repush everything back to stack +function [RhsNames,RhsScope,NRhs,FName] = AST_HandleFuncArray2D(FileInfo,SharedInfo) + +SCI2CNInArgCheck(argn(2),2,2) + +ReportFileName = FileInfo.Funct(nxtscifunnumber).ReportFileName; + +// ------------------------------ +// --- Check input arguments. --- +// ------------------------------ + + +global SCI2CSTACK +global StackPosition; +global STACKDEDUG +// --------------------------- +// --- End Initialization. --- +// --------------------------- + + +// ------------------------------ +// --- Read input parameters. --- +// ------------------------------ +cntpop = 1; +NRhs = 0; +RhsField(cntpop) = AST_PopASTStack(); +RhsNames = []; +while (RhsField(cntpop) ~= 'Rhs :') + if RhsField(cntpop) <> 'Operands:' & RhsField(cntpop) <> 'Begin:' + NRhs = NRhs + 1; + + [RhsNames(NRhs),RhsScope(NRhs)] = AST_ExtractNameAndScope(RhsField(cntpop)); + end + cntpop = cntpop + 1; + RhsField(cntpop) = AST_PopASTStack(); +end + +first = AST_PopASTStack(); +second = AST_PopASTStack(); + +FName = stripblanks(part(second,12:length(second))); + +RhsNames = SCI2Cflipud(RhsNames); +RhsScope = SCI2Cflipud(RhsScope); + +// --- Repush everything into the stack. --- +for cntpush = cntpop:-1:1 + if RhsField(cntpush) <> 'Operands:' & RhsField(cntpush) <> 'Begin:' & RhsField(cntpush) <> 'Rhs :' + PrintStringInfo(' ' + RhsField(cntpush),ReportFileName,'file','y'); + AST_PushASTStack(RhsField(cntpush)); + end +end + + + + +endfunction diff --git a/2.3-1/macros/ASTManagement/AST_HandleRC.sci b/2.3-1/macros/ASTManagement/AST_HandleRC.sci index 2a6cbc3f..70568612 100644 --- a/2.3-1/macros/ASTManagement/AST_HandleRC.sci +++ b/2.3-1/macros/ASTManagement/AST_HandleRC.sci @@ -1,36 +1,15 @@ function [RhsNames,RhsScope,NRhs] = AST_HandleRC(FileInfo,SharedInfo) -// function [FileInfo,SharedInfo] = AST_HandleEndGenFun(FileInfo,SharedInfo,ASTFunType) -// ----------------------------------------------------------------- -// #RNU_RES_B -// Handles the EndFuncall, EndOperation and EndEqual tags of the AST. -// ASTFunType can be 'Funcall', 'Operation', 'Equal' -// Structure of Funcall: -// overloading function for "funcall" type tlist string function -// this is a node of the AST -// fields: -// rhs : a list -// name : string, the name of the function -// lhsnb: number, the number of function lhs -// txt=['Funcall : '+F.name -// ' #lhs : '+string(F.lhsnb) -// ' Rhs : ' -// ' '+objectlist2string(F.rhs) -// 'EndFuncall' -// ] -// #RNU_RES_E -// -// Input data: -// //NUT: add description here -// -// Output data: -// //NUT: add description here -// -// Status: -// 11-Apr-2007 -- Raffaele Nutricato: Author. -// -// Copyright 2007 Raffaele Nutricato. -// Contact: raffaele.nutricato@tiscali.it -// ----------------------------------------------------------------- +// Copyright (C) 2017 - IIT Bombay - FOSSEE + +// This file must be used under the terms of the CeCILL. +// This source file is licensed as described in the file COPYING, which +// you should have received as part of this distribution. The terms +// are also available at +// http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt +// Author: Ukasha Noor +// Organization: FOSSEE, IIT Bombay +// Email: toolbox@scilab.in +// This function is used for 1D array declaration. SCI2CNInArgCheck(argn(2),2,2) @@ -75,14 +54,5 @@ for cntpush = cntpop:-1:1 end -//for counterinputargs = 1:NRhs - //#RNU_RES_B - //disp(counterinputargs); - // PrintStringInfo('Input Argument Number '+string(counterinputargs)+': '+RhsNames(counterinputargs).Name,... - // ReportFileName,'file','y'); - //PrintStringInfo(' Scope: '+RhsNames(counterinputargs).Scope,... - // ReportFileName,'file','y'); - //#RNU_RES_E -//end endfunction diff --git a/2.3-1/macros/ASTManagement/AST_ParseIfExprStruct.sci b/2.3-1/macros/ASTManagement/AST_ParseIfExprStruct.sci index 81d7e80b..d9658e81 100644 --- a/2.3-1/macros/ASTManagement/AST_ParseIfExprStruct.sci +++ b/2.3-1/macros/ASTManagement/AST_ParseIfExprStruct.sci @@ -35,6 +35,8 @@ function [IfCondArg,NIfCondArg] = AST_ParseIfExprStruct(FileInfo,SharedInfo,ASTI // // Status: // 11-Apr-2007 -- Raffaele Nutricato: Author. +// 25-June-2017 -- Ukasha Noor: Revised By +// This function is counting the number of logical operators and there operands. // // Copyright 2007 Raffaele Nutricato. // Contact: raffaele.nutricato@tiscali.it diff --git a/2.3-1/macros/ASTManagement/AST_ParseOperStruct.sci b/2.3-1/macros/ASTManagement/AST_ParseOperStruct.sci index 2bd45fbb..cc992a9e 100644 --- a/2.3-1/macros/ASTManagement/AST_ParseOperStruct.sci +++ b/2.3-1/macros/ASTManagement/AST_ParseOperStruct.sci @@ -26,6 +26,7 @@ function [FunctionName,InArg,NInArg,NOutArg] = AST_ParseOperStruct(FileInfo,Shar // // Status: // 11-Apr-2007 -- Raffaele Nutricato: Author. +// 25-June-2017 -- Ukasha Noor: Revised By // // Copyright 2007 Raffaele Nutricato. // Contact: raffaele.nutricato@tiscali.it diff --git a/2.3-1/macros/ASTManagement/_funcall_string.sci b/2.3-1/macros/ASTManagement/_funcall_string.sci index c3101cbe..5218d533 100644 --- a/2.3-1/macros/ASTManagement/_funcall_string.sci +++ b/2.3-1/macros/ASTManagement/_funcall_string.sci @@ -5,6 +5,7 @@ function txt=%funcall_string(F) // rhs : a list // name : string, the name of the function // lhsnb: number, the number of function lhs +// Modified By: Ukasha Noor <<<<<<< HEAD if F.name <> 'disp' diff --git a/2.3-1/macros/ASTManagement/names b/2.3-1/macros/ASTManagement/names index 62b7d189..3045d397 100644 --- a/2.3-1/macros/ASTManagement/names +++ b/2.3-1/macros/ASTManagement/names @@ -35,6 +35,8 @@ AST_HandleForStatem <<<<<<< HEAD AST_HandleFunCC AST_HandleFunRC +AST_HandleFuncArray +AST_HandleFuncArray2D AST_HandleHeader AST_HandleIfElse AST_HandleRC diff --git a/2.3-1/macros/CCodeGeneration/C_GenDeclarations_Dup.sci b/2.3-1/macros/CCodeGeneration/C_GenDeclarations_Dup.sci index 475e2e0c..bdaf9c0e 100644 --- a/2.3-1/macros/CCodeGeneration/C_GenDeclarations_Dup.sci +++ b/2.3-1/macros/CCodeGeneration/C_GenDeclarations_Dup.sci @@ -11,6 +11,10 @@ function Cdeclaration = C_GenDeclarations_Dup(InArg,NInArg,com_type,ArgStruct,CD // // Status: // 27-Oct-2007 -- Raffaele Nutricato: Author. +// +// 25-June-2017 -- Ukasha Noor: Modified it. +// This function is called for array declaration in C. +// // 10-Jun-2008 -- Raffaele Nutricato: adapted to work with realloc function. // // Copyright 2007 Raffaele Nutricato. @@ -84,6 +88,9 @@ if (ArgStruct.Dimension > 0) computedSize = computedSize + ' * ' + ArgStruct.Size(sizeIterator); computedSizeField = computedSizeField + ', ' + ArgStruct.Size(sizeIterator); end +// Modified Changes: row tells number of rows and col is number of columns in array. +// col_type tells whether it is floatComplex or doubleComplex or real. +// and accordingly it declares the array. Cdeclaration(1) = Cdeclaration(1)+C_Type(ArgStruct.Type)+' '+ArgStruct.Name+'['+computedSize+']={'; row = eval(ArgStruct.Size(1)) col = eval(ArgStruct.Size(2)) diff --git a/2.3-1/macros/CCodeGeneration/C_IfExpression.sci b/2.3-1/macros/CCodeGeneration/C_IfExpression.sci index 23be4522..17138dcd 100644 --- a/2.3-1/macros/CCodeGeneration/C_IfExpression.sci +++ b/2.3-1/macros/CCodeGeneration/C_IfExpression.sci @@ -15,6 +15,7 @@ function SharedInfo = C_IfExpression(IfCondArg,NIfCondArg,ASTIfExpType,FileInfo, // // Status: // 27-Oct-2007 -- Raffaele Nutricato: Author. +// 28-June-2017 -- Ukasha Noor: Modified By // // Copyright 2007 Raffaele Nutricato. // Contact: raffaele.nutricato@tiscali.it diff --git a/2.3-1/macros/CCodeGeneration/C_WhileExpression.sci b/2.3-1/macros/CCodeGeneration/C_WhileExpression.sci index c63b9e80..00c60059 100644 --- a/2.3-1/macros/CCodeGeneration/C_WhileExpression.sci +++ b/2.3-1/macros/CCodeGeneration/C_WhileExpression.sci @@ -15,6 +15,7 @@ function SharedInfo = C_WhileExpression(FileInfo,SharedInfo) // // Status: // 15-Nov-2007 -- Raffaele Nutricato: Author. +// 27-June-2017 -- Ukasha Noor: Modified by // // Copyright 2007 Raffaele Nutricato. // Contact: raffaele.nutricato@tiscali.it diff --git a/2.3-1/macros/FunctionAnnotation/FA_GetOutArgInfo.sci b/2.3-1/macros/FunctionAnnotation/FA_GetOutArgInfo.sci index 99eaaa5f..4d1113ea 100644 --- a/2.3-1/macros/FunctionAnnotation/FA_GetOutArgInfo.sci +++ b/2.3-1/macros/FunctionAnnotation/FA_GetOutArgInfo.sci @@ -29,6 +29,7 @@ SCI2CNInArgCheck(argn(2),10,10); // --- Initialization. ---
// -----------------------
+
UpdatedOutArg = OutArg;
for cntin = 1:NInArg
IN(cntin).TP = InArg(cntin).Type;
@@ -101,7 +102,19 @@ for counterout = 1:NOutArg // This is a dynamic memory extension of a local variable and for the moment
// we issue an error according to SCI2C specifications
// #RNU_RES_E
- //disp(FunSizeAnnot)
+ //disp(FunSizeAnnot(2),FunSizeAnnot(1))
+ //Ukasha
+// if ASTFunName == svd
+// x=1;
+// for i=1:InArg(1).Size(1)
+// for j=1:InArg(1).Size(2)
+// A(i)(j)=InArg(1).Value(x);
+// end
+// end
+// [U,S,V]=svd(A,"e");
+
+
+
for iterOutputPosition=1:size(FunSizeAnnot, 'c')
tmpeval = eval(FunSizeAnnot(counterout, iterOutputPosition));
if (IsNanSize(tmpeval))
diff --git a/2.3-1/macros/SymbolTable/ST_GetInArgInfo.sci b/2.3-1/macros/SymbolTable/ST_GetInArgInfo.sci index 4c85408c..69885dda 100644 --- a/2.3-1/macros/SymbolTable/ST_GetInArgInfo.sci +++ b/2.3-1/macros/SymbolTable/ST_GetInArgInfo.sci @@ -210,7 +210,7 @@ for cntinarg = 1:NInArg PrintStringInfo(' Type: '+UpdatedInArg(cntinarg).Type,FileInfo.Funct(nxtscifunnumber).ReportFileName,'file');
PrintStringInfo(' Size(1): '+string(UpdatedInArg(cntinarg).Size(1)),FileInfo.Funct(nxtscifunnumber).ReportFileName,'file');
PrintStringInfo(' Size(2): '+string(UpdatedInArg(cntinarg).Size(2)),FileInfo.Funct(nxtscifunnumber).ReportFileName,'file');
- PrintStringInfo(' Value: '+string(UpdatedInArg(cntinarg).Value),FileInfo.Funct(nxtscifunnumber).ReportFileName,'file');
+ //PrintStringInfo(' Value: '+string(UpdatedInArg(cntinarg).Value),FileInfo.Funct(nxtscifunnumber).ReportFileName,'file');
PrintStringInfo(' FindLike: '+string(UpdatedInArg(cntinarg).FindLike),FileInfo.Funct(nxtscifunnumber).ReportFileName,'file');
PrintStringInfo(' Dimension: '+string(UpdatedInArg(cntinarg).Dimension),FileInfo.Funct(nxtscifunnumber).ReportFileName,'file');
PrintStringInfo(' Scope: '+UpdatedInArg(cntinarg).Scope,FileInfo.Funct(nxtscifunnumber).ReportFileName,'file');
diff --git a/2.3-1/macros/SymbolTable/ST_InsOutArg_Dup.sci b/2.3-1/macros/SymbolTable/ST_InsOutArg_Dup.sci index bca66235..67554bd9 100644 --- a/2.3-1/macros/SymbolTable/ST_InsOutArg_Dup.sci +++ b/2.3-1/macros/SymbolTable/ST_InsOutArg_Dup.sci @@ -175,7 +175,7 @@ for counteroutput = 1:NOutArg ST_Set(OutArg(counteroutput).Name,... OutArg(counteroutput).Type,... TmpOutArgSize,... - OutArg(counteroutput).Value,... + InArg,... OutArg(counteroutput).FindLike,... OutArg(counteroutput).Dimension,... SymbTableFileName); diff --git a/2.3-1/tests/unit_tests/test001_LinearRegression/scilabcode/mainfunction.sci b/2.3-1/tests/unit_tests/test001_LinearRegression/scilabcode/mainfunction.sci index 13624cfb..c6e09a0c 100644 --- a/2.3-1/tests/unit_tests/test001_LinearRegression/scilabcode/mainfunction.sci +++ b/2.3-1/tests/unit_tests/test001_LinearRegression/scilabcode/mainfunction.sci @@ -1,4 +1,4 @@ -//SCI2C: DEFAULT_PRECISION= DOUBLE
+//SCI2C: DEFAULT_PRECISION= FLOAT
function mainfunction()
diff --git a/2.3-1/tests/unit_tests/test01_DCT/scilabcode/main.sci b/2.3-1/tests/unit_tests/test01_DCT/scilabcode/main.sci new file mode 100644 index 00000000..33c44622 --- /dev/null +++ b/2.3-1/tests/unit_tests/test01_DCT/scilabcode/main.sci @@ -0,0 +1,7 @@ +//SCI2C: DEFAULT_PRECISION= FLOAT +//test for discrete cosine tranform using precision as float +function main() + b=([5 2 6 7;1 9 7 6+%i]) + y=dct(b,1) //calling dct + disp(y) +endfunction diff --git a/2.3-1/tests/unit_tests/test02_IDCT/scilabcode/testidct.sci b/2.3-1/tests/unit_tests/test02_IDCT/scilabcode/testidct.sci new file mode 100644 index 00000000..deed0f99 --- /dev/null +++ b/2.3-1/tests/unit_tests/test02_IDCT/scilabcode/testidct.sci @@ -0,0 +1,7 @@ +//SCI2C: DEFAULT_PRECISION= FLOAT +//test for inverse discrete cosine tranfrom +function testidct() + b=[1 2 3;4 5 6+%i] //declaring complex matrix + y=idct(b) //calling idct + disp(y) +endfunction diff --git a/2.3-1/tests/unit_tests/testLinearAlgebra/testsvd/testsvd.sci b/2.3-1/tests/unit_tests/testLinearAlgebra/test_svd/testsvd.sci index 9a3a50a6..c5da4cd3 100644 --- a/2.3-1/tests/unit_tests/testLinearAlgebra/testsvd/testsvd.sci +++ b/2.3-1/tests/unit_tests/testLinearAlgebra/test_svd/testsvd.sci @@ -1,6 +1,6 @@ function testsvd() disp(" ** SVD Function (Singular Value Decomposition)** ") A = [1,2,3,11;4,5,6,12;7,8,9,13] // Matrix - A - [s = svd(A) // Calling Function Sequence + s = svd(A) // Calling Function Sequence disp(s) endfunction diff --git a/2.3-1/tests/unit_tests/testLinearAlgebra/testsvd/testsvdeconomy.sci b/2.3-1/tests/unit_tests/testLinearAlgebra/test_svd/testsvdeconomy.sci index 0459c790..0459c790 100644 --- a/2.3-1/tests/unit_tests/testLinearAlgebra/testsvd/testsvdeconomy.sci +++ b/2.3-1/tests/unit_tests/testLinearAlgebra/test_svd/testsvdeconomy.sci diff --git a/2.3-1/tests/unit_tests/testLinearAlgebra/testsvd/testsvdim.sci b/2.3-1/tests/unit_tests/testLinearAlgebra/test_svd/testsvdim.sci index 16633cce..16633cce 100644 --- a/2.3-1/tests/unit_tests/testLinearAlgebra/testsvd/testsvdim.sci +++ b/2.3-1/tests/unit_tests/testLinearAlgebra/test_svd/testsvdim.sci diff --git a/2.3-1/tests/unit_tests/testLinearAlgebra/testsvd/testsvdrank.sci b/2.3-1/tests/unit_tests/testLinearAlgebra/test_svd/testsvdrank.sci index 108acde8..108acde8 100644 --- a/2.3-1/tests/unit_tests/testLinearAlgebra/testsvd/testsvdrank.sci +++ b/2.3-1/tests/unit_tests/testLinearAlgebra/test_svd/testsvdrank.sci diff --git a/2.3-1/tests/unit_tests/testLinearAlgebra/testsvd/testsvdreal.sci b/2.3-1/tests/unit_tests/testLinearAlgebra/test_svd/testsvdreal.sci index 0e68e003..0e68e003 100644 --- a/2.3-1/tests/unit_tests/testLinearAlgebra/testsvd/testsvdreal.sci +++ b/2.3-1/tests/unit_tests/testLinearAlgebra/test_svd/testsvdreal.sci |