Commit Graph

107 Commits (8befda6490c40a03270d08224d454a304741ce0d)

Author SHA1 Message Date
David Lawrence Ramsey 13b6115894 update the Free Software Foundation's address as needed in the copyright
notices taken from other sources


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@3231 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2005-11-30 18:57:05 +00:00
David Lawrence Ramsey 783062a0cc cosmetic fix
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@3230 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2005-11-30 16:41:54 +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 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 c5c5230b9d overhaul the bracket searching code so that it no longer requires regex
support to work, and add some miscellaneous search code cleanups


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@3183 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2005-11-15 23:45:29 +00:00
David Lawrence Ramsey bc8b7d74eb in mbstrchr(), detect the case where the character isn't found in the
string more accurately


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@3179 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2005-11-15 19:01:07 +00:00
David Lawrence Ramsey 9c92634388 cosmetic fix
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@3178 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2005-11-15 18:42: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 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 c0181c95ee cosmetic fix
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@3104 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2005-11-08 02:27:11 +00:00
David Lawrence Ramsey f1a717291b correction: in mbwidth(), use the width of Unicode U+FFFD (Replacement
Character) instead of hardcoding a width of one for unprintable
characters


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@3103 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2005-11-08 02:24:17 +00:00
David Lawrence Ramsey 4a8c9b6124 in mbwidth(), if wcwidth() returns -1 for the character passed in, treat
the character as being one column wide instead of zero columns wide,
since there are display problems that crop up with the latter approach


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@3102 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2005-11-08 02:20:22 +00:00
David Lawrence Ramsey 069674c2d5 comment fix
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@3101 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2005-11-08 02:07:13 +00:00
David Lawrence Ramsey 23bdb27155 comment fixes
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@3019 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2005-09-14 20:20:58 +00:00
David Lawrence Ramsey 3c4dc46fdc in (control_)?mbrep(), 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


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@3018 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2005-09-14 19:17:56 +00:00
David Lawrence Ramsey 79d9795c80 make is_valid_unicode() catch more invalid Unicode
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@3003 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2005-08-28 03:07:13 +00:00
David Lawrence Ramsey 85ea1de1c7 cosmetic fixes
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2988 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2005-08-13 20:05:06 +00:00
David Lawrence Ramsey 4fde119362 for consistency, display high-bit single-byte control characters as Unicode FFFD in UTF-8 mode
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2987 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2005-08-13 19:54:40 +00:00
David Lawrence Ramsey 8c7a562394 cover the full range of Unicode
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2978 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2005-08-08 23:47:28 +00:00
David Lawrence Ramsey 8b006c2912 store Unicode values in longs instead of ints
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2977 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2005-08-08 23:03:25 +00:00
David Lawrence Ramsey 6ff695c154 even better handling of invalid Unicode characters
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2975 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2005-08-05 03:14:29 +00:00
David Lawrence Ramsey 71dd8c1ca6 don't allow entering invalid Unicode in make_mbchar() either
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2974 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2005-08-04 21:38:41 +00:00
David Lawrence Ramsey 8c55d21bd6 add better handling of invalid Unicode, plus a few miscellaneous minor
fixes


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2973 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2005-08-04 20:24:26 +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 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 61f567378a display invalid multibyte sequences as Unicode FFFD, take 2; also clean
up the character-parsing functions


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2909 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2005-07-21 22:12:03 +00:00
David Lawrence Ramsey 66444c37b3 more function reordering
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2908 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2005-07-21 18:05:27 +00:00
David Lawrence Ramsey e3bae98aab in mbstrchr(), don't count matches between valid and invalid multibyte
sequences anymore, for consistency


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2894 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2005-07-18 19:47:13 +00:00
David Lawrence Ramsey 91d468d7fd for consistency, revert handling of cases where a search string and a
match to it are not the same length in bytes, since the same technique
can't be made to work with tab completion matches


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2893 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2005-07-18 19:29:27 +00:00
David Lawrence Ramsey a0aa4df041 properly handle cases where a search string and a match to it are not
the same length in bytes, i.e, when the latter contains invalid
multibyte characters interpreted as normal characters


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2888 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2005-07-18 05:17:59 +00:00
David Lawrence Ramsey 7eb30a8353 change NANO_WIDE #define to ENABLE_UTF8, as the latter is clearer
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2881 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2005-07-17 02:40:07 +00:00
David Lawrence Ramsey 8f4762a842 cosmetic and #ifdef fixes
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2874 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2005-07-16 22:35:11 +00:00
David Lawrence Ramsey 1aee5cc599 more int -> bool conversions
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2796 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2005-06-29 18:17:54 +00:00
David Lawrence Ramsey 9905b6ae74 rework the credits handling to display Florian König's name properly
whether we're in a UTF-8 locale or not.  This requires a minor hack, but
it's better than requiring a massive function that we only use once


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2784 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2005-06-28 07:26:11 +00:00
David Lawrence Ramsey b2ca88cc74 more cosmetic fixes
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2759 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2005-06-22 02:31:12 +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 8d0fb01ff2 comment fix
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2739 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2005-06-20 21:17:01 +00:00
David Lawrence Ramsey d7cf373358 typo fix
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2738 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2005-06-20 21:03:57 +00:00
David Lawrence Ramsey e0a0d23f78 remove unnecessary variables from and add missing asserts to
control_mbrep()


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2737 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2005-06-20 20:58:41 +00:00
David Lawrence Ramsey 7098ec233c n is ignored in the mbstowcs() call, so it can be 0 instead of
(size_t)-1


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2721 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2005-06-18 05:15:08 +00:00
David Lawrence Ramsey a9a3f4f599 fix compilation with --enable-debug
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2696 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2005-06-16 12:17:23 +00:00
David Lawrence Ramsey 7a4aaa53a1 change the NO_UTF8 flag to the USE_UTF8 flag, and reverse its meaning
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2691 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2005-06-16 02:09:57 +00:00
David Lawrence Ramsey 77d0feae05 cosmetic fix
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2690 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2005-06-16 01:56:51 +00:00
David Lawrence Ramsey ed7ad33802 change wint_t's back to wchar_t's to fix compilation on Mac OS 10.4.1
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2676 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2005-06-15 16:07:14 +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 2515ccc0a0 *more* cleanups to chars.c and related code
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2669 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2005-06-15 06:04:08 +00:00
David Lawrence Ramsey e221311f2e don't count punctuation when searching for a whole word in
is_whole_word()


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2666 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2005-06-15 03:03:45 +00:00