tree: add clang-format off labels

When I figure out how to make clang-format ignore struct array
initialisers, I'll get rid of this.
This commit is contained in:
Jeremy Baxter 2024-03-12 12:19:23 +13:00
parent 3c53685e4a
commit 669eb3fd28
5 changed files with 11 additions and 1 deletions

2
lcl.c
View file

@ -286,6 +286,8 @@ cl_options(lua_State *L)
return 0; return 0;
} }
/* clang-format off */
static const luaL_Reg cllib[] = { static const luaL_Reg cllib[] = {
{"mesg", cl_mesg}, {"mesg", cl_mesg},
{"error", cl_error}, {"error", cl_error},

View file

@ -94,6 +94,8 @@ environ_newindex(lua_State *L)
return 0; return 0;
} }
/* clang-format off */
static const luaL_Reg mt[] = { static const luaL_Reg mt[] = {
{"__index", environ_index}, {"__index", environ_index},
{"__newindex", environ_newindex}, {"__newindex", environ_newindex},

View file

@ -54,6 +54,8 @@ extra_sleep(lua_State *L)
return 0; return 0;
} }
/* clang-format off */
static const luaL_Reg extlib[] = { static const luaL_Reg extlib[] = {
{"sleep", extra_sleep}, {"sleep", extra_sleep},
{NULL, NULL} {NULL, NULL}

2
lfs.c
View file

@ -535,6 +535,8 @@ fs_workdir(lua_State *L)
return lfail(L); return lfail(L);
} }
/* clang-format off */
static const luaL_Reg fslib[] = { static const luaL_Reg fslib[] = {
{"basename", fs_basename}, {"basename", fs_basename},
{"copy", fs_copy}, {"copy", fs_copy},

View file

@ -22,7 +22,7 @@
#define PID_MAX 8 /* rounded to the nearest even number */ #define PID_MAX 8 /* rounded to the nearest even number */
#define PROCESS_MAX 256 #define PROCESS_MAX 256
/* signals */ /* clang-format off */
static const int signals[] = { static const int signals[] = {
SIGHUP, SIGHUP,
SIGINT, SIGINT,
@ -357,6 +357,8 @@ process_terminate(lua_State *L)
return sigsend(L, pid, "SIGTERM"); return sigsend(L, pid, "SIGTERM");
} }
/* clang-format off */
static const luaL_Reg proclib[] = { static const luaL_Reg proclib[] = {
{"kill", process_kill}, {"kill", process_kill},
{"pid", process_pid}, {"pid", process_pid},