Hello

Attached below is the patch for bug 14483. The patch is in 2 parts. First
part has the non regression test and the second part has the changes along
with changes.md file.

If you could please review the changes and see if things are in order.

Thanks

Nikhil

On Tue, Jan 3, 2017 at 12:58 PM, Clément David <
[email protected]> wrote:

> Hi Nikhil and welcome,
>
> I saw your mail and accepted it but a bit late :). About the process, we
> usually do not assign a bug
> to new-comers as the Assignee field is just a reminder for us. You should
> select a bug, fix it and
> either mail the patch (using `git format-patch`) or push it to the
> codereview (and add a reviewer).
>
> All (and probably too much :) ) information are on the wiki.scilab.org,
> do not hesitate to use the
> gsoc ML for beginners question (compiling scilab, commit and push a patch).
>
> Thanks,
>
> --
> Clément
>
> Le lundi 02 janvier 2017 à 13:12 +0530, nikhil goel a écrit :
> > Sir/ Ma'am
> > I am Nikhil Goel, a second year engineering student from BITS Pilani,
> India. I am currently an
> > amateur coder and would like to contribute in Scilab to learn more about
> software development
> > practices.
> > I had sent a mail two weeks ago but I wasn't subscribed to the dev
> mailing list.
> > Within this period I have developed a deeper understanding of work flow
> and the code of scilab.
> > After becoming familiar with the compilation of the software solved a
> bug that was reported on
> > bugzilla.scilab.org. but I havent submitted the patch yet as I am
> unclear on the process.
> > Pointers/ suggestions on what to solve would be greatly appreciated.
> > As I get more comfortable with the tech stack, I would like to further
> contribute more
> > substantially.
> > Thanking you in anticipation
> > Regards
> > Nikhil Goel
> > _______________________________________________
> > dev mailing list
> > [email protected]
> > http://lists.scilab.org/mailman/listinfo/dev
> _______________________________________________
> dev mailing list
> [email protected]
> http://lists.scilab.org/mailman/listinfo/dev
>
From bbd6a2eef5343e16344ffdc38c6ecd5a9712cc18 Mon Sep 17 00:00:00 2001
From: Nikhil Goel <[email protected]>
Date: Mon, 26 Dec 2016 23:09:29 +0530
Subject: [PATCH 1/2] name alias for figure_name

---
 .../graphics/tests/nonreg_tests/bug_14483.dia.ref   | 21 +++++++++++++++++++++
 .../graphics/tests/nonreg_tests/bug_14483.tst       | 21 +++++++++++++++++++++
 2 files changed, 42 insertions(+)
 create mode 100644 scilab/modules/graphics/tests/nonreg_tests/bug_14483.dia.ref
 create mode 100644 scilab/modules/graphics/tests/nonreg_tests/bug_14483.tst

diff --git a/scilab/modules/graphics/tests/nonreg_tests/bug_14483.dia.ref b/scilab/modules/graphics/tests/nonreg_tests/bug_14483.dia.ref
new file mode 100644
index 0000000..391e389
--- /dev/null
+++ b/scilab/modules/graphics/tests/nonreg_tests/bug_14483.dia.ref
@@ -0,0 +1,21 @@
+// =============================================================================
+// Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
+// Copyright (C) 2016 - Scilab Enterprises - Adeline CARNIS
+//
+//  This file is distributed under the same license as the Scilab package.
+// =============================================================================
+
+// <-- Non-regression test for bug 14483 -->
+//
+// <-- Bugzilla URL -->
+// http://bugzilla.scilab.org/show_bug.cgi?id=14483
+//
+// <-- Short Description -->
+// figure("Name" ...) should be an alias to figure("Figure_name" ...)
+// =============================================================================
+
+// Check if Name is working 
+f1 = figure("name","nikhil");
+
+// Check if Figure_name is working 
+f2 = figure("figure_name","nikhil");
diff --git a/scilab/modules/graphics/tests/nonreg_tests/bug_14483.tst b/scilab/modules/graphics/tests/nonreg_tests/bug_14483.tst
new file mode 100644
index 0000000..391e389
--- /dev/null
+++ b/scilab/modules/graphics/tests/nonreg_tests/bug_14483.tst
@@ -0,0 +1,21 @@
+// =============================================================================
+// Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
+// Copyright (C) 2016 - Scilab Enterprises - Adeline CARNIS
+//
+//  This file is distributed under the same license as the Scilab package.
+// =============================================================================
+
+// <-- Non-regression test for bug 14483 -->
+//
+// <-- Bugzilla URL -->
+// http://bugzilla.scilab.org/show_bug.cgi?id=14483
+//
+// <-- Short Description -->
+// figure("Name" ...) should be an alias to figure("Figure_name" ...)
+// =============================================================================
+
+// Check if Name is working 
+f1 = figure("name","nikhil");
+
+// Check if Figure_name is working 
+f2 = figure("figure_name","nikhil");
-- 
2.9.1

From 58491a0f08c22f4d0dccd2ab722a1d9ee967651f Mon Sep 17 00:00:00 2001
From: Nikhil Goel <[email protected]>
Date: Tue, 27 Dec 2016 10:32:48 +0530
Subject: [PATCH 2/2] name alias for figure_name

---
 scilab/CHANGES.md                                              | 1 +
 scilab/modules/graphics/src/c/getHandleProperty/GetHashTable.c | 1 +
 scilab/modules/graphics/src/c/getHandleProperty/SetHashTable.c | 1 +
 3 files changed, 3 insertions(+)

diff --git a/scilab/CHANGES.md b/scilab/CHANGES.md
index fa69f7c..97aa1cc 100644
--- a/scilab/CHANGES.md
+++ b/scilab/CHANGES.md
@@ -602,6 +602,7 @@ Bug Fixes
 * [#14468](http://bugzilla.scilab.org/show_bug.cgi?id=14468): Scinotes was unable to export to HTML.
 * [#14471](http://bugzilla.scilab.org/show_bug.cgi?id=14471): `strange([])` returned `[]` instead of `Nan` as all other functions for statistical dispersion
 * [#14476](http://bugzilla.scilab.org/show_bug.cgi?id=14476): Operation `.*` between polynomials and imaginary numbers was always returning `0`
+* [#14483](https://bugzilla.scilab.org/show_bug.cgi?id=14483): figure("Name" ...) should be an alias to figure("Figure_name" ...)
 * [#14493](http://bugzilla.scilab.org/show_bug.cgi?id=14493): `and` and `or` help pages were poor and inaccurate.
 * [#14495](http://bugzilla.scilab.org/show_bug.cgi?id=14495): `consolebox` help page shew wrong syntaxes and was poor.
 * [#14499](http://bugzilla.scilab.org/show_bug.cgi?id=14499): `getd` did not update already defined functions
diff --git a/scilab/modules/graphics/src/c/getHandleProperty/GetHashTable.c b/scilab/modules/graphics/src/c/getHandleProperty/GetHashTable.c
index 61d0a5c..2713732 100755
--- a/scilab/modules/graphics/src/c/getHandleProperty/GetHashTable.c
+++ b/scilab/modules/graphics/src/c/getHandleProperty/GetHashTable.c
@@ -60,6 +60,7 @@ static getHashTableCouple propertyGetTable[] =
     {"axes_size", get_axes_size_property},
     {"figure_size", get_figure_size_property},
     {"figure_name", get_figure_name_property},
+    {"name",get_figure_name_property},
     {"figure_id", get_figure_id_property},
     {"rotation_style", get_rotation_style_property},
     {"immediate_drawing", get_immediate_drawing_property},
diff --git a/scilab/modules/graphics/src/c/getHandleProperty/SetHashTable.c b/scilab/modules/graphics/src/c/getHandleProperty/SetHashTable.c
index 2f662cf..2c13c20 100755
--- a/scilab/modules/graphics/src/c/getHandleProperty/SetHashTable.c
+++ b/scilab/modules/graphics/src/c/getHandleProperty/SetHashTable.c
@@ -63,6 +63,7 @@ static setHashTableCouple propertySetTable[] =
     {"axes_size", set_axes_size_property},
     {"figure_size", set_figure_size_property},
     {"figure_name", set_figure_name_property},
+    {"name",set_figure_name_property},
     {"figure_id", set_figure_id_property},
     {"rotation_style", set_rotation_style_property},
     {"immediate_drawing", set_immediate_drawing_property},
-- 
2.9.1

_______________________________________________
dev mailing list
[email protected]
http://lists.scilab.org/mailman/listinfo/dev

Reply via email to