diff options
author | Kaz Kylheku <kaz@kylheku.com> | 2018-12-11 22:52:06 -0800 |
---|---|---|
committer | Kaz Kylheku <kaz@kylheku.com> | 2018-12-11 22:52:06 -0800 |
commit | b07ecc142c6251517be5f4af9c76ba539b54eecc (patch) | |
tree | d0f6d56e775ef3ae766fc7adcad8b82499f0b3c5 | |
parent | 2938a0d7e64e2adad3db0988689635e81ad91739 (diff) | |
download | txr-b07ecc142c6251517be5f4af9c76ba539b54eecc.tar.gz txr-b07ecc142c6251517be5f4af9c76ba539b54eecc.tar.bz2 txr-b07ecc142c6251517be5f4af9c76ba539b54eecc.zip |
Drastically reduce inclusion of <dirent.h>.
The <dirent.h> header is included all over the place because
it is needed by a single declaration in stream.h. That
declaration is for a function that is only called within
stream.c, so we make it internal. Now only stream.c has
to include <dirent.h>.
* buf.c, debug.c, eval.c, ffi.c, filter.c, gc.c, gencadr.txr,
hash.c, lib.c, lisplib.c, match.c, parser.c, regex.c, socket.c,
struct.c, strudel.c, sysif.c, syslog.c, termios.c, txr.c,
unwind.c, vm.c: Remove #include <dirent.h>.
* cadr.c: Regenerated.
* stream.c (make_dir_stream): Make external function static.
* stream.h (make_dir_stream): Declaration updated.
-rw-r--r-- | buf.c | 1 | ||||
-rw-r--r-- | cadr.c | 1 | ||||
-rw-r--r-- | debug.c | 1 | ||||
-rw-r--r-- | eval.c | 1 | ||||
-rw-r--r-- | ffi.c | 1 | ||||
-rw-r--r-- | filter.c | 1 | ||||
-rw-r--r-- | gc.c | 1 | ||||
-rw-r--r-- | gencadr.txr | 1 | ||||
-rw-r--r-- | hash.c | 1 | ||||
-rw-r--r-- | lib.c | 1 | ||||
-rw-r--r-- | lisplib.c | 1 | ||||
-rw-r--r-- | match.c | 1 | ||||
-rw-r--r-- | parser.c | 1 | ||||
-rw-r--r-- | regex.c | 1 | ||||
-rw-r--r-- | socket.c | 1 | ||||
-rw-r--r-- | stream.c | 2 | ||||
-rw-r--r-- | stream.h | 1 | ||||
-rw-r--r-- | struct.c | 1 | ||||
-rw-r--r-- | strudel.c | 1 | ||||
-rw-r--r-- | sysif.c | 1 | ||||
-rw-r--r-- | syslog.c | 1 | ||||
-rw-r--r-- | termios.c | 1 | ||||
-rw-r--r-- | txr.c | 1 | ||||
-rw-r--r-- | unwind.c | 1 | ||||
-rw-r--r-- | vm.c | 1 |
25 files changed, 1 insertions, 25 deletions
@@ -34,7 +34,6 @@ #include <stdarg.h> #include <signal.h> #include <stdio.h> -#include <dirent.h> #include "config.h" #include "lib.h" #include "gc.h" @@ -28,7 +28,6 @@ */ #include <stdio.h> -#include <dirent.h> #include <stdarg.h> #include <stdlib.h> #include <limits.h> @@ -27,7 +27,6 @@ #include <stdio.h> #include <stdlib.h> -#include <dirent.h> #include <stdarg.h> #include <wchar.h> #include <signal.h> @@ -28,7 +28,6 @@ #include <stddef.h> #include <stdio.h> #include <stdlib.h> -#include <dirent.h> #include <stdarg.h> #include <wchar.h> #include <signal.h> @@ -35,7 +35,6 @@ #include <string.h> #include <signal.h> #include <wchar.h> -#include <dirent.h> #include <time.h> #include "config.h" #if HAVE_LIBFFI @@ -29,7 +29,6 @@ #include <wctype.h> #include <wchar.h> #include <stdarg.h> -#include <dirent.h> #include <stdio.h> #include <signal.h> #include "config.h" @@ -29,7 +29,6 @@ #include <stdlib.h> #include <stdarg.h> #include <assert.h> -#include <dirent.h> #include <wchar.h> #include <signal.h> #include "config.h" diff --git a/gencadr.txr b/gencadr.txr index 97ee08f7..650a0100 100644 --- a/gencadr.txr +++ b/gencadr.txr @@ -22,7 +22,6 @@ @{c-copyright "\n"} #include <stdio.h> -#include <dirent.h> #include <stdarg.h> #include <stdlib.h> #include <limits.h> @@ -27,7 +27,6 @@ #include <stddef.h> #include <stdio.h> -#include <dirent.h> #include <stdarg.h> #include <stdlib.h> #include <limits.h> @@ -32,7 +32,6 @@ #include <wctype.h> #include <limits.h> #include <stdarg.h> -#include <dirent.h> #include <errno.h> #include <wchar.h> #include <math.h> @@ -27,7 +27,6 @@ #include <stdio.h> #include <wchar.h> -#include <dirent.h> #include <stdarg.h> #include <signal.h> #include "config.h" @@ -28,7 +28,6 @@ #include <stddef.h> #include <stdio.h> #include <stdlib.h> -#include <dirent.h> #include <stdarg.h> #include <wchar.h> #include <signal.h> @@ -28,7 +28,6 @@ #include <stdio.h> #include <assert.h> #include <limits.h> -#include <dirent.h> #include <stdlib.h> #include <string.h> #include <stdarg.h> @@ -30,7 +30,6 @@ #include <string.h> #include <wchar.h> #include <assert.h> -#include <dirent.h> #include <limits.h> #include <signal.h> #include <stdarg.h> @@ -32,7 +32,6 @@ #include <string.h> #include <wchar.h> #include <signal.h> -#include <dirent.h> #include <errno.h> #include <unistd.h> #include <fcntl.h> @@ -1702,7 +1702,7 @@ static struct strm_ops dir_ops = dir_clear_error, 0); -val make_dir_stream(DIR *dir) +static val make_dir_stream(DIR *dir) { struct dir_handle *h = coerce(struct dir_handle *, chk_malloc(sizeof *h)); strm_base_init(&h->a); @@ -172,7 +172,6 @@ val make_string_output_stream(void); val get_string_from_stream(val); val make_strlist_output_stream(void); val get_list_from_stream(val); -val make_dir_stream(DIR *); val record_adapter(val regex, val stream, val include_match); val streamp(val obj); val real_time_stream_p(val obj); @@ -28,7 +28,6 @@ #include <stddef.h> #include <stdio.h> #include <string.h> -#include <dirent.h> #include <stdarg.h> #include <stdlib.h> #include <limits.h> @@ -31,7 +31,6 @@ #include <stdarg.h> #include <wchar.h> #include <signal.h> -#include <dirent.h> #include <syslog.h> #include "config.h" #include ALLOCA_H @@ -31,7 +31,6 @@ #include <string.h> #include <wchar.h> #include <signal.h> -#include <dirent.h> #include <errno.h> #include <time.h> #include "config.h" @@ -31,7 +31,6 @@ #include <stdarg.h> #include <wchar.h> #include <signal.h> -#include <dirent.h> #include <syslog.h> #include "config.h" #include ALLOCA_H @@ -32,7 +32,6 @@ #include <string.h> #include <wchar.h> #include <signal.h> -#include <dirent.h> #include <errno.h> #include "config.h" #include <termios.h> @@ -28,7 +28,6 @@ #include <stdio.h> #include <stdlib.h> #include <limits.h> -#include <dirent.h> #include <stdarg.h> #include <wchar.h> #include <signal.h> @@ -30,7 +30,6 @@ #include <stdlib.h> #include <string.h> #include <assert.h> -#include <dirent.h> #include <stdarg.h> #include <signal.h> #include "config.h" @@ -28,7 +28,6 @@ #include <stddef.h> #include <stdio.h> #include <string.h> -#include <dirent.h> #include <stdarg.h> #include <stdlib.h> #include <limits.h> |