gawk-diffs
[Top][All Lists]
Advanced

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

[gawk-diffs] [SCM] gawk branch, extgawk, updated. 29f456563c740cb79f7668


From: Arnold Robbins
Subject: [gawk-diffs] [SCM] gawk branch, extgawk, updated. 29f456563c740cb79f7668bc3dc282aac6a92de1
Date: Sun, 20 May 2012 19:28: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, extgawk has been updated
       via  29f456563c740cb79f7668bc3dc282aac6a92de1 (commit)
       via  37496c4be6c14569528c6ea83cbbb257d1130324 (commit)
       via  cd9fdf221c0504639a38e773c3d56a32ae80e2cc (commit)
      from  ab670cb99e104c3718c4c6b343d236898e057634 (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=29f456563c740cb79f7668bc3dc282aac6a92de1

commit 29f456563c740cb79f7668bc3dc282aac6a92de1
Author: Arnold D. Robbins <address@hidden>
Date:   Sun May 20 22:27:56 2012 +0300

    Build infrastructure updated.

diff --git a/Makefile.in b/Makefile.in
index 7420d3b..f20c61f 100644
--- a/Makefile.in
+++ b/Makefile.in
@@ -89,9 +89,9 @@ am__aclocal_m4_deps = $(top_srcdir)/m4/arch.m4 \
        $(top_srcdir)/m4/lib-ld.m4 $(top_srcdir)/m4/lib-link.m4 \
        $(top_srcdir)/m4/lib-prefix.m4 $(top_srcdir)/m4/libsigsegv.m4 \
        $(top_srcdir)/m4/libtool.m4 $(top_srcdir)/m4/longlong.m4 \
-       $(top_srcdir)/m4/mpfr.m4 $(top_srcdir)/m4/ltoptions.m4 \
-       $(top_srcdir)/m4/ltsugar.m4 $(top_srcdir)/m4/ltversion.m4 \
-       $(top_srcdir)/m4/lt~obsolete.m4 $(top_srcdir)/m4/nls.m4 \
+       $(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \
+       $(top_srcdir)/m4/ltversion.m4 $(top_srcdir)/m4/lt~obsolete.m4 \
+       $(top_srcdir)/m4/mpfr.m4 $(top_srcdir)/m4/nls.m4 \
        $(top_srcdir)/m4/noreturn.m4 $(top_srcdir)/m4/po.m4 \
        $(top_srcdir)/m4/progtest.m4 $(top_srcdir)/m4/readline.m4 \
        $(top_srcdir)/m4/socket.m4 $(top_srcdir)/m4/ulonglong.m4 \
diff --git a/aclocal.m4 b/aclocal.m4
index 59ce5b2..ad6d922 100644
--- a/aclocal.m4
+++ b/aclocal.m4
@@ -997,11 +997,11 @@ m4_include([m4/lib-prefix.m4])
 m4_include([m4/libsigsegv.m4])
 m4_include([m4/libtool.m4])
 m4_include([m4/longlong.m4])
-m4_include([m4/mpfr.m4])
 m4_include([m4/ltoptions.m4])
 m4_include([m4/ltsugar.m4])
 m4_include([m4/ltversion.m4])
 m4_include([m4/lt~obsolete.m4])
+m4_include([m4/mpfr.m4])
 m4_include([m4/nls.m4])
 m4_include([m4/noreturn.m4])
 m4_include([m4/po.m4])
diff --git a/awklib/Makefile.in b/awklib/Makefile.in
index 0ac79af..2c421b3 100644
--- a/awklib/Makefile.in
+++ b/awklib/Makefile.in
@@ -85,9 +85,9 @@ am__aclocal_m4_deps = $(top_srcdir)/m4/arch.m4 \
        $(top_srcdir)/m4/lib-ld.m4 $(top_srcdir)/m4/lib-link.m4 \
        $(top_srcdir)/m4/lib-prefix.m4 $(top_srcdir)/m4/libsigsegv.m4 \
        $(top_srcdir)/m4/libtool.m4 $(top_srcdir)/m4/longlong.m4 \
-       $(top_srcdir)/m4/mpfr.m4 $(top_srcdir)/m4/ltoptions.m4 \
-       $(top_srcdir)/m4/ltsugar.m4 $(top_srcdir)/m4/ltversion.m4 \
-       $(top_srcdir)/m4/lt~obsolete.m4 $(top_srcdir)/m4/nls.m4 \
+       $(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \
+       $(top_srcdir)/m4/ltversion.m4 $(top_srcdir)/m4/lt~obsolete.m4 \
+       $(top_srcdir)/m4/mpfr.m4 $(top_srcdir)/m4/nls.m4 \
        $(top_srcdir)/m4/noreturn.m4 $(top_srcdir)/m4/po.m4 \
        $(top_srcdir)/m4/progtest.m4 $(top_srcdir)/m4/readline.m4 \
        $(top_srcdir)/m4/socket.m4 $(top_srcdir)/m4/ulonglong.m4 \
diff --git a/configh.in b/configh.in
index b26c1d7..7323e2e 100644
--- a/configh.in
+++ b/configh.in
@@ -321,7 +321,6 @@
 /* systems should define this type here */
 #undef HAVE_WINT_T
 
-
 /* Define to 1 if the system has the type `_Bool'. */
 #undef HAVE__BOOL
 
diff --git a/configure b/configure
index 0f2a12a..25d6b8a 100755
--- a/configure
+++ b/configure
@@ -1426,8 +1426,10 @@ Optional Features:
   --disable-FEATURE       do not include FEATURE (same as --enable-FEATURE=no)
   --enable-FEATURE[=ARG]  include FEATURE [ARG=yes]
   --disable-lint       Disable gawk lint checking
-  --disable-dependency-tracking  speeds up one-time build
-  --enable-dependency-tracking   do not reject slow dependency extractors
+  --enable-dependency-tracking
+                          do not reject slow dependency extractors
+  --disable-dependency-tracking
+                          speeds up one-time build
   --enable-static[=PKGS]  build static libraries [default=no]
   --enable-shared[=PKGS]  build shared libraries [default=yes]
   --enable-fast-install[=PKGS]
@@ -5749,7 +5751,7 @@ do
     for ac_prog in sed gsed; do
     for ac_exec_ext in '' $ac_executable_extensions; do
       ac_path_SED="$as_dir/$ac_prog$ac_exec_ext"
-      { test -f "$ac_path_SED" && $as_test_x "$ac_path_SED"; } || continue
+      as_fn_executable_p "$ac_path_SED" || continue
 # Check for GNU ac_path_SED and select it if it is found.
   # Check for GNU $ac_path_SED
 case `"$ac_path_SED" --version 2>&1` in
@@ -5828,7 +5830,7 @@ do
     for ac_prog in fgrep; do
     for ac_exec_ext in '' $ac_executable_extensions; do
       ac_path_FGREP="$as_dir/$ac_prog$ac_exec_ext"
-      { test -f "$ac_path_FGREP" && $as_test_x "$ac_path_FGREP"; } || continue
+      as_fn_executable_p "$ac_path_FGREP" || continue
 # Check for GNU ac_path_FGREP and select it if it is found.
   # Check for GNU $ac_path_FGREP
 case `"$ac_path_FGREP" --version 2>&1` in
@@ -6084,7 +6086,7 @@ do
   IFS=$as_save_IFS
   test -z "$as_dir" && as_dir=.
     for ac_exec_ext in '' $ac_executable_extensions; do
-  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x 
"$as_dir/$ac_word$ac_exec_ext"; }; then
+  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
     ac_cv_prog_DUMPBIN="$ac_tool_prefix$ac_prog"
     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" 
>&5
     break 2
@@ -6128,7 +6130,7 @@ do
   IFS=$as_save_IFS
   test -z "$as_dir" && as_dir=.
     for ac_exec_ext in '' $ac_executable_extensions; do
-  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x 
"$as_dir/$ac_word$ac_exec_ext"; }; then
+  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
     ac_cv_prog_ac_ct_DUMPBIN="$ac_prog"
     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" 
>&5
     break 2
@@ -6541,7 +6543,7 @@ do
   IFS=$as_save_IFS
   test -z "$as_dir" && as_dir=.
     for ac_exec_ext in '' $ac_executable_extensions; do
-  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x 
"$as_dir/$ac_word$ac_exec_ext"; }; then
+  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
     ac_cv_prog_OBJDUMP="${ac_tool_prefix}objdump"
     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" 
>&5
     break 2
@@ -6581,7 +6583,7 @@ do
   IFS=$as_save_IFS
   test -z "$as_dir" && as_dir=.
     for ac_exec_ext in '' $ac_executable_extensions; do
-  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x 
"$as_dir/$ac_word$ac_exec_ext"; }; then
+  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
     ac_cv_prog_ac_ct_OBJDUMP="objdump"
     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" 
>&5
     break 2
@@ -6887,7 +6889,7 @@ do
   IFS=$as_save_IFS
   test -z "$as_dir" && as_dir=.
     for ac_exec_ext in '' $ac_executable_extensions; do
-  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x 
"$as_dir/$ac_word$ac_exec_ext"; }; then
+  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
     ac_cv_prog_DLLTOOL="${ac_tool_prefix}dlltool"
     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" 
>&5
     break 2
@@ -6927,7 +6929,7 @@ do
   IFS=$as_save_IFS
   test -z "$as_dir" && as_dir=.
     for ac_exec_ext in '' $ac_executable_extensions; do
-  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x 
"$as_dir/$ac_word$ac_exec_ext"; }; then
+  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
     ac_cv_prog_ac_ct_DLLTOOL="dlltool"
     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" 
>&5
     break 2
@@ -7030,7 +7032,7 @@ do
   IFS=$as_save_IFS
   test -z "$as_dir" && as_dir=.
     for ac_exec_ext in '' $ac_executable_extensions; do
-  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x 
"$as_dir/$ac_word$ac_exec_ext"; }; then
+  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
     ac_cv_prog_AR="$ac_tool_prefix$ac_prog"
     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" 
>&5
     break 2
@@ -7074,7 +7076,7 @@ do
   IFS=$as_save_IFS
   test -z "$as_dir" && as_dir=.
     for ac_exec_ext in '' $ac_executable_extensions; do
-  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x 
"$as_dir/$ac_word$ac_exec_ext"; }; then
+  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
     ac_cv_prog_ac_ct_AR="$ac_prog"
     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" 
>&5
     break 2
@@ -7199,7 +7201,7 @@ do
   IFS=$as_save_IFS
   test -z "$as_dir" && as_dir=.
     for ac_exec_ext in '' $ac_executable_extensions; do
-  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x 
"$as_dir/$ac_word$ac_exec_ext"; }; then
+  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
     ac_cv_prog_STRIP="${ac_tool_prefix}strip"
     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" 
>&5
     break 2
@@ -7239,7 +7241,7 @@ do
   IFS=$as_save_IFS
   test -z "$as_dir" && as_dir=.
     for ac_exec_ext in '' $ac_executable_extensions; do
-  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x 
"$as_dir/$ac_word$ac_exec_ext"; }; then
+  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
     ac_cv_prog_ac_ct_STRIP="strip"
     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" 
>&5
     break 2
@@ -7298,7 +7300,7 @@ do
   IFS=$as_save_IFS
   test -z "$as_dir" && as_dir=.
     for ac_exec_ext in '' $ac_executable_extensions; do
-  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x 
"$as_dir/$ac_word$ac_exec_ext"; }; then
+  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
     ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" 
>&5
     break 2
@@ -7338,7 +7340,7 @@ do
   IFS=$as_save_IFS
   test -z "$as_dir" && as_dir=.
     for ac_exec_ext in '' $ac_executable_extensions; do
-  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x 
"$as_dir/$ac_word$ac_exec_ext"; }; then
+  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
     ac_cv_prog_ac_ct_RANLIB="ranlib"
     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" 
>&5
     break 2
@@ -7987,7 +7989,7 @@ do
   IFS=$as_save_IFS
   test -z "$as_dir" && as_dir=.
     for ac_exec_ext in '' $ac_executable_extensions; do
-  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x 
"$as_dir/$ac_word$ac_exec_ext"; }; then
+  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
     ac_cv_prog_MANIFEST_TOOL="${ac_tool_prefix}mt"
     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" 
>&5
     break 2
@@ -8027,7 +8029,7 @@ do
   IFS=$as_save_IFS
   test -z "$as_dir" && as_dir=.
     for ac_exec_ext in '' $ac_executable_extensions; do
-  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x 
"$as_dir/$ac_word$ac_exec_ext"; }; then
+  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
     ac_cv_prog_ac_ct_MANIFEST_TOOL="mt"
     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" 
>&5
     break 2
@@ -8107,7 +8109,7 @@ do
   IFS=$as_save_IFS
   test -z "$as_dir" && as_dir=.
     for ac_exec_ext in '' $ac_executable_extensions; do
-  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x 
"$as_dir/$ac_word$ac_exec_ext"; }; then
+  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
     ac_cv_prog_DSYMUTIL="${ac_tool_prefix}dsymutil"
     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" 
>&5
     break 2
@@ -8147,7 +8149,7 @@ do
   IFS=$as_save_IFS
   test -z "$as_dir" && as_dir=.
     for ac_exec_ext in '' $ac_executable_extensions; do
-  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x 
"$as_dir/$ac_word$ac_exec_ext"; }; then
+  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
     ac_cv_prog_ac_ct_DSYMUTIL="dsymutil"
     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" 
>&5
     break 2
@@ -8199,7 +8201,7 @@ do
   IFS=$as_save_IFS
   test -z "$as_dir" && as_dir=.
     for ac_exec_ext in '' $ac_executable_extensions; do
-  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x 
"$as_dir/$ac_word$ac_exec_ext"; }; then
+  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
     ac_cv_prog_NMEDIT="${ac_tool_prefix}nmedit"
     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" 
>&5
     break 2
@@ -8239,7 +8241,7 @@ do
   IFS=$as_save_IFS
   test -z "$as_dir" && as_dir=.
     for ac_exec_ext in '' $ac_executable_extensions; do
-  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x 
"$as_dir/$ac_word$ac_exec_ext"; }; then
+  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
     ac_cv_prog_ac_ct_NMEDIT="nmedit"
     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" 
>&5
     break 2
@@ -8291,7 +8293,7 @@ do
   IFS=$as_save_IFS
   test -z "$as_dir" && as_dir=.
     for ac_exec_ext in '' $ac_executable_extensions; do
-  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x 
"$as_dir/$ac_word$ac_exec_ext"; }; then
+  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
     ac_cv_prog_LIPO="${ac_tool_prefix}lipo"
     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" 
>&5
     break 2
@@ -8331,7 +8333,7 @@ do
   IFS=$as_save_IFS
   test -z "$as_dir" && as_dir=.
     for ac_exec_ext in '' $ac_executable_extensions; do
-  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x 
"$as_dir/$ac_word$ac_exec_ext"; }; then
+  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
     ac_cv_prog_ac_ct_LIPO="lipo"
     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" 
>&5
     break 2
@@ -8383,7 +8385,7 @@ do
   IFS=$as_save_IFS
   test -z "$as_dir" && as_dir=.
     for ac_exec_ext in '' $ac_executable_extensions; do
-  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x 
"$as_dir/$ac_word$ac_exec_ext"; }; then
+  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
     ac_cv_prog_OTOOL="${ac_tool_prefix}otool"
     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" 
>&5
     break 2
@@ -8423,7 +8425,7 @@ do
   IFS=$as_save_IFS
   test -z "$as_dir" && as_dir=.
     for ac_exec_ext in '' $ac_executable_extensions; do
-  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x 
"$as_dir/$ac_word$ac_exec_ext"; }; then
+  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
     ac_cv_prog_ac_ct_OTOOL="otool"
     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" 
>&5
     break 2
@@ -8475,7 +8477,7 @@ do
   IFS=$as_save_IFS
   test -z "$as_dir" && as_dir=.
     for ac_exec_ext in '' $ac_executable_extensions; do
-  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x 
"$as_dir/$ac_word$ac_exec_ext"; }; then
+  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
     ac_cv_prog_OTOOL64="${ac_tool_prefix}otool64"
     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" 
>&5
     break 2
@@ -8515,7 +8517,7 @@ do
   IFS=$as_save_IFS
   test -z "$as_dir" && as_dir=.
     for ac_exec_ext in '' $ac_executable_extensions; do
-  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x 
"$as_dir/$ac_word$ac_exec_ext"; }; then
+  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
     ac_cv_prog_ac_ct_OTOOL64="otool64"
     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" 
>&5
     break 2
diff --git a/doc/Makefile.in b/doc/Makefile.in
index 70a498a..15670b9 100644
--- a/doc/Makefile.in
+++ b/doc/Makefile.in
@@ -85,9 +85,9 @@ am__aclocal_m4_deps = $(top_srcdir)/m4/arch.m4 \
        $(top_srcdir)/m4/lib-ld.m4 $(top_srcdir)/m4/lib-link.m4 \
        $(top_srcdir)/m4/lib-prefix.m4 $(top_srcdir)/m4/libsigsegv.m4 \
        $(top_srcdir)/m4/libtool.m4 $(top_srcdir)/m4/longlong.m4 \
-       $(top_srcdir)/m4/mpfr.m4 $(top_srcdir)/m4/ltoptions.m4 \
-       $(top_srcdir)/m4/ltsugar.m4 $(top_srcdir)/m4/ltversion.m4 \
-       $(top_srcdir)/m4/lt~obsolete.m4 $(top_srcdir)/m4/nls.m4 \
+       $(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \
+       $(top_srcdir)/m4/ltversion.m4 $(top_srcdir)/m4/lt~obsolete.m4 \
+       $(top_srcdir)/m4/mpfr.m4 $(top_srcdir)/m4/nls.m4 \
        $(top_srcdir)/m4/noreturn.m4 $(top_srcdir)/m4/po.m4 \
        $(top_srcdir)/m4/progtest.m4 $(top_srcdir)/m4/readline.m4 \
        $(top_srcdir)/m4/socket.m4 $(top_srcdir)/m4/ulonglong.m4 \
diff --git a/extension/Makefile.in b/extension/Makefile.in
index c766d89..72c75b0 100644
--- a/extension/Makefile.in
+++ b/extension/Makefile.in
@@ -85,9 +85,9 @@ am__aclocal_m4_deps = $(top_srcdir)/m4/arch.m4 \
        $(top_srcdir)/m4/lib-ld.m4 $(top_srcdir)/m4/lib-link.m4 \
        $(top_srcdir)/m4/lib-prefix.m4 $(top_srcdir)/m4/libsigsegv.m4 \
        $(top_srcdir)/m4/libtool.m4 $(top_srcdir)/m4/longlong.m4 \
-       $(top_srcdir)/m4/mpfr.m4 $(top_srcdir)/m4/ltoptions.m4 \
-       $(top_srcdir)/m4/ltsugar.m4 $(top_srcdir)/m4/ltversion.m4 \
-       $(top_srcdir)/m4/lt~obsolete.m4 $(top_srcdir)/m4/nls.m4 \
+       $(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \
+       $(top_srcdir)/m4/ltversion.m4 $(top_srcdir)/m4/lt~obsolete.m4 \
+       $(top_srcdir)/m4/mpfr.m4 $(top_srcdir)/m4/nls.m4 \
        $(top_srcdir)/m4/noreturn.m4 $(top_srcdir)/m4/po.m4 \
        $(top_srcdir)/m4/progtest.m4 $(top_srcdir)/m4/readline.m4 \
        $(top_srcdir)/m4/socket.m4 $(top_srcdir)/m4/ulonglong.m4 \
diff --git a/extension/filefuncs2.c b/extension/filefuncs2.c
index 73bea0c..67b1418 100644
--- a/extension/filefuncs2.c
+++ b/extension/filefuncs2.c
@@ -7,7 +7,8 @@
  */
 
 /*
- * Copyright (C) 2001, 2004, 2005, 2010, 2011 the Free Software Foundation, 
Inc.
+ * Copyright (C) 2001, 2004, 2005, 2010, 2011, 2012
+ * the Free Software Foundation, Inc.
  * 
  * This file is part of GAWK, the GNU implementation of the
  * AWK Programming Language.
@@ -54,14 +55,14 @@ do_chdir(int nargs)
        if (do_lint && nargs != 1)
                lintwarn(ext_id, "chdir: called with incorrect number of 
arguments");
 
-       newdir = get_curfunc_param(ext_id, 0, AWK_PARAM_STRING);
+       newdir = get_curfunc_param(0, AWK_PARAM_STRING);
        ret = chdir(newdir->str_value.str);
        if (ret < 0)
-               update_ERRNO_int(ext_id, errno);
+               update_ERRNO_int(errno);
 
        result.val_type = AWK_NUMBER;
        result.num_value = ret;
-       set_return_value(ext_id, & result);
+       set_return_value(& result);
        return 1;
 }
 
@@ -220,10 +221,10 @@ array_set(awk_array_t array, const char *sub, awk_value_t 
*value)
 
        memset(& element, 0, sizeof(element));
 
-       element.index = dup_string(ext_id, sub, strlen(sub))->str_value;
+       element.index = dup_string(sub, strlen(sub))->str_value;
        element.value = *value;
 
-       set_array_element(ext_id, array, & element);
+       set_array_element(array, & element);
 }
 
 /* do_stat --- provide a stat() function for gawk */
@@ -246,8 +247,8 @@ do_stat(int nargs)
        }
 
        /* file is first arg, array to hold results is second */
-       file_param = get_curfunc_param(ext_id, 0, AWK_PARAM_STRING);
-       array_param = get_curfunc_param(ext_id, 0, AWK_PARAM_ARRAY);
+       file_param = get_curfunc_param(0, AWK_PARAM_STRING);
+       array_param = get_curfunc_param(0, AWK_PARAM_ARRAY);
 
        if (file_param == NULL || array_param == NULL) {
                warning(ext_id, "stat: bad paramaters");
@@ -259,43 +260,43 @@ do_stat(int nargs)
        array = array_param->array_cookie;
 
        /* empty out the array */
-       clear_array(ext_id, array);
+       clear_array(array);
 
        /* lstat the file, if error, set ERRNO and return */
        ret = lstat(name, & sbuf);
        if (ret < 0) {
-               update_ERRNO_int(ext_id, errno);
+               update_ERRNO_int(errno);
                ret = 0;
                goto out;
        }
 
        /* fill in the array */
-       array_set(array, "name", make_string(ext_id, name, 
file_param->str_value.len));
-       array_set(array, "dev", make_number(ext_id, (double) sbuf.st_dev));
-       array_set(array, "ino", make_number(ext_id, (double) sbuf.st_ino));
-       array_set(array, "mode", make_number(ext_id, (double) sbuf.st_mode));
-       array_set(array, "nlink", make_number(ext_id, (double) sbuf.st_nlink));
-       array_set(array, "uid", make_number(ext_id, (double) sbuf.st_uid));
-       array_set(array, "gid", make_number(ext_id, (double) sbuf.st_gid));
-       array_set(array, "size", make_number(ext_id, (double) sbuf.st_size));
-       array_set(array, "blocks", make_number(ext_id, (double) 
sbuf.st_blocks));
-       array_set(array, "atime", make_number(ext_id, (double) sbuf.st_atime));
-       array_set(array, "mtime", make_number(ext_id, (double) sbuf.st_mtime));
-       array_set(array, "ctime", make_number(ext_id, (double) sbuf.st_ctime));
+       array_set(array, "name", make_string(name, file_param->str_value.len));
+       array_set(array, "dev", make_number((double) sbuf.st_dev));
+       array_set(array, "ino", make_number((double) sbuf.st_ino));
+       array_set(array, "mode", make_number((double) sbuf.st_mode));
+       array_set(array, "nlink", make_number((double) sbuf.st_nlink));
+       array_set(array, "uid", make_number((double) sbuf.st_uid));
+       array_set(array, "gid", make_number((double) sbuf.st_gid));
+       array_set(array, "size", make_number((double) sbuf.st_size));
+       array_set(array, "blocks", make_number((double) sbuf.st_blocks));
+       array_set(array, "atime", make_number((double) sbuf.st_atime));
+       array_set(array, "mtime", make_number((double) sbuf.st_mtime));
+       array_set(array, "ctime", make_number((double) sbuf.st_ctime));
 
        /* for block and character devices, add rdev, major and minor numbers */
        if (S_ISBLK(sbuf.st_mode) || S_ISCHR(sbuf.st_mode)) {
-               array_set(array, "rdev", make_number(ext_id, (double) 
sbuf.st_rdev));
-               array_set(array, "major", make_number(ext_id, (double) 
major(sbuf.st_rdev)));
-               array_set(array, "minor", make_number(ext_id, (double) 
minor(sbuf.st_rdev)));
+               array_set(array, "rdev", make_number((double) sbuf.st_rdev));
+               array_set(array, "major", make_number((double) 
major(sbuf.st_rdev)));
+               array_set(array, "minor", make_number((double) 
minor(sbuf.st_rdev)));
        }
 
 #ifdef HAVE_ST_BLKSIZE
-       array_set(array, "blksize", make_number(ext_id, (double) 
sbuf.st_blksize));
+       array_set(array, "blksize", make_number((double) sbuf.st_blksize));
 #endif /* HAVE_ST_BLKSIZE */
 
        pmode = format_mode(sbuf.st_mode);
-       array_set(array, "pmode", make_string(ext_id, pmode, strlen(pmode)));
+       array_set(array, "pmode", make_string(pmode, strlen(pmode)));
 
        /* for symbolic links, add a linkval field */
        if (S_ISLNK(sbuf.st_mode)) {
@@ -304,7 +305,7 @@ do_stat(int nargs)
 
                if ((buf = read_symlink(name, sbuf.st_size,
                                        &linksize)) != NULL)
-                       array_set(array, "linkval", make_string(ext_id, buf, 
linksize));
+                       array_set(array, "linkval", make_string(buf, linksize));
                else
                        warning(ext_id, "unable to read symbolic link `%s'", 
name);
        }
@@ -345,46 +346,20 @@ do_stat(int nargs)
 #endif
        }
 
-       array_set(array, "type", make_string(ext_id, type, strlen(type)));
+       array_set(array, "type", make_string(type, strlen(type)));
 
        ret = 1;        /* success */
 
 out:
-       set_return_value(ext_id, make_number(ext_id, (double) ret));
+       set_return_value(make_number((double) ret));
 }
 
+static awk_ext_func_t func_table[] = {
+       { "chdir", do_chdir, 1 },
+       { "stat", do_stat, 2 },
+};
 
-/* dl_load --- load new builtins in this library */
 
-int dl_load(const gawk_api_t *const api_p, awk_ext_id_t id)
-{
-       static awk_ext_func_t func_table[] = {
-               { "chdir", do_chdir, 1 },
-               { "stat", do_stat, 2 },
-       };
-       size_t i, j;
-       int errors = 0;
-
-       if (api->major_version != GAWK_API_MAJOR_VERSION
-           || api->minor_version < GAWK_API_MINOR_VERSION) {
-               fprintf(stderr, "filefuncs: version mismatch with gawk!\n");
-               fprintf(stderr, "\tmy version (%d, %d), gawk version (%d, 
%d)\n",
-                       GAWK_API_MAJOR_VERSION, GAWK_API_MINOR_VERSION,
-                       api->major_version, api->minor_version);
-               exit(1);
-       }
-
-       api = api_p;
-       ext_id = id;
+/* define the dl_load function using the boilerplate macro */
 
-       /* load functions */
-       for (i = 0, j = sizeof(func_table) / sizeof(func_table[0]); i < j; i++) 
{
-               if (! add_ext_func(ext_id, & func_table[i], "")) {
-                       warning(ext_id, "filefuncs: could not add %s\n",
-                                       func_table[i].name);
-                       errors++;
-               }
-       }
-
-       return (errors == 0);
-}
+dl_load_func(api, ext_id, func_table, filefuncs, "")
diff --git a/test/Makefile.in b/test/Makefile.in
index d6ffc30..0fabf7b 100644
--- a/test/Makefile.in
+++ b/test/Makefile.in
@@ -84,9 +84,9 @@ am__aclocal_m4_deps = $(top_srcdir)/m4/arch.m4 \
        $(top_srcdir)/m4/lib-ld.m4 $(top_srcdir)/m4/lib-link.m4 \
        $(top_srcdir)/m4/lib-prefix.m4 $(top_srcdir)/m4/libsigsegv.m4 \
        $(top_srcdir)/m4/libtool.m4 $(top_srcdir)/m4/longlong.m4 \
-       $(top_srcdir)/m4/mpfr.m4 $(top_srcdir)/m4/ltoptions.m4 \
-       $(top_srcdir)/m4/ltsugar.m4 $(top_srcdir)/m4/ltversion.m4 \
-       $(top_srcdir)/m4/lt~obsolete.m4 $(top_srcdir)/m4/nls.m4 \
+       $(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \
+       $(top_srcdir)/m4/ltversion.m4 $(top_srcdir)/m4/lt~obsolete.m4 \
+       $(top_srcdir)/m4/mpfr.m4 $(top_srcdir)/m4/nls.m4 \
        $(top_srcdir)/m4/noreturn.m4 $(top_srcdir)/m4/po.m4 \
        $(top_srcdir)/m4/progtest.m4 $(top_srcdir)/m4/readline.m4 \
        $(top_srcdir)/m4/socket.m4 $(top_srcdir)/m4/ulonglong.m4 \

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

commit 37496c4be6c14569528c6ea83cbbb257d1130324
Author: Arnold D. Robbins <address@hidden>
Date:   Sun May 20 22:27:06 2012 +0300

    Fix Italian translation.

diff --git a/po/it.gmo b/po/it.gmo
index d7f7432..7d524ad 100644
Binary files a/po/it.gmo and b/po/it.gmo differ
diff --git a/po/it.po b/po/it.po
index 24b0923..6c74d5a 100644
--- a/po/it.po
+++ b/po/it.po
@@ -558,7 +558,7 @@ msgstr "log: argomento negativo %g"
 
 #: builtin.c:740 builtin.c:745
 msgid "fatal: must use `count$' on all formats or none"
-msgstr "fatale: `count$' va usato per ogni 'format' o per nessuno""
+msgstr "fatale: `count$' va usato per ogni 'format' o per nessuno"
 
 #: builtin.c:815
 #, c-format

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

commit cd9fdf221c0504639a38e773c3d56a32ae80e2cc
Author: Arnold D. Robbins <address@hidden>
Date:   Sun May 20 22:26:46 2012 +0300

    More extension work.

diff --git a/extension/ordchr2.c b/extension/ordchr2.c
new file mode 100644
index 0000000..1f4a1fc
--- /dev/null
+++ b/extension/ordchr2.c
@@ -0,0 +1,107 @@
+/*
+ * ordchr.c - Builtin functions that provide ord() and chr() functions.
+ *
+ * Arnold Robbins
+ * address@hidden
+ * 8/2001
+ * Revised 6/2004
+ */
+
+/*
+ * Copyright (C) 2001, 2004, 2011 the Free Software Foundation, Inc.
+ * 
+ * This file is part of GAWK, the GNU implementation of the
+ * AWK Programming Language.
+ * 
+ * GAWK is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 3 of the License, or
+ * (at your option) any later version.
+ * 
+ * GAWK is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ * 
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, 
USA
+ */
+
+#include <stdio.h>
+#include <errno.h>
+#include <stdlib.h>
+#include <string.h>
+#include <unistd.h>
+
+#include <sys/types.h>
+#include <sys/stat.h>
+#include "gawkapi.h"
+
+static const gawk_api_t *api;  /* for convenience macros to work */
+static awk_ext_id_t *ext_id;
+
+int plugin_is_GPL_compatible;
+
+/*  do_ord --- return numeric value of first char of string */
+
+static int
+do_ord(int nargs)
+{
+       const awk_value_t *str;
+       awk_value_t result;
+       double ret = -1;
+
+       if  (do_lint && nargs > 1)
+               lintwarn(ext_id, "ord: called with too many arguments");
+
+       str = get_curfunc_param(0, AWK_PARAM_STRING);
+       if (str != NULL) {
+               ret = str->str_value.str[0];
+       } else if (do_lint)
+               lintwarn(ext_id, "ord: called with no arguments");
+
+       /* Set the return value */
+       set_return_value(make_number(ret));
+       return 1;
+}
+
+/*  do_chr --- turn numeric value into a string */
+
+static int
+do_chr(int nargs)
+{
+       const awk_value_t *num;
+       awk_value_t result;
+       unsigned int ret = 0;
+       double val = 0.0;
+       char str[2];
+
+       str[0] = str[1] = '\0';
+
+       if  (do_lint && nargs > 1)
+               lintwarn(ext_id, "chr: called with too many arguments");
+
+       num = get_curfunc_param(0, AWK_PARAM_NUMBER);
+       if (num != NULL) {
+               val = num->num_value;
+               ret = val;      /* convert to int */
+               ret &= 0xff;
+               str[0] = ret;
+               str[1] = '\0';
+       } else if (do_lint)
+               lintwarn(ext_id, "chr: called with no arguments");
+
+       /* Set the return value */
+       set_return_value(dup_string(str, 1));
+       return 1;
+}
+
+static awk_ext_func_t func_table[] = {
+       { "ord", do_ord, 1 },
+       { "chr", do_chr, 1 },
+};
+
+/* define the dl_load function using the boilerplate macro */
+
+dl_load_func(api, ext_id, func_table, ord_chr, "")
diff --git a/extension/readfile2.c b/extension/readfile2.c
new file mode 100644
index 0000000..4d8cd24
--- /dev/null
+++ b/extension/readfile2.c
@@ -0,0 +1,116 @@
+/*
+ * readfile.c - Read an entire file into a string.
+ *
+ * Arnold Robbins
+ * Tue Apr 23 17:43:30 IDT 2002
+ * Revised per Peter Tillier
+ * Mon Jun  9 17:05:11 IDT 2003
+ * Revised for new dynamic function facilities
+ * Mon Jun 14 14:53:07 IDT 2004
+ */
+
+/*
+ * Copyright (C) 2002, 2003, 2004, 2011 the Free Software Foundation, Inc.
+ * 
+ * This file is part of GAWK, the GNU implementation of the
+ * AWK Programming Language.
+ * 
+ * GAWK is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 3 of the License, or
+ * (at your option) any later version.
+ * 
+ * GAWK is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ * 
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, 
USA
+ */
+
+#include <stdio.h>
+#include <errno.h>
+#include <fcntl.h>
+#include <stdlib.h>
+#include <string.h>
+#include <unistd.h>
+
+#include <sys/types.h>
+#include <sys/stat.h>
+#include "gawkapi.h"
+
+#ifndef O_BINARY
+#define O_BINARY 0
+#endif
+
+static const gawk_api_t *api;  /* for convenience macros to work */
+static awk_ext_id_t *ext_id;
+
+int plugin_is_GPL_compatible;
+
+/* do_readfile --- read a file into memory */
+
+static int
+do_readfile(int nargs)
+{
+       const awk_value_t *filename;
+       awk_value_t result;
+       double ret = -1;
+       struct stat sbuf;
+       char *text;
+       int fd;
+
+       if  (do_lint && nargs > 1)
+               lintwarn(ext_id, "readfile: called with too many arguments");
+
+       filename = get_curfunc_param(0, AWK_PARAM_STRING);
+       if (filename != NULL) {
+               ret = stat(filename->str_value.str, & sbuf);
+               if (ret < 0) {
+                       update_ERRNO_int(errno);
+                       goto done;
+               } else if ((sbuf.st_mode & S_IFMT) != S_IFREG) {
+                       errno = EINVAL;
+                       ret = -1;
+                       update_ERRNO_int(errno);
+                       goto done;
+               }
+
+               if ((fd = open(filename->str_value.str, O_RDONLY|O_BINARY)) < 
0) {
+                       ret = -1;
+                       update_ERRNO_int(errno);
+                       goto done;
+               }
+
+               emalloc(text, char *, sbuf.st_size + 2, "do_readfile");
+               memset(text, '\0', sbuf.st_size + 2);
+
+               if ((ret = read(fd, text, sbuf.st_size)) != sbuf.st_size) {
+                       (void) close(fd);
+                       ret = -1;
+                       update_ERRNO_int(errno);
+                       goto done;
+               }
+
+               close(fd);
+               set_return_value(make_string(text, sbuf.st_size));
+               return 1;
+       } else if (do_lint)
+               lintwarn(ext_id, "readfile: called with no arguments");
+
+
+done:
+       /* Set the return value */
+       set_return_value(make_number(ret));
+       return 0;
+}
+
+static awk_ext_func_t func_table[] = {
+       { "readfile", do_readfile, 1 },
+};
+
+/* define the dl_load function using the boilerplate macro */
+
+dl_load_func(api, ext_id, func_table, readfile, "")
diff --git a/gawkapi.c b/gawkapi.c
index 2a9ad92..e1d2a51 100644
--- a/gawkapi.c
+++ b/gawkapi.c
@@ -452,3 +452,16 @@ static gawk_api_t api_impl = {
        api_make_string,
        api_make_number,
 };
+
+/* init_ext_api --- init the extension API */
+
+void
+init_ext_api()
+{
+       api_impl.do_flags[0] = do_lint;
+       api_impl.do_flags[1] = do_traditional;
+       api_impl.do_flags[2] = do_profile;
+       api_impl.do_flags[3] = do_sandbox;
+       api_impl.do_flags[4] = do_debug;
+       api_impl.do_flags[5] = do_mpfr;
+}
diff --git a/gawkapi.h b/gawkapi.h
index 335e962..76c1026 100644
--- a/gawkapi.h
+++ b/gawkapi.h
@@ -228,6 +228,15 @@ typedef struct gawk_api {
        /*
         * Lookup a variable, return its value. No messing with the value
         * returned. Return value is NULL if the variable doesn't exist.
+        *
+        * Returns a pointer to a static variable. Correct usage is thus:
+        *
+        *      awk_value_t val, *vp;
+        *      vp = api->sym_lookup(id, name);
+        *      if (vp == NULL)
+        *              error_code();
+        *      val = *vp;
+        *      // use val from here on
         */
        const awk_value_t *const (*sym_lookup)(awk_ext_id_t id, const char 
*name);
 
@@ -241,6 +250,9 @@ typedef struct gawk_api {
        /*
         * Return the value of an element - read only!
         * Use set_array_element to change it.
+        *
+        * As for sym_lookup(), this also returns a static pointer whose
+        * value should be copied before use.
         */
        const awk_value_t *const (*get_array_element)(awk_ext_id_t id,
                        awk_array_t a_cookie, const awk_value_t *const index);
@@ -306,39 +318,55 @@ typedef struct gawk_api {
 #define do_debug       api->do_flags[gawk_do_debug]
 #define do_mpfr                api->do_flags[gawk_do_mpfr]
 
-#define get_curfunc_param      api->get_curfunc_param
-#define set_return_value       api->set_return_value
+#define get_curfunc_param(count, wanted) \
+       api->get_curfunc_param(ext_id, count, wanted)
+
+#define set_return_value(retval) \
+       api->set_return_value(ext_id, retval)
 
 #define fatal          api->api_fatal
 #define warning                api->api_warning
 #define lintwarn       api->api_lintwarn
 
-#define register_open_hook     api->register_open_hook
+#define register_open_hook(func)       api->register_open_hook(ext_id, func)
 
-#define update_ERRNO_int       api->update_ERRNO_int
-#define update_ERRNO_string    api->update_ERRNO_string
+#define update_ERRNO_int(e)    api->update_ERRNO_int(ext_id, e)
+#define update_ERRNO_string(str, translate) \
+       api->update_ERRNO_string(ext_id, str, translate)
 #define unset_ERRNO    api->unset_ERRNO
 
-#define is_null_string api->is_null_string
+#define add_ext_func(func, ns) api->add_ext_func(ext_id, func, ns)
+#define awk_atexit(funcp, arg0)        api->awk_atexit(ext_id, funcp, arg0)
+
+#define sym_lookup(name)       api->sym_lookup(ext_id, name)
+#define sym_update(name, value) \
+       api->sym_update(ext_id, name, value)
+
+#define get_array_element(array, element) \
+       api->get_array_element(ext_id, array, element)
+
+#define set_array_element(array, element) \
+       api->set_array_element(ext_id, array, element)
+
+#define del_array_element(array, index) \
+       api->del_array_element(ext_id, array, index)
+
+#define get_element_count(array, count_p) \
+       api->get_element_count(ext_id, array, count_p)
 
-#define add_ext_func   api->add_ext_func
-#define awk_atexit     api->awk_atexit
+#define create_array()         api->create_array(ext_id)
 
-#define sym_lookup     api->sym_lookup
-#define sym_update     api->sym_update
+#define clear_array(array)     api->clear_array(ext_id, array)
 
-#define get_array_element      api->get_array_element
-#define set_array_element      api->set_array_element
-#define del_array_element      api->del_array_element
-#define get_element_count      api->get_element_count
-#define clear_array            api->clear_array
-#define create_array           api->create_array
-#define flatten_array          api->flatten_array
-#define release_flattened_array        api->release_flattened_array
+#define flatten_array(array, count, data) \
+       api->flatten_array(ext_id, array, count, data)
 
-#define make_string(id, str, len)      api->api_make_string(id, str, len, 0)
-#define dup_string(id, str, len)       api->api_make_string(id, str, len, 1)
-#define make_number            api->api_make_number
+#define release_flattened_array(array, count, data) \
+       api->release_flattened_array(ext_id, array, count, data)
+
+#define make_string(str, len)  api->api_make_string(ext_id, str, len, 0)
+#define dup_string(str, len)   api->api_make_string(ext_id, str, len, 1)
+#define make_number(num)       api->api_make_number(ext_id, num)
 
 #define emalloc(pointer, type, size, message) \
        do { \
@@ -360,48 +388,48 @@ typedef struct gawk_api {
 
 extern int dl_load(const gawk_api_t *const api_p, awk_ext_id_t id);
 
-
-/* TODO: Turn this into a macro... */
 #if 0
 /* Boiler plate code: */
-
 static gawk_api_t *const api;
 static awk_ext_id_t ext_id;
+static awk_ext_func_t func_table[] = {
+       { "name", do_name, 1 },
+       /* ... */
+};
 
-int dl_load(const gawk_api_t *const api_p, awk_ext_id_t id);
-{
-       static awk_ext_func_t func_table[] = {
-               { "name", do_name, 1 },
-               /* ... */
-       };
-       size_t i, j;
-       int errors = 0;
-
-       if (api->major_version != GAWK_API_MAJOR_VERSION
-           || api->minor_version < GAWK_API_MINOR_VERSION) {
-               fprintf(stderr, "<NAME>: version mismatch with gawk!\n");
-               fprintf(stderr, "\tmy version (%d, %d), gawk version (%d, 
%d)\n",
-                       GAWK_API_MAJOR_VERSION, GAWK_API_MINOR_VERSION,
-                       api->major_version, api->minor_version);
-               exit(1);
-       }
-
-       api = api_p;
-       ext_id = id;
-
-       /* load functions */
-       for (i = 0, j = sizeof(func_table) / sizeof(func_table[0]); i < j; i++) 
{
-               if (! add_ext_func(ext_id, & func_table[i], "" /* "NAME" */)) {
-                       warning(ext_id, "<NAME>: could not add %s\n",
-                                       func_table[i].name);
-                       errors++;
-               }
-       }
-
-       return (errors == 0);
-}
+dl_load_func(api, ext_id, func_table, some_name, "name_space_in_quotes")
 #endif
 
+#define dl_load_func(global_api_p, global_ext_id, func_table, module, 
name_space) \
+int dl_load(const gawk_api_t *const api_p, awk_ext_id_t id)  \
+{ \
+       size_t i, j; \
+       int errors = 0; \
+ \
+       if (api->major_version != GAWK_API_MAJOR_VERSION \
+           || api->minor_version < GAWK_API_MINOR_VERSION) { \
+               fprintf(stderr, #module ": version mismatch with gawk!\n"); \
+               fprintf(stderr, "\tmy version (%d, %d), gawk version (%d, 
%d)\n", \
+                       GAWK_API_MAJOR_VERSION, GAWK_API_MINOR_VERSION, \
+                       api->major_version, api->minor_version); \
+               exit(1); \
+       } \
+ \
+       global_api_p = api_p; \
+       global_ext_id = id; \
+\
+       /* load functions */ \
+       for (i = 0, j = sizeof(func_table) / sizeof(func_table[0]); i < j; i++) 
{ \
+               if (! add_ext_func(& func_table[i], name_space)) { \
+                       warning(ext_id, #module ": could not add %s\n", \
+                                       func_table[i].name); \
+                       errors++; \
+               } \
+       } \
+\
+       return (errors == 0); \
+}
+
 #ifdef __cplusplus
 }
 #endif /* C++ */

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

Summary of changes:
 Makefile.in                           |    6 +-
 aclocal.m4                            |    2 +-
 awklib/Makefile.in                    |    6 +-
 configh.in                            |    1 -
 configure                             |   58 +++++++-------
 doc/Makefile.in                       |    6 +-
 extension/Makefile.in                 |    6 +-
 extension/filefuncs2.c                |   99 +++++++++---------------
 extension/{ordchr.c => ordchr2.c}     |   67 +++++++++-------
 extension/{readfile.c => readfile2.c} |   53 +++++++------
 gawkapi.c                             |   13 +++
 gawkapi.h                             |  140 ++++++++++++++++++++-------------
 po/it.gmo                             |  Bin 41479 -> 47961 bytes
 po/it.po                              |    2 +-
 test/Makefile.in                      |    6 +-
 15 files changed, 249 insertions(+), 216 deletions(-)
 copy extension/{ordchr.c => ordchr2.c} (59%)
 copy extension/{readfile.c => readfile2.c} (67%)


hooks/post-receive
-- 
gawk



reply via email to

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