From 565c034fe5346b83171ba41ef05bc4e2272168f7 Mon Sep 17 00:00:00 2001 From: Andre Noll Date: Sat, 29 Mar 2014 13:49:16 +0100 Subject: [PATCH] gui: Fix some trivial whitespace and spelling issues. --- gui.c | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/gui.c b/gui.c index 0bee5c66..18375d9b 100644 --- a/gui.c +++ b/gui.c @@ -372,7 +372,7 @@ static void print_status_bar(void) /* * get the number of the oldest rbe that is (partially) visible. On return, - * lines contains the sum of the number of lines of all visable entries. If the + * lines contains the sum of the number of lines of all visible entries. If the * first one is only partially visible, lines is greater than bot.lines. */ static int first_visible_rbe(unsigned *lines) @@ -506,6 +506,7 @@ __printf_2_3 static void outputf(int color, const char* fmt,...) static int add_output_line(char *line, void *data) { int color = *(int *)data? COLOR_ERRMSG : COLOR_OUTPUT; + if (!curses_active) return 1; rb_add_entry(color, para_strdup(line)); @@ -823,7 +824,7 @@ static void init_colors_or_die(void) static void init_curses(void) { curses_active = 1; - if (top.win && refresh() == ERR) /* refesh is really needed */ + if (top.win && refresh() == ERR) /* refresh is really needed */ msg_n_exit(EXIT_FAILURE, "refresh() failed\n"); if (LINES < theme.lines_min || COLS < theme.cols_min) msg_n_exit(EXIT_FAILURE, "Error: Terminal (%dx%d) too small" @@ -848,6 +849,7 @@ static void check_sigchld(void) { int ret; pid_t pid; + reap_next_child: ret = para_reap_child(&pid); if (ret <= 0) @@ -1171,6 +1173,7 @@ static void print_scroll_msg(void) { unsigned lines_total, filled = ringbuffer_filled(bot_win_rb); int first_rbe = first_visible_rbe(&lines_total); + print_in_bar(COLOR_MSG, "scrolled view: %d-%d/%d\n", filled - first_rbe, filled - scroll_position, ringbuffer_filled(bot_win_rb)); } @@ -1214,6 +1217,7 @@ static void com_page_down(void) { unsigned lines = 0; int i = scroll_position; + while (lines < bot.lines && --i > 0) { struct rb_entry *rbe = ringbuffer_get(bot_win_rb, i); if (!rbe) @@ -1336,7 +1340,7 @@ static void com_ll_incr(void) */ static void com_reread_conf(void) { - char *cf =configfile_exists(); + char *cf = configfile_exists(); struct gui_cmdline_parser_params params = { .override = 1, .initialize = 1, @@ -1467,7 +1471,7 @@ static void handle_command(int c) { int i; - /* first check user's key bindings */ + /* first check user-defined key bindings */ for (i = 0; i < conf.key_map_given; ++i) { char *tmp, *handler, *arg; -- 2.39.5