- 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)
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? */
/* 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)));
/* 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));
* 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
#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