From 2f83bbb21ec0a072b427e23bc8fe921c367a9d71 Mon Sep 17 00:00:00 2001 From: klemek Date: Sun, 23 Nov 2025 13:06:40 +0100 Subject: [PATCH] style: identifiers separation --- src/state.c | 10 ++++++++-- src/string.c | 3 ++- src/timer.c | 3 ++- src/window.c | 3 ++- 4 files changed, 14 insertions(+), 5 deletions(-) diff --git a/src/state.c b/src/state.c index 1a93eb5..e2236a9 100644 --- a/src/state.c +++ b/src/state.c @@ -415,7 +415,10 @@ void state_parse_config(StateConfig *state_config, const ConfigFile *config) { void state_midi_event(SharedContext *context, const StateConfig *state_config, const MidiDevice *midi, unsigned char code, unsigned char value, bool trace_midi) { - unsigned int i, j, k, part; + unsigned int i; + unsigned int j; + unsigned int k; + unsigned int part; bool found; found = false; @@ -564,7 +567,10 @@ bool state_background_write(SharedContext *context, const StateConfig *state_config, const MidiDevice *midi) { pid_t pid; - bool beat_active, last_active, change, last_change; + bool beat_active; + bool last_active; + bool change; + bool last_change; pid = fork(); if (pid < 0) { diff --git a/src/string.c b/src/string.c index 07545e0..101cbda 100644 --- a/src/string.c +++ b/src/string.c @@ -59,7 +59,8 @@ bool string_is_number(const char *value) { char *string_replace_at(const char *src, unsigned int from, unsigned int to, const char *rpl) { - unsigned long src_len, rpl_len; + unsigned long src_len; + unsigned long rpl_len; char *dst; src_len = strnlen(src, STR_LEN * STR_LEN); diff --git a/src/timer.c b/src/timer.c index 85092db..575a083 100644 --- a/src/timer.c +++ b/src/timer.c @@ -18,7 +18,8 @@ bool timer_inc(Timer *timer) { double timer_reset(Timer *timer) { struct timeval stop; - double secs, per_secs; + double secs; + double per_secs; gettimeofday(&stop, NULL); diff --git a/src/window.c b/src/window.c index 68d75da..02b423d 100644 --- a/src/window.c +++ b/src/window.c @@ -121,7 +121,8 @@ void window_events() { glfwPollEvents(); } double window_get_time() { return glfwGetTime(); } void window_use(Window *window, SharedContext *context) { - int width, height; + int width; + int height; glfwMakeContextCurrent(window); glfwGetFramebufferSize(window, &width, &height);