aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorbfredl <bjorn.linse@gmail.com>2025-08-15 11:06:42 +0200
committerGitHub <noreply@github.com>2025-08-15 11:06:42 +0200
commitc12701d4e1404a67fef6da01a8a9d7e2d48d78d6 (patch)
tree43046dca2080cc7feb604e878b3fe4c333a1aea8 /src
parent8d154e5927d728cc2ad74a0dec8b45fab1333f8c (diff)
parentc26f989b2fe13a4e9439322c736e48268c9c4204 (diff)
downloadrneovim-c12701d4e1404a67fef6da01a8a9d7e2d48d78d6.tar.gz
rneovim-c12701d4e1404a67fef6da01a8a9d7e2d48d78d6.tar.bz2
rneovim-c12701d4e1404a67fef6da01a8a9d7e2d48d78d6.zip
Merge pull request #35329 from bfredl/uncrustify_all
fix(build): also check os_win sources with uncrustify in CI
Diffstat (limited to 'src')
-rw-r--r--src/nvim/CMakeLists.txt6
-rw-r--r--src/nvim/os/os_win_console.c7
-rw-r--r--src/nvim/os/pty_conpty_win.c4
-rw-r--r--src/nvim/os/pty_proc_win.c2
4 files changed, 11 insertions, 8 deletions
diff --git a/src/nvim/CMakeLists.txt b/src/nvim/CMakeLists.txt
index 0115b661b3..d6b5a55ca2 100644
--- a/src/nvim/CMakeLists.txt
+++ b/src/nvim/CMakeLists.txt
@@ -416,6 +416,8 @@ endforeach()
list(SORT NVIM_SOURCES)
list(SORT NVIM_HEADERS)
+list(APPEND UNCRUSTIFY_NVIM_SOURCES ${NVIM_SOURCES} ${NVIM_HEADERS})
+
foreach(sfile ${NVIM_SOURCES})
get_filename_component(f ${sfile} NAME)
if(WIN32 AND ${f} MATCHES "^(pty_proc_unix.c)$")
@@ -901,13 +903,13 @@ add_glob_target(
TARGET lintc-uncrustify
COMMAND ${UNCRUSTIFY_PRG}
FLAGS -c ${UNCRUSTIFY_CONFIG} -q --check
- FILES ${NVIM_SOURCES} ${NVIM_HEADERS})
+ FILES ${UNCRUSTIFY_NVIM_SOURCES})
add_glob_target(
TARGET formatc
COMMAND ${UNCRUSTIFY_PRG}
FLAGS -c ${UNCRUSTIFY_CONFIG} --replace --no-backup
- FILES ${NVIM_SOURCES} ${NVIM_HEADERS})
+ FILES ${UNCRUSTIFY_NVIM_SOURCES})
# TODO(bfredl): there is a bug in "uncrustify --update-config-with-doc" which breaks
# our config (backslash escape in strings). Once fixed these two lines should be deleted
diff --git a/src/nvim/os/os_win_console.c b/src/nvim/os/os_win_console.c
index 7b62ec153d..af5515e2f2 100644
--- a/src/nvim/os/os_win_console.c
+++ b/src/nvim/os/os_win_console.c
@@ -7,7 +7,7 @@
#include "nvim/os/os.h"
#include "nvim/os/os_win_console.h"
-# include "os/os_win_console.c.generated.h"
+#include "os/os_win_console.c.generated.h"
static char origTitle[256] = { 0 };
static HWND hWnd = NULL;
@@ -27,7 +27,7 @@ int os_open_conin_fd(void)
return conin_fd;
}
-void os_clear_hwnd(void)
+void os_clear_hwnd(void)
{
hWnd = NULL;
}
@@ -57,7 +57,8 @@ void os_replace_stdout_and_stderr_to_conout(void)
}
/// Resets Windows console icon if we got an original one on startup.
-void os_icon_reset(void) {
+void os_icon_reset(void)
+{
if (hWnd == NULL) {
return;
}
diff --git a/src/nvim/os/pty_conpty_win.c b/src/nvim/os/pty_conpty_win.c
index 6402330a52..90adb07b0b 100644
--- a/src/nvim/os/pty_conpty_win.c
+++ b/src/nvim/os/pty_conpty_win.c
@@ -143,8 +143,8 @@ finished:
return conpty_object;
}
-bool os_conpty_spawn(conpty_t *conpty_object, HANDLE *proc_handle, wchar_t *name,
- wchar_t *cmd_line, wchar_t *cwd, wchar_t *env)
+bool os_conpty_spawn(conpty_t *conpty_object, HANDLE *proc_handle, wchar_t *name, wchar_t *cmd_line,
+ wchar_t *cwd, wchar_t *env)
{
PROCESS_INFORMATION pi = { 0 };
if (!CreateProcessW(name,
diff --git a/src/nvim/os/pty_proc_win.c b/src/nvim/os/pty_proc_win.c
index a4eeb56ce0..3c23c0f4df 100644
--- a/src/nvim/os/pty_proc_win.c
+++ b/src/nvim/os/pty_proc_win.c
@@ -12,7 +12,7 @@
#include "nvim/os/pty_conpty_win.h"
#include "nvim/os/pty_proc_win.h"
-# include "os/pty_proc_win.c.generated.h"
+#include "os/pty_proc_win.c.generated.h"
static void CALLBACK pty_proc_terminate_cb(void *context, BOOLEAN unused)
FUNC_ATTR_NONNULL_ALL