From 917f9da1607ff62462dba3e19a8cfe75e7c7ee24 Mon Sep 17 00:00:00 2001 From: Kaz Kylheku Date: Tue, 11 Dec 2018 22:52:06 -0800 Subject: Drastically reduce inclusion of . The 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 . * 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 . * cadr.c: Regenerated. * stream.c (make_dir_stream): Make external function static. * stream.h (make_dir_stream): Declaration updated. --- buf.c | 1 - cadr.c | 1 - debug.c | 1 - eval.c | 1 - ffi.c | 1 - filter.c | 1 - gc.c | 1 - gencadr.txr | 1 - hash.c | 1 - lib.c | 1 - lisplib.c | 1 - match.c | 1 - parser.c | 1 - regex.c | 1 - socket.c | 1 - stream.c | 2 +- stream.h | 1 - struct.c | 1 - strudel.c | 1 - sysif.c | 1 - syslog.c | 1 - termios.c | 1 - txr.c | 1 - unwind.c | 1 - vm.c | 1 - 25 files changed, 1 insertion(+), 25 deletions(-) diff --git a/buf.c b/buf.c index 02afcff4..a1d76960 100644 --- a/buf.c +++ b/buf.c @@ -34,7 +34,6 @@ #include #include #include -#include #include "config.h" #include "lib.h" #include "gc.h" diff --git a/cadr.c b/cadr.c index 647b3637..2c726019 100644 --- a/cadr.c +++ b/cadr.c @@ -28,7 +28,6 @@ */ #include -#include #include #include #include diff --git a/debug.c b/debug.c index 83e79bf8..d7dd8791 100644 --- a/debug.c +++ b/debug.c @@ -27,7 +27,6 @@ #include #include -#include #include #include #include diff --git a/eval.c b/eval.c index 8e9fb067..b26dc5b1 100644 --- a/eval.c +++ b/eval.c @@ -28,7 +28,6 @@ #include #include #include -#include #include #include #include diff --git a/ffi.c b/ffi.c index 27db9a88..7bf5cad8 100644 --- a/ffi.c +++ b/ffi.c @@ -35,7 +35,6 @@ #include #include #include -#include #include #include "config.h" #if HAVE_LIBFFI diff --git a/filter.c b/filter.c index 32ea175b..69a3e567 100644 --- a/filter.c +++ b/filter.c @@ -29,7 +29,6 @@ #include #include #include -#include #include #include #include "config.h" diff --git a/gc.c b/gc.c index 1359ea0f..0832d446 100644 --- a/gc.c +++ b/gc.c @@ -29,7 +29,6 @@ #include #include #include -#include #include #include #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 -#include #include #include #include diff --git a/hash.c b/hash.c index 061706a0..60b045c0 100644 --- a/hash.c +++ b/hash.c @@ -27,7 +27,6 @@ #include #include -#include #include #include #include diff --git a/lib.c b/lib.c index d06a71b1..0c20f912 100644 --- a/lib.c +++ b/lib.c @@ -32,7 +32,6 @@ #include #include #include -#include #include #include #include diff --git a/lisplib.c b/lisplib.c index 86f03ccb..51abee97 100644 --- a/lisplib.c +++ b/lisplib.c @@ -27,7 +27,6 @@ #include #include -#include #include #include #include "config.h" diff --git a/match.c b/match.c index 0d4e496b..c55daaef 100644 --- a/match.c +++ b/match.c @@ -28,7 +28,6 @@ #include #include #include -#include #include #include #include diff --git a/parser.c b/parser.c index 1714d18b..9271f03a 100644 --- a/parser.c +++ b/parser.c @@ -28,7 +28,6 @@ #include #include #include -#include #include #include #include diff --git a/regex.c b/regex.c index cb8e391d..0ce9cf7a 100644 --- a/regex.c +++ b/regex.c @@ -30,7 +30,6 @@ #include #include #include -#include #include #include #include diff --git a/socket.c b/socket.c index ace6944a..97c7b690 100644 --- a/socket.c +++ b/socket.c @@ -32,7 +32,6 @@ #include #include #include -#include #include #include #include diff --git a/stream.c b/stream.c index 57245de1..fb0b9fc1 100644 --- a/stream.c +++ b/stream.c @@ -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); diff --git a/stream.h b/stream.h index 12750639..42a1464e 100644 --- a/stream.h +++ b/stream.h @@ -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); diff --git a/struct.c b/struct.c index 41773692..dbff36a1 100644 --- a/struct.c +++ b/struct.c @@ -28,7 +28,6 @@ #include #include #include -#include #include #include #include diff --git a/strudel.c b/strudel.c index f30cd4e5..e2f49d69 100644 --- a/strudel.c +++ b/strudel.c @@ -31,7 +31,6 @@ #include #include #include -#include #include #include "config.h" #include ALLOCA_H diff --git a/sysif.c b/sysif.c index b3b9c5b9..5ba65ebf 100644 --- a/sysif.c +++ b/sysif.c @@ -31,7 +31,6 @@ #include #include #include -#include #include #include #include "config.h" diff --git a/syslog.c b/syslog.c index af46bce3..cd2e8ca8 100644 --- a/syslog.c +++ b/syslog.c @@ -31,7 +31,6 @@ #include #include #include -#include #include #include "config.h" #include ALLOCA_H diff --git a/termios.c b/termios.c index a8db3c38..ce2ed01a 100644 --- a/termios.c +++ b/termios.c @@ -32,7 +32,6 @@ #include #include #include -#include #include #include "config.h" #include diff --git a/txr.c b/txr.c index 8c9283d1..81174891 100644 --- a/txr.c +++ b/txr.c @@ -28,7 +28,6 @@ #include #include #include -#include #include #include #include diff --git a/unwind.c b/unwind.c index 43be43fb..34ce8792 100644 --- a/unwind.c +++ b/unwind.c @@ -30,7 +30,6 @@ #include #include #include -#include #include #include #include "config.h" diff --git a/vm.c b/vm.c index 7aa463c9..331f0814 100644 --- a/vm.c +++ b/vm.c @@ -28,7 +28,6 @@ #include #include #include -#include #include #include #include -- cgit v1.2.3