From: jNullj <15849761+jNullj@users.noreply.github.com> Date: Wed, 22 May 2024 20:25:15 +0000 (+0300) Subject: format: CamelCase to SnakeCase X-Git-Tag: v2.42-start~317^2~4 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=28d7c58404ec8b38021f90bd8930783f0279ebe0;p=thirdparty%2Futil-linux.git format: CamelCase to SnakeCase --- diff --git a/term-utils/scriptreplay.c b/term-utils/scriptreplay.c index 6ec2ed057..62a93c3f6 100644 --- a/term-utils/scriptreplay.c +++ b/term-utils/scriptreplay.c @@ -152,8 +152,8 @@ int main(int argc, char *argv[]) { static const struct timeval mindelay = { .tv_sec = 0, .tv_usec = 100 }; - static const struct timeval inputDelay = { .tv_sec = 0, .tv_usec = 100000 }; - struct timeval stepDelay = { 0, 0 }; + static const struct timeval input_delay = { .tv_sec = 0, .tv_usec = 100000 }; + struct timeval step_delay = { 0, 0 }; struct timeval maxdelay; int isterm; @@ -328,26 +328,26 @@ main(int argc, char *argv[]) replay_toggle_pause(setup); break; case '\033': - wchar_t firstChar = fgetwc(stdin); - if (firstChar == '[') { - wchar_t secondChar = fgetwc(stdin); + wchar_t first_char = fgetwc(stdin); + if (first_char == '[') { + wchar_t second_char = fgetwc(stdin); - if (secondChar == 'A') { // Up arrow + if (second_char == 'A') { // Up arrow divi += 0.1; replay_set_delay_div(setup, divi); - } else if (secondChar == 'B') { // Down arrow + } else if (second_char == 'B') { // Down arrow divi -= 0.1; if (divi < 0.1) divi = 0.1; replay_set_delay_div(setup, divi); - } else if (secondChar == 'C') { // Right arrow + } else if (second_char == 'C') { // Right arrow rc = replay_emit_step_data(setup, step, STDOUT_FILENO); if (!rc) { rc = replay_get_next_step(setup, streams, &step); if (!rc) { struct timeval *delay = replay_step_get_delay(step); if (delay && timerisset(delay)) - stepDelay = *delay; + step_delay = *delay; } } } @@ -359,21 +359,21 @@ main(int argc, char *argv[]) if (replay_get_is_paused(setup)) { - delay_for(&inputDelay); + delay_for(&input_delay); continue; } - if (timerisset(&stepDelay)) + if (timerisset(&step_delay)) { - const struct timeval *timeout = (timercmp(&stepDelay, &inputDelay, <) ? (&stepDelay) : (&inputDelay)); + const struct timeval *timeout = (timercmp(&step_delay, &input_delay, <) ? (&step_delay) : (&input_delay)); delay_for(timeout); - timersub(&stepDelay, timeout, &stepDelay); - if (stepDelay.tv_sec < 0 || stepDelay.tv_usec < 0) - timerclear(&stepDelay); + timersub(&step_delay, timeout, &step_delay); + if (step_delay.tv_sec < 0 || step_delay.tv_usec < 0) + timerclear(&step_delay); continue; } - if (!timerisset(&stepDelay) && step) + if (!timerisset(&step_delay) && step) rc = replay_emit_step_data(setup, step, STDOUT_FILENO); if (rc) break; @@ -386,7 +386,7 @@ main(int argc, char *argv[]) struct timeval *delay = replay_step_get_delay(step); if (delay && timerisset(delay)) - stepDelay = *delay; + step_delay = *delay; } } while (rc == 0);