gawk-diffs
[Top][All Lists]
Advanced

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

[gawk-diffs] [SCM] gawk branch, master, updated. 5f7dd5191cd5973d69de1f6


From: Arnold Robbins
Subject: [gawk-diffs] [SCM] gawk branch, master, updated. 5f7dd5191cd5973d69de1f6860d775802bc896e6
Date: Fri, 29 Apr 2011 09:16:06 +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, master has been updated
       via  5f7dd5191cd5973d69de1f6860d775802bc896e6 (commit)
       via  d20b91c334edaf177af02be433511be6afe46546 (commit)
      from  95155e4fa75ef9b29a1f2aab330f4558aa9d5383 (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=5f7dd5191cd5973d69de1f6860d775802bc896e6

commit 5f7dd5191cd5973d69de1f6860d775802bc896e6
Author: Arnold D. Robbins <address@hidden>
Date:   Fri Apr 29 12:15:49 2011 +0300

    Bug fix in io.c, minor doc update.

diff --git a/ChangeLog b/ChangeLog
index 3c36040..7ea33c2 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+Fri Apr 29 12:13:32 2011  Arnold D. Robbins  <address@hidden>
+
+       * io.c (inetfile): Change ifdef to ifndef for have getaddrinfo.
+       Ooops.
+
 Fri Apr 29 11:49:38 2011  Arnold D. Robbins  <address@hidden>
 
        Per Pat Rankin, remove code related to GFMT_WORKAROUND and VAXCRTL.
diff --git a/NEWS b/NEWS
index 64bada9..5202f10 100644
--- a/NEWS
+++ b/NEWS
@@ -92,6 +92,7 @@ Changes from 3.1.8 to 4.0.0
        - NeXT
        - SunOS 3.x, Sun 386 (Road Runner)
        - Tandem (non-POSIX)
+       - Prestandard VAX C compiler for VAX/VMS
        - Probably others that I've forgotten
 
 29. If PROCINFO["sorted_in"] exists, for(iggy in foo) loops sort the
@@ -101,3 +102,6 @@ Changes from 3.1.8 to 4.0.0
 
 30. A new isarray() function exists to distinguish if an item is an array
     or not, to make it possible to traverse multidimensional arrays.
+
+31. asort() and asorti() take a third argument specifying how to sort.
+    See the doc.
diff --git a/io.c b/io.c
index b545968..6fc921c 100644
--- a/io.c
+++ b/io.c
@@ -3275,7 +3275,7 @@ inetfile(const char *str, int *length, int *family)
                        *length = 7;
                if (family != NULL)
                        *family = AF_INET6;
-#ifdef HAVE_GETADDRINFO
+#ifndef HAVE_GETADDRINFO
                fatal(_("IPv6 communication is not supported"));
 #endif
        }

http://git.sv.gnu.org/cgit/gawk.git/commit/?id=d20b91c334edaf177af02be433511be6afe46546

commit d20b91c334edaf177af02be433511be6afe46546
Author: Arnold D. Robbins <address@hidden>
Date:   Fri Apr 29 11:54:02 2011 +0300

    Remove VAXCRTL and GFMT_WORKAROUND. Yay!

diff --git a/ChangeLog b/ChangeLog
index a6a3c3b..3c36040 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,11 @@
+Fri Apr 29 11:49:38 2011  Arnold D. Robbins  <address@hidden>
+
+       Per Pat Rankin, remove code related to GFMT_WORKAROUND and VAXCRTL.
+
+       * builtin.c (sgfmt): Nuked.
+       (format_tree): Removed code related to GFMT_WORKAROUND and VAXCRTL.
+       * node.c (format_val): Revise comment.
+
 Fri Apr 29 11:33:08 2011  Arnold D. Robbins  <address@hidden>
 
        * awk.h (NUMIND): New flag, indicates numeric value of an
diff --git a/builtin.c b/builtin.c
index 322672c..724ea6d 100644
--- a/builtin.c
+++ b/builtin.c
@@ -57,11 +57,6 @@
 
 #define DEFAULT_G_PRECISION 6
 
-#ifdef GFMT_WORKAROUND
-/* semi-temporary hack, mostly to gracefully handle VMS */
-static void sgfmt(char *buf, const char *format, int alt,
-                    int fwidth, int precision, double value);
-#endif /* GFMT_WORKAROUND */
 static size_t mbc_byte_count(const char *ptr, size_t numchars);
 static size_t mbc_char_count(const char *ptr, size_t numbytes);
 
@@ -1292,13 +1287,6 @@ out2:
                        if (! have_prec)
                                prec = DEFAULT_G_PRECISION;
                        chksize(fw + prec + 9); /* 9 == slop */
-#ifdef VAXCRTL
-                       /* pre-ANSI library doesn't handle '0' flag
-                          correctly in many cases; reject it */
-                       if (zero_flag
-                           && (lj || (signchar && signchar != '+')))
-                               zero_flag = FALSE;
-#endif
                        cp = cpbuf;
                        *cp++ = '%';
                        if (lj)
@@ -1315,7 +1303,6 @@ out2:
                        cp += 3;
                        *cp++ = cs1;
                        *cp = '\0';
-#ifndef GFMT_WORKAROUND
 #if defined(LC_NUMERIC)
                        if (quote_flag && ! use_lc_numeric)
                                setlocale(LC_NUMERIC, "");
@@ -1331,18 +1318,6 @@ out2:
                        if (quote_flag && ! use_lc_numeric)
                                setlocale(LC_NUMERIC, "C");
 #endif
-#else  /* GFMT_WORKAROUND */
-                       if (cs1 == 'g' || cs1 == 'G')
-                               sgfmt(obufout, cpbuf, (int) alt,
-                                      (int) fw, (int) prec, (double) tmpval);
-                       else {
-                               int n;
-                               while ((n = snprintf(obufout, ofre, cpbuf,
-                                                    (int) fw, (int) prec,
-                                                    (double) tmpval)) >= ofre)
-                                       chksize(n)
-                       }
-#endif /* GFMT_WORKAROUND */
                        len = strlen(obufout);
                        ofre -= len;
                        obufout += len;
@@ -2757,84 +2732,6 @@ set_how_many:
        return target;
 }
 
-
-#ifdef GFMT_WORKAROUND
-/*
- * printf's %g format [can't rely on gcvt()]
- *     caveat: don't use as argument to *printf()!
- * 'format' string HAS to be of "<flags>*.*g" kind, or we bomb!
- */
-static void
-sgfmt(char *buf,       /* return buffer; assumed big enough to hold result */
-       const char *format,
-       int alt,        /* use alternate form flag */
-       int fwidth,     /* field width in a format */
-       int prec,       /* indicates desired significant digits, not decimal 
places */
-       double g)       /* value to format */
-{
-       char dform[40];
-       char *gpos;
-       char *d, *e, *p;
-       int again = FALSE;
-
-       strncpy(dform, format, sizeof dform - 1);
-       dform[sizeof dform - 1] = '\0';
-       gpos = strrchr(dform, '.');
-
-       if (g == 0.0 && ! alt) {        /* easy special case */
-               *gpos++ = 'd';
-               *gpos = '\0';
-               (void) sprintf(buf, dform, fwidth, 0);
-               return;
-       }
-
-       /* advance to location of 'g' in the format */
-       while (*gpos && *gpos != 'g' && *gpos != 'G')
-               gpos++;
-
-       if (prec <= 0)        /* negative precision is ignored */
-               prec = (prec < 0 ?  DEFAULT_G_PRECISION : 1);
-
-       if (*gpos == 'G')
-               again = TRUE;
-       /* start with 'e' format (it'll provide nice exponent) */
-       *gpos = 'e';
-       prec--;
-       (void) sprintf(buf, dform, fwidth, prec, g);
-       if ((e = strrchr(buf, 'e')) != NULL) {  /* find exponent  */
-               int expn = atoi(e+1);           /* fetch exponent */
-               if (expn >= -4 && expn <= prec) {       /* per K&R2, B1.2 */
-                       /* switch to 'f' format and re-do */
-                       *gpos = 'f';
-                       prec -= expn;           /* decimal precision */
-                       (void) sprintf(buf, dform, fwidth, prec, g);
-                       e = buf + strlen(buf);
-                       while (*--e == ' ')
-                               continue;
-                       e++;
-               }
-               else if (again)
-                       *gpos = 'E';
-
-               /* if 'alt' in force, then trailing zeros are not removed */
-               if (! alt && (d = strrchr(buf, '.')) != NULL) {
-                       /* throw away an excess of precision */
-                       for (p = e; p > d && *--p == '0'; )
-                               prec--;
-                       if (d == p)
-                               prec--;
-                       if (prec < 0)
-                               prec = 0;
-                       /* and do that once again */
-                       again = TRUE;
-               }
-               if (again)
-                       (void) sprintf(buf, dform, fwidth, prec, g);
-       }
-}
-#endif /* GFMT_WORKAROUND */
-
-
 /* make_integer - Convert an integer to a number node.  */
 
 static NODE *
diff --git a/node.c b/node.c
index 24d2ca2..f8291ae 100644
--- a/node.c
+++ b/node.c
@@ -200,8 +200,7 @@ format_val(const char *format, int index, NODE *s)
        if ((val = double_to_int(s->numbr)) != s->numbr
            || val <= LONG_MIN || val >= LONG_MAX) {
                /*
-                * Once upon a time, if GFMT_WORKAROUND wasn't defined,
-                * we just blindly did this:
+                * Once upon a time, we just blindly did this:
                 *      sprintf(sp, format, s->numbr);
                 *      s->stlen = strlen(sp);
                 *      s->stfmt = (char) index;

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

Summary of changes:
 ChangeLog |   13 ++++++++
 NEWS      |    4 ++
 builtin.c |  103 -------------------------------------------------------------
 io.c      |    2 +-
 node.c    |    3 +-
 5 files changed, 19 insertions(+), 106 deletions(-)


hooks/post-receive
-- 
gawk



reply via email to

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