Commit Graph

250 Commits

Author SHA1 Message Date
christos 369f880abf disable completely. 2008-09-02 09:26:55 +00:00
christos 19656dada9 For now descend into old vi for virecover and doc. Unfortunately the
new vi vi.ref is now texinfo and our makeinfo is too old to deal with it.
2008-08-31 12:09:48 +00:00
gmcgarry 3c9a95916d Wrap compiler-specific flags with HAVE_GCC and HAVE_PCC as necessary. Add a few flags for PCC. 2008-08-29 00:02:21 +00:00
lukem 98e5374ccb Remove the \n and tabs from the __COPYRIGHT() strings.
Tweak to use a consistent format.
2008-07-21 14:19:20 +00:00
tnozaki 4dbd28ac77 add check wether /var/run/vi.* is regular file or not.
nvi-1.81.6 may create not only recovery file, but
tempoary directory(for db) using this name.
2008-07-10 17:48:04 +00:00
martin 11a6dbe728 Convert TNF licenses to new 2 clause variant 2008-04-30 13:10:46 +00:00
joerg a69e0dfa1d exit(3) needs stdlib.h. 2007-01-22 11:46:43 +00:00
christos 3d98aa3f4b fix spelling of accidentally; from Zapher 2006-11-24 19:37:02 +00:00
wiz 994a49a16c Comma in enumeration. No dot at end of SEE ALSO. 2006-10-13 21:22:44 +00:00
wiz 4cfcd239a1 Various fixes. 2006-10-13 21:06:01 +00:00
reed f9a8db2401 Remove parenthesis from around a sentence.
Refer to vi manpage for option -r.

Mention rc.d start up script for this.

Add rc.conf to SEE ALSO.

Remove sentence about it originally done at boot time.

Fix date - it was added in 1996. And mention that the
script was renamed in 2001.
2006-10-10 03:30:42 +00:00
reed 0b966788bb Also point to new virecover manual page. 2006-10-10 03:27:05 +00:00
dogcow f6a57672cd Build virecover.0 2006-10-08 21:47:21 +00:00
elad 805c3d6901 PR/22228: Jeremy C. Reed: a man page for virecover(8)
Man page added, thanks!
2006-10-08 14:19:17 +00:00
christos 49334834f0 Coverity CID 793 uncovered a bunch of issues:
1. needfree = 0, should have been *needfree = 0
2. this function will not work with sp == NULL, since KEY_NAME dereferences it.
3. the if (0) {
  label:
  }
  code is disgusting.

Remove all the nasty and impossible code and fix 1.
2006-09-27 21:01:18 +00:00
christos 5d1b788b2a Coverity CID 4166: If GET_SPACE_RET can return a NULL pointer if len == 0.
Check for it.
2006-09-27 20:04:25 +00:00
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
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