From b4f53143b0e05fd3061cdf2e65e17a6a2904090b Mon Sep 17 00:00:00 2001 From: ridiculousfish Date: Fri, 24 Jul 2015 00:50:58 -0700 Subject: [PATCH 01/11] Migrate source files into src/ directory This change moves source files into a src/ directory, and puts object files into an obj/ directory. The Makefile and xcode project are updated accordingly. Fixes #1866 --- Makefile.in | 497 ++++++++++-------- fish.xcodeproj/project.pbxproj | 3 +- autoload.cpp => src/autoload.cpp | 0 autoload.h => src/autoload.h | 0 builtin.cpp => src/builtin.cpp | 0 builtin.h => src/builtin.h | 0 .../builtin_commandline.cpp | 0 .../builtin_complete.cpp | 0 builtin_jobs.cpp => src/builtin_jobs.cpp | 0 builtin_printf.cpp => src/builtin_printf.cpp | 0 builtin_set.cpp => src/builtin_set.cpp | 0 .../builtin_set_color.cpp | 0 builtin_test.cpp => src/builtin_test.cpp | 0 builtin_ulimit.cpp => src/builtin_ulimit.cpp | 0 color.cpp => src/color.cpp | 0 color.h => src/color.h | 0 common.cpp => src/common.cpp | 0 common.h => src/common.h | 0 complete.cpp => src/complete.cpp | 0 complete.h => src/complete.h | 0 env.cpp => src/env.cpp | 0 env.h => src/env.h | 0 .../env_universal_common.cpp | 0 .../env_universal_common.h | 0 event.cpp => src/event.cpp | 0 event.h => src/event.h | 0 exec.cpp => src/exec.cpp | 0 exec.h => src/exec.h | 0 expand.cpp => src/expand.cpp | 0 expand.h => src/expand.h | 0 fallback.cpp => src/fallback.cpp | 0 fallback.h => src/fallback.h | 0 fish.cpp => src/fish.cpp | 0 fish_indent.cpp => src/fish_indent.cpp | 0 fish_tests.cpp => src/fish_tests.cpp | 0 fish_version.cpp => src/fish_version.cpp | 0 fish_version.h => src/fish_version.h | 0 function.cpp => src/function.cpp | 0 function.h => src/function.h | 0 highlight.cpp => src/highlight.cpp | 0 highlight.h => src/highlight.h | 0 history.cpp => src/history.cpp | 0 history.h => src/history.h | 0 input.cpp => src/input.cpp | 0 input.h => src/input.h | 0 input_common.cpp => src/input_common.cpp | 0 input_common.h => src/input_common.h | 0 intern.cpp => src/intern.cpp | 0 intern.h => src/intern.h | 0 io.cpp => src/io.cpp | 0 io.h => src/io.h | 0 iothread.cpp => src/iothread.cpp | 0 iothread.h => src/iothread.h | 0 key_reader.cpp => src/key_reader.cpp | 0 kill.cpp => src/kill.cpp | 0 kill.h => src/kill.h | 0 lru.h => src/lru.h | 0 mimedb.cpp => src/mimedb.cpp | 0 output.cpp => src/output.cpp | 0 output.h => src/output.h | 0 pager.cpp => src/pager.cpp | 0 pager.h => src/pager.h | 0 parse_constants.h => src/parse_constants.h | 0 .../parse_execution.cpp | 0 parse_execution.h => src/parse_execution.h | 0 .../parse_productions.cpp | 0 .../parse_productions.h | 0 parse_tree.cpp => src/parse_tree.cpp | 0 parse_tree.h => src/parse_tree.h | 0 parse_util.cpp => src/parse_util.cpp | 0 parse_util.h => src/parse_util.h | 0 parser.cpp => src/parser.cpp | 0 parser.h => src/parser.h | 0 .../parser_keywords.cpp | 0 parser_keywords.h => src/parser_keywords.h | 0 path.cpp => src/path.cpp | 0 path.h => src/path.h | 0 postfork.cpp => src/postfork.cpp | 0 postfork.h => src/postfork.h | 0 print_help.cpp => src/print_help.cpp | 0 print_help.h => src/print_help.h | 0 proc.cpp => src/proc.cpp | 0 proc.h => src/proc.h | 0 reader.cpp => src/reader.cpp | 0 reader.h => src/reader.h | 0 sanity.cpp => src/sanity.cpp | 0 sanity.h => src/sanity.h | 0 screen.cpp => src/screen.cpp | 0 screen.h => src/screen.h | 0 signal.cpp => src/signal.cpp | 0 signal.h => src/signal.h | 0 tokenizer.cpp => src/tokenizer.cpp | 0 tokenizer.h => src/tokenizer.h | 0 utf8.cpp => src/utf8.cpp | 0 utf8.h => src/utf8.h | 0 util.cpp => src/util.cpp | 0 util.h => src/util.h | 0 wcstringutil.cpp => src/wcstringutil.cpp | 0 wcstringutil.h => src/wcstringutil.h | 0 wgetopt.cpp => src/wgetopt.cpp | 0 wgetopt.h => src/wgetopt.h | 0 wildcard.cpp => src/wildcard.cpp | 0 wildcard.h => src/wildcard.h | 0 wutil.cpp => src/wutil.cpp | 0 wutil.h => src/wutil.h | 0 xdgmime.cpp => src/xdgmime.cpp | 0 xdgmime.h => src/xdgmime.h | 0 xdgmimealias.cpp => src/xdgmimealias.cpp | 0 xdgmimealias.h => src/xdgmimealias.h | 0 xdgmimeglob.cpp => src/xdgmimeglob.cpp | 0 xdgmimeglob.h => src/xdgmimeglob.h | 0 xdgmimeint.cpp => src/xdgmimeint.cpp | 0 xdgmimeint.h => src/xdgmimeint.h | 0 xdgmimemagic.cpp => src/xdgmimemagic.cpp | 0 xdgmimemagic.h => src/xdgmimemagic.h | 0 xdgmimeparent.cpp => src/xdgmimeparent.cpp | 0 xdgmimeparent.h => src/xdgmimeparent.h | 0 117 files changed, 292 insertions(+), 208 deletions(-) rename autoload.cpp => src/autoload.cpp (100%) rename autoload.h => src/autoload.h (100%) rename builtin.cpp => src/builtin.cpp (100%) rename builtin.h => src/builtin.h (100%) rename builtin_commandline.cpp => src/builtin_commandline.cpp (100%) rename builtin_complete.cpp => src/builtin_complete.cpp (100%) rename builtin_jobs.cpp => src/builtin_jobs.cpp (100%) rename builtin_printf.cpp => src/builtin_printf.cpp (100%) rename builtin_set.cpp => src/builtin_set.cpp (100%) rename builtin_set_color.cpp => src/builtin_set_color.cpp (100%) rename builtin_test.cpp => src/builtin_test.cpp (100%) rename builtin_ulimit.cpp => src/builtin_ulimit.cpp (100%) rename color.cpp => src/color.cpp (100%) rename color.h => src/color.h (100%) rename common.cpp => src/common.cpp (100%) rename common.h => src/common.h (100%) rename complete.cpp => src/complete.cpp (100%) rename complete.h => src/complete.h (100%) rename env.cpp => src/env.cpp (100%) rename env.h => src/env.h (100%) rename env_universal_common.cpp => src/env_universal_common.cpp (100%) rename env_universal_common.h => src/env_universal_common.h (100%) rename event.cpp => src/event.cpp (100%) rename event.h => src/event.h (100%) rename exec.cpp => src/exec.cpp (100%) rename exec.h => src/exec.h (100%) rename expand.cpp => src/expand.cpp (100%) rename expand.h => src/expand.h (100%) rename fallback.cpp => src/fallback.cpp (100%) rename fallback.h => src/fallback.h (100%) rename fish.cpp => src/fish.cpp (100%) rename fish_indent.cpp => src/fish_indent.cpp (100%) rename fish_tests.cpp => src/fish_tests.cpp (100%) rename fish_version.cpp => src/fish_version.cpp (100%) rename fish_version.h => src/fish_version.h (100%) rename function.cpp => src/function.cpp (100%) rename function.h => src/function.h (100%) rename highlight.cpp => src/highlight.cpp (100%) rename highlight.h => src/highlight.h (100%) rename history.cpp => src/history.cpp (100%) rename history.h => src/history.h (100%) rename input.cpp => src/input.cpp (100%) rename input.h => src/input.h (100%) rename input_common.cpp => src/input_common.cpp (100%) rename input_common.h => src/input_common.h (100%) rename intern.cpp => src/intern.cpp (100%) rename intern.h => src/intern.h (100%) rename io.cpp => src/io.cpp (100%) rename io.h => src/io.h (100%) rename iothread.cpp => src/iothread.cpp (100%) rename iothread.h => src/iothread.h (100%) rename key_reader.cpp => src/key_reader.cpp (100%) rename kill.cpp => src/kill.cpp (100%) rename kill.h => src/kill.h (100%) rename lru.h => src/lru.h (100%) rename mimedb.cpp => src/mimedb.cpp (100%) rename output.cpp => src/output.cpp (100%) rename output.h => src/output.h (100%) rename pager.cpp => src/pager.cpp (100%) rename pager.h => src/pager.h (100%) rename parse_constants.h => src/parse_constants.h (100%) rename parse_execution.cpp => src/parse_execution.cpp (100%) rename parse_execution.h => src/parse_execution.h (100%) rename parse_productions.cpp => src/parse_productions.cpp (100%) rename parse_productions.h => src/parse_productions.h (100%) rename parse_tree.cpp => src/parse_tree.cpp (100%) rename parse_tree.h => src/parse_tree.h (100%) rename parse_util.cpp => src/parse_util.cpp (100%) rename parse_util.h => src/parse_util.h (100%) rename parser.cpp => src/parser.cpp (100%) rename parser.h => src/parser.h (100%) rename parser_keywords.cpp => src/parser_keywords.cpp (100%) rename parser_keywords.h => src/parser_keywords.h (100%) rename path.cpp => src/path.cpp (100%) rename path.h => src/path.h (100%) rename postfork.cpp => src/postfork.cpp (100%) rename postfork.h => src/postfork.h (100%) rename print_help.cpp => src/print_help.cpp (100%) rename print_help.h => src/print_help.h (100%) rename proc.cpp => src/proc.cpp (100%) rename proc.h => src/proc.h (100%) rename reader.cpp => src/reader.cpp (100%) rename reader.h => src/reader.h (100%) rename sanity.cpp => src/sanity.cpp (100%) rename sanity.h => src/sanity.h (100%) rename screen.cpp => src/screen.cpp (100%) rename screen.h => src/screen.h (100%) rename signal.cpp => src/signal.cpp (100%) rename signal.h => src/signal.h (100%) rename tokenizer.cpp => src/tokenizer.cpp (100%) rename tokenizer.h => src/tokenizer.h (100%) rename utf8.cpp => src/utf8.cpp (100%) rename utf8.h => src/utf8.h (100%) rename util.cpp => src/util.cpp (100%) rename util.h => src/util.h (100%) rename wcstringutil.cpp => src/wcstringutil.cpp (100%) rename wcstringutil.h => src/wcstringutil.h (100%) rename wgetopt.cpp => src/wgetopt.cpp (100%) rename wgetopt.h => src/wgetopt.h (100%) rename wildcard.cpp => src/wildcard.cpp (100%) rename wildcard.h => src/wildcard.h (100%) rename wutil.cpp => src/wutil.cpp (100%) rename wutil.h => src/wutil.h (100%) rename xdgmime.cpp => src/xdgmime.cpp (100%) rename xdgmime.h => src/xdgmime.h (100%) rename xdgmimealias.cpp => src/xdgmimealias.cpp (100%) rename xdgmimealias.h => src/xdgmimealias.h (100%) rename xdgmimeglob.cpp => src/xdgmimeglob.cpp (100%) rename xdgmimeglob.h => src/xdgmimeglob.h (100%) rename xdgmimeint.cpp => src/xdgmimeint.cpp (100%) rename xdgmimeint.h => src/xdgmimeint.h (100%) rename xdgmimemagic.cpp => src/xdgmimemagic.cpp (100%) rename xdgmimemagic.h => src/xdgmimemagic.h (100%) rename xdgmimeparent.cpp => src/xdgmimeparent.cpp (100%) rename xdgmimeparent.h => src/xdgmimeparent.h (100%) diff --git a/Makefile.in b/Makefile.in index c896d33d3..d048a1aac 100644 --- a/Makefile.in +++ b/Makefile.in @@ -54,7 +54,7 @@ localedir = @localedir@ # MACROS = -DLOCALEDIR=\"$(localedir)\" -DPREFIX=L\"$(prefix)\" -DDATADIR=L\"$(datadir)\" -DSYSCONFDIR=L\"$(sysconfdir)\" -DBINDIR=L\"$(bindir)\" -DDOCDIR=L\"$(docdir)\" -CXXFLAGS = @CXXFLAGS@ $(MACROS) $(EXTRA_CXXFLAGS) +CXXFLAGS = @CXXFLAGS@ -iquote. -iquote./src/ $(MACROS) $(EXTRA_CXXFLAGS) CPPFLAGS = @CPPFLAGS@ LDFLAGS = @LDFLAGS@ LIBS = @LIBS@ @@ -72,52 +72,47 @@ HAVE_GETTEXT=@HAVE_GETTEXT@ HAVE_DOXYGEN=@HAVE_DOXYGEN@ -# -#Additional .cpp files used by common.o. These also have a corresponding -#.h file. -# - -COMMON_FILES := util.cpp fallback.cpp - - # # All objects that the system needs to build fish, except fish.o # -FISH_OBJS := function.o builtin.o complete.o env.o exec.o expand.o \ - highlight.o history.o kill.o parser.o proc.o reader.o sanity.o \ - tokenizer.o wildcard.o wgetopt.o wutil.o input.o output.o intern.o \ - env_universal_common.o input_common.o event.o \ - signal.o io.o parse_util.o common.o screen.o path.o autoload.o \ - parser_keywords.o iothread.o color.o postfork.o \ - builtin_test.o parse_tree.o parse_productions.o parse_execution.o \ - pager.o utf8.o fish_version.o wcstringutil.o +FISH_OBJS := obj/function.o obj/builtin.o obj/complete.o obj/env.o obj/exec.o \ + obj/expand.o obj/highlight.o obj/history.o obj/kill.o obj/parser.o \ + obj/proc.o obj/reader.o obj/sanity.o obj/tokenizer.o obj/wildcard.o \ + obj/wgetopt.o obj/wutil.o obj/input.o obj/output.o obj/intern.o \ + obj/env_universal_common.o obj/input_common.o obj/event.o obj/signal.o \ + obj/io.o obj/parse_util.o obj/common.o obj/screen.o obj/path.o \ + obj/autoload.o obj/parser_keywords.o obj/iothread.o obj/color.o \ + obj/postfork.o obj/builtin_test.o obj/parse_tree.o obj/parse_productions.o \ + obj/parse_execution.o obj/pager.o obj/utf8.o obj/fish_version.o \ + obj/wcstringutil.o -FISH_INDENT_OBJS := fish_indent.o print_help.o $(FISH_OBJS) +FISH_INDENT_OBJS := obj/fish_indent.o obj/print_help.o $(FISH_OBJS) # # Additional files used by builtin.o # -BUILTIN_FILES := builtin_set.cpp builtin_commandline.cpp \ - builtin_ulimit.cpp builtin_complete.cpp builtin_jobs.cpp \ - builtin_set_color.cpp builtin_printf.cpp +BUILTIN_FILES := src/builtin_set.cpp src/builtin_commandline.cpp \ + src/builtin_ulimit.cpp src/builtin_complete.cpp \ + src/builtin_jobs.cpp src/builtin_set_color.cpp \ + src/builtin_printf.cpp # # All objects that the system needs to build fish_tests # -FISH_TESTS_OBJS := $(FISH_OBJS) fish_tests.o +FISH_TESTS_OBJS := $(FISH_OBJS) obj/fish_tests.o # # All objects needed to build mimedb # -MIME_OBJS := mimedb.o print_help.o xdgmimealias.o xdgmime.o \ - xdgmimeglob.o xdgmimeint.o xdgmimemagic.o xdgmimeparent.o wutil.o \ - common.o fish_version.o +MIME_OBJS := obj/mimedb.o obj/print_help.o obj/xdgmimealias.o obj/xdgmime.o \ + obj/xdgmimeglob.o obj/xdgmimeint.o obj/xdgmimemagic.o obj/xdgmimeparent.o \ + obj/wutil.o obj/common.o obj/fish_version.o # @@ -227,7 +222,7 @@ all: $(PROGRAMS) $(user_doc) $(share_man) $(TRANSLATIONS) fish.pc FISH-BUILD-VERSION-FILE: FORCE @./build_tools/git_version_gen.sh -include FISH-BUILD-VERSION-FILE -CPPFLAGS += -DFISH_BUILD_VERSION=\"$(FISH_BUILD_VERSION)\" +CXXFLAGS += -DFISH_BUILD_VERSION=\"$(FISH_BUILD_VERSION)\" .PHONY: FORCE fish_version.o: FISH-BUILD-VERSION-FILE @@ -480,8 +475,6 @@ messages.pot: *.cpp *.h share/completions/*.fish share/functions/*.fish builtin.o: $(BUILTIN_FILES) -common.o: $(COMMON_FILES) - # # Generate the internal help functions by making doxygen create @@ -760,12 +753,24 @@ uninstall-translations: # The build rules for all the commands # +# +# How basic files get compiled +# +obj/%.o: src/%.cpp | obj + $(CXX) $(CXXFLAGS) -c $< -o $@ + +# +# obj directory +# +obj: + mkdir obj + # # Build the fish program. # -fish: $(FISH_OBJS) fish.o - $(CXX) $(CXXFLAGS) $(LDFLAGS_FISH) $(FISH_OBJS) fish.o $(LIBS) -o $@ +fish: $(FISH_OBJS) obj/fish.o + $(CXX) $(CXXFLAGS) $(LDFLAGS_FISH) $(FISH_OBJS) obj/fish.o $(LIBS) -o $@ # @@ -804,7 +809,7 @@ key_reader: $(FISH_OBJS) key_reader.o # Update dependencies # depend: - makedepend -fMakefile.in -Y *.cpp + makedepend -fMakefile.in -Y src/*.cpp ./config.status .PHONY: depend @@ -831,7 +836,7 @@ distclean: clean # deleted we won't be able to regenerate them clean: - rm -f *.o doc.h doc.tmp doc_src/*.doxygen doc_src/*.cpp doc_src/*.o doc_src/commands.hdr + rm -f obj/*.o *.o doc.h doc.tmp doc_src/*.doxygen doc_src/*.cpp doc_src/*.o doc_src/commands.hdr rm -f tests/tmp.err tests/tmp.out tests/tmp.status tests/foo.txt rm -f $(PROGRAMS) fish_tests key_reader rm -f command_list.txt command_list_toc.txt toc.txt @@ -842,183 +847,261 @@ clean: rm -rf doc user_doc share/man; \ fi rm -f po/*.gmo + rm -rf obj .PHONY: clean # DO NOT DELETE THIS LINE -- make depend depends on it. -autoload.o: config.h autoload.h common.h util.h lru.h wutil.h signal.h env.h -autoload.o: exec.h proc.h io.h parse_tree.h tokenizer.h parse_constants.h -builtin.o: config.h signal.h fallback.h util.h wutil.h common.h builtin.h -builtin.o: io.h function.h event.h env.h complete.h proc.h parse_tree.h -builtin.o: tokenizer.h parse_constants.h parser.h reader.h highlight.h -builtin.o: color.h wgetopt.h sanity.h wildcard.h expand.h input_common.h -builtin.o: input.h intern.h exec.h parse_util.h autoload.h lru.h -builtin.o: parser_keywords.h path.h history.h wcstringutil.h builtin_set.cpp -builtin.o: builtin_commandline.cpp builtin_complete.cpp builtin_ulimit.cpp -builtin.o: builtin_jobs.cpp builtin_set_color.cpp output.h screen.h -builtin.o: builtin_printf.cpp -builtin_commandline.o: config.h signal.h fallback.h util.h wutil.h common.h -builtin_commandline.o: builtin.h io.h wgetopt.h reader.h complete.h -builtin_commandline.o: highlight.h env.h color.h parse_constants.h proc.h -builtin_commandline.o: parse_tree.h tokenizer.h parser.h event.h function.h -builtin_commandline.o: input_common.h input.h parse_util.h autoload.h lru.h -builtin_complete.o: config.h signal.h fallback.h util.h wutil.h common.h -builtin_complete.o: builtin.h io.h complete.h wgetopt.h parser.h proc.h -builtin_complete.o: parse_tree.h tokenizer.h parse_constants.h event.h -builtin_complete.o: function.h env.h reader.h highlight.h color.h -builtin_jobs.o: config.h fallback.h signal.h util.h wutil.h common.h -builtin_jobs.o: builtin.h io.h proc.h parse_tree.h tokenizer.h -builtin_jobs.o: parse_constants.h parser.h event.h function.h env.h wgetopt.h -builtin_printf.o: common.h util.h -builtin_set.o: config.h signal.h fallback.h util.h wutil.h common.h builtin.h -builtin_set.o: io.h env.h expand.h parse_constants.h wgetopt.h proc.h -builtin_set.o: parse_tree.h tokenizer.h parser.h event.h function.h -builtin_set_color.o: config.h builtin.h util.h io.h common.h color.h output.h -builtin_set_color.o: fallback.h signal.h screen.h highlight.h env.h -builtin_test.o: config.h common.h util.h builtin.h io.h wutil.h proc.h -builtin_test.o: signal.h parse_tree.h tokenizer.h parse_constants.h -builtin_ulimit.o: config.h fallback.h signal.h util.h builtin.h io.h common.h -builtin_ulimit.o: wgetopt.h -color.o: color.h config.h common.h util.h fallback.h signal.h -common.o: config.h fallback.h signal.h util.h wutil.h common.h expand.h -common.o: parse_constants.h proc.h io.h parse_tree.h tokenizer.h wildcard.h -common.o: complete.h parser.h event.h function.h env.h util.cpp fallback.cpp -complete.o: config.h signal.h fallback.h util.h tokenizer.h common.h -complete.o: wildcard.h expand.h parse_constants.h complete.h proc.h io.h -complete.o: parse_tree.h parser.h event.h function.h env.h builtin.h exec.h -complete.o: reader.h highlight.h color.h history.h wutil.h intern.h -complete.o: parse_util.h autoload.h lru.h parser_keywords.h path.h iothread.h -env.o: config.h signal.h fallback.h util.h wutil.h common.h proc.h io.h -env.o: parse_tree.h tokenizer.h parse_constants.h env.h sanity.h expand.h -env.o: history.h reader.h complete.h highlight.h color.h parser.h event.h -env.o: function.h env_universal_common.h input.h input_common.h path.h -env.o: fish_version.h -env_universal_common.o: config.h env_universal_common.h wutil.h common.h -env_universal_common.o: util.h env.h fallback.h signal.h utf8.h path.h -env_universal_common.o: iothread.h -event.o: config.h signal.h fallback.h util.h wutil.h common.h function.h -event.o: event.h env.h input_common.h proc.h io.h parse_tree.h tokenizer.h -event.o: parse_constants.h parser.h -exec.o: config.h signal.h fallback.h util.h iothread.h postfork.h common.h -exec.o: proc.h io.h parse_tree.h tokenizer.h parse_constants.h wutil.h exec.h -exec.o: parser.h event.h function.h env.h builtin.h wildcard.h expand.h -exec.o: complete.h sanity.h parse_util.h autoload.h lru.h -expand.o: config.h signal.h fallback.h util.h common.h wutil.h env.h proc.h -expand.o: io.h parse_tree.h tokenizer.h parse_constants.h parser.h event.h -expand.o: function.h expand.h wildcard.h complete.h exec.h iothread.h -expand.o: parse_util.h autoload.h lru.h -fallback.o: config.h fallback.h signal.h util.h -fish.o: config.h signal.h fallback.h util.h common.h reader.h io.h complete.h -fish.o: highlight.h env.h color.h parse_constants.h builtin.h function.h -fish.o: event.h wutil.h sanity.h proc.h parse_tree.h tokenizer.h parser.h -fish.o: expand.h intern.h exec.h output.h screen.h history.h path.h input.h -fish.o: input_common.h fish_version.h -fish_indent.o: config.h wutil.h common.h util.h output.h fallback.h signal.h -fish_indent.o: screen.h highlight.h env.h color.h input.h input_common.h -fish_indent.o: parse_tree.h tokenizer.h parse_constants.h print_help.h -fish_indent.o: fish_version.h -fish_tests.o: config.h signal.h fallback.h util.h common.h proc.h io.h -fish_tests.o: parse_tree.h tokenizer.h parse_constants.h reader.h complete.h -fish_tests.o: highlight.h env.h color.h builtin.h function.h event.h -fish_tests.o: autoload.h lru.h wutil.h expand.h parser.h output.h screen.h -fish_tests.o: exec.h path.h history.h iothread.h postfork.h parse_util.h -fish_tests.o: pager.h input.h input_common.h utf8.h env_universal_common.h -fish_tests.o: wcstringutil.h -fish_version.o: fish_version.h -function.o: config.h signal.h wutil.h common.h util.h fallback.h function.h -function.o: event.h env.h proc.h io.h parse_tree.h tokenizer.h -function.o: parse_constants.h parser.h intern.h reader.h complete.h -function.o: highlight.h color.h parse_util.h autoload.h lru.h -function.o: parser_keywords.h expand.h -highlight.o: config.h signal.h fallback.h util.h wutil.h common.h highlight.h -highlight.o: env.h color.h tokenizer.h proc.h io.h parse_tree.h -highlight.o: parse_constants.h parser.h event.h function.h parse_util.h -highlight.o: autoload.h lru.h parser_keywords.h builtin.h expand.h sanity.h -highlight.o: complete.h output.h screen.h wildcard.h path.h history.h -history.o: config.h fallback.h signal.h util.h sanity.h tokenizer.h common.h -history.o: reader.h io.h complete.h highlight.h env.h color.h -history.o: parse_constants.h parse_tree.h wutil.h history.h intern.h path.h -history.o: autoload.h lru.h iothread.h -input.o: config.h signal.h fallback.h util.h wutil.h common.h reader.h io.h -input.o: complete.h highlight.h env.h color.h parse_constants.h proc.h -input.o: parse_tree.h tokenizer.h sanity.h input_common.h input.h parser.h -input.o: event.h function.h expand.h output.h screen.h intern.h -input_common.o: config.h fallback.h signal.h util.h common.h wutil.h -input_common.o: input_common.h env_universal_common.h env.h iothread.h -intern.o: config.h fallback.h signal.h util.h wutil.h common.h intern.h -io.o: config.h fallback.h signal.h util.h wutil.h common.h exec.h proc.h io.h -io.o: parse_tree.h tokenizer.h parse_constants.h -iothread.o: config.h iothread.h common.h util.h signal.h -key_reader.o: config.h common.h util.h fallback.h signal.h input_common.h -kill.o: config.h signal.h fallback.h util.h wutil.h common.h kill.h proc.h -kill.o: io.h parse_tree.h tokenizer.h parse_constants.h sanity.h env.h exec.h -kill.o: path.h -mimedb.o: config.h xdgmime.h fallback.h signal.h util.h print_help.h -mimedb.o: fish_version.h -output.o: config.h signal.h fallback.h util.h wutil.h common.h expand.h -output.o: parse_constants.h output.h screen.h highlight.h env.h color.h -pager.o: config.h pager.h complete.h util.h common.h screen.h highlight.h -pager.o: env.h color.h reader.h io.h parse_constants.h input_common.h wutil.h -parse_execution.o: parse_execution.h config.h util.h parse_tree.h common.h -parse_execution.o: tokenizer.h parse_constants.h proc.h signal.h io.h -parse_execution.o: parse_util.h autoload.h lru.h complete.h wildcard.h -parse_execution.o: expand.h builtin.h parser.h event.h function.h env.h -parse_execution.o: reader.h highlight.h color.h wutil.h exec.h path.h -parse_productions.o: parse_productions.h parse_tree.h config.h util.h -parse_productions.o: common.h tokenizer.h parse_constants.h -parse_tree.o: parse_productions.h parse_tree.h config.h util.h common.h -parse_tree.o: tokenizer.h parse_constants.h fallback.h signal.h wutil.h -parse_tree.o: proc.h io.h expand.h -parse_util.o: config.h fallback.h signal.h util.h wutil.h common.h -parse_util.o: tokenizer.h parse_util.h autoload.h lru.h parse_tree.h -parse_util.o: parse_constants.h expand.h intern.h exec.h proc.h io.h env.h -parse_util.o: wildcard.h complete.h parser.h event.h function.h builtin.h -parser.o: config.h fallback.h signal.h util.h common.h wutil.h proc.h io.h -parser.o: parse_tree.h tokenizer.h parse_constants.h parser.h event.h -parser.o: function.h env.h parser_keywords.h exec.h wildcard.h expand.h -parser.o: complete.h builtin.h reader.h highlight.h color.h sanity.h intern.h -parser.o: parse_util.h autoload.h lru.h path.h parse_execution.h -parser_keywords.o: config.h fallback.h signal.h common.h util.h -parser_keywords.o: parser_keywords.h -path.o: config.h fallback.h signal.h util.h common.h env.h wutil.h path.h -path.o: expand.h parse_constants.h -postfork.o: signal.h postfork.h config.h common.h util.h proc.h io.h -postfork.o: parse_tree.h tokenizer.h parse_constants.h wutil.h iothread.h -postfork.o: exec.h -print_help.o: print_help.h -proc.o: config.h signal.h fallback.h util.h wutil.h common.h proc.h io.h -proc.o: parse_tree.h tokenizer.h parse_constants.h reader.h complete.h -proc.o: highlight.h env.h color.h sanity.h parser.h event.h function.h -proc.o: output.h screen.h -reader.o: config.h signal.h fallback.h util.h wutil.h common.h highlight.h -reader.o: env.h color.h reader.h io.h complete.h parse_constants.h proc.h -reader.o: parse_tree.h tokenizer.h parser.h event.h function.h history.h -reader.o: sanity.h exec.h expand.h kill.h input_common.h input.h output.h -reader.o: screen.h iothread.h intern.h path.h parse_util.h autoload.h lru.h -reader.o: parser_keywords.h pager.h -sanity.o: config.h signal.h fallback.h util.h common.h sanity.h proc.h io.h -sanity.o: parse_tree.h tokenizer.h parse_constants.h history.h wutil.h -sanity.o: reader.h complete.h highlight.h env.h color.h kill.h -screen.o: config.h fallback.h signal.h common.h util.h wutil.h output.h -screen.o: screen.h highlight.h env.h color.h pager.h complete.h reader.h io.h -screen.o: parse_constants.h -signal.o: config.h signal.h common.h util.h fallback.h wutil.h event.h -signal.o: reader.h io.h complete.h highlight.h env.h color.h -signal.o: parse_constants.h proc.h parse_tree.h tokenizer.h -tokenizer.o: config.h fallback.h signal.h util.h wutil.h common.h tokenizer.h -utf8.o: utf8.h -util.o: config.h fallback.h signal.h util.h common.h wutil.h -wcstringutil.o: config.h wcstringutil.h common.h util.h -wgetopt.o: config.h wgetopt.h wutil.h common.h util.h fallback.h signal.h -wildcard.o: config.h fallback.h signal.h util.h wutil.h common.h complete.h -wildcard.o: wildcard.h expand.h parse_constants.h reader.h io.h highlight.h -wildcard.o: env.h color.h exec.h proc.h parse_tree.h tokenizer.h -wutil.o: config.h fallback.h signal.h util.h common.h wutil.h -xdgmime.o: xdgmime.h xdgmimeint.h xdgmimeglob.h xdgmimemagic.h xdgmimealias.h -xdgmime.o: xdgmimeparent.h -xdgmimealias.o: xdgmimealias.h xdgmime.h xdgmimeint.h -xdgmimeglob.o: xdgmimeglob.h xdgmime.h xdgmimeint.h -xdgmimeint.o: xdgmimeint.h xdgmime.h -xdgmimemagic.o: xdgmimemagic.h xdgmime.h xdgmimeint.h -xdgmimeparent.o: xdgmimeparent.h xdgmime.h xdgmimeint.h +src/autoload.o: config.h src/autoload.h src/common.h src/util.h src/lru.h +src/autoload.o: src/wutil.h src/signal.h src/env.h src/exec.h src/proc.h +src/autoload.o: src/io.h src/parse_tree.h src/tokenizer.h +src/autoload.o: src/parse_constants.h +src/builtin.o: config.h src/signal.h src/fallback.h src/util.h src/wutil.h +src/builtin.o: src/common.h src/builtin.h src/io.h src/function.h src/event.h +src/builtin.o: src/env.h src/complete.h src/proc.h src/parse_tree.h +src/builtin.o: src/tokenizer.h src/parse_constants.h src/parser.h +src/builtin.o: src/reader.h src/highlight.h src/color.h src/wgetopt.h +src/builtin.o: src/sanity.h src/wildcard.h src/expand.h src/input_common.h +src/builtin.o: src/input.h src/intern.h src/exec.h src/parse_util.h +src/builtin.o: src/autoload.h src/lru.h src/parser_keywords.h src/path.h +src/builtin.o: src/history.h src/wcstringutil.h src/builtin_set.cpp +src/builtin.o: src/builtin_commandline.cpp src/builtin_complete.cpp +src/builtin.o: src/builtin_ulimit.cpp src/builtin_jobs.cpp +src/builtin.o: src/builtin_set_color.cpp src/output.h src/screen.h +src/builtin.o: src/builtin_printf.cpp +src/builtin_commandline.o: config.h src/signal.h src/fallback.h src/util.h +src/builtin_commandline.o: src/wutil.h src/common.h src/builtin.h src/io.h +src/builtin_commandline.o: src/wgetopt.h src/reader.h src/complete.h +src/builtin_commandline.o: src/highlight.h src/env.h src/color.h +src/builtin_commandline.o: src/parse_constants.h src/proc.h src/parse_tree.h +src/builtin_commandline.o: src/tokenizer.h src/parser.h src/event.h +src/builtin_commandline.o: src/function.h src/input_common.h src/input.h +src/builtin_commandline.o: src/parse_util.h src/autoload.h src/lru.h +src/builtin_complete.o: config.h src/signal.h src/fallback.h src/util.h +src/builtin_complete.o: src/wutil.h src/common.h src/builtin.h src/io.h +src/builtin_complete.o: src/complete.h src/wgetopt.h src/parser.h src/proc.h +src/builtin_complete.o: src/parse_tree.h src/tokenizer.h +src/builtin_complete.o: src/parse_constants.h src/event.h src/function.h +src/builtin_complete.o: src/env.h src/reader.h src/highlight.h src/color.h +src/builtin_jobs.o: config.h src/fallback.h src/signal.h src/util.h +src/builtin_jobs.o: src/wutil.h src/common.h src/builtin.h src/io.h +src/builtin_jobs.o: src/proc.h src/parse_tree.h src/tokenizer.h +src/builtin_jobs.o: src/parse_constants.h src/parser.h src/event.h +src/builtin_jobs.o: src/function.h src/env.h src/wgetopt.h +src/builtin_printf.o: src/common.h src/util.h +src/builtin_set.o: config.h src/signal.h src/fallback.h src/util.h +src/builtin_set.o: src/wutil.h src/common.h src/builtin.h src/io.h src/env.h +src/builtin_set.o: src/expand.h src/parse_constants.h src/wgetopt.h +src/builtin_set.o: src/proc.h src/parse_tree.h src/tokenizer.h src/parser.h +src/builtin_set.o: src/event.h src/function.h +src/builtin_set_color.o: config.h src/builtin.h src/util.h src/io.h +src/builtin_set_color.o: src/common.h src/color.h src/output.h src/fallback.h +src/builtin_set_color.o: src/signal.h src/screen.h src/highlight.h src/env.h +src/builtin_test.o: config.h src/common.h src/util.h src/builtin.h src/io.h +src/builtin_test.o: src/wutil.h src/proc.h src/signal.h src/parse_tree.h +src/builtin_test.o: src/tokenizer.h src/parse_constants.h +src/builtin_ulimit.o: config.h src/fallback.h src/signal.h src/util.h +src/builtin_ulimit.o: src/builtin.h src/io.h src/common.h src/wgetopt.h +src/color.o: src/color.h config.h src/common.h src/util.h src/fallback.h +src/color.o: src/signal.h +src/common.o: config.h src/fallback.h src/signal.h src/util.h src/wutil.h +src/common.o: src/common.h src/expand.h src/parse_constants.h src/proc.h +src/common.o: src/io.h src/parse_tree.h src/tokenizer.h src/wildcard.h +src/common.o: src/complete.h src/parser.h src/event.h src/function.h +src/common.o: src/env.h src/util.cpp src/fallback.cpp +src/complete.o: config.h src/signal.h src/fallback.h src/util.h +src/complete.o: src/tokenizer.h src/common.h src/wildcard.h src/expand.h +src/complete.o: src/parse_constants.h src/complete.h src/proc.h src/io.h +src/complete.o: src/parse_tree.h src/parser.h src/event.h src/function.h +src/complete.o: src/env.h src/builtin.h src/exec.h src/reader.h +src/complete.o: src/highlight.h src/color.h src/history.h src/wutil.h +src/complete.o: src/intern.h src/parse_util.h src/autoload.h src/lru.h +src/complete.o: src/parser_keywords.h src/path.h src/iothread.h +src/env.o: config.h src/signal.h src/fallback.h src/util.h src/wutil.h +src/env.o: src/common.h src/proc.h src/io.h src/parse_tree.h src/tokenizer.h +src/env.o: src/parse_constants.h src/env.h src/sanity.h src/expand.h +src/env.o: src/history.h src/reader.h src/complete.h src/highlight.h +src/env.o: src/color.h src/parser.h src/event.h src/function.h +src/env.o: src/env_universal_common.h src/input.h src/input_common.h +src/env.o: src/path.h src/fish_version.h +src/env_universal_common.o: config.h src/env_universal_common.h src/wutil.h +src/env_universal_common.o: src/common.h src/util.h src/env.h src/fallback.h +src/env_universal_common.o: src/signal.h src/utf8.h src/path.h src/iothread.h +src/event.o: config.h src/signal.h src/fallback.h src/util.h src/wutil.h +src/event.o: src/common.h src/function.h src/event.h src/env.h +src/event.o: src/input_common.h src/proc.h src/io.h src/parse_tree.h +src/event.o: src/tokenizer.h src/parse_constants.h src/parser.h +src/exec.o: config.h src/signal.h src/fallback.h src/util.h src/iothread.h +src/exec.o: src/postfork.h src/common.h src/proc.h src/io.h src/parse_tree.h +src/exec.o: src/tokenizer.h src/parse_constants.h src/wutil.h src/exec.h +src/exec.o: src/parser.h src/event.h src/function.h src/env.h src/builtin.h +src/exec.o: src/wildcard.h src/expand.h src/complete.h src/sanity.h +src/exec.o: src/parse_util.h src/autoload.h src/lru.h +src/expand.o: config.h src/signal.h src/fallback.h src/util.h src/common.h +src/expand.o: src/wutil.h src/env.h src/proc.h src/io.h src/parse_tree.h +src/expand.o: src/tokenizer.h src/parse_constants.h src/parser.h src/event.h +src/expand.o: src/function.h src/expand.h src/wildcard.h src/complete.h +src/expand.o: src/exec.h src/iothread.h src/parse_util.h src/autoload.h +src/expand.o: src/lru.h +src/fallback.o: config.h src/fallback.h src/signal.h src/util.h +src/fish.o: config.h src/signal.h src/fallback.h src/util.h src/common.h +src/fish.o: src/reader.h src/io.h src/complete.h src/highlight.h src/env.h +src/fish.o: src/color.h src/parse_constants.h src/builtin.h src/function.h +src/fish.o: src/event.h src/wutil.h src/sanity.h src/proc.h src/parse_tree.h +src/fish.o: src/tokenizer.h src/parser.h src/expand.h src/intern.h src/exec.h +src/fish.o: src/output.h src/screen.h src/history.h src/path.h src/input.h +src/fish.o: src/input_common.h src/fish_version.h +src/fish_indent.o: config.h src/wutil.h src/common.h src/util.h src/output.h +src/fish_indent.o: src/fallback.h src/signal.h src/screen.h src/highlight.h +src/fish_indent.o: src/env.h src/color.h src/input.h src/input_common.h +src/fish_indent.o: src/parse_tree.h src/tokenizer.h src/parse_constants.h +src/fish_indent.o: src/print_help.h src/fish_version.h +src/fish_tests.o: config.h src/signal.h src/fallback.h src/util.h +src/fish_tests.o: src/common.h src/proc.h src/io.h src/parse_tree.h +src/fish_tests.o: src/tokenizer.h src/parse_constants.h src/reader.h +src/fish_tests.o: src/complete.h src/highlight.h src/env.h src/color.h +src/fish_tests.o: src/builtin.h src/function.h src/event.h src/autoload.h +src/fish_tests.o: src/lru.h src/wutil.h src/expand.h src/parser.h +src/fish_tests.o: src/output.h src/screen.h src/exec.h src/path.h +src/fish_tests.o: src/history.h src/iothread.h src/postfork.h +src/fish_tests.o: src/parse_util.h src/pager.h src/input.h src/input_common.h +src/fish_tests.o: src/utf8.h src/env_universal_common.h src/wcstringutil.h +src/fish_version.o: src/fish_version.h +src/function.o: config.h src/signal.h src/wutil.h src/common.h src/util.h +src/function.o: src/fallback.h src/function.h src/event.h src/env.h +src/function.o: src/proc.h src/io.h src/parse_tree.h src/tokenizer.h +src/function.o: src/parse_constants.h src/parser.h src/intern.h src/reader.h +src/function.o: src/complete.h src/highlight.h src/color.h src/parse_util.h +src/function.o: src/autoload.h src/lru.h src/parser_keywords.h src/expand.h +src/highlight.o: config.h src/signal.h src/fallback.h src/util.h src/wutil.h +src/highlight.o: src/common.h src/highlight.h src/env.h src/color.h +src/highlight.o: src/tokenizer.h src/proc.h src/io.h src/parse_tree.h +src/highlight.o: src/parse_constants.h src/parser.h src/event.h +src/highlight.o: src/function.h src/parse_util.h src/autoload.h src/lru.h +src/highlight.o: src/parser_keywords.h src/builtin.h src/expand.h +src/highlight.o: src/sanity.h src/complete.h src/output.h src/screen.h +src/highlight.o: src/wildcard.h src/path.h src/history.h +src/history.o: config.h src/fallback.h src/signal.h src/util.h src/sanity.h +src/history.o: src/tokenizer.h src/common.h src/reader.h src/io.h +src/history.o: src/complete.h src/highlight.h src/env.h src/color.h +src/history.o: src/parse_constants.h src/parse_tree.h src/wutil.h +src/history.o: src/history.h src/intern.h src/path.h src/autoload.h src/lru.h +src/history.o: src/iothread.h +src/input.o: config.h src/signal.h src/fallback.h src/util.h src/wutil.h +src/input.o: src/common.h src/reader.h src/io.h src/complete.h +src/input.o: src/highlight.h src/env.h src/color.h src/parse_constants.h +src/input.o: src/proc.h src/parse_tree.h src/tokenizer.h src/sanity.h +src/input.o: src/input_common.h src/input.h src/parser.h src/event.h +src/input.o: src/function.h src/expand.h src/output.h src/screen.h +src/input.o: src/intern.h +src/input_common.o: config.h src/fallback.h src/signal.h src/util.h +src/input_common.o: src/common.h src/wutil.h src/input_common.h +src/input_common.o: src/env_universal_common.h src/env.h src/iothread.h +src/intern.o: config.h src/fallback.h src/signal.h src/util.h src/wutil.h +src/intern.o: src/common.h src/intern.h +src/io.o: config.h src/fallback.h src/signal.h src/util.h src/wutil.h +src/io.o: src/common.h src/exec.h src/proc.h src/io.h src/parse_tree.h +src/io.o: src/tokenizer.h src/parse_constants.h +src/iothread.o: config.h src/iothread.h src/common.h src/util.h src/signal.h +src/key_reader.o: config.h src/common.h src/util.h src/fallback.h +src/key_reader.o: src/signal.h src/input_common.h +src/kill.o: config.h src/signal.h src/fallback.h src/util.h src/wutil.h +src/kill.o: src/common.h src/kill.h src/proc.h src/io.h src/parse_tree.h +src/kill.o: src/tokenizer.h src/parse_constants.h src/sanity.h src/env.h +src/kill.o: src/exec.h src/path.h +src/mimedb.o: config.h src/xdgmime.h src/fallback.h src/signal.h src/util.h +src/mimedb.o: src/print_help.h src/fish_version.h +src/output.o: config.h src/signal.h src/fallback.h src/util.h src/wutil.h +src/output.o: src/common.h src/expand.h src/parse_constants.h src/output.h +src/output.o: src/screen.h src/highlight.h src/env.h src/color.h +src/pager.o: config.h src/pager.h src/complete.h src/util.h src/common.h +src/pager.o: src/screen.h src/highlight.h src/env.h src/color.h src/reader.h +src/pager.o: src/io.h src/parse_constants.h src/input_common.h src/wutil.h +src/parse_execution.o: src/parse_execution.h config.h src/util.h +src/parse_execution.o: src/parse_tree.h src/common.h src/tokenizer.h +src/parse_execution.o: src/parse_constants.h src/proc.h src/signal.h src/io.h +src/parse_execution.o: src/parse_util.h src/autoload.h src/lru.h +src/parse_execution.o: src/complete.h src/wildcard.h src/expand.h +src/parse_execution.o: src/builtin.h src/parser.h src/event.h src/function.h +src/parse_execution.o: src/env.h src/reader.h src/highlight.h src/color.h +src/parse_execution.o: src/wutil.h src/exec.h src/path.h +src/parse_productions.o: src/parse_productions.h src/parse_tree.h config.h +src/parse_productions.o: src/util.h src/common.h src/tokenizer.h +src/parse_productions.o: src/parse_constants.h +src/parse_tree.o: src/parse_productions.h src/parse_tree.h config.h +src/parse_tree.o: src/util.h src/common.h src/tokenizer.h +src/parse_tree.o: src/parse_constants.h src/fallback.h src/signal.h +src/parse_tree.o: src/wutil.h src/proc.h src/io.h src/expand.h +src/parse_util.o: config.h src/fallback.h src/signal.h src/util.h src/wutil.h +src/parse_util.o: src/common.h src/tokenizer.h src/parse_util.h +src/parse_util.o: src/autoload.h src/lru.h src/parse_tree.h +src/parse_util.o: src/parse_constants.h src/expand.h src/intern.h src/exec.h +src/parse_util.o: src/proc.h src/io.h src/env.h src/wildcard.h src/complete.h +src/parse_util.o: src/parser.h src/event.h src/function.h src/builtin.h +src/parser.o: config.h src/fallback.h src/signal.h src/util.h src/common.h +src/parser.o: src/wutil.h src/proc.h src/io.h src/parse_tree.h +src/parser.o: src/tokenizer.h src/parse_constants.h src/parser.h src/event.h +src/parser.o: src/function.h src/env.h src/parser_keywords.h src/exec.h +src/parser.o: src/wildcard.h src/expand.h src/complete.h src/builtin.h +src/parser.o: src/reader.h src/highlight.h src/color.h src/sanity.h +src/parser.o: src/intern.h src/parse_util.h src/autoload.h src/lru.h +src/parser.o: src/path.h src/parse_execution.h +src/parser_keywords.o: config.h src/fallback.h src/signal.h src/common.h +src/parser_keywords.o: src/util.h src/parser_keywords.h +src/path.o: config.h src/fallback.h src/signal.h src/util.h src/common.h +src/path.o: src/env.h src/wutil.h src/path.h src/expand.h +src/path.o: src/parse_constants.h +src/postfork.o: src/signal.h src/postfork.h config.h src/common.h src/util.h +src/postfork.o: src/proc.h src/io.h src/parse_tree.h src/tokenizer.h +src/postfork.o: src/parse_constants.h src/wutil.h src/iothread.h src/exec.h +src/print_help.o: src/print_help.h +src/proc.o: config.h src/signal.h src/fallback.h src/util.h src/wutil.h +src/proc.o: src/common.h src/proc.h src/io.h src/parse_tree.h src/tokenizer.h +src/proc.o: src/parse_constants.h src/reader.h src/complete.h src/highlight.h +src/proc.o: src/env.h src/color.h src/sanity.h src/parser.h src/event.h +src/proc.o: src/function.h src/output.h src/screen.h +src/reader.o: config.h src/signal.h src/fallback.h src/util.h src/wutil.h +src/reader.o: src/common.h src/highlight.h src/env.h src/color.h src/reader.h +src/reader.o: src/io.h src/complete.h src/parse_constants.h src/proc.h +src/reader.o: src/parse_tree.h src/tokenizer.h src/parser.h src/event.h +src/reader.o: src/function.h src/history.h src/sanity.h src/exec.h +src/reader.o: src/expand.h src/kill.h src/input_common.h src/input.h +src/reader.o: src/output.h src/screen.h src/iothread.h src/intern.h +src/reader.o: src/path.h src/parse_util.h src/autoload.h src/lru.h +src/reader.o: src/parser_keywords.h src/pager.h +src/sanity.o: config.h src/signal.h src/fallback.h src/util.h src/common.h +src/sanity.o: src/sanity.h src/proc.h src/io.h src/parse_tree.h +src/sanity.o: src/tokenizer.h src/parse_constants.h src/history.h src/wutil.h +src/sanity.o: src/reader.h src/complete.h src/highlight.h src/env.h +src/sanity.o: src/color.h src/kill.h +src/screen.o: config.h src/fallback.h src/signal.h src/common.h src/util.h +src/screen.o: src/wutil.h src/output.h src/screen.h src/highlight.h src/env.h +src/screen.o: src/color.h src/pager.h src/complete.h src/reader.h src/io.h +src/screen.o: src/parse_constants.h +src/signal.o: config.h src/signal.h src/common.h src/util.h src/fallback.h +src/signal.o: src/wutil.h src/event.h src/reader.h src/io.h src/complete.h +src/signal.o: src/highlight.h src/env.h src/color.h src/parse_constants.h +src/signal.o: src/proc.h src/parse_tree.h src/tokenizer.h +src/tokenizer.o: config.h src/fallback.h src/signal.h src/util.h src/wutil.h +src/tokenizer.o: src/common.h src/tokenizer.h +src/utf8.o: src/utf8.h +src/util.o: config.h src/fallback.h src/signal.h src/util.h src/common.h +src/util.o: src/wutil.h +src/wcstringutil.o: config.h src/wcstringutil.h src/common.h src/util.h +src/wgetopt.o: config.h src/wgetopt.h src/wutil.h src/common.h src/util.h +src/wgetopt.o: src/fallback.h src/signal.h +src/wildcard.o: config.h src/fallback.h src/signal.h src/util.h src/wutil.h +src/wildcard.o: src/common.h src/complete.h src/wildcard.h src/expand.h +src/wildcard.o: src/parse_constants.h src/reader.h src/io.h src/highlight.h +src/wildcard.o: src/env.h src/color.h src/exec.h src/proc.h src/parse_tree.h +src/wildcard.o: src/tokenizer.h +src/wutil.o: config.h src/fallback.h src/signal.h src/util.h src/common.h +src/wutil.o: src/wutil.h +src/xdgmime.o: src/xdgmime.h src/xdgmimeint.h src/xdgmimeglob.h +src/xdgmime.o: src/xdgmimemagic.h src/xdgmimealias.h src/xdgmimeparent.h +src/xdgmimealias.o: src/xdgmimealias.h src/xdgmime.h src/xdgmimeint.h +src/xdgmimeglob.o: src/xdgmimeglob.h src/xdgmime.h src/xdgmimeint.h +src/xdgmimeint.o: src/xdgmimeint.h src/xdgmime.h +src/xdgmimemagic.o: src/xdgmimemagic.h src/xdgmime.h src/xdgmimeint.h +src/xdgmimeparent.o: src/xdgmimeparent.h src/xdgmime.h src/xdgmimeint.h diff --git a/fish.xcodeproj/project.pbxproj b/fish.xcodeproj/project.pbxproj index 7b0982d5e..bdc74024c 100644 --- a/fish.xcodeproj/project.pbxproj +++ b/fish.xcodeproj/project.pbxproj @@ -361,7 +361,7 @@ /* End PBXCopyFilesBuildPhase section */ /* Begin PBXFileReference section */ - 4E142D731B56B5D7008783C8 /* config.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = config.h; path = osx/config.h; sourceTree = ""; }; + 4E142D731B56B5D7008783C8 /* config.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = config.h; path = ../osx/config.h; sourceTree = ""; }; D00769421990137800CA4627 /* fish_tests */ = {isa = PBXFileReference; explicitFileType = "compiled.mach-o.executable"; includeInIndex = 0; path = fish_tests; sourceTree = BUILT_PRODUCTS_DIR; }; D00F63F019137E9D00FCCDEC /* fish_version.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = fish_version.cpp; sourceTree = ""; }; D01A2D23169B730A00767098 /* man1 */ = {isa = PBXFileReference; lastKnownFileType = text; name = man1; path = pages_for_manpath/man1; sourceTree = BUILT_PRODUCTS_DIR; }; @@ -701,6 +701,7 @@ D0A0856713B3ACEE0099B651 /* xdgmimeparent.cpp */, ); name = Sources; + path = src; sourceTree = ""; }; D0D02AAB15985C14008E62BD /* Resources */ = { diff --git a/autoload.cpp b/src/autoload.cpp similarity index 100% rename from autoload.cpp rename to src/autoload.cpp diff --git a/autoload.h b/src/autoload.h similarity index 100% rename from autoload.h rename to src/autoload.h diff --git a/builtin.cpp b/src/builtin.cpp similarity index 100% rename from builtin.cpp rename to src/builtin.cpp diff --git a/builtin.h b/src/builtin.h similarity index 100% rename from builtin.h rename to src/builtin.h diff --git a/builtin_commandline.cpp b/src/builtin_commandline.cpp similarity index 100% rename from builtin_commandline.cpp rename to src/builtin_commandline.cpp diff --git a/builtin_complete.cpp b/src/builtin_complete.cpp similarity index 100% rename from builtin_complete.cpp rename to src/builtin_complete.cpp diff --git a/builtin_jobs.cpp b/src/builtin_jobs.cpp similarity index 100% rename from builtin_jobs.cpp rename to src/builtin_jobs.cpp diff --git a/builtin_printf.cpp b/src/builtin_printf.cpp similarity index 100% rename from builtin_printf.cpp rename to src/builtin_printf.cpp diff --git a/builtin_set.cpp b/src/builtin_set.cpp similarity index 100% rename from builtin_set.cpp rename to src/builtin_set.cpp diff --git a/builtin_set_color.cpp b/src/builtin_set_color.cpp similarity index 100% rename from builtin_set_color.cpp rename to src/builtin_set_color.cpp diff --git a/builtin_test.cpp b/src/builtin_test.cpp similarity index 100% rename from builtin_test.cpp rename to src/builtin_test.cpp diff --git a/builtin_ulimit.cpp b/src/builtin_ulimit.cpp similarity index 100% rename from builtin_ulimit.cpp rename to src/builtin_ulimit.cpp diff --git a/color.cpp b/src/color.cpp similarity index 100% rename from color.cpp rename to src/color.cpp diff --git a/color.h b/src/color.h similarity index 100% rename from color.h rename to src/color.h diff --git a/common.cpp b/src/common.cpp similarity index 100% rename from common.cpp rename to src/common.cpp diff --git a/common.h b/src/common.h similarity index 100% rename from common.h rename to src/common.h diff --git a/complete.cpp b/src/complete.cpp similarity index 100% rename from complete.cpp rename to src/complete.cpp diff --git a/complete.h b/src/complete.h similarity index 100% rename from complete.h rename to src/complete.h diff --git a/env.cpp b/src/env.cpp similarity index 100% rename from env.cpp rename to src/env.cpp diff --git a/env.h b/src/env.h similarity index 100% rename from env.h rename to src/env.h diff --git a/env_universal_common.cpp b/src/env_universal_common.cpp similarity index 100% rename from env_universal_common.cpp rename to src/env_universal_common.cpp diff --git a/env_universal_common.h b/src/env_universal_common.h similarity index 100% rename from env_universal_common.h rename to src/env_universal_common.h diff --git a/event.cpp b/src/event.cpp similarity index 100% rename from event.cpp rename to src/event.cpp diff --git a/event.h b/src/event.h similarity index 100% rename from event.h rename to src/event.h diff --git a/exec.cpp b/src/exec.cpp similarity index 100% rename from exec.cpp rename to src/exec.cpp diff --git a/exec.h b/src/exec.h similarity index 100% rename from exec.h rename to src/exec.h diff --git a/expand.cpp b/src/expand.cpp similarity index 100% rename from expand.cpp rename to src/expand.cpp diff --git a/expand.h b/src/expand.h similarity index 100% rename from expand.h rename to src/expand.h diff --git a/fallback.cpp b/src/fallback.cpp similarity index 100% rename from fallback.cpp rename to src/fallback.cpp diff --git a/fallback.h b/src/fallback.h similarity index 100% rename from fallback.h rename to src/fallback.h diff --git a/fish.cpp b/src/fish.cpp similarity index 100% rename from fish.cpp rename to src/fish.cpp diff --git a/fish_indent.cpp b/src/fish_indent.cpp similarity index 100% rename from fish_indent.cpp rename to src/fish_indent.cpp diff --git a/fish_tests.cpp b/src/fish_tests.cpp similarity index 100% rename from fish_tests.cpp rename to src/fish_tests.cpp diff --git a/fish_version.cpp b/src/fish_version.cpp similarity index 100% rename from fish_version.cpp rename to src/fish_version.cpp diff --git a/fish_version.h b/src/fish_version.h similarity index 100% rename from fish_version.h rename to src/fish_version.h diff --git a/function.cpp b/src/function.cpp similarity index 100% rename from function.cpp rename to src/function.cpp diff --git a/function.h b/src/function.h similarity index 100% rename from function.h rename to src/function.h diff --git a/highlight.cpp b/src/highlight.cpp similarity index 100% rename from highlight.cpp rename to src/highlight.cpp diff --git a/highlight.h b/src/highlight.h similarity index 100% rename from highlight.h rename to src/highlight.h diff --git a/history.cpp b/src/history.cpp similarity index 100% rename from history.cpp rename to src/history.cpp diff --git a/history.h b/src/history.h similarity index 100% rename from history.h rename to src/history.h diff --git a/input.cpp b/src/input.cpp similarity index 100% rename from input.cpp rename to src/input.cpp diff --git a/input.h b/src/input.h similarity index 100% rename from input.h rename to src/input.h diff --git a/input_common.cpp b/src/input_common.cpp similarity index 100% rename from input_common.cpp rename to src/input_common.cpp diff --git a/input_common.h b/src/input_common.h similarity index 100% rename from input_common.h rename to src/input_common.h diff --git a/intern.cpp b/src/intern.cpp similarity index 100% rename from intern.cpp rename to src/intern.cpp diff --git a/intern.h b/src/intern.h similarity index 100% rename from intern.h rename to src/intern.h diff --git a/io.cpp b/src/io.cpp similarity index 100% rename from io.cpp rename to src/io.cpp diff --git a/io.h b/src/io.h similarity index 100% rename from io.h rename to src/io.h diff --git a/iothread.cpp b/src/iothread.cpp similarity index 100% rename from iothread.cpp rename to src/iothread.cpp diff --git a/iothread.h b/src/iothread.h similarity index 100% rename from iothread.h rename to src/iothread.h diff --git a/key_reader.cpp b/src/key_reader.cpp similarity index 100% rename from key_reader.cpp rename to src/key_reader.cpp diff --git a/kill.cpp b/src/kill.cpp similarity index 100% rename from kill.cpp rename to src/kill.cpp diff --git a/kill.h b/src/kill.h similarity index 100% rename from kill.h rename to src/kill.h diff --git a/lru.h b/src/lru.h similarity index 100% rename from lru.h rename to src/lru.h diff --git a/mimedb.cpp b/src/mimedb.cpp similarity index 100% rename from mimedb.cpp rename to src/mimedb.cpp diff --git a/output.cpp b/src/output.cpp similarity index 100% rename from output.cpp rename to src/output.cpp diff --git a/output.h b/src/output.h similarity index 100% rename from output.h rename to src/output.h diff --git a/pager.cpp b/src/pager.cpp similarity index 100% rename from pager.cpp rename to src/pager.cpp diff --git a/pager.h b/src/pager.h similarity index 100% rename from pager.h rename to src/pager.h diff --git a/parse_constants.h b/src/parse_constants.h similarity index 100% rename from parse_constants.h rename to src/parse_constants.h diff --git a/parse_execution.cpp b/src/parse_execution.cpp similarity index 100% rename from parse_execution.cpp rename to src/parse_execution.cpp diff --git a/parse_execution.h b/src/parse_execution.h similarity index 100% rename from parse_execution.h rename to src/parse_execution.h diff --git a/parse_productions.cpp b/src/parse_productions.cpp similarity index 100% rename from parse_productions.cpp rename to src/parse_productions.cpp diff --git a/parse_productions.h b/src/parse_productions.h similarity index 100% rename from parse_productions.h rename to src/parse_productions.h diff --git a/parse_tree.cpp b/src/parse_tree.cpp similarity index 100% rename from parse_tree.cpp rename to src/parse_tree.cpp diff --git a/parse_tree.h b/src/parse_tree.h similarity index 100% rename from parse_tree.h rename to src/parse_tree.h diff --git a/parse_util.cpp b/src/parse_util.cpp similarity index 100% rename from parse_util.cpp rename to src/parse_util.cpp diff --git a/parse_util.h b/src/parse_util.h similarity index 100% rename from parse_util.h rename to src/parse_util.h diff --git a/parser.cpp b/src/parser.cpp similarity index 100% rename from parser.cpp rename to src/parser.cpp diff --git a/parser.h b/src/parser.h similarity index 100% rename from parser.h rename to src/parser.h diff --git a/parser_keywords.cpp b/src/parser_keywords.cpp similarity index 100% rename from parser_keywords.cpp rename to src/parser_keywords.cpp diff --git a/parser_keywords.h b/src/parser_keywords.h similarity index 100% rename from parser_keywords.h rename to src/parser_keywords.h diff --git a/path.cpp b/src/path.cpp similarity index 100% rename from path.cpp rename to src/path.cpp diff --git a/path.h b/src/path.h similarity index 100% rename from path.h rename to src/path.h diff --git a/postfork.cpp b/src/postfork.cpp similarity index 100% rename from postfork.cpp rename to src/postfork.cpp diff --git a/postfork.h b/src/postfork.h similarity index 100% rename from postfork.h rename to src/postfork.h diff --git a/print_help.cpp b/src/print_help.cpp similarity index 100% rename from print_help.cpp rename to src/print_help.cpp diff --git a/print_help.h b/src/print_help.h similarity index 100% rename from print_help.h rename to src/print_help.h diff --git a/proc.cpp b/src/proc.cpp similarity index 100% rename from proc.cpp rename to src/proc.cpp diff --git a/proc.h b/src/proc.h similarity index 100% rename from proc.h rename to src/proc.h diff --git a/reader.cpp b/src/reader.cpp similarity index 100% rename from reader.cpp rename to src/reader.cpp diff --git a/reader.h b/src/reader.h similarity index 100% rename from reader.h rename to src/reader.h diff --git a/sanity.cpp b/src/sanity.cpp similarity index 100% rename from sanity.cpp rename to src/sanity.cpp diff --git a/sanity.h b/src/sanity.h similarity index 100% rename from sanity.h rename to src/sanity.h diff --git a/screen.cpp b/src/screen.cpp similarity index 100% rename from screen.cpp rename to src/screen.cpp diff --git a/screen.h b/src/screen.h similarity index 100% rename from screen.h rename to src/screen.h diff --git a/signal.cpp b/src/signal.cpp similarity index 100% rename from signal.cpp rename to src/signal.cpp diff --git a/signal.h b/src/signal.h similarity index 100% rename from signal.h rename to src/signal.h diff --git a/tokenizer.cpp b/src/tokenizer.cpp similarity index 100% rename from tokenizer.cpp rename to src/tokenizer.cpp diff --git a/tokenizer.h b/src/tokenizer.h similarity index 100% rename from tokenizer.h rename to src/tokenizer.h diff --git a/utf8.cpp b/src/utf8.cpp similarity index 100% rename from utf8.cpp rename to src/utf8.cpp diff --git a/utf8.h b/src/utf8.h similarity index 100% rename from utf8.h rename to src/utf8.h diff --git a/util.cpp b/src/util.cpp similarity index 100% rename from util.cpp rename to src/util.cpp diff --git a/util.h b/src/util.h similarity index 100% rename from util.h rename to src/util.h diff --git a/wcstringutil.cpp b/src/wcstringutil.cpp similarity index 100% rename from wcstringutil.cpp rename to src/wcstringutil.cpp diff --git a/wcstringutil.h b/src/wcstringutil.h similarity index 100% rename from wcstringutil.h rename to src/wcstringutil.h diff --git a/wgetopt.cpp b/src/wgetopt.cpp similarity index 100% rename from wgetopt.cpp rename to src/wgetopt.cpp diff --git a/wgetopt.h b/src/wgetopt.h similarity index 100% rename from wgetopt.h rename to src/wgetopt.h diff --git a/wildcard.cpp b/src/wildcard.cpp similarity index 100% rename from wildcard.cpp rename to src/wildcard.cpp diff --git a/wildcard.h b/src/wildcard.h similarity index 100% rename from wildcard.h rename to src/wildcard.h diff --git a/wutil.cpp b/src/wutil.cpp similarity index 100% rename from wutil.cpp rename to src/wutil.cpp diff --git a/wutil.h b/src/wutil.h similarity index 100% rename from wutil.h rename to src/wutil.h diff --git a/xdgmime.cpp b/src/xdgmime.cpp similarity index 100% rename from xdgmime.cpp rename to src/xdgmime.cpp diff --git a/xdgmime.h b/src/xdgmime.h similarity index 100% rename from xdgmime.h rename to src/xdgmime.h diff --git a/xdgmimealias.cpp b/src/xdgmimealias.cpp similarity index 100% rename from xdgmimealias.cpp rename to src/xdgmimealias.cpp diff --git a/xdgmimealias.h b/src/xdgmimealias.h similarity index 100% rename from xdgmimealias.h rename to src/xdgmimealias.h diff --git a/xdgmimeglob.cpp b/src/xdgmimeglob.cpp similarity index 100% rename from xdgmimeglob.cpp rename to src/xdgmimeglob.cpp diff --git a/xdgmimeglob.h b/src/xdgmimeglob.h similarity index 100% rename from xdgmimeglob.h rename to src/xdgmimeglob.h diff --git a/xdgmimeint.cpp b/src/xdgmimeint.cpp similarity index 100% rename from xdgmimeint.cpp rename to src/xdgmimeint.cpp diff --git a/xdgmimeint.h b/src/xdgmimeint.h similarity index 100% rename from xdgmimeint.h rename to src/xdgmimeint.h diff --git a/xdgmimemagic.cpp b/src/xdgmimemagic.cpp similarity index 100% rename from xdgmimemagic.cpp rename to src/xdgmimemagic.cpp diff --git a/xdgmimemagic.h b/src/xdgmimemagic.h similarity index 100% rename from xdgmimemagic.h rename to src/xdgmimemagic.h diff --git a/xdgmimeparent.cpp b/src/xdgmimeparent.cpp similarity index 100% rename from xdgmimeparent.cpp rename to src/xdgmimeparent.cpp diff --git a/xdgmimeparent.h b/src/xdgmimeparent.h similarity index 100% rename from xdgmimeparent.h rename to src/xdgmimeparent.h From d3a0372e896ee4d1ed5313b98ad4680589843976 Mon Sep 17 00:00:00 2001 From: David Adam Date: Sun, 26 Jul 2015 00:16:48 +0800 Subject: [PATCH 02/11] grep completions: remove trailing end statement --- share/completions/grep.fish | 1 - 1 file changed, 1 deletion(-) diff --git a/share/completions/grep.fish b/share/completions/grep.fish index bd52fc60a..07172a91c 100644 --- a/share/completions/grep.fish +++ b/share/completions/grep.fish @@ -47,4 +47,3 @@ complete -c grep -s x -l line-regexp --description "Only whole matching lines" complete -c grep -s y --description "Obsolete synonym for -i" complete -c grep -s z -l null-data --description 'treat input as a set of lines each terminated by a zero byte' complete -c grep -s Z -l null --description "Output a zero byte after filename" -end From 1786a7cdc42ca091b692105e44386d4181b28eb5 Mon Sep 17 00:00:00 2001 From: ridiculousfish Date: Sat, 25 Jul 2015 13:02:58 -0700 Subject: [PATCH 03/11] Use the address-of operator when checking for weak symbols This fixes a warning with gcc on OS X --- src/fallback.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/fallback.cpp b/src/fallback.cpp index 440198145..0f53e1a8f 100644 --- a/src/fallback.cpp +++ b/src/fallback.cpp @@ -861,21 +861,21 @@ static int wcsncasecmp_fallback(const wchar_t *a, const wchar_t *b, size_t count /* Note parens avoid the macro expansion */ wchar_t *wcsdup_use_weak(const wchar_t *a) { - if (wcsdup != NULL) + if (&wcsdup != NULL) return (wcsdup)(a); return wcsdup_fallback(a); } int wcscasecmp_use_weak(const wchar_t *a, const wchar_t *b) { - if (wcscasecmp != NULL) + if (&wcscasecmp != NULL) return (wcscasecmp)(a, b); return wcscasecmp_fallback(a, b); } int wcsncasecmp_use_weak(const wchar_t *s1, const wchar_t *s2, size_t n) { - if (wcsncasecmp != NULL) + if (&wcsncasecmp != NULL) return (wcsncasecmp)(s1, s2, n); return wcsncasecmp_fallback(s1, s2, n); } From c0cefde5d1b4cf903a3e35aa1a4f14b01dc90894 Mon Sep 17 00:00:00 2001 From: ridiculousfish Date: Sat, 25 Jul 2015 13:23:18 -0700 Subject: [PATCH 04/11] Manually update Makefile depends Temporary fix until the 'make depend' target can be sorted out --- Makefile.in | 486 ++++++++++++++++++++++++++-------------------------- 1 file changed, 243 insertions(+), 243 deletions(-) diff --git a/Makefile.in b/Makefile.in index 8cce25c5c..1176c9661 100644 --- a/Makefile.in +++ b/Makefile.in @@ -846,246 +846,246 @@ clean: # DO NOT DELETE THIS LINE -- make depend depends on it. -src/autoload.o: config.h src/autoload.h src/common.h src/util.h src/lru.h -src/autoload.o: src/wutil.h src/signal.h src/env.h src/exec.h src/proc.h -src/autoload.o: src/io.h src/parse_tree.h src/tokenizer.h -src/autoload.o: src/parse_constants.h -src/builtin.o: config.h src/signal.h src/fallback.h src/util.h src/wutil.h -src/builtin.o: src/common.h src/builtin.h src/io.h src/function.h src/event.h -src/builtin.o: src/env.h src/complete.h src/proc.h src/parse_tree.h -src/builtin.o: src/tokenizer.h src/parse_constants.h src/parser.h -src/builtin.o: src/reader.h src/highlight.h src/color.h src/wgetopt.h -src/builtin.o: src/sanity.h src/wildcard.h src/expand.h src/input_common.h -src/builtin.o: src/input.h src/intern.h src/exec.h src/parse_util.h -src/builtin.o: src/autoload.h src/lru.h src/parser_keywords.h src/path.h -src/builtin.o: src/history.h src/wcstringutil.h src/builtin_set.cpp -src/builtin.o: src/builtin_commandline.cpp src/builtin_complete.cpp -src/builtin.o: src/builtin_ulimit.cpp src/builtin_jobs.cpp -src/builtin.o: src/builtin_set_color.cpp src/output.h src/screen.h -src/builtin.o: src/builtin_printf.cpp -src/builtin_commandline.o: config.h src/signal.h src/fallback.h src/util.h -src/builtin_commandline.o: src/wutil.h src/common.h src/builtin.h src/io.h -src/builtin_commandline.o: src/wgetopt.h src/reader.h src/complete.h -src/builtin_commandline.o: src/highlight.h src/env.h src/color.h -src/builtin_commandline.o: src/parse_constants.h src/proc.h src/parse_tree.h -src/builtin_commandline.o: src/tokenizer.h src/parser.h src/event.h -src/builtin_commandline.o: src/function.h src/input_common.h src/input.h -src/builtin_commandline.o: src/parse_util.h src/autoload.h src/lru.h -src/builtin_complete.o: config.h src/signal.h src/fallback.h src/util.h -src/builtin_complete.o: src/wutil.h src/common.h src/builtin.h src/io.h -src/builtin_complete.o: src/complete.h src/wgetopt.h src/parser.h src/proc.h -src/builtin_complete.o: src/parse_tree.h src/tokenizer.h -src/builtin_complete.o: src/parse_constants.h src/event.h src/function.h -src/builtin_complete.o: src/env.h src/reader.h src/highlight.h src/color.h -src/builtin_jobs.o: config.h src/fallback.h src/signal.h src/util.h -src/builtin_jobs.o: src/wutil.h src/common.h src/builtin.h src/io.h -src/builtin_jobs.o: src/proc.h src/parse_tree.h src/tokenizer.h -src/builtin_jobs.o: src/parse_constants.h src/parser.h src/event.h -src/builtin_jobs.o: src/function.h src/env.h src/wgetopt.h -src/builtin_printf.o: src/common.h src/util.h -src/builtin_set.o: config.h src/signal.h src/fallback.h src/util.h -src/builtin_set.o: src/wutil.h src/common.h src/builtin.h src/io.h src/env.h -src/builtin_set.o: src/expand.h src/parse_constants.h src/wgetopt.h -src/builtin_set.o: src/proc.h src/parse_tree.h src/tokenizer.h src/parser.h -src/builtin_set.o: src/event.h src/function.h -src/builtin_set_color.o: config.h src/builtin.h src/util.h src/io.h -src/builtin_set_color.o: src/common.h src/color.h src/output.h src/fallback.h -src/builtin_set_color.o: src/signal.h src/screen.h src/highlight.h src/env.h -src/builtin_test.o: config.h src/common.h src/util.h src/builtin.h src/io.h -src/builtin_test.o: src/wutil.h src/proc.h src/signal.h src/parse_tree.h -src/builtin_test.o: src/tokenizer.h src/parse_constants.h -src/builtin_ulimit.o: config.h src/fallback.h src/signal.h src/util.h -src/builtin_ulimit.o: src/builtin.h src/io.h src/common.h src/wgetopt.h -src/color.o: src/color.h config.h src/common.h src/util.h src/fallback.h -src/color.o: src/signal.h -src/common.o: config.h src/fallback.h src/signal.h src/util.h src/wutil.h -src/common.o: src/common.h src/expand.h src/parse_constants.h src/proc.h -src/common.o: src/io.h src/parse_tree.h src/tokenizer.h src/wildcard.h -src/common.o: src/complete.h src/parser.h src/event.h src/function.h -src/common.o: src/env.h src/util.cpp src/fallback.cpp -src/complete.o: config.h src/signal.h src/fallback.h src/util.h -src/complete.o: src/tokenizer.h src/common.h src/wildcard.h src/expand.h -src/complete.o: src/parse_constants.h src/complete.h src/proc.h src/io.h -src/complete.o: src/parse_tree.h src/parser.h src/event.h src/function.h -src/complete.o: src/env.h src/builtin.h src/exec.h src/reader.h -src/complete.o: src/highlight.h src/color.h src/history.h src/wutil.h -src/complete.o: src/intern.h src/parse_util.h src/autoload.h src/lru.h -src/complete.o: src/parser_keywords.h src/path.h src/iothread.h -src/env.o: config.h src/signal.h src/fallback.h src/util.h src/wutil.h -src/env.o: src/common.h src/proc.h src/io.h src/parse_tree.h src/tokenizer.h -src/env.o: src/parse_constants.h src/env.h src/sanity.h src/expand.h -src/env.o: src/history.h src/reader.h src/complete.h src/highlight.h -src/env.o: src/color.h src/parser.h src/event.h src/function.h -src/env.o: src/env_universal_common.h src/input.h src/input_common.h -src/env.o: src/path.h src/fish_version.h -src/env_universal_common.o: config.h src/env_universal_common.h src/wutil.h -src/env_universal_common.o: src/common.h src/util.h src/env.h src/fallback.h -src/env_universal_common.o: src/signal.h src/utf8.h src/path.h src/iothread.h -src/event.o: config.h src/signal.h src/fallback.h src/util.h src/wutil.h -src/event.o: src/common.h src/function.h src/event.h src/env.h -src/event.o: src/input_common.h src/proc.h src/io.h src/parse_tree.h -src/event.o: src/tokenizer.h src/parse_constants.h src/parser.h -src/exec.o: config.h src/signal.h src/fallback.h src/util.h src/iothread.h -src/exec.o: src/postfork.h src/common.h src/proc.h src/io.h src/parse_tree.h -src/exec.o: src/tokenizer.h src/parse_constants.h src/wutil.h src/exec.h -src/exec.o: src/parser.h src/event.h src/function.h src/env.h src/builtin.h -src/exec.o: src/wildcard.h src/expand.h src/complete.h src/sanity.h -src/exec.o: src/parse_util.h src/autoload.h src/lru.h -src/expand.o: config.h src/signal.h src/fallback.h src/util.h src/common.h -src/expand.o: src/wutil.h src/env.h src/proc.h src/io.h src/parse_tree.h -src/expand.o: src/tokenizer.h src/parse_constants.h src/parser.h src/event.h -src/expand.o: src/function.h src/expand.h src/wildcard.h src/complete.h -src/expand.o: src/exec.h src/iothread.h src/parse_util.h src/autoload.h -src/expand.o: src/lru.h -src/fallback.o: config.h src/fallback.h src/signal.h src/util.h -src/fish.o: config.h src/signal.h src/fallback.h src/util.h src/common.h -src/fish.o: src/reader.h src/io.h src/complete.h src/highlight.h src/env.h -src/fish.o: src/color.h src/parse_constants.h src/builtin.h src/function.h -src/fish.o: src/event.h src/wutil.h src/sanity.h src/proc.h src/parse_tree.h -src/fish.o: src/tokenizer.h src/parser.h src/expand.h src/intern.h src/exec.h -src/fish.o: src/output.h src/screen.h src/history.h src/path.h src/input.h -src/fish.o: src/input_common.h src/fish_version.h -src/fish_indent.o: config.h src/wutil.h src/common.h src/util.h src/output.h -src/fish_indent.o: src/fallback.h src/signal.h src/screen.h src/highlight.h -src/fish_indent.o: src/env.h src/color.h src/input.h src/input_common.h -src/fish_indent.o: src/parse_tree.h src/tokenizer.h src/parse_constants.h -src/fish_indent.o: src/print_help.h src/fish_version.h -src/fish_tests.o: config.h src/signal.h src/fallback.h src/util.h -src/fish_tests.o: src/common.h src/proc.h src/io.h src/parse_tree.h -src/fish_tests.o: src/tokenizer.h src/parse_constants.h src/reader.h -src/fish_tests.o: src/complete.h src/highlight.h src/env.h src/color.h -src/fish_tests.o: src/builtin.h src/function.h src/event.h src/autoload.h -src/fish_tests.o: src/lru.h src/wutil.h src/expand.h src/parser.h -src/fish_tests.o: src/output.h src/screen.h src/exec.h src/path.h -src/fish_tests.o: src/history.h src/iothread.h src/postfork.h -src/fish_tests.o: src/parse_util.h src/pager.h src/input.h src/input_common.h -src/fish_tests.o: src/utf8.h src/env_universal_common.h src/wcstringutil.h -src/fish_version.o: src/fish_version.h -src/function.o: config.h src/signal.h src/wutil.h src/common.h src/util.h -src/function.o: src/fallback.h src/function.h src/event.h src/env.h -src/function.o: src/proc.h src/io.h src/parse_tree.h src/tokenizer.h -src/function.o: src/parse_constants.h src/parser.h src/intern.h src/reader.h -src/function.o: src/complete.h src/highlight.h src/color.h src/parse_util.h -src/function.o: src/autoload.h src/lru.h src/parser_keywords.h src/expand.h -src/highlight.o: config.h src/signal.h src/fallback.h src/util.h src/wutil.h -src/highlight.o: src/common.h src/highlight.h src/env.h src/color.h -src/highlight.o: src/tokenizer.h src/proc.h src/io.h src/parse_tree.h -src/highlight.o: src/parse_constants.h src/parser.h src/event.h -src/highlight.o: src/function.h src/parse_util.h src/autoload.h src/lru.h -src/highlight.o: src/parser_keywords.h src/builtin.h src/expand.h -src/highlight.o: src/sanity.h src/complete.h src/output.h src/screen.h -src/highlight.o: src/wildcard.h src/path.h src/history.h -src/history.o: config.h src/fallback.h src/signal.h src/util.h src/sanity.h -src/history.o: src/tokenizer.h src/common.h src/reader.h src/io.h -src/history.o: src/complete.h src/highlight.h src/env.h src/color.h -src/history.o: src/parse_constants.h src/parse_tree.h src/wutil.h -src/history.o: src/history.h src/intern.h src/path.h src/autoload.h src/lru.h -src/history.o: src/iothread.h -src/input.o: config.h src/signal.h src/fallback.h src/util.h src/wutil.h -src/input.o: src/common.h src/reader.h src/io.h src/complete.h -src/input.o: src/highlight.h src/env.h src/color.h src/parse_constants.h -src/input.o: src/proc.h src/parse_tree.h src/tokenizer.h src/sanity.h -src/input.o: src/input_common.h src/input.h src/parser.h src/event.h -src/input.o: src/function.h src/expand.h src/output.h src/screen.h -src/input.o: src/intern.h -src/input_common.o: config.h src/fallback.h src/signal.h src/util.h -src/input_common.o: src/common.h src/wutil.h src/input_common.h -src/input_common.o: src/env_universal_common.h src/env.h src/iothread.h -src/intern.o: config.h src/fallback.h src/signal.h src/util.h src/wutil.h -src/intern.o: src/common.h src/intern.h -src/io.o: config.h src/fallback.h src/signal.h src/util.h src/wutil.h -src/io.o: src/common.h src/exec.h src/proc.h src/io.h src/parse_tree.h -src/io.o: src/tokenizer.h src/parse_constants.h -src/iothread.o: config.h src/iothread.h src/common.h src/util.h src/signal.h -src/key_reader.o: config.h src/common.h src/util.h src/fallback.h -src/key_reader.o: src/signal.h src/input_common.h -src/kill.o: config.h src/signal.h src/fallback.h src/util.h src/wutil.h -src/kill.o: src/common.h src/kill.h src/proc.h src/io.h src/parse_tree.h -src/kill.o: src/tokenizer.h src/parse_constants.h src/sanity.h src/env.h -src/kill.o: src/exec.h src/path.h -src/output.o: config.h src/signal.h src/fallback.h src/util.h src/wutil.h -src/output.o: src/common.h src/expand.h src/parse_constants.h src/output.h -src/output.o: src/screen.h src/highlight.h src/env.h src/color.h -src/pager.o: config.h src/pager.h src/complete.h src/util.h src/common.h -src/pager.o: src/screen.h src/highlight.h src/env.h src/color.h src/reader.h -src/pager.o: src/io.h src/parse_constants.h src/input_common.h src/wutil.h -src/parse_execution.o: src/parse_execution.h config.h src/util.h -src/parse_execution.o: src/parse_tree.h src/common.h src/tokenizer.h -src/parse_execution.o: src/parse_constants.h src/proc.h src/signal.h src/io.h -src/parse_execution.o: src/parse_util.h src/autoload.h src/lru.h -src/parse_execution.o: src/complete.h src/wildcard.h src/expand.h -src/parse_execution.o: src/builtin.h src/parser.h src/event.h src/function.h -src/parse_execution.o: src/env.h src/reader.h src/highlight.h src/color.h -src/parse_execution.o: src/wutil.h src/exec.h src/path.h -src/parse_productions.o: src/parse_productions.h src/parse_tree.h config.h -src/parse_productions.o: src/util.h src/common.h src/tokenizer.h -src/parse_productions.o: src/parse_constants.h -src/parse_tree.o: src/parse_productions.h src/parse_tree.h config.h -src/parse_tree.o: src/util.h src/common.h src/tokenizer.h -src/parse_tree.o: src/parse_constants.h src/fallback.h src/signal.h -src/parse_tree.o: src/wutil.h src/proc.h src/io.h src/expand.h -src/parse_util.o: config.h src/fallback.h src/signal.h src/util.h src/wutil.h -src/parse_util.o: src/common.h src/tokenizer.h src/parse_util.h -src/parse_util.o: src/autoload.h src/lru.h src/parse_tree.h -src/parse_util.o: src/parse_constants.h src/expand.h src/intern.h src/exec.h -src/parse_util.o: src/proc.h src/io.h src/env.h src/wildcard.h src/complete.h -src/parse_util.o: src/parser.h src/event.h src/function.h src/builtin.h -src/parser.o: config.h src/fallback.h src/signal.h src/util.h src/common.h -src/parser.o: src/wutil.h src/proc.h src/io.h src/parse_tree.h -src/parser.o: src/tokenizer.h src/parse_constants.h src/parser.h src/event.h -src/parser.o: src/function.h src/env.h src/parser_keywords.h src/exec.h -src/parser.o: src/wildcard.h src/expand.h src/complete.h src/builtin.h -src/parser.o: src/reader.h src/highlight.h src/color.h src/sanity.h -src/parser.o: src/intern.h src/parse_util.h src/autoload.h src/lru.h -src/parser.o: src/path.h src/parse_execution.h -src/parser_keywords.o: config.h src/fallback.h src/signal.h src/common.h -src/parser_keywords.o: src/util.h src/parser_keywords.h -src/path.o: config.h src/fallback.h src/signal.h src/util.h src/common.h -src/path.o: src/env.h src/wutil.h src/path.h src/expand.h -src/path.o: src/parse_constants.h -src/postfork.o: src/signal.h src/postfork.h config.h src/common.h src/util.h -src/postfork.o: src/proc.h src/io.h src/parse_tree.h src/tokenizer.h -src/postfork.o: src/parse_constants.h src/wutil.h src/iothread.h src/exec.h -src/print_help.o: src/print_help.h -src/proc.o: config.h src/signal.h src/fallback.h src/util.h src/wutil.h -src/proc.o: src/common.h src/proc.h src/io.h src/parse_tree.h src/tokenizer.h -src/proc.o: src/parse_constants.h src/reader.h src/complete.h src/highlight.h -src/proc.o: src/env.h src/color.h src/sanity.h src/parser.h src/event.h -src/proc.o: src/function.h src/output.h src/screen.h -src/reader.o: config.h src/signal.h src/fallback.h src/util.h src/wutil.h -src/reader.o: src/common.h src/highlight.h src/env.h src/color.h src/reader.h -src/reader.o: src/io.h src/complete.h src/parse_constants.h src/proc.h -src/reader.o: src/parse_tree.h src/tokenizer.h src/parser.h src/event.h -src/reader.o: src/function.h src/history.h src/sanity.h src/exec.h -src/reader.o: src/expand.h src/kill.h src/input_common.h src/input.h -src/reader.o: src/output.h src/screen.h src/iothread.h src/intern.h -src/reader.o: src/path.h src/parse_util.h src/autoload.h src/lru.h -src/reader.o: src/parser_keywords.h src/pager.h -src/sanity.o: config.h src/signal.h src/fallback.h src/util.h src/common.h -src/sanity.o: src/sanity.h src/proc.h src/io.h src/parse_tree.h -src/sanity.o: src/tokenizer.h src/parse_constants.h src/history.h src/wutil.h -src/sanity.o: src/reader.h src/complete.h src/highlight.h src/env.h -src/sanity.o: src/color.h src/kill.h -src/screen.o: config.h src/fallback.h src/signal.h src/common.h src/util.h -src/screen.o: src/wutil.h src/output.h src/screen.h src/highlight.h src/env.h -src/screen.o: src/color.h src/pager.h src/complete.h src/reader.h src/io.h -src/screen.o: src/parse_constants.h -src/signal.o: config.h src/signal.h src/common.h src/util.h src/fallback.h -src/signal.o: src/wutil.h src/event.h src/reader.h src/io.h src/complete.h -src/signal.o: src/highlight.h src/env.h src/color.h src/parse_constants.h -src/signal.o: src/proc.h src/parse_tree.h src/tokenizer.h -src/tokenizer.o: config.h src/fallback.h src/signal.h src/util.h src/wutil.h -src/tokenizer.o: src/common.h src/tokenizer.h -src/utf8.o: src/utf8.h -src/util.o: config.h src/fallback.h src/signal.h src/util.h src/common.h -src/util.o: src/wutil.h -src/wcstringutil.o: config.h src/wcstringutil.h src/common.h src/util.h -src/wgetopt.o: config.h src/wgetopt.h src/wutil.h src/common.h src/util.h -src/wgetopt.o: src/fallback.h src/signal.h -src/wildcard.o: config.h src/fallback.h src/signal.h src/util.h src/wutil.h -src/wildcard.o: src/common.h src/complete.h src/wildcard.h src/expand.h -src/wildcard.o: src/parse_constants.h src/reader.h src/io.h src/highlight.h -src/wildcard.o: src/env.h src/color.h src/exec.h src/proc.h src/parse_tree.h -src/wildcard.o: src/tokenizer.h -src/wutil.o: config.h src/fallback.h src/signal.h src/util.h src/common.h -src/wutil.o: src/wutil.h +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/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_commandline.o: config.h src/signal.h src/fallback.h src/util.h +obj/builtin_commandline.o: src/wutil.h src/common.h src/builtin.h src/io.h +obj/builtin_commandline.o: src/wgetopt.h src/reader.h src/complete.h +obj/builtin_commandline.o: src/highlight.h src/env.h src/color.h +obj/builtin_commandline.o: src/parse_constants.h src/proc.h src/parse_tree.h +obj/builtin_commandline.o: src/tokenizer.h src/parser.h src/event.h +obj/builtin_commandline.o: src/function.h src/input_common.h src/input.h +obj/builtin_commandline.o: src/parse_util.h src/autoload.h src/lru.h +obj/builtin_complete.o: config.h src/signal.h src/fallback.h src/util.h +obj/builtin_complete.o: src/wutil.h src/common.h src/builtin.h src/io.h +obj/builtin_complete.o: src/complete.h src/wgetopt.h src/parser.h src/proc.h +obj/builtin_complete.o: src/parse_tree.h src/tokenizer.h +obj/builtin_complete.o: src/parse_constants.h src/event.h src/function.h +obj/builtin_complete.o: src/env.h src/reader.h src/highlight.h src/color.h +obj/builtin_jobs.o: config.h src/fallback.h src/signal.h src/util.h +obj/builtin_jobs.o: src/wutil.h src/common.h src/builtin.h src/io.h +obj/builtin_jobs.o: src/proc.h src/parse_tree.h src/tokenizer.h +obj/builtin_jobs.o: src/parse_constants.h src/parser.h src/event.h +obj/builtin_jobs.o: src/function.h src/env.h src/wgetopt.h +obj/builtin_printf.o: src/common.h src/util.h +obj/builtin_set.o: config.h src/signal.h src/fallback.h src/util.h +obj/builtin_set.o: src/wutil.h src/common.h src/builtin.h src/io.h src/env.h +obj/builtin_set.o: src/expand.h src/parse_constants.h src/wgetopt.h +obj/builtin_set.o: src/proc.h src/parse_tree.h src/tokenizer.h src/parser.h +obj/builtin_set.o: src/event.h src/function.h +obj/builtin_set_color.o: config.h src/builtin.h src/util.h src/io.h +obj/builtin_set_color.o: src/common.h src/color.h src/output.h src/fallback.h +obj/builtin_set_color.o: src/signal.h src/screen.h src/highlight.h src/env.h +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/builtin_ulimit.o: config.h src/fallback.h src/signal.h src/util.h +obj/builtin_ulimit.o: src/builtin.h src/io.h src/common.h src/wgetopt.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/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/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/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/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/fallback.o: config.h src/fallback.h src/signal.h src/util.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/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 +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_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/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/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/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/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/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/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/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/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: 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/utf8.o: src/utf8.h +obj/util.o: config.h src/fallback.h src/signal.h src/util.h src/common.h +obj/util.o: src/wutil.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 From 9b4e365517f1509160aad36d769685d148a8c668 Mon Sep 17 00:00:00 2001 From: ridiculousfish Date: Sat, 25 Jul 2015 15:15:54 -0700 Subject: [PATCH 05/11] Update 'depend' target so make depend works again This is very ugly because makedepend has no native support for building outside the source tree. It always wants to prepend 'src/' to the object file path. So instead we have to cons up a new source tree, with the sources files at the root, and run makedepend on that. --- Makefile.in | 58 ++++++++++++++++++++++------------------------------- 1 file changed, 24 insertions(+), 34 deletions(-) diff --git a/Makefile.in b/Makefile.in index 1176c9661..55201d745 100644 --- a/Makefile.in +++ b/Makefile.in @@ -106,6 +106,14 @@ BUILTIN_FILES := src/builtin_set.cpp src/builtin_commandline.cpp \ FISH_TESTS_OBJS := $(FISH_OBJS) obj/fish_tests.o +# +# All of the sources that produce object files +# (that is, are not themselves #included in other source files) +# +FISH_ALL_OBJS := $(sort $(FISH_OBJS) $(FISH_INDENT_OBJS) $(FISH_TESTS_OBJS) \ + obj/fish.o obj/key_reader.o) + + # # Files containing user documentation # @@ -800,12 +808,27 @@ key_reader: $(FISH_OBJS) key_reader.o # # Update dependencies +# Unfortunately makedepend cannot handle source files in one directory +# and object files in another. So we have to cons up a fake directory +# tree and run it there. Note that some .cpp files do not result in +# objects because they are #include'd directly. In that case we need to +# leave them in the 'header' directory, so they get picked up by the +# dependencies. So we put everything in the header directory and move out +# exactly the files that result in objects, leaving the #include'd files +# behind. # depend: - makedepend -fMakefile.in -Y src/*.cpp + mkdir -p /tmp/fish_make_depend/src + cp src/*.cpp src/*.h /tmp/fish_make_depend/src + cp config.h /tmp/fish_make_depend/ + mv $(subst obj/,/tmp/fish_make_depend/src/,$(FISH_ALL_OBJS:.o=.cpp)) /tmp/fish_make_depend/ + cd /tmp/fish_make_depend && \ + makedepend -f$(CURDIR)/Makefile.in -pobj/ -Y -Isrc *.cpp + rm -Rf /tmp/fish_make_depend ./config.status .PHONY: depend + # # Cleanup targets # @@ -863,39 +886,9 @@ 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_commandline.o: config.h src/signal.h src/fallback.h src/util.h -obj/builtin_commandline.o: src/wutil.h src/common.h src/builtin.h src/io.h -obj/builtin_commandline.o: src/wgetopt.h src/reader.h src/complete.h -obj/builtin_commandline.o: src/highlight.h src/env.h src/color.h -obj/builtin_commandline.o: src/parse_constants.h src/proc.h src/parse_tree.h -obj/builtin_commandline.o: src/tokenizer.h src/parser.h src/event.h -obj/builtin_commandline.o: src/function.h src/input_common.h src/input.h -obj/builtin_commandline.o: src/parse_util.h src/autoload.h src/lru.h -obj/builtin_complete.o: config.h src/signal.h src/fallback.h src/util.h -obj/builtin_complete.o: src/wutil.h src/common.h src/builtin.h src/io.h -obj/builtin_complete.o: src/complete.h src/wgetopt.h src/parser.h src/proc.h -obj/builtin_complete.o: src/parse_tree.h src/tokenizer.h -obj/builtin_complete.o: src/parse_constants.h src/event.h src/function.h -obj/builtin_complete.o: src/env.h src/reader.h src/highlight.h src/color.h -obj/builtin_jobs.o: config.h src/fallback.h src/signal.h src/util.h -obj/builtin_jobs.o: src/wutil.h src/common.h src/builtin.h src/io.h -obj/builtin_jobs.o: src/proc.h src/parse_tree.h src/tokenizer.h -obj/builtin_jobs.o: src/parse_constants.h src/parser.h src/event.h -obj/builtin_jobs.o: src/function.h src/env.h src/wgetopt.h -obj/builtin_printf.o: src/common.h src/util.h -obj/builtin_set.o: config.h src/signal.h src/fallback.h src/util.h -obj/builtin_set.o: src/wutil.h src/common.h src/builtin.h src/io.h src/env.h -obj/builtin_set.o: src/expand.h src/parse_constants.h src/wgetopt.h -obj/builtin_set.o: src/proc.h src/parse_tree.h src/tokenizer.h src/parser.h -obj/builtin_set.o: src/event.h src/function.h -obj/builtin_set_color.o: config.h src/builtin.h src/util.h src/io.h -obj/builtin_set_color.o: src/common.h src/color.h src/output.h src/fallback.h -obj/builtin_set_color.o: src/signal.h src/screen.h src/highlight.h src/env.h 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/builtin_ulimit.o: config.h src/fallback.h src/signal.h src/util.h -obj/builtin_ulimit.o: src/builtin.h src/io.h src/common.h src/wgetopt.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 @@ -937,7 +930,6 @@ 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/fallback.o: config.h src/fallback.h src/signal.h src/util.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 @@ -1077,8 +1069,6 @@ 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/utf8.o: src/utf8.h -obj/util.o: config.h src/fallback.h src/signal.h src/util.h src/common.h -obj/util.o: src/wutil.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 From ac72db8ef04ad2f467627f0f37b834acdfb01c87 Mon Sep 17 00:00:00 2001 From: ridiculousfish Date: Sat, 25 Jul 2015 16:01:43 -0700 Subject: [PATCH 06/11] Make our wgettext() implementation a little less terrifying Use wchar_t* directly instead of wcstring.c_str() --- src/wutil.cpp | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/src/wutil.cpp b/src/wutil.cpp index 2faec2576..7b6c5c712 100644 --- a/src/wutil.cpp +++ b/src/wutil.cpp @@ -56,9 +56,9 @@ const file_id_t kInvalidFileID = {(dev_t)-1LL, (ino_t)-1LL, (uint64_t)-1LL, -1, /* Lock to protect wgettext */ static pthread_mutex_t wgettext_lock; -/* Maps string keys to (immortal) pointers to string values */ -typedef std::map wgettext_map_t; -static std::map wgettext_map; +/* Maps string keys to (immortal) pointers to string values. */ +typedef std::map wgettext_map_t; +static wgettext_map_t wgettext_map; void wutil_init() { @@ -481,15 +481,16 @@ const wchar_t *wgettext(const wchar_t *in) wcstring key = in; scoped_lock lock(wgettext_lock); - wcstring *& val = wgettext_map[key]; + // Reference to pointer to string + const wchar_t *& val = wgettext_map[key]; if (val == NULL) { cstring mbs_in = wcs2string(key); char *out = fish_gettext(mbs_in.c_str()); - val = new wcstring(format_string(L"%s", out)); //note that this writes into the map! + val = wcsdup(format_string(L"%s", out).c_str()); //note that this writes into the map! } errno = err; - return val->c_str(); //looks dangerous but is safe, since the string is stored in the map + return val; //looks dangerous but is safe, since the string is stored in the map } int wmkdir(const wcstring &name, int mode) From 92e9297a153fee164d0abd495788cb35f48cd070 Mon Sep 17 00:00:00 2001 From: ridiculousfish Date: Sat, 25 Jul 2015 16:48:52 -0700 Subject: [PATCH 07/11] Update xcode project for new Xcode --- fish.xcodeproj/project.pbxproj | 2 +- fish.xcodeproj/xcshareddata/xcschemes/Makefile.xcscheme | 2 +- fish.xcodeproj/xcshareddata/xcschemes/base.xcscheme | 2 +- fish.xcodeproj/xcshareddata/xcschemes/fish.app.xcscheme | 2 +- fish.xcodeproj/xcshareddata/xcschemes/fish_tests.xcscheme | 2 +- fish.xcodeproj/xcshareddata/xcschemes/install_tree.xcscheme | 2 +- 6 files changed, 6 insertions(+), 6 deletions(-) diff --git a/fish.xcodeproj/project.pbxproj b/fish.xcodeproj/project.pbxproj index 0f9ac9332..be2b83906 100644 --- a/fish.xcodeproj/project.pbxproj +++ b/fish.xcodeproj/project.pbxproj @@ -810,7 +810,7 @@ D0A084F213B3AC130099B651 /* Project object */ = { isa = PBXProject; attributes = { - LastUpgradeCheck = 0630; + LastUpgradeCheck = 0640; }; buildConfigurationList = D0A084F513B3AC130099B651 /* Build configuration list for PBXProject "fish" */; compatibilityVersion = "Xcode 3.2"; diff --git a/fish.xcodeproj/xcshareddata/xcschemes/Makefile.xcscheme b/fish.xcodeproj/xcshareddata/xcschemes/Makefile.xcscheme index ffcdc16aa..489ced053 100644 --- a/fish.xcodeproj/xcshareddata/xcschemes/Makefile.xcscheme +++ b/fish.xcodeproj/xcshareddata/xcschemes/Makefile.xcscheme @@ -1,6 +1,6 @@ Date: Sat, 25 Jul 2015 17:33:34 -0700 Subject: [PATCH 08/11] Add cppcheck.sh driver script for running cppcheck --- build_tools/cppcheck.sh | 3 +++ 1 file changed, 3 insertions(+) create mode 100755 build_tools/cppcheck.sh diff --git a/build_tools/cppcheck.sh b/build_tools/cppcheck.sh new file mode 100755 index 000000000..658f35c4b --- /dev/null +++ b/build_tools/cppcheck.sh @@ -0,0 +1,3 @@ +#!/usr/local/bin/fish + +cppcheck --enable=all --std=posix --quiet . From 0d0b2ce9b3f18ea1eb7818026936fb550c27a4c0 Mon Sep 17 00:00:00 2001 From: ridiculousfish Date: Sat, 25 Jul 2015 17:44:15 -0700 Subject: [PATCH 09/11] Update doc and message.pot targets for new src directory --- Makefile.in | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/Makefile.in b/Makefile.in index 55201d745..171b03bed 100644 --- a/Makefile.in +++ b/Makefile.in @@ -266,7 +266,7 @@ user_doc: $(HDR_FILES_SRC) Doxyfile.user $(HTML_SRC) $(HELP_SRC) doc.h $(HDR_FIL # Source code documentation. Also includes user documentation. # -doc: *.h *.cpp doc.h Doxyfile lexicon_filter +doc: src/*.h src/*.cpp doc.h Doxyfile lexicon_filter (cat Doxyfile; echo INPUT_FILTER=./lexicon_filter; echo PROJECT_NUMBER=$(FISH_BUILD_VERSION)) | doxygen - ; @@ -468,8 +468,8 @@ doc.h: $(HDR_FILES) # Create a template translation object # -messages.pot: *.cpp *.h share/completions/*.fish share/functions/*.fish - xgettext -k_ -kN_ *.cpp *.h -o messages.pot +messages.pot: src/*.cpp src/*.h share/completions/*.fish share/functions/*.fish + xgettext -k_ -kN_ src/*.cpp src/*.h -o messages.pot xgettext -j -k_ -kN_ -k--description -LShell --from-code=UTF-8 share/completions/*.fish share/functions/*.fish -o messages.pot builtin.o: $(BUILTIN_FILES) From caab298f723590fdaaff887ec32d1530da18920b Mon Sep 17 00:00:00 2001 From: ridiculousfish Date: Sat, 25 Jul 2015 17:45:05 -0700 Subject: [PATCH 10/11] Add DerivedData directory to .gitignore --- .gitignore | 1 + 1 file changed, 1 insertion(+) diff --git a/.gitignore b/.gitignore index 13d5ce326..e95e3b907 100644 --- a/.gitignore +++ b/.gitignore @@ -39,4 +39,5 @@ messages.pot lexicon.txt lexicon_filter lexicon.log +DerivedData/ From f4d1657c22c81a7720a91026f915b80d2d6aa6e8 Mon Sep 17 00:00:00 2001 From: ridiculousfish Date: Sat, 25 Jul 2015 18:16:00 -0700 Subject: [PATCH 11/11] Eliminate wgetopt global variables Replace them with a new struct wgetopter_t that uses instance variables instead. --- src/builtin.cpp | 316 ++++++++++++++++++------------------ src/builtin_commandline.cpp | 44 ++--- src/builtin_complete.cpp | 37 +++-- src/builtin_jobs.cpp | 19 ++- src/builtin_set.cpp | 31 ++-- src/builtin_set_color.cpp | 13 +- src/builtin_ulimit.cpp | 29 ++-- src/wgetopt.cpp | 122 +------------- src/wgetopt.h | 300 +++++++++++++++++----------------- 9 files changed, 405 insertions(+), 506 deletions(-) diff --git a/src/builtin.cpp b/src/builtin.cpp index 59778862b..3381996a7 100644 --- a/src/builtin.cpp +++ b/src/builtin.cpp @@ -636,7 +636,7 @@ static int builtin_bind_erase(wchar_t **seq, int all, const wchar_t *mode, int u */ static int builtin_bind(parser_t &parser, wchar_t **argv) { - + wgetopter_t w; enum { BIND_INSERT, @@ -657,7 +657,7 @@ static int builtin_bind(parser_t &parser, wchar_t **argv) int use_terminfo = 0; - woptind=0; + w.woptind=0; static const struct woption long_options[] = { @@ -675,11 +675,11 @@ static int builtin_bind(parser_t &parser, wchar_t **argv) while (1) { int opt_index = 0; - int opt = wgetopt_long(argc, - argv, - L"aehkKfM:m:", - long_options, - &opt_index); + int opt = w.wgetopt_long(argc, + argv, + L"aehkKfM:m:", + long_options, + &opt_index); if (opt == -1) break; @@ -722,17 +722,17 @@ static int builtin_bind(parser_t &parser, wchar_t **argv) break; case 'M': - bind_mode = woptarg; + bind_mode = w.woptarg; bind_mode_given = true; break; case 'm': - sets_bind_mode = woptarg; + sets_bind_mode = w.woptarg; sets_bind_mode_given = true; break; case '?': - builtin_unknown_option(parser, argv[0], argv[woptind-1]); + builtin_unknown_option(parser, argv[0], argv[w.woptind-1]); return STATUS_BUILTIN_ERROR; @@ -752,7 +752,7 @@ static int builtin_bind(parser_t &parser, wchar_t **argv) case BIND_ERASE: { - if (builtin_bind_erase(&argv[woptind], all, bind_mode_given ? bind_mode : NULL, use_terminfo)) + if (builtin_bind_erase(&argv[w.woptind], all, bind_mode_given ? bind_mode : NULL, use_terminfo)) { res = STATUS_BUILTIN_ERROR; } @@ -761,7 +761,7 @@ static int builtin_bind(parser_t &parser, wchar_t **argv) case BIND_INSERT: { - switch (argc-woptind) + switch (argc-w.woptind) { case 0: { @@ -774,7 +774,7 @@ static int builtin_bind(parser_t &parser, wchar_t **argv) wcstring seq; if (use_terminfo) { - if (!get_terminfo_sequence(argv[woptind], &seq)) + if (!get_terminfo_sequence(argv[w.woptind], &seq)) { res = STATUS_BUILTIN_ERROR; // get_terminfo_sequence already printed the error @@ -783,12 +783,12 @@ static int builtin_bind(parser_t &parser, wchar_t **argv) } else { - seq = argv[woptind]; + seq = argv[w.woptind]; } if (!builtin_bind_list_one(seq, bind_mode)) { res = STATUS_BUILTIN_ERROR; - wcstring eseq = escape_string(argv[woptind], 0); + wcstring eseq = escape_string(argv[w.woptind], 0); if (use_terminfo) { append_format(stderr_buffer, _(L"%ls: No binding found for key '%ls'\n"), argv[0], eseq.c_str()); @@ -803,7 +803,7 @@ static int builtin_bind(parser_t &parser, wchar_t **argv) default: { - if (builtin_bind_add(argv[woptind], (const wchar_t **)argv + (woptind + 1), argc - (woptind + 1), bind_mode, sets_bind_mode, use_terminfo)) + if (builtin_bind_add(argv[w.woptind], (const wchar_t **)argv + (w.woptind + 1), argc - (w.woptind + 1), bind_mode, sets_bind_mode, use_terminfo)) { res = STATUS_BUILTIN_ERROR; } @@ -845,6 +845,7 @@ static int builtin_bind(parser_t &parser, wchar_t **argv) */ static int builtin_block(parser_t &parser, wchar_t **argv) { + wgetopter_t w; enum { UNSET, @@ -857,7 +858,7 @@ static int builtin_block(parser_t &parser, wchar_t **argv) int erase = 0; int argc=builtin_count_args(argv); - woptind=0; + w.woptind=0; static const struct woption long_options[] = @@ -888,11 +889,11 @@ static int builtin_block(parser_t &parser, wchar_t **argv) { int opt_index = 0; - int opt = wgetopt_long(argc, - argv, - L"elgh", - long_options, - &opt_index); + int opt = w.wgetopt_long(argc, + argv, + L"elgh", + long_options, + &opt_index); if (opt == -1) break; @@ -925,7 +926,7 @@ static int builtin_block(parser_t &parser, wchar_t **argv) break; case '?': - builtin_unknown_option(parser, argv[0], argv[woptind-1]); + builtin_unknown_option(parser, argv[0], argv[w.woptind-1]); return STATUS_BUILTIN_ERROR; } @@ -1003,8 +1004,7 @@ static int builtin_builtin(parser_t &parser, wchar_t **argv) { int argc=builtin_count_args(argv); int list=0; - - woptind=0; + wgetopter_t w; static const struct woption long_options[] = @@ -1027,11 +1027,11 @@ static int builtin_builtin(parser_t &parser, wchar_t **argv) { int opt_index = 0; - int opt = wgetopt_long(argc, - argv, - L"nh", - long_options, - &opt_index); + int opt = w.wgetopt_long(argc, + argv, + L"nh", + long_options, + &opt_index); if (opt == -1) break; @@ -1057,7 +1057,7 @@ static int builtin_builtin(parser_t &parser, wchar_t **argv) break; case '?': - builtin_unknown_option(parser, argv[0], argv[woptind-1]); + builtin_unknown_option(parser, argv[0], argv[w.woptind-1]); return STATUS_BUILTIN_ERROR; } @@ -1085,10 +1085,9 @@ static int builtin_builtin(parser_t &parser, wchar_t **argv) */ static int builtin_emit(parser_t &parser, wchar_t **argv) { + wgetopter_t w; int argc=builtin_count_args(argv); - woptind=0; - static const struct woption long_options[] = { @@ -1106,11 +1105,11 @@ static int builtin_emit(parser_t &parser, wchar_t **argv) { int opt_index = 0; - int opt = wgetopt_long(argc, - argv, - L"h", - long_options, - &opt_index); + int opt = w.wgetopt_long(argc, + argv, + L"h", + long_options, + &opt_index); if (opt == -1) break; @@ -1131,20 +1130,20 @@ static int builtin_emit(parser_t &parser, wchar_t **argv) return STATUS_BUILTIN_OK; case '?': - builtin_unknown_option(parser, argv[0], argv[woptind-1]); + builtin_unknown_option(parser, argv[0], argv[w.woptind-1]); return STATUS_BUILTIN_ERROR; } } - if (!argv[woptind]) + if (!argv[w.woptind]) { append_format(stderr_buffer, L"%ls: expected event name\n", argv[0]); return STATUS_BUILTIN_ERROR; } - const wchar_t *eventname = argv[woptind]; - wcstring_list_t args(argv + woptind + 1, argv + argc); + const wchar_t *eventname = argv[w.woptind]; + wcstring_list_t args(argv + w.woptind + 1, argv + argc); event_fire_generic(eventname, &args); return STATUS_BUILTIN_OK; @@ -1157,10 +1156,11 @@ static int builtin_emit(parser_t &parser, wchar_t **argv) */ static int builtin_command(parser_t &parser, wchar_t **argv) { + wgetopter_t w; int argc=builtin_count_args(argv); int print_path=0; - woptind=0; + w.woptind=0; static const struct woption long_options[] = @@ -1174,11 +1174,11 @@ static int builtin_command(parser_t &parser, wchar_t **argv) { int opt_index = 0; - int opt = wgetopt_long(argc, - argv, - L"svh", - long_options, - &opt_index); + int opt = w.wgetopt_long(argc, + argv, + L"svh", + long_options, + &opt_index); if (opt == -1) break; @@ -1204,7 +1204,7 @@ static int builtin_command(parser_t &parser, wchar_t **argv) break; case '?': - builtin_unknown_option(parser, argv[0], argv[woptind-1]); + builtin_unknown_option(parser, argv[0], argv[w.woptind-1]); return STATUS_BUILTIN_ERROR; } @@ -1219,7 +1219,7 @@ static int builtin_command(parser_t &parser, wchar_t **argv) int found=0; - for (int idx = woptind; argv[idx]; ++idx) + for (int idx = w.woptind; argv[idx]; ++idx) { const wchar_t *command_name = argv[idx]; wcstring path; @@ -1239,6 +1239,7 @@ static int builtin_command(parser_t &parser, wchar_t **argv) */ static int builtin_generic(parser_t &parser, wchar_t **argv) { + wgetopter_t w; int argc=builtin_count_args(argv); /* Hackish - if we have no arguments other than the command, we are a "naked invocation" and we just print help */ @@ -1248,8 +1249,6 @@ static int builtin_generic(parser_t &parser, wchar_t **argv) return STATUS_BUILTIN_ERROR; } - woptind=0; - static const struct woption long_options[] = { @@ -1261,11 +1260,11 @@ static int builtin_generic(parser_t &parser, wchar_t **argv) { int opt_index = 0; - int opt = wgetopt_long(argc, - argv, - L"h", - long_options, - &opt_index); + int opt = w.wgetopt_long(argc, + argv, + L"h", + long_options, + &opt_index); if (opt == -1) break; @@ -1286,7 +1285,7 @@ static int builtin_generic(parser_t &parser, wchar_t **argv) return STATUS_BUILTIN_OK; case '?': - builtin_unknown_option(parser, argv[0], argv[woptind-1]); + builtin_unknown_option(parser, argv[0], argv[w.woptind-1]); return STATUS_BUILTIN_ERROR; } @@ -1435,6 +1434,7 @@ static void functions_def(const wcstring &name, wcstring &out) */ static int builtin_functions(parser_t &parser, wchar_t **argv) { + wgetopter_t w; int i; int erase=0; wchar_t *desc=0; @@ -1446,8 +1446,6 @@ static int builtin_functions(parser_t &parser, wchar_t **argv) int query = 0; int copy = 0; - woptind=0; - static const struct woption long_options[] = { @@ -1489,11 +1487,11 @@ static int builtin_functions(parser_t &parser, wchar_t **argv) { int opt_index = 0; - int opt = wgetopt_long(argc, - argv, - L"ed:nahqc", - long_options, - &opt_index); + int opt = w.wgetopt_long(argc, + argv, + L"ed:nahqc", + long_options, + &opt_index); if (opt == -1) break; @@ -1516,7 +1514,7 @@ static int builtin_functions(parser_t &parser, wchar_t **argv) break; case 'd': - desc=woptarg; + desc=w.woptarg; break; case 'n': @@ -1540,7 +1538,7 @@ static int builtin_functions(parser_t &parser, wchar_t **argv) break; case '?': - builtin_unknown_option(parser, argv[0], argv[woptind-1]); + builtin_unknown_option(parser, argv[0], argv[w.woptind-1]); return STATUS_BUILTIN_ERROR; } @@ -1564,7 +1562,7 @@ static int builtin_functions(parser_t &parser, wchar_t **argv) if (erase) { int i; - for (i=woptind; i 1)) + if ((search_mode || line_mode || cursor_mode || paging_mode) && (argc-w.woptind > 1)) { append_format(stderr_buffer, @@ -513,7 +513,7 @@ static int builtin_commandline(parser_t &parser, wchar_t **argv) } - if ((tokenize || cut_at_cursor) && (argc-woptind)) + if ((tokenize || cut_at_cursor) && (argc-w.woptind)) { append_format(stderr_buffer, BUILTIN_ERR_COMBO2, @@ -525,7 +525,7 @@ static int builtin_commandline(parser_t &parser, wchar_t **argv) return 1; } - if (append_mode && !(argc-woptind)) + if (append_mode && !(argc-w.woptind)) { append_format(stderr_buffer, BUILTIN_ERR_COMBO2, @@ -551,19 +551,19 @@ static int builtin_commandline(parser_t &parser, wchar_t **argv) if (cursor_mode) { - if (argc-woptind) + if (argc-w.woptind) { wchar_t *endptr; long new_pos; errno = 0; - new_pos = wcstol(argv[woptind], &endptr, 10); + new_pos = wcstol(argv[w.woptind], &endptr, 10); if (*endptr || errno) { append_format(stderr_buffer, BUILTIN_ERR_NOT_NUMBER, argv[0], - argv[woptind]); + argv[w.woptind]); builtin_print_help(parser, argv[0], stderr_buffer); } @@ -639,7 +639,7 @@ static int builtin_commandline(parser_t &parser, wchar_t **argv) } - switch (argc-woptind) + switch (argc-w.woptind) { case 0: { @@ -649,16 +649,16 @@ static int builtin_commandline(parser_t &parser, wchar_t **argv) case 1: { - replace_part(begin, end, argv[woptind], append_mode); + replace_part(begin, end, argv[w.woptind], append_mode); break; } default: { - wcstring sb = argv[woptind]; + wcstring sb = argv[w.woptind]; int i; - for (i=woptind+1; i fgcolors; - for (; woptind < argc; woptind++) + for (; w.woptind < argc; w.woptind++) { - rgb_color_t fg = rgb_color_t(argv[woptind]); + rgb_color_t fg = rgb_color_t(argv[w.woptind]); if (fg.is_none() || fg.is_ignore()) { - append_format(stderr_buffer, _(L"%ls: Unknown color '%ls'\n"), argv[0], argv[woptind]); + append_format(stderr_buffer, _(L"%ls: Unknown color '%ls'\n"), argv[0], argv[w.woptind]); return STATUS_BUILTIN_ERROR; } fgcolors.push_back(fg); diff --git a/src/builtin_ulimit.cpp b/src/builtin_ulimit.cpp index 23524543a..64b126b79 100644 --- a/src/builtin_ulimit.cpp +++ b/src/builtin_ulimit.cpp @@ -254,6 +254,7 @@ static int set(int resource, int hard, int soft, rlim_t value) */ static int builtin_ulimit(parser_t &parser, wchar_t ** argv) { + wgetopter_t w; int hard=0; int soft=0; @@ -262,7 +263,7 @@ static int builtin_ulimit(parser_t &parser, wchar_t ** argv) int argc = builtin_count_args(argv); - woptind=0; + w.woptind=0; while (1) { @@ -334,11 +335,11 @@ static int builtin_ulimit(parser_t &parser, wchar_t ** argv) int opt_index = 0; - int opt = wgetopt_long(argc, - argv, - L"aHScdflmnstuvh", - long_options, - &opt_index); + int opt = w.wgetopt_long(argc, + argv, + L"aHScdflmnstuvh", + long_options, + &opt_index); if (opt == -1) break; @@ -419,14 +420,14 @@ static int builtin_ulimit(parser_t &parser, wchar_t ** argv) return 0; case L'?': - builtin_unknown_option(parser, argv[0], argv[woptind-1]); + builtin_unknown_option(parser, argv[0], argv[w.woptind-1]); return 1; } } if (report_all) { - if (argc - woptind == 0) + if (argc - w.woptind == 0) { print_all(hard); } @@ -441,7 +442,7 @@ static int builtin_ulimit(parser_t &parser, wchar_t ** argv) return 0; } - switch (argc - woptind) + switch (argc - w.woptind) { case 0: { @@ -468,28 +469,28 @@ static int builtin_ulimit(parser_t &parser, wchar_t ** argv) hard=soft=1; } - if (wcscasecmp(argv[woptind], L"unlimited")==0) + if (wcscasecmp(argv[w.woptind], L"unlimited")==0) { new_limit = RLIM_INFINITY; } - else if (wcscasecmp(argv[woptind], L"hard")==0) + else if (wcscasecmp(argv[w.woptind], L"hard")==0) { new_limit = get(what, 1); } - else if (wcscasecmp(argv[woptind], L"soft")==0) + else if (wcscasecmp(argv[w.woptind], L"soft")==0) { new_limit = get(what, soft); } else { errno=0; - new_limit = wcstol(argv[woptind], &end, 10); + new_limit = wcstol(argv[w.woptind], &end, 10); if (errno || *end) { append_format(stderr_buffer, L"%ls: Invalid limit '%ls'\n", argv[0], - argv[woptind]); + argv[w.woptind]); builtin_print_help(parser, argv[0], stderr_buffer); return 1; } diff --git a/src/wgetopt.cpp b/src/wgetopt.cpp index 2d2117f6d..b63fe74fd 100644 --- a/src/wgetopt.cpp +++ b/src/wgetopt.cpp @@ -84,9 +84,6 @@ when it is done, all the options precede everything else. Thus all application programs are extended to handle flexible argument order. - Setting the environment variable POSIXLY_CORRECT disables permutation. - Then the behavior is completely standard. - GNU application programs can use a third alternative mode in which they can distinguish the relative order of options and other arguments. */ @@ -95,87 +92,6 @@ #include "fallback.h" - -/* For communication from `getopt' to the caller. - When `getopt' finds an option that takes an argument, - the argument value is returned here. - Also, when `ordering' is RETURN_IN_ORDER, - each non-option ARGV-element is returned here. */ - -wchar_t *woptarg = NULL; - -/* Index in ARGV of the next element to be scanned. - This is used for communication to and from the caller - and for communication between successive calls to `getopt'. - - On entry to `getopt', zero means this is the first call; initialize. - - When `getopt' returns EOF, this is the index of the first of the - non-option elements that the caller should itself scan. - - Otherwise, `woptind' communicates from one call to the next - how much of ARGV has been scanned so far. */ - -/* XXX 1003.2 says this must be 1 before any call. */ -int woptind = 0; - -/* The next char to be scanned in the option-element - in which the last option character we returned was found. - This allows us to pick up the scan where we left off. - - If this is zero, or a null string, it means resume the scan - by advancing to the next ARGV-element. */ - -static wchar_t *nextchar; - -/* Callers store zero here to inhibit the error message - for unrecognized options. */ - -int wopterr = 1; - -/* Set to an option character which was unrecognized. - This must be initialized on some systems to avoid linking in the - system's own getopt implementation. */ - -int woptopt = '?'; - -/* Describe how to deal with options that follow non-option ARGV-elements. - -If the caller did not specify anything, -the default is REQUIRE_ORDER if the environment variable -POSIXLY_CORRECT is defined, PERMUTE otherwise. - -REQUIRE_ORDER means don't recognize them as options; -stop option processing when the first non-option is seen. -This is what Unix does. -This mode of operation is selected by either setting the environment -variable POSIXLY_CORRECT, or using `+' as the first character -of the list of option characters. - -PERMUTE is the default. We permute the contents of ARGV as we scan, -so that eventually all the non-options are at the end. This allows options -to be given in any order, even with programs that were not written to -expect this. - -RETURN_IN_ORDER is an option available to programs that were written -to expect options and other ARGV-elements in any order and that care about -the ordering of the two. We describe each non-option ARGV-element -as if it were the argument of an option with character code 1. -Using `-' as the first character of the list of option characters -selects this mode of operation. - -The special argument `--' forces an end of option-scanning regardless -of the value of `ordering'. In the case of RETURN_IN_ORDER, only -`--' can cause `getopt' to return EOF with `woptind' != ARGC. */ - -static enum -{ - REQUIRE_ORDER, PERMUTE, RETURN_IN_ORDER -} ordering; - -/* Value of POSIXLY_CORRECT environment variable. */ -static char *posixly_correct; - /** Use translation functions if available */ @@ -233,14 +149,6 @@ extern int wcslen(const wchar_t *); #endif /* not __GNU_LIBRARY__ */ -/* Handle permutation of arguments. */ - -/* Describe the part of ARGV that contains non-options that have - been skipped. `first_nonopt' is the index in ARGV of the first of them; - `last_nonopt' is the index after the last of them. */ - -static int first_nonopt; -static int last_nonopt; /* Exchange two adjacent subsequences of ARGV. One subsequence is elements [first_nonopt,last_nonopt) @@ -251,8 +159,7 @@ static int last_nonopt; `first_nonopt' and `last_nonopt' are relocated so that they describe the new indices of the non-options in ARGV after they are moved. */ -static void -exchange(wchar_t **argv) +void wgetopter_t::exchange(wchar_t **argv) { int bottom = first_nonopt; int middle = last_nonopt; @@ -308,8 +215,7 @@ exchange(wchar_t **argv) /* Initialize the internal data when the first call is made. */ -static const wchar_t * -_wgetopt_initialize(const wchar_t *optstring) +const wchar_t * wgetopter_t::_wgetopt_initialize(const wchar_t *optstring) { /* Start processing options with ARGV-element 1 (since ARGV-element 0 is the program name); the sequence of previously skipped @@ -319,8 +225,6 @@ _wgetopt_initialize(const wchar_t *optstring) nextchar = NULL; - posixly_correct = getenv("POSIXLY_CORRECT"); - /* Determine how to handle the ordering of options and nonoptions. */ if (optstring[0] == '-') @@ -333,8 +237,6 @@ _wgetopt_initialize(const wchar_t *optstring) ordering = REQUIRE_ORDER; ++optstring; } - else if (posixly_correct != NULL) - ordering = REQUIRE_ORDER; else ordering = PERMUTE; @@ -368,7 +270,7 @@ _wgetopt_initialize(const wchar_t *optstring) so the following text in the same ARGV-element, or the text of the following ARGV-element, is returned in `optarg'. Two colons mean an option that wants an optional arg; if there is text in the current ARGV-element, - it is returned in `woptarg', otherwise `woptarg' is set to zero. + it is returned in `w.woptarg', otherwise `w.woptarg' is set to zero. If OPTSTRING starts with `-' or `+', it requests different methods of handling the non-option ARGV-elements. @@ -397,8 +299,7 @@ _wgetopt_initialize(const wchar_t *optstring) If LONG_ONLY is nonzero, '-' as well as '--' can introduce long-named options. */ -int -_wgetopt_internal(int argc, wchar_t *const *argv, const wchar_t *optstring, const struct woption *longopts, int *longind, int long_only) +int wgetopter_t::_wgetopt_internal(int argc, wchar_t *const *argv, const wchar_t *optstring, const struct woption *longopts, int *longind, int long_only) { woptarg = NULL; @@ -631,11 +532,7 @@ _wgetopt_internal(int argc, wchar_t *const *argv, const wchar_t *optstring, cons { if (wopterr) { - if (posixly_correct) - /* 1003.2 specifies the format of this message. */ - fwprintf(stderr, _(L"%ls: Illegal option -- %lc\n"), argv[0], c); - else - fwprintf(stderr, _(L"%ls: Invalid option -- %lc\n"), argv[0], c); + fwprintf(stderr, _(L"%ls: Invalid option -- %lc\n"), argv[0], c); } woptopt = c; @@ -693,8 +590,7 @@ _wgetopt_internal(int argc, wchar_t *const *argv, const wchar_t *optstring, cons } } -int -wgetopt(int argc, wchar_t *const *argv, const wchar_t *optstring) +int wgetopter_t::wgetopt(int argc, wchar_t *const *argv, const wchar_t *optstring) { return _wgetopt_internal(argc, argv, optstring, (const struct woption *) 0, @@ -702,14 +598,12 @@ wgetopt(int argc, wchar_t *const *argv, const wchar_t *optstring) 0); } -int -wgetopt_long(int argc, wchar_t *const *argv, const wchar_t *options, const struct woption *long_options, int *opt_index) +int wgetopter_t::wgetopt_long(int argc, wchar_t *const *argv, const wchar_t *options, const struct woption *long_options, int *opt_index) { return _wgetopt_internal(argc, argv, options, long_options, opt_index, 0); } -int -wgetopt_long_only(int argc, wchar_t *const *argv, const wchar_t *options, const struct woption *long_options, int *opt_index) +int wgetopter_t::wgetopt_long_only(int argc, wchar_t *const *argv, const wchar_t *options, const struct woption *long_options, int *opt_index) { return _wgetopt_internal(argc, argv, options, long_options, opt_index, 1); } diff --git a/src/wgetopt.h b/src/wgetopt.h index 5a03ba33c..91d50489e 100644 --- a/src/wgetopt.h +++ b/src/wgetopt.h @@ -49,162 +49,170 @@ Cambridge, MA 02139, USA. */ #include -#ifdef __cplusplus -extern "C" { -#endif - - /** For communication from `getopt' to the caller. - When `getopt' finds an option that takes an argument, - the argument value is returned here. - Also, when `ordering' is RETURN_IN_ORDER, - each non-option ARGV-element is returned here. */ - - extern wchar_t *woptarg; - - /** Index in ARGV of the next element to be scanned. - This is used for communication to and from the caller - and for communication between successive calls to `getopt'. - - On entry to `getopt', zero means this is the first call; initialize. - - When `getopt' returns EOF, this is the index of the first of the - non-option elements that the caller should itself scan. - - Otherwise, `woptind' communicates from one call to the next - how much of ARGV has been scanned so far. */ - - extern int woptind; - - /** Callers store zero here to inhibit the error message `getopt' prints - for unrecognized options. */ - - extern int wopterr; - - /** Set to an option character which was unrecognized. */ - - extern int woptopt; - - /** Describe the long-named options requested by the application. - The LONG_OPTIONS argument to getopt_long or getopt_long_only is a vector - of `struct option' terminated by an element containing a name which is - zero. - - The field `has_arg' is: - no_argument (or 0) if the option does not take an argument, - required_argument (or 1) if the option requires an argument, - optional_argument (or 2) if the option takes an optional argument. - - If the field `flag' is not NULL, it points to a variable that is set - to the value given in the field `val' when the option is found, but - left unchanged if the option is not found. - - To have a long-named option do something other than set an `int' to - a compiled-in constant, such as set a value from `optarg', set the - option's `flag' field to zero and its `val' field to a nonzero - value (the equivalent single-letter option character, if there is - one). For long options that have a zero `flag' field, `getopt' - returns the contents of the `val' field. */ - - struct woption +class wgetopter_t +{ +private: + void exchange(wchar_t **argv); + const wchar_t * _wgetopt_initialize(const wchar_t *optstring); + int _wgetopt_internal(int argc, wchar_t *const *argv, const wchar_t *optstring, const struct woption *longopts, int *longind, int long_only); + +public: + /* For communication from `getopt' to the caller. + When `getopt' finds an option that takes an argument, + the argument value is returned here. + Also, when `ordering' is RETURN_IN_ORDER, + each non-option ARGV-element is returned here. */ + + wchar_t *woptarg; + + /* Index in ARGV of the next element to be scanned. + This is used for communication to and from the caller + and for communication between successive calls to `getopt'. + + On entry to `getopt', zero means this is the first call; initialize. + + When `getopt' returns EOF, this is the index of the first of the + non-option elements that the caller should itself scan. + + Otherwise, `woptind' communicates from one call to the next + how much of ARGV has been scanned so far. */ + + /* XXX 1003.2 says this must be 1 before any call. */ + int woptind; + + + /* The next char to be scanned in the option-element + in which the last option character we returned was found. + This allows us to pick up the scan where we left off. + + If this is zero, or a null string, it means resume the scan + by advancing to the next ARGV-element. */ + + wchar_t *nextchar; + + /* Callers store zero here to inhibit the error message + for unrecognized options. */ + + int wopterr; + + /* Set to an option character which was unrecognized. + This must be initialized on some systems to avoid linking in the + system's own getopt implementation. */ + + int woptopt; + + /* Describe how to deal with options that follow non-option ARGV-elements. + + If the caller did not specify anything, + the default is PERMUTE. + + REQUIRE_ORDER means don't recognize them as options; + stop option processing when the first non-option is seen. + This is what Unix does. + This mode of operation is selected by using `+' as the first + character of the list of option characters. + + PERMUTE is the default. We permute the contents of ARGV as we scan, + so that eventually all the non-options are at the end. This allows options + to be given in any order, even with programs that were not written to + expect this. + + RETURN_IN_ORDER is an option available to programs that were written + to expect options and other ARGV-elements in any order and that care about + the ordering of the two. We describe each non-option ARGV-element + as if it were the argument of an option with character code 1. + Using `-' as the first character of the list of option characters + selects this mode of operation. + + The special argument `--' forces an end of option-scanning regardless + of the value of `ordering'. In the case of RETURN_IN_ORDER, only + `--' can cause `getopt' to return EOF with `woptind' != ARGC. */ + + enum { - /** - long name for switch - */ -#if defined (__STDC__) && __STDC__ - const wchar_t *name; -#else - wchar_t *name; -#endif - /** - Must be one of no_argument, required_argument and - optional_argument. + REQUIRE_ORDER, PERMUTE, RETURN_IN_ORDER + } ordering; + + /* Handle permutation of arguments. */ + + /* Describe the part of ARGV that contains non-options that have + been skipped. `first_nonopt' is the index in ARGV of the first of them; + `last_nonopt' is the index after the last of them. */ + + int first_nonopt; + int last_nonopt; + + + wgetopter_t() : woptarg(NULL), woptind(0), nextchar(0), wopterr(0), woptopt('?'), first_nonopt(0), last_nonopt(0) + { + } + + int wgetopt(int argc, wchar_t *const *argv, const wchar_t *optstring); + int wgetopt_long(int argc, wchar_t *const *argv, const wchar_t *options, const struct woption *long_options, int *opt_index); + int wgetopt_long_only(int argc, wchar_t *const *argv, const wchar_t *options, const struct woption *long_options, int *opt_index); +}; - has_arg can't be an enum because some compilers complain about - type mismatches in all the code that assumes it is an int. - */ - int has_arg; +/** Describe the long-named options requested by the application. + The LONG_OPTIONS argument to getopt_long or getopt_long_only is a vector + of `struct option' terminated by an element containing a name which is + zero. - /** - If non-null, the flag whose value should be set if this switch is encountered - */ - int *flag; + The field `has_arg' is: + no_argument (or 0) if the option does not take an argument, + required_argument (or 1) if the option requires an argument, + optional_argument (or 2) if the option takes an optional argument. - /** - If \c flag is non-null, this is the value that flag will be set - to. Otherwise, this is the return-value of the function call. - */ - int val; - }; + If the field `flag' is not NULL, it points to a variable that is set + to the value given in the field `val' when the option is found, but + left unchanged if the option is not found. - /* Names for the values of the `has_arg' field of `struct option'. */ + To have a long-named option do something other than set an `int' to + a compiled-in constant, such as set a value from `optarg', set the + option's `flag' field to zero and its `val' field to a nonzero + value (the equivalent single-letter option character, if there is + one). For long options that have a zero `flag' field, `getopt' + returns the contents of the `val' field. */ + +struct woption +{ + /** + long name for switch + */ + const wchar_t *name; + /** + Must be one of no_argument, required_argument and + optional_argument. + + has_arg can't be an enum because some compilers complain about + type mismatches in all the code that assumes it is an int. + */ + int has_arg; /** - Specifies that a switch does not accept an argument + If non-null, the flag whose value should be set if this switch is encountered */ + int *flag; + + /** + If \c flag is non-null, this is the value that flag will be set + to. Otherwise, this is the return-value of the function call. + */ + int val; +}; + +/* Names for the values of the `has_arg' field of `struct option'. */ + +/** + Specifies that a switch does not accept an argument +*/ #define no_argument 0 - /** - Specifies that a switch requires an argument - */ +/** + Specifies that a switch requires an argument +*/ #define required_argument 1 - /** - Specifies that a switch accepts an optional argument - */ +/** + Specifies that a switch accepts an optional argument +*/ #define optional_argument 2 -#if defined (__STDC__) && __STDC__ -#ifdef __GNU_LIBRARY__ - /** - Get options from argument list. See the glibc manual for information on how to use this function. - */ - extern int wgetopt(int argc, wchar_t *const *argv, const wchar_t *shortopts); -#else /* not __GNU_LIBRARY__ */ - - extern int wgetopt(); -#endif /* __GNU_LIBRARY__ */ - /** - Get options from argument list. See the glibc manual for information on how to use this function. - */ - extern int wgetopt_long(int argc, wchar_t *const *argv, const wchar_t *shortopts, - const struct woption *longopts, int *longind); - /** - Get options from argument list. See the glibc manual for information on how to use this function. - */ - extern int wgetopt_long_only(int argc, wchar_t *const *argv, - const wchar_t *shortopts, - const struct woption *longopts, int *longind); - - /** - Internal only. Users should not call this directly. - */ - extern int _wgetopt_internal(int argc, wchar_t *const *argv, - const wchar_t *shortopts, - const struct woption *longopts, int *longind, - int long_only); -#else /* not __STDC__ */ - - /** - Get options from argument list. See the glibc manual for information on how to use this function. - */ - extern int wgetopt(); - - /** - Get options from argument list. See the glibc manual for information on how to use this function. - */ - extern int wgetopt_long(); - - /** - Get options from argument list. See the glibc manual for information on how to use this function. - */ - extern int wgetopt_long_only(); - - /** - Internal only. Users should not call this directly. - */ - extern int _wgetopt_internal(); -#endif /* __STDC__ */ - -#ifdef __cplusplus -} -#endif - #endif /* FISH_WGETOPT_H */