• Home
  • History
  • Annotate
Name Date Size #Lines LOC

..03-May-2022-

catd/H03-May-2022-310309

editors/2bsd-vi/files/H03-May-2022-1411

libterm/H03-May-2022-891442

ChangesH A D24-Mar-200512.7 KiB242226

LICENSEH A D18-Feb-20053.6 KiB7061

MakefileH A D03-May-202215.3 KiB377136

READMEH A D20-Feb-20055.9 KiB146112

TODOH A D19-Feb-2005459 138

config.hH A D19-Feb-20055.9 KiB14726

ex.1H A D03-May-202257.7 KiB2,0461,957

ex.cH A D04-Mar-200516.1 KiB679388

ex.hH A D04-Mar-200518.8 KiB584330

ex.specH A D24-Mar-20051.4 KiB5941

ex_addr.cH A D04-Mar-20059.5 KiB407247

ex_argv.hH A D23-Nov-20044.7 KiB10617

ex_cmds.cH A D18-Feb-200518.1 KiB989744

ex_cmds2.cH A D17-Feb-200513.4 KiB675410

ex_cmdsub.cH A D12-Mar-200530.1 KiB1,4441,047

ex_data.cH A D27-Nov-20046.9 KiB17183

ex_extern.cH A D27-Nov-20044.4 KiB9913

ex_get.cH A D04-Mar-20058.2 KiB356236

ex_io.cH A D12-Mar-200523.1 KiB1,126866

ex_proto.hH A D19-Feb-200518.2 KiB568456

ex_put.cH A D17-Feb-200525.7 KiB1,311869

ex_re.cH A D24-Mar-200526.1 KiB1,3141,088

ex_re.hH A D04-Mar-20055.4 KiB12622

ex_set.cH A D27-Nov-20048.8 KiB314198

ex_subr.cH A D04-Mar-200519.2 KiB1,154833

ex_tagio.cH A D12-Mar-20055.6 KiB17886

ex_temp.cH A D04-Mar-200516.4 KiB772605

ex_temp.hH A D04-Mar-20058.5 KiB19251

ex_tty.cH A D04-Mar-200511.1 KiB408269

ex_tty.hH A D01-Dec-200411.1 KiB250131

ex_tune.hH A D04-Mar-20058 KiB22690

ex_unix.cH A D12-Mar-200510.5 KiB451318

ex_v.cH A D04-Mar-200512.7 KiB528323

ex_vadj.cH A D04-Mar-200527.6 KiB1,163680

ex_vars.hH A D27-Nov-20041.3 KiB4946

ex_version.cH A D24-Mar-20054.1 KiB9113

ex_vget.cH A D04-Mar-200520 KiB880609

ex_vis.hH A D24-Mar-200512.8 KiB322103

ex_vmain.cH A D04-Mar-200531.6 KiB1,443784

ex_voper.cH A D15-Feb-200519.7 KiB977597

ex_vops.cH A D04-Mar-200523.1 KiB1,069685

ex_vops2.cH A D04-Mar-200524.6 KiB1,098661

ex_vops3.cH A D04-Mar-200515 KiB731517

ex_vput.cH A D04-Mar-200538 KiB1,626955

ex_vwind.cH A D27-Nov-200411.2 KiB501308

expreserve.cH A D03-May-202213.5 KiB556347

exrecover.cH A D03-May-202221.1 KiB903525

makeoptionsH A D01-Jul-20024.8 KiB12441

malloc.cH A D20-Feb-20058.3 KiB365250

mapmalloc.cH A D20-Feb-20059.9 KiB440321

printf.cH A D01-Dec-200411.4 KiB441260

vi.1H A D03-May-202233.4 KiB1,026938

README

1Welcome to the ex/vi port!
2==========================
3
4This implementation is derived from ex/vi 3.7 of 6/7/85 and the BSD
5termcap library, originally from the 2.11BSD distribution. All of them
6were changed to compile and run on newer POSIX compatible Unix systems.
7Support for international character sets was added, including support
8for multibyte locales (based on UTF-8 or East Asian encodings), and some
9changes were made to get closer to the POSIX.2 guidelines for ex and
10vi. Some issues that were clearly bugs and not features have also been
11resolved; see the Changes file for details.
12
13New releases are announced on Freshmeat. If you want to get
14notified by email on each release, use their subscription service at
15<http://freshmeat.net/projects/vi/>.
16
17The project homepage is currently at <http://ex-vi.sourceforge.net>.
18
19
20How to build
21============
22
23First look at the Makefile and change the settings there to match your
24build environment. Explanations are provided directly in this file.
25
26You can tune the sizes of some internal buffers by editing config.h. In
27particular, you will have to raise the size of the 'TUBE' constants if
28you wish to use really large-sized terminals.
29
30Then type 'make' and 'make install'.
31
32It is possible to build a RPM file directly from the source distribution
33by executing
34
35        rpmbuild -tb ex-<version>.tar.bz2
36
37Note that the RPM spec installs the binary in /usr/5bin by default to
38avoid conflicts with vendor files in /usr/bin. The default locations
39match those of the Heirloom Toolchest <http://heirloom.sourceforge.net>.
40
41The following systems have been reported to compile this code:
42
43Linux               Kernel 2.0 and above; libc4, libc5, glibc 2.2 and above,
44                    diet libc, uClibc
45Sun Solaris         2.5.1 and above
46Caldera Open UNIX   8.0.0
47SCO UnixWare        7.1.1, 7.0.1, 2.1.2
48HP HP-UX            B.11.23, B.11.11, B.11.00, B.10.20
49HP Tru64 UNIX       4.0G, 5.1B
50IBM AIX             5.1, 4.3
51NEC SUPER-UX        10.2
52NEC UX/4800         Release11.5 Rev.A
53Control Data EP/IX  2.2.1AA
54FreeBSD             3.1, 4.5, 5.x
55NetBSD              1.6, 2.0
56
57Reports about other Unix systems are welcome, whether successful or not
58(in the latter case add a detailed description). This port of vi is only
59aimed at Unix, though, so I am not interested about results from running
60this software on Windows etc.
61
62Prerequisites for ports to other systems are:
63
64- The system must provide an ANSI C-89 compiler and POSIX.1-1990 functions.
65
66- The system must provide an sbrk() call to increase the memory heap size.
67  If only a fake sbrk() call is provided that works by pre-allocating
68  several MB, vi will probably work too.
69
70- The system library must allow replacement of malloc() and printf() by the
71  versions provided by vi. For malloc(), it also must make its own internal
72  memory requests using the vi malloc(). Otherwise, vi will likely die with
73  a segmentation fault because the storage allocated by sbrk() interferes
74  with usual Unix library implementations of malloc().
75
76The last two requirements could probably be eliminated with some effort, but
77it would not result in any real improvements for usual the Unix platforms vi
78is targeted at, so it has not be done yet.
79
80
81Terminal capabilities
82=====================
83
84vi normally uses the termcap library to gather information about the
85capabilities of the terminal it is using. A BSD-derived termcap library
86is included with the vi distribution, and is usually the preferred choice.
87On some platforms, though, either no /etc/termcap file exists, or the file
88lacks up-to-date entries. In these cases, two workarounds are possible.
89First, vi can be linked against libcurses, libncurses, or libtermcap, if
90these provide access to a proper terminal information database. Second, it
91is possible to use the included termcap library with a TERMCAP environment
92variable that contains a complete termcap entry. Most terminals in current
93use provide a superset of DEC VT102 capabilities, so the following will
94normally work:
95
96TERMCAP="vt102|$TERM|dec vt102:"'\
97	:do=^J:co#80:li#24:cl=50\E[;H\E[2J:\
98	:le=^H:bs:cm=5\E[%i%d;%dH:nd=2\E[C:up=2\E[A:\
99	:ce=3\E[K:cd=50\E[J:so=2\E[7m:se=2\E[m:us=2\E[4m:ue=2\E[m:\
100	:md=2\E[1m:mr=2\E[7m:mb=2\E[5m:me=2\E[m:is=\E[1;24r\E[24;1H:\
101	:rs=\E>\E[?3l\E[?4l\E[?5l\E[?7h\E[?8h:ks=\E[?1h\E=:ke=\E[?1l\E>:\
102	:ku=\EOA:kd=\EOB:kr=\EOC:kl=\EOD:kb=^H:\
103	:ho=\E[H:k1=\EOP:k2=\EOQ:k3=\EOR:k4=\EOS:pt:sr=5\EM:vt#3:\
104	:sc=\E7:rc=\E8:cs=\E[%i%d;%dr:vs=\E[?7l:ve=\E[?7h:\
105	:mi:al=\E[L:dc=\E[P:dl=\E[M:ei=\E[4l:im=\E[4h:'
106export TERMCAP
107
108
109Multibyte locale support
110========================
111
112Support for multibyte locales has been added to vi. It requires a number of
113functions that, while specified in XPG6, are not present on all systems that
114provide basic multibyte support. In particular, vi needs wcwidth() to
115determine the visual width of a character, and mbrtowc() to detect when a
116byte sequence that is entered at the terminal has been completed.
117
118The multibyte code is known to work on the following systems:
119
120Linux           glibc 2.2.2 and later
121Sun Solaris     9 and later
122HP HP-UX        B.11.11 and later
123FreeBSD         5.3
124NetBSD          2.0
125
126It has been tested on xterm patch #192, rxvt-unicode 4.2, mlterm 2.9.1, and
127xiterm 0.5.
128
129Successful operation is known for the following encodings: UTF-8, EUC-JP,
130EUC-KR, Big5, Big5-HKSCS, GB 2312, GBK. vi does not support locking-shift
131encodings like those that use ISO 2022 escape sequences. It also requires
132that the first byte of any multibyte character has the highest bit set.
133This excludes 7-bit encodings like UTF-7, and encodings whose sequences
134start with ASCII characters like TCVN 5712.
135
136To use UTF-8 locales in ex mode, the terminal should be put in 'stty iutf8'
137mode on Linux if it does not perform this automatically. Otherwise, typing
138the erase key once after entering a multibyte character will result in an
139incomplete byte sequence.
140
141
142Gunnar Ritter                                           2/20/05
143Freiburg i. Br.
144Germany
145<Gunnar.Ritter@pluto.uni-freiburg.de>
146