Commit Graph

564 Commits (7256b055b17ebbe0068f5816d0bfeb30f0a7721a)

Author SHA1 Message Date
David Lawrence Ramsey 3468784b85 further simplify do_writeout()
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@4093 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2007-04-21 20:13:06 +00:00
David Lawrence Ramsey 7622ca0456 in do_writeout(), if we're in restricted mode, we're not allowed to
write selections to files, so don't display the "Write Selection to
File" prompt


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@4092 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2007-04-21 18:57:47 +00:00
David Lawrence Ramsey 462720a166 simplify do_writeout()
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@4090 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2007-04-21 18:23:06 +00:00
David Lawrence Ramsey 5f7686f9b4 formatting fix
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@4089 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2007-04-20 04:13:06 +00:00
David Lawrence Ramsey 380a70831a in tail(), remove unneeded if statement
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@4088 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2007-04-19 04:12:54 +00:00
David Lawrence Ramsey 238df938f0 yet another cosmetic fix
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@4087 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2007-04-19 03:53:23 +00:00
David Lawrence Ramsey e53c38274f still more cosmetic fixes
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@4086 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2007-04-19 03:23:16 +00:00
David Lawrence Ramsey b94d51aa7e more cosmetic fixes
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@4085 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2007-04-19 03:15:04 +00:00
David Lawrence Ramsey b3d66aab3d another cosmetic fix
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@4083 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2007-04-18 19:25:00 +00:00
David Lawrence Ramsey 60d43339bf cosmetic fix
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@4082 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2007-04-18 19:16:08 +00:00
David Lawrence Ramsey b8dfcb3896 fix various file-saving bugs
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@4081 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2007-04-18 19:09:44 +00:00
David Lawrence Ramsey 7fc36c77d2 fix various file- and rcfile-opening bugs
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@4080 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2007-04-18 18:22:13 +00:00
David Lawrence Ramsey dc588aea5d simplify real_dir_from_tilde()
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@4079 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2007-04-18 17:13:36 +00:00
David Lawrence Ramsey 31023f0f4d in input_tab(), don't bother checking if num_matches is less than zero,
as it's a size_t and hence unsigned


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@4075 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2007-04-17 18:12:19 +00:00
David Lawrence Ramsey e93cfd10c0 in real_dir_from_tilde(), fix long-standing problem where directory
names that began with "~", but that weren't users' home directories,
could be erroneously treated as users' home directories (e.g. "~d/"
would be treated as "~daemon/")


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@4074 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2007-04-17 04:38:30 +00:00
David Lawrence Ramsey a1cf6be436 in get_real_dir_from_tilde(), fix segfault when dealing with directory
names that begin with "~", but that aren't users' home directories


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@4072 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2007-04-17 03:43:59 +00:00
David Lawrence Ramsey 5314b8dd8a still more miscellaneous comment fixes
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@4034 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2007-01-11 23:11:46 +00:00
David Lawrence Ramsey cc91cf41a0 in do_writeout(), when setting retval to the return value of
write_(marked_)?file(), use the "?" operator instead of an if/else
clause


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@4033 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2007-01-11 23:10:03 +00:00
David Lawrence Ramsey e44cd2dfba yet more miscellaneous comment fixes
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@4032 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2007-01-11 22:54:55 +00:00
David Lawrence Ramsey 9e7b2d572c more miscellaneous minor fixes
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@4031 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2007-01-11 22:46:22 +00:00
David Lawrence Ramsey 30ca7d5219 still more miscellaneous comment fixes
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@4030 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2007-01-11 21:52:29 +00:00
David Lawrence Ramsey 6e1cd2d2f3 more miscellaneous comment fixes
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@4029 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2007-01-11 21:47:06 +00:00
David Lawrence Ramsey 4154d08362 miscellaneous minor fixes
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@4028 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2007-01-11 21:36:29 +00:00
David Lawrence Ramsey 6335fb54d5 miscellaneous comment fixes
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@4012 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2007-01-01 05:15:32 +00:00
David Lawrence Ramsey 0c426782c4 still more cosmetic fixes
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@4004 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2006-12-15 05:03:08 +00:00
David Lawrence Ramsey 2aca11e800 more comment fixes
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@4003 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2006-12-15 04:53:47 +00:00
David Lawrence Ramsey 4078d60d69 fix breakage
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@4002 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2006-12-15 04:50:57 +00:00
David Lawrence Ramsey 46104dcc8e still more miscellaneous minor fixes
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@4001 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2006-12-15 02:54:08 +00:00
David Lawrence Ramsey 26b3ead8d2 revert erroneous change
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@4000 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2006-12-15 02:49:44 +00:00
David Lawrence Ramsey ad64cd97b8 more miscellaneous minor fixes
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@3999 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2006-12-14 22:11:44 +00:00
David Lawrence Ramsey 8060d66158 miscellaneous minor fixes
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@3998 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2006-12-14 21:57:03 +00:00
David Lawrence Ramsey 4c19415ecf in do_writeout(), fix a segfault when we can't get the full path of
either the filename we want to save under or the original filename


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@3997 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2006-12-14 20:03:30 +00:00
David Lawrence Ramsey f85a1eb48a fix more problems with strings that contain nulls but shouldn't
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@3994 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2006-12-11 22:11:32 +00:00
David Lawrence Ramsey 3d267dc323 still more comment fixes
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@3983 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2006-11-27 07:13:28 +00:00
David Lawrence Ramsey 9a2d0aff00 simplify
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@3982 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2006-11-27 06:02:33 +00:00
David Lawrence Ramsey f7eef5d04c fix breakage
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@3981 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2006-11-27 05:49:58 +00:00
David Lawrence Ramsey 8ad3b78626 cosmetic fixes
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@3979 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2006-11-27 05:40:09 +00:00
David Lawrence Ramsey 6ad82142c0 still more comment fixes
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@3978 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2006-11-27 05:25:48 +00:00
David Lawrence Ramsey 0e48bc18be fix breakage
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@3977 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2006-11-27 05:19:24 +00:00
David Lawrence Ramsey 8db126b09d in write_file(), properly handle filenames that contain nulls
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@3975 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2006-11-27 05:03:54 +00:00
David Lawrence Ramsey d97649859d in do_insertfile(), properly handle files that contain nulls
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@3974 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2006-11-27 04:57:22 +00:00
David Lawrence Ramsey 013613ec40 in do_insertfile(), properly handle executable commands that contain
nulls


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@3972 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2006-11-27 04:35:11 +00:00
David Lawrence Ramsey cb801d63a3 cosmetic copyright notice fixes
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@3950 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2006-11-10 02:47:11 +00:00
David Lawrence Ramsey 89eb5a96fb simplify still more
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@3947 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2006-11-08 13:03:37 +00:00
David Lawrence Ramsey d23dcc5a25 simplify more
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@3946 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2006-11-08 02:58:42 +00:00
David Lawrence Ramsey a93023f14b in get_full_path(), fix problem where only paths would be returned when
both paths and filenames should have been


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@3944 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2006-11-08 02:48:15 +00:00
David Lawrence Ramsey b31b128a78 simplify
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@3943 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2006-11-08 01:02:13 +00:00
David Lawrence Ramsey b24cb0cd19 in do_writeout(), fix problem where a file could sometimes be
overwritten without a warning prompt


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@3942 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2006-11-07 22:57:13 +00:00
David Lawrence Ramsey 2bf7e975eb yet more cosmetic fixes
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@3941 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2006-11-07 22:56:25 +00:00
David Lawrence Ramsey ba48aa9743 still more cosmetic fixes
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@3940 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2006-11-07 22:36:44 +00:00
David Lawrence Ramsey 6c3a399817 in get_full_path(), remove unneeded assert
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@3939 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2006-11-07 21:41:05 +00:00
David Lawrence Ramsey 137694d15b more cosmetic fixes
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@3938 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2006-11-07 21:32:43 +00:00
David Lawrence Ramsey 8965af5874 in do_writeout(), for consistency, when saving a file with no name,
don't allow overwriting an existing file when in restricted mode


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@3937 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2006-11-07 21:22:14 +00:00
David Lawrence Ramsey 4967eb8fc0 cosmetic fixes
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@3936 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2006-11-07 21:08:17 +00:00
David Lawrence Ramsey b5652a4d56 fix breakage
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@3901 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2006-10-13 16:35:57 +00:00
David Lawrence Ramsey 98bca94758 in input_tab(), if the tab-completed path is a directory, make sure
enough space is allocated before tacking a slash onto the end of it


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@3900 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2006-10-13 16:18:40 +00:00
David Lawrence Ramsey 23b9907048 add missing blank line
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@3893 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2006-10-03 19:15:01 +00:00
David Lawrence Ramsey 85307fe28e in input_tab(), since the field precision operator used in the sprintf()
uses ints and not size_t's, replace it with two strncpy()s, which use
size_t's


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@3892 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2006-10-03 18:46:00 +00:00
David Lawrence Ramsey 768a75ff5f comment fix
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@3879 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2006-09-21 01:48:54 +00:00
David Lawrence Ramsey 3879528945 make sure that the statusbar cursor position is always properly reset
when we get out of all statusbar prompts


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@3865 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2006-08-29 20:54:38 +00:00
David Lawrence Ramsey 7b0531aa0b per Benno Schulenberg's patch with a few tweaks by me, add various
clarifications to translated strings


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@3828 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2006-07-31 01:30:31 +00:00
David Lawrence Ramsey b159f941e8 per Benno Schulenberg's patch with a few additions by me, fix
punctuation relating to "i.e." in comments and documentation


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@3821 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2006-07-28 17:06:27 +00:00
David Lawrence Ramsey 23994bd8a0 miscellaneous minor fixes
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@3797 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2006-07-19 13:34:55 +00:00
David Lawrence Ramsey eec40df2a1 in do_insertfile(), remove redundant code: we only mark the file as
modified if we're not in multibuffer mode, in which case view mode
should never be on


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@3787 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2006-07-13 12:18:57 +00:00
David Lawrence Ramsey c346701d09 in do_insertfile(), if we don't insert a file into a new buffer,
properly update the x-coordinate to account for the number of characters
inserted on the current line


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@3786 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2006-07-13 04:19:53 +00:00
David Lawrence Ramsey 9a145d906f in do_insertfile(), if we're in view mode, as we can be if multibuffer
mode is on, don't mark the file as modified (and remove the code that
does this in execute_command()); also, if we execute a command in a new
buffer, move back to the beginning of the first line of the buffer
afterwards, for consistency


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@3785 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2006-07-13 03:06:36 +00:00
David Lawrence Ramsey afeed5f640 comment fixes
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@3755 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2006-07-05 15:21:18 +00:00
David Lawrence Ramsey aa4eb40e71 another cosmetic fix
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@3754 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2006-07-05 15:20:16 +00:00
David Lawrence Ramsey 19cb1e6de6 cosmetic fixes
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@3753 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2006-07-05 14:27:14 +00:00
David Lawrence Ramsey 85e35e67a2 in get_full_path(), don't return NULL when the current directory doesn't
exist, as we can still recover from that, and also add various cleanups


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@3752 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2006-07-05 14:14:06 +00:00
David Lawrence Ramsey 4f2a073cf9 per Benno Schulenberg's patch, in do_writeout(), fix problem where the
modifiers at the "Write File" prompt were marked for translation via
gettext no-ops but never actually translated; also, in do_insertfile(),
use actual gettext calls instead of no-ops, for consistency


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@3660 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2006-06-14 13:19:43 +00:00
David Lawrence Ramsey 69e1ce56df per Benno Schulenberg's patch with a few tweaks by me, add minor wording
fixes to various messages


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@3635 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2006-06-08 02:37:45 +00:00
David Lawrence Ramsey ef0d5a7637 handle prepending of wrapped text in one place instead of many, so that
it always works consistently


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@3547 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2006-05-22 02:08:49 +00:00
David Lawrence Ramsey 3fe5acebea cosmetic fixes
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@3512 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2006-05-13 18:06:43 +00:00
David Lawrence Ramsey 660e05be3d miscellaneous cosmetic fixes
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@3506 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2006-05-12 19:30:28 +00:00
David Lawrence Ramsey 08f16e2fc7 in free_chararray(), assert that array isn't NULL, for consistency with
the other free_.*() functions; also fix potential memory corruption
problem when copying text


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@3500 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2006-05-11 01:53:33 +00:00
David Lawrence Ramsey f0e3ca6e88 clarify error messages
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@3466 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2006-05-03 13:11:00 +00:00
David Lawrence Ramsey 125b2f0be5 in write_file(), simplify the routine for closing the file just before
we indicate success on the statusbar


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@3362 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2006-04-07 05:33:05 +00:00
David Lawrence Ramsey adfecd24b4 simplify the previous fix; also, in write_file(), clarify the error
message when writing a temporary file for prepending fails


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@3361 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2006-04-07 04:37:14 +00:00
David Lawrence Ramsey 2420794355 in write_file(), if the original file is unreadable when we try to save
the backup, we can save the original file unless we're prepending, so do
it


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@3360 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2006-04-07 03:59:12 +00:00
David Lawrence Ramsey d9ae1d6d6a yet another comment fix
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@3359 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2006-04-07 03:57:23 +00:00
David Lawrence Ramsey 8055f0935f in open_file(), remove redundant wording in the error message when we
try to open a device file


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@3358 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2006-04-06 22:57:22 +00:00
David Lawrence Ramsey ac8dfca510 in safe_tempfile(), don't ignore $TMPDIR if it's set but blank, for
consistency


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@3356 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2006-04-06 21:41:48 +00:00
David Lawrence Ramsey e5af25baef in write_file(), 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


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@3355 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2006-04-06 05:18:23 +00:00
David Lawrence Ramsey 9308e5210b still more comment fixes
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@3354 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2006-04-05 21:46:13 +00:00
David Lawrence Ramsey 979de2309b open all files in binary mode for consistency and robustness
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@3352 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2006-04-05 21:25:47 +00:00
David Lawrence Ramsey ca70ff69ed comment fix
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@3350 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2006-04-05 15:05:05 +00:00
David Lawrence Ramsey 22e15eb7ad in write_file(), don't free backupname before displaying it in a
statusbar error message


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@3347 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2006-04-05 02:56:47 +00:00
David Lawrence Ramsey ac0361df6e in do_writeout(), remove unneeded setting of currshortcut
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@3297 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2006-02-24 19:38:20 +00:00
David Lawrence Ramsey 6816007242 make sure browser_refresh() is used when refreshing or doing tab
completion at the prompt in the file browser


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@3296 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2006-02-18 21:32:29 +00:00
David Lawrence Ramsey 9b268c2ebf fix compilation problem
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@3282 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2006-02-07 21:16:46 +00:00
David Lawrence Ramsey 9d8c284135 allow tab completion of directories at the "Go To Directory" prompt
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@3280 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2006-02-07 21:11:05 +00:00
David Lawrence Ramsey 3d8d29d08a another formatting fix
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@3278 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2006-02-07 18:35:26 +00:00
David Lawrence Ramsey fc8e5cb0f2 cosmetic and formatting fixes
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@3277 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2006-02-07 18:32:22 +00:00
David Lawrence Ramsey b0e04c0de3 a few last comment and consistency fixes
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@3238 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2005-12-08 07:24:54 +00:00
David Lawrence Ramsey 6d6a36c647 add descriptive comments to pretty much all functions and major
variables that don't have them, plus a few miscellaneous minor fixes


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@3237 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2005-12-08 07:09:08 +00:00
David Lawrence Ramsey 034b994eb5 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


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@3236 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2005-12-08 02:47:10 +00:00
David Lawrence Ramsey 315eb3280a adjust copyright notices in all source files to account for Chris'
reassigning the 2005-2006 copyright on nano to me


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@3215 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2005-11-28 19:35:29 +00:00
David Lawrence Ramsey ccd1b7b50a miscellaneous minor fixes
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@3201 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2005-11-18 20:21:48 +00:00
David Lawrence Ramsey d15c92d41a more comment fixes
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@3200 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2005-11-17 18:58:56 +00:00
David Lawrence Ramsey ebe3425f9f rename the NANO_SMALL #define to NANO_TINY
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@3176 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2005-11-15 03:17:35 +00:00
David Lawrence Ramsey 41dd9122fe formatting fix
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@3174 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2005-11-15 02:09:03 +00:00
David Lawrence Ramsey 3f7c8c5158 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; also, for functions originally
adapted from other sources, add notices from the original files, as we
do with the tab completion functions adapted from busybox


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@3172 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2005-11-14 22:20:35 +00:00
David Lawrence Ramsey da0691b4ad comment fix
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@3162 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2005-11-11 05:21:38 +00:00
David Lawrence Ramsey c1a28fa9ae in 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


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@3124 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2005-11-09 15:13:00 +00:00
David Lawrence Ramsey 970a809357 remove unneeded code
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@3121 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2005-11-09 03:37:50 +00:00
David Lawrence Ramsey 9c984e8e63 in 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()


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@3109 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2005-11-08 19:15:58 +00:00
David Lawrence Ramsey e19449ec50 actually use statusbar_pww in the statusbar prompt code to cut down on
redundant updates, add related functions to do that, and rename a few of
the statusbar prompt functions for consistency


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@3099 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2005-11-07 21:45:44 +00:00
David Lawrence Ramsey 43fff01ede move functions specific to the file browser to their own source file,
browser.c


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@3094 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2005-11-05 20:01:11 +00:00
David Lawrence Ramsey a0168ca896 add new -L/--nonewlines command line option, and new "nonewlines" rcfile
option, to control whether nano adds magiclines to the ends of files


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@3091 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2005-11-05 17:35:44 +00:00
David Lawrence Ramsey c3b3b9a28f tweak open_buffer() and read_file() to remove the assumption that the
file always ends in a magicline


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@3090 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2005-11-05 17:20:39 +00:00
David Lawrence Ramsey 6619c43b88 formatting fix
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@3089 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2005-11-05 06:08:44 +00:00
David Lawrence Ramsey 4eeff48c5f cosmetic fixes
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@3088 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2005-11-05 04:59:00 +00:00
David Lawrence Ramsey 6a0ea821e9 fix breakage
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@3085 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2005-11-04 06:21:39 +00:00
David Lawrence Ramsey a50e36c6b2 simplify
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@3084 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2005-11-04 05:59:41 +00:00
David Lawrence Ramsey 306049666a tweak write_file() to remove the assumption that the file always ends in
a magicline, and remove a bit of apparently unneeded logic from
read_file()


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@3083 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2005-11-04 05:44:01 +00:00
David Lawrence Ramsey 626bcd7cc2 remove unneeded sys/wait.h #include from files.c
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@3078 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2005-11-03 02:45:54 +00:00
David Lawrence Ramsey e014fbda80 fix compilation with -pedantic
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@3007 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2005-08-29 19:11:26 +00:00
David Lawrence Ramsey abd8993660 in update_history(), add a check to make sure the parameter we pass to
renumber() isn't NULL, and update related comments


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2979 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2005-08-10 20:03:58 +00:00
David Lawrence Ramsey bf0e47dc37 miscellaneous enum cleanups, including making the file-writing
functions' append parameter an enum instead of an int


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2966 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2005-08-01 18:27:10 +00:00
David Lawrence Ramsey 6d8e495c37 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


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2943 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2005-07-26 14:42:57 +00:00
David Lawrence Ramsey 96452cb60c handle invalid multibyte characters more efficiently
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2941 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2005-07-26 06:13:45 +00:00
David Lawrence Ramsey 520a90c8d9 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


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2933 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2005-07-25 21:23:11 +00:00
David Lawrence Ramsey 691698a954 move advanced text operations (command execution in a buffer, wrapping,
spell checking, justifying, and word counting) to their own source file,
text.c


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2919 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2005-07-24 19:57:51 +00:00
David Lawrence Ramsey c00513b65e fix alternate spell checker breakage: don't lose colors after using it
on a file


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2913 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2005-07-23 00:41:45 +00:00
David Lawrence Ramsey 7f343a6dc4 add comment and formatting fixes, and remove now-useless global-specific code
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2906 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2005-07-21 05:56:42 +00:00
David Lawrence Ramsey e99494f21a add miscellaneous color and openfilestruct cleanups, and move the
openfilestruct functions to nano.c, since they're no longer specific to
file operations


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2903 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2005-07-20 21:08:38 +00:00
David Lawrence Ramsey 7dc531a801 miscellaneous minor fixes
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2892 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2005-07-18 18:43:39 +00:00
David Lawrence Ramsey 091068982d add comment
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2887 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2005-07-18 05:16:04 +00:00
David Lawrence Ramsey c104ef15a6 simplify get_totals() (renamed get_totsize()) 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


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2879 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2005-07-17 01:44:35 +00:00
David Lawrence Ramsey 5b44f373fd really fix color breakage by decoupling edit_update() and
edit_refresh(); edit_update() is only called without edit_refresh() in
do_gotolinecolumn() if allow_update is FALSE, and in edit_refresh()
itself if edittop is out of range of current


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2875 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2005-07-16 22:47:12 +00:00
David Lawrence Ramsey 8f1afee813 fix color breakage; also, in 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


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2873 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2005-07-16 07:06:36 +00:00
David Lawrence Ramsey 6a74c9224c fix stat breakage
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2870 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2005-07-15 19:37:32 +00:00
David Lawrence Ramsey cb8d845ad7 still more miscellaneous color fixes
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2869 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2005-07-15 01:08:52 +00:00
David Lawrence Ramsey 538dc352c5 a few more miscellaneous color fixes
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2868 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2005-07-15 00:36:49 +00:00
David Lawrence Ramsey 443a766fe2 more miscellaneous breakage fixes
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2863 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2005-07-14 23:06:22 +00:00
David Lawrence Ramsey a8da623410 typo fix
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2855 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2005-07-14 17:31:39 +00:00
David Lawrence Ramsey db95802a18 add breakage fixes, type fixes, and as-needed color regex compilation
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2854 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2005-07-13 20:18:46 +00:00
David Lawrence Ramsey 0c4ca3509f *really* fix more breakage
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2853 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2005-07-12 23:25:00 +00:00
David Lawrence Ramsey e5c7e928c9 still more breakage fixes
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2852 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2005-07-12 23:06:22 +00:00
David Lawrence Ramsey 222b201afe miscellaneous minor fixes
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2851 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2005-07-12 20:09:24 +00:00
David Lawrence Ramsey 5128de8308 fix marking breakage
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2850 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2005-07-12 17:40:16 +00:00
David Lawrence Ramsey b386a905e6 use blank_line() instead of hblank/mvwhline(), and fix more breakage
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2844 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2005-07-10 02:37:38 +00:00
David Lawrence Ramsey 2d705caec7 fix still more breakage caused by the overhaul
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2842 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2005-07-09 05:38:21 +00:00
David Lawrence Ramsey a0ebc813f1 replace almost all mvwaddstr(hblank) calls with mvwhline(' ', COLS)
calls, which do the same thing


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2840 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2005-07-09 04:49:09 +00:00
David Lawrence Ramsey 56001845cd yet more breakage fixes
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2839 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2005-07-09 04:42:47 +00:00
David Lawrence Ramsey be5cdb2748 add one last breakage fix
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2838 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2005-07-09 03:40:44 +00:00
David Lawrence Ramsey 76c25f582a still more breakage fixes
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2837 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2005-07-08 21:12:39 +00:00
David Lawrence Ramsey dbcaa3b1fb fix some breakage caused by the restructuring
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2836 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2005-07-08 20:59:24 +00:00
David Lawrence Ramsey 6ad59cd29b 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; this
changes pretty much every function


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2835 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2005-07-08 20:09:16 +00:00
David Lawrence Ramsey 64661ac140 rename filebuffer to openfile. as it's shorter
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2834 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2005-07-08 19:57:25 +00:00
David Lawrence Ramsey 503f278547 rename variable open_files filebuffer, for consistency
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2831 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2005-07-08 02:51:58 +00:00
David Lawrence Ramsey 90573296ea reorder some functions for consistency
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2830 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2005-07-08 02:47:05 +00:00
David Lawrence Ramsey 9c3249c893 minor cosmetic and constant cursor position display fixes
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2806 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2005-07-01 22:58:47 +00:00
David Lawrence Ramsey 43d3e9324b comment fix
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2786 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2005-06-28 17:35:20 +00:00
David Lawrence Ramsey 2cf6d717f1 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


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2782 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2005-06-28 06:25:34 +00:00
David Lawrence Ramsey 7a3f49c019 remove all instances of charcpy() and replace them with strncpy(), for
ease of maintenance


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2758 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2005-06-22 00:24:11 +00:00
David Lawrence Ramsey bebfc6da0f put back erroneously removed bits
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2757 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2005-06-21 22:48:38 +00:00
David Lawrence Ramsey 16799baccd change some instances of charcpy() back to strncpy(), as the latter's
numm-termination is needed in some places


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2755 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2005-06-21 22:32:50 +00:00
David Lawrence Ramsey 01e13ea1c1 comment fixes
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2745 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2005-06-21 04:16:12 +00:00
David Lawrence Ramsey 68c10963c4 revert last change, as the multibyte strcoll() functions can't handle
e.g. 2-to-1 character conversions as the original strcoll() can


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2744 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2005-06-21 04:11:04 +00:00
David Lawrence Ramsey d0c4d378b4 add a multibyte case-insensitive version of strcoll(), and make
diralphasort() use it so that filenames are sorted properly according to
the current locale


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2743 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2005-06-21 03:26:58 +00:00
David Lawrence Ramsey a62e8e3de9 when reading color syntax names or sorting filenames, use mbstrcasecmp()
instead of strcasecmp() to compare them, in case they're UTF-8


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2734 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2005-06-19 21:10:48 +00:00
David Lawrence Ramsey 483f3ac1b5 in read_line(), rename variable len to buf_len, for consistency
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2733 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2005-06-19 19:57:13 +00:00
David Lawrence Ramsey c54c4d1eea rename total_update() total_redraw() for consistency
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2725 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2005-06-18 15:49:17 +00:00
David Lawrence Ramsey 3435a0ff64 rename the CONSTUPDATE flag to CONST_UPDATE, and clarify its description
in the help text


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2711 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2005-06-17 21:08:13 +00:00
David Lawrence Ramsey a01690c410 comment fixes
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2674 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2005-06-15 07:38:25 +00:00
David Lawrence Ramsey 42e271d2d3 in do_browser(), make mouse clicks in the browser window work properly
when the MORE_SPACE flag is set


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2672 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2005-06-15 07:32:58 +00:00
David Lawrence Ramsey 9c06f34ef9 more miscellaneous minor fixes
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2671 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2005-06-15 07:18:30 +00:00
David Lawrence Ramsey ab41ab9246 fix #ifdefs so that nano compiles with NANO_SMALL defined and
DISABLE_TABCOMP undefined


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2670 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2005-06-15 06:30:05 +00:00
David Lawrence Ramsey d1323e4e35 formatting and comment fixes
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2668 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2005-06-15 03:56:36 +00:00
David Lawrence Ramsey d26f1ebdf1 in open_prevnext_file(), move up a misplaced assert and rename a
variable


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2665 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2005-06-15 03:01:41 +00:00
David Lawrence Ramsey bdfa927d62 more miscellaneous cleanups
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2662 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2005-06-14 23:36:13 +00:00
David Lawrence Ramsey 6a0d5b8fec miscellaneous minor fixes
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2649 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2005-06-13 14:00:22 +00:00
David Lawrence Ramsey 4428975e95 cosmetic fix
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2615 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2005-06-08 20:13:38 +00:00
David Lawrence Ramsey c7935e20b7 revert the conversion of each line to a valid multibyte string, as it
doesn't take encodings other than ASCII and Latin-1 into account and
hence isn't accurate enough


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2614 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2005-06-08 20:12:57 +00:00
David Lawrence Ramsey 7bf86e1707 when reading a file in, make sure each line is a valid multibyte string
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2612 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2005-06-08 19:50:02 +00:00
David Lawrence Ramsey 457847f0fe add else's
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2605 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2005-06-06 19:35:53 +00:00
David Lawrence Ramsey 7e62d109ba in 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


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2604 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2005-06-06 19:25:29 +00:00
David Lawrence Ramsey 6fdc81ae04 various umask-related cleanups
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2595 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2005-06-05 19:33:27 +00:00
David Lawrence Ramsey 81dabf2be7 formatting fix
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2594 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2005-06-05 19:20:36 +00:00
David Lawrence Ramsey 3db02389f4 in safe_tempfile(), open a newly created temporary file in "r+b" mode
instead of "w+b" mode, since the latter truncates the file if it already
exists, and we don't need to do that since it's an error if the file
already exists


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2593 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2005-06-05 19:18:11 +00:00
David Lawrence Ramsey cef24f2254 fix #ifdefs so the tiny version of nano compiles again; prepending a
file now uses safe_tempfile() instead of mkstemp() directly, and
safe_tempfile() requires get_full_path() and check_writable_directory()


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2580 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2005-06-03 01:36:05 +00:00
David Lawrence Ramsey 8d07efac66 comment fix
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2579 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2005-06-03 01:33:04 +00:00
David Lawrence Ramsey 34bdc35d94 readd tab completion of history strings, with a few minor tweaks
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2577 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2005-06-02 18:41:31 +00:00
David Lawrence Ramsey 1726050ef9 fix more bad #ifdefs, and add a few formatting fixes
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2576 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2005-06-02 05:50:58 +00:00
David Lawrence Ramsey dac3bca274 clarify a comment, and don't try to display the buffer name in
die_save_file() if it's been blanked out by get_next_file()'s failure to
find a unique filename


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2573 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2005-06-01 04:23:52 +00:00
David Lawrence Ramsey 5e068c6031 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


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2571 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2005-05-31 04:28:15 +00:00
David Lawrence Ramsey bec2f20da0 formatting fix
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2570 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2005-05-31 03:39:59 +00:00
David Lawrence Ramsey d20c0c34f5 comment fix
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2569 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2005-05-31 03:36:15 +00:00
David Lawrence Ramsey 0998a64fb9 cosmetic fixes
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2568 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2005-05-31 03:33:30 +00:00
David Lawrence Ramsey b9b572236a when using a backup directory, make sure all the filenames written are
unique by using get_next_filename() when necessary


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2565 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2005-05-29 02:22:55 +00:00
David Lawrence Ramsey df2a82509b fix mismatched subscript
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2564 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2005-05-28 23:51:03 +00:00
David Lawrence Ramsey 1a1ea3d42f cosmetic fixes
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2563 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2005-05-28 23:32:45 +00:00
David Lawrence Ramsey 15aaa2c31a miscellaneous minor fixes
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2562 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2005-05-28 23:21:30 +00:00
David Lawrence Ramsey 10796ac2fc cosmetic fixes
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2561 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2005-05-27 13:50:31 +00:00
David Lawrence Ramsey aff5a1c6b1 add multibyte/wide character support to input_tab(), so that we don't
end up with a string that contains only part of a multibyte character
during tab completion


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2560 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2005-05-27 13:06:18 +00:00
David Lawrence Ramsey 11846fa576 bool fix
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2558 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2005-05-27 03:52:21 +00:00
David Lawrence Ramsey 32fe95d35e revert last change for now, as it breaks the display of filename matches
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2557 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2005-05-26 19:48:41 +00:00
David Lawrence Ramsey 920e350d85 in input_tab(), make sure that we don't set *place to the middle of a
multibyte character


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2556 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2005-05-26 19:14:42 +00:00
David Lawrence Ramsey e5b23bd2ff formatting fixes
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2555 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2005-05-26 18:57:56 +00:00
David Lawrence Ramsey 7de678798a cosmetic fixes
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2554 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2005-05-26 18:20:05 +00:00
David Lawrence Ramsey 638cbe5407 yet another comment fix
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2553 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2005-05-26 18:11:32 +00:00
David Lawrence Ramsey 31b159c1b3 add various fixes to avoid a hang and several potential assertion
failures when building with DEBUG defined


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2544 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2005-05-26 05:17:13 +00:00
David Lawrence Ramsey e3970f503c replace all instances of strncpy() with charcpy(), since the only
difference between them is that the former pads strings with nulls when
they're longer than the number of characters specified, which doesn't
appear to be used anywhere


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2542 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2005-05-26 03:47:24 +00:00
David Lawrence Ramsey 16f88134f7 more miscellaneous minor fixes
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2541 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2005-05-26 03:32:41 +00:00
David Lawrence Ramsey 934f9687bb overhaul the history code to work more consistently, and clean up
various parts of it; note that history tab completion has been removed


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2533 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2005-05-23 16:30:06 +00:00
David Lawrence Ramsey 30f164a015 in save_history(), properly save history when in view mode
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2530 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2005-05-21 22:41:23 +00:00
David Lawrence Ramsey 50995bd024 rename another variable
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2516 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2005-05-16 20:13:09 +00:00
David Lawrence Ramsey 6e925cf330 update the Free Software Foundation's mailing address in various
comments


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2510 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2005-05-15 19:57:17 +00:00
David Lawrence Ramsey 066713e87e more indentation fixes and one more cosmetic fix
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2509 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2005-05-14 23:21:02 +00:00
David Lawrence Ramsey 546f5b3d8a rename a few more variables, and fix some indentation
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2508 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2005-05-14 23:14:47 +00:00
David Lawrence Ramsey e781ddf3b1 still more cosmetic fixes
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2507 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2005-05-14 22:44:16 +00:00
David Lawrence Ramsey 29be8031df comment fixes
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2486 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2005-04-20 14:55:46 +00:00
David Lawrence Ramsey 5b2f17e591 change all hardcoded instances of 128 bytes to MAX_BUF_SIZE, and #define
MAX_BUF_SIZE as 128 in nano.h


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2481 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2005-04-19 21:47:01 +00:00
David Lawrence Ramsey 3705924fc8 cosmetic fixes
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2480 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2005-04-19 20:13:13 +00:00
David Lawrence Ramsey c596c0c4da miscellaneous bits: make get_next_filename() use an unsigned long, make
num_of_digits() take a size_t instead of a ssize_t, and rename
num_of_digits() to digits()


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2479 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2005-04-19 16:32:08 +00:00
David Lawrence Ramsey 9cf1df1f06 in do_browser() and do_help(), don't treat NANO_CANCEL_KEY as
NANO_EXIT_KEY anymore, for consistency


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2478 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2005-04-19 03:15:21 +00:00
David Lawrence Ramsey ad11460eb7 remove more unneeded clearok(TRUE)'s, and avoid an unnecessary update
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2474 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2005-04-16 18:27:57 +00:00
David Lawrence Ramsey e527e458f4 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


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2471 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2005-04-15 18:07:26 +00:00
David Lawrence Ramsey ac71fdde97 more cosmetic fixes
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2470 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2005-04-15 17:48:20 +00:00
David Lawrence Ramsey 6a244b689f various minor bits: add miscellaneous comment fixes; in
get_next_filename(), use a long instead of an int for the number
prepended to the filename; and in num_of_digits(), use a ssize_t instead
of an int


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2468 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2005-04-14 03:52:28 +00:00
David Lawrence Ramsey d4a071e492 in do_insertfile(), fix handling of blank filenames in multibuffer mode
so that they work properly again


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2446 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2005-03-31 17:00:43 +00:00
David Lawrence Ramsey 894d80fc5d add missing blank line
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2445 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2005-03-31 05:26:06 +00:00
David Lawrence Ramsey 88ad64d597 in do_insertfile(), fix a 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


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2443 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2005-03-30 23:52:02 +00:00
David Lawrence Ramsey d8367986ce cosmetic fixes
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2429 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2005-03-26 04:49:01 +00:00
David Lawrence Ramsey 6e0ed3c1c6 add various portability and potential segfault fixes involving getcwd()
calls


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2428 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2005-03-26 04:42:28 +00:00
David Lawrence Ramsey 928babf8a1 cosmetic fixes
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2407 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2005-03-21 06:12:07 +00:00
David Lawrence Ramsey b349c80f0d allow refreshing of the file browser window, as Pico does
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2388 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2005-03-17 19:10:29 +00:00
David Lawrence Ramsey 202d3c2f97 add DB's overhaul of the rcfile parsing code and related miscellaneous
bits


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2345 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2005-03-10 20:55:11 +00:00
David Lawrence Ramsey ad96aff50d rework things so that strrchrn() is no longer needed, and remove it
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2325 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2005-02-22 23:22:37 +00:00
David Lawrence Ramsey 32f56814c7 remove unnecessary #include
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2323 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2005-02-14 18:25:32 +00:00
David Lawrence Ramsey 7d367710ae add DB's overhaul of the file browser code to increase efficiency and
add multibyte character support, plus a few tweaks of mine


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2320 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2005-02-14 05:00:15 +00:00
David Lawrence Ramsey 1b9d3f9898 port over DB's overhaul of safe_tempnam() and his changes to
check_operating_dir() to make it use boolean values (plus a few more
boolean-related tweaks of mine); also stop wrapping the bad_chr
parameter of parse_mbchar() in #ifdefs for cleanliness, as the
allow_tabcomp parameter of check_operating_dir() isn't wrapped in
#ifdefs, and don't set bad_chr to TRUE when we get a null byte in a
multibyte string, as it's not an invalid multibyte character


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2316 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2005-02-11 20:09:11 +00:00
David Lawrence Ramsey 54dca7b7b3 revert diralphasort() tweak
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2314 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2005-02-11 16:02:54 +00:00
David Lawrence Ramsey 0df875a45d cosmetic fixes
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2313 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2005-02-10 02:26:08 +00:00
David Lawrence Ramsey d7ca85c86c add DB's overhauls of get_full_path() and check_writable_directory(),
plus a few tweaks of mine


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2312 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2005-02-09 18:56:21 +00:00
David Lawrence Ramsey d9661dc301 remove inaccurate comment
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2311 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2005-02-08 21:48:15 +00:00
David Lawrence Ramsey 65e6ecb1d4 add DB's pverhaul the tab completion code and a few related functions to
increase efficiency and support multibyte characters; also add a few
miscellaneous tweaks of mine


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2309 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2005-02-08 20:37:53 +00:00
David Lawrence Ramsey daa533a767 fix off-by-one error when calculating totsize in read_file(), introduced
when totsize was converted to hold the total number of multibyte
characters


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2308 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2005-02-07 05:31:51 +00:00
David Lawrence Ramsey 96de1b0650 cosmetic fix
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2303 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2005-01-27 21:00:10 +00:00
David Lawrence Ramsey 23c44504ad miscellaneous bits: change flags to an unsigned long and totsize to a
size_t, store the number of multibyte characters instead of the number
of single-byte characters in totsize, and add a few formatting fixes


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2302 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2005-01-27 20:49:07 +00:00
David Lawrence Ramsey f6e4d33afc tweak new_file() to use mallocstrcpy() instead of charalloc() followed
by a null character initialization, for consistency


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2264 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2005-01-14 17:17:11 +00:00
David Lawrence Ramsey b54155c4a4 massive updates to multibyte/wide character support; deal with multibyte
characters and strings instead of wide characters and strings as much as
possible, and move multibyte/wide character-specific functions into
their own source file, chars.c


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2248 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2005-01-12 03:25:57 +00:00
David Lawrence Ramsey c13b7f0699 overhaul the high-level input routines for the statusbar to make them
more flexible, among other things, and add UTF-8 support to them in the
process; also update the copyright years of the modified files


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2210 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2005-01-01 07:28:15 +00:00
David Lawrence Ramsey 3e81914b82 miscellaneous bits: fix the full justify segfault in a way that doesn't
break some normal full justifies, do a few more int -> bool conversions,
and fix a comment


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2209 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2004-12-31 04:10:28 +00:00
David Lawrence Ramsey 7483571f7f massive overhaul to support buffered input and output, the first steps
toward proper wide character input and output, etc.


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2157 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2004-12-04 17:41:52 +00:00
David Lawrence Ramsey 3ece0b9aeb change references to "open files" to "open file buffers" for
consistency, and add DB's changes to die() so that it works properly
with the overhauled multibuffer routines


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2153 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2004-12-01 15:11:27 +00:00
David Lawrence Ramsey 1483ee3db1 remove malfunctioning wide character support, and add a few
miscellaneous fixes


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2152 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2004-11-29 00:30:07 +00:00
David Lawrence Ramsey 63e73cbd14 comment fixes
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2151 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2004-11-28 04:52:57 +00:00