wdvi

network DVI viewer
Log | Files | Refs

commit 14d369e4dfb29075d8de035437139978d0cf92eb
parent 1014701e1bbad1cf4ac5a6d080e19ca73bd2e50f
Author: Kyle Milz <krwmilz@gmail.com>
Date:   Tue,  7 Sep 2021 17:49:23 +0000

move xopendir() declaration to util.h header file

There is no need to include this in the global xdvi.h.

Diffstat:
Mfilefind.c | 3++-
Mutil.c | 1+
Autil.h | 3+++
Mxdvi.h | 4----
4 files changed, 6 insertions(+), 5 deletions(-)

diff --git a/filefind.c b/filefind.c @@ -40,6 +40,7 @@ CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. #include "filf-app.h" /* application-related declarations & defs */ #include "filefind.h" +#include "util.h" /* default list of texmf trees */ @@ -1356,7 +1357,7 @@ filltree(pos, treepp, atom, slashslash) dp = readdir(f); if (dp == NULL) break; /* done */ - len = NAMLEN(dp); + len = strlen((dp)->d_name); if (pos + len >= ffline_len) expandline(pos + (int) len); line1 = ffline + pos; diff --git a/util.c b/util.c @@ -35,6 +35,7 @@ NOTE: #include <stdarg.h> #include "xdvi.h" +#include "util.h" /* diff --git a/util.h b/util.h @@ -0,0 +1,3 @@ +#include <dirent.h> + +extern DIR *xopendir(const char *); diff --git a/xdvi.h b/xdvi.h @@ -68,9 +68,6 @@ typedef char Bool3; /* Yes/No/Maybe */ #include <setjmp.h> #include <unistd.h> -#include <dirent.h> -#define NAMLEN(dirent) strlen((dirent)->d_name) - # include <ft2build.h> # include FT_FREETYPE_H @@ -820,7 +817,6 @@ extern int memicmp(const char *, const char *, size_t); extern FILE *xfopen(const char *, const char *); extern int xopen(const char *, int); extern int xpipe(int *); -extern DIR *xopendir(const char *); extern const struct passwd *ff_getpw(const char **, const char *); extern unsigned long num(FILE *, int); extern long snum(FILE *, int);