gawk-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[SCM] gawk branch, gawk-5.1-stable, updated. gawk-4.1.0-4367-gf285f96


From: Arnold Robbins
Subject: [SCM] gawk branch, gawk-5.1-stable, updated. gawk-4.1.0-4367-gf285f96
Date: Fri, 17 Dec 2021 04:09:49 -0500 (EST)

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  f285f960bdfb5acb50a8ec7ed4b98f17d0bd624a (commit)
      from  b1cfda80b2c341e8b8d26f1b693c6c2603c90741 (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=f285f960bdfb5acb50a8ec7ed4b98f17d0bd624a

commit f285f960bdfb5acb50a8ec7ed4b98f17d0bd624a
Author: Arnold D. Robbins <arnold@skeeve.com>
Date:   Fri Dec 17 11:09:31 2021 +0200

    Make a number of variables and functions be static.

diff --git a/ChangeLog b/ChangeLog
index 0345ee7..e2f179f 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,16 @@
+2021-12-17         Yuri Gribov           <tetra2005@gmail.com>
+
+       Make a number of functions and variables static.
+
+       * cint_array.c (argv_array_func): Make static.
+       * debug.c (cur_rule, check_until): Ditto.
+       * field.c (default_FS, FS_re_yes_case, FS_re_no_case, FS_regexp,
+       FPAT_re_yes_case, FPAT_re_no_case, invalidate_field0: Ditto.
+       * io.c (iopflags2str): Ditto.
+       * main.c (ENVIRON_node): Ditto.
+       * re.c (reflags2str): Ditto.
+       * str_array.c (env_array_func): Ditto.
+
 2021-12-02         Andrew J. Schorr      <aschorr@telemetry-investments.com>
 
        * builtin.c (efwrite): Don't use return in call of function
diff --git a/cint_array.c b/cint_array.c
index 63c477b..9194776 100644
--- a/cint_array.c
+++ b/cint_array.c
@@ -77,7 +77,7 @@ const array_funcs_t cint_array_func = {
 static NODE **argv_store(NODE *symbol, NODE *subs);
 
 /* special case for ARGV in sandbox mode */
-const array_funcs_t argv_array_func = {
+static const array_funcs_t argv_array_func = {
        "argv",
        cint_array_init,
        is_uinteger,
diff --git a/debug.c b/debug.c
index cf0946e..e7dd706 100644
--- a/debug.c
+++ b/debug.c
@@ -64,7 +64,7 @@ int input_fd;
 static SRCFILE *cur_srcfile;
 static long cur_frame = 0;
 static INSTRUCTION *cur_pc;
-int cur_rule = 0;
+static int cur_rule = 0;
 
 static bool prog_running = false;
 
@@ -3303,7 +3303,7 @@ do_return(CMDARG *arg, int cmd)
 
 /* check_until --- process until, returns true if stopping */
 
-int
+static int
 check_until(INSTRUCTION **pi)
 {
        if (fcall_count < stop.fcall_count) { /* current stack frame returned */
diff --git a/field.c b/field.c
index b2661d6..1cbd547 100644
--- a/field.c
+++ b/field.c
@@ -81,13 +81,13 @@ static awk_fieldwidth_info_t *FIELDWIDTHS = NULL;
 
 NODE **fields_arr;             /* array of pointers to the field nodes */
 bool field0_valid;             /* $(>0) has not been changed yet */
-int default_FS;                        /* true when FS == " " */
-Regexp *FS_re_yes_case = NULL;
-Regexp *FS_re_no_case = NULL;
-Regexp *FS_regexp = NULL;
-Regexp *FPAT_re_yes_case = NULL;
-Regexp *FPAT_re_no_case = NULL;
-Regexp *FPAT_regexp = NULL;
+static int default_FS;         /* true when FS == " " */
+static Regexp *FS_re_yes_case = NULL;
+static Regexp *FS_re_no_case = NULL;
+static Regexp *FS_regexp = NULL;
+static Regexp *FPAT_re_yes_case = NULL;
+static Regexp *FPAT_re_no_case = NULL;
+static Regexp *FPAT_regexp = NULL;
 NODE *Null_field = NULL;
 
 #define clear_mpfr(n) ((n)->flags &= ~(MPFN | MPZN | NUMCUR))
@@ -837,7 +837,7 @@ fw_parse_field(long up_to,  /* parse only up to this field 
number */
 
 /* invalidate_field0 --- $0 needs reconstruction */
 
-void
+static void
 invalidate_field0()
 {
        field0_valid = false;
diff --git a/io.c b/io.c
index 0da8699..1d440c1 100644
--- a/io.c
+++ b/io.c
@@ -4170,7 +4170,7 @@ pty_vs_pipe(const char *command)
 
 /* iopflags2str --- make IOP flags printable */
 
-const char *
+static const char *
 iopflags2str(int flag)
 {
        static const struct flagtab values[] = {
diff --git a/main.c b/main.c
index f666619..515d9cd 100644
--- a/main.c
+++ b/main.c
@@ -73,7 +73,8 @@ static const char *platform_name();
 
 /* These nodes store all the special variables AWK uses */
 NODE *ARGC_node, *ARGIND_node, *ARGV_node, *BINMODE_node, *CONVFMT_node;
-NODE *ENVIRON_node, *ERRNO_node, *FIELDWIDTHS_node, *FILENAME_node;
+static NODE *ENVIRON_node;
+NODE *ERRNO_node, *FIELDWIDTHS_node, *FILENAME_node;
 NODE *FNR_node, *FPAT_node, *FS_node, *IGNORECASE_node, *LINT_node;
 NODE *NF_node, *NR_node, *OFMT_node, *OFS_node, *ORS_node, *PROCINFO_node;
 NODE *RLENGTH_node, *RSTART_node, *RS_node, *RT_node, *SUBSEP_node;
diff --git a/re.c b/re.c
index 929c317..fd13472 100644
--- a/re.c
+++ b/re.c
@@ -517,7 +517,7 @@ reisstring(const char *text, size_t len, Regexp *re, const 
char *buf)
 
 /* reflags2str --- make a regex flags value readable */
 
-const char *
+static const char *
 reflags2str(int flagval)
 {
        static const struct flagtab values[] = {
diff --git a/str_array.c b/str_array.c
index 219a75a..f6e4dee 100644
--- a/str_array.c
+++ b/str_array.c
@@ -76,7 +76,7 @@ static NODE **env_store(NODE *symbol, NODE *subs);
 static NODE **env_clear(NODE *symbol, NODE *subs);
 
 /* special case for ENVIRON */
-const array_funcs_t env_array_func = {
+static const array_funcs_t env_array_func = {
        "env",
        str_array_init,
        (afunc_t) 0,

-----------------------------------------------------------------------

Summary of changes:
 ChangeLog    | 13 +++++++++++++
 cint_array.c |  2 +-
 debug.c      |  4 ++--
 field.c      | 16 ++++++++--------
 io.c         |  2 +-
 main.c       |  3 ++-
 re.c         |  2 +-
 str_array.c  |  2 +-
 8 files changed, 29 insertions(+), 15 deletions(-)


hooks/post-receive
-- 
gawk



reply via email to

[Prev in Thread] Current Thread [Next in Thread]