Permalink
Browse files

import of nvi 1.79

  • Loading branch information...
aymeric
aymeric committed Mar 31, 2001
1 parent 1ec7d8d commit d7878470af879a7387e40dfa1e51675fe4260542
Showing with 7,464 additions and 3,696 deletions.
  1. +98 −9 usr.bin/vi/FAQ
  2. +3 −9 usr.bin/vi/LAYOUT
  3. +10 −7 usr.bin/vi/LICENSE
  4. +28 −25 usr.bin/vi/README
  5. +631 −40 usr.bin/vi/build/Makefile
  6. +76 −29 usr.bin/vi/build/Makefile.in
  7. +50 −52 usr.bin/vi/build/README
  8. +313 −69 usr.bin/vi/build/README.LynxOS
  9. +3 −3 usr.bin/vi/build/acconfig.h
  10. +17 −0 usr.bin/vi/build/aclocal.m4
  11. +18 −18 usr.bin/vi/build/config.guess
  12. +51 −9 usr.bin/vi/build/config.h
  13. +50 −8 usr.bin/vi/build/config.h.in
  14. +0 −3 usr.bin/vi/build/config.sub
  15. +735 −1,008 usr.bin/vi/build/configure
  16. +181 −127 usr.bin/vi/build/configure.in
  17. +29 −18 usr.bin/vi/build/distrib
  18. +1 −1 usr.bin/vi/build/pathnames.h
  19. +2 −2 usr.bin/vi/build/pathnames.h.in
  20. +6 −1 usr.bin/vi/build/port.h
  21. +6 −1 usr.bin/vi/build/port.h.in
  22. +49 −0 usr.bin/vi/build/recover
  23. +49 −0 usr.bin/vi/build/recover.in
  24. +13 −14 usr.bin/vi/catalog/Makefile
  25. +34 −20 usr.bin/vi/catalog/dutch
  26. +28 −14 usr.bin/vi/catalog/dutch.base
  27. +10 −31 usr.bin/vi/catalog/dutch.check
  28. +13 −10 usr.bin/vi/catalog/english
  29. +13 −10 usr.bin/vi/catalog/english.base
  30. +5 −2 usr.bin/vi/catalog/english.check
  31. +317 −0 usr.bin/vi/catalog/french
  32. +309 −0 usr.bin/vi/catalog/french.base
  33. +34 −0 usr.bin/vi/catalog/french.check
  34. +35 −21 usr.bin/vi/catalog/german
  35. +29 −16 usr.bin/vi/catalog/german.base
  36. +10 −31 usr.bin/vi/catalog/german.check
  37. +6 −6 usr.bin/vi/catalog/ru_SU.KOI8-R
  38. +4 −6 usr.bin/vi/catalog/ru_SU.KOI8-R.base
  39. +9 −4 usr.bin/vi/catalog/ru_SU.KOI8-R.check
  40. +317 −0 usr.bin/vi/catalog/spanish
  41. +309 −0 usr.bin/vi/catalog/spanish.base
  42. +35 −0 usr.bin/vi/catalog/spanish.check
  43. +27 −24 usr.bin/vi/catalog/swedish
  44. +26 −24 usr.bin/vi/catalog/swedish.base
  45. +4 −2 usr.bin/vi/catalog/swedish.check
  46. +13 −16 usr.bin/vi/cl/cl.h
  47. +41 −5 usr.bin/vi/cl/cl_bsd.c
  48. +118 −22 usr.bin/vi/cl/cl_funcs.c
  49. +142 −57 usr.bin/vi/cl/cl_main.c
  50. +5 −5 usr.bin/vi/cl/cl_read.c
  51. +23 −39 usr.bin/vi/cl/cl_screen.c
  52. +29 −6 usr.bin/vi/cl/cl_term.c
  53. +96 −25 usr.bin/vi/common/api.c
  54. +3 −3 usr.bin/vi/common/common.h
  55. +3 −3 usr.bin/vi/common/cut.c
  56. +9 −9 usr.bin/vi/common/delete.c
  57. +189 −47 usr.bin/vi/common/exf.c
  58. +9 −8 usr.bin/vi/common/exf.h
  59. +13 −13 usr.bin/vi/common/gs.h
  60. +5 −5 usr.bin/vi/common/key.c
  61. +4 −4 usr.bin/vi/common/key.h
  62. +2 −3 usr.bin/vi/common/line.c
  63. +48 −27 usr.bin/vi/common/main.c
  64. +2 −2 usr.bin/vi/common/mark.c
  65. +1 −1 usr.bin/vi/common/mem.h
  66. +59 −34 usr.bin/vi/common/msg.c
  67. +46 −28 usr.bin/vi/common/options.c
  68. +9 −6 usr.bin/vi/common/options.h
  69. +1 −1 usr.bin/vi/common/options_f.c
  70. +11 −9 usr.bin/vi/common/put.c
  71. +8 −5 usr.bin/vi/common/recover.c
  72. +6 −2 usr.bin/vi/common/screen.c
  73. +22 −19 usr.bin/vi/common/screen.h
  74. +35 −45 usr.bin/vi/common/search.c
  75. +2 −2 usr.bin/vi/common/util.c
  76. +0 −3 usr.bin/vi/docs/TODO
  77. +8 −15 usr.bin/vi/docs/USD.doc/edit/Makefile
  78. +13 −55 usr.bin/vi/docs/USD.doc/edit/edittut.ms
  79. +12 −9 usr.bin/vi/docs/USD.doc/exref/Makefile
  80. +7 −24 usr.bin/vi/docs/USD.doc/exref/ex.rm
  81. +13 −17 usr.bin/vi/docs/USD.doc/exref/ex.summary
  82. +9 −7 usr.bin/vi/docs/USD.doc/vi.man/Makefile
  83. +37 −42 usr.bin/vi/docs/USD.doc/vi.man/vi.1
  84. +16 −10 usr.bin/vi/docs/USD.doc/vi.ref/Makefile
  85. +28 −31 usr.bin/vi/docs/USD.doc/vi.ref/ex.cmd.roff
  86. +1 −1 usr.bin/vi/docs/USD.doc/vi.ref/merge.awk
  87. +44 −35 usr.bin/vi/docs/USD.doc/vi.ref/set.opt.roff
  88. +3 −29 usr.bin/vi/docs/USD.doc/vi.ref/vi.cmd.roff
  89. +96 −105 usr.bin/vi/docs/USD.doc/vi.ref/vi.ref
  90. +15 −10 usr.bin/vi/docs/USD.doc/vitut/Makefile
  91. +3 −1 usr.bin/vi/docs/USD.doc/vitut/vi.apwh.ms
  92. +3 −2 usr.bin/vi/docs/USD.doc/vitut/vi.chars
  93. +28 −18 usr.bin/vi/docs/USD.doc/vitut/vi.in
  94. +6 −6 usr.bin/vi/docs/USD.doc/vitut/vi.summary
  95. +168 −0 usr.bin/vi/docs/changelog
  96. +10 −15 usr.bin/vi/docs/features
  97. +229 −0 usr.bin/vi/docs/help
  98. +2 −2 usr.bin/vi/docs/interp/interp
  99. +80 −64 usr.bin/vi/ex/ex.c
  100. +4 −23 usr.bin/vi/ex/ex.h
  101. +5 −3 usr.bin/vi/ex/ex_append.c
  102. +10 −2 usr.bin/vi/ex/ex_args.c
  103. +158 −23 usr.bin/vi/ex/ex_argv.c
  104. +4 −5 usr.bin/vi/ex/ex_at.c
  105. +6 −6 usr.bin/vi/ex/ex_bang.c
  106. +25 −100 usr.bin/vi/ex/ex_cd.c
  107. +8 −8 usr.bin/vi/ex/ex_cmd.c
  108. +57 −45 usr.bin/vi/ex/ex_cscope.c
  109. +2 −2 usr.bin/vi/ex/ex_delete.c
  110. +2 −2 usr.bin/vi/ex/ex_file.c
  111. +2 −2 usr.bin/vi/ex/ex_filter.c
  112. +14 −13 usr.bin/vi/ex/ex_global.c
  113. +12 −13 usr.bin/vi/ex/ex_init.c
  114. +2 −2 usr.bin/vi/ex/ex_join.c
  115. +3 −3 usr.bin/vi/ex/ex_move.c
  116. +11 −120 usr.bin/vi/ex/ex_perl.c
  117. +31 −17 usr.bin/vi/ex/ex_read.c
  118. +14 −2 usr.bin/vi/ex/ex_screen.c
  119. +4 −4 usr.bin/vi/ex/ex_script.c
  120. +14 −4 usr.bin/vi/ex/ex_shell.c
  121. +2 −2 usr.bin/vi/ex/ex_shift.c
  122. +2 −3 usr.bin/vi/ex/ex_source.c
  123. +194 −160 usr.bin/vi/ex/ex_subst.c
  124. +22 −16 usr.bin/vi/ex/ex_tag.c
  125. +1 −2 usr.bin/vi/ex/ex_tcl.c
  126. +11 −10 usr.bin/vi/ex/ex_txt.c
  127. +13 −3 usr.bin/vi/ex/ex_util.c
  128. +2 −2 usr.bin/vi/ex/ex_version.c
  129. +2 −2 usr.bin/vi/ex/ex_visual.c
  130. +17 −10 usr.bin/vi/ex/ex_write.c
  131. +1 −1 usr.bin/vi/ex/version.h
  132. +5 −3 usr.bin/vi/include/cl_extern.h
  133. +199 −0 usr.bin/vi/include/com_extern.h
  134. +1 −4 usr.bin/vi/include/ex_extern.h
  135. +23 −0 usr.bin/vi/include/ip_extern.h
  136. +41 −39 usr.bin/vi/include/options_def.h
  137. +7 −1 usr.bin/vi/include/perl_extern.h
  138. +2 −2 usr.bin/vi/include/vi_extern.h
  139. +2 −2 usr.bin/vi/vi/getc.c
  140. +7 −5 usr.bin/vi/vi/v_delete.c
  141. +16 −6 usr.bin/vi/vi/v_ex.c
  142. +12 −12 usr.bin/vi/vi/v_itxt.c
  143. +8 −5 usr.bin/vi/vi/v_mark.c
  144. +5 −1 usr.bin/vi/vi/v_replace.c
  145. +57 −17 usr.bin/vi/vi/v_search.c
  146. +181 −99 usr.bin/vi/vi/v_txt.c
  147. +1 −1 usr.bin/vi/vi/v_ulcase.c
  148. +4 −1 usr.bin/vi/vi/v_util.c
  149. +3 −3 usr.bin/vi/vi/v_xchar.c
  150. +27 −5 usr.bin/vi/vi/v_yank.c
  151. +41 −21 usr.bin/vi/vi/vi.c
  152. +3 −3 usr.bin/vi/vi/vi.h
  153. +11 −7 usr.bin/vi/vi/vs_line.c
  154. +84 −80 usr.bin/vi/vi/vs_msg.c
  155. +132 −66 usr.bin/vi/vi/vs_refresh.c
  156. +6 −3 usr.bin/vi/vi/vs_smap.c
  157. +153 −74 usr.bin/vi/vi/vs_split.c
View
@@ -1,9 +1,9 @@
-@(#)FAQ 8.5 (Berkeley) 5/9/96
+@(#)FAQ 8.13 (Berkeley) 10/14/96
-Q: How can I get nvi to display my character set?
-A: Nvi uses the C library routine isprint(3) to determine if a character
+Q: How can I get vi to display my character set?
+A: Vi uses the C library routine isprint(3) to determine if a character
is printable, or should be displayed as an octal or hexadecimal value
- on the screen. Generally, if nvi is displaying printable characters
+ on the screen. Generally, if vi is displaying printable characters
in octal/hexadecimal forms, your environment is not configured correctly.
Try looking at the man pages that allow you to configure your locale.
For example, to configure an ISO 8859-1 locale under Solaris using csh,
@@ -21,13 +21,17 @@ A: Nvi uses the C library routine isprint(3) to determine if a character
HP-UX 10.X en_US.iso88591
SunOS 4.X iso_8859_1
SunOS 5.X iso_8859_1
+
+ If there's no other solution, you can use the print and noprint edit
+ options of vi to specify that a specific character is printable or not
+ printable.
Q: My map won't work!
A: One thing that you should immediately check if a vi map doesn't work
is if depends on the final cursor position after a P or p command.
Historic vi's were inconsistent as to the final position of the cursor,
and, to make matter worse, the final cursor position also depended on
- whether the put text came from a named or unnamed buffer! Nvi follows
+ whether the put text came from a named or unnamed buffer! Vi follows
the POSIX 1003.2 standard on this one, and makes this consistent, always
placing the cursor on the first character.
@@ -49,7 +53,7 @@ A: The difference is that the ignorecase edit option always ignores the
it will be treated case-sensitively, as if the ignorecase edit option
was not set.
-Q: When I edit binary files, nvi appends a <newline> to the last line!
+Q: When I edit binary files, vi appends a <newline> to the last line!
A: This is historic practice for vi, and further, it's required by the
POSIX 1003.2 standard. My intent is to provide a command line and/or
edit option to turn this behavior off when I switch to version 2.0 of
@@ -63,9 +67,94 @@ A: A common problem over slow links is that the set of characters sent by
vi to wait longer before deciding that the <escape> character that
starts cursor key sequences doesn't have any characters following it.
-Q: When I edit some files, nvi seems to hang forever, and I have to kill it.
-A: Nvi uses flock(2) and fcntl(2) to do file locking. When it attempts to
+Q: When I edit some files, vi seems to hang forever, and I have to kill it.
+A: Vi uses flock(2) and fcntl(2) to do file locking. When it attempts to
acquired a lock for a file on an NFS mounted filesystem, it can hang
for a very long (perhaps infinite) period of time. Turning off the
- "lock" edit option will keep nvi from attempting to acquire any locks
+ "lock" edit option will keep vi from attempting to acquire any locks
on the files you edit.
+
+Q: When I compile vi I get lots of warnings about pointer assignments
+ being incompatible!
+A: Vi is partially written to support wide characters. When this code
+ interfaces with the code that doesn't yet support wide characters,
+ the pointer types clash. This will hopefully be fixed in the near
+ future, but I've been saying that for awhile, now.
+
+Q: I get jumpy scrolling behavior in the screen!
+A: This is almost certainly a problem with the system's terminfo or
+ termcap information for your terminal. If the terminfo/termcap entry
+ doesn't have the settable scrolling region capabilities, or the more
+ powerful scrolling commands, these behaviors can result. Historic
+ implementations of vi, and some of the vi clones, don't suffer from
+ this problem because they wrote their own screen support instead of
+ using the curses library.
+
+ The solution is to find a good terminfo or termcap entry for your
+ terminal, which will fix the problem for all of the applications on
+ your system, not just vi. Eric Raymond maintains the freely
+ redistributable termcap/terminfo entries. They can be downloaded
+ from http://www.ccil.org/~esr/ncurses.html, or you can contact him
+ at esr@snark.thyrsus.com.
+
+Q: The entire screen repaints on every keystroke!
+A: Your system's curses implementation is broken. You should use the
+ curses implementation provided with vi or a curses replacement such
+ as ncurses. Eric Raymond is one of the maintainers of the freely
+ redistributable ncurses package. You can download ncurses from
+ http://www.ccil.org/~esr/ncurses.html, or you can contact him at
+ esr@snark.thyrsus.com.
+
+Q: When I use vi on a Sun console (terminal type sun-34) the screen
+ is occasionally trashed, usually when exiting vi!
+A: The Sun console can't handle the 'al' capability of the termcap
+ entry (the il1 capability of terminfo entries). If you delete that
+ entry from your terminfo/termcap information everything should work
+ correctly.
+
+Q: I don't have a version of ctags (or I have ctags, but it doesn't tag
+ nearly enough things)!
+A: There's a version of ctags available on the 4.4BSD-Lite distributions,
+ as well as the FreeBSD, NetBSD, Linux and GNU distributions. Or, you
+ might want to try Exuberant Ctags:
+
+ Title: Exuberant Ctags
+ Version: 1.3
+ Entered-date: 16JUN96
+ Description:
+ A better ctags which generates tags for all possible tag types:
+ macro definitions, enumerated values (values inside enum{...}),
+ function and method definitions, enum/struct/union tags, external
+ function prototypes (optional), typedefs, and variable
+ declarations. It is far less easily fooled by code containing #if
+ preprocessor conditional constructs, using a conditional path
+ selection algorithm to resolve complicated choices, and a
+ fall-back algorithm when this one fails. Can also be used to print
+ out a list of selected objects found in source files.
+ Keywords: ctags, tags, exuberant
+ Author: darren@sirsi.com (Darren Hiebert)
+ darren@hiwaay.net (Darren Hiebert)
+ Maintained-by: darren@sirsi.com (Darren Hiebert)
+ darren@hiwaay.net (Darren Hiebert)
+ Primary-site: sunsite.unc.edu /pub/Linux/devel/lang/c
+ 27kB ctags-1.3.tar.gz
+ Alternate-site: ftp.halcyon.com /local/gvr
+ 27kB ctags-1.3.tar.gz
+ Original-site:
+ Platforms: UNIX, MSDOS, WindowsNT, Windows95, OS/2, Amiga
+ Copying-policy: Public domain
+
+Q: When I update a file I already have open, and use :e to reread it, I
+ get nul's for the rest of the file!
+A: Your system's implementation of mmap(2) has a bug; you will have to
+ exit vi and re-execute it.
+
+Q: Where can I get cscope?
+A: Cscope is available on UNIXWare System V Release 4.0 variants such as
+ Sun Solaris 2.x (/opt/SUNWspro/bin) and UNIXWare System V Release 4.1.
+
+ You can buy version 13.3 source with an unrestricted license for $400
+ from AT&T Software Solutions by calling +1-800-462-8146. Binary
+ redistribution of cscope is an additional $1500, one-time flat fee.
+
+ For more information, see http://www.unipress.com/att/new/cscope.html.
View
@@ -1,4 +1,4 @@
-# @(#)LAYOUT 8.10 (Berkeley) 5/13/96
+# @(#)LAYOUT 8.12 (Berkeley) 10/10/96
LAYOUT
This file: the layout of the nvi sources.
@@ -9,9 +9,6 @@ LICENSE
README
Welcome message and basic information.
-VERSION
- The version information of nvi.
-
build/
The build/configuration directory for nvi. See build/README for
more information.
@@ -99,17 +96,14 @@ ex/
command(s) they support, but occasionally with a name that
describes their functionality.
+ version.h -- Version information.
+
include/
Replacement include files:
bitstring.h -- The 4.4BSD bitstring operations.
sys/queue.h -- The 4.4BSD queue operations.
-install/
- Things to install on the local system.
-
- recover.script -- Vi recovery script.
-
perl_api/
Source code supporting the Perl scripting language for nvi.
View
@@ -1,12 +1,15 @@
-# @(#)LICENSE 8.7 (Berkeley) 3/4/96
-
-This work is copyrighted by The Regents of the University of California,
-and by Keith Bostic. It may be freely redistributed under the following
-conditions, until one year after the release of any subsequent version of
-this software, at which point it may no longer be redistributed without
-written permission from Keith Bostic.
+The vi program is freely redistributable. You are welcome to copy, modify
+and share it with others under the conditions listed in this file. If any
+company (not any individual!) finds vi sufficiently useful that you would
+have purchased it, or if any company wishes to redistribute it, contributions
+to the authors would be appreciated.
/*-
+ * Copyright (c) 1991, 1992, 1993, 1994
+ * The Regents of the University of California. All rights reserved.
+ * Copyright (c) 1991, 1992, 1993, 1994, 1995, 1996
+ * Keith Bostic. All rights reserved.
+ *
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
View
@@ -1,28 +1,29 @@
-# @(#)README 8.135 (Berkeley) 5/18/96
+# @(#)README 8.147 (Berkeley) 10/19/96
-This is the README for nex/nvi, a freely redistributable replacement for
-the ex/vi text editors originally distributed as part of the Fourth
+This is the README for nex/nvi, a freely redistributable implementation
+of the ex/vi text editors originally distributed as part of the Fourth
Berkeley Software Distribution (4BSD), by the University of California,
Berkeley.
The source code for nex/nvi can be retrieved by using anonymous ftp to
-ftp.cs.berkeley.edu. The files ucb/4bsd/nvi.tar.Z and ucb/4bsd/nvi.tar.gz
-are the compressed and gzip'd archives, respectively, of version 1.34 of
-nex/nvi. This version is believed to be stable and reasonably problem
-free. The file ucb/4bsd/nvi.ALPHA.1.66.tar.gz is a gzip'd archive of the
-current alpha-test release of nex/nvi, version 1.66. This version reflects
-the current development tree, and is more likely to have unanticipated
-problems.
+ftp.cs.berkeley.edu. The file ucb/4bsd/nvi.tar.gz is the gzip'd archive,
+of version 1.71 of nex/nvi. This version is believed to be stable and
+problem free. The file ucb/4bsd/nvi-###.ALPHA.tar.gz is a gzip'd archive
+of the current alpha-test release of nex/nvi. This version reflects the
+current development tree, and will be more likely to have problems.
-See the file build/README for information on building nvi.
+See the file:
+ build/README for information on building nvi.
+ LAYOUT for a description of where everything is.
+ LICENSE for the copyright and redistribution terms.
-See the file LAYOUT for a description of where everything is.
+If you have any questions about nex/nvi, problems with it, or concerns
+about the conditions for redistribution, please contact me:
-If you have any questions about nex/nvi, or problems making it work,
-please contact me by electronic mail at one of the following addresses:
-
- uunet!bostic
- bostic@cs.berkeley.edu
+ Keith Bostic +1-508-287-4781
+ 394 E. Riding Dr. bostic@bostic.com
+ Carlisle, MA 01741
+ USA
Keith Bostic
@@ -43,10 +44,12 @@ o This software is several years old and is the product of many folks' work.
George Neville-Neil added the Tcl interpreter, and the initial
interpreter design was his.
- Sven Verdoolaege added the Perl5 interpreter.
+ Sven Verdoolaege added the Perl interpreter.
+
+ Rob Mayoff provided the original Cscope support.
-o Many, many people provided enhancements, bug reports and testing, far too
- many to individually thank.
+o Many, many people suggested enhancements, and provided bug reports and
+ testing, far too many to individually thank.
o From the original vi acknowledgements, by William Joy and Mark Horton:
@@ -66,16 +69,16 @@ o Status:
This software is in beta test, and it's pretty stable. Almost all of the
historic functionality in ex/vi is there, the only major missing pieces
-are open mode and the lisp option. (Also, the options hardtabs, optimize,
-redraw, and slowopen are recognized, but ignored.)
+are open mode and the lisp edit option.
Nvi is largely 8-bit clean. This isn't difficult to fix, and was left in
during initial development to keep things simple. Wide character support
will be integrated at the same time that it is made fully 8-bit clean.
There aren't a lot of new features in nex/nvi, but there are a few things
-you might like. The "Additional Features" section of the reference page
-(USD.doc/vi.ref/vi.ref.txt, USD.doc/vi.ref/vi.ref.ps) has more information.
+you might like. The "Additional Features" section of the reference work
+(docs/USD.doc/vi.ref/vi.ref.txt, docs/USD.doc/vi.ref/vi.ref.ps) has more
+information.
=-=-=-=-=-=-=-=-=-=-=
o Debugging:
@@ -86,7 +89,7 @@ reproduce the bug, and I'll try to fix it locally. Stack traces of core
dumps are only rarely helpful -- an example file with a set of keystrokes
that causes the problem is almost invariably necessary. I know it's
annoying, but simply playing with the bug until you can reproduce it at
-will with minimal keystrokes is immensely helpful to me.
+will, with minimal keystrokes, is immensely helpful to me.
Please include the following in the bug report;
Oops, something went wrong.

0 comments on commit d787847

Please sign in to comment.