summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorArnold D. Robbins <arnold@skeeve.com>2023-04-07 13:33:11 +0300
committerArnold D. Robbins <arnold@skeeve.com>2023-04-07 13:33:11 +0300
commit8513def88abb290eb5152556dfbfa605d8bf3202 (patch)
tree788eba23f72ce1b6f1faaf98e29d8066f3e84e6e
parent0dc720c325bd76dc6bebc48cd151905e73ff7ce6 (diff)
parent47200919a70c992685146fdd72c1a2856c15c6b0 (diff)
downloadgawk-8513def88abb290eb5152556dfbfa605d8bf3202.tar.gz
Merge branch 'gawk-5.2-stable'
-rw-r--r--ChangeLog6
-rw-r--r--array.c23
-rw-r--r--po/ChangeLog4
-rw-r--r--po/it.po2
-rw-r--r--test/ChangeLog5
-rw-r--r--test/sort1.awk12
-rw-r--r--test/sort1.ok40
7 files changed, 89 insertions, 3 deletions
diff --git a/ChangeLog b/ChangeLog
index 19cb690b..b72bf1d3 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-26 Arnold D. Robbins <arnold@skeeve.com>
* NEWS: Updated.
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");
}
diff --git a/po/ChangeLog b/po/ChangeLog
index 30535f1d..6fd15133 100644
--- a/po/ChangeLog
+++ b/po/ChangeLog
@@ -1,3 +1,7 @@
+2023-04-05 Antonio Giovanni Colombo <azc100@gmail.com>
+
+ * it.po: Updated.
+
2023-03-12 Antonio Giovanni Colombo <azc100@gmail.com>
* it.po: Updated.
diff --git a/po/it.po b/po/it.po
index 998ed57a..d5cefcc0 100644
--- a/po/it.po
+++ b/po/it.po
@@ -7,7 +7,7 @@ msgstr ""
"Project-Id-Version: GNU Awk 5.2.1, API: 3.0\n"
"Report-Msgid-Bugs-To: bug-gawk@gnu.org\n"
"POT-Creation-Date: 2023-03-12 09:11+0100\n"
-"PO-Revision-Date: 2023-03-12 09:35+0100\n"
+"PO-Revision-Date: 2023-04-05 15:30+0100\n"
"Last-Translator: Antonio Colombo <azc100@gmail.com>\n"
"Language-Team: Italian <it@li.org>\n"
"Language: it\n"
diff --git a/test/ChangeLog b/test/ChangeLog
index db6720ea..e32cd584 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-23 Arnold D. Robbins <arnold@skeeve.com>
* Makefile.am (EXTRA_DIST): New test: unicode1.
diff --git a/test/sort1.awk b/test/sort1.awk
index ef28e9cd..78840bf8 100644
--- a/test/sort1.awk
+++ b/test/sort1.awk
@@ -22,6 +22,18 @@ BEGIN{
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, "")
printf("---end asort(a, a, \"%s\"), IGNORECASE = %d---\n",
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