Commit Graph

140 Commits (f803ef5aeaf013f2de7c7651b6942e1d45d4769b)

Author SHA1 Message Date
Benno Schulenberg 00389928d4 Converting #ifdef ENABLE_COLOR to #ifndef DISABLE_COLOR.
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@4719 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2014-04-04 11:59:03 +00:00
Benno Schulenberg e4c34c3386 Adding, fixing, and removing some #endif comments.
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@4649 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2014-03-17 14:15:57 +00:00
Chris Allegretta b7a2dfb2da 2013-01-13 Chris Allegretta <chrisa@asty.org>
* src/utils.c (parse_num): Initalize errno before calling strtol().  Fixes issue
          where trying to go to a line number too long will break legitimate goto-lines
          for the remainder of the editing session, reported by Joshua Rogers.



git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@4563 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2013-01-13 08:37:54 +00:00
Chris Allegretta 8a07a96eef 2009-12-01 David Lawrence Ramsey <pooka109@gmail.com>
* Update documentation for 2.2 features including sample nanorc file, texinfo
          file, man pages, UPGRADE file, and update copyright noticed for the current year.



git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@4453 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2009-12-02 03:36:22 +00:00
Chris Allegretta 04fbfaae51 2009-02-08 Chris Allegretta <chrisa@asty.org>
* Add more multidata initliazers for new buffers and 'magic lines'.  Fixes segfaults
          with syntax highlighting in new buffers, initially reported by Mike Frysinger.



git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@4372 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2009-02-08 17:45:21 +00:00
Chris Allegretta ecc245ccca Fix comiplation issues with --enable-tiny --enable-nanorc (?!)
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@4361 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2009-02-01 00:04:42 +00:00
Chris Allegretta 6b83e5290c 2008-08-29 Chris Allegretta <chrisa@asty.org>
* configure.ac, color.c, rcfile.c, utils.c: 1st attempt at supporting systems which don't support
          GNU-style word boundaries.  New function fixbounds() to translate from GNU-style to
          BSD-style, autoconf option GNU_WORDBOUNDS.



git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@4315 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2008-08-30 05:16:20 +00:00
Chris Allegretta 599c559b3c GNU nano 2.1.3 release
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@4293 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2008-08-05 01:35:42 +00:00
Chris Allegretta ea577874ef - Add redo of an insert
- Fix bug in fsfromlineno
- Tiny cleanups in undo



git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@4292 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2008-08-03 20:19:42 +00:00
Chris Allegretta 14c8620e0b - Change add_undo and current_undo to only take action arg, as openfilestruct arg is always openfile
- Add ability to undo a file/cmd insert, needed to add undoable flag to read_file and open_buffer as a result



git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@4291 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2008-08-03 04:48:05 +00:00
David Lawrence Ramsey d8a1d37161 update copyright notices, as Chris Allegretta's copyrights have now been
assigned to the Free Software Foundation; also, make copyright notices
consistent in style


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@4173 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2007-10-11 05:01:32 +00:00
David Lawrence Ramsey c9694b7636 update copyright notices, as my copyrights have now been assigned to the
Free Software Foundation


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@4172 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2007-10-05 16:44:45 +00:00
David Lawrence Ramsey d0035b4ab2 convert to GPLv3 or later
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@4147 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2007-08-11 05:17:36 +00:00
David Lawrence Ramsey 84c6845591 comment fix
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@4145 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2007-08-10 22:07:14 +00:00
David Lawrence Ramsey 273c1139c0 simplify ngetdelim(), and update the copyright notice on ngetline() and
ngetdelim() to account for modifications


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@4144 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2007-08-10 17:03:29 +00:00
David Lawrence Ramsey 3305c11c7f typo fix
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@4139 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2007-08-07 18:37:39 +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 9d4b8fb434 still more comment fixes
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@3980 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2006-11-27 05:49:32 +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 e54f1c4eaa more comment fixes
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@3926 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2006-10-29 21:14:53 +00:00
David Lawrence Ramsey 5a22dbb159 in digits(), remove the assumption that n is always positive, although
it always is in this particular case


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@3842 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2006-08-18 20:30:25 +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 5c878088a1 in update_line(), remove unneeded assert, and now-unused function
check_linenumbers()


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@3676 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2006-06-21 16:54:51 +00:00
David Lawrence Ramsey a4fc77a5da in digits(), return the proper number of digits when n is exactly 10,
and simplify it to use a for loop instead of a while loop


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@3674 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2006-06-21 16:01:20 +00:00
David Lawrence Ramsey b5a7bbf4f3 remove the workaround for glibc 2.2.3's broken regexec(), and replace it
with a FAQ entry explaining the problem, since it could break anything
using extended regular expressions, and glibc 2.2.3 is old


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@3624 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2006-06-05 15:41:23 +00:00
David Lawrence Ramsey 497a9a2032 in ngetdelim(), set errno to EINVAL if stream is not a valid file
stream; this matches the manual page


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@3617 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2006-06-04 00:15:56 +00:00
David Lawrence Ramsey f70f67bd10 more miscellaneous minor fixes
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@3615 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2006-06-03 17:31:52 +00:00
David Lawrence Ramsey b0588ae45e more comment fixes
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@3351 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2006-04-05 16:58:45 +00:00
David Lawrence Ramsey 76f9485b02 in ngetdelim(), do sanity checks manually again instead of in an assert,
and set errno to EINVAL as well as return -1 if they fail; this matches
the manual page


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@3262 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2006-01-09 03:23:29 +00:00
David Lawrence Ramsey 1e73bcfe29 fix inaccurate comment
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@3249 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2005-12-23 20:18:06 +00:00
David Lawrence Ramsey e57bd4993e in parse_line_column(), simplify parsing of the column number
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@3243 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2005-12-23 03:15:12 +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 26ebd35d54 in ngetdelim(), do sanity checks in an assert instead of checking them
manually and returning -1 if they fail


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@3232 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2005-11-30 19:33:56 +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 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 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