diff --git a/src/global.c b/src/global.c index def161b0..000c894c 100644 --- a/src/global.c +++ b/src/global.c @@ -348,9 +348,9 @@ void do_cancel(void) { } -/* Add a function to the function list. */ -void add_to_funcs(void (*func)(void), int menus, const char *desc, const char *help, - bool blank_after, bool viewok) +/* Add a function to the linked list of functions. */ +void add_to_funcs(void (*func)(void), int menus, const char *desc, + const char *help, bool blank_after, bool viewok) { funcstruct *f = nmalloc(sizeof(funcstruct)); @@ -371,7 +371,7 @@ void add_to_funcs(void (*func)(void), int menus, const char *desc, const char *h #endif } -/* Add a key combo to the shortcut list. */ +/* Add a key combo to the linked list of shortcuts. */ void add_to_sclist(int menus, const char *scstring, const int keycode, void (*func)(void), int toggle) { @@ -454,14 +454,12 @@ size_t shown_entries_for(int menu) * the given sequence. */ const keystruct *get_shortcut(int *kbinput) { - keystruct *s; - /* Plain characters cannot be shortcuts, so just skip those. */ if (!meta_key && ((*kbinput >= 0x20 && *kbinput < 0x7F) || (*kbinput >= 0xA0 && *kbinput <= 0xFF))) return NULL; - for (s = sclist; s != NULL; s = s->next) { + for (keystruct *s = sclist; s != NULL; s = s->next) { if ((s->menus & currmenu) && *kbinput == s->keycode && meta_key == s->meta) return s; diff --git a/src/move.c b/src/move.c index e14dccf2..2f211b28 100644 --- a/src/move.c +++ b/src/move.c @@ -109,7 +109,7 @@ void set_proper_index_and_pww(size_t *leftedge, size_t target, bool forward) openfile->placewewant = *leftedge + target; } -/* Move up nearly one screenful. */ +/* Move up almost one screenful. */ void do_page_up(void) { int mustmove = (editwinrows < 3) ? 1 : editwinrows - 2; @@ -139,7 +139,7 @@ void do_page_up(void) refresh_needed = TRUE; } -/* Move down nearly one screenful. */ +/* Move down almost one screenful. */ void do_page_down(void) { int mustmove = (editwinrows < 3) ? 1 : editwinrows - 2; @@ -534,7 +534,7 @@ void do_down(void) } #if !defined(NANO_TINY) || defined(ENABLE_HELP) -/* Scroll up one line or chunk without scrolling the cursor. */ +/* Scroll up one line or chunk without moving the cursor textwise. */ void do_scroll_up(void) { /* When the top of the file is onscreen, we can't scroll. */ @@ -548,7 +548,7 @@ void do_scroll_up(void) edit_scroll(BACKWARD); } -/* Scroll down one line or chunk without scrolling the cursor. */ +/* Scroll down one line or chunk without moving the cursor textwise. */ void do_scroll_down(void) { if (openfile->current_y == 0)