refactor: format with uncrustify #15872

* refactor: format with uncrustify
* refactor: fix function parameter comments
This commit is contained in:
dundargoc
2021-10-02 23:41:50 +02:00
committed by GitHub
parent 09307e64df
commit 8c74c895b3
8 changed files with 1243 additions and 1168 deletions

View File

@@ -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
@@ -70,9 +70,9 @@ static int pending_has_mouse = -1;
static size_t uilog_seen = 0;
static char uilog_last_event[1024] = { 0 };
#ifndef EXITFREE
#define entered_free_all_mem false
#endif
# ifndef EXITFREE
# define entered_free_all_mem false
# endif
# define UI_LOG(funname) \
do { \
@@ -95,7 +95,7 @@ static char uilog_last_event[1024] = { 0 };
// UI_CALL invokes a function on all registered UI instances.
// This is called by code generated by generators/gen_api_ui_events.lua
// C code should use ui_call_{funname} instead.
# define UI_CALL(cond, funname, ...) \
#define UI_CALL(cond, funname, ...) \
do { \
bool any_call = false; \
for (size_t i = 0; i < ui_count; i++) { \
@@ -115,7 +115,7 @@ static char uilog_last_event[1024] = { 0 };
#endif
#ifndef EXITFREE
#undef entered_free_all_mem
# undef entered_free_all_mem
#endif
void ui_init(void)
@@ -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;
@@ -515,23 +515,23 @@ void ui_check_mouse(void)
// normal editing mode (not at hit-return message).
for (char_u *p = p_mouse; *p; p++) {
switch (*p) {
case 'a':
if (vim_strchr((char_u *)MOUSE_A, checkfor) != NULL) {
has_mouse = true;
return;
}
break;
case MOUSE_HELP:
if (checkfor != MOUSE_RETURN && curbuf->b_help) {
has_mouse = true;
return;
}
break;
default:
if (checkfor == *p) {
has_mouse = true;
return;
}
case 'a':
if (vim_strchr((char_u *)MOUSE_A, checkfor) != NULL) {
has_mouse = true;
return;
}
break;
case MOUSE_HELP:
if (checkfor != MOUSE_RETURN && curbuf->b_help) {
has_mouse = true;
return;
}
break;
default:
if (checkfor == *p) {
has_mouse = true;
return;
}
}
}
}