Commit Graph

233 Commits

Author SHA1 Message Date
simonb
7f2151a308 Fix previous Coverity "fix" so that it doesn't break vi completely. 2006-05-27 12:03:37 +00:00
agc
8b41108aee Clean up after the last fix. 2006-05-27 11:10:55 +00:00
jnemeth
6222f021a3 Coverity CID 3684: memory leak 2006-05-27 04:55:14 +00:00
jnemeth
243d02dab5 Coverity CID 3135: memory leak 2006-05-27 04:15:42 +00:00
christos
77d2f1cd19 XXX: GCC uninitialized 2006-05-14 03:05:47 +00:00
mrg
f145204eb2 XXX build with -Wno-pointer-sign and -fno-strict-aliasing when using GCC4. 2006-05-11 06:01:31 +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
739b734996 the preceeding loop does not terminate except in a condition where
kp != NULL therefore testing if kp is == NULL after it is pointless
coverity 2446 / run 6
2006-03-19 06:10:22 +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
aymeric
0eceae0438 Finally handle ^C the correct way. This indeed requires to separate the case
of text-recording input (usually text in insert mode) from the other cases
(e.g. ex command input). If recording, morph to escape key so that the input
is correctly finished for a potential replay; if not, simply bail out and
notify that something wrong occurs. Callers will cope.
The previous fix could make ^C sometimes produce a file completion
or a command edition, depending on the settings of the user.
I think this is the correct fix for since closed PR bin/11544 by pooka@. ;-)
2005-09-06 21:30:36 +00:00
aymeric
68d2948889 when reading an ex command within visual mode with v_tcmd(), check that
the termination value of v_tcmd() is alright. Abort the command otherwise.
Until the next commit in vi/v_txt.c, this is a noop.
2005-09-06 21:21:25 +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
he
136c962ff9 Initialize a local variable to appease -Wuninitialized.
Marked with XXXGCC for dreamcast (found while compiling for it).

Reviewed by lukem.
2005-06-07 13:26:26 +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
f01455eaa9 Don't attempt to dereference an uninitialized 'ep' pointer if we can't
make a temporary file to mail to the user.
Detected with gcc -Wuninitialized.
2005-06-02 04:03:03 +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
christos
cbc2d45618 If we cannot retrieve lines from a recovery file, don't call ourselves
recursively until we run out of stack.
2005-03-06 03:39:49 +00:00
christos
bf6d5c8643 A corrupt recovery file can have vs_scmap NULL now, since paint may return
early. Compensate.
2005-03-06 03:39:07 +00:00
aymeric
a3c4465703 Fix the RCSID's to be $NetBSD$ instead of $NetBSD 2005-02-12 12:53:22 +00:00
mycroft
debe1484b9 Set FD_CLOEXEC on the recovery mail file. 2005-01-19 01:20:24 +00:00
aymeric
0339e1e087 bump version: coredump fixed when autocompleting a filename wider than screen 2004-11-23 14:36:50 +00:00
aymeric
0b416121a6 Move a line of code which was "obviously" misplaced.
This fixes a core dump when auto-completing filenames and at least one of the
file names is larger than the screen width.

Bug report and fix by Peter Bex in PR#28382
2004-11-23 14:35:45 +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
400171c34b . don't call newterm() more than once; use setterm() and resizeterm() instead
on subsequent calls. Newterm() would fail after a few calls, leading to vi
  exiting with a "ex/vi: error initializing terminal" message
. if tcsetattr() fails due to EINTR, ignore it

Fixes PR #25849
2004-06-13 10:15:55 +00:00
aymeric
12c9a81707 -I. is part of CPPFLAGS, not CFLAGS. Make it so, allows to lint. 2004-05-25 16:47:31 +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
59b6c0290c flush the current line cache on every operation on the DB.
We can't keep a reference to data returned by libdb after a subsequent call to
any other libdb function on that DB.

Fixes a bug reported privately by Miho Taniyama (thanks!)... and hopefully
other hard-to-reproduce bugs.
2004-05-02 17:00:31 +00:00
simonb
9bc855a931 s/the the/the/ (only in sources that aren't regularly imported from
elsewhere).
2004-04-23 02:58:27 +00:00
aymeric
263ab3f13d bump version: failed recovery doesn't prevent edition anymore 2004-04-05 07:22:39 +00:00
aymeric
14069c4665 Don't fail if asked to recover a file for which there is no recovery file.
Just continue. This matches the man page, the POSIX standard, and even the
comment above that code!
From OpenBSD, via jmc@openbsd, via wiz@netbsd.
POSIX part confirmed by kleink@netbsd
:-)
2004-04-05 07:19:08 +00:00
aymeric
1bc3c9fb86 fix copying and freeing of options, patch from yamt@ in PR bin/25050. Thanks! 2004-04-05 06:59:15 +00:00
wiz
2dbbff262f Document -c more accurately. Patch from Aymeric Vincent in response
to PR 24676.
2004-03-17 10:13:10 +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
wiz
4bbfee09ca Various typo fixes from Jonathon Gray via jmc@openbsd. 2003-11-17 11:16:10 +00:00
matt
fefcf7d025 s/awk/${AWK}/ 2003-11-14 05:25:59 +00:00
lukem
130ab7336b Rework how MAKEVERBOSE operates:
*	Don't bother prefixing commands with a line of  ${_MKCMD}\
	and instead rely upon "make -s".  This is less intrusive on
	all the Makefiles than the former.  Idea from David Laight.

    *	Rename the variables use to print messages.  The scheme now is:
	    _MKMSG_FOO		Run  _MKMSG 'foo'
	    _MKTARGET_FOO	Run  _MKMSG_FOO ${.TARGET}
	From discussion with Alistair Crooks.
2003-10-21 10:01:19 +00:00
lukem
c545cc169d support MAKEVERBOSE 2003-10-19 04:30:30 +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
cb20da8aae Add options_def.h to DPSRCS and CLEANFILES 2003-08-28 22:04:23 +00:00