gawk-diffs
[Top][All Lists]
Advanced

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

[gawk-diffs] [SCM] gawk branch, xgawk, updated. 15635ff21b6f1a0951f0ff5d


From: Arnold Robbins
Subject: [gawk-diffs] [SCM] gawk branch, xgawk, updated. 15635ff21b6f1a0951f0ff5de6ddaf0edab8edd7
Date: Mon, 26 Mar 2012 19:36:56 +0000

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, xgawk has been updated
       via  15635ff21b6f1a0951f0ff5de6ddaf0edab8edd7 (commit)
      from  2e14bf32d257e86fb4db379211c1f86af2b23165 (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=15635ff21b6f1a0951f0ff5de6ddaf0edab8edd7

commit 15635ff21b6f1a0951f0ff5de6ddaf0edab8edd7
Author: Arnold D. Robbins <address@hidden>
Date:   Mon Mar 26 21:36:37 2012 +0200

    Some minor style edits in code and doc.

diff --git a/ChangeLog b/ChangeLog
index d5be293..2b17e4f 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,13 @@
+2012-03-26         Arnold D. Robbins     <address@hidden>
+
+       Some cleanups.
+
+       * awkgram.y (add_srcfile): Use whole messages, better for
+       translations.
+       * io.c (init_awkpath): Small style tweak.
+       * main.c (path_environ): Straighten out initial comment, fix
+       compiler warning by making `val' const char *.
+
 2012-03-25         Andrew J. Schorr     <address@hidden>
 
        * configure.ac (AC_DISABLE_STATIC): Add this to avoid building useless
diff --git a/awkgram.y b/awkgram.y
index 0b47568..18e758f 100644
--- a/awkgram.y
+++ b/awkgram.y
@@ -1845,7 +1845,7 @@ static const struct token tokentab[] = {
 {"int",                Op_builtin,      LEX_BUILTIN,   A(1),           do_int},
 {"isarray",    Op_builtin,      LEX_BUILTIN,   GAWKX|A(1),     do_isarray},
 {"length",     Op_builtin,      LEX_LENGTH,    A(0)|A(1),      do_length},
-{"load",  Op_symbol,    LEX_LOAD,      GAWKX,  0},
+{"load",       Op_symbol,       LEX_LOAD,      GAWKX,          0},
 {"log",                Op_builtin,      LEX_BUILTIN,   A(1),           do_log},
 {"lshift",     Op_builtin,    LEX_BUILTIN,     GAWKX|A(2),     do_lshift},
 {"match",      Op_builtin,      LEX_BUILTIN,   NOT_OLD|A(2)|A(3), do_match},
@@ -2288,8 +2288,12 @@ add_srcfile(int stype, char *src, SRCFILE *thisfile, int 
*already_included, int
                        *errcode = errno_val;
                        return NULL;
                }
-               fatal(_("can't open %s `%s' for reading (%s)"),
-                               ((stype == SRC_EXTLIB) ? "shared library" : 
"source file"), src, errno_val ? strerror(errno_val) : _("reason unknown"));
+               /* use full messages to ease translation */
+               fatal(stype == SRC_EXTLIB
+                       ? _("can't open source file `%s' for reading (%s)")
+                       : _("can't open shared library `%s' for reading (%s)"),
+                               src,
+                               errno_val ? strerror(errno_val) : _("reason 
unknown"));
        }
 
        for (s = srcfiles->next; s != srcfiles; s = s->next) {
diff --git a/doc/ChangeLog b/doc/ChangeLog
index f8f83fc..815644c 100644
--- a/doc/ChangeLog
+++ b/doc/ChangeLog
@@ -1,3 +1,7 @@
+2012-03-26         Arnold D. Robbins     <address@hidden>
+
+       * gawk.texi: Minor style edits.
+
 2012-03-21         Andrew J. Schorr     <address@hidden>
 
        * gawk.texi, gawk.1: Document new @load keyword.
diff --git a/doc/gawk.texi b/doc/gawk.texi
index c3375ce..eaad54d 100644
--- a/doc/gawk.texi
+++ b/doc/gawk.texi
@@ -3883,19 +3883,20 @@ suffix to the filename.  For example, on GNU/Linux 
systems, the suffix
 @samp{.so} is used.
 
 @example
-$ @kbd{awk '@@load "ordchr"; BEGIN @{print chr(65)@}'}
-A
+$ @kbd{gawk '@@load "ordchr"; BEGIN @{print chr(65)@}'}
address@hidden A
 @end example
 
 @noindent
 This is equivalent to the following example:
 
 @example
-$ @kbd{awk -lordchr 'BEGIN @{print chr(65)@}'}
-A
+$ @kbd{gawk -lordchr 'BEGIN @{print chr(65)@}'}
address@hidden A
 @end example
 
address@hidden For command-line usage, the @option{-l} option is more 
convenient,
address@hidden
+For command-line usage, the @option{-l} option is more convenient,
 but @samp{@@load} is useful for embedding inside an @command{awk} source file
 that requires access to a shared library.
 
diff --git a/io.c b/io.c
index 79bc868..e3327f1 100644
--- a/io.c
+++ b/io.c
@@ -2345,7 +2345,7 @@ init_awkpath(path_info *pi)
 
        pi->max_pathlen = 0;
        if ((path = getenv(pi->envname)) == NULL || *path == '\0')
-               path = *(pi->dfltp);
+               path = pi->dfltp[0];
 
        max_path = INC_PATH;
        emalloc(pi->awkpath, char **, (max_path + 1) * sizeof(char *), 
"init_awkpath");
diff --git a/main.c b/main.c
index dafa15c..9df5869 100644
--- a/main.c
+++ b/main.c
@@ -971,12 +971,12 @@ init_vars()
        register_deferred_variable("ENVIRON", load_environ);
 }
 
-/* load_environ --- populate the ENVIRON array */
+/* path_environ --- put path variable into environment if not already there */
 
 static void
 path_environ(const char *pname, const char *dflt)
 {
-       char *val;
+       const char *val;
        NODE **aptr;
        NODE *tmp;
 
@@ -996,6 +996,8 @@ path_environ(const char *pname, const char *dflt)
        unref(tmp);
 }
 
+/* load_environ --- populate the ENVIRON array */
+
 static NODE *
 load_environ()
 {

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

Summary of changes:
 ChangeLog     |   10 ++++++++++
 awkgram.y     |   10 +++++++---
 doc/ChangeLog |    4 ++++
 doc/gawk.texi |   11 ++++++-----
 io.c          |    2 +-
 main.c        |    6 ++++--
 6 files changed, 32 insertions(+), 11 deletions(-)


hooks/post-receive
-- 
gawk



reply via email to

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