refactor(IWYU): fix includes for cmdhist.h (#26324)

This commit is contained in:
zeertzjq
2023-11-30 22:48:15 +08:00
committed by GitHub
parent 884a83049b
commit a6f26c86cb
16 changed files with 53 additions and 63 deletions

View File

@@ -2,32 +2,33 @@
#include <stddef.h> // IWYU pragma: keep
#include "nvim/func_attr.h"
#include "nvim/garray_defs.h" // IWYU pragma: keep
#include "nvim/types_defs.h" // IWYU pragma: keep
// Flags for expand_wildcards()
#define EW_DIR 0x01 // include directory names
#define EW_FILE 0x02 // include file names
#define EW_NOTFOUND 0x04 // include not found names
#define EW_ADDSLASH 0x08 // append slash to directory name
#define EW_KEEPALL 0x10 // keep all matches
#define EW_SILENT 0x20 // don't print "1 returned" from shell
#define EW_EXEC 0x40 // executable files
#define EW_PATH 0x80 // search in 'path' too
#define EW_ICASE 0x100 // ignore case
#define EW_NOERROR 0x200 // no error for bad regexp
#define EW_NOTWILD 0x400 // add match with literal name if exists
#define EW_KEEPDOLLAR 0x800 // do not escape $, $var is expanded
/// Flags for expand_wildcards()
enum {
EW_DIR = 0x01, ///< include directory names
EW_FILE = 0x02, ///< include file names
EW_NOTFOUND = 0x04, ///< include not found names
EW_ADDSLASH = 0x08, ///< append slash to directory name
EW_KEEPALL = 0x10, ///< keep all matches
EW_SILENT = 0x20, ///< don't print "1 returned" from shell
EW_EXEC = 0x40, ///< executable files
EW_PATH = 0x80, ///< search in 'path' too
EW_ICASE = 0x100, ///< ignore case
EW_NOERROR = 0x200, ///< no error for bad regexp
EW_NOTWILD = 0x400, ///< add match with literal name if exists
EW_KEEPDOLLAR = 0x800, ///< do not escape $, $var is expanded
EW_ALLLINKS = 0x1000, ///< also links not pointing to existing file
EW_SHELLCMD = 0x2000, ///< called from expand_shellcmd(), don't check
///< if executable is in $PATH
EW_DODOT = 0x4000, ///< also files starting with a dot
EW_EMPTYOK = 0x8000, ///< no matches is not an error
EW_NOTENV = 0x10000, ///< do not expand environment variables
EW_NOBREAK = 0x20000, ///< do not invoke breakcheck
};
// Note: mostly EW_NOTFOUND and EW_SILENT are mutually exclusive: EW_NOTFOUND
// is used when executing commands and EW_SILENT for interactive expanding.
#define EW_ALLLINKS 0x1000 // also links not pointing to existing file
#define EW_SHELLCMD 0x2000 // called from expand_shellcmd(), don't check
// if executable is in $PATH
#define EW_DODOT 0x4000 // also files starting with a dot
#define EW_EMPTYOK 0x8000 // no matches is not an error
#define EW_NOTENV 0x10000 // do not expand environment variables
#define EW_NOBREAK 0x20000 // do not invoke breakcheck
/// Return value for the comparison of two files. Also @see path_full_compare.
typedef enum file_comparison {