Commit Graph

72 Commits

Author SHA1 Message Date
christos d25337ac41 Coverity CID 4171: bp can be null if len == 0. So check for it anyway and
don't call memcpy unconditionally.
2006-09-27 19:58:00 +00:00
mrg 084c052803 quell GCC 4.1 uninitialised variable warnings.
XXX: we should audit the tree for which old ones are no longer needed
after getting the older compilers out of the tree..
2006-05-10 21:53:14 +00:00
rtr 880b6df674 avoid double fclose()
coverity 2577 / run 6
2006-03-19 05:01:48 +00:00
rtr d9da031351 remove ambiguity in evaluation of conditional expressions and avoid
double fclose().
coverity 2713 / run 6
2006-03-19 04:34:19 +00:00
aymeric 3b6dda9b52 the last revision introduced a bug in the handling of escape characters while
trying to correct a corner case. I will work on a final solution later.
Thanks to David Brownlee for noticing and notifying me.
2005-10-16 15:58:59 +00:00
aymeric e6da8880e8 bump for latest changes:
. reintroduce ^V as a valid quoting character
. don't swallow quoting characters which are not followed by anything
2005-10-08 13:02:32 +00:00
aymeric ca7788ba21 accept ^V again as a quoting character. At least one person uses it. (hi abs!)
While there, fix a bug that would swallow a quoting character if it were the
last one.
2005-10-08 12:41:48 +00:00
aymeric 7107bc131e remove the hack that changed backslaches to ^V's when the command is "set" (!).
Now backslashes are understood by argv_exp3().
2005-10-08 12:38:45 +00:00
aymeric 377bb2d9d8 bump to nb15:
. we now handle ^C correctly in all cases
. blanks and alnum chars are ignored in the shellmeta option, as the code
  brokenly said it should
. \ can be used to escape any (special) character in file names
2005-09-06 21:54:10 +00:00
aymeric 44208cd8f1 In argv_exp3() where we cut a line into args, check for '\' as the escape
character instead of using the IS_ESCAPE() macro which tests for ^V because the
former is mandated by the standards, and the latter is insane.
This is a very small part in addressing PR bin/26046 by lukem@.
Before, in order to escape a special character, you had to use a literal ^V,
which is type ^V twice before the character; whereas now, you use \.
Because the fix will remain partial for a while, you have to remove \ from
your shellmeta option otherwise the \ is swallowed by the invoked shell that
handles arguments expansion.
Please complain if you want ^V^V to also work, but please don't call me a
heretic.
2005-09-06 21:50:51 +00:00
aymeric 3065f3379c From code inspection, nvi had the undocumented and non-working functionality
of ignoring alphanumerical and blank characters from the shellmeta option.
The former code was using a character pointed to by a pointer as a boolean
to check whether to enable this functionality, but in the meantime the pointer
was used for something else. Introduce a variable for this boolean so that
the functionality actually works.
2005-09-06 21:36:10 +00:00
he 95094319c5 Initialize a local variable to appease -Wuninitialized.
Marked with XXXGCC for dreamcast (found while compiling for it).

Reviewed by lukem.
2005-06-07 13:36:28 +00:00
he cabcbc12ed Initialize a local variable to appease -Wuninitialized.
Marked with XXXGCC for sun2 (found while compiling for it).

Reviewed by lukem.
2005-06-07 13:34:10 +00:00
lukem d687f4502c appease gcc -Wuninitialized 2005-06-02 04:59:17 +00:00
lukem 8125c19da2 appease gcc -Wuninitialized.
Each is marked with XXXGCC, because in some cases it looks like gcc
isn't correctly detecting that
	for ( ; xxx ; yyy)
		foo = 0;
always sets foo ...
2005-06-02 04:25:16 +00:00
lukem 00cf2c1ca4 Don't attempt to dereference an uninitialized pointer when an error
occurs in gtags parsing.   For that matter, remove the unused 'tftp'
and 'echk' variable, as they're set but not used afterwards.
Detected with gcc -Wuninitialized.
2005-06-02 03:51:14 +00:00
aymeric a3c4465703 Fix the RCSID's to be $NetBSD$ instead of $NetBSD 2005-02-12 12:53:22 +00:00
aymeric 0339e1e087 bump version: coredump fixed when autocompleting a filename wider than screen 2004-11-23 14:36:50 +00:00
dsl b7cb013096 Add (unsigned char) cast to ctype functions 2004-11-05 19:50:12 +00:00
aymeric 64c877a4e9 bump: bin/25849 fixed. "rapid resize can crash vi" 2004-06-13 10:17:14 +00:00
aymeric adf0b1c6ca bump for latest bug fix: flush the cached line on every DB operation 2004-05-02 17:01:53 +00:00
aymeric 263ab3f13d bump version: failed recovery doesn't prevent edition anymore 2004-04-05 07:22:39 +00:00
wiz e3fc4b66c3 Spell the plural of suffix "suffixes", not "suffices".
Inspired by PR 24400 by Todd Vierling.
2004-02-13 17:56:17 +00:00
erh ac765b1532 PR# bin/22736: Allow unsorted tags file to work. If the initial binary
search fails to find a matching tag in any of the tags files, try a full
linear search.
2003-09-09 21:03:15 +00:00
dsl 68b9f13602 Bump for inclusion of :set matchars 2003-08-28 05:00:09 +00:00
aymeric 36f363a1cc bump to nb9 after fixing PR#21797.
"flooding nvi['s insert mode] leads it to dump core"
2003-06-06 08:09:38 +00:00
aymeric c11faf9eec bump version.
":cs add" works when using a database file in the current directory, whichever
way we specify its name.
2003-01-20 16:13:26 +00:00
aymeric 5ca712061a . Don't call terminate() after read_prompt() failed.
Fixes memory re-use after free().
. Fake a directory name of "." if given a path without '/'.
	This makes ":cs add cscope.out" work, and behave like ":cs add ."
2003-01-20 16:10:51 +00:00
wiz 1035faff1d writable, not writeable. 2003-01-06 20:30:28 +00:00
thorpej 7b3d93e318 Avoid a strict alias warning. 2002-12-06 03:24:42 +00:00
pooka eaf1f18146 Bump to nb7 after fixing FreeBSD PR #12801 (again) in a way which hopefully
doesn't have adverse side-effects.
2002-04-15 08:37:04 +00:00
thorpej 7f192498d4 Use __RCSID() and __COPYRIGHT(). 2002-04-09 01:47:30 +00:00
pooka 69d4c677a2 bump version to nb6 after fixing bin/15474 2002-02-11 19:52:00 +00:00
aymeric 87c2d396bf Fixed FreeBSD PR #12801, the way nvi 1.81.5 did it.
(vi dumped core when editing a new file after having edited another one)
affects common/exf.c
2002-01-13 11:59:23 +00:00
thorpej 3d561f4807 Avoid an "operation on foo may be undefined" warning (gcc 3.1). 2001-12-31 18:53:32 +00:00
aymeric 8547d02861 FreeBSD PR#23912 fixed by applying a patch from nvi 1.81.x
"underflow of cnt in vs_paint() by O_NUMBER_LENGTH when both leftright and
 number options in use"
2001-12-13 20:53:47 +00:00
aymeric 41fdc533eb bump version after fixing a bug introduced in 1.79nb2 2001-10-20 10:11:41 +00:00
aymeric be5a16fc47 Fix a cut_line() caller not using the right value for (former) ENTIRE_LINE,
by defining the (newer) CUT_LINE_TO_EOL define in common/cut.h and using it
where due.

Bug reported on current-users by Masanori Kanaoka <kanaoka@ann.hi-ho.ne.jp>
diagnosed by Bang Jun-Young <bjy@mogua.org>,
quick-fixed by Robert Elz <kre@munnari.OZ.AU>.
2001-10-20 10:04:49 +00:00
yamt f8835551fd fix format string bugs.
pointed by Tomoaki IMAMURA in PR/14271.
2001-10-17 07:38:48 +00:00
aymeric 4fa1ec90e5 bump to nb2 after fixing PR #10367 and correcting another related bug 2001-09-09 11:04:23 +00:00
aymeric 8ac7d728a3 Change nvi version from 1.79 to 1.79nb1
This added version number will help us for future bug reports
2001-08-28 07:36:42 +00:00
windsor 28090d7359 recent addition of -Wall to Makefile broke the build on some arch
remove warnings on /sparc (through typecasting)
2001-05-02 21:15:19 +00:00
aymeric 52117b75a3 shutup most (non-intrusive) gcc warnings 2001-05-01 16:46:11 +00:00
aymeric 414f14c52d merge changes after import of nvi 1.79 2001-03-31 11:37:44 +00:00
aymeric 0ec35fe298 Don't dump core when a ``bad address'' error occurs and there is neither
a file nor a command underlying it.
This fixes PR #11543.
2001-01-14 02:22:29 +00:00
tv 17b67bd091 Fix %l[du] formats that have int arguments on ILP32; might break LP64. 2000-10-18 01:42:05 +00:00
thorpej ec185ae25b Fix a format string goof. 2000-10-11 19:28:43 +00:00
is 135600f947 More format string cleanup by sommerfeld. 2000-10-11 14:46:00 +00:00
jdc 4a3a422fde Handle xterm's alternate screen when entering or leaving ex mode, e.g.
":!ls", so that the screen is not changed before the "Press any key"
message.  Taken from v1.79.
2000-05-31 19:49:23 +00:00
christos aab07b7582 Don't depend on BSD regexec extensions (REG_STARTEND)
Emulate it if it is not defined.
2000-03-17 02:23:17 +00:00