nano/ChangeLog
David Lawrence Ramsey 57f97538b1 fix changelog entry
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@3397 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2006-04-20 03:03:57 +00:00

7464 lines
324 KiB
Plaintext

CVS code -
- General:
- Miscellaneous comment fixes. (DLR)
- Implement filename searches in the file browser. New
functions filesearch_init(), findnextfile(),
findnextfile_wrap_reset(), filesearch_abort(),
do_filesearch(), do_fileresearch(), do_first_file(),
do_last_file(), do_help_void(), and do_browser_help(); changes
to do_browser(), parse_browser_input(), shortcut_init(),
do_help(), and help_init(). (DLR)
- Open all files in binary mode for consistency and robustness.
Changes to load_history() and do_rcfile(). (DLR)
- Change translator-specific comments in global.c and prompt.c
so that they show up in nano.pot, and make them all
consistent. (Benno Schulenberg and DLR)
- Reduce USE_UTF8 to a static bool in chars.c, allow nano.c to
set it via a function, and allow winio.c to read its value
when needed. New functions utf8_init() and using_utf8();
changes to is_alnum_mbchar(), is_blank_mbchar(),
is_cntrl_mbchar(), is_punct_mbchar(), control_mbrep(),
mbrep(), mbwidth(), mb_cur_max(), make_mbchar(),
parse_mbchar(), mbstrncasecmp(), mbstrcasestr(),
mbrevstrcasestr(), mbstrnlen(), mbstrchr(), mbstrpbrk(),
mbrevstrpbrk(), has_blank_mbchars(), is_valid_mbstring(),
main(), display_string(), and do_credits(). (DLR)
- Add the ability to use bold text instead of reverse video
text, via the -D/--boldtext command line option and the
"boldtext" rcfile option. Changes to do_help(), usage(),
main(), update_statusbar_prompt(), do_yesno_prompt(),
titlebar(), statusbar(), onekey(), edit_draw(),
do_replace_highlight(), nano.1, nanorc.5, nano.texi, and
nanorc.sample. (DLR, suggested by Benno Schulenberg)
- Add the ability to use self-contained color syntaxes from
separate files, accessible in the nanorc via the "include"
command. New function parse_include(); changes to
parse_rcfile(), do_nanorc(), nanorc.5, and nanorc.sample.
(Victor Ananievsky, Brand Huntsman and DLR)
- Change references to the "help menu" to the "help text
display" refer to display, for clarity. Changes to
shortcut_init(), configure.ac, and faq.html. (DLR, suggested
by Benno Schulenberg)
- Adjust the shortcut list display and related mouse support to
not waste the last few characters of bottomwin when the screen
width isn't a clean multiple of the column width. Changes to
do_mouseinput() and bottombars(). (Benno Schulenberg, minor
tweaks by DLR)
- Add several blank entries to the main shortcut list, in order
to make its help text easier to read. Changes to
sc_init_one() and shortcut_init(). (DLR, suggested by Benno
Schulenberg)
- files.c:
open_file()
- Remove redundant wording in the error message when we try to
open a device file. (DLR)
safe_tempfile()
- Don't ignore $TMPDIR if it's set but blank, for consistency.
(DLR)
write_file()
- Don't free backupname before displaying it in a statusbar error
message. (DLR, found by Bill Marcum)
- If we can't save the backup file for some reason, at least
save the original file, if possible, since that's better than
saving nothing. (DLR, problem found by Bill Marcum, solution
suggested by Jordi)
- Clarify the error message when writing a temporary file for
prepending fails. (DLR)
- Simplify the routine for closing the file just before we
indicate success on the statusbar. (DLR)
- global.c:
shortcut_init()
- Change the cursor position display help text to use "display"
instead of "show", for consistency. (DLR)
- In the main shortcut list, move the "Refresh" shortcut down to
after the "Enter" shortcut, for consistency. (DLR)
toggle_init()
- In the global toggle list, move the "Constant cursor position
display" toggle up to after the "Use more space for editing"
toggle, for consistency. (DLR)
- nano.c:
renumber()
- Remove invalid assert. (DLR, found by Filipe Moreira)
- rcfile.c:
parse_argument()
- Rename variable ptr_bak to ptr_save, for consistency. (DLR)
parse_syntax()
- Properly generate an error if we've read in a previous syntax
without any associated color commands. (DLR)
- Don't generate an error if we find a duplicate syntax name,
since we might be trying to override a syntax in the global
nanorc with one in our local nanorc. Instead, free any
duplicate syntaxes we find, so that we always use the last
syntax with a given name. (DLR)
parse_colors()
- Check for a color command's not following a syntax line before
anything else. (DLR)
do_rcfile()
- Check for the rcfile's being a directory or device file and
reject it if it is, for consistency with file handling
elsewhere. (DLR)
- Remove SYSCONFDIR #ifdef, as SYSCONFDIR should always be set.
(DLR)
- Change all rcfile error messages to refer to commands instead
of directives, for consistency with nanorc.5. (DLR)
- configure.ac:
- Remove old warning about color support. (DLR)
- doc/nano.1, doc/nanorc.5, doc/rnano.1, doc/nano.texi:
- Update the copyright years to include 2006. (DLR)
- Explicitly mention that all regexes should be extended regular
expressions. (DLR, suggested by John M. Gabriele)
- Miscellaneous minor fixes. (DLR)
- doc/nano.texi:
- Change license to GPL, in order to match the rest of the
documentation, and because the current license is incompatible
with everything else in any case. (DLR)
- Mention that backup files and spell checking are disabled in
restricted mode, as rnano.1 does. (DLR)
- doc/man/fr/nano.1, doc/man/fr/nanorc.5, doc/man/fr/rnano.1:
- Updated manpage translations by Jean-Philippe Guérard.
- doc/nanorc.sample:
- Tweak the "c-file" regex for characters to accept '"' again,
as it's apparently valid, and simplify it. (DLR)
- Simplify the "shellscript" regex for command line options.
(DLR)
- Replace instances of \" with ", since quotes inside string
parameters don't need to be escaped with backslashes. (DLR)
- Mention in the comments that more than one start/end regex can
be included per line. Also, change the comment for the
"whitespace" option so that the hexadecimal character values
are six digits long, and state which character values work
with which encodings. (DLR)
- Add sample regexes for Python. (singular on the Gentoo forums,
http://forums.gentoo.org/viewtopic.php?t=86562; minor tweaks
by DLR, suggested by John M. Gabriele)
- Explicitly mention that all regexes should be extended regular
expressions. (DLR, suggested by John M. Gabriele)
- Simplify the "nanorc" regex for commands. (DLR)
- UPGRADE:
- Miscellaneous minor fixes. (DLR)
GNU nano 1.3.11 - 2006.03.30
- General:
- Miscellaneous comment fixes. (DLR)
- Remove unnecessary #ifdef around termios.h #include in nano.c.
(DLR)
- Sort the default strings for brackets and punct, and the "or"
atom in the default regex string for quotestr, according to
ASCII. Changes to main(), nano.1, nanorc.5, and
nanorc.sample. (DLR)
- Rework the bracket searching code to handle multibyte bracket
characters, and allow specifying matching bracket characters
other than the default via the "matchbrackets" rcfile option.
New functions mbstrpbrk() and mbrevstrpbrk(); changes to
find_statusbar_bracket_match(), do_statusbar_find_bracket(),
find_bracket_match(), do_find_bracket(), main(),
parse_rcfile(), nanorc.5, and nanorc.sample. (DLR)
- Rework input parsing in the file browser to be more flexible.
New function parse_browser_input(); changes to do_browser().
(DLR)
- Allow tab completion of directories at the "Go To Directory"
prompt. Also, move the browser drawing routines to a separate
function, and make sure it's used when refreshing or doing tab
completion at the prompt in the file browser. New function
browser_refresh(); changes to do_browser(), browser_init(),
do_insertfile(), do_writeout(), cwd_tab_completion(),
input_tab(), do_statusbar_input(), get_prompt_string(),
do_prompt(), search_init(), do_replace(), do_gotolinecolumn(),
and do_int_spell_fix(). (DLR)
- browser.c:
do_browser()
- Properly set currshortcut back to the file browser shortcut
list after a "Go To Directory" prompt, and properly restore
the file list display after returning from the help browser at
the "Go To Directory" prompt. (DLR)
- Rename variable j to i, for consistency. (DLR)
- Make fileline, old_selected, and the static selected size_t's,
since the first and second can hold the value of the third,
and the first can be that large. (DLR)
- chars.c:
mbstrchr()
- Make parameter c const. (DLR)
- files.c:
do_writeout()
- Remove unneeded setting of currshortcut. (DLR)
is_dir()
- Rename parameter ret to retval, for consistency. (DLR)
- global.c:
shortcut_init()
- Remove erroneous handling of the "Get Help" shortcut in the
file browser shortcut list. (DLR)
- nano.h:
- Remove now-unneeded VERMSG #define. (DLR)
- prompt.c:
get_prompt_string()
- Redraw the prompt and set finished to FALSE when NANO_HELP_KEY
is pressed, so that we don't leave the prompt, enter the help
browser, and restart the prompt after leaving it. This will
properly preserve the cursor position after doing the last of
these. (DLR)
- utils.c:
ngetdelim()
- Do sanity checks manually again instead of in an assert, and
set errno to EINVAL as well as return -1 if they fail. This
matches the manual page. (DLR)
- winio.c:
get_key_buffer()
- If we fail to get a character MAX_BUF_SIZE times in a row,
hang up regardless of the value of errno. This fixes a
problem where nano doesn't terminate properly under xterm if
the user su's to root, runs nano, and then closes the terminal
window. errno isn't set properly to EIO then. (DLR, found by
John <acocaracha@gmail.com>)
parse_kbinput()
- Interpret Shift-Begin, Shift-Delete, Shift-End, Shift-Home,
Shift-Insert, and Shift-Suspend as Begin, Delete, End, Home,
Insert, and Suspend, respectively, regardless of whether
--rebindkeypad is used. (DLR, found by David Benbennick)
titlebar()
- Use PACKAGE_STRING, as defined by autoconf, instead of VERMSG.
(DLR)
edit_redraw()
- If either current or old_current is offscreen, we're not on
the first page, and/or we're not on the same page as before,
update old_current before scrolling the edit window. This
fixes a potential display problem when a search moves the
cursor offscreen and onto a different page. (DLR, found by
Mike Frysinger)
display_string()
- Fix minor memory leak. (DLR)
- Fix memory corruption problems caused by not allocating enough
space for converted when a line ends in a tab(s) and we're not
in UTF-8 mode. (DLR, found by Duncan Geoffry Doyle, Nick
Warne, and Mike Frysinger)
- doc/faq.html:
- Update the Free Translation Project's address, change the
character set to UTF-8, and remove broken links to contributed
RedHat nano packages. (DLR)
- doc/nano.1:
- Better display the default values for quotestr. (DLR)
- doc/nanorc.5:
- Give the default values for the brackets and punct options,
and better display the default values for quotestr. (DLR)
- Mention that quotes inside string parameters don't need to be
escaped with backslashes. (John M. Gabriele, minor tweaks by
DLR)
- doc/rnano.1:
- Remove unneeded comments. (DLR)
- doc/nanorc.sample:
- Remove unneeded comment. (DLR)
- Mention that quotes inside string parameters don't need to be
escaped with backslashes. (John M. Gabriele, minor tweaks by
DLR)
- THANKS:
- Add new Swedish translator.
GNU nano 1.3.10 - 2005.12.23
- General:
- Miscellaneous comment fixes. (DLR)
- More int -> bool conversions. (DLR)
- Add the ability to scroll up or down single lines without
scrolling the cursor, via Meta-- and Meta-+. Note that this
is disabled when NANO_SMALL is defined. New functions
do_scroll_up() and do_scroll_down(); changes to
shortcut_init(). (DLR, suggested by Mike Frysinger)
- Properly handle mouse clicks on the statusbar prompt text.
New functions statusbar_xplustabs() and
get_statusbar_page_start(); changes to do_statusbar_mouse(),
nanoget_repaint(), nanogetstr(), and statusq(). (DLR)
- Since the statusbar prompt code needs at least 4 columns in
order to work properly, make that the minimum number of
columns that nano requires in order to run, and remove
assertions and code that make use of a smaller number of
columns. Changes to window_init(), nanoget_repaint(),
titlebar(), statusbar(), and get_page_start(). (DLR)
- Move get_page_start(), xplustabs(), actual_x(), strnlenpt(),
strlenpt(), check_linenumbers(), dump_buffer(), and
dump_buffer_reverse() from winio.c to utils.c, as they're
really utility functions. (DLR)
- Add missing stdio.h #include to text.c and winio.c, and remove
unneeded sys/wait.h #include from files.c. (DLR)
- Move functions specific to the statusbar prompt to their own
source file, adjust related variables accordingly, and rename
variable resetstatuspos reset_statusbar_x. New file prompt.c;
changes to do_statusbar_input(), do_statusbar_mouse(),
do_statusbar_output(), do_statusbar_home(),
do_statusbar_end(), do_statusbar_right(), do_statusbar_left(),
do_statusbar_backspace(), do_statusbar_delete(),
do_statusbar_cut_text(), do_statusbar_next_word(),
do_statusbar_prev_word(), do_statusbar_verbatim_input(),
statusbar_xplustabs(), get_statusbar_page_start(),
nanoget_repaint(), nanogetstr(), statusq(), statusq_abort(),
and do_yesno() (all moved to prompt.c). (DLR)
- Move functions specific to the help browser to their own
source file, and adjust related variables accordingly. New
file help.c; changes to help_init(), help_line_len(), and
do_help() (all moved to help.c). (DLR)
- Tweak a few functions to remove the assumption that the file
always ends in a magicline. Changes to cut_line(),
do_cut_till_end(), open_buffer(), read_file(), write_file(),
do_last_line(), do_para_end(), do_wrap(), backup_lines(),
find_paragraph(), do_justify(), do_alt_speller(), and
do_wordlinechar_count(). (DLR)
- Tweak a few functions to rely on fileage and filebot instead
of NULL for their checks to detect the top or bottom of the
file. Changes to cut_line(), cut_to_eol(), do_page_up(),
do_page_down(), do_para_end(), do_next_word(), do_prev_word(),
do_up(), do_down(), do_scroll_down(), do_right(), do_mouse(),
do_gotolinecolumn(), do_delete(), begpar(), find_paragraph(),
do_wrap(), remove_magicline(), and edit_scroll(). (DLR)
- Add new -L/--nonewlines command line option, and new
"nonewlines" rcfile option, to control whether nano adds
magiclines to the ends of files. Changes to read_file(),
write_marked_file(), move_to_filestruct(),
copy_from_filestruct(), usage(), do_output(), main(),
do_replace_loop(), do_delete(), do_int_spell_fix(),
do_alt_speller(), nano.1, nanorc.5, nano.texi, and
nanorc.sample. (DLR, suggested by Jaime
<re2823@Safe-mail.net>)
- Move functions specific to the file browser to their own
source file, and adjust related variables accordingly. New
file browser.c; changes to striponedir(), browser_init(),
do_browser(), and do_browse_from() (all moved to browser.c).
(DLR)
- Add the statusbar prompt's equivalent of placewewant,
statusbar_pww, to prompt.c, and convert its functions to use
it. New functions reset_statusbar_cursor() and
need_statusbar_horizontal_update(); changes to
do_statusbar_mouse(), do_statusbar_output(),
do_statusbar_home(), do_statusbar_end(), do_statusbar_right(),
do_statusbar_left(), do_statusbar_delete(),
do_statusbar_cut_text(), do_statusbar_next_word(),
do_statusbar_prev_word(), do_statusbar_verbatim_input(),
nanoget_repaint() (renamed update_statusbar_line()),
nanogetstr() (renamed get_prompt_string()), statusq() (renamed
do_prompt()), statusq_abort() (renamed do_prompt_abort()), and
do_yesno() (renamed do_yesno_prompt()). (DLR)
- Initialize the static pid_t pid in text.c to -1. (DLR)
- Fix copyright years on source files. All functions in
browser.c were originally added in 2001; the oldest function
in color.c is do_colorinit() (now color_init()), which was
originally added in 2001; the oldest function in chars.c is
revstrstr(), which was originally added in 2001; the oldest
function in help.c is do_help(), which was originally added in
2000; the oldest function in prompt.c is statusq() (now
do_prompt()), which was originally added before 0.6.6, which
was apparently in 1999; all functions in rcfile.c were
originally added in 2001; one of the oldest functions in
search.c is do_search(), which was originally added in 0.2.7,
which was apparently in 1999; and one of the oldest functions
in text.c is do_wrap(), which was originally added in 0.3.1,
which was apparently in 1999. (DLR)
- For functions originally adapted from other sources, add
notices from the original files, as we do with the tab
completion functions adapted from busybox, updating the Free
Software Foundation's address as needed. Also, invoke LGPL
clause 3 to convert the LGPLed ngetdelim() and ngetline()
functions to use the GPL instead. This is done so that we
don't have to include a copy of the LGPL, and because the
changes made to integrate these functions with nano make them
dependent on nano's GPLed functions and hence useless
elsewhere. (DLR)
- Don't install the localized versions of the manpages if
nano is built with --disable-nls. Changes to Makefile.am and
doc/man/Makefile.am. (Mike Frysinger)
- Rename the NANO_SMALL #define to NANO_TINY. (DLR)
- Overhaul the bracket searching code so that it no longer
requires regex support to work. New functions revstrpbrk()
and find_bracket_match(); changes to shortcut_init() and
do_find_bracket(). (DLR)
- Add the ability to do bracket searches at the statusbar
prompt. New functions find_statusbar_bracket_match() and
do_statusbar_find_bracket(); changes to do_statusbar_input().
(DLR)
- Beep whenever we can't read a file or directory and have to
indicate it on the statusbar, as Pico does. Changes to
do_browser(), open_file(), and write_file(). (DLR)
- Adjust copyright notices in all source files to account for
Chris' reassigning the 2005-2006 copyright on nano to me.
Changes to do_credits(). (DLR)
- Readd RETSIGTYPE return types for signal handlers, since any
problems with its being defined as the wrong type aren't
nano's fault. Changes to handle_hupterm(), do_suspend(),
do_continue(), handle_sigwinch(), and cancel_command(). (DLR)
- Since proto.h includes nano.h, and nano.h includes config.h
first, include proto.h first and remove redundant includes of
config.h in all non-header source files. (DLR)
- Refer to the Enter key instead of the Return key for
consistency. Changes to load_history() and rcfile_error().
(DLR)
- browser.c:
do_browser()
- When setting the width of each file, use the "?" operator
instead of an if/else clause. (DLR)
- chars.c:
mbwidth()
- If wcwidth() returns -1 for the character passed in, treat the
character as having the width of Unicode U+FFFD (Replacement
Character) instead of having a width of zero, since display
problems can crop up with the latter approach. (DLR)
mbstrchr()
- Detect the case where the character isn't found in the string
more accurately. (DLR)
- cut.c:
cut_line()
- Since placewewant will always be zero after the line is cut,
set it to zero directly instead of assigning it the value of
xplustabs(). (DLR)
- files.c:
read_file()
- Remove apparently unneeded logic to handle a case where
current is NULL, since it shouldn't be NULL there. (DLR)
get_next_filename()
- Store the value of digits(ULONG_MAX) in a static, since it
doesn't change and hence doesn't need to be recalculated.
(DLR)
- global.c:
shortcut_init()
- Change the description of the Meta-] shortcut to "Find
matching bracket", as it's clearer. (DLR)
- nano.c:
version()
- If DISABLE_WRAPPING is defined, the code in DISABLE_ROOTWRAP
#ifdefs isn't included, so don't display
"--disable-wrapping-as-root" in that case. (DLR)
do_cont()
- Rename to do_continue(), and rename parameter s to signal, for
consistency. (DLR)
do_verbatim_input()
- Move to text.c, since it's an advanced text-based operation.
(DLR)
- nano.h:
- Readd MIN_EDITOR_COLS #define, set to 4. (DLR)
- proto.h:
- Remove now-unused externs for currslen, shortcut_list,
fileinfo, syntaxfile_regexp, and synfilematches. (DLR)
- prompt.c:
do_statusbar_input()
- Fix misplaced break when handling NANO_VERBATIM_KEY. (DLR)
reset_statusbar_cursor()
- Fix cursor placement problem by modeling the code more closely
after reset_cursor(). (DLR)
get_prompt_string()
- Adjust #ifdefs to leave out disabled keys entirely instead of
keeping enough code to just ignore them. (DLR)
- rcfile.c:
do_rcfile()
- Remove unneeded assert. (DLR)
- search.c:
search_abort()
- Rename to search_replace_abort(). (DLR)
findnextstr()
- Remove parameter can_display_wrap, as it's always set to TRUE
now, and rename parameter wholeword to whole_word, for
consistency. (DLR)
- Only include the whole_word parameter when DISABLE_SPELLER
isn't defined, as it's only used then. (DLR)
replace_abort()
- Replace with search_replace_abort(), since it does the same
things that this function does. (DLR)
do_replace_loop()
- Change order of parameters to more closely match those of
findnextstr(), and rename parameter wholewords to whole_word,
for consistency. (DLR)
- Only include the whole_word parameter when DISABLE_SPELLER
isn't defined, as it's only used then. (DLR)
- text.c:
execute_command()
- Instead of hardcoding /bin/sh as the shell to use when
executing a command, use $SHELL, and only fall back to /bin/sh
if $SHELL isn't set. (DLR)
do_wrap()
- Rename variable wrapping to prepending, to avoid confusion,
and rename the static bool same_line_wrap to prepend_wrap to
match. (DLR)
- Properly add a new magicline when needed if, in the process of
wrapping, we prepend text to the last line of the file. (DLR)
break_line()
- Only include the newline parameter if DISABLE_HELP isn't
defined, as it's only used then. (DLR)
- In the surrounding #ifdef, replace the combination of
!DISABLE_JUSTIFY and !DISABLE_WRAPPING with
!DISABLE_WRAPJUSTIFY, for consistency. (DLR)
begpar()
- Return FALSE if foo is NULL, as inpar() does. (DLR)
backup_lines()
- Return void instead of a pointer to the copy of the first
line, since current will point to the same location after the
text is copied and so can be used instead of the old return
value. (DLR)
- Remove unused quote_len parameter. (DLR)
do_justify()
- Don't save current_y and restore it if the user unjustifies,
as the reset_cursor() called by edit_refresh() after restoring
edittop and current will ensure that current_y is restored to
its original value. (DLR)
- Renumber after justifying each individual paragraph, since
find_paragraph() needs the line numbers to be right as well as
edit_refresh(). This fixes a potential segfault when doing
full justify with auto-indent turned on. (DLR)
do_alt_speller()
- Move the code that replaces the text of the current file with
the text of the spell-checked file into its own function,
replace_buffer(). (DLR)
- utils.c:
parse_line_column()
- Simplify parsing of the column number. (DLR)
ngetdelim()
- Do sanity checks in an assert instead of checking them
manually and returning -1 if they fail. (DLR)
is_whole_word()
- Only include when DISABLE_SPELLER isn't defined, as it's only
used then. (DLR)
get_page_start()
- Fix test so that we scroll through the line in 8-character
chunks when COLS is greater than 8, not when COLS is greater
than 9. (DLR)
remove_magicline()
- Add assert. (DLR)
- winio.c:
nanoget_repaint()
- Rename parameter inputbuf to buf, for consistency. (DLR)
reset_cursor()
- Rename variable x to xpt, to avoid confusion. (DLR)
update_line()
- Remove now-unneeded logic that set the index parameter to zero
if the fileptr parameter didn't point to current. (DLR)
edit_add()
- Rename to edit_draw(), and rename parameter yval to line.
(DLR)
do_cursorpos()
- Remove unneeded assert. (DLR)
do_yesno()
- Make mouse clicks on the Yes/No/All shortcuts work properly
when the MORE_SPACE flag is set. (DLR)
- configure.ac:
- Clarify description of --disable-speller. (DLR)
- Disable wrapping entirely when --enable-tiny is used, as it
matches the FAQ, it makes nano even smaller, and it eliminates
the need for --disable-wrapping-as-root in that case (in which
it's impossible to turn wrapping back on without nanorc
support). (DLR)
- README.CVS:
- Mention that the minimum required version of texinfo is 4.0,
since that's the first version that supports generating HTML.
(DLR)
- Mention that the minimum required version of groff is 1.12,
since that's the first version that supports generating HTML.
(DLR)
- Update the given cvs commands so that they work again. (DLR)
- doc/faq.html:
- Add a new section 5.3 to explain the status of nano's Unicode
support. (Mike Frysinger, minor tweaks by DLR)
- Clarify section 5.3 to better explain how to enable Unicode
support, and remove the mention of quirks, since they turned
out to not be a nano problem. (Mike Frysinger and DLR)
- doc/nano.1:
- Make one non-bold instance of "nano" bold, for consistency.
(DLR)
- doc/man/fr/nano.1, doc/man/fr/nanorc.5:
- Updated manpage translations by Jean-Philippe Guérard.
- doc/rnano.1:
- Add rnano.1 manpage from Thijs Kinkhorst. (Jordi) DLR: Merge
a few minor updates from nano.1.
- doc/nano.texi:
- Fix inconsistent wording and punctuation. (DLR)
- Add missing configure options. (Mike Frysinger, minor tweaks
by DLR)
- Sort the configure options more consistently, and add missing
--disable-utf8 option. (DLR)
- Move --disable-wrapping above --enable-tiny, as the latter now
turns it on. (DLR)
- doc/nanorc.sample:
- Tweak the "c-file" regex for characters to properly accept
'\"' and reject '"' and '''. (DLR)
- doc/texinfo/Makefile.am:
- Automatically generate an HTML version of the info page,
nano.html. (DLR)
- src/Makefile.am:
- Add browser.c, help.c, and prompt.c to nano_SOURCES. (DLR)
GNU nano 1.3.9 - 2005.10.23
- General:
- Miscellaneous comment fixes. (DLR)
- More int -> bool conversions. (DLR)
- Fix a few last instances of the current line number's being
saved as an int instead of a ssize_t. Changes to
renumber_all(), renumber(), do_alt_speller(), and
backup_lines(). (DLR)
- Reorder some functions for consistency. (DLR)
- Rename variable open_files openfile, for consistency. (DLR)
- Remove renumber()'s dependency on the main filestruct.
Changes to renumber(); removal of renumber_all(). (DLR)
- Restructure things so that every file has its own
openfilestruct, and so that the values in it are used directly
instead of being periodically synced up with the globals.
Accordingly, remove the globals. Changes to pretty much
every function. Rename add_open_file() make_new_buffer(),
rename load_buffer() open_buffer(), rename load_open_file()
display_buffer(), rename open_prevnext_file()
switch_to_prevnext_buffer(), rename open_prevfile_void()
switch_to_prev_buffer(), rename open_nextfile_void()
switch_to_next_buffer(), rename write_marked()
write_marked_file(), remove load_file(), rename cancel_fork()
cancel_command(), rename open_pipe() execute_command(), remove
execute_command(), rename resize_variables(), rename
global_init() window_size_init(), rename get_buffer()
get_key_buffer(), and rename get_buffer_len()
get_key_buffer_len(). (DLR)
- Replace all mvwaddstr(hblank) calls with a new function that
does the same thing without the need for hblank. New function
blank_line(); changes to do_browser(), blank_titlebar(),
blank_topbar(), blank_edit(), blank_statusbar(),
blank_bottombars(), update_line(), and edit_refresh(). (DLR)
- Make the static pid variable used by execute_command() and
cancel_command() a pid_t instead of an int, for consistency.
(DLR)
- Consistently make the flags global and any variables used to
hold it longs. (DLR)
- Make edit_scroll() sophisticated enough to keep track of
current and current_x, update the lines before and after the
scrolled region, and properly scroll more than editwinrows
lines; and change the movement functions that use
edit_scroll() to (a) set current and current_x before calling
it, and (b) no longer call edit_redraw() afterward, as it's
now unnecessary. These changes eliminate redundant screen
updates when the mark is on, since the mark display depends on
current and current_x. Also change edit_redraw() to use
edit_scroll() instead of edit_refresh() when one of its two
reference lines is offscreen. Changes to edit_scroll(),
do_page_up(), do_page_down(), do_up(), and do_down(). (DLR)
- Consistently make the fg and bg colortype struct entries and
any variables used to hold them shorts. Changes to
do_colorinit() (renamed color_init()), color_to_int() (renamed
color_to_short()), and parse_colors(). (DLR)
- Change color handling to save only the extension and color
regex strings constantly, and to actually compile them on an
as-needed basis. Also, make a color syntax specified on the
command line override the syntax associated with the current
file extension, add a "default" syntax that takes no
extensions for those files that don't match any other
syntax's extensions, and add a "none" syntax that's the same
as having no syntax at all. Changes to update_color(),
thanks_for_all_the_fish(), nregcomp(), parse_syntax(), and
parse_colors(). (Brand Huntsman and DLR)
- Various other color fixes. Handle unspecified foreground
colors properly, treat syntax names case sensitively, flag
duplicate syntax names as errors, don't automatically
reinitialize the displayed colors every time we update the
current buffer's colors (since the buffer may not be displayed
immediately), don't bother doing complete refreshes of the
screen when color support is enabled if there's no regex
associated with the current file, and rename variable
exttype->val to exttype->ext, for consistency. Changes to
do_colorinit() (renamed color_init()), update_color() (renamed
color_update()), write_file(), do_input(), do_output(), and
parse_syntax(). (DLR)
- Simplify get_totals() to only get the total number of
characters, and eliminate dependence on its old ability to get
the total number of lines by renumber()ing when necessary and
using the number of the last line of a filestruct. Changes to
read_file(), move_to_filestruct(), copy_from_filestruct(),
do_justify(), get_totals() (renamed get_totsize()), and
do_cursorpos(). (DLR)
- Change the NANO_WIDE #define to ENABLE_UTF8, as the latter is
clearer. (DLR)
- Minor history code fixes: Make sure that the current position
in the history list is properly set to the bottom if we cancel
out of the prompt, and that magichistory is properly updated
when we change it and then move up. New function
history_reset(); changes to nanogetstr(). (DLR)
- Various character-handling cleanups. If we get an invalid
multibyte sequence, treat it as Unicode FFFD (Replacement
Character), unless we're searching for a match to it. Also,
remove unneeded variables and checks when parsing multibyte
sequences. Changes to is_alnum_mbchar(), is_blank_mbchar(),
is_cntrl_mbchar(), is_punct_mbchar(), control_mbrep(),
mbwidth(), make_mbchar(), parse_mbchar(), mbstrncasecmp(),
mbstrcasestr(), mbrevstrcasestr(), mbstrchr(), and
display_string(). (DLR)
- Move advanced text operations (command execution in a buffer,
wrapping, spell checking, justifying, and word counting) to
their own source file, and adjust related variables
accordingly. New file text.c; changes to cancel_command(),
execute_command(), do_backspace(), do_delete(), do_tab(),
do_enter(), do_mark(), wrap_reset(), do_wrap(),
do_int_spell_fix(), do_int_speller(), do_alt_speller(),
do_spell(), break_line(), indent_length(), justify_format(),
quote_length(), quotes_match(), indents_match(), begpar(),
inpar(), backup_lines(), find_paragraph(), do_justify(),
do_justify_void(), do_full_justify(), and do_word_count() (all
moved to text.c). (DLR)
- Since the total number of lines in a file is the same as the
number of its last line when all its lines are numbered
properly, use that in place of openfile->totlines, and
eliminate references to openfile->totlines. Changes to
initialize_buffer_text(), read_file(), move_to_filestruct(),
copy_from_filestruct(), do_delete(), do_enter(), do_wrap(),
do_justify(), do_alt_speller(), do_wordlinechar_count(),
new_magicline(), remove_magicline(), and do_cursorpos(). (DLR)
- Various fill-related cleanups. Move check_die_too_small() and
window_size_init()'s code into window_init(), as they really
belong there, remove associated separate calls to them, make
sure window_init() is always called at the same time when
redrawing the screen, and turn the keypad on in topwin in case
we ever read input from it. Changes to window_init(), main(),
and do_alt_speller(); removal of check_die_too_small() and
window_size_init(). (DLR)
- Remove still more redundant screen updates. Change all
wrefresh() calls to wnoutrefresh() calls, except for those in
total_update() and do_credits(); call doupdate() just before
using blocking input, since nano spends the most time using
it, for blocking input; and only do constant sursor position
display if we're just about to use blocking input. Changes to
input_tab(), do_browser(), do_output(), main(),
get_key_buffer(), check_statusblank(), nanogetstr(),
titlebar(), statusbar(), bottombars(), edit_refresh(),
do_yesno(), and do_help(). (DLR)
- Treat the Unicode characters D800-DFFF, FDD0-FDEF, and
xxFFFE-xxFFFF, as invalid, since the C library's multibyte
functions don't seem to. New function is_valid_unicode();
changes to mbrep() and make_mbchar(). (DLR)
- Store Unicode values in longs instead of ints, and cover the
entire range of Unicode. Changes to make_mbchar(),
is_valid_unicode(), parse_kbinput(), get_unicode_kbinput(),
parse_verbatim_kbinput(), and faq.html. (DLR)
- Readd the option to turn the keypad off by default from nano
1.2.x, but rename the long option from --keypad to
--rebindkeypad, clarify its description on the command line,
and add an updated FAQ entry about its use. Changes to
window_init(), usage(), main(), get_verbatim_kbinput(),
nanorc.sample, nano.1, nanorc.5, nano.texi, and faq.html.
(DLR)
- Add new -W/--wordbounds command line option, and new
"wordbounds" rcfile option, to control whether
the word movement functions treat punctuation characters as
part of a word. Changes to do_next_word_void(),
do_prev_word_void(), usage(), main(), nano.1, nanorc.5,
nano.texi, and nanorc.sample. (DLR, suggested by Mike
Frysinger)
- Update email address. Changes to faq.html and AUTHORS. (DLR)
- Remove do_(left|right)()'s ability to optionally not update
the current line, as this was only used in do_backspace(), and
it didn't always update the screen properly. Changes to
shortcut_init(), do_left(), do_right(), and do_backspace();
removal of do_left_void() and do_right_void(). (DLR; problem
found by Mike Frysinger)
- color.c:
- Remove unneeded fcntl.h include. (DLR)
- chars.c:
control_rep(), control_mbrep()
- Assert that the multibyte character passed in is a control
character if it's valid. (DLR)
- If crep is an invalid multibyte sequence, copy Unicode 0xFFFD
(Replacement Character) into it using strncpy() instead of
assigning the former to it. This avoids segfaults when freeing
crep later, since it's supposed to be dynamically allocated.
(DLR)
mbrep()
- New function, the equivalent of control_mbrep() for non-control
characters. (DLR)
parse_mbchar()
- Remove now-unneeded bad_chr parameter. (DLR)
mbstrchr()
- Don't count matches between valid and invalid multibyte
sequences anymore, for consistency. (DLR)
- files.c:
open_file()
- Assert that filename isn't NULL, and don't do anything special
if it's blank, as the the former case shouldn't occur, and the
latter case is now handled elsewhere. (DLR)
write_file(), write_marked_file(), do_writeout()
- Make append an append_type enum instead of an int. (DLR)
input_tab()
- Make columns an int instead of a size_t, since it's limited by
COLS. (DLR)
- global.c:
shortcut_init()
- Simplify wording of nano_gotoline_msg. (Jordi and Ken Tyler)
- Clarify wording of nano_wordcount_msg, as it will only go
through the marked portions of the file if the mark is on.
(DLR)
- move.c:
do_first_line(), do_last_line()
- Simplify by only using edit_redraw(), and also make them call
check_statusblank(). (DLR)
do_page_up(), do_page_down()
- If there's less than a page of text onscreen, just call
do_(first|last)_line(). (DLR)
do_para_begin(), do_para_begin_void(), do_para_end(),
do_para_end_void(), do_next_word(), do_next_word_void(),
do_prev_word(), do_prev_word_void()
- Move here from nano.c, as they're movement functions, and also
make them call check_statusblank().
- nano.c:
move_to_filestruct()
- Fix problem where edittop wouldn't be reset properly if it was
inside the text moved to another filestruct. (DLR)
copy_from_filestruct()
- Miscellaneous cleanups. (DLR)
usage()
- Properly mention the support for "[+LINE,COLUMN]" on the
command line when HAVE_GETOPT_LONG isn't defined. (DLR)
- Remove unneeded translation of "--quickblank". (DLR)
do_verbatim_input()
- If constant cursor position display is on, make sure the
cursor position is displayed properly when we finish. (DLR)
do_next_word()
- Rework to be more like do_prev_word(), to avoid a potential
problem if we start at the end of a line. (DLR)
do_mouse()
- Avoid redundant screen updates by using edit_redraw() instead
of edit_refresh(), and remove now-erroneous code that disables
setting the mark while in view mode. (DLR)
do_output()
- When adding a character, just add its length in bytes to
current_x instead of calling do_right(), and set placewewant
afterward. (DLR)
do_alt_speller()
- If we can't invoke the spell checker, use sprintf() instead of
snprintf() to write the error string we return, as the one
formatted value is a simple string, and so altspell_error will
always be long enough to hold it. Also remove unnecessary
initialization of altspell_error, refactor so that msglen is
no longer needed, and make the error message more similar to
what the internal spell checker returns under the same
circumstances. (DLR)
- Block any pending SIGWINCHes while the alternate spell checker
is running, so that it can handle them, and unblock them once
it's finished and we've loaded the spell-checked file back in.
(DLR)
- Use doupdate() to reenter curses mode instead of refresh().
(DLR)
do_spell()
- When displaying an error message from do_(int|alt)_speller(),
don't display the error message corresponding to errno if
errno is zero. (David Benbennick)
do_justify()
- If constant cursor position display is on, make sure the
cursor position is displayed properly when we finish. (DLR)
handle_sigwinch()
- Use doupdate() to reenter curses mode instead of refresh().
(DLR)
allow_pending_sigwinch()
- Simplify by using the "?" operator instead of an if clause.
(DLR)
main()
- When opening files with "+LINE,COLUMN" arguments on the
command line, don't update the screen when moving to their
specified lines and columns. (DLR)
- Rename variable fill_flag_used to fill_used, for consistency.
(DLR)
- nano.h:
- Since we only use vsnprintf() now, remove the #ifdef block for
HAVE_SNPRINTF. (DLR)
- Remove TOP from the topmidnone enum, and rename the latter
centernone. (DLR)
- Move stdlib.h, dirent.h, regex.h, and assert.h includes here,
as every source file needs them. (DLR)
- Rename the updown enum scroll_dir and the centernone enum
update_type for clarity, and add an append_type enum. (DLR)
- If we don't have regex.h and hence regex support, disable
color support, as it depends on the use of regexes. (DLR)
- rcfile.c:
nregcomp()
- Return TRUE when the compilation succeeds and FALSE otherwise,
instead of the other way around. (DLR)
- search.c:
search_init()
- Don't blank out last_replace anymore when we get a new string,
as it'll be blanked out in do_replace(). Also, consolidate
the cases for blank and new search strings, as they now differ
only in which string they pass to regexp_init(). (DLR)
is_whole_word()
- Move to utils.c, as it's really a utility function in the same
vein as regexp_bol_or_eol(). (DLR)
replace_abort()
- Remove unnecessary update of placewewant. (DLR)
do_replace()
- Blank out last_replace properly again just before displaying
the "Replace" prompt. (DLR, found by Mike Frysinger)
- Remove unnecessary renumber(). (DLR)
do_gotolinecolumn()
- Add parameter allow_update to control whether the screen is
updated after moving. If it's TRUE, call edit_refresh() after
edit_update(). (DLR)
do_gotopos()
- Only include this function when DISABLE_SPELLER isn't defined,
as the alternate spell checking code is now the only place
where it's used. (DLR)
do_find_bracket()
- Add comments and minor cleanups. (DLR)
find_history()
- Make parameters const where possible. (DLR)
update_history()
- Don't renumber the history list starting after the entry we
found if the entry we found is at the bottom of the list.
(DLR, found by Simon Strandman)
get_history_completion()
- Make parameters const where possible. (DLR)
- text.c:
do_tab()
- Make sure that we insert the correct number of spaces if the
TABS_TO_SPACES flag is set and placewewant is greater than the
current column position of the cursor. (DLR)
do_enter()
- Don't update the edit window until we set placewewant. (DLR)
break_line()
- Fix a problem where a line could be broken in the middle of a
multibyte character. (DLR)
do_word_count()
- Rename to do_wordlinechar_count(), and expand to also count
the number of lines and characters in the file or selection,
as wc does. (DLR)
- winio.c:
get_key_buffer()
- Only save all open buffers and hang up when a blocking
wgetch() returns ERR and errno is set to EIO (input/output
error). If errno is set to something else, recover properly.
This fixes problems with nano's erroneously hanging up while
e.g. resizing or unsuspending in a chroot. (DLR, found by Mike
Frysinger)
get_escape_seq_kbinput()
- Fix typo preventing the VT100/VT220/VT320/xterm/rxvt escape
sequence for ',' on the numeric keypad with NumLock off from
being interpreted properly. (DLR)
get_word_kbinput()
- Multiply the entered digits by hexadecimal numbers instead of
decimal numbers for clarity, rename to get_unicode_kbinput(),
and rename variables word and word_digits to uni and
uni_digits. (DLR)
parse_verbatim_kbinput()
- Rename variables word_mb and word_mb_len to uni_mb and
uni_mb_len. (DLR)
display_string()
- Instead of using parse_mbchar()'s bad_chr parameter, use
mbrep() to get the representation of a bad character. (DLR)
- If column is less than start_col and the character's a tab,
which can be possible if there are enough tabs and the
terminal size is sufficiently large, don't try to display it
using control_mbrep(). (DLR, found by Duncan Geoffry Doyle)
- Really avoid a memory corruption problem by allocating enough
space for COLS characters. (DLR)
edit_redraw(), edit_refresh()
- Clean up and simplify. (DLR)
edit_update()
- Since we no longer use TOP, remove references to it. Also,
don't call edit_refresh() anymore; it will call us. (DLR)
do_statusbar_next_word()
- Rework to be more like do_statusbar_prev_word(), to avoid a
potential problem if we start at the end of a line. (DLR)
do_statusbar_input()
- Call do_statusbar_mouse() instead of do_mouse(). (DLR)
do_statusbar_output()
- When adding a character, just add its length in bytes to
statusbar_x instead of calling do_statusbar_right(). (DLR)
titlebar()
- Rework to display only one space after the version number, so
that there's more room for other things, and to not display
the status when we're in the file browser, since Pico doesn't.
(DLR)
do_credits()
- Various cleanups. Turn on the MORE_SPACE and NO_HELP flags
before showing the credits, so that they use as much of the
screen as possible, and set the flags back to their original
values afterward. Also, call wscrl(1) instead of scroll(),
only call scrollok() just before and after we scroll, and
tweak where screen updates occur so that messages are properly
displayed when they first scroll onto the bottom line of the
screen. (DLR)
- Add Mike Frysinger to credits. (DLR)
- configure.ac:
- Since we only use vsnprintf() now, remove the tests for
snprintf(). (DLR)
- Change the description of "sufficient wide character support"
to "sufficient UTF-8 support", as the latter is clearer. (DLR)
- Update the description of the ENABLE_COLOR option to mention
the need for regex.h. (DLR)
- doc/faq.html:
- Update section 4.10 to mention that pasting from the X
clipboard via the middle mouse button also works when the
Shift key is used. (DLR)
- doc/nanorc.sample:
- Add regexes for Bourne shell scripts. (Mike Frysinger, minor
tweaks by DLR)
- Explain how the "none" and "default" syntaxes work. (DLR)
- Tweaks and additions to the "c-file" regexes: handle #defined
constants more accurately and use a brighter color for them,
support C99 standard integer types, support more GCC builtins,
and color code flow control statements differently. (Mike
Frysinger) DLR: Slightly simplify the integer types regex.
- Tweak one "TeX" regex to use the "icolor" directive. (DLR)
- doc/man/nanorc.5:
- Explain how the "none" and "default" syntaxes work. (DLR)
- doc/man/fr/nano.1, doc/man/fr/nanorc.5:
- Updated translation by Jean-Philippe Guérard.
- src/Makefile.am:
- Add text.c to nano_SOURCES. (DLR)
- AUTHORS:
- Add Mike Frysinger. (DLR)
- README.CVS:
- Since we only use vsnprintf() now, remove the mention of
snprintf(). (DLR)
- THANKS:
- Add Bulgarian and Dutch translators.
GNU nano 1.3.8 - 2005.06.30
- General:
- Miscellaneous comment fixes. (DLR)
- Various #include fixes. Since proto.h includes nano.h, only
include the former in source files. Also add an #include
guard to proto.h, and make the config.h #include in nano.h
match the config.h #includes everywhere else. (DLR)
- Change all hardcoded instances of 128 bytes to MAX_BUF_SIZE,
and #define MAX_BUF_SIZE as 128 in nano.h. (DLR)
- Display the key to go to the previous strings in the
search/replace history as "^P" instead of "Up". This makes
mouse clicks work properly on it. Changes to shortcut_init(),
help_init(), nanogetstr(), and do_statusbar_input(). (DLR)
- Update the Free Software Foundation's mailing address in
various comments. (DLR)
- Add the ability to open a file on a specified column as well
as a specified line, by allowing an argument of the form
+LINE,COLUMN. New function parse_line_column(); changes to
shortcut_init(), main(), do_gotoline() (renamed
do_gotolinecolumn()), do_gotoline_void() (renamed
do_gotolinecolumn_void()), nano.1, and nano.texi. (DLR,
suggested by PFTank)
- Overhaul the history code to work more consistently, and clean
up various parts of it. New function history_has_changed();
changes to load_history(), writehist(),
thanks_for_all_the_fish(), history_init(), find_node()
(renamed find_history()), update_history(),
get_history_older(), get_history_newer(),
get_history_completion(), do_search(), do_replace(),
nanogetstr(), and statusq(); removal of remove_node() and
insert_node(). (DLR)
- Remove all instances of charcpy() and replace them with
strncpy(), since there's no way to be sure that a charcpy()ed
string will always be properly null-terminated, and strcpy()'s
null termination is the only difference between it and
charcpy(). (DLR)
- When using a backup directory, make sure all the filenames
written are unique by using get_next_filename() when
necessary. Changes to get_next_filename(), write_file(),
die(), usage(), nano.1, nanorc.5, nanorc.sample, and
nano.texi. (DLR, suggested by James Collings)
- Rework the file-writing routines so that they can work
properly with already-opened files, such as the
mkstemp()-created files used by the spell-checking code.
Changes to safe_tempnam() (renamed safe_tempfile()),
write_file(), write_marked(), die(), do_spell(), and
do_exit(). (DLR)
- Remove the -R/--regexp command line option and enable the
toggle at the search prompt in tiny mode, as it already
allows the prepend and append toggles at the search prompt.
For consistency, rename TOGGLE_REGEXP_KEY to NANO_REGEXP_KEY,
and move it out of the toggles block to where NANO_PREPEND_KEY
and NANO_APPEND_KEY are. Also, change the short command line
option for --restricted from -Z to -R. Changes to
shortcut_init(), usage(), main(), search_init(), nano.1,
nano.texi, etc. (DLR)
- Various cleanups and improvements in chars.c. Remove some
unnecessary w?ctype wrappers and variables; change the wctype
wrappers to take wint_t instead of wchar_t to match the
functions they wrap; rename some functions for consistency;
add functions to detect blank characters in a string, for use
in rcfile option parsing; and don't count matches between
valid and invalid multibyte sequences anymore, as it causes
problems when doing a replace. New functions
is_valid_mbstring(), has_blank_chars(), and
has_blank_mbchars(); changes to is_alnum_mbchar(),
is_blank_char() (renamed nisblank()), is_blank_mbchar(),
is_blank_wchar() (renamed niswblank()), is_cntrl_wchar(),
control_rep(), control_mbrep(), make_mbstring() (renamed
make_valid_mbstring()), mbstrncasecmp(), mbstrcasestr(),
mbrevstrcasestr(), etc.; removal of is_alnum_char() and
is_alnum_wchar(). (DLR)
- Implement word count via Meta-D at the main window. Note that
this is disabled when NANO_SMALL is defined. Also, convert
all word detection functions to use the same wrapper function
for ease of maintenance, and make them return more
information. New functions is_punct_mbchar(),
is_word_mbchar(), do_next_word_void(), do_prev_word_void(),
and do_word_count(); changes to shortcut_init(),
do_next_word(), do_prev_word(), is_whole_word(),
do_statusbar_next_word(), and do_statusbar_prev_word(). (DLR)
- Fix #ifdefs so that nano compiles with NANO_SMALL defined and
DISABLE_TABCOMP undefined. Changes to revstrstr() and
free_charptrarray() (renamed free_chararray()). (DLR)
- Change the wctype wrappers to take wchar_t's again, as they
still work the same way with them. This also fixes
compilation on Mac OS X 10.4.1, which doesn't seem to define a
wint_t type. (DLR, found by Emily Jackson)
- Add the ability to convert typed tabs to spaces using
the -E/--tabstospaces command line options, the "tabstospaces"
rcfile option, and the toggle Meta-Q (since QBasic did this by
default :)). Note that this doesn't affect tabs entered using
verbatim input, and that it's disabled when NANO_SMALL is
defined. Also, change the short command line option for
--backupdir from -E to -C. Changes to toggle_init(), usage(),
do_tab(), main(), nanorc.sample, nano.1, nanorc.5, and
nano.texi. (DLR, suggested by many people)
- Change the CONSTUPDATE, REVERSE_SEARCH, and SMOOTHSCROLL flags
to the CONST_UPDATE, BACKWARDS_SEARCH, and SMOOTH_SCROLL
flags, respectively. (DLR)
- Change the SMOOTHSCROLL flag to the SMOOTH_SCROLL flag. (DLR)
- Change the NO_UTF8 flag to the USE_UTF8 flag, and reverse its
meaning. (DLR)
- Add rcfile options "casesensitive" and "backwards", to do
case sensitive and backwards searches by default. Changes to
nanorc.sample and nanorc.5. (DLR)
- Since the DISABLE_CURPOS flag is only used in winio.c, reduce
it to a static bool there. Changes to statusbar() and
disable_cursorpos(). (DLR)
- Add -U/--quickblank option and a "quickblank" rcfile option to
blank the statusbar after 1 keystroke instead of 25. Note
that this obviously has no effect when constant cursor
position display is turned on, and that this is disabled when
NANO_SMALL is defined. Changes to usage(), main(),
statusbar(), nanorc.sample, nano.1, and nanorc.5. (DLR,
suggested by CHAO Wei-Lun)
- Add support for case insensitive expression matching when
using color syntax highlighting, via the "icolor" directive,
and add it to those regexes that can use it. Changes to
parse_colors(), parse_rcfile(), nanorc.sample, and nanorc.5.
(Brand Huntsman, minor tweaks by DLR)
- Add various type changes to avoid problems on systems where
int and ssize_t are different sizes. Make filestruct->lineno
a ssize_t (so that we can avoid negative line numbers at the
"Go To Line" prompt), current_y a ssize_t (in order to hold
the maximum difference between two filestruct->lineno's),
totlines a size_t, and change related variables to match.
(DLR, initial problem with parse_line_column() found by Mike
Frysinger)
- Rework the credits handling to display Florian König's name
properly whether we're in a UTF-8 locale or not, and without
requiring a massive function that we only use once. Changes
to do_credits(); removal of make_valid_mbstring(). (DLR)
- chars.c:
make_mbstring()
- Change erroneous ENABLE_EXTRA #ifdef to NANO_EXTRA to fix a
compilation problem when --enable-nanorc isn't used and
--enable-extra is. (DLR)
- color.c:
update_color()
- Use mbstrcasecmp() instead of strcasecmp(), so that UTF-8
color syntax names are properly detected. (DLR)
- cut.c:
cut_line()
- Set placewewant properly after cutting a line, to avoid a
problem where the screen won't be updated if (a) we're not on
the first page when we cut the line, and (b) immediately after
we cut the line, we hit End to move to the end of the line
after it. (DLR)
- files.c:
read_line()
- Rename variable prev to prevnode to avoid confusion. (DLR)
- Rename variable len to buf_len, for consistency. (DLR)
load_open_file()
- Remove an unneeded clearok(FALSE). (DLR)
get_next_filename()
- Use an unsigned long instead of an int for the number
prepended to the filename. (DLR)
do_insertfile()
- Set i to 0 when we get a filename via the file browser, so
that it's read in properly when we exit the file browser.
(DLR)
open_prevnext_file()
- Move up a misplaced assert. (DLR)
- Rename variable next to next_file, to avoid confusion. (DLR)
write_file()
- Since lineswritten is a size_t, print its value as an unsigned
long instead of an unsigned int. (DLR)
- Declare the size_t i only in the loop where it's used. (DLR)
diralphasort()
- Use mbstrcasecmp() instead of strcasecmp(), so that UTF-8
filenames are sorted properly. (DLR)
cwd_tab_completion(), browser_init()
- Rename variable next to nextdir to avoid confusion. (DLR)
input_tab()
- Since list is a bool, set it to FALSE instead of 0. (DLR)
- Add multibyte/wide character support, so that we don't end up
with a string that contains only part of a multibyte
character during tab completion. (DLR)
- Rename variable buflen to buf_len, for consistency. (DLR)
do_browser()
- Don't treat NANO_CANCEL_KEY as NANO_EXIT_KEY anymore, for
consistency. (DLR)
- When displaying "(dir)" in the available screen space, make
sure that the string it's stored in is always null-terminated.
(DLR)
- Rename variable selectedbackup to old_selected, for
consistency. (DLR)
- Make mouse clicks in the browser window work properly when the
MORE_SPACE flag is set. (DLR)
- Make foo_len a size_t instead of an int. (DLR)
save_history()
- Properly save history when we're in view mode. (DLR)
- global.c:
shortcut_init()
- Move the "Refresh" and "Exit" shortcuts to the beginning of
the help browser shortcut list, for consistency. (DLR)
- Remove unnecessary "Refresh" placeholder in the file browser
shortcut list. (DLR)
- Allow the mark to be used in view mode, as Pico does. (DLR)
- Clarify the description of ^X when --enable-multibuffer is
used. (DLR)
- Change the description of the Meta-B toggle at the search
prompt from "Direction" to "Backwards", for consistency. (DLR)
toggle_init()
- Clarify the descriptions of M-C and M-L. (DLR)
- Reorder the toggles to put more toggles with similar functions
together. (DLR)
thanks_for_all_the_fish()
- Remove free_toggles() and move its code here verbatim, as it's
only called here anyway. (David Benbennick)
- Fix the code to free all open file buffers to work properly
with the previous overhaul of the multibuffer code instead of
going into an infinite loop. (David Benbennick)
- Add additional checks for variables' not being NULL before we
try to free them, to avoid assertion failures. (DLR)
- nano.c:
die()
- Rename variable ret to retval for consistency. (DLR)
- Tweak the message displayed when a backup file can't be
written, so as to not duplicate a translated string. (DLR)
- If the current filestruct's been partitioned, unpartition it
before saving the associated file. (DLR)
resize_variables()
- Use charset() instead of memset() to initialize hblank. (DLR)
copy_filestruct()
- Rename variable prev to copy to avoid confusion. (DLR)
print1opt_full()
- If desc should be empty, allow it to be NULL instead of
"", since the latter is not necessarily translated as "".
(DLR, found by Jordi)
usage()
- Add missing N_() around one message, so that it isn't
erroneously translated twice. (DLR)
- Remove inaccurate default listed for -Q/--quotestr. (DLR)
version()
- Add --enable-utf8 to the displayed compilation options, put
the options in alphabetical order, and handle --enable-tiny
the same way as all the other options. (DLR)
do_tab()
- Remove unneeded variable kbinput. (DLR)
do_int_spell_fix()
- Display highlighted misspelled words using display_string(),
as do_replace_loop() does. (DLR)
do_alt_speller()
- Replace a set_modified() with SET(MODIFIED) to avoid an
unnecessary update, and remove an unneeded clearok(FALSE).
(DLR)
- Move the spell checking error handling block down and refactor
it so that we go back into curses mode, reinitialize the
terminal, turn the cursor back on, and turn the mark back on
if necessary before returning the error message. (DLR)
do_spell()
- If the spell-checker printed any error messages onscreen, call
total_refresh() to make sure they're cleared off. (DLR, found
by CHAO Wei-Lun)
find_paragraph()
- Reset placewewant as well as current_x to 0, in order to avoid
a potential screen update problem. (DLR)
do_justify()
- Save placewewant, and restore it if we unjustify, in order to
avoid a potential screen update problem. (DLR)
do_output()
- Properly allow wrapping when we insert a tab, for consistency.
(DLR)
- Don't set current_len until after it's been asserted that both
current and current->data aren't NULL. (DLR)
do_toggle()
- Properly treat color syntax highlighting as enabled by
default, and only treat wrapping as enabled by default when
DISABLE_WRAPPING isn't defined. (DLR)
disable_extended_input()
- Disable extended output processing as well as extended input
processing, and rename to disable_extended_io(). (DLR)
disable_flow_control(), enable_flow_control()
- Only turn off flow control on output, as it might be needed
for input on slow terminals. (DLR)
- nano.h:
- Add macro charset(), a wrapper that calls memset(). (DLR)
- Readd #defines for the isblank() and iswblank() equivalents.
(DLR)
- In the colortype struct, make bright a bool instead of an int,
for consistency. (DLR)
- proto.h:
- Add missing NANO_SMALL and HAVE_REGEX_H #ifdefs around the
do_find_bracket() prototype. (DLR)
- rcfile.c:
color_to_int()
- Since colorname's being NULL is handled elsewhere now, assert
that it isn't NULL at the beginning of the function. (DLR)
parse_colors()
- Properly parse a background color without a foreground color.
(DLR)
- Properly generate an error if we get a color directive without
a regex string. (DLR)
parse_rcfile()
- Properly generate an error if we get an invalid multibyte
string for an option, instead of working around it. (DLR)
- Use has_blank_mbchars() to check for blank characters in the
"punct" and "brackets" options, and clarify the error message
displayed when we find blank characters. (DLR)
- search.c:
do_gotoline()
- Properly show an error message if we try to go to line 0,
since the first line in the file is 1. (DLR)
- Start the search for a line from fileage instead of current
(again). (DLR)
replace_regexp()
- Rename variables create_flag and new_size to create and
new_line_size, for consistency. (DLR)
- Make new_line_size, search_match_count, and i size_t's, for
consistency. (DLR)
replace_line()
- Make new_line_size and search_match_count size_t's, for
consistency. (DLR)
do_replace_loop()
- When moving to the next match, update the screen using
edit_refresh() instead of edit_redraw(), as the latter won't
work properly when we've replaced one or more instances of a
string in copy and haven't yet updated current->data to match
copy. (DLR)
do_find_bracket()
- Miscellaneous cleanups: rename variables for consistency, and
save the search direction and regexp setting in two bools
instead of one flags variable. (DLR)
- utils.c:
num_of_digits()
- Use a size_t instead of an int, and rename to digits(). (DLR)
align()
- Rename variable strp to str for consistency. (DLR)
- winio.c:
do_statusbar_output()
- Don't set answer_len until after it's been asserted that
answer isn't NULL. (DLR)
display_string()
- Avoid a memory corruption problem by allocating enough space
for len plus a trailing multibyte character and/or tab. (DLR)
- Don't check for multicolumn characters if the NO_UTF8 flag
isn't set. (DLR)
- Free buf_mb when we're done using it. (DLR)
nanogetstr()
- Rename variable def to curranswer to avoid confusion. (DLR)
- Only declare and use the tabbed variable if DISABLE_TABCOMP
isn't defined. (DLR)
- Refactor to replace unnecessary variable answer_len with
curranswer_len, and hence avoid an assertion failure involving
the former. (DLR)
statusq()
- Rename variable which_history to history_list, for
consistency. (DLR)
- Rename variables def and ret to curranswer and retval to avoid
confusion. (DLR)
- Call wnoutrefresh(bottomwin) after getting an answer and
blanking out the statusbar, to make sure that the blanking is
done. This fixes a problem where the statusbar is not
properly blanked after using the "Go To Line" prompt with the
NO_HELP flag set. (DLR)
titlebar()
- Use actual_x() to calculate the number of characters VERMSG
takes up, in case it's UTF-8. (DLR)
do_cursorpos()
- Properly display the value of totsize as unsigned. (DLR)
- If constant is TRUE, only display the cursor position when
disable_cursorpos is FALSE. Don't refuse to display it when
the cursor position hasn't changed, as that doesn't always
keep it properly updated. (DLR, found by Mike Frysinger)
do_help()
- Don't treat NANO_CANCEL_KEY as NANO_EXIT_KEY anymore, for
consistency. (DLR)
statusbar()
- Set statusblank to 25 instead of 26, to match current Pico.
(DLR)
edit_redraw()
- Make do_refresh a bool instead of an int. (DLR)
do_yesno()
- Allow refreshing the screen via Ctrl-L, as Pico does. (DLR)
- Add a missing assert, and use actual_x() to calculate the
number of characters buf takes up, in case it's UTF-8. (DLR)
- Get input from bottomwin instead of edit, so that the cursor
isn't erroneously put in the edit window while we wait for an
answer. (DLR)
- Call wnoutrefresh(edit) to make sure that the edit window is
refreshed before we get input, as statusq() does. (DLR)
total_redraw()
- Simplify to just call wrefresh() on curscr, which updates the
entire screen in one function call without moving the cursor
from the window it's currently in. (DLR)
- When using slang, use SLsmg_touch_screen() and SLsmg_refresh()
to update the screen, as slang doesn't define curscr. (DLR)
do_replace_highlight()
- Use waddch() instead of waddstr() to display a space when we
have a zero-length regex. (DLR)
- Rename variable highlight_flag to highlight, for consistency.
(DLR)
do_credits()
- Save the keystroke that breaks us out of the credits (if any)
and put it back so that it isn't lost. This is especially
needed if the keystroke is part of a multibyte character.
(DLR)
- nano.1:
- Clarify and consolidate the descriptions of --fill and
--tabsize. (DLR)
- nanorc.5:
- Update the description of how the "color" regex works. (DLR)
- Clarify descriptions of the characters that aren't allowed
in the "punct" or "brackets" options. (DLR)
- Use .B instead of \fB ... \fP where possible, as nano.1 does.
(DLR)
- Clarify and consolidate the descriptions of "fill" and
"tabsize". (DLR)
- nano.texi:
- Update the "Feature Toggles" section to match current nano.
(DLR)
- Clarify and consolidate the descriptions of --fill and
--tabsize. (DLR)
- configure.ac:
- Minor tweaks to some of the test blocks to avoid XSI:isms.
(DLR, adapted from a Debian patch for GNU ed by David
Weinehall)
- Don't refer to the built-in file browser as crappy anymore.
(DLR)
- Check for iswpunct() and mbstowcs(). (DLR)
- Change the behavior of --enable-extra to only define
NANO_EXTRA, instead of defining both it and
ENABLE_MULTIBUFFER. (DLR)
- Check for get_wch() instead of wget_wch() to determine if
there's a wide curses library, as it's a more generic
function. (DLR)
- Check for possibly unavailable functions in alphabetical
order. (DLR)
- doc/faq.html:
- Update section 1.1 to mention the current maintainer. (DLR)
- Minor capitalization and wording fixes. (DLR)
- Update description of --enable-extra, and add missing line
breaks. (DLR)
- doc/nanorc.sample:
- In the "nanorc" regexes, tweak the "color" regex to properly
color a line that specifies a background color without a
foreground color, and update the associated comments. (DLR)
- Clarify descriptions of the characters that aren't allowed
in the "punct" or "brackets" options. (DLR)
- Update comment referring to --enable-extra. (DLR)
- Add "cxx" and "hxx" to the list of extensions that the
"c-file" regexes apply to, and add "warning" and "error" to
them as well. (Mike Frysinger)
- Add regexes for assembler files. (Mike Frysinger)
- In the preprocessor directives regex string in the "c-file"
regexes, cover more whitespace characters than just " " by
using "[[:space:]]" instead. (Mike Frysinger) DLR: Extend
this to other regex strings whenever possible.
- Move some overly long split-up regex strings that cover
similar areas onto the same line. (DLR)
- Add GCC builtins to the "c-file" regexes. (Mike Frysinger)
- Simplify the file extension regex for groff. (DLR)
- Clarify and consolidate the descriptions of "fill" and
"tabsize". (DLR)
- Makefile.am, m4/Makefile.am:
- Make sure that the files in EXTRA_DIST are in alphabetical
order, and that the lines are wrapped at 72 characters. (DLR)
- doc/man/fr/Makefile.am:
- Set mandir to @mandir@/fr, so French manpages get installed
where they belong (Jordi).
- THANKS:
- Add new translators to the credits.
GNU nano 1.3.7 - 2005.04.10
- General:
- Miscellaneous comment fixes. (DLR)
- After (re)initializing the terminal, make sure the cursor is
always turned on. Changes to do_alt_speller(),
handle_sigwinch(), and main(). (DLR)
- Make sure that all references to cut-to-end are left out when
NANO_SMALL is defined. Changes to cut_to_eol(),
do_cut_text(), and do_statusbar_cut_text(). (DLR)
- chars.c:
make_mbchar()
- Remove unneeded assert. (DLR)
move_mbleft()
- Fix assert to reference the proper variable, so that nano
builds with DEBUG defined again. (Mike Frysinger, found by
Dmitri Vassilenko)
- files.c:
do_insertfile()
- Fix problem where going into the help browser at the "Insert
File" prompt would always result in the current answer's being
used as the filename afterward. (DLR)
get_full_path()
- Rework handling of the results of getcwd() in order to avoid
segfaults if they fail, and to remove uses of the nonportable
GNU extension where passing a size of 0 will get a string as
long as we need. (DLR)
do_browser()
- Rename variable lineno to fileline to avoid confusion. (DLR)
do_browse_from()
- Rework handling of the results of getcwd() in order to avoid
segfaults if they fail, and to remove uses of the nonportable
GNU extension where passing a size of 0 will get a string as
long as we need. (DLR)
- nano.c:
help_init()
- When calculating allocsize, take multibyte characters into
account, and keep the column number limits consistent. (DLR)
- Break htx up into three chunks, in case the string is too long
for the compiler to handle (e.g. an ISO C89 compiler that can
only handle up to 509 characters). (DLR)
- Minor wording fixes. (DLR)
print1opt()
- Don't include longflag if HAVE_GETOPT_LONG isn't defined.
Rename this function to print1opt_full(), leave out the
longflag parameter if HAVE_GETOPT_LONG isn't defined, and make
print1opt() a macro for print1opt_full() that does that
without the need for a lot of extra #ifdefs. (David
Benbennick) DLR: Rename print1opt_f() to print1opt_full().
- Rework the special case of options that are ignored for Pico
compatibility so that they display more neatly when
HAVE_GETOPT_LONG isn't defined. (DLR)
usage()
- Fix erroneous #ifdef that resulted in the -d/--rebinddelete
option's not being printed when NANO_SMALL was defined. (DLR)
find_paragraph()
- Fix problem where a search for the next paragraph would skip
over certain cases of one-line paragraphs. (DLR)
do_justify()
- Instead of breaking a line at a space and readding the space
afterwards, just break the line after the space, as it's more
efficient. (DLR)
main()
- Change 0 to NULL in the option struct where needed. (David
Benbennick)
- nano.h:
- Define PATH_MAX as 4096 if it isn't defined, as passing a size
of 0 to get a string as long as we need is a nonportable GNU
extension, and hence it won't work on non-GNU systems that
don't define PATH_MAX. (DLR)
- rcfile.c:
parse_rcfile()
- Fix debugging message to display the long value of a flag
properly. (DLR)
- utils.c:
regexec_safe()
- Rename to safe_regexec() for consistency. (DLR)
- winio.c:
nanogetstr()
- Fix misplaced break. (DLR)
statusq()
- Make sure that the vsnprintf(foo) call and foo's subsequent
null termination both take the proper number of bytes when
using multibyte characters, so that multibyte prompt strings
aren't prematurely cut off. (DLR)
titlebar()
- Make sure that the (mv)?waddnstr() calls take the proper
number of bytes when using multibyte characters, so that
multibyte strings aren't prematurely cut off. (DLR, found by
Jordi)
- Allow the "View" state to be displayed when a filename is
passed in, in case we're in multibuffer mode and inside the
file browser. (DLR)
help_line_len()
- Make the text display more flexible, and closer to what nano
1.2.x does. (DLR)
- configure.ac:
- Allow more flexible handling of UTF-8 support by allowing
the --enable-utf8 and --disable-utf8 options. (Mike
Frysinger) DLR: Extend these options to work with slang as
well as curses, consolidate the warning and error messages
dealing with UTF-8 support as much as possible, and add a few
minor consistency fixes.
- Mention explicitly that the check for the broken regexec() is
needed for glibc 2.2.3. (DLR)
- nanorc.sample:
- Fix the description for the whitespace option to mention that
only single-column characters are allowed. (DLR)
- Add C++ regexes. (Neil Brown, merged into c-file regexes by
DLR)
- Break up overly long perl and nanorc regexes into separate
regexes of no more than 256 bytes, as POSIX-compliant regexp
implementations can reject regexes of over 256 bytes. (DLR)
- nano.1, nano.texi:
- Mention the -? alias for -h/--help, and add various
consistency fixes. (DLR)
- nanorc.5:
- Fix the description for the whitespace option to mention that
only single-column characters are allowed. (DLR)
GNU nano 1.3.6 - 2005.03.20
- General:
- More int -> bool conversions. (DLR and David Benbennick)
- Overhaul the cutting and uncutting routines to use the
partitioning code, as it greatly simplifies how they work.
New functions move_to_filestruct(), copy_from_filestruct(),
cut_line(), cut_marked(), and cut_to_eol(); changes to
add_to_cutbuffer(), do_cut_text(), do_uncut_text(), etc.;
removal of functions get_cutbottom(), add_to_cutbuffer(), and
cut_marked_segment(). (DLR)
- Overhaul the justify-related routines to back up and restore
unjustified text to use the partitioning code, as it greatly
simplifies how they work, and to store such text in its own
buffer rather than the cutbuffer. Changes to backup_lines(),
do_justify(), etc. (DLR)
- Overhaul the multibuffer routines to increase efficiency, most
importantly making them use a doubly linked list for the open
files so that switching between them is no longer O(N), and
only including free_openfilestruct() when --enable-debug is
used. Also use some of the same efficiency tweaks when
dealing with filestruct nodes. New function
open_prevnext_file(); changes to make_new_opennode(),
splice_opennode(), unlink_opennode(), delete_opennode(),
free_openfilestruct(), add_open_file(), load_open_file(),
close_open_file(), shortcut_init(), die(), make_new_node(),
copy_node(), splice_node(), delete_node(), and
free_filestruct(); removal of open_prevfile() and
open_nextfile(). (David Benbennick, minor tweaks and additions
by DLR)
- Change references to "open files" to "open file buffers", for
consistency. (DLR)
- Add flag to disable UTF-8 sequence interpretation, so that
people using single-byte encodings such as KOI8-R can type
properly again. (DLR, found by Arthur Ivanov)
- Massively overhaul the input and output routines to support
buffered input and output, the first steps toward
wide/multibyte character input and output, and verbatim input
of double-byte Unicode characters instead of single-byte ASCII
characters. New functions is_byte(), get_buffer(),
get_buffer_len(), buffer_to_keys(), unget_input(),
get_input(), parse_kbinput(), and parse_verbatim_kbinput();
new macro charcpy(); changes to do_char() (renamed to
do_output()), get_edit_input() (renamed to do_input() and
moved to nano.c), get_edit_mouse() (renamed do_mouse() and
moved to nano.c), do_verbatim_input(), do_tab(), main(), and
get_ascii_kbinput() (renamed to get_byte_kbinput()). The wide
version of ncurses is required in order for wide/multibyte
input and output to work properly. (DLR; buffered input/output
based on ideas from mutt 1.4.2.1; input of Unicode characters
in hexadecimal suggested by Michael Piefel)
- More steps toward wide character/multibyte character support.
New functions control_rep(), parse_char(), move_left(), and
move_right(); changes to do_left(), do_right(), do_delete(),
breakable(), break_line(), do_output(), get_buffer(),
unget_input(), actual_x(), strnlenpt(), display_string(),
titlebar(), statusbar(), onekey(), edit_add(),
do_replace_highlight(), and do_credits(). (David Benbennick
and DLR)
- Overhaul the high-level input routines for the statusbar to
make them read the shortcut lists for functions instead of
manually running them, to make nanogetstr() less complex, and
to increase flexibility. Note that currshortcut is now used
regardless of #ifdefs, and that cutting text at the statusbar
now respects the CUT_TO_END flag. Changes to shortcut_init()
and nanogetstr(); new functions do_statusbar_input(),
do_statusbar_mouse(), do_statusbar_home(), do_statusbar_end(),
do_statusbar_right(), do_statusbar_left(),
do_statusbar_backspace(), do_statusbar_delete(),
do_statusbar_cut_text(), and do_statusbar_output(). (DLR)
- Even more steps toward wide character/multibyte character
support. Movement and cursor display at the statusbar prompt
should now (mostly) work properly with a string containing
multibyte characters, and text display of such strings should
now (mostly) work properly as well. Changes to search_init(),
nanoget_repaint(), do_statusbar_right(), do_statusbar_left(),
do_statusbar_backspace(), and do_statusbar_delete(). (David
Benbennick and DLR)
- Implement cutting from the current position to the end of the
file, using Ctrl-X from the search prompt and Meta-T from the
edit window. New function do_cut_till_end(). Note that this
is disabled when NANO_SMALL is defined. (DLR, based on ideas
from a patch for Pico by Eduardo Chappa, suggested by Ryan
Dlugosz and Paul Adams)
- Implement verbatim input for the statusbar prompt. Changes to
do_statusbar_input() and do_statusbar_output(); new functions
keys_to_buffer(), unparse_kbinput(), and
do_statusbar_verbatim_input(). (DLR)
- Yet more steps toward full wide character/multibyte character
support. Overhaul the functions that already have support for
them to work with multibyte strings as much as possible, add
support to a few more functions as well, and move multibyte
character-specific functions to their own source file. New
file chars.c; new functions is_alnum_char(),
is_alnum_mbchar(), is_alnum_wchar(), is_blank_mbchar(),
is_blank_wchar(), is_cntrl_mbchar(), is_cntrl_wchar(),
control_mbrep(), control_wrep(), mbwidth(), mb_cur_max(),
make_mbchar(), mbstrlen(), mbstrnlen(), mbstrcasecmp(),
mbstrncasecmp(), mbstrcasestr(), and mbrevstrcasestr();
changes to help_init(), do_wrap(), break_line(), is_byte()
(moved to chars.c), is_blank_char() (moved to chars.c),
is_cntrl_char() (moved to chars.c), nstricmp() (renamed
nstrcasecmp() and moved to chars.c), nstrnicmp() (renamed
nstrncasecmp() and moved to chars.c), nstristr() (renamed
nstrcasestr() and moved to chars.c), revstrstr() (moved to
chars.c), revstristr() (renamed revstrcasestr() and moved to
chars.c), nstrnlen() (moved to chars.c), parse_char() (renamed
parse_mbchar() and moved to chars.c), move_left() (renamed
move_mbleft() and moved to chars.c), move_right() (renamed
move_mbright() and moved to chars.c), do_home(),
do_verbatim_input(), do_delete(), do_tab(), do_enter(),
indent_length(), do_next_word(), do_prev_word(), do_wrap(),
do_input(), do_output(), is_whole_word(), strstrwrapper(),
get_buffer(), unget_input(), unget_kbinput(), get_input(),
parse_kbinput(), unparse_kbinput(), parse_verbatim_kbinput(),
do_statusbar_input(), do_statusbar_home(),
do_statusbar_verbatim_kbinput(), do_statusbar_output(),
do_help(), help_line_len(), and display_string(); removal of
buffer_to_keys() and keys_to_buffer(). (DLR)
- Add -O/--morespace command line option, plus a corresponding
Meta-O toggle and a "morespace" rcfile option. When these are
used, the normally-unused blank line below the titlebar will
be treated as part of the edit window. New functions
no_more_space() and blank_topbar(); changes to global_init(),
window_init(), handle_sigwinch(), do_toggle(), do_mouse(),
get_mouseinput(), etc. (DLR; suggested by Mike Frysinger,
Rocco, and Robert Schultz)
- Add support for moving to the next or previous word at the
statusbar prompt. New functions do_statusbar_next_word() and
do_statusbar_prev_word(); changes to do_statusbar_input().
(DLR)
- Make resizing more flexible. We now can work with as few as
one row, and with no limit on the number of columns (except of
course the curses-imposed limit that it be greater than zero).
New function resize_variables(); changes to die_too_small()
(renamed check_die_too_small()), global_init(), window_init(),
and handle_sigwinch(). (David Benbennick)
- Use void instead of RETSIGTYPE, as signal handlers are
supposed to return void anyway. Also, the value of RETSIGTYPE
is sometimes misdetected as int, leading to compilation
warnings or errors. Changes to cancel_fork(),
handle_hupterm(), do_suspend(), and do_cont(). (David
Benbennick)
- Change flags to an unsigned long, and totsize to a size_t.
(DLR)
- Store the number of multibyte characters instead of the number
of single-byte characters in totsize, and use get_totals() to
get the value of totsize in a few more places. Changes to
read_line(), read_file(), do_delete(), do_input(),
get_totals(), and do_cursorpos(). (DLR)
- Overhaul the tab completion code, the file browser code, and
related functions to increase efficiency and support multibyte
characters. New function is_dir(); changes to
get_full_path(), check_writable_directory(), safe_tempnam(),
diralphasort(), username_tab_completion(),
cwd_tab_completion(), input_tab(), tail(), striponedir(),
browser_init(), do_browser(), and do_browse_from(); removal of
append_slash_if_dir(), readable_dir(), and
check_wildcard_match(). (David Benbennick) DLR: Move the
routine to get the current user's home directory into the new
function get_homedir(), and use it where necessary. Also add
a few miscellaneous tweaks.
- Overhaul the rcfile parsing code to make it simpler and more
accurate, remove now-redundant checks from the color code,
change the COLOR_SYNTAX toggle to the NO_COLOR_SYMTAX toggle,
and improve various debugging messsages. Changes to
set_colorpairs(), do_colorinit(), parse_next_word(),
parse_argument(), colortoint(), parse_next_regex(),
parse_syntax(), parse_colors(), parse_rcfile(), do_rcfile(),
etc. (David Benbennick) DLR: Rename colortoint() to
color_to_int(), and add a few miscellaneous tweaks.
- Overhaul the paragraph-searching code to make it use the
paragraph-searching utility functions when possible instead of
duplicating code. Also overhaul the justify code to make it
leave the right number of spaces at the ends of the lines of a
paragraph, to make it support multibyte characters, and to
make it simpler. Also, don't remove a space after a duplicate
character in punct anymore, as it doesn't really make us more
compatible with Pico. New functions mbstrchr(),
do_para_begin_void(), and do_para_end_void(); changes to
justify_format(), do_para_begin(), inpar(), do_para_end(),
break_line(), do_para_search() (renamed find_paragraph()), and
do_justify(); removal of breakable(). (DLR)
- Still more steps toward full wide/multibyte character support.
Make sure all rcfile arguments are valid multibyte strings,
make whitespace display mode work with multibyte characters,
and add a few related documentation updates. New function
make_mbstring(); changes to make_mbchar(), make_mbstring(),
main(), parse_rcfile(), display_string(), and do_help(). (DLR)
- cut.c:
do_cut_text()
- If keep_cutbuffer is FALSE, only blow away the text in the
cutbuffer if the cutbuffer isn't empty. (DLR)
do_uncut_text()
- No longer duplicate Pico's adding an extra magicline to the
file if uncutting leaves the cursor on the current one. This
behavior appears to be a bug, as inserting a file in the same
manner doesn't add an extra magicline. (DLR)
- files.c:
get_full_path()
- Remove unneeded NANO_SMALL #ifdef, so that it's included
whenever its prototype is, and so it can compile when
DISABLE_OPERATINGDIR isn't defined and NANO_SMALL is. (DLR)
do_browser()
- Refresh the screen when Ctrl-L is pressed in the file browser,
as Pico does. (DLR)
- global.c:
shortcut_init()
- Fix misplaced #endif keeping the "Full Justify" shortcut in
the search shortcut list from being included when NANO_SMALL
is defined but DISABLE_JUSTIFY isn't. (DLR)
- Use NULL instead of 0 when a shortcut has no associated
function. (DLR)
thanks_for_all_the_fish()
- Free the justify buffer if it isn't empty. (DLR)
- nano.c:
help_init()
- Clarify the text describing double-escape character input.
Since ASCII is technically only seven bits wide, characters
128-255 aren't ASCII. (DLR, suggested by Michael Piefel)
do_toggle()
- When we get the whitespace display toggle, update the titlebar
as well as the edit window, in case the filename displayed on
the titlebar contains spaces or tabs. (DLR)
handle_sigwinch()
- If the justify buffer isn't empty, blow it away and don't
display "UnJustify" in the shortcut list anymore. (DLR)
usage()
- Typo fix. (DLR)
do_wrap()
- Make wrap_loc and word_back ssize_t's, to match fill. (DLR)
break_line()
- Fix compilation problem caused by its returning int when it
should return ssize_t according to its prototype. (Jeremy
Huddleston)
indent_length()
- Make the #ifdef around it match that of its prototype to avoid
compilation problems when compiling with --enable-tiny and
without DISABLE_JUSTIFY's being defined. (DLR)
do_justify()
- For consistency, preserve placewewant if we didn't unjustify
instead of setting it to 0. (DLR)
- When justifying the entire file, properly break out of the
loop if we've found at least one paragraph, there are no more
paragraphs after the current one, and the paragraph search
left us on the magicline. This avoids a segfault. (DLR)
do_input()
- Add finished parameter, used to indicate when we run or try to
run a function associated with a shortcut. (DLR)
main()
- Try to automatically detect whether UTF-8 support is needed by
setting the NO_UTF8 flag if setlocale() returns a string that
doesn't contain "UTF8" or "UTF-8", case insensitively. When
using slang 2.x, enable UTF-8 support with SLutf8_enable().
(DLR, string checks beyond case-sensitive "UTF-8" adapted from
Debian's UTF-8 patch for slang)
- nano.h:
- Remove now-unneeded #defines for functions that now have
multibyte equivalents. (DLR)
- Remove now-unneeded MIN_EDITOR_COLS. (David Benbennick)
- utils.c:
regexec_safe()
- Remove redundant regexec #define, and move the regexec #undef
to nano.h. (DLR)
is_blank_char()
- Rewrite to use ctype functions instead of checking directly
for spaces and tabs. (DLR)
revstrstr(), revstristr()
- Add asserts. (DLR)
- winio.c:
get_buffer()
- If we get ERR when using blocking input, it means that the
input source that we were using is gone. In this case, call
handle_hupterm(), so that nano dies gracefully instead of
going into an infinite loop. (DLR, found by Jim Uhl)
titlebar()
- Rename some variables for consistency, make space an int
instead of a size_t, properly handle the case where the prefix
length plus the path length is greater than the amount of
space available, and fix a typo in an assert. (DLR)
unget_kbinput()
- Remove the wide character handling, as it didn't work properly
with respect to function keys. (DLR)
get_kbinput(), get_translated_kbinput(), get_ascii_kbinput(),
get_untranslated_kbinput()
- Make the ascii_digits variables ints instead of size_t's,
since they will only hold very small values. (DLR)
get_kbinput()
- Remove the wide character handling, as it didn't work properly
with respect to adding multiple wide characters at once, and
ungetting them just caused other problems elsewhere. (DLR)
get_translated_kbinput()
- Remove the wide character handling, as it didn't work properly
with respect to adding multiple wide characters at once, and
ungetting them just caused other problems elsewhere. (DLR)
- Use if statements instead of switch/case statements to handle
ASCII character sequence mode, as they take up less room.
get_ascii_kbinput()
- Use if statements instead of switch/case statements to handle
ASCII character sequence mode, as they take up less room.
get_verbatim_kbinput()
- Don't pass v_kbinput in as a parameter, since we're
dynamically allocating it and then returning it. (DLR)
- Remove v_first parameter, and go back to the old behavior of
putting back the first character of the escape sequence, as it
worked just as well and was less complicated. (DLR)
get_mouseinput()
- Return TRUE instead of FALSE only when we have a control key,
a prinary meta key sequence, or both. (DLR)
get_shortcut()
- Add a debug message. (DLR)
- Take kbinput as a reference instead of a value, so that it's
translated when the key is translated to its equivalent
control key or meta key shortcut. (DLR)
- Return s instead of NULL only when we have a control key, a
prinary meta key sequence, or both. (DLR)
get_toggle()
- Add a debug message. (DLR)
bottombars()
- Initialize foo, in case a keystroke meets none of the handled
cases. (DLR)
total_refresh()
- Refresh bottomwin using the value of currshortcut, and change
the code around do_refresh() calls to accommodate this. (DLR)
- Split out the code that updates the screen before refreshing
it into the new function total_redraw().
do_help()
- Refresh the screen when Ctrl-L is pressed in the help browser,
as Pico does. (DLR)
- configure.ac:
- Remove specific references to control key shortcuts. (DLR)
- Check for the wide versions of ncurses or slang, without which
multibyte strings don't seem to be displayed properly, and
associated multibyte/wide character functions. (DLR)
- Check for wchar.h, for those systems that need it for the
wcwidth() prototype. (DLR)
- Remove checks for all include files that we include
unconditionally. (DLR)
- Remove references to termio.h here and elsewhere, since it's
obsolete and it defines a struct termio that we don't use
anywhere. (DLR)
- Typo fixes. (DLR)
- Add checks for isascii(), iswalnum(), iswblank() or
iswspace(), mblen(), and wctype.h. (DLR)
- README:
- Updated for the 1.3 branch. (DLR)
- README.CVS:
- Updated to mention the need for a wide character-supporting
version of curses or slang if UTF-8 support is desired. (DLR)
- doc/faq.html:
- Remove now-inaccurate note about verbatim input's not working
at prompts, and update its description to mention that it
handles hexadecimal values now. (DLR)
- Add question about opening files with names beginning with
'+'s, and add a few more miscellaneous cosmetic fixes.
- nanorc.sample:
- Add return to the "c-file" regexes. (DLR)
- Clarify the text describing good values for whitespace
display. Since ASCII is technically only seven bits wide,
characters 128-255 aren't ASCII. (DLR, suggested by Michael
Piefel)
- Add the "morespace" option. (DLR)
- Add support for characters to the "c-file" regexes. (DLR)
- Add the hexadecimal equivalents of the decimal values
suggested for whitespace display, now that it can handle
multibyte characters. (DLR)
- Add "manpage" regex. (Mike Frysinger, minor tweaks by DLR)
- nano.1. nanorc.5, nano.texi:
- Add the "morespace" option, and sync with the descriptions in
nanorc.sample in a few places. (DLR)
- Miscellaneous wording tweaks. (DLR)
- src/Makefile.am:
- Add chars.c to nano_SOURCES. (DLR)
- If we're installing and the "rnano" symlink already exists,
remove it so that we can create it again without an error.
(DLR)
- AUTHORS:
- Updated to mention UTF-8 support.
GNU nano 1.3.5 - 2004.11.22
- General:
- Convert more ints that hold only TRUE and FALSE values to
bools. (DLR)
- Consolidate the code for finding and running a shortcut in a
shortcut list, the code for finding and toggling a toggle in a
toggle list, and the code for doing both of those and
interpreting mouse clicks in the edit window. Also move the
code for do_mouse() to get_edit_mouse() and tweak it to
properly handle cases where a shortcut isn't clicked. New
functions get_shortcut(), get_toggle(), get_edit_input(), and
get_edit_mouse(); changes to do_browser(), do_justify(),
do_help(), and main(). (DLR)
- Simplify a few more translated messages. (DLR)
- Translation updates (see po/ChangeLog for details).
- Remove reference to @includedir@ in src/Makefile.am, as it's
unneeded and can break cross-compilation. (DLR, found by Mike
Frysinger)
- Overhaul the file opening, reading, and loading operations to
increase efficiency, avoid problems on invalid filenames
specified on the command line, and eliminate corner cases that
erroneously leave edittop or current NULL when they shouldn't
be. Also split out the code to execute a command into a
separate function, eliminate a workaround for one of the
aforementioned corner cases, handle files with a mix of DOS
and Mac format lines, and remove the code to turn on the
NO_CONVERT flag when opening a binary file, as it's not always
reliable and will cause problems with UTF-8 text files. New
functions open_file(), execute_command(), and mallocstrassn();
changes to read_line(), load_file(), read_file(), open_file(),
get_next_filename(), do_insertfile(), do_insertfile_void(),
do_alt_speller(), and edit_refresh(). (David Benbennick) DLR:
Add a few minor fixes to make sure that current is set
properly in all cases, indicate on the statusbar when the file
has a mix of DOS and Mac format lines, move the test for DOS
line endings from read_line() to read_file() to avoid
inaccurate statusbar messages and to reduce fileformat to a
local variable in read_file(), eliminate another workaround in
edit_update(), rename open_the_file() to open_file() since the
latter has been removed, and rename load_a_file() to
load_buffer().
- Add alternative shortcuts to the main and search shortcut
lists for moving to the beginning and end of a paragraph and
justifying the entire file: Meta-( (Meta-9), Meta-) (Meta-0),
and Meta-J, respectively. Do this because Pico's practice of
putting these shortcuts only in the search shortcut list is
rather odd. (DLR)
- Turn off extended input processing (the IEXTEN termios flag)
as nano 1.2.x does. New function disable_extended_input();
changes to terminal_init(). (DLR)
- Remove redundant include of limits.h from nano.c. nano.c
includes nano.h and nano.h includes limits.h. (DLR)
- Add a func_key flag to the low-level input functions and the
currently existing high-level input functions, to indicate
extended keypad values. This is needed for UTF-8 support.
Changes to unget_kbinput(), get_kbinput(),
get_translated_kbinput(), get_shortcut(), get_edit_input(),
etc. (DLR)
- Add a multibuffer mode toggle to the "Execute Command" prompt,
for consistency with the "Read File" prompt. Changes to
do_insertfile() and shortcut_init(). (DLR)
- Add an ^X toggle to the "Execute Command" prompt to go back to
the "Insert File" prompt, and add a ^T toggle to the "Go To
Line" prompt to go back to the "Where Is" prompt. Changes to
do_insertfile(), shortcut_init(), do_gotoline(), etc.
- Make sure a few uninitialized static variables are initialized
to sane values. (DLR)
- After reading in a file and detecting the format it's in, set
the file format flags (DOS_FILE and MAC_FILE) to match, and
preserve them across multiple file buffers. Changes to
read_file(), add_open_file(), and load_open_file(). (DLR,
suggested by Bill Soudan)
- Remove the -D/--dos and -M/--mac command line options, as they
aren't much use with the new file format autodetection. Also
remove the global versions of the toggles, so that they can
only be used at the "Write File" prompt as similar options
can. Finally, change the Mac format toggle to Meta-M, since
that no longer conflicts with the global -m/--mouse toggle.
(DLR)
- Add support for reading in UTF-8 sequences to the low-level
input routines. Changes to get_kbinput() and
get_translated_kbinput(). (DLR)
- Reduce search_last_line to a static variable in search.c, and
allow it to be set to FALSE via a function. New function
findnextstr_wrap_reset(); changes to do_int_spell_fix(),
findnextstr(), do_search(), do_research(), do_replace_loop(),
do_replace(), and do_find_bracket(). (DLR, problem with making
search_last_line local to findnextstr() found by Rocco)
- When saving or changing file positions, be sure not to ignore
placewewant. Changes to do_int_spell_fix(), findnextstr(),
do_replace_loop(), and do_replace(). (DLR)
- Convert current_x and mark_beginx to size_t's, and convert
some functions that use them as a parameter to use size_t as
well. Also change some related assertions to handle them.
(David Benbennick and DLR)
- Add code to partition a filestruct between a set of arbitrary
coordinates. Given the coordinates of the beginning and end
of the mark, this allows proper and easier handling of saving
marked selections, replacing text only in marked selections
(suggested by Joseph Birthisel), and spell-checking marked
selections using either the internal or alternate spell
checker. Do all these using a global partition structure.
New functions partition_filestruct(),
unpartition_filestruct(), remove_magicline(), and
get_totals(); changes to write_marked(), do_int_spell_fix(),
do_alt_speller(), handle_sigwinch(), and do_replace_loop().
(DLR)
- Remove most redundant includes of sys/stat.h. It's included
in nano.h, so it doesn't need to be included in files that
include nano.h. (DLR)
- Remove the DOS_FILE and MAC_FILE flags, as they're only used
in files.c, and replace them with a static file_format enum.
Change the openfilestruct structure accordingly in order to
handle this. (DLR)
- Convert some ints with predefined boundaries to enums. (DLR)
- Include config.h only if HAVE_CONFIG_H. (Jordi)
- cut.c:
cut_marked_segment()
- Respect concatenate_cut, as we need to use it if we do a
marked cut and immediately follow it with a cut-to-end (which
uses this function). (DLR)
do_cut_text()
- Set concatenate_cut to TRUE unconditionally when doing a
marked cut. This fixes an incompatibility with Pico where an
extra line is uncut if we do a marked cut that includes the
magicline and immediately follow it with an unmarked cut.
(DLR)
do_uncut_text()
- Maintain current_y's value when uncutting blocks so that
smooth scrolling works correctly. (DLR)
- files.c:
read_file()
- Rename variable fileformat to format, to avoid confusion with
the file_format enum type. (DLR)
load_buffer()
- Don't change the file format when we insert another file into
the current one. (DLR)
do_insertfile()
- Simplify by reusing variables whereever possible, and add a
parameter execute to indicate whether or not to be in "Execute
Command" mode. (DLR)
- Rework so that goto is no longer needed, using do_writeout()
as a model. (DLR)
- If file browsing succeeds, call statusq_abort() so that the
cursor position at the statusbar is reset. (DLR)
- Add missing #ifdefs around the wrap_reset() call so that nano
compiles with wrapping disabled again. (DLR)
- If we're not inserting a file into a new buffer, partition the
current buffer so that it's effectively a new buffer just
before inserting the file, and only restore placewewant
afterwards. This is the same behavior we would get if we
opened the file, added all of it to the cutbuffer, closed the
file, and uncut at the current cursor position. (DLR)
- Maintain current_y's value when inserting so that smooth
scrolling works correctly. (DLR)
do_writeout()
- Restructure if blocks for greater efficiency, using
do_insertfile() as a model. (DLR)
- Simplify where possible, and use an int retval to hold the
return value instead of i. (DLR)
- If file browsing succeeds, call statusq_abort() so that the
cursor position at the statusbar is reset. (DLR)
- Remove unneeded calls to display_main_list(). (DLR)
do_writeout_void()
- Call display_main_list(), for consistency with
do_insertfile_void(). (DLR)
write_file()
- If we've tried to write to an unwritable file and we're not
prepending, tempname is NULL when it's passed to unlink().
This can cause problems if unlink() can't handle NULL, so
don't call it in that case. (David Benbennick)
write_marked()
- Remove check for MARK_ISSET's not being set. (DLR)
open_prevfile(), open_nextfile()
- Translate the "New Buffer" string when displaying "Switched
to" messages on the statusbar. (DLR)
input_tab()
- Fix snprintf() call so that we don't segfault when trying to
complete a filename containing %'s. (Ulf Härnhammar)
- global.c:
shortcut_init()
- Remove redundant NANO_SMALL #ifdef. (DLR)
- Change an erroneous _() around the "New Buffer" string to
N_(). (DLR)
- Add new key aliases: F15 for "Mark Text" (DLR) and F16 for
"Where Is Next" (Chris).
- Leave "Mark Text" and "Where Is Next" out entirely when
NANO_SMALL is defined. Since they aren't in the visible main
list, there's no point in having them in but disabled. (DLR)
- In the search prompt shortcut list, move "Full Justify" to
after "History", so that the latter is visible onscreen
again. (DLR)
- nano.c:
die_save_file()
- Clarify the error message when there are too many backup files
and the current one can't be written. (DLR)
help_init()
- Rework to be a bit more flexible. Only add tabs for shortcut
key entries if those entries exist, and if there's only one
entry left but there's room for more than one, add enough tabs
to put that entry at the end. Also, make sure a function key
is displayed in the middle if it's the first entry. These
changes allow e.g. the miscellaneous meta key sequence to be
displayed in a shortcut that has a control key, a primary meta
key sequence, and a miscellaneous meta key sequence, but no
function key. (DLR)
- Update the help text to mention replacing and spell checking
only selected text, and also add a few cosmetic fixes to it.
(DLR)
- Update the help text to mention how to get a blank buffer at
the "Execute Command" prompt. (DLR)
do_prev_word()
- Tweak to avoid an infinite loop, since current_x is now a
size_t and hence is unsigned. (DLR)
do_int_spell_fix()
- Move the REVERSE_SEARCH flag toggling into the NANO_SMALL
#ifdef, since the tiny version of nano doesn't support reverse
searching. Move the CASE_SENSITIVE flag toggling out in order
to allow the internal spell checker to work properly when
NANO_SMALL is defined and DISABLE_SPELLER isn't. Also, turn
the USE_REGEXP flag off during spell checking in order to
avoid a potential segfault. (DLR)
- Fix a problem where if the cursor is in the middle of a file,
the spell checker will sometimes only correct the misspelled
word instances that appear before the cursor position and then
stop. (Rocco)
- Use do_replace_loop()'s canceled parameter in order to ensure
that the spell checking stops if we canceled at the replace
prompt. (DLR)
do_alt_speller()
- Call terminal_init() unconditionally after running the
alternate spell checker, so that the terminal state is
properly restored in all cases. (DLR)
justify_format()
- For more compatibility with Pico, remove extra space after a
character in punct if that character is the same as the one
before it. For example, with the default values of punct and
brackets, only one space will be left after "...". (DLR)
do_para_begin(), do_para_end()
- Maintain current_y's value when moving up or down lines so
that smooth scrolling works correctly. (DLR)
breakable(), break_line()
- Make goal a ssize_t instead of an int, since fill is now a
ssize_t, and the position at which a line is broken can be
greater than COLS. (DLR)
main()
- Tweak the command line parsing routine so that multiple +LINE
flags are properly interpreted in multibuffer mode. (DLR)
- nano.h:
- Add WIDTH_OF_TAB #define, containing the default width of a
tab. (DLR)
- Move the PATH_MAX #define here from files.c.
- Remove unused COPYFILEBLOCKSIZE #define. (DLR)
- proto.h:
- Add missing NANO_SMALL #ifdef around the cut_marked_segment()
prototype. (DLR)
- rcfile.c:
parse_rcfile()
- Add missing brackets around an if statement block so that
parsing the numeric argument after "tabsize" works properly
again. (DLR, found by Mike Frysinger)
- Since flag values are longs, use "%ld" instead of "%d" in the
debugging messages indicating when a flag is set or unset.
(DLR)
- search.c:
regexp_init()
- If NANO_SMALL is defined, don't bother checking the
CASE_SENSITIVE flag or using its value when compiling a list
of matching regular expressions. (DLR)
search_init()
- Add parameter use_answer. When it's TRUE, only set
backupstring to answer. This is needed to preserve the text
of the statusbar when switching to the search prompt from
the "Go To Line" prompt. Also, set backupstring before doing
anything else, add one minor efficiency tweak, and preserve
the text of the statusbar no matter what when switching from
the search prompt to the "Go To Line" prompt, since the
toggling works both ways now and non-numeric text shouldn't be
lost when going only one of those ways. (DLR)
- When we're replacing and the mark is on, display a prompt
indicating that we're replacing text only in the selection
instead of the usual prompt. (DLR)
findnextstr()
- Take the no_sameline parameter after can_display_wrap and
wholewords, not after all other parameters. (DLR)
- Maintain current_y's value when moving up or down lines so
that smooth scrolling works correctly. (DLR)
- Fix handling of the wholewords flag so that it works with
regular expressions and in conjunction with the no_sameline
flag, and add new parameter needle_len (used to return the
length of the match). (DLR)
do_replace_loop()
- Miscellaneous cleanups: treat real_current as current and
real_current_x as current_x, only turn the mark off and call
edit_refresh() if the mark was originally on, and make
length_change a ssize_t. (DLR)
- Return ssize_t instead of int. (DLR)
- Add new parameter canceled, set to TRUE if we canceled at the
prompt and FALSE otherwise. (DLR)
- utils.c:
regexp_bol_or_eol()
- Don't assume any longer that string will be found if
REG_NOTBOL and REG_NOTEOL are not set. (DLR)
mallocstrncpy()
- New function, used as a malloc()ing equivalent of strncpy().
(DLR)
mallocstrcpy()
- Refactor to be a wrapper for mallocstrncpy(). (DLR)
mark_order()
- Add new parameter right_side_up. Set it to TRUE If the mark
begins with (mark_beginbuf, mark_beginx) and ends with
(current, current_x), or FALSE otherwise. (DLR)
- winio.c:
unget_kbinput()
- New function used as a wrapper for ungetch(). (DLR)
get_kbinput()
- When reading an escape sequence, set get_verbatim_kbinput()'s
new first parameter to the first character of the sequence
instead of putting that character back and reading the entire
sequence afterwards. (DLR)
get_escape_seq_kbinput()
- Make the escape_seq parameter a const int*, since it's never
modified. (DLR)
- Support the escape sequences for F15 and F16. (DLR)
get_verbatim_kbinput()
- Add new parameter first. If first isn't ERR, make it the
first character in the returned sequence instead of reading
the first character in via blocking input. (DLR)
get_mouseinput()
- Consolidate two if statements to increase efficiency. (DLR)
- Check kbinput against metaval instead of (erroneously) ctrlval
when putting back a meta sequence. (DLR)
- If there are more than MAIN_VISIBLE shortcuts available, only
register clicks on the first MAIN_VISIBLE shortcuts, since
bottombars() only shows that many shortcuts. (DLR)
check_statblank()
- Rename to check_statusblank(), and rename its associated
global int statusblank too. (DLR)
nanogetstr()
- Refresh the screen when Ctrl-L is pressed at the statusbar
prompt, as Pico does. (DLR)
- Always return the key pressed by the user. (DLR)
statusq()
- Rework slightly to reset the cursor position when the user
hits Enter as well as Cancel. This means that resetstatuspos
no longer needs to be global. (DLR)
statusq_abort()
- New function to set resetstatuspos to FALSE when we don't
properly exit the statusbar prompt, e.g. when we get a file
from the file browser). (DLR)
bottombars()
- For efficiency, no longer dynamically allocate space for each
visible shortcut, as they're all of a constant short length.
(David Benbennick)
reset_cursor()
- If this is called before any files have been opened, as it can
be by statusbar(), put the cursor at the top left corner of
the edit window before getting out. (DLR)
edit_refresh()
- Call edit_update() with NONE instead of CENTER when smooth
scrolling is on, for consistency with the movement routines.
(DLR)
edit_update()
- Simplify so as not to require the fileptr parameter anymore,
since it's set to current in all calls. (DLR)
- Add comments better explaining what the update actually does,
and avoid an infinite loop when location is NONE and current_y
is greater than (editwinrows - 1). (DLR)
do_yesno()
- Don't bother assigning the value of get_mouseinput() to
anything. Since allow_shortcuts is FALSE, its return value
will always be FALSE. (DLR)
- configure.ac:
- When calling AC_TRY_RUN() to test for a broken regexec()
function, set the fourth parameter to default to "no" (since
it apparently only occurs on glibc 2.2.3-based systems) so
that cross-compiling will work. (DLR, found by Mike Frysinger)
- Simplify the curses library tests by only checking for
initscr(), which ncurses, curses, and pdcurses should all
have, and not tgetent(), which is a termcap-specific function.
(DLR)
- Check only for glib 2.x, as it's much more common than
glib 1.2.x now, and it has a better v?snprintf()
implementation. (DLR, suggested by Jordi)
- nanorc.sample:
- Remove specific references to control key shortcuts other than
XON and XOFF. (DLR)
- Add continue and goto to the "c-file" regexes. (DLR)
- Change the included speller value to "aspell -x -c". The -x
option makes aspell not create backup files, and this is
consistent with the internal spell checker's behavior. (DLR)
- doc/man/fr/nano.1, doc/man/fr/nanorc.1:
- Updated manpage translations by Jean-Philippe Guérard.
- README.CVS:
- Mention the requirement for glib 2.x on systems lacking
v?snprintf(), and add minor formatting changes.
- Mention the requirement for groff in order to create html
versions of the manpages. (DLR)
- Update the given cvs commands so that they work again, and
mention the need for ssh to do cvs checkouts. (DLR)
- List sh as an example of a Bourne shell. (DLR)
- faq.html:
- Fixed inaccuracy: Pico compatibility mode was made the default
in nano 1.1.99pre1, not 1.2.2. (DLR)
- Added question about how to type F13-F16 on terminals lacking
keys past F12 (suggested by Chris), question about how to
select text for the clipboard in X terminals with nano's mouse
support turned on (answer found by Joseph Birthisel), and
miscellaneous fixes and link updates. (DLR)
- nano.1:
- Eliminate references to the now removed -D/--dos and -M/--mac
command line options. (DLR)
- nano.texi:
- Eliminate references to the now removed -D/--dos and -M/--mac
command line options, and their corresponding toggles. (DLR)
- m4/Makefile.am:
- Add glib-2.0.m4 to EXTRA_DIST, so that nano builds from CVS
with automake 1.7.x again. For some reason, automake 1.9.x
didn't have a problem with its (erroneously) being left out.
(DLR, problem found by Chris)
- m4/glib-2.0.m4:
- New file imported from glib 2.4.7. This is needed to detect
glib 2.x on systems that may not have it installed. (DLR,
suggested by Jordi)
- src/Makefile.am:
- Don't use DEFS to define things. Use INCLUDES instead.
(Jordi)
GNU nano 1.3.4 - 2004.08.17
- General:
- More minor comment cleanups. (DLR)
- Convert more ints and functions using 0 and 1 to bools using
TRUE and FALSE. (David Benbennick and DLR)
- Change more instances of ints that have large enough upper
bounds and which can never be negative to size_t's, and
convert nano to handle them properly. (DLR)
- Convert the shortcut list functions and most related functions
to return void instead of int, as the return values of all
those functions are essentially unused. Changes to
sc_init_one(), shortcut_init(), etc. (David Benbennick and
DLR)
- Make flags and all variables meant to store the value of flags
longs for consistency. (David Benbennick)
- Rename the TEMP_OPT flags to TEMP_FILE, as it's more
descriptive. (DLR)
- Remove unused global variable search_offscreen. (David
Benbennick)
- Add new N_() macro to mark strings that aren't translated
immediately, and convert nano to use it in cases where the
translated string is stored in a const char*. Changes
to sc_init_one(), print1opt(), help_init(), rcfile_error(),
do_credits(), etc. (David Benbennick) DLR: Do this for
toggle_init_one() too.
- Minor tweaks and clarifications to some option descriptions.
(DLR)
- Overhaul the shortcut list and toggle list initialization
code for efficiency. Changes to shortcut_init() and
toggle_init(). (David Benbennick) DLR: Move "Cancel" to just
after "Get Help" in the file browser list, for consistency
with all the other lists, have the replace list accept all the
same function keys as the search list, and clarify a few
shortcut descriptions.
- Convert nano to use the new parse_num() function to read in
numeric values at the command line and in the rcfile, and
duplicate the messages used in the rcfile in the command line
for consistency. (David Benbennick) DLR: Tweak parse_num() to
parse ssize_t values instead of ints and to return a bool
indicating whether parsing succeeded. Convert tabsize,
wrap_at, and fill to ssize_t in order to work with
parse_num() properly and also to increase their capacity
while keeping the ability to hold negative numbers in case of
errors. Also exit instead of calling usage() in the event of
an invalid fill value, for consistency with how an invalid
tabsize value is handled. Finally, handle invalid tabsize
entries in the rcfile the same way as on the command line,
and reset tabsize and wrap_at to their default values if
invalid rcfile entries are specified for them.
- Remove several unnecessary reset_cursor() calls. (David
Benbennick)
- Include <sys/types.h> in proto.h. (David Benbennick) DLR:
Remove some redundant inclusions of <sys/types.h> elsewhere.
- Move the main terminal initialization functions, aside from
initscr(), into a new terminal_init() function, and convert
nano to use it. (DLR)
- Convert placewewant to a size_t, and convert some functions
that use it as a parameter to use size_t as well. (David
Benbennick and DLR)
- Overhaul the paragraph searching code and some of the justify
code to clarify it and fix a bug where searches from the
previous paragraph would move up too far. Also make
quotestr-related variables global so that they only have to be
compiled once, and remove the no-longer-needed IFREG() macro.
New functions begpar() and inpar(); changes to quote_length(),
quotes_match(), do_para_search(), do_para_begin(),
do_para_end(), and do_justify(). (David Benbennick)
- Readded the errors flag and moved the ending prompt from
rcfile_error() to parse_rcfile() so that we only get prompted
once for all errors instead of separately for each error.
(DLR) David Benbennick: Make sure that no rcfile error
messages end in newlines, and show the ending prompt if we
can't read the .nano_history file while starting nano.
- Don't treat the return value of strn?(case)?cmp() as boolean.
(DLR and David Benbennick)
- Automatically install a symlink "rnano" pointing to nano.
Changes to src/Marefile.am. (DLR)
- Move the static int pid to the beginning of nano.c with all
the other static variables. (DLR)
- Consolidate some if blocks to remove some redundant code.
(David Benbennick)
- Fix warnings when compiling with ENABLE_NLS undefined and with
the fwritable-strings option. (David Benbennick)
- Add various #ifdefs to fix warnings and compilation problems
when compiling with every option manually turned on, including
NANO_SMALL. (David Benbennick)
- Simplify some of the rcfile and statusbar error messages, and
make some of them more consistent. (David Benbennick and DLR)
- Change some functions to take const char*'s instead of char*'s
where possible. (David Benbennick)
- Tweak some #ifdefs around indent_length() and references to
fill_flag_used to avoid warnings when compiling with
--disable-wrapping, --disable-justify, or a combination of the
two. (DLR)
- Overhaul the routines used to read the rcfiles and history
files for efficiency, make them work properly on lines over
1023 characters long and on lines containing nulls, and make
them properly handle the case where the user's home directory
changes in the middle of a session. New functions
histfilename() and writehist(); changes to
thanks_for_all_the_fish(), load_history(), save_history(), and
do_rcfile(). (David Benbennick)
- files.c:
get_next_filename()
- Tweak for efficiency, and add the ".save" suffix to the file
here. (David Benbennick)
close_open_file()
- Tweak to no longer rely on the return values of
open_(prev|next)file(). (DLR)
write_file()
- For consistency with nano 1.2.x and with other editors, make
the mode of newly created files 666 instead of 600 before
it's modified by the umask. (DLR, found by Toni Suokas)
do_writeout()
- If we're in restricted mode and the current filename isn't
blank, we can't change it, so disable tab completion in that
case. (DLR)
- Fix spacing problem in the "Save Under Different Name"
prompt. (DLR)
- global.c:
shortcut_init()
- Fix erroneous #ifdef so that nano compiles with
--disable-justify again. (DLR, found by Mike Frysinger)
- Change the Cancel shortcut in the file browser to an Exit
shortcut, to be more compatible with the current version of
Pico. (DLR)
thanks_for_all_the_fish()
- Delete topwin, edit, and bottomwin. (David Benbennick)
- nano.c:
die()
- Don't add the ".save" suffix to a saved file here anymore,
since get_next_filename() does that now. (David Benbennick)
die_save_file()
- Tweak for efficiency. (David Benbennick)
help_init()
- Fix the display of the translated key descriptions "Up" and
"Space" under all circumstances, and make the help browser
work properly when there are fewer than 24 columns available.
(David Benbennick)
usage()
- Don't translate the option strings for -Z/--restricted.
(David Benbennick)
do_enter()
- Don't treat it as a special case when the user presses Enter
on the last line of the screen and smooth scrolling is on, for
consistency. (DLR)
do_alt_speller()
- When reloading the newly spell-checked temporary file, call
terminal_init() to make sure that all the original terminal
settings are restored, as a curses-based alternative spell
checker (e.g. aspell) can change them. (DLR)
quote_length()
- Fix problem where quoted justify wouldn't work if HAVE_REGEX_H
wasn't set. (David Benbennick)
do_justify()
- Add allow_respacing flag, used to indicate when we've moved to
the next line after justifying the current line, and only run
the respacing routine when it's true. This keeps the
respacing routine from erroneously being run more than once on
the same line. (DLR)
- Check for first_par_line's not being NULL and only run the
renumbering and cutbuffer-splicing routines depending on that
if that's the case. This fixes a segfault occurring when
trying to do full justification on a file with no paragraphs
(in which case there are no normal lines to renumber and no
backed-up lines to be stored in the cutbuffer or spliced back
in during unjustify). (DLR)
do_exit()
- Tweak for efficiency. (David Benbennick)
main()
- Move the reset_cursor() call to the beginning of the main
input loop, and remove the apparently unnecessary wrefresh()
call. (David Benbennick)
- Call setlocale() outside the ENABLE_NLS #ifdef, since UTF-8
support won't work properly if the locale isn't set, whether
NLS is enabled or not. (Junichi Uekawa)
- Add titlebar() calls before all open_file() calls and remove
the titlebar() call after them, so that the titlebar is
displayed properly for all file(s) loaded. Also call
display_main_list() after adding the first file to open_files,
so that "Close" is properly displayed then instead of "Exit".
(DLR)
- nano.h:
- Reassign the key for full justification to Ctrl-U, for
compatibility with the current version of Pico. (DLR)
- Remove justbegend enum, as it's no longer needed. (DLR)
- proto.h:
- Change the variables in the prototypes for do_justify(),
get_verbatim_kbinput(), and get_mouseinput() to match the ones
used in the actual functions. (DLR)
- Remove unused declaration of temp_opt. (David Benbennick)
- Add missing copy_file() prototype. (David Benbennick)
- Move the load_history() and save_history() prototypes up to
match their corresponding location in files.c. (DLR)
- rcfile.c:
rcfile_msg()
- Removed and replaced with calls to rcfile_error(). (David
Benbennick)
- Removed the reference to "starting nano" in the statusbar
message, as it may be called when we exit if the history file
can't be saved. (DLR)
parse_rcfile()
- Have whitespace display default to off instead of on. (Mike
Frysinger)
nregcomp()
- Rename the variable flags to eflags so as not to conflict with
the global flags. (DLR)
- search.c:
do_replace_loop()
- Make sure old_pww is updated to the current value of
placewewant when a new match is found, so that edit_redraw()
will redraw the screen properly when only placewewant changes.
(DLR, found by Mike Frysinger)
do_replace()
- Instead of using edit_update() to redraw the screen with
edittop at the top, set edittop beforehand and call
edit_refresh(). (DLR)
do_gotoline()
- Use parse_num() to interpret a line entered by the user, and
start the search for a line from current instead of fileage.
(DLR)
do_gotopos(), find_node(), free_history()
- Tweak for efficiency. (David Benbennick)
free_history()
- Only include when DEBUG is defined. (David Benbennick)
- utils.c:
parse_num()
- New function to parse numeric values, so that we don't have to
duplicate code that calls strtol() all over the place. (David
Benbennick) DLR: Renamed from parse_int() to parse_num() and
converted to use ssize_t instead of int.
nstrnicmp()
- Remove code chacking for n's being less than 0 that will never
be run, since n is a size_t and is hence unsigned. (David
Benbennick)
ngetdelim(), ngetline()
- New functions equivalent to getdelim() and getline(), which
are both GNU extensions. (DLR, adapted from GNU mailutils
0.5 with minor changes to better integrate with nano and
increase efficiency)
- winio.c:
get_kbinput()
- Since the only valid values for escapes are 0, 1, and 2,
convert it to an int. (DLR)
get_control_kbinput()
- Fix erroneous debugging statement so that nano compiles with
--enable-debug again. (Jon Oberheide)
nanogetstr()
- Tweak the code to update the edit window just before getting
statusbar input for efficiency, and update bottomwin just
before then too. (David Benbennick)
- Don't delete the statusbar line on UnCut, since the current
version of Pico doesn't. (DLR)
do_cursorpos()
- Add assert to check whether totsize is correct. (David
Benbennick)
line_len()
- Rename to help_line_len() so as not to conflict with the
line_len variable used elsewhere, and move inside the
DISABLE_HELP #ifdef surrounding do_help() since it's only
called in do_help(). (DLR)
do_help()
- Have help_line_len() properly return an int again, since its
value can't be larger than COLS. (DLR)
- Allow the user to exit the help browser via Ctrl-C as well as
Ctrl-X, for consistency with the file browser. (DLR)
- configure.ac:
- Add AC_PROG_LN_S, so that we can portably create symlinks.
(DLR)
- Check for getdelim() and getline(), which are both GNU
extensions. (DLR)
- nanorc.sample:
- Add sample regexes for patch files. (Mike Frysinger)
- Various improvements to the "c-file" regexes. Add double,
typedef, extern, union, unsigned, inline, and long to the
green list. (Mike Frysinger) DLR: Also add signed, short, and
enum to the green list.
- nano.spec.in:
- Tweak to include all files in %{_bindir} instead of just nano,
so that the "rnano" symlink will be properly packaged. (DLR)
GNU nano 1.3.3 - 2004.06.28
- General:
- Minor comment cleanups. (DLR)
- Convert more ints used as boolean values to use TRUE and
FALSE. (David Benbennick)
- Make sure the special control keys are handled the same way
after the window is resized or we come out of suspend mode.
Changes to do_cont() and handle_sigwinch(). (DLR)
- Change some instances of ints that can never be negative to
size_t's. (DLR)
- Add better explanations for and in the "Terminal breakage"
comments, and handle missing key #ifdefs inside the functions
that use those keys. (DLR)
- Add restricted mode, accessible via the -Z/--restricted
command line option or by invoking nano with any name
beginning with 'r' (e.g. "rnano"). In restricted mode, nano
will not read or write to any file not specified on the
command line, read any nanorc files, allow suspending, or
allow a file to be appended to, prepended to, or saved under a
different name if it already has one. (IO ERROR) DLR: Also
disable backup files and spell checking (since the latter can
leave a pre-spell-checked version of the file in a temporary
directory), use tail() to get the program name so that the
check for its beginning with 'r' will work when a path is
specified, disable toggles that are only useful with options
that are disabled in restricted mode, call nano_disabled_msg()
when trying to read or spell check a file instead of leaving
the shortcuts out of the main list, and instead of acting as
though TEMP_OPT is enabled when exiting with a modified file
(which caused problems if the filename was blank), only allow
a filename to be modified at the writeout prompt if it's blank
beforehand. Changes to do_writeout(), toggle_init(),
shortcut_init(), die_save_file(), and nanogetstr().
- Call nano_disabled_msg() directly from the shortcut list
instead of inside the disabled functions. (David Benbennick)
- Clarifications to comments explaining exactly what control
characters and escape sequences are supported. (DLR)
- Disable "Where Is Next" in tiny mode. (DLR)
- Added the ability to justify the entire file at once, which
Pico has via ^W^J. Changes to backup_lines() and
do_justify(); new functions do_justify_void() and
do_full_justify(). (DLR)
- Modify the justification algorithm to work the same way as in
the current version of Pico, i.e, add a space at the end of
each line of the justified paragraph except for the last one,
and if there was a space at the end of the last one, remove
it. Changes to justify_format() and do_justify(). Note that
we can no longer reliably detect the first modified line in a
paragraph, since a line unmodified by justify_format() may get
a space tacked onto the end of it or removed from the end of
it later. The entire original paragraph is now always backed
up, and justify_format() no longer has a non-modifying mode,
so it's now only called in backup_lines(). (DLR)
- Wrap the long jump code in NANO_SMALL #ifdefs, since we only
use it if we're resizing the window, which is disabled when
NANO_SMALL is defined. (DLR)
- Add smart home key option, accessible via -A/--smarthome on
the command line, "set smarthome" in the rcfile, and the
Meta-H toggle in the edit window. Smart home works as
follows: When Home is pressed anywhere but at the very
beginning of non-whitespace characters on a line, the cursor
will jump to that beginning (either forwards or backwards).
If the cursor is already at that position, it will jump to the
true beginning of the line. This option is disabled in tiny
mode. Changes to do_home(), nanogetstr(), etc. (DLR;
suggested by Stephan T. Lavavej)
- Minor tweaks to the punctuation in some statusbar messages.
(DLR)
- Overhaul the low-level input routines into main routines that
actually get the input and state machines that interpret the
input. This allows better handling of the input (e.g. ignored
keys are now always ignored instead of just being ignored when
there are no escapes prefixing them) and will make it easier
to port to interfaces that don't have blocking input. New
functions reset_kbinput(), get_translated_kbinput(),
get_control_kbinput(), and get_untranslated_kbinput(); changes
to do_verbatim_input(), handle_sigwinch(), get_kbinput(),
get_ascii_kbinput(), get_escape_seq_kbinput(), and
get_verbatim_kbinput(); removal of get_ignored_kbinput() and
get_accepted_kbinput(). (DLR)
- Overhaul all the movement functions in order to avoid
redundant screen redraws (and regexec()s when color support is
available) whenever possible during ordinary cursor movement
when the text doesn't change. Do the same for moving in
do_char(), do_delete(), do_next_word(), do_prev_word(),
do_search(), do_research(), and do_replace_loop. Changes to
do_first_line(), do_last_line(), do_home(), do_end(),
do_page_up(), do_page_down(), do_up(), do_down(), do_left(),
do_right(), do_delete(), do_backspace(), do_search(),
do_research(), do_replace_loop(), do_find_bracket(), and
edit_refresh(). New functions do_left_void(),
do_right_void(), need_horizontal_update(),
need_vertical_update(), edit_scroll(), and edit_redraw(). All
of these functions but the first two require the previous
versions of current and/or placewewant as parameters, so that
they can redraw properly when the location has changed. Also
rename the int refresh in do_delete() and do_backspace() to
do_refresh so as not to conflict with refresh(). (DLR)
- Add some comments better explaining what is disabled in
restricted mode and why. (DLR)
- Since KEEP_CUTBUFFER is only used in cut.c, make it a static
variable in cut.c instead of a flag, and unset it in other
files via the new function cutbuffer_reset(). (DLR)
- Add the ability to change the characters used to display the
beginning characters of tabs and spaces via the rcfile entry
"whitespace". This is disabled if nanorc support is disabled
or if we're in tiny mode. Displaying the new characters is
toggled on and off by Meta-P; the default is on. (Mike
Frysinger; minor changes and adaptations by DLR)
- Add the ability to change the closing punctuation and closing
brackets used to control justification, via the rcfile
entries "punct" and "brackets". (DLR)
- Translation updates (see po/ChangeLog for details).
- Make the former flag same_line_wrap use TRUE and FALSE
instead of 1 and 0. (DLR)
- files.c:
add_open_file()
- Rearrange the NANO_SMALL #ifdef so that the code to set the
MODIFIED flag in open_files->flags is included only once.
(DLR)
write_marked()
- Call write_file() with nonamechange set to TRUE so that we
don't erroneously change the current filename when writing a
selection, and don't take a nonamechange parameter anymore
since we don't use it. (DLR)
do_writeout()
- 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)
- Add spaces to the ends of the "Overwrite" and "Different Name"
prompts, for consistency. (DLR)
do_browser()
- Call check_statblank() instead of blanking the statusbar
unconditionally, for consistency. (David Benbennick)
- global.c:
shortcut_init()
- Don't assign any handler functions to the help browser keys,
as the help browser handles them all internally. (David
Benbennick)
- move.c:
do_first_line(), do_last_line()
- Move these functions here from winio.c. (DLR)
- nano.c:
finish()
- Call blank_statusbar() and blank_bottombars() to blank out
the statusbar and shortcut list in bottomwin. (DLR)
- Since all of the calls to finish() use 0 for the value of
sigage, and the return value of finish() is never used, make
it accept and return void. (David Benbennick)
die_save_file()
- Call write_file() with nonamechange set to TRUE since we don't
need to change the current filename if we're writing emergency
backup files. (DLR)
do_early_abort()
- Removed, as it's no longer called anywhere. (David Benbennick)
usage()
- Add missing "[dir]" and two missing _()'s around the strings
describing the -E [dir]/--backupdir=[dir]" option. (CHAO
Wei-Lun)
open_pipe()
- Call enable_signals() at the beginning and disable_signals()
at the end, so that we get a SIGINT when Ctrl-C is pressed
during wait() and can then call cancel_fork() properly. (DLR)
do_delete(), do_enter()
- Tweak for efficiency. (David Benbennick)
do_prev_word()
- Switch the last test (current != NULL or not) around to match
the order of the same test in do_next_word() (current ==
NULL). The results are the same either way. (DLR)
do_wrap()
- Tweak for efficiency. (David Benbennick)
do_spell()
- Tweak for efficiency. (David Benbennick)
- Change the statusbar entries used in cases of failure so that
they all display the actual error that occurred. (David
Benbennick and DLR)
do_int_speller(), do_alt_speller()
- Make these functions return const char*'s instead of char*'s.
(David Benbennick)
justify_format()
- Remove redundant assignment. (DLR)
do_para_search()
- Remove unneeded edit_update() calls. (David Benbennick)
- Convert to use an enum to specify the search type: JUSTIFY,
BEGIN, or END. (DLR)
- Refactor to properly do searches for beginnings of paragraphs
in the same way as searches for endings of paragraphs, without
needing the old (and somewhat inaccurate) recursive approach.
(DLR)
do_justify()
- Remove unneeded edit_update() calls, and add a few minor
efficiency tweaks. (David Benbennick)
- Simplify an if statement. (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)
signal_init()
- Don't use termios and _POSIX_VDISABLE to disable keys anymore,
as there's no real equivalent of it when the latter isn't
defined. (DLR)
handle_sigwinch()
- Call resetty() to get the original terminal settings back.
(DLR)
- Rework so that nano properly redraws the screen on systems
that don't have resizeterm() and/or wresize(). In curses, we
now leave and immediately reenter curses mode via endwin() and
refresh(), and then reinitialize all windows via
window_init(). In slang, the above routine will only work if
the resize made the window smaller, so we now leave and
immediately reenter screen management mode via
SLsmg_reset_smg() and SLsmg_init_smg(), and then reinitialize
all windows via window_init(). (DLR, adapted from code in
Minimum Profit 3.3.0 and mutt 1.4.2.1, respectively)
do_toggle()
- Call blank_statusbar() and blank_bottombars() to blank out
the statusbar and shortcut list in bottomwin. (DLR)
do_verbatim_input()
- If PRESERVE is set, disable flow control characters before
getting input and reenable them after getting input. (DLR)
disable_signals(), enable_signals(), disable_flow_control(),
enable_flow_control()
- New functions that allow more fine-grained control of the
terminal: disabling and enabling signals without having to use
_POSIX_VDISABLE and disabling and enabling flow control
characters. (DLR)
main()
- Don't open the first file in quiet mode, since if we do, an
error message won't be shown if it's unreadable. (DLR; found
by Jaap Eldering)
- If we've specified multiple files on the command line and
multibuffer support is compiled in, turn multibuffer mode on
when reading those files and turn it off afterward if it was
off before. This allows us to open multiple files without
having to turn multibuffer mode on at the command line or in
the nanorc first, both of which are unintuitive. Multibuffer
mode should only affect how the "Read File" command behaves
anyway. (DLR)
- Remove the disabling of implementation-defined input
processing, as cbreak mode appears to turn it off anyway.
(DLR)
- After noecho(), call disable_signals() and
disable_flow_control(), the latter only if PRESERVE is not
set. (DLR)
- Move the savetty() call down from just after initscr() to just
after the terminal is properly set up, so that we can restore
it easily after a resize. (DLR)
- Add missing cast to char when calling do_char(). (DLR)
- Don't initialize the backup directory if we're in restricted
mode, since backups are disabled then. (DLR)
- Check $SPELL for an alternative spell checker if we didn't get
one from the command line and/or rcfile, as Pico does. Don't
do this if we're in restricted mode, since spell checking is
disabled then. (DLR)
- Add some cleanups for greater readability, and remove a few
bits of redundant code. (DLR and David Benbennick)
- nano.h:
- Since REGEXP_COMPILED is only used in search.c, convert it
from a flag to a static int there. (DLR)
- Add justbegend enum, used in do_para_search(). (DLR)
- Add updown enum, used in edit_scroll(). (DLR)
- proto.h:
- Remove unused xpt() and add_marked_sameline() prototypes.
(DLR)
- Add missing #ifdefs around the nstristr() and get_mouseinput()
prototypes. (DLR)
- rcfile.c:
- Move "rebinddelete" up in the list of options so that the list
is in alphabetical order. (DLR)
- Cosmetic reorganization of the order in which some options are
interpreted. (DLR)
- Explicitly check for rcopts[i].name's being "tabsize" to avoid
a spurious error under some circumstances about tabsize's
being 0 when there's no tabsize entry in the rcfile. (DLR)
- search.c:
regexp_init()
- Overhaul for efficiency. Also check if regcomp() failed, and
if so, display "Bad regex" message on the statusbar, so that
we don't have to display it separately after every call to
this function. (David Benbennick)
search_init()
- Only check whether USE_REGEXP is set, and hence whether or not
to display "[Regexp]" on the search prompt, if HAVE_REGEX_H is
defined. (DLR)
not_found_msg()
- Convert to properly handle strings generated by
display_string() that have been used in the search prompt
since 1.3.0. (David Benbennick)
- Use display_string() directly to display the text that we
didn't find instead of relying on statusbar() to do it
indirectly, since the latter won't display its text with the
user-specified whitespace characters and the former will.
(DLR)
- utils.c:
is_blank_char()
- New function used as an isblank() equivalent, since isblank()
is a GNU extension. (DLR)
nstricmp(), nstrnicmp()
- Add extra blank lines for greater readability, and remove
unneeded test for n's being less than zero (since it's already
been tested for being greater than zero or equal to zero at
that point) from nstrnicmp(). (DLR)
stristr()
- Rename to nstristr() to avoid a potential conflict with an
existing stristr() function, and move up to just after
nstrnicmp(). (DLR) David Benbennick: Tweak for efficiency.
- Include and use only when strcasestr() is unavailable, since
strcasestr() is a GNU extension. (DLR)
nstrnlen()
- New function used as a strnlen() equivalent, since strnlen()
is a GNU extension. (DLR)
- winio.c:
get_verbatim_kbinput()
- Refactor the output in the DEBUG #ifdef. It didn't work
properly ever since this function was changed to use an int*
instead of a char*. (DLR)
- When reading characters from input, properly reallocate
verbatim_kbinput via (int*)nrealloc() instead of an uncast
realloc(). (DLR)
get_accepted_kbinput()
- Add proper support for the keypad values and escape sequences
generated by the NumLock glitch and by certain keys on the
numeric keypad. (DLR)
- Add an extra break and move an #endif down to fix a potential
problem when NANO_SMALL is defined or KEY_RESIZE isn't, and
when PDCURSES isn't defined. (DLR)
get_escape_seq_kbinput()
- Add proper support for the keypad values and escape sequences
generated by the NumLock glitch. (DLR)
- Add ignore_seq parameter. If a sequence is recognized but
ignored, we will now return ERR and set ignore_seq to TRUE, and
if a sequence is unrecognized, we will now return ERR and set
ignore_seq to FALSE. Also, here and elsewhere, don't bother
assigning ERR to retval when that's its initial value. (DLR)
- Fix problem where the escape sequence for F3 on the FreeBSD
console would not be interpreted properly. (DLR)
get_mouseinput()
- Don't ungetch() anything if there's no control key and no meta
key defined in the shortcut we clicked. (DLR)
bottombars()
- Don't display any more than MAIN_VISIBLE shortcuts. Adding
justification of the entire file above made the search
shortcut list longer than this and hence made the shortcuts in
it so short as to be almost incomprehensible. (DLR)
- Tweak for efficiency and to better handle shorter screen
widths. (David Benbennick)
- Restructure the if block used for the sentinel key values,
dynamically allocate keystr based on the number of columns
available, and make sure we can display shortcuts even when
the number of available columns is too short for any complete
one. (DLR)
onekey()
- Don't bother padding the displayed shortcuts with spaces.
(David Benbennick)
- Convert len to a size_t. (DLR)
edit_add()
- Minor cosmetic reformatting. Also remove unused int
searched_later_lines. (DLR)
blank_bottomwin()
- Removed, as it does the same thing as blank_bottombars().
(David Benbennick)
blank_titlebar()
- New function used to blank the titlebar in topwin. (DLR)
blank_statusbar_refresh()
- Removed, as it's now unnecessary. (David Benbennick)
titlebar()
- Overhaul to use display_string() to display the filename, and
to better handle shorter screen widths. Also remove
now-unneeded wrefresh(topwin) calls. (David Benbennick)
DLR: Tweak to reserve enough space for "Modified", plus
padding, in all cases, to make sure that the version message
takes up no more more than 1/3 of the available width, minus
padding, and to include a reset_cursor() call so that the
cursor is always in the right place.
bottombars()
- Call blank_bottombars() instead of blank_bottomwin(). (David
Benbennick)
check_statblank()
- Overhaul for efficiency, (David Benbennick) DLR: Add
reset_cursor() call to ensure that the cursor is always in the
right place.
update_cursor()
- Removed, as it's no longer called anywhere. (David Benbennick)
edit_refresh()
- Remove apparently unneeded leaveok() calls. (David Benbennick)
edit_refresh_clearok(), center_cursor()
- Removed, as they are now unnecessary. (David Benbennick)
statusq()
- Don't allow "Full Justify" when in view mode. (DLR)
statusbar()
- Call reset_cursor() just before refreshing the edit window, so
that slang and other non-ncurses versions of curses will
properly place the cursor back in the edit window instead of
leaving it at the end of the statusbar. (DLR)
do_help()
- Overhaul for efficiency, and allow scrolling through the help
via the arrow keys as well as the paging keys. (David
Benbennick) DLR: Revert the use of the return value of
curs_set() to restore the previous state of the cursor, as
some curses implementations (including slang) get it wrong,
and explicitly turn the cursor off where needed instead.
do_credits()
- Use napms() instead of nanosleep(), as it does the same thing
(aside from taking an argument in milliseconds instead of
microseconds) and curses includes it. (DLR)
- Overhaul for efficiency, and make sure the xlcredits
translations are done after initialization in order to avoid
an error when compiling with -pedantic. (David Benbennick)
do_yesno()
- Add a comment to encourage translators to use both native and
English shortcuts, if possible. (Jordi)
- configure.ac:
- Add tests for isblank(), strcasestr(), and strnlen(), and
define _GNU_SOURCE so that the tests work properly. Increase
the minimum required autoconf version to 2.54. (DLR)
- Reformat the test programs so that they aren't packed into
fewer lines than usual, so as to make them easier to read, and
remove unnecessary inclusion of stdio.h in the slang test
programs. (DLR)
- Remove the checks for resizeterm() and wresize(), as they're
no longer needed. (DLR)
- config.rpath:
- Replace usage of egrep with grep -E, avoiding a XSI:ism (David
Weinehall)
- faq.html:
- Removed question about the NumLock glitch, as it's no longer
needed. (DLR)
- nano.1:
- Document restricted mode. (IO ERROR) DLR: Add minor
modifications to account for the above changes.
- Document the smart home key option. (DLR)
- Document the use of the SPELL environment variable. (DLR)
- nanorc.5:
- Document the smart home key option. (DLR)
- Document the whitespace option. (DLR, adapted from
documentation by Mike Frysinger)
- Document the punct and brackets options. (DLR)
- nano.texi:
- Fix toggle inaccuracies: Meta-L now toggles line wrapping, and
Meta-< and Meta-> aren't toggles. (DLR)
- Document restricted mode. (IO ERROR) DLR: Add minor
modifications to account for the above changes.
- Fix version number inaccuracies: Search/replace history and
sorting/uniqueness filtering for the internal spell chacker
were added in nano 1.1.99pre1. (DLR)
- Document the smart home key option. (DLR)
- Document the use of the SPELL environment variable. (DLR)
- nanorc.sample:
- Add missing mouse entry, and update the nanorc sample regexes
to account for the backupdir and mouse options. (DLR)
- Add smarthome description. (DLR)
- Document the whitespace option. (DLR, adapted from
documentation by Mike Frysinger)
- README.CVS:
- Increase the minimum required autoconf version to 2.54, and
change the recommended automake version 1.7 to the minimum
required automake version. Note that autoconf 2.54 will
technically also work with automake 1.6c, but that is a CVS
version as opposed to a stable release version, and automake
1.7 requires at least autoconf 2.54 in any case. (DLR)
- TODO:
- Added entry for justifying the entire file at once, since Pico
can do it, and with "[DONE]" since it's already been
implemented. (DLR)
GNU nano 1.3.2 - 2004.03.31
- General:
- Change instances in the code that refresh the entire edit
window when color support is enabled (in order to properly
handle multi-line color regexes) to only do so when
it's necessary, i.e, when COLOR_SYNTAX is set. (DLR)
- Minor cosmetic tweaks to the code involving direction keys.
NANO_UP_KEY and NANO_DOWN_KEY are now NANO_PREVLINE_KEY and
NANO_NEXTLINE_KEY, and the help messages for them have been
changed accordingly. Also remove extraneous references to
NANO_DOWN_KEY in the search history shortcut entries. (DLR)
- Add NANO_UNJUSTIFY_FKEY (the same as NANO_UNCUT_FKEY) to the
shortcut list, and tweak the unjustify routine to use it.
Also add NANO_FIRSTLINE_FKEY and NANO_LASTLINE_FKEY, and tweak
the statusbar input routines to handle them and NANO_HELP_FKEY
properly. (DLR)
- Block SIGWINCH after setting up its handler, and only unblock
and handle it when we're in a stable state, i.e, when we're
waiting for input from the user. New function
allow_pending_sigwinch(); changes to signal_init(),
get_kbinput(), and get_verbatim_kbinput(). (DLR)
- Decouple the paragraph searching code and the justifying code.
Removed function do_para_operation(); new function
do_para_search(); changes to do_justify(). (DLR)
- Add -E/--backupdir option. When used with -B/--backup, backup
files will be saved in the specified directory with their
canonical pathnames encoded in their names (all '/'s replaced
with '!'s). Changes to write_file(). (Martin Ehmsen) DLR:
Add function init_backup_dir() to handle relative paths
correctly, use get_full_path() to get the canonical pathname,
and use tail() to get the filename if get_full_path() fails.
- Port to the Tandem NonStop Kernel (nsr-tandem-nsk). (Tom
Bates; minor tweaks by DLR)
- Change some instances of boolean 0 and 1 to TRUE and FALSE.
(David Benbennick)
- Fix memory corruption problem occurring when answer is used as
the value of def; if the realloc() of answer leads to its
pointing to a different memory block, there will be a segfault
when the value of def is copied into it via strcpy().
(bort@alltel.net, Christian Weisgerber, David Benbennick, and
DLR)
- Remove the last editbot references, to avoid any potential
segfaults related to them. Also remove fix_editbot(), as it's
no longer needed. (David Benbennick)
- Rename several variables to make their use clearer and to
avoid conflicts. (DLR)
- Set the input mode before turning the keypad on. (DLR)
- cut.c:
add_to_cutbuffer()
- Add parameter allow_concat to determine whether we're allowed
to concatenate strings in the cutbuffer. (DLR)
- files.c:
do_insertfile()
- Wrap one reference to NANO_EXTCMD_KEY in a NANO_SMALL #ifdef.
(DLR)
- Save the already-typed answer when switching from "Insert
File" to "Execute Command" mode via Ctrl-X, just in case we
started typing a command before switching. (DLR)
add_open_files()
- Make the saving of marked status in open_files->file_flags
work properly again; a tweak to the ISSET() macro in 1.3.0
to make it only return 0 or 1 broke it. (DLR)
write_marked()
- New function used to write the current marked selection to a
file, split out from do_writeout(). (DLR)
do_writeout()
- Tweak for efficiency. (David Benbennick) DLR: Modify to have
the current answer preserved between toggles again.
filestat()
- Removed, as it is only called in one place and is
redundant. (DLR)
do_browser()
- Replace the filestat() call with an equivalent stat() call.
(DLR)
- global.c:
shortcut_init()
- Only allow verbatim input when we're not in view mode. (DLR)
- Set the associated function for unjustify to 0 instead of
do_uncut_text(), since it's currently unused. (DLR)
- nano.c:
usage()
- Clarify the description for -T/--tabsize a bit. (DLR)
do_verbatim_input()
- Remove the now-unneeded code to disable XON, XOFF, and
suspend, since we now go into raw mode in
get_verbatim_kbinput() and bypass them. (DLR)
do_next_word()
- Simplify and remove references to editbot so as to avoid a
segfault. (David Benbennick)
do_prev_word()
- Simplify and remove references to edittop. (David Benbennick)
do_int_speller(), do_alt_speller(), do_spell()
- Modify to write only the current selection from a file to the
temporary file used for spell checking when the mark is on,
and add a few miscellaneous cosmetic cleanups. (DLR)
do_int_spell_fix()
- Store the value of current_x in a size_t instead of an int,
and add a few minor efficiency tweaks. (David Benbennick)
- Remove comment explaining why findnextstr() is called with
bracket_mode set to TRUE even though we aren't doing a bracket
search, since after the above efficiency tweaks, it's now more
accurately called can_display_wrap. (DLR)
indent_length()
- Remove unneeded #ifdef. (David Benbennick)
do_justify()
- Remove references to the now-unneeded JUSTIFY_MODE flag. (DLR)
signal_init()
- Trap SIGQUIT in addition to turning it off via termios in
main(). This is consistent with SIGINT, which we trap here
and turn off via termios in main(), as well as with the
associated comment. (DLR)
handle_sigwinch()
- Set keypad() to TRUE and switch to cbreak mode just before
calling siglongjmp(), in case we resized during verbatim
input. (DLR)
main()
- Move the call to raw() on systems that don't define
_POSIX_VDISABLE outside the main input/output loop, as it
doesn't need to be called every time through the loop. Call it
instead of cbreak() on such systems, as it overrides cbreak()
anyway. (DLR)
- Add more descriptive comments explaining the termios and
curses setup routines, and turn the keypad on before setting
the input mode. (DLR)
- Remove stray HAVE_GETOPT_LONG #ifdefs. (DLR)
- Don't call keypad() before initializing the windows it needs
via window_init().
- nano.h:
- Move the NANO_H include guard up before the first #include.
(DLR)
- Remove the now-unneeded JUSTIFY_MODE flag. (DLR)
- search.c:
regexp_cleanup()
- Only do anything if REGEXP_COMPILED is set. (David Benbennick)
search_abort()
- Only test if the mark is set when NANO_SMALL isn't defined.
(David Benbennick)
search_init()
- Add some more comments and comment tweaks, don't indicate that
the search has been canceled when we enter a blank string in
replace mode, only call regexp_init() when USE_REGEXP is set,
and return -1 instead of -3 since a canceled search and a
canceled replace should be mostly equivalent. (David
Benbennick) DLR: Tweak to use the old behavior if we try to
search for invalid regexes.
findnextstr()
- Refactor to use a loop invariant, and tweak for greater
efficiency and simplicity. Also modify so that all searches
start one character after (or before, if we're doing a
backwards search) the current one, as opposed to all searches
except for regex searches for "^" and the like, for
consistency with other searches. (David Benbennick)
do_search()
- Handle search_init()'s no longer returning -3 above. (David
Benbennick)
- Port the code from do_replace_loop() to skip the current line
if we're searching for a regex with "^" and/or "$" in it and
end up on the same line to this function. This fixes a
problem where doing a forward search for "^" on a file with
more than one line would erroneously stop at the magicline and
indicate that that was the only occurrence. (DLR)
do_research()
- Port David Benbennick's efficiency tweaks and the
aforementioned code ported from do_replace_loop() to this
function. (DLR)
replace_regexp()
- Completely refactor for increased efficiency. (David
Benbennick)
replace_line()
- Use a char* parameter for the replacement string instead of
last_search, and add minor efficiency tweaks. (David
Benbennick)
do_replace_loop()
- Fix segfault when doing a regex replace of a string that
matches inside a line (e.g. replace the "b" in "abc" with
anything). (David Benbennick)
- If the mark is on at the beginning of the function, turn it
off and turn it back on just before returning. Also overhaul
to rely on the return value of findnextstr() instead of a loop
invariant, to not need to take an int* parameter, and store
the beginning x-coordinate in a size_t instead of an int.
(David Benbennick)
do_replace()
- Handle search_init()'s no longer returning -3 above, and add
efficiency tweaks. (David Benbennick) DLR: Tweak to follow
the old behavior of adding non-blank strings entered at the
"Replace: " prompt to the search history. (DLR)
do_gotoline()
- Simplify the edit_update() call depending on the value of
save_pos. (David Benbennick)
do_bracket()
- Add efficiency tweaks. (David Benbennick) DLR: Remove
reliance on the hardcoded bracket string length; instead, only
require that the bracket string length be even.
- utils.c:
regexec_safe()
- Wrap in HAVE_REGEX_H #ifdefs. (DLR)
regexp_bol_or_eol()
- New function used to check if a regex contains "^" and/or "$",
assuming that the regex would be found if the REG_NOT(BOL|EOL)
flags aren't used in the regexec() call; it replaces the
direct regexec()s used before. (DLR)
strstrwrapper()
- Refactor for increased efficiency, and eliminate the need for
the line_pos parameter. (David Benbennick)
mallocstrcpy()
- Tweak so that when src is "", "" is allocated and returned
instead of NULL. (David Benbennick)
- winio.c:
get_verbatim_kbinput()
- Set keypad() to FALSE and switch to raw mode while reading
input, and set it back to TRUE and go back into cbreak mode
mode afterwards. (Note that if _POSIX_VDISABLE isn't defined,
we don't need to change to or from raw mode since we're
already in it exclusively.) This ensures that we don't end up
reading in extended keypad values that are outside the ASCII
range or having to deal with interrupt-generating key values.
Also, with keypad() set to TRUE, xterm generates KEY_BACKSPACE
when the user hits Ctrl-H, which, when cut down to ASCII
range, ends up being Ctrl-G, which can be confusing. (DLR)
- For consistency with get_kbinput(), use an int* to store and
return the input instead of a char*, and tweak the functions
that call it to handle this. (DLR)
get_accepted_kbinput()
- Don't use "kbinput = wgetch(win)" as a switch value. (DLR)
get_escape_seq_kbinput()
- Add support for the escape sequences for F1-F14 whenever
possible (i.e, whenever a conflict doesn't occur), some
additional comments, and a few cosmetic cleanups. (DLR)
- Use switch statements instead of strncmp() to read in the long
xterm sequences for Ctrl-[arrow key] and Shift-[arrow key].
(DLR)
get_escape_seq_abcd()
- A resurrected version of the old abcd() function, readded in
order to simplify get_escape_seq_kbinput(). (DLR)
get_mouseinput()
- Interpret shortcut key values slightly more stringently when
ungetch()ing them. (DLR)
strlenpt()
- Properly cast the second parameter of the strnlenpt() call to
size_t. (DLR)
get_page_start()
- For consistency, tweak so that scrolling always occurs when we
try to move onto the "$" at the end of the line, as opposed to
(a) when we move onto the "$" at the end of the line on the
first page and (b) when we move onto the character just before
the "$" on subsequent pages. (DLR)
reset_cursor()
- Tweak for efficiency. (David Benbennick)
edit_refresh()
- Tweak for efficiency. (David Benbennick)
statusq()
- Rename "tabs" to "allowtabs". (David Benbennick)
do_credits()
- Use nanosleep() instead of usleep(). The latter is only
standard under BSD, whereas the former is POSIX compliant.
Accordingly, only include time.h if we use this function, i.e,
if NANO_EXTRA is defined. (DLR)
- Add explanatory comment. (DLR)
- configure.ac:
- Change instances of "int main ()" to "int main(void)". (DLR)
- faq.html:
- Fixed inaccuracy: multibuffer mode was first in nano 1.1.0,
not 1.1.12. (DLR)
- nano.1, nanorc.5, nano.texi
- Clarify the description for -T/--tabsize a bit. (DLR)
- Add -E/--backupdir description. (Martin Ehmsen; minor cosmetic
fixes by DLR)
- nanorc.sample:
- Add backupdir description. (Martin Ehmsen; minor cosmetic
fixes by DLR)
- README:
- Reformat to 72 characters per line, fix wording in one spot,
and fix spacing and capitalization in several spots. (DLR)
- NEWS:
- Capitalization fix. (DLR)
- TODO:
- Clarify the paragraph searching item, and add item for
filename searches in the file browser. (DLR)
GNU nano 1.3.1 - 2004.01.09
- General:
- Minor overhaul and abstraction of the lowest level of mouse
input, mostly adapted from the code in do_mouse() that handles
clicking on the shortcut list. New function do_mouseinput();
changes to do_mouse(). (DLR) David Benbennick: Add a few
efficiency/extensibility tweaks.
- Modify the shortcut structure so that instead of having two
miscellaneous key values (misc1 and misc2), there is one key
value reserved for function keys (func_key) and one
miscellaneous key value (misc), and tweak the
shortcut-handling code to deal with this. These changes allow
NANO_OPEN(PREV|NEXT)_ALTKEY to work properly when added to the
shortcut entries for NANO_OPEN(PREV|NEXT)_KEY. Also remove
the values in the shortcut list and elsewhere that were made
redundant by the low-level input overhaul, use toupper()
instead of subtracting 32 from values for greater code
readability, and eliminate use of adding 32 to values when
testing for toggles, as get_kbinput_accepted() converts toggle
values to lowercase before returning them. (DLR)
- Remove the workarounds for missing KEY_UP and KEY_DOWN, as
they appear to be holdovers of the old way of denoting the
search history shortcuts; if they aren't defined, KEY_LEFT and
KEY_RIGHT probably shouldn't work either, and all four appear
to be standard keys in termcap/terminfo in any case. Add new
special sentinel key values NANO_NO_KEY (for no shortcut key)
and NANO_HISTORY_KEY (for search history keys, both Up and
Down), modify the shortcut list to use them, and modify the
shortcut display routines to handle them. Also modify the
shortcut list code to not treat non-control character values
of val as Meta-sequences, and fix dependencies on that
behavior. Also rename several variables: "alt" -> "meta",
"altval" -> "metaval". (DLR)
- Hook up the verbatim input functions so that verbatim input
can be used in the edit window. New function
do_verbatim_input(); changes to do_char(). (DLR) Additional
minor tweaks to do_char() by David Benbennick.
- Clarify the description of the --rebinddelete option. (DLR)
- Miscellaneous comment tweaks, and copyright year updates in
the comments and in do_credits(). (DLR)
- cut.c:
- Overhaul to increase efficiency and add various cleanups.
Changes to add_to_cutbuffer(), cut_marked_segment(), and
do_uncut_text(). (David Benbennick)
- files.c:
check_operating_dir()
- Add an assert to ensure that full_operatingdir isn't NULL,
a fix for reporting nonexistent (incomplete) directory names
as being outside the operating directory when tab completion
is being used, and cosmetic cleanups. (David Benbennick)
copy_file()
- New function used to create a copy of a file, split out from
do_writeout(). (David Benbennick)
write_file()
- Completely overhauled to properly ignore appending/prepending
to symlinks when NOFOLLOW_SYMLINKS is defined, to properly
support writing a selection to a file under the changed
cutting code, to have more concise error messages, to add
various cleanups, and so on. (David Benbennick)
do_writeout()
- Prompt the user if we're trying to save an existing file (and
not just a selection of it) under a different name. (DLR;
suggested by Jean-Philippe Guérard)
- Overhaul the code used to write a selection of a file to
temporarily set fileage and filebot to the top and bottom of
the selection and then call write_file(), instead of following
the old hackish behavior with cut_marked_segment() (which
won't work after the cutting code changes anyway). (David
Benbennick) DLR: Tweak to not add an extra blank line to the
end of the written selection if the cursor is at the beginning
of the last line of the selection.
open_prevfile(), open_nextfile()
- For consistency with the rest of the multibuffer code, change
"No more open files" to "No more open file buffers". (DLR)
do_browser()
- Allow '?' to open the help browser, and readd the ability of
'G'/'g' to open the "Go to Directory" prompt (which was
erroneously removed before), for compatibility with Pico.
(DLR)
- global.c:
shortcut_init()
- Allow WHEREIS_NEXT_KEY to be used in view mode. (DLR)
- nano.c:
do_int_spell_fix()
- Add comment explaining why findnextstr() is called with
bracket_mode set to TRUE even though we aren't doing a bracket
search. (DLR)
do_para_operation()
- Convert to use the new low-level input functions. (DLR)
main()
- Remove unused variable option_index. (DLR)
- Fix omission of NANO_NO_KEY in the shortcut list scanning
code. (DLR)
- Remove now-unnecessary initialization of kbinput. (DLR)
- nano.h:
- Comment additions and cosmetic tweaks. (DLR)
- search.c:
findnextstr(), do_replace_loop()
- Fix potential infinite loops and other misbehavior when doing
beginning-of-line or end-of-line regex replacements ("^", "$",
and "^$"). Add a no_sameline parameter to findnextstr(), and
set it in the calls in do_replace_loop() when such regexes are
found, so that such regexes are only found once per line.
Also change length_change from a long to an int; size_t is
unsuitable due to its being unsigned. (DLR; found by Mike
Frysinger and DLR) David Benbennick: Add a few minor cleanups
to do_replace_loop().
- winio.c:
get_kbinput(), get_accepted_kbinput()
- Don't pass in the value of the REBIND_DELETE flag anymore.
Instead, handle it directly inside the functions. (DLR)
get_accepted_kbinput()
- Translate Ctrl-8 into NANO_DELETE_KEY (or NANO_BACKSPACE_KEY
if REBIND_DELETE is set), since it apparently is generated
sometimes even when keypad() is TRUE. (DLR)
- Translate KEY_SLEFT into NANO_BACK_KEY and KEY_SRIGHT into
NANO_FORWARD_KEY, since they are sometimes generated by
Shift-Left and Shift-Right. (DLR)
get_ascii_kbinput()
- Tweak to make it slightly more readable. (DLR)
get_verbatim_kbinput()
- Modify to take an extra parameter indicating if we should
interpret ASCII codes or not. (DLR)
get_escape_seq_kbinput()
- Expand to deal with more broken terminals that don't generate
keypad values. Support the escape sequences for Insert,
Delete, Home, End, PageUp, and PageDown, [arrow key],
Ctrl-[arrow key], and Shift-[arrow key] when needed in the
Linux console, the FreeBSD console, the Hurd console, xterm,
rxvt, and Eterm. Also, use get_verbatim_kbinput(), with ASCII
interpretation disabled, to read in the sequences. (DLR)
get_skip_tilde_kbinput()
- Removed, as it is unneeded due to the expansion of
get_escape_seq_kbinput(). (DLR)
get_mouseinput()
- Modify to take an extra parameter indicating if we should
ungetch() the key equivalents of shortcuts we click on or not.
(DLR)
nanogetstr()
- Properly interpret the Meta key value in misc if we hit it at
the statusbar prompt. (DLR)
do_yesno()
- Add a few efficiency/extensibility tweaks. (David Benbennick)
- Convert to use the new low-level input functions, and remove
two last hardcoded widths left after the above tweaks. (DLR)
do_replace_highlight()
- Display a highlighted space if the word length is zero, so
that we can see zero-length regexes we're replacing. (DLR;
suggested by Mike Frysinger)
- configure.ac:
- Check for glib 2.x and then 1.2.x if we need glib. (DLR)
- faq.html:
- Add question explaining how verbatim input works, as well as a
few minor fixes. (DLR)
- nano.1, nanorc.5:
- Add nano version numbers (minus any "-cvs" suffixes). (DLR)
- nano.spec.in:
- Update for the 1.3 branch of nano. (DLR)
- NEWS:
- Reformat so all lines are limited to 72 columns, add a few
typo fixes, and make a few minor cosmetic cleanups. (DLR)
- THANKS:
- Add Danilo Segan, for the Serbian translation.
GNU nano 1.3.0 - 2003.10.22
- General:
- Complete overhaul and abstraction of the lowest level of
keyboard input, mostly rewritten but incorporating a few bits
from the old functions and adding support for Pico's Esc Esc
[three-digit decimal ASCII code] input method. New functions
get_kbinput(), get_verbatim_kbinput(), get_ignored_kbinput(),
get_accepted_kbinput(), get_ascii_kbinput(),
get_escape_seq_kbinput(), and get_skip_tilde_kbinput(). These
should work properly on FreeBSD (due to code and input
provided by Lee Nelson and Wouter van Hemel, respectively).
(DLR)
- The -K/--keypad command line/rcfile option has been removed,
and keypad() is now always TRUE. keypad_on() in winio.c and
the check for _use_keypad in configure.ac have both been
removed. (DLR)
- The -d/--rebinddelete command line/rcfile option, equivalent
to Pico's -d, has been added. It is intended to work around
the problem with Backspace/Delete confusion on some terminals,
notably FreeBSD; if your Backspace key acts like Delete, this
option will fix that. (DLR)
- Remove unneeded breaks at the ends of default: clauses. (DLR)
- Add the ability to repeat the last search without prompting
via Meta-W, and move the line wrapping toggle to Meta-L. New
function do_research(). (Wouter van Hemel)
- Added the ability to move to the beginning or end of the
paragraph, which Pico has via ^W^W (previous paragraph)
and ^W^O (next paragraph). Changes to do_justify(); new
functions do_para_operation(), do_para_begin(), and
do_para_end(). Note that the last three functions are
disabled if justification is disabled. (DLR)
- Make sure the "historylog" option isn't included at all if
NANO_SMALL is defined. (DLR)
- Source reorganization: move code to src/, docs to doc/.
(Jordi)
- Translation updates (see po/ChangeLog for details).
- Since SAMELINEWRAP is only used in nano.c, make it a static
variable in nano.c instead of a flag, and surround all
wrap_reset() calls with DISABLE_WRAPPING #ifdefs. (DLR)
- Change enum "topmidbotnone" to "topmidnone", as there's no
BOTTOM option anymore. (DLR)
- Split out the string-displaying routine from update_line()
into a separate function; convert the edit window, statusbar
display, and statusbar prompt to use it, so that they can all
properly display control characters and tabs; free and NULL
the backup search string in one place in the search code
instead of several; and do some other minor refactoring of
related display functions to simplify them. New functions
mark_order() and display_string(); new macro charmove();
changes to actual_x(), strnlenpt(), blank_bottombars(),
blank_edit(), get_page_start(), edit_add(), update_line(),
statusbar(), and do_replace_highlight(). (David Benbennick)
DLR: Add minor cosmetic tweaks, add missing NANO_SMALL #ifdef
around the text for a backwards search in the refactored code,
and enclose dump_buffer() and dump_buffer_reverse() in one
ENABLE_DEBUG #ifdef instead of two.
- Convert memmove() function calls to charmove() macro calls, as
the former all work on char*'s. (DLR)
- Miscellaneous #define cleanups: only include the prototype for
and definition of wrap_at if wrapping and/or justification are
enabled, remove duplicate wrap_at prototype, and define
DISABLE_MOUSE if NCURSES_MOUSE_VERSION isn't defined in nano.h
instead of all over the code. (DLR)
- Autogenerate the html versions of the manpages in the
Makefile.am's in doc/man/, make sure that they're properly
installed via "make dist", and make sure that "make distcheck"
works too. Also be sure to set EXTRA_DIST properly. (Jordi,
DLR and Jeff Bailey)
- files.c:
read_file()
- After we've read in a file and possibly converted it from
DOS/Mac format, set fileformat back to 0 to prevent erroneous
conversion messages when we read other files in. (DLR)
do_browser()
- Some of the Pico compatibility options in the file browser
that don't work properly for current Pico have been removed.
Backspace, 'g', 'l', 'q', and 'u' are invalid. 'd' deletes
the highlighted file, and 'r' renames the highlighted file;
neither of these are implemented. (DLR)
- global.c:
toggle_init()
- Change the message for the line wrapping toggle from "Auto
wrap" to "Auto line wrap", to more clearly associate it with
Meta-L. (DLR)
shortcut_init()
- Change multibuffer-enabled references to
opening/closing/toggling the previous/next loaded file to
toggling/switching to/closing the previous/next file buffer,
for consistency with other references. (DLR)
- nano.c:
window_init()
- Set keypad() to TRUE regardless of whether PDCurses is being
used, as Meta-X apparently turns it off even under ncurses.
(DLR)
do_backspace()
- Vastly simplify, and remove dependency on page_up(). (David
Benbennick)
help_init()
- Document the support for Esc Esc [character]'s being
interpreted as Ctrl-[character], and the support for Pico's
Esc Esc [three-digit decimal ASCII code] input method. (DLR)
do_mark()
- Toggle MARK_ISSET at the beginning of the function instead of
setting it in one place and unsetting it in another place.
(David Benbennick)
do_suspend()
- Use handle_hupterm() to handle SIGHUP and SIGTERM so we can
properly deal with them while nano is suspended. (DLR; problem
found by David Benbennick)
abcd()
- Removed, as it's unneeded due to the low-level input overhaul.
(DLR)
- nano.h:
- Define KEY_RESIZE and KEY_SUSPEND as -1 when slang is used, as
slang has no equivalent of either. When nano is compiled with
slang support, resizing the window doesn't generate
KEY_RESIZE, and pressing Ctrl-Z to suspend nano at the Linux
console with keypad(TRUE) generates Ctrl-Z instead of
KEY_SUSPEND, both unlike ncurses. (DLR)
- Define KEY_RESIZE as -1 if it isn't defined, as it isn't in
the curses library included with SunOS 5.7-5.9. Also define
KEY_SUSPEND as -1 if it isn't defined, in case it isn't in
more than just Slang. (DLR)
- Define all potentially missing keys as different negative
values (ERR is -1, so use -2, -3, etc.) so as to avoid having
duplicate case values when keys are missing. (DLR)
- move.c:
- Remove unneeded inclusion of stdio.h, make various cleanups,
and preserve the cursor's coordinates when paging up and down.
(David Benbennick) DLR: Readd the ability to behave the old
way while paging, make it so the new behavior is only used in
smooth-scrolling mode, and modify page_down() to always go
down a full page (even when there's less than one page of text
left) for consistency.
page_up()
- Removed due to rewrite of movement functions. (David
Benbennick)
- proto.h:
- Surround the do_prev_word() and do_next_word() prototypes with
NANO_SMALL #ifdefs, since the actual functions aren't included
in tiny mode. (DLR)
- rcfile.c:
parse_colors()
- Generate an error if we try to use a bright background color
in a nanorc file. (DLR; found by Brand Huntsman)
- Make sure all rcfile error messages are capitalized, for
consistency. (DLR)
- winio.c:
get_verbatim_kbinput()
- Fix a silly memory corruption bug that would occur when trying
to read a sequence of more than one key verbatim. (DLR)
get_accepted_kbinput()
Handle Ctrl-{ to Ctrl-~ correctly, and drop support for
converting Esc ` to Esc Space, since making Meta-[key]
correspond to Ctrl-[key] in all cases is inconsistent due to
the different natures of Contol and Meta key sequences. (DLR)
do_first_line()
- Call edit_update() with TOP instead of CENTER; both do the
same thing, but it works faster with TOP. (DLR)
nanogetstr()
- Don't let the user type in ASCII 127 at the statusbar prompt.
(DLR)
titlebar()
- Fix problem with the available space for a filename on the
titlebar's being short by one. (DLR)
edit_add()
- Fix problems with the marking highlight's being drawn
improperly in some cases. (DLR)
edit_update()
- Tweak for efficiency and remove the fix_editbot() call. (David
Benbennick)
do_credits()
- Update the copyright years to "1999-2003", to match those
given in the rest of the code. (DLR)
- configure.ac:
- Change instances of "GNU Nano" to "GNU nano" for consistency.
(DLR)
- nano.1, nanorc.5, nano.texi: