gui: Fix some trivial whitespace and spelling issues.
authorAndre Noll <maan@systemlinux.org>
Sat, 29 Mar 2014 12:49:16 +0000 (13:49 +0100)
committerAndre Noll <maan@systemlinux.org>
Sun, 4 May 2014 12:04:04 +0000 (14:04 +0200)
gui.c

diff --git a/gui.c b/gui.c
index 0bee5c669b1b83c3c70c2f720b42deeeecc3a093..18375d9b75cca9a6ceee2c8f1af1949e34169311 100644 (file)
--- 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,
 
 /*
  * 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)
  * 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;
 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));
        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;
 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"
                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;
 {
        int ret;
        pid_t pid;
+
 reap_next_child:
        ret = para_reap_child(&pid);
        if (ret <= 0)
 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);
 {
        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));
 }
        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;
 {
        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)
        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)
 {
  */
 static void com_reread_conf(void)
 {
-       char *cf =configfile_exists();
+       char *cf = configfile_exists();
        struct gui_cmdline_parser_params params = {
                .override = 1,
                .initialize = 1,
        struct gui_cmdline_parser_params params = {
                .override = 1,
                .initialize = 1,
@@ -1467,7 +1471,7 @@ static void handle_command(int c)
 {
        int i;
 
 {
        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;
 
        for (i = 0; i < conf.key_map_given; ++i) {
                char *tmp, *handler, *arg;