When } command is executed in the last paragraph including EOF, the original vi
(traditional/SVR4) moves the cursor to the *last* character in the last line.
However, nvi moves it to the *first* character in the last line.
Looks like the '%Q%' was supposed to be translated to an actual date through
some tool but neither the README nor the Makefile say anything. So just
setting the date manually.
ok wiz@
- sscr_insert(): sh_prompt should be compared with t, not p
- replace strnstr(3) with memcmp(3)
now, nvi is free from strnstr(3); it can be safely pulled-up into netbsd-7
its tailq. This required introducing a new flag in the TAGQ structure to
avoid reverting to poking under the hood of the queue.h API.
The concrete bug it solves is that using tags would make vi crash reliably
on exit.
Rename the following reference documents to match their programs:
shell -> sh
viref -> vi
and rename the following to match their topic better:
ipctut -> sockets
ipc -> sockets-advanced
Also, the old "timed" and "timedop" docs are now ref5/timed and
ref8/timed respectively, as the first of these documented the
protocol.
Move all the reference manuals to subdirs of /usr/share/doc/reference.
We have subdirs ref1-ref9, corresponding to man page sections 1-9.
Everything that's the reference manual for a program (sections 1, 6,
8), C interface (sections 2, 3), driver or file system (section 4),
format or configuration (section 5), or kernel internal interface
(section 9) belongs in here.
Section 7 is a little less clear: some things that might go in section
7 if they were a man page aren't really reference manuals. So I'm only
putting things in reference section 7 that are (to me) clearly
reference material, rather than e.g. tutorials, guides, FAQs, etc.
This obviously leaves some room for debate, especially without first
editing the docs with this distinction in mind, but if people hate
what I've done things can always be moved again.
Note also that while roff macro man pages traditionally go in section
7, I have put all the roff documentation (macros, tools, etc.) in one
place in reference/ref1/roff. This will make it easier to find and
also easier to edit it into some kind of coherent form.
Update the <bsd.doc.mk> infrastructure, and update the docs to match
the new infrastructure.
- Build and install text, ps, pdf, and/or html, not roff sources.
- Don't wire the chapter numbers into the build system, or use them in
the installed pathnames. This didn't matter much when the docs were a
museum, but now that we're theoretically going to start maintaining
them again, we're going to add and remove documents periodically and
having the chapter numbers baked in creates a lot of thrashing for no
purpose.
- Specify the document name explicitly, rather than implicitly in a
path. Use this name (instead of other random strings) as the name
of the installed files.
- Specify the document section, which is the subdirectory of
/usr/share/doc to install into.
- Allow multiple subdocuments. (That is, multiple documents in one
output directory.)
- Enumerate the .png files groff emits along with html so they can be
installed.
- Remove assorted hand-rolled rules for running roff and roff widgetry
and add enough variable settings to make these unnecessary. This
includes support for
- explicit use of soelim
- refer
- tbl
- pic
- eqn
- Forcibly apply at least minimal amounts of sanity to certain
autogenerated roff files.
- Don't exclude USD.doc, SMM.doc, and PSD.doc directories from the
build, as they now actually do stuff.
Note: currently we can't generate pdf. This turns out to be a
nontrivial problem with no immediate solution forthcoming. So for now,
as a workaround, install compressed .ps as the printable form.
When autogenerating headers from source (yuck) use a more selective
pattern to avoid selecting anything if part of the current absolute
path happens to match part of the nvi source tree.
Work around segfault in TAILQ_REMOVE by abusing the tqe_prev pointer
as a flag that identifies an already removed node.
This should really be solved by calling screen_end only once or by
keeping state explicitely in the screen structure.
NULL vip's and removal of screens from queues. Instead introduce
a new screen_end1() function that can be used to clean screens that
are not associated with queues yet. Pointed out by chuq@
1. the btree filename was not set so that we always used a transient
in-memory db for the data
2. we did not call sync after creation with R_RECNOSYNC so that the header
of the btree was never written
3. we did not call the right flavor of sync before copying the tree to the
preserved files
This is selected with -DUSE_DB1 in the Makefile. By default
use use the db1 specific code from the current nvi which is
enabled using -DUSE_BUNDLED_DB. Unfortunately recovery seems
to be broken for both.
This avoids the problem when screens are re-used that have stale pointers in
them. This was not an issue with circleq's because all the pointers used to
be updated.