mirror of
https://github.com/fish-shell/fish-shell
synced 2024-12-26 12:53:13 +00:00
[clang-tidy] C to C++ headers
Found with modernize-deprecated-headers Signed-off-by: Rosen Penev <rosenp@gmail.com>
This commit is contained in:
parent
0dfa7421f3
commit
8d54e928cd
32 changed files with 86 additions and 98 deletions
|
@ -19,11 +19,11 @@
|
|||
|
||||
#include "builtin.h"
|
||||
|
||||
#include <errno.h>
|
||||
#include <stdlib.h>
|
||||
#include <unistd.h>
|
||||
|
||||
#include <algorithm>
|
||||
#include <cerrno>
|
||||
#include <cstdlib>
|
||||
#include <cstring>
|
||||
#include <cwchar>
|
||||
#include <memory>
|
||||
|
|
|
@ -5,11 +5,10 @@
|
|||
|
||||
#include "builtin_argparse.h"
|
||||
|
||||
#include <errno.h>
|
||||
#include <stddef.h>
|
||||
#include <stdint.h>
|
||||
|
||||
#include <algorithm>
|
||||
#include <cerrno>
|
||||
#include <cstddef>
|
||||
#include <cstdint>
|
||||
#include <cwchar>
|
||||
#include <memory>
|
||||
#include <string>
|
||||
|
|
|
@ -3,9 +3,8 @@
|
|||
|
||||
#include "builtin_bg.h"
|
||||
|
||||
#include <errno.h>
|
||||
#include <stdlib.h>
|
||||
|
||||
#include <cerrno>
|
||||
#include <cstdlib>
|
||||
#include <memory>
|
||||
#include <vector>
|
||||
|
||||
|
|
|
@ -3,9 +3,8 @@
|
|||
|
||||
#include "builtin_bind.h"
|
||||
|
||||
#include <errno.h>
|
||||
#include <stddef.h>
|
||||
|
||||
#include <cerrno>
|
||||
#include <cstddef>
|
||||
#include <memory>
|
||||
#include <set>
|
||||
#include <string>
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
|
||||
#include "builtin_block.h"
|
||||
|
||||
#include <stddef.h>
|
||||
#include <cstddef>
|
||||
|
||||
#include "builtin.h"
|
||||
#include "common.h"
|
||||
|
|
|
@ -3,9 +3,8 @@
|
|||
|
||||
#include "builtin.h"
|
||||
|
||||
#include <stddef.h>
|
||||
|
||||
#include <algorithm>
|
||||
#include <cstddef>
|
||||
#include <string>
|
||||
|
||||
#include "builtin_builtin.h"
|
||||
|
|
|
@ -3,10 +3,11 @@
|
|||
|
||||
#include "builtin_cd.h"
|
||||
|
||||
#include <errno.h>
|
||||
#include <fcntl.h>
|
||||
#include <sys/stat.h>
|
||||
|
||||
#include <cerrno>
|
||||
|
||||
#include "builtin.h"
|
||||
#include "common.h"
|
||||
#include "env.h"
|
||||
|
|
|
@ -1,10 +1,9 @@
|
|||
// Functions used for implementing the commandline builtin.
|
||||
#include "config.h" // IWYU pragma: keep
|
||||
|
||||
#include <errno.h>
|
||||
#include <stddef.h>
|
||||
#include <stdlib.h>
|
||||
|
||||
#include <cerrno>
|
||||
#include <cstddef>
|
||||
#include <cstdlib>
|
||||
#include <cwchar>
|
||||
|
||||
#include "builtin.h"
|
||||
|
@ -129,7 +128,7 @@ int builtin_commandline(parser_t &parser, io_streams_t &streams, wchar_t **argv)
|
|||
const wchar_t *current_buffer = 0;
|
||||
|
||||
// What the commandline builtin considers to be the current cursor position.
|
||||
size_t current_cursor_pos = static_cast<size_t>(-1);
|
||||
auto current_cursor_pos = static_cast<size_t>(-1);
|
||||
|
||||
wchar_t *cmd = argv[0];
|
||||
int buffer_part = 0;
|
||||
|
|
|
@ -1,8 +1,7 @@
|
|||
// Functions used for implementing the complete builtin.
|
||||
#include "config.h" // IWYU pragma: keep
|
||||
|
||||
#include <stddef.h>
|
||||
|
||||
#include <cstddef>
|
||||
#include <cwchar>
|
||||
#include <memory>
|
||||
#include <string>
|
||||
|
|
|
@ -3,9 +3,8 @@
|
|||
|
||||
#include "builtin_disown.h"
|
||||
|
||||
#include <errno.h>
|
||||
#include <signal.h>
|
||||
|
||||
#include <cerrno>
|
||||
#include <csignal>
|
||||
#include <set>
|
||||
|
||||
#include "builtin.h"
|
||||
|
|
|
@ -3,8 +3,8 @@
|
|||
|
||||
#include "builtin_echo.h"
|
||||
|
||||
#include <limits.h>
|
||||
#include <stddef.h>
|
||||
#include <climits>
|
||||
#include <cstddef>
|
||||
|
||||
#include "builtin.h"
|
||||
#include "common.h"
|
||||
|
|
|
@ -1,8 +1,8 @@
|
|||
// Functions for executing the eval builtin.
|
||||
#include "config.h" // IWYU pragma: keep
|
||||
|
||||
#include <errno.h>
|
||||
#include <stddef.h>
|
||||
#include <cerrno>
|
||||
#include <cstddef>
|
||||
|
||||
#include "builtin.h"
|
||||
#include "common.h"
|
||||
|
|
|
@ -3,8 +3,8 @@
|
|||
|
||||
#include "builtin_exit.h"
|
||||
|
||||
#include <errno.h>
|
||||
#include <stddef.h>
|
||||
#include <cerrno>
|
||||
#include <cstddef>
|
||||
|
||||
#include "builtin.h"
|
||||
#include "common.h"
|
||||
|
|
|
@ -3,10 +3,9 @@
|
|||
|
||||
#include "builtin_fg.h"
|
||||
|
||||
#include <errno.h>
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
|
||||
#include <cerrno>
|
||||
#include <cstdio>
|
||||
#include <cstdlib>
|
||||
#include <cwchar>
|
||||
|
||||
#include "builtin.h"
|
||||
|
|
|
@ -3,11 +3,11 @@
|
|||
|
||||
#include "builtin_function.h"
|
||||
|
||||
#include <errno.h>
|
||||
#include <stddef.h>
|
||||
#include <stdlib.h>
|
||||
#include <unistd.h>
|
||||
|
||||
#include <cerrno>
|
||||
#include <cstddef>
|
||||
#include <cstdlib>
|
||||
#include <memory>
|
||||
#include <string>
|
||||
#include <vector>
|
||||
|
|
|
@ -3,10 +3,10 @@
|
|||
|
||||
#include "builtin_functions.h"
|
||||
|
||||
#include <stddef.h>
|
||||
#include <unistd.h>
|
||||
|
||||
#include <algorithm>
|
||||
#include <cstddef>
|
||||
#include <cwchar>
|
||||
#include <map>
|
||||
#include <memory>
|
||||
|
|
|
@ -3,10 +3,9 @@
|
|||
|
||||
#include "builtin_history.h"
|
||||
|
||||
#include <errno.h>
|
||||
#include <stddef.h>
|
||||
#include <stdint.h>
|
||||
|
||||
#include <cerrno>
|
||||
#include <cstddef>
|
||||
#include <cstdint>
|
||||
#include <cwchar>
|
||||
#include <string>
|
||||
#include <vector>
|
||||
|
|
|
@ -1,10 +1,11 @@
|
|||
// Functions for executing the jobs builtin.
|
||||
#include "config.h" // IWYU pragma: keep
|
||||
|
||||
#include <errno.h>
|
||||
#include <stddef.h>
|
||||
#include <sys/time.h>
|
||||
|
||||
#include <cerrno>
|
||||
#include <cstddef>
|
||||
|
||||
#include "builtin.h"
|
||||
#include "common.h"
|
||||
#include "fallback.h" // IWYU pragma: keep
|
||||
|
|
|
@ -3,11 +3,10 @@
|
|||
|
||||
#include "builtin_math.h"
|
||||
|
||||
#include <errno.h>
|
||||
#include <stddef.h>
|
||||
|
||||
#include <algorithm>
|
||||
#include <cerrno>
|
||||
#include <cmath>
|
||||
#include <cstddef>
|
||||
#include <cstring>
|
||||
#include <limits>
|
||||
#include <string>
|
||||
|
|
|
@ -50,18 +50,18 @@
|
|||
// This file has been imported from source code of printf command in GNU Coreutils version 6.9.
|
||||
#include "config.h" // IWYU pragma: keep
|
||||
|
||||
#include <errno.h>
|
||||
#include <limits.h>
|
||||
#include <locale.h>
|
||||
#include <stdarg.h>
|
||||
#include <stddef.h>
|
||||
#include <stdint.h>
|
||||
#include <stdlib.h>
|
||||
#include <sys/types.h>
|
||||
#include <wctype.h>
|
||||
|
||||
#include <cerrno>
|
||||
#include <climits>
|
||||
#include <clocale>
|
||||
#include <cstdarg>
|
||||
#include <cstddef>
|
||||
#include <cstdint>
|
||||
#include <cstdlib>
|
||||
#include <cstring>
|
||||
#include <cwchar>
|
||||
#include <cwctype>
|
||||
|
||||
#include "builtin.h"
|
||||
#include "common.h"
|
||||
|
|
|
@ -3,10 +3,9 @@
|
|||
|
||||
#include "builtin_random.h"
|
||||
|
||||
#include <errno.h>
|
||||
#include <stdint.h>
|
||||
|
||||
#include <algorithm>
|
||||
#include <cerrno>
|
||||
#include <cstdint>
|
||||
#include <cwchar>
|
||||
#include <random>
|
||||
|
||||
|
|
|
@ -3,14 +3,14 @@
|
|||
|
||||
#include "builtin_read.h"
|
||||
|
||||
#include <errno.h>
|
||||
#include <limits.h>
|
||||
#include <stddef.h>
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
#include <unistd.h>
|
||||
|
||||
#include <algorithm>
|
||||
#include <cerrno>
|
||||
#include <climits>
|
||||
#include <cstddef>
|
||||
#include <cstdio>
|
||||
#include <cstdlib>
|
||||
#include <cstring>
|
||||
#include <cwchar>
|
||||
#include <memory>
|
||||
|
|
|
@ -3,9 +3,8 @@
|
|||
|
||||
#include "builtin_realpath.h"
|
||||
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
|
||||
#include <cstdio>
|
||||
#include <cstdlib>
|
||||
#include <cstring>
|
||||
#include <cwchar>
|
||||
|
||||
|
|
|
@ -3,8 +3,8 @@
|
|||
|
||||
#include "builtin_return.h"
|
||||
|
||||
#include <errno.h>
|
||||
#include <stddef.h>
|
||||
#include <cerrno>
|
||||
#include <cstddef>
|
||||
|
||||
#include "builtin.h"
|
||||
#include "common.h"
|
||||
|
|
|
@ -1,13 +1,13 @@
|
|||
// Functions used for implementing the set builtin.
|
||||
#include "config.h" // IWYU pragma: keep
|
||||
|
||||
#include <errno.h>
|
||||
#include <stddef.h>
|
||||
#include <stdlib.h>
|
||||
#include <sys/stat.h>
|
||||
#include <unistd.h>
|
||||
|
||||
#include <algorithm>
|
||||
#include <cerrno>
|
||||
#include <cstddef>
|
||||
#include <cstdlib>
|
||||
#include <cstring>
|
||||
#include <cwchar>
|
||||
#include <iterator>
|
||||
|
|
|
@ -1,8 +1,8 @@
|
|||
// Functions used for implementing the set_color builtin.
|
||||
#include "config.h"
|
||||
|
||||
#include <stddef.h>
|
||||
#include <stdlib.h>
|
||||
#include <cstddef>
|
||||
#include <cstdlib>
|
||||
|
||||
#if HAVE_CURSES_H
|
||||
#include <curses.h>
|
||||
|
|
|
@ -3,8 +3,7 @@
|
|||
|
||||
#include "builtin_status.h"
|
||||
|
||||
#include <stddef.h>
|
||||
|
||||
#include <cstddef>
|
||||
#include <cwchar>
|
||||
#include <string>
|
||||
|
||||
|
|
|
@ -5,15 +5,13 @@
|
|||
#ifdef _WIN32
|
||||
#define PCRE2_STATIC
|
||||
#endif
|
||||
#include <errno.h>
|
||||
#include <limits.h>
|
||||
#include <stdarg.h>
|
||||
#include <stddef.h>
|
||||
#include <stdint.h>
|
||||
#include <stdlib.h>
|
||||
#include <wctype.h>
|
||||
|
||||
#include <algorithm>
|
||||
#include <cerrno>
|
||||
#include <climits>
|
||||
#include <cstdarg>
|
||||
#include <cstddef>
|
||||
#include <cstdint>
|
||||
#include <cstdlib>
|
||||
#include <cwchar>
|
||||
#include <cwctype>
|
||||
#include <iterator>
|
||||
|
|
|
@ -5,16 +5,16 @@
|
|||
|
||||
#include "builtin.h"
|
||||
|
||||
#include <errno.h>
|
||||
#include <stdarg.h>
|
||||
#include <sys/stat.h>
|
||||
#include <sys/types.h>
|
||||
#include <unistd.h>
|
||||
#include <wctype.h>
|
||||
|
||||
#include <cerrno>
|
||||
#include <cmath>
|
||||
#include <cstdarg>
|
||||
#include <cstring>
|
||||
#include <cwchar>
|
||||
#include <cwctype>
|
||||
#include <memory>
|
||||
#include <string>
|
||||
#include <type_traits>
|
||||
|
|
|
@ -1,10 +1,11 @@
|
|||
// Functions used for implementing the ulimit builtin.
|
||||
#include "config.h" // IWYU pragma: keep
|
||||
|
||||
#include <errno.h>
|
||||
#include <stddef.h>
|
||||
#include <sys/resource.h>
|
||||
|
||||
#include <cerrno>
|
||||
#include <cstddef>
|
||||
|
||||
#include "builtin.h"
|
||||
#include "common.h"
|
||||
#include "fallback.h" // IWYU pragma: keep
|
||||
|
|
|
@ -3,10 +3,9 @@
|
|||
|
||||
#include "color.h"
|
||||
|
||||
#include <stddef.h>
|
||||
#include <stdint.h>
|
||||
#include <stdlib.h>
|
||||
|
||||
#include <cstddef>
|
||||
#include <cstdint>
|
||||
#include <cstdlib>
|
||||
#include <cwchar> // IWYU pragma: keep
|
||||
|
||||
#include "common.h"
|
||||
|
|
|
@ -1,12 +1,13 @@
|
|||
// fish_test_helper is a little program with no fish dependencies that acts like certain other
|
||||
// programs, allowing fish to test its behavior.
|
||||
|
||||
#include <signal.h>
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
#include <unistd.h>
|
||||
|
||||
#include <csignal>
|
||||
#include <cstdio>
|
||||
#include <cstdlib>
|
||||
#include <cstring>
|
||||
|
||||
static void become_foreground_then_print_stderr() {
|
||||
if (tcsetpgrp(STDOUT_FILENO, getpgrp()) < 0) {
|
||||
perror("tcsetgrp");
|
||||
|
|
Loading…
Reference in a new issue