nano-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Nano-devel] updates (yes, I'm still alive...)


From: David Lawrence Ramsey
Subject: [Nano-devel] updates (yes, I'm still alive...)
Date: Fri, 03 Jun 2005 01:53:56 -0400
User-agent: Mozilla Thunderbird 1.0.2 (X11/20050317)

Sorry I've been silent for so long, but, as usual, I've been busy.  The
major changes in CVS are as follows:

* since proto.h includes nano.h, the source files only include proto.h
instead of both it and nano.h, which should speed up compilation

* all the hardcoded references to 128 bytes have been replaced with a
MAX_BUF_SIZE #define set to the same value

* "^P" is now displayed for history instead of "Up"; it works the same
way as before and mouse clicks on its shortcut now work

* the FSF's mailing address is updated in all the comments

* the +LINE option has been extended to +LINE,COLUMN per PFTank's
suggestion, and the "Go To Line" prompt has been similarly extended,
since the feature can be useful if you need to go to a particular column
as well as line quickly; it's still backward-compatible with +LINE if
the column isn't specified, although specifying only a line will now
leave the cursor at the same column instead of resetting it to 0 (this
is for consistency, since specifying only a column, via something like
"+,30", will leave the cursor on the same line)

* the history code has been cleaned up and restructured to work with
ordinary filestructs, and so should be quite a bit simpler than before;
note that scrolling up at the top will no longer move to a blank line,
as any string typed there was not properly preserved, and only having a
blank line at the bottom is consistent with the idea of the magicline

* strncpy() has been replaced with the charcpy() macro (it's memcpy()
cast to a char *), as the only difference between the two was the
padding of the string with nulls if the specified length was greater
than the string's length, and that was apparently never used; note that
mallocstrncpy() uses this now too in spite of its name (since I couldn't
think of a better name for it)

* when using a backup directory, any file saved will now have a unique
name thanks to get_next_filename() (which now uses an unsigned long for
the number instead of an int); I added this due to Jim C.'s comments on
the help-nano list about it, because being able to track down all
backups of a file in that directory makes it a lot easier to find a
particular version of it, and there are times that it's useful

* the file-writing routines have been reworked so that they can work
properly with already-opened files, such as the mkstemp()-created files
used by the spell-checking code; safe_tempnam() has been renamed to
safe_tempfile() and has been influenced by tmpfile() in that it returns
an open FILE stream now in addition to the filename; this avoids the
previous hack of getting a temporary filename, deleting it, and
recreating it, and also avoids the potential problem of having that same
file be created during that time

* if we can't get a temporary file via mkstemp() when we try to prepend,
don't display the filename anymore, as it's undefined when mkstemp()
fails; safe_tempfile() is used here now, so as to keep the mkstemp()
call in one place

* placewewant is now set 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

* multibyte/wide character support has been added to input_tab(), so
that if we're dealing with UTF-8 filenames, we don't end up with a
string that contains only part of a UTF-8 sequence during tab completion

* various fixes to make sure that nano will not only compile, but
actually run with everything enabled, including debug mode; there were
problems with assertion failures before, and when I added DB's overhaul
of the multibuffer code to make it a doubly-linked list, I forgot to
update thanks_for_all_the_fish() to deal with it as he did, so it would
go into an infinite loop at that point when you tried to exit

* total_update() is much simpler, and uses clearok() only when
necessary; unnecessary clearok()'s have also been removed from other
places

Comments?





reply via email to

[Prev in Thread] Current Thread [Next in Thread]