[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[gawk-diffs] [SCM] gawk branch, master, updated. gawk-4.1.0-2998-g0f906d
From: |
Arnold Robbins |
Subject: |
[gawk-diffs] [SCM] gawk branch, master, updated. gawk-4.1.0-2998-g0f906df |
Date: |
Sun, 11 Feb 2018 13:49:31 -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, master has been updated
via 0f906dfde40392937b3461f040b7ed52e3d0abbf (commit)
via 1fd985df4c833381498094484cb8a18aa2b65730 (commit)
via e25975137bf06b8ada724f989fff8112ab26355f (commit)
from e988fbb61b477a61114e83bf988f10b397e641fb (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=0f906dfde40392937b3461f040b7ed52e3d0abbf
commit 0f906dfde40392937b3461f040b7ed52e3d0abbf
Author: Arnold D. Robbins <address@hidden>
Date: Sun Feb 11 20:48:43 2018 +0200
Typo fixes in extension/filefuncs.3am.
diff --git a/extension/ChangeLog b/extension/ChangeLog
index cce8aee..582b0b5 100644
--- a/extension/ChangeLog
+++ b/extension/ChangeLog
@@ -1,3 +1,7 @@
+2018-02-11 Arnold D. Robbins <address@hidden>
+
+ * filefuncs.3am: Fix some typos.
+
2018-02-08 Andrew J. Schorr <address@hidden>
* configure.ac (pkgextensiondir): This must be set to
diff --git a/extension/filefuncs.3am b/extension/filefuncs.3am
index ce11a51..e033f91 100644
--- a/extension/filefuncs.3am
+++ b/extension/filefuncs.3am
@@ -230,7 +230,7 @@ This option causes entries for ``..'' to also be included.
.TP
.B FTS_XDEV
During a traversal, do not cross onto a different mounted filesystem.
-.TB
+.TP
.B FTS_SKIP
When set, causes top level directories to not be descended into.
.RE
@@ -318,7 +318,7 @@ heirarchy and its information.
.PP
Nothing prevents AWK code from changing the predefined
.BI FTS_ xx
-values, but doing so is may cause strange results when
+values, but doing so may cause strange results when
the changed values are passed to
.BR fts() .
.SH BUGS
http://git.sv.gnu.org/cgit/gawk.git/commit/?id=1fd985df4c833381498094484cb8a18aa2b65730
commit 1fd985df4c833381498094484cb8a18aa2b65730
Merge: e259751 e988fbb
Author: Arnold D. Robbins <address@hidden>
Date: Sun Feb 11 20:32:15 2018 +0200
Merge branch 'master' into feature/fts-skip
diff --cc extension/ChangeLog
index c678456,83d4372..cce8aee
--- a/extension/ChangeLog
+++ b/extension/ChangeLog
@@@ -1,10 -1,18 +1,25 @@@
+ 2018-02-08 Andrew J. Schorr <address@hidden>
+
+ * configure.ac (pkgextensiondir): This must be set to
+ '${libdir}/gawk'${EXTENSIONDIR} to match gawk's value.
+ The previous value of '${pkglibdir}'${EXTENSIONDIR} was incorrect,
+ because it was putting the extensions in the gawk-extensions
+ libdir subdirectory, instead of the gawk subdirectory.
+
+ 2018-02-02 Arnold D. Robbins <address@hidden>
+
+ * filefuncs.3am, fnmatch.3am, fork.3am, inplace.3am,
+ ordchr.3am, readdir.3am, readfile.3am, revoutput.3am,
+ revtwoway.3am, rwarray.3am, time.3am: Add vim modeline at the
+ bottom to set the file type for syntax coloring.
+
+2018-02-02 Arnold D. Robbins <address@hidden>
+
+ * filefuncs.c (FTS_SKIP): New constant.
+ (process): Additional arg skipset. When true (based on if
+ FTS_SKIP was passed) and at level 0, use fts_set to set
+ FTS_SKIP on the directory.
+
2018-01-11 Arnold D. Robbins <address@hidden>
* compile, config.guess, config.rpath, config.sub,
http://git.sv.gnu.org/cgit/gawk.git/commit/?id=e25975137bf06b8ada724f989fff8112ab26355f
commit e25975137bf06b8ada724f989fff8112ab26355f
Author: Arnold D. Robbins <address@hidden>
Date: Fri Feb 2 10:14:05 2018 +0200
Add FTS_SKIP support to filefuncs extension.
diff --git a/extension/ChangeLog b/extension/ChangeLog
index 27818dc..c678456 100644
--- a/extension/ChangeLog
+++ b/extension/ChangeLog
@@ -1,3 +1,10 @@
+2018-02-02 Arnold D. Robbins <address@hidden>
+
+ * filefuncs.c (FTS_SKIP): New constant.
+ (process): Additional arg skipset. When true (based on if
+ FTS_SKIP was passed) and at level 0, use fts_set to set
+ FTS_SKIP on the directory.
+
2018-01-11 Arnold D. Robbins <address@hidden>
* compile, config.guess, config.rpath, config.sub,
diff --git a/extension/filefuncs.3am b/extension/filefuncs.3am
index d0eb2ac..1afb67b 100644
--- a/extension/filefuncs.3am
+++ b/extension/filefuncs.3am
@@ -1,4 +1,4 @@
-.TH FILEFUNCS 3am "Jan 15 2013" "Free Software Foundation" "GNU Awk Extension
Modules"
+.TH FILEFUNCS 3am "Feb 02 2018" "Free Software Foundation" "GNU Awk Extension
Modules"
.SH NAME
filefuncs \- provide some file related functionality to gawk
.SH SYNOPSIS
@@ -230,6 +230,9 @@ This option causes entries for ``..'' to also be included.
.TP
.B FTS_XDEV
During a traversal, do not cross onto a different mounted filesystem.
+.TB
+.B FTS_SKIP
+When set, causes top level directories to not be descended into.
.RE
.TP
.B filedata
@@ -321,6 +324,10 @@ the changed values are passed to
.SH BUGS
There are many more file-related functions for which AWK
interfaces would be desirable.
+.PP
+It's not clear why I thought adding
+.B FTS_SKIP
+was a good idea.
.SH EXAMPLE
See
.B test/fts.awk
@@ -346,7 +353,7 @@ distribution for an example.
Arnold Robbins,
.BR address@hidden .
.SH COPYING PERMISSIONS
-Copyright \(co 2012, 2013,
+Copyright \(co 2012, 2013, 2018,
Free Software Foundation, Inc.
.PP
Permission is granted to make and distribute verbatim copies of
diff --git a/extension/filefuncs.c b/extension/filefuncs.c
index 99b5eda..15f1547 100644
--- a/extension/filefuncs.c
+++ b/extension/filefuncs.c
@@ -10,7 +10,7 @@
*/
/*
- * Copyright (C) 2001, 2004, 2005, 2010-2017
+ * Copyright (C) 2001, 2004, 2005, 2010-2018
* the Free Software Foundation, Inc.
*
* This file is part of GAWK, the GNU implementation of the
@@ -575,6 +575,7 @@ init_filefuncs(void)
ENTRY(FTS_PHYSICAL),
ENTRY(FTS_SEEDOT),
ENTRY(FTS_XDEV),
+ ENTRY(FTS_SKIP),
{ NULL, 0 }
};
@@ -690,7 +691,7 @@ fill_default_elements(awk_array_t element_array, const
FTSENT *const fentry, awk
/* process --- process the heirarchy */
static void
-process(FTS *heirarchy, awk_array_t destarray, int seedot)
+process(FTS *heirarchy, awk_array_t destarray, int seedot, int skipset)
{
FTSENT *fentry;
awk_value_t index, value;
@@ -705,7 +706,12 @@ process(FTS *heirarchy, awk_array_t destarray, int seedot)
switch (fentry->fts_info) {
case FTS_D:
/* directory */
+
+ if (skipset && fentry->fts_level == 0)
+ fts_set(heirarchy, fentry, FTS_SKIP);
+
/* create array to hold entries */
+ /* this will be empty if doing FTS_SKIP */
newdir_array = create_array();
if (newdir_array == NULL) {
warning(ext_id, _("fts-process: could not
create array"));
@@ -826,7 +832,7 @@ do_fts(int nargs, awk_value_t *result, struct awk_ext_func
*unused)
int ret = -1;
static const int mask = (
FTS_COMFOLLOW | FTS_LOGICAL | FTS_NOCHDIR | FTS_PHYSICAL
- | FTS_SEEDOT | FTS_XDEV);
+ | FTS_SEEDOT | FTS_XDEV | FTS_SKIP);
assert(result != NULL);
fts_errors = 0; /* ensure a fresh start */
@@ -894,7 +900,7 @@ do_fts(int nargs, awk_value_t *result, struct awk_ext_func
*unused)
/* let's do it! */
if ((heirarchy = fts_open(pathvector, flags, NULL)) != NULL) {
- process(heirarchy, dest.array_cookie, (flags & FTS_SEEDOT) !=
0);
+ process(heirarchy, dest.array_cookie, (flags & FTS_SEEDOT) !=
0, (flags & FTS_SKIP) != 0);
fts_close(heirarchy);
if (fts_errors == 0)
-----------------------------------------------------------------------
Summary of changes:
extension/ChangeLog | 11 +++++++++++
extension/filefuncs.3am | 13 ++++++++++---
extension/filefuncs.c | 14 ++++++++++----
3 files changed, 31 insertions(+), 7 deletions(-)
hooks/post-receive
--
gawk
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [gawk-diffs] [SCM] gawk branch, master, updated. gawk-4.1.0-2998-g0f906df,
Arnold Robbins <=