Commit Graph

58 Commits (d1323e4e3502b3cb1b70170ddee6a0e36866c38c)

Author SHA1 Message Date
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
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 789867b6a0 comment fix
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2661 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2005-06-14 04:22:32 +00:00
David Lawrence Ramsey 6209e0eb15 yet *another* cleanup
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2658 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2005-06-14 02:08:25 +00:00
David Lawrence Ramsey e534aae701 comment fix
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2657 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2005-06-14 02:03:56 +00:00
David Lawrence Ramsey d5d4dde1eb improve detection of blank characters in the "punct" and "brackets"
rcfile options


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2656 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2005-06-14 01:55:56 +00:00
David Lawrence Ramsey 42af2216fe yet another cleanup
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2655 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2005-06-13 20:19:03 +00:00
David Lawrence Ramsey 356d2482c5 nisw?blank() should return int, not bool, to match isblank()
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2654 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2005-06-13 19:51:56 +00:00
David Lawrence Ramsey b300af3f63 simplify is_valid_mbstring() by making it use mbstowcs()
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2651 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2005-06-13 15:56:29 +00:00
David Lawrence Ramsey 30d0a81656 don't work around invalid multibyte sequences in rcfile options anymore,
but generate errors


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2650 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2005-06-13 14:50:32 +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 7b601fdbe1 still more cleanups to chars.c and related code
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2648 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2005-06-13 13:25:36 +00:00
David Lawrence Ramsey f26d386191 simplify the word detection code
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2641 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2005-06-13 02:48:52 +00:00
David Lawrence Ramsey 67287088dc detect words more accurately by taking punctuation into account, and
convert all word-detecting functions to use the same wrapper function
for ease of maintenance


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2640 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2005-06-13 02:40:04 +00:00
David Lawrence Ramsey 19462616d4 one last cleanup to chars.c
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2632 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2005-06-12 18:05:42 +00:00
David Lawrence Ramsey d8640480c3 various cleanups to chars.c and related code
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2631 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2005-06-12 17:48:46 +00:00
David Lawrence Ramsey 8767da4e63 comment fix
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2625 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2005-06-12 02:14:48 +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 3925bdafda fix erroneous #ifdef that caused a compilation problem when
--enable-nanorc wasn't used and --enable-extra was, and make sure we put
back the keystroke that breaks us out of the credits (if any)


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2607 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2005-06-07 03:20:35 +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 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 5f3695bdb5 in make_mbchar(), remove an unneeded assert
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2430 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2005-03-26 06:54:36 +00:00
David Lawrence Ramsey 263b447323 per Mike Frysinger's patch, in move_mbleft(), fix assert to reference
the proper variable, so that nano builds with DEBUG defined again


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2422 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2005-03-23 05:56:11 +00:00
David Lawrence Ramsey adc30a839b put the old #defined aliases for strcasecmp(), strncasecmp(),
strcasestr(), and strnlen() back with the #defined aliases for getline()
and getdelim(), as they make things simpler


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2401 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2005-03-20 07:24:49 +00:00
David Lawrence Ramsey efec641a82 control characters can only be properly filtered out in both non-UTF-8
and UTF-8 mode inside the output routines, so do it there instead of
inside the input routines


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2382 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2005-03-17 03:52:08 +00:00
David Lawrence Ramsey 40ea2a2ea0 actually, we can swallow non-ASCII control characters if we're not in
UTF-8 mode


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2379 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2005-03-16 16:32:33 +00:00
David Lawrence Ramsey 496488c5d2 when getting printable input from the edit window or statusbar prompt,
don't swallow non-ASCII control characters, since they're parts of UTF-8
sequences


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2378 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2005-03-16 15:34:22 +00:00
David Lawrence Ramsey 631242dd96 a few last minor fixes to do_credits()
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2374 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2005-03-15 07:06:54 +00:00
David Lawrence Ramsey 0099a8f45c fix potential memory corruption problem in make_mbstring(), and also fix
compilation with -pedantic


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2372 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2005-03-15 06:34:09 +00:00
David Lawrence Ramsey 38156d4491 make the rest of the justify code support multibyte characters
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2371 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2005-03-15 05:44:03 +00:00
David Lawrence Ramsey 7d7e7d58ad fix erroneous #ifdef
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2367 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2005-03-14 18:54:33 +00:00
David Lawrence Ramsey f0195a8839 make sure all rcfile arguments are valid multibyte strings
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2366 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2005-03-14 18:47:21 +00:00
David Lawrence Ramsey e0fb4d5641 improve the handling of whitespace display mode in multibyte locales:
use new function make_mbstring() instead of display_string() to make
sure the multibyte string is valid and interpreted properly


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2348 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2005-03-11 04:03:32 +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 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 0b80f936bf add missing #ifdef
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2310 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2005-02-08 20:39:28 +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 3f9c63589e turn string functions that don't take length arguments into wrappers for
the versions that take length arguments, add multibyte equivalent of
strlen(), and fix potential segfault in mbstrnlen()


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2300 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2005-01-25 19:21:11 +00:00
David Lawrence Ramsey 3e93c63e60 comment fixes
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2298 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2005-01-24 14:57:57 +00:00
David Lawrence Ramsey 83ba47a964 add another cleanup
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2297 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2005-01-24 01:21:09 +00:00
David Lawrence Ramsey 345260c624 add multibyte version of revstrcasestr()
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2296 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2005-01-24 01:14:17 +00:00
David Lawrence Ramsey 3ee4cf3027 cosmetic and formatting fixes
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2295 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2005-01-22 20:49:14 +00:00
David Lawrence Ramsey 17b8a36d17 rename a variable in the strcasestr() equivalent order to match DB's
original cleanup of it, and port the change to the multibyte version too


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2294 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2005-01-22 19:56:16 +00:00
David Lawrence Ramsey 42abfe057e add multibyte equivalent of strcasestr(), plus some miscellaneous
cleanups


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2293 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2005-01-22 18:24:16 +00:00
David Lawrence Ramsey 21954765ca reorganization: move revstrstr() back to chars.c, and move is_byte()
there too, since they both deal with strings and hence characters


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2286 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2005-01-18 17:00:00 +00:00
David Lawrence Ramsey 65658ef574 make sure the multibyte string operations operate using multibyte
character counts instead of byte character counts


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2280 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2005-01-16 20:05:36 +00:00
David Lawrence Ramsey 18d616f253 put revstrstr() back in utils.c, as it's case sensitive and hance should
work with multibyte strings as-is


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2279 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2005-01-16 19:30:48 +00:00
David Lawrence Ramsey c5e21dafb7 assert fixes
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2278 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2005-01-16 18:58:03 +00:00
David Lawrence Ramsey 3a1fc8f0ab start making multibyte equivalents of the string functions in utils.c
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2277 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2005-01-16 18:49:19 +00:00