tweaks: random unimportant edits here and there

This commit is contained in:
Benno Schulenberg 2025-05-09 11:19:28 +02:00
parent 879885a736
commit a0918c5e98
5 changed files with 12 additions and 13 deletions

View File

@ -8246,7 +8246,7 @@ nano-0.7.7 - 2000.01.19
- Added check for keystroke key sequence 407 or NANO_CONTROL_Z
in main while loop because suspend mode was broken. This should
fix it, at least for now.
- Added long option support (By popular harassment ;-) - Added
- Added long option support (by popular harassment ;-) : added
#include for getopt.h, changed getopt() to getopt_long().
Options added so far: --version (-V), --nowrap (-w), --suspend
(-z), --help (-h), --nohelp (-x).
@ -8258,15 +8258,15 @@ nano 0.7.6 - 2000.01.15
main(): Bound CONTROL_H to backspace (oops).
Added more Alt-[-key combinations, for page up & down.
read_bytes(): New function. (Adam Rogoyski)
read_file(): Optimizations - malloc()s *buf a little at a time rather
than one huge buffer, and replaced the strcat at the end
with an index variable. Added call to read_bytes().
read_file(): Optimizations -- malloc()s *buf a little at a time
rather than one huge buffer, and replaced the strcat() at
the end with an index variable. Added call to read_bytes().
do_next_word(): New function, binding is Ctrl-Space (0). (Chris)
- winio.c:
bottombars(): Fixed non-expanding shortcut keys at bottom of screen.
(formula is extra space needed = COLS / 6 - 13).
actual_x() & strlenpt():
Added bug#9 fix - when tabs % 8 == 0, we should only
Added fix for bug #9 -- when tabs % 8 == 0, we should only
increment tabs by 1.
titlebar(): Fixed overrun in titlebar on very long filenames.

View File

@ -1555,10 +1555,10 @@ void init_backup_dir(void)
}
#endif
/* Read all data from inn, and write it to out. File inn must be open for
* reading, and out for writing. Return 0 on success, a negative number on
* read error, and a positive number on write error. File inn is always
* closed by this function, out is closed only if close_out is true. */
/* Read all data from `inn`, and write it to `out`. File `inn` must be open
* for reading, and `out` for writing. Return 0 on success, a negative number
* on read error, and a positive number on write error. File `inn` is always
* closed by this function, `out` is closed only if `close_out` is true. */
int copy_file(FILE *inn, FILE *out, bool close_out)
{
int retval = 0;

View File

@ -352,11 +352,10 @@ void save_history(void)
/* Return as a string... the line numbers of the lines with an anchor. */
char *stringify_anchors(void)
{
linestruct *line = openfile->filetop;
char *string = copy_of("");
char number[24];
for (; line != NULL; line = line->next)
for (linestruct *line = openfile->filetop; line != NULL; line = line->next)
if (line->has_anchor) {
sprintf(number, "%li ", line->lineno);
string = nrealloc(string, strlen(string) + strlen(number) + 1);

View File

@ -29,7 +29,7 @@ color brightred "^[[:blank:]]*\*\*\*.*"
color magenta "\[|\]|\(|\)"
# Comments:
color blue "^[[:blank:]]*#.*" "\<dnl.*"
color blue "^[[:blank:]]*#.*|\<dnl.*"
# Trailing whitespace:
color ,green "[[:space:]]+$"

View File

@ -1,6 +1,6 @@
## Syntax highlighting for the packet-filtering rules of Netfilter.
## Original author: Arturo Borrero González <arturo@debian.org>
## Original author: Arturo Borrero González
## License: GPL version 3 or newer
syntax nftables "\.(nft|nftables)$"