aboutsummaryrefslogtreecommitdiffstats
path: root/ex/ex_argv.c
diff options
context:
space:
mode:
authorBaptiste Daroussin <bapt@FreeBSD.org>2020-10-01 04:25:54 +0000
committerBaptiste Daroussin <bapt@FreeBSD.org>2020-10-01 04:25:54 +0000
commitb4ed613595432ece6802d09bfabad18e09aa26f3 (patch)
treebd2db6b09b756624c1b2babdd12ea05a9dffcdaf /ex/ex_argv.c
parent7cef6c685d23e4dcdf3f64b0b2ea92151e652db6 (diff)
downloadsrc-vendor/nvi.tar.gz
src-vendor/nvi.zip
Import nvi 2.2.0-05ed8b9vendor/nvi/2.2.0-05ed8b9vendor/nvi
This snapshot just brings a bunch of fixes in particular a fix for vi -w PR: 241985 Reported by: fernape
Notes
Notes: svn path=/vendor/nvi/dist/; revision=366307 svn path=/vendor/nvi/2.2.0-05ed8b9/; revision=366308; tag=vendor/nvi/2.2.0-05ed8b9
Diffstat (limited to 'ex/ex_argv.c')
-rw-r--r--ex/ex_argv.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/ex/ex_argv.c b/ex/ex_argv.c
index d6f9a8bb8aa5..8b1fd7858fb1 100644
--- a/ex/ex_argv.c
+++ b/ex/ex_argv.c
@@ -611,9 +611,17 @@ argv_flt_path(SCR *sp, EXCMD *excp, CHAR_T *path, size_t plen)
if (nlen == 0) {
if (dp->d_name[0] == '.')
continue;
+#ifdef HAVE_DIRENT_D_NAMLEN
len = dp->d_namlen;
+#else
+ len = strlen(dp->d_name);
+#endif
} else {
+#ifdef HAVE_DIRENT_D_NAMLEN
len = dp->d_namlen;
+#else
+ len = strlen(dp->d_name);
+#endif
if (len < nlen || memcmp(dp->d_name, name, nlen))
continue;
}