mirror of
https://github.com/neovim/neovim.git
synced 2025-09-16 16:28:17 +00:00
refactor(uncrustify): format all c files
This commit is contained in:
@@ -15,8 +15,8 @@
|
||||
#include "nvim/buffer_defs.h"
|
||||
#include "nvim/change.h"
|
||||
#include "nvim/cursor.h"
|
||||
#include "nvim/eval/userfunc.h"
|
||||
#include "nvim/eval/typval.h"
|
||||
#include "nvim/eval/userfunc.h"
|
||||
#include "nvim/event/loop.h"
|
||||
#include "nvim/event/time.h"
|
||||
#include "nvim/ex_cmds2.h"
|
||||
@@ -139,17 +139,17 @@ static void nlua_luv_error_event(void **argv)
|
||||
luv_err_t type = (luv_err_t)(intptr_t)argv[1];
|
||||
msg_ext_set_kind("lua_error");
|
||||
switch (type) {
|
||||
case kCallback:
|
||||
semsg_multiline("Error executing luv callback:\n%s", error);
|
||||
break;
|
||||
case kThread:
|
||||
semsg_multiline("Error in luv thread:\n%s", error);
|
||||
break;
|
||||
case kThreadCallback:
|
||||
semsg_multiline("Error in luv callback, thread:\n%s", error);
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
case kCallback:
|
||||
semsg_multiline("Error executing luv callback:\n%s", error);
|
||||
break;
|
||||
case kThread:
|
||||
semsg_multiline("Error in luv thread:\n%s", error);
|
||||
break;
|
||||
case kThreadCallback:
|
||||
semsg_multiline("Error in luv callback, thread:\n%s", error);
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
xfree(error);
|
||||
}
|
||||
@@ -189,21 +189,18 @@ static int nlua_luv_cfpcall(lua_State *lstate, int nargs, int nresult, int flags
|
||||
return retval;
|
||||
}
|
||||
|
||||
static int nlua_luv_thread_cb_cfpcall(lua_State *lstate, int nargs, int nresult,
|
||||
int flags)
|
||||
static int nlua_luv_thread_cb_cfpcall(lua_State *lstate, int nargs, int nresult, int flags)
|
||||
{
|
||||
return nlua_luv_thread_common_cfpcall(lstate, nargs, nresult, flags, true);
|
||||
}
|
||||
|
||||
static int nlua_luv_thread_cfpcall(lua_State *lstate, int nargs, int nresult,
|
||||
int flags)
|
||||
static int nlua_luv_thread_cfpcall(lua_State *lstate, int nargs, int nresult, int flags)
|
||||
FUNC_ATTR_NONNULL_ALL
|
||||
{
|
||||
return nlua_luv_thread_common_cfpcall(lstate, nargs, nresult, flags, false);
|
||||
}
|
||||
|
||||
static int nlua_luv_thread_cfcpcall(lua_State *lstate, lua_CFunction func,
|
||||
void *ud, int flags)
|
||||
static int nlua_luv_thread_cfcpcall(lua_State *lstate, lua_CFunction func, void *ud, int flags)
|
||||
FUNC_ATTR_NONNULL_ARG(1, 2)
|
||||
{
|
||||
lua_pushcfunction(lstate, func);
|
||||
@@ -212,8 +209,8 @@ static int nlua_luv_thread_cfcpcall(lua_State *lstate, lua_CFunction func,
|
||||
return retval;
|
||||
}
|
||||
|
||||
static int nlua_luv_thread_common_cfpcall(lua_State *lstate, int nargs, int nresult,
|
||||
int flags, bool is_callback)
|
||||
static int nlua_luv_thread_common_cfpcall(lua_State *lstate, int nargs, int nresult, int flags,
|
||||
bool is_callback)
|
||||
FUNC_ATTR_NONNULL_ALL
|
||||
{
|
||||
int retval;
|
||||
@@ -228,9 +225,9 @@ static int nlua_luv_thread_common_cfpcall(lua_State *lstate, int nargs, int nres
|
||||
mch_errmsg("\n");
|
||||
lua_close(lstate);
|
||||
#ifdef WIN32
|
||||
ExitThread(0);
|
||||
ExitThread(0);
|
||||
#else
|
||||
pthread_exit(0);
|
||||
pthread_exit(0);
|
||||
#endif
|
||||
}
|
||||
const char *error = lua_tostring(lstate, -1);
|
||||
@@ -565,9 +562,9 @@ static bool nlua_init_packages(lua_State *lstate)
|
||||
lua_getglobal(lstate, "require");
|
||||
lua_pushstring(lstate, "vim._init_packages");
|
||||
if (nlua_pcall(lstate, 1, 0)) {
|
||||
mch_errmsg(lua_tostring(lstate, -1));
|
||||
mch_errmsg("\n");
|
||||
return false;
|
||||
mch_errmsg(lua_tostring(lstate, -1));
|
||||
mch_errmsg("\n");
|
||||
return false;
|
||||
}
|
||||
|
||||
return true;
|
||||
|
Reference in New Issue
Block a user