Commit Graph

214 Commits

Author SHA1 Message Date
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
dsl 43d69358c2 Use the options.awk script to generate options_def.h (as in nvi distribution).
Modify options.awk to detect an incorrectly sorted options array.
NB: if GTAGS is undefined theses sources will still generate invalid programs.
2003-08-28 16:23:40 +00:00
dsl d264f181ea Fix typo in 'help', bump date in vi.1 2003-08-28 14:44:48 +00:00
dsl 5e8df6a3d7 Add definition of matchchars 2003-08-28 13:25:13 +00:00
dsl 41efebfb61 Make the order of these defines match the correctly sorted definition
in options.c.
Is there any reason why we don't use options.awk so this file would
always be correct?  (especially if the awk script checked the sort)
2003-08-28 13:19:05 +00:00
dsl 68b9f13602 Bump for inclusion of :set matchars 2003-08-28 05:00:09 +00:00
mrg d47feee1f7 can't print size_t with %d 2003-08-28 01:55:17 +00:00
dsl f25691d97c Increase maximum terminal size from 500x500 to 4000x4000.
Add a 'matchchars' option to set the character pairs that % looks for.
Traditionally this was []{}() but someone added <> to nvi - probably
for editing html, but it is a pain for C. :set matchars=[]{}() will
restore the traditional behaviour.
If the 'open' and 'close' characters are the same (eg "" or '') then % will
alternate forwards and backwards searches.
Use common code to detect options that must have an even number of characters.
2003-08-27 15:15:13 +00:00
dsl 9290245176 Coorectly sort options table (it is searched with a binary chop). 2003-08-27 13:47:51 +00:00
agc 89aaa1bb64 Move UCB-licensed code from 4-clause to 3-clause licence.
Patches provided by Joel Baker in PR 22365, verified by myself.
2003-08-07 11:13:06 +00:00
lukem 001c68bd94 Rename a large chunk of the make(1) variables which refer to a
program/tool from "FOO" to "TOOL_FOO".  The new variables are:
	TOOL_ASN1_COMPILE  TOOL_CAP_MKDB  TOOL_CAT  TOOL_CKSUM  TOOL_COMPILE_ET
	TOOL_CONFIG  TOOL_CRUNCHGEN  TOOL_CTAGS  TOOL_DB  TOOL_EQN  TOOL_FGEN
	TOOL_GENCAT  TOOL_GROFF  TOOL_HEXDUMP  TOOL_INDXBIB  TOOL_INSTALLBOOT
	TOOL_INSTALL_INFO  TOOL_M4  TOOL_MAKEFS  TOOL_MAKEINFO  TOOL_MAKEWHATIS
	TOOL_MDSETIMAGE  TOOL_MENUC  TOOL_MKCSMAPPER  TOOL_MKESDB
	TOOL_MKLOCALE  TOOL_MKMAGIC  TOOL_MKTEMP  TOOL_MSGC  TOOL_MTREE
	TOOL_PAX  TOOL_PIC  TOOL_PREPMKBOOTIMAGE  TOOL_PWD_MKDB  TOOL_REFER
	TOOL_ROFF_ASCII  TOOL_ROFF_DVI  TOOL_ROFF_HTML  TOOL_ROFF_PS
	TOOL_ROFF_RAW  TOOL_RPCGEN  TOOL_SOELIM  TOOL_SUNLABEL  TOOL_TBL
	TOOL_UUDECODE  TOOL_VGRIND  TOOL_ZIC

For each, provide default in <bsd.sys.mk> of the form:
	TOOL_FOO?=	foo
and for the ${USETOOLS}=="yes" case in <bsd.own.mk>, provide override:
	TOOL_FOO=	${TOOLDIR}/bin/${_TOOL_PREFIX}foo

Document all of these in bsd.README.

This cleans up a chunk of potential (and actual) namespace collision
within our build infrastructure, as well as improves consistency in
the share/mk documentation and provision of appropriate defaults for
each of these variables.
2003-07-10 10:33:58 +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 baffc152bc When an error occurs in v_txt(), leave input mode too.
Otherwise, (among other things) db_get() thinks it can re-use the TEXT buffers
when it's not true, leading to a crash because that TEXT buffer will be
released just before it is actually used to create a new one.
This fixes PR#21797.
2003-06-06 08:06:47 +00:00
christos b2ee3e403d improve on previous. only adjust the length when it exceed the string length. 2003-04-18 18:46:26 +00:00
christos c0b1f367f4 Recovery of vi files has been broken for a long while. This patch is a
stopgap measure to make vi recovery mostly functional on non-binary files.
The problem is that the db holding the recovery file can become corrupted,
in which case the data size of the line becomes huge. We use heuristics to
correct the size when we load a db in recovery mode. We could use a slightly
better heuristic (looking for ascii chars before correcting the length),
but it is not worth it. Another way would have been to trap the SEGV and
access data[len] and see if that worked, but that seemed exceedingly ugly.
2003-04-18 18:33:41 +00:00
perry 1f4ad37fe3 "Utilize" has exactly the same meaning as "use," but it is more
difficult to read and understand. Most manuals of English style
therefore say that you should use "use".
2003-02-05 00:02:24 +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