Commit Graph

111 Commits (a0043340247319d92085a89ad1a4228eef028652)

Author SHA1 Message Date
David Lawrence Ramsey a004334024 fix breakage
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@3609 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2006-06-01 19:54:14 +00:00
David Lawrence Ramsey 8d2d0d9a11 in various functions in rcfile.c, add quotes around invalid string
arguments in error messages, for consistency; also, move
color_to_short() dowm so that it's near parse_colors(), for consistency


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@3593 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2006-05-28 19:00:16 +00:00
David Lawrence Ramsey 8602fd6aaa typo fixes
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@3591 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2006-05-28 18:43:21 +00:00
David Lawrence Ramsey f4cf5edd06 error message improvements
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@3577 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2006-05-26 17:06:05 +00:00
David Lawrence Ramsey 5566e442b1 in parse_rcfile(), properly handle rcfiles that don't end in newlines
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@3576 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2006-05-26 13:49:00 +00:00
David Lawrence Ramsey db39a5e80d in parse_rcfile(), change variable i from an int to a size_t, for
consistency


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@3575 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2006-05-26 13:38:49 +00:00
David Lawrence Ramsey 558d34f5ba handle all syntaxes without associated colors in parse_rcfile()
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@3574 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2006-05-26 13:27:28 +00:00
David Lawrence Ramsey 0b4920adc9 in parse_rcfile(), properly generate an error if we've read in a syntax
without any associated color command


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@3573 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2006-05-26 12:56:30 +00:00
David Lawrence Ramsey 39b7189a13 in parse_syntax(), don't generate an error if we find a duplicate syntax
name, since we might be trying to override a syntax in the global nanorc
with one in our local nanorc; instead, free any duplicate syntaxes we
find, so that we always use the last syntax with a given name


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@3382 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2006-04-15 16:02:02 +00:00
David Lawrence Ramsey a33ec1deff in parse_syntax(), properly generate an error if we've read in a
previous syntax without any associated color commands


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@3377 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2006-04-14 17:20:53 +00:00
David Lawrence Ramsey 33619f1ac5 another error message consistency fix
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@3376 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2006-04-13 14:09:45 +00:00
David Lawrence Ramsey cee20e50c6 at long last, add the ability to use self-contained color syntaxes from
separate files, accessible in the nanorc via the "include" command


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@3372 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2006-04-13 02:43:54 +00:00
David Lawrence Ramsey 03ee332640 another comment fix
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@3371 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2006-04-12 22:03:47 +00:00
David Lawrence Ramsey f0134ea9b2 comment fix
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@3370 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2006-04-12 21:45:41 +00:00
David Lawrence Ramsey 5fac171c8b in do_rcfile(), check for the rcfile's being a directory or device file
and reject it if it is, for consistency with file handling elsewhere;
also remove SYSCONFDIR #ifdef, as SYSCONFDIR should always be set


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@3369 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2006-04-12 21:44:07 +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 5cbd990bf5 in parse_argument(), rename variable ptr_bak to ptr_save, for
consistency


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@3353 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2006-04-05 21:28:52 +00:00
David Lawrence Ramsey 979de2309b open all files in binary mode for consistency and robustness
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@3352 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2006-04-05 21:25:47 +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 d89617fb17 allow specifying matching bracket characters other than the default via
the "matchbrackets" rcfile option


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@3259 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2006-01-06 21:51:10 +00:00
David Lawrence Ramsey b0e04c0de3 a few last comment and consistency fixes
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@3238 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2005-12-08 07:24:54 +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 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 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 a0168ca896 add new -L/--nonewlines command line option, and new "nonewlines" rcfile
option, to control whether nano adds magiclines to the ends of files


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@3091 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2005-11-05 17:35:44 +00:00
David Lawrence Ramsey cf0efaab5d remove unneeded assert in do_rcfile()
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@3082 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2005-11-04 04:10:09 +00:00
David Lawrence Ramsey 4f03daff91 add new -W/--wordbounds command line option, and new "wordbounds" rcfile
option, to control whether the word movement functions treat punctuation
characters as part of a word


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2983 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2005-08-10 22:12:28 +00:00
David Lawrence Ramsey 057edf7384 readd the option to turn the keypad off by default from nano 1.2.x, with
a few tweaks


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2980 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2005-08-10 21:22:15 +00:00
David Lawrence Ramsey e796a7b5b9 formatting fixes
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2964 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2005-08-01 05:54:11 +00:00
David Lawrence Ramsey d152ad378b port over Brand Huntsman's reserved "none" syntax to counteract his
"default" syntax when necessary (the latter *is* actually ported mostly
from his patch with a few tweaks; the "default-syntax" option is
apparently something else entirely)


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2961 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2005-08-01 04:59:34 +00:00
David Lawrence Ramsey 5a584ccda3 treat color syntax names case sensitively, for consistency with how
their filename regexes are treated


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2960 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2005-08-01 04:34:27 +00:00
David Lawrence Ramsey 179b1bad87 more color updates: add a "default" syntax that takes no extensions for
those files that don't match any other syntax's extensions (ported from
Brand Huntsman's old patch, but modified to work with a syntax named
"default" instead of requiring a "default-syntax" keyword, and to fit
into the existing color architecture)


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2959 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2005-08-01 04:23:29 +00:00
David Lawrence Ramsey c879f55691 in parse_syntax(), flag duplicate syntax names as errors
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2952 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2005-07-30 21:53:05 +00:00
David Lawrence Ramsey 2385c1aa9b port over more of Brand Huntsman's old patch (with a few tweaks):
compile the file extension regexes on an as-needed basis too


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2948 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2005-07-29 21:42:08 +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 150d889965 make color_to_short() actually return a short
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2921 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2005-07-24 20:23:40 +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 e99494f21a add miscellaneous color and openfilestruct cleanups, and move the
openfilestruct functions to nano.c, since they're no longer specific to
file operations


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2903 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2005-07-20 21:08:38 +00:00
David Lawrence Ramsey d2361f0761 add minor fixes to the new color code, and merge parts of Brand
Huntsman's old patch in where applicable


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2858 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2005-07-14 18:33:51 +00:00
David Lawrence Ramsey db95802a18 add breakage fixes, type fixes, and as-needed color regex compilation
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2854 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2005-07-13 20:18:46 +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 23555f29ba add support for case insensitive expression matching when using color
syntax highlighting, via the "icolor" directive, and add it to those
regexes that can use it (ported from Brand Huntsman's old patch)


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2774 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2005-06-27 03:07:10 +00:00
David Lawrence Ramsey 3435a0ff64 rename the CONSTUPDATE flag to CONST_UPDATE, and clarify its description
in the help text


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2711 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2005-06-17 21:08:13 +00:00
David Lawrence Ramsey e29111f7ec add -U/--quickblank option, a Meta-U toggle, and a "quickblank" rcfile
option to blank the statusbar after 1 keystroke instead of 25; note that
this is disabled when NANO_SMALL is defined


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2709 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2005-06-17 19:06:25 +00:00
David Lawrence Ramsey 6399000a48 move all the rcfile options disabled by NANO_SMALL to the end, for
consistency with the long options in nano.c


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2708 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2005-06-17 19:01:00 +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 b2b6976bd9 change the SMOOTHSCROLL flag to the SMOOTH_SCROLL flag
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2692 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2005-06-16 02:13:10 +00:00
David Lawrence Ramsey 6f143c8124 add the ability to convert (non-verbatim input) typed tabs to spaces
using the -E/--tabstospaces command line options, the "tabstospaces"
rcfile option, and the toggle Meta-E; also, change the short command
line option for --backupdir from -E to -C


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2682 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2005-06-15 23:20:56 +00:00