[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[SCM] gawk branch, gawk-5.2-stable, updated. gawk-4.1.0-5029-g47200919
From: |
Arnold Robbins |
Subject: |
[SCM] gawk branch, gawk-5.2-stable, updated. gawk-4.1.0-5029-g47200919 |
Date: |
Fri, 7 Apr 2023 06:27:07 -0400 (EDT) |
This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "gawk".
The branch, gawk-5.2-stable has been updated
via 47200919a70c992685146fdd72c1a2856c15c6b0 (commit)
via 65ce68a3a74a7cacb567b22f961d91f584af3e4a (commit)
from 2efd3d04a0298ae9dce7dde6ae58ddcd6ff6dc2a (commit)
Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.
- Log -----------------------------------------------------------------
http://git.sv.gnu.org/cgit/gawk.git/commit/?id=47200919a70c992685146fdd72c1a2856c15c6b0
commit 47200919a70c992685146fdd72c1a2856c15c6b0
Author: Arnold D. Robbins <arnold@skeeve.com>
Date: Fri Apr 7 13:26:41 2023 +0300
Improvements to adump.
diff --git a/ChangeLog b/ChangeLog
index c1d22b94..8555a0b3 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
+2023-04-07 Arnold D. Robbins <arnold@skeeve.com>
+
+ * array.c (assoc_info): Update to handle additional cases so
+ that one may dump SYMTAB or FUNCTAB. Issue reported by
+ zhou shuiqing <zhoushuiqing321@outlook.com>.
+
2023-03-09 Arnold D. Robbins <arnold@skeeve.com>
* gawkapi.h: Update copyright year. Small edit in leading comment.
diff --git a/array.c b/array.c
index 6d2ed19b..09151169 100644
--- a/array.c
+++ b/array.c
@@ -748,10 +748,16 @@ assoc_info(NODE *subs, NODE *val, NODE *ndump, const char
*aname)
fprintf(output_fp, "]\n");
indent(indent_level);
- if (val->type == Node_val) {
+ switch (val->type) {
+ case Node_val:
fprintf(output_fp, "V: [scalar: ");
value_info(val);
- } else {
+ break;
+ case Node_var:
+ fprintf(output_fp, "V: [scalar: ");
+ value_info(val->var_value);
+ break;
+ case Node_var_array:
fprintf(output_fp, "V: [");
ndump->alevel++;
ndump->adepth--;
@@ -759,6 +765,19 @@ assoc_info(NODE *subs, NODE *val, NODE *ndump, const char
*aname)
ndump->adepth++;
ndump->alevel--;
indent(indent_level);
+ break;
+ case Node_func:
+ fprintf(output_fp, "V: [user_defined_function");
+ break;
+ case Node_ext_func:
+ fprintf(output_fp, "V: [external_function");
+ break;
+ case Node_builtin_func:
+ fprintf(output_fp, "V: [builtin_function");
+ break;
+ default:
+ cant_happen("unexpected node type %s", nodetype2str(val->type));
+ break;
}
fprintf(output_fp, "]\n");
}
http://git.sv.gnu.org/cgit/gawk.git/commit/?id=65ce68a3a74a7cacb567b22f961d91f584af3e4a
commit 65ce68a3a74a7cacb567b22f961d91f584af3e4a
Author: Arnold D. Robbins <arnold@skeeve.com>
Date: Fri Apr 7 12:56:18 2023 +0300
Improve sort1 test case.
diff --git a/test/ChangeLog b/test/ChangeLog
index e7f6a45c..1d6f5427 100644
--- a/test/ChangeLog
+++ b/test/ChangeLog
@@ -1,3 +1,8 @@
+2023-04-07 zhou shuiqing <zhoushuiqing321@outlook.com>
+
+ * sort1.awk: Add tests for ind_num_desc and @ind_str_asc.
+ * sort1.ok: Updated.
+
2023-03-09 Arnold D. Robbins <arnold@skeeve.com>
* badargs.ok: Update after code changes.
diff --git a/test/sort1.awk b/test/sort1.awk
index ef28e9cd..78840bf8 100644
--- a/test/sort1.awk
+++ b/test/sort1.awk
@@ -21,6 +21,18 @@ BEGIN{
printf("---end asort(a, b, \"%s\"), IGNORECASE = %d---\n",
SORT_STR, IGNORECASE)
+ makea(a)
+ SORT_STR = "@ind_num_desc"
+ asort1(a, "")
+ printf("---end asort(a, b, \"%s\"), IGNORECASE = %d---\n",
+ SORT_STR, IGNORECASE)
+
+ makea(a)
+ SORT_STR = "@ind_str_asc"
+ asort1(a, "")
+ printf("---end asort(a, a, \"%s\"), IGNORECASE = %d---\n",
+ SORT_STR, IGNORECASE)
+
makea(a)
SORT_STR = "@ind_str_desc"
asort1(a, "")
diff --git a/test/sort1.ok b/test/sort1.ok
index 00ed661a..d8b6d94f 100644
--- a/test/sort1.ok
+++ b/test/sort1.ok
@@ -47,6 +47,26 @@
[4]: Zebra
[5]: blattt
[6]: barz
+---end asort(a, b, "@ind_num_desc"), IGNORECASE = 0---
+ [1]: barz
+ [2]: blattt
+ [3]: Zebra
+ [4]: 1234
+ [5]: 234
+ [6][1]: 4321
+ [6][2]: arbeZ
+ [6][3]: tttalb
+ [6][4]: zrab
+---end asort(a, a, "@ind_str_asc"), IGNORECASE = 0---
+ [1][1]: zrab
+ [1][2]: tttalb
+ [1][3]: arbeZ
+ [1][4]: 4321
+ [2]: 234
+ [3]: 1234
+ [4]: Zebra
+ [5]: blattt
+ [6]: barz
---end asort(a, a, "@ind_str_desc"), IGNORECASE = 0---
[4]: 1234
[5]: 234
@@ -157,6 +177,26 @@
[4]: Zebra
[5]: blattt
[6]: barz
+---end asort(a, b, "@ind_num_desc"), IGNORECASE = 1---
+ [1]: barz
+ [2]: blattt
+ [3]: Zebra
+ [4]: 1234
+ [5]: 234
+ [6][1]: 4321
+ [6][2]: arbeZ
+ [6][3]: tttalb
+ [6][4]: zrab
+---end asort(a, a, "@ind_str_asc"), IGNORECASE = 1---
+ [1][1]: zrab
+ [1][2]: tttalb
+ [1][3]: arbeZ
+ [1][4]: 4321
+ [2]: 234
+ [3]: 1234
+ [4]: Zebra
+ [5]: blattt
+ [6]: barz
---end asort(a, a, "@ind_str_desc"), IGNORECASE = 1---
[4]: 1234
[5]: 234
-----------------------------------------------------------------------
Summary of changes:
ChangeLog | 6 ++++++
array.c | 23 +++++++++++++++++++++--
test/ChangeLog | 5 +++++
test/sort1.awk | 12 ++++++++++++
test/sort1.ok | 40 ++++++++++++++++++++++++++++++++++++++++
5 files changed, 84 insertions(+), 2 deletions(-)
hooks/post-receive
--
gawk
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [SCM] gawk branch, gawk-5.2-stable, updated. gawk-4.1.0-5029-g47200919,
Arnold Robbins <=