Commit Graph

128 Commits (84763ef4737adc8a6863c1a64bf5e4436913d5f1)

Author SHA1 Message Date
David Lawrence Ramsey 84763ef473 cosmetic fix
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@4125 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2007-07-06 13:38:20 +00:00
David Lawrence Ramsey 710583064f in nstrcasestr(), mbstrcasestr(), revstrstr(), revstrcasestr(), and
mbrevstrcasestr(), for efficiency, return haystack immediately if needle
is blank


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@4122 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2007-07-02 15:45:13 +00:00
David Lawrence Ramsey 444f802d58 in nstrncasecmp() and mbstrncasecmp(), for efficiency, return zero
immediately if s1 and s2 point to the same string


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@4121 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2007-07-01 21:46:00 +00:00
David Lawrence Ramsey 10442330bf cosmetic fixes
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@4119 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2007-07-01 21:17:05 +00:00
David Lawrence Ramsey be27ba45d5 still more cosmetic fixes
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@4100 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2007-04-23 14:03:28 +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 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 458e850b83 more cosmetic copyright notice fixes
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@3951 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2006-11-10 02:49:07 +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 89ae4a343c miscellaneous minor fixes
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@3898 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2006-10-08 15:21:23 +00:00
David Lawrence Ramsey ad344e9d1d make bad_mbchar a static const char* const in chars.c, as its value
doesn't change


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@3823 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2006-07-29 14:37:47 +00:00
David Lawrence Ramsey 006fc2338c typo fixes
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@3804 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2006-07-22 16:50:17 +00:00
David Lawrence Ramsey 118cb37e63 in mbstrncasecmp(), mbstrcasestr(), and mbrevstrcasestr(), don't
allocate space for multibyte characters until we've asserted that the
parameters we're using aren't NULL


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@3803 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2006-07-22 16:45:11 +00:00
David Lawrence Ramsey 8e341e1b22 ignore unhandled meta key sequences and escape sequences, and indicate
it on the statusbar when we get an unhandled shortcut or toggle, as Pico
does


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@3554 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2006-05-24 17:36:00 +00:00
David Lawrence Ramsey c0899cb8eb remove unneeded blank line
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@3533 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2006-05-20 17:29:14 +00:00
David Lawrence Ramsey 4d72de73b1 add the ability to use bold text instead of reverse video text, via the
-D/--boldtext command line option and the "boldtext" rcfile option, and
reduce USE_UTF8 to a static bool in chars.c


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@3368 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2006-04-12 15:27:40 +00:00
David Lawrence Ramsey 66d3ebf6a6 fix potential infinite loop in mbrevstrpbrk()
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@3270 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2006-02-02 22:30:40 +00:00
David Lawrence Ramsey 1a16df9284 fix "matchbrackets" breakage
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@3260 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2006-01-06 22:04:38 +00:00
David Lawrence Ramsey a248863b43 rework the bracket searching code to handle multibyte bracket characters
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@3258 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2006-01-06 07:10:30 +00:00
David Lawrence Ramsey 5978f9b11d in mbstrchr(), make parameter c const
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@3257 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2006-01-06 05:54:44 +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 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