Commit Graph

153 Commits (3e7591f53479284a535373ca4fb02b4788a1b035)

Author SHA1 Message Date
David Lawrence Ramsey 8dec783333 comment fixes
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@3199 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2005-11-17 04:13:01 +00:00
David Lawrence Ramsey cf9c34acef only include code related to whole word searches when DISABLE_SPELLER
isn't defined, as only the internal spell checker uses it


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@3190 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2005-11-16 05:59:06 +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 a1064d4279 for functions originally adapted from other sources, invoke LGPL clause
3 to convert all LGPLed functions to GPLed ones, so that we don't have
to include a copy of the LGPL


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@3173 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2005-11-14 23:02: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 fb0c3f85de in get_page_start(), fix test so that we scroll through the line in
8-character chunks when COLS is greater than 8, not when COLS is greater
than 9


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@3166 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2005-11-12 05:20:14 +00:00
David Lawrence Ramsey e99223dd25 tweak do_wrap(), remove_magicline(), edit_scroll(), and edit_update() to
rely on fileage and filebot instead of NULL for their checks to detect
the top or bottom of the file


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@3143 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2005-11-10 04:27:30 +00:00
David Lawrence Ramsey 00cc565ddd move check_linenumbers(), dump_buffer(), and dump_buffer_reverse() from
winio.c to utils.c too


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@3076 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2005-11-02 15:44:01 +00:00
David Lawrence Ramsey 2b9d6a0e6c move get_page_start() from winio.c to utils.c too, and fix a few
comments


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@3066 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2005-11-01 17:45:31 +00:00
David Lawrence Ramsey 81c4e187f5 move xplustabs(), actual_x(), strnlenpt(), and strlenpt() from winio.c
to utils.c, as they're really utility functions


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@3064 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2005-10-31 23:07:58 +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 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 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 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 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 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 0227ccca7c formatting fixes
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2727 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2005-06-18 17:20:54 +00:00
David Lawrence Ramsey f3ecffd24d add the "regexp" rcfile option back in at DB's suggestion, the
"casesensitive" and "backwards" rcfile options for consistency,
documentation updates, and related cleanups


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2700 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2005-06-16 18:48:30 +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 746214d5aa make parse_line_column() consistent with the color regex-parsing code
and go back to returning an error on strings like "3,"


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2617 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2005-06-08 21:16:14 +00:00
David Lawrence Ramsey 810d02c6a4 add const
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2597 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2005-06-06 01:53:48 +00:00
David Lawrence Ramsey f99acbf29a make parse_line_column() more consistent: don't return an error on
strings like "3," since we don't return one on strings like ",3"


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2596 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2005-06-05 23:12:18 +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 9245f97960 more LINE,COLUMN-related work: fix problems parsing it, and allow it at
the (soon-to-be-renamed) "Go to Line" prompt


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2522 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2005-05-17 18:06:26 +00:00
David Lawrence Ramsey c5659d320e add error detection to parse_line_column()
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2519 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2005-05-17 00:25:50 +00:00
David Lawrence Ramsey 2f0cd35322 add missing comment
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2518 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2005-05-16 23:33:53 +00:00
David Lawrence Ramsey b68c01b753 move duplicate code from the +LINE,COLUMN feature into a separate
function, parse_line_column()


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2517 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2005-05-16 23:23:15 +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 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 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 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 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 00762ffaeb add comment
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2455 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2005-04-08 20:06:08 +00:00
David Lawrence Ramsey 050b13ae5d cosmetic fixes
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2439 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2005-03-29 23:10:20 +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 afbcf68c1a more cosmetic fixes
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2409 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2005-03-21 06:33:41 +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 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 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 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 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 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 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
David Lawrence Ramsey d24fbb760d rename move_left() and move_right() to move_mbleft() and move_mbright(),
and move them to chars.c


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2270 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2005-01-14 21:50:32 +00:00
David Lawrence Ramsey 9b95ca8c29 minor fixes involving is_byte()
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2262 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2005-01-14 06:02:10 +00:00
David Lawrence Ramsey 5508cc5b0a move nstrnlen() to chars.c, and add a multibyte equivalent of strnlen()
to it


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2259 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2005-01-14 04:22:14 +00:00
David Lawrence Ramsey 116c828c50 add asserts, plus a few more cosmetic fixes
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2257 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2005-01-14 03:22:54 +00:00
David Lawrence Ramsey 78dadd4550 cosmetic fixes
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2256 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2005-01-13 15:24:05 +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 d96851f534 miscellaneous cleanups for the multibyte parsing functions
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2242 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2005-01-07 22:39:43 +00:00
David Lawrence Ramsey 1307aae01a minor utility tweaks
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2240 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2005-01-07 19:02:47 +00:00
David Lawrence Ramsey 956da0d0e1 miscellaneous fixes: skip over invalid wide characters, and if wcwidth()
returns -1, don't add its value to any column counter; also update
another copyright year


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2219 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2005-01-03 06:56:38 +00:00
David Lawrence Ramsey 0d847aadd9 handle wctomb() failure in parse_char() too
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2208 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2004-12-29 22:05:02 +00:00
David Lawrence Ramsey 93c4a5656b #ifdef fixes
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2195 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2004-12-23 21:32:27 +00:00
David Lawrence Ramsey fc693210d5 more steps toward UTF-8 support: port all the parts of DB's UTF-8 patch
that I currently understand to current CVS, with modifications of mine
to autodetect UTF-8 support and to display multibyte strings instead of
wide strings


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2193 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2004-12-23 17:43:27 +00:00
David Lawrence Ramsey 32085a88e8 cosmetic fixes
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2176 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2004-12-08 04:00:26 +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 40a6c8cb64 more formatting fixes
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2147 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2004-11-27 21:10:11 +00:00
David Lawrence Ramsey 93c8405bfa overhaul the cutting and uncutting routines and the justify-related
routines to back up and restore unjustified text to use the partitioning
code, as it greatly simplifies how they work; also back up and restore
unjustified text in its own buffer instead of the cutbuffer, and add a
few minor bug fixes to the overhauled routines


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2124 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2004-11-23 04:08:28 +00:00
David Lawrence Ramsey 3f35864b10 fix get_totals() so it properly handles NULL parameters, and restore
totlines after marked spell-check the way the justify routine does
instead of saving it and readding it later


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2118 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2004-11-22 16:04:18 +00:00
Jordi Mallach 55381aa614 Include <config.h> only if HAVE_CONFIG_H.
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2107 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2004-11-17 23:17:05 +00:00
David Lawrence Ramsey 8ae06a86b8 comment update
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2078 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2004-11-07 01:26:39 +00:00
David Lawrence Ramsey 29f446ec40 don't let remove_magicline() remove the magicline if it's the only line
in the file


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2077 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2004-11-07 01:22:20 +00:00
David Lawrence Ramsey 90e59c1a18 when doing marked spell-check, properly handle the case where the mark
ends in the middle of a word and that word is spell-checked; also move
the logic to detect an upside-down mark to mark_order() instead of using
the same logic in three different places, and rename a few variables for
consistency


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2070 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2004-11-05 23:03:03 +00:00
David Lawrence Ramsey 40bdb686aa add code to partition a filestruct between a set of arbitrary
coordinates; given the coordinates of the beginning and end of the mark,
this allows proper and easier handling of saving marked selections,
replacing text only in marked selections, and spell-checking marked
selections using either the internal or alternate spell checker; do all
these using a global partition structure


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2050 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2004-11-03 22:03:41 +00:00
David Lawrence Ramsey 6d9aa085d1 cosmetic fixes
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2047 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2004-11-03 14:58:04 +00:00
David Lawrence Ramsey 4a1fc558cf add new function mallocstrncpy()
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2045 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2004-11-02 15:18:30 +00:00
David Lawrence Ramsey 6a715b69a7 comment fix
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2013 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2004-10-22 16:11:55 +00:00
David Lawrence Ramsey cbc13a2a62 add missing line
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@1999 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2004-10-18 02:17:18 +00:00
David Lawrence Ramsey 381d483986 help text updates, and a few more miscellaneous fixes
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@1996 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2004-10-18 01:51:43 +00:00
David Lawrence Ramsey 6be5339265 more minor cosmetic fixes
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@1995 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2004-10-16 15:41:57 +00:00
David Lawrence Ramsey 4b7e3c3efa minor cleanups
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@1992 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2004-10-15 16:25:56 +00:00
David Lawrence Ramsey f3b10e8e05 another comment fix
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@1976 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2004-10-08 20:37:44 +00:00
David Lawrence Ramsey 6b1c2adc86 comment fix
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@1975 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2004-10-08 20:34:53 +00:00
David Lawrence Ramsey 7cfea8bb8c in mark_order(), add check for MARK_ISSET's not being set; also make one
more int -> bool conversion and cosmetic fix


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@1974 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2004-10-08 15:35:33 +00:00
David Lawrence Ramsey 02517e0a0f add DB's overhaul of the file loading code to increase efficiency,
remove ugly workarounds for most cases of edittop's or current's being
NULL (as those cases no longer occur due to the overhaul), and remove
detection of binary files (since it wasn't always accurate and will only
cause problems when UTF-8 support is added); also add a few minor fixes
of mine


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@1928 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2004-09-05 21:40:31 +00:00
David Lawrence Ramsey a88347069c add missing #ifdefs
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@1905 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2004-08-17 20:34:57 +00:00
David Lawrence Ramsey 35fb55aba2 and add last missing bit
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@1904 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2004-08-17 19:28:54 +00:00
David Lawrence Ramsey c08368bd19 fix the last ngetdelim() tweak
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@1903 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2004-08-17 19:20:05 +00:00
David Lawrence Ramsey 95f3812db1 add a few last tweaks to ngetdelim()
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@1901 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2004-08-17 16:00:29 +00:00
David Lawrence Ramsey a27bd65057 per DB's patch, overhaul the rcfile and history file reading and writing
routines to fix a few fundamental problems and limitations; also add
getline() and getdelim() equivalents adapted from GNU mailutils 0.5 (and
tweaked to better integrate with nano), since the patch uses getline()


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@1900 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2004-08-17 05:23:38 +00:00
David Lawrence Ramsey 6420d445c2 add a bunch of DB's miscellaneous fixes, plus a few of mine
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@1890 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2004-08-11 05:13:08 +00:00
David Lawrence Ramsey c53ab2a854 tweak parse_num() to return a bool, and fix backwards test of its value
so that numeric values will be preserved when switching to the "Go To
Line" prompt again


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@1881 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2004-08-04 18:24:53 +00:00
David Lawrence Ramsey 4d44d2de0e make lastwastab and list use TRUE and FALSE instead of 1 and 0, make
them bools in the process, and make a few other minor cosmetic cleanups


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@1880 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2004-08-01 22:35:31 +00:00
David Lawrence Ramsey 49c3f2406d port over DB's number parsing code and related bits, with a few minor
changes of mine, and add a few related variable type changes


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@1853 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2004-07-12 16:07:14 +00:00
David Lawrence Ramsey f708037715 add another prototype fix and a few spacing fixes
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@1849 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2004-07-08 17:15:10 +00:00
David Lawrence Ramsey fa394047ba add DB's changes to titlebar() (with a few tweaks of mine) to make it
handle shorter screen widths better and display the filename using
display_string(), my strnlen() equivalent so the new titlebar() will
work on systems without strnlen(), and a few of DB's other minor changes
to make other display-related functions handle shorter screen widths
better, among other things


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@1754 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2004-05-23 21:11:14 +00:00
David Lawrence Ramsey 9830d7500f add isblank() equivalent and use it instead of checking for (tab or
space) all over the code, properly detect whether we have strcasestr()
and only use nstristr() if we don't, and bump up CVS build requirements
to account for setting _GNU_SOURCE when running the test programs for
both


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@1730 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2004-05-13 17:19:54 +00:00
David Lawrence Ramsey a3370c4232 miscellaneous fixes
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@1707 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2004-04-05 01:08:14 +00:00
David Lawrence Ramsey 6aec4b85e6 fix potential memory corruption problems caused by passing answer in as
the value of def in statusq(), etc.


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@1695 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2004-03-15 20:26:30 +00:00
David Lawrence Ramsey 58924035c8 minor comment fix
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@1690 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2004-03-08 19:53:11 +00:00
David Lawrence Ramsey 2a464cb07d fix error I made when porting over DB's refactored search code: the
strstr() call used in forward case-sensitive searches was using the
wrong variable, which made all such searches fail


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@1689 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2004-03-07 21:16:18 +00:00
David Lawrence Ramsey a7c9364641 clarify the description of -T/--tabsize a bit in usage(), and add extra
{}'s to sunder() and unsunder() to make them a bit easier to read


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@1662 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2004-02-25 03:19:29 +00:00
David Lawrence Ramsey 1044d74fd3 add DB's refactored search code and a few of his minor display code
changes, plus a few minor search and display fixes of mine


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@1660 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2004-02-24 20:41:39 +00:00
David Lawrence Ramsey f28f50e6b5 update the copyright years on the source files to 2004 (adding a few
minor comment tweaks so that all the source files are covered)


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@1613 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2004-01-09 23:04:55 +00:00
David Lawrence Ramsey e190ff30f2 find all beginning-of-line and/or end-of-line regexes once per line, not
just the zero-length ones; this fixes multiple replaces occurring with
them in conjunction with "*"


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@1608 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2004-01-03 21:42:25 +00:00