mirror of
https://github.com/neovim/neovim.git
synced 2025-02-25 18:55:25 -06:00
refactor: format with uncrustify #15872
* refactor: format with uncrustify * refactor: fix function parameter comments
This commit is contained in:
parent
09307e64df
commit
8c74c895b3
807
src/nvim/tag.c
807
src/nvim/tag.c
File diff suppressed because it is too large
Load Diff
@ -2,14 +2,14 @@
|
||||
// it. PVS-Studio Static Code Analyzer for C, C++ and C#: http://www.viva64.com
|
||||
|
||||
#include <assert.h>
|
||||
#include <limits.h>
|
||||
#include <stdbool.h>
|
||||
#include <stdio.h>
|
||||
#include <limits.h>
|
||||
|
||||
#include "nvim/assert.h"
|
||||
#include "nvim/vim.h"
|
||||
#include "nvim/ui.h"
|
||||
#include "nvim/ugrid.h"
|
||||
#include "nvim/ui.h"
|
||||
#include "nvim/vim.h"
|
||||
|
||||
#ifdef INCLUDE_GENERATED_DECLARATIONS
|
||||
# include "ugrid.c.generated.h"
|
||||
@ -79,8 +79,7 @@ void ugrid_scroll(UGrid *grid, int top, int bot, int left, int right, int count)
|
||||
}
|
||||
}
|
||||
|
||||
static void clear_region(UGrid *grid, int top, int bot, int left, int right,
|
||||
sattr_T attr)
|
||||
static void clear_region(UGrid *grid, int top, int bot, int left, int right, sattr_T attr)
|
||||
{
|
||||
for (int row = top; row <= bot; row++) {
|
||||
UGRID_FOREACH_CELL(grid, row, left, right+1, {
|
||||
|
@ -3,40 +3,40 @@
|
||||
|
||||
#include <assert.h>
|
||||
#include <inttypes.h>
|
||||
#include <limits.h>
|
||||
#include <stdbool.h>
|
||||
#include <string.h>
|
||||
#include <limits.h>
|
||||
|
||||
#include "nvim/vim.h"
|
||||
#include "nvim/log.h"
|
||||
#include "nvim/ascii.h"
|
||||
#include "nvim/aucmd.h"
|
||||
#include "nvim/ui.h"
|
||||
#include "nvim/charset.h"
|
||||
#include "nvim/cursor.h"
|
||||
#include "nvim/cursor_shape.h"
|
||||
#include "nvim/diff.h"
|
||||
#include "nvim/event/loop.h"
|
||||
#include "nvim/ex_cmds2.h"
|
||||
#include "nvim/ex_getln.h"
|
||||
#include "nvim/fold.h"
|
||||
#include "nvim/main.h"
|
||||
#include "nvim/ascii.h"
|
||||
#include "nvim/misc1.h"
|
||||
#include "nvim/mbyte.h"
|
||||
#include "nvim/garray.h"
|
||||
#include "nvim/highlight.h"
|
||||
#include "nvim/log.h"
|
||||
#include "nvim/main.h"
|
||||
#include "nvim/mbyte.h"
|
||||
#include "nvim/memory.h"
|
||||
#include "nvim/misc1.h"
|
||||
#include "nvim/move.h"
|
||||
#include "nvim/normal.h"
|
||||
#include "nvim/option.h"
|
||||
#include "nvim/os_unix.h"
|
||||
#include "nvim/event/loop.h"
|
||||
#include "nvim/os/time.h"
|
||||
#include "nvim/os/input.h"
|
||||
#include "nvim/os/signal.h"
|
||||
#include "nvim/os/time.h"
|
||||
#include "nvim/os_unix.h"
|
||||
#include "nvim/popupmnu.h"
|
||||
#include "nvim/screen.h"
|
||||
#include "nvim/highlight.h"
|
||||
#include "nvim/ui.h"
|
||||
#include "nvim/ui_compositor.h"
|
||||
#include "nvim/vim.h"
|
||||
#include "nvim/window.h"
|
||||
#include "nvim/cursor_shape.h"
|
||||
#ifdef FEAT_TUI
|
||||
# include "nvim/tui/tui.h"
|
||||
#else
|
||||
@ -382,8 +382,8 @@ void ui_set_ext_option(UI *ui, UIExtension ext, bool active)
|
||||
}
|
||||
}
|
||||
|
||||
void ui_line(ScreenGrid *grid, int row, int startcol, int endcol, int clearcol,
|
||||
int clearattr, bool wrap)
|
||||
void ui_line(ScreenGrid *grid, int row, int startcol, int endcol, int clearcol, int clearattr,
|
||||
bool wrap)
|
||||
{
|
||||
assert(0 <= row && row < grid->Rows);
|
||||
LineFlags flags = wrap ? kLineFlagWrap : 0;
|
||||
|
@ -5,18 +5,18 @@
|
||||
// Used by the built-in TUI and libnvim-based UIs.
|
||||
|
||||
#include <assert.h>
|
||||
#include <limits.h>
|
||||
#include <stdbool.h>
|
||||
#include <stdio.h>
|
||||
#include <limits.h>
|
||||
|
||||
#include "nvim/api/private/helpers.h"
|
||||
#include "nvim/log.h"
|
||||
#include "nvim/main.h"
|
||||
#include "nvim/vim.h"
|
||||
#include "nvim/ui.h"
|
||||
#include "nvim/memory.h"
|
||||
#include "nvim/ui_bridge.h"
|
||||
#include "nvim/ugrid.h"
|
||||
#include "nvim/api/private/helpers.h"
|
||||
#include "nvim/ui.h"
|
||||
#include "nvim/ui_bridge.h"
|
||||
#include "nvim/vim.h"
|
||||
|
||||
#ifdef INCLUDE_GENERATED_DECLARATIONS
|
||||
# include "ui_bridge.c.generated.h"
|
||||
@ -26,8 +26,7 @@
|
||||
|
||||
// Schedule a function call on the UI bridge thread.
|
||||
#define UI_BRIDGE_CALL(ui, name, argc, ...) \
|
||||
((UIBridgeData *)ui)->scheduler( \
|
||||
event_create(ui_bridge_##name##_event, argc, __VA_ARGS__), UI(ui))
|
||||
((UIBridgeData *)ui)->scheduler(event_create(ui_bridge_##name##_event, argc, __VA_ARGS__), UI(ui))
|
||||
|
||||
#define INT2PTR(i) ((void *)(intptr_t)i)
|
||||
#define PTR2INT(p) ((Integer)(intptr_t)p)
|
||||
@ -138,8 +137,8 @@ static void ui_bridge_stop_event(void **argv)
|
||||
ui->stop(ui);
|
||||
}
|
||||
|
||||
static void ui_bridge_hl_attr_define(UI *ui, Integer id, HlAttrs attrs,
|
||||
HlAttrs cterm_attrs, Array info)
|
||||
static void ui_bridge_hl_attr_define(UI *ui, Integer id, HlAttrs attrs, HlAttrs cterm_attrs,
|
||||
Array info)
|
||||
{
|
||||
HlAttrs *a = xmalloc(sizeof(HlAttrs));
|
||||
*a = attrs;
|
||||
@ -163,11 +162,9 @@ static void ui_bridge_raw_line_event(void **argv)
|
||||
xfree(argv[8]);
|
||||
xfree(argv[9]);
|
||||
}
|
||||
static void ui_bridge_raw_line(UI *ui, Integer grid, Integer row,
|
||||
Integer startcol, Integer endcol,
|
||||
Integer clearcol, Integer clearattr,
|
||||
LineFlags flags, const schar_T *chunk,
|
||||
const sattr_T *attrs)
|
||||
static void ui_bridge_raw_line(UI *ui, Integer grid, Integer row, Integer startcol, Integer endcol,
|
||||
Integer clearcol, Integer clearattr, LineFlags flags,
|
||||
const schar_T *chunk, const sattr_T *attrs)
|
||||
{
|
||||
size_t ncol = (size_t)(endcol-startcol);
|
||||
schar_T *c = xmemdup(chunk, ncol * sizeof(schar_T));
|
||||
|
@ -7,27 +7,27 @@
|
||||
// Layer-based compositing: https://en.wikipedia.org/wiki/Digital_compositing
|
||||
|
||||
#include <assert.h>
|
||||
#include <limits.h>
|
||||
#include <stdbool.h>
|
||||
#include <stdio.h>
|
||||
#include <limits.h>
|
||||
|
||||
#include "nvim/api/private/helpers.h"
|
||||
#include "nvim/ascii.h"
|
||||
#include "nvim/highlight.h"
|
||||
#include "nvim/lib/kvec.h"
|
||||
#include "nvim/log.h"
|
||||
#include "nvim/lua/executor.h"
|
||||
#include "nvim/main.h"
|
||||
#include "nvim/ascii.h"
|
||||
#include "nvim/vim.h"
|
||||
#include "nvim/ui.h"
|
||||
#include "nvim/highlight.h"
|
||||
#include "nvim/memory.h"
|
||||
#include "nvim/message.h"
|
||||
#include "nvim/os/os.h"
|
||||
#include "nvim/popupmnu.h"
|
||||
#include "nvim/ui_compositor.h"
|
||||
#include "nvim/ugrid.h"
|
||||
#include "nvim/screen.h"
|
||||
#include "nvim/syntax.h"
|
||||
#include "nvim/api/private/helpers.h"
|
||||
#include "nvim/lua/executor.h"
|
||||
#include "nvim/os/os.h"
|
||||
#include "nvim/ugrid.h"
|
||||
#include "nvim/ui.h"
|
||||
#include "nvim/ui_compositor.h"
|
||||
#include "nvim/vim.h"
|
||||
|
||||
#ifdef INCLUDE_GENERATED_DECLARATIONS
|
||||
# include "ui_compositor.c.generated.h"
|
||||
@ -123,8 +123,8 @@ bool ui_comp_should_draw(void)
|
||||
/// TODO(bfredl): later on the compositor should just use win_float_pos events,
|
||||
/// though that will require slight event order adjustment: emit the win_pos
|
||||
/// events in the beginning of update_screen(0), rather than in ui_flush()
|
||||
bool ui_comp_put_grid(ScreenGrid *grid, int row, int col, int height, int width,
|
||||
bool valid, bool on_top)
|
||||
bool ui_comp_put_grid(ScreenGrid *grid, int row, int col, int height, int width, bool valid,
|
||||
bool on_top)
|
||||
{
|
||||
bool moved;
|
||||
|
||||
@ -257,8 +257,7 @@ static void ui_comp_raise_grid(ScreenGrid *grid, size_t new_index)
|
||||
}
|
||||
}
|
||||
|
||||
static void ui_comp_grid_cursor_goto(UI *ui, Integer grid_handle,
|
||||
Integer r, Integer c)
|
||||
static void ui_comp_grid_cursor_goto(UI *ui, Integer grid_handle, Integer r, Integer c)
|
||||
{
|
||||
if (!ui_comp_should_draw() || !ui_comp_set_grid((int)grid_handle)) {
|
||||
return;
|
||||
@ -304,8 +303,7 @@ ScreenGrid *ui_comp_mouse_focus(int row, int col)
|
||||
/// Baseline implementation. This is always correct, but we can sometimes
|
||||
/// do something more efficient (where efficiency means smaller deltas to
|
||||
/// the downstream UI.)
|
||||
static void compose_line(Integer row, Integer startcol, Integer endcol,
|
||||
LineFlags flags)
|
||||
static void compose_line(Integer row, Integer startcol, Integer endcol, LineFlags flags)
|
||||
{
|
||||
// If rightleft is set, startcol may be -1. In such cases, the assertions
|
||||
// will fail because no overlap is found. Adjust startcol to prevent it.
|
||||
@ -447,8 +445,8 @@ static void compose_line(Integer row, Integer startcol, Integer endcol,
|
||||
(const sattr_T *)attrbuf+skipstart);
|
||||
}
|
||||
|
||||
static void compose_debug(Integer startrow, Integer endrow, Integer startcol,
|
||||
Integer endcol, int syn_id, bool delay)
|
||||
static void compose_debug(Integer startrow, Integer endrow, Integer startcol, Integer endcol,
|
||||
int syn_id, bool delay)
|
||||
{
|
||||
if (!(rdb_flags & RDB_COMPOSITOR)) {
|
||||
return;
|
||||
@ -479,8 +477,7 @@ static void debug_delay(Integer lines)
|
||||
}
|
||||
|
||||
|
||||
static void compose_area(Integer startrow, Integer endrow,
|
||||
Integer startcol, Integer endcol)
|
||||
static void compose_area(Integer startrow, Integer endrow, Integer startcol, Integer endcol)
|
||||
{
|
||||
compose_debug(startrow, endrow, startcol, endcol, dbghl_recompose, true);
|
||||
endrow = MIN(endrow, default_grid.Rows);
|
||||
@ -505,11 +502,9 @@ void ui_comp_compose_grid(ScreenGrid *grid)
|
||||
}
|
||||
}
|
||||
|
||||
static void ui_comp_raw_line(UI *ui, Integer grid, Integer row,
|
||||
Integer startcol, Integer endcol,
|
||||
Integer clearcol, Integer clearattr,
|
||||
LineFlags flags, const schar_T *chunk,
|
||||
const sattr_T *attrs)
|
||||
static void ui_comp_raw_line(UI *ui, Integer grid, Integer row, Integer startcol, Integer endcol,
|
||||
Integer clearcol, Integer clearattr, LineFlags flags,
|
||||
const schar_T *chunk, const sattr_T *attrs)
|
||||
{
|
||||
if (!ui_comp_should_draw() || !ui_comp_set_grid((int)grid)) {
|
||||
return;
|
||||
@ -572,8 +567,8 @@ void ui_comp_set_screen_valid(bool valid)
|
||||
}
|
||||
}
|
||||
|
||||
static void ui_comp_msg_set_pos(UI *ui, Integer grid, Integer row,
|
||||
Boolean scrolled, String sep_char)
|
||||
static void ui_comp_msg_set_pos(UI *ui, Integer grid, Integer row, Boolean scrolled,
|
||||
String sep_char)
|
||||
{
|
||||
msg_grid.comp_row = (int)row;
|
||||
if (scrolled && row > 0) {
|
||||
@ -617,9 +612,8 @@ static bool curgrid_covered_above(int row)
|
||||
return kv_size(layers)-(above_msg?1:0) > curgrid->comp_index+1;
|
||||
}
|
||||
|
||||
static void ui_comp_grid_scroll(UI *ui, Integer grid, Integer top,
|
||||
Integer bot, Integer left, Integer right,
|
||||
Integer rows, Integer cols)
|
||||
static void ui_comp_grid_scroll(UI *ui, Integer grid, Integer top, Integer bot, Integer left,
|
||||
Integer right, Integer rows, Integer cols)
|
||||
{
|
||||
if (!ui_comp_should_draw() || !ui_comp_set_grid((int)grid)) {
|
||||
return;
|
||||
@ -653,8 +647,7 @@ static void ui_comp_grid_scroll(UI *ui, Integer grid, Integer top,
|
||||
}
|
||||
}
|
||||
|
||||
static void ui_comp_grid_resize(UI *ui, Integer grid,
|
||||
Integer width, Integer height)
|
||||
static void ui_comp_grid_resize(UI *ui, Integer grid, Integer width, Integer height)
|
||||
{
|
||||
if (grid == 1) {
|
||||
ui_composed_call_grid_resize(1, width, height);
|
||||
|
470
src/nvim/undo.c
470
src/nvim/undo.c
File diff suppressed because it is too large
Load Diff
@ -6,23 +6,23 @@
|
||||
/// Nvim was forked from Vim 7.4.160.
|
||||
/// Vim originated from Stevie version 3.6 (Fish disk 217) by GRWalter (Fred).
|
||||
|
||||
#include <inttypes.h>
|
||||
#include <assert.h>
|
||||
#include <inttypes.h>
|
||||
#include <limits.h>
|
||||
|
||||
#include "nvim/api/private/helpers.h"
|
||||
#include "nvim/vim.h"
|
||||
#include "nvim/ascii.h"
|
||||
#include "nvim/buffer.h"
|
||||
#include "nvim/iconv.h"
|
||||
#include "nvim/version.h"
|
||||
#include "nvim/charset.h"
|
||||
#include "nvim/iconv.h"
|
||||
#include "nvim/lua/executor.h"
|
||||
#include "nvim/memline.h"
|
||||
#include "nvim/memory.h"
|
||||
#include "nvim/message.h"
|
||||
#include "nvim/screen.h"
|
||||
#include "nvim/strings.h"
|
||||
#include "nvim/lua/executor.h"
|
||||
#include "nvim/version.h"
|
||||
#include "nvim/vim.h"
|
||||
|
||||
// version info generated by the build system
|
||||
#include "auto/versiondef.h"
|
||||
|
@ -1,4 +1,4 @@
|
||||
# Uncrustify-0.73.0-186-03faf73c5
|
||||
# Uncrustify-0.73.0-195-1f883c691
|
||||
|
||||
#
|
||||
# General options
|
||||
@ -535,14 +535,21 @@ sp_inside_braces_struct = ignore # ignore/add/remove/force/not_defined
|
||||
sp_inside_braces_oc_dict = ignore # ignore/add/remove/force/not_defined
|
||||
|
||||
# Add or remove space after open brace in an unnamed temporary
|
||||
# direct-list-initialization.
|
||||
# direct-list-initialization
|
||||
# if statement is a brace_init_lst
|
||||
# works only if sp_brace_brace is set to ignore.
|
||||
sp_after_type_brace_init_lst_open = ignore # ignore/add/remove/force/not_defined
|
||||
|
||||
# Add or remove space before close brace in an unnamed temporary
|
||||
# direct-list-initialization.
|
||||
# direct-list-initialization
|
||||
# if statement is a brace_init_lst
|
||||
# works only if sp_brace_brace is set to ignore.
|
||||
sp_before_type_brace_init_lst_close = ignore # ignore/add/remove/force/not_defined
|
||||
|
||||
# Add or remove space inside an unnamed temporary direct-list-initialization.
|
||||
# Add or remove space inside an unnamed temporary direct-list-initialization
|
||||
# if statement is a brace_init_lst
|
||||
# works only if sp_brace_brace is set to ignore
|
||||
# works only if sp_before_type_brace_init_lst_close is set to ignore.
|
||||
sp_inside_type_brace_init_lst = ignore # ignore/add/remove/force/not_defined
|
||||
|
||||
# Add or remove space inside '{' and '}'.
|
||||
|
Loading…
Reference in New Issue
Block a user