aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorGravatar David Adam <zanchey@ucc.gu.uwa.edu.au>2015-07-29 09:30:19 +0800
committerGravatar David Adam <zanchey@ucc.gu.uwa.edu.au>2015-07-29 09:30:19 +0800
commita6a16808e34966fa8650fdda0538ba85a8019c5e (patch)
tree3d731ab1a78551aea75e6dd321918a4f61c857b0
parentaee71b594b11d4bc6b5be9f4c6febb35c41a3096 (diff)
parent958880d97251b09af5c639a11d914067929e91af (diff)
Merge branch 'iwyu'
-rw-r--r--Makefile.in322
-rw-r--r--src/autoload.cpp11
-rw-r--r--src/autoload.h7
-rw-r--r--src/builtin.cpp19
-rw-r--r--src/builtin.h5
-rw-r--r--src/builtin_test.cpp2
-rw-r--r--src/color.cpp7
-rw-r--r--src/color.h5
-rw-r--r--src/common.cpp30
-rw-r--r--src/common.h9
-rw-r--r--src/complete.cpp28
-rw-r--r--src/complete.h4
-rw-r--r--src/env.cpp32
-rw-r--r--src/env.h3
-rw-r--r--src/env_universal_common.cpp23
-rw-r--r--src/env_universal_common.h11
-rw-r--r--src/event.cpp19
-rw-r--r--src/event.h3
-rw-r--r--src/exec.cpp27
-rw-r--r--src/exec.h5
-rw-r--r--src/expand.cpp16
-rw-r--r--src/expand.h8
-rw-r--r--src/fish.cpp22
-rw-r--r--src/fish_indent.cpp11
-rw-r--r--src/function.cpp21
-rw-r--r--src/function.h4
-rw-r--r--src/highlight.cpp19
-rw-r--r--src/highlight.h7
-rw-r--r--src/history.cpp15
-rw-r--r--src/history.h9
-rw-r--r--src/input.cpp28
-rw-r--r--src/input.h8
-rw-r--r--src/input_common.cpp12
-rw-r--r--src/input_common.h2
-rw-r--r--src/intern.cpp14
-rw-r--r--src/intern.h2
-rw-r--r--src/io.cpp33
-rw-r--r--src/io.h4
-rw-r--r--src/iothread.cpp9
-rw-r--r--src/kill.cpp23
-rw-r--r--src/kill.h2
-rw-r--r--src/lru.h1
-rw-r--r--src/output.cpp26
-rw-r--r--src/output.h5
-rw-r--r--src/pager.cpp13
-rw-r--r--src/pager.h4
-rw-r--r--src/parse_execution.cpp22
-rw-r--r--src/parse_execution.h8
-rw-r--r--src/parse_productions.cpp3
-rw-r--r--src/parse_productions.h7
-rw-r--r--src/parse_tree.cpp13
-rw-r--r--src/parse_tree.h8
-rw-r--r--src/parse_util.cpp22
-rw-r--r--src/parse_util.h10
-rw-r--r--src/parser.cpp24
-rw-r--r--src/parser.h10
-rw-r--r--src/parser_keywords.cpp8
-rw-r--r--src/parser_keywords.h2
-rw-r--r--src/path.cpp13
-rw-r--r--src/path.h2
-rw-r--r--src/postfork.cpp9
-rw-r--r--src/postfork.h11
-rw-r--r--src/print_help.cpp2
-rw-r--r--src/proc.cpp22
-rw-r--r--src/proc.h8
-rw-r--r--src/reader.cpp30
-rw-r--r--src/reader.h6
-rw-r--r--src/sanity.cpp17
-rw-r--r--src/sanity.h2
-rw-r--r--src/screen.cpp7
-rw-r--r--src/screen.h3
-rw-r--r--src/signal.cpp12
-rw-r--r--src/tokenizer.cpp15
-rw-r--r--src/tokenizer.h2
-rw-r--r--src/utf8.cpp3
-rw-r--r--src/utf8.h3
-rw-r--r--src/wcstringutil.cpp2
-rw-r--r--src/wcstringutil.h1
-rw-r--r--src/wgetopt.cpp11
-rw-r--r--src/wildcard.cpp16
-rw-r--r--src/wildcard.h3
-rw-r--r--src/wutil.cpp9
-rw-r--r--src/wutil.h8
83 files changed, 506 insertions, 738 deletions
diff --git a/Makefile.in b/Makefile.in
index 171b03be..f6bc306d 100644
--- a/Makefile.in
+++ b/Makefile.in
@@ -869,78 +869,65 @@ clean:
# DO NOT DELETE THIS LINE -- make depend depends on it.
-obj/autoload.o: config.h src/autoload.h src/common.h src/util.h src/lru.h
-obj/autoload.o: src/wutil.h src/signal.h src/env.h src/exec.h src/proc.h
-obj/autoload.o: src/io.h src/parse_tree.h src/tokenizer.h
-obj/autoload.o: src/parse_constants.h
-obj/builtin.o: config.h src/signal.h src/fallback.h src/util.h src/wutil.h
-obj/builtin.o: src/common.h src/builtin.h src/io.h src/function.h src/event.h
-obj/builtin.o: src/env.h src/complete.h src/proc.h src/parse_tree.h
-obj/builtin.o: src/tokenizer.h src/parse_constants.h src/parser.h
-obj/builtin.o: src/reader.h src/highlight.h src/color.h src/wgetopt.h
-obj/builtin.o: src/sanity.h src/wildcard.h src/expand.h src/input_common.h
-obj/builtin.o: src/input.h src/intern.h src/exec.h src/parse_util.h
-obj/builtin.o: src/autoload.h src/lru.h src/parser_keywords.h src/path.h
-obj/builtin.o: src/history.h src/wcstringutil.h src/builtin_set.cpp
+obj/autoload.o: config.h src/autoload.h src/common.h src/fallback.h
+obj/autoload.o: src/signal.h src/lru.h src/wutil.h src/env.h src/exec.h
+obj/builtin.o: config.h src/signal.h src/fallback.h src/wutil.h src/common.h
+obj/builtin.o: src/builtin.h src/io.h src/function.h src/event.h src/env.h
+obj/builtin.o: src/complete.h src/proc.h src/parse_tree.h src/tokenizer.h
+obj/builtin.o: src/parse_constants.h src/parser.h src/reader.h
+obj/builtin.o: src/highlight.h src/color.h src/wgetopt.h src/input.h
+obj/builtin.o: src/input_common.h src/intern.h src/exec.h src/parse_util.h
+obj/builtin.o: src/parser_keywords.h src/expand.h src/path.h src/history.h
+obj/builtin.o: src/wcstringutil.h src/builtin_set.cpp src/util.h
obj/builtin.o: src/builtin_commandline.cpp src/builtin_complete.cpp
obj/builtin.o: src/builtin_ulimit.cpp src/builtin_jobs.cpp
-obj/builtin.o: src/builtin_set_color.cpp src/output.h src/screen.h
-obj/builtin.o: src/builtin_printf.cpp
-obj/builtin_test.o: config.h src/common.h src/util.h src/builtin.h src/io.h
-obj/builtin_test.o: src/wutil.h src/proc.h src/signal.h src/parse_tree.h
-obj/builtin_test.o: src/tokenizer.h src/parse_constants.h
-obj/color.o: src/color.h config.h src/common.h src/util.h src/fallback.h
-obj/color.o: src/signal.h
-obj/common.o: config.h src/fallback.h src/signal.h src/util.h src/wutil.h
-obj/common.o: src/common.h src/expand.h src/parse_constants.h src/proc.h
-obj/common.o: src/io.h src/parse_tree.h src/tokenizer.h src/wildcard.h
-obj/common.o: src/complete.h src/parser.h src/event.h src/function.h
-obj/common.o: src/env.h src/util.cpp src/fallback.cpp
-obj/complete.o: config.h src/signal.h src/fallback.h src/util.h
-obj/complete.o: src/tokenizer.h src/common.h src/wildcard.h src/expand.h
+obj/builtin.o: src/builtin_set_color.cpp src/output.h src/builtin_printf.cpp
+obj/builtin_test.o: config.h src/common.h src/fallback.h src/signal.h
+obj/builtin_test.o: src/builtin.h src/io.h src/wutil.h src/proc.h
+obj/builtin_test.o: src/parse_tree.h src/tokenizer.h src/parse_constants.h
+obj/color.o: src/color.h src/common.h config.h src/fallback.h src/signal.h
+obj/common.o: config.h src/signal.h src/fallback.h src/wutil.h src/common.h
+obj/common.o: src/expand.h src/parse_constants.h src/wildcard.h
+obj/common.o: src/complete.h src/util.cpp src/util.h src/fallback.cpp
+obj/complete.o: config.h src/fallback.h src/signal.h src/util.h
+obj/complete.o: src/wildcard.h src/common.h src/expand.h
obj/complete.o: src/parse_constants.h src/complete.h src/proc.h src/io.h
-obj/complete.o: src/parse_tree.h src/parser.h src/event.h src/function.h
-obj/complete.o: src/env.h src/builtin.h src/exec.h src/reader.h
-obj/complete.o: src/highlight.h src/color.h src/history.h src/wutil.h
-obj/complete.o: src/intern.h src/parse_util.h src/autoload.h src/lru.h
-obj/complete.o: src/parser_keywords.h src/path.h src/iothread.h
-obj/env.o: config.h src/signal.h src/fallback.h src/util.h src/wutil.h
-obj/env.o: src/common.h src/proc.h src/io.h src/parse_tree.h src/tokenizer.h
+obj/complete.o: src/parse_tree.h src/tokenizer.h src/parser.h src/event.h
+obj/complete.o: src/function.h src/env.h src/builtin.h src/exec.h
+obj/complete.o: src/parse_util.h src/wutil.h src/path.h src/iothread.h
+obj/complete.o: src/autoload.h src/lru.h
+obj/env.o: config.h src/fallback.h src/signal.h src/wutil.h src/common.h
+obj/env.o: src/proc.h src/io.h src/parse_tree.h src/tokenizer.h
obj/env.o: src/parse_constants.h src/env.h src/sanity.h src/expand.h
obj/env.o: src/history.h src/reader.h src/complete.h src/highlight.h
-obj/env.o: src/color.h src/parser.h src/event.h src/function.h
-obj/env.o: src/env_universal_common.h src/input.h src/input_common.h
-obj/env.o: src/path.h src/fish_version.h
-obj/env_universal_common.o: config.h src/env_universal_common.h src/wutil.h
-obj/env_universal_common.o: src/common.h src/util.h src/env.h src/fallback.h
-obj/env_universal_common.o: src/signal.h src/utf8.h src/path.h src/iothread.h
-obj/event.o: config.h src/signal.h src/fallback.h src/util.h src/wutil.h
-obj/event.o: src/common.h src/function.h src/event.h src/env.h
+obj/env.o: src/color.h src/env_universal_common.h src/input.h
+obj/env.o: src/input_common.h src/event.h src/path.h src/fish_version.h
+obj/env_universal_common.o: config.h src/env_universal_common.h src/common.h
+obj/env_universal_common.o: src/fallback.h src/signal.h src/wutil.h src/env.h
+obj/env_universal_common.o: src/util.h src/utf8.h
+obj/event.o: config.h src/signal.h src/fallback.h src/wutil.h src/common.h
obj/event.o: src/input_common.h src/proc.h src/io.h src/parse_tree.h
-obj/event.o: src/tokenizer.h src/parse_constants.h src/parser.h
-obj/exec.o: config.h src/signal.h src/fallback.h src/util.h src/iothread.h
-obj/exec.o: src/postfork.h src/common.h src/proc.h src/io.h src/parse_tree.h
-obj/exec.o: src/tokenizer.h src/parse_constants.h src/wutil.h src/exec.h
-obj/exec.o: src/parser.h src/event.h src/function.h src/env.h src/builtin.h
-obj/exec.o: src/wildcard.h src/expand.h src/complete.h src/sanity.h
-obj/exec.o: src/parse_util.h src/autoload.h src/lru.h
-obj/expand.o: config.h src/signal.h src/fallback.h src/util.h src/common.h
+obj/event.o: src/tokenizer.h src/parse_constants.h src/parser.h src/event.h
+obj/exec.o: config.h src/signal.h src/fallback.h src/postfork.h src/io.h
+obj/exec.o: src/common.h src/wutil.h src/proc.h src/parse_tree.h
+obj/exec.o: src/tokenizer.h src/parse_constants.h src/exec.h src/parser.h
+obj/exec.o: src/event.h src/builtin.h src/function.h src/env.h
+obj/exec.o: src/parse_util.h
+obj/expand.o: config.h src/fallback.h src/signal.h src/util.h src/common.h
obj/expand.o: src/wutil.h src/env.h src/proc.h src/io.h src/parse_tree.h
obj/expand.o: src/tokenizer.h src/parse_constants.h src/parser.h src/event.h
-obj/expand.o: src/function.h src/expand.h src/wildcard.h src/complete.h
-obj/expand.o: src/exec.h src/iothread.h src/parse_util.h src/autoload.h
-obj/expand.o: src/lru.h
-obj/fish.o: config.h src/signal.h src/fallback.h src/util.h src/common.h
-obj/fish.o: src/reader.h src/io.h src/complete.h src/highlight.h src/env.h
-obj/fish.o: src/color.h src/parse_constants.h src/builtin.h src/function.h
-obj/fish.o: src/event.h src/wutil.h src/sanity.h src/proc.h src/parse_tree.h
-obj/fish.o: src/tokenizer.h src/parser.h src/expand.h src/intern.h src/exec.h
-obj/fish.o: src/output.h src/screen.h src/history.h src/path.h src/input.h
-obj/fish.o: src/input_common.h src/fish_version.h
-obj/fish_indent.o: config.h src/wutil.h src/common.h src/util.h src/output.h
-obj/fish_indent.o: src/fallback.h src/signal.h src/screen.h src/highlight.h
-obj/fish_indent.o: src/env.h src/color.h src/input.h src/input_common.h
-obj/fish_indent.o: src/parse_tree.h src/tokenizer.h src/parse_constants.h
+obj/expand.o: src/expand.h src/wildcard.h src/complete.h src/exec.h
+obj/expand.o: src/iothread.h src/parse_util.h
+obj/fish.o: config.h src/fallback.h src/signal.h src/common.h src/reader.h
+obj/fish.o: src/io.h src/complete.h src/highlight.h src/env.h src/color.h
+obj/fish.o: src/parse_constants.h src/builtin.h src/function.h src/event.h
+obj/fish.o: src/wutil.h src/proc.h src/parse_tree.h src/tokenizer.h
+obj/fish.o: src/parser.h src/expand.h src/intern.h src/history.h src/path.h
+obj/fish.o: src/input.h src/input_common.h src/fish_version.h
+obj/fish_indent.o: config.h src/color.h src/common.h src/fallback.h
+obj/fish_indent.o: src/signal.h src/highlight.h src/env.h
+obj/fish_indent.o: src/parse_constants.h src/wutil.h src/output.h src/input.h
+obj/fish_indent.o: src/input_common.h src/parse_tree.h src/tokenizer.h
obj/fish_indent.o: src/print_help.h src/fish_version.h
obj/fish_tests.o: config.h src/signal.h src/fallback.h src/util.h
obj/fish_tests.o: src/common.h src/proc.h src/io.h src/parse_tree.h
@@ -948,134 +935,119 @@ obj/fish_tests.o: src/tokenizer.h src/parse_constants.h src/reader.h
obj/fish_tests.o: src/complete.h src/highlight.h src/env.h src/color.h
obj/fish_tests.o: src/builtin.h src/function.h src/event.h src/autoload.h
obj/fish_tests.o: src/lru.h src/wutil.h src/expand.h src/parser.h
-obj/fish_tests.o: src/output.h src/screen.h src/exec.h src/path.h
-obj/fish_tests.o: src/history.h src/iothread.h src/postfork.h
-obj/fish_tests.o: src/parse_util.h src/pager.h src/input.h src/input_common.h
-obj/fish_tests.o: src/utf8.h src/env_universal_common.h src/wcstringutil.h
+obj/fish_tests.o: src/output.h src/exec.h src/path.h src/history.h
+obj/fish_tests.o: src/iothread.h src/postfork.h src/parse_util.h src/pager.h
+obj/fish_tests.o: src/screen.h src/input.h src/input_common.h src/utf8.h
+obj/fish_tests.o: src/env_universal_common.h src/wcstringutil.h
obj/fish_version.o: src/fish_version.h
-obj/function.o: config.h src/signal.h src/wutil.h src/common.h src/util.h
-obj/function.o: src/fallback.h src/function.h src/event.h src/env.h
-obj/function.o: src/proc.h src/io.h src/parse_tree.h src/tokenizer.h
-obj/function.o: src/parse_constants.h src/parser.h src/intern.h src/reader.h
-obj/function.o: src/complete.h src/highlight.h src/color.h src/parse_util.h
-obj/function.o: src/autoload.h src/lru.h src/parser_keywords.h src/expand.h
-obj/highlight.o: config.h src/signal.h src/fallback.h src/util.h src/wutil.h
+obj/function.o: config.h src/wutil.h src/common.h src/fallback.h src/signal.h
+obj/function.o: src/autoload.h src/lru.h src/function.h src/event.h src/env.h
+obj/function.o: src/intern.h src/reader.h src/io.h src/complete.h
+obj/function.o: src/highlight.h src/color.h src/parse_constants.h
+obj/function.o: src/parser_keywords.h
+obj/highlight.o: config.h src/fallback.h src/signal.h src/wutil.h
obj/highlight.o: src/common.h src/highlight.h src/env.h src/color.h
-obj/highlight.o: src/tokenizer.h src/proc.h src/io.h src/parse_tree.h
-obj/highlight.o: src/parse_constants.h src/parser.h src/event.h
-obj/highlight.o: src/function.h src/parse_util.h src/autoload.h src/lru.h
-obj/highlight.o: src/parser_keywords.h src/builtin.h src/expand.h
-obj/highlight.o: src/sanity.h src/complete.h src/output.h src/screen.h
-obj/highlight.o: src/wildcard.h src/path.h src/history.h
-obj/history.o: config.h src/fallback.h src/signal.h src/util.h src/sanity.h
-obj/history.o: src/tokenizer.h src/common.h src/reader.h src/io.h
-obj/history.o: src/complete.h src/highlight.h src/env.h src/color.h
-obj/history.o: src/parse_constants.h src/parse_tree.h src/wutil.h
-obj/history.o: src/history.h src/intern.h src/path.h src/autoload.h src/lru.h
-obj/history.o: src/iothread.h
-obj/input.o: config.h src/signal.h src/fallback.h src/util.h src/wutil.h
-obj/input.o: src/common.h src/reader.h src/io.h src/complete.h
-obj/input.o: src/highlight.h src/env.h src/color.h src/parse_constants.h
-obj/input.o: src/proc.h src/parse_tree.h src/tokenizer.h src/sanity.h
-obj/input.o: src/input_common.h src/input.h src/parser.h src/event.h
-obj/input.o: src/function.h src/expand.h src/output.h src/screen.h
-obj/input.o: src/intern.h
+obj/highlight.o: src/tokenizer.h src/parse_util.h src/parse_constants.h
+obj/highlight.o: src/builtin.h src/io.h src/function.h src/event.h
+obj/highlight.o: src/expand.h src/output.h src/wildcard.h src/complete.h
+obj/highlight.o: src/path.h src/history.h src/parse_tree.h
+obj/history.o: config.h src/fallback.h src/signal.h src/sanity.h src/reader.h
+obj/history.o: src/io.h src/common.h src/complete.h src/highlight.h src/env.h
+obj/history.o: src/color.h src/parse_constants.h src/parse_tree.h
+obj/history.o: src/tokenizer.h src/wutil.h src/history.h src/path.h
+obj/history.o: src/iothread.h src/lru.h
+obj/input.o: config.h src/fallback.h src/signal.h src/wutil.h src/common.h
+obj/input.o: src/reader.h src/io.h src/complete.h src/highlight.h src/env.h
+obj/input.o: src/color.h src/parse_constants.h src/proc.h src/parse_tree.h
+obj/input.o: src/tokenizer.h src/input_common.h src/input.h src/parser.h
+obj/input.o: src/event.h src/output.h
obj/input_common.o: config.h src/fallback.h src/signal.h src/util.h
-obj/input_common.o: src/common.h src/wutil.h src/input_common.h
-obj/input_common.o: src/env_universal_common.h src/env.h src/iothread.h
-obj/intern.o: config.h src/fallback.h src/signal.h src/util.h src/wutil.h
-obj/intern.o: src/common.h src/intern.h
-obj/io.o: config.h src/fallback.h src/signal.h src/util.h src/wutil.h
-obj/io.o: src/common.h src/exec.h src/proc.h src/io.h src/parse_tree.h
-obj/io.o: src/tokenizer.h src/parse_constants.h
-obj/iothread.o: config.h src/iothread.h src/common.h src/util.h src/signal.h
-obj/key_reader.o: config.h src/common.h src/util.h src/fallback.h
-obj/key_reader.o: src/signal.h src/input_common.h
-obj/kill.o: config.h src/signal.h src/fallback.h src/util.h src/wutil.h
-obj/kill.o: src/common.h src/kill.h src/proc.h src/io.h src/parse_tree.h
-obj/kill.o: src/tokenizer.h src/parse_constants.h src/sanity.h src/env.h
-obj/kill.o: src/exec.h src/path.h
-obj/output.o: config.h src/signal.h src/fallback.h src/util.h src/wutil.h
-obj/output.o: src/common.h src/expand.h src/parse_constants.h src/output.h
-obj/output.o: src/screen.h src/highlight.h src/env.h src/color.h
-obj/pager.o: config.h src/pager.h src/complete.h src/util.h src/common.h
-obj/pager.o: src/screen.h src/highlight.h src/env.h src/color.h src/reader.h
-obj/pager.o: src/io.h src/parse_constants.h src/input_common.h src/wutil.h
-obj/parse_execution.o: src/parse_execution.h config.h src/util.h
-obj/parse_execution.o: src/parse_tree.h src/common.h src/tokenizer.h
-obj/parse_execution.o: src/parse_constants.h src/proc.h src/signal.h src/io.h
-obj/parse_execution.o: src/parse_util.h src/autoload.h src/lru.h
-obj/parse_execution.o: src/complete.h src/wildcard.h src/expand.h
-obj/parse_execution.o: src/builtin.h src/parser.h src/event.h src/function.h
-obj/parse_execution.o: src/env.h src/reader.h src/highlight.h src/color.h
-obj/parse_execution.o: src/wutil.h src/exec.h src/path.h
-obj/parse_productions.o: src/parse_productions.h src/parse_tree.h config.h
-obj/parse_productions.o: src/util.h src/common.h src/tokenizer.h
-obj/parse_productions.o: src/parse_constants.h
-obj/parse_tree.o: src/parse_productions.h src/parse_tree.h config.h
-obj/parse_tree.o: src/util.h src/common.h src/tokenizer.h
-obj/parse_tree.o: src/parse_constants.h src/fallback.h src/signal.h
-obj/parse_tree.o: src/wutil.h src/proc.h src/io.h src/expand.h
+obj/input_common.o: src/common.h src/input_common.h
+obj/input_common.o: src/env_universal_common.h src/wutil.h src/env.h
+obj/input_common.o: src/iothread.h
+obj/intern.o: config.h src/fallback.h src/signal.h src/common.h src/intern.h
+obj/io.o: config.h src/fallback.h src/signal.h src/wutil.h src/common.h
+obj/io.o: src/exec.h src/io.h
+obj/iothread.o: config.h src/iothread.h src/common.h src/fallback.h
+obj/iothread.o: src/signal.h
+obj/key_reader.o: config.h src/common.h src/fallback.h src/signal.h
+obj/key_reader.o: src/input_common.h
+obj/kill.o: config.h src/fallback.h src/signal.h src/kill.h src/common.h
+obj/kill.o: src/env.h src/exec.h src/path.h
+obj/output.o: config.h src/fallback.h src/signal.h src/wutil.h src/common.h
+obj/output.o: src/output.h src/color.h
+obj/pager.o: config.h src/util.h src/wutil.h src/common.h src/fallback.h
+obj/pager.o: src/signal.h src/pager.h src/complete.h src/screen.h
+obj/pager.o: src/highlight.h src/env.h src/color.h src/reader.h src/io.h
+obj/pager.o: src/parse_constants.h
+obj/parse_execution.o: src/parse_execution.h src/common.h config.h
+obj/parse_execution.o: src/fallback.h src/signal.h src/io.h
+obj/parse_execution.o: src/parse_constants.h src/parse_tree.h src/tokenizer.h
+obj/parse_execution.o: src/proc.h src/env.h src/event.h src/util.h
+obj/parse_execution.o: src/parse_util.h src/complete.h src/wildcard.h
+obj/parse_execution.o: src/expand.h src/parser.h src/reader.h src/highlight.h
+obj/parse_execution.o: src/color.h src/wutil.h src/path.h src/function.h
+obj/parse_execution.o: src/builtin.h src/exec.h
+obj/parse_productions.o: src/parse_productions.h src/common.h config.h
+obj/parse_productions.o: src/fallback.h src/signal.h src/parse_constants.h
+obj/parse_productions.o: src/parse_tree.h src/tokenizer.h
+obj/parse_tree.o: src/common.h config.h src/fallback.h src/signal.h
+obj/parse_tree.o: src/parse_constants.h src/parse_productions.h
+obj/parse_tree.o: src/parse_tree.h src/tokenizer.h src/wutil.h src/proc.h
+obj/parse_tree.o: src/io.h
obj/parse_util.o: config.h src/fallback.h src/signal.h src/util.h src/wutil.h
obj/parse_util.o: src/common.h src/tokenizer.h src/parse_util.h
-obj/parse_util.o: src/autoload.h src/lru.h src/parse_tree.h
-obj/parse_util.o: src/parse_constants.h src/expand.h src/intern.h src/exec.h
-obj/parse_util.o: src/proc.h src/io.h src/env.h src/wildcard.h src/complete.h
-obj/parse_util.o: src/parser.h src/event.h src/function.h src/builtin.h
-obj/parser.o: config.h src/fallback.h src/signal.h src/util.h src/common.h
-obj/parser.o: src/wutil.h src/proc.h src/io.h src/parse_tree.h
-obj/parser.o: src/tokenizer.h src/parse_constants.h src/parser.h src/event.h
-obj/parser.o: src/function.h src/env.h src/parser_keywords.h src/exec.h
-obj/parser.o: src/wildcard.h src/expand.h src/complete.h src/builtin.h
-obj/parser.o: src/reader.h src/highlight.h src/color.h src/sanity.h
-obj/parser.o: src/intern.h src/parse_util.h src/autoload.h src/lru.h
-obj/parser.o: src/path.h src/parse_execution.h
+obj/parse_util.o: src/parse_constants.h src/expand.h src/env.h src/wildcard.h
+obj/parse_util.o: src/complete.h src/parse_tree.h src/builtin.h src/io.h
+obj/parser.o: config.h src/fallback.h src/signal.h src/common.h src/wutil.h
+obj/parser.o: src/proc.h src/io.h src/parse_tree.h src/tokenizer.h
+obj/parser.o: src/parse_constants.h src/parser.h src/event.h src/function.h
+obj/parser.o: src/env.h src/expand.h src/reader.h src/complete.h
+obj/parser.o: src/highlight.h src/color.h src/sanity.h src/intern.h
+obj/parser.o: src/parse_util.h src/parse_execution.h
obj/parser_keywords.o: config.h src/fallback.h src/signal.h src/common.h
-obj/parser_keywords.o: src/util.h src/parser_keywords.h
-obj/path.o: config.h src/fallback.h src/signal.h src/util.h src/common.h
-obj/path.o: src/env.h src/wutil.h src/path.h src/expand.h
-obj/path.o: src/parse_constants.h
-obj/postfork.o: src/signal.h src/postfork.h config.h src/common.h src/util.h
-obj/postfork.o: src/proc.h src/io.h src/parse_tree.h src/tokenizer.h
-obj/postfork.o: src/parse_constants.h src/wutil.h src/iothread.h src/exec.h
+obj/parser_keywords.o: src/parser_keywords.h
+obj/path.o: config.h src/fallback.h src/signal.h src/common.h src/env.h
+obj/path.o: src/wutil.h src/path.h src/expand.h src/parse_constants.h
+obj/postfork.o: src/signal.h src/common.h config.h src/fallback.h src/proc.h
+obj/postfork.o: src/io.h src/parse_tree.h src/tokenizer.h
+obj/postfork.o: src/parse_constants.h src/wutil.h src/postfork.h
+obj/postfork.o: src/iothread.h src/exec.h
obj/print_help.o: src/print_help.h
obj/proc.o: config.h src/signal.h src/fallback.h src/util.h src/wutil.h
obj/proc.o: src/common.h src/proc.h src/io.h src/parse_tree.h src/tokenizer.h
obj/proc.o: src/parse_constants.h src/reader.h src/complete.h src/highlight.h
obj/proc.o: src/env.h src/color.h src/sanity.h src/parser.h src/event.h
-obj/proc.o: src/function.h src/output.h src/screen.h
+obj/proc.o: src/output.h
obj/reader.o: config.h src/signal.h src/fallback.h src/util.h src/wutil.h
obj/reader.o: src/common.h src/highlight.h src/env.h src/color.h src/reader.h
obj/reader.o: src/io.h src/complete.h src/parse_constants.h src/proc.h
obj/reader.o: src/parse_tree.h src/tokenizer.h src/parser.h src/event.h
-obj/reader.o: src/function.h src/history.h src/sanity.h src/exec.h
-obj/reader.o: src/expand.h src/kill.h src/input_common.h src/input.h
-obj/reader.o: src/output.h src/screen.h src/iothread.h src/intern.h
-obj/reader.o: src/path.h src/parse_util.h src/autoload.h src/lru.h
-obj/reader.o: src/parser_keywords.h src/pager.h
-obj/sanity.o: config.h src/signal.h src/fallback.h src/util.h src/common.h
-obj/sanity.o: src/sanity.h src/proc.h src/io.h src/parse_tree.h
-obj/sanity.o: src/tokenizer.h src/parse_constants.h src/history.h src/wutil.h
-obj/sanity.o: src/reader.h src/complete.h src/highlight.h src/env.h
-obj/sanity.o: src/color.h src/kill.h
+obj/reader.o: src/history.h src/sanity.h src/exec.h src/expand.h src/kill.h
+obj/reader.o: src/input_common.h src/input.h src/function.h src/output.h
+obj/reader.o: src/screen.h src/iothread.h src/intern.h src/parse_util.h
+obj/reader.o: src/pager.h
+obj/sanity.o: config.h src/fallback.h src/signal.h src/common.h src/sanity.h
+obj/sanity.o: src/proc.h src/io.h src/parse_tree.h src/tokenizer.h
+obj/sanity.o: src/parse_constants.h src/history.h src/wutil.h src/reader.h
+obj/sanity.o: src/complete.h src/highlight.h src/env.h src/color.h src/kill.h
obj/screen.o: config.h src/fallback.h src/signal.h src/common.h src/util.h
-obj/screen.o: src/wutil.h src/output.h src/screen.h src/highlight.h src/env.h
-obj/screen.o: src/color.h src/pager.h src/complete.h src/reader.h src/io.h
+obj/screen.o: src/output.h src/color.h src/highlight.h src/env.h src/screen.h
+obj/screen.o: src/pager.h src/complete.h src/reader.h src/io.h
obj/screen.o: src/parse_constants.h
-obj/signal.o: config.h src/signal.h src/common.h src/util.h src/fallback.h
-obj/signal.o: src/wutil.h src/event.h src/reader.h src/io.h src/complete.h
+obj/signal.o: config.h src/signal.h src/common.h src/fallback.h src/wutil.h
+obj/signal.o: src/event.h src/reader.h src/io.h src/complete.h
obj/signal.o: src/highlight.h src/env.h src/color.h src/parse_constants.h
obj/signal.o: src/proc.h src/parse_tree.h src/tokenizer.h
-obj/tokenizer.o: config.h src/fallback.h src/signal.h src/util.h src/wutil.h
-obj/tokenizer.o: src/common.h src/tokenizer.h
+obj/tokenizer.o: config.h src/fallback.h src/signal.h src/common.h
+obj/tokenizer.o: src/wutil.h src/tokenizer.h
obj/utf8.o: src/utf8.h
-obj/wcstringutil.o: config.h src/wcstringutil.h src/common.h src/util.h
-obj/wgetopt.o: config.h src/wgetopt.h src/wutil.h src/common.h src/util.h
-obj/wgetopt.o: src/fallback.h src/signal.h
-obj/wildcard.o: config.h src/fallback.h src/signal.h src/util.h src/wutil.h
-obj/wildcard.o: src/common.h src/complete.h src/wildcard.h src/expand.h
-obj/wildcard.o: src/parse_constants.h src/reader.h src/io.h src/highlight.h
-obj/wildcard.o: src/env.h src/color.h src/exec.h src/proc.h src/parse_tree.h
-obj/wildcard.o: src/tokenizer.h
-obj/wutil.o: config.h src/fallback.h src/signal.h src/util.h src/common.h
-obj/wutil.o: src/wutil.h
+obj/wcstringutil.o: config.h src/wcstringutil.h src/common.h src/fallback.h
+obj/wcstringutil.o: src/signal.h
+obj/wgetopt.o: config.h src/common.h src/fallback.h src/signal.h
+obj/wgetopt.o: src/wgetopt.h src/wutil.h
+obj/wildcard.o: config.h src/fallback.h src/signal.h src/wutil.h src/common.h
+obj/wildcard.o: src/wildcard.h src/expand.h src/parse_constants.h
+obj/wildcard.o: src/complete.h src/reader.h src/io.h src/highlight.h
+obj/wildcard.o: src/env.h src/color.h
+obj/wutil.o: config.h src/fallback.h src/signal.h src/common.h src/wutil.h
diff --git a/src/autoload.cpp b/src/autoload.cpp
index e0c16ab8..c5029362 100644
--- a/src/autoload.cpp
+++ b/src/autoload.cpp
@@ -3,14 +3,21 @@
The classes responsible for autoloading functions and completions.
*/
-#include "config.h"
+#include "config.h" // IWYU pragma: keep
#include "autoload.h"
#include "wutil.h"
#include "common.h"
-#include "signal.h"
+#include "signal.h" // IWYU pragma: keep - needed for CHECK_BLOCK
#include "env.h"
#include "exec.h"
#include <assert.h>
+#include <errno.h>
+#include <sys/stat.h>
+#include <unistd.h>
+#include <wchar.h>
+#include <string>
+#include <utility>
+#include <vector>
#include <algorithm>
/* The time before we'll recheck an autoloaded file */
diff --git a/src/autoload.h b/src/autoload.h
index 08a67866..c364a4c3 100644
--- a/src/autoload.h
+++ b/src/autoload.h
@@ -6,10 +6,10 @@
#ifndef FISH_AUTOLOAD_H
#define FISH_AUTOLOAD_H
-#include <wchar.h>
-#include <map>
+#include <pthread.h>
+#include <stddef.h>
+#include <time.h>
#include <set>
-#include <list>
#include "common.h"
#include "lru.h"
@@ -40,7 +40,6 @@ struct builtin_script_t
const char *def;
};
-struct builtin_script_t;
class env_vars_snapshot_t;
/**
diff --git a/src/builtin.cpp b/src/builtin.cpp
index 51aa445a..039dc7bc 100644
--- a/src/builtin.cpp
+++ b/src/builtin.cpp
@@ -17,27 +17,27 @@
*/
-#include "config.h"
+#include "config.h" // IWYU pragma: keep
#include <stdlib.h>
#include <stdio.h>
#include <wchar.h>
#include <unistd.h>
-#include <termios.h>
#include <errno.h>
-#include <sys/types.h>
#include <sys/stat.h>
#include <fcntl.h>
-#include <dirent.h>
#include <string.h>
#include <signal.h>
#include <wctype.h>
-#include <sys/time.h>
#include <time.h>
#include <stack>
+#include <assert.h>
+#include <algorithm>
+#include <map>
+#include <string>
+#include <utility>
-#include "fallback.h"
-#include "util.h"
+#include "fallback.h" // IWYU pragma: keep
#include "wutil.h"
#include "builtin.h"
@@ -47,12 +47,8 @@
#include "parser.h"
#include "reader.h"
#include "env.h"
-#include "common.h"
#include "wgetopt.h"
-#include "sanity.h"
#include "tokenizer.h"
-#include "wildcard.h"
-#include "input_common.h"
#include "input.h"
#include "intern.h"
#include "event.h"
@@ -65,6 +61,7 @@
#include "path.h"
#include "history.h"
#include "parse_tree.h"
+#include "parse_constants.h"
#include "wcstringutil.h"
/**
diff --git a/src/builtin.h b/src/builtin.h
index c280cbd0..4d63fcb2 100644
--- a/src/builtin.h
+++ b/src/builtin.h
@@ -5,12 +5,13 @@
#ifndef FISH_BUILTIN_H
#define FISH_BUILTIN_H
-#include <wchar.h>
+#include <stddef.h> // for size_t
+#include <vector> // for vector
-#include "util.h"
#include "io.h"
#include "common.h"
+class completion_t;
class parser_t;
enum
diff --git a/src/builtin_test.cpp b/src/builtin_test.cpp
index 23369628..84d5fa9c 100644
--- a/src/builtin_test.cpp
+++ b/src/builtin_test.cpp
@@ -10,6 +10,8 @@ Implemented from scratch (yes, really) by way of IEEE 1003.1 as reference.
#include "builtin.h"
#include "wutil.h"
#include "proc.h"
+#include <unistd.h>
+#include <sys/types.h>
#include <sys/stat.h>
#include <memory>
diff --git a/src/color.cpp b/src/color.cpp
index 5b19b900..d076ea17 100644
--- a/src/color.cpp
+++ b/src/color.cpp
@@ -2,7 +2,12 @@
*/
#include "color.h"
-#include "fallback.h"
+#include "fallback.h" // IWYU pragma: keep
+#include <assert.h>
+#include <stdint.h>
+#include <stdlib.h>
+#include <wchar.h>
+#include <cstddef>
bool rgb_color_t::try_parse_special(const wcstring &special)
{
diff --git a/src/color.h b/src/color.h
index b3da47d0..988bfdb8 100644
--- a/src/color.h
+++ b/src/color.h
@@ -3,9 +3,8 @@
#ifndef FISH_COLOR_H
#define FISH_COLOR_H
-#include <stdint.h>
-#include <cstddef>
-#include "config.h"
+#include <string.h>
+#include <string>
#include "common.h"
/* 24 bit color */
diff --git a/src/common.cpp b/src/common.cpp
index 473f3502..ea1cc4e3 100644
--- a/src/common.cpp
+++ b/src/common.cpp
@@ -9,10 +9,6 @@ parts of fish.
#include <unistd.h>
-#ifdef HAVE_STROPTS_H
-#include <stropts.h>
-#endif
-
#ifdef HAVE_SIGINFO_H
#include <siginfo.h>
#endif
@@ -22,53 +18,35 @@ parts of fish.
#include <wchar.h>
#include <string.h>
#include <stdio.h>
-#include <dirent.h>
#include <sys/types.h>
+#include <assert.h>
+#include <math.h>
+#include <signal.h>
+
#ifdef HAVE_SYS_IOCTL_H
#include <sys/ioctl.h>
#endif
#include <sys/stat.h>
-#include <unistd.h>
#include <wctype.h>
#include <errno.h>
#include <limits.h>
#include <stdarg.h>
#include <locale.h>
-#include <time.h>
#include <sys/time.h>
-#include <fcntl.h>
#include <algorithm>
#ifdef HAVE_EXECINFO_H
#include <execinfo.h>
#endif
-#if HAVE_NCURSES_H
-#include <ncurses.h>
-#elif HAVE_NCURSES_CURSES_H
-#include <ncurses/curses.h>
-#else
-#include <curses.h>
-#endif
-
-#if HAVE_TERM_H
-#include <term.h>
-#elif HAVE_NCURSES_TERM_H
-#include <ncurses/term.h>
-#endif
-
#include "fallback.h"
-#include "util.h"
#include "wutil.h"
#include "common.h"
#include "expand.h"
-#include "proc.h"
#include "wildcard.h"
-#include "parser.h"
-#include "complete.h"
#include "util.cpp"
#include "fallback.cpp"
diff --git a/src/common.h b/src/common.h
index f0d55894..e27968fd 100644
--- a/src/common.h
+++ b/src/common.h
@@ -17,10 +17,13 @@
#include <vector>
#include <pthread.h>
#include <string.h>
+#include <stdarg.h>
+#include <stddef.h>
+#include <sys/types.h>
#include <errno.h>
-#include <assert.h>
-#include "util.h"
+#include "config.h"
+#include "fallback.h"
/**
Avoid writing the type name twice in a common "static_cast-initialization".
@@ -28,8 +31,6 @@
*/
#define CAST_INIT(type, dst, src) type dst = static_cast<type >(src)
-class completion_t;
-
/* Common string type */
typedef std::wstring wcstring;
typedef std::vector<wcstring> wcstring_list_t;
diff --git a/src/complete.cpp b/src/complete.cpp
index 7130311e..58799eb2 100644
--- a/src/complete.cpp
+++ b/src/complete.cpp
@@ -4,29 +4,23 @@
*/
#include "config.h"
+#include <assert.h>
#include <stdlib.h>
-#include <stdio.h>
-#include <limits.h>
-#include <string.h>
+#include <stddef.h>
#include <wchar.h>
#include <wctype.h>
-#include <unistd.h>
-#include <sys/types.h>
-#include <sys/stat.h>
-#include <dirent.h>
-#include <errno.h>
-#include <termios.h>
-#include <ctype.h>
#include <pwd.h>
-#include <signal.h>
-#include <wchar.h>
#include <pthread.h>
#include <algorithm>
+#include <list>
+#include <map>
+#include <set>
+#include <string>
+#include <utility>
-#include "fallback.h"
+#include "fallback.h" // IWYU pragma: keep
#include "util.h"
-#include "tokenizer.h"
#include "wildcard.h"
#include "proc.h"
#include "parser.h"
@@ -37,15 +31,13 @@
#include "exec.h"
#include "expand.h"
#include "common.h"
-#include "reader.h"
-#include "history.h"
-#include "intern.h"
#include "parse_util.h"
-#include "parser_keywords.h"
#include "wutil.h"
#include "path.h"
#include "parse_tree.h"
#include "iothread.h"
+#include "autoload.h"
+#include "parse_constants.h"
/*
Completion description strings, mostly for different types of files, such as sockets, block devices, etc.
diff --git a/src/complete.h b/src/complete.h
index d9007707..466ddbe9 100644
--- a/src/complete.h
+++ b/src/complete.h
@@ -12,11 +12,9 @@
*/
#define FISH_COMPLETE_H
-
-#include <wchar.h>
+#include <vector>
#include <stdint.h>
-#include "util.h"
#include "common.h"
/**
* Use all completions
diff --git a/src/env.cpp b/src/env.cpp
index 6b09c07f..649e0f2a 100644
--- a/src/env.cpp
+++ b/src/env.cpp
@@ -1,46 +1,26 @@
/** \file env.c
Functions for setting and getting environment variables.
*/
-#include "config.h"
+#include "config.h" // IWYU pragma: keep
#include <stdlib.h>
#include <wchar.h>
-#include <string.h>
-#include <stdio.h>
#include <locale.h>
#include <unistd.h>
-#include <signal.h>
#include <assert.h>
-#include <sys/types.h>
#include <sys/stat.h>
#include <pthread.h>
#include <pwd.h>
#include <set>
#include <map>
#include <algorithm>
-
-#if HAVE_NCURSES_H
-#include <ncurses.h>
-#elif HAVE_NCURSES_CURSES_H
-#include <ncurses/curses.h>
-#else
-#include <curses.h>
-#endif
-
-#if HAVE_TERM_H
-#include <term.h>
-#elif HAVE_NCURSES_TERM_H
-#include <ncurses/term.h>
-#endif
-
-#if HAVE_LIBINTL_H
-#include <libintl.h>
-#endif
-
#include <errno.h>
+#include <stddef.h>
+#include <wctype.h>
+#include <utility>
+#include <vector>
#include "fallback.h"
-#include "util.h"
#include "wutil.h"
#include "proc.h"
@@ -50,13 +30,11 @@
#include "expand.h"
#include "history.h"
#include "reader.h"
-#include "parser.h"
#include "env_universal_common.h"
#include "input.h"
#include "event.h"
#include "path.h"
-#include "complete.h"
#include "fish_version.h"
/** Value denoting a null string */
diff --git a/src/env.h b/src/env.h
index e69b7fc9..411b51ec 100644
--- a/src/env.h
+++ b/src/env.h
@@ -6,9 +6,10 @@
#define FISH_ENV_H
#include <wchar.h>
+#include <stdint.h>
+#include <string>
#include <map>
-#include "util.h"
#include "common.h"
/* Flags that may be passed as the 'mode' in env_set / env_get_string */
diff --git a/src/env_universal_common.cpp b/src/env_universal_common.cpp
index b493de21..d29381f5 100644
--- a/src/env_universal_common.cpp
+++ b/src/env_universal_common.cpp
@@ -10,26 +10,39 @@
#include "env_universal_common.h"
#include <fcntl.h>
-#include <sys/un.h>
#include <sys/ioctl.h>
#include <sys/mman.h>
#include <sys/file.h>
#include <sys/socket.h>
-#include <arpa/inet.h>
+#include <arpa/inet.h> // IWYU pragma: keep - needed for htonl
#include <pwd.h>
+#include <assert.h>
+#include <errno.h>
+#include <limits.h>
+#include <stdarg.h>
+#include <stddef.h>
+#include <stdint.h>
+#include <stdlib.h>
+#include <string.h>
+#include <sys/stat.h>
+#include <sys/time.h>
+#include <sys/types.h>
+#include <unistd.h>
+#include <wchar.h>
+#include <wctype.h>
+#include <map>
+#include <utility>
#ifdef HAVE_SYS_SELECT_H
#include <sys/select.h>
#endif
-#include "fallback.h"
+#include "fallback.h" // IWYU pragma: keep
#include "util.h"
#include "common.h"
#include "wutil.h"
#include "utf8.h"
-#include "path.h"
-#include "iothread.h"
#if __APPLE__
#define FISH_NOTIFYD_AVAILABLE 1
diff --git a/src/env_universal_common.h b/src/env_universal_common.h
index fcf5b631..7aca60df 100644
--- a/src/env_universal_common.h
+++ b/src/env_universal_common.h
@@ -1,12 +1,13 @@
#ifndef FISH_ENV_UNIVERSAL_COMMON_H
#define FISH_ENV_UNIVERSAL_COMMON_H
-#include <wchar.h>
-#include <queue>
#include <string>
#include <set>
+#include <pthread.h>
+#include <stdio.h>
+#include <vector>
+#include "common.h"
#include "wutil.h"
-#include "util.h"
#include "env.h"
/**
@@ -24,8 +25,6 @@ typedef enum
*/
#define ENV_UNIVERSAL_BUFFER_SIZE 1024
-typedef std::vector<struct callback_data_t> callback_data_list_t;
-
/**
Callback data, reflecting a change in universal variables
*/
@@ -40,6 +39,8 @@ struct callback_data_t
}
};
+typedef std::vector<struct callback_data_t> callback_data_list_t;
+
/** Class representing universal variables */
class env_universal_t
{
diff --git a/src/event.cpp b/src/event.cpp
index 14def5f4..eeff3eb5 100644
--- a/src/event.cpp
+++ b/src/event.cpp
@@ -3,28 +3,23 @@
Functions for handling event triggers
*/
-#include "config.h"
+#include "config.h" // IWYU pragma: keep
-#include <stdlib.h>
-#include <stdio.h>
-#include <wchar.h>
-#include <unistd.h>
-#include <termios.h>
#include <signal.h>
-#include <string.h>
#include <algorithm>
+#include <assert.h>
+#include <stddef.h>
+#include <string>
-#include "fallback.h"
-#include "util.h"
-
-#include "wutil.h"
-#include "function.h"
+#include "fallback.h" // IWYU pragma: keep
+#include "wutil.h" // IWYU pragma: keep - needed for gettext
#include "input_common.h"
#include "proc.h"
#include "parser.h"
#include "common.h"
#include "event.h"
#include "signal.h"
+#include "io.h"
/**
diff --git a/src/event.h b/src/event.h
index 645eeda4..80737596 100644
--- a/src/event.h
+++ b/src/event.h
@@ -12,7 +12,8 @@
#ifndef FISH_EVENT_H
#define FISH_EVENT_H
-#include <memory>
+#include <ctime>
+#include <vector>
#include "common.h"
diff --git a/src/exec.cpp b/src/exec.cpp
index 97229180..d6df94e6 100644
--- a/src/exec.cpp
+++ b/src/exec.cpp
@@ -5,37 +5,32 @@
manual, though the changes performed have been massive.
*/
-#include "config.h"
+#include "config.h" // IWYU pragma: keep
#include <stdlib.h>
#include <stdio.h>
-#include <sys/types.h>
-#include <sys/stat.h>
-#include <termios.h>
#include <unistd.h>
#include <fcntl.h>
#include <errno.h>
#include <wchar.h>
#include <string.h>
-#include <limits.h>
#include <signal.h>
-#include <sys/wait.h>
#include <assert.h>
-#include <dirent.h>
-#include <time.h>
#include <vector>
#include <algorithm>
-#include <memory>
+#include <spawn.h>
+#include <wctype.h>
+#include <map>
+#include <string>
+#include <memory> // IWYU pragma: keep - suggests <tr1/memory> instead
+#include <utility>
#ifdef HAVE_SIGINFO_H
#include <siginfo.h>
#endif
-#include "fallback.h"
-#include "util.h"
-#include "iothread.h"
+#include "fallback.h" // IWYU pragma: keep
#include "postfork.h"
-
#include "common.h"
#include "wutil.h"
#include "proc.h"
@@ -44,12 +39,10 @@
#include "builtin.h"
#include "function.h"
#include "env.h"
-#include "wildcard.h"
-#include "sanity.h"
-#include "expand.h"
#include "signal.h"
-
#include "parse_util.h"
+#include "io.h"
+#include "parse_tree.h"
/**
file descriptor redirection error message
diff --git a/src/exec.h b/src/exec.h
index f0a0e148..41dc3193 100644
--- a/src/exec.h
+++ b/src/exec.h
@@ -8,11 +8,9 @@
*/
#define FISH_EXEC_H
-#include <wchar.h>
+#include <stddef.h>
#include <vector>
-#include "proc.h"
-#include "util.h"
#include "common.h"
/**
@@ -41,6 +39,7 @@
*/
+class job_t;
class parser_t;
void exec_job(parser_t &parser, job_t *j);
diff --git a/src/expand.cpp b/src/expand.cpp
index 5bb2da1f..eeeb7bac 100644
--- a/src/expand.cpp
+++ b/src/expand.cpp
@@ -5,27 +5,20 @@ parameter expansion.
*/
-#include "config.h"
+#include "config.h" // IWYU pragma: keep
#include <stdlib.h>
#include <stdio.h>
+#include <stdarg.h>
+#include <stddef.h>
#include <wchar.h>
#include <string.h>
#include <wctype.h>
#include <errno.h>
#include <pwd.h>
-#include <unistd.h>
-#include <limits.h>
-#include <sys/param.h>
-#include <sys/types.h>
-#ifdef HAVE_SYS_SYSCTL_H
-#include <sys/sysctl.h>
-#endif
-#include <termios.h>
#include <dirent.h>
#include <sys/stat.h>
#include <unistd.h>
-#include <signal.h>
#include <algorithm>
#include <assert.h>
@@ -35,7 +28,7 @@ parameter expansion.
#include <procfs.h>
#endif
-#include "fallback.h"
+#include "fallback.h" // IWYU pragma: keep
#include "util.h"
#include "common.h"
@@ -46,7 +39,6 @@ parameter expansion.
#include "expand.h"
#include "wildcard.h"
#include "exec.h"
-#include "signal.h"
#include "tokenizer.h"
#include "complete.h"
#include "iothread.h"
diff --git a/src/expand.h b/src/expand.h
index a4c587cc..04cfa743 100644
--- a/src/expand.h
+++ b/src/expand.h
@@ -15,12 +15,14 @@
*/
#define FISH_EXPAND_H
+#include "config.h" // for __warn_unused
+
#include <wchar.h>
+#include <string> // for string
+#include <vector> // for vector
-#include "util.h"
#include "common.h"
#include "parse_constants.h"
-#include <list>
enum
{
@@ -134,8 +136,6 @@ enum
*/
#define ARRAY_BOUNDS_ERR _(L"Array index out of bounds")
-class parser_t;
-
/**
Perform various forms of expansion on in, such as tilde expansion
(\~USER becomes the users home directory), variable expansion
diff --git a/src/fish.cpp b/src/fish.cpp
index 2a757ba6..a50e0886 100644
--- a/src/fish.cpp
+++ b/src/fish.cpp
@@ -22,20 +22,21 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA
#include "config.h"
-
+#include <limits.h>
+#include <stddef.h>
+#include <stdint.h>
+#include <sys/stat.h>
+#include <string>
+#include <vector>
#include <stdlib.h>
#include <stdio.h>
#include <wchar.h>
#include <string.h>
#include <unistd.h>
#include <errno.h>
-#include <unistd.h>
-#include <termios.h>
#include <fcntl.h>
-#include <sys/param.h>
-#include <sys/socket.h>
+#include <sys/socket.h> // IWYU pragma: keep - suggests internal header
#include <sys/un.h>
-#include <sys/types.h>
#include <pwd.h>
#ifdef HAVE_GETOPT_H
@@ -43,29 +44,24 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA
#endif
#include <locale.h>
-#include <signal.h>
-#include "fallback.h"
-#include "util.h"
+#include "fallback.h" // IWYU pragma: keep
#include "common.h"
#include "reader.h"
#include "builtin.h"
#include "function.h"
-#include "complete.h"
#include "wutil.h"
#include "env.h"
-#include "sanity.h"
#include "proc.h"
#include "parser.h"
#include "expand.h"
#include "intern.h"
-#include "exec.h"
#include "event.h"
-#include "output.h"
#include "history.h"
#include "path.h"
#include "input.h"
+#include "io.h"
#include "fish_version.h"
/* PATH_MAX may not exist */
diff --git a/src/fish_indent.cpp b/src/fish_indent.cpp
index 22934e9e..59efbd1e 100644
--- a/src/fish_indent.cpp
+++ b/src/fish_indent.cpp
@@ -25,15 +25,20 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA
#include <stdio.h>
#include <wchar.h>
#include <vector>
-#include <map>
#ifdef HAVE_GETOPT_H
#include <getopt.h>
#endif
-
+#include <assert.h>
+#include <locale.h>
+#include <stddef.h>
+#include <string>
+
+#include "color.h"
+#include "highlight.h"
+#include "parse_constants.h"
#include "wutil.h"
#include "common.h"
#include "output.h"
-#include "screen.h"
#include "env.h"
#include "input.h"
#include "parse_tree.h"
diff --git a/src/function.cpp b/src/function.cpp
index fb8dbf6a..2a8c20be 100644
--- a/src/function.cpp
+++ b/src/function.cpp
@@ -7,35 +7,28 @@
handling library.
*/
-#include "config.h"
+#include "config.h" // IWYU pragma: keep
-#include <stdlib.h>
-#include <stdio.h>
-#include <string.h>
#include <wchar.h>
-#include <unistd.h>
-#include <termios.h>
-#include <signal.h>
#include <pthread.h>
-#include <errno.h>
#include <map>
#include <set>
+#include <dirent.h>
+#include <stddef.h>
+#include <string>
+#include <utility>
#include "wutil.h"
-#include "fallback.h"
-#include "util.h"
+#include "fallback.h" // IWYU pragma: keep
+#include "autoload.h"
#include "function.h"
-#include "proc.h"
-#include "parser.h"
#include "common.h"
#include "intern.h"
#include "event.h"
#include "reader.h"
-#include "parse_util.h"
#include "parser_keywords.h"
#include "env.h"
-#include "expand.h"
/**
Table containing all functions
diff --git a/src/function.h b/src/function.h
index ac56bd46..cd3f6f5a 100644
--- a/src/function.h
+++ b/src/function.h
@@ -10,16 +10,14 @@
#ifndef FISH_FUNCTION_H
#define FISH_FUNCTION_H
-#include <wchar.h>
+#include <vector>
#include <map>
-#include "util.h"
#include "common.h"
#include "event.h"
#include "env.h"
class parser_t;
-class env_vars_snapshot_t;
/**
Structure describing a function. This is used by the parser to
diff --git a/src/highlight.cpp b/src/highlight.cpp
index ef57519e..e07c7040 100644
--- a/src/highlight.cpp
+++ b/src/highlight.cpp
@@ -1,36 +1,31 @@
/** \file highlight.c
Functions for syntax highlighting
*/
-#include "config.h"
-#include <stdlib.h>
-#include <stdio.h>
+#include "config.h" // IWYU pragma: keep
+
#include <sys/stat.h>
#include <unistd.h>
#include <errno.h>
#include <wchar.h>
-#include <wctype.h>
-#include <termios.h>
-#include <signal.h>
#include <algorithm>
+#include <dirent.h>
+#include <map>
+#include <set>
+#include <string>
#include "fallback.h"
-#include "util.h"
#include "wutil.h"
#include "highlight.h"
#include "tokenizer.h"
-#include "proc.h"
-#include "parser.h"
#include "parse_util.h"
-#include "parser_keywords.h"
+#include "parse_constants.h"
#include "builtin.h"
#include "function.h"
#include "env.h"
#include "expand.h"
-#include "sanity.h"
#include "common.h"
-#include "complete.h"
#include "output.h"
#include "wildcard.h"
#include "path.h"
diff --git a/src/highlight.h b/src/highlight.h
index d4f61e95..9b89c0f2 100644
--- a/src/highlight.h
+++ b/src/highlight.h
@@ -5,10 +5,13 @@
#ifndef FISH_HIGHLIGHT_H
#define FISH_HIGHLIGHT_H
-#include <wchar.h>
+#include <assert.h> // for assert
+#include <stddef.h> // for size_t
+#include <stdint.h> // for uint32_t
+#include <vector> // for vector
+#include "common.h" // for wcstring, wcstring_list_t
#include "env.h"
-#include "util.h"
#include "color.h"
/* Internally, we specify highlight colors using a set of bits. Each highlight_spec is a 32 bit uint. We divide this into low 16 (foreground) and high 16 (background). Each half we further subdivide into low 8 (primary) and high 8 (modifiers). The primary is not a bitmask; specify exactly one. The modifiers are a bitmask; specify any number */
diff --git a/src/history.cpp b/src/history.cpp
index 9bed7b05..c526eb39 100644
--- a/src/history.cpp
+++ b/src/history.cpp
@@ -7,8 +7,6 @@
#include <stdio.h>
#include <wchar.h>
#include <errno.h>
-#include <dirent.h>
-#include <sys/types.h>
#include <sys/stat.h>
#include <unistd.h>
#include <sys/mman.h>
@@ -16,22 +14,23 @@
#include <string.h>
#include <time.h>
#include <assert.h>
+#include <ctype.h>
+#include <wctype.h>
+#include <iterator>
-#include "fallback.h"
-#include "util.h"
+#include "fallback.h" // IWYU pragma: keep
#include "sanity.h"
-#include "tokenizer.h"
#include "reader.h"
#include "parse_tree.h"
-
#include "wutil.h"
#include "history.h"
#include "common.h"
-#include "intern.h"
#include "path.h"
#include "signal.h"
-#include "autoload.h"
#include "iothread.h"
+#include "env.h"
+#include "lru.h"
+#include "parse_constants.h"
#include <map>
#include <algorithm>
diff --git a/src/history.h b/src/history.h
index 4bbdf788..7f04890e 100644
--- a/src/history.h
+++ b/src/history.h
@@ -5,15 +5,18 @@
#ifndef FISH_HISTORY_H
#define FISH_HISTORY_H
-#include <wchar.h>
#include "common.h"
-#include "pthread.h"
#include "wutil.h"
#include <deque>
#include <vector>
#include <utility>
-#include <list>
#include <set>
+#include <pthread.h>
+#include <stddef.h>
+#include <stdint.h>
+#include <stdio.h>
+#include <time.h>
+#include <string>
/* fish supports multiple shells writing to history at once. Here is its strategy:
diff --git a/src/input.cpp b/src/input.cpp
index 4dfe80cd..2629506f 100644
--- a/src/input.cpp
+++ b/src/input.cpp
@@ -6,19 +6,8 @@
#include "config.h"
-#include <stdlib.h>
-#include <stdio.h>
#include <assert.h>
-#include <string.h>
#include <errno.h>
-#include <termios.h>
-#include <sys/types.h>
-#include <sys/stat.h>
-
-#ifdef HAVE_SYS_IOCTL_H
-#include <sys/ioctl.h>
-#endif
-
#include <unistd.h>
#include <wchar.h>
@@ -36,30 +25,21 @@
#include <ncurses/term.h>
#endif
-#include <signal.h>
-#include <dirent.h>
#include <wctype.h>
-
-
-#include "fallback.h"
-#include "util.h"
-
-#include "wutil.h"
+#include "fallback.h" // IWYU pragma: keep
+#include "wutil.h" // IWYU pragma: keep - needed for wgettext
#include "reader.h"
#include "proc.h"
#include "common.h"
-#include "sanity.h"
#include "input_common.h"
#include "input.h"
#include "parser.h"
#include "env.h"
-#include "expand.h"
#include "event.h"
-#include "signal.h"
-
+#include "signal.h" // IWYU pragma: keep - needed for CHECK_BLOCK
+#include "io.h"
#include "output.h"
-#include "intern.h"
#include <vector>
#include <algorithm>
diff --git a/src/input.h b/src/input.h
index 323eb26d..38facddb 100644
--- a/src/input.h
+++ b/src/input.h
@@ -8,8 +8,12 @@ inputrc information for key bindings.
#ifndef FISH_INPUT_H
#define FISH_INPUT_H
-#include <wchar.h>
-#include <utility>
+#include <stddef.h>
+#include <string>
+#include <vector>
+
+#include "common.h"
+#include "env.h"
#include "input_common.h"
diff --git a/src/input_common.cpp b/src/input_common.cpp
index b748ca22..24fde6e2 100644
--- a/src/input_common.cpp
+++ b/src/input_common.cpp
@@ -6,28 +6,26 @@ Implementation file for the low level input library
#include "config.h"
-#include <stdlib.h>
-#include <stdio.h>
#include <string.h>
#include <errno.h>
#include <sys/time.h>
-#include <sys/types.h>
#include <unistd.h>
-#include <wchar.h>
-#include <stack>
#include <list>
#include <queue>
+#include <cwchar> // for wint_t
+#include <deque> // for deque
+#include <utility> // for swap, pair
#ifdef HAVE_SYS_SELECT_H
#include <sys/select.h>
#endif
-#include "fallback.h"
+#include "fallback.h" // IWYU pragma: keep
#include "util.h"
#include "common.h"
-#include "wutil.h"
#include "input_common.h"
#include "env_universal_common.h"
+#include "env.h"
#include "iothread.h"
/**
diff --git a/src/input_common.h b/src/input_common.h
index 46430af4..5ec34b39 100644
--- a/src/input_common.h
+++ b/src/input_common.h
@@ -6,7 +6,7 @@ Header file for the low level input library
#ifndef INPUT_COMMON_H
#define INPUT_COMMON_H
-#include <wchar.h>
+#include <stddef.h>
/**
Use unencoded private-use keycodes for internal characters
diff --git a/src/intern.cpp b/src/intern.cpp
index 56dec21a..2ec0af8a 100644
--- a/src/intern.cpp
+++ b/src/intern.cpp
@@ -3,20 +3,14 @@
Library for pooling common strings
*/
-#include "config.h"
+#include "config.h" // IWYU pragma: keep
-
-#include <stdlib.h>
-#include <stdio.h>
#include <wchar.h>
-#include <unistd.h>
-#include <set>
+#include <pthread.h>
+#include <vector>
#include <algorithm>
-#include "fallback.h"
-#include "util.h"
-
-#include "wutil.h"
+#include "fallback.h" // IWYU pragma: keep
#include "common.h"
#include "intern.h"
diff --git a/src/intern.h b/src/intern.h
index 1403e66c..b9d07526 100644
--- a/src/intern.h
+++ b/src/intern.h
@@ -7,8 +7,6 @@
#ifndef FISH_INTERN_H
#define FISH_INTERN_H
-#include <wchar.h>
-
/**
Return an identical copy of the specified string from a pool of unique strings. If the string was not in the pool, add a copy.
diff --git a/src/io.cpp b/src/io.cpp
index 264f0b9f..a013b9ef 100644
--- a/src/io.cpp
+++ b/src/io.cpp
@@ -3,42 +3,15 @@
Utilities for io redirection.
*/
-#include "config.h"
+#include "config.h" // IWYU pragma: keep
-#include <stdlib.h>
#include <stdio.h>
-#include <wchar.h>
-#include <string.h>
#include <errno.h>
-#include <sys/types.h>
-#include <set>
-#include <algorithm>
-
-#ifdef HAVE_SYS_IOCTL_H
-#include <sys/ioctl.h>
-#endif
-
+#include <assert.h>
#include <unistd.h>
-#include <fcntl.h>
-
-#if HAVE_NCURSES_H
-#include <ncurses.h>
-#elif HAVE_NCURSES_CURSES_H
-#include <ncurses/curses.h>
-#else
-#include <curses.h>
-#endif
-
-#if HAVE_TERM_H
-#include <term.h>
-#elif HAVE_NCURSES_TERM_H
-#include <ncurses/term.h>
-#endif
-
-#include "fallback.h"
-#include "util.h"
+#include "fallback.h" // IWYU pragma: keep
#include "wutil.h"
#include "exec.h"
#include "common.h"
diff --git a/src/io.h b/src/io.h
index 4ca5f942..86fc7962 100644
--- a/src/io.h
+++ b/src/io.h
@@ -2,6 +2,8 @@
#define FISH_IO_H
#include <vector>
+#include <stddef.h>
+#include <stdlib.h>
// Note that we have to include something to get any _LIBCPP_VERSION defined so we can detect libc++
// So it's key that vector go above. If we didn't need vector for other reasons, we might include ciso646, which does nothing
@@ -16,6 +18,8 @@ using std::shared_ptr;
using std::tr1::shared_ptr;
#endif
+#include "common.h"
+
/**
Describes what type of IO operation an io_data_t represents
*/
diff --git a/src/iothread.cpp b/src/iothread.cpp
index 920d2aae..7a37b63b 100644
--- a/src/iothread.cpp
+++ b/src/iothread.cpp
@@ -1,16 +1,17 @@
-#include "config.h"
+#include "config.h" // IWYU pragma: keep
#include "iothread.h"
#include "common.h"
#include <pthread.h>
#include <assert.h>
-#include <errno.h>
#include <stdio.h>
-#include <string.h>
-#include <stdlib.h>
+#include <limits.h> // IWYU pragma: keep - for _POSIX_THREADS_MAX, suggests internal header
+#include <sys/select.h>
+#include <sys/time.h>
#include <unistd.h>
#include <signal.h>
#include <fcntl.h>
#include <queue>
+#include <algorithm>
#ifdef _POSIX_THREAD_THREADS_MAX
#if _POSIX_THREAD_THREADS_MAX < 64
diff --git a/src/kill.cpp b/src/kill.cpp
index 0033ca2f..22f21475 100644
--- a/src/kill.cpp
+++ b/src/kill.cpp
@@ -6,26 +6,15 @@
with the X clipboard.
*/
-#include "config.h"
-
-#include <stdlib.h>
-#include <stdio.h>
-#include <wchar.h>
-#include <termios.h>
-#include <unistd.h>
-#include <signal.h>
-#include <sys/types.h>
-#include <sys/stat.h>
-#include <dirent.h>
-#include <algorithm>
+#include "config.h" // IWYU pragma: keep
-#include "fallback.h"
-#include "util.h"
+#include <stddef.h>
+#include <algorithm>
+#include <list>
+#include <string>
-#include "wutil.h"
+#include "fallback.h" // IWYU pragma: keep
#include "kill.h"
-#include "proc.h"
-#include "sanity.h"
#include "common.h"
#include "env.h"
#include "exec.h"
diff --git a/src/kill.h b/src/kill.h
index 35df3dbd..686122a2 100644
--- a/src/kill.h
+++ b/src/kill.h
@@ -7,7 +7,7 @@
#ifndef FISH_KILL_H
#define FISH_KILL_H
-#include <wchar.h>
+#include "common.h"
/**
Replace the specified string in the killring
diff --git a/src/lru.h b/src/lru.h
index 5899087c..779c2edc 100644
--- a/src/lru.h
+++ b/src/lru.h
@@ -6,6 +6,7 @@
#ifndef FISH_LRU_H
#define FISH_LRU_H
+#include <assert.h>
#include <wchar.h>
#include <map>
#include <set>
diff --git a/src/output.cpp b/src/output.cpp
index 5a0d221b..8f97ce61 100644
--- a/src/output.cpp
+++ b/src/output.cpp
@@ -7,18 +7,6 @@
#include <stdlib.h>
#include <stdio.h>
#include <string.h>
-#include <errno.h>
-#include <termios.h>
-#include <sys/types.h>
-#include <sys/stat.h>
-
-#ifdef HAVE_SYS_IOCTL_H
-#include <sys/ioctl.h>
-#endif
-
-#include <sys/time.h>
-#include <unistd.h>
-#include <wctype.h>
#if HAVE_NCURSES_H
#include <ncurses.h>
@@ -34,22 +22,14 @@
#include <ncurses/term.h>
#endif
-#include <signal.h>
-#include <fcntl.h>
-#include <dirent.h>
-#include <time.h>
#include <wchar.h>
-
+#include <limits.h>
+#include <string>
#include "fallback.h"
-#include "util.h"
-
-#include "wutil.h"
-#include "expand.h"
+#include "wutil.h" // IWYU pragma: keep - needed for wgettext
#include "common.h"
#include "output.h"
-#include "highlight.h"
-#include "env.h"
/**
Number of color names in the col array
diff --git a/src/output.h b/src/output.h
index 6c7e4f32..a952d8a4 100644
--- a/src/output.h
+++ b/src/output.h
@@ -8,9 +8,10 @@
#ifndef FISH_OUTPUT_H
#define FISH_OUTPUT_H
-#include <wchar.h>
+#include <stddef.h>
+#include <vector>
+#include "common.h"
#include "fallback.h"
-#include "screen.h"
#include "color.h"
/**
diff --git a/src/pager.cpp b/src/pager.cpp
index b2a4e4da..a5cf0ecc 100644
--- a/src/pager.cpp
+++ b/src/pager.cpp
@@ -1,11 +1,14 @@
-#include "config.h"
+#include "config.h" // IWYU pragma: keep
-#include "pager.h"
-#include "highlight.h"
-#include "input_common.h"
-#include "wutil.h"
+#include <assert.h>
+#include <wchar.h>
+#include <wctype.h>
#include <vector>
#include <map>
+#include "util.h"
+#include "wutil.h" // IWYU pragma: keep - needed for wgettext
+#include "pager.h"
+#include "highlight.h"
typedef pager_t::comp_t comp_t;
typedef std::vector<completion_t> completion_list_t;
diff --git a/src/pager.h b/src/pager.h
index c3e47df7..61c37ce6 100644
--- a/src/pager.h
+++ b/src/pager.h
@@ -2,6 +2,10 @@
Pager support
*/
+#include <stddef.h>
+#include <string>
+#include <vector>
+#include "common.h"
#include "complete.h"
#include "screen.h"
#include "reader.h"
diff --git a/src/parse_execution.cpp b/src/parse_execution.cpp
index e2a1ee20..e02ad9d7 100644
--- a/src/parse_execution.cpp
+++ b/src/parse_execution.cpp
@@ -8,17 +8,33 @@
*/
#include "parse_execution.h"
+#include <assert.h>
+#include <errno.h>
+#include <stdarg.h>
+#include <stdio.h>
+#include <stdlib.h>
+#include <termios.h>
+#include <unistd.h>
+#include <wchar.h>
+#include <wctype.h>
+#include <string>
+#include <memory> // IWYU pragma: keep - suggests <tr1/memory> instead
+#include <vector>
+#include "env.h"
+#include "event.h"
+#include "tokenizer.h"
+#include "util.h"
#include "parse_util.h"
#include "complete.h"
#include "wildcard.h"
-#include "builtin.h"
#include "parser.h"
#include "expand.h"
#include "reader.h"
#include "wutil.h"
-#include "exec.h"
#include "path.h"
-#include <algorithm>
+#include "function.h"
+#include "builtin.h"
+#include "exec.h"
/* These are the specific statement types that support redirections */
static bool specific_statement_type_is_redirectable_block(const parse_node_t &node)
diff --git a/src/parse_execution.h b/src/parse_execution.h
index 6a3d6db7..7e1c1f46 100644
--- a/src/parse_execution.h
+++ b/src/parse_execution.h
@@ -6,12 +6,14 @@
#ifndef FISH_PARSE_EXECUTION_H
#define FISH_PARSE_EXECUTION_H
-#include "config.h"
-#include "util.h"
+#include <stddef.h>
+#include "common.h"
+#include "io.h"
+#include "parse_constants.h"
#include "parse_tree.h"
#include "proc.h"
-class job_t;
+class parser_t;
struct block_t;
enum parse_execution_result_t
diff --git a/src/parse_productions.cpp b/src/parse_productions.cpp
index c1b378ec..0d28c6a1 100644
--- a/src/parse_productions.cpp
+++ b/src/parse_productions.cpp
@@ -1,4 +1,7 @@
#include "parse_productions.h"
+#include <assert.h>
+#include <stdio.h>
+#include "parse_tree.h"
using namespace parse_productions;
#define NO_PRODUCTION ((production_option_idx_t)(-1))
diff --git a/src/parse_productions.h b/src/parse_productions.h
index df3ae9c9..1d64ccfc 100644
--- a/src/parse_productions.h
+++ b/src/parse_productions.h
@@ -6,8 +6,11 @@
#ifndef FISH_PARSE_TREE_CONSTRUCTION_H
#define FISH_PARSE_TREE_CONSTRUCTION_H
-#include "parse_tree.h"
-#include <inttypes.h>
+#include <stdint.h> // for uint8_t, uint32_t
+#include "common.h" // for wcstring
+#include "parse_constants.h" // for parse_token_type_t, etc
+
+struct parse_token_t;
namespace parse_productions
{
diff --git a/src/parse_tree.cpp b/src/parse_tree.cpp
index 1583b804..ea84a23e 100644
--- a/src/parse_tree.cpp
+++ b/src/parse_tree.cpp
@@ -1,9 +1,18 @@
+#include <assert.h>
+#include <stdarg.h>
+#include <stddef.h>
+#include <stdint.h>
+#include <stdio.h>
+#include <wchar.h>
+#include <string>
+#include "common.h"
+#include "parse_constants.h"
#include "parse_productions.h"
+#include "parse_tree.h"
#include "tokenizer.h"
#include "fallback.h"
-#include "wutil.h"
+#include "wutil.h" // IWYU pragma: keep - needed for wgettext
#include "proc.h"
-#include "expand.h"
#include <vector>
#include <algorithm>
diff --git a/src/parse_tree.h b/src/parse_tree.h
index 4dee0360..31344639 100644
--- a/src/parse_tree.h
+++ b/src/parse_tree.h
@@ -6,17 +6,15 @@
#ifndef FISH_PARSE_PRODUCTIONS_H
#define FISH_PARSE_PRODUCTIONS_H
-#include <wchar.h>
+#include <assert.h>
+#include <stddef.h>
+#include <stdint.h>
-#include "config.h"
-#include "util.h"
#include "common.h"
#include "tokenizer.h"
#include "parse_constants.h"
#include <vector>
-#include <inttypes.h>
-class parse_node_t;
class parse_node_tree_t;
typedef uint32_t node_offset_t;
diff --git a/src/parse_util.cpp b/src/parse_util.cpp
index bbee5d84..b5d549ba 100644
--- a/src/parse_util.cpp
+++ b/src/parse_util.cpp
@@ -8,38 +8,24 @@
parsing the code.
*/
-#include "config.h"
-
+#include "config.h" // IWYU pragma: keep
#include <stdlib.h>
-#include <stdio.h>
-#include <sys/types.h>
-#include <unistd.h>
-#include <wctype.h>
-
+#include <stdarg.h>
#include <wchar.h>
-#include <map>
-#include <set>
-#include <algorithm>
-
-#include <time.h>
+#include <string>
#include <assert.h>
#include "fallback.h"
#include "util.h"
-
-#include "wutil.h"
+#include "wutil.h" // IWYU pragma: keep
#include "common.h"
#include "tokenizer.h"
#include "parse_util.h"
#include "expand.h"
-#include "intern.h"
-#include "exec.h"
#include "env.h"
-#include "signal.h"
#include "wildcard.h"
#include "parse_tree.h"
-#include "parser.h"
#include "builtin.h"
/** Error message for improper use of the exec builtin */
diff --git a/src/parse_util.h b/src/parse_util.h
index 0e23946e..0d02ab17 100644
--- a/src/parse_util.h
+++ b/src/parse_util.h
@@ -7,11 +7,10 @@
#ifndef FISH_PARSE_UTIL_H
#define FISH_PARSE_UTIL_H
-#include "autoload.h"
-#include "parse_tree.h"
-#include <wchar.h>
-#include <map>
-#include <set>
+#include <stddef.h>
+#include <vector>
+#include "common.h"
+#include "parse_constants.h"
/**
Find the beginning and end of the first subshell in the specified string.
@@ -186,6 +185,7 @@ parser_test_error_bits_t parse_util_detect_errors(const wcstring &buff_src, pars
This does NOT currently detect unterminated quotes.
*/
+class parse_node_t;
parser_test_error_bits_t parse_util_detect_errors_in_argument(const parse_node_t &node, const wcstring &arg_src, parse_error_list_t *out_errors = NULL);
/* Given a string containing a variable expansion error, append an appropriate error to the errors list. The global_token_pos is the offset of the token in the larger source, and the dollar_pos is the offset of the offending dollar sign within the token. */
diff --git a/src/parser.cpp b/src/parser.cpp
index 810a01c8..95880922 100644
--- a/src/parser.cpp
+++ b/src/parser.cpp
@@ -4,44 +4,28 @@ The fish parser. Contains functions for parsing and evaluating code.
*/
-#include "config.h"
+#include "config.h" // IWYU pragma: keep
-#include <stdlib.h>
#include <stdio.h>
#include <wchar.h>
-#include <sys/types.h>
-#include <sys/stat.h>
-#include <unistd.h>
-#include <errno.h>
-#include <fcntl.h>
-#include <termios.h>
-#include <pwd.h>
-#include <dirent.h>
+#include <assert.h>
+#include <string>
#include <algorithm>
#include "fallback.h"
-#include "util.h"
-
#include "common.h"
#include "wutil.h"
#include "proc.h"
#include "parser.h"
-#include "parser_keywords.h"
-#include "tokenizer.h"
-#include "exec.h"
-#include "wildcard.h"
#include "function.h"
-#include "builtin.h"
#include "env.h"
#include "expand.h"
#include "reader.h"
#include "sanity.h"
#include "event.h"
#include "intern.h"
+#include "signal.h" // IWYU pragma: keep - needed for CHECK_BLOCK
#include "parse_util.h"
-#include "path.h"
-#include "signal.h"
-#include "complete.h"
#include "parse_tree.h"
#include "parse_execution.h"
diff --git a/src/parser.h b/src/parser.h
index 1afced17..d7ee0570 100644
--- a/src/parser.h
+++ b/src/parser.h
@@ -5,13 +5,16 @@
#ifndef FISH_PARSER_H
#define FISH_PARSER_H
-#include <wchar.h>
+#include <stddef.h> // for size_t
+#include <list> // for _List_const_iterator, list, etc
+#include "common.h"
#include "proc.h"
-#include "util.h"
#include "event.h"
-#include "function.h"
#include "parse_tree.h"
+#include "io.h"
+#include "parse_constants.h"
+
#include <vector>
/**
@@ -227,6 +230,7 @@ struct profile_item_t
};
class parse_execution_context_t;
+class completion_t;
class parser_t
{
diff --git a/src/parser_keywords.cpp b/src/parser_keywords.cpp
index eb47f87f..adf9c40c 100644
--- a/src/parser_keywords.cpp
+++ b/src/parser_keywords.cpp
@@ -3,13 +3,9 @@
Functions having to do with parser keywords, like testing if a function is a block command.
*/
-#include "config.h"
+#include "config.h" // IWYU pragma: keep
-
-#include <stdlib.h>
-#include <stdio.h>
-
-#include "fallback.h"
+#include "fallback.h" // IWYU pragma: keep
#include "common.h"
#include "parser_keywords.h"
diff --git a/src/parser_keywords.h b/src/parser_keywords.h
index 6794b294..94cd0eb7 100644
--- a/src/parser_keywords.h
+++ b/src/parser_keywords.h
@@ -6,6 +6,8 @@ Functions having to do with parser keywords, like testing if a function is a blo
#ifndef FISH_PARSER_KEYWORD_H
#define FISH_PARSER_KEYWORD_H
+#include "common.h"
+
/**
Tests if the specified commands parameters should be interpreted as another command, which will be true if the command is either 'command', 'exec', 'if', 'while', or 'builtin'. This does not handle "else if" which is more complicated.
diff --git a/src/path.cpp b/src/path.cpp
index e61ae651..62a31a63 100644
--- a/src/path.cpp
+++ b/src/path.cpp
@@ -1,17 +1,14 @@
-#include "config.h"
+#include "config.h" // IWYU pragma: keep
-#include <stdlib.h>
-#include <stdio.h>
#include <wchar.h>
-#include <sys/types.h>
#include <sys/stat.h>
#include <unistd.h>
#include <errno.h>
-#include <libgen.h>
-
-#include "fallback.h"
-#include "util.h"
+#include <assert.h>
+#include <string>
+#include <vector>
+#include "fallback.h" // IWYU pragma: keep
#include "common.h"
#include "env.h"
#include "wutil.h"
diff --git a/src/path.h b/src/path.h
index b822f6e9..eb79ee8a 100644
--- a/src/path.h
+++ b/src/path.h
@@ -9,6 +9,8 @@
#ifndef FISH_PATH_H
#define FISH_PATH_H
+#include <stddef.h>
+#include "common.h"
#include "env.h"
/**
diff --git a/src/postfork.cpp b/src/postfork.cpp
index f47c2e1e..9416b35d 100644
--- a/src/postfork.cpp
+++ b/src/postfork.cpp
@@ -4,6 +4,15 @@
*/
#include <fcntl.h>
+#include <errno.h>
+#include <signal.h>
+#include <stdio.h>
+#include <string.h>
+#include <time.h>
+#include <memory> // IWYU pragma: keep - suggests <tr1/memory> instead
+#include "common.h"
+#include "proc.h"
+#include "wutil.h"
#include "signal.h"
#include "postfork.h"
#include "iothread.h"
diff --git a/src/postfork.h b/src/postfork.h
index 439cedff..c277da52 100644
--- a/src/postfork.h
+++ b/src/postfork.h
@@ -6,17 +6,10 @@
#ifndef FISH_POSTFORK_H
#define FISH_POSTFORK_H
-#include <wchar.h>
-#include <signal.h>
+#include <stddef.h>
#include <unistd.h>
-#include <sys/time.h>
-#include <list>
#include "config.h"
-#include "common.h"
-#include "util.h"
-#include "proc.h"
-#include "wutil.h"
#include "io.h"
#if HAVE_SPAWN_H
@@ -40,6 +33,8 @@
Returns 0 on sucess, -1 on failiure.
*/
+class job_t;
+class process_t;
int set_child_group(job_t *j, process_t *p, int print_errors);
/**
diff --git a/src/print_help.cpp b/src/print_help.cpp
index 06bed30c..da401134 100644
--- a/src/print_help.cpp
+++ b/src/print_help.cpp
@@ -6,6 +6,8 @@
#include <stdlib.h>
#include <stdio.h>
#include <string.h>
+#include <stddef.h>
+#include <sys/types.h>
#include "print_help.h"
diff --git a/src/proc.cpp b/src/proc.cpp
index 7caf2d6c..0a0da0a8 100644
--- a/src/proc.cpp
+++ b/src/proc.cpp
@@ -18,27 +18,16 @@ Some of the code in this file is based on code from the Glibc manual.
#include <string.h>
#include <errno.h>
#include <termios.h>
-#include <sys/types.h>
-#include <sys/stat.h>
+#include <pthread.h>
+#include <wctype.h>
#include <algorithm>
-
-#ifdef HAVE_SYS_IOCTL_H
-#include <sys/ioctl.h>
-#endif
+#include <memory> // IWYU pragma: keep - suggests <tr1/memory> instead
+#include <vector>
#include <unistd.h>
#include <signal.h>
-#include <dirent.h>
#include <sys/time.h>
-#if HAVE_NCURSES_H
-#include <ncurses.h>
-#elif HAVE_NCURSES_CURSES_H
-#include <ncurses/curses.h>
-#else
-#include <curses.h>
-#endif
-
#if HAVE_TERM_H
#include <term.h>
#elif HAVE_NCURSES_TERM_H
@@ -53,7 +42,7 @@ Some of the code in this file is based on code from the Glibc manual.
#include <sys/select.h>
#endif
-#include "fallback.h"
+#include "fallback.h" // IWYU pragma: keep
#include "util.h"
#include "wutil.h"
@@ -61,7 +50,6 @@ Some of the code in this file is based on code from the Glibc manual.
#include "common.h"
#include "reader.h"
#include "sanity.h"
-#include "env.h"
#include "parser.h"
#include "signal.h"
#include "event.h"
diff --git a/src/proc.h b/src/proc.h
index 4bb6b395..8dd66c7c 100644
--- a/src/proc.h
+++ b/src/proc.h
@@ -11,13 +11,14 @@
#ifndef FISH_PROC_H
#define FISH_PROC_H
-#include <wchar.h>
#include <signal.h>
-#include <unistd.h>
#include <sys/time.h>
#include <list>
+#include <assert.h> // for assert
+#include <stddef.h> // for size_t
+#include <termios.h> // for pid_t, termios
-#include "util.h"
+#include "config.h" // for HAVE__PROC_SELF_STAT
#include "io.h"
#include "common.h"
#include "parse_tree.h"
@@ -268,7 +269,6 @@ void release_job_id(job_id_t jobid);
A struct represeting a job. A job is basically a pipeline of one
or more processes and a couple of flags.
*/
-class parser_t;
class job_t
{
/**
diff --git a/src/reader.cpp b/src/reader.cpp
index 33376284..7aae5f6f 100644
--- a/src/reader.cpp
+++ b/src/reader.cpp
@@ -24,39 +24,17 @@ commence.
#include <stdlib.h>
#include <stdio.h>
+#include <stdint.h>
#include <string.h>
#include <errno.h>
#include <termios.h>
-#include <sys/types.h>
-#include <sys/stat.h>
-
-#ifdef HAVE_SYS_IOCTL_H
-#include <sys/ioctl.h>
-#endif
-
#include <time.h>
#include <sys/time.h>
-#include <sys/wait.h>
-#include <sys/poll.h>
#include <unistd.h>
#include <wctype.h>
#include <stack>
#include <pthread.h>
-#if HAVE_NCURSES_H
-#include <ncurses.h>
-#elif HAVE_NCURSES_CURSES_H
-#include <ncurses/curses.h>
-#else
-#include <curses.h>
-#endif
-
-#if HAVE_TERM_H
-#include <term.h>
-#elif HAVE_NCURSES_TERM_H
-#include <ncurses/term.h>
-#endif
-
#ifdef HAVE_SIGINFO_H
#include <siginfo.h>
#endif
@@ -67,9 +45,7 @@ commence.
#include <signal.h>
#include <fcntl.h>
-#include <dirent.h>
#include <wchar.h>
-
#include <assert.h>
@@ -98,11 +74,11 @@ commence.
#include "screen.h"
#include "iothread.h"
#include "intern.h"
-#include "path.h"
#include "parse_util.h"
-#include "parser_keywords.h"
#include "parse_tree.h"
#include "pager.h"
+#include "color.h"
+#include "event.h"
/**
Maximum length of prefix string when printing completion
diff --git a/src/reader.h b/src/reader.h
index 744a360e..b4a159be 100644
--- a/src/reader.h
+++ b/src/reader.h
@@ -10,17 +10,15 @@
#define FISH_READER_H
#include <vector>
-#include <wchar.h>
+#include <string>
+#include <stddef.h>
-#include "util.h"
#include "io.h"
#include "common.h"
#include "complete.h"
#include "highlight.h"
#include "parse_constants.h"
-class parser_t;
-class completion_t;
class history_t;
/* Helper class for storing a command line */
diff --git a/src/sanity.cpp b/src/sanity.cpp
index f8976941..e918c805 100644
--- a/src/sanity.cpp
+++ b/src/sanity.cpp
@@ -1,30 +1,17 @@
/** \file sanity.c
Functions for performing sanity checks on the program state
*/
-#include "config.h"
+#include "config.h" // IWYU pragma: keep
-#include <stdlib.h>
-#include <wchar.h>
-#include <stdio.h>
-#include <errno.h>
-#include <termios.h>
#include <unistd.h>
-#include <signal.h>
-#include <sys/types.h>
-#include <sys/stat.h>
-#include <dirent.h>
-
-
-#include "fallback.h"
-#include "util.h"
+#include "fallback.h" // IWYU pragma: keep
#include "common.h"
#include "sanity.h"
#include "proc.h"
#include "history.h"
#include "reader.h"
#include "kill.h"
-#include "wutil.h"
/**
diff --git a/src/sanity.h b/src/sanity.h
index 6d8e293a..7480c403 100644
--- a/src/sanity.h
+++ b/src/sanity.h
@@ -5,8 +5,6 @@
#ifndef FISH_SANITY_H
#define FISH_SANITY_H
-#include <wchar.h>
-
/**
Call this function to tell the program it is not in a sane state.
*/
diff --git a/src/screen.cpp b/src/screen.cpp
index 8eb514af..1971bb57 100644
--- a/src/screen.cpp
+++ b/src/screen.cpp
@@ -11,12 +11,8 @@ efficient way for transforming that to the desired screen content.
#include <stdlib.h>
#include <stdio.h>
#include <string.h>
-#include <errno.h>
-#include <termios.h>
-#include <sys/types.h>
#include <unistd.h>
-#include <wctype.h>
#if HAVE_NCURSES_H
#include <ncurses.h>
@@ -36,13 +32,14 @@ efficient way for transforming that to the desired screen content.
#include <time.h>
#include <assert.h>
+#include <algorithm>
+#include <string>
#include <vector>
#include "fallback.h"
#include "common.h"
#include "util.h"
-#include "wutil.h"
#include "output.h"
#include "highlight.h"
#include "screen.h"
diff --git a/src/screen.h b/src/screen.h
index c9e4ac40..e84d8497 100644
--- a/src/screen.h
+++ b/src/screen.h
@@ -12,8 +12,11 @@
#ifndef FISH_SCREEN_H
#define FISH_SCREEN_H
+#include <assert.h>
+#include <stddef.h>
#include <vector>
#include <sys/stat.h>
+#include "common.h"
#include "highlight.h"
class page_rendering_t;
diff --git a/src/signal.cpp b/src/signal.cpp
index 8e62f788..b13f0c01 100644
--- a/src/signal.cpp
+++ b/src/signal.cpp
@@ -4,15 +4,11 @@ The library for various signal related issues
*/
-#include "config.h"
+#include "config.h" // IWYU pragma: keep
-
-#include <stdlib.h>
+#include <wchar.h>
#include <stdio.h>
-#include <sys/types.h>
#include <signal.h>
-#include <dirent.h>
-#include <unistd.h>
#include <errno.h>
#ifdef HAVE_SIGINFO_H
@@ -20,9 +16,7 @@ The library for various signal related issues
#endif
#include "common.h"
-#include "fallback.h"
-#include "util.h"
-
+#include "fallback.h" // IWYU pragma: keep
#include "wutil.h"
#include "signal.h"
#include "event.h"
diff --git a/src/tokenizer.cpp b/src/tokenizer.cpp
index c0663876..88066b1f 100644
--- a/src/tokenizer.cpp
+++ b/src/tokenizer.cpp
@@ -6,22 +6,19 @@ tokenizing multiple strings and disposing of unused string
segments.
*/
-#include "config.h"
+#include "config.h" // IWYU pragma: keep
-#include <stdlib.h>
-#include <stdio.h>
#include <wchar.h>
#include <wctype.h>
-#include <string.h>
#include <unistd.h>
#include <fcntl.h>
+#include <assert.h>
+#include <string>
-#include "fallback.h"
-#include "util.h"
-
-#include "wutil.h"
-#include "tokenizer.h"
+#include "fallback.h" // IWYU pragma: keep
#include "common.h"
+#include "wutil.h" // IWYU pragma: keep - needed for wgettext
+#include "tokenizer.h"
/* Wow what a hack */
#define TOK_CALL_ERROR(t, e, x) do { (t)->call_error((e), (t)->squash_errors ? L"" : (x)); } while (0)
diff --git a/src/tokenizer.h b/src/tokenizer.h
index 08a771f1..ff774d9b 100644
--- a/src/tokenizer.h
+++ b/src/tokenizer.h
@@ -9,7 +9,7 @@
#ifndef FISH_TOKENIZER_H
#define FISH_TOKENIZER_H
-#include <wchar.h>
+#include <stddef.h>
#include "common.h"
/**
diff --git a/src/utf8.cpp b/src/utf8.cpp
index 196b5268..62453be4 100644
--- a/src/utf8.cpp
+++ b/src/utf8.cpp
@@ -16,13 +16,12 @@
#include <sys/types.h>
#include <stdint.h>
-#include <wchar.h>
#include "utf8.h"
#include <string>
-#include <vector>
#include <limits>
+#include <algorithm>
#define _NXT 0x80
#define _SEQ2 0xc0
diff --git a/src/utf8.h b/src/utf8.h
index a1f50154..1c9923db 100644
--- a/src/utf8.h
+++ b/src/utf8.h
@@ -20,10 +20,9 @@
#ifndef _UTF8_H_
#define _UTF8_H_
-#include <sys/types.h>
+#include <stddef.h>
#include <string>
-#include <wchar.h>
#define UTF8_IGNORE_ERROR 0x01
#define UTF8_SKIP_BOM 0x02
diff --git a/src/wcstringutil.cpp b/src/wcstringutil.cpp
index 51ec1a1c..e61e331b 100644
--- a/src/wcstringutil.cpp
+++ b/src/wcstringutil.cpp
@@ -3,7 +3,7 @@
Helper functions for working with wcstring
*/
-#include "config.h"
+#include "config.h" // IWYU pragma: keep
#include "wcstringutil.h"
diff --git a/src/wcstringutil.h b/src/wcstringutil.h
index 73ca7ac6..4d19fc0b 100644
--- a/src/wcstringutil.h
+++ b/src/wcstringutil.h
@@ -6,6 +6,7 @@ Helper functions for working with wcstring
#ifndef FISH_WCSTRINGUTIL_H
#define FISH_WCSTRINGUTIL_H
+#include <string>
#include <utility>
#include "common.h"
diff --git a/src/wgetopt.cpp b/src/wgetopt.cpp
index b63fe74f..9cbe5418 100644
--- a/src/wgetopt.cpp
+++ b/src/wgetopt.cpp
@@ -61,12 +61,7 @@
#include <stdio.h>
#include <wchar.h>
-
-#include <unistd.h>
-#include <sys/types.h>
-#include <sys/stat.h>
-#include <dirent.h>
-
+#include "common.h"
/* This needs to come after some library #include
to get __GNU_LIBRARY__ defined. */
@@ -89,7 +84,7 @@
#include "wgetopt.h"
#include "wutil.h"
-#include "fallback.h"
+#include "fallback.h" // IWYU pragma: keep
/**
@@ -114,7 +109,7 @@
because there are many ways it can cause trouble.
On some systems, it contains special magic macros that don't work
in GCC. */
-#include <string.h>
+#include <string.h> // IWYU pragma: keep
#define my_index wcschr
#else
diff --git a/src/wildcard.cpp b/src/wildcard.cpp
index 82417770..a1097829 100644
--- a/src/wildcard.cpp
+++ b/src/wildcard.cpp
@@ -6,32 +6,28 @@ wildcards using **.
*/
-#include "config.h"
-#include <algorithm>
+#include "config.h" // IWYU pragma: keep
#include <stdlib.h>
-#include <stdio.h>
-#include <limits.h>
#include <wchar.h>
#include <unistd.h>
-#include <sys/types.h>
#include <sys/stat.h>
#include <dirent.h>
#include <errno.h>
#include <string.h>
#include <set>
-
+#include <assert.h>
+#include <stddef.h>
+#include <wctype.h>
+#include <string>
+#include <utility>
#include "fallback.h"
-#include "util.h"
-
#include "wutil.h"
-#include "complete.h"
#include "common.h"
#include "wildcard.h"
#include "complete.h"
#include "reader.h"
#include "expand.h"
-#include "exec.h"
#include <map>
/**
diff --git a/src/wildcard.h b/src/wildcard.h
index 7e0b0818..a22f8338 100644
--- a/src/wildcard.h
+++ b/src/wildcard.h
@@ -12,10 +12,8 @@
*/
#define FISH_WILDCARD_H
-#include <wchar.h>
#include <vector>
-#include "util.h"
#include "common.h"
#include "expand.h"
#include "complete.h"
@@ -26,7 +24,6 @@
#define WILDCARD_RESERVED 0xf400
-class completion_t;
/**
Enumeration of all wildcard types
*/
diff --git a/src/wutil.cpp b/src/wutil.cpp
index 7b6c5c71..f429b07a 100644
--- a/src/wutil.cpp
+++ b/src/wutil.cpp
@@ -12,23 +12,16 @@
#include <errno.h>
#include <fcntl.h>
#include <wchar.h>
-#include <wctype.h>
#include <string.h>
#include <dirent.h>
-#include <stdarg.h>
#include <limits.h>
#include <libgen.h>
#include <pthread.h>
+#include <assert.h>
#include <string>
#include <map>
-
-#if HAVE_LIBINTL_H
-#include <libintl.h>
-#endif
-
#include "fallback.h"
-#include "util.h"
#include "common.h"
#include "wutil.h"
diff --git a/src/wutil.h b/src/wutil.h
index a1945c07..011f3477 100644
--- a/src/wutil.h
+++ b/src/wutil.h
@@ -6,16 +6,12 @@
#ifndef FISH_WUTIL_H
#define FISH_WUTIL_H
-#include <stdlib.h>
#include <stdio.h>
-#include <wchar.h>
#include <dirent.h>
-#include <unistd.h>
-#include <sys/stat.h>
#include <sys/types.h>
-#include <stdarg.h>
+#include <stddef.h>
+#include <time.h>
#include <string>
-#include <utility>
#include <stdint.h>
#include "common.h"