Showing preview only (3,085K chars total). Download the full file or copy to clipboard to get everything.
Repository: johnsonjh/OpenVi
Branch: master
Commit: 7b40c9ceffb2
Files: 280
Total size: 2.9 MB
Directory structure:
gitextract_apaa2j_q/
├── .gitattributes
├── .gitignore
├── BSDmakefile
├── ChangeLog
├── ChangeLog.license
├── GNUmakefile
├── LICENSE.md
├── LICENSES/
│ ├── BSD-2-Clause.txt
│ ├── BSD-3-Clause.txt
│ └── ISC.txt
├── README.md
├── README_pt_BR.md
├── REUSE.toml
├── cl/
│ ├── cl.h
│ ├── cl_extern.h
│ ├── cl_funcs.c
│ ├── cl_main.c
│ ├── cl_read.c
│ ├── cl_screen.c
│ ├── cl_term.c
│ └── extern.h
├── common/
│ ├── args.h
│ ├── common.h
│ ├── cut.c
│ ├── cut.h
│ ├── delete.c
│ ├── exf.c
│ ├── exf.h
│ ├── gs.h
│ ├── key.c
│ ├── key.h
│ ├── line.c
│ ├── log.c
│ ├── log.h
│ ├── main.c
│ ├── mark.c
│ ├── mark.h
│ ├── mem.h
│ ├── msg.c
│ ├── msg.h
│ ├── options.awk
│ ├── options.c
│ ├── options.h
│ ├── options_f.c
│ ├── put.c
│ ├── recover.c
│ ├── screen.c
│ ├── screen.h
│ ├── search.c
│ ├── seq.c
│ ├── seq.h
│ └── util.c
├── db/
│ ├── btree/
│ │ ├── bt_close.c
│ │ ├── bt_conv.c
│ │ ├── bt_debug.c
│ │ ├── bt_delete.c
│ │ ├── bt_get.c
│ │ ├── bt_open.c
│ │ ├── bt_overflow.c
│ │ ├── bt_page.c
│ │ ├── bt_put.c
│ │ ├── bt_search.c
│ │ ├── bt_seq.c
│ │ ├── bt_split.c
│ │ ├── bt_utils.c
│ │ ├── btree.h
│ │ └── extern.h
│ ├── db/
│ │ └── db.c
│ ├── hash/
│ │ ├── bsd_ndbm.h
│ │ ├── extern.h
│ │ ├── hash.c
│ │ ├── hash.h
│ │ ├── hash_bigkey.c
│ │ ├── hash_buf.c
│ │ ├── hash_func.c
│ │ ├── hash_log2.c
│ │ ├── hash_page.c
│ │ ├── ndbm.c
│ │ └── page.h
│ ├── mpool/
│ │ └── mpool.c
│ └── recno/
│ ├── extern.h
│ ├── rec_close.c
│ ├── rec_delete.c
│ ├── rec_get.c
│ ├── rec_open.c
│ ├── rec_put.c
│ ├── rec_search.c
│ ├── rec_seq.c
│ ├── rec_utils.c
│ └── recno.h
├── docs/
│ ├── USD.doc/
│ │ ├── edit/
│ │ │ ├── edit.vindex
│ │ │ └── edittut.ms
│ │ ├── exref/
│ │ │ ├── ex.rm
│ │ │ └── ex.summary
│ │ ├── re_format/
│ │ │ └── vi_regex.7
│ │ ├── vi.man/
│ │ │ └── vi.1
│ │ └── vitut/
│ │ ├── vi.apwh.ms
│ │ ├── vi.chars
│ │ ├── vi.in
│ │ └── vi.summary
│ ├── ev
│ ├── ev.license
│ ├── help
│ ├── help.license
│ ├── internals/
│ │ ├── autowrite
│ │ ├── autowrite.license
│ │ ├── context
│ │ ├── context.license
│ │ ├── gdb.script
│ │ ├── input
│ │ ├── input.license
│ │ ├── openmode
│ │ ├── openmode.license
│ │ ├── quoting
│ │ ├── quoting.license
│ │ ├── structures
│ │ └── structures.license
│ └── tutorial/
│ ├── vi.advanced
│ ├── vi.advanced.license
│ ├── vi.beginner
│ ├── vi.beginner.license
│ └── vi.tut.csh
├── ex/
│ ├── ex.awk
│ ├── ex.c
│ ├── ex.h
│ ├── ex_abbrev.c
│ ├── ex_append.c
│ ├── ex_args.c
│ ├── ex_argv.c
│ ├── ex_at.c
│ ├── ex_bang.c
│ ├── ex_cd.c
│ ├── ex_cmd.c
│ ├── ex_delete.c
│ ├── ex_display.c
│ ├── ex_edit.c
│ ├── ex_equal.c
│ ├── ex_file.c
│ ├── ex_filter.c
│ ├── ex_global.c
│ ├── ex_init.c
│ ├── ex_join.c
│ ├── ex_map.c
│ ├── ex_mark.c
│ ├── ex_mkexrc.c
│ ├── ex_move.c
│ ├── ex_open.c
│ ├── ex_preserve.c
│ ├── ex_print.c
│ ├── ex_put.c
│ ├── ex_quit.c
│ ├── ex_read.c
│ ├── ex_screen.c
│ ├── ex_script.c
│ ├── ex_set.c
│ ├── ex_shell.c
│ ├── ex_shift.c
│ ├── ex_source.c
│ ├── ex_stop.c
│ ├── ex_subst.c
│ ├── ex_tag.c
│ ├── ex_txt.c
│ ├── ex_undo.c
│ ├── ex_usage.c
│ ├── ex_util.c
│ ├── ex_version.c
│ ├── ex_visual.c
│ ├── ex_write.c
│ ├── ex_yank.c
│ ├── ex_z.c
│ ├── script.h
│ ├── tag.h
│ └── version.h
├── include/
│ ├── bitstring.h
│ ├── bsd_db.h
│ ├── bsd_err.h
│ ├── bsd_fcntl.h
│ ├── bsd_regex.h
│ ├── bsd_stdlib.h
│ ├── bsd_string.h
│ ├── bsd_termios.h
│ ├── bsd_unistd.h
│ ├── com_extern.h
│ ├── compat.h
│ ├── compat_bsd_db.h
│ ├── ex_extern.h
│ ├── libgen.h
│ ├── mpool.h
│ ├── pathnames.h
│ ├── poll.h
│ ├── sys/
│ │ ├── proc.h
│ │ ├── queue.h
│ │ ├── stat.h
│ │ ├── time.h
│ │ ├── tree.h
│ │ └── types.h
│ ├── util.h
│ └── vi_extern.h
├── openbsd/
│ ├── basename.c
│ ├── dirname.c
│ ├── err.c
│ ├── errc.c
│ ├── errc.h
│ ├── errx.c
│ ├── getopt_long.c
│ ├── getopt_long.h
│ ├── getprogname.c
│ ├── issetugid.c
│ ├── minpwcache.c
│ ├── minpwcache.h
│ ├── open.c
│ ├── pledge.c
│ ├── reallocarray.c
│ ├── setmode.c
│ ├── setmode.h
│ ├── strlcat.c
│ ├── strlcpy.c
│ ├── strtonum.c
│ ├── verr.c
│ ├── verrc.c
│ ├── verrx.c
│ ├── vwarn.c
│ ├── vwarnc.c
│ ├── vwarnx.c
│ ├── warn.c
│ ├── warnc.c
│ └── warnx.c
├── regex/
│ ├── bsd_regex2.h
│ ├── cclass.h
│ ├── cname.h
│ ├── engine.c
│ ├── regcomp.c
│ ├── regerror.c
│ ├── regexec.c
│ ├── regfree.c
│ └── utils.h
├── scripts/
│ ├── virecover
│ └── virecover.8
├── vi/
│ ├── getc.c
│ ├── v_at.c
│ ├── v_ch.c
│ ├── v_cmd.c
│ ├── v_delete.c
│ ├── v_ex.c
│ ├── v_increment.c
│ ├── v_init.c
│ ├── v_itxt.c
│ ├── v_left.c
│ ├── v_mark.c
│ ├── v_match.c
│ ├── v_paragraph.c
│ ├── v_put.c
│ ├── v_redraw.c
│ ├── v_replace.c
│ ├── v_right.c
│ ├── v_screen.c
│ ├── v_scroll.c
│ ├── v_search.c
│ ├── v_section.c
│ ├── v_sentence.c
│ ├── v_status.c
│ ├── v_txt.c
│ ├── v_ulcase.c
│ ├── v_undo.c
│ ├── v_util.c
│ ├── v_word.c
│ ├── v_xchar.c
│ ├── v_yank.c
│ ├── v_z.c
│ ├── v_zexit.c
│ ├── vi.c
│ ├── vi.h
│ ├── vs_line.c
│ ├── vs_msg.c
│ ├── vs_refresh.c
│ ├── vs_relative.c
│ ├── vs_smap.c
│ └── vs_split.c
└── xinstall/
├── xinstall.1
└── xinstall.c
================================================
FILE CONTENTS
================================================
================================================
FILE: .gitattributes
================================================
# SPDX-License-Identifier: BSD-3-Clause
# Copyright (c) 2021-2024 Jeffrey H. Johnson
*.txt linguist-documentation
*.ms linguist-documentation
*.1 linguist-documentation
*.8 linguist-documentation
*.md linguist-documentation
*.rm linguist-documentation
*.advanced linguist-documentation
*.beginner linguist-documentation
*.summary linguist-documentation
*.vindex linguist-documentation
*.chars linguist-documentation
*.refs linguist-documentation
*.roff linguist-documentation
./docs/* linguist-documentation
*.in linguist-vendored
*.csh linguist-vendored
*.script linguist-vendored
================================================
FILE: .gitignore
================================================
# SPDX-License-Identifier: BSD-3-Clause
# Copyright (c) 2021-2024 Jeffrey H. Johnson
# Prerequisites
*.d
# Timing
*.t
# Object files
*.o
*.ko
*.obj
*.elf
*.dll
*.exe
# Linker output
*.ilk
*.map
*.exp
# Precompiled Headers
*.gch
*.pch
# Libraries
*.lib
*.a
*.la
*.lo
# Shared objects (inc. Windows DLLs)
*.dll
*.so
*.so.*
*.dylib
# Executables
*.exe
*.out
*.app
*.i*86
*.x86_64
*.hex
# Debug files
*.dSYM/
*.su
*.idb
*.pdb
# Kernel Module Compile Results
*.mod*
*.cmd
.tmp_versions/
modules.order
Module.symvers
Mkfile.old
dkms.conf
# Output
common/options_def.h
ex/ex_def.h
bin/*
# Patch
*.rej
*.orig
*.diff
# Junk
typescript
.DS_Store
.cproject
.project
.settings/
.vscode/
.nvimlog
.vimlog
*.*.swp
test.txt
# Tags
tags
.tags
ctags
.ctags
etags
.etags
.TAGS
TAGS
GRTAGS
GTAGS
GPATH
# Cores
core
*.core
# Local
.autoenv
.envrc
# Bad Targets
all
clean
install
distclean
# Profiling
*.gcda
*.gcov
*.gcno
*.profdata
*.profout
# Tidy
compile_commands.json
================================================
FILE: BSDmakefile
================================================
###############################################################################
# - O p e n V i - #
###############################################################################
# vim: filetype=make:tabstop=8:tw=79:noexpandtab:colorcolumn=79
# SPDX-License-Identifier: BSD-3-Clause
###############################################################################
###############################################################################
#
# Copyright (c) 2021-2024 Jeffrey H. Johnson
#
# Copying and distribution of this file, with or without modification,
# are permitted in any medium without royalty provided the copyright
# notice and this notice are preserved. This file is offered "AS-IS",
# without any warranty.
#
###############################################################################
###############################################################################
# Configuration
.SHELL: name=sh
.MAIN: all
.MAKE.JOBS ?= 1
.NOTPARALLEL: _FAIL all _GMAKE $(.TARGETS)
.PHONY: _FAIL all _GMAKE $(.TARGETS)
$(.TARGETS): _GMAKE
###############################################################################
# Wrapper
_GMAKE:
@command -v gmake > /dev/null 2>&1 || \
{ \
printf '\rError: %s\n' "GNU Make is required." 1>&2; \
exit 1; \
} && \
command gmake \
$$(printf '%s' "$(MAKEFLAGS)" 2> /dev/null | \
sed -e 's/-J .* //' \
-e 's/-J.* //' 2> /dev/null) \
$(.TARGETS)
###############################################################################
================================================
FILE: ChangeLog
================================================
OpenVi 7.7.32 -> OpenVi 7.8.33-dev: Wed Dec 24 15:06:57 2025
+ Update README to mention optional `pkg-config` prerequisite
+ Do not include termio.h on Linux systems
+ Update email address (johnsonjh.dev@gmail.com)
OpenVi 7.6.31 -> OpenVi 7.7.32: Thu Oct 2 03:49:26 2025
+ Try to query `pkg-config` for ncurses flags and libs on some systems
+ Fix filename completion using `D_NAMLEN` as defined in the compat
`include/compat.h` header; patch from @jerryfletcher21; closes #22.
+ Fix `p` command when used with a count
+ Fix crash with expandtab and running external commands; fix from
Jerry Fletcher, OK job@
+ Update docs to add percentage to ruler after recent changes
OpenVi 7.6.30 -> OpenVi 7.6.31: Sun Apr 6 15:25:04 2025
+ Don't require xinstall to be built for `install`, `strip`, and
`sstrip` targets to complete successfully.
+ In xinstall's create_tempfile() pass pointer to full pathname to
strlcat(); fixes a potential buffer overrun; also check strlcpy()
and strlcat() return value to detect truncations; based on a diff
from naddy@; ok naddy@ tb@ deraadt@
+ Support building for Managarm (xbstrap cross-compilation only)
OpenVi 7.5.29 -> OpenVi 7.6.30: Mon Oct 7 08:45:39 2024
+ Bump for OpenBSD 7.6 release
OpenVi 7.5.28 -> OpenVi 7.5.29: Tue May 21 05:26:38 2024
+ Support building natively on OS/400; verified using PASE for IBM i
7.5 with GCC 10.5 (gcc10) and ncurses 6.0 (ncurses, ncurses-devel)
+ Add a new output level, M_XINFO, which outputs an informational
message and ignores the state of the verbose and silent flags
+ Show version command output even in ex silent mode
+ Update the usage help text to document the new `-C` option
+ Minor changes to xinstall.c to appease Oracle Lint warnings
+ Consistently use .Dq for double-quoting in man pages
+ Fix various spelling errors and typos, mostly in comments
+ Increase buf size
OpenVi 7.4.27 -> OpenVi 7.5.28: Sun Apr 7 19:06:02 2024
+ Add `-C cmd` startup option; similar to `-c` but always runs `cmd`
+ Remove duplicate include statements from xinstall.c
+ Add showfilename set option to display file name; OK millert@ otto@
+ Avoid use after free of frp and frp->tname; found by smatch,
ok miod@ millert@
+ fix fd leaks in error paths; ok miod@
OpenVi 7.4.26 -> OpenVi 7.4.27: Wed Nov 22 19:30:41 2023
+ Update README file with additional links and packaging information
+ Always suppress db_err output when !lno; closes GitHub Issue #34
+ Update minpwcache.c to OpenBSD pwcache.c v1.16; contains spelling
fixes from Paul Tagliamonte; only comments, no user-facing change
+ Use openbsd_strlcpy for strlcpy in ptym_open(); fixes compilation
on AIX and some other System V-derived systems
OpenVi 7.4.25 -> OpenVi 7.4.26: Fri Oct 28 00:15:39 2023
+ Add a fallback path for `altnotation` mode; fixes a crash on macOS
+ Bump MAX_CHARACTER_COLUMNS to 6 for future usage
+ Eliminate strcpy usage in ptym_open function
OpenVi 7.4.24 -> OpenVi 7.4.25: Fri Oct 27 11:44:45 2023
+ Add a new option, `altnotation` (abbreviation `an`), inspired
by the Nvi2 2.2.1 option of the same name; if set, most control
characters less than 0x20 will be displayed in <C-char> notation,
and carriage feed, escape, and delete will be displayed as <Ret>,
<Esc>, and <Del>, respectively
OpenVi 7.4.23 -> OpenVi 7.4.24: Tue Oct 10 19:47:07 2023
+ Silence a warning when building with recent Clang compilers
+ Treat consecutive paragraph indicators as different paragraphs;
Consecutive empty lines count toward the same state, so there're
2x states (to get in and out). `^L` and `.PP` are counted as text,
hitting those in the text should be treated as getting out of a
paragraph and then getting in. From Walter Alejandro Iglesias and
Zhihao Yuan in nvi2; ok bluhm@
+ Fix typo in last ChangeLog entry
OpenVi 7.3.22 -> OpenVi 7.4.23: Sat Jun 24 03:12:41 2023
+ Bump OpenBSD date synchronization version part to 06/23/2023
+ Remove unused `__cur_db` variable in Berkeley DB code; ok millert@
+ Spelling fixes (in comments only) for regex from Paul Tagliamonte
+ Remove vestigial `?` case from `xinstall` top-level `getopt` loop;
Prompted by dlg@, help from dlg@, millert@; ok naddy@ millert@ dlg@
+ Packaging improvements from @jswank to honor DESTDIR to support
relocatable installation, use relative symlinks for `view` and `ex`
programs, and not create `/var/tmp/vi.recover` during installation
OpenVi 7.2.21 -> OpenVi 7.3.22: Tue Apr 11 07:54:09 2023
+ OpenBSD 7.3 released; bumping OpenBSD major version part to 7.3
+ Bump OpenBSD date synchronization version part to 01/29/2023
+ Autoprint line number to match the confirmation line;
patch from `nvi2` via millert@
+ Fix crash when tags file pattern has a trailing `\`, patch
via `nvi2`; co-authored by Craig Leres <leres@FreeBSD.org>
OpenVi 7.2.20 -> OpenVi 7.2.21: Tue Jan 31 03:26:07 2023
+ Fix handling of ex_range escaped backslashes; If there are two
consecutive backslashes, skip past both so the second is not
mistakenly treated as an escape character. This is consistent
with how escaped backslashes are treated in ex_substitute()
and global(); from Bosco G. G.
+ Spelling fixes from Paul Tagliamonte
+ Fix ^^D and 0^D description in man page; pointed out by
Tomas Rippl; ok jmc@
+ Fix typo in `.gitattributes`; no code changes
OpenVi 7.2.19 -> OpenVi 7.2.20: Sun Jan 1 05:36:31 2023
+ Correctly increment version identifier to match release
+ Normalize comment blocks; no functional changes
OpenVi 7.1.18 -> OpenVi 7.2.19: Tue Nov 29 22:04:43 2022
+ Add translation of README.md into Brazilian Portuguese
+ Suppress the "UNLOCKED" message on AIX
+ Set OBJECT_MODE when stripping compiled binaries
+ Add DEP5 metadata file to the source tree
+ Add SPDX license identifiers for REUSE compliance
+ OpenBSD 7.2 enters beta; bumping OpenBSD version to 7.2
OpenVi 7.1.17 -> OpenVi 7.1.18: Sat Jul 23 19:40:59 2022
+ Quiet complaints when recovery directory is non-existent
+ Improve various status messages
+ Add permission statements to `GNUmakefile`, `BSDmakefile`
+ Update documentation
OpenVi 7.0.16 -> OpenVi 7.1.17: Sun Apr 24 07:57:29 2022
+ In v_event_get check qp->output for NULL before passing to
e_memcmp(); other users of qp->output already include a NULL check;
avoids a crash when cursor key support is disabled in cl/cl_term.c;
from Jeremy Mates; ok tb@
+ Check tkp->output != NULL before taking strlen for both command
mappings and input mappings; this adds a missing check for command
mappings and simplifies the input mappings; ok millert@
+ From upstream man page, add missing comma; ok jmc@
+ Update documentation
OpenVi 7.0.15 -> OpenVi 7.1.16: Sun Mar 13 22:10:37 2022
+ Document that PCC (Portable C Compiler) is working
+ Add a BSD make wrapper that calls gmake if available
+ Add OpenBSD basename functionality for use with xinstall
+ Simplify compatibility headers
+ Make `sstrip` target depend on the `strip` target, since many
platforms do not support all the sstrip options, so still stripping
as much as is possible is the most user-friendly thing to try
+ Add support for Solaris; tested on Oracle Solaris 11.4.0 with GCC,
Clang (V6+), and the Oracle Developer Studio V12.6 compiler
+ Add support for illumos; tested on OpenIndiana Hipster 2022.03
+ Add support for NetBSD; tested on NetBSD/amd64 9.2-stable with
the system provided GCC and Clang from binary packages; compiling
`CC=clang LTO=1` requires the LLVM LLD linker `ld.lld` installed
+ Add support for IBM AIX 7+; tested on IBM AIX 7.2 and IBM AIX 7.3
with GNU GCC (8, 9, 10, 11), IBM XL C/C++ V16.1+ (gxlc, xlclang),
and IBM Open XL C/C++ V17.1+ using ncurses from IBM's AIX Toolbox;
AIX builds default to 64-bit (on 64-bit systems) when using a
supported compiler; the environment variable `MAIXBITS` can be set
to `32` or `64` to force compilation of a 32-bit or 64-bit binary
+ Various portability improvements (portable BSD getopt, warn, etc.)
+ Reorganize source tree to better separate logical components
+ `WCOREDUMP` is not in POSIX.1-2008, so don't require it to build
+ Similarly, check if `TIOCSCTTY` is available and don't require it
+ Add `xinstall`, a BSD install utility based on OpenBSD `install(1)`
+ Switch `vfork` to `fork` as `vfork` is now gone from POSIX.1-2008
+ Clear pointer after ending screen for safety
+ `README.md`, documentation, and man page corrections and improvements
+ Apply `expandtab` to lines filtered with the `!` command, via `nvi2`
+ OpenBSD 7.1 enters beta; bumping OpenBSD version to 7.1
+ Modify text `%s/OpenBSD vi/OpenVi/` in `common/recover.c`
+ Provide a more helpful message when ex-mode has background screens
+ Fully redraw screen on refresh with ^L / ^R
+ Make `taglength` work correctly; fix from nvi 1.8x
+ Make `join` work as specified in the POSIX standard; nvi 1.8x
+ Fix problem with autoindenting and ^^D input; patch from nvi 1.8x
+ Fix to reset screen offset of top line exceeding number of screens
adapted from Sven Verdoolaege's nvi 1.8x patch
+ Fix tty from ex-mode on `q` when there are multiple screens; patch
from Al Viro via nvi 1.8x; also minor redraw adjustments
+ Use `-Wall` by default for all builds; drop `-Wextra` for release
+ Switch default optimization level to `-Os` for release builds; use
`-D_FORTIFY_SOURCE=2` for non-debugging builds by default as well
+ Do not warn about `ttyname` or `ioctl` failures for `stderr` unless
`stderr` is a tty according to `isatty()`
+ Fix out of bounds access in file completion
+ Raise the maximum ex-script mmap size limit
+ `DEBUG=1` now defaults to `-O0` rather than `-Og`
+ Avoid undefined behavior in `vs_crel()` and `ex_is_abbrev()`
+ Suppress more warnings and potential warnings
OpenVi 7.0.12 -> OpenVi 7.0.15: Thu Feb 24 12:18:33 2022
+ Avoid O_PATH clash in source proper (rather than in awk script)
+ Remove deprecated interpreter internals documentation
+ Actually use `pledge()` for SerenityOS and OpenBSD 5.9 or later
+ Add `superstrip` (aka `sstrip`) `GNUmakefile` target to
aggressively strip the compiled binary using `sstrip` if available
+ Add `upx` `GNUmakefile` target to compress the compiled binary
using `upx` if available
+ Cosmetic clean-up of `GNUmakefile` and normalize to 79-columns
+ MSYS2 is also supported, tested with MSYS2 on Windows 11 (x86_64)
+ Add support for Cygwin, tested with Cygwin64 on Windows 11 (x86_64)
+ Update `README.md` to document usage for `LIBS` variable, correct
`OPTFLAGS` to `OPTLEVEL`, expand external links and information,
add citations regarding past multibyte efforts, use fancy quotes,
and correctly state that the traditional `ex` / `vi` was part of
the *first* Berkeley Software Distribution, mention OpenBSD's
standard secure coding practices, safe(r) functions, and ISC license
+ Respect `LIBS` to set/override the default libraries for linking
+ Make failure to strip non-fatal; fixes `install-strip` and `strip`
in the case where `./bin/vi` is un-strippable (i.e. `bin/vi` is
`upx` compressed or missing section headers from `sstrip`ing)
+ Fixes for `vi` recovery mode. From `trondd@`, tested by various,
ok `afresh1@`; this advances OpenBSD release date to 02/20/2022
+ Update `.gitignore` to add `compile_commands.json`
+ Suppress a few possible warnings
+ Since HiDPI screens are more common, allow terminal dimensions of
3640x2048; this might need to be further extended for 4K displays
OpenVi 7.0.11 -> OpenVi 7.0.12: Sun Feb 20 12:57:42 2022
+ Update `README.md` with some background info and rationale
+ Always use internal reallocarray; closes GitHub Issue #5
OpenVi 7.0.10 -> OpenVi 7.0.11: Sat Feb 12 19:42:28 2022
+ Silence a few more warnings; adjust default debugging `CFLAGS`
+ Add an initial regex man page (which is not yet installed),
`docs/USD.doc/re_format/vi_regex.7`
+ Update `LICENSE.md`; fix email address for `millert@`
+ Simplify `db/sys/issetugid.c` ifdef's
+ Update bundled *OpenBSD* cclass.h to `1.7` (2020/12/30 08:54:42)
+ Update bundled *OpenBSD* cname.h to `1.6` (2020/12/30 08:53:30)
+ Update bundled *OpenBSD* engine.c to `1.26` (2020/12/28 21:41:55)
+ Update bundled *OpenBSD* regerror.c to `1.15` (2020/12/30 08:56:38)
+ Update bundled *OpenBSD* regex2.h to `1.12` (2021/01/03 17:07:58)
+ Update bundled *OpenBSD* regexec.c to `1.14` (2018/07/11 12:38:46)
+ Update bundled *OpenBSD* regcomp.c to `1.43` (2021/01/03 17:07:57)
+ Update bundled *OpenBSD* strlcpy to `1.16` (2019/01/25 00:19:25)
+ Update bundled *OpenBSD* reallocarray to `1.3` (2015/09/13 08:31:47)
+ Update bundled *OpenBSD* getopt_long to `1.32` (2020/05/27 22:25:09)
+ Update bundled *OpenBSD* basename to `1.17` (2020/10/20 19:30:14)
+ Add initial *Midipix* support
OpenVi 7.0.9 -> OpenVi 7.0.10: Wed Feb 9 16:36:25 2022
+ Silence some warnings and general style clean-up
+ Clarify text of some visual mode messages; use the POSIX thousands
numeric separator for displaying most line and character counts
+ Use `/var/tmp` for the `vi.recover` directory; on most Linux
systems, this persists across reboots and gives a higher chance
of recovery than `/tmp` which is often a memory-backed filesystem
+ New feature: If `ruler` is set, print a percentage after position
+ New feature: If `windowname` is set, always show the file name
+ New feature: If `bserase` (abbrev `bse`) is set, then any newly
backspaced characters are immediately erased from the screen
+ Handle `SIGQUIT` like `SIGINT`, which prevents `^\` (Control-\)
from causing ex-mode to abort and drop core; aligns closer to
Vim's behavior in ex-mode - which uses non-canonical input mode,
so `^\` doesn't cause a stop. The rationale for this change is
because we're using `^\` as a shortcut to enter our ex-mode (which
for `nex` uses standard canonical line-based input), if `SIGQUIT`
is unhandled, it's easy to abort by accident by sending more than
one `^\` in succession, which can happen on lagged connection
+ Fix a long-standing bug where using `^G` on an empty file would
include a random garbage byte in the displayed output
+ Reword "Already in the first column" to "Already at the first
column" to be consistent with the other movement error messages
+ Remove documentation files not explicitly under the 3-BSD license
+ Update header comment of all modified files
+ Reformat the ChangeLog to break lines at 76 columns
+ Convert tabs to spaces and adjust source indentation with `cppi`
+ Update docs; Markdown-ify `LICENSE` and rename to `LICENSE.md`
OpenVi 7.0.8 -> OpenVi 7.0.9: Mon Jan 31 21:43:08 2022
+ Add a missing include to fix compilation on Void with musl libc
+ Update `README.md`
OpenVi 7.0.7 -> OpenVi 7.0.8: Mon Jan 31 10:12:53 2022
+ Rework `README.md`
+ Drop `-pipe` and `-fomit-frame-pointer` for wider compatibility
+ Add support for building on macOS; tested on 12.1/x86_64/21C5021h
+ Add support for building on OpenBSD; tested on 7.0-current/ARM64
+ Normalize licensing, acknowledgements, and copyright statements
+ Normalize macros and conditional if/ifdef/ifndef's with `cppi`
+ Add support for building on FreeBSD; tested on 13.0-REL-p6/ARM64
+ Minor code clean-up
+ Drop memmove wrapper (for old systems with bcopy but no memmove)
+ Add support for building with musl libc
+ Add `imctrl` and `imkey` options, inspired by `cannactrl` and
`fepkey` options in `nvi-m17n` by itojun. If `imctrl` option is
set, the input method is controlled by using escape sequences
compatible with Tera Term and RLogin. The state of the input
method in commands specified by imkey option is saved and restored
automatically. This input method is deactivated upon returning to
command mode; this implementation taken from NetBSD-current's
`contrib/nvi`
+ Improve `make` output and use more logical compilation order
+ Add `virecover.8` man page adapted from NetBSD
+ Add a missing break in `common/log.c`
+ Avoid undefined behavior in `*BIT` macros; patch from NetBSD; also
apply patch from NetBSD for PR bin/52716
+ Update `.gitignore` and `.gitattributes`
OpenVi 7.0.6 -> OpenVi 7.0.7: Fri Jan 28 16:33:22 2022
+ Important fix to `GNUmakefile` for linking with Clang's `lld`
+ Remove installed man pages as part of the `uninstall` target
+ Workaround to accommodate `make clean all -j N' where `N` > 1
+ Clean-up whitespace and line lengths of sources and `GNUmakefile`
OpenVi 7.0.5 -> OpenVi 7.0.6: Thu Jan 27 16:45:12 2022
+ Important fix for back-end database file locking; also, switch
back to using the system libc-provided mkstemp functions to elide
some issues that would otherwise occur on networked filesystems
+ Add proper attribution for DragonflyBSD Project to `LICENSE` text
+ Correct `GNUmakefile` messages for the `make install` target
+ Clean-up excess and trailing whitespace in source files
OpenVi 7.0.4 -> OpenVi 7.0.5: Thu Jan 27 11:00:46 2022
+ No verbose build by default; set variables V (or DEBUG) to enable
+ No LTO and LGC by default; set variables LTO and/or LGC to enable
+ Don't attempt linking with libjemalloc or libmtmalloc by default
+ Clean-up headers to speed compilation time & decrease binary size
+ Import and adapt OpenBSD Berkeley DB from OpenBSD 7-current libc
+ Remove the unused "maintainer-clean" target from GNUmakefile
+ Build against the newly bundled OpenBSD Berkeley DB by default;
the imperfect Berkeley DB 3/4/5 support will remain available
OpenVi 7.0.3 -> OpenVi 7.0.4: Wed Jan 26 13:09:45 2022
+ New feature: "set visibletab" (abbrev "set vt") which toggles
displaying tabs visibly while editing, useful for Makefiles, etc
+ Decrease the width of the line-number column by one row
+ Increase the length of the divider decoration string (by 2x)
+ Improve the GNUmakefile to avoid remaking any non-stale targets
+ Portably seed the standard random number generator
OpenVi 7.0.2 -> OpenVi 7.0.3: Wed Jan 26 08:31:28 2022
+ GNUmakefile "install" target now installs docs (man pages)
+ Remove 'docs/internals/cscope.NOTES' and documentation references
+ General build, portability, and code readability improvements
+ Relicense new contributions under the same 3-clause BSD license
used by the overall project and update LICENSE file text
+ Remove unused headers and legacy documentation from the sources
+ Add standalone "strip" target to GNUmakefile which strips the
uninstalled compiled binary
+ Set visible tab character to '~' and expose option in GNUmakefile
+ Installed binaries are prefixed with 'o' (e.g. 'ovi') by default
+ Explicitly invoke the POSIX-compliant version of the awk utility
+ Clarify (and simplify) GNUmakefile and build configuration
+ Update ChangeLog and docs for consistency, fix spelling and typos
+ Update LICENSE text
OpenVi 7.0.1 -> OpenVi 7.0.2: Tue Jan 25 13:44:48 2022
+ Debugging builds now default to compiling with '-Wall -Wextra'
+ Only pass '-pipe' to the compiler for non-debugging builds
+ Expand the formatting of the usage help text for readability
+ Change the DEBUG_VI GNUmakefile flag to simply DEBUG
+ For debug builds, document the existence of -T (Trace) in usage
+ Don't strip the binary by default; add "install-strip" target
+ Make clean targets more robust; warn if unable to remove 'bin'
+ Add standard "clean", "distclean", "realclean", "mostlyclean", and
"maintainer-clean" targets to GNUmakefile
+ Increase the default escapetime to 2/10ths of a second
+ Add OpenBSD-compatible mkstemp function allowing for longer names
+ Silence some potential warnings with explicit casting
+ Exit with an error when screen is too small for visual mode
+ Apply Debian's patch to fix backwards sentence moving
+ Fix horizontal scroll count; patch from Debian
+ Change a #define to a typedef in regex library
+ Fix some typos and minor errors in the documentation and tutorials
+ Update .gitignore to include patch/diff detritus; no binary change
+ Adjust calculation to avoid "BDB0511 page sizes must be a
power-of-2" warning; BDB 1.85 only cared if page size was even;
closes GH issue #3
+ Apply .exrc writeability patch from hesso at
pool.math.tu-berlin.de
+ If TERM is unset, set to NULL, or otherwise unknown, first attempt
to fallback to "vt100"; exit with a fatal error if "vt100" fails
+ Disallow pattern spaces which would cause intermediate
calculations to overflow size_t. (CERT: VU#695940)
+ Bump version and use -dev to denote development version
+ Reformat ChangeLog for consistency; various spelling corrections
+ Update ChangeLog with OpenVi history
+ Format OpenBSD commits to ChangeLog format
+ Clean-up of legacy documentation; adjust formatting
+ Simplify GNUmakefile rules
+ Update GNUmakefile; correct a typo in a message
+ Update LICENSE text and formatting
OpenBSD 7.0 -> OpenVi 7.0.1: Mon Jan 24 10:37:28 2022
+ OpenVi created supporting glibc-based Linux systems
+ Create GNUmakefile and adapt build system
+ Attempt to detect and use mtmalloc or jemalloc if available
+ Support builds with post-1.8.5 BerkeleyDB versions (using BDB
1.8.5 emulation) but at the expense of preservation and recovery
+ Create initial README.md stub
Mon Oct 25 14:17:24 2021
+ vi(1): fix use after free with unsaved buffer. Issuing a zero-arg
ex_edit command (:e) while using a named buffer with no backing
file caused vi(1)/ex(1) to free the strings representing the
buffer name and the name of the temporary file. This change
detects the situation and only frees the newly allocated EXF
structure (ep). Reported on bugs@ by kn@. OK millert@
Sun Oct 24 21:24:15 2021
+ For open/openat, if the flags parameter does not contain
O_CREAT, the 3rd (variadic) mode_t parameter is irrelevant
Many developers in the past have passed mode_t (0, 044, 0644,
or such), which might lead future people to copy this broken
idiom, and perhaps even believe this parameter has some meaning
or implication or application. Delete them all. This comes out of
a conversation where tb@ noticed that a strange (but intentional)
pledge behavior is to always knock-out high-bits from mode_t on a
number of system calls as a safety factor, and his bewilderment
that this appeared to be happening against valid modes (at least
visually), but no sorry, they are all irrelevant junk. They could
all be 0xdeafbeef. ok millert@
OpenBSD 6.9 -> OpenBSD 7.0: Thu Sep 2 11:19:02 2021
+ Make all signal handler functions async-signal-safe by
deleting the redundant "killersig" struct member and using the
existing sig_atomic_t cl_sigterm variable instead
+ While here, garbage collect the h_hup() signal handler which is
essentially identical to h_term(). This also gets rid of the
last #define & #undef in cl_main.c
Wed Sep 1 14:28:15 2021
+ As a first step towards safe signal handling, improve the
h_int() and h_winch() signal handlers to make one single store
to a sig_atomic_t variable. Note that the h_hup() and h_term()
signal handlers are still unsafe after this commit because they
also set the "killersig" (how fitting!) field in a global struct
OpenBSD 6.8 -> OpenBSD 6.9: Tue Apr 13 15:39:21 2021
+ Require that the argument to the window option be non-zero. A
zero-row window would not be usable (no room to edit) and the
code is full of assumptions that "sp->t_rows - 1" >= 0. From
Erik Ruotsalainen, fixes a bug reported by Paul de Weerd
+ Ignore expandtab setting when in command mode. Fixes things like
searching for a literal tab character when expandtab is enabled;
from `nvi2` (leres); OK martijn@
Mon Mar 8 02:47:25 2021
+ Add some references, most of these were removed when we stopped
building and installing USD/SMM/PSD docs
OpenBSD 6.7 -> OpenBSD 6.8: Tue Jan 26 18:19:43 2021
+ Satisfy -fno-common by repairing one enum decl; ok mortimer@
OpenBSD 6.6 -> OpenBSD 6.7: Sun May 24 13:33:55 2020
+ Correct one statement about how the 'm' command works, talk
less about ancient terminals, employ the more usual term "caret"
rather than "up-arrow", and fix a few minor nits
OpenBSD 6.5 -> OpenBSD 6.6: Thu Apr 30 10:40:21 2020
+ Add an expandtab option, similar to what vim supports. If set,
expands tabs to spaces in insert mode as well as when shifting
and indenting/outdenting. If quoted with ^V, a literal tab is
inserted. Adapted from NetBSD, but this implementation more
closely matches vim's behavior. OK dlg@
Fri Oct 4 20:12:01 2019
+ Better link "set" and "SET OPTIONS"; original diff from sven
falempin, tweaked a bit by myself
Mon Jul 22 12:39:02 2019
+ In secure mode (-S), skip sending mail when executing the
:pre[serve] command or when dying from SIGTERM. This way,
creating the recovery file works again without re-adding "proc
exec" to the pledge(2). As reported by Jesper Wallin <jesper
at ifconfig dot se>, this got broken by common/main.c rev. 1.29
(Nov 19, 2015). The general direction of the fix was suggested
by brynet@. OK brynet@ and no opposition when shown on tech@
OpenBSD 6.4 -> OpenBSD 6.5: Tue May 21 09:24:58 2019
+ Also apply stricter pledge when secure mode is set via rc file
or command
OpenBSD 6.3 -> OpenBSD 6.4: Thu Jan 24 15:09:41 2019
+ Fix a crash on long lines when switching to another file by
setting SC_SCR_CENTER which will cause the offsets in HMAP to
be reset when painting the screen. OK martijn@ otto@
Mon Sep 17 15:41:17 2018
+ Use the strict pragma for better warnings
Fri Jul 13 20:06:10 2018
+ Remove Cscope leftover and a stray comma
+ Unused variable
Wed Jul 11 06:39:23 2018
+ Remove an old (and false) comment. REALLOC now free(3)s
the code if realloc fails
OpenBSD 6.2 -> OpenBSD 6.3: Mon Feb 12 01:10:46 2018
+ Simplify documentation of split-screen mode, avoiding abuse
of [] to sometimes mean "character set", which conflicts with
the normal meaning of "optional element" in manual pages
+ While here, add a few related clarifications and tweak a
few details. Triggered by a minor bug report from <trondd at
kagu-tsuchi dot com>, and by bentley@ subsequently pointing out
the abuse of []. Patch using input from jmc@, who also agreed
with some previous versions
Sat Feb 3 15:44:36 2018
+ The recover script should have the same sanity checks as
recover.c. Specifically, open files with O_NONBLOCK and enforce
a mode of 0600
Thu Dec 14 10:02:53 2017
+ Enable the awk scripts to generate ex_def.h and
options_def.h. These scripts generate the enums required for
the ex commands and vi options. Before these lists had to
be maintained either by hand or someone had to stumble upon
these scripts and figure out how to use them. By enabling them
these headers are now always in sync based on the comments in
the corresponding source files, which are a lot harder to miss
during an update than an extra file
Sun Nov 26 09:59:41 2017
+ Fix segfault which could be triggered by deleting a backwards
sentence if cursor's current line was blank:
Fri Nov 10 18:31:36 2017
+ When tracing is compiled in make sure it flushes its content
to disk as soon as the TRACE function is called. This helps
while debugging crashes
+ Fix a use after free when sending SIGHUP or SIGTERM to vi when
in editing mode
+ Add rcv_openat() function that does the open, makes sure it
is a regular file with the expected permissions and locks it
Inspired by changes in NetBSD by Christos. OK martijn@
+ Avoid using system(3) when running "sendmail -t". We already
have the recover file fd open so just run sendmail with stdin
set to the recover file. OK martijn@
OpenBSD 6.1 -> OpenBSD 6.2: Tue Aug 22 20:27:18 2017
+ Do not treat comma as part of the command modifier
Mon Jul 31 19:45:49 2017
+ Silence some warnings generated by clang. Original diff by
espie@ with some minor tweaks by myself
Thu Jul 20 08:37:48 2017
+ Replace usage of strtol() with strtonum()
Wed Jul 5 18:56:33 2017
+ Avoid double space caused by end-of-sentence detection
requested by jmc@
+ Nits about trailing punctuation found with mandoc -Tlint
Mon Jul 3 14:30:11 2017
+ Markup fixes
+ Remove settings that were unimplemented for 20 years; update
STANDARDS
Fri Jun 30 14:42:05 2017
+ Add mdoc(7) macros to vi's built-in lists of roff
paragraph/section macros
Sat Jun 24 16:30:47 2017
+ Fix a check in ADD_SPACE_{GOTO,RET} that potentially allowed
for a NULL-dereference
Tue Jun 20 07:32:56 2017
+ Better document the :s ex command and its variants
Thu Jun 15 06:44:47 2017
+ "10th's of a second" -> "tenths of a second"
Mon Jun 12 18:38:57 2017
+ Use openat() and unlinkat() instead of chdir()ing to the
recovery dir. Since we use flock() and not fcntl() locking we
can open the recovery file read-only. OK martijn@
Wed Apr 26 13:14:28 2017
+ Remove extraneous ", NULL" in the assignment of msgstr which was
leftover from when msg_cat() was removed. From Anton Lindqvist
Tue Apr 18 01:45:33 2017
+ free(NULL) is ok so use it; from Michael W. Bombardieri
OpenBSD 6.0 -> OpenBSD 6.1: Fri Jan 20 00:55:52 2017
+ Nuke some excess whitespace
Sun Dec 18 18:28:38 2016
+ Use %zu/%d to print size_t/ssize_t. Cast recno_t
(a.k.a. u_int32_t) to (unsigned long) to match %lu formats. Makes
gcc happier and quieter
+ Nuke more unused variables
Sat Nov 5 16:21:56 2016
+ Remove syscall.ph from vi.recover
Fri Sep 2 15:38:42 2016
+ Fix the begin of word issue in vi(1). Similar fix went in sed
and ed
OpenBSD 5.9 -> OpenBSD 6.0: Sat Aug 27 04:07:42 2016
+ Pull in <sys/time.h> for struct timespec and timeval
Sun Aug 14 21:47:16 2016
+ Kill '#if defined(DEBUG) && 0' blocks that used %q
Mon Aug 8 15:09:32 2016
+ /tmp and /var/tmp are the same, consistently use the former
in both build/recover and documentation
Mon Aug 1 18:27:35 2016
+ Remove vi's "directory" option and TMPDIR support
Thu Jul 7 09:26:25 2016
+ biff, mesg, vi: only consider ACCESSPERMS for setting tty mode
Wed Jun 29 20:38:39 2016
+ If /tmp/vi.recover doesn't exist, don't create it. Warn once
that it doesn't exist, afterwards fail silently
Sat May 28 18:30:35 2016
+ Test if stdin is a terminal before resetting the tty state. Diff
supplied by Kai Antweiler
Fri May 27 09:18:11 2016
+ Revert CHAR_T removal. Some signedness flaws were
introduced. Found the hard way by jca@
Sat May 7 14:03:01 2016
+ Free memory if realloc fails. The application is most likely
to terminate after a failure, but if it does not we better clean
up after ourselves
Thu May 5 20:36:41 2016
+ Remove __sigblockset. This is a leftover after the removal of
the signal blocking code in common/gs.h rev 1.14
Mon May 2 20:51:35 2016
+ Remove pointless comment. getcwd(3) is safe
+ Remove CHAR_T in favor of native types
Wed Apr 20 19:34:32 2016
+ Remove pointless reenter variable
Tue Apr 19 17:42:09 2016
+ Remove not implemented declaration of sscr_pty
+ Remove some useless code
Wed Mar 30 06:38:40 2016
+ For some time now mandoc has not required MLINKS to function
correctly; logically complete that now by removing MLINKS
from base
OpenBSD 5.8 -> OpenBSD 5.9: Sat Mar 19 00:21:28 2016
+ By issuing :e +something in vi(1) this uncovers a backwards
memcpy with the code because the 2 buffers overlap and in order
to solve it then replace memcpy(3) call by memmove(3)
Thu Mar 17 03:44:05 2016
+ Add error checking for COLUMNS/LINES environment variables
Sun Mar 13 18:30:43 2016
+ Remove an extra space before ^\ help message. Fixes alignment
in viusage
Thu Feb 11 16:34:12 2016
+ Update comment: the #ifdef VDSUSP was removed in r1.22
Tue Feb 9 07:41:12 2016
+ Avoid special characters; from Michael Reed
Wed Feb 3 01:47:25 2016
+ Remove needless alias macros for malloc and calloc. No binary
change. I got this up-streamed a few weeks ago
Sat Jan 30 21:34:57 2016
+ /var/tmp is dead, long live /tmp
+ Replace tail with basename
+ Replace progname variable in gs structure with getprogname
Wed Jan 27 22:46:02 2016
+ remove v_estr in favor of warn and warnx
Wed Jan 27 22:38:12 2016
+ Replace fprintf+exit with errx. No functional change
Wed Jan 20 08:43:27 2016
+ Remove ARG_CHAR_T, a relic from when the code was written
K&R style
Sat Jan 9 16:13:26 2016
+ decls before code; from Martijn van Duren
Wed Jan 6 22:46:59 2016
+ Remove mention of message catalog dir
+ We don't use configure so this file is full of lies and we
are better off without it
+ Remove msgcat from the documentation
+ Remove prototype for now-deleted f_msgcat()
+ Remove the actual message catalogs. From Martijn van Duren
+ Remove the msg_cat() function and adjust its former
callers. From Martijn van Duren
+ Remove the numeric identifiers at the beginning of the messages
which used to be used as the message number to lookup in the
catalog. From Martijn van Duren
+ Remove the message catalog DB. This removes the msg_open()
and msg_close() functions along with the msgcat command. From
Martijn van Duren
Mon Dec 28 19:24:01 2015
+ Use err() instead of custom perr() function. Also applied by
`nvi2` upstream; From Martijn van Duren
Mon Dec 7 20:39:19 2015
+ Remove needless type casts and corresponding type parameters
from allocation macros. No binary change
Thu Dec 3 08:13:15 2015
+ After inserting a backslash, don't treat ^H ^? or ^U as special
cases. These days, ^V to escape is a universal feature and
needing two keystrokes to delete backslashes is really annoying
Tue Nov 24 12:56:31 2015
+ Update the other documentation to match the new filec default
+ Turn on filename tab completion in vi by default
Mon Nov 23 09:03:01 2015
+ Remove Cscope references in documentation
Fri Nov 20 04:12:19 2015
+ vi -S doesn't need proc or exec
Thu Nov 19 19:30:44 2015
+ "tty proc exec", not "proc exec tty"
+ Remove Cscope support in vi
OpenBSD 5.7 -> OpenBSD 5.8: Sun Nov 15 01:22:36 2015
+ Vi needs flock, for those who haven't set nolock in .exrc
for years
+ Basic pledge for vi
Mon Sep 14 20:06:58 2015
+ Avoid .Ns right after .Pf, it's pointless
+ In some cases, do additional cleanup in the immediate vicinity
Tue Jul 7 18:34:12 2015
+ Fix a regression caused by timespec changes when vi is run
without a file to edit. Based on a diff from Patrick Keshishian
OpenBSD 5.6 -> OpenBSD 5.7: Fri Apr 24 21:48:31 2015
+ struct timespec/clock_gettime(3) conversion for vi(1)
Tue Apr 21 01:41:42 2015
+ init both fds passed to pipe as -1 instead of init'ing one
twice ok deraadt@ guenther@ miod@ millert@
Sun Apr 19 01:10:59 2015
+ Don't lock the file for "vi -R" or "view". OK deraadt@
Fri Apr 10 18:05:51 2015
+ This changes vi to use resizeterm(3) instead of re-initializing
curses on window re-sizes, which was leaking massive amounts
of memory
Sun Mar 29 01:04:23 2015
+ Remove SA_INTERRUPT, HISTORIC_PRACTICE, and HISTORICAL_PRACTICE
using unifdef. It seems clear that no one was using these
(SA_INTERRUPT didn't even build the other way). Tweak comments
as appropriate
Sat Mar 28 12:54:37 2015
+ vi was using two separate isblank functions: one defined in
<ctype.h> and the other #defined in common/key.h. There is no
reason to have both. For consistency use the isblank function
from <ctype.h>, remove the #define in common/key.h, and add
#include <ctype.h> to the files that were missing the header
Fri Mar 27 04:11:25 2015
+ Some vi cleanup, unifdef's some signal blocking code that has
never been enabled in our tree, also removes some stragglers
from a global struct referencing nonexistent Tcl/TK and "IP
support". And finally.. delete an empty file missed by earlier
cleanup by bentley@
Tue Mar 17 10:08:18 2015
+ Don't use the wrong escape for < and >. Tweak wording to match
the page
Fri Mar 13 19:58:40 2015
+ Remove the first comma from constructs like ", and," and
", or,": you can use "and" and "or" to join sentence clauses,
and you can use commas, but both hinders reading
Tue Mar 10 00:10:59 2015
+ Display "Search wrapped" even when searching from the end of
the file
Sat Feb 28 21:51:56 2015
+ Reduce usage of predefined strings in man pages
Fri Feb 6 22:29:31 2015
+ Do not rely on unspecified behavior for the size_t overflow
check. OK miod@
Fri Jan 16 06:39:28 2015
+ Replace <sys/param.h> with <limits.h> and other less dirty
headers where possible
+ Annotate <sys/param.h> lines with their current reasons
+ Switch to PATH_MAX, NGROUPS_MAX, HOST_NAME_MAX+1, LOGIN_NAME_MAX
+ Change MIN() and MAX() to local definitions of MINIMUM() and
MAXIMUM() where sensible to avoid pulling in the pollution. These
are the files confirmed through binary verification. ok guenther@,
millert@, doug@ (helped with the verification protocol)
Thu Nov 20 08:50:53 2014
+ Remove the vi Perl API
Wed Nov 19 03:42:40 2014
+ Remove ifdef checks for LIBRARY. It is undocumented and triggers
the same conditional inclusions as PURIFY does
Fri Nov 14 20:27:03 2014
+ _PATH_BSHELL, _PATH_SENDMAIL, _PATH_TMP and _PATH_TTY are defined
in <paths.h> and _PATH_SYSV_TTY is unused. All of them can be
removed from pathnames.h. The other defines can be made
unconditionally
+ The 'tcl' command in vi does nothing, except to print the message
"Vi was not loaded with a Tcl interpreter". Printing the standard
message for unknown commands would be equally descriptive with the
benefit of reducing code size
+ The vi editor contains code for two different file locking
methods; one using flock(), the other using fcntl(). The fcntl
method is unused and has severe limitations (as described in a
code comment); removed it for sake of readability
Wed Nov 12 16:29:04 2014
+ Remove more portability bits for older systems; from Martin
Natano
+ ANSIfy vi
Mon Nov 10 21:40:11 2014
+ Remove various bits of autoconf cruft. from Martin Natano
+ Remove ipc leftovers. from Martin Natano
+ Remove old, unnecessary compat code. from Martin Natano
OpenBSD 5.5 -> OpenBSD 5.6: Thu Nov 6 11:35:02 2014
+ Clean up unused header files and docs referring to them
+ Remove old curses support in vi
OpenBSD 5.4 -> OpenBSD 5.5: Tue Oct 14 22:23:12 2014
+ Create a REALLOCARRAY macro, and use it where it gives us
overflow protection for free ok guenther@
Wed Oct 8 00:53:45 2014
+ Bump max columns out to 768 since screens are getting bigger
Tue Sep 9 14:10:35 2014
+ We no longer need to convert "\<" and "\>" to "[[:<:]]" and
"[[:>:]]" respectively now that the former is natively supported
OK jsg@
Thu Jul 10 20:33:42 2014
+ Add missing include file to bring in protos
Sun Dec 1 20:22:34 2013
+ Change the file reference queue from CIRCLEQ to TAILQ
+ Change the tags queue from CIRCLEQ to TAILQ
+ Change the tag queue from CIRCLEQ to TAILQ
+ Convert the ranges CIRCLEQ to TAILQ
Thu Nov 28 22:12:40 2013
+ Convert the display screens and hidden screens CIRCLEQ's
to TAILQ's
Wed Nov 27 08:52:41 2013
+ Zap some pointer casts became extra (and thus dangerous)
after recent CIRCLEQ removal
Tue Nov 26 17:48:01 2013
+ Fix a possible double-free/NULL deref in msg_print
+ Tweak a tortuous manual loop into a TAILQ_FOREACH()
+ Fix condition after CIRCLEQ -> TAILQ conversion; ok zhuk@
+ Fix incorrectly converted CIRCLEQ_END comparison to prevent
NULL deref's
Mon Nov 25 23:27:11 2013
+ Replace _texth CIRCLEQ with TAILQ. One down, five to go
OpenBSD 5.3 -> OpenBSD 5.4: Thu Aug 22 04:43:40 2013
+ Correct format string mismatches turned up by -Wformat=2
Sat Jun 22 18:52:52 2013
+ Tweak optimization flags on landisk until I have time to
investigate further
Tue May 14 11:51:41 2013
+ When ^W (WERASE) is hit in insert mode it's possible that the
line buffer is accessed out of bounds. If 'max' == 0 and
'tp->cno' == 1 the 'tp->cno' value is first reduced by one and
then 'tp->lb' is accessed at 'tp->cno' - 1. Also remove dead
(and incorrect) code in the TXT_ALTWERASE case; from Arto Jonsson
OK martynas@
OpenBSD 5.2 -> OpenBSD 5.3: Fri May 3 20:43:25 2013
+ Use open(2) / fstat(2) instead of stat(2) / open(2) for checking
proper permissions of "local" .exrc or .nexrc files
Mon Apr 29 00:28:23 2013
+ Use FD_CLOEXEC instead of 1; from David Hill
Thu Dec 20 20:28:12 2012
+ Use openpty() rather than hand-rolled pty opening code
ok millert@
OpenBSD 5.1 -> OpenBSD 5.2: Mon Dec 3 22:05:46 2012
+ Fix hang when exiting shell in script mode. OK naddy@
OpenBSD 5.0 -> OpenBSD 5.1: Tue Jan 17 08:18:36 2012
+ Flesh out the VI COMMANDS section somewhat; diff from Alexis
Fouilhe; help; ok sobrado@
OpenBSD 4.9 -> OpenBSD 5.0: Wed Dec 28 01:52:33 2011
+ These utilities were already part of 1BSD, and some authors
are known. All facts from the CSRG archive CD 1, also available
from minnie.tuhs.org. Feedback and OK sobrado@, ok jmc@
Fri Jul 29 13:24:50 2011
+ Document vi/ex regular expressions, and where they differ from
those documented in re_format(7)
Sun Jul 10 13:20:25 2011
+ Rename O_DIRECTORY to O_TMP_DIRECTORY to avoid a namespace
collision with sys/fcntl.h. OK deraadt@
Mon May 16 16:41:58 2011
+ Better document some of the terminology used in the VI COMMANDS
section; from Alexis Fouilhe
OpenBSD 4.8 -> OpenBSD 4.9: Mon May 2 11:14:11 2011
+ No need to escape `|'; as discussed with schwartze@
Tue Apr 12 18:08:00 2011
+ Better document vi's startup (in terms of environment variables
and config files)
Sun Apr 10 21:21:50 2011
+ Fix display glitch leading to crash. If we're reformatting,
check the screens necessary to display the line and modify head
or tail of the smap accordingly; since it might have changed
due to e.g. smaller tabstop value
Thu Mar 31 20:40:51 2011
+ Add a BUFFERS section, to explain how they work; from Alexis
Fouilhe - many thanks to him for his work on this
Thu Mar 17 11:34:53 2011
+ since we stopped installing the USD docs, it no longer makes
sense for DESCRIPTION to point to SEE ALSO
OpenBSD 4.7 -> OpenBSD 4.8: Wed Jan 5 14:01:32 2011
+ Fix typo, PR#6538
Mon Oct 18 14:42:16 2010
+ Remove references to now removed USD/PSD/SMM docs
Sun Oct 17 22:54:37 2010
+ Stop installing me(1) and ms(1) source code. We will soon get
rid of groff in base, so there is no longer any way to use
these files with base. No opposition on tech@
Wed Sep 29 07:44:56 2010
+ Various EXIT STATUS fixes; from Daniel Dickman
Fri Sep 24 06:40:12 2010
+ Add a little padding to make SYNOPSIS line up nicely
Sun Jul 25 20:23:41 2010
+ ^U scrolls backwards, not forwards; from marrob at lavabit com
Sun Jul 18 21:45:01 2010
+ Remove some nasty hacks
Thu Jul 15 20:51:38 2010
+ More delimiters that need quoting inside macros, hunted down
by jmc@, who asked me to commit because he is just running out
of the door
OpenBSD 4.6 -> OpenBSD 4.7: Sat May 29 06:40:00 2010
+ subsitution -> substitution; from Yoshihiro Ota, FreeBSD PR#130874
Sun Nov 22 22:51:58 2009
+ Fix for flash defaulting to off, pointed out by jmc@
+ Change the flash option to be off by default. Now that xterm
has the flash capability in terminfo, vi was using it instead
of beeping, but it is too slow for some machines
Sun Nov 15 04:32:31 2009
+ Do not leak a lot of memory if a small memory allocation fails,
found by parfait@ ok kettenis@ guenther@
Sat Nov 14 17:44:53 2009
+ Fix leaks in error paths found by parfait ok deraadt@
Tue Oct 27 23:59:19 2009
+ Remove rcsid[] and sccsid[] and copyright[] that are essentially
unmaintained (and unmaintainable). These days, people use source
These id's do not provide any benefit, and do hurt the small
install media (the 33,000 line diff is essentially mechanical); ok
with the idea millert@, ok dms@
OpenBSD 4.5 -> OpenBSD 4.6: Tue Oct 20 09:54:47 2009
+ ex(1) and vi(1) are different editors. The diff is based on the
original printed edition of the User's Reference Manual from
USENIX and O'Reilly. 4.4BSD had exactly this, that is much
more accurate than our current description (while here, Jason
observed that both FreeBSD and NetBSD do the same)
Wed Jun 10 14:03:18 2009
+ Use poll() instead of select(). The sscr_check_input()
bit is adapted from nvi 1.81. Tested by several people during
the hackathon
OpenBSD 4.4 -> OpenBSD 4.5: Tue Jun 2 00:21:32 2009
+ If the read from the tty fails with EAGAIN, pop back up to the
select. Seems to happen occasionally even though select reported
the fd is ready. OK ray@
Mon Apr 27 19:41:10 2009
+ It's called `msgcat', not `mesgcat'
Sun Apr 19 13:12:28 2009
+ Fix tagnext and tagprev; from Patrick Keshishian
Sun Feb 8 17:15:08 2009
+ Bump the POSIX reference in STANDARDS to IEEE Std 1003.1-2008,
with a few updates to follow
Sun Feb 1 21:57:21 2009
+ Move variable declarations around to compile with GCC 2
OpenBSD 4.3 -> OpenBSD 4.4: Wed Jan 28 21:30:43 2009
+ Remove undocumented support for "-e" in ex(1)
+ ex(1), vi(1), and view(1) have different synopses; each nex/nvi
utility should manage the right set of options and return an
appropriate usage when required
Thu Sep 25 11:37:03 2008
+ do not hard code the editor name in the message displayed by
"-r" when there are no files to recover as this flag is used
by ex(1) and view(1) too
Fri Aug 29 13:07:13 2008
+ Fix nvi's Cscope support in the case that someone provided a
filename without a directory (e.g. :cscope add cscope.out)
Found and fixed by Paul Irofti, with help from me; Thanks!
OpenBSD 4.2 -> OpenBSD 4.3: Thu Jun 12 21:22:48 2008
+ Remove superfluous "usage:" from v_estr()
Fri Mar 28 17:58:20 2008
+ Minor ansification from Gleydson Soares
Sat Mar 8 18:11:42 2008
+ Avoid infinite recursion on certain error conditions; from
NetBSD; ok millert@
+ Fix vs_columns() for the "set nu" case. Avoids segfaults for
very long lines containing tabs; from Nathan Houghton; ok millert@
Tue Mar 4 18:55:44 2008
+ Fix ifdef DEBUG code; ok krw@ deraadt@
OpenBSD 4.1 -> OpenBSD 4.2: Sat Nov 24 12:59:28 2007
+ Some spelling fixes from Martynas Venckus
Wed Oct 17 20:10:44 2007
+ Remove "unused variable" warnings
Fri Sep 14 14:29:20 2007
+ Remove some warnings: unused variable `variable' `variable'
might be used uninitialized in this function
Tue Sep 11 15:47:17 2007
+ Use strcspn to properly overwrite '\n' in fgets returned buffer
Sun Sep 2 15:19:07 2007
+ Use calloc() to avoid malloc(n * m) overflows; checked by djm@
canacar@ jsg@
Thu Jul 26 16:11:56 2007
+ Add the correct file descriptor to rdfd when cycling through
the list of scripting windows. Appears to be a cut and paste
error. OK deraadt@
Thu May 31 19:19:00 2007
+ Convert to new .Dd format
Wed May 30 04:41:33 2007
+ Use a consistent text for STANDARDS
+ Note which options are extensions to POSIX
OpenBSD 4.0 -> OpenBSD 4.1: Mon May 14 12:32:29 2007
+ Use sys/queue macros instead of accessing fields directly;
No binary change. ok krw@
Tue Mar 27 18:24:06 2007
+ Catch OOB access for tag searches matching lines ending with a
'\'; patch from Patrick Keshishian with a twist by me. ok thib@
Tue Mar 20 03:56:12 2007
+ Remove some bogus *p tests from charles@ longeau@ ok deraadt@
millert@
Thu Dec 21 21:38:17 2006
+ Fix !command piping by Alexander Bluhm in PR#5325. Tested by
quite a few on tech@
OpenBSD 3.9 -> OpenBSD 4.0: Mon Dec 11 20:50:54 2006
+ RFC 3834 support: Auto-Submitted: auto-generated on lots of
things; from Tamas TEVESZ; ok millert@
Fri Jul 7 12:05:10 2006
+ Don't add space for line numbers twice
Sun Jun 18 20:41:24 2006
+ Fix memleak; From Coverity Scan, CID#3135. From simonb@ NetBSD
Tue May 30 19:43:27 2006
+ Avoid double fclose(), from coverity/NetBSD; ok otto@
OpenBSD 3.8 -> OpenBSD 3.9: Sun May 21 19:21:30 2006
+ Backport fix from nvi 1.81.5: do not go into loop if :set
number and :set leftright and the cursor moves to an empty line
PR#3154; ok beck@
Fri Apr 28 19:48:15 2006
+ Ensure NULL termination after read(); ok ray@
Sat Apr 22 03:09:15 2006
+ Removes unused variables and rename variables shadowing
external variables; no binary change
Mon Mar 20 01:00:36 2006
+ If we're in visual mode reading a command, check the termination
value of v_tcmd() and bail if it's not TERM_OK as opposed to
in a more specific case. This is based on the NetBSD ^C fix
but after discussion with otto@. While it did not affect the
specific crash it is more correct
Wed Mar 15 23:43:27 2006
+ Handle ^C correctly, morph it to escape key so the input
is correctly finished for a potential replay; if not, simply
bail out and notify that something wrong occurs. Callers will
cope. Consistent with what vim and Solaris vi do. Fixes a crash
described in NetBSD PR#11544, fixed by aymeric@ ok otto@ ray@
Sat Mar 11 07:04:53 2006
+ Fixes the `optindx' might be used uninitialized in this function
warning, fixes a spacing nit in a macro, and cleans up a very
bad preprocessor abuse (``if LF_ISSET(OS_DEF)''!)
+ Silence 2 warnings
+ Silence another 39 warnings
+ Silence uninitialized variable warning
+ Make FLUSH macro more function-like, so there are no hidden
surprises; no binary change
+ Initialize p to NULL to prevent gcc warning. Clarify a for
statement
Sat Mar 4 16:18:04 2006
+ Fix "the the"
Fri Feb 17 19:12:41 2006
+ Fix use after free. Problem hunted down by wilfried@; ok fgsch@
millert@
OpenBSD 3.7 -> OpenBSD 3.8: Sun Jan 8 21:10:04 2006
+ Remove unused NADD_USLONG macro, and remove unused sp argument
from NADD_SLONG; no functional change
+ Fix one more uninitialized variable scenario; from Ray Lai
+ Make sure we can exit from a loop in v_key_init() regardless
of the locale we're in; from Ray Lai
+ Appease GCC 3 and the C gods by fixing a couple of undefined
statements; from Ray Lai
+ Explicit braces around macro fields and logical operations,
gets rid of 148 warnings, no functional change
OpenBSD 3.6 -> OpenBSD 3.7: Mon Oct 17 19:04:19 2005
+ Use queue macros instead of directly accessing fields
ok pat@ "put it in" deraadt@
Thu Apr 21 15:39:31 2005
+ Spelling typo in comment; from ray
Thu Apr 21 09:00:25 2005
+ Avoid the "tcsetattr: Interrupted system call" fatal error
when resizing using a window manager that continuously sends
resize events; ok camield@ miod@
Thu Mar 10 18:03:45 2005
+ -v description comes before -w
+ Also a sentence tweak
Sun Jan 9 01:44:35 2005
+ Tidy up FAST STARTUP
+ Better example
+ Better section reference
Sat Jan 8 05:22:25 2005
+ Fix for FreeBSD PR#12801 from Sven Verdoolaege (nvi maintainer)
via FreeBSD (an infinite loop at certain case when options
"comment" and "leftright" are used)
+ 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
+ When an error occurs in v_txt(), leave input mode
too. Otherwise, (among other things) db_get() thinks it can
reuse 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. From NetBSD, fixes NetBSD
PR#21797
+ Move the license into the body of the man page; ok millert@
Fri Jan 7 15:04:02 2005
+ Remove line in copyright declaration that conflicts with the
LICENSE file. OK bostic@sleepycat.com
OpenBSD 3.5 -> OpenBSD 3.6: Mon Nov 29 21:51:08 2004
+ Lowercase for consistency
+ Spell precede correctly. 'looks fine' millert@ krw@ ok jmc@
OpenBSD 3.4 -> OpenBSD 3.5: Mon Oct 4 21:45:59 2004
+ Refer to re_format.7 rather than egrep.1 for a description
of EREs
Fri Apr 9 12:12:44 2004
+ ex is not a screen editor
Fri Mar 19 08:14:52 2004
+ Clarify -c
Fri Feb 20 20:05:05 2004
+ Add `ruler' to the list of helpful options; suggested by millert@
+ Add section on helpful ex options; suggested by and ok millert@
Fri Feb 20 13:15:51 2004
+ Cleanup of 6.2: Options, set, and editor startup files
Mon Feb 9 21:16:06 2004
+ Point people to ex tutorial
+ Install edit USD; this has been updated/reworded to work as
an ex tutorial
Fri Jan 30 23:39:22 2004
+ Use paper.txt, rather than some arbitrary target
+ Some additional cleanup
+ Point people to 13.ex, and remove some unnecessary text from
SEE ALSO
Fri Jan 30 23:14:25 2004
+ Install exref; includes updates to sync with current behaviour
fixes, help, and ok millert@
Sun Jan 25 23:22:10 2004
+ Install all the catalogs; as cvs forgot to check this file in
when those were added; millert@ ok
Sat Jan 24 12:32:55 2004
+ Oops. no need for vitut comment
+ Install vi tutorial docs; these have been updated to reflect
reality; help and ok millert@
+ Document how file recovery works on OpenBSD; ok millert@
+ Make vi reference card and vi tutorial easier to find
+ Use -compact for FILES
Fri Jan 16 13:08:32 2004
+ Point people to vi.ref now that it's installed (and get its
name right)
+ Correct a path and Nm
Thu Jan 15 11:17:04 2004
+ Return documented lines option to original (default) value
as pointed out by millert@, it's terminal dependent
+ Update vi.ref to reflect reality; help and ok millert@
Wed Jan 14 23:40:01 2004
+ Comment out reference to index.so when we are building index.so
itself. With changes by jmc@
Mon Jan 12 18:16:50 2004
+ Install vi.ref in /usr/share/doc/usd (directories already
exist for it). OK jmc@
+ There is no typewriter font in nroff so just use the roman font
instead. Fixes bizarre font problems formatting vi.ref via nroff
OK jmc@
+ Use a 5n margin on the right & left sides so the text version
formats nicely. OK jmc@
+ Pass groff the -U flag so that building the index works. OK jmc@
Wed Jan 7 12:46:48 2004
+ Corrections to SET OPTIONS
+ s/environmental/environment/
+ Corrections to the EX COMMANDS section
Fri Jan 2 21:37:48 2004
+ Some corrections/improvements to the VI COMMANDS section
+ use standard section ENVIRONMENT, rather than ENVIRONMENT
VARIABLES; from deraadt@
Wed Dec 31 18:56:21 2003
+ Fix -r description now that millert@ has fixed the code
Wed Dec 31 18:18:22 2003
+ Both POSIX and the man page says that "vi -r foo" is run
where foo does not exist and has no recovery file that vi shall
present an error and edit foo as a new file. This change makes
the behavior match the documentation; previously it just spat
out an error and quit. Problem found by jmc@
+ mdoc vi(1); also better document current behaviour and add
some missing commands
OpenBSD 3.3 -> OpenBSD 3.4: Sat Nov 8 19:17:27 2003
+ Typos from Jonathon Gray
Tue Sep 2 22:44:06 2003
+ Switch to dynamic fd_set and poll; patch entirely from
millert@. ok deraadt@, dhartmei@
Fri Aug 1 16:47:25 2003
+ When the -R option (read-only) is specified, there is no need
to print a warning that the file is read-only, it's obviously
what's expected... ok fgsch@ henning@
Mon Jul 21 16:21:12 2003
+ Updated license from nvi-1.81.5 since we will be pulling in
patches from it
+ Merge back some changes from skimo's tree, fixes endless
recursions in vs_paint() for some option combinations. ok millert@
Fri Jul 18 23:11:43 2003
+ Add missing includes ok tedu@
Wed Jul 9 20:01:31 2003
+ Fix double free; patch by Eric Jackson
Wed Jul 2 00:21:16 2003
+ Bump randomness of mktemp to from 6 to 10 X's, as recommended
by mktemp(3)
OpenBSD 3.2 -> OpenBSD 3.3: Tue Jun 3 02:56:05 2003
+ Remove the advertising clause in the UCB license which Berkeley
rescinded 22 July 1999. Proofed by myself and Theo
Fri Apr 25 23:44:08 2003
+ Oops; Fix comment
Thu Apr 17 02:22:56 2003
+ Eliminate strcpy/sprintf. Reviewed by deraadt@ and millert@
Tue Apr 15 21:34:53 2003
+ No, vi does not ignore SIGQUIT
+ Change to use snprintf, of course
Mon Apr 7 21:13:52 2003
+ Replace strcpy calls that got inlined by gcc
Hans-Joerg.Hoexer@yerbouti.franken.de
Mon Mar 10 03:53:32 2003
+ Spelling fixes ok millert@
Sun Jan 12 18:15:16 2003
+ Typos; jmc@prioris.mini.pw.edu.pl
Sun Dec 15 13:28:22 2002
+ More writable spelling; torh@
Sat Nov 23 12:48:18 2002
+ Typo: Edieroption->Editieroption ok mickey@
OpenBSD 3.1 -> OpenBSD 3.2: Tue Nov 19 17:00:22 2002
+ Update ru as it was 7bit stripped and add ua and pl; from
FreeBSD, pointed out by glebius@rinet.ru in PR#2552
OpenBSD 3.0 -> OpenBSD 3.1: Wed Jun 12 06:07:15 2002
+ A real pid_t cleanup
Tue Feb 19 19:39:35 2002
+ We live in an ANSI C world; Remove lots of gratuitous #ifdef
__STDC__ cruft
+ Oops, fix a left out ';'
Mon Feb 18 23:56:10 2002
+ Format string fixes
Sun Feb 17 19:42:18 2002
+ Manual cleanup of remaining userland __P use (excluding packages
maintained outside the tree)
Sat Feb 16 21:27:05 2002
+ Part one of userland __P removal. Done with a simple regexp
with some minor hand editing to make comments line up correctly
Another pass is forthcoming that handles the cases that could
not be done automatically
OpenBSD 2.9 -> OpenBSD 3.0: Thu Jan 31 11:10:39 2002
+ Bug-fix picked up from NetBSD, and checked by pval: : date:
2001/10/20 10:04:50; author: aymeric : Fix a cut_line() caller
not using the right value for (former) ENTIRE_LINE, : by defining
the (newer) CUT_LINE_TO_EOL define in common/cut.h and using
it : where due. : Bug reported on current-users by Masanori
Kanaoka <kanaoka@ann.hi-ho.ne.jp> : diagnosed by Bang Jun-Young
<bjy@mogua.org>, : quick-fixed by Robert Elz <kre@munnari.OZ.AU>
Mon Nov 19 19:02:13 2001
+ Kill more registers
Tue Nov 6 23:31:08 2001
+ Change a stat() to lstat()
Mon Nov 5 22:43:49 2001
+ Add more sanity checks of path data in the vi recovery file
potential problems pointed out by lumpy@the.whole.net
Wed Sep 19 02:43:19 2001
+ Define ENTIRE_LINE to be -1 instead of 0 because we may want
to copy 0 characters, and use ENTIRE_LINE instead of hard coding
0 in a few places. Fixes a bug when dw on an empty line would
delete only the empty line, but copy the next line too
+ Fix a bug where ^@ wouldn't behave as expected when reading
an ex command from vi. From NetBSD, ok millert@
Mon Sep 17 04:42:55 2001
+ Make vi exit if it can't create a temp file. From NetBSD,
ok millert@
Sat Sep 15 15:41:19 2001
+ Fix obvious omissions
Tue Sep 11 22:31:29 2001
+ Locale ru_SU is obsolete, replace with ru_RU mickey@ ok
Sat Aug 18 20:35:13 2001
+ Range check snprintf() return value
+ Fix a pasto I made when adding snprintf() return val checks
ages ago
Fri Jul 20 18:48:03 2001
+ Make this work, after espie changed other mk behaviours
Mon Jul 9 07:02:08 2001
+ Correct type on last arg to execl(); nordin@cse.ogi.edu
OpenBSD 2.8 -> OpenBSD 2.9: Mon Jun 18 21:39:25 2001
+ When creating temp files, use fchmod() to set the perms to be
what we expect since the mode mkstemp() uses can be modified by
the umask. This fixes a problem where vi would spin trying to
create temp files, eating up inodes; reported by xyntrix@bitz.org
Mon May 28 22:44:32 2001
+ Behave correctly when displaying an empty screen line when the
corresponding file line is not empty itself. Avoids core dumps
in the ':set list' mode (at least). NetBSD PR#4113; millert@ ok
+ Print SYSERR instead of ERR when recdir does not exist. Makes
the message more useful for the user; from NetBSD, millert@ ok
Wed Jan 17 00:57:33 2001
+ Don't dump core when a ``bad address'' error occurs and there
is neither a file nor a command underlying it
+ Fix NetBSD PR#11543; the fix is from
Aymeric Vincent <aymeric@netbsd.org>
OpenBSD 2.7 -> OpenBSD 2.8: Thu Jan 11 04:56:52 2001
+ grep() returns a list of aliases to entries in the original
list so modifying them directly results in a munged line in the
resulting mail message that gets sent out. Similar to a patch
from cazz@wezl.org; closes PR#1617
Fri Nov 17 05:46:48 2000
+ OpenBSD already has queue.h and this one gets in the way since
OpenBSD includes expect macros in sys/queue.h that the vi queue.h
didn't have
+ Userland programs should not include sys/select.h
Sun Oct 22 00:16:27 2000
+ Fix noprint/print/octal options; from NetBSD. Reviewed by
millert@
Thu Oct 12 09:38:19 2000
+ When checking mmap return, check for MAP_FAILED, not -1
Fri Sep 15 07:13:43 2000
+ Check return value for setenv(3) for failure, and deal
appropriately
OpenBSD 2.6 -> OpenBSD 2.7: Wed Aug 2 04:10:44 2000
+ $HOME paranoia: never use getenv("HOME") w/o checking for NULL
and non-zero
Fri Apr 21 17:06:13 2000
+ Remove the races so that this is safe to run anytime. We open
/var/tmp/vi.recover to get an fd and user O_NOFOLLOW to following
a symlink. Once we have a file handle we can use it to safely
chdir to the right place and form then on do operations relative
to ".". Also restrict to root
Thu Apr 20 15:24:24 2000
+ If recovery dir is not owned by root, chown it. If the mode
is not 01777, fix that too. This is safe because the script is
run before user processes start
Thu Mar 9 21:24:02 2000
+ Pull in fnctl modeul so we are sure to get O_* for sysopen()
Sat Jan 22 22:57:35 2000
+ Some minor doc updates that should have gotten committed ages ago
OpenBSD 2.5 -> OpenBSD 2.6: Thu Jan 20 18:19:45 2000
+ Use sysopen() when opening recover files. This is purely
paranoia since we check that the filename matches '^recover'
and hence the first character cannot play games with Perl's
magic open()
Fri Nov 26 22:49:08 1999
+ Update README files etc. from nvi-1.79 so they have the
correct info
+ Make port.h empty, since we there is nothing we lack
+ Include <sys/param.h>, not <sys/types.h> in files that
use MIN/MAX macros
+ Add Perl API support since we have libperl (off by default)
Mon Oct 11 20:07:19 1999
+ Rewrite in Perl for safety and paranoia. It might have been
possible to play tricks with file names that include spaces
Sat Jul 10 10:09:48 1999
+ Fix a SEGV after you HUP vi; dean@netbsd.org
Sat Jun 5 01:21:16 1999
+ Remove trailing white space
+ Remove arguments from .Os macros
+ Remove arguments from .Nm macros, where appropriate
+ Fix some more Dq/Sq/Ql insanity
Sat May 29 03:50:24 1999
+ MLINKS, not MLINK
OpenBSD 2.4 -> OpenBSD 2.5: Mon May 24 22:43:35 1999
+ Set the close-on-exec flag for newly opened files
Wed Mar 10 21:25:25 1999
+ Fix comma splices involving 'however'
Sat Mar 6 20:27:39 1999
+ Back out changes that should not have escaped my local tree
+ Add missing reference to infocmp
Wed Mar 3 01:22:33 1999
+ Better grammar for err msg
OpenBSD 2.3 -> OpenBSD 2.4: Mon Feb 8 01:26:56 1999
+ Don't call curses routines beep() or flash() if the screen has
not been setup yet (as they will try to us SP which is NULL at
this point)
Fri Jul 24 00:43:40 1998
+ Man pages Xrefs
+ -D_USE_OLD_CURSE_ for -locurses and no more -ltermlib/-ltermcap
OpenBSD 2.2 -> OpenBSD 2.3: Tue Jun 23 22:40:25 1998
+ Fix snprintf return value usage
OpenBSD 2.1 -> OpenBSD 2.2: Sat Apr 25 05:45:30 1998
+ Fix relative tags in vi; Frank Mayhar <frank@exit.com>
Wed Sep 24 21:31:56 1997
+ No, use new curses so that the build process works. Reevaluate
this later
Tue Sep 23 07:12:42 1997
+ Make building with ocurses/termcap and curses/termlib
conditional on USE_OCURSES being defined, and define it for now
This switches nvi back to use BSD curses
Nvi 1.79 -> OpenBSD 2.1: Sun Aug 24 19:15:25 1997
+ Check for >= UINT_MAX not > UINT_MAX
+ 64bit fix wrt strtoul(3); fix sent to Keith
Nvi 1.78 -> Nvi 1.79: 10/23/1996
+ Rename delete() to del(), for C++
+ Add Spanish to the list of translations
+ Update to Perl 5.003_06, and other Perl interpreter updates
+ Update the set-edit-option interface for the scripting languages
+ Rework ex command parsing to match historic practice for backslash
escaped <newline> characters inside of global commands
+ Enhance the comment edit option to skip C++ comments
+ Change installation to configure the recovery shell script to
match the system pathnames and to install it into the vi data
directory; move the recover script into the build directory, and
delete the recover directory
+ Enhance LynxOS support
Nvi 1.76 -> Nvi 1.78: 10/1/1996
+ Fix bugs when both the leftright scrolling and number edit options
were on
+ Fix bug where splitting in the middle of the screen could repaint
incorrectly
+ Fix first-NULL in input bug, where random garbage was inserted
+ Correct search and mark-as-motion-command bug, it's a line mode
action if the search starts at or before the first non<blank>
+ Fix bug autoindent bug, where ^D could shift too far in the line
+ Fix core dump where ! command called from the .exrc file
+ Add the -S command-line option, which initializes vi to have the
secure edit option preset
Nvi 1.75 -> Nvi 1.76: 9/15/1996
+ Fix bug where ^V didn't keep input mapping from happening
+ Fix a core dump bug in the R command
+ Give up on licensing: no more shareware, adware, whatever
+ Fix cursor positioning bug for C, S and c$ in an empty file
Nvi 1.74 -> Nvi 1.75: 8/22/1996
+ Add French to the error message translations
+ Move the UNLICENSED message to the end of the message line
+ Fix bug where wide characters in a file name weren't calculated
correctly in the status message
+ Fix bug where cl_rename was called directly, by the ex shell code
+ Fix bug where splitting a screen resulting in a new screen at the
top of the display resulted in badly displayed status messages
Nvi 1.73 -> Nvi 1.74: 8/18/1996
+ Fix bug where the status line wasn't redisplayed if the user ran
an ex command that trashed the screen
+ Fix bug where the long version of the status line wasn't displayed
when switching screens
+ Rework fast-path filename completion code to sort the entries, and
strip out . and .. by default
+ Fix bug where ex went to the first line instead of the last one
when reading in a file
Nvi 1.72 -> Nvi 1.73: 8/12/1996
+ Do filename completion and some file expansion internally for
speed
+ Fix CSCOPE_DIRS environmental variable support
+ Ex parser fix for global commands in script files
+ Add the O_PATH option, so you can specify a directory search path
for files
+ Make it possible to specify the database file to Cscope, allowing
multiple databases in a single directory
+ Fix incremental search to overwrite erased characters so the user
can tell where they are on the colon-command line
+ Fix incremental search to restart the search if the user enters an
un-escaped shell meta character
Nvi 1.71 -> Nvi 1.72: 7/12/1996
+ Cscope fix: test for files newer than the database was reversed
+ Display "files to edit" message for rewind, next and initial
screen
+ Fix a bug in the R command where it could fail if the user
extended the file
+ Fix a bug where text abbreviations could corrupt the line
+ Fix a bug where the windowname edit option couldn't be set before
a file was loaded into the edit buffer
+ Fix a bug where the system .exrc values weren't being overridden
by the user's $HOME .exrc values
+ Fix a bug in the filename completion code, where garbage
characters could be added to the colon command line
+ Fix bug where multiple edit sessions on a non-existent file could
all write the file without warning
+ Fix bug where screen update was incorrect if a character triggered
both a wrapmargin and showmatch condition
+ Fix bug in leftright scrolling where <CR> during text input didn't
return the cursor to the left margin
+ Rev the Perl interpreter code, new version from Sven Verdoolaege,
based on Perl 5.003.01
+ Fix bug in tags file pattern search introduced in 1.71
Nvi 1.70 -> Nvi 1.71: 7/1/1996
+ Don't include <term.h> as neither HP-UX or Solaris can cope with
it
+ Fix bug where ^M's in the original pattern were converted into new
lines in the file during substitution commands
+ Make window resize events separate from interrupts - too many
users complained
+ Fix bug in first-character-is-NULL text input semantic
+ Rework search routines to take a length instead of a NULL
terminated string for a pattern. This fixes a couple of bugs in
searching, but probably introduces new ones
+ Fix prompting the user after a write filter command, the way I did
it in 1.70 broke the display
+ Don't switch to the alternate xterm screen when entering the ex
text input commands from vi mode
+ Implement the Fg command, so can foreground a background screen
into a split screen
+ Change the fg command to match screen names using the last
component of the filename the full filename fails
Nvi 1.69 -> Nvi 1.70: 6/28/1996
+ Change the ex read command to support named pipes
+ Copy the EXINIT/NEXINIT strings before executing their commands so
we don't step on the process environment
+ Don't do "line modification" reports for intermediate commands
executed from the vi colon command line, it screws up filter
reads, causing nvi to prompt for the user to continue
+ Add "smd" as an abbreviation for showmode: HP, ICL and SCO have it
+ Change nvi to always prompt the user after a write filter command
to match historic practice
+ Fix recovery information mailed to the user to reflect the
program's installed name
+ Change configuration script to not cache option information, e.g.,
--disable-curses
+ Fix a bug where the second character of the vi [[, ]] and ZZ
commands could start a command mapped sequence
+ Fix 3 write bugs: partial writes (3,$write), were clearing the
modified flag, full writes using line numbers (1,$write) were
not, and append historically never cleared the modified flag, and
we didn't get that right
+ Shorten the "more files to edit" message so it can gang on a
single line, lots of people have complained. Add the number of
files that are left to edit, it's historic practice
+ Fix core dump where message catalogs collided with truncating the
write path. Add a new write message so the string "appended" is
taken from a message catalog
+ Fix bug where an undo followed by '.' to repeat it wouldn't work
if no other repeatable commands had been entered
+ Fix core dump when resolution of input lines' autoindent
characters invalidated cached display information
+ Set the name of the X11 xterm icon/window to "xterm" when exiting,
if modified based on the windowname option
+ Include <term.h> if it exists, fixes portability problems on IRIX
systems
Nvi 1.68 -> Nvi 1.69: 6/17/1996
+ Add the windowname edit option and code to change the icon/window
name for xterm's
+ Enhance the comment edit option to skip shell comments
+ Add conditional prototypes to replacement C library functions
+ Minor enhancements/reworking to Makefile.in, other build files
+ Fix bug in vi text input ^D processing, could result in cursor
warp to the beginning of the line
+ Fix leftright screen bug where the screen wasn't repainted when
being repainted from scratch
+ Update the Swedish and Dutch catalogs
+ Truncate paths in write commands if they don't fit on one line
+ Fix alternate screen bug where the screen flashed and output lost
when switching to/from the X11 xterm alternate screen. Fix bug
where nvi switched into the alternate screen during filter-read
commands, which doesn't match historic practice
+ Minor relative cursor positioning change, make cursor position
changes from ex real and permanent
Nvi 1.67 -> Nvi 1.68: 6/9/1996
+ Fix core dump when tagging out of a modified file
Nvi 1.66 -> Nvi 1.67: 6/9/1996
+ Convert the license to adware
+ Leftright scrolling tweak, don't repaint the screen as often
+ Change so that search warning/error messages don't appear during
an incremental search
+ Cscope fix: test for files newer than the database was reversed
+ Don't display ex `welcome message' if in ex batch mode
+ Test for vsnprintf and snprintf separately, HP 10.10 has snprintf
but not vsnprintf
+ Reverse lookup order between LC_MESSAGES and LANG
+ Fix Tcl/Perl core dumps in common API code to get/set options
+ Fix R command - it used a DB pinned page after discarding it
+ Minor fixes in multiple edit buffer message handling code
+ Fix yk command moving to shorter line core dump
+ Rework message handling to try and gang more messages onto a
single line
Nvi 1.65 -> Nvi 1.66: 5/18/1996
+ Convert vi man page to historic -man macro package, and install it
+ Fix bug were !! on an empty line with a nonexistent command left
the cursor on the second character, not the first
+ Fix bug where line redisplay was wrong when a <tab> replaced a
previous <tab> in the line
+ Fix bug where D (d$) didn't reset the relative cursor position
+ Fix bug where yG incorrectly reset the relative cursor position
+ Fix bug where the window size couldn't be grown once it was shrunk
+ Fix bug where the extended edit option caused tag searches to fail
+ If multiple lines in the tags file with the same leading tag,
build a tags stack like the Cscope stack. This is the obvious
extension, and the way that Larry McVoy's ctags program works
+ Send the appropriate TI/TE sequence in the curses screen whenever
entering ex/vi mode. This means that :shell now shows the correct
screen when using xterm alternate screens
+ Rework the options display code to get five columns in an 80
column screen
+ Interactive UNIX V3.0 port - mostly file name shortening, other
minor changes. Only preliminary, more work will be necessary
+ Add debugging option to not read EXINIT/.exrc information
+ Fix bug where re_compile printed an error message to the screen
when the user entered [ to an incremental search
+ Turn off screen beeps when incremental search is failing
+ Fix bug where the iclower option didn't trigger an RE
recompilation
+ Fix bug where -t into an already locked file forced the user to
wait as if a startup command had failed
+ LynxOS port - mostly adding <sys/types.h> even though
<sys/param.h> was already included
+ Fix ex output bug, where it appeared as if an ex command was
skipped due to flags not being cleared in the vs_msg() routine
+ Fix core dump when global command tried to switch screens
Nvi 1.64 -> Nvi 1.65: 5/13/1996
+ Fix Cscope <blank>-matching pattern to use extended RE's, and bug
that kept Cscope from finding patterns containing <blank>s
+ Fix core dumps in both leftright and folded screens when tabstops
edit option value was large, and tab characters occurred as the
last character in the logical screen
+ Fix core dump where the second screen of a folded line wasn't
displayed correctly
+ Fix incremental search to match the current location for strings
starting with \< patterns
+ Fix bug where margins were ignored during replay of text input
+ Fix bug where motion components to shorter lines could lose
because the relative motion flags weren't ever set. This has been
broken forever, but the change almost certainly breaks something
else - I have no idea what
+ Tags display: don't print the current entry separately, display
them all and add a trailing asterisk for the current one
+ Change the Cscope add command to put the directory name through
standard file name expansion
+ Fix Cscope use of buffers - search commands weren't NULL-
terminated
Nvi 1.63 -> Nvi 1.64: 5/8/1996
+ Add installation target to the Makefile
+ Add documentation on the new tags commands to the Vi Reference
Manual
+ Make the sidescroll edit option work again
+ Fix bug where messages output during startup by ex could be lost
+ Change ex/vi commands errors into beeps, unless the verbose edit
option is set - there are too many macros that are expected to
eventually fail. This matches historic practice
+ Truncate paths in initial vi screen if they won't fit on one line
+ Make cursor position after filter write match historic practice
+ Force the user to wait if there is output and the user is leaving
the screen for any reason - don't permit further ex commands
+ Don't use a <newline> character to scroll the screen when exiting,
scroll in the vi screen before endwin() is called
+ Fix bug where the column number could be incorrect because the old
screen wasn't updated after a screen split
+ Fix ex print routine to correctly specify print flags
+ Make -g/-O a separate make/configuration option
+ Fix bug where ex/vi messages weren't being joined
+ Fix bug where termcap strings were free'd twice
+ Fix bug where TI/TE still weren't working - I didn't put in the
translation strings for BSD style curses
+ Fix bug where I misspelled the iclower edit option as icloser
Nvi 1.62 -> Nvi 1.63: 4/29/1996
+ Robustness and type/lint fixes for the Tcl interface code
+ Fix core dump if TERM wasn't set or terminal type was unknown
+ Fix bug where combining ex commands that did/did not require an
ex screen would overwrite the command with the want-to-continue
message
+ Fix bug where the screen was never resolved if the user continued
entering ex commands using the : character, but then backspaced
over the prompt to quit or tried to edit their colon command-line
history
+ Fix bug where cursor wasn't placed over the ^ placeholder
character when quoting using the literal-next character
+ Fix bug where nvi under BSD style curses wasn't sending TI/TE
termcap strings when suspending the process
+ Rename mic again, to iclower
+ Fix bug where 'z' commands trailing / or ? commands weren't being
executed
+ Change incremental search to leave the cursor at its last position
when searching for something that was never found
+ Fix bug where search-with-confirmation from vi mode didn't
position the cursor correctly after displaying the confirm message
+ Fix bug where the "search wrapped" message was dependent on the
verbose edit option, which doesn't match historic practice. Change
search messages to be in inverse video
+ Fix bug where matched showmatch character wasn't being displayed
before the matching character was displayed
+ Another cursor update bug required a change to vs_paint()
+ Fix bug were initial line offset was wrong for the first split
screen (symptom is very strange column numbers and blank first
line)
+ Create filename "argument" lists when creating new screens
+ Fix bug where globals with associated commands that included both
buffer execution and other commands could fail to execute the
latter
Nvi 1.61 -> Nvi 1.62: 4/22/1996
+ Rename the "searchci" edit option to be "mic"
+ Fix memory corruption in global commands ending in searches
+ Fix text resolution bug, corrected the cursor based on the
first line input, not the last
+ Rework the readonly edit option to match historic practice
+ Fix several minor incremental search bugs; make incremental
searches work in maps
+ Fix long-line core dump, where an incorrect screen map could be
used
Nvi 1.60 -> Nvi 1.61: 4/12/1996
+ The cursor now ends up on the FIRST character of the put text for
all versions of the vi put commands, regardless of the source
of the text. This matches System III/V behavior and POSIX 1003.2
+ Fixed bug where showmatch messages were getting discarded
+ Minor Perl integration fixes
+ Integrate Cscope into the tags stack code - major change
+ Fixed bug where ^T would drop core if returning to a temporary
file
+ Changed vs_ routine to display ex output to replace tab characters
with spaces
+ Fix autoindent code to not back up past beginning of line when ^T
inserted into the middle of a line, i.e. offset != 0
+ Fix "notimeout" option, was being ignored, by a coding error
+ Fix showmatch code to never flash on a match if keys are waiting
+ Change the vi 'D' command to ignore any supplied count, matching
historic practice
+ Fix viusage for D, S, C and Y (the aliased vi commands)
+ Fix the Perl5 configuration bug in the configuration script
+ Make file completion commands in empty lines work
+ Fix where the change to let vi use the default ex command
structure broke the ex specification of the script or source file
name
+ Fix to free saved RE structures when screens exit. This is a major
RE change, which fixed several bugs in the handling of saved/subst
RE's. It's likely to have added new bugs, however
+ Add case-independent searching (the searchci edit option)
+ Add incremental search (the searchincr edit option)
+ Home the cursor when executing ex commands from vi
Nvi 1.59 -> Nvi 1.60: 3/29/1996
+ Fix ":w >>" core dump, make that command match historic practice
+ Fix autoindent bug where the length of the line was incorrectly
calculated
+ Fix cursor bug where cursor could end up at the wrong place if the
movement keys were entered quickly enough
+ Change the read/write whirling indicator to appear only every 1/4
second, clean up the appearance
+ Don't change the options real values until underlying functions
have returned OK - fix "set tabstop=0" core dump
+ Fix resizing on Sun's: use SA_INTERRUPT to interrupt read calls
+ Fix two forward mark command bugs: one where it wasn't setting the
"favorite cursor" position because of the refresh optimization,
and one where it didn't have VM_RCM_SET set in the command flags
for some reason
+ Fix a bug were the 's' command on top of a <tab> didn't correctly
copy the buffer
+ Make :exusage command work for commands having optional leading
capital letters, e.g. Next
+ Previous changes broke the inital-matching-prefix code in the key
mapping part of v_event_get - fix it, and fix the infinite macro
interrupt code at the same time
+ Add "cedit" edit option, so colon command-line editing is optional
Change filec/cedit so that you can set them to the same character,
and they do cedit if in column 1, and filec otherwise
+ Fix "source of non-existent file" core dump
+ Fix bug where functions keys specified in startup information were
never resolved/activated
+ Fix v_txt bug where could infinitely loop if <escape> triggered an
abbreviation expansion
+ Move version string into VERSION file, out of ex_version.c
Nvi 1.58 -> Nvi 1.59
+ Configuration changes, several minor bug fixes, including a few
core dumps. No functional changes
Nvi 1.57 -> Nvi 1.58
+ Fix the problem where colon command-line temporary files were
getting left in /tmp
+ Fix the configuration scripts to quit immediately if the Perl
or Tk/Tcl libraries are specified but not found
+ Several screen fixes - the changes in 1.57 weren't as safe as
I thought. More specifically, the refresh-only-if-waiting change
caused a lot of problems. In general, fixing them should provide
even more speedup, but I'm nervous
+ Lots of changes in the configuration scripts, hopefully this is
just a first-round ordeal
+ Several other minor bug fixes
Nvi 1.56 -> Nvi 1.57
+ Add <esc> hook to colon commands, so you can edit colon commands
+ Add Perl5 interpreter
+ Change shell expansion code to fail if it doesn't read at least
one non-blank character from the shell. If the shell expansion
process fails, or if not at least one non-blank character, it
now displays an error message to the user
+ Rework the screen display so that it matches the historic vi
screen refreshes
+ Rework options processing: print/noprint are no longer cumulative,
provide more information to underlying edit options modules, move
O_MESG information into the screen specific code
+ Make file completion character settable
+ Rework terminal restart - you can now use ":set term" to switch
terminal types. This cleaned up screen resizing considerably
+ Character display fix, display \177 as ^?, not in hex/octal
+ Tag search bug fix, don't repeat search if successful
+ Replace sys_siglist[] use with private sigmsg() routine
+ Fix core dump if illegal screenId specified to Tcl routine
+ Add get/set mark interface to Tcl Interpreter interface
+ Fix core dump if file expansion code stressed (re: filec edit
option)
+ Fix bug where filter commands in empty files couldn't find line 0
+ Switch to GNU autoconf 2.7 for configuration, delete nvi/PORT
+ Many random portability fixes
Nvi 1.55 -> Nvi 1.56: 11/26/1995
+ Bug fix release - generally available beta release
Nvi 1.54 -> Nvi 1.55: 11/18/1995
+ Bug fix release
+ Integrate Tcl interpreter
Nvi 1.53 -> Nvi 1.54: 11/11/1995
+ Bug fix release. A major change in reworking the ex commands, when
called from the colon command line, to match historic practice,
and permit them to be entered repeatedly after ex has trashed
the screen
+ Use restart-able endwin() from System V curses to implement
screen suspend
Nvi 1.52 -> Nvi 1.53: 10/29/1995
+ Switch to using vendor's curses library for all ports
+ Back out the event driven version, leaving screen separation
+ User configuration of <escape> timeout (the escapetime edit
option)
+ Add Tcl/Tk screen support
+ Add file name completion (the filec edit option)
+ Disallow access to outside applications (the secure edit option)
Nvi 1.51 -> Nvi 1.52: 7/26/1995
+ Minor cleanups
+ Snapshot for SMI
Nvi 1.50 -> Nvi 1.51: 7/5/1995
+ Lots and lots of changes for event driven model, largely in moving
the boundary between the screen code and the editor up and down
Private release for Rob Zimmermann @ Tartan and Bill Shannon @ SMI
Nvi 1.49 -> Nvi 1.50: Fri Jun 9 13:56:17 1995
+ Minor bug fixes for stability
+ Convert to an event driven model, with the usual Nachos Supreme
layering that results. This is a completely new version, nothing
done previously matters any more
Nvi 1.48 -> Nvi 1.49: Wed Mar 8 10:42:17 1995
+ Changes in 1.46 broke ^A processing
+ Add :previous to split screen commands
+ Lots o' random bug fixes - passes purify testing again
Nvi 1.47 -> Nvi 1.48: Thu Feb 9 18:13:29 1995
+ Random bug fixes for 1.47
+ Move the FREF (file structure) list out of the screen and into
the global area
+ Change semantics to :E to more closely match :e - ":E" joins
the current file, so ":E /tmp" is now the command to match the
historic ":split"
Nvi 1.46 -> Nvi 1.47: Wed Feb 8 19:43:41 1995
+ All ex commands (including visual and excluding global and v)
are now supported inside ex global commands
+ Rework the append/change/insert commands to match historic
practice for text appended to the ex command line, and inside
of ex global commands
+ Restructure to make single-line screens work
+ Restructure to create curses independent screen routines
+ Restructure to permit Edit, Next, and Tag routines to create new
screens on the fly
+ Change hexadecimal output to be \x## instead of 0x##
+ Change ex commands run from vi to stay in vi mode for as long as
possible, i.e. until ex modifies the screen outside of the editor
Nvi 1.45 -> Nvi 1.46: Tue Jan 24 10:22:27 1995
+ Restructure to build as a library
Nvi 1.44 -> Nvi 1.45: Thu Jan 12 21:33:06 1995
+ Fix relative cursor motion to handle folded lines
+ Recompile the search pattern if applicable edit options change
+ Change +/-c command ordering to match historic practice
+ Rework autoindent code to always resolve preceding <blank>
characters when a ^T or ^D are entered
+ Add the print/noprint edit options, so can now specify if
a character is printable
+ Change ex to run in canonical mode
+ Fix ex text input to support the number edit option
+ Vi text input fix for the R command to correctly restore
characters entered and then backspaced over
+ Several vi increment command fixes
Nvi 1.43 -> Nvi 1.44
+ Bug fix, vi was printing the last line number on the status line
at startup. Change to execute commands at first line set,
i.e. "vi -t tag -c cmd" executes cmd at the tag line, not EOF
Nvi 1.42 -> Nvi 1.43: Sat Dec 3 13:11:32 1994
+ Marks, SunOS signed comparison fix for 1.42
Nvi 1.41 -> Nvi 1.42: Fri Dec 2 20:08:16 1994
+ Make autowrite require the file not be read-only
+ Make the ex insert command work in empty files
+ Tab expansion is no longer limited to values < 20 (which matches
historical practice)
+ Simplify (and fix limit detection for) the # command. It's no
longer possible to use the # command itself to repeat or modify
a previous # command, '.' is the only possibility
+ Lots more reworking of the ex addresses, putting ? and / into
the ex addressing code broke the world
+ Make the Put, Preserve and Print commands work (don't ask)
+ Split stdout/stderr from shell expansions; stdout is expansion
text, stderr is entered on the message queue
Nvi 1.40 -> Nvi 1.41: Fri Nov 18 16:13:52 1994
+ Addition of a port for AUX 3.1
+ Addition of a message catalog for Russian
+ Make vi ? and / commands be true ex addresses (historic practice)
+ Display the date first in vi -r recovery list
Nvi 1.39 -> Nvi 1.40: Mon Nov 14 10:46:56 1994
+ Two bug fixes for 1.39; -r option and v_change core dump
Nvi 1.38 -> Nvi 1.39: Sun Nov 13 18:04:08 1994
+ Ex substitution with confirmation now matches historic practice
(except that it still runs in raw mode, not cooked)
+ Nvi now clears the screen before painting, if repainting the
entire screen
+ Fix final cursor position for put command entering text in a
single line
+ Change to break error message lines on the last <blank> in the
line
+ Always center the current line when returning to a previously
edited file or moving to a tag line that's not visible on the
screen
+ Change write of the current file using an explicit name or % to
match the semantics of :w<CR>, not :w file<CR>
+ Add command aliases to vi, and remap 6 historic commands to their
historic counterparts: D->d$, Y->y_, S->c_, C->c$, A->$a, I->^i
+ Match option display to historic practice; if boolean or numeric
options changed to default values, not displayed by default
Nvi treats string options the same way, vi always displayed any
string option that was changed
+ Added lock edit option, if not set, no file locking is done
+ Rework ex to permit any ex command in the EXINIT variable or
exrc startup files. This fixes the bug were `vi +100 file'
painted the screen and then moved to line 100 and repainted
(Yanked to SCCS ID 9.1.)
+ Bug fix: could report file modified more recently than it was
written, incorrectly
+ Search fix: historically, motions with deltas were not corrected
to the previous/next line based on the starting/stopping column
+ Addressing fixes: make trailing non-existent addresses work,
change % to be text substitution, not a unique address (to follow
future POSIX)
Nvi 1.37 -> Nvi 1.38: Mon Oct 24 12:51:58 1994
+ Scrolling fix; ^B can move to nonexistent lines
+ Fix to vi mapped commands; <escape> characters while already in
command mode did not historically cause the mapped characters to
be flushed
+ Add the backup edit option, automatically version edit files
+ Make it possible to edit files that db can't read, i.e. edit a
temporary file, with the correct file name
+ Only anchor the last line of the file to the bottom line of the
screen if there's half or less of a screen between the target
line and the end of the file
+ Fix wrapmargin text allocation bug
+ Fix ex put command to work in any empty file
+ Fix global command to handle move's to line 0 correctly
+ Regularize the yank cursor motions, several bug fixes for historic
practice
+ Fix N and n, when used as a motion command for the ! command,
repeat the last bang command instead of prompting for a new
one
+ Timeout maps beginning with <escape> quickly, instead of based
on the keytime option
+ Bug fix for wraplen option, wasn't triggered for input commands
Nvi 1.36 -> Nvi 1.37: Sun Oct 9 19:02:53 1994
+ Change PORT directories to install patches before distribution
+ Fix ^A to set search direction and pattern for consistency
+ Fold the showdirty option into the showmode option
+ Ex addressing fix: change search offset and line arguments
(e.g. the copy command) to be ex addressing offsets, matching
historic practice
+ Ex addressing fix: support ^ as an offset/flag equivalent to -
+ Ex addressing fix: historically, any missing address defaulted to
dot, e.g. "4,,," was the same as ".,."
+ Ex addressing fix: historically, <blank> separated numbers were
additive, e.g. "3 5p" displayed line 8
+ Ex addressing fix: make ';' as a range delimiter match historic
practice
+ Change nvi to exit immediately if stdout isn't a terminal
+ Change alternate file name behavior to match historic practice,
make the :write command set the current file name
+ Text input fix; input keys from a map, with an associated count,
weren't historically affected by the wrapmargin value
+ Add wraplen option, same as wrapmargin, but from the left-hand
column, not the right
+ Make ex address .<number> be equivalent to .+<number>, i.e. the
'+' is understood; matches historic practice, and it's widely
documented for ed(1)
+ Input mode ^V^J historically mapped into a single ^J
+ Minor catalog changes, fixes; don't use 's' to pluralize words
Nvi 1.35 -> Nvi 1.36: Thu Sep 8 08:40:25 1994
+ Don't overwrite user's maps with standard (termcap) mappings
+ Make \ escape kill and erase characters in vi text input mode
+ Fix ^D autoindent bug by resolving leading <blank>s at ^D
+ Rework abbreviation tests (again!) to match historic practice
+ Change ^D/^U default scrolling value to be based on window option
value, not screen lines, correct scrolling option value, both to
match historic practice. NOTE: System V does this differently!
Nvi 1.34 -> Nvi 1.35: Wed Aug 31 19:20:15 1994
+ Add the historic -l option
+ Message catalogs
+ Display global messages at each flush, just in case some are there
+ Fix global substitute code, `\\' wasn't handled correctly
+ Fix abbreviation code to use <blank>s as the preceding character
+ Fix ruler to display logical column, not physical column
+ Block signals when user issues :preserve command, so no race
caused by SIGHUP/SIGTERM
Nvi 1.33 -> Nvi 1.34: Wed Aug 17 14:37:32 1994
+ Back out sccsid string fix, it won't work on SunOS 4.1
Nvi 1.32 -> Nvi 1.33: Wed Aug 17 09:31:41 1994
+ Get back 5K of data space for the sccsid strings
+ Fix bug where cG fix in version 1.31 broke cw cursor positioning
when the change command extended the line
+ Fix core dump in map/seq code if character larger than 7 bits
+ Block signals when manipulating the SCR chains
+ Fix memory allocation for machines with multiple pointer sizes
Nvi 1.31 -> Nvi 1.32: Mon Aug 15 14:27:49 1994
+ Turn off recno mmap call for Solaris 2.4/SunOS 5.4
Nvi 1.30 -> Nvi 1.31: Sun Aug 14 13:13:35 1994
+ Fix bug were cG on the last line of a file wasn't done in line
mode, and where the cursor wasn't positioned correctly after
exiting text insert mode
+ Add termcap workaround to make function keys greater than 9 work
correctly (or fail if old-style termcap support)
+ Change ex/vi to not flush mapped keys on error - this is historic
practice, and people depended on it
+ Rework vi parser so that no command including a mapped key ever
becomes the '.' command, matching historic practice
+ Make <escape> cancellation in the vi parser match POSIX 1003.2
+ Fix curses bug where standout string was written for each standout
character, and where standout mode was never exited explicitly
Fix bugs in curses SF/sf and SR/sr scrolling, as seen on Sun and
x86 consoles
+ The v/global commands execute the print command by default
+ The number option historically applies to ex as well as vi
Nvi 1.29 -> Nvi 1.30: Mon Aug 8 10:30:42 1994
+ Make first read into a temporary set the file's name
+ Permit any key to continue scrolling or ex commands - this
allows stacked colon commands, and matches historic practice
+ Don't output normal ! command commentary in ex silent mode
+ Allow +/- flags after substitute commands, make line (flag)
offsets from vi mode match historic practice
+ Return <eof> to ex immediately, even if preceded by spaces. Rework
ex parser to do erase the prompt instead of depending on the print
routines to do it. Minor fixes to the ex parser for display of
default and scrolling commands. MORE EX PARSER CHANGES
Nvi 1.28 -> Nvi 1.29: Fri Aug 5 10:18:07 1994
+ Make the abbreviated ex delete command work (:dele---###lll for
example, is historically legal
+ When autoprint fires, multiple flags may be set, use ex_print
directly instead of the stub routines
+ Change v/global commands to turn off autoprint while running
+ Minor changes to make the ! command display match historic output
+ Rework the ex parser to permit multiple command separators without
commands - MAJOR CHANGE, likely to introduce all sorts of new bugs
+ Fix cd command to expand argument in the context of each element
of the cdpath option, make relative paths always relative to the
current directory
+ Rework write/quit cases for temporary files, so that user's don't
discard them accidentally
+ Check for window size changes when continuing after a suspend
+ Fix memory problem in svi_screen, used free'd memory
+ Change the ex change, insert, append commands to match historic
cursor positions if no data entered by the user
+ Change ex format flags (#, l, p) to affect future commands, not
just the current one, to match historic practice
+ Make the user's EOF character an additional scroll character in ex
+ Fix ex ^D scrolling to be the value of the scroll option, not half
the screen
+ Fix buffer execution to match historic practice - bugs where the
'*' command didn't work, and @<carriage-return> didn't work
+ Fix doubled reporting of deleted lines in filters
+ Rework the % ` / ? ( ) N n { and ^A commands to always cut into
numeric buffers regardless of the location or length of the cut
This matches historic practice
+ Fix the { command to check the current line if the cursor doesn't
start on the first character of the line
+ Do '!' expansion in the ex read command arguments, it's historic
practice. In addition, it sets the last '!' command
Nvi 1.27 -> Nvi 1.28: Wed Jul 27 21:29:18 1994
+ Add support for scrolling using the CS and SF/sf/SR/sr termcap
strings to the 4BSD curses
+ Rework of getkey() introduced a bug where command interrupt put
nvi into an infinite loop
+ Piping through a filter historically cut the replaced lines into
the default buffer, although not the numeric ones
+ Read of a filter and !! historically moved to the first nonblank
of the resulting cursor line (most of the time)
+ Rework cursor motion flags, to support '!' as a motion command
Nvi 1.26 -> Nvi 1.27: Tue Jul 26 10:27:58 1994
+ Add the meta option, to specify characters the shell will expand
+ Fix the read command to match historic practice, the white space
and bang characters weren't getting parsed correctly
+ Change SIGALRM handler to save and restore errno
+ Change SunOS include/compat.h to include <vfork.h> so that the
ex/filter.c code works again
+ Don't put lines deleted by the ex delete command into the numeric
buffers, matching historic practice
+ Fix; if appending to a buffer, default buffer historically only
references the appended text, not the resulting text
+ Support multiple, semi-colon separated search strings, and 'z'
commands after search strings
+ Make previous context mark setting match historic practice (see
docs/internals/context)
+ Fix the set command to permit whitespace between the option and
the question mark, fix question marks in general
+ Fix bug where ex error messages could be accidentally preceded
by a single space
+ Fix bug where curses reorganization could lose screen specific
mappings as soon as any screen exited
+ Fix bug in paragraph code where invalid macros could be matched
+ Make paragraph motions stop at formfeed (^L) characters
+ Change 'c' to match historic practice, it cut text into numeric
buffers
Nvi 1.25 -> Nvi 1.26: Tue Jul 19 17:46:24 1994
+ Ignore SIGWINCH if the screen size is unchanged; SunOS systems
deliver one when a screen is uncovered
+ Fix: don't permit a command with a motion component to wrap due
to wrapscan and return to the original cursor position
+ Fix: ^E wasn't beeping when reaching the bottom of the file
+ Fix bg/fg bug where tmp file exiting caused a NULL dereference
+ Rework file locking code to use fcntl(2) explicitly
+ Fix bug in section code where invalid macros could be matched
+ Fix bug where line number reset by vi's Q command
+ Add explicit character mode designation to character mode buffers
+ Add <sys/ioctl.h> include to sex/sex_window.c, needed by NET/2
vintage systems
+ Change to always flush a character during suspend, 4BSD curses
has the optimization where it doesn't flush after a standend()
+ Fix bug on OSF1 where <curses.h> changes the values of VERASE,
VKILL and VWERASE to incorrect ones
+ Fix bug where optarg used incorrectly in main.c
+ Block all signals when acting on a signal delivery
+ Fix recovery bug where RCV_EMAIL could fire even if there wasn't
a backing file; format recovery message
Nvi 1.24 -> Nvi 1.25: Sun Jul 17 14:33:38 1994
+ Stop allowing keyboard suspends (^Z) in insert mode, it's hard
to get autowrite correct, and it's not historic practice
+ Fix z^, z+ to match historic practice
+ Bug in message handling, "vi +35 non-existent_file" lost the
status message because the "+35" pushed onto the stack erased
it. For now, change so that messages aren't displayed if there
are keys waiting - may need to add a "don't-erase" bit to the
character in the stack instead
+ Bug in svi_msgflush(), where error messages could come out in
normal video
Nvi 1.23 -> Nvi 1.24: Sat Jul 16 18:30:18 1994
+ Fix core dump in exf.c, where editing a non-existent file and
exiting could cause already free'd memory to be free'd
+ Clean up numerous memory errors, courtesy of Purify
+ Change process wait code to fail if wait fails, and not attempt
to interpret the wait return information
+ Open recovery and DB files for writing as well as reading, System
V (fcntl) won't let you acquire LOCK_EX locks otherwise
+ Fix substitute bug where could malloc 0 bytes (AIX breaks)
+ Permit the mapping of <carriage-return>, it's historic practice
+ Historic vi didn't eat <blank> characters before the force
flag, match historic practice
+ Bug in ex argument parsing, corrected for literal characters
twice
+ Delete screen specific maps when the screen closes
+ Move to the first non-<blank> in the line on startup; historic
practice
+ Change the ex visual command to move directly to a line if no
trailing 'z' command
+ Fix "[[" and "]]" to match historic practice (yet again...)
+ Fix "yb" and "y{" commands to update the cursor correctly
+ Change "~<motion>" to match the yank cursor movement semantics
exactly
+ Move all of the curses related code into sex/svi - major rework,
but should help in future ports
+ Fix bug in split code caused by new file naming code, where would
drop core when a split screen exited
+ Change svi_ex_write to do character display translation, so that
messages with file names in them are displayed correctly
+ Display the file name on split screens instead of a divider line
+ Fix move bug, wasn't copying lines before putting them
+ Fix bug were :n dropped core if no arguments supplied
+ Don't quote characters in executed buffer: "ifoo<esc>" should
leave insert mode after the buffer is executed
+ Tagpop and tagpush should set the absolute mark in case only
moving within a file
+ Skip leading whitespace characters before tags and cursor word
searches
+ Fix bug in ex_global where re_conv() was allocating the temporary
buffer and not freeing it
Nvi 1.22 -> Nvi 1.23: Wed Jun 29 19:22:33 1994
+ New <sys/cdefs.h> required "inline" to change to "__inline"
+ Fix System V curses code for new ^Z support
+ Fix off-by-one in the move code, avoid ":1,$mo$" with only one
line in the buffer
+ Line orientation of motion commands was remembered too long,
i.e. '.' command could be incorrectly marked as line oriented
+ Move file modification time into EXF, so it's shared across
split screens
+ Put the prev[ious] command back in, people complained
+ Random fixes to next/prev semantics changed in 1.22
+ Historically vi doesn't only move to the last address if there's
ANYTHING after the addresses, e.g. ":3" moves to line 3, ":3|"
prints line 3
Nvi 1.21 -> Nvi 1.22: Mon Jun 27 11:01:41 1994
+ Make the line between split screens inverse video again
+ Delete the prev[ious] command, it's not useful enough to keep
+ Rework :args/file name handling from scratch - MAJOR CHANGE,
likely to introduce all sorts of new bugs
+ Fix RE bug where no sub-expressions in the pattern but there were
sub-expressions referenced in the replacement, e.g. "s/XXX/\1/g"
+ Change recovery to not leave unmodified files around after a
crash, by using the owner 'x' bit on unmodified backup files
MAJOR CHANGE, the system recovery script has to change!
+ Change -r option to delete recovery.* files that reference non-
existent vi.* files
+ Rework recovery locking so that fcntl(2) locking will work
+ Fix append (upper-case) buffers, broken by cut fixes
+ Fix | to not set the absolute motion mark
+ Read $HOME/.exrc file on startup if the effective user ID is
root. This makes running vi while su(1)'d work correctly
+ Use the full pathname of the file as the recovery name, not
just the last component. Matches historic practice
+ Keep marks in empty files from being destroyed
+ Block all caught signals before calling the DB routines
+ Make the line change report match historic practice (yanked
lines were different than everything else)
+ Add section on multiple screens to the reference manual
+ Display all messages at once, combine onto a single line if
possible. Delete the trailing period from all messages
Nvi: 1.20 -> Nvi 1.21: Thu May 19 12:21:58 1994
+ Delete the -l flag from the recover mail
+ Send the user email if ex command :preserve executed, this matches
historic practice. Lots of changes to the preserve and recovery
code, change preserve to snapshot files (again, historic practice)
+ Make buffers match historic practice: "add logically stores text
into buffer a, buffer 1, and the unnamed buffer
+ Print <tab> characters as ^I on the colon command line if the
list option set
+ Adjust ^F and ^B scroll values in the presence of split screens
and small windows
+ Break msg* routines out from util.c into msg.c, start thinking
about message catalogs
+ Add tildeop set option, based on STEVIE's option of the same name
Changes the ~ command into "[count] ~ motion", i.e. ~ takes a
trailing motion
+ Chose NOT to match historic practice on cursor positioning after
consecutive undo commands on a single line; see vi/v_undo.c for
the comment
+ Add a one line cache so that multiple changes to the same line
are only counted once (e.g. "dl35p" changes one line, not 35)
+ Rework signals some more. Block file sync signals in vi routines
that interface to DB, so can sync the files at interrupt time
Write up all of the signal handling arguments, see signal.c
Nvi: 1.19 -> Nvi 1.20: Thu May 5 19:24:57 1994
+ Return ^Z to synchronous handling. See the discussion in signal.c
and svi_screen.c:svi_curses_init()
+ Fix bug where line change report was wrong in util.c:msg_rpt()
Nvi: 1.18 -> Nvi 1.19: Thu May 5 12:59:51 1994
+ Block DSUSP so that ^Y isn't delivered at SIGTSTP
+ Fix bug - put into an empty file leaves the cursor at 1,0,
not the first nonblank
+ Fix bug were number of lines reported for the 'P' command was
off-by-one
+ Fix bug were 0^D wasn't being handled correctly
+ Delete remnants of ^Z as a raw character
+ Fix bug where if a map was an entire colon command, it may never
have been displayed
+ Final cursor position fixes for the vi T and t commands
+ The ex :next command took an optional ex command as it's first
argument similar to the :edit commands to match historic practice
Nvi 1.17 -> Nvi 1.18: Wed May 4 13:57:10 1994
+ Rework curses information in the PORT/Makefile's
+ Minor fixes to ^Z asynchronous code
Nvi 1.16 -> Nvi 1.17: Wed May 4 11:15:56 1994
+ Make ex comment handling match historic practice
+ Make ^Z work asynchronously, we can no longer use the SIGTSTP
handler in the curses library
Nvi 1.15 -> Nvi 1.16: Mon May 2 19:42:07 1994
+ Make the 'p' and 'P' commands support counts, i.e. "Y10p" works
+ Make characters that map to themselves as the first part of the
mapping work, it's historic practice
+ Fix bug where "s/./\& /" discarded the space in the replacement
string
+ Add support for up/down cursor arrows in text input mode, rework
left/right support to match industry practice
+ Fix bug were enough character remapping could corrupt memory
+ Delete O_REMAPMAX in favor of setting interrupts after N mapped
characters without a read, delete the map counter per character
MAJOR CHANGE. All of the interrupt signal handling has been
reworked so that interrupts are always turned on instead of
being turned on periodically, when an interruptible operation is
pending
+ Fix bug where vi wait() was interrupted by the recovery alarm
+ Make +cmd's and initial commands execute with the current line
set to the last line of the file. This is historic practice
+ Change "lock failed" error message to a file status message
It always fails over NFS, and making all NFS files read-only
isn't going to fly
+ Use the historic line number format, but check for overflow
+ Fix bug where vi command parser ignored buffers specified as
part of the motion command
+ Make [@*]buffer commands on character mode buffers match historic
practice
+ Fix bug where the cmap/chf entries of the tty structure weren't
being cleared when new characters were read
+ Fix bug where the default command motion flags were being set
when the command was a motion component
+ Fix wrapmargin bug; if appending characters, and wrapmargin breaks
the line, an additional space is eaten
Nvi 1.14 -> Nvi 1.15: Fri Apr 29 07:44:57 1994
+ Make the ex delete command work in any empty file
+ Fix bug where 't' command placed the cursor on the character
instead of to its left
+ ^D and ^U didn't set the scroll option value historically
Note, this change means that any user set value (e.g. 15^D)
will be lost when splitting the screen, since the split code
now resets the scroll value regardless
+ Fix the ( command to set the absolute movement mark
+ Only use TIOCGWINSZ for window information if SIGWINCH signal
caught
+ Delete the -l flag, and make -r work for multiple arguments
+ Add the ex "recover[!] file" command
+ Switch into ex terminal mode and use the sex routines when
append/change/insert called from vi mode
+ Make ^F and ^B match historic practice. This required a fairly
extensive rework of the svi scrolling code
+ Cursor positioning in H, M, L, G (first non-blank for 1G) wasn't
being done correctly. Delete the SETLFNB flag. H, M, and L stay
logical movements (SETNNB) and G always moves to the first non-
blank
+ System V uses "lines" and "cols", not "li" and "co", change as
necessary. Check termcap function returns for errors
+ Fix `<character> command to do start/end of line correction,
and to set line mode if starting and stopping at column 0
+ Fix bug in delete code where dropped core if deleted in character
mode to an empty line. (Rework the delete code for efficiency.)
+ Give up on SunOS 4.1.X, and use "cc" instead of /usr/5bin/cc
+ Protect ex_getline routine from interrupted system calls (if
possible, set SA_RESTART on SIGALRM, too)
+ Fix leftright scrolling bug, when moving to a shorter line
+ Do validity checking on the copy, move, t command target line
numbers
+ Change for System V % pattern broke trailing flags for empty
replacement strings
+ Fix bug when RCM flags retained in the saved dot structure
+ Make the ex '=' command work for empty files
+ Fix bug where special_key array was being free'd (it's no longer
allocated)
+ Matches cut in line mode only if the starting cursor is at or
before the first non-blank in its line, and the ending cursor is
at or after the last non-blank in its line
+ Add the :wn command, so you can write a file and switch to a new
file in one command
+ Allow only a single key as an argument to :viusage
+ New movement code broke filter/paragraph operations in empty
files ("!}date" in an empty file was dropping core)
Nvi 1.12 -> Nvi 1.14: Mon Apr 18 11:05:10 1994
+ Fix FILE structure leakage in the ex filter code
+ Rework suspend code for System V curses. Nvi has to do the
the work, there's no way to get curses to do it right
+ Revert SunOS 4.1.X ports to the distributed curses. There's
a bug in Sun's implementation that we can't live with
+ Quit immediately if row/column values are unreasonable
+ Fix the function keys to match vi historic behavior
+ Replace the echo/awk magic in the Makefile's with awk scripts
+ Version for 4.4BSD
Nvi 1.11 -> Nvi 1.12: Thu Apr 14 11:10:19 1994
+ Fix bug where only the first vi key was checked for validity
+ Make 'R' continue to overwrite after a <carriage-return>
+ Only display the "no recovery" message once
+ Rework line backup code to restore the line to its previous
condition
+ Don't permit :q in a .exrc file or EXINIT variable
+ Fix wrapscan option bug where forward searches become backward
searches and do cursor correction accordingly
+ Change "dd" to move the cursor to the first non-blank on the line
+ Delete cursor attraction to the first non-blank, change non-blank
motions to set the most attractive cursor position instead
+ Fix 'r' substitute option to set the RE to the last RE, not the
last substitute RE
+ Fix 'c' and 'g' substitute options to always toggle, and fix
edcompatible option to not reset them
+ Display ex error messages in inverse video
+ Fix errorbells option to match historic practice
+ Delete fixed character display table in favor of table built based
on the current locale
+ Add ":set octal" option, that displays unknown characters as octal
values instead of the default hexadecimal
+ Make all command and text input modes interruptible
+ Fix ex input mode to display error messages immediately, instead
of waiting for the lines to be resolved
+ Fix bug where vi calling append could overwrite the command
+ Fix off-by-one in the ex print routine tab code
+ Fix incorrect ^D test in vi text input routines
+ Add autoindent support for ex text insert routines
+ Add System V substitute command replacement pattern semantics,
where '%' means the last replacement pattern
+ Fix bug that \ didn't escape newlines in ex commands
+ Regularize the names of special characters to CH_*
+ Change hex insert character from ^Vx<hex_char> to ^X<hex_char>
+ Integrate System V style curses, so SunOS and Solaris ports can
use the native curses implementation
Nvi 1.10 -> Nvi 1.11: Thu Mar 24 16:07:45 EST 1994
+ Change H, M, and L to set the absolute mark, historical practice
+ Fix bug in stepping through multiple tags files
+ Add "remapmax" option that turns off map counts so you can remap
infinitely. If it's off, term_key() can be interrupted from the
keyboard, which will cause the buffers to flush. I also dropped
the default max number of remaps to 50. (Only Dave Hitz's TM
macros and maze appear to go over that limit.)
+ Change :mkexrc to not dump w{300,1200,9600}, lisp options
+ Fix backward search within a line bug
+ Change all the includes of "pathnames.h" to use <>'s so that the
PORT versions can use -I. to replace it with their own versions
+ Make reads and writes interruptible. Rework code that enters and
leaves ex for '!' and filter commands, rework all interrupt and
timer code
+ Fix core dump when user displayed option in .exrc file
+ Fix bug where writing empty files didn't update the saved
modification time
+ Fix bug where /pattern/ addressing was always a backward search
+ Fix bug triggered by autoindent of more than 32 characters, where
nvi wasn't checking the right TEXT length
+ Fix bug where joining only empty lines caused a core dump
Nvi 1.09 -> Nvi 1.10: Sat Mar 19 15:40:29 EST 1994
+ Fix "set all" core dump
Nvi 1.08 -> Nvi 1.09: Sat Mar 19 10:11:14 EST 1994
+ If the tag's file path is relative, and it doesn't exist, check
relative to the tag file location
+ Fix ~ command to free temporary buffer on error return
+ Create vi.ref, a first cut at a reference document for vi
The manual page and the reference document only document the
set options, so far
+ Fix 1G bug not always going to the first non-blank
+ Upgrade PORT/regex to release alpha3.4, from Henry Spencer
+ Add MKS vi's "cdpath" option, supporting a cd search path
+ Handle if search as a motion was discarded, i.e. "d/<erase>"
+ Change nvi to not create multiple recovery files if modifying
a recovered file
+ Decide to ignore that the cursor is before the '$' when inserting
in list mode. It's too hard to fix
Nvi 1.07 -> Nvi 1.08: Wed Mar 16 07:37:36 EST 1994
+ Leftright and big line scrolling fixes. This meant more changes
to the screen display code, so there may be new problems
+ Don't permit search-style addresses until a file has been read
+ "c[Ww]" command incorrectly handled the "in whitespace" case
+ Fix key space allocation bug triggered by cut/paste under SunOS
+ Ex move command got the final cursor position wrong
+ Delete "optimize option not implemented" message
+ Make the literal-next character turn off mapping for the next
character in text input mode
Nvi 1.06 -> Nvi 1.07: Mon Mar 14 11:10:33 EST 1994
+ The "wire down" change in 1.05 broke ex command parsing, there
wasn't a corresponding change to handle multiple K_VLNEXT chars
+ Fix final position for vi's 't' command
Nvi 1.05 -> Nvi 1.06: Sun Mar 13 16:12:52 EST 1994
+ Wire down ^D, ^H, ^W, and ^V, regardless of the user's termios
values
+ Add ^D as the ex scroll command
+ Support ^Q as a literal-next character
+ Rework abbreviations to be delimited by any !inword() character
+ Add options description to the manual page
+ Minor screen cache fix for svi_get.c
+ Rework beautify option support to match historical practice
+ Exit immediately if not reading from a tty and a command fails
+ Default the SunOS 4.* ports to the distributed curses, not SMI's
Nvi 1.04 -> Nvi 1.05: Thu Mar 24 16:07:45 EST 1994
+ Make cursor keys work in input mode
+ Rework screen column code in vi curses screen. MAJOR CHANGE -
after this, we'll be debugging curses screen presentation from
scratch
+ Explode include files in vi.h into the source files
Nvi 1.03 -> Nvi 1.04: Sun Mar 6 14:14:16 EST 1994
+ Make the ex move command keep the marks on the moved lines
+ Change resize semantics so you can set the screen size to a
specific value. A couple of screen fixes for the resize code
+ Fixes for foreground/background due to SIGWINCH
+ Complete rework of all of vi's cursor movements. The underlying
assumption in the old code was that the starting cursor position
was part of the range of lines cut or deleted. The command
"d[[" is an example where this isn't true. Change it so that all
motion component commands set the final cursor position separately
from the range, as it can't be done correctly later. This is a
MAJOR CHANGE - after this change, we'll be debugging the cursor
positioning from scratch
+ Rewrite the B, b, E, e commands to use vi's getc() interface
instead of rolling their own
+ Add a second MARK structure, LMARK, which is the larger mark
needed by the logging and mark queue code. Everything else uses
the reworked MARK structure, which is simply a line/column pair
+ Rework cut/delete to not expect 1-past-the-end in the range, but
to act on text to the end of the range, inclusive
+ Sync on write's, to force NFS to flush
Nvi 1.01 -> Nvi 1.03: Sun Jan 23 17:50:35 EST 1994
+ Tag stack fixes, was returning to the tag, not the position from
which the user tagged
+ Only use from the cursor to the end of the word in cursor word
searches and tags. (Matches historical vi behavior.)
+ Fix delete-last-line bug when line number option set
+ Fix usage line for :split command
+ If O_NUMBER set, long input lines would eventually fail, the
column count for the second screen of long lines wasn't set
correctly
+ Fix for [[ reaching SOF with a column longer than the first line
+ Fix for multiple error messages if no screen displayed
+ Fix :read to set alternate file name as in historical practice
+ Fix cut to rotate the numeric buffers if line mode flag set
Nvi 1.00 -> Nvi 1.01: Wed Jan 12 13:37:18 EST 1994
+ Don't put cut items into numeric buffers if cutting less than
parts of two lines
Nvi 0.94 -> Nvi 1.00: Mon Jan 10 02:27:27 EST 1994
+ Read-ahead not there; BSD tty driver problem, SunOS curses
problem
+ Global command could error if it deleted the last line of
the file
+ Change '.' to only apply to the 'u' if entered immediately
after the 'u' command. "1pu.u.u. is still broken, but I
expect that it's going to be sacrificed for multiple undo
+ If backward motion on a command, now move to the point; get
yank cursor positioning correct
+ Rework cut buffers to match historic practice - yank/delete
numeric buffers redone sensibly, ignoring historic practice
Nvi 0.92 -> Nvi 0.93: Mon Dec 20 19:52:14 EST 1993
+ Christos Zoulas reimplemented the script windows using pty's,
which means that they now work reasonably. The down side of
this is that almost all ports other than 4.4BSD need to include
two new files, login_tty.c and pty.c from the PORT/clib directory
I've added them to the Makefiles
+ All calloc/malloc/realloc functions now cast their pointers, for
SunOS - there should be far fewer warning messages, during the
build. The remaining messages are where CHAR_T's meet char *'s,
i.e. where 8-bit clean meets strcmp
+ The user's argument list handling has been reworked so that there
is always a single consistent position for use by :next, :prev and
:rewind
+ All of the historical options are now at least accepted, although
not all of them are implemented. (Edcompatible, hardtabs, lisp,
optimize, redraw, and slowopen aren't implemented.)
+ The RE's have been reworked so that matches of length 0 are
handled in the same way as vi used to handle them
+ Several more mapping fixes and ex parser addressing fixes
# vim: set filetype=changelog ts=8 sw=8 tw=79 expandtab colorcolumn=79 :
================================================
FILE: ChangeLog.license
================================================
SPDX-License-Identifier: BSD-3-Clause
Copyright (c) 2021-2024 Jeffrey H. Johnson <johnsonjh.dev@gmail.com> and contributors
================================================
FILE: GNUmakefile
================================================
###############################################################################
# - O p e n V i - #
###############################################################################
# vim: filetype=make:tabstop=8:tw=79:noexpandtab:colorcolumn=79:list:
# SPDX-License-Identifier: BSD-3-Clause
###############################################################################
###############################################################################
#
# Copyright (c) 2021-2024 Jeffrey H. Johnson
#
# Copying and distribution of this file, with or without modification,
# are permitted in any medium without royalty provided the copyright
# notice and this notice are preserved. This file is offered "AS-IS",
# without any warranty.
#
###############################################################################
###############################################################################
# Default compiler settings
CC ?= cc
DEPFLAGS ?= -MMD -MP
INCLDS = -Iinclude -Icommon -Iregex -Iopenbsd
CFLAGS += -std=gnu99 $(INCLDS)
WFLAGS ?= -Wall -Wno-pointer-sign -Wno-uninitialized
###############################################################################
# Set DEBUG to enable debugging build
#DEBUG = 1
DBGFLAGS ?= -Wextra -ggdb -g3 -O0
###############################################################################
# Set LGC to enable link-time garbage collection (for non-debugging builds)
#LGC = 1
LTGC = -fdata-sections -ffunction-sections
LTGL = -Wl,--gc-sections
###############################################################################
# Set LTO to enable link-time optimization (for non-debugging builds)
#LTO = 1
LTOC = -flto
###############################################################################
PKGCFG ?= pkg-config
TR ?= tr
UNAME ?= uname
ifndef OS
OS=$(shell $(UNAME) -s 2> /dev/null | \
$(TR) '[:upper:]' '[:lower:]' 2> /dev/null)
endif # OS
ifeq ($(OS),sunos)
OS=$(shell $(UNAME) -o 2> /dev/null | \
$(TR) '[:upper:]' '[:lower:]' 2> /dev/null)
_SUNOS = 1
endif # sunos
ifeq ($(OS),os400)
_OS400 = 1
OS = aix
endif # os400
###############################################################################
ifeq ($(OS),solaris)
ifneq (,$(findstring suncc,$(CC))) # suncc
OPTLEVEL ?= -O2
_OSLCC = 1
endif # suncc
else
OPTLEVEL ?= -Os
endif # solaris
###############################################################################
ifeq ($(OS),netbsd)
ifneq (,$(findstring clang,$(CC))) # clang
WFLAGS += -Wno-unknown-warning-option \
-Wno-system-headers \
-Wno-char-subscripts
endif # clang
endif # netbsd
ifeq ($(OS),illumos)
WFLAGS += -Wno-unknown-pragmas
endif # illumos
ifeq ($(OS),solaris)
ifeq ($(_OSLCC),1)
SUNBITS ?= $$(command -p isainfo -b 2> /dev/null || printf '%s' 32)
WFLAGS += -erroff=E_EMPTY_DECLARATION \
-erroff=E_STATEMENT_NOT_REACHED \
-erroff=E_ARG_INCOMPATIBLE_WITH_ARG_L \
-erroff=E_ASSIGNMENT_TYPE_MISMATCH \
-erroff=E_ATTRIBUTE_UNKNOWN
CFLAGS += -m$(SUNBITS)
LDFLAGS += -m$(SUNBITS)
endif # suncc
endif # solaris
###############################################################################
# Try to query pkg-config for ncurses flags and libraries
ifneq ($(OS),solaris)
ifneq ($(OS),netbsd)
ifndef CURSESLIB
CFLAGS += $(shell $(PKGCFG) ncurses --cflags 2> /dev/null \
|| $(PKGCFG) curses --cflags 2> /dev/null)
CURSESLIB += $(shell $(PKGCFG) ncurses --libs 2> /dev/null \
|| $(PKGCFG) curses --libs 2> /dev/null)
endif #!CURSESLIB
endif #!netbsd
endif #!solaris
###############################################################################
# Default libraries to link
ifeq ($(OS),netbsd)
CURSESLIB ?= -lcurses -lterminfo
LDFLAGS += -L"/usr/local/lib" -L"/usr/pkg/lib" -L"/usr/lib" -L"/lib"
LDFLAGS += -Wl,-R"/lib" -Wl,-R"/usr/lib" -Wl,-R"/usr/pkg/lib" \
-Wl,-R"/usr/local/bin"
ifdef LTO
ifneq (,$(findstring clang,$(CC))) # clang
LLD ?= ld.lld
LDFLAGS += -fuse-ld="$$(command -v $(LLD) || $(PRINTF) '%s' $(LLD))"
endif # clang
endif # LTO
else # !netbsd
CURSESLIB ?= -lncurses
endif # netbsd
ifeq ($(OS),aix) # aix/os400
MAIXBITS ?= $(shell command -p $(GETCONF) KERNEL_BITMODE 2> /dev/null || \
$(PRINTF) '%s' "32")
ifeq ($(_OS400),1) # IBM i (OS/400) PASE
CFLAGS += -I/QOpenSys/pkgs/include/ncurses
LDFLAGS += -lutil -L/QOpenSys/pkgs/lib
endif
ifneq (,$(findstring gcc,$(CC))) # gcc (GNU C)
CFLAGS += $(WFLAGS) -maix$(MAIXBITS)
LDFLAGS += -maix$(MAIXBITS) -Wl,-b$(MAIXBITS)
endif # gcc
ifneq (,$(findstring clang,$(CC))) # xlclang / ibm-clang (IBM Open XL)
CFLAGS += $(WFLAGS) -m$(MAIXBITS)
LDFLAGS += -m$(MAIXBITS) -Wl,-b$(MAIXBITS)
endif # clang
ifneq (,$(findstring gxlc,$(CC))) # gxlc (IBM XL C)
CFLAGS += -m$(MAIXBITS)
LDFLAGS += -m$(MAIXBITS) -Wl,-b$(MAIXBITS)
DEPFLAGS =
endif # gxlc
LDFLAGS += -L/opt/freeware/lib
CFLAGS += -I/opt/freeware/include
LINKLIBS ?= -lbsd $(CURSESLIB) -lcurses
else # !aix/os400
ifeq ($(OS),solaris)
CFLAGS += -U__EXTENSIONS__ -D_XPG4_2 -D__solaris__ -D_REENTRANT \
-D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_XOPEN_SOURCE=600
endif # solaris
ifeq ($(OS),illumos)
CFLAGS += -D__illumos__
endif # illumos
ifeq ($(_SUNOS),1)
CFLAGS += -Du_int32_t=uint32_t -Du_int16_t=uint16_t -Du_int8_t=uint8_t
CFLAGS += -DBYTE_ORDER=__BYTE_ORDER__
CFLAGS += -I/usr/include/ncurses
LINKLIBS ?= $(CURSESLIB)
else # !sunos
LINKLIBS ?= -lutil $(CURSESLIB)
endif # sunos
CFLAGS += $(WFLAGS)
endif # aix
LINKLIBS += $(EXTRA_LIBS)
###############################################################################
CFLAGS += -Ddbm_open=openbsd_dbm_open -Ddbm_close=openbsd_dbm_close \
-Ddbm_fetch=openbsd_dbm_fetch -Ddbm_firstkey=openbsd_dbm_firstkey \
-Ddbm_nextkey=openbsd_dbm_nextkey -Ddbm_delete=openbsd_dbm_delete \
-Ddbm_store=openbsd_dbm_store -Ddbm_error=openbsd_dbm_error \
-Ddbm_clearerr=openbsd_dbm_clearerr -Ddbm_rdonly=openbsd_dbm_rdonly
###############################################################################
# Installation directory prefix for install/uninstall
PREFIX ?= /usr/local
DESTIDIR ?=
###############################################################################
# Executable prefix and/or suffix (e.g. 'o', '-openbsd') for install/uninstall
BINPREFIX ?= o
###############################################################################
# Permissions and user:group to use for installed executables
IPERM = 755
IUSGR = root:bin
###############################################################################
# Using _FORTIFY_SOURCE=2 grows the binary by about ~2-3 KiB (on AMD64)
ifdef DEBUG
CFLAGS += $(DBGFLAGS) -DDEBUG -DSTATISTICS -DHASH_STATISTICS
else # !DEBUG
CFLAGS += $(OPTLEVEL) -D_FORTIFY_SOURCE=2
endif # DEBUG
###############################################################################
ifndef DEBUG
ifdef LTO
CFLAGS += $(LTOC)
LDFLAGS += $(LTOC)
endif # LTO
ifdef LGC
CFLAGS += $(LTGC)
LDFLAGS += $(LTGL)
endif # LGC
endif # DEBUG
###############################################################################
AWK ?= awk
CHMOD ?= chmod
CHOWN ?= chown
CP ?= cp -f
PENV := env
GETCONF ?= getconf
LN ?= ln
LNS = $(LN) -fs
MKDIR ?= mkdir -p
PAWK = command -p $(PENV) PATH="$$(command -p $(GETCONF) PATH)" $(AWK)
PRINTF ?= printf
RMDIR ?= rmdir
RM ?= rm
RMF = $(RM) -f
SLEEP ?= sleep
STRIP ?= strip
SSTRIP ?= sstrip
TEST ?= test
TRUE ?= true
UPX ?= upx
###############################################################################
ifdef V
DEBUG = 1
endif # V
###############################################################################
ifdef DEBUG
VERBOSE = set -ex
else # !DEBUG
VERBOSE = $(TRUE)
endif # DEBUG
###############################################################################
XSRC = openbsd/dirname.c \
openbsd/err.c \
openbsd/errc.c \
openbsd/errx.c \
openbsd/getopt_long.c \
openbsd/getprogname.c \
openbsd/issetugid.c \
openbsd/minpwcache.c \
openbsd/reallocarray.c \
openbsd/setmode.c \
openbsd/strlcat.c \
openbsd/strlcpy.c \
openbsd/strtonum.c \
openbsd/verr.c \
openbsd/verrc.c \
openbsd/verrx.c \
openbsd/vwarn.c \
openbsd/vwarnc.c \
openbsd/vwarnx.c \
openbsd/warn.c \
openbsd/warnc.c \
openbsd/warnx.c \
xinstall/xinstall.c
SRCS = cl/cl_funcs.c \
cl/cl_main.c \
cl/cl_read.c \
cl/cl_screen.c \
cl/cl_term.c \
common/cut.c \
common/delete.c \
common/exf.c \
common/key.c \
common/line.c \
common/log.c \
common/main.c \
common/mark.c \
common/msg.c \
common/options.c \
common/options_f.c \
common/put.c \
common/recover.c \
common/screen.c \
common/search.c \
common/seq.c \
common/util.c \
db/btree/bt_close.c \
db/btree/bt_conv.c \
db/btree/bt_debug.c \
db/btree/bt_delete.c \
db/btree/bt_get.c \
db/btree/bt_open.c \
db/btree/bt_overflow.c \
db/btree/bt_page.c \
db/btree/bt_put.c \
db/btree/bt_search.c \
db/btree/bt_seq.c \
db/btree/bt_split.c \
db/btree/bt_utils.c \
db/db/db.c \
db/hash/hash_bigkey.c \
db/hash/hash_buf.c \
db/hash/hash.c \
db/hash/hash_func.c \
db/hash/hash_log2.c \
db/hash/hash_page.c \
db/hash/ndbm.c \
db/mpool/mpool.c \
db/recno/rec_close.c \
db/recno/rec_delete.c \
db/recno/rec_get.c \
db/recno/rec_open.c \
db/recno/rec_put.c \
db/recno/rec_search.c \
db/recno/rec_seq.c \
db/recno/rec_utils.c \
ex/ex_abbrev.c \
ex/ex_append.c \
ex/ex_args.c \
ex/ex_argv.c \
ex/ex_at.c \
ex/ex_bang.c \
ex/ex.c \
ex/ex_cd.c \
ex/ex_cmd.c \
ex/ex_delete.c \
ex/ex_display.c \
ex/ex_edit.c \
ex/ex_equal.c \
ex/ex_file.c \
ex/ex_filter.c \
ex/ex_global.c \
ex/ex_init.c \
ex/ex_join.c \
ex/ex_map.c \
ex/ex_mark.c \
ex/ex_mkexrc.c \
ex/ex_move.c \
ex/ex_open.c \
ex/ex_preserve.c \
ex/ex_print.c \
ex/ex_put.c \
ex/ex_quit.c \
ex/ex_read.c \
ex/ex_screen.c \
ex/ex_script.c \
ex/ex_set.c \
ex/ex_shell.c \
ex/ex_shift.c \
ex/ex_source.c \
ex/ex_stop.c \
ex/ex_subst.c \
ex/ex_tag.c \
ex/ex_txt.c \
ex/ex_undo.c \
ex/ex_usage.c \
ex/ex_util.c \
ex/ex_version.c \
ex/ex_visual.c \
ex/ex_write.c \
ex/ex_yank.c \
ex/ex_z.c \
openbsd/basename.c \
openbsd/err.c \
openbsd/errx.c \
openbsd/getopt_long.c \
openbsd/getprogname.c \
openbsd/issetugid.c \
openbsd/open.c \
openbsd/pledge.c \
openbsd/reallocarray.c \
openbsd/strlcpy.c \
openbsd/strtonum.c \
openbsd/verr.c \
openbsd/verrx.c \
openbsd/vwarn.c \
openbsd/vwarnx.c \
openbsd/warn.c \
openbsd/warnx.c \
regex/regcomp.c \
regex/regerror.c \
regex/regexec.c \
regex/regfree.c \
vi/getc.c \
vi/v_at.c \
vi/v_ch.c \
vi/v_cmd.c \
vi/v_delete.c \
vi/v_ex.c \
vi/vi.c \
vi/v_increment.c \
vi/v_init.c \
vi/v_itxt.c \
vi/v_left.c \
vi/v_mark.c \
vi/v_match.c \
vi/v_paragraph.c \
vi/v_put.c \
vi/v_redraw.c \
vi/v_replace.c \
vi/v_right.c \
vi/v_screen.c \
vi/v_scroll.c \
vi/v_search.c \
vi/v_section.c \
vi/v_sentence.c \
vi/vs_line.c \
vi/vs_msg.c \
vi/vs_refresh.c \
vi/vs_relative.c \
vi/vs_smap.c \
vi/vs_split.c \
vi/v_status.c \
vi/v_txt.c \
vi/v_ulcase.c \
vi/v_undo.c \
vi/v_util.c \
vi/v_word.c \
vi/v_xchar.c \
vi/v_yank.c \
vi/v_z.c \
vi/v_zexit.c
###############################################################################
VPATH = build:cl:common:db:ex:include:vi:regex:openbsd:bin
OBJS := ${SRCS:.c=.o}
XOBJ := ${XSRC:.c=.o}
DEPS := ${OBJS:.o=.d}
XDEP := ${XOBJ:.o=.d}
###############################################################################
.PHONY: all
all: bin/vi \
bin/ex \
bin/view \
bin/xinstall \
docs/USD.doc/vi.man/vi.1 \
scripts/virecover.8
###############################################################################
ex/ex_def.h: ex/ex.awk ex/ex_cmd.c
ifndef DEBUG
-@$(PRINTF) "\r\t$(AWK):\t%42s\n" "ex/ex.awk"
endif # DEBUG
@$(VERBOSE); $(RMF) "./ex/ex_def.h"; \
$(PAWK) -f \
"./ex/ex.awk" "./ex/ex_cmd.c" \
> "./ex/ex_def.h" && \
$(TEST) -f \
"./ex/ex_def.h"
###############################################################################
common/options_def.h: common/options.awk common/options.c ex/ex_def.h
ifndef DEBUG
-@$(PRINTF) "\r\t$(AWK):\t%42s\n" "command/options.awk"
endif # DEBUG
@$(VERBOSE); $(RMF) "./common/options_def.h"; \
$(PAWK) -f \
"./common/options.awk" "./common/options.c" \
> "./common/options_def.h" && \
$(TEST) -f "./common/options_def.h"
###############################################################################
.PHONY: clean distclean realclean mostlyclean maintainer-clean
ifneq (,$(findstring clean,$(MAKECMDGOALS)))
.NOTPARALLEL: clean distclean realclean mostlyclean maintainer-clean
endif # (,$(findstring clean,$(MAKECMDGOALS)))
clean distclean realclean mostlyclean maintainer-clean:
ifndef DEBUG
-@$(PRINTF) '\r\t%s\t%42s\n' "rm:" "common/options_def.h"
endif # DEBUG
@$(VERBOSE); $(RMF) "./common/options_def.h"
ifndef DEBUG
-@$(PRINTF) '\r\t%s\t%42s\n' "rm:" "ex/ex_def.h"
endif # DEBUG
@$(VERBOSE); $(RMF) "./ex/ex_def.h"
ifndef DEBUG
-@$(PRINTF) '\r\t%s\t%42s\n' "rm:" "objects"
endif # DEBUG
@$(VERBOSE); $(RMF) $(OBJS) $(XOBJ)
ifndef DEBUG
-@$(PRINTF) '\r\t%s\t%42s\n' "rm:" "dependencies"
endif # DEBUG
@$(VERBOSE); $(RMF) $(DEPS) $(XDEP)
ifndef DEBUG
-@$(PRINTF) '\r\t%s\t%42s\n' "rm:" "bin/vi"
endif # DEBUG
@$(VERBOSE); $(TEST) -f "./bin/vi" && $(RMF) "./bin/vi" || $(TRUE)
ifndef DEBUG
-@$(PRINTF) '\r\t%s\t%42s\n' "rm:" "bin/ex"
endif # DEBUG
@$(VERBOSE); $(TEST) -e "./bin/ex" && $(RMF) "./bin/ex" || $(TRUE)
@$(VERBOSE); $(TEST) -h "./bin/ex" && $(RMF) "./bin/ex" || $(TRUE)
ifndef DEBUG
-@$(PRINTF) '\r\t%s\t%42s\n' "rm:" "bin/view"
endif # DEBUG
@$(VERBOSE); $(TEST) -e "./bin/view" && $(RMF) "./bin/view" || $(TRUE)
@$(VERBOSE); $(TEST) -h "./bin/view" && $(RMF) "./bin/view" || $(TRUE)
ifndef DEBUG
-@$(PRINTF) '\r\t%s\t%42s\n' "rm:" "bin/xinstall"
endif # DEBUG
@$(VERBOSE); $(TEST) -f "./bin/xinstall" && \
$(RMF) "./bin/xinstall" || $(TRUE)
ifndef DEBUG
-@$(PRINTF) '\r\t%s\t%42s\n' "$(RMDIR):" "bin"
endif # DEBUG
@$(VERBOSE); $(TEST) -d "./bin" && $(RMDIR) "./bin" || $(TRUE)
-@$(TEST) -d "./bin" && $(PRINTF) '\r\t%s\t%42s\n' \
"WARNING:" "Directory './bin' not removed." || $(TRUE)
###############################################################################
%.o: %.c common/options_def.h ex/ex_def.h
ifndef DEBUG
-@$(PRINTF) "\r\t$(CC):\t%42s\n" "$@"
endif # DEBUG
@$(VERBOSE); $(CC) $(CFLAGS) $(DEPFLAGS) -c -o "$@" "$<"
-include $(wildcard $(DEPS))
-include $(wildcaed $(XDEP))
###############################################################################
bin/xinstall: $(XOBJ)
@$(TEST) -d "./bin" || $(MKDIR) "./bin"
ifndef DEBUG
-@$(PRINTF) '\r\t$(LD):\t%42s\n' "$@"
endif # DEBUG
@$(VERBOSE); $(CC) -o "$@" $^ $(LDFLAGS) $(EXTRA_LIBS)
.PHONY: xinstall
xinstall: bin/xinstall
-@$(TRUE)
###############################################################################
bin/vi: $(OBJS)
@$(TEST) -d "./bin" || $(MKDIR) "./bin"
ifndef DEBUG
-@$(PRINTF) '\r\t$(LD):\t%42s\n' "$@"
endif # DEBUG
@$(VERBOSE); $(CC) -o "$@" $^ $(LDFLAGS) $(LINKLIBS)
.PHONY: vi
vi: bin/vi
-@$(TRUE)
###############################################################################
bin/ex: bin/vi
ifndef DEBUG
-@$(PRINTF) "\r\t$(LN):\t%42s\n" "$@"
endif # DEBUG
@$(VERBOSE); $(LNS) "vi" "./bin/ex"
.PHONY: ex
ex: bin/ex
-@$(TRUE)
##############################################################################
bin/view: bin/vi
ifndef DEBUG
-@$(PRINTF) "\r\t$(LN):\t%42s\n" "$@"
endif # DEBUG
@$(VERBOSE); $(LNS) "vi" "./bin/view"
.PHONY: view
view: bin/view
-@$(TRUE)
###############################################################################
.PHONY: install
ifneq (,$(findstring install,$(MAKECMDGOALS)))
.NOTPARALLEL: install
endif # (,$(findstring install,$(MAKECMDGOALS)))
install: bin/vi bin/ex bin/view docs/USD.doc/vi.man/vi.1 \
scripts/virecover scripts/virecover.8
ifndef DEBUG
-@$(PRINTF) "\r\t%s\t%42s\n" "mkdir:" "$(DESTDIR)$(PREFIX)/bin"
endif # DEBUG
@$(VERBOSE); $(TEST) -d "$(DESTDIR)$(PREFIX)/bin" || \
$(MKDIR) "$(DESTDIR)$(PREFIX)/bin"
ifndef DEBUG
-@$(PRINTF) "\r\t%s\t%42s\n" "mkdir:" "$(DESTDIR)$(PREFIX)/libexec"
endif # DEBUG
@$(VERBOSE); $(TEST) -d "$(DESTDIR)$(PREFIX)/libexec" || \
$(MKDIR) "$(DESTDIR)$(PREFIX)/libexec"
ifndef DEBUG
@$(PRINTF) "\r\t%s\t%42s\n" \
"mkdir:" "$(DESTDIR)$(PREFIX)/share/man/man1"
endif # DEBUG
@$(VERBOSE); $(TEST) -d "$(DESTDIR)$(PREFIX)/share/man/man1" || \
$(MKDIR) "$(DESTDIR)$(PREFIX)/share/man/man1"
ifndef DEBUG
-@$(PRINTF) "\r\t%s\t%42s\n" \
"mkdir:" "$(DESTDIR)$(PREFIX)/share/man/man8"
endif # DEBUG
@$(VERBOSE); $(TEST) -d "$(DESTDIR)$(PREFIX)/share/man/man8" || \
$(MKDIR) "$(DESTDIR)$(PREFIX)/share/man/man8"
ifndef DEBUG
-@$(PRINTF) "\r\t%s\t%42s\n" \
"cp:" "$(DESTDIR)$(PREFIX)/bin/$(BINPREFIX)vi$(BINSUFFIX)"
endif # DEBUG
@$(VERBOSE); $(CP) ./bin/vi \
"$(DESTDIR)$(PREFIX)/bin/$(BINPREFIX)vi$(BINSUFFIX)" && \
$(CHOWN) "$(IUSGR)" \
"$(DESTDIR)$(PREFIX)/bin/$(BINPREFIX)vi$(BINSUFFIX)" && \
$(CHMOD) "$(IPERM)" \
"$(DESTDIR)$(PREFIX)/bin/$(BINPREFIX)vi$(BINSUFFIX)"
ifndef DEBUG
@$(PRINTF) "\r\t%s\t%42s\n" \
"ln:" "$(DESTDIR)$(PREFIX)/bin/$(BINPREFIX)ex$(BINSUFFIX)"
endif # DEBUG
@$(VERBOSE); $(TEST) -x \
"$(DESTDIR)$(PREFIX)/bin/$(BINPREFIX)vi$(BINSUFFIX)" && \
$(LNS) "$(BINPREFIX)vi$(BINSUFFIX)" \
"$(DESTDIR)$(PREFIX)/bin/$(BINPREFIX)ex$(BINSUFFIX)"
ifndef DEBUG
-@$(PRINTF) "\r\t%s\t%42s\n" \
"ln:" "$(PREFIX)/bin/$(BINPREFIX)view$(BINSUFFIX)"
endif # DEBUG
@$(VERBOSE); $(TEST) -x \
"$(DESTDIR)$(PREFIX)/bin/$(BINPREFIX)vi$(BINSUFFIX)" && \
$(LNS) "$(BINPREFIX)vi$(BINSUFFIX)" \
"$(DESTDIR)$(PREFIX)/bin/$(BINPREFIX)view$(BINSUFFIX)"
ifndef DEBUG
-@$(PRINTF) "\r\t%s\t%42s\n" \
"cp:" "$(DESTDIR)$(PREFIX)/libexec/$(BINPREFIX)vi.recover$(BINSUFFIX)"
endif # DEBUG
@$(VERBOSE); $(CP) "./scripts/virecover" \
"$(DESTDIR)$(PREFIX)/libexec/$(BINPREFIX)vi.recover$(BINSUFFIX)" && \
$(CHMOD) "$(IPERM)" \
"$(DESTDIR)$(PREFIX)/libexec/$(BINPREFIX)vi.recover$(BINSUFFIX)"
ifndef DEBUG
-@$(PRINTF) "\r\t%s\t%42s\n" \
"cp:" \
"$(DESTDIR)$(PREFIX)/share/man/man1/$(BINPREFIX){vi,ex,view}$(BINSUFFIX).1"
endif # DEBUG
@$(VERBOSE); $(CP) "docs/USD.doc/vi.man/vi.1" \
"$(DESTDIR)$(PREFIX)/share/man/man1/$(BINPREFIX)vi$(BINSUFFIX).1" \
&& $(LNS) \
"$(PREFIX)/share/man/man1/$(BINPREFIX)vi$(BINSUFFIX).1" \
"$(DESTDIR)$(PREFIX)/share/man/man1/$(BINPREFIX)view$(BINSUFFIX).1" \
&& $(LNS) \
"$(PREFIX)/share/man/man1/$(BINPREFIX)vi$(BINSUFFIX).1" \
"$(DESTDIR)$(PREFIX)/share/man/man1/$(BINPREFIX)ex$(BINSUFFIX).1"
ifndef DEBUG
-@$(PRINTF) "\r\t%s\t%42s\n" \
"cp:" \
"$(DESTDIR)$(PREFIX)/share/man/man8/$(BINPREFIX)vi.recover$(BINSUFFIX).8"
endif # DEBUG
@$(VERBOSE); $(CP) "scripts/virecover.8" \
"$(DESTDIR)$(PREFIX)/share/man/man8/$(BINPREFIX)vi.recover$(BINSUFFIX).8"
###############################################################################
.PHONY: install-strip installstrip
ifneq (,$(findstring install-strip,$(MAKECMDGOALS)))
.NOTPARALLEL: install-strip installstrip install
endif # (,$(findstring install-strip,$(MAKECMDGOALS)))
install-strip installstrip: install
ifndef DEBUG
-@$(PRINTF) "\r\t$(STRIP):\t%42s\n" \
"$(DESTDIR)$(PREFIX)/bin/$(BINPREFIX)vi$(BINSUFFIX)"
endif # DEBUG
-@$(VERBOSE); $(PENV) OBJECT_MODE=$(MAIXBITS) \
$(STRIP) "$(DESTDIR)$(PREFIX)/bin/$(BINPREFIX)vi$(BINSUFFIX)" || \
$(TRUE)
###############################################################################
.PHONY: strip
ifneq (,$(findstring strip,$(MAKECMDGOALS)))
.NOTPARALLEL: strip
endif # (,$(findstring strip,$(MAKECMDGOALS)))
strip: bin/vi bin/ex bin/view
ifndef DEBUG
-@$(PRINTF) "\r\t$(STRIP):\t%42s\n" "bin/vi"
endif # DEBUG
-@$(VERBOSE); $(PENV) OBJECT_MODE=$(MAIXBITS) \
$(STRIP) "./bin/vi" || $(TRUE)
ifndef DEBUG
-@$(PRINTF) "\r\t$(STRIP):\t%42s\n" "bin/xinstall"
endif # DEBUG
-@$(VERBOSE); $(PENV) OBJECT_MODE=$(MAIXBITS) \
$(STRIP) "./bin/xinstall" || $(TRUE)
###############################################################################
.PHONY: superstrip sstrip
ifneq (,$(findstring strip,$(MAKECMDGOALS)))
.NOTPARALLEL: superstrip sstrip
endif # (,$(findstring strip,$(MAKECMDGOALS)))
ifneq ($(OS),freebsd)
STRIP_VERS=-R '.gnu.version'
else # freebsd
STRIP_VERS=
endif # !freebsd
ifneq ($(OS),netbsd)
STRIP_NOTE=-R '.note.*'
else # netbsd
STRIP_NOTE=-R '.SUNW_ctf' -R '.jcr' -R '.ident' \
-R '.note.netbsd.mcmodel' \
-R '.note.netbsd.pax' -R '.gnu.hash'
endif # !netbsd
superstrip sstrip: strip bin/vi bin/ex bin/view
ifndef DEBUG
-@$(PRINTF) "\r\t$(STRIP):\t%42s\n" "bin/vi"
endif # DEBUG
-@$(VERBOSE); $(PENV) OBJECT_MODE=$(MAIXBITS) \
$(STRIP) --strip-all \
-R '.gnu.build.attributes' \
-R '.eh_frame' \
-R '.eh_frame*' \
-R '.comment' $(STRIP_NOTE) \
-R '.comment.*' $(STRIP_VERS) \
"./bin/vi" \
2> /dev/null || $(TRUE)
ifndef DEBUG
-@$(PRINTF) "\r\t$(SSTRIP):\t%42s\n" "bin/vi"
endif # DEBUG
-@$(VERBOSE); $(SSTRIP) -z "./bin/vi" \
2> /dev/null || $(TRUE)
ifndef DEBUG
-@$(PRINTF) "\r\t$(STRIP):\t%42s\n" "bin/xinstall"
endif # DEBUG
-@$(VERBOSE); $(PENV) OBJECT_MODE=$(MAIXBITS) \
$(STRIP) --strip-all \
-R '.gnu.build.attributes' \
-R '.eh_frame' \
-R '.eh_frame*' \
-R '.comment' $(STRIP_NOTE) \
-R '.comment.*' $(STRIP_VERS) \
"./bin/xinstall" \
2> /dev/null || $(TRUE)
ifndef DEBUG
-@$(PRINTF) "\r\t$(SSTRIP):\t%42s\n" "bin/xinstall"
endif # DEBUG
-@$(VERBOSE); $(SSTRIP) -z "./bin/xinstall" \
2> /dev/null || $(TRUE)
###############################################################################
.PHONY: upx
ifneq (,$(findstring upx,$(MAKECMDGOALS)))
.NOTPARALLEL: upx
endif # (,$(findstring upx,$(MAKECMDGOALS)))
upx: sstrip
ifndef DEBUG
-@$(PRINTF) "\r\t$(UPX):\t%42s\n" "bin/vi"
endif # DEBUG
-@$(VERBOSE); $(UPX) -qqq9 --exact "./bin/vi" 2> /dev/null || $(TRUE)
-@$(VERBOSE); $(UPX) -qqq9 "./bin/vi" 2> /dev/null || $(TRUE)
ifndef DEBUG
-@$(PRINTF) "\r\t$(SSTRIP):\t%42s\n" "bin/vi"
endif # DEBUG
-@$(VERBOSE); $(SSTRIP) -z "./bin/vi" 2> /dev/null || $(TRUE)
###############################################################################
.PHONY: uninstall
ifneq (,$(findstring uninstall,$(MAKECMDGOALS)))
.NOTPARALLEL: uninstall
endif # (,$(findstring uninstall,$(MAKECMDGOALS)))
uninstall:
ifndef DEBUG
-@$(PRINTF) "\r\trm:\t%42s\n" \
"$(DESTDIR)$(PREFIX)/bin/$(BINPREFIX)vi$(BINSUFFIX)"
endif # DEBUG
-@$(VERBOSE); $(RMF) \
"$(DESTDIR)$(PREFIX)/bin/$(BINPREFIX)vi$(BINSUFFIX)"
ifndef DEBUG
-@$(PRINTF) "\r\trm:\t%42s\n" \
"$(DESTDIR)$(PREFIX)/bin/$(BINPREFIX)ex$(BINSUFFIX)"
endif # DEBUG
-@$(VERBOSE); $(RMF) \
"$(DESTDIR)$(PREFIX)/bin/$(BINPREFIX)ex$(BINSUFFIX)"
ifndef DEBUG
-@$(PRINTF) "\r\trm:\t%42s\n" \
"$(DESTDIR)$(PREFIX)/bin/$(BINPREFIX)view$(BINSUFFIX)"
endif # DEBUG
-@$(VERBOSE); $(RMF) \
"$(DESTDIR)$(PREFIX)/bin/$(BINPREFIX)view$(BINSUFFIX)"
ifndef DEBUG
-@$(PRINTF) "\r\trm:\t%42s\n" \
"$(DESTDIR)$(PREFIX)/share/man/man1/$(BINPREFIX)vi$(BINSUFFIX).1"
endif # DEBUG
-@$(VERBOSE); $(RMF) \
"$(DESTDIR)$(PREFIX)/share/man/man1/$(BINPREFIX)vi$(BINSUFFIX).1"
ifndef DEBUG
-@$(PRINTF) "\r\trm:\t%42s\n" \
"$(DESTDIR)$(PREFIX)/share/man/man1/$(BINPREFIX)ex$(BINSUFFIX).1"
endif # DEBUG
-@$(VERBOSE); $(RMF) \
"$(DESTDIR)$(PREFIX)/share/man/man1/$(BINPREFIX)ex$(BINSUFFIX).1"
ifndef DEBUG
-@$(PRINTF) "\r\trm:\t%42s\n" \
"$(DESTDIR)$(PREFIX)/share/man/man1/$(BINPREFIX)view$(BINSUFFIX).1"
endif # DEBUG
-@$(VERBOSE); $(RMF) \
"$(DESTDIR)$(PREFIX)/share/man/man1/$(BINPREFIX)view$(BINSUFFIX).1"
ifndef DEBUG
-@$(PRINTF) "\r\trm:\t%42s\n" \
"$(DESTDIR)$(PREFIX)/share/man/man8/$(BINPREFIX)vi.recover$(BINSUFFIX).8"
endif # DEBUG
-@$(VERBOSE); $(RMF) \
"$(DESTDIR)$(PREFIX)/share/man/man8/$(BINPREFIX)vi.recover$(BINSUFFIX).8"
ifndef DEBUG
-@$(PRINTF) "\r\trm:\t%42s\n" \
"$(DESTDIR)$(PREFIX)/libexec/$(BINPREFIX)vi.recover$(BINSUFFIX)"
endif # DEBUG
-@$(VERBOSE); $(RMF) \
"$(DESTDIR)$(PREFIX)/libexec/$(BINPREFIX)vi.recover$(BINSUFFIX)"
###############################################################################
# Local Variables:
# mode: make
# tab-width: 8
# End:
================================================
FILE: LICENSE.md
================================================
```text
Copyright (c) 1980, 1986, 1987, 1988, 1989, 1990, 1991, 1992, 1993, 1994
The Regents of the University of California
Copyright (c) 1989, 1990, 1991, 1992, 1993 UNIX System Laboratories, Inc.
Copyright (c) 1991, 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000
Keith Bostic
Copyright (c) 1992 Keith Muller
Copyright (c) 1992, 1993, 1994 Henry Spencer
Copyright (c) 1994, 1996 Rob Mayoff
Copyright (c) 1997 Phillip F. Knaack
Copyright (c) 1997, 1998, 2002, 2004, 2015 Todd C. Miller <millert@openbsd.org>
Copyright (c) 1999, 2000, 2004, 2009, 2011 Sven Verdoolaege <skimo@kotnet.org>
Copyright (c) 2000, 2006, 2013, 2020 The NetBSD Foundation, Inc.
Copyright (c) 2002 Niels Provos <provos@citi.umich.edu>
Copyright (c) 2004 Ted Unangst
Copyright (c) 2008 Otto Moerbeek <otto@drijf.net>
Copyright (c) 2012, 2013 Christian Neukirchen <chneukirchen@gmail.com>
Copyright (c) 2013 Antoine Jacoutot <ajacoutot@openbsd.org>
Copyright (c) 2014 Al Viro <viro@ZenIV.linux.org.uk>
Copyright (c) 2015 Philip Guenther <guenther@openbsd.org>
Copyright (c) 2015 The DragonFly Project
Copyright (c) 2018 Duncan Overbruck
Copyright (c) 2022 Ørjan Malde <red@foxi.me>
Copyright (c) 2021, 2022, 2023, 2024 Jeffrey H. Johnson
All rights reserved.
This software was originally derived from code contributed to the University
of California, Berkeley by Steve Kirkendall, the author of the "Elvis" editor.
This program contains code derived from software contributed to Berkeley by:
* Margo Seltzer * Mike Olson * Henry Spencer, University of Totonto
* Brian Hirt * Paul Vixie * David Hitz, Auspex Systems, Inc.
* Dave Borman, Cray Research, Inc. * Keith Muller, UCSD
This program contains code derived from software contributed to The NetBSD
Foundation, Inc. by Dieter Baron, Thomas Klausner, and Jeremy C. Reed.
This program contains code derived from material licensed to the University
of California, Berkeley by American Telephone and Telegraph Co. or UNIX System
Laboratories, Inc. and reproduced herein with the permission of UNIX System
Laboratories, Inc.
This program contains code developed for OpenBSD which was sponsored in part
by the Defense Advanced Research Projects Agency (DARPA) and Air Force Research
Laboratory, Air Force Materiel Command, United States Air Force (USAF), under
agreement number F39502-99-1-0512.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are met:
1. Redistributions of source code must retain the above copyright notice,
this list of conditions and the following disclaimer.
2. Redistributions in binary form must reproduce the above copyright notice,
this list of conditions and the following disclaimer in the documentation
and/or other materials provided with the distribution.
3. Neither the name of the University nor the names of its contributors may
be used to endorse or promote products derived from this software without
specific prior written permission.
THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND ANY
EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE FOR ANY
DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
```
```text
In the following disclosure, the phrase "this text" refers to portions of the
bundled documentation.
The Institute of Electrical and Electronics Engineers and the American National
Standards Committee X3 on Information Processing Systems have given permission
to reprint portions of their documentation.
Portions of this text are reprinted and reproduced in electronic form from IEEE
Std 1003.1-1988, IEEE Standard Portable Operating System Interface for Computer
Environments (POSIX), Copyright (c) 1988-1992 by The Institute of Electrical
and Electronics Engineers, Inc. In the event of any discrepancy between these
versions and the original IEEE Standard, the original IEEE Standard is the
referee document.
```
================================================
FILE: LICENSES/BSD-2-Clause.txt
================================================
Copyright (c) 2000, 2006, 2013, 2020 The NetBSD Foundation, Inc.
Copyright (c) 2002 Niels Provos <provos@citi.umich.edu>
Copyright (c) 2022-2024 Jeffrey H. Johnson
All rights reserved.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions
are met:
1. Redistributions of source code must retain the above copyright
notice, this list of conditions and the following disclaimer.
2. Redistributions in binary form must reproduce the above copyright
notice, this list of conditions and the following disclaimer in the
documentation and/or other materials provided with the distribution.
THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS
``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS
BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
POSSIBILITY OF SUCH DAMAGE.
================================================
FILE: LICENSES/BSD-3-Clause.txt
================================================
Copyright (c) 1980, 1986, 1987, 1988, 1989, 1990, 1991, 1992, 1993, 1994
The Regents of the University of California
Copyright (c) 1989, 1990, 1991, 1992, 1993 UNIX System Laboratories, Inc.
Copyright (c) 1991, 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000
Keith Bostic
Copyright (c) 1992 Keith Muller
Copyright (c) 1992, 1993, 1994 Henry Spencer
Copyright (c) 1994, 1996 Rob Mayoff
Copyright (c) 1997 Phillip F. Knaack
Copyright (c) 1997, 1998, 2002, 2004, 2015 Todd C. Miller <millert@openbsd.org>
Copyright (c) 1999, 2000, 2004, 2009, 2011 Sven Verdoolaege <skimo@kotnet.org>
Copyright (c) 2000, 2006, 2013, 2020 The NetBSD Foundation, Inc.
Copyright (c) 2002 Niels Provos <provos@citi.umich.edu>
Copyright (c) 2004 Ted Unangst
Copyright (c) 2008 Otto Moerbeek <otto@drijf.net>
Copyright (c) 2012, 2013 Christian Neukirchen <chneukirchen@gmail.com>
Copyright (c) 2013 Antoine Jacoutot <ajacoutot@openbsd.org>
Copyright (c) 2014 Al Viro <viro@ZenIV.linux.org.uk>
Copyright (c) 2015 Philip Guenther <guenther@openbsd.org>
Copyright (c) 2015 The DragonFly Project
Copyright (c) 2018 Duncan Overbruck
Copyright (c) 2022 Ørjan Malde <red@foxi.me>
Copyright (c) 2021, 2022, 2023, 2024 Jeffrey H. Johnson
All rights reserved.
This software was originally derived from code contributed to the University
of California, Berkeley by Steve Kirkendall, the author of the "Elvis" editor.
This program contains code derived from software contributed to Berkeley by:
* Margo Seltzer * Mike Olson * Henry Spencer, University of Totonto
* Brian Hirt * Paul Vixie * David Hitz, Auspex Systems, Inc.
* Dave Borman, Cray Research, Inc. * Keith Muller, UCSD
This program contains code derived from software contributed to The NetBSD
Foundation, Inc. by Dieter Baron, Thomas Klausner, and Jeremy C. Reed.
This program contains code derived from material licensed to the University
of California, Berkeley by American Telephone and Telegraph Co. or UNIX System
Laboratories, Inc. and reproduced herein with the permission of UNIX System
Laboratories, Inc.
This program contains code developed for OpenBSD which was sponsored in part
by the Defense Advanced Research Projects Agency (DARPA) and Air Force Research
Laboratory, Air Force Materiel Command, United States Air Force (USAF), under
agreement number F39502-99-1-0512.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are met:
1. Redistributions of source code must retain the above copyright notice,
this list of conditions and the following disclaimer.
2. Redistributions in binary form must reproduce the above copyright notice,
this list of conditions and the following disclaimer in the documentation
and/or other materials provided with the distribution.
3. Neither the name of the University nor the names of its contributors may
be used to endorse or promote products derived from this software without
specific prior written permission.
THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND ANY
EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE FOR ANY
DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
================================================
FILE: LICENSES/ISC.txt
================================================
Copyright (c) 1997, 1998, 2002, 2004, 2015
Todd C. Miller <millert@openbsd.org>
Copyright (c) 2004 Ted Unangst and Todd Miller
Copyright (c) 2008 Otto Moerbeek <otto@drijf.net>
Copyright (c) 2013 Antoine Jacoutot <ajacoutot@openbsd.org>
Copyright (c) 2015 Philip Guenther <guenther@openbsd.org>
Copyright (c) 2022-2024 Jeffrey H. Johnson
Permission to use, copy, modify, and distribute this software for any
purpose with or without fee is hereby granted, provided that the above
copyright notice and this permission notice appear in all copies.
THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
================================================
FILE: README.md
================================================
<!-- SPDX-License-Identifier: BSD-3-Clause -->
<!-- Copyright (c) 2021-2024 Jeffrey H Johnson -->
[Uma tradução em português está disponível.](README_pt_BR.md)
# OpenVi
***OpenVi*** — Portable *OpenBSD* **`vi`** / **`ex`**
## Table of Contents
<!-- toc -->
- [Overview](#overview)
* [Why?](#why)
+ [Why not?](#why-not)
- [Building](#building)
* [Prerequisites](#prerequisites)
+ [Required prerequisites](#required-prerequisites)
+ [Optional prerequisites](#optional-prerequisites)
+ [Supported platforms](#supported-platforms)
- [Unsupported platforms](#unsupported-platforms)
* [Compilation](#compilation)
+ [Platform Specifics](#platform-specifics)
- [AIX](#aix)
- [NetBSD](#netbsd)
- [illumos](#illumos)
- [Solaris](#solaris)
- [Windows](#windows)
* [Cygwin](#cygwin)
- [Availability](#availability)
* [Source Code](#source-code)
* [Packages](#packages)
- [Versioning](#versioning)
- [History](#history)
- [License](#license)
- [Acknowledgements](#acknowledgements)
- [Similar Projects](#similar-projects)
- [See Also](#see-also)
<!-- tocstop -->
## Overview
***OpenVi*** is an enhanced and portable implementation of the Berkeley
**`vi`** / **`ex`** text editor, originally developed by *Bill Joy*.
***OpenVi*** is a fork of the **`vi`** / **`ex`** editor included with
*OpenBSD*, which is derived from version 1.79 of the `nvi` editor originally
distributed as part of the *Fourth Berkeley Software Distribution* (**4BSD**).
The **`nvi`** editor was developed by *Keith Bostic* of the *Computer Systems
Research Group* (**CSRG**) at the *University of California, Berkeley*, *Sven
Verdoolaege*, and other contributors. **`Nvi`** itself was derived from *Steve
Kirkendall*'s **`Elvis`** editor.
### Why?
Why would you want to use ***OpenVi*** instead of ***AnotherVi***?
- Derived from the (extensively audited) *OpenBSD* base system code
- Focus on readability, simplicity, and correctness of implementation
- Adherence to *OpenBSD*'s standard secure coding practices
- Uses secure functions (*e.g.* `strlcpy`, `snprintf`, `mkstemp`, `pledge`)
- Reduced complexity for hopefully fewer program defects
- Clean source code, distributed under a permissive 3-clause BSD license
- Some support code is distributed under the (more permissive) ISC license
- Mostly conforming to relevant standards (*POSIX*, *SUS*), where applicable
- Enhancements, non-standard behaviors, and new features are conservatively
and sanely implemented with care taken to balance user expectations,
complexity, and historical accuracy
- Extensions such as `bserase`, `expandtab`, `imctrl`, `visibletab`, etc.
- Build requires only *GNU Make* and standard *POSIX* utilities
- Easy integration with embedded, minimal, or iteratively bootstrapped
environments and distributions (such as *Linux From Scratch* builds)
- No compile-time or build-time configuration options
- Single standard build configuration with no incompatible variants
- No configuration-specific bugs resulting from untested combinations or
rarely exercised code paths
- Concise and understandable documentation; no subtle platform variations
- Consistent user interface, script, and map behavior across all platforms
- Utilizes *OpenBSD*'s extended *Spencer*-based regular expression engine
(also adopted by *LLVM*, *Tcl*, etc.) on all supported systems
- Single, compact, self-contained binary
- No external data files required at run-time
- No external library dependencies (other than curses)
- Suitable for static linking and emergency “rescue” usage
- All the various tweaks, fixes, improvements, and clean-ups accumulated
over 25+ years as part of the *OpenBSD* base system
#### Why not?
So, why might you **not** want to use ***OpenVi***, then?
Some of these points might be desirable features, depending on your point of
view.
- Internationalization support is currently lacking
- No support for Unicode / UTF-8 / wide character display
- Multibyte characters are shown as individual bytes, rather than glyphs
- Multibyte support is planned, but is unfortunately non-trivial, see:
- Schwarze, I. (2016, September 25). *Keep multibyte character support
simple* [Conference presentation]. EuroBSDCon 2016 Convention,
Belgrade, Serbia.
[[pdf:OpenBSD](https://openbsd.org/papers/eurobsdcon2016-utf8.pdf)]
- Jun-ichiro itojun Hagino [*KAME Project*] and Yoshitaka Tokugawa
[*WIDE Project*]. (1999, 6 June). *Multilingual vi clones: past, now
and the future* [Conference presentation]. In Proceedings of the
annual conference on USENIX, Annual Technical Conference
(*USENIX ATEC '99*). USENIX Association, Monterey, CA, USA, Page 45.
[[doi:10.5555/1268708.1268753](https://dl.acm.org/doi/10.5555/1268708.1268753)],
[[abstract:USENIX](https://www.usenix.org/conference/1999-usenix-annual-technical-conference/multilingual-vi-clones-past-now-and-future)]
(*legacy*)
- No support for bidirectional text
- No support for regional localization or message translation
- Inefficient handling of extremely large (*e.g.* multi-GB) files
- No support for syntax highlighting, context-aware code completion, code
folding, or “*language server*” integrations
- No interactive macro recording and debugging functionality
- No advanced scripting support (no *BASIC*, *COBOL*, *JavaScript*, *Lua*,
*Perl*, *PHP*, *Python*, *REXX*, *Ruby*, *S-Lang*, *Tcl*, or anything else)
- Only curses-based visual-mode and line-based `ex`-mode interfaces available
- No support for X11/Wayland, OpenGL/Vulkan, Neuralink, augmented / virtual
reality, or any other graphical user interfaces
## Building
### Prerequisites
#### Required prerequisites
- **POSIX.1**-**2008** environment: *POSIX* shell (`sh`) and utilities,
**Awk** (`mawk`, `nawk`), etc.
- **GNU Make** (version *3.81* or later)
- **C99** compiler (*e.g.* `xlc`, `suncc`, `clang`, `gcc`, etc.)
- **Curses** (`ncurses`, *NetBSD* `curses` V8+, `PDCurses` V2.8+,
`PDCursesMod`, etc.)
#### Optional prerequisites
- **pkg-config**
- **Perl** 5+
- **C shell** (`csh`, `tcsh`, etc.)
- `nroff`, `groff`, etc.
#### Supported platforms
- **OpenVi** is easily portable to most platforms with *UNIX*-like operating
systems that are mostly conforming to the programming interface described by
*IEEE Std 1003.1-2008* and user environment described by *IEEE Std
1003.2-2008*, also known as *POSIX.1-2008* and *POSIX.2-2008*, respectively.
- The following operating systems are fully supported and regularly tested
using ix86/AMD64, ARM/AArch64, m68k, MIPS, POWER, and RISC-V processors:
- *IBM* **AIX** 7.1+
- *Apple* **Darwin** (**macOS** / **Mac OS X**) (*ARM64*, *Intel*, *PowerPC*)
- **FreeBSD** 12.3+
- **GNU**/**Linux** distributions (*glibc*, *musl*)
- *illumos* **OpenIndiana** Hipster
- **NetBSD** 9+
- **OpenBSD** 6.9+
- *Oracle* **Solaris** 11+
- *Microsoft* **Windows** (*Cygwin*, *Midipix*, *MSYS2*, *WSL*)
- **Managarm**
- The following compilers are fully supported and regularly tested:
- *LLVM* **Clang** (*BSD*, *Darwin*, *illumos*, *Linux*, *Solaris*,
*Windows*) V6+
- *AMD* **Optimizing C**/**C++** (*Linux*) V3+
- *GNU* **GCC** (*AIX*, *BSD*, *Darwin*, *illumos*, *Linux*, *Solaris*,
*Windows*) V4.6+
- *IBM* **Advance Toolchain** (*Linux on POWER*) V14.0+
- *IBM* **Open XL C**/**C++** (*AIX*) V17.1+
- *IBM* **XL C**/**C++** (*AIX*, *Linux*) V16.1+
- *Intel* **oneAPI DPC++**/**C++** (*Linux*) V2021+
- *Intel* **C Compiler Classic** (*Darwin*, *Linux*) V19.1+
- *Oracle* **Developer Studio** (*Linux*, *Solaris*) V12.6+
- *PCC* **Portable C Compiler** (*NetBSD*) V1.0.0+
Newer or older operating system and compiler releases, within reason, should
work. The versions listed above are those regularly tested and known working.
##### Unsupported platforms
- The following platforms are **not** currently supported, but **support is
planned** for a future release:
- **Haiku** Walter
- *SGI* **IRIX**
User contributions to enhance platform support are welcomed.
### Compilation
- Compilation can be performed by invoking GNU Make (usually `gmake` or `make`)
from the top-level directory of a source release or git checkout.
- GNU Make's `-j N` flag may be used to parallelize the compilation, where `N`
is a positive integer representing the number of parallel jobs requested.
- The following environment variables influence compilation and installation:
- `CC` - C compiler to use
- (*e.g.* `CC=gcc`)
- `OPTLEVEL` - Optimization flags
- (*e.g.* `OPTLEVEL=-O2`)
- `CFLAGS` - Flags to pass to the C compiler
- (*e.g.* `CFLAGS="-Wall -pipe"`)
- `LIBS` - Libraries (overriding defaults) to pass to the linker
- (*e.g.* `LIBS="-lpdcurses -lflock"`)
- `LDFLAGS` - Flags to pass to the linker
- (*e.g.* `LDFLAGS="-L/lib/path -static"`)
- `V` - Set to enable verbose compilation output
- (*e.g.* `V=1`)
- `DEBUG` - Set to compile a debugging build
- (*e.g.* `DEBUG=1`)
- `LGC` - Set to enable link-time garbage collection
- (*e.g.* `LGC=1`)
- `LTO` - Set to enable link-time optimization
- (*e.g.* `LTO=1`)
- `EXTRA_LIBS` - Extra libraries for linking
- (*e.g.* `EXTRA_LIBS=-lmtmalloc`)
- `PREFIX` - Directory prefix for use with `install` and `uninstall` targets
- (*e.g.* `PREFIX=/opt/OpenVi`)
- The usual targets (`all`, `strip`, `superstrip`, `clean`, `distclean`,
`install`, `install-strip`, `uninstall`, `upx`, etc.) are available; review
the `GNUmakefile` to see all the available targets and options.
For example, to compile an aggressively size-optimized build, enabling
link-time optimization and link-time garbage collection, explicitly using
*GCC*:
```sh
env CC=gcc OPTLEVEL=-Os LGC=1 LTO=1 gmake sstrip
```
or, to verbosely compile a debugging build, explicitly using *Clang*:
```sh
env CC=clang DEBUG=1 V=1 gmake
```
For systems with *GNU Make* as `make` (*e.g.* *GNU/Linux*), basic compilation
should succeed without any options or additional configuration needed:
```sh
make
```
With the appropriate privileges to manipulate files within the chosen `PREFIX`
(using `doas`, `sudo`, `su`, etc.), the compiled executable may be installed —
as-is or stripped — using an invocation such as:
```sh
doas gmake install-strip
```
or
```sh
sudo env PREFIX=/usr/local make install
```
#### Platform Specifics
The following sections document ***only*** platform specific differences, and
are not intended to be a general or exhaustive reference. For installation of
prerequisite software packages or other system configuration, consult the
vendor's documentation.
##### AIX
- Before building ***OpenVi*** on **AIX**, install the `ncurses` libraries and
headers. *IBM* provides the necessary packages, `ncurses` and
`ncurses-devel`, in *RPM* format as part of the *AIX Toolbox for Linux and
Open Source Software*. With the appropriate permissions (*e.g.* `root`), these
packages are installable on most systems using the `dnf` or `yum` utilities,
for example:
```sh
dnf install ncurses ncurses-devel
```
or
```sh
yum install ncurses ncurses-devel
```
The *IBM* **AIX** base system (and **PASE for i**, an integrated runtime
environment for **AIX** applications on the **IBM i** operating system)
provides `libxcurses`, an *XPG4*/*XSI* Extended Curses implementation
derived from *AT&T System V*, which is **not** yet supported for use with
***OpenVi***.
- Compilation is supported using *IBM* **XL C**/**C++** V16.1+ (`gxlc` or
`xlclang`), *IBM* **Open XL C**/**C++** V17.1+ (`ibm-clang`), or *GNU*
**GCC** (usually `gcc`, `gcc-8`, `gcc-9`, `gcc-10`, `gcc-11`):
- Link-time optimization (`LTO=1`) requires **Open XL C**/**C++** V17.1+.
The *IBM* (*AIX Toolbox*) and *Bull*/*Atos* (*Bull Freeware*) **GCC**
packages, and *IBM* **XL C**/**C++** versions earlier than V17.1 are
**not** LTO-enabled.
- Link-time garbage collection (`LGC=1`) is **not** supported on *IBM*
**AIX**.
- A 64-bit build is the default on systems operating in 64-bit mode; for a
32-bit build, set the value of the `MAIXBITS` environment variable to
`32` (*e.g.* `export MAIXBITS=32`).
- The value of the `CC` environment variable must be set to the full path
of the compiler (*e.g.* `/opt/freeware/bin/gcc`,
`/opt/IBM/xlC/16.1.0/bin/gxlc`, `/opt/IBM/openxlC/17.1.0/bin/ibm-clang`,
etc.) unless the compiler directory is already part of the current `PATH`.
- File locking (via `flock()` as provided by the **AIX** `libbsd` library) is
non-functional; this will be investigated and corrected in a future release.
- ***OpenVi*** man pages are authored with `mandoc` and require conversion
before use with the **AIX** `man` software (which is derived from *AT&T
UNIX System V*.)
##### NetBSD
- On **NetBSD** installations, the default ***OpenVi*** builds use the BSD
`curses` library provided by the NetBSD base system. To use `ncurses`
instead, set the values of the `CFLAGS`, `LDFLAGS`, and `CURSESLIB`
environment variables appropriately (*i.e.* `CFLAGS=-I/usr/pkg/include`
`LDFLAGS=-L/usr/pkg/lib` `CURSESLIB=-lncurses`).
- The *LLVM* **LLD** linker is required for link-time optimization (`LTO=1`)
using **Clang**. It is available as an installable package (*i.e.* `pkgin
install lld`).
##### illumos
- Before building ***OpenVi*** on an **illumos** distribution (*i.e.*
**OpenIndiana**), install the `ncurses` libraries and headers. The
**OpenIndiana** distribution provides the necessary `ncurses` package in
*IPS* format. With the appropriate permissions (*e.g.* `root`), the package
can be installed using the **OpenIndiana** `pkg` utility, for example:
```sh
pkg install ncurses
```
The **OpenIndiana** base system provides `libcurses`, an *XPG4*/*XSI*
Extended Curses implementation derived from *AT&T System V*, which is **not**
yet supported for use with ***OpenVi***.
- Link-time garbage collection (`LGC=1`) is **not** supported on
**OpenIndiana**.
##### Solaris
- Before building ***OpenVi*** on *Oracle* **Solaris** 11, install the
`ncurses` libraries and headers. *Oracle* provides provides the necessary
`ncurses` package for **Solaris** 11 in *IPS* format. With the appropriate
permissions (*e.g.* `root`), the package can be installed using the **Solaris**
`pkg` utility, for example:
```sh
pkg install ncurses
```
The base *Oracle* **Solaris** system provides `libcurses`, an *XPG4*/*XSI*
Extended Curses implementation derived from *AT&T System V*, which is **not**
yet supported for use with ***OpenVi***.
- Compilation is supported using *Oracle* **Developer Studio**, **GCC**, and
**Clang**:
- When using *Oracle* **Developer Studio**, invoke the compiler as `suncc`
or set the value of the `_OSLCC` environment variable to `1`.
- Link-time optimization (`LTO=1`) is currently supported **only** when using
**GCC** or **Clang**.
- Link-time garbage collection (`LGC=1`) is **not** supported on **Solaris**.
- When using the *Oracle* **Developer Studio** (`suncc`) compiler, a 64-bit
build is the default on systems operating in 64-bit mode; for a 32-bit
build, set the value of the `SUNBITS` environment variable to `32` (*e.g.*
`export SUNBITS=32`).
- File locking is unavailable due to the absence of `flock()` on **Solaris**.
This will be addressed by supporting *System V*-style `fcntl()` locking in a
future release.
##### Windows
- *Microsoft* **Windows** supports various development and runtime
environments, including *MSVC*, *Cygwin*, *Midipix*, *MSYS2*, *UWIN*, the
*Git Bash* environment, and others. Care must be taken to avoid mixing
incompatible libraries and tools.
###### Cygwin
- Compilation problems in the **Cygwin** environment are often caused by
incomplete or interrupted package installations, or by the installation of
packages using non-standard tools (*e.g.* `apt-cyg`), which can result in
missing files and dangling or missing symbolic links.
- **Before** compiling ***OpenVi*** under **Cygwin**, it is *highly*
recommended to:
- Update the **Cygwin** `setup.exe` application to the latest available
version.
- Update all installed packages using the new **Cygwin** `setup.exe`
application.
- Install the required prerequisite packages (*i.e.* `make`, `gcc`, `ncurses`,
`ncurses-devel`) using the **Cygwin** `setup.exe` application.
- Invoke the `cygcheck` utility (*i.e.* `cygcheck -cv | grep -v "OK$"`) to
verify the integrity of all currently installed packages.
## Availability
### Source Code
- [GitHub source repository](https://github.com/johnsonjh/OpenVi)
- [Latest source release](http://github.com/johnsonjh/OpenVi/releases/latest)
### Packages
**OpenVi** is available to Linux and macOS users via the
[Homebrew](https://formulae.brew.sh/formula/openvi) package manager.
[](https://repology.org/project/openvi/versions)
```sh
brew install openvi
```
gitextract_apaa2j_q/
├── .gitattributes
├── .gitignore
├── BSDmakefile
├── ChangeLog
├── ChangeLog.license
├── GNUmakefile
├── LICENSE.md
├── LICENSES/
│ ├── BSD-2-Clause.txt
│ ├── BSD-3-Clause.txt
│ └── ISC.txt
├── README.md
├── README_pt_BR.md
├── REUSE.toml
├── cl/
│ ├── cl.h
│ ├── cl_extern.h
│ ├── cl_funcs.c
│ ├── cl_main.c
│ ├── cl_read.c
│ ├── cl_screen.c
│ ├── cl_term.c
│ └── extern.h
├── common/
│ ├── args.h
│ ├── common.h
│ ├── cut.c
│ ├── cut.h
│ ├── delete.c
│ ├── exf.c
│ ├── exf.h
│ ├── gs.h
│ ├── key.c
│ ├── key.h
│ ├── line.c
│ ├── log.c
│ ├── log.h
│ ├── main.c
│ ├── mark.c
│ ├── mark.h
│ ├── mem.h
│ ├── msg.c
│ ├── msg.h
│ ├── options.awk
│ ├── options.c
│ ├── options.h
│ ├── options_f.c
│ ├── put.c
│ ├── recover.c
│ ├── screen.c
│ ├── screen.h
│ ├── search.c
│ ├── seq.c
│ ├── seq.h
│ └── util.c
├── db/
│ ├── btree/
│ │ ├── bt_close.c
│ │ ├── bt_conv.c
│ │ ├── bt_debug.c
│ │ ├── bt_delete.c
│ │ ├── bt_get.c
│ │ ├── bt_open.c
│ │ ├── bt_overflow.c
│ │ ├── bt_page.c
│ │ ├── bt_put.c
│ │ ├── bt_search.c
│ │ ├── bt_seq.c
│ │ ├── bt_split.c
│ │ ├── bt_utils.c
│ │ ├── btree.h
│ │ └── extern.h
│ ├── db/
│ │ └── db.c
│ ├── hash/
│ │ ├── bsd_ndbm.h
│ │ ├── extern.h
│ │ ├── hash.c
│ │ ├── hash.h
│ │ ├── hash_bigkey.c
│ │ ├── hash_buf.c
│ │ ├── hash_func.c
│ │ ├── hash_log2.c
│ │ ├── hash_page.c
│ │ ├── ndbm.c
│ │ └── page.h
│ ├── mpool/
│ │ └── mpool.c
│ └── recno/
│ ├── extern.h
│ ├── rec_close.c
│ ├── rec_delete.c
│ ├── rec_get.c
│ ├── rec_open.c
│ ├── rec_put.c
│ ├── rec_search.c
│ ├── rec_seq.c
│ ├── rec_utils.c
│ └── recno.h
├── docs/
│ ├── USD.doc/
│ │ ├── edit/
│ │ │ ├── edit.vindex
│ │ │ └── edittut.ms
│ │ ├── exref/
│ │ │ ├── ex.rm
│ │ │ └── ex.summary
│ │ ├── re_format/
│ │ │ └── vi_regex.7
│ │ ├── vi.man/
│ │ │ └── vi.1
│ │ └── vitut/
│ │ ├── vi.apwh.ms
│ │ ├── vi.chars
│ │ ├── vi.in
│ │ └── vi.summary
│ ├── ev
│ ├── ev.license
│ ├── help
│ ├── help.license
│ ├── internals/
│ │ ├── autowrite
│ │ ├── autowrite.license
│ │ ├── context
│ │ ├── context.license
│ │ ├── gdb.script
│ │ ├── input
│ │ ├── input.license
│ │ ├── openmode
│ │ ├── openmode.license
│ │ ├── quoting
│ │ ├── quoting.license
│ │ ├── structures
│ │ └── structures.license
│ └── tutorial/
│ ├── vi.advanced
│ ├── vi.advanced.license
│ ├── vi.beginner
│ ├── vi.beginner.license
│ └── vi.tut.csh
├── ex/
│ ├── ex.awk
│ ├── ex.c
│ ├── ex.h
│ ├── ex_abbrev.c
│ ├── ex_append.c
│ ├── ex_args.c
│ ├── ex_argv.c
│ ├── ex_at.c
│ ├── ex_bang.c
│ ├── ex_cd.c
│ ├── ex_cmd.c
│ ├── ex_delete.c
│ ├── ex_display.c
│ ├── ex_edit.c
│ ├── ex_equal.c
│ ├── ex_file.c
│ ├── ex_filter.c
│ ├── ex_global.c
│ ├── ex_init.c
│ ├── ex_join.c
│ ├── ex_map.c
│ ├── ex_mark.c
│ ├── ex_mkexrc.c
│ ├── ex_move.c
│ ├── ex_open.c
│ ├── ex_preserve.c
│ ├── ex_print.c
│ ├── ex_put.c
│ ├── ex_quit.c
│ ├── ex_read.c
│ ├── ex_screen.c
│ ├── ex_script.c
│ ├── ex_set.c
│ ├── ex_shell.c
│ ├── ex_shift.c
│ ├── ex_source.c
│ ├── ex_stop.c
│ ├── ex_subst.c
│ ├── ex_tag.c
│ ├── ex_txt.c
│ ├── ex_undo.c
│ ├── ex_usage.c
│ ├── ex_util.c
│ ├── ex_version.c
│ ├── ex_visual.c
│ ├── ex_write.c
│ ├── ex_yank.c
│ ├── ex_z.c
│ ├── script.h
│ ├── tag.h
│ └── version.h
├── include/
│ ├── bitstring.h
│ ├── bsd_db.h
│ ├── bsd_err.h
│ ├── bsd_fcntl.h
│ ├── bsd_regex.h
│ ├── bsd_stdlib.h
│ ├── bsd_string.h
│ ├── bsd_termios.h
│ ├── bsd_unistd.h
│ ├── com_extern.h
│ ├── compat.h
│ ├── compat_bsd_db.h
│ ├── ex_extern.h
│ ├── libgen.h
│ ├── mpool.h
│ ├── pathnames.h
│ ├── poll.h
│ ├── sys/
│ │ ├── proc.h
│ │ ├── queue.h
│ │ ├── stat.h
│ │ ├── time.h
│ │ ├── tree.h
│ │ └── types.h
│ ├── util.h
│ └── vi_extern.h
├── openbsd/
│ ├── basename.c
│ ├── dirname.c
│ ├── err.c
│ ├── errc.c
│ ├── errc.h
│ ├── errx.c
│ ├── getopt_long.c
│ ├── getopt_long.h
│ ├── getprogname.c
│ ├── issetugid.c
│ ├── minpwcache.c
│ ├── minpwcache.h
│ ├── open.c
│ ├── pledge.c
│ ├── reallocarray.c
│ ├── setmode.c
│ ├── setmode.h
│ ├── strlcat.c
│ ├── strlcpy.c
│ ├── strtonum.c
│ ├── verr.c
│ ├── verrc.c
│ ├── verrx.c
│ ├── vwarn.c
│ ├── vwarnc.c
│ ├── vwarnx.c
│ ├── warn.c
│ ├── warnc.c
│ └── warnx.c
├── regex/
│ ├── bsd_regex2.h
│ ├── cclass.h
│ ├── cname.h
│ ├── engine.c
│ ├── regcomp.c
│ ├── regerror.c
│ ├── regexec.c
│ ├── regfree.c
│ └── utils.h
├── scripts/
│ ├── virecover
│ └── virecover.8
├── vi/
│ ├── getc.c
│ ├── v_at.c
│ ├── v_ch.c
│ ├── v_cmd.c
│ ├── v_delete.c
│ ├── v_ex.c
│ ├── v_increment.c
│ ├── v_init.c
│ ├── v_itxt.c
│ ├── v_left.c
│ ├── v_mark.c
│ ├── v_match.c
│ ├── v_paragraph.c
│ ├── v_put.c
│ ├── v_redraw.c
│ ├── v_replace.c
│ ├── v_right.c
│ ├── v_screen.c
│ ├── v_scroll.c
│ ├── v_search.c
│ ├── v_section.c
│ ├── v_sentence.c
│ ├── v_status.c
│ ├── v_txt.c
│ ├── v_ulcase.c
│ ├── v_undo.c
│ ├── v_util.c
│ ├── v_word.c
│ ├── v_xchar.c
│ ├── v_yank.c
│ ├── v_z.c
│ ├── v_zexit.c
│ ├── vi.c
│ ├── vi.h
│ ├── vs_line.c
│ ├── vs_msg.c
│ ├── vs_refresh.c
│ ├── vs_relative.c
│ ├── vs_smap.c
│ └── vs_split.c
└── xinstall/
├── xinstall.1
└── xinstall.c
SYMBOL INDEX (1033 symbols across 200 files)
FILE: cl/cl.h
type CL_PRIVATE (line 21) | typedef struct _cl_private {
type input_t (line 62) | typedef enum { INP_OK=0, INP_EOF, INP_ERR, INP_INTR, INP_TIMEOUT } input_t;
FILE: cl/cl_funcs.c
function cl_addstr (line 50) | int
function cl_attr (line 85) | int
function cl_baud (line 171) | int
function cl_bell (line 212) | int
function cl_clrtoeol (line 243) | int
function cl_cursor (line 255) | int
function cl_deleteln (line 276) | int
function cl_ex_adjust (line 319) | int
function cl_imctrl (line 375) | void
function cl_insertln (line 407) | int
function cl_keyval (line 423) | int
function cl_move (line 461) | int
function cl_refresh (line 479) | int
function cl_rename (line 513) | int
function cl_suspend (line 551) | int
function cl_usage (line 666) | void
function gdbrefresh (line 702) | int
FILE: cl/cl_main.c
type sigaction (line 61) | struct sigaction
function main (line 69) | int
function GS (line 161) | static GS *
function CL_PRIVATE (line 177) | static CL_PRIVATE *
function term_init (line 222) | static void
function h_int (line 247) | static void
function h_term (line 253) | static void
function h_winch (line 259) | static void
function sig_init (line 271) | int
function setsig (line 306) | static int
function sig_end (line 328) | static void
function cl_func_std (line 345) | static void
FILE: cl/cl_read.c
type timeval (line 62) | struct timeval
function cl_event (line 71) | int
function input_t (line 152) | static input_t
function cl_resize (line 303) | static int
FILE: cl/cl_screen.c
function cl_screen (line 52) | int
function cl_quit (line 136) | int
function cl_vi_init (line 187) | static int
function cl_vi_end (line 383) | static int
function cl_ex_init (line 431) | static int
function cl_ex_end (line 501) | static int
function cl_getcap (line 519) | int
function cl_freecap (line 537) | static void
function cl_putenv (line 556) | static int
FILE: cl/cl_term.c
type TKLIST (line 49) | typedef struct _tklist {
function cl_term_init (line 87) | int
function cl_term_end (line 147) | int
function cl_fmap (line 167) | int
function cl_pfmap (line 184) | static int
function cl_optchange (line 214) | int
function cl_omesg (line 262) | int
function cl_ssize (line 309) | int
function cl_putchar (line 430) | int
FILE: common/args.h
type ARGS (line 27) | typedef struct _args {
FILE: common/common.h
type CB (line 28) | typedef struct _cb CB;
type EVENT (line 29) | typedef struct _event EVENT;
type EXCMD (line 30) | typedef struct _excmd EXCMD;
type EXF (line 31) | typedef struct _exf EXF;
type FREF (line 32) | typedef struct _fref FREF;
type GS (line 33) | typedef struct _gs GS;
type LMARK (line 34) | typedef struct _lmark LMARK;
type MARK (line 35) | typedef struct _mark MARK;
type MSGS (line 36) | typedef struct _msg MSGS;
type OPTION (line 37) | typedef struct _option OPTION;
type OPTLIST (line 38) | typedef struct _optlist OPTLIST;
type SCR (line 39) | typedef struct _scr SCR;
type SCRIPT (line 40) | typedef struct _script SCRIPT;
type SEQ (line 41) | typedef struct _seq SEQ;
type TAG (line 42) | typedef struct _tag TAG;
type TAGF (line 43) | typedef struct _tagf TAGF;
type TAGQ (line 44) | typedef struct _tagq TAGQ;
type TEXT (line 45) | typedef struct _text TEXT;
type carat_t (line 48) | typedef enum { C_NOTSET, C_CARATSET, C_ZEROSET } carat_t;
type busy_t (line 51) | typedef enum { BUSY_ON = 1, BUSY_OFF, BUSY_UPDATE } busy_t;
type conf_t (line 61) | typedef enum { CONF_NO, CONF_QUIT, CONF_YES } conf_t;
type dir_t (line 64) | typedef enum { NOTSET, FORWARD, BACKWARD } dir_t;
type lnop_t (line 67) | typedef enum { LINE_APPEND, LINE_DELETE, LINE_INSERT, LINE_RESET } lnop_t;
type lockr_t (line 70) | typedef enum { LOCK_FAILED, LOCK_SUCCESS, LOCK_UNAVAIL } lockr_t;
type seq_t (line 73) | typedef enum { SEQ_ABBREV, SEQ_COMMAND, SEQ_INPUT } seq_t;
type pmode (line 76) | enum pmode { MODE_EX, MODE_VI, MODE_VIEW }
FILE: common/cut.c
function cut (line 66) | int
function cb_rotate (line 192) | static void
function cut_line (line 241) | int
function cut_close (line 280) | void
function TEXT (line 305) | TEXT *
function text_lfree (line 333) | void
function text_free (line 350) | void
FILE: common/cut.h
type TEXTH (line 17) | typedef struct _texth TEXTH;
type _cb (line 21) | struct _cb {
type _text (line 32) | struct _text { /* Text: a linked list of lines. */
FILE: common/delete.c
function del (line 34) | int
FILE: common/exf.c
type stat (line 57) | struct stat
function FREF (line 74) | FREF *
function file_init (line 133) | int
function file_spath (line 467) | static int
function file_cinit (line 532) | static void
function file_end (line 652) | int
function file_write (line 763) | int
function file_backup (line 1008) | static int
function file_comment (line 1196) | static void
function file_m1 (line 1243) | int
function file_m2 (line 1282) | int
function file_m3 (line 1312) | int
function file_aw (line 1346) | int
function set_alt_name (line 1405) | void
function lockr_t (line 1421) | lockr_t
FILE: common/exf.h
type _exf (line 31) | struct _exf {
FILE: common/gs.h
type _fref (line 27) | struct _fref {
type exadj_t (line 48) | typedef enum { EX_TERM_CE, EX_TERM_SCROLL } exadj_t;
type scr_attr_t (line 51) | typedef enum { SA_ALTERNATE, SA_INVERSE } scr_attr_t;
type imctrl_t (line 54) | typedef enum { IMCTRL_INIT, IMCTRL_OFF, IMCTRL_ON } imctrl_t;
type scr_keyval_t (line 57) | typedef enum { KEY_VEOF, KEY_VERASE, KEY_VKILL, KEY_VWERASE } scr_keyval_t;
type _gs (line 65) | struct _gs {
FILE: common/key.c
function v_key_init (line 102) | int
function v_keyval (line 158) | static void
function v_key_ilookup (line 192) | void
function v_key_len (line 212) | size_t
function CHAR_T (line 226) | CHAR_T *
function v_key_val (line 538) | int
function v_event_push (line 560) | int
function v_event_append (line 613) | static int
function v_event_get (line 740) | int
function v_sync (line 957) | static void
function v_event_err (line 975) | void
function v_event_flush (line 1028) | int
function v_event_grow (line 1044) | static int
function v_key_cmp (line 1062) | static int
FILE: common/key.h
type CHAR_T (line 26) | typedef unsigned char CHAR_T;
type e_event_t (line 41) | typedef enum {
type e_key_t (line 61) | typedef enum {
type _event (line 85) | struct _event {
type KEYLIST (line 128) | typedef struct _keylist {
FILE: common/line.c
function db_eget (line 37) | int
function db_get (line 78) | int
function db_delete (line 179) | int
function db_append (line 231) | int
function db_insert (line 297) | int
function db_set (line 353) | int
function db_exist (line 402) | int
function db_last (line 437) | int
function db_err (line 498) | void
function scr_update (line 512) | static int
FILE: common/log.c
function log_init (line 88) | int
function log_end (line 124) | int
function log_cursor (line 152) | int
function log_cursor1 (line 181) | static int
function log_line (line 212) | int
function log_mark (line 288) | int
function log_backward (line 329) | int
function log_setline (line 431) | int
function log_forward (line 516) | int
function log_err (line 611) | static void
FILE: common/main.c
type pmode (line 45) | enum pmode
function editor (line 54) | int
function v_end (line 505) | void
function v_obsolete (line 584) | static int
function attach (line 636) | static void
FILE: common/mark.c
function mark_init (line 67) | int
function mark_end (line 89) | int
function mark_get (line 113) | int
function mark_set (line 156) | int
function LMARK (line 196) | static LMARK *
function mark_insdel (line 220) | int
FILE: common/mark.h
type _mark (line 30) | struct _mark {
type _lmark (line 36) | struct _lmark {
FILE: common/msg.c
function msgq (line 40) | void
function msgq_str (line 207) | void
function mod_rpt (line 247) | void
function msgq_status (line 358) | void
FILE: common/msg.h
type cmsg_t (line 21) | typedef enum {
type mtype_t (line 48) | typedef enum {
type MSGH (line 64) | typedef struct _msgh MSGH;
type _msg (line 66) | struct _msg {
FILE: common/options.c
type OABBREV (line 217) | typedef struct abbrev {
function opts_init (line 269) | int
function opts_set (line 431) | int
function o_set (line 731) | int
function opts_empty (line 771) | int
function opts_dump (line 792) | void
function opts_print (line 927) | static int
function opts_save (line 958) | int
function OPTLIST (line 1014) | OPTLIST const *
function opts_nomatch (line 1061) | void
function opts_abbcmp (line 1068) | static int
function opts_cmp (line 1074) | static int
function opts_copy (line 1087) | int
function opts_free (line 1135) | void
FILE: common/options.h
type _option (line 58) | struct _option {
type _optlist (line 85) | struct _optlist {
type optdisp (line 103) | enum optdisp { NO_DISPLAY, ALL_DISPLAY, CHANGED_DISPLAY, SELECT_DISPLAY }
FILE: common/options_f.c
function f_altwerase (line 38) | int
function f_columns (line 50) | int
function f_lines (line 82) | int
function f_paragraph (line 138) | int
function f_print (line 153) | int
function f_readonly (line 168) | int
function f_recompile (line 186) | int
function f_reformat (line 204) | int
function f_section (line 215) | int
function f_secure (line 230) | int
function f_ttywerase (line 245) | int
function f_w300 (line 257) | int
function f_w1200 (line 275) | int
function f_w9600 (line 293) | int
function f_window (line 311) | int
function f_imctrl (line 324) | int
FILE: common/put.c
function put (line 34) | int
FILE: common/recover.c
function rcv_tmp (line 139) | int
function rcv_init (line 201) | int
function rcv_sync (line 264) | int
function rcv_mailfile (line 340) | int
function rcv_openat (line 491) | int
function rcv_list (line 553) | int
function rcv_read (line 636) | int
function rcv_copy (line 794) | int
function rcv_mktemp (line 838) | int
function rcv_email (line 869) | void
FILE: common/screen.c
function screen_init (line 37) | int
function screen_end (line 130) | int
function SCR (line 211) | SCR *
FILE: common/screen.h
type _scr (line 37) | struct _scr {
FILE: common/search.c
type smsg_t (line 29) | typedef enum { S_EMPTY, S_EOF, S_NOPREV, S_NOTFOUND, S_SOF, S_WRAP } sms...
function search_init (line 39) | static int
function f_search (line 149) | int
function b_search (line 284) | int
function search_msg (line 435) | static void
function search_busy (line 471) | void
FILE: common/seq.c
function seq_set (line 37) | int
function seq_delete (line 133) | int
function seq_mdel (line 150) | int
function SEQ (line 170) | SEQ *
function seq_close (line 257) | void
function seq_dump (line 278) | int
function seq_save (line 324) | int
function e_memcmp (line 367) | int
FILE: common/seq.h
type _seq (line 35) | struct _seq {
FILE: common/util.c
function nonblank (line 73) | int
function CHAR_T (line 107) | CHAR_T *
function nget_uslong (line 127) | enum nresult
function nget_slong (line 146) | enum nresult
function TRACE (line 172) | void
FILE: db/btree/bt_close.c
function __bt_close (line 67) | int
function __bt_sync (line 122) | int
function bt_meta (line 164) | static int
FILE: db/btree/bt_conv.c
function __bt_pgin (line 64) | void
function __bt_pgout (line 129) | void
function mswap (line 201) | static void
FILE: db/btree/bt_debug.c
function __bt_dump (line 62) | void
function __bt_dmpage (line 105) | void
function __bt_dnpage (line 139) | void
function __bt_dpage (line 157) | void
function __bt_stat (line 254) | void
FILE: db/btree/bt_delete.c
function __bt_delete (line 68) | int
function __bt_stkacq (line 150) | static int
function __bt_bdelete (line 297) | static int
function __bt_pdelete (line 384) | static int
function __bt_dleaf (line 481) | int
function __bt_curdel (line 543) | static int
function __bt_relink (line 642) | static int
FILE: db/btree/bt_get.c
function __bt_get (line 68) | int
FILE: db/btree/bt_open.c
function DB (line 105) | DB *
function nroot (line 370) | static int
function tmp (line 410) | static int
function byteorder (line 439) | static int
function __bt_fd (line 457) | int
FILE: db/btree/bt_overflow.c
function __ovfl_get (line 85) | int
function __ovfl_put (line 143) | int
function __ovfl_delete (line 196) | int
FILE: db/btree/bt_page.c
function __bt_free (line 65) | int
function PAGE (line 90) | PAGE *
FILE: db/btree/bt_put.c
function __bt_put (line 72) | int
function EPG (line 278) | static EPG *
FILE: db/btree/bt_search.c
function EPG (line 71) | EPG *
function __bt_snext (line 156) | static int
function __bt_sprev (line 193) | static int
FILE: db/btree/bt_seq.c
function __bt_seq (line 82) | int
function __bt_seqset (line 157) | static int
function __bt_seqadv (line 245) | static int
function __bt_first (line 352) | static int
function __bt_setcur (line 454) | void
FILE: db/btree/bt_split.c
function __bt_split (line 84) | int
function PAGE (line 352) | static PAGE *
function PAGE (line 454) | static PAGE *
function bt_rroot (line 498) | static int
function bt_broot (line 537) | static int
function PAGE (line 615) | static PAGE *
function bt_preserve (line 795) | static int
function recno_t (line 822) | static recno_t
FILE: db/btree/bt_utils.c
function __bt_ret (line 72) | int
function __bt_cmp (line 153) | int
function __bt_defcmp (line 215) | int
function __bt_defpfx (line 246) | size_t
FILE: db/btree/btree.h
type PAGE (line 75) | typedef struct _page {
type BINTERNAL (line 130) | typedef struct _binternal {
type RINTERNAL (line 162) | typedef struct _rinternal {
type BLEAF (line 183) | typedef struct _bleaf {
type RLEAF (line 216) | typedef struct _rleaf {
type EPGNO (line 253) | typedef struct _epgno {
type EPG (line 258) | typedef struct _epg {
type CURSOR (line 288) | typedef struct _cursor {
type BTMETA (line 306) | typedef struct _btmeta {
type BTREE (line 318) | typedef struct _btree {
FILE: db/db/db.c
function DB (line 59) | DB *
function __dberr (line 87) | static int
function __dbpanic (line 100) | void
FILE: db/hash/bsd_ndbm.h
type datum (line 70) | typedef struct {
type DB (line 75) | typedef DB DBM;
FILE: db/hash/hash.c
function DB (line 120) | DB *
function hash_close (line 265) | static int
function hash_fd (line 280) | static int
function HTAB (line 297) | static HTAB *
function init_htab (line 363) | static int
function hdestroy (line 408) | static int
function hash_sync (line 475) | static int
function flush_meta (line 503) | static int
function hash_get (line 551) | static int
function hash_put (line 564) | static int
function hash_delete (line 582) | static int
function hash_access (line 604) | static int
function hash_seq (line 731) | static int
function __expand_table (line 824) | int
function u_int32_t (line 895) | u_int32_t
function alloc_segs (line 913) | static int
function swap_header_copy (line 950) | static void
function swap_header (line 978) | static void
FILE: db/hash/hash.h
type ACTION (line 46) | typedef enum {
type BUFHEAD (line 51) | typedef struct _bufhead BUFHEAD;
type _bufhead (line 53) | struct _bufhead {
type BUFHEAD (line 68) | typedef BUFHEAD **SEGMENT;
type HASHHDR (line 71) | typedef struct hashhdr { /* Disk resident portion */
type HTAB (line 98) | typedef struct htab { /* Memory resident data structur...
FILE: db/hash/hash_bigkey.c
function __big_insert (line 93) | int
function __big_delete (line 207) | int
function __find_bigpair (line 288) | int
function u_int16_t (line 336) | u_int16_t
function __big_return (line 377) | int
function collect_data (line 468) | static int
function __big_keydata (line 521) | int
function collect_key (line 536) | static int
function __big_split (line 576) | int
FILE: db/hash/hash_buf.c
function BUFHEAD (line 111) | BUFHEAD *
function BUFHEAD (line 165) | static BUFHEAD *
function __buf_init (line 319) | void
function __buf_free (line 343) | int
function __reclaim_buf (line 374) | void
FILE: db/hash/hash_func.c
function u_int32_t (line 51) | u_int32_t
FILE: db/hash/hash_log2.c
function u_int32_t (line 51) | u_int32_t
FILE: db/hash/hash_page.c
function putpair (line 118) | static void
function __delpair (line 149) | int
function __split_page (line 210) | int
function ugly_split (line 305) | static int
function __addel (line 430) | int
function BUFHEAD (line 503) | BUFHEAD *
function __get_page (line 556) | int
function __put_page (line 612) | int
function __ibitmap (line 656) | int
function u_int32_t (line 677) | static u_int32_t
function u_int16_t (line 691) | static u_int16_t
function __free_ovflpage (line 851) | void
function squeeze_key (line 934) | static void
function u_int32_t (line 959) | static u_int32_t *
function print_chain (line 975) | int
FILE: db/hash/ndbm.c
function DBM (line 71) | static DBM *
function DBM (line 103) | DBM *
function dbm_close (line 115) | void
function datum (line 129) | datum
function datum (line 155) | datum
function datum (line 177) | datum
function dbm_delete (line 199) | int
function dbm_store (line 222) | int
function dbm_error (line 236) | int
function dbm_clearerr (line 245) | int
function dbm_dirfno (line 255) | int
function dbm_rdonly (line 262) | int
FILE: db/hash/page.h
type SPLIT_RETURN (line 93) | typedef struct {
FILE: db/mpool/mpool.c
function MPOOL (line 68) | MPOOL *
function mpool_filter (line 107) | void
type _hqh (line 124) | struct _hqh
function mpool_delete (line 157) | int
type _hqh (line 192) | struct _hqh
function mpool_put (line 286) | int
function mpool_close (line 313) | int
function mpool_sync (line 334) | int
function BKT (line 354) | static BKT *
function mpool_write (line 412) | static int
function BKT (line 448) | static BKT *
function mpool_stat (line 476) | void
FILE: db/recno/extern.h
type SRCHOP (line 56) | enum SRCHOP
FILE: db/recno/rec_close.c
function __rec_close (line 65) | int
function __rec_sync (line 111) | int
FILE: db/recno/rec_delete.c
function __rec_delete (line 69) | int
function rec_rdelete (line 123) | static int
function __rec_dleaf (line 156) | int
FILE: db/recno/rec_get.c
function __rec_get (line 68) | int
function __rec_fpipe (line 125) | int
function __rec_vpipe (line 180) | int
function __rec_fmap (line 236) | int
function __rec_vmap (line 285) | int
FILE: db/recno/rec_open.c
function DB (line 62) | DB *
function __rec_fd (line 201) | int
FILE: db/recno/rec_put.c
function __rec_put (line 67) | int
function __rec_iput (line 194) | int
FILE: db/recno/rec_search.c
function EPG (line 69) | EPG *
FILE: db/recno/rec_seq.c
function __rec_seq (line 66) | int
FILE: db/recno/rec_utils.c
function __rec_ret (line 65) | int
FILE: db/recno/recno.h
type SRCHOP (line 42) | enum SRCHOP { SDELETE, SINSERT, SEARCH}
FILE: ex/ex.c
function ex (line 50) | int
function ex_cmd (line 204) | int
function ex_range (line 1626) | int
function ex_line (line 1821) | static int
function ex_load (line 2061) | static int
function ex_discard (line 2156) | static int
function ex_unknown (line 2186) | static void
function ex_is_abbrev (line 2210) | int
function ex_is_unmap (line 2227) | int
function EXCMDLIST (line 2247) | static EXCMDLIST const *
function ex_badaddr (line 2270) | void
function ex_comlog (line 2332) | static void
FILE: ex/ex.h
type EXCMDLIST (line 21) | typedef struct _excmdlist { /* Ex command table structure. ...
type RANGE (line 74) | typedef struct _range RANGE;
type _range (line 75) | struct _range { /* Global command range. */
type _excmd (line 81) | struct _excmd {
type EX_PRIVATE (line 168) | typedef struct _ex_private {
type filtertype (line 209) | enum filtertype { FILTER_BANG, FILTER_RBANG, FILTER_READ, FILTER_WRITE }
type exm_t (line 212) | typedef enum {
type badaddr (line 227) | enum badaddr { A_COMBO, A_EMPTY, A_EOF, A_NOTSET, A_ZERO }
type tagmsg_t (line 230) | typedef enum {
FILE: ex/ex_abbrev.c
function ex_abbr (line 35) | int
function ex_unabbr (line 99) | int
FILE: ex/ex_append.c
type which (line 26) | enum which {APPEND, CHANGE, INSERT}
type which (line 28) | enum which
function ex_append (line 37) | int
function ex_change (line 49) | int
function ex_insert (line 62) | int
function ex_aci (line 72) | static int
FILE: ex/ex_args.c
function ex_next (line 43) | int
function ex_N_next (line 124) | static int
function ex_prev (line 166) | int
function ex_rew (line 211) | int
function ex_args (line 249) | int
FILE: ex/ex_argv.c
function argv_init (line 47) | int
function argv_exp0 (line 67) | int
function argv_exp1 (line 90) | int
function argv_exp2 (line 127) | int
function argv_exp3 (line 227) | int
function argv_fexp (line 288) | static int
function argv_alloc (line 384) | static int
function argv_free (line 449) | int
function argv_lexp (line 477) | static int
function argv_comp (line 555) | static int
function argv_sexp (line 566) | static int
FILE: ex/ex_at.c
function ex_at (line 35) | int
FILE: ex/ex_bang.c
function ex_bang (line 55) | int
FILE: ex/ex_cd.c
function ex_cd (line 34) | int
FILE: ex/ex_delete.c
function ex_delete (line 31) | int
FILE: ex/ex_display.c
function ex_display (line 37) | int
function bdisplay (line 72) | static int
function db (line 110) | static void
FILE: ex/ex_edit.c
function ex_edit (line 47) | int
function ex_N_edit (line 107) | static int
FILE: ex/ex_equal.c
function ex_equal (line 29) | int
FILE: ex/ex_file.c
function ex_file (line 33) | int
FILE: ex/ex_filter.c
function ex_filter (line 45) | int
function filter_ldisplay (line 342) | static int
FILE: ex/ex_global.c
type which (line 29) | enum which {GLOBAL, V}
type which (line 31) | enum which
function ex_global (line 39) | int
function ex_v (line 52) | int
function ex_g_setup (line 62) | static int
function ex_g_insdel (line 252) | int
FILE: ex/ex_init.c
type rc (line 37) | enum rc { NOEXIST, NOPERM, RCOK }
type rc (line 38) | enum rc
type stat (line 38) | struct stat
function ex_screen_copy (line 48) | int
function ex_screen_end (line 82) | int
function ex_optchange (line 119) | int
function ex_exrc (line 136) | int
function ex_run_file (line 253) | static int
function ex_run_str (line 270) | int
function exrc_isok (line 342) | static enum rc
FILE: ex/ex_join.c
function ex_join (line 33) | int
FILE: ex/ex_map.c
function ex_map (line 43) | int
function ex_unmap (line 106) | int
FILE: ex/ex_mark.c
function ex_mark (line 32) | int
FILE: ex/ex_mkexrc.c
function ex_mkexrc (line 42) | int
FILE: ex/ex_move.c
function ex_copy (line 32) | int
function ex_move (line 85) | int
FILE: ex/ex_open.c
function ex_open (line 35) | int
FILE: ex/ex_preserve.c
function ex_preserve (line 32) | int
function ex_recover (line 66) | int
FILE: ex/ex_print.c
function ex_list (line 36) | int
function ex_number (line 54) | int
function ex_pr (line 72) | int
function ex_print (line 88) | int
function ex_ldisplay (line 140) | int
function ex_scprint (line 161) | int
function ex_prchars (line 196) | static int
function ex_printf (line 243) | int
function ex_puts (line 273) | int
function ex_fflush (line 299) | int
FILE: ex/ex_put.c
function ex_put (line 32) | int
FILE: ex/ex_quit.c
function ex_quit (line 30) | int
FILE: ex/ex_read.c
function ex_read (line 45) | int
function ex_readfp (line 298) | int
FILE: ex/ex_screen.c
function ex_bg (line 34) | int
function ex_fg (line 46) | int
function ex_resize (line 70) | int
function ex_sdisplay (line 99) | int
FILE: ex/ex_script.c
type termios (line 76) | struct termios
type winsize (line 76) | struct winsize
type termios (line 89) | struct termios
function ex_script (line 105) | int
function sscr_init (line 130) | static int
function sscr_getprompt (line 253) | static int
function sscr_exec (line 346) | int
function sscr_check_input (line 422) | int
function sscr_input (line 492) | int
function sscr_insert (line 557) | static int
function sscr_setprompt (line 642) | static int
function sscr_matchprompt (line 665) | static int
function sscr_end (line 703) | int
function sscr_check (line 736) | static void
function sscr_pty (line 751) | static int
function ptym_open (line 786) | static int
function ptys_open (line 824) | static int
FILE: ex/ex_set.c
function ex_set (line 30) | int
FILE: ex/ex_shell.c
function ex_shell (line 42) | int
function ex_exec_proc (line 83) | int
function proc_wait (line 147) | int
FILE: ex/ex_shift.c
type which (line 25) | enum which {RETAB, LEFT, RIGHT}
type which (line 26) | enum which
function ex_shiftl (line 34) | int
function ex_shiftr (line 45) | int
function ex_retab (line 57) | int
function shift (line 67) | static int
FILE: ex/ex_source.c
function ex_sourcefd (line 40) | int
function ex_source (line 94) | int
FILE: ex/ex_stop.c
function ex_stop (line 34) | int
FILE: ex/ex_subst.c
function ex_s (line 48) | int
function ex_subagain (line 251) | int
function ex_subtilde (line 273) | int
function s (line 337) | static int
function re_compile (line 873) | int
function re_conv (line 990) | static int
function re_tag_conv (line 1116) | static int
function re_error (line 1186) | void
function re_sub (line 1206) | static int
FILE: ex/ex_tag.c
function ex_tag_first (line 68) | int
function ex_tag_push (line 102) | int
function ex_tag_next (line 234) | int
function ex_tag_prev (line 265) | int
function ex_tag_nswitch (line 296) | int
function ex_tag_Nswitch (line 330) | int
function ex_tag_pop (line 384) | int
function ex_tag_top (line 464) | int
function tag_pop (line 487) | static int
function ex_tag_display (line 540) | int
function ex_tag_copy (line 622) | int
function tagf_copy (line 668) | static int
function tagq_copy (line 690) | static int
function tag_copy (line 715) | static int
function tagf_free (line 742) | static int
function tagq_free (line 760) | int
function tag_msg (line 793) | void
function ex_tagf_alloc (line 818) | int
function ex_tag_free (line 860) | int
function ctag_search (line 881) | static int
function TAGQ (line 941) | static TAGQ *
function ctag_sfile (line 997) | static int
function ctag_file (line 1128) | static void
function compare (line 1263) | static int
FILE: ex/ex_txt.c
function ex_txt (line 54) | int
function txt_prompt (line 353) | static void
function txt_dent (line 377) | static int
FILE: ex/ex_undo.c
function ex_undo (line 31) | int
FILE: ex/ex_usage.c
function ex_help (line 35) | int
function ex_usage (line 56) | int
function ex_viusage (line 117) | int
FILE: ex/ex_util.c
function ex_cinit (line 35) | void
function ex_cadd (line 58) | void
function ex_getline (line 73) | int
function ex_ncheck (line 113) | int
function ex_init (line 142) | int
function ex_emsg (line 167) | void
FILE: ex/ex_version.c
function ex_version (line 32) | int
FILE: ex/ex_visual.c
function ex_visual (line 35) | int
FILE: ex/ex_write.c
type which (line 31) | enum which {WN, WQ, WRITE, XIT}
type which (line 32) | enum which
function ex_wn (line 40) | int
function ex_wq (line 60) | int
function ex_write (line 86) | int
function ex_xit (line 98) | int
function exwr (line 123) | static int
function ex_writefp (line 266) | int
FILE: ex/ex_yank.c
function ex_yank (line 30) | int
FILE: ex/ex_z.c
function ex_z (line 32) | int
FILE: ex/script.h
type _script (line 17) | struct _script {
FILE: ex/tag.h
type _tagf (line 23) | struct _tagf { /* Tag files. */
type _tag (line 57) | struct _tag { /* Tag list. */
type _tagq (line 74) | struct _tagq { /* Tag queue. */
FILE: include/bitstring.h
type bitstr_t (line 56) | typedef unsigned char bitstr_t;
FILE: include/bsd_db.h
type u_int32_t (line 59) | typedef u_int32_t pgno_t;
type u_int16_t (line 61) | typedef u_int16_t indx_t;
type u_int32_t (line 63) | typedef u_int32_t recno_t;
type DBT (line 66) | typedef struct {
type DBTYPE (line 84) | typedef enum { DB_BTREE, DB_HASH, DB_RECNO } DBTYPE;
type DB (line 110) | typedef struct __db {
type BTREEINFO (line 126) | typedef struct {
type HASHINFO (line 144) | typedef struct {
type RECNOINFO (line 155) | typedef struct {
FILE: include/bsd_regex.h
type off_t (line 57) | typedef off_t regoff_t;
type regex_t (line 59) | typedef struct {
type regmatch_t (line 66) | typedef struct {
FILE: include/com_extern.h
type optdisp (line 96) | enum optdisp
type nresult (line 142) | enum nresult
type nresult (line 143) | enum nresult
FILE: include/compat.h
type passwd (line 237) | struct passwd
type passwd (line 237) | struct passwd
FILE: include/ex_extern.h
type badaddr (line 41) | enum badaddr
type nresult (line 41) | enum nresult
type filtertype (line 67) | enum filtertype
FILE: include/mpool.h
type BKT (line 59) | typedef struct _bkt {
type MPOOL (line 71) | typedef struct MPOOL {
FILE: include/sys/queue.h
type type (line 188) | struct type
type type (line 266) | struct type
type type (line 275) | struct type
FILE: include/sys/tree.h
type type (line 80) | struct type
type type (line 129) | struct type
type name (line 130) | struct name
type type (line 130) | struct type
type type (line 140) | struct type
type name (line 141) | struct name
type type (line 141) | struct type
type type (line 154) | struct type
type name (line 155) | struct name
function _SPLAY_MINMAX (line 248) | void name##_SPLAY_MINMAX(struct name *head, int __comp) \
type type (line 316) | struct type
type type (line 317) | struct type
type name (line 597) | struct name
type type (line 599) | struct type
type type (line 600) | struct type
type name (line 628) | struct name
type type (line 630) | struct type
type name (line 646) | struct name
type type (line 648) | struct type
type type (line 649) | struct type
type type (line 667) | struct type
type type (line 689) | struct type
type name (line 710) | struct name
type type (line 712) | struct type
type type (line 713) | struct type
FILE: include/util.h
type bmsg_t (line 40) | typedef enum { B_NONE, B_OFF, B_READ, B_RECOVER, B_SEARCH, B_WRITE } bms...
type nresult (line 50) | enum nresult { NUM_ERR, NUM_OK, NUM_OVER, NUM_UNDER }
FILE: openbsd/err.c
function openbsd_err (line 48) | void
FILE: openbsd/errc.c
function openbsd_errc (line 48) | void
FILE: openbsd/errx.c
function openbsd_errx (line 48) | void
FILE: openbsd/getopt_long.c
type option (line 94) | struct option
type option (line 97) | struct option
function openbsd_gcd (line 119) | static int
function openbsd_permute_args (line 141) | static void
function openbsd_parse_long_options (line 186) | static int
function openbsd_getopt_internal (line 375) | static int
function openbsd_getopt (line 661) | int
function openbsd_getopt_long (line 682) | int
function openbsd_getopt_long_only (line 700) | int
FILE: openbsd/getopt_long.h
type option (line 49) | struct option
type option (line 64) | struct option
type option (line 66) | struct option
FILE: openbsd/getprogname.c
type procentry64 (line 42) | struct procentry64
FILE: openbsd/issetugid.c
function issetugid (line 63) | int
FILE: openbsd/minpwcache.c
type UIDC (line 79) | typedef struct uidc
type GIDC (line 86) | typedef struct gidc
function st_hash (line 105) | static unsigned int
function usrtb_start (line 127) | static int
function grptb_start (line 157) | static int
function openbsd_uid_from_user (line 187) | int
function openbsd_gid_from_group (line 263) | int
FILE: openbsd/open.c
function openbsd_open (line 47) | int
FILE: openbsd/pledge.c
function openbsd_pledge (line 46) | int
FILE: openbsd/setmode.c
type BITCMD (line 68) | typedef struct bitcmd
function mode_t (line 90) | mode_t
function BITCMD (line 433) | static BITCMD *
function compress_mode (line 494) | static void
FILE: openbsd/strlcat.c
function openbsd_strlcat (line 38) | size_t
FILE: openbsd/strlcpy.c
function openbsd_strlcpy (line 34) | size_t
FILE: openbsd/strtonum.c
function strtonum (line 32) | long long
FILE: openbsd/verr.c
function openbsd_verr (line 52) | void
FILE: openbsd/verrc.c
function openbsd_verrc (line 49) | void
FILE: openbsd/verrx.c
function openbsd_verrx (line 50) | void
FILE: openbsd/vwarn.c
function openbsd_vwarn (line 52) | void
FILE: openbsd/vwarnc.c
function openbsd_vwarnc (line 49) | void
FILE: openbsd/vwarnx.c
function openbsd_vwarnx (line 50) | void
FILE: openbsd/warn.c
function openbsd_warn (line 48) | void
FILE: openbsd/warnc.c
function openbsd_warnc (line 48) | void
FILE: openbsd/warnx.c
function openbsd_warnx (line 48) | void
FILE: regex/bsd_regex2.h
type sop (line 70) | typedef unsigned long sop;
type sopno (line 71) | typedef long sopno;
type cset (line 115) | typedef struct
function CHadd (line 122) | static inline void
function CHsub (line 129) | static inline void
function CHIN (line 136) | static inline int
type re_guts (line 145) | struct re_guts
FILE: regex/cclass.h
type cclass (line 47) | struct cclass
FILE: regex/cname.h
type cname (line 47) | struct cname
FILE: regex/engine.c
type match (line 79) | struct match
type re_guts (line 96) | struct re_guts
type match (line 97) | struct match
type match (line 99) | struct match
type match (line 101) | struct match
type match (line 103) | struct match
type re_guts (line 105) | struct re_guts
type match (line 121) | struct match
type match (line 125) | struct match
function matcher (line 151) | static int /* 0 success, REG_NOMATCH failure */
type match (line 384) | struct match
type match (line 621) | struct match
type match (line 917) | struct match
type match (line 1033) | struct match
function states (line 1140) | static states
function print (line 1304) | static void
function at (line 1333) | static void
FILE: regex/regcomp.c
type parse (line 67) | struct parse
type parse (line 82) | struct parse
type parse (line 83) | struct parse
type parse (line 84) | struct parse
type parse (line 85) | struct parse
type parse (line 86) | struct parse
type parse (line 87) | struct parse
type parse (line 88) | struct parse
type parse (line 89) | struct parse
type parse (line 90) | struct parse
type parse (line 91) | struct parse
type parse (line 92) | struct parse
type parse (line 93) | struct parse
type parse (line 95) | struct parse
type parse (line 96) | struct parse
type parse (line 97) | struct parse
type parse (line 98) | struct parse
type parse (line 99) | struct parse
type parse (line 100) | struct parse
type parse (line 101) | struct parse
type parse (line 102) | struct parse
type parse (line 103) | struct parse
type parse (line 104) | struct parse
type parse (line 105) | struct parse
type parse (line 106) | struct parse
type parse (line 107) | struct parse
type parse (line 108) | struct parse
type parse (line 109) | struct parse
type parse (line 110) | struct parse
type parse (line 111) | struct parse
type re_guts (line 111) | struct re_guts
type parse (line 112) | struct parse
type re_guts (line 112) | struct re_guts
type parse (line 113) | struct parse
type re_guts (line 113) | struct re_guts
function regcomp (line 160) | int /* 0 success, otherwise REG_something */
function p_ere (line 284) | static void
function p_ere_exp (line 335) | static void
function p_str (line 527) | static void
function p_bre (line 547) | static void
function p_simp_re (line 581) | static int /* was the simple RE an un-backslashed $? */
function p_count (line 757) | static int /* the value */
function p_bracket (line 779) | static void
function p_b_term (line 894) | static void
function p_b_cclass (line 976) | static void
function p_b_eclass (line 1017) | static void
function p_b_symbol (line 1029) | static char /* value of symbol */
function p_b_coll_elem (line 1049) | static char /* value of collating element */
function othercase (line 1087) | static char /* if no counterpart, return ch */
function bothcases (line 1111) | static void
function ordinary (line 1134) | static void
function backslash (line 1150) | static void
function nonnewline (line 1174) | static void
function repeat (line 1194) | static void
function seterr (line 1274) | static void
function cset (line 1289) | static cset *
function freeset (line 1359) | static void
function freezeset (line 1386) | static int /* set number */
function firstch (line 1428) | static int /* character; there is no "none" value */
function nch (line 1449) | static int
function sopno (line 1470) | static sopno /* start of duplicate */
function doemit (line 1500) | static void
function doinsert (line 1528) | static void
function dofwd (line 1571) | static void
function enlarge (line 1587) | static int
function stripsnug (line 1612) | static void
function findmust (line 1633) | static void
function sopno (line 1734) | static sopno /* nesting depth */
FILE: regex/regerror.c
type rerr (line 59) | struct rerr
function regerror (line 87) | size_t
type rerr (line 148) | struct rerr
FILE: regex/regexec.c
function regexec (line 162) | int /* 0 success, REG_NOMATCH failure */
FILE: regex/regfree.c
function regfree (line 58) | void
FILE: regex/utils.h
type uch (line 57) | typedef unsigned char uch;
FILE: vi/getc.c
function cs_init (line 44) | int
function cs_next (line 71) | int
function cs_fspace (line 121) | int
function cs_fblank (line 141) | int
function cs_prev (line 161) | int
function cs_bblank (line 211) | int
FILE: vi/v_at.c
function v_at (line 33) | int
FILE: vi/v_ch.c
function v_chrepeat (line 36) | int
function v_chrrepeat (line 65) | int
function v_cht (line 104) | int
function v_chf (line 135) | int
function v_chT (line 191) | int
function v_chF (line 216) | int
function noprev (line 269) | static void
function notfound (line 275) | static void
FILE: vi/v_delete.c
function v_delete (line 33) | int
FILE: vi/v_ex.c
function v_again (line 41) | int
function v_exmode (line 59) | int
function v_join (line 95) | int
function v_shiftl (line 124) | int
function v_shiftr (line 141) | int
function v_suspend (line 158) | int
function v_switch (line 175) | int
function v_tagpush (line 212) | int
function v_tagpop (line 229) | int
function v_filter (line 244) | int
function v_event_exec (line 320) | int
function v_exec_ex (line 342) | static int
function v_ex (line 357) | int
function v_ex_done (line 481) | static int
function v_ecl (line 523) | static int
function v_ecl_exec (line 572) | int
function v_ecl_log (line 601) | static int
function v_ecl_init (line 640) | static int
FILE: vi/v_increment.c
type nresult (line 43) | enum nresult
function v_increment (line 51) | int
function inc_err (line 260) | static void
FILE: vi/v_init.c
function v_screen_copy (line 35) | int
function v_screen_end (line 78) | int
function v_optchange (line 101) | int
FILE: vi/v_itxt.c
function v_iA (line 67) | int
function v_ia (line 87) | int
function v_iI (line 124) | int
function v_ii (line 143) | int
type which (line 167) | enum which { o_cmd, O_cmd }
type which (line 168) | enum which
function v_iO (line 176) | int
function v_io (line 188) | int
function io (line 194) | static int
function v_change (line 244) | int
function v_Replace (line 383) | int
function v_subst (line 417) | int
function u_int32_t (line 457) | static u_int32_t
FILE: vi/v_left.c
function v_left (line 32) | int
function v_cfirst (line 70) | int
function v_first (line 137) | int
function v_ncol (line 199) | int
function v_zero (line 259) | int
FILE: vi/v_mark.c
function v_mark (line 33) | int
type which (line 39) | enum which {BQMARK, FQMARK}
type which (line 40) | enum which
function v_bmark (line 57) | int
function v_fmark (line 71) | int
function mark (line 81) | static int
FILE: vi/v_match.c
function v_match (line 34) | int
FILE: vi/v_paragraph.c
function v_paragraphf (line 70) | int
function v_paragraphb (line 215) | int
function v_buildps (line 326) | int
FILE: vi/v_put.c
function v_Put (line 34) | int
function v_put (line 61) | int
function inc_buf (line 97) | static void
FILE: vi/v_redraw.c
function v_redraw (line 33) | int
FILE: vi/v_replace.c
function v_replace (line 45) | int
FILE: vi/v_right.c
function v_right (line 32) | int
function v_dollar (line 82) | int
FILE: vi/v_screen.c
function v_screen (line 32) | int
FILE: vi/v_scroll.c
function v_lgoto (line 69) | int
function v_home (line 106) | int
function v_middle (line 123) | int
function v_bottom (line 144) | int
function goto_adjust (line 154) | static void
function v_up (line 207) | int
function v_cr (line 229) | int
function v_down (line 250) | int
function v_hpageup (line 271) | int
function v_hpagedown (line 295) | int
function v_pagedown (line 323) | int
function v_pageup (line 369) | int
function v_lineup (line 415) | int
function v_linedown (line 435) | int
FILE: vi/v_search.c
function v_searchb (line 39) | int
function v_searchf (line 51) | int
function v_exaddr (line 61) | static int
function v_searchN (line 280) | int
function v_searchn (line 305) | int
function v_searchw (line 317) | int
function v_search (line 340) | static int
function v_correct (line 403) | int
FILE: vi/v_section.c
function v_sectionf (line 63) | int
function v_sectionb (line 170) | int
FILE: vi/v_sentence.c
function v_sentencef (line 53) | int
function v_sentenceb (line 192) | int
FILE: vi/v_status.c
function v_status (line 33) | int
FILE: vi/v_txt.c
function v_tcmd (line 65) | int
function txt_map_init (line 116) | static int
function txt_map_end (line 168) | static int
function v_txt (line 241) | int
function txt_abbrev (line 1449) | static int
function txt_unmap (line 1615) | static void
function txt_ai_resolve (line 1655) | static void
function v_txt_auto (line 1748) | int
function TEXT (line 1798) | static TEXT *
function txt_dent (line 1871) | static int
function txt_fc (line 1975) | static int
function txt_fc_col (line 2128) | static int
function txt_emark (line 2238) | static int
function txt_err (line 2288) | static void
function txt_hex (line 2321) | static int
function txt_insch (line 2399) | static int
function txt_isrch (line 2511) | static int
function txt_resolve (line 2631) | static int
function txt_showmatch (line 2683) | static int
function txt_margin (line 2747) | static int
function txt_Rresolve (line 2825) | static void
function txt_nomorech (line 2878) | static void
FILE: vi/v_ulcase.c
function v_ulcase (line 48) | int
function v_mulcase (line 106) | int
function ulcase (line 142) | static int
FILE: vi/v_undo.c
function v_Undo (line 35) | int
function v_undo (line 69) | int
FILE: vi/v_util.c
function v_eof (line 36) | void
function v_eol (line 59) | void
function v_nomove (line 82) | void
function v_sof (line 94) | void
function v_sol (line 109) | void
function v_isempty (line 121) | int
function v_emsg (line 136) | void
FILE: vi/v_word.c
type which (line 66) | enum which {BIGWORD, LITTLEWORD}
type which (line 68) | enum which
type which (line 69) | enum which
type which (line 70) | enum which
function v_wordW (line 78) | int
function v_wordw (line 90) | int
function fword (line 100) | static int
function v_wordE (line 238) | int
function v_worde (line 250) | int
function eword (line 260) | static int
function v_wordB (line 384) | int
function v_wordb (line 396) | int
function bword (line 406) | static int
FILE: vi/v_xchar.c
function v_xchar (line 32) | int
function v_Xchar (line 79) | int
FILE: vi/v_yank.c
function v_yank (line 43) | int
FILE: vi/v_z.c
function v_z (line 32) | int
function vs_crel (line 135) | int
FILE: vi/v_zexit.c
function v_zexit (line 33) | int
FILE: vi/vi.c
type gcret_t (line 31) | typedef enum {
function vi (line 63) | int
function gcret_t (line 464) | static gcret_t
function v_motion (line 731) | static int
function v_init (line 954) | static int
function v_dtoh (line 1033) | static void
function v_keyword (line 1069) | static int
function VIKEYS (line 1122) | static VIKEYS const *
function v_count (line 1155) | static int
function gcret_t (line 1193) | static gcret_t
function v_comlog (line 1256) | static void
FILE: vi/vi.h
type VIKEYS (line 22) | typedef struct _vikeys VIKEYS;
type VICMD (line 25) | typedef struct _vicmd {
type _vikeys (line 139) | struct _vikeys { /* Underlying function. */
type VCS (line 162) | typedef struct _vcs {
type SMAP (line 211) | typedef struct _smap {
type cdir_t (line 228) | typedef enum { CNOTSET, FSEARCH, fSEARCH, TSEARCH, tSEARCH } cdir_t;
type abb_t (line 230) | typedef enum { AB_NOTSET, AB_NOTWORD, AB_INWORD } abb_t;
type quote_t (line 231) | typedef enum { Q_NOTSET, Q_VNEXT, Q_VTHIS } quote_t;
type VI_PRIVATE (line 234) | typedef struct _vi_private {
type adj_t (line 379) | typedef enum { A_DECREASE, A_INCREASE, A_SET } adj_t;
type pos_t (line 382) | typedef enum { P_BOTTOM, P_FILL, P_MIDDLE, P_TOP } pos_t;
type scroll_t (line 385) | typedef enum {
type vim_t (line 391) | typedef enum {
FILE: vi/vs_line.c
function vs_line (line 33) | int
function vs_number (line 463) | int
FILE: vi/vs_msg.c
type sw_t (line 30) | typedef enum {
function vs_busy (line 58) | void
function vs_home (line 150) | void
function vs_update (line 163) | void
function vs_msg (line 229) | void
function vs_output (line 394) | static void
function vs_ex_resolve (line 519) | int
function vs_resolve (line 643) | int
function vs_scroll (line 750) | static void
function vs_wait (line 783) | static void
function vs_divider (line 854) | static void
function vs_msgsave (line 873) | static void
FILE: vi/vs_refresh.c
function vs_repaint (line 42) | int
function vs_refresh (line 62) | int
function vs_paint (line 158) | static int
function vs_modeline (line 772) | static void
FILE: vi/vs_relative.c
function vs_column (line 33) | int
function vs_screens (line 54) | size_t
function vs_columns (line 97) | size_t
function vs_rcm (line 200) | size_t
function vs_colpos (line 226) | size_t
FILE: vi/vs_smap.c
function vs_change (line 44) | int
function vs_sm_fill (line 172) | int
function vs_sm_delete (line 306) | static int
function vs_sm_insert (line 354) | static int
function vs_sm_reset (line 408) | static int
function vs_sm_scroll (line 513) | int
function vs_sm_up (line 570) | static int
function vs_sm_1up (line 746) | int
function vs_deleteln (line 775) | static int
function vs_sm_down (line 800) | static int
function vs_sm_erase (line 951) | static int
function vs_sm_1down (line 972) | int
function vs_insertln (line 1001) | static int
function vs_sm_next (line 1029) | int
function vs_sm_prev (line 1057) | int
function vs_sm_cursor (line 1082) | int
function vs_sm_position (line 1121) | int
function recno_t (line 1201) | recno_t
FILE: vi/vs_split.c
function vs_split (line 37) | int
function vs_discard (line 196) | int
function vs_fg (line 284) | int
function vs_bg (line 331) | int
function vs_swap (line 369) | int
function vs_resize (line 459) | int
function SCR (line 558) | static SCR *
FILE: xinstall/xinstall.c
function main (line 119) | int
function install (line 328) | static void
function copy (line 568) | static void
function compare (line 682) | static int
function strip (line 751) | static void
function install_dir (line 797) | static void
function usage (line 853) | static void
function create_tempfile (line 868) | static int
function file_write (line 955) | static int
function file_flush (line 1055) | static void
Condensed preview — 280 files, each showing path, character count, and a content snippet. Download the .json file or copy for the full structured content (3,162K chars).
[
{
"path": ".gitattributes",
"chars": 665,
"preview": "# SPDX-License-Identifier: BSD-3-Clause\n# Copyright (c) 2021-2024 Jeffrey H. Johnson\n*.txt linguist-documentation\n"
},
{
"path": ".gitignore",
"chars": 971,
"preview": "# SPDX-License-Identifier: BSD-3-Clause\n# Copyright (c) 2021-2024 Jeffrey H. Johnson\n\n# Prerequisites\n*.d\n\n# Timing\n*.t\n"
},
{
"path": "BSDmakefile",
"chars": 1593,
"preview": "###############################################################################\n# - O p e"
},
{
"path": "ChangeLog",
"chars": 137955,
"preview": "OpenVi 7.7.32 -> OpenVi 7.8.33-dev: Wed Dec 24 15:06:57 2025\n + Update README to mention optional `pkg-config` pr"
},
{
"path": "ChangeLog.license",
"chars": 124,
"preview": "SPDX-License-Identifier: BSD-3-Clause\nCopyright (c) 2021-2024 Jeffrey H. Johnson <johnsonjh.dev@gmail.com> and contribut"
},
{
"path": "GNUmakefile",
"chars": 29377,
"preview": "###############################################################################\n# - O p e"
},
{
"path": "LICENSE.md",
"chars": 4524,
"preview": "```text\nCopyright (c) 1980, 1986, 1987, 1988, 1989, 1990, 1991, 1992, 1993, 1994\n The Regents of the University o"
},
{
"path": "LICENSES/BSD-2-Clause.txt",
"chars": 1435,
"preview": "Copyright (c) 2000, 2006, 2013, 2020 The NetBSD Foundation, Inc.\nCopyright (c) 2002 Niels Provos <provos@citi.umich.edu>"
},
{
"path": "LICENSES/BSD-3-Clause.txt",
"chars": 3786,
"preview": "Copyright (c) 1980, 1986, 1987, 1988, 1989, 1990, 1991, 1992, 1993, 1994\n The Regents of the University of Califo"
},
{
"path": "LICENSES/ISC.txt",
"chars": 1041,
"preview": "Copyright (c) 1997, 1998, 2002, 2004, 2015\n Todd C. Miller <millert@openbsd.org>\nCopyright (c) 2004 Ted Unangst a"
},
{
"path": "README.md",
"chars": 21036,
"preview": "<!-- SPDX-License-Identifier: BSD-3-Clause -->\n<!-- Copyright (c) 2021-2024 Jeffrey H Johnson -->\n[Uma tradução em portu"
},
{
"path": "README_pt_BR.md",
"chars": 22174,
"preview": "<!-- SPDX-License-Identifier: BSD-3-Clause -->\n<!-- Copyright (c) 2021-2024 Jeffrey H Johnson -->\n[An English version of"
},
{
"path": "REUSE.toml",
"chars": 281,
"preview": "# SPDX-License-Identifier: BSD-3-Clause\n# Copyright (c) 2021-2024 Jeffrey H. Johnson\nversion = 1\nSPDX-PackageName = \"Ope"
},
{
"path": "cl/cl.h",
"chars": 2612,
"preview": "/* $OpenBSD: cl.h,v 1.12 2021/09/02 11:19:02 schwarze Exp $ */\n\n/* SPDX-License-Identifier: BSD-3-Clause */\n"
},
{
"path": "cl/cl_extern.h",
"chars": 2565,
"preview": "/* SPDX-License-Identifier: BSD-3-Clause */\n\n/*\n * Copyright (c) 2022-2024 Jeffrey H. Johnson\n *\n * All rights reserved."
},
{
"path": "cl/cl_funcs.c",
"chars": 21484,
"preview": "/* $OpenBSD: cl_funcs.c,v 1.23 2022/12/26 19:16:03 jmc Exp $ */\n\n/* SPDX-License-Identifier: BSD-3-Clause */\n\n/*\n "
},
{
"path": "cl/cl_main.c",
"chars": 9824,
"preview": "/* $OpenBSD: cl_main.c,v 1.36 2021/10/24 21:24:17 deraadt Exp $ */\n\n/* SPDX-License-Identifier: BSD-3-Clause */\n"
},
{
"path": "cl/cl_read.c",
"chars": 10361,
"preview": "/* $OpenBSD: cl_read.c,v 1.23 2021/09/02 11:19:02 schwarze Exp $ */\n\n/* SPDX-License-Identifier: BSD-3-Clause */\n"
},
{
"path": "cl/cl_screen.c",
"chars": 17535,
"preview": "/* $OpenBSD: cl_screen.c,v 1.28 2017/04/18 01:45:33 deraadt Exp $ */\n\n/* SPDX-License-Identifier: BSD-3-Clause */\n"
},
{
"path": "cl/cl_term.c",
"chars": 14005,
"preview": "/* $OpenBSD: cl_term.c,v 1.29 2022/04/22 15:50:07 tb Exp $ */\n\n/* SPDX-License-Identifier: BSD-3-Clause */\n\n/*"
},
{
"path": "cl/extern.h",
"chars": 4910,
"preview": "/* $OpenBSD: extern.h,v 1.8 2015/08/27 04:37:09 guenther Exp $ */\n\n/* SPDX-License-Identifier: BSD-3-Clause */\n"
},
{
"path": "common/args.h",
"chars": 1139,
"preview": "/* $OpenBSD: args.h,v 1.5 2016/05/27 09:18:11 martijn Exp $ */\n\n/* SPDX-License-Identifier: BSD-3-Clause */\n"
},
{
"path": "common/common.h",
"chars": 3238,
"preview": "/* $OpenBSD: common.h,v 1.10 2021/01/26 18:19:43 deraadt Exp $ */\n\n/* SPDX-License-Identifier: BSD-3-Clause */\n"
},
{
"path": "common/cut.c",
"chars": 11461,
"preview": "/* $OpenBSD: cut.c,v 1.18 2025/07/30 22:19:13 millert Exp $ */\n\n/* SPDX-License-Identifier: BSD-3-Clause */\n"
},
{
"path": "common/cut.h",
"chars": 3666,
"preview": "/* $OpenBSD: cut.h,v 1.9 2016/05/27 09:18:11 martijn Exp $ */\n\n/* SPDX-License-Identifier: BSD-3-Clause */\n\n/*\n * C"
},
{
"path": "common/delete.c",
"chars": 5411,
"preview": "/* $OpenBSD: delete.c,v 1.12 2017/11/26 09:59:41 mestre Exp $ */\n\n/* SPDX-License-Identifier: BSD-3-Clause */\n"
},
{
"path": "common/exf.c",
"chars": 51379,
"preview": "/* $OpenBSD: exf.c,v 1.50 2024/02/15 00:55:01 jsg Exp $ */\n\n/* SPDX-License-Identifier: BSD-3-Clause */\n\n/*\n * Copy"
},
{
"path": "common/exf.h",
"chars": 4067,
"preview": "/* $OpenBSD: exf.h,v 1.6 2022/02/20 19:45:51 tb Exp $ */\n\n/* SPDX-License-Identifier: BSD-3-Clause */\n\n/*\n * Cop"
},
{
"path": "common/gs.h",
"chars": 10086,
"preview": "/* $OpenBSD: gs.h,v 1.18 2016/05/27 09:18:11 martijn Exp $ */\n\n/* SPDX-License-Identifier: BSD-3-Clause */\n\n/*\n * C"
},
{
"path": "common/key.c",
"chars": 38543,
"preview": "/* $OpenBSD: key.c,v 1.19 2022/04/21 17:50:50 millert Exp $ */\n\n/* SPDX-License-Identifier: BSD-3-Clause */\n"
},
{
"path": "common/key.h",
"chars": 9967,
"preview": "/* $OpenBSD: key.h,v 1.8 2016/05/27 09:18:11 martijn Exp $ */\n\n/* SPDX-License-Identifier: BSD-3-Clause */\n\n/*\n * C"
},
{
"path": "common/line.c",
"chars": 13897,
"preview": "/* $OpenBSD: line.c,v 1.17 2025/07/30 22:19:13 millert Exp $ */\n\n/* SPDX-License-Identifier: BSD-3-Clause */"
},
{
"path": "common/log.c",
"chars": 19614,
"preview": "/* $OpenBSD: log.c,v 1.12 2017/04/18 01:45:35 deraadt Exp $ */\n\n/* SPDX-License-Identifier: BSD-3-Clause */\n"
},
{
"path": "common/log.h",
"chars": 784,
"preview": "/* $OpenBSD: log.h,v 1.3 2001/01/29 01:58:30 niklas Exp $ */\n\n/* SPDX-License-Identifier: BSD-3-Clause */\n\n/*\n * C"
},
{
"path": "common/main.c",
"chars": 22621,
"preview": "/* $OpenBSD: main.c,v 1.43 2021/10/24 21:24:17 deraadt Exp $ */\n\n/* SPDX-License-Identifier: BSD-3-Clause */\n"
},
{
"path": "common/mark.c",
"chars": 8117,
"preview": "/* $OpenBSD: mark.c,v 1.14 2016/05/27 09:18:11 martijn Exp $ */\n\n/* SPDX-License-Identifier: BSD-3-Clause */\n"
},
{
"path": "common/mark.h",
"chars": 1937,
"preview": "/* $OpenBSD: mark.h,v 1.5 2016/05/27 09:18:11 martijn Exp $ */\n\n/* SPDX-License-Identifier: BSD-3-Clause */\n"
},
{
"path": "common/mem.h",
"chars": 9572,
"preview": "/* $OpenBSD: mem.h,v 1.10 2017/06/24 16:30:47 martijn Exp $ */\n\n/* SPDX-License-Identifier: BSD-3-Clause */\n"
},
{
"path": "common/msg.c",
"chars": 18245,
"preview": "/* $OpenBSD: msg.c,v 1.28 2022/12/26 19:16:03 jmc Exp $ */\n\n/* SPDX-License-Identifier: BSD-3-Clause */\n\n/*\n * C"
},
{
"path": "common/msg.h",
"chars": 2704,
"preview": "/* $OpenBSD: msg.h,v 1.3 2001/01/29 01:58:31 niklas Exp $ */\n\n/* SPDX-License-Identifier: BSD-3-Clause */\n\n/*\n * C"
},
{
"path": "common/options.awk",
"chars": 531,
"preview": "# SPDX-License-Identifier: BSD-3-Clause\n# Copyright (c) 1980, 1986, 1987, 1988, 1989, 1990, 1991, 1992, 1993, 1994\n# "
},
{
"path": "common/options.c",
"chars": 42526,
"preview": "/* $OpenBSD: options.c,v 1.30 2024/02/12 16:42:42 job Exp $ */\n\n/* SPDX-License-Identifier: BSD-3-Clause */\n\n/*\n"
},
{
"path": "common/options.h",
"chars": 4805,
"preview": "/* $OpenBSD: options.h,v 1.9 2017/07/03 07:01:14 bentley Exp $ */\n\n/* SPDX-License-Identifier: BSD-3-Clause */\n"
},
{
"path": "common/options_f.c",
"chars": 8126,
"preview": "/* $OpenBSD: options_f.c,v 1.13 2019/05/21 09:24:58 martijn Exp $ */\n\n/* SPDX-License-Identifier: BSD-3-Clause */\n"
},
{
"path": "common/put.c",
"chars": 8999,
"preview": "/* $OpenBSD: put.c,v 1.17 2025/08/23 21:02:10 millert Exp $ */\n\n/* SPDX-License-Identifier: BSD-3-Clause */\n"
},
{
"path": "common/recover.c",
"chars": 29728,
"preview": "/* $OpenBSD: recover.c,v 1.32 2022/02/20 19:45:51 tb Exp $ */\n\n/* SPDX-License-Identifier: BSD-3-Clause */\n\n/*\n "
},
{
"path": "common/screen.c",
"chars": 6509,
"preview": "/* $OpenBSD: screen.c,v 1.14 2017/04/18 01:45:35 deraadt Exp $ */\n\n/* SPDX-License-Identifier: BSD-3-Clause */\n"
},
{
"path": "common/screen.h",
"chars": 9979,
"preview": "/* $OpenBSD: screen.h,v 1.10 2016/05/27 09:18:11 martijn Exp $ */\n\n/* SPDX-License-Identifier: BSD-3-Clause */\n"
},
{
"path": "common/search.c",
"chars": 16535,
"preview": "/* $OpenBSD: search.c,v 1.14 2022/12/10 16:06:18 millert Exp $ */\n\n/* SPDX-License-Identifier: BSD-3-Clause */\n\n"
},
{
"path": "common/seq.c",
"chars": 11011,
"preview": "/* $OpenBSD: seq.c,v 1.14 2017/04/18 01:45:35 deraadt Exp $ */\n\n/* SPDX-License-Identifier: BSD-3-Clause */\n"
},
{
"path": "common/seq.h",
"chars": 2127,
"preview": "/* $OpenBSD: seq.h,v 1.5 2016/05/27 09:18:11 martijn Exp $ */\n\n/* SPDX-License-Identifier: BSD-3-Clause */\n\n/*\n * C"
},
{
"path": "common/util.c",
"chars": 4254,
"preview": "/* $OpenBSD: util.c,v 1.17 2018/07/11 06:39:23 martijn Exp $ */\n\n/* SPDX-License-Identifier: BSD-3-Clause */\n"
},
{
"path": "db/btree/bt_close.c",
"chars": 5045,
"preview": "/* $OpenBSD: bt_close.c,v 1.11 2021/10/24 10:05:22 jsg Exp $ */\n\n/* SPDX-License-Identifier: BSD-3-Clause */\n"
},
{
"path": "db/btree/bt_conv.c",
"chars": 7687,
"preview": "/* $OpenBSD: bt_conv.c,v 1.10 2015/01/16 16:48:51 deraadt Exp $ */\n\n/* SPDX-License-Identifier: BSD-3-Clause */\n"
},
{
"path": "db/btree/bt_debug.c",
"chars": 11194,
"preview": "/* $OpenBSD: bt_debug.c,v 1.10 2015/01/16 16:48:51 deraadt Exp $ */\n\n/* SPDX-License-Identifier: BSD-3-Clause */\n"
},
{
"path": "db/btree/bt_delete.c",
"chars": 22526,
"preview": "/* $OpenBSD: bt_delete.c,v 1.11 2005/08/05 13:02:59 espie Exp $ */\n\n/* SPDX-License-Identifier: BSD-3-Clause */\n"
},
{
"path": "db/btree/bt_get.c",
"chars": 3439,
"preview": "/* $OpenBSD: bt_get.c,v 1.8 2005/08/05 13:02:59 espie Exp $ */\n\n/* SPDX-License-Identifier: BSD-3-Clause */\n"
},
{
"path": "db/btree/bt_open.c",
"chars": 15127,
"preview": "/* $OpenBSD: bt_open.c,v 1.19 2015/12/28 22:08:18 mmcc Exp $ */\n\n/* SPDX-License-Identifier: BSD-3-Clause */\n"
},
{
"path": "db/btree/bt_overflow.c",
"chars": 6937,
"preview": "/* $OpenBSD: bt_overflow.c,v 1.11 2015/01/16 16:48:51 deraadt Exp $ */\n\n/* SPDX-License-Identifier: BSD-3-Cl"
},
{
"path": "db/btree/bt_page.c",
"chars": 3097,
"preview": "/* $OpenBSD: bt_page.c,v 1.9 2005/08/05 13:02:59 espie Exp $ */\n\n/* SPDX-License-Identifier: BSD-3-Clause */\n"
},
{
"path": "db/btree/bt_put.c",
"chars": 11197,
"preview": "/* $OpenBSD: bt_put.c,v 1.13 2005/08/05 13:02:59 espie Exp $ */\n\n/* SPDX-License-Identifier: BSD-3-Clause */\n"
},
{
"path": "db/btree/bt_search.c",
"chars": 7199,
"preview": "/* $OpenBSD: bt_search.c,v 1.10 2005/08/05 13:02:59 espie Exp $ */\n\n/* SPDX-License-Identifier: BSD-3-Clause */\n"
},
{
"path": "db/btree/bt_seq.c",
"chars": 15563,
"preview": "/* $OpenBSD: bt_seq.c,v 1.12 2022/12/27 17:10:06 jmc Exp $ */\n\n/* SPDX-License-Identifier: BSD-3-Clause */\n\n/"
},
{
"path": "db/btree/bt_split.c",
"chars": 29557,
"preview": "/* $OpenBSD: bt_split.c,v 1.13 2005/08/05 13:03:00 espie Exp $ */\n\n/* SPDX-License-Identifier: BSD-3-Clause */\n"
},
{
"path": "db/btree/bt_utils.c",
"chars": 8115,
"preview": "/* $OpenBSD: bt_utils.c,v 1.13 2022/12/27 17:10:10 jmc Exp $ */\n\n/* SPDX-License-Identifier: BSD-3-Clause */\n"
},
{
"path": "db/btree/btree.h",
"chars": 18253,
"preview": "/* $OpenBSD: btree.h,v 1.7 2015/07/16 04:27:33 tedu Exp $ */\n\n/* SPDX-License-Identifier: BSD-3-Clause */\n\n/*\n * C"
},
{
"path": "db/btree/extern.h",
"chars": 3267,
"preview": "/* $OpenBSD: extern.h,v 1.8 2015/08/27 04:37:09 guenther Exp $ */\n\n/* SPDX-License-Identifier: BSD-3-Clause */\n"
},
{
"path": "db/db/db.c",
"chars": 3934,
"preview": "/* $OpenBSD: db.c,v 1.13 2015/09/05 11:28:35 guenther Exp $ */\n\n/* SPDX-License-Identifier: BSD-3-Clause */\n"
},
{
"path": "db/hash/bsd_ndbm.h",
"chars": 3017,
"preview": "/* $OpenBSD: ndbm.h,v 1.6 2004/05/03 17:27:50 millert Exp $ */\n/* $NetBSD: ndbm.h,v 1.6 1995/07/20 23:"
},
{
"path": "db/hash/extern.h",
"chars": 3193,
"preview": "/* $OpenBSD: extern.h,v 1.9 2016/05/29 20:47:49 guenther Exp $ */\n\n/* SPDX-License-Identifier: BSD-3-Clause */\n"
},
{
"path": "db/hash/hash.c",
"chars": 32909,
"preview": "/* $OpenBSD: hash.c,v 1.29 2016/09/21 04:38:56 guenther Exp $ */\n\n/* SPDX-License-Identifier: BSD-3-Clause */\n"
},
{
"path": "db/hash/hash.h",
"chars": 12905,
"preview": "/* $OpenBSD: hash.h,v 1.9 2004/06/21 23:13:22 marc Exp $ */\n\n/* SPDX-License-Identifier: BSD-3-Clause */\n\n/*\n * C"
},
{
"path": "db/hash/hash_bigkey.c",
"chars": 22673,
"preview": "/* $OpenBSD: hash_bigkey.c,v 1.19 2015/12/28 22:08:18 mmcc Exp $ */\n\n/* SPDX-License-Identifier: BSD-3-Clause */\n"
},
{
"path": "db/hash/hash_buf.c",
"chars": 12913,
"preview": "/* $OpenBSD: hash_buf.c,v 1.19 2015/01/16 16:48:51 deraadt Exp $ */\n\n/* SPDX-License-Identifier: BSD-3-Clause */\n"
},
{
"path": "db/hash/hash_func.c",
"chars": 3447,
"preview": "/* $OpenBSD: hash_func.c,v 1.11 2016/05/29 20:47:49 guenther Exp $ */\n\n/* SPDX-License-Identifier: BSD-3-Clause */\n"
},
{
"path": "db/hash/hash_log2.c",
"chars": 2197,
"preview": "/* $OpenBSD: hash_log2.c,v 1.8 2005/08/05 13:03:00 espie Exp $ */\n\n/* SPDX-License-Identifier: BSD-3-Clause */\n"
},
{
"path": "db/hash/hash_page.c",
"chars": 33210,
"preview": "/* $OpenBSD: hash_page.c,v 1.23 2016/12/18 17:07:58 krw Exp $ */\n\n/* SPDX-License-Identifier: BSD-3-Clause */\n"
},
{
"path": "db/hash/ndbm.c",
"chars": 6274,
"preview": "/* $OpenBSD: ndbm.c,v 1.28 2023/02/17 17:59:36 miod Exp $ */\n\n/* SPDX-License-Identifier: BSD-3-Clause */\n\n/*\n * "
},
{
"path": "db/hash/page.h",
"chars": 3749,
"preview": "/* $OpenBSD: page.h,v 1.6 2003/06/02 20:18:34 millert Exp $ */\n\n/* SPDX-License-Identifier: BSD-3-Clause */\n"
},
{
"path": "db/mpool/mpool.c",
"chars": 14629,
"preview": "/* $OpenBSD: mpool.c,v 1.21 2015/11/01 03:45:28 guenther Exp $ */\n\n/* SPDX-License-Identifier: BSD-3-Clause */\n"
},
{
"path": "db/recno/extern.h",
"chars": 2732,
"preview": "/* $OpenBSD: extern.h,v 1.7 2015/08/27 04:37:09 guenther Exp $ */\n\n/* SPDX-License-Identifier: BSD-3-Clause */\n"
},
{
"path": "db/recno/rec_close.c",
"chars": 5786,
"preview": "/* $OpenBSD: rec_close.c,v 1.13 2016/09/21 04:38:56 guenther Exp $ */\n\n/* SPDX-License-Identifier: BSD-3-Clause */\n"
},
{
"path": "db/recno/rec_delete.c",
"chars": 6236,
"preview": "/* $OpenBSD: rec_delete.c,v 1.10 2005/08/05 13:03:00 espie Exp $ */\n\n/* SPDX-License-Identifier: BSD-3-Clause */\n"
},
{
"path": "db/recno/rec_get.c",
"chars": 9471,
"preview": "/* $OpenBSD: rec_get.c,v 1.11 2007/08/08 07:16:50 ray Exp $ */\n\n/* SPDX-License-Identifier: BSD-3-Clause */\n"
},
{
"path": "db/recno/rec_open.c",
"chars": 7482,
"preview": "/* $OpenBSD: rec_open.c,v 1.14 2020/12/01 16:19:38 millert Exp $ */\n\n/* SPDX-License-Identifier: BSD-3-Clause */\n"
},
{
"path": "db/recno/rec_put.c",
"chars": 9520,
"preview": "/* $OpenBSD: rec_put.c,v 1.11 2007/08/08 07:16:50 ray Exp $ */\n\n/* SPDX-License-Identifier: BSD-3-Clause */\n"
},
{
"path": "db/recno/rec_search.c",
"chars": 4595,
"preview": "/* $OpenBSD: rec_search.c,v 1.11 2005/08/05 13:03:00 espie Exp $ */\n\n/* SPDX-License-Identifier: BSD-3-Clause */\n"
},
{
"path": "db/recno/rec_seq.c",
"chars": 4524,
"preview": "/* $OpenBSD: rec_seq.c,v 1.8 2005/08/05 13:03:00 espie Exp $ */\n\n/* SPDX-License-Identifier: BSD-3-Clause */\n"
},
{
"path": "db/recno/rec_utils.c",
"chars": 4219,
"preview": "/* $OpenBSD: rec_utils.c,v 1.10 2022/12/17 17:10:06 jmc Exp $ */\n\n/* SPDX-License-Identifier: BSD-3-Clause */\n\n/*\n "
},
{
"path": "db/recno/recno.h",
"chars": 1977,
"preview": "/* $OpenBSD: recno.h,v 1.5 2003/06/02 20:18:34 millert Exp $ */\n\n/* SPDX-License-Identifier: BSD-3-Clause */\n"
},
{
"path": "docs/USD.doc/edit/edit.vindex",
"chars": 3240,
"preview": ".\\\" $OpenBSD: edit.vindex,v 1.3 2003/06/03 02:56:21 millert Exp $\n.\\\"\n.\\\" SPDX-License-Identifier: BSD-3-Clause\n."
},
{
"path": "docs/USD.doc/edit/edittut.ms",
"chars": 65397,
"preview": ".\\\" $OpenBSD: edittut.ms,v 1.8 2022/12/26 19:16:03 jmc Exp $\n.\\\"\n.\\\" SPDX-License-Identifier: BSD-3-Clause\n.\\\"\n.\\"
},
{
"path": "docs/USD.doc/exref/ex.rm",
"chars": 60177,
"preview": ".\\\" $OpenBSD: ex.rm,v 1.9 2022/12/26 19:16:03 jmc Exp $\n.\\\"\n.\\\" SPDX-License-Identifier: BSD-3-Clause\n.\\\"\n.\\\" Cop"
},
{
"path": "docs/USD.doc/exref/ex.summary",
"chars": 16141,
"preview": ".\\\" $OpenBSD: ex.summary,v 1.6 2004/01/30 23:14:26 jmc Exp $\n.\\\"\n.\\\" SPDX-License-Identifier: BSD-3-Clause\n.\\\"\n.\\"
},
{
"path": "docs/USD.doc/re_format/vi_regex.7",
"chars": 18779,
"preview": ".\\\" $OpenBSD: re_format.7,v 1.23 2021/07/07 11:21:55 martijn Exp $\n.\\\"\n.\\\" SPDX-License-Identifier: BSD-3-Clause"
},
{
"path": "docs/USD.doc/vi.man/vi.1",
"chars": 53821,
"preview": ".\\\" $OpenBSD: vi.1,v 1.83 2023/01/29 09:28:57 otto Exp $\n.\\\"\n.\\\" SPDX-License-Identifier: BSD-3-Clause\n.\\\"\n.\\\" Co"
},
{
"path": "docs/USD.doc/vitut/vi.apwh.ms",
"chars": 40944,
"preview": ".\\\" $OpenBSD: vi.apwh.ms,v 1.5 2004/01/24 12:29:13 jmc Exp $\n.\\\"\n.\\\" SPDX-License-Identifier: BSD-3-Clause\n.\\\"\n.\\"
},
{
"path": "docs/USD.doc/vitut/vi.chars",
"chars": 27107,
"preview": ".\\\" $OpenBSD: vi.chars,v 1.6 2004/11/29 06:20:03 jsg Exp $\n.\\\"\n.\\\" SPDX-License-Identifier: BSD-3-Clause\n.\\\"\n.\\\" "
},
{
"path": "docs/USD.doc/vitut/vi.in",
"chars": 79556,
"preview": ".\\\" $OpenBSD: vi.in,v 1.9 2022/12/26 19:16:03 jmc Exp $\n.\\\"\n.\\\" SPDX-License-Identifier: BSD-3-Clause\n.\\\"\n.\\\" Cop"
},
{
"path": "docs/USD.doc/vitut/vi.summary",
"chars": 11653,
"preview": ".\\\" $OpenBSD: vi.summary,v 1.6 2004/01/24 12:29:13 jmc Exp $\n.\\\"\n.\\\" SPDX-License-Identifier: BSD-3-Clause\n.\\\"\n.\\"
},
{
"path": "docs/ev",
"chars": 2044,
"preview": "Ev: Vi: Result:\n<CK> <CK> (Cursor keys). Move around the file.\n\nMeta key commands:\n^A<#> <#>G Goto l"
},
{
"path": "docs/ev.license",
"chars": 300,
"preview": "SPDX-License-Identifier: BSD-3-Clause\nCopyright (c) 1980, 1986, 1987, 1988, 1989, 1990, 1991, 1992, 1993, 1994\n T"
},
{
"path": "docs/help",
"chars": 8906,
"preview": "MOVING THE CURSOR:\n k - cursor up ^F - page forward /<pattern><CR> - search forward\n j - cursor down ^B -"
},
{
"path": "docs/help.license",
"chars": 300,
"preview": "SPDX-License-Identifier: BSD-3-Clause\nCopyright (c) 1980, 1986, 1987, 1988, 1989, 1990, 1991, 1992, 1993, 1994\n T"
},
{
"path": "docs/internals/autowrite",
"chars": 4134,
"preview": "Vi autowrite behavior, the fields with *'s are \"don't cares\".\n\n=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-="
},
{
"path": "docs/internals/autowrite.license",
"chars": 405,
"preview": "# $OpenBSD: autowrite,v 1.3 2001/01/29 01:58:37 niklas Exp $\n# SPDX-License-Identifier: BSD-3-Clause\n# @(#)autowrite 8"
},
{
"path": "docs/internals/context",
"chars": 859,
"preview": "In historic vi, the previous context mark was always set:\n\nex address:\n any number, <question-mark>, <slash>, <dollar"
},
{
"path": "docs/internals/context.license",
"chars": 404,
"preview": "# $OpenBSD: context,v 1.3 2001/01/29 01:58:37 niklas Exp $\n# SPDX-License-Identifier: BSD-3-Clause\n# @(#)context 8.6"
},
{
"path": "docs/internals/gdb.script",
"chars": 2761,
"preview": "# $OpenBSD: gdb.script,v 1.3 2001/01/29 01:58:38 niklas Exp $\n# SPDX-License-Identifier: BSD-3-Clause\n# Copyright (c) 19"
},
{
"path": "docs/internals/input",
"chars": 9401,
"preview": "MAPS, EXECUTABLE BUFFERS AND INPUT IN EX/VI:\n\nThe basic rule is that input in ex/vi is a stack. Every time a key which\n"
},
{
"path": "docs/internals/input.license",
"chars": 400,
"preview": "# $OpenBSD: input,v 1.2 2001/01/29 01:58:38 niklas Exp $\n# SPDX-License-Identifier: BSD-3-Clause\n# @(#)input 5.5 ("
},
{
"path": "docs/internals/openmode",
"chars": 1181,
"preview": "# SPDX-License-Identifier: BSD-3-Clause\n# @(#)openmode 8.1 (Berkeley) 10/29/94\n\nOpen mode has the following special b"
},
{
"path": "docs/internals/openmode.license",
"chars": 345,
"preview": "# SPDX-License-Identifier: BSD-3-Clause\n# @(#)openmode 8.1 (Berkeley) 10/29/94\n\nCopyright (c) 1980, 1986, 1987, 1988,"
},
{
"path": "docs/internals/quoting",
"chars": 7896,
"preview": "QUOTING IN EX/VI:\n\nThere are four escape characters in historic ex/vi:\n\n \\ (backslashes)\n ^V\n ^Q (a"
},
{
"path": "docs/internals/quoting.license",
"chars": 404,
"preview": "# $OpenBSD: quoting,v 1.3 2001/01/29 01:58:39 niklas Exp $\n# SPDX-License-Identifier: BSD-3-Clause\n# @(#)quoting 5.5"
},
{
"path": "docs/internals/structures",
"chars": 2974,
"preview": "There are three major data structures in this package, plus a single data\nstructure per screen type. The first is a sin"
},
{
"path": "docs/internals/structures.license",
"chars": 406,
"preview": "# $OpenBSD: structures,v 1.3 2001/01/29 01:58:39 niklas Exp $\n# SPDX-License-Identifier: BSD-3-Clause\n# @(#)structures "
},
{
"path": "docs/tutorial/vi.advanced",
"chars": 70971,
"preview": "Section 26: Index to the rest of the tutorial\n\nThe remainder of the tutorial can be perused at your leisure. Simply fin"
},
{
"path": "docs/tutorial/vi.advanced.license",
"chars": 300,
"preview": "SPDX-License-Identifier: BSD-3-Clause\nCopyright (c) 1980, 1986, 1987, 1988, 1989, 1990, 1991, 1992, 1993, 1994\n T"
},
{
"path": "docs/tutorial/vi.beginner",
"chars": 36321,
"preview": "Section 1: {^F} {ZZ}\n\nTo get out of this tutorial, type: ZZ (two capital Z's).\n\nLearning a new computer system implies l"
},
{
"path": "docs/tutorial/vi.beginner.license",
"chars": 300,
"preview": "SPDX-License-Identifier: BSD-3-Clause\nCopyright (c) 1980, 1986, 1987, 1988, 1989, 1990, 1991, 1992, 1993, 1994\n T"
},
{
"path": "docs/tutorial/vi.tut.csh",
"chars": 870,
"preview": "#!/usr/bin/env csh\n# $OpenBSD: vi.tut.csh,v 1.2 2001/01/29 01:58:40 niklas Exp $\n# SPDX-License-Identifier: BSD-3-Clause"
},
{
"path": "ex/ex.awk",
"chars": 538,
"preview": "# SPDX-License-Identifier: BSD-3-Clause\n# Copyright (c) 1980, 1986, 1987, 1988, 1989, 1990, 1991, 1992, 1993, 1994\n# "
},
{
"path": "ex/ex.c",
"chars": 97038,
"preview": "/* $OpenBSD: ex.c,v 1.23 2023/06/23 15:06:45 millert Exp $ */\n\n/* SPDX-License-Identifier: BSD-3-Clause */\n\n/*\n * "
},
{
"path": "ex/ex.h",
"chars": 11937,
"preview": "/* $OpenBSD: ex.h,v 1.11 2016/05/27 09:18:12 martijn Exp $ */\n\n/* SPDX-License-Identifier: BSD-3-Clause */\n\n/*\n * C"
},
{
"path": "ex/ex_abbrev.c",
"chars": 3480,
"preview": "/* $OpenBSD: ex_abbrev.c,v 1.9 2016/05/27 09:18:12 martijn Exp $ */\n\n/* SPDX-License-Identifier: BSD-3-Clause */\n"
},
{
"path": "ex/ex_append.c",
"chars": 9444,
"preview": "/* $OpenBSD: ex_append.c,v 1.14 2016/05/27 09:18:12 martijn Exp $ */\n\n/* SPDX-License-Identifier: BSD-3-Clause */\n"
},
{
"path": "ex/ex_args.c",
"chars": 9254,
"preview": "/* $OpenBSD: ex_args.c,v 1.12 2016/01/06 22:28:52 millert Exp $ */\n\n/* SPDX-License-Identifier: BSD-3-Clause */\n"
},
{
"path": "ex/ex_argv.c",
"chars": 23039,
"preview": "/* $OpenBSD: ex_argv.c,v 1.20 2016/05/27 09:18:12 martijn Exp $ */\n\n/* SPDX-License-Identifier: BSD-3-Clause */\n"
},
{
"path": "ex/ex_at.c",
"chars": 4033,
"preview": "/* $OpenBSD: ex_at.c,v 1.14 2016/05/27 09:18:12 martijn Exp $ */\n\n/* SPDX-License-Identifier: BSD-3-Clause */\n"
},
{
"path": "ex/ex_bang.c",
"chars": 7128,
"preview": "/* $OpenBSD: ex_bang.c,v 1.13 2025/07/30 22:19:13 millert Exp $ */\n\n/* SPDX-License-Identifier: BSD-3-Clause */\n"
},
{
"path": "ex/ex_cd.c",
"chars": 4315,
"preview": "/* $OpenBSD: ex_cd.c,v 1.15 2016/05/27 09:18:12 martijn Exp $ */\n\n/* SPDX-License-Identifier: BSD-3-Clause */\n"
},
{
"path": "ex/ex_cmd.c",
"chars": 14791,
"preview": "/* $OpenBSD: ex_cmd.c,v 1.12 2018/07/13 20:06:10 bentley Exp $ */\n\n/* SPDX-License-Identifier: BSD-3-Clause */\n"
},
{
"path": "ex/ex_delete.c",
"chars": 1657,
"preview": "/* $OpenBSD: ex_delete.c,v 1.7 2014/11/12 04:28:41 bentley Exp $ */\n\n/* SPDX-License-Identifier: BSD-3-Clause */\n"
},
{
"path": "ex/ex_display.c",
"chars": 3552,
"preview": "/* $OpenBSD: ex_display.c,v 1.13 2016/05/27 09:18:12 martijn Exp $ */\n\n/* SPDX-License-Identifier: BSD-3-Clause */\n"
},
{
"path": "ex/ex_edit.c",
"chars": 4214,
"preview": "/* $OpenBSD: ex_edit.c,v 1.6 2014/11/12 04:28:41 bentley Exp $ */\n\n/* SPDX-License-Identifier: BSD-3-Clause */\n"
},
{
"path": "ex/ex_equal.c",
"chars": 1509,
"preview": "/* $OpenBSD: ex_equal.c,v 1.6 2014/11/12 04:28:41 bentley Exp $ */\n\n/* SPDX-License-Identifier: BSD-3-Clause */\n"
},
{
"path": "ex/ex_file.c",
"chars": 2084,
"preview": "/* $OpenBSD: ex_file.c,v 1.9 2016/05/27 09:18:12 martijn Exp $ */\n\n/* SPDX-License-Identifier: BSD-3-Clause */\n"
},
{
"path": "ex/ex_filter.c",
"chars": 13292,
"preview": "/* $OpenBSD: ex_filter.c,v 1.15 2016/08/01 18:27:35 bentley Exp $ */\n\n/* SPDX-License-Identifier: BSD-3-Clause */\n"
},
{
"path": "ex/ex_global.c",
"chars": 10843,
"preview": "/* $OpenBSD: ex_global.c,v 1.17 2016/05/27 09:18:12 martijn Exp $ */\n\n/* SPDX-License-Identifier: BSD-3-Clause */\n"
},
{
"path": "ex/ex_init.c",
"chars": 14519,
"preview": "/* $OpenBSD: ex_init.c,v 1.19 2021/10/24 21:24:17 deraadt Exp $ */\n\n/* SPDX-License-Identifier: BSD-3-Clause */\n"
},
{
"path": "ex/ex_join.c",
"chars": 6300,
"preview": "/* $OpenBSD: ex_join.c,v 1.8 2016/01/06 22:28:52 millert Exp $ */\n\n/* SPDX-License-Identifier: BSD-3-Clause */\n"
},
{
"path": "ex/ex_map.c",
"chars": 3904,
"preview": "/* $OpenBSD: ex_map.c,v 1.9 2016/05/27 09:18:12 martijn Exp $ */\n\n/* SPDX-License-Identifier: BSD-3-Clause */\n"
},
{
"path": "ex/ex_mark.c",
"chars": 985,
"preview": "/* $OpenBSD: ex_mark.c,v 1.7 2016/01/06 22:28:52 millert Exp $ */\n\n/* SPDX-License-Identifier: BSD-3-Clause */\n"
},
{
"path": "ex/ex_mkexrc.c",
"chars": 2635,
"preview": "/* $OpenBSD: ex_mkexrc.c,v 1.7 2016/01/06 22:28:52 millert Exp $ */\n\n/* SPDX-License-Identifier: BSD-3-Clause */\n"
},
{
"path": "ex/ex_move.c",
"chars": 6227,
"preview": "/* $OpenBSD: ex_move.c,v 1.12 2025/08/23 21:02:10 millert Exp $ */\n\n/* SPDX-License-Identifier: BSD-3-Clause */\n"
},
{
"path": "ex/ex_open.c",
"chars": 1115,
"preview": "/* $OpenBSD: ex_open.c,v 1.7 2016/01/06 22:28:52 millert Exp $ */\n\n/* SPDX-License-Identifier: BSD-3-Clause */\n"
},
{
"path": "ex/ex_preserve.c",
"chars": 2331,
"preview": "/* $OpenBSD: ex_preserve.c,v 1.7 2016/01/06 22:28:52 millert Exp $ */\n\n/* SPDX-License-Identifier: BSD-3-Clause */\n"
},
{
"path": "ex/ex_print.c",
"chars": 8730,
"preview": "/* $OpenBSD: ex_print.c,v 1.13 2016/05/27 09:18:12 martijn Exp $ */\n\n/* SPDX-License-Identifier: BSD-3-Clause */\n"
},
{
"path": "ex/ex_put.c",
"chars": 1112,
"preview": "/* $OpenBSD: ex_put.c,v 1.7 2025/08/23 21:02:10 millert Exp $ */\n\n/* SPDX-License-Identifier: BSD-3-Clause */\n"
},
{
"path": "ex/ex_quit.c",
"chars": 998,
"preview": "/* $OpenBSD: ex_quit.c,v 1.5 2014/11/12 04:28:41 bentley Exp $ */\n\n/* SPDX-License-Identifier: BSD-3-Clause */\n"
},
{
"path": "ex/ex_read.c",
"chars": 12344,
"preview": "/* $OpenBSD: ex_read.c,v 1.14 2017/04/18 01:45:35 deraadt Exp $ */\n\n/* SPDX-License-Identifier: BSD-3-Clause */\n"
},
{
"path": "ex/ex_screen.c",
"chars": 3070,
"preview": "/* $OpenBSD: ex_screen.c,v 1.10 2016/01/06 22:28:52 millert Exp $ */\n\n/* SPDX-License-Identifier: BSD-3-Clause */\n"
},
{
"path": "ex/ex_script.c",
"chars": 23711,
"preview": "/* $OpenBSD: ex_script.c,v 1.27 2017/04/18 01:45:35 deraadt Exp $ */\n\n/* SPDX-License-Identifier: BSD-3-Clause */\n"
},
{
"path": "ex/ex_set.c",
"chars": 990,
"preview": "/* $OpenBSD: ex_set.c,v 1.6 2014/11/12 04:28:41 bentley Exp $ */\n\n/* SPDX-License-Identifier: BSD-3-Clause */\n"
},
{
"path": "ex/ex_shell.c",
"chars": 6384,
"preview": "/* $OpenBSD: ex_shell.c,v 1.15 2015/03/28 12:54:37 bcallah Exp $ */\n\n/* SPDX-License-Identifier: BSD-3-Clause */\n"
},
{
"path": "ex/ex_shift.c",
"chars": 6629,
"preview": "/* $OpenBSD: ex_shift.c,v 1.11 2025/07/30 22:19:13 millert Exp $ */\n\n/* SPDX-License-Identifier: BSD-3-Clause */"
},
{
"path": "ex/ex_source.c",
"chars": 2782,
"preview": "/* $OpenBSD: ex_source.c,v 1.11 2021/10/24 21:24:17 deraadt Exp $ */\n\n/* SPDX-License-Identifier: BSD-3-Clause */\n"
},
{
"path": "ex/ex_stop.c",
"chars": 1166,
"preview": "/* $OpenBSD: ex_stop.c,v 1.6 2014/11/12 04:28:41 bentley Exp $ */\n\n/* SPDX-License-Identifier: BSD-3-Clause */\n"
},
{
"path": "ex/ex_subst.c",
"chars": 52850,
"preview": "/* $OpenBSD: ex_subst.c,v 1.31 2023/06/23 15:06:45 millert Exp $ */\n\n/* SPDX-License-Identifier: BSD-3-Clause */\n"
},
{
"path": "ex/ex_tag.c",
"chars": 38418,
"preview": "/* $OpenBSD: ex_tag.c,v 1.26 2021/10/24 21:24:17 deraadt Exp $ */\n\n/* SPDX-License-Identifier: BSD-3-Clause */\n"
},
{
"path": "ex/ex_txt.c",
"chars": 17159,
"preview": "/* $OpenBSD: ex_txt.c,v 1.17 2020/04/30 10:40:21 millert Exp $ */\n\n/* SPDX-License-Identifier: BSD-3-Clause */\n"
},
{
"path": "ex/ex_undo.c",
"chars": 1867,
"preview": "/* $OpenBSD: ex_undo.c,v 1.6 2014/11/12 04:28:41 bentley Exp $ */\n\n/* SPDX-License-Identifier: BSD-3-Clause */\n"
},
{
"path": "ex/ex_usage.c",
"chars": 5504,
"preview": "/* $OpenBSD: ex_usage.c,v 1.10 2018/07/13 09:02:07 krw Exp $ */\n\n/* SPDX-License-Identifier: BSD-3-Clause */\n"
},
{
"path": "ex/ex_util.c",
"chars": 5798,
"preview": "/* $OpenBSD: ex_util.c,v 1.9 2016/01/06 22:28:52 millert Exp $ */\n\n/* SPDX-License-Identifier: BSD-3-Clause */\n"
},
{
"path": "ex/ex_version.c",
"chars": 815,
"preview": "/* $OpenBSD: ex_version.c,v 1.10 2014/11/12 04:28:41 bentley Exp $ */\n\n/* SPDX-License-Identifier: BSD-3-Clause */\n"
},
{
"path": "ex/ex_visual.c",
"chars": 5073,
"preview": "/* $OpenBSD: ex_visual.c,v 1.10 2016/01/06 22:28:52 millert Exp $ */\n\n/* SPDX-License-Identifier: BSD-3-Clause */\n"
},
{
"path": "ex/ex_write.c",
"chars": 11002,
"preview": "/* $OpenBSD: ex_write.c,v 1.13 2016/01/06 22:28:52 millert Exp $ */\n\n/* SPDX-License-Identifier: BSD-3-Clause */\n"
},
{
"path": "ex/ex_yank.c",
"chars": 1086,
"preview": "/* $OpenBSD: ex_yank.c,v 1.6 2014/11/12 04:28:41 bentley Exp $ */\n\n/* SPDX-License-Identifier: BSD-3-Clause */\n"
},
{
"path": "ex/ex_z.c",
"chars": 5083,
"preview": "/* $OpenBSD: ex_z.c,v 1.8 2015/03/29 01:04:23 bcallah Exp $ */\n\n/* SPDX-License-Identifier: BSD-3-Clause */\n"
},
{
"path": "ex/script.h",
"chars": 1038,
"preview": "/* $OpenBSD: script.h,v 1.4 2014/11/12 16:29:04 millert Exp $ */\n\n/* SPDX-License-Identifier: BSD-3-Clause */\n"
},
{
"path": "ex/tag.h",
"chars": 2924,
"preview": "/* $OpenBSD: tag.h,v 1.7 2015/11/19 07:53:31 bentley Exp $ */\n\n/* SPDX-License-Identifier: BSD-3-Clause */\n\n/*\n * C"
},
{
"path": "ex/version.h",
"chars": 1775,
"preview": "/* SPDX-License-Identifier: BSD-3-Clause */\n\n/*\n * Copyright (c) 2022-2024 Jeffrey H. Johnson\n *\n * All rights reserved."
},
{
"path": "include/bitstring.h",
"chars": 5264,
"preview": "/* $OpenBSD: bitstring.h,v 1.6 2020/05/10 00:56:06 guenther Exp $ */\n/* $NetBSD: bitstring.h,v 1.5 1997/05/1"
},
{
"path": "include/bsd_db.h",
"chars": 7756,
"preview": "/* $OpenBSD: db.h,v 1.12 2015/10/17 21:48:42 guenther Exp $ */\n/* $NetBSD: db.h,v 1.13 1994/10/26 00:5"
},
{
"path": "include/bsd_err.h",
"chars": 2480,
"preview": "/* $OpenBSD: err.h,v 1.13 2015/08/31 02:53:56 guenther Exp $ */\n/* $NetBSD: err.h,v 1.11 1994/10/26 00:"
},
{
"path": "include/bsd_fcntl.h",
"chars": 1995,
"preview": "/* SPDX-License-Identifier: BSD-3-Clause */\n\n/*\n * Copyright (c) 2022-2024 Jeffrey H. Johnson\n *\n * All rights reserved."
},
{
"path": "include/bsd_regex.h",
"chars": 4267,
"preview": "/* $OpenBSD: regex.h,v 1.7 2012/12/05 23:19:57 deraadt Exp $ */\n/* $NetBSD: regex.h,v 1.4.6.1 1996/06/1"
},
{
"path": "include/bsd_stdlib.h",
"chars": 2418,
"preview": "/* $OpenBSD: stdlib.h,v 1.67 2016/09/20 21:10:22 fcambus Exp $ */\n/* $NetBSD: stdlib.h,v 1.25 1995/12/27 "
},
{
"path": "include/bsd_string.h",
"chars": 2206,
"preview": "/* $OpenBSD: string.h,v 1.31 2016/09/09 18:12:37 millert Exp $ */\n/* $NetBSD: string.h,v 1.6 1994/10/26 "
},
{
"path": "include/bsd_termios.h",
"chars": 2075,
"preview": "/* SPDX-License-Identifier: BSD-3-Clause */\n\n/*\n * Copyright (c) 1988, 1989, 1993, 1994\n * The Regents of the Unive"
},
{
"path": "include/bsd_unistd.h",
"chars": 2716,
"preview": "/* $OpenBSD: unistd.h,v 1.103 2016/09/12 19:36:26 guenther Exp $ */\n/* $NetBSD: unistd.h,v 1.26.4.1 1996/0"
},
{
"path": "include/com_extern.h",
"chars": 6034,
"preview": "/* SPDX-License-Identifier: BSD-3-Clause */\n\n/*\n * Copyright (c) 2022-2024 Jeffrey H. Johnson\n *\n * All rights reserved."
},
{
"path": "include/compat.h",
"chars": 8157,
"preview": "/* SPDX-License-Identifier: BSD-3-Clause */\n\n/*\n * Copyright (c) 2022-2024 Jeffrey H. Johnson\n *\n * All rights reserved."
},
{
"path": "include/compat_bsd_db.h",
"chars": 3961,
"preview": "/* $OpenBSD: db.h,v 1.4 2016/05/29 20:47:49 guenther Exp $ */\n\n/* SPDX-License-Identifier: ISC */\n\n/*\n * Copyright "
},
{
"path": "include/ex_extern.h",
"chars": 5814,
"preview": "/* SPDX-License-Identifier: BSD-3-Clause */\n\n/*\n * Copyright (c) 2022-2024 Jeffrey H. Johnson\n *\n * All rights reserved."
},
{
"path": "include/libgen.h",
"chars": 1955,
"preview": "/* SPDX-License-Identifier: BSD-3-Clause */\n\n/*\n * Copyright (c) 2022-2024 Jeffrey H. Johnson\n *\n * All rights reserved."
},
{
"path": "include/mpool.h",
"chars": 5545,
"preview": "/* $OpenBSD: mpool.h,v 1.1 2015/09/09 15:35:24 guenther Exp $ */\n/* $NetBSD: mpool.h,v 1.7 1996/05/03 21"
},
{
"path": "include/pathnames.h",
"chars": 2558,
"preview": "/* SPDX-License-Identifier: BSD-3-Clause */\n\n/*\n * Copyright (c) 2022-2024 Jeffrey H. Johnson\n *\n * All rights reserved."
},
{
"path": "include/poll.h",
"chars": 1815,
"preview": "/* SPDX-License-Identifier: BSD-3-Clause */\n\n/*\n * Copyright (c) 2022-2024 Jeffrey H. Johnson\n *\n * All rights reserved."
},
{
"path": "include/sys/proc.h",
"chars": 7032,
"preview": "/* $OpenBSD: proc.h,v 1.235 2017/02/14 10:31:15 mpi Exp $ */\n/* $NetBSD: proc.h,v 1.44 1996/04/22 01:23:21 ch"
},
{
"path": "include/sys/queue.h",
"chars": 18625,
"preview": "/* $OpenBSD: queue.h,v 1.43 2015/12/28 19:38:40 millert Exp $ */\n/* $NetBSD: queue.h,v 1.11 1996/05/16 0"
},
{
"path": "include/sys/stat.h",
"chars": 2454,
"preview": "/* SPDX-License-Identifier: BSD-3-Clause */\n\n/*\n * Copyright (c) 2022-2024 Jeffrey H. Johnson\n *\n * All rights reserved."
},
{
"path": "include/sys/time.h",
"chars": 4384,
"preview": "/* SPDX-License-Identifier: BSD-3-Clause */\n\n/*\n * Copyright (c) 2022-2024 Jeffrey H. Johnson\n *\n * All rights reserved."
},
{
"path": "include/sys/tree.h",
"chars": 49062,
"preview": "/* $OpenBSD: tree.h,v 1.14 2015/05/25 03:07:49 deraadt Exp $ */\n\n/* SPDX-License-Identifier: BSD-2-Clause */\n"
},
{
"path": "include/sys/types.h",
"chars": 2007,
"preview": "/* SPDX-License-Identifier: BSD-3-Clause */\n\n/*\n * Copyright (c) 2022-2024 Jeffrey H. Johnson\n *\n * All rights reserved."
},
{
"path": "include/util.h",
"chars": 2553,
"preview": "/* $OpenBSD: util.h,v 1.5 2022/12/26 19:16:03 jmc Exp $ */\n\n/* SPDX-License-Identifier: BSD-3-Clause */\n\n/*\n * Co"
},
{
"path": "include/vi_extern.h",
"chars": 6142,
"preview": "/* SPDX-License-Identifier: BSD-3-Clause */\n\n/*\n * Copyright (c) 2022-2024 Jeffrey H. Johnson\n *\n * All rights reserved."
},
{
"path": "openbsd/basename.c",
"chars": 1956,
"preview": "/* $OpenBSD: basename.c,v 1.17 2020/10/20 19:30:14 naddy Exp $ */\n\n/* SPDX-License-Identifier: ISC */\n\n/*\n * Co"
},
{
"path": "openbsd/dirname.c",
"chars": 2106,
"preview": "/* $OpenBSD: dirname.c,v 1.17 2020/10/20 19:30:14 naddy Exp $ */\n\n/* SPDX-License-Identifier: ISC */\n\n/*\n"
}
]
// ... and 80 more files (download for full content)
About this extraction
This page contains the full source code of the johnsonjh/OpenVi GitHub repository, extracted and formatted as plain text for AI agents and large language models (LLMs). The extraction includes 280 files (2.9 MB), approximately 771.9k tokens, and a symbol index with 1033 extracted functions, classes, methods, constants, and types. Use this with OpenClaw, Claude, ChatGPT, Cursor, Windsurf, or any other AI tool that accepts text input. You can copy the full output to your clipboard or download it as a .txt file.
Extracted by GitExtract — free GitHub repo to text converter for AI. Built by Nikandr Surkov.