mirror of
https://github.com/fish-shell/fish-shell
synced 2024-12-25 04:13:08 +00:00
Initial pass with Include What You Use
This commit is contained in:
parent
30ea4fc416
commit
78162a2a13
83 changed files with 360 additions and 564 deletions
11
autoload.cpp
11
autoload.cpp
|
@ -3,14 +3,21 @@
|
|||
The classes responsible for autoloading functions and completions.
|
||||
*/
|
||||
|
||||
#include "config.h"
|
||||
#include "config.h" // IWYU pragma: keep
|
||||
#include "autoload.h"
|
||||
#include "wutil.h"
|
||||
#include "common.h"
|
||||
#include "signal.h"
|
||||
#include "signal.h" // IWYU pragma: keep - needed for CHECK_BLOCK
|
||||
#include "env.h"
|
||||
#include "exec.h"
|
||||
#include <assert.h>
|
||||
#include <errno.h>
|
||||
#include <sys/stat.h>
|
||||
#include <unistd.h>
|
||||
#include <wchar.h>
|
||||
#include <string>
|
||||
#include <utility>
|
||||
#include <vector>
|
||||
#include <algorithm>
|
||||
|
||||
/* The time before we'll recheck an autoloaded file */
|
||||
|
|
|
@ -6,10 +6,10 @@
|
|||
#ifndef FISH_AUTOLOAD_H
|
||||
#define FISH_AUTOLOAD_H
|
||||
|
||||
#include <wchar.h>
|
||||
#include <map>
|
||||
#include <pthread.h>
|
||||
#include <stddef.h>
|
||||
#include <time.h>
|
||||
#include <set>
|
||||
#include <list>
|
||||
#include "common.h"
|
||||
#include "lru.h"
|
||||
|
||||
|
@ -40,7 +40,6 @@ struct builtin_script_t
|
|||
const char *def;
|
||||
};
|
||||
|
||||
struct builtin_script_t;
|
||||
class env_vars_snapshot_t;
|
||||
|
||||
/**
|
||||
|
|
19
builtin.cpp
19
builtin.cpp
|
@ -17,27 +17,27 @@
|
|||
|
||||
*/
|
||||
|
||||
#include "config.h"
|
||||
#include "config.h" // IWYU pragma: keep
|
||||
|
||||
#include <stdlib.h>
|
||||
#include <stdio.h>
|
||||
#include <wchar.h>
|
||||
#include <unistd.h>
|
||||
#include <termios.h>
|
||||
#include <errno.h>
|
||||
#include <sys/types.h>
|
||||
#include <sys/stat.h>
|
||||
#include <fcntl.h>
|
||||
#include <dirent.h>
|
||||
#include <string.h>
|
||||
#include <signal.h>
|
||||
#include <wctype.h>
|
||||
#include <sys/time.h>
|
||||
#include <time.h>
|
||||
#include <stack>
|
||||
#include <assert.h>
|
||||
#include <algorithm>
|
||||
#include <map>
|
||||
#include <string>
|
||||
#include <utility>
|
||||
|
||||
#include "fallback.h"
|
||||
#include "util.h"
|
||||
#include "fallback.h" // IWYU pragma: keep
|
||||
|
||||
#include "wutil.h"
|
||||
#include "builtin.h"
|
||||
|
@ -47,12 +47,8 @@
|
|||
#include "parser.h"
|
||||
#include "reader.h"
|
||||
#include "env.h"
|
||||
#include "common.h"
|
||||
#include "wgetopt.h"
|
||||
#include "sanity.h"
|
||||
#include "tokenizer.h"
|
||||
#include "wildcard.h"
|
||||
#include "input_common.h"
|
||||
#include "input.h"
|
||||
#include "intern.h"
|
||||
#include "event.h"
|
||||
|
@ -65,6 +61,7 @@
|
|||
#include "path.h"
|
||||
#include "history.h"
|
||||
#include "parse_tree.h"
|
||||
#include "parse_constants.h"
|
||||
#include "wcstringutil.h"
|
||||
|
||||
/**
|
||||
|
|
|
@ -5,12 +5,13 @@
|
|||
#ifndef FISH_BUILTIN_H
|
||||
#define FISH_BUILTIN_H
|
||||
|
||||
#include <wchar.h>
|
||||
#include <stddef.h> // for size_t
|
||||
#include <vector> // for vector
|
||||
|
||||
#include "util.h"
|
||||
#include "io.h"
|
||||
#include "common.h"
|
||||
|
||||
class completion_t;
|
||||
class parser_t;
|
||||
|
||||
enum
|
||||
|
|
|
@ -10,6 +10,8 @@ Implemented from scratch (yes, really) by way of IEEE 1003.1 as reference.
|
|||
#include "builtin.h"
|
||||
#include "wutil.h"
|
||||
#include "proc.h"
|
||||
#include <unistd.h>
|
||||
#include <sys/types.h>
|
||||
#include <sys/stat.h>
|
||||
#include <memory>
|
||||
|
||||
|
|
|
@ -2,7 +2,12 @@
|
|||
*/
|
||||
|
||||
#include "color.h"
|
||||
#include "fallback.h"
|
||||
#include "fallback.h" // IWYU pragma: keep
|
||||
#include <assert.h>
|
||||
#include <stdint.h>
|
||||
#include <stdlib.h>
|
||||
#include <wchar.h>
|
||||
#include <cstddef>
|
||||
|
||||
bool rgb_color_t::try_parse_special(const wcstring &special)
|
||||
{
|
||||
|
|
5
color.h
5
color.h
|
@ -3,9 +3,8 @@
|
|||
#ifndef FISH_COLOR_H
|
||||
#define FISH_COLOR_H
|
||||
|
||||
#include <stdint.h>
|
||||
#include <cstddef>
|
||||
#include "config.h"
|
||||
#include <string.h>
|
||||
#include <string>
|
||||
#include "common.h"
|
||||
|
||||
/* 24 bit color */
|
||||
|
|
30
common.cpp
30
common.cpp
|
@ -9,10 +9,6 @@ parts of fish.
|
|||
|
||||
#include <unistd.h>
|
||||
|
||||
#ifdef HAVE_STROPTS_H
|
||||
#include <stropts.h>
|
||||
#endif
|
||||
|
||||
#ifdef HAVE_SIGINFO_H
|
||||
#include <siginfo.h>
|
||||
#endif
|
||||
|
@ -22,53 +18,35 @@ parts of fish.
|
|||
#include <wchar.h>
|
||||
#include <string.h>
|
||||
#include <stdio.h>
|
||||
#include <dirent.h>
|
||||
#include <sys/types.h>
|
||||
#include <assert.h>
|
||||
#include <math.h>
|
||||
#include <signal.h>
|
||||
|
||||
|
||||
#ifdef HAVE_SYS_IOCTL_H
|
||||
#include <sys/ioctl.h>
|
||||
#endif
|
||||
|
||||
#include <sys/stat.h>
|
||||
#include <unistd.h>
|
||||
#include <wctype.h>
|
||||
#include <errno.h>
|
||||
#include <limits.h>
|
||||
#include <stdarg.h>
|
||||
#include <locale.h>
|
||||
#include <time.h>
|
||||
#include <sys/time.h>
|
||||
#include <fcntl.h>
|
||||
#include <algorithm>
|
||||
|
||||
#ifdef HAVE_EXECINFO_H
|
||||
#include <execinfo.h>
|
||||
#endif
|
||||
|
||||
#if HAVE_NCURSES_H
|
||||
#include <ncurses.h>
|
||||
#elif HAVE_NCURSES_CURSES_H
|
||||
#include <ncurses/curses.h>
|
||||
#else
|
||||
#include <curses.h>
|
||||
#endif
|
||||
|
||||
#if HAVE_TERM_H
|
||||
#include <term.h>
|
||||
#elif HAVE_NCURSES_TERM_H
|
||||
#include <ncurses/term.h>
|
||||
#endif
|
||||
|
||||
#include "fallback.h"
|
||||
#include "util.h"
|
||||
|
||||
#include "wutil.h"
|
||||
#include "common.h"
|
||||
#include "expand.h"
|
||||
#include "proc.h"
|
||||
#include "wildcard.h"
|
||||
#include "parser.h"
|
||||
#include "complete.h"
|
||||
|
||||
#include "util.cpp"
|
||||
#include "fallback.cpp"
|
||||
|
|
9
common.h
9
common.h
|
@ -17,10 +17,13 @@
|
|||
#include <vector>
|
||||
#include <pthread.h>
|
||||
#include <string.h>
|
||||
#include <stdarg.h>
|
||||
#include <stddef.h>
|
||||
#include <sys/types.h>
|
||||
|
||||
#include <errno.h>
|
||||
#include <assert.h>
|
||||
#include "util.h"
|
||||
#include "config.h"
|
||||
#include "fallback.h"
|
||||
|
||||
/**
|
||||
Avoid writing the type name twice in a common "static_cast-initialization".
|
||||
|
@ -28,8 +31,6 @@
|
|||
*/
|
||||
#define CAST_INIT(type, dst, src) type dst = static_cast<type >(src)
|
||||
|
||||
class completion_t;
|
||||
|
||||
/* Common string type */
|
||||
typedef std::wstring wcstring;
|
||||
typedef std::vector<wcstring> wcstring_list_t;
|
||||
|
|
28
complete.cpp
28
complete.cpp
|
@ -4,29 +4,23 @@
|
|||
*/
|
||||
#include "config.h"
|
||||
|
||||
#include <assert.h>
|
||||
#include <stdlib.h>
|
||||
#include <stdio.h>
|
||||
#include <limits.h>
|
||||
#include <string.h>
|
||||
#include <stddef.h>
|
||||
#include <wchar.h>
|
||||
#include <wctype.h>
|
||||
#include <unistd.h>
|
||||
#include <sys/types.h>
|
||||
#include <sys/stat.h>
|
||||
#include <dirent.h>
|
||||
#include <errno.h>
|
||||
#include <termios.h>
|
||||
#include <ctype.h>
|
||||
#include <pwd.h>
|
||||
#include <signal.h>
|
||||
#include <wchar.h>
|
||||
#include <pthread.h>
|
||||
#include <algorithm>
|
||||
#include <list>
|
||||
#include <map>
|
||||
#include <set>
|
||||
#include <string>
|
||||
#include <utility>
|
||||
|
||||
#include "fallback.h"
|
||||
#include "fallback.h" // IWYU pragma: keep
|
||||
#include "util.h"
|
||||
|
||||
#include "tokenizer.h"
|
||||
#include "wildcard.h"
|
||||
#include "proc.h"
|
||||
#include "parser.h"
|
||||
|
@ -37,15 +31,13 @@
|
|||
#include "exec.h"
|
||||
#include "expand.h"
|
||||
#include "common.h"
|
||||
#include "reader.h"
|
||||
#include "history.h"
|
||||
#include "intern.h"
|
||||
#include "parse_util.h"
|
||||
#include "parser_keywords.h"
|
||||
#include "wutil.h"
|
||||
#include "path.h"
|
||||
#include "parse_tree.h"
|
||||
#include "iothread.h"
|
||||
#include "autoload.h"
|
||||
#include "parse_constants.h"
|
||||
|
||||
/*
|
||||
Completion description strings, mostly for different types of files, such as sockets, block devices, etc.
|
||||
|
|
|
@ -12,11 +12,9 @@
|
|||
*/
|
||||
#define FISH_COMPLETE_H
|
||||
|
||||
|
||||
#include <wchar.h>
|
||||
#include <vector>
|
||||
#include <stdint.h>
|
||||
|
||||
#include "util.h"
|
||||
#include "common.h"
|
||||
/**
|
||||
* Use all completions
|
||||
|
|
32
env.cpp
32
env.cpp
|
@ -1,46 +1,26 @@
|
|||
/** \file env.c
|
||||
Functions for setting and getting environment variables.
|
||||
*/
|
||||
#include "config.h"
|
||||
#include "config.h" // IWYU pragma: keep
|
||||
|
||||
#include <stdlib.h>
|
||||
#include <wchar.h>
|
||||
#include <string.h>
|
||||
#include <stdio.h>
|
||||
#include <locale.h>
|
||||
#include <unistd.h>
|
||||
#include <signal.h>
|
||||
#include <assert.h>
|
||||
#include <sys/types.h>
|
||||
#include <sys/stat.h>
|
||||
#include <pthread.h>
|
||||
#include <pwd.h>
|
||||
#include <set>
|
||||
#include <map>
|
||||
#include <algorithm>
|
||||
|
||||
#if HAVE_NCURSES_H
|
||||
#include <ncurses.h>
|
||||
#elif HAVE_NCURSES_CURSES_H
|
||||
#include <ncurses/curses.h>
|
||||
#else
|
||||
#include <curses.h>
|
||||
#endif
|
||||
|
||||
#if HAVE_TERM_H
|
||||
#include <term.h>
|
||||
#elif HAVE_NCURSES_TERM_H
|
||||
#include <ncurses/term.h>
|
||||
#endif
|
||||
|
||||
#if HAVE_LIBINTL_H
|
||||
#include <libintl.h>
|
||||
#endif
|
||||
|
||||
#include <errno.h>
|
||||
#include <stddef.h>
|
||||
#include <wctype.h>
|
||||
#include <utility>
|
||||
#include <vector>
|
||||
|
||||
#include "fallback.h"
|
||||
#include "util.h"
|
||||
|
||||
#include "wutil.h"
|
||||
#include "proc.h"
|
||||
|
@ -50,13 +30,11 @@
|
|||
#include "expand.h"
|
||||
#include "history.h"
|
||||
#include "reader.h"
|
||||
#include "parser.h"
|
||||
#include "env_universal_common.h"
|
||||
#include "input.h"
|
||||
#include "event.h"
|
||||
#include "path.h"
|
||||
|
||||
#include "complete.h"
|
||||
#include "fish_version.h"
|
||||
|
||||
/** Value denoting a null string */
|
||||
|
|
3
env.h
3
env.h
|
@ -6,9 +6,10 @@
|
|||
#define FISH_ENV_H
|
||||
|
||||
#include <wchar.h>
|
||||
#include <stdint.h>
|
||||
#include <string>
|
||||
#include <map>
|
||||
|
||||
#include "util.h"
|
||||
#include "common.h"
|
||||
|
||||
/* Flags that may be passed as the 'mode' in env_set / env_get_string */
|
||||
|
|
|
@ -10,26 +10,39 @@
|
|||
#include "env_universal_common.h"
|
||||
|
||||
#include <fcntl.h>
|
||||
#include <sys/un.h>
|
||||
#include <sys/ioctl.h>
|
||||
#include <sys/mman.h>
|
||||
#include <sys/file.h>
|
||||
#include <sys/socket.h>
|
||||
#include <arpa/inet.h>
|
||||
#include <arpa/inet.h> // IWYU pragma: keep - needed for htonl
|
||||
#include <pwd.h>
|
||||
#include <assert.h>
|
||||
#include <errno.h>
|
||||
#include <limits.h>
|
||||
#include <stdarg.h>
|
||||
#include <stddef.h>
|
||||
#include <stdint.h>
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
#include <sys/stat.h>
|
||||
#include <sys/time.h>
|
||||
#include <sys/types.h>
|
||||
#include <unistd.h>
|
||||
#include <wchar.h>
|
||||
#include <wctype.h>
|
||||
#include <map>
|
||||
#include <utility>
|
||||
|
||||
#ifdef HAVE_SYS_SELECT_H
|
||||
#include <sys/select.h>
|
||||
#endif
|
||||
|
||||
#include "fallback.h"
|
||||
#include "fallback.h" // IWYU pragma: keep
|
||||
#include "util.h"
|
||||
|
||||
#include "common.h"
|
||||
#include "wutil.h"
|
||||
#include "utf8.h"
|
||||
#include "path.h"
|
||||
#include "iothread.h"
|
||||
|
||||
#if __APPLE__
|
||||
#define FISH_NOTIFYD_AVAILABLE 1
|
||||
|
|
|
@ -1,12 +1,13 @@
|
|||
#ifndef FISH_ENV_UNIVERSAL_COMMON_H
|
||||
#define FISH_ENV_UNIVERSAL_COMMON_H
|
||||
|
||||
#include <wchar.h>
|
||||
#include <queue>
|
||||
#include <string>
|
||||
#include <set>
|
||||
#include <pthread.h>
|
||||
#include <stdio.h>
|
||||
#include <vector>
|
||||
#include "common.h"
|
||||
#include "wutil.h"
|
||||
#include "util.h"
|
||||
#include "env.h"
|
||||
|
||||
/**
|
||||
|
@ -24,8 +25,6 @@ typedef enum
|
|||
*/
|
||||
#define ENV_UNIVERSAL_BUFFER_SIZE 1024
|
||||
|
||||
typedef std::vector<struct callback_data_t> callback_data_list_t;
|
||||
|
||||
/**
|
||||
Callback data, reflecting a change in universal variables
|
||||
*/
|
||||
|
@ -40,6 +39,8 @@ struct callback_data_t
|
|||
}
|
||||
};
|
||||
|
||||
typedef std::vector<struct callback_data_t> callback_data_list_t;
|
||||
|
||||
/** Class representing universal variables */
|
||||
class env_universal_t
|
||||
{
|
||||
|
|
19
event.cpp
19
event.cpp
|
@ -3,28 +3,23 @@
|
|||
Functions for handling event triggers
|
||||
|
||||
*/
|
||||
#include "config.h"
|
||||
#include "config.h" // IWYU pragma: keep
|
||||
|
||||
#include <stdlib.h>
|
||||
#include <stdio.h>
|
||||
#include <wchar.h>
|
||||
#include <unistd.h>
|
||||
#include <termios.h>
|
||||
#include <signal.h>
|
||||
#include <string.h>
|
||||
#include <algorithm>
|
||||
#include <assert.h>
|
||||
#include <stddef.h>
|
||||
#include <string>
|
||||
|
||||
#include "fallback.h"
|
||||
#include "util.h"
|
||||
|
||||
#include "wutil.h"
|
||||
#include "function.h"
|
||||
#include "fallback.h" // IWYU pragma: keep
|
||||
#include "wutil.h" // IWYU pragma: keep - needed for gettext
|
||||
#include "input_common.h"
|
||||
#include "proc.h"
|
||||
#include "parser.h"
|
||||
#include "common.h"
|
||||
#include "event.h"
|
||||
#include "signal.h"
|
||||
#include "io.h"
|
||||
|
||||
|
||||
/**
|
||||
|
|
3
event.h
3
event.h
|
@ -12,7 +12,8 @@
|
|||
#ifndef FISH_EVENT_H
|
||||
#define FISH_EVENT_H
|
||||
|
||||
#include <memory>
|
||||
#include <ctime>
|
||||
#include <vector>
|
||||
|
||||
#include "common.h"
|
||||
|
||||
|
|
27
exec.cpp
27
exec.cpp
|
@ -5,37 +5,32 @@
|
|||
manual, though the changes performed have been massive.
|
||||
*/
|
||||
|
||||
#include "config.h"
|
||||
#include "config.h" // IWYU pragma: keep
|
||||
|
||||
#include <stdlib.h>
|
||||
#include <stdio.h>
|
||||
#include <sys/types.h>
|
||||
#include <sys/stat.h>
|
||||
#include <termios.h>
|
||||
#include <unistd.h>
|
||||
#include <fcntl.h>
|
||||
#include <errno.h>
|
||||
#include <wchar.h>
|
||||
#include <string.h>
|
||||
#include <limits.h>
|
||||
#include <signal.h>
|
||||
#include <sys/wait.h>
|
||||
#include <assert.h>
|
||||
#include <dirent.h>
|
||||
#include <time.h>
|
||||
#include <vector>
|
||||
#include <algorithm>
|
||||
#include <memory>
|
||||
#include <spawn.h>
|
||||
#include <wctype.h>
|
||||
#include <map>
|
||||
#include <string>
|
||||
#include <memory> // IWYU pragma: keep - suggests <tr1/memory> instead
|
||||
#include <utility>
|
||||
|
||||
#ifdef HAVE_SIGINFO_H
|
||||
#include <siginfo.h>
|
||||
#endif
|
||||
|
||||
#include "fallback.h"
|
||||
#include "util.h"
|
||||
#include "iothread.h"
|
||||
#include "fallback.h" // IWYU pragma: keep
|
||||
#include "postfork.h"
|
||||
|
||||
#include "common.h"
|
||||
#include "wutil.h"
|
||||
#include "proc.h"
|
||||
|
@ -44,12 +39,10 @@
|
|||
#include "builtin.h"
|
||||
#include "function.h"
|
||||
#include "env.h"
|
||||
#include "wildcard.h"
|
||||
#include "sanity.h"
|
||||
#include "expand.h"
|
||||
#include "signal.h"
|
||||
|
||||
#include "parse_util.h"
|
||||
#include "io.h"
|
||||
#include "parse_tree.h"
|
||||
|
||||
/**
|
||||
file descriptor redirection error message
|
||||
|
|
5
exec.h
5
exec.h
|
@ -8,11 +8,9 @@
|
|||
*/
|
||||
#define FISH_EXEC_H
|
||||
|
||||
#include <wchar.h>
|
||||
#include <stddef.h>
|
||||
#include <vector>
|
||||
|
||||
#include "proc.h"
|
||||
#include "util.h"
|
||||
#include "common.h"
|
||||
|
||||
/**
|
||||
|
@ -41,6 +39,7 @@
|
|||
|
||||
|
||||
*/
|
||||
class job_t;
|
||||
class parser_t;
|
||||
void exec_job(parser_t &parser, job_t *j);
|
||||
|
||||
|
|
16
expand.cpp
16
expand.cpp
|
@ -5,27 +5,20 @@ parameter expansion.
|
|||
|
||||
*/
|
||||
|
||||
#include "config.h"
|
||||
#include "config.h" // IWYU pragma: keep
|
||||
|
||||
#include <stdlib.h>
|
||||
#include <stdio.h>
|
||||
#include <stdarg.h>
|
||||
#include <stddef.h>
|
||||
#include <wchar.h>
|
||||
#include <string.h>
|
||||
#include <wctype.h>
|
||||
#include <errno.h>
|
||||
#include <pwd.h>
|
||||
#include <unistd.h>
|
||||
#include <limits.h>
|
||||
#include <sys/param.h>
|
||||
#include <sys/types.h>
|
||||
#ifdef HAVE_SYS_SYSCTL_H
|
||||
#include <sys/sysctl.h>
|
||||
#endif
|
||||
#include <termios.h>
|
||||
#include <dirent.h>
|
||||
#include <sys/stat.h>
|
||||
#include <unistd.h>
|
||||
#include <signal.h>
|
||||
#include <algorithm>
|
||||
|
||||
#include <assert.h>
|
||||
|
@ -35,7 +28,7 @@ parameter expansion.
|
|||
#include <procfs.h>
|
||||
#endif
|
||||
|
||||
#include "fallback.h"
|
||||
#include "fallback.h" // IWYU pragma: keep
|
||||
#include "util.h"
|
||||
|
||||
#include "common.h"
|
||||
|
@ -46,7 +39,6 @@ parameter expansion.
|
|||
#include "expand.h"
|
||||
#include "wildcard.h"
|
||||
#include "exec.h"
|
||||
#include "signal.h"
|
||||
#include "tokenizer.h"
|
||||
#include "complete.h"
|
||||
#include "iothread.h"
|
||||
|
|
10
expand.h
10
expand.h
|
@ -15,12 +15,14 @@
|
|||
*/
|
||||
#define FISH_EXPAND_H
|
||||
|
||||
#include <wchar.h>
|
||||
#include "config.h" // for __warn_unused
|
||||
|
||||
#include <wchar.h>
|
||||
#include <string> // for string
|
||||
#include <vector> // for vector
|
||||
|
||||
#include "util.h"
|
||||
#include "common.h"
|
||||
#include "parse_constants.h"
|
||||
#include <list>
|
||||
|
||||
enum
|
||||
{
|
||||
|
@ -134,8 +136,6 @@ enum
|
|||
*/
|
||||
#define ARRAY_BOUNDS_ERR _(L"Array index out of bounds")
|
||||
|
||||
class parser_t;
|
||||
|
||||
/**
|
||||
Perform various forms of expansion on in, such as tilde expansion
|
||||
(\~USER becomes the users home directory), variable expansion
|
||||
|
|
22
fish.cpp
22
fish.cpp
|
@ -22,20 +22,21 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA
|
|||
|
||||
#include "config.h"
|
||||
|
||||
|
||||
#include <limits.h>
|
||||
#include <stddef.h>
|
||||
#include <stdint.h>
|
||||
#include <sys/stat.h>
|
||||
#include <string>
|
||||
#include <vector>
|
||||
#include <stdlib.h>
|
||||
#include <stdio.h>
|
||||
#include <wchar.h>
|
||||
#include <string.h>
|
||||
#include <unistd.h>
|
||||
#include <errno.h>
|
||||
#include <unistd.h>
|
||||
#include <termios.h>
|
||||
#include <fcntl.h>
|
||||
#include <sys/param.h>
|
||||
#include <sys/socket.h>
|
||||
#include <sys/socket.h> // IWYU pragma: keep - suggests internal header
|
||||
#include <sys/un.h>
|
||||
#include <sys/types.h>
|
||||
#include <pwd.h>
|
||||
|
||||
#ifdef HAVE_GETOPT_H
|
||||
|
@ -43,29 +44,24 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA
|
|||
#endif
|
||||
|
||||
#include <locale.h>
|
||||
#include <signal.h>
|
||||
|
||||
#include "fallback.h"
|
||||
#include "util.h"
|
||||
#include "fallback.h" // IWYU pragma: keep
|
||||
|
||||
#include "common.h"
|
||||
#include "reader.h"
|
||||
#include "builtin.h"
|
||||
#include "function.h"
|
||||
#include "complete.h"
|
||||
#include "wutil.h"
|
||||
#include "env.h"
|
||||
#include "sanity.h"
|
||||
#include "proc.h"
|
||||
#include "parser.h"
|
||||
#include "expand.h"
|
||||
#include "intern.h"
|
||||
#include "exec.h"
|
||||
#include "event.h"
|
||||
#include "output.h"
|
||||
#include "history.h"
|
||||
#include "path.h"
|
||||
#include "input.h"
|
||||
#include "io.h"
|
||||
#include "fish_version.h"
|
||||
|
||||
/* PATH_MAX may not exist */
|
||||
|
|
|
@ -25,15 +25,20 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA
|
|||
#include <stdio.h>
|
||||
#include <wchar.h>
|
||||
#include <vector>
|
||||
#include <map>
|
||||
#ifdef HAVE_GETOPT_H
|
||||
#include <getopt.h>
|
||||
#endif
|
||||
#include <assert.h>
|
||||
#include <locale.h>
|
||||
#include <stddef.h>
|
||||
#include <string>
|
||||
|
||||
#include "color.h"
|
||||
#include "highlight.h"
|
||||
#include "parse_constants.h"
|
||||
#include "wutil.h"
|
||||
#include "common.h"
|
||||
#include "output.h"
|
||||
#include "screen.h"
|
||||
#include "env.h"
|
||||
#include "input.h"
|
||||
#include "parse_tree.h"
|
||||
|
|
21
function.cpp
21
function.cpp
|
@ -7,35 +7,28 @@
|
|||
handling library.
|
||||
*/
|
||||
|
||||
#include "config.h"
|
||||
#include "config.h" // IWYU pragma: keep
|
||||
|
||||
#include <stdlib.h>
|
||||
#include <stdio.h>
|
||||
#include <string.h>
|
||||
#include <wchar.h>
|
||||
#include <unistd.h>
|
||||
#include <termios.h>
|
||||
#include <signal.h>
|
||||
#include <pthread.h>
|
||||
#include <errno.h>
|
||||
#include <map>
|
||||
#include <set>
|
||||
#include <dirent.h>
|
||||
#include <stddef.h>
|
||||
#include <string>
|
||||
#include <utility>
|
||||
|
||||
#include "wutil.h"
|
||||
#include "fallback.h"
|
||||
#include "util.h"
|
||||
#include "fallback.h" // IWYU pragma: keep
|
||||
|
||||
#include "autoload.h"
|
||||
#include "function.h"
|
||||
#include "proc.h"
|
||||
#include "parser.h"
|
||||
#include "common.h"
|
||||
#include "intern.h"
|
||||
#include "event.h"
|
||||
#include "reader.h"
|
||||
#include "parse_util.h"
|
||||
#include "parser_keywords.h"
|
||||
#include "env.h"
|
||||
#include "expand.h"
|
||||
|
||||
/**
|
||||
Table containing all functions
|
||||
|
|
|
@ -10,16 +10,14 @@
|
|||
#ifndef FISH_FUNCTION_H
|
||||
#define FISH_FUNCTION_H
|
||||
|
||||
#include <wchar.h>
|
||||
#include <vector>
|
||||
#include <map>
|
||||
|
||||
#include "util.h"
|
||||
#include "common.h"
|
||||
#include "event.h"
|
||||
#include "env.h"
|
||||
|
||||
class parser_t;
|
||||
class env_vars_snapshot_t;
|
||||
|
||||
/**
|
||||
Structure describing a function. This is used by the parser to
|
||||
|
|
|
@ -1,36 +1,31 @@
|
|||
/** \file highlight.c
|
||||
Functions for syntax highlighting
|
||||
*/
|
||||
#include "config.h"
|
||||
|
||||
#include <stdlib.h>
|
||||
#include <stdio.h>
|
||||
#include "config.h" // IWYU pragma: keep
|
||||
|
||||
#include <sys/stat.h>
|
||||
#include <unistd.h>
|
||||
#include <errno.h>
|
||||
#include <wchar.h>
|
||||
#include <wctype.h>
|
||||
#include <termios.h>
|
||||
#include <signal.h>
|
||||
#include <algorithm>
|
||||
#include <dirent.h>
|
||||
#include <map>
|
||||
#include <set>
|
||||
#include <string>
|
||||
|
||||
#include "fallback.h"
|
||||
#include "util.h"
|
||||
|
||||
#include "wutil.h"
|
||||
#include "highlight.h"
|
||||
#include "tokenizer.h"
|
||||
#include "proc.h"
|
||||
#include "parser.h"
|
||||
#include "parse_util.h"
|
||||
#include "parser_keywords.h"
|
||||
#include "parse_constants.h"
|
||||
#include "builtin.h"
|
||||
#include "function.h"
|
||||
#include "env.h"
|
||||
#include "expand.h"
|
||||
#include "sanity.h"
|
||||
#include "common.h"
|
||||
#include "complete.h"
|
||||
#include "output.h"
|
||||
#include "wildcard.h"
|
||||
#include "path.h"
|
||||
|
|
|
@ -5,10 +5,13 @@
|
|||
#ifndef FISH_HIGHLIGHT_H
|
||||
#define FISH_HIGHLIGHT_H
|
||||
|
||||
#include <wchar.h>
|
||||
#include <assert.h> // for assert
|
||||
#include <stddef.h> // for size_t
|
||||
#include <stdint.h> // for uint32_t
|
||||
#include <vector> // for vector
|
||||
|
||||
#include "common.h" // for wcstring, wcstring_list_t
|
||||
#include "env.h"
|
||||
#include "util.h"
|
||||
#include "color.h"
|
||||
|
||||
/* Internally, we specify highlight colors using a set of bits. Each highlight_spec is a 32 bit uint. We divide this into low 16 (foreground) and high 16 (background). Each half we further subdivide into low 8 (primary) and high 8 (modifiers). The primary is not a bitmask; specify exactly one. The modifiers are a bitmask; specify any number */
|
||||
|
|
15
history.cpp
15
history.cpp
|
@ -7,8 +7,6 @@
|
|||
#include <stdio.h>
|
||||
#include <wchar.h>
|
||||
#include <errno.h>
|
||||
#include <dirent.h>
|
||||
#include <sys/types.h>
|
||||
#include <sys/stat.h>
|
||||
#include <unistd.h>
|
||||
#include <sys/mman.h>
|
||||
|
@ -16,22 +14,23 @@
|
|||
#include <string.h>
|
||||
#include <time.h>
|
||||
#include <assert.h>
|
||||
#include <ctype.h>
|
||||
#include <wctype.h>
|
||||
#include <iterator>
|
||||
|
||||
#include "fallback.h"
|
||||
#include "util.h"
|
||||
#include "fallback.h" // IWYU pragma: keep
|
||||
#include "sanity.h"
|
||||
#include "tokenizer.h"
|
||||
#include "reader.h"
|
||||
#include "parse_tree.h"
|
||||
|
||||
#include "wutil.h"
|
||||
#include "history.h"
|
||||
#include "common.h"
|
||||
#include "intern.h"
|
||||
#include "path.h"
|
||||
#include "signal.h"
|
||||
#include "autoload.h"
|
||||
#include "iothread.h"
|
||||
#include "env.h"
|
||||
#include "lru.h"
|
||||
#include "parse_constants.h"
|
||||
#include <map>
|
||||
#include <algorithm>
|
||||
|
||||
|
|
|
@ -5,15 +5,18 @@
|
|||
#ifndef FISH_HISTORY_H
|
||||
#define FISH_HISTORY_H
|
||||
|
||||
#include <wchar.h>
|
||||
#include "common.h"
|
||||
#include "pthread.h"
|
||||
#include "wutil.h"
|
||||
#include <deque>
|
||||
#include <vector>
|
||||
#include <utility>
|
||||
#include <list>
|
||||
#include <set>
|
||||
#include <pthread.h>
|
||||
#include <stddef.h>
|
||||
#include <stdint.h>
|
||||
#include <stdio.h>
|
||||
#include <time.h>
|
||||
#include <string>
|
||||
|
||||
/* fish supports multiple shells writing to history at once. Here is its strategy:
|
||||
|
||||
|
|
28
input.cpp
28
input.cpp
|
@ -6,19 +6,8 @@
|
|||
|
||||
#include "config.h"
|
||||
|
||||
#include <stdlib.h>
|
||||
#include <stdio.h>
|
||||
#include <assert.h>
|
||||
#include <string.h>
|
||||
#include <errno.h>
|
||||
#include <termios.h>
|
||||
#include <sys/types.h>
|
||||
#include <sys/stat.h>
|
||||
|
||||
#ifdef HAVE_SYS_IOCTL_H
|
||||
#include <sys/ioctl.h>
|
||||
#endif
|
||||
|
||||
#include <unistd.h>
|
||||
#include <wchar.h>
|
||||
|
||||
|
@ -36,30 +25,21 @@
|
|||
#include <ncurses/term.h>
|
||||
#endif
|
||||
|
||||
#include <signal.h>
|
||||
#include <dirent.h>
|
||||
#include <wctype.h>
|
||||
|
||||
|
||||
|
||||
#include "fallback.h"
|
||||
#include "util.h"
|
||||
|
||||
#include "wutil.h"
|
||||
#include "fallback.h" // IWYU pragma: keep
|
||||
#include "wutil.h" // IWYU pragma: keep - needed for wgettext
|
||||
#include "reader.h"
|
||||
#include "proc.h"
|
||||
#include "common.h"
|
||||
#include "sanity.h"
|
||||
#include "input_common.h"
|
||||
#include "input.h"
|
||||
#include "parser.h"
|
||||
#include "env.h"
|
||||
#include "expand.h"
|
||||
#include "event.h"
|
||||
#include "signal.h"
|
||||
|
||||
#include "signal.h" // IWYU pragma: keep - needed for CHECK_BLOCK
|
||||
#include "io.h"
|
||||
#include "output.h"
|
||||
#include "intern.h"
|
||||
#include <vector>
|
||||
#include <algorithm>
|
||||
|
||||
|
|
8
input.h
8
input.h
|
@ -8,8 +8,12 @@ inputrc information for key bindings.
|
|||
#ifndef FISH_INPUT_H
|
||||
#define FISH_INPUT_H
|
||||
|
||||
#include <wchar.h>
|
||||
#include <utility>
|
||||
#include <stddef.h>
|
||||
#include <string>
|
||||
#include <vector>
|
||||
|
||||
#include "common.h"
|
||||
#include "env.h"
|
||||
#include "input_common.h"
|
||||
|
||||
|
||||
|
|
|
@ -6,28 +6,26 @@ Implementation file for the low level input library
|
|||
#include "config.h"
|
||||
|
||||
|
||||
#include <stdlib.h>
|
||||
#include <stdio.h>
|
||||
#include <string.h>
|
||||
#include <errno.h>
|
||||
#include <sys/time.h>
|
||||
#include <sys/types.h>
|
||||
#include <unistd.h>
|
||||
#include <wchar.h>
|
||||
#include <stack>
|
||||
#include <list>
|
||||
#include <queue>
|
||||
#include <cwchar> // for wint_t
|
||||
#include <deque> // for deque
|
||||
#include <utility> // for swap, pair
|
||||
#ifdef HAVE_SYS_SELECT_H
|
||||
#include <sys/select.h>
|
||||
#endif
|
||||
|
||||
#include "fallback.h"
|
||||
#include "fallback.h" // IWYU pragma: keep
|
||||
#include "util.h"
|
||||
|
||||
#include "common.h"
|
||||
#include "wutil.h"
|
||||
#include "input_common.h"
|
||||
#include "env_universal_common.h"
|
||||
#include "env.h"
|
||||
#include "iothread.h"
|
||||
|
||||
/**
|
||||
|
|
|
@ -6,7 +6,7 @@ Header file for the low level input library
|
|||
#ifndef INPUT_COMMON_H
|
||||
#define INPUT_COMMON_H
|
||||
|
||||
#include <wchar.h>
|
||||
#include <stddef.h>
|
||||
|
||||
/**
|
||||
Use unencoded private-use keycodes for internal characters
|
||||
|
|
14
intern.cpp
14
intern.cpp
|
@ -3,20 +3,14 @@
|
|||
Library for pooling common strings
|
||||
|
||||
*/
|
||||
#include "config.h"
|
||||
#include "config.h" // IWYU pragma: keep
|
||||
|
||||
|
||||
#include <stdlib.h>
|
||||
#include <stdio.h>
|
||||
#include <wchar.h>
|
||||
#include <unistd.h>
|
||||
#include <set>
|
||||
#include <pthread.h>
|
||||
#include <vector>
|
||||
#include <algorithm>
|
||||
|
||||
#include "fallback.h"
|
||||
#include "util.h"
|
||||
|
||||
#include "wutil.h"
|
||||
#include "fallback.h" // IWYU pragma: keep
|
||||
#include "common.h"
|
||||
#include "intern.h"
|
||||
|
||||
|
|
2
intern.h
2
intern.h
|
@ -7,8 +7,6 @@
|
|||
#ifndef FISH_INTERN_H
|
||||
#define FISH_INTERN_H
|
||||
|
||||
#include <wchar.h>
|
||||
|
||||
/**
|
||||
Return an identical copy of the specified string from a pool of unique strings. If the string was not in the pool, add a copy.
|
||||
|
||||
|
|
33
io.cpp
33
io.cpp
|
@ -3,42 +3,15 @@
|
|||
Utilities for io redirection.
|
||||
|
||||
*/
|
||||
#include "config.h"
|
||||
#include "config.h" // IWYU pragma: keep
|
||||
|
||||
|
||||
#include <stdlib.h>
|
||||
#include <stdio.h>
|
||||
#include <wchar.h>
|
||||
#include <string.h>
|
||||
#include <errno.h>
|
||||
#include <sys/types.h>
|
||||
#include <set>
|
||||
#include <algorithm>
|
||||
|
||||
#ifdef HAVE_SYS_IOCTL_H
|
||||
#include <sys/ioctl.h>
|
||||
#endif
|
||||
|
||||
#include <assert.h>
|
||||
#include <unistd.h>
|
||||
#include <fcntl.h>
|
||||
|
||||
#if HAVE_NCURSES_H
|
||||
#include <ncurses.h>
|
||||
#elif HAVE_NCURSES_CURSES_H
|
||||
#include <ncurses/curses.h>
|
||||
#else
|
||||
#include <curses.h>
|
||||
#endif
|
||||
|
||||
#if HAVE_TERM_H
|
||||
#include <term.h>
|
||||
#elif HAVE_NCURSES_TERM_H
|
||||
#include <ncurses/term.h>
|
||||
#endif
|
||||
|
||||
#include "fallback.h"
|
||||
#include "util.h"
|
||||
|
||||
#include "fallback.h" // IWYU pragma: keep
|
||||
#include "wutil.h"
|
||||
#include "exec.h"
|
||||
#include "common.h"
|
||||
|
|
4
io.h
4
io.h
|
@ -2,6 +2,8 @@
|
|||
#define FISH_IO_H
|
||||
|
||||
#include <vector>
|
||||
#include <stddef.h>
|
||||
#include <stdlib.h>
|
||||
|
||||
// Note that we have to include something to get any _LIBCPP_VERSION defined so we can detect libc++
|
||||
// So it's key that vector go above. If we didn't need vector for other reasons, we might include ciso646, which does nothing
|
||||
|
@ -16,6 +18,8 @@ using std::shared_ptr;
|
|||
using std::tr1::shared_ptr;
|
||||
#endif
|
||||
|
||||
#include "common.h"
|
||||
|
||||
/**
|
||||
Describes what type of IO operation an io_data_t represents
|
||||
*/
|
||||
|
|
|
@ -1,16 +1,17 @@
|
|||
#include "config.h"
|
||||
#include "config.h" // IWYU pragma: keep
|
||||
#include "iothread.h"
|
||||
#include "common.h"
|
||||
#include <pthread.h>
|
||||
#include <assert.h>
|
||||
#include <errno.h>
|
||||
#include <stdio.h>
|
||||
#include <string.h>
|
||||
#include <stdlib.h>
|
||||
#include <limits.h> // IWYU pragma: keep - for _POSIX_THREADS_MAX, suggests internal header
|
||||
#include <sys/select.h>
|
||||
#include <sys/time.h>
|
||||
#include <unistd.h>
|
||||
#include <signal.h>
|
||||
#include <fcntl.h>
|
||||
#include <queue>
|
||||
#include <algorithm>
|
||||
|
||||
#ifdef _POSIX_THREAD_THREADS_MAX
|
||||
#if _POSIX_THREAD_THREADS_MAX < 64
|
||||
|
|
21
kill.cpp
21
kill.cpp
|
@ -6,26 +6,15 @@
|
|||
with the X clipboard.
|
||||
*/
|
||||
|
||||
#include "config.h"
|
||||
#include "config.h" // IWYU pragma: keep
|
||||
|
||||
#include <stdlib.h>
|
||||
#include <stdio.h>
|
||||
#include <wchar.h>
|
||||
#include <termios.h>
|
||||
#include <unistd.h>
|
||||
#include <signal.h>
|
||||
#include <sys/types.h>
|
||||
#include <sys/stat.h>
|
||||
#include <dirent.h>
|
||||
#include <stddef.h>
|
||||
#include <algorithm>
|
||||
#include <list>
|
||||
#include <string>
|
||||
|
||||
#include "fallback.h"
|
||||
#include "util.h"
|
||||
|
||||
#include "wutil.h"
|
||||
#include "fallback.h" // IWYU pragma: keep
|
||||
#include "kill.h"
|
||||
#include "proc.h"
|
||||
#include "sanity.h"
|
||||
#include "common.h"
|
||||
#include "env.h"
|
||||
#include "exec.h"
|
||||
|
|
2
kill.h
2
kill.h
|
@ -7,7 +7,7 @@
|
|||
#ifndef FISH_KILL_H
|
||||
#define FISH_KILL_H
|
||||
|
||||
#include <wchar.h>
|
||||
#include "common.h"
|
||||
|
||||
/**
|
||||
Replace the specified string in the killring
|
||||
|
|
1
lru.h
1
lru.h
|
@ -6,6 +6,7 @@
|
|||
#ifndef FISH_LRU_H
|
||||
#define FISH_LRU_H
|
||||
|
||||
#include <assert.h>
|
||||
#include <wchar.h>
|
||||
#include <map>
|
||||
#include <set>
|
||||
|
|
26
output.cpp
26
output.cpp
|
@ -7,18 +7,6 @@
|
|||
#include <stdlib.h>
|
||||
#include <stdio.h>
|
||||
#include <string.h>
|
||||
#include <errno.h>
|
||||
#include <termios.h>
|
||||
#include <sys/types.h>
|
||||
#include <sys/stat.h>
|
||||
|
||||
#ifdef HAVE_SYS_IOCTL_H
|
||||
#include <sys/ioctl.h>
|
||||
#endif
|
||||
|
||||
#include <sys/time.h>
|
||||
#include <unistd.h>
|
||||
#include <wctype.h>
|
||||
|
||||
#if HAVE_NCURSES_H
|
||||
#include <ncurses.h>
|
||||
|
@ -34,22 +22,14 @@
|
|||
#include <ncurses/term.h>
|
||||
#endif
|
||||
|
||||
#include <signal.h>
|
||||
#include <fcntl.h>
|
||||
#include <dirent.h>
|
||||
#include <time.h>
|
||||
#include <wchar.h>
|
||||
|
||||
#include <limits.h>
|
||||
#include <string>
|
||||
|
||||
#include "fallback.h"
|
||||
#include "util.h"
|
||||
|
||||
#include "wutil.h"
|
||||
#include "expand.h"
|
||||
#include "wutil.h" // IWYU pragma: keep - needed for wgettext
|
||||
#include "common.h"
|
||||
#include "output.h"
|
||||
#include "highlight.h"
|
||||
#include "env.h"
|
||||
|
||||
/**
|
||||
Number of color names in the col array
|
||||
|
|
5
output.h
5
output.h
|
@ -8,9 +8,10 @@
|
|||
#ifndef FISH_OUTPUT_H
|
||||
#define FISH_OUTPUT_H
|
||||
|
||||
#include <wchar.h>
|
||||
#include <stddef.h>
|
||||
#include <vector>
|
||||
#include "common.h"
|
||||
#include "fallback.h"
|
||||
#include "screen.h"
|
||||
#include "color.h"
|
||||
|
||||
/**
|
||||
|
|
13
pager.cpp
13
pager.cpp
|
@ -1,11 +1,14 @@
|
|||
#include "config.h"
|
||||
#include "config.h" // IWYU pragma: keep
|
||||
|
||||
#include "pager.h"
|
||||
#include "highlight.h"
|
||||
#include "input_common.h"
|
||||
#include "wutil.h"
|
||||
#include <assert.h>
|
||||
#include <wchar.h>
|
||||
#include <wctype.h>
|
||||
#include <vector>
|
||||
#include <map>
|
||||
#include "util.h"
|
||||
#include "wutil.h" // IWYU pragma: keep - needed for wgettext
|
||||
#include "pager.h"
|
||||
#include "highlight.h"
|
||||
|
||||
typedef pager_t::comp_t comp_t;
|
||||
typedef std::vector<completion_t> completion_list_t;
|
||||
|
|
4
pager.h
4
pager.h
|
@ -2,6 +2,10 @@
|
|||
Pager support
|
||||
*/
|
||||
|
||||
#include <stddef.h>
|
||||
#include <string>
|
||||
#include <vector>
|
||||
#include "common.h"
|
||||
#include "complete.h"
|
||||
#include "screen.h"
|
||||
#include "reader.h"
|
||||
|
|
|
@ -8,17 +8,33 @@
|
|||
*/
|
||||
|
||||
#include "parse_execution.h"
|
||||
#include <assert.h>
|
||||
#include <errno.h>
|
||||
#include <stdarg.h>
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
#include <termios.h>
|
||||
#include <unistd.h>
|
||||
#include <wchar.h>
|
||||
#include <wctype.h>
|
||||
#include <string>
|
||||
#include <memory> // IWYU pragma: keep - suggests <tr1/memory> instead
|
||||
#include <vector>
|
||||
#include "env.h"
|
||||
#include "event.h"
|
||||
#include "tokenizer.h"
|
||||
#include "util.h"
|
||||
#include "parse_util.h"
|
||||
#include "complete.h"
|
||||
#include "wildcard.h"
|
||||
#include "builtin.h"
|
||||
#include "parser.h"
|
||||
#include "expand.h"
|
||||
#include "reader.h"
|
||||
#include "wutil.h"
|
||||
#include "exec.h"
|
||||
#include "path.h"
|
||||
#include <algorithm>
|
||||
#include "function.h"
|
||||
#include "builtin.h"
|
||||
#include "exec.h"
|
||||
|
||||
/* These are the specific statement types that support redirections */
|
||||
static bool specific_statement_type_is_redirectable_block(const parse_node_t &node)
|
||||
|
|
|
@ -6,12 +6,14 @@
|
|||
#ifndef FISH_PARSE_EXECUTION_H
|
||||
#define FISH_PARSE_EXECUTION_H
|
||||
|
||||
#include "config.h"
|
||||
#include "util.h"
|
||||
#include <stddef.h>
|
||||
#include "common.h"
|
||||
#include "io.h"
|
||||
#include "parse_constants.h"
|
||||
#include "parse_tree.h"
|
||||
#include "proc.h"
|
||||
|
||||
class job_t;
|
||||
class parser_t;
|
||||
struct block_t;
|
||||
|
||||
enum parse_execution_result_t
|
||||
|
|
|
@ -1,4 +1,7 @@
|
|||
#include "parse_productions.h"
|
||||
#include <assert.h>
|
||||
#include <stdio.h>
|
||||
#include "parse_tree.h"
|
||||
|
||||
using namespace parse_productions;
|
||||
#define NO_PRODUCTION ((production_option_idx_t)(-1))
|
||||
|
|
|
@ -6,8 +6,11 @@
|
|||
#ifndef FISH_PARSE_TREE_CONSTRUCTION_H
|
||||
#define FISH_PARSE_TREE_CONSTRUCTION_H
|
||||
|
||||
#include "parse_tree.h"
|
||||
#include <inttypes.h>
|
||||
#include <stdint.h> // for uint8_t, uint32_t
|
||||
#include "common.h" // for wcstring
|
||||
#include "parse_constants.h" // for parse_token_type_t, etc
|
||||
|
||||
struct parse_token_t;
|
||||
|
||||
namespace parse_productions
|
||||
{
|
||||
|
|
|
@ -1,9 +1,18 @@
|
|||
#include <assert.h>
|
||||
#include <stdarg.h>
|
||||
#include <stddef.h>
|
||||
#include <stdint.h>
|
||||
#include <stdio.h>
|
||||
#include <wchar.h>
|
||||
#include <string>
|
||||
#include "common.h"
|
||||
#include "parse_constants.h"
|
||||
#include "parse_productions.h"
|
||||
#include "parse_tree.h"
|
||||
#include "tokenizer.h"
|
||||
#include "fallback.h"
|
||||
#include "wutil.h"
|
||||
#include "wutil.h" // IWYU pragma: keep - needed for wgettext
|
||||
#include "proc.h"
|
||||
#include "expand.h"
|
||||
#include <vector>
|
||||
#include <algorithm>
|
||||
|
||||
|
|
|
@ -6,17 +6,15 @@
|
|||
#ifndef FISH_PARSE_PRODUCTIONS_H
|
||||
#define FISH_PARSE_PRODUCTIONS_H
|
||||
|
||||
#include <wchar.h>
|
||||
#include <assert.h>
|
||||
#include <stddef.h>
|
||||
#include <stdint.h>
|
||||
|
||||
#include "config.h"
|
||||
#include "util.h"
|
||||
#include "common.h"
|
||||
#include "tokenizer.h"
|
||||
#include "parse_constants.h"
|
||||
#include <vector>
|
||||
#include <inttypes.h>
|
||||
|
||||
class parse_node_t;
|
||||
class parse_node_tree_t;
|
||||
|
||||
typedef uint32_t node_offset_t;
|
||||
|
|
|
@ -8,38 +8,24 @@
|
|||
parsing the code.
|
||||
*/
|
||||
|
||||
#include "config.h"
|
||||
|
||||
#include "config.h" // IWYU pragma: keep
|
||||
|
||||
#include <stdlib.h>
|
||||
#include <stdio.h>
|
||||
#include <sys/types.h>
|
||||
#include <unistd.h>
|
||||
#include <wctype.h>
|
||||
|
||||
#include <stdarg.h>
|
||||
#include <wchar.h>
|
||||
#include <map>
|
||||
#include <set>
|
||||
#include <algorithm>
|
||||
|
||||
#include <time.h>
|
||||
#include <string>
|
||||
#include <assert.h>
|
||||
|
||||
#include "fallback.h"
|
||||
#include "util.h"
|
||||
|
||||
#include "wutil.h"
|
||||
#include "wutil.h" // IWYU pragma: keep
|
||||
#include "common.h"
|
||||
#include "tokenizer.h"
|
||||
#include "parse_util.h"
|
||||
#include "expand.h"
|
||||
#include "intern.h"
|
||||
#include "exec.h"
|
||||
#include "env.h"
|
||||
#include "signal.h"
|
||||
#include "wildcard.h"
|
||||
#include "parse_tree.h"
|
||||
#include "parser.h"
|
||||
#include "builtin.h"
|
||||
|
||||
/** Error message for improper use of the exec builtin */
|
||||
|
|
10
parse_util.h
10
parse_util.h
|
@ -7,11 +7,10 @@
|
|||
#ifndef FISH_PARSE_UTIL_H
|
||||
#define FISH_PARSE_UTIL_H
|
||||
|
||||
#include "autoload.h"
|
||||
#include "parse_tree.h"
|
||||
#include <wchar.h>
|
||||
#include <map>
|
||||
#include <set>
|
||||
#include <stddef.h>
|
||||
#include <vector>
|
||||
#include "common.h"
|
||||
#include "parse_constants.h"
|
||||
|
||||
/**
|
||||
Find the beginning and end of the first subshell in the specified string.
|
||||
|
@ -186,6 +185,7 @@ parser_test_error_bits_t parse_util_detect_errors(const wcstring &buff_src, pars
|
|||
|
||||
This does NOT currently detect unterminated quotes.
|
||||
*/
|
||||
class parse_node_t;
|
||||
parser_test_error_bits_t parse_util_detect_errors_in_argument(const parse_node_t &node, const wcstring &arg_src, parse_error_list_t *out_errors = NULL);
|
||||
|
||||
/* Given a string containing a variable expansion error, append an appropriate error to the errors list. The global_token_pos is the offset of the token in the larger source, and the dollar_pos is the offset of the offending dollar sign within the token. */
|
||||
|
|
24
parser.cpp
24
parser.cpp
|
@ -4,44 +4,28 @@ The fish parser. Contains functions for parsing and evaluating code.
|
|||
|
||||
*/
|
||||
|
||||
#include "config.h"
|
||||
#include "config.h" // IWYU pragma: keep
|
||||
|
||||
#include <stdlib.h>
|
||||
#include <stdio.h>
|
||||
#include <wchar.h>
|
||||
#include <sys/types.h>
|
||||
#include <sys/stat.h>
|
||||
#include <unistd.h>
|
||||
#include <errno.h>
|
||||
#include <fcntl.h>
|
||||
#include <termios.h>
|
||||
#include <pwd.h>
|
||||
#include <dirent.h>
|
||||
#include <assert.h>
|
||||
#include <string>
|
||||
#include <algorithm>
|
||||
|
||||
#include "fallback.h"
|
||||
#include "util.h"
|
||||
|
||||
#include "common.h"
|
||||
#include "wutil.h"
|
||||
#include "proc.h"
|
||||
#include "parser.h"
|
||||
#include "parser_keywords.h"
|
||||
#include "tokenizer.h"
|
||||
#include "exec.h"
|
||||
#include "wildcard.h"
|
||||
#include "function.h"
|
||||
#include "builtin.h"
|
||||
#include "env.h"
|
||||
#include "expand.h"
|
||||
#include "reader.h"
|
||||
#include "sanity.h"
|
||||
#include "event.h"
|
||||
#include "intern.h"
|
||||
#include "signal.h" // IWYU pragma: keep - needed for CHECK_BLOCK
|
||||
#include "parse_util.h"
|
||||
#include "path.h"
|
||||
#include "signal.h"
|
||||
#include "complete.h"
|
||||
#include "parse_tree.h"
|
||||
#include "parse_execution.h"
|
||||
|
||||
|
|
11
parser.h
11
parser.h
|
@ -5,13 +5,16 @@
|
|||
#ifndef FISH_PARSER_H
|
||||
#define FISH_PARSER_H
|
||||
|
||||
#include <wchar.h>
|
||||
#include <stddef.h> // for size_t
|
||||
#include <list> // for _List_const_iterator, list, etc
|
||||
|
||||
#include "common.h"
|
||||
#include "proc.h"
|
||||
#include "util.h"
|
||||
#include "event.h"
|
||||
#include "function.h"
|
||||
#include "parse_tree.h"
|
||||
#include "io.h"
|
||||
#include "parse_constants.h"
|
||||
|
||||
#include <vector>
|
||||
|
||||
/**
|
||||
|
@ -226,8 +229,8 @@ struct profile_item_t
|
|||
wcstring cmd;
|
||||
};
|
||||
|
||||
struct tokenizer_t;
|
||||
class parse_execution_context_t;
|
||||
class completion_t;
|
||||
|
||||
class parser_t
|
||||
{
|
||||
|
|
|
@ -3,13 +3,9 @@
|
|||
Functions having to do with parser keywords, like testing if a function is a block command.
|
||||
*/
|
||||
|
||||
#include "config.h"
|
||||
#include "config.h" // IWYU pragma: keep
|
||||
|
||||
|
||||
#include <stdlib.h>
|
||||
#include <stdio.h>
|
||||
|
||||
#include "fallback.h"
|
||||
#include "fallback.h" // IWYU pragma: keep
|
||||
#include "common.h"
|
||||
#include "parser_keywords.h"
|
||||
|
||||
|
|
|
@ -6,6 +6,8 @@ Functions having to do with parser keywords, like testing if a function is a blo
|
|||
#ifndef FISH_PARSER_KEYWORD_H
|
||||
#define FISH_PARSER_KEYWORD_H
|
||||
|
||||
#include "common.h"
|
||||
|
||||
/**
|
||||
Tests if the specified commands parameters should be interpreted as another command, which will be true if the command is either 'command', 'exec', 'if', 'while', or 'builtin'. This does not handle "else if" which is more complicated.
|
||||
|
||||
|
|
13
path.cpp
13
path.cpp
|
@ -1,17 +1,14 @@
|
|||
#include "config.h"
|
||||
#include "config.h" // IWYU pragma: keep
|
||||
|
||||
#include <stdlib.h>
|
||||
#include <stdio.h>
|
||||
#include <wchar.h>
|
||||
#include <sys/types.h>
|
||||
#include <sys/stat.h>
|
||||
#include <unistd.h>
|
||||
#include <errno.h>
|
||||
#include <libgen.h>
|
||||
|
||||
#include "fallback.h"
|
||||
#include "util.h"
|
||||
#include <assert.h>
|
||||
#include <string>
|
||||
#include <vector>
|
||||
|
||||
#include "fallback.h" // IWYU pragma: keep
|
||||
#include "common.h"
|
||||
#include "env.h"
|
||||
#include "wutil.h"
|
||||
|
|
2
path.h
2
path.h
|
@ -9,6 +9,8 @@
|
|||
#ifndef FISH_PATH_H
|
||||
#define FISH_PATH_H
|
||||
|
||||
#include <stddef.h>
|
||||
#include "common.h"
|
||||
#include "env.h"
|
||||
|
||||
/**
|
||||
|
|
|
@ -4,6 +4,15 @@
|
|||
*/
|
||||
|
||||
#include <fcntl.h>
|
||||
#include <errno.h>
|
||||
#include <signal.h>
|
||||
#include <stdio.h>
|
||||
#include <string.h>
|
||||
#include <time.h>
|
||||
#include <memory> // IWYU pragma: keep - suggests <tr1/memory> instead
|
||||
#include "common.h"
|
||||
#include "proc.h"
|
||||
#include "wutil.h"
|
||||
#include "signal.h"
|
||||
#include "postfork.h"
|
||||
#include "iothread.h"
|
||||
|
|
11
postfork.h
11
postfork.h
|
@ -6,17 +6,10 @@
|
|||
#ifndef FISH_POSTFORK_H
|
||||
#define FISH_POSTFORK_H
|
||||
|
||||
#include <wchar.h>
|
||||
#include <signal.h>
|
||||
#include <stddef.h>
|
||||
#include <unistd.h>
|
||||
#include <sys/time.h>
|
||||
#include <list>
|
||||
|
||||
#include "config.h"
|
||||
#include "common.h"
|
||||
#include "util.h"
|
||||
#include "proc.h"
|
||||
#include "wutil.h"
|
||||
#include "io.h"
|
||||
|
||||
#if HAVE_SPAWN_H
|
||||
|
@ -40,6 +33,8 @@
|
|||
|
||||
Returns 0 on sucess, -1 on failiure.
|
||||
*/
|
||||
class job_t;
|
||||
class process_t;
|
||||
int set_child_group(job_t *j, process_t *p, int print_errors);
|
||||
|
||||
/**
|
||||
|
|
|
@ -6,6 +6,8 @@
|
|||
#include <stdlib.h>
|
||||
#include <stdio.h>
|
||||
#include <string.h>
|
||||
#include <stddef.h>
|
||||
#include <sys/types.h>
|
||||
|
||||
#include "print_help.h"
|
||||
|
||||
|
|
22
proc.cpp
22
proc.cpp
|
@ -18,27 +18,16 @@ Some of the code in this file is based on code from the Glibc manual.
|
|||
#include <string.h>
|
||||
#include <errno.h>
|
||||
#include <termios.h>
|
||||
#include <sys/types.h>
|
||||
#include <sys/stat.h>
|
||||
#include <pthread.h>
|
||||
#include <wctype.h>
|
||||
#include <algorithm>
|
||||
|
||||
#ifdef HAVE_SYS_IOCTL_H
|
||||
#include <sys/ioctl.h>
|
||||
#endif
|
||||
#include <memory> // IWYU pragma: keep - suggests <tr1/memory> instead
|
||||
#include <vector>
|
||||
|
||||
#include <unistd.h>
|
||||
#include <signal.h>
|
||||
#include <dirent.h>
|
||||
#include <sys/time.h>
|
||||
|
||||
#if HAVE_NCURSES_H
|
||||
#include <ncurses.h>
|
||||
#elif HAVE_NCURSES_CURSES_H
|
||||
#include <ncurses/curses.h>
|
||||
#else
|
||||
#include <curses.h>
|
||||
#endif
|
||||
|
||||
#if HAVE_TERM_H
|
||||
#include <term.h>
|
||||
#elif HAVE_NCURSES_TERM_H
|
||||
|
@ -53,7 +42,7 @@ Some of the code in this file is based on code from the Glibc manual.
|
|||
#include <sys/select.h>
|
||||
#endif
|
||||
|
||||
#include "fallback.h"
|
||||
#include "fallback.h" // IWYU pragma: keep
|
||||
#include "util.h"
|
||||
|
||||
#include "wutil.h"
|
||||
|
@ -61,7 +50,6 @@ Some of the code in this file is based on code from the Glibc manual.
|
|||
#include "common.h"
|
||||
#include "reader.h"
|
||||
#include "sanity.h"
|
||||
#include "env.h"
|
||||
#include "parser.h"
|
||||
#include "signal.h"
|
||||
#include "event.h"
|
||||
|
|
8
proc.h
8
proc.h
|
@ -11,13 +11,14 @@
|
|||
#ifndef FISH_PROC_H
|
||||
#define FISH_PROC_H
|
||||
|
||||
#include <wchar.h>
|
||||
#include <signal.h>
|
||||
#include <unistd.h>
|
||||
#include <sys/time.h>
|
||||
#include <list>
|
||||
#include <assert.h> // for assert
|
||||
#include <stddef.h> // for size_t
|
||||
#include <termios.h> // for pid_t, termios
|
||||
|
||||
#include "util.h"
|
||||
#include "config.h" // for HAVE__PROC_SELF_STAT
|
||||
#include "io.h"
|
||||
#include "common.h"
|
||||
#include "parse_tree.h"
|
||||
|
@ -268,7 +269,6 @@ void release_job_id(job_id_t jobid);
|
|||
A struct represeting a job. A job is basically a pipeline of one
|
||||
or more processes and a couple of flags.
|
||||
*/
|
||||
class parser_t;
|
||||
class job_t
|
||||
{
|
||||
/**
|
||||
|
|
30
reader.cpp
30
reader.cpp
|
@ -24,39 +24,17 @@ commence.
|
|||
|
||||
#include <stdlib.h>
|
||||
#include <stdio.h>
|
||||
#include <stdint.h>
|
||||
#include <string.h>
|
||||
#include <errno.h>
|
||||
#include <termios.h>
|
||||
#include <sys/types.h>
|
||||
#include <sys/stat.h>
|
||||
|
||||
#ifdef HAVE_SYS_IOCTL_H
|
||||
#include <sys/ioctl.h>
|
||||
#endif
|
||||
|
||||
#include <time.h>
|
||||
#include <sys/time.h>
|
||||
#include <sys/wait.h>
|
||||
#include <sys/poll.h>
|
||||
#include <unistd.h>
|
||||
#include <wctype.h>
|
||||
#include <stack>
|
||||
#include <pthread.h>
|
||||
|
||||
#if HAVE_NCURSES_H
|
||||
#include <ncurses.h>
|
||||
#elif HAVE_NCURSES_CURSES_H
|
||||
#include <ncurses/curses.h>
|
||||
#else
|
||||
#include <curses.h>
|
||||
#endif
|
||||
|
||||
#if HAVE_TERM_H
|
||||
#include <term.h>
|
||||
#elif HAVE_NCURSES_TERM_H
|
||||
#include <ncurses/term.h>
|
||||
#endif
|
||||
|
||||
#ifdef HAVE_SIGINFO_H
|
||||
#include <siginfo.h>
|
||||
#endif
|
||||
|
@ -67,9 +45,7 @@ commence.
|
|||
|
||||
#include <signal.h>
|
||||
#include <fcntl.h>
|
||||
#include <dirent.h>
|
||||
#include <wchar.h>
|
||||
|
||||
#include <assert.h>
|
||||
|
||||
|
||||
|
@ -98,11 +74,11 @@ commence.
|
|||
#include "screen.h"
|
||||
#include "iothread.h"
|
||||
#include "intern.h"
|
||||
#include "path.h"
|
||||
#include "parse_util.h"
|
||||
#include "parser_keywords.h"
|
||||
#include "parse_tree.h"
|
||||
#include "pager.h"
|
||||
#include "color.h"
|
||||
#include "event.h"
|
||||
|
||||
/**
|
||||
Maximum length of prefix string when printing completion
|
||||
|
|
6
reader.h
6
reader.h
|
@ -10,17 +10,15 @@
|
|||
#define FISH_READER_H
|
||||
|
||||
#include <vector>
|
||||
#include <wchar.h>
|
||||
#include <string>
|
||||
#include <stddef.h>
|
||||
|
||||
#include "util.h"
|
||||
#include "io.h"
|
||||
#include "common.h"
|
||||
#include "complete.h"
|
||||
#include "highlight.h"
|
||||
#include "parse_constants.h"
|
||||
|
||||
class parser_t;
|
||||
class completion_t;
|
||||
class history_t;
|
||||
|
||||
/* Helper class for storing a command line */
|
||||
|
|
17
sanity.cpp
17
sanity.cpp
|
@ -1,30 +1,17 @@
|
|||
/** \file sanity.c
|
||||
Functions for performing sanity checks on the program state
|
||||
*/
|
||||
#include "config.h"
|
||||
#include "config.h" // IWYU pragma: keep
|
||||
|
||||
#include <stdlib.h>
|
||||
#include <wchar.h>
|
||||
#include <stdio.h>
|
||||
#include <errno.h>
|
||||
#include <termios.h>
|
||||
#include <unistd.h>
|
||||
#include <signal.h>
|
||||
#include <sys/types.h>
|
||||
#include <sys/stat.h>
|
||||
#include <dirent.h>
|
||||
|
||||
|
||||
#include "fallback.h"
|
||||
#include "util.h"
|
||||
|
||||
#include "fallback.h" // IWYU pragma: keep
|
||||
#include "common.h"
|
||||
#include "sanity.h"
|
||||
#include "proc.h"
|
||||
#include "history.h"
|
||||
#include "reader.h"
|
||||
#include "kill.h"
|
||||
#include "wutil.h"
|
||||
|
||||
|
||||
/**
|
||||
|
|
2
sanity.h
2
sanity.h
|
@ -5,8 +5,6 @@
|
|||
#ifndef FISH_SANITY_H
|
||||
#define FISH_SANITY_H
|
||||
|
||||
#include <wchar.h>
|
||||
|
||||
/**
|
||||
Call this function to tell the program it is not in a sane state.
|
||||
*/
|
||||
|
|
|
@ -11,12 +11,8 @@ efficient way for transforming that to the desired screen content.
|
|||
#include <stdlib.h>
|
||||
#include <stdio.h>
|
||||
#include <string.h>
|
||||
#include <errno.h>
|
||||
#include <termios.h>
|
||||
#include <sys/types.h>
|
||||
|
||||
#include <unistd.h>
|
||||
#include <wctype.h>
|
||||
|
||||
#if HAVE_NCURSES_H
|
||||
#include <ncurses.h>
|
||||
|
@ -36,13 +32,14 @@ efficient way for transforming that to the desired screen content.
|
|||
#include <time.h>
|
||||
|
||||
#include <assert.h>
|
||||
#include <algorithm>
|
||||
#include <string>
|
||||
#include <vector>
|
||||
|
||||
|
||||
#include "fallback.h"
|
||||
#include "common.h"
|
||||
#include "util.h"
|
||||
#include "wutil.h"
|
||||
#include "output.h"
|
||||
#include "highlight.h"
|
||||
#include "screen.h"
|
||||
|
|
3
screen.h
3
screen.h
|
@ -12,8 +12,11 @@
|
|||
#ifndef FISH_SCREEN_H
|
||||
#define FISH_SCREEN_H
|
||||
|
||||
#include <assert.h>
|
||||
#include <stddef.h>
|
||||
#include <vector>
|
||||
#include <sys/stat.h>
|
||||
#include "common.h"
|
||||
#include "highlight.h"
|
||||
|
||||
class page_rendering_t;
|
||||
|
|
12
signal.cpp
12
signal.cpp
|
@ -4,15 +4,11 @@ The library for various signal related issues
|
|||
|
||||
*/
|
||||
|
||||
#include "config.h"
|
||||
#include "config.h" // IWYU pragma: keep
|
||||
|
||||
|
||||
#include <stdlib.h>
|
||||
#include <wchar.h>
|
||||
#include <stdio.h>
|
||||
#include <sys/types.h>
|
||||
#include <signal.h>
|
||||
#include <dirent.h>
|
||||
#include <unistd.h>
|
||||
#include <errno.h>
|
||||
|
||||
#ifdef HAVE_SIGINFO_H
|
||||
|
@ -20,9 +16,7 @@ The library for various signal related issues
|
|||
#endif
|
||||
|
||||
#include "common.h"
|
||||
#include "fallback.h"
|
||||
#include "util.h"
|
||||
|
||||
#include "fallback.h" // IWYU pragma: keep
|
||||
#include "wutil.h"
|
||||
#include "signal.h"
|
||||
#include "event.h"
|
||||
|
|
|
@ -6,22 +6,19 @@ tokenizing multiple strings and disposing of unused string
|
|||
segments.
|
||||
*/
|
||||
|
||||
#include "config.h"
|
||||
#include "config.h" // IWYU pragma: keep
|
||||
|
||||
#include <stdlib.h>
|
||||
#include <stdio.h>
|
||||
#include <wchar.h>
|
||||
#include <wctype.h>
|
||||
#include <string.h>
|
||||
#include <unistd.h>
|
||||
#include <fcntl.h>
|
||||
#include <assert.h>
|
||||
#include <string>
|
||||
|
||||
#include "fallback.h"
|
||||
#include "util.h"
|
||||
|
||||
#include "wutil.h"
|
||||
#include "tokenizer.h"
|
||||
#include "fallback.h" // IWYU pragma: keep
|
||||
#include "common.h"
|
||||
#include "wutil.h" // IWYU pragma: keep - needed for wgettext
|
||||
#include "tokenizer.h"
|
||||
|
||||
/* Wow what a hack */
|
||||
#define TOK_CALL_ERROR(t, e, x) do { tok_call_error((t), (e), (t)->squash_errors ? L"" : (x)); } while (0)
|
||||
|
|
|
@ -9,7 +9,7 @@
|
|||
#ifndef FISH_TOKENIZER_H
|
||||
#define FISH_TOKENIZER_H
|
||||
|
||||
#include <wchar.h>
|
||||
#include <stddef.h>
|
||||
#include "common.h"
|
||||
|
||||
/**
|
||||
|
|
3
utf8.cpp
3
utf8.cpp
|
@ -16,13 +16,12 @@
|
|||
|
||||
#include <sys/types.h>
|
||||
#include <stdint.h>
|
||||
#include <wchar.h>
|
||||
|
||||
#include "utf8.h"
|
||||
|
||||
#include <string>
|
||||
#include <vector>
|
||||
#include <limits>
|
||||
#include <algorithm>
|
||||
|
||||
#define _NXT 0x80
|
||||
#define _SEQ2 0xc0
|
||||
|
|
3
utf8.h
3
utf8.h
|
@ -20,10 +20,9 @@
|
|||
#ifndef _UTF8_H_
|
||||
#define _UTF8_H_
|
||||
|
||||
#include <sys/types.h>
|
||||
#include <stddef.h>
|
||||
|
||||
#include <string>
|
||||
#include <wchar.h>
|
||||
|
||||
#define UTF8_IGNORE_ERROR 0x01
|
||||
#define UTF8_SKIP_BOM 0x02
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
Helper functions for working with wcstring
|
||||
*/
|
||||
|
||||
#include "config.h"
|
||||
#include "config.h" // IWYU pragma: keep
|
||||
|
||||
#include "wcstringutil.h"
|
||||
|
||||
|
|
|
@ -6,6 +6,7 @@ Helper functions for working with wcstring
|
|||
#ifndef FISH_WCSTRINGUTIL_H
|
||||
#define FISH_WCSTRINGUTIL_H
|
||||
|
||||
#include <string>
|
||||
#include <utility>
|
||||
#include "common.h"
|
||||
|
||||
|
|
11
wgetopt.cpp
11
wgetopt.cpp
|
@ -61,12 +61,7 @@
|
|||
|
||||
#include <stdio.h>
|
||||
#include <wchar.h>
|
||||
|
||||
#include <unistd.h>
|
||||
#include <sys/types.h>
|
||||
#include <sys/stat.h>
|
||||
#include <dirent.h>
|
||||
|
||||
#include "common.h"
|
||||
|
||||
/* This needs to come after some library #include
|
||||
to get __GNU_LIBRARY__ defined. */
|
||||
|
@ -92,7 +87,7 @@
|
|||
|
||||
#include "wgetopt.h"
|
||||
#include "wutil.h"
|
||||
#include "fallback.h"
|
||||
#include "fallback.h" // IWYU pragma: keep
|
||||
|
||||
|
||||
|
||||
|
@ -198,7 +193,7 @@ static char *posixly_correct;
|
|||
because there are many ways it can cause trouble.
|
||||
On some systems, it contains special magic macros that don't work
|
||||
in GCC. */
|
||||
#include <string.h>
|
||||
#include <string.h> // IWYU pragma: keep
|
||||
#define my_index wcschr
|
||||
#else
|
||||
|
||||
|
|
|
@ -47,7 +47,7 @@ Cambridge, MA 02139, USA. */
|
|||
#ifndef FISH_WGETOPT_H
|
||||
#define FISH_WGETOPT_H
|
||||
|
||||
#include <wchar.h>
|
||||
#include <features.h>
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
|
|
16
wildcard.cpp
16
wildcard.cpp
|
@ -6,32 +6,28 @@ wildcards using **.
|
|||
|
||||
*/
|
||||
|
||||
#include "config.h"
|
||||
#include <algorithm>
|
||||
#include "config.h" // IWYU pragma: keep
|
||||
#include <stdlib.h>
|
||||
#include <stdio.h>
|
||||
#include <limits.h>
|
||||
#include <wchar.h>
|
||||
#include <unistd.h>
|
||||
#include <sys/types.h>
|
||||
#include <sys/stat.h>
|
||||
#include <dirent.h>
|
||||
#include <errno.h>
|
||||
#include <string.h>
|
||||
#include <set>
|
||||
|
||||
#include <assert.h>
|
||||
#include <stddef.h>
|
||||
#include <wctype.h>
|
||||
#include <string>
|
||||
#include <utility>
|
||||
|
||||
#include "fallback.h"
|
||||
#include "util.h"
|
||||
|
||||
#include "wutil.h"
|
||||
#include "complete.h"
|
||||
#include "common.h"
|
||||
#include "wildcard.h"
|
||||
#include "complete.h"
|
||||
#include "reader.h"
|
||||
#include "expand.h"
|
||||
#include "exec.h"
|
||||
#include <map>
|
||||
|
||||
/**
|
||||
|
|
|
@ -12,10 +12,8 @@
|
|||
*/
|
||||
#define FISH_WILDCARD_H
|
||||
|
||||
#include <wchar.h>
|
||||
#include <vector>
|
||||
|
||||
#include "util.h"
|
||||
#include "common.h"
|
||||
#include "expand.h"
|
||||
#include "complete.h"
|
||||
|
@ -26,7 +24,6 @@
|
|||
|
||||
#define WILDCARD_RESERVED 0xf400
|
||||
|
||||
class completion_t;
|
||||
/**
|
||||
Enumeration of all wildcard types
|
||||
*/
|
||||
|
|
10
wutil.cpp
10
wutil.cpp
|
@ -12,23 +12,17 @@
|
|||
#include <errno.h>
|
||||
#include <fcntl.h>
|
||||
#include <wchar.h>
|
||||
#include <wctype.h>
|
||||
#include <string.h>
|
||||
#include <dirent.h>
|
||||
#include <stdarg.h>
|
||||
#include <limits.h>
|
||||
#include <libgen.h>
|
||||
#include <pthread.h>
|
||||
#include <assert.h>
|
||||
#include <features.h>
|
||||
#include <string>
|
||||
#include <map>
|
||||
|
||||
|
||||
#if HAVE_LIBINTL_H
|
||||
#include <libintl.h>
|
||||
#endif
|
||||
|
||||
#include "fallback.h"
|
||||
#include "util.h"
|
||||
|
||||
#include "common.h"
|
||||
#include "wutil.h"
|
||||
|
|
8
wutil.h
8
wutil.h
|
@ -6,16 +6,12 @@
|
|||
#ifndef FISH_WUTIL_H
|
||||
#define FISH_WUTIL_H
|
||||
|
||||
#include <stdlib.h>
|
||||
#include <stdio.h>
|
||||
#include <wchar.h>
|
||||
#include <dirent.h>
|
||||
#include <unistd.h>
|
||||
#include <sys/stat.h>
|
||||
#include <sys/types.h>
|
||||
#include <stdarg.h>
|
||||
#include <stddef.h>
|
||||
#include <time.h>
|
||||
#include <string>
|
||||
#include <utility>
|
||||
#include <stdint.h>
|
||||
#include "common.h"
|
||||
|
||||
|
|
Loading…
Reference in a new issue