[Top][All Lists]

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

[gawk-diffs] [SCM] gawk branch, gawk-4.1-stable, updated. gawk-4.1.0-20-

From: Arnold Robbins
Subject: [gawk-diffs] [SCM] gawk branch, gawk-4.1-stable, updated. gawk-4.1.0-20-g407dddb
Date: Wed, 29 May 2013 19:16:12 +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, gawk-4.1-stable has been updated
       via  407dddb6e9b24c2ca139ec84f8e3f541fbb18451 (commit)
       via  acd80efad346d9d7dbed9aa3380d8f77eda0ed56 (commit)
      from  c974d36e7386c93f809be67cba108df71d267f45 (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 -----------------------------------------------------------------

commit 407dddb6e9b24c2ca139ec84f8e3f541fbb18451
Author: Arnold D. Robbins <address@hidden>
Date:   Wed May 29 22:15:50 2013 +0300

    Add "devbsize" to stat extension and doc.

diff --git a/doc/ChangeLog b/doc/ChangeLog
index 34cf415..fc2a135 100644
--- a/doc/ChangeLog
+++ b/doc/ChangeLog
@@ -1,3 +1,8 @@
+2013-05-29         Arnold D. Robbins     <address@hidden>
+       * (Internal File Description): Add "devbsize" element
+       to stat data array.
 2013-05-27         Arnold D. Robbins     <address@hidden>
        * Sample filefuncs.c extension code: Change test from
diff --git a/doc/ b/doc/
index a18ac42..bc40739 100644
--- a/doc/
+++ b/doc/
@@ -23659,6 +23659,14 @@ appropriate information:
           The file is a symbolic link.
+     The size of a block for the element indexed by `"blocks"'.  This
+     information is derived from either the `DEV_BSIZE' constant
+     defined in `<sys/param.h>' on most systems, or the `S_BLKSIZE'
+     constant in `<sys/stat.h>' on BSD systems.  For some other
+     systems, "a priori" knowledge is used to provide a value. Where no
+     value can be determined, it defaults to 512.
    Several additional elements may be present depending upon the
 operating system and the type of the file.  You can test for them in
 your `awk' program by using the `in' operator (*note Reference to
@@ -32493,90 +32501,90 @@ Node: Extension API Boilerplate947271
 Node: Finding Extensions951075
 Node: Extension Example951635
 Node: Internal File Description952366
-Node: Internal File Ops956054
-Ref: Internal File Ops-Footnote-1967562
-Node: Using Internal File Ops967702
-Ref: Using Internal File Ops-Footnote-1970055
-Node: Extension Samples970321
-Node: Extension Sample File Functions971845
-Node: Extension Sample Fnmatch980332
-Node: Extension Sample Fork982058
-Node: Extension Sample Inplace983276
-Node: Extension Sample Ord985054
-Node: Extension Sample Readdir985890
-Node: Extension Sample Revout987422
-Node: Extension Sample Rev2way988015
-Node: Extension Sample Read write array988705
-Node: Extension Sample Readfile990588
-Node: Extension Sample API Tests991406
-Node: Extension Sample Time991931
-Node: gawkextlib993295
-Node: Language History996055
-Node: V7/SVR3.1997577
-Node: SVR4999898
-Node: POSIX1001340
-Node: BTL1002726
-Node: POSIX/GNU1003460
-Node: Common Extensions1008995
-Node: Ranges and Locales1010301
-Ref: Ranges and Locales-Footnote-11014919
-Ref: Ranges and Locales-Footnote-21014946
-Ref: Ranges and Locales-Footnote-31015206
-Node: Contributors1015427
-Node: Installation1020306
-Node: Gawk Distribution1021200
-Node: Getting1021684
-Node: Extracting1022510
-Node: Distribution contents1024202
-Node: Unix Installation1029463
-Node: Quick Installation1030080
-Node: Additional Configuration Options1032524
-Node: Configuration Philosophy1034001
-Node: Non-Unix Installation1036355
-Node: PC Installation1036813
-Node: PC Binary Installation1038112
-Node: PC Compiling1039960
-Node: PC Testing1042904
-Node: PC Using1044080
-Node: Cygwin1048265
-Node: MSYS1049265
-Node: VMS Installation1049779
-Node: VMS Compilation1050382
-Ref: VMS Compilation-Footnote-11051389
-Node: VMS Installation Details1051447
-Node: VMS Running1053082
-Node: VMS Old Gawk1054689
-Node: Bugs1055163
-Node: Other Versions1059015
-Node: Notes1064616
-Node: Compatibility Mode1065416
-Node: Additions1066199
-Node: Accessing The Source1067126
-Node: Adding Code1068566
-Node: New Ports1074611
-Node: Derived Files1078746
-Ref: Derived Files-Footnote-11084067
-Ref: Derived Files-Footnote-21084101
-Ref: Derived Files-Footnote-31084701
-Node: Future Extensions1084799
-Node: Implementation Limitations1085380
-Node: Extension Design1086632
-Node: Old Extension Problems1087786
-Ref: Old Extension Problems-Footnote-11089294
-Node: Extension New Mechanism Goals1089351
-Ref: Extension New Mechanism Goals-Footnote-11092717
-Node: Extension Other Design Decisions1092903
-Node: Extension Future Growth1095009
-Node: Old Extension Mechanism1095845
-Node: Basic Concepts1097585
-Node: Basic High Level1098266
-Ref: figure-general-flow1098537
-Ref: figure-process-flow1099136
-Ref: Basic High Level-Footnote-11102365
-Node: Basic Data Typing1102550
-Node: Glossary1105905
-Node: Copying1131367
-Node: GNU Free Documentation License1168924
-Node: Index1194061
+Node: Internal File Ops956457
+Ref: Internal File Ops-Footnote-1967965
+Node: Using Internal File Ops968105
+Ref: Using Internal File Ops-Footnote-1970458
+Node: Extension Samples970724
+Node: Extension Sample File Functions972248
+Node: Extension Sample Fnmatch980735
+Node: Extension Sample Fork982461
+Node: Extension Sample Inplace983679
+Node: Extension Sample Ord985457
+Node: Extension Sample Readdir986293
+Node: Extension Sample Revout987825
+Node: Extension Sample Rev2way988418
+Node: Extension Sample Read write array989108
+Node: Extension Sample Readfile990991
+Node: Extension Sample API Tests991809
+Node: Extension Sample Time992334
+Node: gawkextlib993698
+Node: Language History996458
+Node: V7/SVR3.1997980
+Node: SVR41000301
+Node: POSIX1001743
+Node: BTL1003129
+Node: POSIX/GNU1003863
+Node: Common Extensions1009398
+Node: Ranges and Locales1010704
+Ref: Ranges and Locales-Footnote-11015322
+Ref: Ranges and Locales-Footnote-21015349
+Ref: Ranges and Locales-Footnote-31015609
+Node: Contributors1015830
+Node: Installation1020709
+Node: Gawk Distribution1021603
+Node: Getting1022087
+Node: Extracting1022913
+Node: Distribution contents1024605
+Node: Unix Installation1029866
+Node: Quick Installation1030483
+Node: Additional Configuration Options1032927
+Node: Configuration Philosophy1034404
+Node: Non-Unix Installation1036758
+Node: PC Installation1037216
+Node: PC Binary Installation1038515
+Node: PC Compiling1040363
+Node: PC Testing1043307
+Node: PC Using1044483
+Node: Cygwin1048668
+Node: MSYS1049668
+Node: VMS Installation1050182
+Node: VMS Compilation1050785
+Ref: VMS Compilation-Footnote-11051792
+Node: VMS Installation Details1051850
+Node: VMS Running1053485
+Node: VMS Old Gawk1055092
+Node: Bugs1055566
+Node: Other Versions1059418
+Node: Notes1065019
+Node: Compatibility Mode1065819
+Node: Additions1066602
+Node: Accessing The Source1067529
+Node: Adding Code1068969
+Node: New Ports1075014
+Node: Derived Files1079149
+Ref: Derived Files-Footnote-11084470
+Ref: Derived Files-Footnote-21084504
+Ref: Derived Files-Footnote-31085104
+Node: Future Extensions1085202
+Node: Implementation Limitations1085783
+Node: Extension Design1087035
+Node: Old Extension Problems1088189
+Ref: Old Extension Problems-Footnote-11089697
+Node: Extension New Mechanism Goals1089754
+Ref: Extension New Mechanism Goals-Footnote-11093120
+Node: Extension Other Design Decisions1093306
+Node: Extension Future Growth1095412
+Node: Old Extension Mechanism1096248
+Node: Basic Concepts1097988
+Node: Basic High Level1098669
+Ref: figure-general-flow1098940
+Ref: figure-process-flow1099539
+Ref: Basic High Level-Footnote-11102768
+Node: Basic Data Typing1102953
+Node: Glossary1106308
+Node: Copying1131770
+Node: GNU Free Documentation License1169327
+Node: Index1194464
 End Tag Table
diff --git a/doc/gawk.texi b/doc/gawk.texi
index b6c7254..240669c 100644
--- a/doc/gawk.texi
+++ b/doc/gawk.texi
@@ -31597,6 +31597,15 @@ filesystem.
 @item "symlink"
 The file is a symbolic link.
 @end table
address@hidden 5/2013: Thanks to Corinna Vinschen for this information.
address@hidden "devbsize"
+The size of a block for the element indexed by @code{"blocks"}.
+This information is derived from either the @code{DEV_BSIZE}
+constant defined in @code{<sys/param.h>} on most systems,
+or the @code{S_BLKSIZE} constant in @code{<sys/stat.h>} on BSD systems.
+For some other systems, @dfn{a priori} knowledge is used to provide
+a value. Where no value can be determined, it defaults to 512.
 @end table
 Several additional elements may be present depending upon the operating
diff --git a/doc/ b/doc/
index f2bc9c2..d035699 100644
--- a/doc/
+++ b/doc/
@@ -30746,6 +30746,15 @@ filesystem.
 @item "symlink"
 The file is a symbolic link.
 @end table
address@hidden 5/2013: Thanks to Corinna Vinschen for this information.
address@hidden "devbsize"
+The size of a block for the element indexed by @code{"blocks"}.
+This information is derived from either the @code{DEV_BSIZE}
+constant defined in @code{<sys/param.h>} on most systems,
+or the @code{S_BLKSIZE} constant in @code{<sys/stat.h>} on BSD systems.
+For some other systems, @dfn{a priori} knowledge is used to provide
+a value. Where no value can be determined, it defaults to 512.
 @end table
 Several additional elements may be present depending upon the operating
diff --git a/extension/ChangeLog b/extension/ChangeLog
index 4d2d69b..02b426e 100644
--- a/extension/ChangeLog
+++ b/extension/ChangeLog
@@ -1,3 +1,10 @@
+2013-05-29         Arnold D. Robbins     <address@hidden>
+       * Add <sys/param.h> header check.
+       * filefuncs.c: Include <sys/param.h> if there.
+       (device_blocksize): New function.
+       (fill_stat_array): Call it.
 2013-05-27         Arnold D. Robbins     <address@hidden>
        * (AC_STRUCT_ST_BLKSIZE): Replaced with call to
diff --git a/extension/ b/extension/
index ac8ad05..8da6930 100644
--- a/extension/
+++ b/extension/
@@ -90,6 +90,9 @@
 /* Define to 1 if `st_blksize' is a member of `struct stat'. */
+/* Define to 1 if you have the <sys/param.h> header file. */
 /* Define to 1 if you have the <sys/select.h> header file. */
diff --git a/extension/configure b/extension/configure
index 26cde4b..1adb8dd 100755
--- a/extension/configure
+++ b/extension/configure
@@ -13952,7 +13952,7 @@ else
 $as_echo "no" >&6; }
-for ac_header in dirent.h fnmatch.h time.h sys/time.h sys/select.h
+for ac_header in dirent.h fnmatch.h time.h sys/time.h sys/select.h sys/param.h
 do :
   as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
 ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" 
diff --git a/extension/ b/extension/
index 8274286..f5b03e0 100644
--- a/extension/
+++ b/extension/
@@ -66,7 +66,7 @@ else
-AC_CHECK_HEADERS(dirent.h fnmatch.h time.h sys/time.h sys/select.h)
+AC_CHECK_HEADERS(dirent.h fnmatch.h time.h sys/time.h sys/select.h sys/param.h)
 AC_CHECK_FUNCS(fdopendir fnmatch gettimeofday \
                getdtablesize nanosleep select GetSystemTimeAsFileTime)
diff --git a/extension/filefuncs.c b/extension/filefuncs.c
index 9d4b225..0afed05 100644
--- a/extension/filefuncs.c
+++ b/extension/filefuncs.c
@@ -45,6 +45,9 @@
 #include <sys/types.h>
 #include <sys/stat.h>
+#include <sys/param.h>
+#endif /* HAVE_SYS_PARAM_H */
 #include "gawkapi.h"
@@ -265,6 +268,31 @@ read_symlink(const char *fname, size_t bufsize, ssize_t 
        return NULL;
+/* device_blocksize --- try to figure out units of st_blocks */
+static int
+       /* some of this derived from GNULIB stat-size.h */
+#if defined(DEV_BSIZE)
+       /* <sys/param.h>, most systems */
+       return DEV_BSIZE;
+#elif defined(S_BLKSIZE)
+       /* <sys/stat.h>, BSD systems */
+       return S_BLKSIZE;
+#elif defined hpux || defined __hpux__ || defined __hpux
+       return 1024;
+#elif defined _AIX && defined _I386
+       /* AIX PS/2 counts st_blocks in 4K units.  */
+       return 4 * 1024;
+#elif defined __MINGW32__
+       return 1024;
+       return 512;
 /* array_set --- set an array element */
 static void
@@ -357,6 +385,9 @@ fill_stat_array(const char *name, awk_array_t array, struct 
stat *sbuf)
        array_set_numeric(array, "blksize", 4096);
+       /* the size of a block for st_blocks */
+       array_set_numeric(array, "devbsize", device_blocksize());
        pmode = format_mode(sbuf->st_mode);
        array_set(array, "pmode", make_const_string(pmode, strlen(pmode), & 

commit acd80efad346d9d7dbed9aa3380d8f77eda0ed56
Author: Arnold D. Robbins <address@hidden>
Date:   Wed May 29 22:15:20 2013 +0300

    Additional fix in profile.c.

diff --git a/ChangeLog b/ChangeLog
index c7aa451..223c798 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -4,7 +4,8 @@
        (is_binary): Change return type to bool.
        (is_scalar): New function.
        (pp_concat): New function to handle concatenation operator better.
-       (pprint): Call it at case Op_concat.
+       (pprint): Call it at case Op_concat. Fix Op_K_delete if multiple
+       indexes to separate with "][".
        General: Add leading comments as needed.
 2013-05-28         Arnold D. Robbins     <address@hidden>
diff --git a/profile.c b/profile.c
index 095de09..d3a93db 100644
--- a/profile.c
+++ b/profile.c
@@ -443,7 +443,7 @@ cleanup:
                        array = t1->pp_str;
                        if (pc->expr_count > 0) {
                                char *sub;
-                               sub = pp_list(pc->expr_count, NULL, ", ");
+                               sub = pp_list(pc->expr_count, NULL, 
pc->expr_count > 1 ? "][" : ", ");
                                fprintf(prof_fp, "%s %s[%s]", 
op2str(Op_K_delete), array, sub);
                        } else                          


Summary of changes:
 ChangeLog              |    3 +-
 doc/ChangeLog          |    5 ++
 doc/          |  178 +++++++++++++++++++++++++-----------------------
 doc/gawk.texi          |    9 +++
 doc/        |    9 +++
 extension/ChangeLog    |    7 ++
 extension/   |    3 +
 extension/configure    |    2 +-
 extension/ |    2 +-
 extension/filefuncs.c  |   31 ++++++++
 profile.c              |    2 +-
 11 files changed, 162 insertions(+), 89 deletions(-)


reply via email to

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