[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[SCM] gawk branch, gawk-5.1-stable, updated. gawk-4.1.0-4273-g93881c2
From: |
Arnold Robbins |
Subject: |
[SCM] gawk branch, gawk-5.1-stable, updated. gawk-4.1.0-4273-g93881c2 |
Date: |
Fri, 23 Jul 2021 03:17:31 -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.1-stable has been updated
via 93881c26428a4d07ee348c34b59f3b9586853535 (commit)
from f056f0a42953c9297f60335421ccd7609cba698e (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=93881c26428a4d07ee348c34b59f3b9586853535
commit 93881c26428a4d07ee348c34b59f3b9586853535
Author: Arnold D. Robbins <arnold@skeeve.com>
Date: Fri Jul 23 10:17:14 2021 +0300
Fixes for Vax/VMS C.
diff --git a/ChangeLog b/ChangeLog
index 8754787..a03edc8 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,11 @@
+2021-07-23 Arnold D. Robbins <arnold@skeeve.com>
+
+ * awk.h (exec_count_t): Add typedef for Vax VMS C and everyone else.
+ (EXEC_COUNT_FMT, EXEC_COUNT_PROFILE_FMT): Corresponding format
+ strings for printf.
+ * debug.c (print_instruction): Use EXEC_COUNT_FMT.
+ * profile.c (indent): Ditto and use EXEC_COUNT_PROFILE_FMT.
+
2021-07-07 Arnold D. Robbins <arnold@skeeve.com>
* array.c (asort_actual): Add a lint warning for passing the
diff --git a/awk.h b/awk.h
index 2ab25bf..cb7c499 100644
--- a/awk.h
+++ b/awk.h
@@ -750,6 +750,16 @@ enum redirval {
struct break_point;
+#if __DECC && __VAX
+typedef unsigned long exec_count_t; // for exec_count
+#define EXEC_COUNT_FMT "%lu"
+#define EXEC_COUNT_PROFILE_FMT "%6lu"
+#else
+typedef unsigned long long exec_count_t; // for exec_count
+#define EXEC_COUNT_FMT "%llu"
+#define EXEC_COUNT_PROFILE_FMT "%6llu"
+#endif
+
typedef struct exp_instruction {
struct exp_instruction *nexti;
union {
@@ -760,7 +770,7 @@ typedef struct exp_instruction {
awk_value_t *result,
struct awk_ext_func *finfo);
long dl;
- unsigned long long ldl; // for exec_count
+ exec_count_t ldl; // for exec_count
char *name;
} d;
diff --git a/debug.c b/debug.c
index 39ff772..cf0946e 100644
--- a/debug.c
+++ b/debug.c
@@ -4085,7 +4085,7 @@ print_instruction(INSTRUCTION *pc, Func_print print_func,
FILE *fp, int in_dump)
break;
case Op_exec_count:
- print_func(fp, "[exec_count = %llu]\n", pc->exec_count);
+ print_func(fp, "[exec_count = " EXEC_COUNT_FMT "]\n",
pc->exec_count);
break;
case Op_store_var:
diff --git a/profile.c b/profile.c
index 748abda..3dd7bde 100644
--- a/profile.c
+++ b/profile.c
@@ -135,7 +135,7 @@ init_profiling_signals()
/* indent --- print out enough tabs */
static void
-indent(unsigned long long count)
+indent(exec_count_t count)
{
int i;
@@ -143,7 +143,7 @@ indent(unsigned long long count)
if (count == 0)
fprintf(prof_fp, "\t");
else
- fprintf(prof_fp, "%6llu ", count);
+ fprintf(prof_fp, EXEC_COUNT_PROFILE_FMT " ", count);
}
assert(indent_level >= 0);
@@ -297,7 +297,7 @@ pprint(INSTRUCTION *startp, INSTRUCTION *endp, int flags)
ip2 = (pc + 1)->lasti;
if (do_profile && ip1->exec_count > 0)
- fprintf(prof_fp, " # %llu",
ip1->exec_count);
+ fprintf(prof_fp, " # "
EXEC_COUNT_FMT, ip1->exec_count);
end_line(ip1);
skip_comment = true;
@@ -1044,7 +1044,7 @@ cleanup:
ip1 = pc->branch_if;
if (ip1->exec_count > 0)
- fprintf(prof_fp, " # %llu", ip1->exec_count);
+ fprintf(prof_fp, " # " EXEC_COUNT_FMT,
ip1->exec_count);
ip1 = end_line(ip1);
indent_in();
if (pc->comment != NULL)
-----------------------------------------------------------------------
Summary of changes:
ChangeLog | 8 ++++++++
awk.h | 12 +++++++++++-
debug.c | 2 +-
profile.c | 8 ++++----
4 files changed, 24 insertions(+), 6 deletions(-)
hooks/post-receive
--
gawk
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [SCM] gawk branch, gawk-5.1-stable, updated. gawk-4.1.0-4273-g93881c2,
Arnold Robbins <=