From: David Lawrence Ramsey Date: Fri, 14 May 2004 01:17:25 +0000 (+0000) Subject: the last of the minor fixes X-Git-Tag: v1.3.3~81 X-Git-Url: https://git.wh0rd.org/?a=commitdiff_plain;h=d4693cb0be7aeab69a4d3ee657e27730d68ebfc9;p=nano.git the last of the minor fixes git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@1737 35c25a1d-7b9e-4130-9fde-d3aeb78583b8 --- diff --git a/ChangeLog b/ChangeLog index 9d669209..3ab3c641 100644 --- a/ChangeLog +++ b/ChangeLog @@ -49,13 +49,15 @@ CVS code - - nano.c: do_delete() - Tweak for efficiency. (David Benbennick) + justify_format() + - Remove redundant assignment. (DLR) do_exit() - Refactor so that no recursion is needed if we try to exit with a modified file that has no name when TEMP_OPT is set. (DLR) print_numlock_warning() - Removed, as it's no longer needed and was never called anywhere after the input overhaul. (DLR) - do_verbatim_kbinput() + do_verbatim_input() - Use size_t's instead of ints for the get_verbatim_kbinput() call and the loop that ungetch()es its returned int*, respectively. (DLR) diff --git a/src/nano.c b/src/nano.c index 58f79480..b46dfca2 100644 --- a/src/nano.c +++ b/src/nano.c @@ -1920,7 +1920,6 @@ int justify_format(int changes_allowed, filestruct *line, size_t skip) assert(!isblank(line->data[skip])); back = line->data + skip; - front = back; for (front = back; ; front++) { int remove_space = FALSE; /* Do we want to remove this space? */ @@ -2017,8 +2016,8 @@ size_t quote_length(const char *line) /* a_line and b_line are lines of text. The quotation part of a_line is * the first a_quote characters. Check that the quotation part of * b_line is the same. */ -int quotes_match(const char *a_line, size_t a_quote, - IFREG(const char *b_line, const regex_t *qreg)) +int quotes_match(const char *a_line, size_t a_quote, IFREG(const char + *b_line, const regex_t *qreg)) { /* Here is the assumption about a_quote: */ assert(a_quote == quote_length(IFREG(a_line, qreg))); @@ -2028,8 +2027,8 @@ int quotes_match(const char *a_line, size_t a_quote, /* We assume a_line and b_line have no quote part. Then, we return whether * b_line could follow a_line in a paragraph. */ -size_t indents_match(const char *a_line, size_t a_indent, - const char *b_line, size_t b_indent) +size_t indents_match(const char *a_line, size_t a_indent, const char + *b_line, size_t b_indent) { assert(a_indent == indent_length(a_line)); assert(b_indent == indent_length(b_line)); @@ -2041,8 +2040,8 @@ size_t indents_match(const char *a_line, size_t a_indent, * buffer, not allowing them to be concatenated. We assume there are * enough lines after first_line. We leave copies of the lines in * place, too. We return the new copy of first_line. */ -filestruct *backup_lines(filestruct *first_line, size_t par_len, - size_t quote_len) +filestruct *backup_lines(filestruct *first_line, size_t par_len, size_t + quote_len) { /* We put the original lines, not copies, into the cut buffer, just * out of a misguided sense of consistency, so if you un-cut, you diff --git a/src/proto.h b/src/proto.h index 93f45c10..381fbfe3 100644 --- a/src/proto.h +++ b/src/proto.h @@ -314,12 +314,12 @@ size_t quote_length(const char *line); #else # define IFREG(a, b) a #endif -int quotes_match(const char *a_line, size_t a_quote, - IFREG(const char *b_line, const regex_t *qreg)); -size_t indents_match(const char *a_line, size_t a_indent, - const char *b_line, size_t b_indent); -filestruct *backup_lines(filestruct *first_line, size_t par_len, - size_t quote_len); +int quotes_match(const char *a_line, size_t a_quote, IFREG(const char + *b_line, const regex_t *qreg)); +size_t indents_match(const char *a_line, size_t a_indent, const char + *b_line, size_t b_indent); +filestruct *backup_lines(filestruct *first_line, size_t par_len, size_t + quote_len); int breakable(const char *line, int goal); int break_line(const char *line, int goal, int force); int do_para_search(int search_type, size_t *quote, size_t *par, size_t