nano

nano with my custom patches
git clone git://bsandro.tech/nano
Log | Files | Refs | README | LICENSE

commit d245b07c25572f97a7292203cfd011f466dd3d57
parent d66a68166d31fb506b99d2fda37c21ced0feb11a
Author: Benno Schulenberg <bensberg@telfort.nl>
Date:   Sun,  9 Sep 2018 21:01:09 +0200

tweaks: remove a now-unused parameter from four functions

Diffstat:
Msrc/move.c | 16++++++++--------
Msrc/proto.h | 8++++----
Msrc/text.c | 12++++++------
3 files changed, 18 insertions(+), 18 deletions(-)

diff --git a/src/move.c b/src/move.c @@ -172,7 +172,7 @@ void do_page_down(void) #ifdef ENABLE_JUSTIFY /* Move to the beginning of the first-found beginning-of-paragraph line * before the current line. */ -void do_para_begin(bool update_screen) +void do_para_begin(void) { if (openfile->current != openfile->fileage) openfile->current = openfile->current->prev; @@ -188,7 +188,7 @@ void do_para_begin(bool update_screen) * end of the current line if not. A line is the last line of a paragraph * if it is in a paragraph, and the next line either is the beginning line * of a paragraph or isn't in a paragraph. */ -void do_para_end(bool update_screen) +void do_para_end(void) { while (openfile->current != openfile->filebot && !inpar(openfile->current)) @@ -212,7 +212,7 @@ void do_para_begin_void(void) { filestruct *was_current = openfile->current; - do_para_begin(TRUE); + do_para_begin(); edit_redraw(was_current, CENTERING); } @@ -222,7 +222,7 @@ void do_para_end_void(void) { filestruct *was_current = openfile->current; - do_para_end(TRUE); + do_para_end(); edit_redraw(was_current, CENTERING); } @@ -270,7 +270,7 @@ void do_next_block(void) /* Move to the previous word. If allow_punct is TRUE, treat punctuation * as part of a word. */ -void do_prev_word(bool allow_punct, bool update_screen) +void do_prev_word(bool allow_punct) { bool seen_a_word = FALSE, step_forward = FALSE; @@ -310,7 +310,7 @@ void do_prev_word(bool allow_punct, bool update_screen) /* Move to the next word. If after_ends is TRUE, stop at the ends of words * instead of their beginnings. If allow_punct is TRUE, treat punctuation as * part of a word. Return TRUE if we started on a word, and FALSE otherwise. */ -bool do_next_word(bool after_ends, bool allow_punct, bool update_screen) +bool do_next_word(bool after_ends, bool allow_punct) { bool started_on_word = is_word_mbchar(openfile->current->data + openfile->current_x, allow_punct); @@ -366,7 +366,7 @@ void do_prev_word_void(void) { filestruct *was_current = openfile->current; - do_prev_word(ISSET(WORD_BOUNDS), TRUE); + do_prev_word(ISSET(WORD_BOUNDS)); edit_redraw(was_current, FLOWING); } @@ -378,7 +378,7 @@ void do_next_word_void(void) { filestruct *was_current = openfile->current; - do_next_word(ISSET(AFTER_ENDS), ISSET(WORD_BOUNDS), TRUE); + do_next_word(ISSET(AFTER_ENDS), ISSET(WORD_BOUNDS)); edit_redraw(was_current, FLOWING); } diff --git a/src/proto.h b/src/proto.h @@ -366,15 +366,15 @@ void to_last_line(void); void do_page_up(void); void do_page_down(void); #ifdef ENABLE_JUSTIFY -void do_para_begin(bool update_screen); -void do_para_end(bool update_screen); +void do_para_begin(void); +void do_para_end(void); void do_para_begin_void(void); void do_para_end_void(void); #endif void do_prev_block(void); void do_next_block(void); -void do_prev_word(bool allow_punct, bool update_screen); -bool do_next_word(bool after_ends, bool allow_punct, bool update_screen); +void do_prev_word(bool allow_punct); +bool do_next_word(bool after_ends, bool allow_punct); void do_prev_word_void(void); void do_next_word_void(void); void do_home(void); diff --git a/src/text.c b/src/text.c @@ -216,7 +216,7 @@ void do_cutword(bool backward) * on the edge of the original line, then put the cursor on that * edge instead, so that lines will not be joined unexpectedly. */ if (backward) { - do_prev_word(ISSET(WORD_BOUNDS), FALSE); + do_prev_word(ISSET(WORD_BOUNDS)); if (openfile->current != is_current) { if (is_current_x > 0) { openfile->current = is_current; @@ -225,7 +225,7 @@ void do_cutword(bool backward) openfile->current_x = strlen(openfile->current->data); } } else { - do_next_word(FALSE, ISSET(WORD_BOUNDS), FALSE); + do_next_word(FALSE, ISSET(WORD_BOUNDS)); if (openfile->current != is_current && is_current->data[is_current_x] != '\0') { openfile->current = is_current; @@ -2135,7 +2135,7 @@ bool find_paragraph(size_t *const quote, size_t *const par) /* If the current line isn't in a paragraph, move forward to the * last line of the next paragraph, if any. */ if (!inpar(openfile->current)) { - do_para_end(FALSE); + do_para_end(); /* If we end up past the beginning of the line, it means that * we're at the end of the last line of the file, and the line @@ -2157,14 +2157,14 @@ bool find_paragraph(size_t *const quote, size_t *const par) /* If the current line is in a paragraph and isn't its first line, move * back to the first line of the paragraph. */ if (inpar(openfile->current) && !begpar(openfile->current, 0)) - do_para_begin(FALSE); + do_para_begin(); /* Now current is the first line of the paragraph. Set quote_len to * the quotation length of that line, and set par_len to the number * of lines in this paragraph. */ quote_len = quote_length(openfile->current->data); current_save = openfile->current; - do_para_end(FALSE); + do_para_end(); par_len = openfile->current->lineno - current_save->lineno; /* If we end up past the beginning of the line, it means that we're at @@ -3341,7 +3341,7 @@ void do_wordlinechar_count(void) * count whenever we're on a word just before moving. */ while (openfile->current != openfile->filebot || openfile->current->data[openfile->current_x] != '\0') { - if (do_next_word(FALSE, TRUE, FALSE)) + if (do_next_word(FALSE, TRUE)) words++; }