aboutsummaryrefslogtreecommitdiffstats
path: root/extension/filefuncs.c
diff options
context:
space:
mode:
authorArnold D. Robbins <arnold@skeeve.com>2018-02-17 21:47:23 +0200
committerArnold D. Robbins <arnold@skeeve.com>2018-02-17 21:47:23 +0200
commit80e019aa23eff29a3525ae272125700f352dab74 (patch)
tree59813cba8844b02d8b4a374e26c4b8ee7d73a112 /extension/filefuncs.c
parente5899a881d7b25ed2eeed1a6b8a047720eba20aa (diff)
parent3b46f279e79079ce443a0bfc561c8e662386b0b2 (diff)
downloadegawk-80e019aa23eff29a3525ae272125700f352dab74.tar.gz
egawk-80e019aa23eff29a3525ae272125700f352dab74.tar.bz2
egawk-80e019aa23eff29a3525ae272125700f352dab74.zip
Merge branch 'gawk-4.2-stable'
Diffstat (limited to 'extension/filefuncs.c')
-rw-r--r--extension/filefuncs.c20
1 files changed, 10 insertions, 10 deletions
diff --git a/extension/filefuncs.c b/extension/filefuncs.c
index 15f15473..1ea25dbc 100644
--- a/extension/filefuncs.c
+++ b/extension/filefuncs.c
@@ -592,7 +592,7 @@ init_filefuncs(void)
}
#ifdef __MINGW32__
-/* do_fts --- walk a heirarchy and fill in an array */
+/* do_fts --- walk a hierarchy and fill in an array */
/*
* Usage from awk:
@@ -688,10 +688,10 @@ fill_default_elements(awk_array_t element_array, const FTSENT *const fentry, awk
}
}
-/* process --- process the heirarchy */
+/* process --- process the hierarchy */
static void
-process(FTS *heirarchy, awk_array_t destarray, int seedot, int skipset)
+process(FTS *hierarchy, awk_array_t destarray, int seedot, int skipset)
{
FTSENT *fentry;
awk_value_t index, value;
@@ -700,7 +700,7 @@ process(FTS *heirarchy, awk_array_t destarray, int seedot, int skipset)
/* path is full path, pathlen is length thereof */
/* name is name in directory, namelen is length thereof */
- while ((fentry = fts_read(heirarchy)) != NULL) {
+ while ((fentry = fts_read(hierarchy)) != NULL) {
bad_ret = awk_false;
switch (fentry->fts_info) {
@@ -708,7 +708,7 @@ process(FTS *heirarchy, awk_array_t destarray, int seedot, int skipset)
/* directory */
if (skipset && fentry->fts_level == 0)
- fts_set(heirarchy, fentry, FTS_SKIP);
+ fts_set(hierarchy, fentry, FTS_SKIP);
/* create array to hold entries */
/* this will be empty if doing FTS_SKIP */
@@ -812,7 +812,7 @@ process(FTS *heirarchy, awk_array_t destarray, int seedot, int skipset)
}
}
-/* do_fts --- walk a heirarchy and fill in an array */
+/* do_fts --- walk a hierarchy and fill in an array */
/*
* Usage from awk:
@@ -826,7 +826,7 @@ do_fts(int nargs, awk_value_t *result, struct awk_ext_func *unused)
awk_value_t pathlist, flagval, dest;
awk_flat_array_t *path_array = NULL;
char **pathvector = NULL;
- FTS *heirarchy;
+ FTS *hierarchy;
int flags;
size_t i, count;
int ret = -1;
@@ -899,9 +899,9 @@ 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, (flags & FTS_SKIP) != 0);
- fts_close(heirarchy);
+ if ((hierarchy = fts_open(pathvector, flags, NULL)) != NULL) {
+ process(hierarchy, dest.array_cookie, (flags & FTS_SEEDOT) != 0, (flags & FTS_SKIP) != 0);
+ fts_close(hierarchy);
if (fts_errors == 0)
ret = 0;