diff options
| author | verdant <im@verdant.ee> | 2026-07-28 17:09:45 +0800 |
|---|---|---|
| committer | verdant <im@verdant.ee> | 2026-07-28 17:09:45 +0800 |
| commit | 7918003c7669e1fe2beb9e9a5bc0d67524f57b92 (patch) | |
| tree | 9b25d4641e36501cbbbbc04e9282572801beedb5 | |
| parent | 365d54d6de5ad84238698f986649aa4af0fd8dae (diff) | |
| download | sf-7918003c7669e1fe2beb9e9a5bc0d67524f57b92.tar.gz sf-7918003c7669e1fe2beb9e9a5bc0d67524f57b92.zip | |
Reformat display.c main.c
| -rw-r--r-- | display.c | 21 | ||||
| -rw-r--r-- | main.c | 3 |
2 files changed, 17 insertions, 7 deletions
@@ -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(); +} @@ -22,7 +22,8 @@ #include "version.h" #include "wm.h" -static void path_normalize(char *path) +static void +path_normalize(char *path) { if (!path) return; |
