1
0
mirror of https://github.com/openbsd/src.git synced 2024-12-22 16:42:56 -08:00
openbsd-src/usr.bin/vi
job 39e743a585 Don't divide by zero (empty files)
While there, also increase buf[]

OK claudio@
2024-04-25 09:58:17 +00:00
..
build
cl spelling fixes; from paul tagliamonte 2022-12-26 19:16:00 +00:00
common fix fd leaks in error paths 2024-02-15 00:55:01 +00:00
docs add percentage to ruler after recent changes; 2024-04-25 05:26:41 +00:00
ex Fix a bug in ex's 's' command with the 'c' flag when 'number' is off. 2023-06-23 15:06:45 +00:00
include vi: apply expandtab to the output of a ! command 2022-04-22 15:48:29 +00:00
vi Don't divide by zero (empty files) 2024-04-25 09:58:17 +00:00
FAQ
LAYOUT
LICENSE
Makefile
README

#	$OpenBSD: README,v 1.13 2016/01/06 22:46:59 millert Exp $

#	@(#)README	8.149 (Berkeley) 7/14/97

This is version 1.79 (7/14/97) of nex/nvi, a reimplementation of the ex/vi
text editors originally distributed as part of the Fourth Berkeley
Software Distribution (4BSD), by the University of California, Berkeley.

The directory layout is as follows:

    FAQ ................... Frequently asked questions.
    LAYOUT ................ The layout of the nvi sources.
    LICENSE ............... Copyright, use and redistribution information.
    README ................ This file.
    cl .................... Vi interface to the curses(3) library.
    common ................ Code shared by ex and vi.
    docs .................. Ex/vi documentation, both current and historic.
    docs/USD.doc/edit ..... Edit: A tutorial.
    docs/USD.doc/exref .... Ex Reference Manual -- Version 3.7.
    docs/USD.doc/vi.man ... UNIX manual page for nex/nvi.
    docs/USD.doc/vi.ref ... Nex/nvi reference manual.
    docs/USD.doc/vitut .... An Introduction to Display Editing with Vi.
    ex .................... Ex source code.
    include ............... Replacement include files.
    vi .................... Vi source code.

Bug fixes and updated versions of this software will periodically be made
available.  For more information see:

	http://www.bostic.com/vi

To ask questions about vi, report vi problems, request notification of
future releases and/or bug fixes, or to contact the authors for any reason,
please send email to:

	bostic@bostic.com

=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
o This software is several years old and is the product of many folks' work.  

	This software was originally derived from software contributed to
	the University of California, Berkeley by Steve Kirkendall, the
	author of the vi clone elvis.  Without his work, this work would
	have been far more difficult.

	IEEE POSIX 1003.2 style regular expression support is courtesy of
	Henry Spencer, for which I am *very* grateful.

	Elan Amir did the original 4BSD curses work that made it possible
	to support a full-screen editor using curses.

	George Neville-Neil added the Tcl interpreter, and the initial
	interpreter design was his.

	Sven Verdoolaege added the Perl interpreter.

	Rob Mayoff provided the original Cscope support.

o Many, many people suggested enhancements, and provided bug reports and
  testing, far too many to individually thank.

o From the original vi acknowledgements, by William Joy and Mark Horton:

	Bruce Englar encouraged the early development of this display
	editor.  Peter Kessler helped bring sanity to version 2's
	command layout.  Bill Joy wrote versions 1 and 2.0 through 2.7,
	and created the framework that users see in the present editor.
	Mark Horton added macros and other features and made the editor
	work on a large number of terminals and Unix systems.

o And...
	The financial support of UUNET Communications Services is gratefully
	acknowledged.

=-=-=-=-=-=-=-=-=-=-=
o Status:

This software is in beta test, and it's pretty stable.  Almost all of the
historic functionality in ex/vi is there, the only major missing pieces
are open mode and the lisp edit option.

Nvi is largely 8-bit clean.  This isn't difficult to fix, and was left in
during initial development to keep things simple.  Wide character support
will be integrated at the same time that it is made fully 8-bit clean.

There aren't a lot of new features in nex/nvi, but there are a few things
you might like.  The "Additional Features" section of the reference work
(docs/USD.doc/vi.ref/vi.ref.txt, docs/USD.doc/vi.ref/vi.ref.ps) has more
information.

=-=-=-=-=-=-=-=-=-=-=
o Debugging:

Code fixes are greatly appreciated, of course, but if you can't provide
them, please email me as much information as you can as to how I might
reproduce the bug, and I'll try to fix it locally.  Stack traces of core
dumps are only rarely helpful -- an example file with a set of keystrokes
that causes the problem is almost invariably necessary.  I know it's
annoying, but simply playing with the bug until you can reproduce it at
will, with minimal keystrokes, is immensely helpful to me.

Please include the following in the bug report;

	o The version of nvi you're running (use :version to get it).
	o The row/column dimensions of the screen (80 x 32).
	o Unless you're confident that they're not part of the problem,
	  your startup files (.exrc, .nexrc) and the environment variable
	  (EXINIT, NEXINIT) values.  (Cutting and pasting the output
	  of ":set all" is usually sufficient.)

If you want to do your own debugging, recompile the program with DEBUG
defined.  (Configuring with --enable-debug will do this for you.)  This
turns on the additional command-line option -D, that takes either s or w
as an argument.  The option -Ds causes nvi to ignore the EXINIT and
.exrc files on startup, and -Dw causes nvi to print out the process id
and wait for you to enter a <carriage-return> to continue.

If you're running a memory checker (e.g. Purify) on nvi, you will first
want to  recompile everything with "-DPURIFY" set in the CFLAGS.  This
initializes allocated pages in the DB code, and free's allocated memory
at the end of the nvi execution.