text stringlengths 24 1.04M | metadata stringlengths 233 497 |
|---|---|
### File: src/nvim/fileio.c
// fileio.c: read from and write to a file
#include <assert.h>
#include <errno.h>
#include <fcntl.h>
#include <iconv.h>
#include <inttypes.h>
#include <limits.h>
#include <stdbool.h>
#include <stddef.h>
#include <stdio.h>
#include <string.h>
#include <sys/stat.h>
#include <sys/types.h>
#inc... | {"idx": "gitee_code", "domain": "code", "domain2": "gitee-permissive", "header_footer": "", "lang": "en", "source": "gitee_code-0.jsonl", "prog_lang": "C", "repo_name": "minhanghuang/neovim", "path": "src/nvim/fileio.c", "license": "mit", "size": 120270} |
### File: src/nvim/fileio.h
#pragma once
#include <stdint.h> // IWYU pragma: keep
#include <stdio.h> // IWYU pragma: keep
#include <time.h> // IWYU pragma: keep
#include "nvim/eval/typval_defs.h"
#include "nvim/ex_cmds_defs.h" // IWYU pragma: keep
#include "nvim/garray_defs.h" // IWYU pragma: keep
#include "nvim... | {"idx": "gitee_code", "domain": "code", "domain2": "gitee-permissive", "header_footer": "", "lang": "en", "source": "gitee_code-0.jsonl", "prog_lang": "C", "repo_name": "minhanghuang/neovim", "path": "src/nvim/fileio.h", "license": "mit", "size": 2049} |
### File: src/nvim/fold.c
// vim: set fdm=marker fdl=1 fdc=3
// fold.c: code for folding
#include <assert.h>
#include <inttypes.h>
#include <stdbool.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include "klib/kvec.h"
#include "nvim/api/extmark.h"
#include "nvim/api/private/defs.h"
#include "nvim/api... | {"idx": "gitee_code", "domain": "code", "domain2": "gitee-permissive", "header_footer": "", "lang": "en", "source": "gitee_code-0.jsonl", "prog_lang": "C", "repo_name": "minhanghuang/neovim", "path": "src/nvim/fold.c", "license": "mit", "size": 102289} |
### File: src/nvim/fold.h
#pragma once
#include <stdio.h> // IWYU pragma: keep
#include "nvim/decoration_defs.h" // IWYU pragma: keep
#include "nvim/eval/typval_defs.h" // IWYU pragma: keep
#include "nvim/fold_defs.h" // IWYU pragma: keep
#include "nvim/garray_defs.h" // IWYU pragma: keep
#include "nvim/macros_d... | {"idx": "gitee_code", "domain": "code", "domain2": "gitee-permissive", "header_footer": "", "lang": "en", "source": "gitee_code-0.jsonl", "prog_lang": "C", "repo_name": "minhanghuang/neovim", "path": "src/nvim/fold.h", "license": "mit", "size": 522} |
### File: src/nvim/fold_defs.h
#pragma once
#include "nvim/pos_defs.h"
/// Info used to pass info about a fold from the fold-detection code to the
/// code that displays the foldcolumn.
typedef struct {
linenr_T fi_lnum; ///< line number where fold starts
int fi_level; ///< level of the fold; when this is z... | {"idx": "gitee_code", "domain": "code", "domain2": "gitee-permissive", "header_footer": "", "lang": "en", "source": "gitee_code-0.jsonl", "prog_lang": "C", "repo_name": "minhanghuang/neovim", "path": "src/nvim/fold_defs.h", "license": "mit", "size": 524} |
### File: src/nvim/func_attr.h
// Undefined DEFINE_FUNC_ATTRIBUTES and undefined DEFINE_EMPTY_ATTRIBUTES
// leaves file with untouched FUNC_ATTR_* macros. This variant is used for
// scripts/gen_declarations.lua.
//
// Empty macros are used for *.c files.
// (undefined DEFINE_FUNC_ATTRIBUTES and defined DEFINE_EMPTY_AT... | {"idx": "gitee_code", "domain": "code", "domain2": "gitee-permissive", "header_footer": "", "lang": "en", "source": "gitee_code-0.jsonl", "prog_lang": "C", "repo_name": "minhanghuang/neovim", "path": "src/nvim/func_attr.h", "license": "mit", "size": 7512} |
### File: src/nvim/garray.c
/// @file garray.c
///
/// Functions for handling growing arrays.
#include <stdint.h>
#include <string.h>
#include "nvim/garray.h"
#include "nvim/log.h"
#include "nvim/memory.h"
#include "nvim/path.h"
#include "nvim/strings.h"
#ifdef INCLUDE_GENERATED_DECLARATIONS
# include "garray.c.gene... | {"idx": "gitee_code", "domain": "code", "domain2": "gitee-permissive", "header_footer": "", "lang": "en", "source": "gitee_code-0.jsonl", "prog_lang": "C", "repo_name": "minhanghuang/neovim", "path": "src/nvim/garray.c", "license": "mit", "size": 5447} |
### File: src/nvim/garray.h
#pragma once
#include <stdbool.h>
#include <stddef.h>
#include "nvim/garray_defs.h" // IWYU pragma: keep
#include "nvim/memory.h"
#define GA_EMPTY(ga_ptr) ((ga_ptr)->ga_len <= 0)
#define GA_APPEND(item_type, gap, item) \
do { \
ga_grow(gap, 1); \
((item_type *)(gap)->ga_data)[... | {"idx": "gitee_code", "domain": "code", "domain2": "gitee-permissive", "header_footer": "", "lang": "en", "source": "gitee_code-0.jsonl", "prog_lang": "C", "repo_name": "minhanghuang/neovim", "path": "src/nvim/garray.h", "license": "mit", "size": 1400} |
### File: src/nvim/garray_defs.h
#pragma once
#include <stddef.h>
/// Structure used for growing arrays.
/// This is used to store information that only grows, is deleted all at
/// once, and needs to be accessed by index. See ga_clear() and ga_grow().
typedef struct {
int ga_len; // current ... | {"idx": "gitee_code", "domain": "code", "domain2": "gitee-permissive", "header_footer": "", "lang": "en", "source": "gitee_code-0.jsonl", "prog_lang": "C", "repo_name": "minhanghuang/neovim", "path": "src/nvim/garray_defs.h", "license": "mit", "size": 707} |
### File: src/nvim/generators/c_grammar.lua
local lpeg = vim.lpeg
-- lpeg grammar for building api metadata from a set of header files. It
-- ignores comments and preprocessor commands and parses a very small subset
-- of C prototypes with a limited set of types
local P, R, S = lpeg.P, lpeg.R, lpeg.S
local C, Ct, Cc, ... | {"idx": "gitee_code", "domain": "code", "domain2": "gitee-permissive", "header_footer": "", "lang": "en", "source": "gitee_code-0.jsonl", "prog_lang": "Lua", "repo_name": "minhanghuang/neovim", "path": "src/nvim/generators/c_grammar.lua", "license": "mit", "size": 3749} |
### File: src/nvim/generators/dump_bin_array.lua
local function dump_bin_array(output, name, data)
output:write([[
static const uint8_t ]] .. name .. [[[] = {
]])
for i = 1, #data do
output:write(string.byte(data, i) .. ', ')
if i % 10 == 0 then
output:write('\n ')
end
end
output:write([[
... | {"idx": "gitee_code", "domain": "code", "domain2": "gitee-permissive", "header_footer": "", "lang": "en", "source": "gitee_code-0.jsonl", "prog_lang": "Lua", "repo_name": "minhanghuang/neovim", "path": "src/nvim/generators/dump_bin_array.lua", "license": "mit", "size": 305} |
### File: src/nvim/generators/gen_api_dispatch.lua
local mpack = vim.mpack
local hashy = require 'generators.hashy'
local pre_args = 7
assert(#arg >= pre_args)
-- output h file with generated dispatch functions (dispatch_wrappers.generated.h)
local dispatch_outputf = arg[1]
-- output h file with packed metadata (api_... | {"idx": "gitee_code", "domain": "code", "domain2": "gitee-permissive", "header_footer": "", "lang": "en", "source": "gitee_code-0.jsonl", "prog_lang": "Lua", "repo_name": "minhanghuang/neovim", "path": "src/nvim/generators/gen_api_dispatch.lua", "license": "mit", "size": 28314} |
### File: src/nvim/generators/gen_api_ui_events.lua
local mpack = vim.mpack
assert(#arg == 5)
local input = io.open(arg[1], 'rb')
local call_output = io.open(arg[2], 'wb')
local remote_output = io.open(arg[3], 'wb')
local metadata_output = io.open(arg[4], 'wb')
local client_output = io.open(arg[5], 'wb')
local c_gram... | {"idx": "gitee_code", "domain": "code", "domain2": "gitee-permissive", "header_footer": "", "lang": "en", "source": "gitee_code-0.jsonl", "prog_lang": "Lua", "repo_name": "minhanghuang/neovim", "path": "src/nvim/generators/gen_api_ui_events.lua", "license": "mit", "size": 6814} |
### File: src/nvim/generators/gen_char_blob.lua
if arg[1] == '--help' then
print('Usage:')
print(' ' .. arg[0] .. ' [-c] target source varname [source varname]...')
print('')
print('Generates C file with big uint8_t blob.')
print('Blob will be stored in a static const array named varname.')
os.exit()
end
... | {"idx": "gitee_code", "domain": "code", "domain2": "gitee-permissive", "header_footer": "", "lang": "en", "source": "gitee_code-0.jsonl", "prog_lang": "Lua", "repo_name": "minhanghuang/neovim", "path": "src/nvim/generators/gen_char_blob.lua", "license": "mit", "size": 2449} |
### File: src/nvim/generators/gen_declarations.lua
local fname = arg[1]
local static_fname = arg[2]
local non_static_fname = arg[3]
local preproc_fname = arg[4]
local static_basename = arg[5]
local lpeg = vim.lpeg
local fold = function(func, ...)
local result = nil
for _, v in ipairs({ ... }) do
if result == ... | {"idx": "gitee_code", "domain": "code", "domain2": "gitee-permissive", "header_footer": "", "lang": "en", "source": "gitee_code-0.jsonl", "prog_lang": "Lua", "repo_name": "minhanghuang/neovim", "path": "src/nvim/generators/gen_declarations.lua", "license": "mit", "size": 10246} |
### File: src/nvim/generators/gen_eval.lua
local mpack = vim.mpack
local autodir = arg[1]
local metadata_file = arg[2]
local funcs_file = arg[3]
local funcsfname = autodir .. '/funcs.generated.h'
--Will generate funcs.generated.h with definition of functions static const array.
local hashy = require 'generators.has... | {"idx": "gitee_code", "domain": "code", "domain2": "gitee-permissive", "header_footer": "", "lang": "en", "source": "gitee_code-0.jsonl", "prog_lang": "Lua", "repo_name": "minhanghuang/neovim", "path": "src/nvim/generators/gen_eval.lua", "license": "mit", "size": 2768} |
### File: src/nvim/generators/gen_events.lua
local fileio_enum_file = arg[1]
local names_file = arg[2]
local auevents = require('auevents')
local events = auevents.events
local aliases = auevents.aliases
local enum_tgt = io.open(fileio_enum_file, 'w')
local names_tgt = io.open(names_file, 'w')
enum_tgt:write([[
// I... | {"idx": "gitee_code", "domain": "code", "domain2": "gitee-permissive", "header_footer": "", "lang": "en", "source": "gitee_code-0.jsonl", "prog_lang": "Lua", "repo_name": "minhanghuang/neovim", "path": "src/nvim/generators/gen_events.lua", "license": "mit", "size": 1579} |
### File: src/nvim/generators/gen_ex_cmds.lua
local includedir = arg[1]
local autodir = arg[2]
-- Will generate files ex_cmds_enum.generated.h with cmdidx_T enum
-- and ex_cmds_defs.generated.h with main Ex commands definitions.
local enumfname = includedir .. '/ex_cmds_enum.generated.h'
local defsfname = autodir .. ... | {"idx": "gitee_code", "domain": "code", "domain2": "gitee-permissive", "header_footer": "", "lang": "en", "source": "gitee_code-0.jsonl", "prog_lang": "Lua", "repo_name": "minhanghuang/neovim", "path": "src/nvim/generators/gen_ex_cmds.lua", "license": "mit", "size": 5012} |
### File: src/nvim/generators/gen_options.lua
local options_file = arg[1]
local opt_fd = assert(io.open(options_file, 'w'))
local w = function(s)
if s:match('^ %.') then
opt_fd:write(s .. ',\n')
else
opt_fd:write(s .. '\n')
end
end
--- @module 'nvim.options'
local options = require('options')
local... | {"idx": "gitee_code", "domain": "code", "domain2": "gitee-permissive", "header_footer": "", "lang": "en", "source": "gitee_code-0.jsonl", "prog_lang": "Lua", "repo_name": "minhanghuang/neovim", "path": "src/nvim/generators/gen_options.lua", "license": "mit", "size": 6311} |
### File: src/nvim/generators/gen_options_enum.lua
-- Generates option index enum and map of option name to option index.
-- Handles option full name, short name and aliases.
-- Also generates BV_ and WV_ enum constants.
local options_enum_file = arg[1]
local options_map_file = arg[2]
local options_enum_fd = assert(io... | {"idx": "gitee_code", "domain": "code", "domain2": "gitee-permissive", "header_footer": "", "lang": "en", "source": "gitee_code-0.jsonl", "prog_lang": "Lua", "repo_name": "minhanghuang/neovim", "path": "src/nvim/generators/gen_options_enum.lua", "license": "mit", "size": 3695} |
### File: src/nvim/generators/gen_unicode_tables.lua
-- Script creates the following tables in unicode_tables.generated.h:
--
-- 1. doublewidth and ambiguous tables: sorted list of non-overlapping closed
-- intervals. Codepoints in these intervals have double (W or F) or ambiguous
-- (A) east asian width respecti... | {"idx": "gitee_code", "domain": "code", "domain2": "gitee-permissive", "header_footer": "", "lang": "en", "source": "gitee_code-0.jsonl", "prog_lang": "Lua", "repo_name": "minhanghuang/neovim", "path": "src/nvim/generators/gen_unicode_tables.lua", "license": "mit", "size": 9445} |
### File: src/nvim/generators/gen_vimvim.lua
local mpack = vim.mpack
local syntax_file = arg[1]
local funcs_file = arg[2]
local lld = {}
local syn_fd = io.open(syntax_file, 'w')
lld.line_length = 0
local function w(s)
syn_fd:write(s)
if s:find('\n') then
lld.line_length = #(s:gsub('.*\n', ''))
else
lld.... | {"idx": "gitee_code", "domain": "code", "domain2": "gitee-permissive", "header_footer": "", "lang": "en", "source": "gitee_code-0.jsonl", "prog_lang": "Lua", "repo_name": "minhanghuang/neovim", "path": "src/nvim/generators/gen_vimvim.lua", "license": "mit", "size": 3726} |
### File: src/nvim/generators/hashy.lua
-- HASHY McHASHFACE
local M = {}
_G.d = M
local function setdefault(table, key)
local val = table[key]
if val == nil then
val = {}
table[key] = val
end
return val
end
function M.build_pos_hash(strings)
local len_buckets = {}
local maxlen = 0
for _, s in i... | {"idx": "gitee_code", "domain": "code", "domain2": "gitee-permissive", "header_footer": "", "lang": "en", "source": "gitee_code-0.jsonl", "prog_lang": "Lua", "repo_name": "minhanghuang/neovim", "path": "src/nvim/generators/hashy.lua", "license": "mit", "size": 3457} |
### File: src/nvim/generators/preload.lua
local srcdir = table.remove(arg, 1)
local nlualib = table.remove(arg, 1)
local gendir = table.remove(arg, 1)
package.path = srcdir .. '/src/nvim/?.lua;' .. srcdir .. '/runtime/lua/?.lua;' .. package.path
package.path = gendir .. '/?.lua;' .. package.path
_G.vim = require 'vim.s... | {"idx": "gitee_code", "domain": "code", "domain2": "gitee-permissive", "header_footer": "", "lang": "en", "source": "gitee_code-0.jsonl", "prog_lang": "Lua", "repo_name": "minhanghuang/neovim", "path": "src/nvim/generators/preload.lua", "license": "mit", "size": 484} |
### File: src/nvim/getchar.c
// getchar.c: Code related to getting a character from the user or a script
// file, manipulations with redo buffer and stuff buffer.
#include <assert.h>
#include <lauxlib.h>
#include <limits.h>
#include <stdbool.h>
#include <stddef.h>
#include <stdint.h>
#include <stdio.h>
#include <stdli... | {"idx": "gitee_code", "domain": "code", "domain2": "gitee-permissive", "header_footer": "", "lang": "en", "source": "gitee_code-0.jsonl", "prog_lang": "C", "repo_name": "minhanghuang/neovim", "path": "src/nvim/getchar.c", "license": "mit", "size": 96524} |
### File: src/nvim/getchar.h
#pragma once
#include <stddef.h> // IWYU pragma: keep
#include <stdint.h> // IWYU pragma: keep
#include "nvim/eval/typval_defs.h" // IWYU pragma: keep
#include "nvim/getchar_defs.h" // IWYU pragma: keep
#include "nvim/os/fileio_defs.h"
#include "nvim/types_defs.h" // IWYU pragma: kee... | {"idx": "gitee_code", "domain": "code", "domain2": "gitee-permissive", "header_footer": "", "lang": "en", "source": "gitee_code-0.jsonl", "prog_lang": "C", "repo_name": "minhanghuang/neovim", "path": "src/nvim/getchar.h", "license": "mit", "size": 650} |
### File: src/nvim/getchar_defs.h
#pragma once
#include <stdbool.h>
#include <stddef.h>
#include <stdint.h>
#include "nvim/api/private/defs.h"
/// structure used to store one block of the stuff/redo/recording buffers
typedef struct buffblock {
struct buffblock *b_next; ///< pointer to next buffblock
char b_str[... | {"idx": "gitee_code", "domain": "code", "domain2": "gitee-permissive", "header_footer": "", "lang": "en", "source": "gitee_code-0.jsonl", "prog_lang": "C", "repo_name": "minhanghuang/neovim", "path": "src/nvim/getchar_defs.h", "license": "mit", "size": 2015} |
### File: src/nvim/gettext_defs.h
#pragma once
#ifdef HAVE_WORKING_LIBINTL
# include <libintl.h> // IWYU pragma: export
# define _(x) gettext(x) // NOLINT(bugprone-reserved-identifier)
// XXX do we actually need this?
# ifdef gettext_noop
# define N_(x) gettext_noop(x)
# else
# define N_(x) x
# endif
# define NGET... | {"idx": "gitee_code", "domain": "code", "domain2": "gitee-permissive", "header_footer": "", "lang": "en", "source": "gitee_code-0.jsonl", "prog_lang": "C", "repo_name": "minhanghuang/neovim", "path": "src/nvim/gettext_defs.h", "license": "mit", "size": 816} |
### File: src/nvim/globals.h
#pragma once
#include <inttypes.h>
#include <stdbool.h>
#include "nvim/arglist_defs.h"
#include "nvim/ascii_defs.h"
#include "nvim/event/loop.h"
#include "nvim/ex_cmds_defs.h"
#include "nvim/ex_eval_defs.h"
#include "nvim/getchar_defs.h"
#include "nvim/iconv_defs.h"
#include "nvim/macros_... | {"idx": "gitee_code", "domain": "code", "domain2": "gitee-permissive", "header_footer": "", "lang": "en", "source": "gitee_code-0.jsonl", "prog_lang": "C", "repo_name": "minhanghuang/neovim", "path": "src/nvim/globals.h", "license": "mit", "size": 37485} |
### File: src/nvim/grid.c
// Low-level functions to manipulate individual character cells on the
// screen grid.
//
// Most of the routines in this file perform screen (grid) manipulations. The
// given operation is performed physically on the screen. The corresponding
// change is also made to the internal screen imag... | {"idx": "gitee_code", "domain": "code", "domain2": "gitee-permissive", "header_footer": "", "lang": "en", "source": "gitee_code-0.jsonl", "prog_lang": "C", "repo_name": "minhanghuang/neovim", "path": "src/nvim/grid.c", "license": "mit", "size": 33991} |
### File: src/nvim/grid.h
#pragma once
#include <stdbool.h>
#include <stddef.h> // IWYU pragma: keep
#include "nvim/grid_defs.h" // IWYU pragma: keep
#include "nvim/macros_defs.h"
#include "nvim/pos_defs.h"
#include "nvim/types_defs.h"
/// By default, all windows are drawn on a single rectangular grid, represented... | {"idx": "gitee_code", "domain": "code", "domain2": "gitee-permissive", "header_footer": "", "lang": "en", "source": "gitee_code-0.jsonl", "prog_lang": "C", "repo_name": "minhanghuang/neovim", "path": "src/nvim/grid.h", "license": "mit", "size": 1438} |
### File: src/nvim/grid_defs.h
#pragma once
#include <stdbool.h>
#include <stddef.h>
#include <stdint.h>
#include "nvim/pos_defs.h"
#include "nvim/types_defs.h"
// Includes final NUL. MAX_MCO is no longer used, but at least 4*(MAX_MCO+1)+1=29
// ensures we can fit all composed chars which did fit before.
#define MAX... | {"idx": "gitee_code", "domain": "code", "domain2": "gitee-permissive", "header_footer": "", "lang": "en", "source": "gitee_code-0.jsonl", "prog_lang": "C", "repo_name": "minhanghuang/neovim", "path": "src/nvim/grid_defs.h", "license": "mit", "size": 4036} |
### File: src/nvim/hashtab.c
/// @file hashtab.c
///
/// Handling of a hashtable with Vim-specific properties.
///
/// Each item in a hashtable has a NUL terminated string key. A key can appear
/// only once in the table.
///
/// A hash number is computed from the key for quick lookup. When the hashes
/// of two differ... | {"idx": "gitee_code", "domain": "code", "domain2": "gitee-permissive", "header_footer": "", "lang": "en", "source": "gitee_code-0.jsonl", "prog_lang": "C", "repo_name": "minhanghuang/neovim", "path": "src/nvim/hashtab.c", "license": "mit", "size": 13915} |
### File: src/nvim/hashtab.h
#pragma once
#include <stddef.h>
#include "nvim/hashtab_defs.h" // IWYU pragma: keep
/// Magic number used for hashitem "hi_key" value indicating a deleted item
///
/// Only the address is used.
extern char hash_removed;
/// The address of "hash_removed" is used as a magic number
/// f... | {"idx": "gitee_code", "domain": "code", "domain2": "gitee-permissive", "header_footer": "", "lang": "en", "source": "gitee_code-0.jsonl", "prog_lang": "C", "repo_name": "minhanghuang/neovim", "path": "src/nvim/hashtab.h", "license": "mit", "size": 1028} |
### File: src/nvim/hashtab_defs.h
#pragma once
#include <stddef.h>
/// Type for hash number (hash calculation result).
typedef size_t hash_T;
/// Hashtable item.
///
/// Each item has a NUL terminated string key.
/// A key can appear only once in the table.
///
/// A hash number is computed from the key for quick lo... | {"idx": "gitee_code", "domain": "code", "domain2": "gitee-permissive", "header_footer": "", "lang": "en", "source": "gitee_code-0.jsonl", "prog_lang": "C", "repo_name": "minhanghuang/neovim", "path": "src/nvim/hashtab_defs.h", "license": "mit", "size": 2261} |
### File: src/nvim/help.c
// help.c: functions for Vim help
#include <stdbool.h>
#include <stdint.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include "nvim/ascii_defs.h"
#include "nvim/buffer.h"
#include "nvim/buffer_defs.h"
#include "nvim/change.h"
#include "nvim/charset.h"
#include "nvim/cmdexpan... | {"idx": "gitee_code", "domain": "code", "domain2": "gitee-permissive", "header_footer": "", "lang": "en", "source": "gitee_code-0.jsonl", "prog_lang": "C", "repo_name": "minhanghuang/neovim", "path": "src/nvim/help.c", "license": "mit", "size": 36763} |
### File: src/nvim/help.h
#pragma once
#include "nvim/ex_cmds_defs.h" // IWYU pragma: keep
#ifdef INCLUDE_GENERATED_DECLARATIONS
# include "help.h.generated.h"
#endif
| {"idx": "gitee_code", "domain": "code", "domain2": "gitee-permissive", "header_footer": "", "lang": "en", "source": "gitee_code-0.jsonl", "prog_lang": "C", "repo_name": "minhanghuang/neovim", "path": "src/nvim/help.h", "license": "mit", "size": 144} |
### File: src/nvim/highlight.c
// highlight.c: low level code for UI and syntax highlighting
#include <assert.h>
#include <inttypes.h>
#include <lauxlib.h>
#include <string.h>
#include "nvim/api/keysets_defs.h"
#include "nvim/api/private/defs.h"
#include "nvim/api/private/dispatch.h"
#include "nvim/api/private/helper... | {"idx": "gitee_code", "domain": "code", "domain2": "gitee-permissive", "header_footer": "", "lang": "en", "source": "gitee_code-0.jsonl", "prog_lang": "C", "repo_name": "minhanghuang/neovim", "path": "src/nvim/highlight.c", "license": "mit", "size": 36014} |
### File: src/nvim/highlight.h
#pragma once
#include <stdbool.h>
#include "nvim/api/keysets_defs.h" // IWYU pragma: keep
#include "nvim/api/private/defs.h" // IWYU pragma: keep
#include "nvim/buffer_defs.h"
#include "nvim/highlight_defs.h" // IWYU pragma: keep
#include "nvim/macros_defs.h"
#include "nvim/option_va... | {"idx": "gitee_code", "domain": "code", "domain2": "gitee-permissive", "header_footer": "", "lang": "en", "source": "gitee_code-0.jsonl", "prog_lang": "C", "repo_name": "minhanghuang/neovim", "path": "src/nvim/highlight.h", "license": "mit", "size": 3931} |
### File: src/nvim/highlight_defs.h
#pragma once
#include <stdbool.h>
#include <stdint.h>
#include "nvim/api/private/defs.h"
typedef int32_t RgbValue;
/// Highlighting attribute bits.
///
/// sign bit should not be used here, as it identifies invalid highlight
typedef enum {
HL_INVERSE = 0x01,
HL_BOLD ... | {"idx": "gitee_code", "domain": "code", "domain2": "gitee-permissive", "header_footer": "", "lang": "en", "source": "gitee_code-0.jsonl", "prog_lang": "C", "repo_name": "minhanghuang/neovim", "path": "src/nvim/highlight_defs.h", "license": "mit", "size": 5648} |
### File: src/nvim/highlight_group.c
// highlight_group.c: code for managing highlight groups
#include <ctype.h>
#include <stdbool.h>
#include <stdint.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include "klib/kvec.h"
#include "nvim/api/keysets_defs.h"
#include "nvim/api/private/defs.h"
#include "nv... | {"idx": "gitee_code", "domain": "code", "domain2": "gitee-permissive", "header_footer": "", "lang": "en", "source": "gitee_code-0.jsonl", "prog_lang": "C", "repo_name": "minhanghuang/neovim", "path": "src/nvim/highlight_group.c", "license": "mit", "size": 117142} |
### File: src/nvim/highlight_group.h
#pragma once
#include "nvim/api/keysets_defs.h" // IWYU pragma: keep
#include "nvim/api/private/defs.h" // IWYU pragma: keep
#include "nvim/cmdexpand_defs.h" // IWYU pragma: keep
#include "nvim/highlight_defs.h"
#include "nvim/types_defs.h" // IWYU pragma: keep
enum { MAX_HL_I... | {"idx": "gitee_code", "domain": "code", "domain2": "gitee-permissive", "header_footer": "", "lang": "en", "source": "gitee_code-0.jsonl", "prog_lang": "C", "repo_name": "minhanghuang/neovim", "path": "src/nvim/highlight_group.h", "license": "mit", "size": 546} |
### File: src/nvim/iconv_defs.h
#pragma once
#include <errno.h>
#include <iconv.h>
// define some missing constants if necessary
#ifndef EILSEQ
# define EILSEQ 123
#endif
#define ICONV_ERRNO errno
#define ICONV_E2BIG E2BIG
#define ICONV_EINVAL EINVAL
#define ICONV_EILSEQ EILSEQ
| {"idx": "gitee_code", "domain": "code", "domain2": "gitee-permissive", "header_footer": "", "lang": "en", "source": "gitee_code-0.jsonl", "prog_lang": "C", "repo_name": "minhanghuang/neovim", "path": "src/nvim/iconv_defs.h", "license": "mit", "size": 250} |
### File: src/nvim/indent.c
#include <assert.h>
#include <stdbool.h>
#include <stdint.h>
#include <stdlib.h>
#include <string.h>
#include "nvim/ascii_defs.h"
#include "nvim/assert_defs.h"
#include "nvim/buffer.h"
#include "nvim/buffer_defs.h"
#include "nvim/change.h"
#include "nvim/charset.h"
#include "nvim/cursor.h"
... | {"idx": "gitee_code", "domain": "code", "domain2": "gitee-permissive", "header_footer": "", "lang": "en", "source": "gitee_code-0.jsonl", "prog_lang": "C", "repo_name": "minhanghuang/neovim", "path": "src/nvim/indent.c", "license": "mit", "size": 41168} |
### File: src/nvim/indent.h
#pragma once
#include "nvim/ex_cmds_defs.h" // IWYU pragma: keep
#include "nvim/pos_defs.h" // IWYU pragma: keep
#include "nvim/types_defs.h" // IWYU pragma: keep
typedef int (*IndentGetter)(void);
/// flags for set_indent()
enum {
SIN_CHANGED = 1, ///< call changed_bytes() when lin... | {"idx": "gitee_code", "domain": "code", "domain2": "gitee-permissive", "header_footer": "", "lang": "en", "source": "gitee_code-0.jsonl", "prog_lang": "C", "repo_name": "minhanghuang/neovim", "path": "src/nvim/indent.h", "license": "mit", "size": 554} |
### File: src/nvim/indent_c.c
#include <inttypes.h>
#include <stdbool.h>
#include <stddef.h>
#include <stdlib.h>
#include <string.h>
#include "nvim/ascii_defs.h"
#include "nvim/buffer_defs.h"
#include "nvim/charset.h"
#include "nvim/cursor.h"
#include "nvim/edit.h"
#include "nvim/globals.h"
#include "nvim/indent.h"
#i... | {"idx": "gitee_code", "domain": "code", "domain2": "gitee-permissive", "header_footer": "", "lang": "en", "source": "gitee_code-0.jsonl", "prog_lang": "C", "repo_name": "minhanghuang/neovim", "path": "src/nvim/indent_c.c", "license": "mit", "size": 113537} |
### File: src/nvim/indent_c.h
#pragma once
#include "nvim/pos_defs.h" // IWYU pragma: keep
#include "nvim/types_defs.h" // IWYU pragma: keep
#ifdef INCLUDE_GENERATED_DECLARATIONS
# include "indent_c.h.generated.h"
#endif
| {"idx": "gitee_code", "domain": "code", "domain2": "gitee-permissive", "header_footer": "", "lang": "en", "source": "gitee_code-0.jsonl", "prog_lang": "C", "repo_name": "minhanghuang/neovim", "path": "src/nvim/indent_c.h", "license": "mit", "size": 195} |
### File: src/nvim/input.c
// input.c: high level functions for prompting the user or input
// like yes/no or number prompts.
#include <limits.h>
#include <stdbool.h>
#include <stdint.h>
#include <string.h>
#include "nvim/ascii_defs.h"
#include "nvim/getchar.h"
#include "nvim/gettext_defs.h"
#include "nvim/globals.h"... | {"idx": "gitee_code", "domain": "code", "domain2": "gitee-permissive", "header_footer": "", "lang": "en", "source": "gitee_code-0.jsonl", "prog_lang": "C", "repo_name": "minhanghuang/neovim", "path": "src/nvim/input.c", "license": "mit", "size": 7055} |
### File: src/nvim/input.h
#pragma once
#include "nvim/event/defs.h" // IWYU pragma: keep
#ifdef INCLUDE_GENERATED_DECLARATIONS
# include "input.h.generated.h"
#endif
| {"idx": "gitee_code", "domain": "code", "domain2": "gitee-permissive", "header_footer": "", "lang": "en", "source": "gitee_code-0.jsonl", "prog_lang": "C", "repo_name": "minhanghuang/neovim", "path": "src/nvim/input.h", "license": "mit", "size": 143} |
### File: src/nvim/insexpand.c
// insexpand.c: functions for Insert mode completion
#include <assert.h>
#include <limits.h>
#include <stdbool.h>
#include <stddef.h>
#include <stdint.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include "klib/kvec.h"
#include "nvim/ascii_defs.h"
#include "nvim/autocmd... | {"idx": "gitee_code", "domain": "code", "domain2": "gitee-permissive", "header_footer": "", "lang": "en", "source": "gitee_code-0.jsonl", "prog_lang": "C", "repo_name": "minhanghuang/neovim", "path": "src/nvim/insexpand.c", "license": "mit", "size": 147208} |
### File: src/nvim/insexpand.h
#pragma once
#include "nvim/option_defs.h" // IWYU pragma: keep
#include "nvim/pos_defs.h" // IWYU pragma: keep
#include "nvim/types_defs.h" // IWYU pragma: keep
#include "nvim/vim_defs.h" // IWYU pragma: keep
#ifdef INCLUDE_GENERATED_DECLARATIONS
# include "insexpand.h.generated.h"... | {"idx": "gitee_code", "domain": "code", "domain2": "gitee-permissive", "header_footer": "", "lang": "en", "source": "gitee_code-0.jsonl", "prog_lang": "C", "repo_name": "minhanghuang/neovim", "path": "src/nvim/insexpand.h", "license": "mit", "size": 297} |
### File: src/nvim/keycodes.c
#include <assert.h>
#include <inttypes.h>
#include <limits.h>
#include <stdbool.h>
#include <stdio.h>
#include <string.h>
#include <uv.h>
#include "nvim/ascii_defs.h"
#include "nvim/charset.h"
#include "nvim/errors.h"
#include "nvim/eval/typval_defs.h"
#include "nvim/eval/vars.h"
#include... | {"idx": "gitee_code", "domain": "code", "domain2": "gitee-permissive", "header_footer": "", "lang": "en", "source": "gitee_code-0.jsonl", "prog_lang": "C", "repo_name": "minhanghuang/neovim", "path": "src/nvim/keycodes.c", "license": "mit", "size": 37057} |
### File: src/nvim/keycodes.h
#pragma once
#include "nvim/ascii_defs.h"
#include "nvim/eval/typval_defs.h" // IWYU pragma: keep
// Keycode definitions for special keys.
//
// Any special key code sequences are replaced by these codes.
/// For MS-DOS some keys produce codes larger than 0xff. They are split into two
... | {"idx": "gitee_code", "domain": "code", "domain2": "gitee-permissive", "header_footer": "", "lang": "en", "source": "gitee_code-0.jsonl", "prog_lang": "C", "repo_name": "minhanghuang/neovim", "path": "src/nvim/keycodes.h", "license": "mit", "size": 19582} |
### File: src/nvim/lib/queue_defs.h
// Queue implemented by circularly-linked list.
//
// Adapted from libuv. Simpler and more efficient than klist.h for implementing
// queues that support arbitrary insertion/removal.
//
// Copyright (c) 2013, Ben Noordhuis <info@bnoordhuis.nl>
//
// Permission to use, copy, modify, a... | {"idx": "gitee_code", "domain": "code", "domain2": "gitee-permissive", "header_footer": "", "lang": "en", "source": "gitee_code-0.jsonl", "prog_lang": "C", "repo_name": "minhanghuang/neovim", "path": "src/nvim/lib/queue_defs.h", "license": "mit", "size": 2652} |
### File: src/nvim/linematch.c
#include <assert.h>
#include <math.h>
#include <stdbool.h>
#include <stddef.h>
#include <stdint.h>
#include <string.h>
#include "nvim/ascii_defs.h"
#include "nvim/linematch.h"
#include "nvim/macros_defs.h"
#include "nvim/memory.h"
#include "nvim/pos_defs.h"
#define LN_MAX_BUFS 8
#define... | {"idx": "gitee_code", "domain": "code", "domain2": "gitee-permissive", "header_footer": "", "lang": "en", "source": "gitee_code-0.jsonl", "prog_lang": "C", "repo_name": "minhanghuang/neovim", "path": "src/nvim/linematch.c", "license": "mit", "size": 14393} |
### File: src/nvim/linematch.h
#pragma once
#include <stddef.h> // IWYU pragma: keep
#include "nvim/pos_defs.h" // IWYU pragma: keep
#ifdef INCLUDE_GENERATED_DECLARATIONS
# include "linematch.h.generated.h"
#endif
| {"idx": "gitee_code", "domain": "code", "domain2": "gitee-permissive", "header_footer": "", "lang": "en", "source": "gitee_code-0.jsonl", "prog_lang": "C", "repo_name": "minhanghuang/neovim", "path": "src/nvim/linematch.h", "license": "mit", "size": 188} |
### File: src/nvim/log.c
//
// Log module
//
// How Linux printk() handles recursion, buffering, etc:
// https://lwn.net/Articles/780556/
//
#include <assert.h>
#include <errno.h>
#include <inttypes.h>
#include <stdarg.h>
#include <stdbool.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <time.h>... | {"idx": "gitee_code", "domain": "code", "domain2": "gitee-permissive", "header_footer": "", "lang": "en", "source": "gitee_code-0.jsonl", "prog_lang": "C", "repo_name": "minhanghuang/neovim", "path": "src/nvim/log.c", "license": "mit", "size": 10203} |
### File: src/nvim/log.h
#pragma once
#include <stdbool.h>
#include <stdio.h>
#include "auto/config.h"
#include "nvim/macros_defs.h"
// USDT probes. Example invocation:
// NVIM_PROBE(nvim_foo_bar, 1, string.data);
#if defined(HAVE_SYS_SDT_H)
# include <sys/sdt.h> // IWYU pragma: keep
# define NVIM_PROBE(name, ... | {"idx": "gitee_code", "domain": "code", "domain2": "gitee-permissive", "header_footer": "", "lang": "en", "source": "gitee_code-0.jsonl", "prog_lang": "C", "repo_name": "minhanghuang/neovim", "path": "src/nvim/log.h", "license": "mit", "size": 1755} |
### File: src/nvim/lua/api_wrappers.c
#include <lauxlib.h>
#include <lua.h>
#include <lualib.h>
#include "nvim/api/private/defs.h"
#include "nvim/api/private/dispatch.h"
#include "nvim/api/private/helpers.h"
#include "nvim/errors.h"
#include "nvim/ex_docmd.h"
#include "nvim/ex_getln.h"
#include "nvim/func_attr.h"
#inc... | {"idx": "gitee_code", "domain": "code", "domain2": "gitee-permissive", "header_footer": "", "lang": "en", "source": "gitee_code-0.jsonl", "prog_lang": "C", "repo_name": "minhanghuang/neovim", "path": "src/nvim/lua/api_wrappers.c", "license": "mit", "size": 481} |
### File: src/nvim/lua/base64.c
#include <assert.h>
#include <lauxlib.h>
#include <lua.h>
#include <stddef.h>
#include "nvim/base64.h"
#include "nvim/lua/base64.h"
#include "nvim/memory.h"
#ifdef INCLUDE_GENERATED_DECLARATIONS
# include "lua/base64.c.generated.h"
#endif
static int nlua_base64_encode(lua_State *L)
{
... | {"idx": "gitee_code", "domain": "code", "domain2": "gitee-permissive", "header_footer": "", "lang": "en", "source": "gitee_code-0.jsonl", "prog_lang": "C", "repo_name": "minhanghuang/neovim", "path": "src/nvim/lua/base64.c", "license": "mit", "size": 1431} |
### File: src/nvim/lua/base64.h
#pragma once
#include <lua.h> // IWYU pragma: keep
#ifdef INCLUDE_GENERATED_DECLARATIONS
# include "lua/base64.h.generated.h"
#endif
| {"idx": "gitee_code", "domain": "code", "domain2": "gitee-permissive", "header_footer": "", "lang": "en", "source": "gitee_code-0.jsonl", "prog_lang": "C", "repo_name": "minhanghuang/neovim", "path": "src/nvim/lua/base64.h", "license": "mit", "size": 136} |
### File: src/nvim/lua/converter.c
#include <assert.h>
#include <lauxlib.h>
#include <lua.h>
#include <stdbool.h>
#include <stddef.h>
#include <stdint.h>
#include <stdlib.h>
#include <string.h>
#include "klib/kvec.h"
#include "nvim/api/private/defs.h"
#include "nvim/api/private/helpers.h"
#include "nvim/ascii_defs.h"
... | {"idx": "gitee_code", "domain": "code", "domain2": "gitee-permissive", "header_footer": "", "lang": "en", "source": "gitee_code-0.jsonl", "prog_lang": "C", "repo_name": "minhanghuang/neovim", "path": "src/nvim/lua/converter.c", "license": "mit", "size": 43902} |
### File: src/nvim/lua/converter.h
#pragma once
#include <lua.h> // IWYU pragma: keep
#include "nvim/api/private/defs.h" // IWYU pragma: keep
#include "nvim/eval/typval_defs.h" // IWYU pragma: keep
#define nlua_pop_Buffer nlua_pop_handle
#define nlua_pop_Window nlua_pop_handle
#define nlua_pop_Tabpage nlua_pop_ha... | {"idx": "gitee_code", "domain": "code", "domain2": "gitee-permissive", "header_footer": "", "lang": "en", "source": "gitee_code-0.jsonl", "prog_lang": "C", "repo_name": "minhanghuang/neovim", "path": "src/nvim/lua/converter.h", "license": "mit", "size": 581} |
### File: src/nvim/lua/executor.c
#include <assert.h>
#include <inttypes.h>
#include <lauxlib.h>
#include <lua.h>
#include <lualib.h>
#include <stddef.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <tree_sitter/api.h>
#include <uv.h>
#include "klib/kvec.h"
#include "luv/luv.h"
#include "nvim/ap... | {"idx": "gitee_code", "domain": "code", "domain2": "gitee-permissive", "header_footer": "", "lang": "en", "source": "gitee_code-0.jsonl", "prog_lang": "C", "repo_name": "minhanghuang/neovim", "path": "src/nvim/lua/executor.c", "license": "mit", "size": 65233} |
### File: src/nvim/lua/secure.c
#include <lua.h>
#include <stdbool.h>
#include <string.h>
#include "nvim/charset.h"
#include "nvim/errors.h"
#include "nvim/ex_cmds_defs.h"
#include "nvim/gettext_defs.h"
#include "nvim/globals.h"
#include "nvim/lua/executor.h"
#include "nvim/lua/secure.h"
#include "nvim/memory.h"
#incl... | {"idx": "gitee_code", "domain": "code", "domain2": "gitee-permissive", "header_footer": "", "lang": "en", "source": "gitee_code-0.jsonl", "prog_lang": "C", "repo_name": "minhanghuang/neovim", "path": "src/nvim/lua/secure.c", "license": "mit", "size": 2950} |
### File: src/nvim/lua/secure.h
#pragma once
#include "nvim/ex_cmds_defs.h" // IWYU pragma: keep
#ifdef INCLUDE_GENERATED_DECLARATIONS
# include "lua/secure.h.generated.h"
#endif
| {"idx": "gitee_code", "domain": "code", "domain2": "gitee-permissive", "header_footer": "", "lang": "en", "source": "gitee_code-0.jsonl", "prog_lang": "C", "repo_name": "minhanghuang/neovim", "path": "src/nvim/lua/secure.h", "license": "mit", "size": 150} |
### File: src/nvim/lua/spell.c
#include <assert.h>
#include <lauxlib.h>
#include <limits.h>
#include <lua.h>
#include <stdbool.h>
#include <stddef.h>
#include "nvim/ascii_defs.h"
#include "nvim/buffer_defs.h"
#include "nvim/errors.h"
#include "nvim/gettext_defs.h"
#include "nvim/globals.h"
#include "nvim/highlight_def... | {"idx": "gitee_code", "domain": "code", "domain2": "gitee-permissive", "header_footer": "", "lang": "en", "source": "gitee_code-0.jsonl", "prog_lang": "C", "repo_name": "minhanghuang/neovim", "path": "src/nvim/lua/spell.c", "license": "mit", "size": 2500} |
### File: src/nvim/lua/spell.h
#pragma once
#include <lua.h> // IWYU pragma: keep
#ifdef INCLUDE_GENERATED_DECLARATIONS
# include "lua/spell.h.generated.h"
#endif
| {"idx": "gitee_code", "domain": "code", "domain2": "gitee-permissive", "header_footer": "", "lang": "en", "source": "gitee_code-0.jsonl", "prog_lang": "C", "repo_name": "minhanghuang/neovim", "path": "src/nvim/lua/spell.h", "license": "mit", "size": 135} |
### File: src/nvim/lua/stdlib.c
#include <assert.h>
#include <lauxlib.h>
#include <lua.h>
#include <stdarg.h>
#include <stdbool.h>
#include <stddef.h>
#include <stdint.h>
#include <string.h>
#include <uv.h>
#ifdef NVIM_VENDOR_BIT
# include "bit.h"
#endif
#include "cjson/lua_cjson.h"
#include "mpack/lmpack.h"
#include... | {"idx": "gitee_code", "domain": "code", "domain2": "gitee-permissive", "header_footer": "", "lang": "en", "source": "gitee_code-0.jsonl", "prog_lang": "C", "repo_name": "minhanghuang/neovim", "path": "src/nvim/lua/stdlib.c", "license": "mit", "size": 20555} |
### File: src/nvim/lua/stdlib.h
#pragma once
#include <lua.h> // IWYU pragma: keep
#ifdef INCLUDE_GENERATED_DECLARATIONS
# include "lua/stdlib.h.generated.h"
#endif
| {"idx": "gitee_code", "domain": "code", "domain2": "gitee-permissive", "header_footer": "", "lang": "en", "source": "gitee_code-0.jsonl", "prog_lang": "C", "repo_name": "minhanghuang/neovim", "path": "src/nvim/lua/stdlib.h", "license": "mit", "size": 136} |
### File: src/nvim/lua/treesitter.c
// lua bindings for treesitter.
// NB: this file mostly contains a generic lua interface for treesitter
// trees and nodes, and could be broken out as a reusable lua package
#include <assert.h>
#include <ctype.h>
#include <lauxlib.h>
#include <limits.h>
#include <lua.h>
#include <st... | {"idx": "gitee_code", "domain": "code", "domain2": "gitee-permissive", "header_footer": "", "lang": "en", "source": "gitee_code-0.jsonl", "prog_lang": "C", "repo_name": "minhanghuang/neovim", "path": "src/nvim/lua/treesitter.c", "license": "mit", "size": 41944} |
### File: src/nvim/lua/treesitter.h
#pragma once
#include <lua.h> // IWYU pragma: keep
#include <stdint.h>
#include "nvim/macros_defs.h"
#ifdef INCLUDE_GENERATED_DECLARATIONS
# include "lua/treesitter.h.generated.h"
#endif
EXTERN uint64_t tslua_query_parse_count INIT( = 0);
| {"idx": "gitee_code", "domain": "code", "domain2": "gitee-permissive", "header_footer": "", "lang": "en", "source": "gitee_code-0.jsonl", "prog_lang": "C", "repo_name": "minhanghuang/neovim", "path": "src/nvim/lua/treesitter.h", "license": "mit", "size": 244} |
### File: src/nvim/lua/xdiff.c
#include <lauxlib.h>
#include <lua.h>
#include <stdbool.h>
#include <stdint.h>
#include <string.h>
#include "luaconf.h"
#include "nvim/api/keysets_defs.h"
#include "nvim/api/private/defs.h"
#include "nvim/api/private/dispatch.h"
#include "nvim/api/private/helpers.h"
#include "nvim/linema... | {"idx": "gitee_code", "domain": "code", "domain2": "gitee-permissive", "header_footer": "", "lang": "en", "source": "gitee_code-0.jsonl", "prog_lang": "C", "repo_name": "minhanghuang/neovim", "path": "src/nvim/lua/xdiff.c", "license": "mit", "size": 10055} |
### File: src/nvim/lua/xdiff.h
#pragma once
#include <lua.h> // IWYU pragma: keep
#ifdef INCLUDE_GENERATED_DECLARATIONS
# include "lua/xdiff.h.generated.h"
#endif
| {"idx": "gitee_code", "domain": "code", "domain2": "gitee-permissive", "header_footer": "", "lang": "en", "source": "gitee_code-0.jsonl", "prog_lang": "C", "repo_name": "minhanghuang/neovim", "path": "src/nvim/lua/xdiff.h", "license": "mit", "size": 135} |
### File: src/nvim/macros_defs.h
#pragma once
#include "auto/config.h"
// EXTERN is only defined in main.c. That's where global variables are
// actually defined and initialized.
#ifndef EXTERN
# define EXTERN extern
# define INIT(...)
#else
# ifndef INIT
# define INIT(...) __VA_ARGS__
# endif
#endif
#ifndef MIN
# ... | {"idx": "gitee_code", "domain": "code", "domain2": "gitee-permissive", "header_footer": "", "lang": "en", "source": "gitee_code-0.jsonl", "prog_lang": "C", "repo_name": "minhanghuang/neovim", "path": "src/nvim/macros_defs.h", "license": "mit", "size": 5593} |
### File: src/nvim/main.c
// Make sure extern symbols are exported on Windows
#ifdef WIN32
# define EXTERN __declspec(dllexport)
#else
# define EXTERN
#endif
#include <assert.h>
#include <limits.h>
#include <msgpack/pack.h>
#include <stdbool.h>
#include <stdint.h>
#include <stdio.h>
#include <stdlib.h>
#include <string... | {"idx": "gitee_code", "domain": "code", "domain2": "gitee-permissive", "header_footer": "", "lang": "en", "source": "gitee_code-0.jsonl", "prog_lang": "C", "repo_name": "minhanghuang/neovim", "path": "src/nvim/main.c", "license": "mit", "size": 67962} |
### File: src/nvim/main.h
#pragma once
#include <stdbool.h>
#include "nvim/event/loop.h"
#include "nvim/types_defs.h"
// Maximum number of commands from + or -c arguments.
#define MAX_ARG_CMDS 10
extern Loop main_loop;
// Struct for various parameters passed between main() and other functions.
typedef struct {
i... | {"idx": "gitee_code", "domain": "code", "domain2": "gitee-permissive", "header_footer": "", "lang": "en", "source": "gitee_code-0.jsonl", "prog_lang": "C", "repo_name": "minhanghuang/neovim", "path": "src/nvim/main.h", "license": "mit", "size": 2089} |
### File: src/nvim/map.c
// map.c: Hash maps and sets
//
// parts of the implementation derived from khash.h as part of klib (MIT license)
//
// NOTE: Callers must manage memory (allocate) for keys and values.
// Map and Set does not make its own copy of the key or value.
#include <stdbool.h>
#include <string.h>... | {"idx": "gitee_code", "domain": "code", "domain2": "gitee-permissive", "header_footer": "", "lang": "en", "source": "gitee_code-0.jsonl", "prog_lang": "C", "repo_name": "minhanghuang/neovim", "path": "src/nvim/map.c", "license": "mit", "size": 5150} |
### File: src/nvim/map_defs.h
#pragma once
#include <stdbool.h>
#include <stdint.h>
#include <stdio.h>
#include "nvim/api/private/defs.h"
#include "nvim/assert_defs.h"
#include "nvim/highlight_defs.h"
#include "nvim/types_defs.h"
#if defined(__NetBSD__)
# undef uint64_t
# define uint64_t uint64_t
#endif
typedef con... | {"idx": "gitee_code", "domain": "code", "domain2": "gitee-permissive", "header_footer": "", "lang": "en", "source": "gitee_code-0.jsonl", "prog_lang": "C", "repo_name": "minhanghuang/neovim", "path": "src/nvim/map_defs.h", "license": "mit", "size": 6384} |
### File: src/nvim/map_glyph_cache.c
// Specialized version of Set() where interned strings is stored in a compact,
// NUL-separated char array.
// `String key` lookup keys don't need to be NULL terminated, but they
// must not contain embedded NUL:s. When reading a key from set->keys, they
// are always NUL terminated... | {"idx": "gitee_code", "domain": "code", "domain2": "gitee-permissive", "header_footer": "", "lang": "en", "source": "gitee_code-0.jsonl", "prog_lang": "C", "repo_name": "minhanghuang/neovim", "path": "src/nvim/map_glyph_cache.c", "license": "mit", "size": 3173} |
### File: src/nvim/map_key_impl.c.h
#include "nvim/map_defs.h"
#include "nvim/memory.h"
#ifndef KEY_NAME
// Don't error out. it is nice to type-check the file in isolation, in clangd or otherwise
# define KEY_NAME(x) x##int
# define hash_int(x) ((uint32_t)x)
# define equal_int(x, y) ((x) == (y))
#endif
#define SET_TY... | {"idx": "gitee_code", "domain": "code", "domain2": "gitee-permissive", "header_footer": "", "lang": "en", "source": "gitee_code-0.jsonl", "prog_lang": "C", "repo_name": "minhanghuang/neovim", "path": "src/nvim/map_key_impl.c.h", "license": "mit", "size": 4572} |
### File: src/nvim/map_value_impl.c.h
#include "nvim/assert_defs.h"
#include "nvim/map_defs.h"
#if !defined(KEY_NAME) || !defined(VAL_NAME)
// Don't error out. it is nice to type-check the file in isolation, in clangd or otherwise
# define KEY_NAME(x) x##int
# define VAL_NAME(x) quasiquote(x, ptr_t)
#endif
#define MA... | {"idx": "gitee_code", "domain": "code", "domain2": "gitee-permissive", "header_footer": "", "lang": "en", "source": "gitee_code-0.jsonl", "prog_lang": "C", "repo_name": "minhanghuang/neovim", "path": "src/nvim/map_value_impl.c.h", "license": "mit", "size": 1677} |
### File: src/nvim/mapping.c
// mapping.c: Code for mappings and abbreviations.
#include <assert.h>
#include <lauxlib.h>
#include <limits.h>
#include <stdbool.h>
#include <stdint.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include "nvim/api/keysets_defs.h"
#include "nvim/api/private/converter.h"
#i... | {"idx": "gitee_code", "domain": "code", "domain2": "gitee-permissive", "header_footer": "", "lang": "en", "source": "gitee_code-0.jsonl", "prog_lang": "C", "repo_name": "minhanghuang/neovim", "path": "src/nvim/mapping.c", "license": "mit", "size": 89423} |
### File: src/nvim/mapping.h
#pragma once
#include <stdint.h> // IWYU pragma: keep
#include <stdio.h> // IWYU pragma: keep
#include "nvim/api/keysets_defs.h" // IWYU pragma: keep
#include "nvim/api/private/defs.h" // IWYU pragma: keep
#include "nvim/cmdexpand_defs.h" // IWYU pragma: keep
#include "nvim/eval/typv... | {"idx": "gitee_code", "domain": "code", "domain2": "gitee-permissive", "header_footer": "", "lang": "en", "source": "gitee_code-0.jsonl", "prog_lang": "C", "repo_name": "minhanghuang/neovim", "path": "src/nvim/mapping.h", "license": "mit", "size": 1513} |
### File: src/nvim/mapping_defs.h
#pragma once
#include <stdbool.h>
#include "nvim/eval/typval_defs.h"
enum { MAXMAPLEN = 50, }; ///< Maximum length of key sequence to be mapped.
/// Structure used for mappings and abbreviations.
typedef struct mapblock mapblock_T;
struct mapblock {
mapblock_T *m_next; ///... | {"idx": "gitee_code", "domain": "code", "domain2": "gitee-permissive", "header_footer": "", "lang": "en", "source": "gitee_code-0.jsonl", "prog_lang": "C", "repo_name": "minhanghuang/neovim", "path": "src/nvim/mapping_defs.h", "license": "mit", "size": 1124} |
### File: src/nvim/mark.c
// mark.c: functions for setting marks and jumping to them
#include <assert.h>
#include <limits.h>
#include <stdbool.h>
#include <stdint.h>
#include <stdio.h>
#include <string.h>
#include "nvim/ascii_defs.h"
#include "nvim/buffer.h"
#include "nvim/buffer_defs.h"
#include "nvim/charset.h"
#in... | {"idx": "gitee_code", "domain": "code", "domain2": "gitee-permissive", "header_footer": "", "lang": "en", "source": "gitee_code-0.jsonl", "prog_lang": "C", "repo_name": "minhanghuang/neovim", "path": "src/nvim/mark.c", "license": "mit", "size": 57061} |
### File: src/nvim/mark.h
#pragma once
#include <locale.h>
#include "nvim/ascii_defs.h"
#include "nvim/ex_cmds_defs.h" // IWYU pragma: keep
#include "nvim/extmark_defs.h" // IWYU pragma: keep
#include "nvim/macros_defs.h"
#include "nvim/mark_defs.h" // IWYU pragma: keep
#include "nvim/os/time.h"
#ifdef INCLUDE_GE... | {"idx": "gitee_code", "domain": "code", "domain2": "gitee-permissive", "header_footer": "", "lang": "en", "source": "gitee_code-0.jsonl", "prog_lang": "C", "repo_name": "minhanghuang/neovim", "path": "src/nvim/mark.h", "license": "mit", "size": 2238} |
### File: src/nvim/mark_defs.h
#pragma once
#include "nvim/eval/typval_defs.h"
#include "nvim/os/time_defs.h"
#ifdef INCLUDE_GENERATED_DECLARATIONS
# include "mark_defs.h.inline.generated.h"
#endif
// marks: positions in a file
// (a normal mark is a lnum/col pair, the same as a file position)
/// Flags for outcome... | {"idx": "gitee_code", "domain": "code", "domain2": "gitee-permissive", "header_footer": "", "lang": "en", "source": "gitee_code-0.jsonl", "prog_lang": "C", "repo_name": "minhanghuang/neovim", "path": "src/nvim/mark_defs.h", "license": "mit", "size": 3709} |
### File: src/nvim/marktree.c
// Tree data structure for storing marks at (row, col) positions and updating
// them to arbitrary text changes. Derivative work of kbtree in klib, whose
// copyright notice is reproduced below. Also inspired by the design of the
// marker tree data structure of the Atom editor, regarding ... | {"idx": "gitee_code", "domain": "code", "domain2": "gitee-permissive", "header_footer": "", "lang": "en", "source": "gitee_code-0.jsonl", "prog_lang": "C", "repo_name": "minhanghuang/neovim", "path": "src/nvim/marktree.c", "license": "mit", "size": 75088} |
### File: src/nvim/marktree.h
#pragma once
#include <stdbool.h>
#include <stddef.h> // IWYU pragma: keep
#include <stdint.h>
#include "nvim/buffer_defs.h"
#include "nvim/decoration_defs.h"
#include "nvim/marktree_defs.h" // IWYU pragma: keep
#include "nvim/pos_defs.h" // IWYU pragma: keep
// only for debug functio... | {"idx": "gitee_code", "domain": "code", "domain2": "gitee-permissive", "header_footer": "", "lang": "en", "source": "gitee_code-0.jsonl", "prog_lang": "C", "repo_name": "minhanghuang/neovim", "path": "src/nvim/marktree.h", "license": "mit", "size": 4194} |
### File: src/nvim/marktree_defs.h
#pragma once
#include <stdbool.h>
#include <stddef.h>
#include <stdint.h>
#include "nvim/decoration_defs.h"
#include "nvim/map_defs.h"
enum {
MT_MAX_DEPTH = 20,
MT_BRANCH_FACTOR = 10,
// note max branch is actually 2*MT_BRANCH_FACTOR
// and strictly this is ceil(log2(2*... | {"idx": "gitee_code", "domain": "code", "domain2": "gitee-permissive", "header_footer": "", "lang": "en", "source": "gitee_code-0.jsonl", "prog_lang": "C", "repo_name": "minhanghuang/neovim", "path": "src/nvim/marktree_defs.h", "license": "mit", "size": 2377} |
### File: src/nvim/match.c
// match.c: functions for highlighting matches
#include <assert.h>
#include <inttypes.h>
#include <stdbool.h>
#include <stdio.h>
#include <string.h>
#include "nvim/ascii_defs.h"
#include "nvim/buffer_defs.h"
#include "nvim/charset.h"
#include "nvim/drawscreen.h"
#include "nvim/errors.h"
#in... | {"idx": "gitee_code", "domain": "code", "domain2": "gitee-permissive", "header_footer": "", "lang": "en", "source": "gitee_code-0.jsonl", "prog_lang": "C", "repo_name": "minhanghuang/neovim", "path": "src/nvim/match.c", "license": "mit", "size": 37077} |
### File: src/nvim/match.h
#pragma once
#include "nvim/buffer_defs.h" // IWYU pragma: keep
#include "nvim/eval/typval_defs.h" // IWYU pragma: keep
#include "nvim/ex_cmds_defs.h" // IWYU pragma: keep
#include "nvim/types_defs.h" // IWYU pragma: keep
#ifdef INCLUDE_GENERATED_DECLARATIONS
# include "match.h.generate... | {"idx": "gitee_code", "domain": "code", "domain2": "gitee-permissive", "header_footer": "", "lang": "en", "source": "gitee_code-0.jsonl", "prog_lang": "C", "repo_name": "minhanghuang/neovim", "path": "src/nvim/match.h", "license": "mit", "size": 305} |
### File: src/nvim/math.c
// uncrustify:off
#include <math.h>
// uncrustify:on
#include <limits.h>
#include <stdint.h>
#include <string.h>
#ifdef HAVE_BITSCANFORWARD64
# include <intrin.h> // Required for _BitScanForward64
#endif
#include "nvim/math.h"
#include "nvim/vim_defs.h"
#ifdef INCLUDE_GENERATED_DECLARATION... | {"idx": "gitee_code", "domain": "code", "domain2": "gitee-permissive", "header_footer": "", "lang": "en", "source": "gitee_code-0.jsonl", "prog_lang": "C", "repo_name": "minhanghuang/neovim", "path": "src/nvim/math.c", "license": "mit", "size": 2072} |
### File: src/nvim/math.h
#pragma once
#include <stdbool.h>
#include <stdint.h>
/// Check if number is a power of two
static inline bool is_power_of_two(uint64_t x)
{
return x != 0 && ((x & (x - 1)) == 0);
}
#ifdef INCLUDE_GENERATED_DECLARATIONS
# include "math.h.generated.h"
#endif
| {"idx": "gitee_code", "domain": "code", "domain2": "gitee-permissive", "header_footer": "", "lang": "en", "source": "gitee_code-0.jsonl", "prog_lang": "C", "repo_name": "minhanghuang/neovim", "path": "src/nvim/math.h", "license": "mit", "size": 263} |
### File: src/nvim/mbyte.c
/// mbyte.c: Code specifically for handling multi-byte characters.
/// Multibyte extensions partly by Sung-Hoon Baek
///
/// Strings internal to Nvim are always encoded as UTF-8 (thus the legacy
/// 'encoding' option is always "utf-8").
///
/// The cell width on the display needs to be determ... | {"idx": "gitee_code", "domain": "code", "domain2": "gitee-permissive", "header_footer": "", "lang": "en", "source": "gitee_code-0.jsonl", "prog_lang": "C", "repo_name": "minhanghuang/neovim", "path": "src/nvim/mbyte.c", "license": "mit", "size": 88595} |
### File: src/nvim/mbyte.h
#pragma once
#include <stdbool.h>
#include <stdint.h>
#include <sys/types.h> // IWYU pragma: keep
#include <uv.h> // IWYU pragma: keep
#include "nvim/cmdexpand_defs.h" // IWYU pragma: keep
#include "nvim/eval/typval_defs.h" // IWYU pragma: keep
#include "nvim/macros_defs.h"
#include "nv... | {"idx": "gitee_code", "domain": "code", "domain2": "gitee-permissive", "header_footer": "", "lang": "en", "source": "gitee_code-0.jsonl", "prog_lang": "C", "repo_name": "minhanghuang/neovim", "path": "src/nvim/mbyte.h", "license": "mit", "size": 4292} |
### File: src/nvim/mbyte_defs.h
#pragma once
#include <stdbool.h>
#include <stdint.h>
#include "nvim/iconv_defs.h"
enum {
/// Maximum number of bytes in a multi-byte character. It can be one 32-bit
/// character of up to 6 bytes, or one 16-bit character of up to three bytes
/// plus six following composing ch... | {"idx": "gitee_code", "domain": "code", "domain2": "gitee-permissive", "header_footer": "", "lang": "en", "source": "gitee_code-0.jsonl", "prog_lang": "C", "repo_name": "minhanghuang/neovim", "path": "src/nvim/mbyte_defs.h", "license": "mit", "size": 2051} |
### File: src/nvim/memfile.c
/// An abstraction to handle blocks of memory which can be stored in a file.
/// This is the implementation of a sort of virtual memory.
///
/// A memfile consists of a sequence of blocks:
/// - Blocks numbered from 0 upwards have been assigned a place in the actual
/// file. The block nu... | {"idx": "gitee_code", "domain": "code", "domain2": "gitee-permissive", "header_footer": "", "lang": "en", "source": "gitee_code-0.jsonl", "prog_lang": "C", "repo_name": "minhanghuang/neovim", "path": "src/nvim/memfile.c", "license": "mit", "size": 24113} |
### File: src/nvim/memfile.h
#pragma once
#include "nvim/memfile_defs.h" // IWYU pragma: keep
#include "nvim/types_defs.h" // IWYU pragma: keep
/// flags for mf_sync()
enum {
MFS_ALL = 1, ///< also sync blocks with negative numbers
MFS_STOP = 2, ///< stop syncing when a character is available
MFS_FLUSH =... | {"idx": "gitee_code", "domain": "code", "domain2": "gitee-permissive", "header_footer": "", "lang": "en", "source": "gitee_code-0.jsonl", "prog_lang": "C", "repo_name": "minhanghuang/neovim", "path": "src/nvim/memfile.h", "license": "mit", "size": 750} |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.