Include stdbool.h in some files which use it

Done by manual inspection of the output of this script:
grep -r -l -w "bool\|true\|false" * | grep 'c$\|h$' > has_bool
grep -r -l "stdbool.h" * | grep 'c$\|h$' > has_include
grep -F -x -v -f has_include has_bool
This commit is contained in:
Pavel Platto
2014-07-09 09:44:09 +03:00
committed by Justin M. Keyes
parent cf18687349
commit 0868818d3e
33 changed files with 48 additions and 0 deletions

View File

@@ -1,6 +1,7 @@
// Much of this code was adapted from 'if_py_both.h' from the original // Much of this code was adapted from 'if_py_both.h' from the original
// vim source // vim source
#include <errno.h> #include <errno.h>
#include <stdbool.h>
#include <stdint.h> #include <stdint.h>
#include <stdlib.h> #include <stdlib.h>

View File

@@ -10,6 +10,8 @@
/// Final - unicode form-B final char denoted with a_f_* /// Final - unicode form-B final char denoted with a_f_*
/// Stand-Alone - unicode form-B isolated char denoted with a_s_* (NOT USED) /// Stand-Alone - unicode form-B isolated char denoted with a_s_* (NOT USED)
#include <stdbool.h>
#include "nvim/vim.h" #include "nvim/vim.h"
#include "nvim/ascii.h" #include "nvim/ascii.h"
#include "nvim/arabic.h" #include "nvim/arabic.h"

View File

@@ -1,6 +1,8 @@
#ifndef NVIM_ARABIC_H #ifndef NVIM_ARABIC_H
#define NVIM_ARABIC_H #define NVIM_ARABIC_H
#include <stdbool.h>
/// Whether c belongs to the range of Arabic characters that might be shaped. /// Whether c belongs to the range of Arabic characters that might be shaped.
static inline bool arabic_char(int c) static inline bool arabic_char(int c)
{ {

View File

@@ -1,6 +1,8 @@
#ifndef NVIM_BUFFER_DEFS_H #ifndef NVIM_BUFFER_DEFS_H
#define NVIM_BUFFER_DEFS_H #define NVIM_BUFFER_DEFS_H
#include <stdbool.h>
// for garray_T // for garray_T
#include "nvim/garray.h" #include "nvim/garray.h"
// for pos_T and lpos_T // for pos_T and lpos_T

View File

@@ -2,6 +2,7 @@
/// ///
/// code for digraphs /// code for digraphs
#include <stdbool.h>
#include <inttypes.h> #include <inttypes.h>
#include "nvim/vim.h" #include "nvim/vim.h"

View File

@@ -11,6 +11,7 @@
*/ */
#include <errno.h> #include <errno.h>
#include <stdbool.h>
#include <string.h> #include <string.h>
#include <stdlib.h> #include <stdlib.h>
#include <inttypes.h> #include <inttypes.h>

View File

@@ -1,6 +1,8 @@
#ifndef NVIM_EX_CMDS_H #ifndef NVIM_EX_CMDS_H
#define NVIM_EX_CMDS_H #define NVIM_EX_CMDS_H
#include <stdbool.h>
#ifdef INCLUDE_GENERATED_DECLARATIONS #ifdef INCLUDE_GENERATED_DECLARATIONS
# include "ex_cmds.h.generated.h" # include "ex_cmds.h.generated.h"
#endif #endif

View File

@@ -14,6 +14,8 @@
# define NVIM_EX_CMDS_DEFS_H # define NVIM_EX_CMDS_DEFS_H
#endif #endif
#include <stdbool.h>
#include "nvim/normal.h" #include "nvim/normal.h"
/* /*

View File

@@ -11,6 +11,7 @@
*/ */
#include <errno.h> #include <errno.h>
#include <stdbool.h>
#include <string.h> #include <string.h>
#include <stdlib.h> #include <stdlib.h>
#include <inttypes.h> #include <inttypes.h>

View File

@@ -8,6 +8,8 @@
#ifndef NVIM_GLOBALS_H #ifndef NVIM_GLOBALS_H
#define NVIM_GLOBALS_H #define NVIM_GLOBALS_H
#include <stdbool.h>
#include "nvim/ex_eval.h" #include "nvim/ex_eval.h"
#include "nvim/mbyte.h" #include "nvim/mbyte.h"
#include "nvim/menu.h" #include "nvim/menu.h"

View File

@@ -1,4 +1,5 @@
#include <inttypes.h> #include <inttypes.h>
#include <stdbool.h>
#include "nvim/ascii.h" #include "nvim/ascii.h"
#include "nvim/indent.h" #include "nvim/indent.h"

View File

@@ -78,6 +78,7 @@
#include <errno.h> #include <errno.h>
#include <inttypes.h> #include <inttypes.h>
#include <stdbool.h>
#include <string.h> #include <string.h>
#include <wchar.h> #include <wchar.h>
#include <wctype.h> #include <wctype.h>

View File

@@ -1,6 +1,8 @@
#ifndef NVIM_MBYTE_H #ifndef NVIM_MBYTE_H
#define NVIM_MBYTE_H #define NVIM_MBYTE_H
#include <stdbool.h>
#ifdef INCLUDE_GENERATED_DECLARATIONS #ifdef INCLUDE_GENERATED_DECLARATIONS
# include "mbyte.h.generated.h" # include "mbyte.h.generated.h"
#endif #endif

View File

@@ -12,6 +12,7 @@
#include <errno.h> #include <errno.h>
#include <inttypes.h> #include <inttypes.h>
#include <stdbool.h>
#include <string.h> #include <string.h>
#include "nvim/vim.h" #include "nvim/vim.h"

View File

@@ -17,6 +17,7 @@
*/ */
#include <inttypes.h> #include <inttypes.h>
#include <stdbool.h>
#include "nvim/vim.h" #include "nvim/vim.h"
#include "nvim/ascii.h" #include "nvim/ascii.h"

View File

@@ -1,6 +1,8 @@
#ifndef NVIM_MOVE_H #ifndef NVIM_MOVE_H
#define NVIM_MOVE_H #define NVIM_MOVE_H
#include <stdbool.h>
#ifdef INCLUDE_GENERATED_DECLARATIONS #ifdef INCLUDE_GENERATED_DECLARATIONS
# include "move.h.generated.h" # include "move.h.generated.h"
#endif #endif

View File

@@ -14,6 +14,7 @@
#include <errno.h> #include <errno.h>
#include <inttypes.h> #include <inttypes.h>
#include <string.h> #include <string.h>
#include <stdbool.h>
#include <stdlib.h> #include <stdlib.h>
#include "nvim/vim.h" #include "nvim/vim.h"

View File

@@ -1,6 +1,8 @@
#ifndef NVIM_OPTION_DEFS_H #ifndef NVIM_OPTION_DEFS_H
#define NVIM_OPTION_DEFS_H #define NVIM_OPTION_DEFS_H
#include <stdbool.h>
#include "nvim/types.h" #include "nvim/types.h"
// option_defs.h: definition of global variables for settable options // option_defs.h: definition of global variables for settable options

View File

@@ -1,6 +1,8 @@
#ifndef NVIM_OS_EVENT_DEFS_H #ifndef NVIM_OS_EVENT_DEFS_H
#define NVIM_OS_EVENT_DEFS_H #define NVIM_OS_EVENT_DEFS_H
#include <stdbool.h>
#include "nvim/os/job_defs.h" #include "nvim/os/job_defs.h"
#include "nvim/os/rstream_defs.h" #include "nvim/os/rstream_defs.h"

View File

@@ -3,6 +3,7 @@
/// Popup menu (PUM) /// Popup menu (PUM)
// //
#include <inttypes.h> #include <inttypes.h>
#include <stdbool.h>
#include "nvim/vim.h" #include "nvim/vim.h"
#include "nvim/ascii.h" #include "nvim/ascii.h"

View File

@@ -12,6 +12,8 @@
#ifndef NVIM_REGEXP_DEFS_H #ifndef NVIM_REGEXP_DEFS_H
#define NVIM_REGEXP_DEFS_H #define NVIM_REGEXP_DEFS_H
#include <stdbool.h>
#include "nvim/pos.h" #include "nvim/pos.h"
/* /*

View File

@@ -11,6 +11,7 @@
#include <errno.h> #include <errno.h>
#include <inttypes.h> #include <inttypes.h>
#include <stdbool.h>
#include <string.h> #include <string.h>
#include "nvim/ascii.h" #include "nvim/ascii.h"

View File

@@ -286,6 +286,7 @@
#include <errno.h> #include <errno.h>
#include <inttypes.h> #include <inttypes.h>
#include <stdbool.h>
#include <string.h> #include <string.h>
#include <stdlib.h> #include <stdlib.h>
#include <wctype.h> #include <wctype.h>

View File

@@ -1,6 +1,8 @@
#ifndef NVIM_SPELL_H #ifndef NVIM_SPELL_H
#define NVIM_SPELL_H #define NVIM_SPELL_H
#include <stdbool.h>
#ifdef INCLUDE_GENERATED_DECLARATIONS #ifdef INCLUDE_GENERATED_DECLARATIONS
# include "spell.h.generated.h" # include "spell.h.generated.h"
#endif #endif

View File

@@ -13,6 +13,7 @@
#include <assert.h> #include <assert.h>
#include <errno.h> #include <errno.h>
#include <inttypes.h> #include <inttypes.h>
#include <stdbool.h>
#include <string.h> #include <string.h>
#include <stdlib.h> #include <stdlib.h>

View File

@@ -1,6 +1,8 @@
#ifndef NVIM_SYNTAX_H #ifndef NVIM_SYNTAX_H
#define NVIM_SYNTAX_H #define NVIM_SYNTAX_H
#include <stdbool.h>
#include "nvim/buffer_defs.h" #include "nvim/buffer_defs.h"
typedef int guicolor_T; typedef int guicolor_T;

View File

@@ -12,6 +12,7 @@
#include <errno.h> #include <errno.h>
#include <inttypes.h> #include <inttypes.h>
#include <stdbool.h>
#include <string.h> #include <string.h>
#include "nvim/vim.h" #include "nvim/vim.h"

View File

@@ -24,6 +24,7 @@
#define tgetstr tgetstr_defined_wrong #define tgetstr tgetstr_defined_wrong
#include <errno.h> #include <errno.h>
#include <inttypes.h> #include <inttypes.h>
#include <stdbool.h>
#include <string.h> #include <string.h>
#include "nvim/vim.h" #include "nvim/vim.h"

View File

@@ -16,6 +16,7 @@
*/ */
#include <inttypes.h> #include <inttypes.h>
#include <stdbool.h>
#include <string.h> #include <string.h>
#include "nvim/vim.h" #include "nvim/vim.h"

View File

@@ -1,6 +1,8 @@
#ifndef NVIM_UI_H #ifndef NVIM_UI_H
#define NVIM_UI_H #define NVIM_UI_H
#include <stdbool.h>
#ifdef INCLUDE_GENERATED_DECLARATIONS #ifdef INCLUDE_GENERATED_DECLARATIONS
# include "ui.h.generated.h" # include "ui.h.generated.h"
#endif #endif

View File

@@ -82,6 +82,7 @@
#include <inttypes.h> #include <inttypes.h>
#include <errno.h> #include <errno.h>
#include <stdbool.h>
#include <string.h> #include <string.h>
#include "nvim/vim.h" #include "nvim/vim.h"

View File

@@ -9,6 +9,7 @@
#include <errno.h> #include <errno.h>
#include <assert.h> #include <assert.h>
#include <inttypes.h> #include <inttypes.h>
#include <stdbool.h>
#include "nvim/api/private/handle.h" #include "nvim/api/private/handle.h"
#include "nvim/vim.h" #include "nvim/vim.h"

View File

@@ -1,6 +1,8 @@
#ifndef NVIM_WINDOW_H #ifndef NVIM_WINDOW_H
#define NVIM_WINDOW_H #define NVIM_WINDOW_H
#include <stdbool.h>
#ifdef INCLUDE_GENERATED_DECLARATIONS #ifdef INCLUDE_GENERATED_DECLARATIONS
# include "window.h.generated.h" # include "window.h.generated.h"
#endif #endif