diff --git a/Makefile.in b/Makefile.in index 3d68a01db..d808471ae 100644 --- a/Makefile.in +++ b/Makefile.in @@ -86,7 +86,7 @@ COMMON_FILES := util.cpp fallback.cpp 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.o env_universal_common.o input_common.o event.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 \ @@ -708,8 +708,8 @@ fish_indent: $(FISH_INDENT_OBJS) # Neat little program to show output from terminal # -key_reader: key_reader.o input_common.o common.o env_universal.o env_universal_common.o wutil.o iothread.o utf8.o - $(CXX) $(CXXFLAGS) $(LDFLAGS_FISH) key_reader.o input_common.o common.o env_universal.o env_universal_common.o wutil.o iothread.o utf8.o $(LIBS) -o $@ +key_reader: key_reader.o input_common.o common.o env_universal_common.o wutil.o iothread.o utf8.o + $(CXX) $(CXXFLAGS) $(LDFLAGS_FISH) key_reader.o input_common.o common.o env_universal_common.o wutil.o iothread.o utf8.o $(LIBS) -o $@ # @@ -760,6 +760,14 @@ clean: 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 complete.h proc.h parse_tree.h tokenizer.h +builtin.o: parse_constants.h parser.h reader.h highlight.h env.h color.h +builtin.o: wgetopt.h sanity.h wildcard.h expand.h input_common.h input.h +builtin.o: intern.h exec.h parse_util.h autoload.h lru.h parser_keywords.h +builtin.o: path.h history.h builtin_set.cpp builtin_commandline.cpp +builtin.o: builtin_complete.cpp builtin_ulimit.cpp builtin_jobs.cpp +builtin.o: builtin_set_color.cpp output.h screen.h 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 proc.h parse_tree.h @@ -770,23 +778,15 @@ 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 reader.h highlight.h env.h color.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 complete.h proc.h parse_tree.h tokenizer.h -builtin.o: parse_constants.h parser.h reader.h highlight.h env.h color.h -builtin.o: wgetopt.h sanity.h wildcard.h expand.h input_common.h input.h -builtin.o: intern.h exec.h parse_util.h autoload.h lru.h parser_keywords.h -builtin.o: path.h history.h builtin_set.cpp builtin_commandline.cpp -builtin.o: builtin_complete.cpp builtin_ulimit.cpp builtin_jobs.cpp -builtin.o: builtin_set_color.cpp output.h screen.h builtin_printf.cpp 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 wgetopt.h builtin_printf.o: common.h util.h -builtin_set_color.o: config.h builtin.h util.h io.h common.h color.h output.h -builtin_set_color.o: screen.h highlight.h env.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: 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 @@ -803,12 +803,11 @@ 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.h env_universal_common.h input.h -env.o: input_common.h path.h fish_version.h -env_universal_common.o: config.h signal.h fallback.h util.h common.h wutil.h -env_universal_common.o: utf8.h env_universal_common.h env.h -env_universal.o: config.h signal.h fallback.h util.h common.h wutil.h -env_universal.o: env_universal_common.h env.h env_universal.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 input_common.h proc.h io.h parse_tree.h tokenizer.h event.o: parse_constants.h parser.h @@ -833,7 +832,7 @@ 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 +fish_tests.o: pager.h input.h input_common.h utf8.h env_universal_common.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 proc.h io.h parse_tree.h tokenizer.h parse_constants.h @@ -848,13 +847,12 @@ 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 parse_tree.h history.o: parse_constants.h wutil.h history.h intern.h path.h autoload.h history.o: lru.h iothread.h -input_common.o: config.h fallback.h signal.h util.h common.h wutil.h -input_common.o: input_common.h env_universal.h env_universal_common.h env.h -input_common.o: 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 proc.h parse_tree.h tokenizer.h input.o: parse_constants.h sanity.h input_common.h input.h parser.h event.h input.o: 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 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 @@ -876,14 +874,6 @@ parse_execution.o: expand.h builtin.h parser.h event.h function.h reader.h parse_execution.o: highlight.h env.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 -parser.o: config.h signal.h fallback.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 parser_keywords.h exec.h wildcard.h expand.h complete.h -parser.o: builtin.h env.h reader.h highlight.h color.h sanity.h -parser.o: env_universal.h env_universal_common.h intern.h parse_util.h -parser.o: 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 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 @@ -891,6 +881,13 @@ 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 signal.h fallback.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 parser_keywords.h exec.h wildcard.h expand.h complete.h +parser.o: builtin.h env.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 @@ -923,9 +920,9 @@ 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 -xdgmimealias.o: xdgmimealias.h xdgmime.h xdgmimeint.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 diff --git a/env.cpp b/env.cpp index 9f057848a..43a342887 100644 --- a/env.cpp +++ b/env.cpp @@ -49,7 +49,6 @@ #include "history.h" #include "reader.h" #include "parser.h" -#include "env_universal.h" #include "env_universal_common.h" #include "input.h" #include "event.h" diff --git a/env_universal.cpp b/env_universal.cpp deleted file mode 100644 index fa6e6b5d6..000000000 --- a/env_universal.cpp +++ /dev/null @@ -1,42 +0,0 @@ -#include "config.h" - - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - -#if HAVE_NCURSES_H -#include -#else -#include -#endif - -#if HAVE_TERM_H -#include -#elif HAVE_NCURSES_TERM_H -#include -#endif - -#ifdef HAVE_SYS_SELECT_H -#include -#endif - -#include - -#include "fallback.h" -#include "util.h" - -#include "common.h" -#include "wutil.h" -#include "env_universal_common.h" -#include "env_universal.h" -#include "env.h" - - diff --git a/env_universal.h b/env_universal.h deleted file mode 100644 index c84ab8b6f..000000000 --- a/env_universal.h +++ /dev/null @@ -1,13 +0,0 @@ -/** \file env_universal.h - Universal variable client library. -*/ - -#ifndef ENV_UNIVERSAL_H -#define ENV_UNIVERSAL_H - -#include - -#include "env_universal_common.h" -#include "env.h" - -#endif diff --git a/fish.xcodeproj/project.pbxproj b/fish.xcodeproj/project.pbxproj index 32ba442b3..0ed1dcd7e 100644 --- a/fish.xcodeproj/project.pbxproj +++ b/fish.xcodeproj/project.pbxproj @@ -97,7 +97,6 @@ D08A32A917B446A300F3A533 /* color.cpp in Sources */ = {isa = PBXBuildFile; fileRef = D0B6B0FE14E88BA400AD6C10 /* color.cpp */; }; D08A32AA17B446A300F3A533 /* common.cpp in Sources */ = {isa = PBXBuildFile; fileRef = D0A0853613B3ACEE0099B651 /* common.cpp */; }; D08A32AB17B446A300F3A533 /* env_universal_common.cpp in Sources */ = {isa = PBXBuildFile; fileRef = D0A0853813B3ACEE0099B651 /* env_universal_common.cpp */; }; - D08A32AC17B446A300F3A533 /* env_universal.cpp in Sources */ = {isa = PBXBuildFile; fileRef = D0A0853913B3ACEE0099B651 /* env_universal.cpp */; }; D08A32AD17B446A300F3A533 /* event.cpp in Sources */ = {isa = PBXBuildFile; fileRef = D0A0853B13B3ACEE0099B651 /* event.cpp */; }; D08A32AE17B446A300F3A533 /* input_common.cpp in Sources */ = {isa = PBXBuildFile; fileRef = D0A0854913B3ACEE0099B651 /* input_common.cpp */; }; D08A32AF17B446A300F3A533 /* intern.cpp in Sources */ = {isa = PBXBuildFile; fileRef = D0A0854B13B3ACEE0099B651 /* intern.cpp */; }; @@ -136,7 +135,6 @@ D0D02A7715983875008E62BD /* input.cpp in Sources */ = {isa = PBXBuildFile; fileRef = D0A0854A13B3ACEE0099B651 /* input.cpp */; }; D0D02A781598387E008E62BD /* output.cpp in Sources */ = {isa = PBXBuildFile; fileRef = D0A0855113B3ACEE0099B651 /* output.cpp */; }; D0D02A7915983888008E62BD /* intern.cpp in Sources */ = {isa = PBXBuildFile; fileRef = D0A0854B13B3ACEE0099B651 /* intern.cpp */; }; - D0D02A7A15983916008E62BD /* env_universal.cpp in Sources */ = {isa = PBXBuildFile; fileRef = D0A0853913B3ACEE0099B651 /* env_universal.cpp */; }; D0D02A7B15983928008E62BD /* env_universal_common.cpp in Sources */ = {isa = PBXBuildFile; fileRef = D0A0853813B3ACEE0099B651 /* env_universal_common.cpp */; }; D0D02A7C159839D5008E62BD /* autoload.cpp in Sources */ = {isa = PBXBuildFile; fileRef = D0C6FCC914CFA4B0004CE8AD /* autoload.cpp */; }; D0D02A7D159839D5008E62BD /* builtin_test.cpp in Sources */ = {isa = PBXBuildFile; fileRef = D0F3373A1506DE3C00ECEFC0 /* builtin_test.cpp */; }; @@ -350,7 +348,6 @@ D0A0850513B3ACEE0099B651 /* complete.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = complete.h; sourceTree = ""; }; D0A0850613B3ACEE0099B651 /* config.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = config.h; sourceTree = ""; }; D0A0850713B3ACEE0099B651 /* env_universal_common.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = env_universal_common.h; sourceTree = ""; }; - D0A0850813B3ACEE0099B651 /* env_universal.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = env_universal.h; sourceTree = ""; }; D0A0850913B3ACEE0099B651 /* env.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = env.h; sourceTree = ""; }; D0A0850A13B3ACEE0099B651 /* event.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = event.h; sourceTree = ""; }; D0A0850B13B3ACEE0099B651 /* exec.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = exec.h; sourceTree = ""; }; @@ -397,7 +394,6 @@ D0A0853613B3ACEE0099B651 /* common.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = common.cpp; sourceTree = ""; }; D0A0853713B3ACEE0099B651 /* complete.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = complete.cpp; sourceTree = ""; }; D0A0853813B3ACEE0099B651 /* env_universal_common.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = env_universal_common.cpp; sourceTree = ""; }; - D0A0853913B3ACEE0099B651 /* env_universal.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = env_universal.cpp; sourceTree = ""; }; D0A0853A13B3ACEE0099B651 /* env.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = env.cpp; sourceTree = ""; }; D0A0853B13B3ACEE0099B651 /* event.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; lineEnding = 0; path = event.cpp; sourceTree = ""; xcLanguageSpecificationIdentifier = xcode.lang.cpp; }; D0A0853C13B3ACEE0099B651 /* exec.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = exec.cpp; sourceTree = ""; }; @@ -575,8 +571,6 @@ D0A0850613B3ACEE0099B651 /* config.h */, D0A0850713B3ACEE0099B651 /* env_universal_common.h */, D0A0853813B3ACEE0099B651 /* env_universal_common.cpp */, - D0A0850813B3ACEE0099B651 /* env_universal.h */, - D0A0853913B3ACEE0099B651 /* env_universal.cpp */, D0A0850913B3ACEE0099B651 /* env.h */, D0A0853A13B3ACEE0099B651 /* env.cpp */, D0A0850A13B3ACEE0099B651 /* event.h */, @@ -1025,7 +1019,6 @@ D08A32A917B446A300F3A533 /* color.cpp in Sources */, D08A32AA17B446A300F3A533 /* common.cpp in Sources */, D08A32AB17B446A300F3A533 /* env_universal_common.cpp in Sources */, - D08A32AC17B446A300F3A533 /* env_universal.cpp in Sources */, D08A32AD17B446A300F3A533 /* event.cpp in Sources */, D08A32AE17B446A300F3A533 /* input_common.cpp in Sources */, D08A32AF17B446A300F3A533 /* intern.cpp in Sources */, @@ -1115,7 +1108,6 @@ D0D02A7715983875008E62BD /* input.cpp in Sources */, D0D02A781598387E008E62BD /* output.cpp in Sources */, D0D02A7915983888008E62BD /* intern.cpp in Sources */, - D0D02A7A15983916008E62BD /* env_universal.cpp in Sources */, D0D02A7B15983928008E62BD /* env_universal_common.cpp in Sources */, D032388B1849D1980032CF2C /* pager.cpp in Sources */, D0D02A89159839DF008E62BD /* fish.cpp in Sources */, diff --git a/input_common.cpp b/input_common.cpp index e63931243..513fd8e36 100644 --- a/input_common.cpp +++ b/input_common.cpp @@ -16,6 +16,7 @@ Implementation file for the low level input library #include #include #include +#include #ifdef HAVE_SYS_SELECT_H #include #endif @@ -26,7 +27,7 @@ Implementation file for the low level input library #include "common.h" #include "wutil.h" #include "input_common.h" -#include "env_universal.h" +#include "env_universal_common.h" #include "iothread.h" /** @@ -37,9 +38,9 @@ Implementation file for the low level input library #define WAIT_ON_ESCAPE 10 /** Characters that have been read and returned by the sequence matching code */ -static std::stack > lookahead_list; +static std::stack > lookahead_list; -/* Queue of pairs of (function pointer, argument) to be invoked */ +/* Queue of pairs of (function pointer, argument) to be invoked. Expected to be mostly empty. */ typedef std::pair callback_info_t; typedef std::queue > callback_queue_t; static callback_queue_t callback_queue; diff --git a/parser.cpp b/parser.cpp index 773cde6b7..3740f1fbe 100644 --- a/parser.cpp +++ b/parser.cpp @@ -37,7 +37,6 @@ The fish parser. Contains functions for parsing and evaluating code. #include "expand.h" #include "reader.h" #include "sanity.h" -#include "env_universal.h" #include "event.h" #include "intern.h" #include "parse_util.h"