From 7918003c7669e1fe2beb9e9a5bc0d67524f57b92 Mon Sep 17 00:00:00 2001 From: verdant Date: Tue, 28 Jul 2026 17:09:45 +0800 Subject: Reformat display.c main.c --- display.c | 21 +++++++++++++++------ 1 file changed, 15 insertions(+), 6 deletions(-) (limited to 'display.c') diff --git a/display.c b/display.c index 0b63d76..49c3797 100644 --- a/display.c +++ b/display.c @@ -7,7 +7,8 @@ #include "version.h" #include "wm.h" -void color_pair_init(void) +void +color_pair_init(void) { init_pair(COLOR_PAIR_STATUS_BAR, COLOR_BLACK, COLOR_WHITE); init_pair(COLOR_PAIR_PROGRESS, COLOR_YELLOW, COLOR_BLUE); @@ -17,7 +18,8 @@ void color_pair_init(void) init_pair(COLOR_PAIR_BORDER, COLOR_WHITE, COLOR_BLUE); } -terminal *ncurses_init(void) +terminal * +ncurses_init(void) { initscr(); raw(); @@ -34,7 +36,8 @@ terminal *ncurses_init(void) return t; } -void draw_stat_bar(terminal *t, const char *sys_version) +void +draw_stat_bar(terminal *t, const char *sys_version) { window *stat_bar = wm_create_new_w(t, "stat_bar", 1, t->maxx, t->maxy - 1, 0); @@ -49,7 +52,8 @@ void draw_stat_bar(terminal *t, const char *sys_version) wrefresh(stat_bar->win); } -void wprintw_colorful(WINDOW *w, int attr, const char *format, ...) +void +wprintw_colorful(WINDOW *w, int attr, const char *format, ...) { va_list ap; va_start(ap, format); @@ -59,10 +63,15 @@ void wprintw_colorful(WINDOW *w, int attr, const char *format, ...) va_end(ap); } -void handle_resize(void) +void +handle_resize(void) { endwin(); refresh(); } -void redraw(void) { erase(); } +void +redraw(void) +{ + erase(); +} -- cgit v1.2.3