diff options
-rw-r--r-- | usr.bin/vi/LAYOUT | 39 | ||||
-rw-r--r-- | usr.bin/vi/README | 50 | ||||
-rw-r--r-- | usr.bin/vi/common/common.h | 7 | ||||
-rw-r--r-- | usr.bin/vi/include/bitstring.h | 141 | ||||
-rw-r--r-- | usr.bin/vi/include/ip_extern.h | 25 | ||||
-rw-r--r-- | usr.bin/vi/include/tcl_extern.h | 3 | ||||
-rw-r--r-- | usr.bin/vi/include/tk_extern.h | 31 |
7 files changed, 25 insertions, 271 deletions
diff --git a/usr.bin/vi/LAYOUT b/usr.bin/vi/LAYOUT index 7f79b036525..df4e3a84e0e 100644 --- a/usr.bin/vi/LAYOUT +++ b/usr.bin/vi/LAYOUT @@ -1,7 +1,10 @@ -# $OpenBSD: LAYOUT,v 1.4 2001/01/29 01:58:24 niklas Exp $ +# $OpenBSD: LAYOUT,v 1.5 2014/11/06 11:35:02 bentley Exp $ # @(#)LAYOUT 8.12 (Berkeley) 10/10/96 +FAQ + Frequently asked questions. + LAYOUT This file: the layout of the nvi sources. @@ -22,27 +25,12 @@ catalog/ cl/ Source files for nvi's curses screen support. -clib/ - Replacement source files for C library functions. - common/ Source files for pieces of code that are shared by ex and vi, e.g., searching and logging code or code translating line numbers into requests to the dbopen(3) database code. It also has the interface code for modifying "records" in the underlying database. -curses/ - A stripped-down replacement curses library. Do not try and use - this library outside of nvi, many standard curses functions have - been removed because nvi doesn't use them. See build/README for - more information. - -db/ - A stripped-down replacement DB library. Do not try and use this - library outside of nvi, many standard DB functions have been - removed because nvi doesn't use them. See db/README for more - information. - docs/ Ex/vi documentation, both current and historic. @@ -101,10 +89,7 @@ ex/ version.h -- Version information. include/ - Replacement include files: - - bitstring.h -- The 4.4BSD bitstring operations. - sys/queue.h -- The 4.4BSD queue operations. + Replacement include files. perl_api/ Source code supporting the Perl scripting language for nvi. @@ -112,19 +97,5 @@ perl_api/ perl_scripts/ Scripts for Perl included with nvi. -regex/ - Henry Spencer's POSIX 1003.2 regular expression (RE) library. - -tcl_api/ - Source code supporting the Tcl scripting language for nvi. - -tcl_scripts/ - Scripts for Tcl included with nvi. - -tk/ - Source files for nvi's Tk screen support. - - init.tcl -- Vi startup tcl script. - vi/ The vi source code. diff --git a/usr.bin/vi/README b/usr.bin/vi/README index 032a10f6dee..3a43358017c 100644 --- a/usr.bin/vi/README +++ b/usr.bin/vi/README @@ -1,4 +1,4 @@ -# $OpenBSD: README,v 1.10 2001/01/29 01:58:25 niklas Exp $ +# $OpenBSD: README,v 1.11 2014/11/06 11:35:02 bentley Exp $ # @(#)README 8.149 (Berkeley) 7/14/97 @@ -8,36 +8,24 @@ Software Distribution (4BSD), by the University of California, Berkeley. The directory layout is as follows: - FAQ ........... Frequently asked questions. - LICENSE ....... Copyright, use and redistribution information. - README ........ This file. - catalog ....... Message catalogs; see catalog/README. - changelog ..... Log of changes from version to version. - cl ............ Vi interface to the curses(3) library. - clib .......... C library replacement source code. - common ........ Code shared by ex and vi. - curses ........ A stripped-down, replacement curses(3) library. - db ............ A stripped-down, replacement db(3) library. - dist .......... Various files used to build the vi distribution. - docs .......... Ex/vi documentation, both current and historic. - docs/README ... Documentation overview. - docs/edit ..... Edit: A tutorial. - docs/exref .... Ex Reference Manual -- Version 3.7. - docs/vi.man ... UNIX manual page for nex/nvi. - docs/vi.ref ... Nex/nvi reference manual. - docs/vitut .... An Introduction to Display Editing with Vi. - ex ............ Ex source code. - include ....... Replacement include files. - ip ............ Library interface to vi: vi side. - ipc ........... Library interface to vi: application side. - motif ......... Vi motif application. - motif_l ....... Motif library interface to vi. - perl_api ...... Perl scripting language support. - perl_scripts .. Perl scripts. - regex ......... POSIX 1003.2 regular expression library. - tcl_api ....... Tcl scripting language support. - tcl_scripts ... Tcl scripts. - vi ............ Vi source code. + FAQ ................... Frequently asked questions. + LAYOUT ................ The layout of the nvi sources. + LICENSE ............... Copyright, use and redistribution information. + README ................ This file. + catalog ............... Message catalogs; see catalog/README. + cl .................... Vi interface to the curses(3) library. + common ................ Code shared by ex and vi. + docs .................. Ex/vi documentation, both current and historic. + docs/USD.doc/edit ..... Edit: A tutorial. + docs/USD.doc/exref .... Ex Reference Manual -- Version 3.7. + docs/USD.doc/vi.man ... UNIX manual page for nex/nvi. + docs/USD.doc/vi.ref ... Nex/nvi reference manual. + docs/USD.doc/vitut .... An Introduction to Display Editing with Vi. + ex .................... Ex source code. + include ............... Replacement include files. + perl_api .............. Perl scripting language support. + perl_scripts .......... Perl scripts. + vi .................... Vi source code. Bug fixes and updated versions of this software will periodically be made available. For more information see: diff --git a/usr.bin/vi/common/common.h b/usr.bin/vi/common/common.h index 8904b272de0..b1dbf0d1337 100644 --- a/usr.bin/vi/common/common.h +++ b/usr.bin/vi/common/common.h @@ -1,4 +1,4 @@ -/* $OpenBSD: common.h,v 1.5 2009/01/28 13:02:22 sobrado Exp $ */ +/* $OpenBSD: common.h,v 1.6 2014/11/06 11:35:02 bentley Exp $ */ /*- * Copyright (c) 1991, 1993, 1994 @@ -17,11 +17,6 @@ */ #include "port.h" -/* - * Pseudo-local includes. These are files that are unlikely to exist - * on most machines to which we're porting vi, and we want to include - * them in a very specific order, regardless. - */ #include <db.h> #include <regex.h> diff --git a/usr.bin/vi/include/bitstring.h b/usr.bin/vi/include/bitstring.h deleted file mode 100644 index 6adc7726508..00000000000 --- a/usr.bin/vi/include/bitstring.h +++ /dev/null @@ -1,141 +0,0 @@ -/* $OpenBSD: bitstring.h,v 1.4 2006/01/08 21:05:40 miod Exp $ */ - -/* - * Copyright (c) 1989, 1993 - * The Regents of the University of California. All rights reserved. - * - * This code is derived from software contributed to Berkeley by - * Paul Vixie. - * - * 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. - * - * @(#)bitstring.h 8.1 (Berkeley) 7/19/93 - */ - -#ifndef _BITSTRING_H_ -#define _BITSTRING_H_ - -typedef unsigned char bitstr_t; - -/* internal macros */ - /* byte of the bitstring bit is in */ -#define _bit_byte(bit) \ - ((bit) >> 3) - - /* mask for the bit within its byte */ -#define _bit_mask(bit) \ - (1 << ((bit)&0x7)) - -/* external macros */ - /* bytes in a bitstring of nbits bits */ -#define bitstr_size(nbits) \ - ((((nbits) - 1) >> 3) + 1) - - /* allocate a bitstring */ -#define bit_alloc(nbits) \ - (bitstr_t *)calloc(1, \ - (unsigned int)bitstr_size(nbits) * sizeof(bitstr_t)) - - /* allocate a bitstring on the stack */ -#define bit_decl(name, nbits) \ - (name)[bitstr_size(nbits)] - - /* is bit N of bitstring name set? */ -#define bit_test(name, bit) \ - ((name)[_bit_byte(bit)] & _bit_mask(bit)) - - /* set bit N of bitstring name */ -#define bit_set(name, bit) \ - (name)[_bit_byte(bit)] |= _bit_mask(bit) - - /* clear bit N of bitstring name */ -#define bit_clear(name, bit) \ - (name)[_bit_byte(bit)] &= ~_bit_mask(bit) - - /* clear bits start ... stop in bitstring */ -#define bit_nclear(name, start, stop) { \ - register bitstr_t *_name = (name); \ - register int _start = (start), _stop = (stop); \ - register int _startbyte = _bit_byte(_start); \ - register int _stopbyte = _bit_byte(_stop); \ - if (_startbyte == _stopbyte) { \ - _name[_startbyte] &= ((0xff >> (8 - (_start&0x7))) | \ - (0xff << ((_stop&0x7) + 1))); \ - } else { \ - _name[_startbyte] &= 0xff >> (8 - (_start&0x7)); \ - while (++_startbyte < _stopbyte) \ - _name[_startbyte] = 0; \ - _name[_stopbyte] &= 0xff << ((_stop&0x7) + 1); \ - } \ -} - - /* set bits start ... stop in bitstring */ -#define bit_nset(name, start, stop) { \ - register bitstr_t *_name = (name); \ - register int _start = (start), _stop = (stop); \ - register int _startbyte = _bit_byte(_start); \ - register int _stopbyte = _bit_byte(_stop); \ - if (_startbyte == _stopbyte) { \ - _name[_startbyte] |= ((0xff << (_start&0x7)) & \ - (0xff >> (7 - (_stop&0x7)))); \ - } else { \ - _name[_startbyte] |= 0xff << ((_start)&0x7); \ - while (++_startbyte < _stopbyte) \ - _name[_startbyte] = 0xff; \ - _name[_stopbyte] |= 0xff >> (7 - (_stop&0x7)); \ - } \ -} - - /* find first bit clear in name */ -#define bit_ffc(name, nbits, value) { \ - register bitstr_t *_name = (name); \ - register int _byte, _nbits = (nbits); \ - register int _stopbyte = _bit_byte(_nbits), _value = -1; \ - for (_byte = 0; _byte <= _stopbyte; ++_byte) \ - if (_name[_byte] != 0xff) { \ - _value = _byte << 3; \ - for (_stopbyte = _name[_byte]; (_stopbyte&0x1); \ - ++_value, _stopbyte >>= 1); \ - break; \ - } \ - *(value) = _value; \ -} - - /* find first bit set in name */ -#define bit_ffs(name, nbits, value) { \ - register bitstr_t *_name = (name); \ - register int _byte, _nbits = (nbits); \ - register int _stopbyte = _bit_byte(_nbits), _value = -1; \ - for (_byte = 0; _byte <= _stopbyte; ++_byte) \ - if (_name[_byte]) { \ - _value = _byte << 3; \ - for (_stopbyte = _name[_byte]; !(_stopbyte&0x1); \ - ++_value, _stopbyte >>= 1); \ - break; \ - } \ - *(value) = _value; \ -} - -#endif /* !_BITSTRING_H_ */ diff --git a/usr.bin/vi/include/ip_extern.h b/usr.bin/vi/include/ip_extern.h deleted file mode 100644 index fcb5d124ecb..00000000000 --- a/usr.bin/vi/include/ip_extern.h +++ /dev/null @@ -1,25 +0,0 @@ -/* $OpenBSD: ip_extern.h,v 1.3 2002/02/16 21:27:58 millert Exp $ */ - -int ip_addstr(SCR *, const char *, size_t); -int ip_attr(SCR *, scr_attr_t, int); -int ip_baud(SCR *, u_long *); -int ip_bell(SCR *); -void ip_busy(SCR *, const char *, busy_t); -int ip_clrtoeol(SCR *); -int ip_cursor(SCR *, size_t *, size_t *); -int ip_deleteln(SCR *); -int ip_ex_adjust(SCR *, exadj_t); -int ip_insertln(SCR *); -int ip_keyval(SCR *, scr_keyval_t, CHAR_T *, int *); -int ip_move(SCR *, size_t, size_t); -int ip_refresh(SCR *, int); -int ip_rename(SCR *); -int ip_suspend(SCR *, int *); -void ip_usage(void); -int ip_event(SCR *, EVENT *, u_int32_t, int); -int ip_screen(SCR *, u_int32_t); -int ip_quit(GS *); -int ip_term_init(SCR *); -int ip_term_end(GS *); -int ip_fmap(SCR *, seq_t, CHAR_T *, size_t, CHAR_T *, size_t); -int ip_optchange(SCR *, int, char *, u_long *); diff --git a/usr.bin/vi/include/tcl_extern.h b/usr.bin/vi/include/tcl_extern.h deleted file mode 100644 index c7fe2724f64..00000000000 --- a/usr.bin/vi/include/tcl_extern.h +++ /dev/null @@ -1,3 +0,0 @@ -/* $OpenBSD: tcl_extern.h,v 1.3 2002/02/16 21:27:58 millert Exp $ */ - -int tcl_init(GS *); diff --git a/usr.bin/vi/include/tk_extern.h b/usr.bin/vi/include/tk_extern.h deleted file mode 100644 index 6a697df4eb2..00000000000 --- a/usr.bin/vi/include/tk_extern.h +++ /dev/null @@ -1,31 +0,0 @@ -/* $OpenBSD: tk_extern.h,v 1.3 2002/02/16 21:27:58 millert Exp $ */ - -int tk_addstr(SCR *, const char *, size_t); -int tk_attr(SCR *, scr_attr_t, int); -int tk_baud(SCR *, u_long *); -int tk_bell(SCR *); -int tk_clrtoeol(SCR *); -int tk_cursor(SCR *, size_t *, size_t *); -int tk_deleteln(SCR *); -int tk_ex_adjust(SCR *, exadj_t); -int tk_insertln(SCR *); -int tk_keyval(SCR *, scr_keyval_t, CHAR_T *, int *); -int tk_move(SCR *, size_t, size_t); -int tk_refresh(SCR *, int); -int tk_rename(SCR *); -int tk_suspend(SCR *, int *); -void tk_usage(void); -int tk_event(SCR *, EVENT *, u_int32_t, int); -int tk_key(ClientData, Tcl_Interp *, int, char *[]); -int tk_screen(SCR *, u_int32_t); -int tk_quit(GS *); -int tk_term_init(SCR *); -int tk_term_end(GS *); -int tk_fmap(SCR *, seq_t, CHAR_T *, size_t, CHAR_T *, size_t); -int tk_optchange(SCR *, int, char *, u_long *); -int tk_ssize(SCR *, int, size_t *, size_t *, int *); -int tk_op(ClientData, Tcl_Interp *, int, char *[]); -int tk_opt_init(ClientData, Tcl_Interp *, int, char *[]); -int tk_opt_set(ClientData, Tcl_Interp *, int, char *[]); -int tk_version(ClientData, Tcl_Interp *, int, char *[]); -void tk_msg(SCR *, mtype_t, char *, size_t); |