v41i050: vim - Vi IMitation editor, v2.0, Part00/25

24 views
Skip to first unread message

Bram Moolenaar

unread,
Dec 20, 1993, 10:41:36 PM12/20/93
to
Submitted-by: mo...@oce.nl (Bram Moolenaar)
Posting-number: Volume 41, Issue 50
Archive-name: vim/part00
Environment: UNIX, AMIGA, MS-DOS
Supersedes: vim: Volume 37, Issue 1-24

Vim - Vi IMproved. A clone of the UNIX text editor Vi. Very useful for
editing programs and other plain ASCII text. Full Vi compatibility (except Q
command, you don't need it). Includes most Ex commands.

Extra features above Vi: Multilevel undo, command line history, improved
command line editing, command typeahead display, command to display yank
buffers, possibility to edit binary files, line wrapping can be switched off,
file name stack, can be adjusted to understand error messages from any
compiler, shows current file name in window title, on-line help, etc.

Version 2.0, update to 1.27. Most important changes:
- 'wrap' option to switch line wrapping on/off
- filename completion is more like other programs and adjustable
- automatic detection of CR/LF line separator
- '-b' command line option to make editing binary files more easy
- added abbreviation
- :make command for quickly jumping to errors
- MSDOS version uses bios calls for screen output, ansi.sys not needed
- many small changes to make Vim more vi-compatible

Portability: Vim is currently running on Unix, MSdos and Amiga. Vim should
run on any UNIX system, although small modification may be required. It has
been tested on Sun, Ultrix, linux, hpux and many others. For MSDOS it can be
compiled with Turbo C and Borland C++.

Distribution:
comp.binaries.ibm.pc: vim_dos.zip: MSDOS binary and documentation

comp.binaries.amiga: vim_bin.lha: Amiga binary and documentation

comp.sources.misc: shell archive with sources and documentation

The documentation is almost the same for all systems. For MSDOS CR-LF is used
for line separator. For Amiga .info files are included. For the shell archive
some files are uuencoded because of unprintable characters.

Note that some files are uuencoded. I had to do this because there are
non-printable characters in these files that may be mangled by news. The
files are readable ASCII otherwise. To unpack the files completely unshar
the entire distribution and then run the file execute.me. This will uudecode
the files as appropriate.

Vim is charityware. Read uganda.txt for details.

===============================================================================
Bram Moolenaar | DISCLAIMER: This note does not
Oce Nederland B.V., Research & Development | necessarily represent the position
p.o. box 101, 5900 MA Venlo | of Oce-Nederland B.V. Therefore
The Netherlands phone +31 77 594077 | no liability or responsibility for
UUCP: mo...@oce.nl fax +31 77 595473 | whatever will be accepted.
exit 0 # Just in case...

Bram Moolenaar

unread,
Dec 20, 1993, 10:42:11 PM12/20/93
to
Submitted-by: mo...@oce.nl (Bram Moolenaar)
Posting-number: Volume 41, Issue 51
Archive-name: vim/part01

Environment: UNIX, AMIGA, MS-DOS
Supersedes: vim: Volume 37, Issue 1-24

#! /bin/sh
# This is a shell archive. Remove anything before this line, then unpack
# it by saving it into a file and typing "sh file". To overwrite existing
# files, type "sh file -c". You can also feed this as standard input via
# unshar, or by typing "sh <file", e.g.. If this archive is complete, you
# will see the following message at the end:
# "End of archive 1 (of 25)."
# Contents: vim vim/.exrc vim/README vim/doc vim/doc/unix.doc
# vim/doc/vim132.uue vim/execute.me vim/macros vim/macros/center.uue
# vim/macros/hanoi vim/macros/hanoi/click.me
# vim/macros/hanoi/hanoi_ma.uue vim/macros/hanoi/poster
# vim/macros/keyword.uue vim/macros/maze vim/macros/maze/README
# vim/macros/maze/makefile vim/macros/maze/maze.c
# vim/macros/maze/maze_5.78 vim/macros/maze/maze_ansi.c
# vim/macros/maze/poster vim/macros/readme vim/poster vim/src
# vim/src/addcr.c vim/src/ascii.h vim/src/debug.h vim/src/macros.h
# vim/src/mark.h vim/src/mkcmdtab.c vim/src/ops.h vim/src/proto
# vim/src/proto.h vim/src/proto/alloc.pro vim/src/proto/amiga.pro
# vim/src/proto/buffers.pro vim/src/proto/charset.pro
# vim/src/proto/cmdline.pro vim/src/proto/csearch.pro
# vim/src/proto/digraph.pro vim/src/proto/edit.pro
# vim/src/proto/fileio.pro vim/src/proto/help.pro
# vim/src/proto/linefunc.pro vim/src/proto/main.pro
# vim/src/proto/mark.pro vim/src/proto/message.pro
# vim/src/proto/misccmds.pro vim/src/proto/normal.pro
# vim/src/proto/ops.pro vim/src/proto/param.pro
# vim/src/proto/quickfix.pro vim/src/proto/regexp.pro
# vim/src/proto/regsub.pro vim/src/proto/screen.pro
# vim/src/proto/script.pro vim/src/proto/search.pro
# vim/src/proto/storage.pro vim/src/proto/tag.pro
# vim/src/proto/term.pro vim/src/proto/termlib.pro
# vim/src/proto/undo.pro vim/src/ptx_stdlib.h vim/src/regexp.h
# vim/src/regmagic.h vim/src/sun_stdlib.h vim/src/term_fix.uue
# vim/src/vim.prj vim/src/vimresp vim/tutor vim/tutor/Readme
# vim/tutor/poster
# Wrapped by mool@oce-rd2 on Wed Dec 15 09:50:03 1993
PATH=/bin:/usr/bin:/usr/ucb ; export PATH
if test ! -d 'vim' ; then
echo shar: Creating directory \"'vim'\"
mkdir 'vim'
fi
if test -f 'vim/.exrc' -a "${1}" != "-c" ; then
echo shar: Will not clobber existing file \"'vim/.exrc'\"
else
echo shar: Extracting \"'vim/.exrc'\" \(30 characters\)
sed "s/^X//" >'vim/.exrc' <<'END_OF_FILE'
Xset ai bs=2 shell=csh nojs ru
END_OF_FILE
if test 30 -ne `wc -c <'vim/.exrc'`; then
echo shar: \"'vim/.exrc'\" unpacked with wrong size!
fi
chmod +x 'vim/.exrc'
# end of 'vim/.exrc'
fi
if test -f 'vim/README' -a "${1}" != "-c" ; then
echo shar: Will not clobber existing file \"'vim/README'\"
else
echo shar: Extracting \"'vim/README'\" \(1629 characters\)
sed "s/^X//" >'vim/README' <<'END_OF_FILE'
XREADME for version 2.0 of Vim: Vi IMproved.
X
XVim is an almost compatible version of the UNIX editor vi. Only the 'Q'
Xcommand is missing (you don't need it). Many new features have been added:
Xmulti level undo, command line history, filename completion, block operations,
Xetc. See difference.doc.
X
XThis editor is very useful for editing programs and other plain ASCII files.
XAll commands are given with normal keyboard characters, so those who can type
Xwith ten fingers can work very fast. Additionally function keys can be defined
Xby the user.
X
XVim currently runs under Amiga DOS, MSDOS and many UNIX versions. Porting to
Xother systems should not be very difficult.
X
XDocumentation:
X tutor/readme - one hour training course for beginners
X reference.doc - complete reference of all Vim commands
X difference.doc - summarizes the differences with UNIX vi
X index - alfabetical list of commands
X amiga.doc - remarks for Amiga
X unix.doc - remarks for unix
X msdos.doc - remarks for MSDOS
X
XVim is Charityware. You can copy it as much as you like. Please read
Xuganda.txt for details.
X
X
XThe makefile offers some compilation options. If you do not use digraphs, you
Xcan save some memory by recompiling without the DIGRAPHS option. The Amiga
Xand MS-DOS versions are compiled for a limited number of supported terminals.
XIf you want to use Vim with other terminals you can recompile with the
XTERMCAP option. See the makefiles for further options.
X
XPlease send comments, bug reports and suggestions to:
X
X Bram Moolenaar UUCP E-mail: mo...@oce.nl
X Clematisstraat 30 FAX: +31-77-595473
X 5925 BE Venlo
X The Netherlands
END_OF_FILE
if test 1629 -ne `wc -c <'vim/README'`; then
echo shar: \"'vim/README'\" unpacked with wrong size!
fi
chmod +x 'vim/README'
# end of 'vim/README'
fi
if test ! -d 'vim/doc' ; then
echo shar: Creating directory \"'vim/doc'\"
mkdir 'vim/doc'
fi
if test -f 'vim/doc/unix.doc' -a "${1}" != "-c" ; then
echo shar: Will not clobber existing file \"'vim/doc/unix.doc'\"
else
echo shar: Extracting \"'vim/doc/unix.doc'\" \(1226 characters\)
sed "s/^X//" >'vim/doc/unix.doc' <<'END_OF_FILE'
XThis file contains the particularities for the UNIX version of Vim.
X
XThe default help filename is "/usr/local/lib/vim.hlp"
XThe files "$HOME/.vimrc" and "$HOME/.exrc" are used instead of "s:.vimrc" and
X"s:.exrc". Additionally "/usr/etc/.vimrc" is used first.
X
XTemporary files (for filtering) are put in "/tmp".
X
XIn some cases the terminal may have a problem with CTRL-S (subtract
Xcommand). To get around this you can map another key to CTRL-S, and remap
XCTRL-S to nothing. You could use CTRL-W:
X :noremap! ^W ^V019
X :noremap! ^V019 ^V^V
X :noremap ^W ^V019
X :noremap ^V019 ^V^V
X(^V is the single character CTRL-V. Do not use the '^' character. You have to
Xtype CTRL-V twice to get one. What is shown above is what you have to type,
Xit will look different on the screen or in the .exrc file.)
X
XWith wildcard expansion you can use <~> (home directory) and <$>
X(environment variable).
X
XBecause terminal updating under UNIX is often slow (e.g. serial line
Xterminal, shell window in suntools), the 'showcommand' and 'ruler' options
Xare default off.
X
XThe file Vim132 is a shell script that can be used to put Vim in 132 column
Xmode on a vt100 and lookalikes.
X
XThe *.info files are for the Amiga. You don't need them with unix.
END_OF_FILE
if test 1226 -ne `wc -c <'vim/doc/unix.doc'`; then
echo shar: \"'vim/doc/unix.doc'\" unpacked with wrong size!
fi
chmod +x 'vim/doc/unix.doc'
# end of 'vim/doc/unix.doc'
fi
if test -f 'vim/doc/vim132.uue' -a "${1}" != "-c" ; then
echo shar: Will not clobber existing file \"'vim/doc/vim132.uue'\"
else
echo shar: Extracting \"'vim/doc/vim132.uue'\" \(372 characters\)
sed "s/^X//" >'vim/doc/vim132.uue' <<'END_OF_FILE'
X
Xbegin 644 vim132
XM(R$@+V)I;B]C<V@*(R!3:&5L;"!S8W)I<'0@9F]R('5S92!W:71H(%5.25@*1
XM(R!3=&%R=',@=7`@5FEM('=I=&@@=&AE('1E<FUI;F%L(&EN(#$S,B!C;VQU.
XM;6X@;6]D90HC($]N;'D@=V]R:W,@;VX@5E0M,3`P('1E<FUI;F%L<R!A;F0@,
XM;&]O:V%L:6ME<PHC"G-E="!O;&1T97)M/21T97)M"F5C:&\@(AM;/S-H(@IS[
XM971E;G8@5$5232!V=#$P,"UW(`IV:6T@)"H*<V5T('1E<FT])&]L9'1E<FT*M
X-96-H;R`B&UL_,VPB"C$P"
X``
Xend
Xsize 238
END_OF_FILE
if test 372 -ne `wc -c <'vim/doc/vim132.uue'`; then
echo shar: \"'vim/doc/vim132.uue'\" unpacked with wrong size!
fi
chmod +x 'vim/doc/vim132.uue'
# end of 'vim/doc/vim132.uue'
fi
if test -f 'vim/execute.me' -a "${1}" != "-c" ; then
echo shar: Will not clobber existing file \"'vim/execute.me'\"
else
echo shar: Extracting \"'vim/execute.me'\" \(840 characters\)
sed "s/^X//" >'vim/execute.me' <<'END_OF_FILE'
X# Script to unpack the source distribution of Vim
X#
X# Execute this script in the 'vim' directory.
X# It is not very smart, no error checking at all.
X#
X# What it does:
X# - a few files with special characters in them will be uudecoded
X# - the three parts of reference.doc are concatenated
X#
Xcd macros
Xuudecode center.uue
Xrm center.uue
Xcd maze
Xuudecode maze_mac.uue
Xrm maze_mac.uue
Xcd ../hanoi
Xuudecode hanoi_ma.uue
Xrm hanoi_ma.uue
Xcd ../../src
Xuudecode digrap_c.uue
Xuudecode tccon_tc.uue
Xuudecode term_fix.uue
Xrm digrap_c.uue tccon_tc.uue term_fix.uue
Xcd ../doc
Xuudecode vim_hlp.uue
Xuudecode digr_doc.uue
Xuudecode vim_man.uue
Xuudecode vim132.uue
Xrm vim_hlp.uue digr_doc.uue vim_man.uue vim132.uue
Xcat reference.do1 reference.do2 reference.do3 reference.do4 >reference.doc
Xrm reference.do1 reference.do2 reference.do3 reference.do4
Xcd ..
END_OF_FILE
if test 840 -ne `wc -c <'vim/execute.me'`; then
echo shar: \"'vim/execute.me'\" unpacked with wrong size!
fi
chmod +x 'vim/execute.me'
# end of 'vim/execute.me'
fi
if test ! -d 'vim/macros' ; then
echo shar: Creating directory \"'vim/macros'\"
mkdir 'vim/macros'
fi
if test -f 'vim/macros/center.uue' -a "${1}" != "-c" ; then
echo shar: Will not clobber existing file \"'vim/macros/center.uue'\"
else
echo shar: Extracting \"'vim/macros/center.uue'\" \(274 characters\)
sed "s/^X//" >'vim/macros/center.uue' <<'END_OF_FILE'
X
Xbegin 644 center
XM(E1H:7,@;6%C<F\@8V5N=&5R<R!A(&QI;F4@:6X@86X@.#`@8VAA<F%C=&5R$
XM('-P86-E+@HB0V%R969U;#H@;&EN97,@;&]N9V5R('1H86X@.#`@8VAA<F%CY
XM=&5R<R!W:6QL(&)E('1R=6YC871E9`IM87`@.V-E(#IS+UY;(`E=*B\O#21MS
XB83@Q82`;.#$6?$1@86QL9#`Z<R\@("\@+V<-)'`-:R1X"EY;+
X``
Xend
Xsize 169
END_OF_FILE
if test 274 -ne `wc -c <'vim/macros/center.uue'`; then
echo shar: \"'vim/macros/center.uue'\" unpacked with wrong size!
fi
chmod +x 'vim/macros/center.uue'
# end of 'vim/macros/center.uue'
fi
if test ! -d 'vim/macros/hanoi' ; then
echo shar: Creating directory \"'vim/macros/hanoi'\"
mkdir 'vim/macros/hanoi'
fi
if test -f 'vim/macros/hanoi/click.me' -a "${1}" != "-c" ; then
echo shar: Will not clobber existing file \"'vim/macros/hanoi/click.me'\"
else
echo shar: Extracting \"'vim/macros/hanoi/click.me'\" \(255 characters\)
sed "s/^X//" >'vim/macros/hanoi/click.me' <<'END_OF_FILE'
X
X
XSee Vim solve the towers of Hanoi!
X
XInstructions:
X type ":so hanoi.mac<RETURN>" to load the macros
X type "g" to start it
X
Xand watch it go.
X
X to quit type ":q!<RETURN>"
Xto interrupt type CTRL-C
X
X(This text will disappear as soon as you type "g")
END_OF_FILE
if test 255 -ne `wc -c <'vim/macros/hanoi/click.me'`; then
echo shar: \"'vim/macros/hanoi/click.me'\" unpacked with wrong size!
fi
chmod +x 'vim/macros/hanoi/click.me'
# end of 'vim/macros/hanoi/click.me'
fi
if test -f 'vim/macros/hanoi/hanoi_ma.uue' -a "${1}" != "-c" ; then
echo shar: Will not clobber existing file \"'vim/macros/hanoi/hanoi_ma.uue'\"
else
echo shar: Extracting \"'vim/macros/hanoi/hanoi_ma.uue'\" \(1577 characters\)
sed "s/^X//" >'vim/macros/hanoi/hanoi_ma.uue' <<'END_OF_FILE'
X
Xbegin 644 hanoi.mac
XM<V5T(')E;6%P"G-E="!N;W1E<G-E"G-E="!W<F%P<V-A;@HB('1O('-E="!T[
XM:&4@:&5I9VAT(&]F('1H92!T;W=E<BP@8VAA;F=E('1H92!D:6=I="!I;B!T<
XM:&4@9F]L;&]W:6YG"B(@='=O(&QI;F5S('1O('1H92!H96EG:'0@>6]U('=A1
XM;G0@*'-E;&5C="!F<F]M(#$@=&\@.2D*;6%P('0@-PIM87`A('0@-PIM87`@#
XM3"`Q1R]T#5@O7C`-)%`Q1THD06XD0D=#,&4D6#!%,$8D6"]4#4!F#4!H#21!$
XM,4=*0&8P;"18;B1050IM87`@9R!)3`H*;6%P($H@+UXP6UYT72HD#0IM87`@A
XM6"!X"FUA<"!0('`*;6%P(%4@3`IM87`@02`B9GEL"FUA<"!"(")H>6P*;6%P8
XM($,@(F9P"FUA<"!E(")F>3)L"FUA<"!%(")H<`IM87`@1B`B:'DR;`H*(B!I\
XM;FET:6%L:7-A=&EO;G,Z"B(@2TT)8VQE86YU<"!B=69F97(*(B!9"6-R96%T1
XM92!T;W=E<B!O9B!D97-I<F5D(&AE:6=H=`HB($Y/40EC;W!Y(&ET(&%N9"!I;
XM;G-T97(@82!4"B(@3D\)8V]P>2!T:&ES(&]N90HB(%,)8VAA;F=E(&QA<W0@*
XM8VAA<B!I;G1O(&$@)`HB(%()8VAA;F=E(&QA<W0@8VAA<B!I;B!P<F5V:6]U]
XM<R!L:6YE(&EN=&\@82!N"B(@5`EI;G-E<G0@='=O(&QI;F5S(&-O;G1A:6YI,
XM;F<@82!Z97)O"B(@5@EA9&0@82!L87-T(&QI;F4@8V]N=&%I;FEN9R!A(&)A5
XM8VMS;&%S:`IM87`@22!+35E.3U%.3U-K4E16"@HB8W)E871E(&5M<'1Y(&QI>
XM;F4*;6%P($L@,4=O&PH*(F1E;&5T92!T;R!E;F0@;V8@9FEL90IM87`@32!D9
XM1PH*(GEA;FL@;VYE(&QI;F4*;6%P($X@>7D*"B)P=70*;6%P($\@<`H*(F1EW
XM;&5T92!M;W)E('1H86X@:&5I9VAT+6]F+71O=V5R(&-H87)A8W1E<G,*;6%P)
XM('$@=&QL1`H*(F-R96%T92!A('1O=V5R(&]F(&1E<VER960@:&5I9VAT"FUAC
XM<"!9(&\P,3(S-#4V-S@Y6ALP<0H*(FEN<V5R="!A(%0@:6X@8V]L=6UN(#$*;
XM;6%P(%$@,&E4&PH*(G-U8G-T:71U=&4@;&%S="!C:&%R86-T97(@=VET:"!AG
XM(&X*;6%P(%(@)')N"@HB<W5B<W1I='5T92!L87-T(&-H87)A8W1E<B!W:71H[
XM(&$@)`IM87`@4R`D<B0*"B)I;G-E<G0@='=O(&QI;F5S(&-O;G1A:6YI;F<@$
XM82!Z97)O"FUA<"!4(&MO,`TP#0T;"@HB861D(&$@8F%C:W-L87-H(&%T('1HV
X192!E;F0*;6%P(%8@1V\O&PHP4
X``
Xend
Xsize 1097
END_OF_FILE
if test 1577 -ne `wc -c <'vim/macros/hanoi/hanoi_ma.uue'`; then
echo shar: \"'vim/macros/hanoi/hanoi_ma.uue'\" unpacked with wrong size!
fi
chmod +x 'vim/macros/hanoi/hanoi_ma.uue'
# end of 'vim/macros/hanoi/hanoi_ma.uue'
fi
if test -f 'vim/macros/hanoi/poster' -a "${1}" != "-c" ; then
echo shar: Will not clobber existing file \"'vim/macros/hanoi/poster'\"
else
echo shar: Extracting \"'vim/macros/hanoi/poster'\" \(1259 characters\)
sed "s/^X//" >'vim/macros/hanoi/poster' <<'END_OF_FILE'
XArticle 2913 of alt.sources:
XPath: oce-rd1!hp4nl!mcsun!uunet!munnari.oz.au!metro!cluster!swift!softway!otc!gregm
XFrom: gr...@otc.otca.oz.au (Greg McFarlane)
XNewsgroups: comp.sources.d,alt.sources,comp.editors
XSubject: VI SOLVES HANOI
XMessage-ID: <23...@otc.otca.oz>
XDate: 19 Feb 91 01:32:14 GMT
XSender: ne...@otc.otca.oz
XReply-To: gr...@otc.otca.oz.au (Greg McFarlane)
XOrganization: OTC Development Unit, Australia
XLines: 80
XXref: oce-rd1 comp.sources.d:5702 alt.sources:2913 comp.editors:2313
X
XSubmitted-by: gr...@otc.otca.oz.au
XArchive-name: hanoi.vi.macros/part01
X
XEveryone seems to be writing stupid Tower of Hanoi programs.
XWell, here is the stupidest of them all: the hanoi solving vi macros.
X
XSave this article, unshar it, and run uudecode on hanoi.vi.macros.uu.
XThis will give you the macro file hanoi.vi.macros.
XThen run vi (with no file: just type "vi") and type:
X :so hanoi.vi.macros
X g
Xand watch it go.
X
XThe default height of the tower is 7 but can be easily changed by editing
Xthe macro file.
X
XThe disks aren't actually shown in this version, only numbers representing
Xeach disk, but I believe it is possible to write some macros to show the
Xdisks moving about as well. Any takers?
X
X(For maze solving macros, see alt.sources or comp.editors)
X
XGreg
END_OF_FILE
if test 1259 -ne `wc -c <'vim/macros/hanoi/poster'`; then
echo shar: \"'vim/macros/hanoi/poster'\" unpacked with wrong size!
fi
chmod +x 'vim/macros/hanoi/poster'
# end of 'vim/macros/hanoi/poster'
fi
if test -f 'vim/macros/keyword.uue' -a "${1}" != "-c" ; then
echo shar: Will not clobber existing file \"'vim/macros/keyword.uue'\"
else
echo shar: Extracting \"'vim/macros/keyword.uue'\" \(767 characters\)
sed "s/^X//" >'vim/macros/keyword.uue' <<'END_OF_FILE'
X
Xbegin 644 keyword
XM(B!3;VUE(&AA;F1Y(&ME>7=O<F0M8V]M<&QE=&EO;B!M86-R;W,N"B(@5&AE6
XM('=O<F0@:6X@9G)O;G0@;V8@=&AE(&-U<G-O<B!I<R!T86ME;B!A<R!A('-E,
XM87)C:"!S=')I;F<L('1H92!P<F5V:6]U<PHB('!A<G1I86QL>2!M871C:&ENA
XM9R!W;W)D(&ES(&9O=6YD('=H:6-H('1H96X@<F5P;&%C97,@=&AE('=O<F0@)
XM:6X@9G)O;G0*(B!O9B!T:&4@8W5R<V]R+B!4:&4@;6%C<F]S('=O<FL@:6X@N
XM:6YS97)T(&UO9&4N"B(*(B!>2R!S96%R8VAE<R!B86-K=V%R9"!F;W(@=&AE^
XM(&9I<G-T(&UA=&-H"B(@7DX@<V5A<F-H97,@8F%C:W=A<F0@9F]R('1H92!N0
XM97AT(&UA=&-H("AA9G1E<B!>2RD*(B!>4"!S96%R8VAE<R!F;W)W87)D(&9O\
XM<B!T:&4@<')E=FEO=7,@;6%T8V@@*&%F=&5R(%Y+*0HB"B(@5&AA;FMS('1O-
XM($1A=F4@0V%U9VAE>2X*(@HZ;6%P(2`+(!86%@T;8FUM:3]</!M@;2)N>68-8
XM0&YM;B)N>7=@;6-F#0)N"CIM87`A(`X@+AM@;FYM;B)N>7=@;6-F+@)N"CIM2
X987`A(!`@+AM@;DYM;B)N>7=@;6-F+@)N"AM@[
X``
Xend
Xsize 520
END_OF_FILE
if test 767 -ne `wc -c <'vim/macros/keyword.uue'`; then
echo shar: \"'vim/macros/keyword.uue'\" unpacked with wrong size!
fi
chmod +x 'vim/macros/keyword.uue'
# end of 'vim/macros/keyword.uue'
fi
if test ! -d 'vim/macros/maze' ; then
echo shar: Creating directory \"'vim/macros/maze'\"
mkdir 'vim/macros/maze'
fi
if test -f 'vim/macros/maze/README' -a "${1}" != "-c" ; then
echo shar: Will not clobber existing file \"'vim/macros/maze/README'\"
else
echo shar: Extracting \"'vim/macros/maze/README'\" \(1666 characters\)
sed "s/^X//" >'vim/macros/maze/README' <<'END_OF_FILE'
XTo prove that you can do anything in vi, I wrote a couple of macros that
Xallows vi to solve mazes. It will solve any maze produced by maze.c
Xthat was posted to the net recently.
X
XJust follow this recipe and SEE FOR YOURSELF.
X 1. run uudecode on the file "maze.vi.macros.uu" to
X produce the file "maze.vi.macros"
X (If you can't wait to see the action, jump to step 4)
X 2. compile maze.c with "cc -o maze maze.c"
X 3. run maze > maze.out and input a small number (for example 10 if
X you are on a fast machine, 3-5 if slow) which
X is the size of the maze to produce
X 4. edit the maze (vi maze.out)
X 5. include the macros with the vi command:
X :so maze.vi.macros
X 6. type the letter "g" (for "go") and watch vi solve the maze
X 7. when vi solves the maze, you will see why it lies
X 8. now look at maze.vi.macros and all will be revealed
X
XTested on a sparc, a sun and a pyramid (although maze.c will not compile
Xon the pyramid).
X
XAnyone who can't get the maze.c file to compile, get a new compiler,
Xtry maze.ansi.c which was also posted to the net.
XIf you can get it to compile but the maze comes out looking like a fence
Xand not a maze and you are using SysV or DOS replace the "27" on the
Xlast line of maze.c by "11"
XThanks to John Tromp (tr...@piring.cwi.nl) for maze.c.
XThanks to ant...@nntp-server.caltech.edu (Bill T. Cat) for maze.ansi.c.
X
XAny donations should be in unmarked small denomination bills :^)=.
X
X ACSnet: gr...@otc.otca.oz.au
XGreg McFarlane UUCP: {uunet,mcvax}!otc.otca.oz.au!gregm
X|||| OTC || Snail: OTC R&D GPO Box 7000, Sydney 2001, Australia
X Phone: +61 2 287 3139 Fax: +61 2 287 3299
X
X
END_OF_FILE
if test 1666 -ne `wc -c <'vim/macros/maze/README'`; then
echo shar: \"'vim/macros/maze/README'\" unpacked with wrong size!
fi
chmod +x 'vim/macros/maze/README'
# end of 'vim/macros/maze/README'
fi
if test -f 'vim/macros/maze/makefile' -a "${1}" != "-c" ; then
echo shar: Will not clobber existing file \"'vim/macros/maze/makefile'\"
else
echo shar: Extracting \"'vim/macros/maze/makefile'\" \(104 characters\)
sed "s/^X//" >'vim/macros/maze/makefile' <<'END_OF_FILE'
X#On the amiga with manx C 5.0 we have to use maze.ansi.c
X
Xmaze: maze.ansi.o
X ln maze.ansi.o -o maze -lc
END_OF_FILE
if test 104 -ne `wc -c <'vim/macros/maze/makefile'`; then
echo shar: \"'vim/macros/maze/makefile'\" unpacked with wrong size!
fi
chmod +x 'vim/macros/maze/makefile'
# end of 'vim/macros/maze/makefile'
fi
if test -f 'vim/macros/maze/maze.c' -a "${1}" != "-c" ; then
echo shar: Will not clobber existing file \"'vim/macros/maze/maze.c'\"
else
echo shar: Extracting \"'vim/macros/maze/maze.c'\" \(441 characters\)
sed "s/^X//" >'vim/macros/maze/maze.c' <<'END_OF_FILE'
Xchar*M,A,Z,E=40,J[40],T[40];main(C){for(*J=A=scanf(M="%d",&C);
X-- E; J[ E] =T
X[E ]= E) printf("._"); for(;(A-=Z=!Z) || (printf("\n|"
X) , A = 39 ,C --
X) ; Z || printf (M ))M[Z]=Z[A-(E =A[J-Z])&&!C
X& A == T[ A]
X|6<<27<rand()||!C&!Z?J[T[E]=T[A]]=E,J[T[A]=A-Z]=A,"_.":" |"];}
END_OF_FILE
if test 441 -ne `wc -c <'vim/macros/maze/maze.c'`; then
echo shar: \"'vim/macros/maze/maze.c'\" unpacked with wrong size!
fi
chmod +x 'vim/macros/maze/maze.c'
# end of 'vim/macros/maze/maze.c'
fi
if test -f 'vim/macros/maze/maze_5.78' -a "${1}" != "-c" ; then
echo shar: Will not clobber existing file \"'vim/macros/maze/maze_5.78'\"
else
echo shar: Extracting \"'vim/macros/maze/maze_5.78'\" \(626 characters\)
sed "s/^X//" >'vim/macros/maze/maze_5.78' <<'END_OF_FILE'
X._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._
X| ._| . . ._| | |_._._. . ._|_._._._._. ._|_. ._|_._. ._| . ._|_. | . ._._. |
X| ._|_| |_. | | | | ._._|_._|_._. . |_. | | | ._._| |_._._| | ._. ._| . . |_|
X|_._._._. | ._|_. ._._._. | | ._. |_._. . | ._._| |_. | ._._._. |_. | |_|_| |
X| | . |_._| . ._._._| ._._. ._._| | | |_| . | |_. . ._|_| ._._. |_._|_| . | |
X|_._|_._._._|_._._._|_|_._._._|_._|_._._._|_._._._|_._._._|_._._._._._._|_._|
X
XSee Vim solve a maze!
X
X type ":so maze_mac<RETURN>" to load the macros
X
X type "g" to start
X
Xto interrupt type "<CTRL-C>"
X to quit type ":q!<RETURN>"
X
END_OF_FILE
if test 626 -ne `wc -c <'vim/macros/maze/maze_5.78'`; then
echo shar: \"'vim/macros/maze/maze_5.78'\" unpacked with wrong size!
fi
chmod +x 'vim/macros/maze/maze_5.78'
# end of 'vim/macros/maze/maze_5.78'
fi
if test -f 'vim/macros/maze/maze_ansi.c' -a "${1}" != "-c" ; then
echo shar: Will not clobber existing file \"'vim/macros/maze/maze_ansi.c'\"
else
echo shar: Extracting \"'vim/macros/maze/maze_ansi.c'\" \(441 characters\)
sed "s/^X//" >'vim/macros/maze/maze_ansi.c' <<'END_OF_FILE'
Xchar*M,A,Z,E=40,J[80],T[3];main(C){for(M=J+E,*J=A=scanf("%d",&
XC) ;-- E;J [E ]=M
X[E ]= E) printf("._"); for(;(A-=Z=!Z) || (printf("\n|"
X) , A = 39 ,C --
X) ; Z || printf (T ))T[Z]=Z[A-(E =A[J-Z])&&!C
X& A == M[ A]
X|6<<11<rand()||!C&!Z?J[M[E]=M[A]]=E,J[M[A]=A-Z]=A,"_.":" |"];}
END_OF_FILE
if test 441 -ne `wc -c <'vim/macros/maze/maze_ansi.c'`; then
echo shar: \"'vim/macros/maze/maze_ansi.c'\" unpacked with wrong size!
fi
chmod +x 'vim/macros/maze/maze_ansi.c'
# end of 'vim/macros/maze/maze_ansi.c'
fi
if test -f 'vim/macros/maze/poster' -a "${1}" != "-c" ; then
echo shar: Will not clobber existing file \"'vim/macros/maze/poster'\"
else
echo shar: Extracting \"'vim/macros/maze/poster'\" \(1562 characters\)
sed "s/^X//" >'vim/macros/maze/poster' <<'END_OF_FILE'
XArticle 2846 of alt.sources:
XPath: oce-rd1!hp4nl!mcsun!uunet!munnari.oz.au!metro!otc!gregm
XFrom: gr...@otc.otca.oz.au (Greg McFarlane)
XNewsgroups: alt.sources
XSubject: VI SOLVES MAZE (commented macros)
XMessage-ID: <22...@otc.otca.oz>
XDate: 10 Feb 91 23:31:02 GMT
XSender: ne...@otc.otca.oz
XReply-To: gr...@otc.otca.oz.au (Greg McFarlane)
XOrganization: OTC Development Unit, Australia
XLines: 464
X
XSubmitted-by: gr...@otc.otca.oz.au
XArchive-name: maze_solving_vi_macros
X
XA real working model. See it walk the maze in front of your very own eyes.
X
XTo prove that you can do anything in vi, I wrote a couple of macros that
Xallows vi to solve mazes. It will solve any maze produced by maze.c
Xthat was posted to the alt.sources last month. (Maze.c is also included
Xin this posting as well as an example of its output.)
X
XThe uncommented version of the macros was sent to alt.sources last month.
XHowever, so many people mailed me requesting the commented version of the
Xmacros that I decided to post it. I have made some modifications to the
Xoriginal macros to make them easier to follow and also after I learnt
Xthat you can escape the special meaning of '|' in macros by using '^V|'.
X
XSave this article and unshar it. Then read maze.README.
X
XAfter studying these macros, anyone who cannot write an emacs emulator
Xin vi macros should just curl up and :q!.
X
XComing soon to a newsgroup near you: "Vi macros solve Tower of Hanoi",
Xand a repost of the original "Turing Machine implemented in Vi macros"
X
XAnyone who has a version of these macros for edlin or nroff, please post.
END_OF_FILE
if test 1562 -ne `wc -c <'vim/macros/maze/poster'`; then
echo shar: \"'vim/macros/maze/poster'\" unpacked with wrong size!
fi
chmod +x 'vim/macros/maze/poster'
# end of 'vim/macros/maze/poster'
fi
if test -f 'vim/macros/readme' -a "${1}" != "-c" ; then
echo shar: Will not clobber existing file \"'vim/macros/readme'\"
else
echo shar: Extracting \"'vim/macros/readme'\" \(407 characters\)
sed "s/^X//" >'vim/macros/readme' <<'END_OF_FILE'
XThe macros in the maze and hanoi directories can be used to test Vim for
Xvi compatibility. They have been written for vi to show its unlimited
Xpossibilities.
X
XHANOI are macros that solve the tower of hanoi problem.
XMAZE are macros that solve a maze (amazing!).
X
XThey are unmodified.
X
X
XThe other files contain some handy macros:
X
Xcenter: center current line in 80-character line
Xkeyword: keyword completion
END_OF_FILE
if test 407 -ne `wc -c <'vim/macros/readme'`; then
echo shar: \"'vim/macros/readme'\" unpacked with wrong size!
fi
chmod +x 'vim/macros/readme'
# end of 'vim/macros/readme'
fi
if test -f 'vim/poster' -a "${1}" != "-c" ; then
echo shar: Will not clobber existing file \"'vim/poster'\"
else
echo shar: Extracting \"'vim/poster'\" \(1584 characters\)
sed "s/^X//" >'vim/poster' <<'END_OF_FILE'
XVim - Vi IMproved. A clone of the UNIX text editor Vi. Very useful for
Xediting programs and other plain ASCII text. Full Vi compatibility (except Q
Xcommand, you don't need it). Includes most Ex commands.
X
XExtra features above Vi: Multilevel undo, command line history, improved
Xcommand line editing, command typeahead display, command to display yank
Xbuffers, possibility to edit binary files, line wrapping can be switched off,
Xfile name stack, can be adjusted to understand error messages from any
Xcompiler, shows current file name in window title, on-line help, etc.
X
XVersion 2.0, update to 1.27. Most important changes:
X- 'wrap' option to switch line wrapping on/off
X- filename completion is more like other programs and adjustable
X- automatic detection of CR/LF line separator
X- '-b' command line option to make editing binary files more easy
X- added abbreviation
X- :make command for quickly jumping to errors
X- MSDOS version uses bios calls for screen output, ansi.sys not needed
X- many small changes to make Vim more vi-compatible
X
XPortability: Runs on MSDOS, Amiga and several UNIX versions.
X
XDistribution:
Xcomp.binaries.ibm.pc: vim_dos.zip: MSDOS binary and documentation
X
Xcomp.binaries.amiga: vim_bin.lha: Amiga binary and documentation
X
Xcomp.sources.misc: shell archive with sources and documentation
X
XThe documentation is almost the same for all systems. For MSDOS CR-LF is used
Xfor line separator. For Amiga .info files are included. For the shell archive
Xsome files are uuencoded because of unprintable characters.
X
XVim is charityware. Read uganda.txt for details.
END_OF_FILE
if test 1584 -ne `wc -c <'vim/poster'`; then
echo shar: \"'vim/poster'\" unpacked with wrong size!
fi
chmod +x 'vim/poster'
# end of 'vim/poster'
fi
if test ! -d 'vim/src' ; then
echo shar: Creating directory \"'vim/src'\"
mkdir 'vim/src'
fi
if test -f 'vim/src/addcr.c' -a "${1}" != "-c" ; then
echo shar: Will not clobber existing file \"'vim/src/addcr.c'\"
else
echo shar: Extracting \"'vim/src/addcr.c'\" \(413 characters\)
sed "s/^X//" >'vim/src/addcr.c' <<'END_OF_FILE'
X/*
X * This program, when compiled with Turbo-C, will make <LF> into <CR><LF>
X */
X
X#include <stdio.h>
X
Xmain(argc, argv)
X int argc;
X char **argv;
X{
X char buffer[1024];
X int len;
X
X while ((len = fread(buffer, 1, 1024, stdin)) > 0)
X fwrite(buffer, 1, len, stdout);
X if (ferror(stdin))
X fprintf(stderr, "Error while reading\n");
X if (ferror(stdout))
X fprintf(stderr, "Error while writing\n");
X}
END_OF_FILE
if test 413 -ne `wc -c <'vim/src/addcr.c'`; then
echo shar: \"'vim/src/addcr.c'\" unpacked with wrong size!
fi
chmod +x 'vim/src/addcr.c'
# end of 'vim/src/addcr.c'
fi
if test -f 'vim/src/ascii.h' -a "${1}" != "-c" ; then
echo shar: Will not clobber existing file \"'vim/src/ascii.h'\"
else
echo shar: Extracting \"'vim/src/ascii.h'\" \(794 characters\)
sed "s/^X//" >'vim/src/ascii.h' <<'END_OF_FILE'
X/* vi:ts=4:sw=4
X *
X * VIM - Vi IMproved
X *
X * Code Contributions By: Bram Moolenaar mo...@oce.nl
X * Tim Thompson twitch!tjt
X * Tony Andrews onecom!wldrdg!tony
X * G. R. (Fred) Walter watmath!watcgl!grwalter
X */
X
X/*
X * Definitions of various common control characters
X */
X
X#define NUL '\000'
X#define BS '\010'
X#define BS_STR "\010"
X#define TAB '\011'
X#define NL '\012'
X#define NL_STR "\012"
X#define CR '\015'
X#define ESC '\033'
X#define ESC_STR "\033"
X#define DEL 0x7f
X#define CSI 0x9b
X
X#define Ctrl(x) ((x) & 0x1f)
X#define Meta(x) ((x) | 0x80)
X
X/*
X * character that separates dir names in a path
X */
X#ifdef MSDOS
X# define PATHSEP '\\'
X# define PATHSEPSTR "\\"
X#else
X# define PATHSEP '/'
X# define PATHSEPSTR "/"
X#endif
END_OF_FILE
if test 794 -ne `wc -c <'vim/src/ascii.h'`; then
echo shar: \"'vim/src/ascii.h'\" unpacked with wrong size!
fi
chmod +x 'vim/src/ascii.h'
# end of 'vim/src/ascii.h'
fi
if test -f 'vim/src/debug.h' -a "${1}" != "-c" ; then
echo shar: Will not clobber existing file \"'vim/src/debug.h'\"
else
echo shar: Extracting \"'vim/src/debug.h'\" \(865 characters\)
sed "s/^X//" >'vim/src/debug.h' <<'END_OF_FILE'
X/*
X * debug.h -- my debug header for just any program.
X * use:
X * place the statement OPENDEBUG("/tmp/programdebug"); inside main.
X * Nothing will happen, unless you compile the source with -DDEBUG.
X *
X * jw. 13.4.91.
X */
X#ifndef FILE
X# include <stdio.h>
X#endif
X
X#ifdef DEBUG
X# define debug(x) {fprintf(debugfp,x);fflush(debugfp);}
X# define debug1(x,a) {fprintf(debugfp,x,a);fflush(debugfp);}
X# define debug2(x,a,b) {fprintf(debugfp,x,a,b);fflush(debugfp);}
X# define debug3(x,a,b,c) {fprintf(debugfp,x,a,b,c);fflush(debugfp);}
X# define OPENDEBUG(file)\
X if ((debugfp = fopen(file,"w")) == NULL)\
X { debugfp = stderr;\
X debug1("OPENDEBUG: sorry, cannot open '%s'\n", file);\
X debug(" beware, using stderr!\n");\
X sleep(3);\
X }
X#else
X# define debug(x)
X# define debug1(x,a)
X# define debug2(x,a,b)
X# define debug3(x,a,b,c)
X# define OPENDEBUG(file)
X#endif
END_OF_FILE
if test 865 -ne `wc -c <'vim/src/debug.h'`; then
echo shar: \"'vim/src/debug.h'\" unpacked with wrong size!
fi
chmod +x 'vim/src/debug.h'
# end of 'vim/src/debug.h'
fi
if test -f 'vim/src/macros.h' -a "${1}" != "-c" ; then
echo shar: Will not clobber existing file \"'vim/src/macros.h'\"
else
echo shar: Extracting \"'vim/src/macros.h'\" \(1376 characters\)
sed "s/^X//" >'vim/src/macros.h' <<'END_OF_FILE'
X/* vi:ts=4:sw=4
X *
X * VIM - Vi IMproved
X *
X * Code Contributions By: Bram Moolenaar mo...@oce.nl
X * Tim Thompson twitch!tjt
X * Tony Andrews onecom!wldrdg!tony
X * G. R. (Fred) Walter watmath!watcgl!grwalter
X */
X
X/*
X * macros.h: macro definitions for often used code
X */
X
X/*
X * pchar(lp, c) - put character 'c' at position 'lp'
X */
X#define pchar(lp, c) (*(nr2ptr((lp).lnum) + (lp).col) = (c))
X
X/*
X * Position comparisons
X */
X#define lt(a, b) (((a).lnum != (b).lnum) \
X ? ((a).lnum < (b).lnum) : ((a).col < (b).col))
X
X#define ltoreq(a, b) (((a).lnum != (b).lnum) \
X ? ((a).lnum < (b).lnum) : ((a).col <= (b).col))
X
X#define equal(a, b) (((a).lnum == (b).lnum) && ((a).col == (b).col))
X
X/*
X * buf1line() - return TRUE if there is only one line in file buffer
X */
X#define buf1line() (line_count == 1)
X
X/*
X * lineempty() - return TRUE if the line is empty
X */
X#define lineempty(p) (*nr2ptr(p) == NUL)
X
X/*
X * bufempty() - return TRUE if the file buffer is empty
X */
X#define bufempty() (buf1line() && lineempty((linenr_t)1))
X
X/*
X * On some systems toupper()/tolower() only work on lower/uppercase characters
X */
X#if defined(sequent) || defined(DOMAIN) || !defined(__STDC__)
X# define TO_UPPER(c) (islower(c) ? toupper(c) : (c))
X# define TO_LOWER(c) (isupper(c) ? tolower(c) : (c))
X#else
X# define TO_UPPER toupper
X# define TO_LOWER tolower
X#endif
END_OF_FILE
if test 1376 -ne `wc -c <'vim/src/macros.h'`; then
echo shar: \"'vim/src/macros.h'\" unpacked with wrong size!
fi
chmod +x 'vim/src/macros.h'
# end of 'vim/src/macros.h'
fi
if test -f 'vim/src/mark.h' -a "${1}" != "-c" ; then
echo shar: Will not clobber existing file \"'vim/src/mark.h'\"
else
echo shar: Extracting \"'vim/src/mark.h'\" \(545 characters\)
sed "s/^X//" >'vim/src/mark.h' <<'END_OF_FILE'
X/* vi:ts=4:sw=4
X *
X * VIM - Vi IMproved
X *
X * Code Contributions By: Bram Moolenaar mo...@oce.nl
X * Tim Thompson twitch!tjt
X * Tony Andrews onecom!wldrdg!tony
X * G. R. (Fred) Walter watmath!watcgl!grwalter
X */
X
X/*
X * mark.h: definitions shared between tag.c and mark.c
X */
X
Xstruct mark
X{
X char *ptr;
X colnr_t col;
X};
X
Xstruct filemark
X{
X struct mark mark; /* cursor position */
X linenr_t lnum; /* last known line number */
X int fnum; /* file number */
X};
X
Xchar *fm_getname __ARGS((struct filemark *));
END_OF_FILE
if test 545 -ne `wc -c <'vim/src/mark.h'`; then
echo shar: \"'vim/src/mark.h'\" unpacked with wrong size!
fi
chmod +x 'vim/src/mark.h'
# end of 'vim/src/mark.h'
fi
if test -f 'vim/src/mkcmdtab.c' -a "${1}" != "-c" ; then
echo shar: Will not clobber existing file \"'vim/src/mkcmdtab.c'\"
else
echo shar: Extracting \"'vim/src/mkcmdtab.c'\" \(2065 characters\)
sed "s/^X//" >'vim/src/mkcmdtab.c' <<'END_OF_FILE'
X/* vi:ts=4:sw=4
X *
X * VIM - Vi IMproved
X *
X * Code Contributions By: Bram Moolenaar mo...@oce.nl
X * Tim Thompson twitch!tjt
X * Tony Andrews onecom!wldrdg!tony
X * G. R. (Fred) Walter watmath!watcgl!grwalter
X */
X
X/*
X * mkcmdtab.c: separate program that reads cmdtab.tab and produces cmdtab.h
X *
X * call with: mkcmdtab cmdtab.tab cmdtab.h
X */
X
X#include "vim.h"
X
X#if defined(UTS4)
X int
X#else
X void
X#endif
Xmain(argc, argv)
X int argc;
X char **argv;
X{
X register int c;
X char buffer[100];
X int count;
X int i;
X FILE *ifp, *ofp;
X
X if (argc != 3)
X {
X fprintf(stderr, "Usage: mkcmdtab cmdtab.tab cmdtab.h\n");
X exit(10);
X }
X ifp = fopen(argv[1], "r");
X if (ifp == NULL)
X {
X perror(argv[1]);
X exit(10);
X }
X ofp = fopen(argv[2], "w");
X if (ofp == NULL)
X {
X perror(argv[2]);
X exit(10);
X }
X
X while ((c = getc(ifp)) != '|' && c != EOF)
X putc(c, ofp);
X fprintf(ofp, "THIS FILE IS AUTOMATICALLY PRODUCED - DO NOT EDIT");
X while ((c = getc(ifp)) != '|' && c != EOF)
X ;
X while ((c = getc(ifp)) != '|' && c != EOF)
X putc(c, ofp);
X
X count = 0;
X while ((c = getc(ifp)) != '|' && c != EOF)
X {
X putc(c, ofp);
X while ((c = getc(ifp)) != '"' && c != EOF)
X putc(c, ofp);
X putc(c, ofp);
X
X i = 0;
X while ((c = getc(ifp)) != '"' && c != EOF)
X {
X putc(c, ofp);
X buffer[i++] = c;
X }
X putc(c, ofp);
X buffer[i] = 0;
X
X while ((c = getc(ifp)) != '\n' && c != EOF)
X putc(c, ofp);
X putc(c, ofp);
X
X switch (buffer[0])
X {
X case '@': strcpy(buffer, "at");
X break;
X case '!': strcpy(buffer, "bang");
X break;
X case '<': strcpy(buffer, "lshift");
X break;
X case '>': strcpy(buffer, "rshift");
X break;
X case '=': strcpy(buffer, "equal");
X break;
X case '&': strcpy(buffer, "and");
X break;
X case '~': strcpy(buffer, "tilde");
X break;
X }
X
X fprintf(ofp, "#define CMD_%s %d\n", buffer, count++);
X }
X
X fprintf(ofp, "#define CMD_SIZE %d\n", count);
X
X while ((c = getc(ifp)) != '|' && c != EOF)
X putc(c, ofp);
X
X if (c != '|')
X {
X fprintf(stderr, "not enough |'s\n");
X exit(1);
X }
X exit(0);
X}
END_OF_FILE
if test 2065 -ne `wc -c <'vim/src/mkcmdtab.c'`; then
echo shar: \"'vim/src/mkcmdtab.c'\" unpacked with wrong size!
fi
chmod +x 'vim/src/mkcmdtab.c'
# end of 'vim/src/mkcmdtab.c'
fi
if test -f 'vim/src/ops.h' -a "${1}" != "-c" ; then
echo shar: Will not clobber existing file \"'vim/src/ops.h'\"
else
echo shar: Extracting \"'vim/src/ops.h'\" \(1955 characters\)
sed "s/^X//" >'vim/src/ops.h' <<'END_OF_FILE'
X/* vi:ts=4:sw=4
X *
X * VIM - Vi IMproved
X *
X * Code Contributions By: Bram Moolenaar mo...@oce.nl
X * Tim Thompson twitch!tjt
X * Tony Andrews onecom!wldrdg!tony
X * G. R. (Fred) Walter watmath!watcgl!grwalter
X */
X
X/*
X * ops.h: things shared between normal.c, cmdline.c and ops.c
X */
X
X/*
X * Operators
X */
X#define NOP 0 /* no pending operation */
X#define DELETE 1
X#define YANK 2
X#define CHANGE 3
X#define LSHIFT 4
X#define RSHIFT 5
X#define FILTER 6
X#define TILDE 7
X#define INDENT 8
X#define FORMAT 9
X#define COLON 10
X#define UPPER 11
X#define LOWER 12
X
X/*
X * operator characters; the order must correspond to the defines above
X */
XEXTERN char *opchars INIT(= "dyc<>!~=Q:Uu");
X
X/*
X * When a cursor motion command is made, it is marked as being a character or
X * line oriented motion. Then, if an operator is in effect, the operation
X * becomes character or line oriented accordingly.
X *
X * Character motions are marked as being inclusive or not. Most char. motions
X * are inclusive, but some (e.g. 'w') are not.
X *
X * Generally speaking, every command in normal() should either clear any pending
X * operator (with CLEAROP), or set the motion type variable.
X */
X
X/*
X * Motion types
X */
X#define MBAD (-1) /* 'bad' motion type marks unusable yank buf */
X#define MCHAR 0
X#define MLINE 1
X#define MBLOCK 2
X
XEXTERN int operator INIT(= NOP); /* current pending operator */
XEXTERN int mtype; /* type of the current cursor motion */
XEXTERN int mincl; /* true if char motion is inclusive */
XEXTERN FPOS startop; /* cursor pos. at start of operator */
XEXTERN FPOS endop; /* cursor pos. at end of operator */
XEXTERN colnr_t startvcol; /* start col for block mode operator */
XEXTERN colnr_t endvcol; /* end col for block mode operator */
XEXTERN long nlines; /* lines between startop and endop + 1 */
XEXTERN int yankbuffer INIT(= 0); /* current yank buffer */
XEXTERN int no_op; /* startop and endop the same */
END_OF_FILE
if test 1955 -ne `wc -c <'vim/src/ops.h'`; then
echo shar: \"'vim/src/ops.h'\" unpacked with wrong size!
fi
chmod +x 'vim/src/ops.h'
# end of 'vim/src/ops.h'
fi
if test ! -d 'vim/src/proto' ; then
echo shar: Creating directory \"'vim/src/proto'\"
mkdir 'vim/src/proto'
fi
if test -f 'vim/src/proto.h' -a "${1}" != "-c" ; then
echo shar: Will not clobber existing file \"'vim/src/proto.h'\"
else
echo shar: Extracting \"'vim/src/proto.h'\" \(1269 characters\)
sed "s/^X//" >'vim/src/proto.h' <<'END_OF_FILE'
X/*
X * proto.h: include the (automatically generated) function prototypes
X *
X * the proto/xxx.pro files are automatically generated when using Manx/Aztec C.
X * For other compilers you will have to edit them.
X */
X
X#include "regexp.h" /* for struct regexp */
X
X/*
X * Machine-dependent routines.
X */
X#ifdef AMIGA
X# include "proto/amiga.pro"
X#endif
X#ifdef UNIX
X# include "unix.h"
X#endif
X#ifdef MSDOS
X# include "msdos.h"
X#endif
X
X#include "proto/alloc.pro"
X#include "proto/buffers.pro"
X#include "proto/charset.pro"
X#include "proto/cmdline.pro"
X#include "proto/csearch.pro"
X#include "proto/digraph.pro"
X#include "proto/edit.pro"
X#include "proto/fileio.pro"
X#include "proto/help.pro"
X#include "proto/linefunc.pro"
X#include "proto/main.pro"
X#include "proto/mark.pro"
X
X#ifndef MESSAGE
Xvoid smsg __PARMS((char *, ...)); /* cannot be produced automatically */
X#endif
X#include "proto/message.pro"
X#include "proto/misccmds.pro"
X#include "proto/normal.pro"
X#include "proto/ops.pro"
X#include "proto/param.pro"
X#include "proto/quickfix.pro"
X#include "proto/regexp.pro"
X#include "proto/regsub.pro"
X#include "proto/screen.pro"
X#include "proto/script.pro"
X#include "proto/search.pro"
X#include "proto/storage.pro"
X#include "proto/tag.pro"
X#include "proto/term.pro"
X#include "proto/undo.pro"
END_OF_FILE
if test 1269 -ne `wc -c <'vim/src/proto.h'`; then
echo shar: \"'vim/src/proto.h'\" unpacked with wrong size!
fi
chmod +x 'vim/src/proto.h'
# end of 'vim/src/proto.h'
fi
if test -f 'vim/src/proto/alloc.pro' -a "${1}" != "-c" ; then
echo shar: Will not clobber existing file \"'vim/src/proto/alloc.pro'\"
else
echo shar: Extracting \"'vim/src/proto/alloc.pro'\" \(261 characters\)
sed "s/^X//" >'vim/src/proto/alloc.pro' <<'END_OF_FILE'
X/* alloc.c */
Xchar *alloc __PARMS((unsigned int size));
Xchar *lalloc __PARMS((unsigned long size, int message));
Xchar *strsave __PARMS((char *string));
Xchar *strnsave __PARMS((char *string, int len));
Xvoid copy_spaces __PARMS((char *ptr, unsigned long count));
END_OF_FILE
if test 261 -ne `wc -c <'vim/src/proto/alloc.pro'`; then
echo shar: \"'vim/src/proto/alloc.pro'\" unpacked with wrong size!
fi
chmod +x 'vim/src/proto/alloc.pro'
# end of 'vim/src/proto/alloc.pro'
fi
if test -f 'vim/src/proto/amiga.pro' -a "${1}" != "-c" ; then
echo shar: Will not clobber existing file \"'vim/src/proto/amiga.pro'\"
else
echo shar: Extracting \"'vim/src/proto/amiga.pro'\" \(1207 characters\)
sed "s/^X//" >'vim/src/proto/amiga.pro' <<'END_OF_FILE'
X/* amiga.c */
Xvoid win_resize_on __PARMS((void));
Xvoid win_resize_off __PARMS((void));
Xvoid mch_write __PARMS((char *p, int len));
Xint GetChars __PARMS((char *buf, int maxlen, int time));
Xvoid sleep __PARMS((int n));
Xvoid vim_delay __PARMS((void));
Xvoid mch_suspend __PARMS((void));
Xvoid mch_windinit __PARMS((void));
Xvoid check_win __PARMS((int argc, char **argv));
Xvoid fname_case __PARMS((char *name));
Xvoid settitle __PARMS((char *str));
Xvoid resettitle __PARMS((void));
Xint dirname __PARMS((char *buf, int len));
Xint FullName __PARMS((char *fname, char *buf, int len));
Xlong getperm __PARMS((char *name));
Xint setperm __PARMS((char *name, long perm));
Xint isdir __PARMS((char *name));
Xvoid mch_windexit __PARMS((int r));
Xvoid mch_settmode __PARMS((int raw));
Xint mch_get_winsize __PARMS((void));
Xvoid mch_set_winsize __PARMS((void));
Xint call_shell __PARMS((char *cmd, int filter, int cooked));
Xvoid breakcheck __PARMS((void));
Xlong Chk_Abort __PARMS((void));
Xint ExpandWildCards __PARMS((int num_pat, char **pat, int *num_file, char ***file, int files_only, int list_notfound));
Xvoid FreeWild __PARMS((int num, char **file));
Xint has_wildcard __PARMS((char *p));
Xchar *vimgetenv __PARMS((char *var));
END_OF_FILE
if test 1207 -ne `wc -c <'vim/src/proto/amiga.pro'`; then
echo shar: \"'vim/src/proto/amiga.pro'\" unpacked with wrong size!
fi
chmod +x 'vim/src/proto/amiga.pro'
# end of 'vim/src/proto/amiga.pro'
fi
if test -f 'vim/src/proto/buffers.pro' -a "${1}" != "-c" ; then
echo shar: Will not clobber existing file \"'vim/src/proto/buffers.pro'\"
else
echo shar: Extracting \"'vim/src/proto/buffers.pro'\" \(1043 characters\)
sed "s/^X//" >'vim/src/proto/buffers.pro' <<'END_OF_FILE'
X/* buffers.c */
Xunsigned char *get_recorded __PARMS((void));
Xunsigned char *get_inserted __PARMS((void));
Xint stuff_empty __PARMS((void));
Xvoid flush_buffers __PARMS((int typeahead));
Xvoid ResetRedobuff __PARMS((void));
Xvoid AppendToRedobuff __PARMS((char *s));
Xvoid AppendCharToRedobuff __PARMS((int c));
Xvoid AppendNumberToRedobuff __PARMS((long n));
Xvoid stuffReadbuff __PARMS((char *s));
Xvoid stuffcharReadbuff __PARMS((int c));
Xvoid stuffnumReadbuff __PARMS((long n));
Xvoid copy_redo __PARMS((void));
Xint start_redo __PARMS((long count));
Xint start_redo_ins __PARMS((void));
Xvoid set_redo_ins __PARMS((void));
Xvoid stop_redo_ins __PARMS((void));
Xint ins_typestr __PARMS((char *str, int noremap));
Xvoid del_typestr __PARMS((int len));
Xunsigned char vgetc __PARMS((void));
Xunsigned char vpeekc __PARMS((void));
Xint domap __PARMS((int maptype, char *keys, int mode));
Xint check_abbr __PARMS((int c, char *ptr, int col, int mincol));
Xint makemap __PARMS((struct __stdio *fd));
Xint putescstr __PARMS((struct __stdio *fd, char *str, int set));
END_OF_FILE
if test 1043 -ne `wc -c <'vim/src/proto/buffers.pro'`; then
echo shar: \"'vim/src/proto/buffers.pro'\" unpacked with wrong size!
fi
chmod +x 'vim/src/proto/buffers.pro'
# end of 'vim/src/proto/buffers.pro'
fi
if test -f 'vim/src/proto/charset.pro' -a "${1}" != "-c" ; then
echo shar: Will not clobber existing file \"'vim/src/proto/charset.pro'\"
else
echo shar: Extracting \"'vim/src/proto/charset.pro'\" \(240 characters\)
sed "s/^X//" >'vim/src/proto/charset.pro' <<'END_OF_FILE'
X/* charset.c */
Xchar *transchar __PARMS((unsigned int c));
Xint outtrans __PARMS((char *str, int len));
Xint charsize __PARMS((int c));
Xint strsize __PARMS((char *s));
Xint chartabsize __PARMS((int c, int col));
Xint isidchar __PARMS((int c));
END_OF_FILE
if test 240 -ne `wc -c <'vim/src/proto/charset.pro'`; then
echo shar: \"'vim/src/proto/charset.pro'\" unpacked with wrong size!
fi
chmod +x 'vim/src/proto/charset.pro'
# end of 'vim/src/proto/charset.pro'
fi
if test -f 'vim/src/proto/cmdline.pro' -a "${1}" != "-c" ; then
echo shar: Will not clobber existing file \"'vim/src/proto/cmdline.pro'\"
else
echo shar: Extracting \"'vim/src/proto/cmdline.pro'\" \(607 characters\)
sed "s/^X//" >'vim/src/proto/cmdline.pro' <<'END_OF_FILE'
X/* cmdline.c */
Xint getcmdline __PARMS((int firstc, unsigned char *buff));
Xvoid redrawcmdline __PARMS((void));
Xvoid redrawcmd __PARMS((void));
Xvoid docmdline __PARMS((unsigned char *cmdline));
Xvoid gotocmdline __PARMS((int clr, int firstc));
Xvoid gotocmdend __PARMS((void));
Xint check_fname __PARMS((void));
Xint getfile __PARMS((char *fname, char *sfname, int setpm));
Xint samealtfile __PARMS((int n));
Xint getaltfile __PARMS((int n, long lnum, int setpm));
Xchar *getaltfname __PARMS((int n));
Xchar *ExpandOne __PARMS((unsigned char *str, int list_notfound, int mode));
Xint dosource __PARMS((char *fname));
END_OF_FILE
if test 607 -ne `wc -c <'vim/src/proto/cmdline.pro'`; then
echo shar: \"'vim/src/proto/cmdline.pro'\" unpacked with wrong size!
fi
chmod +x 'vim/src/proto/cmdline.pro'
# end of 'vim/src/proto/cmdline.pro'
fi
if test -f 'vim/src/proto/csearch.pro' -a "${1}" != "-c" ; then
echo shar: Will not clobber existing file \"'vim/src/proto/csearch.pro'\"
else
echo shar: Extracting \"'vim/src/proto/csearch.pro'\" \(158 characters\)
sed "s/^X//" >'vim/src/proto/csearch.pro' <<'END_OF_FILE'
X/* csearch.c */
Xvoid dosub __PARMS((long lp, long up, char *cmd, unsigned char **nextcommand));
Xvoid doglob __PARMS((int type, long lp, long up, char *cmd));
END_OF_FILE
if test 158 -ne `wc -c <'vim/src/proto/csearch.pro'`; then
echo shar: \"'vim/src/proto/csearch.pro'\" unpacked with wrong size!
fi
chmod +x 'vim/src/proto/csearch.pro'
# end of 'vim/src/proto/csearch.pro'
fi
if test -f 'vim/src/proto/digraph.pro' -a "${1}" != "-c" ; then
echo shar: Will not clobber existing file \"'vim/src/proto/digraph.pro'\"
else
echo shar: Extracting \"'vim/src/proto/digraph.pro'\" \(169 characters\)
sed "s/^X//" >'vim/src/proto/digraph.pro' <<'END_OF_FILE'
X/* digraph.c */
Xint dodigraph __PARMS((int c));
Xint getdigraph __PARMS((int char1, int char2));
Xvoid putdigraph __PARMS((char *str));
Xvoid listdigraphs __PARMS((void));
END_OF_FILE
if test 169 -ne `wc -c <'vim/src/proto/digraph.pro'`; then
echo shar: \"'vim/src/proto/digraph.pro'\" unpacked with wrong size!
fi
chmod +x 'vim/src/proto/digraph.pro'
# end of 'vim/src/proto/digraph.pro'
fi
if test -f 'vim/src/proto/edit.pro' -a "${1}" != "-c" ; then
echo shar: Will not clobber existing file \"'vim/src/proto/edit.pro'\"
else
echo shar: Extracting \"'vim/src/proto/edit.pro'\" \(389 characters\)
sed "s/^X//" >'vim/src/proto/edit.pro' <<'END_OF_FILE'
X/* edit.c */
Xvoid edit __PARMS((long count));
Xint get_literal __PARMS((int *nextc));
Xvoid insertchar __PARMS((unsigned int c));
Xint oneright __PARMS((void));
Xint oneleft __PARMS((void));
Xvoid beginline __PARMS((int flag));
Xint oneup __PARMS((long n));
Xint onedown __PARMS((long n));
Xint onepage __PARMS((int dir, long count));
Xvoid stuff_inserted __PARMS((int c, long count, int no_esc));
END_OF_FILE
if test 389 -ne `wc -c <'vim/src/proto/edit.pro'`; then
echo shar: \"'vim/src/proto/edit.pro'\" unpacked with wrong size!
fi
chmod +x 'vim/src/proto/edit.pro'
# end of 'vim/src/proto/edit.pro'
fi
if test -f 'vim/src/proto/fileio.pro' -a "${1}" != "-c" ; then
echo shar: Will not clobber existing file \"'vim/src/proto/fileio.pro'\"
else
echo shar: Extracting \"'vim/src/proto/fileio.pro'\" \(244 characters\)
sed "s/^X//" >'vim/src/proto/fileio.pro' <<'END_OF_FILE'
X/* fileio.c */
Xvoid filemess __PARMS((char *name, char *s));
Xint readfile __PARMS((char *fname, char *sfname, long from, int newfile));
Xint writeit __PARMS((char *fname, char *sfname, long start, long end, int append, int forceit, int whole));
END_OF_FILE
if test 244 -ne `wc -c <'vim/src/proto/fileio.pro'`; then
echo shar: \"'vim/src/proto/fileio.pro'\" unpacked with wrong size!
fi
chmod +x 'vim/src/proto/fileio.pro'
# end of 'vim/src/proto/fileio.pro'
fi
if test -f 'vim/src/proto/help.pro' -a "${1}" != "-c" ; then
echo shar: Will not clobber existing file \"'vim/src/proto/help.pro'\"
else
echo shar: Extracting \"'vim/src/proto/help.pro'\" \(72 characters\)
sed "s/^X//" >'vim/src/proto/help.pro' <<'END_OF_FILE'
X/* help.c */
Xvoid help __PARMS((void));
Xint redrawhelp __PARMS((void));
END_OF_FILE
if test 72 -ne `wc -c <'vim/src/proto/help.pro'`; then
echo shar: \"'vim/src/proto/help.pro'\" unpacked with wrong size!
fi
chmod +x 'vim/src/proto/help.pro'
# end of 'vim/src/proto/help.pro'
fi
if test -f 'vim/src/proto/linefunc.pro' -a "${1}" != "-c" ; then
echo shar: Will not clobber existing file \"'vim/src/proto/linefunc.pro'\"
else
echo shar: Extracting \"'vim/src/proto/linefunc.pro'\" \(306 characters\)
sed "s/^X//" >'vim/src/proto/linefunc.pro' <<'END_OF_FILE'
X/* linefunc.c */
Xvoid coladvance __PARMS((unsigned int wcol));
Xint inc __PARMS((struct fpos *lp));
Xint incCurpos __PARMS((void));
Xint incl __PARMS((struct fpos *lp));
Xint dec __PARMS((struct fpos *lp));
Xint decCurpos __PARMS((void));
Xint decl __PARMS((struct fpos *lp));
Xvoid adjustCurpos __PARMS((void));
END_OF_FILE
if test 306 -ne `wc -c <'vim/src/proto/linefunc.pro'`; then
echo shar: \"'vim/src/proto/linefunc.pro'\" unpacked with wrong size!
fi
chmod +x 'vim/src/proto/linefunc.pro'
# end of 'vim/src/proto/linefunc.pro'
fi
if test -f 'vim/src/proto/main.pro' -a "${1}" != "-c" ; then
echo shar: Will not clobber existing file \"'vim/src/proto/main.pro'\"
else
echo shar: Extracting \"'vim/src/proto/main.pro'\" \(87 characters\)
sed "s/^X//" >'vim/src/proto/main.pro' <<'END_OF_FILE'
X/* main.c */
Xvoid main __PARMS((int argc, char **argv));
Xvoid getout __PARMS((int r));
END_OF_FILE
if test 87 -ne `wc -c <'vim/src/proto/main.pro'`; then
echo shar: \"'vim/src/proto/main.pro'\" unpacked with wrong size!
fi
chmod +x 'vim/src/proto/main.pro'
# end of 'vim/src/proto/main.pro'
fi
if test -f 'vim/src/proto/mark.pro' -a "${1}" != "-c" ; then
echo shar: Will not clobber existing file \"'vim/src/proto/mark.pro'\"
else
echo shar: Extracting \"'vim/src/proto/mark.pro'\" \(433 characters\)
sed "s/^X//" >'vim/src/proto/mark.pro' <<'END_OF_FILE'
X/* mark.c */
Xint setmark __PARMS((int c));
Xvoid setpcmark __PARMS((void));
Xstruct fpos *movemark __PARMS((int count));
Xstruct fpos *getmark __PARMS((int c, int changefile));
Xvoid clrallmarks __PARMS((void));
Xvoid incrmarks __PARMS((void));
Xvoid decrmarks __PARMS((void));
Xvoid adjustmark __PARMS((char *old, char *new));
Xchar *fm_getname __PARMS((struct filemark *fmark));
Xvoid domarks __PARMS((void));
Xvoid dojumps __PARMS((void));
END_OF_FILE
if test 433 -ne `wc -c <'vim/src/proto/mark.pro'`; then
echo shar: \"'vim/src/proto/mark.pro'\" unpacked with wrong size!
fi
chmod +x 'vim/src/proto/mark.pro'
# end of 'vim/src/proto/mark.pro'
fi
if test -f 'vim/src/proto/message.pro' -a "${1}" != "-c" ; then
echo shar: Will not clobber existing file \"'vim/src/proto/message.pro'\"
else
echo shar: Extracting \"'vim/src/proto/message.pro'\" \(250 characters\)
sed "s/^X//" >'vim/src/proto/message.pro' <<'END_OF_FILE'
X/* message.c */
Xvoid msg __PARMS((char *s));
Xvoid emsg __PARMS((char *s));
Xvoid emsg2 __PARMS((char *s, char *a1));
Xvoid wait_return __PARMS((int redraw));
Xvoid start_msg __PARMS((void));
Xvoid end_msg __PARMS((void));
Xvoid check_msg __PARMS((void));
END_OF_FILE
if test 250 -ne `wc -c <'vim/src/proto/message.pro'`; then
echo shar: \"'vim/src/proto/message.pro'\" unpacked with wrong size!
fi
chmod +x 'vim/src/proto/message.pro'
# end of 'vim/src/proto/message.pro'
fi
if test -f 'vim/src/proto/misccmds.pro' -a "${1}" != "-c" ; then
echo shar: Will not clobber existing file \"'vim/src/proto/misccmds.pro'\"
else
echo shar: Extracting \"'vim/src/proto/misccmds.pro'\" \(1208 characters\)
sed "s/^X//" >'vim/src/proto/misccmds.pro' <<'END_OF_FILE'
X/* misccmds.c */
Xint get_indent __PARMS((void));
Xvoid set_indent __PARMS((int size, int delete));
Xint Opencmd __PARMS((int dir, int redraw, int delspaces));
Xint plines __PARMS((long p));
Xint plines_m __PARMS((long first, long last));
Xvoid fileinfo __PARMS((int fullname));
Xvoid setfname __PARMS((char *s, char *ss));
Xint otherfile __PARMS((char *s));
Xvoid maketitle __PARMS((void));
Xvoid inschar __PARMS((int c));
Xvoid insstr __PARMS((char *s));
Xint delchar __PARMS((int fixpos));
Xvoid dellines __PARMS((long nlines, int doscreen, int undo));
Xint gchar __PARMS((struct fpos *pos));
Xint gcharCurpos __PARMS((void));
Xvoid pcharCurpos __PARMS((int c));
Xint inindent __PARMS((void));
Xvoid skipspace __PARMS((char **pp));
Xvoid skiptospace __PARMS((char **pp));
Xvoid skiptodigit __PARMS((char **pp));
Xlong getdigits __PARMS((char **pp));
Xchar *plural __PARMS((long n));
Xvoid set_Changed __PARMS((void));
Xvoid change_warning __PARMS((void));
Xint ask_yesno __PARMS((char *str));
Xvoid msgmore __PARMS((long n));
Xvoid beep __PARMS((void));
Xvoid expand_env __PARMS((char *src, char *dst, int dstlen));
Xint fullpathcmp __PARMS((char *s1, char *s2));
Xchar *gettail __PARMS((char *fname));
Xint ispathsep __PARMS((int c));
END_OF_FILE
if test 1208 -ne `wc -c <'vim/src/proto/misccmds.pro'`; then
echo shar: \"'vim/src/proto/misccmds.pro'\" unpacked with wrong size!
fi
chmod +x 'vim/src/proto/misccmds.pro'
# end of 'vim/src/proto/misccmds.pro'
fi
if test -f 'vim/src/proto/normal.pro' -a "${1}" != "-c" ; then
echo shar: Will not clobber existing file \"'vim/src/proto/normal.pro'\"
else
echo shar: Extracting \"'vim/src/proto/normal.pro'\" \(44 characters\)
sed "s/^X//" >'vim/src/proto/normal.pro' <<'END_OF_FILE'
X/* normal.c */
Xvoid normal __PARMS((void));
END_OF_FILE
if test 44 -ne `wc -c <'vim/src/proto/normal.pro'`; then
echo shar: \"'vim/src/proto/normal.pro'\" unpacked with wrong size!
fi
chmod +x 'vim/src/proto/normal.pro'
# end of 'vim/src/proto/normal.pro'
fi
if test -f 'vim/src/proto/ops.pro' -a "${1}" != "-c" ; then
echo shar: Will not clobber existing file \"'vim/src/proto/ops.pro'\"
else
echo shar: Extracting \"'vim/src/proto/ops.pro'\" \(757 characters\)
sed "s/^X//" >'vim/src/proto/ops.pro' <<'END_OF_FILE'
X/* ops.c */
Xvoid doshift __PARMS((int op));
Xvoid shift_line __PARMS((int left, int round));
Xint dorecord __PARMS((int c));
Xint doexecbuf __PARMS((int c));
Xint insertbuf __PARMS((int c));
Xvoid dodelete __PARMS((void));
Xvoid dotilde __PARMS((void));
Xvoid swapchar __PARMS((struct fpos *pos));
Xvoid dochange __PARMS((void));
Xvoid init_yank __PARMS((void));
Xint doyank __PARMS((int deleting));
Xvoid doput __PARMS((int dir, long count));
Xvoid dodis __PARMS((void));
Xvoid dodojoin __PARMS((long count, int insert_space, int redraw));
Xint dojoin __PARMS((int insert_space, int redraw));
Xvoid doformat __PARMS((void));
Xvoid startinsert __PARMS((int initstr, int startln, long count));
Xint doaddsub __PARMS((int c, long Prenum1));
Xint startinmargin __PARMS((void));
END_OF_FILE
if test 757 -ne `wc -c <'vim/src/proto/ops.pro'`; then
echo shar: \"'vim/src/proto/ops.pro'\" unpacked with wrong size!
fi
chmod +x 'vim/src/proto/ops.pro'
# end of 'vim/src/proto/ops.pro'
fi
if test -f 'vim/src/proto/param.pro' -a "${1}" != "-c" ; then
echo shar: Will not clobber existing file \"'vim/src/proto/param.pro'\"
else
echo shar: Extracting \"'vim/src/proto/param.pro'\" \(229 characters\)
sed "s/^X//" >'vim/src/proto/param.pro' <<'END_OF_FILE'
X/* param.c */
Xvoid set_init __PARMS((void));
Xint doset __PARMS((char *arg));
Xvoid paramchanged __PARMS((char *arg));
Xint makeset __PARMS((struct __stdio *fd));
Xvoid clear_termparam __PARMS((void));
Xvoid comp_col __PARMS((void));
END_OF_FILE
if test 229 -ne `wc -c <'vim/src/proto/param.pro'`; then
echo shar: \"'vim/src/proto/param.pro'\" unpacked with wrong size!
fi
chmod +x 'vim/src/proto/param.pro'
# end of 'vim/src/proto/param.pro'
fi
if test -f 'vim/src/proto/quickfix.pro' -a "${1}" != "-c" ; then
echo shar: Will not clobber existing file \"'vim/src/proto/quickfix.pro'\"
else
echo shar: Extracting \"'vim/src/proto/quickfix.pro'\" \(202 characters\)
sed "s/^X//" >'vim/src/proto/quickfix.pro' <<'END_OF_FILE'
X/* quickfix.c */
Xint qf_init __PARMS((void));
Xvoid qf_jump __PARMS((int errornr));
Xvoid qf_list __PARMS((void));
Xvoid qf_clrallmarks __PARMS((void));
Xvoid qf_adjustmark __PARMS((char *old, char *new));
END_OF_FILE
if test 202 -ne `wc -c <'vim/src/proto/quickfix.pro'`; then
echo shar: \"'vim/src/proto/quickfix.pro'\" unpacked with wrong size!
fi
chmod +x 'vim/src/proto/quickfix.pro'
# end of 'vim/src/proto/quickfix.pro'
fi
if test -f 'vim/src/proto/regexp.pro' -a "${1}" != "-c" ; then
echo shar: Will not clobber existing file \"'vim/src/proto/regexp.pro'\"
else
echo shar: Extracting \"'vim/src/proto/regexp.pro'\" \(171 characters\)
sed "s/^X//" >'vim/src/proto/regexp.pro' <<'END_OF_FILE'
X/* regexp.c */
Xstruct regexp *regcomp __PARMS((char *exp));
Xint regexec __PARMS((struct regexp *prog, char *string, int at_bol));
Xchar *cstrchr __PARMS((char *s, int c));
END_OF_FILE
if test 171 -ne `wc -c <'vim/src/proto/regexp.pro'`; then
echo shar: \"'vim/src/proto/regexp.pro'\" unpacked with wrong size!
fi
chmod +x 'vim/src/proto/regexp.pro'
# end of 'vim/src/proto/regexp.pro'
fi
if test -f 'vim/src/proto/regsub.pro' -a "${1}" != "-c" ; then
echo shar: Will not clobber existing file \"'vim/src/proto/regsub.pro'\"
else
echo shar: Extracting \"'vim/src/proto/regsub.pro'\" \(156 characters\)
sed "s/^X//" >'vim/src/proto/regsub.pro' <<'END_OF_FILE'
X/* regsub.c */
Xchar *regtilde __PARMS((char *source, int magic));
Xint regsub __PARMS((struct regexp *prog, char *source, char *dest, int copy, int magic));
END_OF_FILE
if test 156 -ne `wc -c <'vim/src/proto/regsub.pro'`; then
echo shar: \"'vim/src/proto/regsub.pro'\" unpacked with wrong size!
fi
chmod +x 'vim/src/proto/regsub.pro'
# end of 'vim/src/proto/regsub.pro'
fi
if test -f 'vim/src/proto/screen.pro' -a "${1}" != "-c" ; then
echo shar: Will not clobber existing file \"'vim/src/proto/screen.pro'\"
else
echo shar: Extracting \"'vim/src/proto/screen.pro'\" \(634 characters\)
sed "s/^X//" >'vim/src/proto/screen.pro' <<'END_OF_FILE'
X/* screen.c */
Xvoid updateline __PARMS((void));
Xvoid updateScreen __PARMS((int type));
Xvoid comp_Botline __PARMS((void));
Xint prt_line __PARMS((char *s));
Xvoid screenclear __PARMS((void));
Xvoid cursupdate __PARMS((void));
Xvoid curs_columns __PARMS((int scroll));
Xint getvcol __PARMS((struct fpos *pos, int type));
Xvoid scrolldown __PARMS((long nlines));
Xvoid scrollup __PARMS((long nlines));
Xint s_ins __PARMS((int row, int nlines, int invalid));
Xint s_del __PARMS((int row, int nlines, int invalid));
Xvoid showmode __PARMS((void));
Xvoid delmode __PARMS((void));
Xvoid showruler __PARMS((int always));
Xvoid clear_line __PARMS((void));
END_OF_FILE
if test 634 -ne `wc -c <'vim/src/proto/screen.pro'`; then
echo shar: \"'vim/src/proto/screen.pro'\" unpacked with wrong size!
fi
chmod +x 'vim/src/proto/screen.pro'
# end of 'vim/src/proto/screen.pro'
fi
if test -f 'vim/src/proto/script.pro' -a "${1}" != "-c" ; then
echo shar: Will not clobber existing file \"'vim/src/proto/script.pro'\"
else
echo shar: Extracting \"'vim/src/proto/script.pro'\" \(352 characters\)
sed "s/^X//" >'vim/src/proto/script.pro' <<'END_OF_FILE'
X/* script.c */
Xvoid startscript __PARMS((void));
Xint stopscript __PARMS((void));
Xint openscript __PARMS((char *name));
Xvoid updatescript __PARMS((int c));
Xvoid openrecover __PARMS((void));
Xvoid scriptfullpath __PARMS((void));
Xchar *modname __PARMS((char *fname, char *ext));
Xvoid script_winsize __PARMS((void));
Xvoid script_winsize_pp __PARMS((void));
END_OF_FILE
if test 352 -ne `wc -c <'vim/src/proto/script.pro'`; then
echo shar: \"'vim/src/proto/script.pro'\" unpacked with wrong size!
fi
chmod +x 'vim/src/proto/script.pro'
# end of 'vim/src/proto/script.pro'
fi
if test -f 'vim/src/proto/search.pro' -a "${1}" != "-c" ; then
echo shar: Will not clobber existing file \"'vim/src/proto/search.pro'\"
else
echo shar: Extracting \"'vim/src/proto/search.pro'\" \(727 characters\)
sed "s/^X//" >'vim/src/proto/search.pro' <<'END_OF_FILE'
X/* search.c */
Xstruct regexp *myregcomp __PARMS((char *pat));
Xint searchit __PARMS((struct fpos *pos, int dir, char *str, long count, int end));
Xint dosearch __PARMS((int dirc, char *str, int reverse, long count, int echo));
Xint searchc __PARMS((int c, int dir, int type, long count));
Xstruct fpos *showmatch __PARMS((void));
Xint findfunc __PARMS((int dir, int what, long count));
Xint findsent __PARMS((int dir, long count));
Xint findpar __PARMS((int dir, long count, int what));
Xint startPS __PARMS((long lnum, int para));
Xint fwd_word __PARMS((long count, int type, int eol));
Xint bck_word __PARMS((long count, int type));
Xint end_word __PARMS((long count, int type, int stop));
Xint skip_chars __PARMS((int class, int dir));
END_OF_FILE
if test 727 -ne `wc -c <'vim/src/proto/search.pro'`; then
echo shar: \"'vim/src/proto/search.pro'\" unpacked with wrong size!
fi
chmod +x 'vim/src/proto/search.pro'
# end of 'vim/src/proto/search.pro'
fi
if test -f 'vim/src/proto/storage.pro' -a "${1}" != "-c" ; then
echo shar: Will not clobber existing file \"'vim/src/proto/storage.pro'\"
else
echo shar: Extracting \"'vim/src/proto/storage.pro'\" \(739 characters\)
sed "s/^X//" >'vim/src/proto/storage.pro' <<'END_OF_FILE'
X/* storage.c */
Xchar *m_blockalloc __PARMS((unsigned long size, int message));
Xvoid m_blockfree __PARMS((void));
Xvoid free_line __PARMS((char *ptr));
Xchar *alloc_line __PARMS((unsigned int size));
Xchar *save_line __PARMS((char *src));
Xvoid filealloc __PARMS((void));
Xvoid freeall __PARMS((void));
Xchar *nr2ptr __PARMS((long nr));
Xchar *pos2ptr __PARMS((struct fpos *pos));
Xchar *Curpos2ptr __PARMS((void));
Xvoid setmarked __PARMS((long lnum));
Xlong firstmarked __PARMS((void));
Xvoid clearmarked __PARMS((void));
Xlong ptr2nr __PARMS((char *ptr, long start));
Xint appendline __PARMS((long after, char *s));
Xchar *delsline __PARMS((long nr, int delmarks));
Xchar *replaceline __PARMS((long lnum, char *new));
Xint canincrease __PARMS((int n));
END_OF_FILE
if test 739 -ne `wc -c <'vim/src/proto/storage.pro'`; then
echo shar: \"'vim/src/proto/storage.pro'\" unpacked with wrong size!
fi
chmod +x 'vim/src/proto/storage.pro'
# end of 'vim/src/proto/storage.pro'
fi
if test -f 'vim/src/proto/tag.pro' -a "${1}" != "-c" ; then
echo shar: Will not clobber existing file \"'vim/src/proto/tag.pro'\"
else
echo shar: Extracting \"'vim/src/proto/tag.pro'\" \(187 characters\)
sed "s/^X//" >'vim/src/proto/tag.pro' <<'END_OF_FILE'
X/* tag.c */
Xvoid dotag __PARMS((char *tag, int type, int count));
Xvoid clrtags __PARMS((void));
Xvoid incrtags __PARMS((void));
Xvoid decrtags __PARMS((void));
Xvoid dotags __PARMS((void));
END_OF_FILE
if test 187 -ne `wc -c <'vim/src/proto/tag.pro'`; then
echo shar: \"'vim/src/proto/tag.pro'\" unpacked with wrong size!
fi
chmod +x 'vim/src/proto/tag.pro'
# end of 'vim/src/proto/tag.pro'
fi
if test -f 'vim/src/proto/term.pro' -a "${1}" != "-c" ; then
echo shar: Will not clobber existing file \"'vim/src/proto/term.pro'\"
else
echo shar: Extracting \"'vim/src/proto/term.pro'\" \(849 characters\)
sed "s/^X//" >'vim/src/proto/term.pro' <<'END_OF_FILE'
X/* term.c */
Xvoid set_term __PARMS((char *term));
Xchar *tgoto __PARMS((char *cm, int x, int y));
Xvoid termcapinit __PARMS((char *term));
Xvoid flushbuf __PARMS((void));
Xvoid outchar __PARMS((unsigned int c));
Xvoid outstrn __PARMS((char *s));
Xvoid outstr __PARMS((char *s));
Xvoid windgoto __PARMS((int row, int col));
Xvoid setcursor __PARMS((void));
Xvoid ttest __PARMS((int pairs));
Xint inchar __PARMS((char *buf, int maxlen, int time));
Xint check_termcode __PARMS((char *buf));
Xvoid outnum __PARMS((long n));
Xint outnuml __PARMS((long n));
Xvoid check_winsize __PARMS((void));
Xvoid set_winsize __PARMS((int width, int height, int mustset));
Xvoid set_winheight __PARMS((int height));
Xvoid settmode __PARMS((int raw));
Xvoid starttermcap __PARMS((void));
Xvoid stoptermcap __PARMS((void));
Xvoid cursor_on __PARMS((void));
Xvoid cursor_off __PARMS((void));
END_OF_FILE
if test 849 -ne `wc -c <'vim/src/proto/term.pro'`; then
echo shar: \"'vim/src/proto/term.pro'\" unpacked with wrong size!
fi
chmod +x 'vim/src/proto/term.pro'
# end of 'vim/src/proto/term.pro'
fi
if test -f 'vim/src/proto/termlib.pro' -a "${1}" != "-c" ; then
echo shar: Will not clobber existing file \"'vim/src/proto/termlib.pro'\"
else
echo shar: Extracting \"'vim/src/proto/termlib.pro'\" \(300 characters\)
sed "s/^X//" >'vim/src/proto/termlib.pro' <<'END_OF_FILE'
X/* termlib.c */
Xint tgetent __PARMS((char *tbuf, char *term));
Xint tgetflag __PARMS((char *id));
Xint tgetnum __PARMS((char *id));
Xchar *tgetstr __PARMS((char *id, char **buf));
Xchar *tgoto __PARMS((char *cm, int col, int line));
Xint tputs __PARMS((char *cp, int affcnt, void (*outc)(unsigned int)));
END_OF_FILE
if test 300 -ne `wc -c <'vim/src/proto/termlib.pro'`; then
echo shar: \"'vim/src/proto/termlib.pro'\" unpacked with wrong size!
fi
chmod +x 'vim/src/proto/termlib.pro'
# end of 'vim/src/proto/termlib.pro'
fi
if test -f 'vim/src/proto/undo.pro' -a "${1}" != "-c" ; then
echo shar: Will not clobber existing file \"'vim/src/proto/undo.pro'\"
else
echo shar: Extracting \"'vim/src/proto/undo.pro'\" \(444 characters\)
sed "s/^X//" >'vim/src/proto/undo.pro' <<'END_OF_FILE'
X/* undo.c */
Xint u_saveCurpos __PARMS((void));
Xint u_save __PARMS((long top, long bot));
Xint u_savesub __PARMS((long lnum));
Xint u_inssub __PARMS((long lnum));
Xint u_savedel __PARMS((long lnum, long nlines));
Xvoid u_undo __PARMS((int count));
Xvoid u_redo __PARMS((int count));
Xvoid u_sync __PARMS((void));
Xvoid u_clearall __PARMS((void));
Xvoid u_saveline __PARMS((long lnum));
Xvoid u_clearline __PARMS((void));
Xvoid u_undoline __PARMS((void));
END_OF_FILE
if test 444 -ne `wc -c <'vim/src/proto/undo.pro'`; then
echo shar: \"'vim/src/proto/undo.pro'\" unpacked with wrong size!
fi
chmod +x 'vim/src/proto/undo.pro'
# end of 'vim/src/proto/undo.pro'
fi
if test -f 'vim/src/ptx_stdlib.h' -a "${1}" != "-c" ; then
echo shar: Will not clobber existing file \"'vim/src/ptx_stdlib.h'\"
else
echo shar: Extracting \"'vim/src/ptx_stdlib.h'\" \(955 characters\)
sed "s/^X//" >'vim/src/ptx_stdlib.h' <<'END_OF_FILE'
X/*
X * ptx_stdlib.h: declarations which are needed for sequent
X */
X
Xextern void free(void *);
X#ifdef SIZE_T /* sys/types.h */
Xextern void *malloc(size_t);
Xextern off_t lseek(int, off_t, int);
X#else
Xextern void *malloc(unsigned);
Xextern int lseek(int, int, int);
X#endif
X
X#ifndef _FCNTL_H_
Xextern int open(char *, int, ...);
X#endif
Xextern int close(int);
Xextern int read(int, char *, unsigned);
Xextern int write(int, char *, unsigned);
Xextern int ioctl(int, int, ...);
Xextern int unlink(char *);
X
Xextern char *getenv(char *);
Xextern int getuid(void);
Xextern int getgid(void);
X
X#ifdef _NFILE /* stdio.h */
Xextern int _filbuf(FILE *);
Xextern int _flsbuf(unsigned char, FILE *);
X#endif
X
X#ifdef _POLL_H_
Xextern int poll(struct pollfd[], unsigned long, int);
X#endif /* _POLL_H_ */
X
Xextern char *getcwd(char *, int);
X
Xextern int chdir(char *);
X
Xextern int atoi (char *);
Xextern long atol(char *);
Xextern long strtol(char *, char **, int);
X
Xextern int isatty(int);
END_OF_FILE
if test 955 -ne `wc -c <'vim/src/ptx_stdlib.h'`; then
echo shar: \"'vim/src/ptx_stdlib.h'\" unpacked with wrong size!
fi
chmod +x 'vim/src/ptx_stdlib.h'
# end of 'vim/src/ptx_stdlib.h'
fi
if test -f 'vim/src/regexp.h' -a "${1}" != "-c" ; then
echo shar: Will not clobber existing file \"'vim/src/regexp.h'\"
else
echo shar: Extracting \"'vim/src/regexp.h'\" \(1541 characters\)
sed "s/^X//" >'vim/src/regexp.h' <<'END_OF_FILE'
X/* vi:ts=4:sw=4
X * NOTICE NOTICE NOTICE NOTICE NOTICE NOTICE NOTICE NOTICE NOTICE NOTICE
X *
X * This is NOT the original regular expression code as written by
X * Henry Spencer. This code has been modified specifically for use
X * with the VIM editor, and should not be used apart from compiling
X * VIM. If you want a good regular expression library, get the
X * original code. The copyright notice that follows is from the
X * original.
X *
X * NOTICE NOTICE NOTICE NOTICE NOTICE NOTICE NOTICE NOTICE NOTICE NOTICE
X *
X * Definitions etc. for regexp(3) routines.
X *
X * Caveat: this is V8 regexp(3) [actually, a reimplementation thereof],
X * not the System V one.
X */
X
X#ifndef _REGEXP_H
X#define _REGEXP_H
X
X#define NSUBEXP 10
Xtypedef struct regexp {
X char *startp[NSUBEXP];
X char *endp[NSUBEXP];
X char regstart; /* Internal use only. */
X char reganch; /* Internal use only. */
X char *regmust; /* Internal use only. */
X int regmlen; /* Internal use only. */
X char program[1]; /* Unwarranted chumminess with compiler. */
X} regexp;
X
X/* regexp.c */
Xregexp *regcomp __ARGS((char *));
Xint regexec __ARGS((regexp *, char *, int));
X/* int cstrncmp __ARGS((char *, char *, int)); */
Xchar *cstrchr __ARGS((char *, int));
X
X/* regsub.c */
Xint regsub __ARGS((regexp *, char *, char *, int, int));
X
X/* search.c */
Xextern void regerror __ARGS((char *));
X
X#ifndef ORIGINAL
Xextern int reg_ic; /* set non-zero to ignore case in searches */
Xextern int reg_magic; /* set zero to disable magicness of .*[~& */
X#endif
X#endif /* _REGEXP_H */
END_OF_FILE
if test 1541 -ne `wc -c <'vim/src/regexp.h'`; then
echo shar: \"'vim/src/regexp.h'\" unpacked with wrong size!
fi
chmod +x 'vim/src/regexp.h'
# end of 'vim/src/regexp.h'
fi
if test -f 'vim/src/regmagic.h' -a "${1}" != "-c" ; then
echo shar: Will not clobber existing file \"'vim/src/regmagic.h'\"
else
echo shar: Extracting \"'vim/src/regmagic.h'\" \(663 characters\)
sed "s/^X//" >'vim/src/regmagic.h' <<'END_OF_FILE'
X/* vi:ts=4:sw=4
X * NOTICE NOTICE NOTICE NOTICE NOTICE NOTICE NOTICE NOTICE NOTICE NOTICE
X *
X * This is NOT the original regular expression code as written by
X * Henry Spencer. This code has been modified specifically for use
X * with the VIM editor, and should not be used apart from compiling
X * VIM. If you want a good regular expression library, get the
X * original code. The copyright notice that follows is from the
X * original.
X *
X * NOTICE NOTICE NOTICE NOTICE NOTICE NOTICE NOTICE NOTICE NOTICE NOTICE
X *
X * The first byte of the regexp internal "program" is actually this magic
X * number; the start node begins in the second byte.
X */
X
X#define MAGIC 0234
END_OF_FILE
if test 663 -ne `wc -c <'vim/src/regmagic.h'`; then
echo shar: \"'vim/src/regmagic.h'\" unpacked with wrong size!
fi
chmod +x 'vim/src/regmagic.h'
# end of 'vim/src/regmagic.h'
fi
if test -f 'vim/src/sun_stdlib.h' -a "${1}" != "-c" ; then
echo shar: Will not clobber existing file \"'vim/src/sun_stdlib.h'\"
else
echo shar: Extracting \"'vim/src/sun_stdlib.h'\" \(1868 characters\)
sed "s/^X//" >'vim/src/sun_stdlib.h' <<'END_OF_FILE'
X/*
X * sun_stdlib.h: declararions used on a sun
X */
X
X#ifndef __stdlib_h
Xextern void free(void *);
Xextern void *malloc(unsigned);
Xextern void *realloc(void *, unsigned);
Xextern void *calloc(unsigned, unsigned);
X#endif
X#ifdef __sys_types_h
Xextern off_t lseek(int, off_t, int);
X
X# ifdef _sys_time_h
Xextern int select(int, fd_set *, fd_set *, fd_set *, struct timeval *);
X# endif _sys_time_h
X
X#else
Xextern long lseek(int, long, int);
X#endif
X
Xextern long tell(int);
Xextern void perror(char *);
X
X#ifndef __sys_fcntlcom_h
Xextern int open(char *, int, ...);
X#endif
Xextern int close(int);
Xextern int read(int, char *, unsigned);
Xextern int write(int, char *, unsigned);
Xextern int ioctl(int, int, ...);
Xextern int unlink(char *);
X
X#ifdef FILE
Xextern int _filbuf(FILE *);
Xextern int _flsbuf(unsigned char, FILE *);
Xextern int fclose(FILE *);
Xextern int fprintf(FILE *, char *, ...);
Xextern int fscanf(FILE *, char *, ...);
Xextern int fseek(FILE *, long, int);
Xextern int fflush(FILE *);
Xextern int fread(char *, int, int, FILE *);
X#else
Xextern char *sprintf(char *, char *, ...);
X#endif
X
Xextern int printf(char *, ...);
X
Xextern int scanf(char *, ...);
Xextern int sscanf(char *, char *, ...);
X
Xextern int system(char *);
Xextern char *getenv(char *);
X
Xextern char *getcwd(char *, int);
Xextern char *getwd(char *);
X
Xextern int chdir(char *);
Xextern int getuid(void);
Xextern int getgid(void);
X
Xextern int atoi (char *);
Xextern long atol(char *);
Xextern long strtol(char * , char **, int);
X
Xextern void bcopy(char *, char *, int);
Xextern int bcmp(char *, char *, int);
Xextern void bzero(char *, int);
X
Xextern char *memccpy(char *, char *, int, int);
Xextern char *memchr(char *, int, int);
Xextern char *memset(char *, int, int);
X
Xextern int strncmp(char *, char *, int);
Xextern int strcasecmp(char *, char *);
X
Xextern int toupper(int);
Xextern int tolower(int);
Xextern int isatty(int);
END_OF_FILE
if test 1868 -ne `wc -c <'vim/src/sun_stdlib.h'`; then
echo shar: \"'vim/src/sun_stdlib.h'\" unpacked with wrong size!
fi
chmod +x 'vim/src/sun_stdlib.h'
# end of 'vim/src/sun_stdlib.h'
fi
if test -f 'vim/src/term_fix.uue' -a "${1}" != "-c" ; then
echo shar: Will not clobber existing file \"'vim/src/term_fix.uue'\"
else
echo shar: Extracting \"'vim/src/term_fix.uue'\" \(89 characters\)
sed "s/^X//" >'vim/src/term_fix.uue' <<'END_OF_FILE'
X
Xbegin 644 termlib.fix
XB#2]O=71C*2@I#6QL;&QL875N<VEG;F5D(&EN=!LZ=W$-"O__5
X``
Xend
Xsize 34
END_OF_FILE
if test 89 -ne `wc -c <'vim/src/term_fix.uue'`; then
echo shar: \"'vim/src/term_fix.uue'\" unpacked with wrong size!
fi
chmod +x 'vim/src/term_fix.uue'
# end of 'vim/src/term_fix.uue'
fi
if test -f 'vim/src/vim.prj' -a "${1}" != "-c" ; then
echo shar: Will not clobber existing file \"'vim/src/vim.prj'\"
else
echo shar: Extracting \"'vim/src/vim.prj'\" \(254 characters\)
sed "s/^X//" >'vim/src/vim.prj' <<'END_OF_FILE'
XALLOC.C
XBUFFERS.C
XCHARSET.C
XCMDLINE.C
XCSEARCH.C
XEDIT.C
XDIGRAPH.C
XFILEIO.C
XHELP.C
XLINEFUNC.C
XMAIN.C
XMARK.C
XMESSAGE.C
XMISCCMDS.C
XMSDOS.C
XNORMAL.C
XOPS.C
XPARAM.C
XQUICKFIX.C
XREGEXP.C
XREGSUB.C
XSCREEN.C
XSCRIPT.C
XSEARCH.C
XSTORAGE.C
XTAG.C
XTERM.C
XUNDO.C
XVERSION.C
END_OF_FILE
if test 254 -ne `wc -c <'vim/src/vim.prj'`; then
echo shar: \"'vim/src/vim.prj'\" unpacked with wrong size!
fi
chmod +x 'vim/src/vim.prj'
# end of 'vim/src/vim.prj'
fi
if test -f 'vim/src/vimresp' -a "${1}" != "-c" ; then
echo shar: Will not clobber existing file \"'vim/src/vimresp'\"
else
echo shar: Extracting \"'vim/src/vimresp'\" \(320 characters\)
sed "s/^X//" >'vim/src/vimresp' <<'END_OF_FILE'
Xalloc.obj msdos.obj buffers.obj charset.obj cmdline.obj csearch.obj +
Xdigraph.obj edit.obj fileio.obj help.obj linefunc.obj main.obj mark.obj +
Xmessage.obj misccmds.obj normal.obj ops.obj param.obj quickfix.obj +
Xregexp.obj regsub.obj screen.obj script.obj search.obj storage.obj +
Xtag.obj term.obj undo.obj version.obj
END_OF_FILE
if test 320 -ne `wc -c <'vim/src/vimresp'`; then
echo shar: \"'vim/src/vimresp'\" unpacked with wrong size!
fi
chmod +x 'vim/src/vimresp'
# end of 'vim/src/vimresp'
fi
if test ! -d 'vim/tutor' ; then
echo shar: Creating directory \"'vim/tutor'\"
mkdir 'vim/tutor'
fi
if test -f 'vim/tutor/Readme' -a "${1}" != "-c" ; then
echo shar: Will not clobber existing file \"'vim/tutor/Readme'\"
else
echo shar: Extracting \"'vim/tutor/Readme'\" \(768 characters\)
sed "s/^X//" >'vim/tutor/Readme' <<'END_OF_FILE'
XVitutor is a "hands on" tutorial for new users of the Vim editor.
X
XMost new users can get through it in less than one hour. The result
Xis that you can do a simple editing task using the Vim editor.
X
XTutor is a file that contains the tutorial lessons. You can simply
Xexecute "vim tutor" and then follow the instructions in the lessons.
XThe lessons tell you to modify the file, so DON'T DO THIS ON YOUR
XORIGINAL COPY.
X
XI have considered adding more advanced lessons but have not found the
Xtime. Please let me know how you like it and send any improvements you
Xmake.
X
XBob Ware, Colorado School of Mines, Golden, Co 80401, USA
X(303) 273-3987
Xbw...@mines.colorado.edu bw...@slate.mines.colorado.edu bw...@mines.bitnet
X
X(This file was modified by Bram Moolenaar for Vim)
END_OF_FILE
if test 768 -ne `wc -c <'vim/tutor/Readme'`; then
echo shar: \"'vim/tutor/Readme'\" unpacked with wrong size!
fi
chmod +x 'vim/tutor/Readme'
# end of 'vim/tutor/Readme'
fi
if test -f 'vim/tutor/poster' -a "${1}" != "-c" ; then
echo shar: Will not clobber existing file \"'vim/tutor/poster'\"
else
echo shar: Extracting \"'vim/tutor/poster'\" \(860 characters\)
sed "s/^X//" >'vim/tutor/poster' <<'END_OF_FILE'
XArticle 3390 of alt.sources:
XXref: oce-rd1 comp.editors:3231 alt.sources:3390
XPath: oce-rd1!venlo!hp4nl!mcsun!uunet!zaphod.mps.ohio-state.edu!magnus.acs.ohio-state.edu!csn!pikes!slate!bware
XFrom: bw...@slate.mines.colorado.edu (Ware Bob)
XNewsgroups: comp.editors,alt.sources
XSubject: hands on vi tutor
XKeywords: for new users
XMessage-ID: <1991Jul17.1...@slate.mines.colorado.edu>
XDate: 17 Jul 91 16:13:55 GMT
XSender: bw...@slate.mines.colorado.edu (Ware Bob)
XOrganization: Colorado School of Mines
XLines: 830
X
X
XI posted this a few weeks ago, but a number of people have munged
Xtheir copy, so I am reposting it with better instructions.
X
XThis is a "hand-on" tutor to help new users learn the vi editor.
X
XBob Ware, Colorado School of Mines, Golden, Co 80401, USA
X(303) 273-3987
Xbw...@mines.colorado.edu bw...@slate.mines.colorado.edu bw...@mines.bitnet
END_OF_FILE
if test 860 -ne `wc -c <'vim/tutor/poster'`; then
echo shar: \"'vim/tutor/poster'\" unpacked with wrong size!
fi
chmod +x 'vim/tutor/poster'
# end of 'vim/tutor/poster'
fi
echo shar: End of archive 1 \(of 25\).
cp /dev/null ark1isdone
MISSING=""
for I in 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 ; do
if test ! -f ark${I}isdone ; then
MISSING="${MISSING} ${I}"
fi
done
if test "${MISSING}" = "" ; then
echo You have unpacked all 25 archives.
rm -f ark[1-9]isdone ark[1-9][0-9]isdone
else
echo You still need to unpack the following archives:
echo " " ${MISSING}
fi
## End of shell archive.
exit 0

Bram Moolenaar

unread,
Dec 20, 1993, 10:44:31 PM12/20/93
to
Submitted-by: mo...@oce.nl (Bram Moolenaar)
Posting-number: Volume 41, Issue 55
Archive-name: vim/part05

Environment: UNIX, AMIGA, MS-DOS
Supersedes: vim: Volume 37, Issue 1-24

#! /bin/sh


# This is a shell archive. Remove anything before this line, then unpack
# it by saving it into a file and typing "sh file". To overwrite existing
# files, type "sh file -c". You can also feed this as standard input via
# unshar, or by typing "sh <file", e.g.. If this archive is complete, you
# will see the following message at the end:

# "End of archive 5 (of 25)."
# Contents: vim/src/csearch.c vim/src/digrap_c.uue vim/src/main.c
# vim/src/mark.c vim/src/quickfix.c
# Wrapped by mool@oce-rd2 on Wed Dec 15 09:50:04 1993


PATH=/bin:/usr/bin:/usr/ucb ; export PATH

if test -f 'vim/src/csearch.c' -a "${1}" != "-c" ; then
echo shar: Will not clobber existing file \"'vim/src/csearch.c'\"
else
echo shar: Extracting \"'vim/src/csearch.c'\" \(11434 characters\)
sed "s/^X//" >'vim/src/csearch.c' <<'END_OF_FILE'


X/* vi:ts=4:sw=4
X *
X * VIM - Vi IMproved
X *
X * Code Contributions By: Bram Moolenaar mo...@oce.nl
X * Tim Thompson twitch!tjt
X * Tony Andrews onecom!wldrdg!tony
X * G. R. (Fred) Walter watmath!watcgl!grwalter
X */
X
X/*
X *

X * csearch.c: command line searching commands


X */
X
X#include "vim.h"

X#include "globals.h"
X#include "proto.h"
X#include "param.h"
X
X/* we use modified Henry Spencer's regular expression routines */
X#include "regexp.h"
X
Xint global_busy = 0; /* set to 1 if global busy, 2 if global has
X been called during a global command */
Xint global_wait; /* set to 1 if wait_return has to be called
X after global command */
Xextern regexp *myregcomp __ARGS((char *));
X
X/* dosub(lp, up, cmd)
X *
X * Perform a substitution from line 'lp' to line 'up' using the
X * command pointed to by 'cmd' which should be of the form:
X *
X * /pattern/substitution/gc
X *
X * The trailing 'g' is optional and, if present, indicates that multiple
X * substitutions should be performed on each line, if applicable.
X * The trailing 'c' is optional and, if present, indicates that a confirmation
X * will be asked for each replacement.
X * The usual escapes are supported as described in the regexp docs.
X */
X
X void
Xdosub(lp, up, cmd, nextcommand)
X linenr_t lp;
X linenr_t up;
X char *cmd;
X u_char **nextcommand;
X{
X linenr_t lnum;
X long i;
X char *ptr;
X regexp *prog;
X long nsubs = 0;
X linenr_t nlines = 0;
X static int do_all = FALSE; /* do multiple substitutions per line */
X static int do_ask = FALSE; /* ask for confirmation */
X char *pat, *sub = NULL;
X static char *old_sub = NULL;
X int delimiter;
X int sublen;
X int got_quit = FALSE;
X int got_match = FALSE;
X int temp;
X
X if (strchr("0123456789gc|\"#", *cmd) == NULL) /* new pattern and substitution */
X {
X delimiter = *cmd++; /* remember delimiter character */
X pat = cmd; /* remember the start of the regexp */
X
X /*
X * do the next loop twice:
X * i == 0: find the end of the regexp
X * i == 1: find the end of the substitution
X */
X for (i = 0; ; ++i)
X {
X while (cmd[0])
X {
X if (cmd[0] == delimiter) /* end delimiter found */
X {
X *cmd++ = NUL; /* replace it by a NUL */
X break;
X }
X if (cmd[0] == '\\' && cmd[1] != 0) /* skip escaped characters */
X ++cmd;
X ++cmd;
X }
X if (i == 1)
X break;
X sub = cmd; /* remember the start of the substitution */
X }
X free(old_sub);
X old_sub = strsave(sub);
X }
X else /* use previous pattern and substitution */
X {
X if (old_sub == NULL) /* there is no previous command */
X {
X beep();
X return;
X }
X pat = NULL; /* myregcomp() will use previous pattern */
X sub = old_sub;
X }
X
X /*
X * find trailing options
X */
X if (!p_ed)
X {
X do_all = FALSE;
X do_ask = FALSE;
X }
X while (*cmd)
X {
X if (*cmd == 'g')
X do_all = !do_all;
X else if (*cmd == 'c')
X do_ask = !do_ask;
X else
X break;
X ++cmd;
X }
X
X /*
X * check for a trailing count
X */
X skipspace(&cmd);
X if (isdigit(*cmd))
X {
X i = getdigits(&cmd);
X if (i <= 0)
X {
X emsg(e_zerocount);
X return;
X }
X lp = up;
X up += i - 1;
X }
X
X /*
X * check for trailing '|', '"' or '#'
X */
X skipspace(&cmd);
X if (*cmd)
X {
X if (strchr("|\"#", *cmd) != NULL)
X {
X *nextcommand = (u_char *)cmd;
X }
X else
X {
X emsg(e_trailing);
X return;
X }
X }
X
X if ((prog = myregcomp(pat)) == NULL)
X {
X emsg(e_invcmd);
X return;
X }
X
X /*
X * ~ in the substitute pattern is replaced by the old pattern.
X * We do it here once to avoid it to be replaced over and over again.
X */
X sub = regtilde(sub, (int)p_magic);
X
X for (lnum = lp; lnum <= up && !(got_int || got_quit); ++lnum)
X {
X ptr = nr2ptr(lnum);
X if (regexec(prog, ptr, TRUE)) /* a match on this line */
X {
X char *new_end, *new_start = NULL;
X char *old_match, *old_copy;
X char *prev_old_match = NULL;
X char *p1, *p2;
X int did_sub = FALSE;
X int match, lastone;
X
X if (!got_match)
X {
X setpcmark();
X got_match = TRUE;
X }
X
X /*
X * Save the line that was last changed for the final cursor
X * position (just like the real vi).
X */
X Curpos.lnum = lnum;
X
X old_copy = old_match = ptr;
X for (;;) /* loop until nothing more to replace */
X {
X Curpos.col = (int)(prog->startp[0] - ptr);
X /*
X * Match empty string does not count, except for first match.
X * This reproduces the strange vi behaviour.
X * This also catches endless loops.
X */
X if (old_match == prev_old_match && old_match == prog->endp[0])
X {
X ++old_match;
X goto skip2;
X }
X while (do_ask) /* loop until 'y', 'n' or 'q' typed */
X {
X temp = RedrawingDisabled;
X RedrawingDisabled = FALSE;
X updateScreen(CURSUPD);
X smsg("replace by %s (y/n/q)? ", sub);
X setcursor();
X RedrawingDisabled = temp;
X if ((i = vgetc()) == 'q' || i == ESC || i == Ctrl('C'))
X {
X got_quit = TRUE;
X break;
X }
X else if (i == 'n')
X goto skip;
X else if (i == 'y')
X break;
X }
X if (got_quit)
X break;
X
X /* get length of substitution part */
X sublen = regsub(prog, sub, ptr, 0, (int)p_magic);
X if (new_start == NULL)
X {
X /*
X * Get some space for a temporary buffer to do the substitution
X * into.
X */
X if ((new_start = alloc((unsigned)(strlen(ptr) + sublen + 5))) == NULL)
X goto outofmem;
X *new_start = NUL;
X }
X else
X {
X /*
X * extend the temporary buffer to do the substitution into.
X */
X if ((p1 = alloc((unsigned)(strlen(new_start) + strlen(old_copy) + sublen + 1))) == NULL)
X goto outofmem;
X strcpy(p1, new_start);
X free(new_start);
X new_start = p1;
X }
X
X for (new_end = new_start; *new_end; new_end++)
X ;
X /*
X * copy up to the part that matched
X */
X while (old_copy < prog->startp[0])
X *new_end++ = *old_copy++;
X
X regsub(prog, sub, new_end, 1, (int)p_magic);
X nsubs++;
X did_sub = TRUE;
X
X /*
X * Now the trick is to replace CTRL-Ms with a real line break.
X * This would make it impossible to insert CTRL-Ms in the text.
X * That is the way vi works. In Vim the line break can be
X * avoided by preceding the CTRL-M with a CTRL-V. Now you can't
X * precede a line break with a CTRL-V, big deal.
X */
X while ((p1 = strchr(new_end, CR)) != NULL)
X {
X if (p1 == new_end || p1[-1] != Ctrl('V'))
X {
X if (u_inssub(lnum)) /* prepare for undo */
X {
X *p1 = NUL; /* truncate up to the CR */
X if ((p2 = save_line(new_start)) != NULL)
X {
X appendline(lnum - 1, p2);
X ++lnum;
X ++up; /* number of lines increases */
X }
X strcpy(new_start, p1 + 1); /* copy the rest */
X new_end = new_start;
X }
X }
X else /* remove CTRL-V */
X {
X strcpy(p1 - 1, p1);
X new_end = p1;
X }
X }
X
X old_copy = prog->endp[0]; /* remember next character to be copied */
X /*
X * continue searching after the match
X * prevent endless loop with patterns that match empty strings,
X * e.g. :s/$/pat/g or :s/[a-z]* /(&)/g
X */
Xskip:
X old_match = prog->endp[0];
X prev_old_match = old_match;
Xskip2:
X match = -1;
X lastone = (*old_match == NUL || got_int || got_quit || !do_all);
X if (lastone || do_ask || (match = regexec(prog, old_match, (int)FALSE)) == 0)
X {
X if (new_start)
X {
X /*
X * copy the rest of the line, that didn't match
X */
X strcat(new_start, old_copy);
X i = old_match - ptr;
X
X if ((ptr = save_line(new_start)) != NULL && u_savesub(lnum))
X replaceline(lnum, ptr);
X
X free(new_start); /* free the temp buffer */
X new_start = NULL;
X old_match = ptr + i;
X old_copy = ptr;
X }
X if (match == -1 && !lastone)
X match = regexec(prog, old_match, (int)FALSE);
X if (match <= 0) /* quit loop if there is no more match */
X break;
X }
X /* breakcheck is slow, don't call it too often */
X if ((nsubs & 15) == 0)
X breakcheck();
X
X }
X if (did_sub)
X ++nlines;
X }
X /* breakcheck is slow, don't call it too often */
X if ((lnum & 15) == 0)
X breakcheck();
X }
X
Xoutofmem:
X if (nsubs)
X {
X CHANGED;
X updateScreen(CURSUPD); /* need this to update LineSizes */
X beginline(TRUE);
X if (nsubs > p_report)
X smsg("%s%ld substitution%s on %ld line%s",
X got_int ? "(Interrupted) " : "",
X nsubs, plural(nsubs),
X (long)nlines, plural((long)nlines));
X else if (got_int)
X msg(e_interr);
X else if (do_ask)
X msg("");
X }
X else if (got_int) /* interrupted */
X msg(e_interr);
X else if (got_match) /* did find something but nothing substituted */
X msg("");
X else /* nothing found */
X msg(e_nomatch);
X
X free((char *) prog);
X}
X
X/*
X * doglob(cmd)
X *
X * Execute a global command of the form:
X *
X * g/pattern/X : execute X on all lines where pattern matches
X * v/pattern/X : execute X on all lines where pattern does not match
X *
X * where 'X' is an EX command
X *
X * The command character (as well as the trailing slash) is optional, and
X * is assumed to be 'p' if missing.
X *
X * This is implemented in two passes: first we scan the file for the pattern and
X * set a mark for each line that (not) matches. secondly we execute the command
X * for each line that has a mark. This is required because after deleting
X * lines we do not know where to search for the next match.
X */
X
X void
Xdoglob(type, lp, up, cmd)
X int type;
X linenr_t lp, up;
X char *cmd;
X{
X linenr_t lnum; /* line number according to old situation */
X linenr_t old_lcount; /* line_count before the command */
X int ndone;
X
X char delim; /* delimiter, normally '/' */
X char *pat;
X regexp *prog;
X int match;
X
X if (global_busy)
X {
X emsg("Cannot do :global recursive");
X ++global_busy;
X return;
X }
X
X delim = *cmd; /* get the delimiter */
X if (delim)
X ++cmd; /* skip delimiter if there is one */
X pat = cmd;
X
X while (cmd[0])
X {
X if (cmd[0] == delim) /* end delimiter found */
X {
X *cmd++ = NUL; /* replace it by a NUL */
X break;
X }
X if (cmd[0] == '\\' && cmd[1] != 0) /* skip escaped characters */
X ++cmd;
X ++cmd;
X }
X
X reg_ic = p_ic; /* set "ignore case" flag appropriately */
X
X if ((prog = myregcomp(pat)) == NULL)
X {
X emsg(e_invcmd);
X return;
X }
X msg("");
X
X/*
X * pass 1: set marks for each (not) matching line
X */
X ndone = 0;
X for (lnum = lp; lnum <= up && !got_int; ++lnum)
X {
X match = regexec(prog, nr2ptr(lnum), (int)TRUE); /* a match on this line? */
X if ((type == 'g' && match) || (type == 'v' && !match))
X {
X setmarked(lnum);
X ndone++;
X }
X /* breakcheck is slow, don't call it too often */
X if ((lnum & 15) == 0)
X breakcheck();
X }
X
X/*
X * pass 2: execute the command for each line that has been marked
X */
X if (got_int)
X msg("Interrupted");
X else if (ndone == 0)
X msg(e_nomatch);
X else
X {
X global_busy = 1;
X global_wait = 0;
X RedrawingDisabled = TRUE;
X old_lcount = line_count;
X while (!got_int && (lnum = firstmarked()) != 0 && global_busy == 1)
X {
X Curpos.lnum = lnum;
X Curpos.col = 0;
X if (*cmd == NUL)
X docmdline((u_char *)"p");
X else
X docmdline((u_char *)cmd);
X breakcheck();
X }
X
X RedrawingDisabled = FALSE;
X global_busy = 0;
X if (global_wait) /* wait for return */
X wait_return(FALSE);
X screenclear();
X updateScreen(CURSUPD);
X msgmore(line_count - old_lcount);
X }
X
X clearmarked(); /* clear rest of the marks */
X free((char *) prog);
X}
END_OF_FILE
if test 11434 -ne `wc -c <'vim/src/csearch.c'`; then
echo shar: \"'vim/src/csearch.c'\" unpacked with wrong size!
fi
chmod +x 'vim/src/csearch.c'
# end of 'vim/src/csearch.c'
fi
if test -f 'vim/src/digrap_c.uue' -a "${1}" != "-c" ; then
echo shar: Will not clobber existing file \"'vim/src/digrap_c.uue'\"
else
echo shar: Extracting \"'vim/src/digrap_c.uue'\" \(11106 characters\)
sed "s/^X//" >'vim/src/digrap_c.uue' <<'END_OF_FILE'
X
Xbegin 644 digraph.c
XM+RH@=FDZ=',]-#IS=STT"B`J"B`J(%9)32`M(%9I($E-<')O=F5D"B`J"B`J-
XM($-O9&4@0V]N=')I8G5T:6]N<R!">3H)0G)A;2!-;V]L96YA87()"0EM;V]L>
XM0&]C92YN;`H@*@D)"0D)"0E4:6T@5&AO;7!S;VX)"0ET=VET8V@A=&IT"B`JI
XM"0D)"0D)"51O;GD@06YD<F5W<PD)"6]N96-O;2%W;&1R9&<A=&]N>2`*("H)&
XM"0D)"0D)1RX@4BX@*$9R960I(%=A;'1E<@D)=V%T;6%T:"%W871C9VPA9W)WH
XM86QT97(@"B`J+PH*(VEF9&5F($1)1U)!4$A3"B\J"B`J(&1I9W)A<&@N8SH@#
XM8V]D92!F;W(@9&EG<F%P:',*("HO"@HC:6YC;'5D92`B=FEM+F@B"B-I;F-LK
XM=61E(")G;&]B86QS+F@B"B-I;F-L=61E(")P<F]T;RYH(@HC:6YC;'5D92`BN
XM<&%R86TN:"(*"G-T871I8R!V;VED('!R:6YT9&EG<F%P:"!?7T%21U,H*'5?2
XM8VAA<B`J*2D["@IU7V-H87()*"ID:6=R87!H;F5W*5LS73L)"0DO*B!P;VEN8
XM=&5R('1O(&%D9&5D(&1I9W)A<&AS("HO"FEN=`D)9&EG<F%P:&-O=6YT(#T@W
XM,#L)"0DO*B!N=6UB97(@;V8@861D960@9&EG<F%P:',@*B\*"B-I9F1E9B!-<
XM4T1/4PIU7V-H87()9&EG<F%P:&1E9F%U;'1;75LS72`](`D)+RH@<W1A;F1AH
XM<F0@35-$3U,@9&EG<F%P:',@*B\*"2`@('M[)T,G+"`G+"<L(#$R.'TL"2\J9
XM((`@*B\*"0E[)W4G+"`G(B<L(#$R.7TL"2\J(($@*B\*"0E[)V4G+"`G7"<GC
XM+"`Q,S!]+`DO*B""("HO"@D)>R=A)RP@)UXG+"`Q,S%]+`DO*B"#("HO"@D)H
XM>R=A)RP@)R(G+"`Q,S)]+`DO*B"$("HO"@D)>R=A)RP@)V`G+"`Q,S-]+`DOT
XM*B"%("HO"@D)>R=A)RP@)T`G+"`Q,S1]+`DO*B"&("HO"@D)>R=C)RP@)RPG$
XM+"`Q,S5]+`DO*B!^1R`H4T%3($,@8V%N)W0@:&%N9&QE('1H92!R96%L(&-HP
XM87(I("HO"@D)>R=E)RP@)UXG+"`Q,S9]+`DO*B!^2"`H4T%3($,@8V%N)W0@M
XM:&%N9&QE('1H92!R96%L(&-H87(I("HO"@D)>R=E)RP@)R(G+"`Q,S=]+`DO_
XM*B")("HO"@D)>R=E)RP@)V`G+"`Q,SA]+`DO*B"*("HO"@D)>R=I)RP@)R(GP
XM+"`Q,SE]+`DO*B"+("HO"@D)>R=I)RP@)UXG+"`Q-#!]+`DO*B",("HO"@D)+
XM>R=I)RP@)V`G+"`Q-#%]+`DO*B"-("HO"@D)>R=!)RP@)R(G+"`Q-#)]+`DOE
XM*B".("HO"@D)>R=!)RP@)T`G+"`Q-#-]+`DO*B"/("HO"@D)>R=%)RP@)UPG(
XM)RP@,30T?2P)+RH@D"`J+PH)"7LG82<L("=E)RP@,30U?2P)+RH@D2`J+PH)S
XM"7LG02<L("=%)RP@,30V?2P)+RH@DB`J+PH)"7LG;R<L("=>)RP@,30W?2P)U
XM+RH@DR`J+PH)"7LG;R<L("<B)RP@,30X?2P)+RH@E"`J+PH)"7LG;R<L("=@=
XM)RP@,30Y?2P)+RH@E2`J+PH)"7LG=2<L("=>)RP@,34P?2P)+RH@EB`J+PH)+
XM"7LG=2<L("=@)RP@,34Q?2P)+RH@ER`J+PH)"7LG>2<L("<B)RP@,34R?2P)/
XM+RH@F"`J+PH)"7LG3R<L("<B)RP@,34S?2P)+RH@F2`J+PH)"7LG52<L("<BK
XM)RP@,34T?2P)+RH@FB`J+PH)("`@('LG8R<L("=\)RP@,34U?2P)+RH@FR`J7
XM+PH)("`@('LG)"<L("<D)RP@,34V?2P)+RH@G"`J+PH)("`@('LG62<L("<MJ
XM)RP@,34W?2P)+RH@?ET@*%-!4R!#(&-A;B=T(&AA;F1L92!T:&4@<F5A;"!C)
XM:&%R*2`J+PH)("`@('LG4"<L("=T)RP@,34X?2P)+RH@GB`J+PH)("`@('LGX
XM9B<L("=F)RP@,34Y?2P)+RH@GR`J+PH)"7LG82<L("=<)R<L(#$V,'TL"2\J,
XM(*`@*B\*"0E[)VDG+"`G7"<G+"`Q-C%]+`DO*B"A("HO"@D)>R=O)RP@)UPG7
XM)RP@,38R?2P)+RH@HB`J+PH)"7LG=2<L("=<)R<L(#$V,WTL"2\J('AX("A3E
XM05,@0R!C86XG="!H86YD;&4@=&AE(')E86P@8VAA<BD@*B\*"0E[)VXG+"`G[
XM?B<L(#$V-'TL"2\J(*0@*B\*"0E[)TXG+"`G?B<L(#$V-7TL"2\J(*4@*B\*:
XM"0E[)V$G+"`G82<L(#$V-GTL"2\J(*8@*B\*"0E[)V\G+"`G;R<L(#$V-WTL:
XM"2\J(*<@*B\*"0E[)WXG+"`G/R<L(#$V.'TL"2\J(*@@*B\*"0E[)RTG+"`G:
XM82<L(#$V.7TL"2\J(*D@*B\*"0E[)V$G+"`G+2<L(#$W,'TL"2\J(*H@*B\**
XM"0E[)S$G+"`G,B<L(#$W,7TL"2\J(*L@*B\*"0E[)S$G+"`G-"<L(#$W,GTL_
XM"2\J(*P@*B\*"0E[)WXG+"`G(2<L(#$W,WTL"2\J(*T@*B\*"0E[)SPG+"`G1
XM/"<L(#$W-'TL"2\J(*X@*B\*"0E[)SXG+"`G/B<L(#$W-7TL"2\J(*\@*B\*>
XM"@D)>R=S)RP@)W,G+"`R,C5]+`DO*B#A("HO"@D)>R=J)RP@)W4G+"`R,S!]+
XM+`DO*B#F("HO"@D)>R=O)RP@)R\G+"`R,S=]+`DO*B#M("HO"@D)>R<K)RP@_
XM)RTG+"`R-#%]+`DO*B#Q("HO"@D)>R<^)RP@)STG+"`R-#)]+`DO*B#R("HOG
XM"@D)>R<\)RP@)STG+"`R-#-]+`DO*B#S("HO"@D)>R<Z)RP@)RTG+"`R-#9]_
XM+`DO*B#V("HO"@D)>R=^)RP@)WXG+"`R-#=]+`DO*B#W("HO"@D)>R=^)RP@+
XM)V\G+"`R-#A]+`DO*B#X("HO"@D)>R<R)RP@)S(G+"`R-3-]+`DO*B#]("HOM
XM"@D)>TY53"P@3E5,+"!.54Q]"@D)?3L*"B-E;'-E"2\J($U31$]3("HO"@IUW
XM7V-H87()9&EG<F%P:&1E9F%U;'1;75LS72`](`D)+RH@<W1A;F1A<F0@25-/1
XM(&1I9W)A<&AS("HO"@D@("![>R=^)RP@)R$G+"`Q-C%]+`DO*B"A("HO"@D@W
XM("`@>R=C)RP@)WPG+"`Q-C)]+`DO*B"B("HO"@D@("`@>R<D)RP@)R0G+"`Q(
XM-C-]+`DO*B"C("HO"@D@("`@>R=O)RP@)W@G+"`Q-C1]+`DO*B"D("HO"@D@O
XM("`@>R=9)RP@)RTG+"`Q-C5]+`DO*B"E("HO"@D@("`@>R=\)RP@)WPG+"`QE
XM-C9]+`DO*B"F("HO"@D@("`@>R=P)RP@)V$G+"`Q-C=]+`DO*B"G("HO"@D@E
XM("`@>R<B)RP@)R(G+"`Q-CA]+`DO*B"H("HO"@D@("`@>R=C)RP@)T\G+"`QC
XM-CE]+`DO*B"I("HO"@D)>R=A)RP@)RTG+"`Q-S!]+`DO*B"J("HO"@D)>R<\U
XM)RP@)SPG+"`Q-S%]+`DO*B"K("HO"@D)>R<M)RP@)RPG+"`Q-S)]+`DO*B"L&
XM("HO"@D)>R<M)RP@)RTG+"`Q-S-]+`DO*B"M("HO"@D)>R=R)RP@)T\G+"`Q'
XM-S1]+`DO*B"N("HO"@D)>R<M)RP@)STG+"`Q-S5]+`DO*B"O("HO"@D)>R=^>
XM)RP@)V\G+"`Q-S9]+`DO*B"P("HO"@D)>R<K)RP@)RTG+"`Q-S=]+`DO*B"Q,
XM("HO"@D)>R<R)RP@)S(G+"`Q-SA]+`DO*B"R("HO"@D)>R<S)RP@)S,G+"`Q`
XM-SE]+`DO*B"S("HO"@D)>R=<)R<L("=<)R<L(#$X,'TL"2\J(+0@*B\*"0E[@
XM)VHG+"`G=2<L(#$X,7TL"2\J(+4@*B\*"0E[)W`G+"`G<"<L(#$X,GTL"2\J7
XM(+8@*B\*"0E[)WXG+"`G+B<L(#$X,WTL"2\J(+<@*B\*"0E[)RPG+"`G+"<L`
XM(#$X-'TL"2\J(+@@*B\*"0E[)S$G+"`G,2<L(#$X-7TL"2\J(+D@*B\*"0E[8
XM)V\G+"`G+2<L(#$X-GTL"2\J(+H@*B\*"0E[)SXG+"`G/B<L(#$X-WTL"2\J_
XM(+L@*B\*"0E[)S$G+"`G-"<L(#$X.'TL"2\J(+P@*B\*"0E[)S$G+"`G,B<L3
XM(#$X.7TL"2\J(+T@*B\*"0E[)S,G+"`G-"<L(#$Y,'TL"2\J(+X@*B\*"0E[H
XM)WXG+"`G/R<L(#$Y,7TL"2\J(+\@*B\*"0E[)T$G+"`G8"<L(#$Y,GTL"2\J"
XM(,`@*B\*"0E[)T$G+"`G7"<G+"`Q.3-]+`DO*B#!("HO"@D)>R=!)RP@)UXG(
XM+"`Q.31]+`DO*B#"("HO"@D)>R=!)RP@)WXG+"`Q.35]+`DO*B##("HO"@D)\
XM>R=!)RP@)R(G+"`Q.39]+`DO*B#$("HO"@D)>R=!)RP@)T`G+"`Q.3=]+`DOH
XM*B#%("HO"@D)>R=!)RP@)T4G+"`Q.3A]+`DO*B#&("HO"@D)>R=#)RP@)RPG3
XM+"`Q.3E]+`DO*B#'("HO"@D)>R=%)RP@)V`G+"`R,#!]+`DO*B#(("HO"@D)D
XM>R=%)RP@)UPG)RP@,C`Q?2P)+RH@R2`J+PH)"7LG12<L("=>)RP@,C`R?2P)K
XM+RH@RB`J+PH)"7LG12<L("<B)RP@,C`S?2P)+RH@RR`J+PH)"7LG22<L("=@S
XM)RP@,C`T?2P)+RH@S"`J+PH)"7LG22<L("=<)R<L(#(P-7TL"2\J(,T@*B\*B
XM"0E[)TDG+"`G7B<L(#(P-GTL"2\J(,X@*B\*"0E[)TDG+"`G(B<L(#(P-WTLJ
XM"2\J(,\@*B\*"0E[)T0G+"`G+2<L(#(P.'TL"2\J(-`@*B\*"0E[)TXG+"`GZ
XM?B<L(#(P.7TL"2\J(-$@*B\*"0E[)T\G+"`G8"<L(#(Q,'TL"2\J(-(@*B\*.
XM"0E[)T\G+"`G7"<G+"`R,3%]+`DO*B#3("HO"@D)>R=/)RP@)UXG+"`R,3)]H
XM+`DO*B#4("HO"@D)>R=/)RP@)WXG+"`R,3-]+`DO*B#5("HO"@D)>R=/)RP@B
XM)R(G+"`R,31]+`DO*B#6("HO"@D)>R<O)RP@)UQ<)RP@,C$U?2P)+RH@UR`JC
XM+PH)"7LG3R<L("<O)RP@,C$V?2P)+RH@V"`J+PH)"7LG52<L("=@)RP@,C$WG
XM?2P)+RH@V2`J+PH)"7LG52<L("=<)R<L(#(Q.'TL"2\J(-H@*B\*"0E[)U4GS
XM+"`G7B<L(#(Q.7TL"2\J(-L@*B\*"0E[)U4G+"`G(B<L(#(R,'TL"2\J(-P@<
XM*B\*"0E[)UDG+"`G7"<G+"`R,C%]+`DO*B#=("HO"@D)>R=))RP@)W`G+"`R,
XM,C)]+`DO*B#>("HO"@D)>R=S)RP@)W,G+"`R,C-]+`DO*B#?("HO"@D)>R=A0
XM)RP@)V`G+"`R,C1]+`DO*B#@("HO"@D)>R=A)RP@)UPG)RP@,C(U?2P)+RH@\
XMX2`J+PH)"7LG82<L("=>)RP@,C(V?2P)+RH@XB`J+PH)"7LG82<L("=^)RP@N
XM,C(W?2P)+RH@XR`J+PH)"7LG82<L("<B)RP@,C(X?2P)+RH@Y"`J+PH)"7LG2
XM82<L("=`)RP@,C(Y?2P)+RH@Y2`J+PH)"7LG82<L("=E)RP@,C,P?2P)+RH@E
XMYB`J+PH)"7LG8R<L("<L)RP@,C,Q?2P)+RH@YR`J+PH)"7LG92<L("=@)RP@J
XM,C,R?2P)+RH@Z"`J+PH)"7LG92<L("=<)R<L(#(S,WTL"2\J(.D@*B\*"0E[2
XM)V4G+"`G7B<L(#(S-'TL"2\J(.H@*B\*"0E[)V4G+"`G(B<L(#(S-7TL"2\J5
XM(.L@*B\*"0E[)VDG+"`G8"<L(#(S-GTL"2\J(.P@*B\*"0E[)VDG+"`G7"<GN
XM+"`R,S=]+`DO*B#M("HO"@D)>R=I)RP@)UXG+"`R,SA]+`DO*B#N("HO"@D)6
XM>R=I)RP@)R(G+"`R,SE]+`DO*B#O("HO"@D)>R=D)RP@)RTG+"`R-#!]+`DO^
XM*B#P("HO"@D)>R=N)RP@)WXG+"`R-#%]+`DO*B#Q("HO"@D)>R=O)RP@)V`GD
XM+"`R-#)]+`DO*B#R("HO"@D)>R=O)RP@)UPG)RP@,C0S?2P)+RH@\R`J+PH)Z
XM"7LG;R<L("=>)RP@,C0T?2P)+RH@]"`J+PH)"7LG;R<L("=^)RP@,C0U?2P)\
XM+RH@]2`J+PH)"7LG;R<L("<B)RP@,C0V?2P)+RH@]B`J+PH)"7LG.B<L("<MX
XM)RP@,C0W?2P)+RH@]R`J+PH)"7LG;R<L("<O)RP@,C0X?2P)+RH@^"`J+PH)A
XM"7LG=2<L("=@)RP@,C0Y?2P)+RH@^2`J+PH)"7LG=2<L("=<)R<L(#(U,'TL,
XM"2\J(/H@*B\*"0E[)W4G+"`G7B<L(#(U,7TL"2\J(/L@*B\*"0E[)W4G+"`G7
XM(B<L(#(U,GTL"2\J(/P@*B\*"0E[)WDG+"`G7"<G+"`R-3-]+`DO*B#]("HO0
XM"@D)>R=I)RP@)W`G+"`R-31]+`DO*B#^("HO"@D)>R=Y)RP@)R(G+"`R-35]@
XM+`DO*B#_("HO"@D)>TY53"P@3E5,+"!.54Q]"@D)?3L*(V5N9&EF"2\J($U3(
XM1$]3("HO"B`*+RH*("H@:&%N9&QE(&1I9W)A<&AS(&%F=&5R('1Y<&EN9R!AL
XM(&-H87)A8W1E<@H@*B\*"6EN=`ID;V1I9W)A<&@H8RD*"6EN=`D)8SL*>PH)$
XM<W1A=&EC(&EN=`EB86-K<W!A8V5D.PD)+RH@8VAA<F%C=&5R(&)E9F]R92!"E
XM4R`J+PH)<W1A=&EC(&EN=`EL87-T8VAA<CL)"2\J(&QA<W0@='EP960@8VAAY
XM<F%C=&5R("HO"@H):68@*&,@/3T@+3$I"0DO*B!I;FET('9A;'5E<R`J+PH)-
XM>PH)"6)A8VMS<&%C960@/2`M,3L*"7T*"65L<V4@:68@*'!?9&<I"@E["@D)>
XM:68@*&)A8VMS<&%C960@/CT@,"D*"0D)8R`](&=E=&1I9W)A<&@H8F%C:W-PL
XM86-E9"P@8RD["@D)8F%C:W-P86-E9"`]("TQ.PH)"6EF("AC(#T]($)3("8FD
XM(&QA<W1C:&%R(#X](#`I"@D)"6)A8VMS<&%C960@/2!L87-T8VAA<CL*"7T*0
XM"6QA<W1C:&%R(#T@8SL*"7)E='5R;B!C.PI]"@HO*@H@*B!L;V]K=7`@=&AE*
XM('!A:7(@8VAA<C$L(&-H87(R(&EN('1H92!D:6=R87!H('1A8FQE<PH@*B!IF
XM9B!N;R!M871C:"P@<F5T=7)N(&-H87(R"B`J+PH):6YT"F=E=&1I9W)A<&@H>
XM8VAA<C$L(&-H87(R*0H):6YT"6-H87(Q.PH):6YT"6-H87(R.PI["@EI;G0)C
XM"6D["@EI;G0)"7)E='9A;#L*"@ER971V86P@/2`P.PH)9F]R("AI(#T@,#L@,
XM.R`K*VDI"0D)+RH@<V5A<F-H(&%D9&5D(&1I9W)A<&AS(&9I<G-T("HO"@E[@
XM"@D):68@*&D@/3T@9&EG<F%P:&-O=6YT*0DO*B!E;F0@;V8@861D960@=&%B>
XM;&4L('-E87)C:"!D969A=6QT<R`J+PH)"7L*"0D)9F]R("AI(#T@,#L@9&EGT
XM<F%P:&1E9F%U;'1;:5U;,%T@(3T@,#L@*RMI*0H)"0D):68@*&1I9W)A<&ADR
XM969A=6QT6VE=6S!=(#T](&-H87(Q("8F(&1I9W)A<&AD969A=6QT6VE=6S%=M
XM(#T](&-H87(R*0H)"0D)>PH)"0D)"7)E='9A;"`](&1I9W)A<&AD969A=6QTB
XM6VE=6S)=.PH)"0D)"6)R96%K.PH)"0D)?0H)"0EB<F5A:SL*"0E]"@D):68@Q
XM*&1I9W)A<&AN97=;:5U;,%T@/3T@8VAA<C$@)B8@9&EG<F%P:&YE=UMI75LQ%
XM72`]/2!C:&%R,BD*"0E["@D)"7)E='9A;"`](&1I9W)A<&AN97=;:5U;,ET[&
XM"@D)"6)R96%K.PH)"7T*"7T*"@EI9B`H<F5T=F%L(#T](#`I"2\J(&1I9W)AL
XM<&@@9&5L971E9"!O<B!N;W0@9F]U;F0@*B\*"0ER971U<FX@8VAA<C(["@ERB
XM971U<FX@<F5T=F%L.PI]"@HO*@H@*B!P=70@=&AE(&1I9W)A<&AS(&EN('1H>
XM92!A<F=U;65N="!S=')I;F<@:6X@=&AE(&1I9W)A<&@@=&%B;&4*("H@9F]R9
XM;6%T.B![8S%]>V,R?2!C:&%R('MC,7U[8S)](&-H87(@+BXN"B`J+PH)=F]IX
XM9`IP=71D:6=R87!H*'-T<BD*"6-H87(@*G-T<CL*>PH):6YT"0EC:&%R,2P@O
XM8VAA<C(L(&X["@EU7V-H87()*"IN97=T86(I6S-=.PH):6YT"0EI.PH*"7=H%
XM:6QE("@J<W1R*0H)>PH)"7-K:7!S<&%C92@F<W1R*3L*"0EC:&%R,2`]("ISK
XM='(K*SL*"0EC:&%R,B`]("IS='(K*SL*"0EI9B`H8VAA<C$@/3T@,"!\?"!C[
XM:&%R,B`]/2`P*0H)"0ER971U<FX["@D)<VMI<'-P86-E*"9S='(I.PH)"6EF5
XM("@A:7-D:6=I="@J<W1R*2D*"0E["@D)"65M<V<H95]N=6UB97(I.PH)"0ERK
XM971U<FX["@D)?0H)"6X@/2!G971D:6=I=',H)G-T<BD["@D):68@*&1I9W)A2
XM<&AN97<I"0DO*B!S96%R8V@@=&AE('1A8FQE(&9O<B!E>&ES=&EN9R!E;G1R@
XM>2`J+PH)"7L*"0D)9F]R("AI(#T@,#L@:2`\(&1I9W)A<&AC;W5N=#L@*RMIU
XM*0H)"0D):68@*&1I9W)A<&AN97=;:5U;,%T@/3T@8VAA<C$@)B8@9&EG<F%PL
XM:&YE=UMI75LQ72`]/2!C:&%R,BD*"0D)"7L*"0D)"0ED:6=R87!H;F5W6VE=9
XM6S)=(#T@;CL*"0D)"0EB<F5A:SL*"0D)"7T*"0D):68@*&D@/"!D:6=R87!HR
XM8V]U;G0I"@D)"0EC;VYT:6YU93L*"0E]"@D);F5W=&%B(#T@*'5?8VAA<B`HU
XM*BE;,UTI86QL;V,H9&EG<F%P:&-O=6YT("H@,R`K(#,I.PH)"6EF("AN97=TR
XM86(I"@D)>PH)"0EM96UM;W9E*"AC:&%R("HI;F5W=&%B+"`H8VAA<B`J*61I2
XM9W)A<&AN97<L("AS:7IE7W0I*&1I9W)A<&AC;W5N="`J(#,I*3L*"0D)9G)E#
XM92AD:6=R87!H;F5W*3L*"0D)9&EG<F%P:&YE=R`](&YE=W1A8CL*"0D)9&EGZ
XM<F%P:&YE=UMD:6=R87!H8V]U;G1=6S!=(#T@8VAA<C$["@D)"61I9W)A<&AN6
XM97=;9&EG<F%P:&-O=6YT75LQ72`](&-H87(R.PH)"0ED:6=R87!H;F5W6V1I#
XM9W)A<&AC;W5N=%U;,ET@/2!N.PH)"0DK*V1I9W)A<&AC;W5N=#L*"0E]"@E]/
XM"GT*"@EV;VED"FQI<W1D:6=R87!H<R@I"GL*"6EN=`D):3L*"@EP<FEN=&1IO
XM9W)A<&@H3E5,3"D["@EF;W(@*&D@/2`P.R!D:6=R87!H9&5F875L=%MI75LP<
XM73L@*RMI*0H)"6EF("AG971D:6=R87!H*&1I9W)A<&AD969A=6QT6VE=6S!=G
XM+"!D:6=R87!H9&5F875L=%MI75LQ72D@/3T@9&EG<F%P:&1E9F%U;'1;:5U;]
XM,ETI"@D)"7!R:6YT9&EG<F%P:"AD:6=R87!H9&5F875L=%MI72D["@EF;W(@4
XM*&D@/2`P.R!I(#P@9&EG<F%P:&-O=6YT.R`K*VDI"@D)<')I;G1D:6=R87!HQ
XM*&1I9W)A<&AN97=;:5TI.PH);W5T8VAA<B@G7&XG*3L*"7=A:71?<F5T=7)N*
XM*%12544I.PI]"@H)<W1A=&EC('9O:60*<')I;G1D:6=R87!H*'`I"@EU7V-H3
XM87(@*G`["GL*"6-H87()"6)U9ELY73L*"7-T871I8R!I;G0);&5N.PH*"6EFN
XM("AP(#T]($Y53$PI"@D);&5N(#T@,#L*"65L<V4@:68@*'!;,ET@(3T@,"D*G
XM"7L*"0EI9B`H;&5N(#X@0V]L=6UN<R`M(#$Q*0H)"7L*"0D);W5T8VAA<B@G.
XM7&XG*3L*"0D);&5N(#T@,#L*"0E]"@D):68@*&QE;BD*"0D);W5T<W1R;B@BC
XM("`@(BD["@D)<W!R:6YT9BAB=68L("(E8R5C("5C("4S9"(L('!;,%TL('!;,
XM,5TL('!;,ETL('!;,ETI.PH)"6]U='-T<FXH8G5F*3L*"0EL96X@*ST@,3$[B
X="@E]"GT*"B-E;F1I9B`O*B!$24=205!(4R`J+PIFH
X``
Xend
Xsize 7904
END_OF_FILE
if test 11106 -ne `wc -c <'vim/src/digrap_c.uue'`; then
echo shar: \"'vim/src/digrap_c.uue'\" unpacked with wrong size!
fi
chmod +x 'vim/src/digrap_c.uue'
# end of 'vim/src/digrap_c.uue'
fi
if test -f 'vim/src/main.c' -a "${1}" != "-c" ; then
echo shar: Will not clobber existing file \"'vim/src/main.c'\"
else
echo shar: Extracting \"'vim/src/main.c'\" \(11534 characters\)
sed "s/^X//" >'vim/src/main.c' <<'END_OF_FILE'


X/* vi:ts=4:sw=4
X *
X * VIM - Vi IMproved
X *
X * Code Contributions By: Bram Moolenaar mo...@oce.nl
X * Tim Thompson twitch!tjt
X * Tony Andrews onecom!wldrdg!tony
X * G. R. (Fred) Walter watmath!watcgl!grwalter
X */
X

X#define EXTERN
X#include "vim.h"
X#include "globals.h"
X#include "proto.h"
X#include "param.h"
X
Xstatic void usage __PARMS((int));
X
X static void
Xusage(n)
X int n;
X{
X register int i;
X static char *(use[]) = {"[file ..]\n",
X "-t tag\n",
X "+[command] file ..\n",
X "-c {command} file ..\n",
X "-e [errorfile]\n"};
X static char *(errors[]) = {"Unknown option\n", /* 0 */
X "Too many arguments\n", /* 1 */
X "Argument missing\n", /* 2 */
X };
X
X fprintf(stderr, errors[n]);
X fprintf(stderr, "usage:");
X for (i = 0; ; ++i)
X {
X fprintf(stderr, " vim [options] ");
X fprintf(stderr, use[i]);
X if (i == (sizeof(use) / sizeof(char *)) - 1)
X break;
X fprintf(stderr, " or:");
X }
X#ifdef AMIGA
X fprintf(stderr, "\noptions: -v -n -b -r -x -d device -s scriptin -w scriptout -T terminal\n");
X#else
X fprintf(stderr, "\noptions: -v -n -b -r -s scriptin -w scriptout -T terminal\n");
X#endif
X mch_windexit(1);
X}
X
X#ifdef USE_LOCALE
X# include <locale.h>
X#endif
X
X void


Xmain(argc, argv)
X int argc;
X char **argv;
X{

X char *initstr; /* init string from the environment */
X char *term = NULL; /* specified terminal name */
X char *fname = NULL; /* file name from command line */
X char *command = NULL; /* command from + option */
X char *tagname = NULL; /* tag from -t option */
X int c;
X int doqf = 0;
X int i;
X int bin_mode = FALSE; /* -b option used */
X
X#ifdef DEBUG
X# ifdef MSDOS
X OPENDEBUG("#debug#");
X# else
X OPENDEBUG("/tmp/debug/vim");
X# endif
X#endif
X
X/*
X * Check if we have an interactive window.
X * If not, open one with a newcli command (needed for :! to work).
X * check_win will also handle the -d argument (for the Amiga).
X */
X check_win(argc, argv);
X
X/*
X * If the executable is called "view" we start in readonly mode.
X */
X if (strcmp(gettail(argv[0]), "view") == 0)
X {
X readonlymode = TRUE;
X p_ro = TRUE;
X p_uc = 0;
X }
X
X ++argv;
X /*
X * Process the command line arguments
X * '-s scriptin' read from script file
X * '-w scriptout' write to script file
X * '-v' view
X * '-b' binary
X * '-n' no .vim file
X * '-r' recovery mode
X * '-x' open window directly, not with newcli
X * '-T terminal' terminal name
X */
X while (argc > 1 && argv[0][0] == '-' &&
X strchr("vnbrxswTd", c = argv[0][1]) != NULL && c)
X {
X --argc;
X switch (c)
X {
X case 'v':
X readonlymode = TRUE;
X p_ro = TRUE;
X /*FALLTHROUGH*/
X
X case 'n':
X p_uc = 0;
X break;
X
X case 'b':
X bin_mode = TRUE; /* postpone to after reading .exrc files */
X break;
X
X case 'r':
X recoverymode = 1;
X break;
X
X case 'x':
X break; /* This is ignored as it is handled in check_win() */
X
X default: /* options with argument */
X ++argv;
X --argc;
X if (argc < 1)
X usage(2);
X
X switch (c)
X {
X case 's':
X if ((scriptin[0] = fopen(argv[0], READBIN)) == NULL)
X {
X fprintf(stderr, "cannot open %s for reading\n", argv[0]);
X mch_windexit(2);
X }
X break;
X
X case 'w':
X if ((scriptout = fopen(argv[0],
X#ifdef MSDOS
X "ab"
X#else
X "a"
X#endif
X )) == NULL)
X {
X fprintf(stderr, "cannot open %s for output\n", argv[0]);
X mch_windexit(2);
X }
X break;
X
X/*
X * The -T term option is always available and when TERMCAP is supported it
X * overrides the environment variable TERM.
X */
X case 'T':
X term = *argv;
X break;
X
X /* case 'd': This is ignored as it is handled in check_win() */
X }
X }
X ++argv;
X }
X
X /*
X * Allocate space for the generic buffer
X */
X if ((IObuff = alloc(IOSIZE)) == NULL)
X mch_windexit(0);
X
X /* note that we may use mch_windexit() before mch_windinit()! */
X mch_windinit();
X set_init(); /* after mch_windinit because Rows is used */
X
X /*
X * Process the other command line arguments.
X */
X if (argc > 1)
X {
X c = argv[0][1];
X switch (argv[0][0])
X {
X case '-':
X switch (c)
X {
X case 'e': /* -e QuickFix mode */
X switch (argc)
X {
X case 2:
X if (argv[0][2]) /* -eerrorfile */
X p_ef = argv[0] + 2;
X break; /* -e */
X
X case 3: /* -e errorfile */
X ++argv;
X p_ef = argv[0];
X break;
X
X default: /* argc > 3: too many arguments */
X usage(1);
X }
X doqf = 1;
X break;
X
X case 'c': /* -c {command} file .. */
X if (argc <= 3)
X usage(2);
X ++argv;
X --argc;
X command = &(argv[0][0]);
X goto getfiles;
X
X case 't': /* -t tag or -ttag */
X switch (argc)
X {
X case 2:
X if (argv[0][2]) /* -ttag */
X {
X tagname = argv[0] + 2;
X break;
X }
X usage(2); /* argument missing */
X break;
X
X case 3: /* -t tag */
X ++argv;
X tagname = argv[0];
X break;
X
X default: /* argc > 3: too many arguments */
X usage(1);
X }
X break;
X
X default:
X usage(0);
X }
X break;
X
X case '+': /* + or +{number} or +/{pat} or +{command} */
X if (argc < 3) /* no filename */
X usage(2);
X if (c == NUL)
X command = "$";
X else
X command = &(argv[0][1]);
X
Xgetfiles:
X ++argv;
X --argc;
X /*FALLTHROUGH*/
X
X default: /* must be a file name */
X#if !defined(UNIX)
X ExpandWildCards(argc - 1, argv, &numfiles, &files, TRUE, TRUE);
X if (numfiles != 0)
X {
X fname = files[0];
X files_exp = TRUE;
X }
X#else
X files = argv;
X numfiles = argc - 1;
X fname = argv[0];
X#endif
X if (numfiles > 1)
X printf("%d files to edit\n", numfiles);


X break;
X }
X }
X

X RedrawingDisabled = TRUE;
X filealloc(); /* Initialize storage structure */
X init_yank(); /* init yank buffers */
X termcapinit(term); /* get terminal capabilities */
X
X#ifdef USE_LOCALE
X setlocale(LC_ALL, ""); /* for ctype() and the like */
X#endif
X
X#ifdef MSDOS /* default mapping for some often used keys */
X domap(0, "#1 :help\r", NORMAL); /* F1 is help key */
X domap(0, "\316R i", NORMAL); /* INSERT is 'i' */
X domap(0, "\316S \177", NORMAL); /* DELETE is 0x7f */
X domap(0, "\316G 0", NORMAL); /* HOME is '0' */
X domap(0, "\316w H", NORMAL); /* CTRL-HOME is 'H' */
X domap(0, "\316O $", NORMAL); /* END is '$' */
X domap(0, "\316u L", NORMAL); /* CTRL-END is 'L' */
X domap(0, "\316I \002", NORMAL); /* PageUp is '^B' */
X domap(0, "\316\204 1G", NORMAL); /* CTRL-PageUp is '1G' */
X domap(0, "\316Q \006", NORMAL); /* PageDown is '^F' */
X domap(0, "\316v G", NORMAL); /* CTRL-PageDown is 'G' */
X /* insert mode */
X domap(0, "#1 \017:help\r", INSERT); /* F1 is help key */
X domap(0, "\316R \033", INSERT); /* INSERT is ESC */
X /* note: extra space needed to avoid the same memory used for this
X and the one above, domap() will add a NUL to it */
X domap(0, "\316S \177", INSERT+CMDLINE); /* DELETE is 0x7f */
X domap(0, "\316G \017""0", INSERT); /* HOME is '^O0' */
X domap(0, "\316w \017H", INSERT); /* CTRL-HOME is '^OH' */
X domap(0, "\316O \017$", INSERT); /* END is '^O$' */
X domap(0, "\316u \017L", INSERT); /* CTRL-END is '^OL' */
X domap(0, "\316I \017\002", INSERT); /* PageUp is '^O^B' */
X domap(0, "\316\204 \017\061G", INSERT); /* CTRL-PageUp is '^O1G' */
X domap(0, "\316Q \017\006", INSERT); /* PageDown is '^O^F' */
X domap(0, "\316v \017G", INSERT); /* CTRL-PageDown is '^OG' */
X#endif
X
X/*
X * get system wide defaults (for unix)
X */
X#ifdef DEFVIMRC_FILE
X dosource(DEFVIMRC_FILE);
X#endif
X
X/*
X * Try to read initialization commands from the following places:
X * - environment variable VIMINIT
X * - file s:.vimrc ($HOME/.vimrc for Unix)
X * - environment variable EXINIT
X * - file s:.exrc ($HOME/.exrc for Unix)
X * The first that exists is used, the rest is ignored.
X */
X if ((initstr = (char *)vimgetenv("VIMINIT")) != NULL)
X docmdline((u_char *)initstr);
X else if (dosource(SYSVIMRC_FILE))
X {
X if ((initstr = (char *)vimgetenv("EXINIT")) != NULL)
X docmdline((u_char *)initstr);
X else
X dosource(SYSEXRC_FILE);
X }
X
X/*
X * Read initialization commands from ".vimrc" or ".exrc" in current directory.
X * This is only done if the 'exrc' option is set.
X * Because of security reasons we disallow shell and write commands now,
X * except for unix if the file is owned by the user or 'secure' option has been
X * reset in environmet of global ".exrc" or ".vimrc".
X * Only do this if VIMRC_FILE is not the same as SYSVIMRC_FILE or DEFVIMRC_FILE.
X */
X if (p_exrc)
X {
X#ifdef UNIX
X {
X struct stat s;
X
X /* if ".vimrc" file is not owned by user, set 'secure' mode */
X if (stat(VIMRC_FILE, &s) || s.st_uid != getuid())
X secure = p_secure;
X }
X#else
X secure = p_secure;
X#endif
X
X i = 1;
X if (fullpathcmp(SYSVIMRC_FILE, VIMRC_FILE)
X#ifdef DEFVIMRC_FILE
X && fullpathcmp(DEFVIMRC_FILE, VIMRC_FILE)
X#endif
X )
X i = dosource(VIMRC_FILE);
X#ifdef UNIX
X if (i)
X {
X struct stat s;
X
X /* if ".exrc" file is not owned by user set 'secure' mode */
X if (stat(EXRC_FILE, &s) || s.st_uid != getuid())
X secure = p_secure;
X else
X secure = 0;
X }
X#endif
X if (i && fullpathcmp(SYSEXRC_FILE, EXRC_FILE))
X dosource(EXRC_FILE);
X }
X
X/*
X * Call settmode and starttermcap here, so the T_KS and T_TS may be defined
X * by termcapinit and redifined in .exrc.
X */
X settmode(1);
X starttermcap();
X
X if (secure == 2) /* done something that is not allowed */
X wait_return(TRUE); /* must be called after settmode(1) */
X secure = 0;
X
X#ifdef AMIGA
X fname_case(fname); /* set correct case for file name */
X#endif
X setfname(fname, NULL);
X maketitle();
X
X if (bin_mode) /* -b option used */
X {
X p_bin = 1; /* binary file I/O */
X p_tw = 0; /* no automatic line wrap */
X p_tx = 0; /* no text mode */
X p_ta = 0; /* no text auto */
X p_ml = 0; /* no modelines */
X p_et = 0; /* no expand tab */
X }
X
X/*
X * Start putting things on the screen.
X * Clear screen first, so file message will not be cleared.
X */
X starting = FALSE;
X screenclear();
X if (Filename != NULL)
X readfile(Filename, sFilename, (linenr_t)0, TRUE);
X else
X msg("Empty Buffer");
X UNCHANGED;
X
X setpcmark();
X if (!tagname)
X startscript(); /* start writing to auto script file */
X
X if (recoverymode && !scriptin[curscript]) /* first do script file, then recover */
X openrecover();
X
X /* position the display and the cursor at the top of the file. */
X Topline = 1;
X Curpos.lnum = 1;
X Curpos.col = 0;
X Cursrow = Curscol = 0;
X
X if (doqf && qf_init()) /* if reading error file fails: exit */
X mch_windexit(3);
X
X if (command)
X docmdline((u_char *)command);
X /*
X * put the :ta command in the stuff buffer here, so that it will not
X * be erased by an emsg().
X */
X if (tagname)
X {
X stuffReadbuff(":ta ");
X stuffReadbuff(tagname);
X stuffReadbuff("\n");
X }
X
X RedrawingDisabled = FALSE;
X updateScreen(NOT_VALID);
X
X /* start in insert mode (already taken care of for :ta command) */
X if (p_im && stuff_empty())
X stuffReadbuff("i");
X/*
X * main command loop
X */
X for (;;)
X {
X if (got_int)
X {
X (void)vgetc(); /* flush all buffers */
X got_int = FALSE;
X }
X adjustCurpos();
X if (stuff_empty()) /* only when no command pending */
X {
X cursupdate(); /* Figure out where the cursor is based on Curpos. */
X showruler(0);
X
X if (Visual.lnum)
X updateScreen(INVERTED); /* update inverted part */
X if (must_redraw)
X updateScreen(VALID);
X setcursor();
X }
X
X normal(); /* get and execute a command */
X }
X /*NOTREACHED*/
X}
X
X void
Xgetout(r)
X int r;
X{
X windgoto((int)Rows - 1, 0);
X outchar('\r');
X outchar('\n');
X mch_windexit(r);
X}
END_OF_FILE
if test 11534 -ne `wc -c <'vim/src/main.c'`; then
echo shar: \"'vim/src/main.c'\" unpacked with wrong size!
fi
chmod +x 'vim/src/main.c'
# end of 'vim/src/main.c'
fi
if test -f 'vim/src/mark.c' -a "${1}" != "-c" ; then
echo shar: Will not clobber existing file \"'vim/src/mark.c'\"
else
echo shar: Extracting \"'vim/src/mark.c'\" \(9757 characters\)
sed "s/^X//" >'vim/src/mark.c' <<'END_OF_FILE'


X/* vi:ts=4:sw=4
X *
X * VIM - Vi IMproved
X *
X * Code Contributions By: Bram Moolenaar mo...@oce.nl
X * Tim Thompson twitch!tjt
X * Tony Andrews onecom!wldrdg!tony
X * G. R. (Fred) Walter watmath!watcgl!grwalter
X */
X
X/*

X * mark.c: functions for setting marks and jumping to them


X */
X
X#include "vim.h"

X#include "globals.h"
X#include "proto.h"
X#include "mark.h"
X#include "ops.h" /* for endop and startop */
X
X/*
X * This file contains routines to maintain and manipulate marks.
X */
X
X#define NMARKS 26 /* max. # of named marks */
X#define JUMPLISTSIZE 50 /* max. # of marks in jump list */
X
Xstatic struct mark pcmark; /* previous context mark */
Xstatic struct mark namedm[NMARKS]; /* original vi marks */
Xstatic struct filemark namedfm[NMARKS]; /* new marks with file nr */
Xstatic struct filemark jumplist[JUMPLISTSIZE]; /* list of old pcmarks */
X
Xstatic int jumplistlen = 0;
Xstatic int jumplistidx = 0;
X
Xstatic FPOS *mark2pos __ARGS((struct mark *));
X
X#ifdef NEW
Xstruct markptr
X{
X int mp_ident; /* 'a' - 'z', 'A' - 'Z' or jumplist */
X struct filemark mp_fm;
X} marklist[NMARKS + NMARKS + JUMPLISTSIZE];
Xint marklistlen = 0;
X
Xadjustmark(old, new)
X{
X max = marklistlen - 1;
X min = 0;
X while (max > min)
X {
X i = (max + min) / 2;
X t = marklist[i].mp_fm.ptr;
X if (t > old)
X max = i - 1;
X else if (t < old)
X min = i + 1;
X }
X if (max == min && marklist[i].mp_fm.ptr == old)
X {
X }
X}
X#endif
X
X/*
X * setmark(c) - set named mark 'c' at current cursor position
X *
X * Returns TRUE on success, FALSE if no room for mark or bad name given.
X */
X int
Xsetmark(c)
X int c;
X{
X int i;
X
X if (islower(c))
X {
X i = c - 'a';
X namedm[i].ptr = nr2ptr(Curpos.lnum);
X namedm[i].col = Curpos.col;
X return TRUE;
X }
X if (isupper(c))
X {
X i = c - 'A';
X namedfm[i].mark.ptr = nr2ptr(Curpos.lnum);
X namedfm[i].mark.col = Curpos.col;
X namedfm[i].lnum = Curpos.lnum;
X namedfm[i].fnum = 0;
X return TRUE;
X }
X return FALSE;
X}
X
X/*
X * setpcmark() - set the previous context mark to the current position
X * and insert it into the jump list
X */
X void
Xsetpcmark()
X{
X int i;
X#ifdef ROTATE
X struct filemark tempmark;
X#endif
X
X pcmark.ptr = nr2ptr(Curpos.lnum);
X pcmark.col = Curpos.col;
X
X#ifndef ROTATE
X /*
X * simply add the new entry at the end of the list
X */
X jumplistidx = jumplistlen;
X#else
X /*
X * If last used entry is not at the top, put it at the top by rotating
X * the stack until it is (the newer entries will be at the bottom).
X * Keep one entry (the last used one) at the top.
X */
X if (jumplistidx < jumplistlen)
X ++jumplistidx;
X while (jumplistidx < jumplistlen)
X {
X tempmark = jumplist[jumplistlen - 1];
X for (i = jumplistlen - 1; i > 0; --i)
X jumplist[i] = jumplist[i - 1];
X jumplist[0] = tempmark;
X ++jumplistidx;
X }
X#endif
X
X /* only add new entry if it differs from the last one */
X if (jumplistlen == 0 || jumplist[jumplistidx - 1].mark.ptr != pcmark.ptr)
X {
X /* if jumplist is full: remove oldest entry */
X if (++jumplistlen > JUMPLISTSIZE)
X {
X jumplistlen = JUMPLISTSIZE;
X for (i = 1; i < jumplistlen; ++i)
X jumplist[i - 1] = jumplist[i];
X --jumplistidx;
X }
X
X jumplist[jumplistidx].mark = pcmark;
X jumplist[jumplistidx].lnum = Curpos.lnum;
X jumplist[jumplistidx].fnum = 0;
X ++jumplistidx;
X }
X}
X
X/*
X * move "count" positions in the jump list (count may be negative)
X */
X FPOS *
Xmovemark(count)
X int count;
X{
X FPOS *pos;
X
X if (jumplistlen == 0) /* nothing to jump to */
X return (FPOS *)NULL;
X
X if (jumplistidx + count < 0 || jumplistidx + count >= jumplistlen)
X return (FPOS *)NULL;
X
X /*
X * if first CTRL-O or CTRL-I command after a jump, add cursor position to list
X */
X if (jumplistidx == jumplistlen)
X {
X setpcmark();
X --jumplistidx; /* skip the new entry */
X }
X
X jumplistidx += count;
X if (jumplist[jumplistidx].mark.ptr == NULL) /* jump to other file */
X {
X if (getaltfile(jumplist[jumplistidx].fnum - 1, jumplist[jumplistidx].lnum, FALSE))
X return (FPOS *)NULL;
X Curpos.col = jumplist[jumplistidx].mark.col;
X jumplist[jumplistidx].fnum = 0;
X jumplist[jumplistidx].mark.ptr = nr2ptr(Curpos.lnum);
X pos = (FPOS *)-1;
X }
X else
X pos = mark2pos(&jumplist[jumplistidx].mark);
X return pos;
X}
X
X/*
X * getmark(c) - find mark for char 'c'
X *
X * Return pointer to FPOS if found
X * NULL if no such mark.
X * -1 if mark is in other file (only if changefile is TRUE)
X */
X FPOS *
Xgetmark(c, changefile)
X int c;
X int changefile;
X{
X FPOS *posp;
X
X posp = NULL;
X if (c == '\'' || c == '`') /* previous context mark */
X posp = mark2pos(&pcmark);
X else if (c == '[') /* to start of previous operator */
X {
X if (startop.lnum > 0 && startop.lnum <= line_count)
X posp = &startop;
X }
X else if (c == ']') /* to end of previous operator */
X {
X if (endop.lnum > 0 && endop.lnum <= line_count)
X posp = &endop;
X }
X else if (islower(c)) /* normal named mark */
X posp = mark2pos(&(namedm[c - 'a']));
X else if (isupper(c)) /* named file mark */
X {
X c -= 'A';
X posp = mark2pos(&(namedfm[c].mark));
X if (posp == NULL && namedfm[c].lnum != 0 && (changefile || samealtfile(namedfm[c].fnum - 1)))
X {
X if (!getaltfile(namedfm[c].fnum - 1, namedfm[c].lnum, TRUE))
X {
X Curpos.col = namedfm[c].mark.col;
X namedfm[c].fnum = 0;
X namedfm[c].mark.ptr = nr2ptr(Curpos.lnum);
X posp = (FPOS *)-1;
X }
X }
X }
X return posp;
X}
X
X static FPOS *
Xmark2pos(markp)
X struct mark *markp;
X{
X static FPOS pos;
X
X if (markp->ptr != NULL && (pos.lnum = ptr2nr(markp->ptr, (linenr_t)1)) != 0)
X {
X pos.col = markp->col;
X return (&pos);
X }
X return (FPOS *)NULL;
X}
X
X/*
X * clrallmarks() - clear all marks
X *
X * Used mainly when trashing the entire buffer during ":e" type commands
X */
X void
Xclrallmarks()
X{
X static int i = -1;
X
X if (i == -1) /* first call ever: initialize */
X for (i = 0; i < NMARKS; i++)
X namedfm[i].lnum = 0;
X
X for (i = 0; i < NMARKS; i++)
X {
X namedm[i].ptr = NULL;
X namedfm[i].mark.ptr = NULL;
X }
X pcmark.ptr = NULL;
X qf_clrallmarks();
X for (i = 0; i < jumplistlen; ++i)
X jumplist[i].mark.ptr = NULL;
X}
X
X/*
X * increment the file number for all filemarks
X * called when adding a file to the file stack
X */
X void
Xincrmarks()
X{
X int i;
X
X for (i = 0; i < NMARKS; i++)
X ++namedfm[i].fnum;
X
X for (i = 0; i < jumplistlen; ++i)
X {
X#if 0 /* this would take too much time */
X if (jumplist[i].fnum == 0) /* current file */
X jumplist[i].lnum = ptr2nr(jumplist[i].mark.ptr, 1);
X#endif
X ++jumplist[i].fnum;
X }
X}
X
X/*
X * decrement the file number for the filemarks of the current file
X * called when not adding the current file name to the file stack
X */
X void
Xdecrmarks()
X{
X int i;
X
X for (i = 0; i < NMARKS; i++)
X if (namedfm[i].fnum == 1)
X namedfm[i].fnum = 0;
X
X for (i = 0; i < jumplistlen; ++i)
X if (jumplist[i].fnum == 1)
X jumplist[i].fnum = 0;
X}
X
X/*
X * adjustmark: set new ptr for a mark
X * if new == NULL the mark is effectively deleted
X * (this is slow: we have to check about 100 pointers!)
X */
X void
Xadjustmark(old, new)
X char *old, *new;
X{
X register int i, j;
X
X for (i = 0; i < NMARKS; ++i)
X {
X if (namedm[i].ptr == old)
X namedm[i].ptr = new;
X if (namedfm[i].mark.ptr == old)
X {
X namedfm[i].mark.ptr = new;
X if (new == NULL)
X namedfm[i].lnum = 0; /* delete this mark */
X }
X }
X if (pcmark.ptr == old)
X pcmark.ptr = new;
X for (i = 0; i < jumplistlen; ++i)
X if (jumplist[i].mark.ptr == old)
X {
X if (new == NULL) /* delete this mark */
X {
X --jumplistlen;
X if (jumplistidx > jumplistlen)
X --jumplistidx;
X for (j = i; j < jumplistlen; ++j)
X jumplist[j] = jumplist[j + 1];
X }
X else
X jumplist[i].mark.ptr = new;
X }
X qf_adjustmark(old, new);
X}
X
X/*
X * get name of file from a filemark (use the occasion to update the lnum)
X */
X char *
Xfm_getname(fmark)
X struct filemark *fmark;
X{
X linenr_t nr;
X char *name;
X
X if (fmark->fnum != 0) /* maybe not current file */
X {
X name = getaltfname(fmark->fnum - 1);
X if (name == NULL)
X return "-none-";
X if (Filename == NULL || fnamecmp(name, Filename) != 0) /* not current file */
X return name;
X fmark->fnum = 0;
X }
X if (fmark->mark.ptr == NULL)
X {
X if (fmark->lnum <= line_count) /* safety check */
X fmark->mark.ptr = nr2ptr(fmark->lnum); /* update ptr */
X }
X else
X {
X nr = ptr2nr(fmark->mark.ptr, (linenr_t)1);
X if (nr != 0)
X fmark->lnum = nr; /* update lnum */
X }
X return "-current-";
X}
X
X/*
X * print the marks (use the occasion to update the line numbers)
X */
X void
Xdomarks()
X{
X int i;
X char *name;
X
X#ifdef AMIGA
X settmode(0); /* set cooked mode, so output can be halted */
X#endif
X outstrn("\nmark line file\n");
X for (i = 0; i < NMARKS; ++i)
X {
X if (namedm[i].ptr != NULL)
X {
X sprintf(IObuff, " %c %5ld\n",
X i + 'a',
X ptr2nr(namedm[i].ptr, (linenr_t)1));
X outstrn(IObuff);
X }
X flushbuf();
X }
X for (i = 0; i < NMARKS; ++i)
X {
X if (namedfm[i].lnum != 0)
X {
X name = fm_getname(&namedfm[i]);
X if (name == NULL) /* file name not available */
X continue;
X
X sprintf(IObuff, " %c %5ld %s\n",
X i + 'A',
X namedfm[i].lnum,
X name);
X outstrn(IObuff);
X }
X flushbuf();
X }
X#ifdef AMIGA
X settmode(1);
X#endif
X wait_return(TRUE);
X}
X
X/*
X * print the jumplist (use the occasion to update the line numbers)
X */
X void
Xdojumps()
X{
X int i;
X char *name;
X
X#ifdef AMIGA
X settmode(0); /* set cooked mode, so output can be halted */
X#endif
X outstrn("\n jump line file\n");
X for (i = 0; i < jumplistlen; ++i)
X {
X if (jumplist[i].lnum != 0)
X {
X name = fm_getname(&jumplist[i]);
X if (name == NULL) /* file name not available */
X continue;
X
X sprintf(IObuff, "%c %2d %5ld %s\n",
X i == jumplistidx ? '>' : ' ',
X i + 1,
X jumplist[i].lnum,
X name);
X outstrn(IObuff);
X }
X flushbuf();
X }
X if (jumplistidx == jumplistlen)
X outstrn(">\n");
X#ifdef AMIGA
X settmode(1);
X#endif
X wait_return(TRUE);
X}
END_OF_FILE
if test 9757 -ne `wc -c <'vim/src/mark.c'`; then
echo shar: \"'vim/src/mark.c'\" unpacked with wrong size!
fi
chmod +x 'vim/src/mark.c'
# end of 'vim/src/mark.c'
fi
if test -f 'vim/src/quickfix.c' -a "${1}" != "-c" ; then
echo shar: Will not clobber existing file \"'vim/src/quickfix.c'\"
else
echo shar: Extracting \"'vim/src/quickfix.c'\" \(9863 characters\)
sed "s/^X//" >'vim/src/quickfix.c' <<'END_OF_FILE'


X/* vi:ts=4:sw=4
X *
X * VIM - Vi IMproved
X *
X * Code Contributions By: Bram Moolenaar mo...@oce.nl
X * Tim Thompson twitch!tjt
X * Tony Andrews onecom!wldrdg!tony
X * G. R. (Fred) Walter watmath!watcgl!grwalter
X */
X
X/*

X * quickfix.c: functions for quickfix mode, using a file with error messages


X */
X
X#include "vim.h"

X#include "globals.h"
X#include "proto.h"
X#include "param.h"
X
Xstatic void qf_free __ARGS((void));
Xstatic char *qf_types __ARGS((int, int));
X
X/*
X * for each error the next struct is allocated and linked in a list
X */
Xstruct qf_line
X{
X struct qf_line *qf_next; /* pointer to next error in the list */
X struct qf_line *qf_prev; /* pointer to previous error in the list */
X linenr_t qf_lnum; /* line number where the error occurred */
X char *qf_mark; /* pointer to that line (if != NULL) */
X int qf_col; /* column where the error occurred */
X int qf_nr; /* error number */
X char *qf_fname; /* file name where the error occurred */
X char *qf_text; /* description of the error */
X char qf_cleared;/* set to TRUE if qf_mark has been cleared */
X char qf_type; /* type of the error (mostly 'E') */
X char qf_valid; /* valid error message detected */
X};
X
Xstatic struct qf_line *qf_start; /* pointer to the first error */
Xstatic struct qf_line *qf_ptr; /* pointer to the current error */
X
Xstatic int qf_count = 0; /* number of errors (0 means no error list) */
Xstatic int qf_index; /* current index in the error list */
Xstatic int qf_nonevalid; /* set to TRUE if not a single valid entry found */
Xstatic int qf_marksset; /* set to 1 when qf_mark-s have been set */
X
X/*
X * Read the errorfile into memory, line by line, building the error list.
X * Return 1 for error, 0 for success.
X */
X int
Xqf_init()
X{
X char namebuf[CMDBUFFSIZE + 1];
X char errmsg[CMDBUFFSIZE + 1];
X int col;
X char type;
X char valid;
X long lnum;
X int enr;
X FILE *fd;
X struct qf_line *qfp = NULL;
X struct qf_line *qfprev = NULL; /* init to make SASC shut up */
X char *pfmt, *fmtstr;
X#ifdef UTS2
X char *(adr[7]);
X#else
X void *(adr[7]);
X#endif
X int adr_cnt = 0;
X int maxlen;
X int i;
X
X if (p_ef == NULL || *p_ef == NUL)
X {
X emsg(e_errorf);
X return 1;
X }
X if ((fd = fopen(p_ef, "r")) == NULL)
X {
X emsg(e_openerrf);
X return 1;
X }
X qf_free();
X qf_index = 0;
X for (i = 0; i < 7; ++i)
X adr[i] = NULL;
X
X/*
X * The format string is copied and modified from p_efm to fmtstr.
X * Only a few % characters are allowed.
X */
X /* get some space to modify the format string into */
X /* must be able to do the largest expansion 7 times (7 x 3) */
X maxlen = strlen(p_efm) + 25;
X fmtstr = (char *)alloc(maxlen);
X if (fmtstr == NULL)
X goto error2;
X for (pfmt = p_efm, i = 0; *pfmt; ++pfmt, ++i)
X {
X if (pfmt[0] != '%') /* copy normal character */
X fmtstr[i] = pfmt[0];
X else
X {
X fmtstr[i++] = '%';
X switch (pfmt[1])
X {
X case 'f': /* filename */
X adr[adr_cnt++] = namebuf;
X
X case 'm': /* message */
X if (pfmt[1] == 'm')
X adr[adr_cnt++] = errmsg;
X fmtstr[i++] = '[';
X fmtstr[i++] = '^';
X if (pfmt[2])
X fmtstr[i++] = pfmt[2];
X else
X#ifdef MSDOS
X fmtstr[i++] = '\r';
X#else
X fmtstr[i++] = '\n';
X#endif
X fmtstr[i] = ']';
X break;
X case 'c': /* column */
X adr[adr_cnt++] = &col;
X fmtstr[i] = 'd';
X break;
X case 'l': /* line */
X adr[adr_cnt++] = &lnum;
X fmtstr[i++] = 'l';
X fmtstr[i] = 'd';
X break;
X case 'n': /* error number */
X adr[adr_cnt++] = &enr;
X fmtstr[i] = 'd';
X break;
X case 't': /* error type */
X adr[adr_cnt++] = &type;
X fmtstr[i] = 'c';
X break;
X case '%': /* %% */
X case '*': /* %*: no assignment */
X fmtstr[i] = pfmt[1];
X break;
X default:
X emsg("invalid % in format string");
X goto error2;
X }
X if (adr_cnt == 7)
X {
X emsg("too many % in format string");
X goto error2;
X }
X ++pfmt;
X }
X if (i >= maxlen - 6)
X {
X emsg("invalid format string");
X goto error2;
X }
X }
X fmtstr[i] = NUL;
X
X while (fgets(IObuff, CMDBUFFSIZE, fd) != NULL)
X {
X if ((qfp = (struct qf_line *)alloc((unsigned)sizeof(struct qf_line))) == NULL)
X goto error2;
X
X IObuff[CMDBUFFSIZE] = NUL; /* for very long lines */
X namebuf[0] = NUL;
X errmsg[0] = NUL;
X lnum = 0;
X col = 0;
X enr = -1;
X type = 0;
X valid = TRUE;
X
X if (sscanf(IObuff, fmtstr, adr[0], adr[1], adr[2], adr[3],
X adr[4], adr[5]) != adr_cnt)
X {
X namebuf[0] = NUL; /* something failed, remove file name */
X valid = FALSE;
X strcpy(errmsg, IObuff); /* copy whole line to error message */
X if ((pfmt = strrchr(errmsg, '\n')) != NULL)
X *pfmt = NUL;
X#ifdef MSDOS
X if ((pfmt = strrchr(errmsg, '\r')) != NULL)
X *pfmt = NUL;
X#endif
X }
X
X if ((qfp->qf_fname = strsave(namebuf)) == NULL)
X goto error1;
X if ((qfp->qf_text = strsave(errmsg)) == NULL)
X {
X free(qfp->qf_fname);
X goto error1;
X }
X qfp->qf_lnum = lnum;
X qfp->qf_col = col;
X qfp->qf_nr = enr;
X qfp->qf_type = type;
X qfp->qf_valid = valid;
X
X if (qf_count == 0) /* first element in the list */
X {
X qf_start = qfp;
X qfp->qf_prev = qfp; /* first element points to itself */
X }
X else
X {
X qfp->qf_prev = qfprev;
X qfprev->qf_next = qfp;
X }
X qfp->qf_next = qfp; /* last element points to itself */
X qfp->qf_mark = NULL;
X qfp->qf_cleared = FALSE;
X qfprev = qfp;
X ++qf_count;
X if (qf_index == 0 && qfp->qf_valid) /* first valid entry */
X {
X qf_index = qf_count;
X qf_ptr = qfp;
X }
X }
X free(fmtstr);
X if (!ferror(fd))
X {
X if (qf_index == 0) /* no valid entry found */
X {
X qf_ptr = qf_start;
X qf_index = 1;
X qf_nonevalid = TRUE;
X }
X else
X qf_nonevalid = FALSE;
X fclose(fd);
X qf_jump(0); /* display first error */
X return 0;
X }
X emsg(e_readerrf);
Xerror1:
X free(qfp);
Xerror2:
X fclose(fd);
X qf_free();
X return 1;
X}
X
X/*
X * jump to quickfix line "errornr"; if "errornr" is zero, redisplay the same line
X */
X void
Xqf_jump(errornr)
X int errornr;
X{
X struct qf_line *qfp;
X linenr_t i;
X char *msgp;
X
X if (qf_count == 0)
X {
X emsg(e_quickfix);
X return;
X }
X
X if (errornr == -1) /* next valid entry */
X {
X do
X {
X if (qf_index == qf_count)
X break;
X ++qf_index;
X qf_ptr = qf_ptr->qf_next;
X } while (!qf_nonevalid && !qf_ptr->qf_valid);
X }
X else if (errornr == -2) /* previous valid entry */
X {
X do
X {
X if (qf_index == 1)
X break;
X --qf_index;
X qf_ptr = qf_ptr->qf_prev;
X } while (!qf_nonevalid && !qf_ptr->qf_valid);
X }
X else if (errornr != 0) /* go to specified number */
X {
X while (errornr < qf_index && qf_index > 1)
X {
X --qf_index;
X qf_ptr = qf_ptr->qf_prev;
X }
X while (errornr > qf_index && qf_index < qf_count)
X {
X ++qf_index;
X qf_ptr = qf_ptr->qf_next;
X }
X }
X
X /*
X * If there is a file name,
X * read the wanted file if needed, and check autowrite etc.
X */
X if (qf_ptr->qf_fname[0] == NUL || getfile(qf_ptr->qf_fname, NULL, TRUE) <= 0)
X {
X /*
X * Use mark if possible, because the line number may be invalid
X * after line inserts / deletes.
X * If qf_lnum is 0, stay on the same line.
X */
X i = 0;
X msgp = "";
X if ((qf_ptr->qf_mark != NULL && (i = ptr2nr(qf_ptr->qf_mark, (linenr_t)0)) == 0) || qf_ptr->qf_cleared)
X msgp = "(line changed) ";
X if (i == 0)
X i = qf_ptr->qf_lnum;
X if (i > line_count)
X i = line_count;
X if (i > 0)
X Curpos.lnum = i;
X Curpos.col = qf_ptr->qf_col;
X adjustCurpos();
X cursupdate();
X smsg("(%d of %d) %s%s: %s", qf_index, qf_count, msgp,
X qf_types(qf_ptr->qf_type, qf_ptr->qf_nr), qf_ptr->qf_text);
X
X if (!qf_marksset) /* marks not set yet: try to find them for
X the errors in the curren file */
X {
X for (i = 0, qfp = qf_start; i < qf_count; ++i, qfp = qfp->qf_next)
X if (qfp->qf_fname != NUL && strcmp(qfp->qf_fname, qf_ptr->qf_fname) == 0 && qfp->qf_lnum <= line_count && qfp->qf_lnum > 0)
X qfp->qf_mark = nr2ptr(qfp->qf_lnum);
X qf_marksset = 1;
X }
X }
X}
X
X/*
X * list all errors
X */
X void
Xqf_list()
X{
X struct qf_line *qfp;
X int i;
X
X if (qf_count == 0)
X {
X emsg(e_quickfix);
X return;
X }
X qfp = qf_start;
X gotocmdline(TRUE, NUL);
X#ifdef AMIGA
X settmode(0); /* set cooked mode so output can be halted */
X#endif
X for (i = 1; i <= qf_count; ++i)
X {
X sprintf(IObuff, "%2d line %3ld col %2d %s: %s",
X i,
X (long)qfp->qf_lnum,
X qfp->qf_col,
X qf_types(qfp->qf_type, qfp->qf_nr),
X qfp->qf_text);
X outstr(IObuff);
X outchar('\n');
X qfp = qfp->qf_next;
X flushbuf();
X }
X#ifdef AMIGA
X settmode(1);
X#endif
X wait_return(TRUE);
X}
X
X/*
X * free the error list
X */
X static void
Xqf_free()
X{
X struct qf_line *qfp;
X
X while (qf_count)
X {
X qfp = qf_start->qf_next;
X free(qf_start->qf_fname);
X free(qf_start->qf_text);
X free(qf_start);
X qf_start = qfp;
X --qf_count;
X }
X qf_marksset = 0;
X}
X
X/*
X * qf_clrallmarks() - clear all marks
X *
X * Used mainly when trashing the entire buffer during ":e" type commands
X */
X void
Xqf_clrallmarks()
X{
X int i;
X struct qf_line *qfp;
X
X if (qf_count)
X for (i = 0, qfp = qf_start; i < qf_count; i++, qfp = qfp->qf_next)
X qfp->qf_mark = NULL;
X qf_marksset = 0;
X}
X
X/*
X * qf_adjustmark: set new ptr for a mark
X */
X void
Xqf_adjustmark(old, new)
X char *old, *new;
X{
X register int i;
X struct qf_line *qfp;
X
X if (qf_count)
X {
X for (i = 0, qfp = qf_start; i < qf_count; ++i, qfp = qfp->qf_next)
X if (qfp->qf_mark == old)
X {
X qfp->qf_mark = new;
X if (new == NULL)
X qfp->qf_cleared = TRUE;
X }
X }
X}
X
X/*
X * Make a nice message out of the error character and the error number:
X * char number message
X * e or E 0 " Error"
X * w or W 0 "Warning"
X * other 0 ""
X * w or W n "Warning n"
X * other n " Error n"
X */
X static char *
Xqf_types(c, nr)
X int c, nr;
X{
X static char buf[20];
X char *p1;
X
X p1 = " Error";
X if (c == 'W' || c == 'w')
X p1 = "Warning";
X else if (nr <= 0 && c != 'E' && c != 'e')
X p1 = "";
X
X if (nr <= 0)
X return p1;
X
X sprintf(buf, "%s %3d", p1, nr);
X return buf;
X}
END_OF_FILE
if test 9863 -ne `wc -c <'vim/src/quickfix.c'`; then
echo shar: \"'vim/src/quickfix.c'\" unpacked with wrong size!
fi
chmod +x 'vim/src/quickfix.c'
# end of 'vim/src/quickfix.c'
fi
echo shar: End of archive 5 \(of 25\).
cp /dev/null ark5isdone


MISSING=""
for I in 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 ; do
if test ! -f ark${I}isdone ; then
MISSING="${MISSING} ${I}"
fi
done
if test "${MISSING}" = "" ; then
echo You have unpacked all 25 archives.
rm -f ark[1-9]isdone ark[1-9][0-9]isdone
else
echo You still need to unpack the following archives:
echo " " ${MISSING}
fi
## End of shell archive.
exit 0

===============================================================================

Bram Moolenaar

unread,
Dec 20, 1993, 10:42:46 PM12/20/93
to
Submitted-by: mo...@oce.nl (Bram Moolenaar)
Posting-number: Volume 41, Issue 52
Archive-name: vim/part02

Environment: UNIX, AMIGA, MS-DOS
Supersedes: vim: Volume 37, Issue 1-24

#! /bin/sh


# This is a shell archive. Remove anything before this line, then unpack
# it by saving it into a file and typing "sh file". To overwrite existing
# files, type "sh file -c". You can also feed this as standard input via
# unshar, or by typing "sh <file", e.g.. If this archive is complete, you
# will see the following message at the end:

# "End of archive 2 (of 25)."
# Contents: vim/doc/Amiga.doc vim/doc/digr_doc.uue vim/doc/vim.1
# vim/src/addcr.bat vim/src/alloc.c vim/src/charset.c vim/src/help.c
# vim/src/keymap.h vim/src/linefunc.c vim/src/makefile.bcc
# vim/src/makefile.dice vim/src/makefile.dos vim/src/message.c
# vim/src/msdos.h vim/src/tccon_tc.uue vim/src/unix.h vim/termcap
# vim/uganda.txt
# Wrapped by mool@oce-rd2 on Wed Dec 15 09:50:03 1993


PATH=/bin:/usr/bin:/usr/ucb ; export PATH

if test -f 'vim/doc/Amiga.doc' -a "${1}" != "-c" ; then
echo shar: Will not clobber existing file \"'vim/doc/Amiga.doc'\"
else
echo shar: Extracting \"'vim/doc/Amiga.doc'\" \(2211 characters\)
sed "s/^X//" >'vim/doc/Amiga.doc' <<'END_OF_FILE'
XThis file contains the particularities for the Amiga version of Vim.
X
XInstallation on the Amiga:
X- Assign "vim:" to the directory where the vim.hlp file is (for the help
X command).
X- With DOS 1.3 or earlier: Put "arp.library" in "libs:". Make sure that
X newcli and run are in "c:" (for executing external commands).
X- Put a shell that accepts a command with "-c" (e.g. "Csh" from Fish disk
X 624) in "c:" or in any other directory that is in your search path (for
X executing external commands).
X
XIf you have sufficient memory you can avoid startup delays by making Vim and
Xcsh resident with the command "rez csh vim". You will have to put
X"rezlib.library" in your "libs:" directory. Under 2.0 you will need rez
Xversion 0.5.
X
XIf you do not use digraphs, you can save some memory by recompiling without
Xthe DIGRAPHS option. If you want to use Vim with other terminals you can
Xrecompile with the TERMCAP option. Vim compiles with Manx 5.x and SAS 6.x.
XSee the makefiles.
X
XIf you want to use different colors set the termcap code t_tp (for normal
Xtext) and/or t_ti (for inverted text).
X
XStandard ANSI escape sequences are used. The codes are:
X30 grey char 40 grey cell >0 grey background 0 all attributes off
X31 black char 41 black cell >1 black background 1 boldface
X32 white char 42 white cell >2 white background 2 faint
X33 blue char 43 blue cell >3 blue background 3 italic
X34 grey char 44 grey cell >4 grey background 4 underscore
X35 black char 45 black cell >5 black background 7 reverse video
X36 white char 46 white cell >6 white background 8 invisible
X37 blue char 47 blue cell >7 blue background
X
XThe codes with '>' must be the last. The cell and background color should be
Xthe same. The codes can be combined by separating them with a semicolon. For
Xexample to get white text on a blue background:
X :set t_tp=^V<ESC>[0;32;43;>3m
X
XWhen using multiple commands with a filter command, e.g.
X :r! echo this; echo that
XOnly the output of the last command is used. To fix this you have to group the
Xcommands. This depends on the shell you use (that is why it is not done
Xautomatically in Vim). Examples:
X :r! (echo this; echo that)
X :r! {echo this; echo that}
END_OF_FILE
if test 2211 -ne `wc -c <'vim/doc/Amiga.doc'`; then
echo shar: \"'vim/doc/Amiga.doc'\" unpacked with wrong size!
fi
chmod +x 'vim/doc/Amiga.doc'
# end of 'vim/doc/Amiga.doc'
fi
if test -f 'vim/doc/digr_doc.uue' -a "${1}" != "-c" ; then
echo shar: Will not clobber existing file \"'vim/doc/digr_doc.uue'\"
else
echo shar: Extracting \"'vim/doc/digr_doc.uue'\" \(2949 characters\)
sed "s/^X//" >'vim/doc/digr_doc.uue' <<'END_OF_FILE'
X
Xbegin 644 digraph.doc
XM5&AE<V4@87)E('1H92!D969A=6QT(&1I9W)A<&@@8VAA<F%C=&5R<R!F;W(@]
XM5FEM+@H*5&AE(&9I<G-T('1W;R!C:&%R86-T97)S(&EN(&5A8V@@8V]L=6UNG
XM(&%R92!T:&4@8VAA<F%C=&5R<R!Y;W4@:&%V92!T;R!T>7!E('1O"F5N=&5R*
XM(&$@9&EG<F%P:"X*"DEN('1H92!M:61D;&4@;V8@96%C:"!C;VQU;6X@:7,@9
XM=&AE(')E<W5L=&EN9R!C:&%R86-T97(N(%1H:7,@;6%Y(&)E(&UA;F=L960*!
XM:68@>6]U(&QO;VL@870@=&AI<R!F:6QE(&]N('-O;65T:&EN9R!E;'-E('1H>
XM86X@=&AE('-Y<W1E;2!T:&%T('1H97D@=V5R90IM96%N="!F;W(@;W(@=VAE>
XM;B!Y;W4@<')I;G0@:70N"@I4:&4@9&5C:6UA;"!N=6UB97(@:7,@=&AE($%3!
XM0TE)(&-O9&4@9F]R('1H92!C:&%R86-T97(N"@I$969A=6QT(&1I9W)A<&AS>
XM(&]N('1H92!!;6EG83H*?B$@H2`Q-C$@("!C?""B(#$V,B`@("0D(*,@,38S8
XM("`@;W@@I"`Q-C0@("!9+2"E(#$V-2`@('Q\(*8@,38V("`@<&$@IR`Q-C<*(
XM(B(@J"`Q-C@@("!C3R"I(#$V.2`@(&$M(*H@,3<P("`@/#P@JR`Q-S$@("`M_
XM+2"M(#$W,R`@(')/(*X@,3<T("`@+3T@KR`Q-S4*?F\@L"`Q-S8@("`K+2"Q$
XM(#$W-R`@(#(R(+(@,3<X("`@,S,@LR`Q-SD@("`G)R"T(#$X,"`@(&IU(+4@>
XM,3@Q("`@<'`@MB`Q.#(*?BX@MR`Q.#,@("`L+""X(#$X-"`@(#$Q(+D@,3@U:
XM("`@;RT@NB`Q.#8@("`^/B"[(#$X-R`@(#$T(+P@,3@X("`@,3(@O2`Q.#D*:
XM,S0@OB`Q.3`@("!^/R"_(#$Y,2`@($%@(,`@,3DR("`@02<@P2`Q.3,@("!!:
XM7B#"(#$Y-"`@($%^(,,@,3DU("`@02(@Q"`Q.38*04`@Q2`Q.3<@("!!12#&C
XM(#$Y."`@($,L(,<@,3DY("`@16`@R"`R,#`@("!%)R#)(#(P,2`@($5>(,H@/
XM,C`R("`@12(@RR`R,#,*26`@S"`R,#0@("!))R#-(#(P-2`@($E>(,X@,C`VQ
XM("`@22(@SR`R,#<@("`M1"#0(#(P."`@($Y^(-$@,C`Y("`@3V`@TB`R,3`*$
XM3R<@TR`R,3$@("!/7B#4(#(Q,B`@($]^(-4@,C$S("`@3R(@UB`R,30@("`OX
XM7"#7(#(Q-2`@($\O(-@@,C$V("`@56`@V2`R,3<*52<@VB`R,3@@("!57B#;K
XM(#(Q.2`@(%4B(-P@,C(P("`@62<@W2`R,C$@("!)<"#>(#(R,B`@('-S(-\@'
XM,C(S("`@86`@X"`R,C0*82<@X2`R,C4@("!A7B#B(#(R-B`@(&%^(.,@,C(W4
XM("`@82(@Y"`R,C@@("!A0"#E(#(R.2`@(&%E(.8@,C,P("`@8RP@YR`R,S$*]
XM96`@Z"`R,S(@("!E)R#I(#(S,R`@(&5>(.H@,C,T("`@92(@ZR`R,S4@("!I,
XM8"#L(#(S-B`@(&DG(.T@,C,W("`@:5X@[B`R,S@*:2(@[R`R,SD@("`M9"#PU
XM(#(T,"`@(&Y^(/$@,C0Q("`@;V`@\B`R-#(@("!O)R#S(#(T,R`@(&]>(/0@F
XM,C0T("`@;WX@]2`R-#4*;R(@]B`R-#8@("`Z+2#W(#(T-R`@(&\O(/@@,C0X3
XM("`@=6`@^2`R-#D@("!U)R#Z(#(U,"`@('5>(/L@,C4Q("`@=2(@_"`R-3(*V
XM>2<@_2`R-3,@("!I<"#^(#(U-"`@('DB(/\@,C4U"@I$969A=6QT(&1I9W)A?
XM<&AS(&]N($U31$]3.@I#+""`(#$R."`@('4B(($@,3(Y("`@92<@@B`Q,S`@R
XM("!A7B"#(#$S,2`@(&$B((0@,3,R("`@86`@A2`Q,S,@("!A0""&(#$S-`IC=
XM+""'(#$S-2`@(&5>((@@,3,V("`@92(@B2`Q,S<@("!E8""*(#$S."`@(&DB2
XM((L@,3,Y("`@:5X@C"`Q-#`@("!I8""-(#$T,0I!(B".(#$T,B`@($%`((\@^
XM,30S("`@12<@D"`Q-#0@("!A92"1(#$T-2`@($%%()(@,30V("`@;UX@DR`QB
XM-#<@("!O(B"4(#$T.`IO8""5(#$T.2`@('5>()8@,34P("`@=6`@ER`Q-3$@[
XM("!Y(B"8(#$U,B`@($\B()D@,34S("`@52(@FB`Q-30@("!C?"";(#$U-0HD\
XM)""<(#$U-B`@(%DM()T@,34W("`@4'0@GB`Q-3@@("!F9B"?(#$U.2`@(&$GN
XM(*`@,38P("`@:2<@H2`Q-C$@("!O)R"B(#$V,@IU)R"C(#$V,R`@(&Y^(*0@D
XM,38T("`@3GX@I2`Q-C4@("!A82"F(#$V-B`@(&]O(*<@,38W("`@?C\@J"`QF
XM-C@@("`M82"I(#$V.0IA+2"J(#$W,"`@(#$R(*L@,3<Q("`@,30@K"`Q-S(@Q
XM("!^(2"M(#$W,R`@(#P\(*X@,3<T("`@/CX@KR`Q-S4@("!S<R#A(#(R-0IJE
XM=2#F(#(S,"`@(&\O(.T@,C,W("`@*RT@\2`R-#$@("`^/2#R(#(T,B`@(#P]U
XM(/,@,C0S("`@.BT@]B`R-#8@("!^?B#W(#(T-PI^;R#X(#(T."`@(#(R(/T@C
X$,C4S"C0S+
X``
Xend
Xsize 2074
END_OF_FILE
if test 2949 -ne `wc -c <'vim/doc/digr_doc.uue'`; then
echo shar: \"'vim/doc/digr_doc.uue'\" unpacked with wrong size!
fi
chmod +x 'vim/doc/digr_doc.uue'
# end of 'vim/doc/digr_doc.uue'
fi
if test -f 'vim/doc/vim.1' -a "${1}" != "-c" ; then
echo shar: Will not clobber existing file \"'vim/doc/vim.1'\"
else
echo shar: Extracting \"'vim/doc/vim.1'\" \(5091 characters\)
sed "s/^X//" >'vim/doc/vim.1' <<'END_OF_FILE'
X.TH VIM 1 "28 March 1992"
X.SH NAME
Xvim \- Vi IMproved, a programmers text editor
X.SH SYNOPSIS
X.B vim
X[options] [file ..]
X.br
X.B vim
X[options] \-t tag
X.br
X.B vim
X[options] +[command] file ..
X.br
X.B vim
X[options] \-c {command} file ..
X.br
X.B vim
X[options] \-e [errorfile]
X.SH DESCRIPTION
X.B Vim
Xis a text editor that is upwards compatible to vi. It can be used to edit any
XASCII text. It is especially useful for editing programs.
X.PP
XThere are a lot of enhancements above vi: multi level undo, command line
Xediting, filename completion, on line help, quoting, etc.. Read difference.doc
Xfor a summary of the differences between vi and Vim.
X.PP
XMost often
X.B Vim
Xis started to edit a single file with the command
X.PP
X vim file
X.PP
XMore generally VIM is started with:
X.PP
X vim [options] [filelist]
X.PP
XIf the filelist is missing, the editor will start with an empty buffer.
XOtherwise exactly one out of the following four may be used to choose one or
Xmore files to be edited.
X.TP 12
Xfile ..
XA list of file names. The first one (alphabetically) will be
Xthe current file and read into the buffer. The cursor will be
Xpositioned on the first line of the buffer. You can get to the other files
Xwith the ":next" command.
X.TP
X+[num] file ..
XSame as the above, but the cursor will be positioned on line
X"num". If "num" is missing, the cursor will be positioned on
Xthe last line.
X.TP
X+/pat file ..
XSame as the above, but the cursor will be positioned on the
Xfirst occurrence of "pat" in the current file (see reference.doc,
Xsection "pattern searches" for the available search
Xpatterns).
X.TP
X+{command} file ..
X.TP
X-c {command} file ..
XSame as the above, but {command} will be executed after the
Xfile has been read. {command} is interpreted as an Ex
Xcommand. If the {command} contains spaces it must
Xbe enclosed in double quotes (this depends on the shell that
Xis used).
XExample: Vim "+set si" main.c
X.TP
X-t {tag}
XThe file to edit and the initial cursor position depends on a "tag", a sort
Xof goto label. {tag} is looked up in the tags file, the associated file
Xbecomes the current file and the associated command is executed. Mostly this
Xis used for C programs. {tag} then should be a function name. The effect is
Xthat the file containing that function becomes the current file and the
Xcursor is positioned on the start of the function (see reference.doc,
Xsection "tag searches").
X.TP
X-e [errorfile]
XStart in quickFix mode. The file [errorfile]
Xis read and the first error is displayed. If [errorfile] is omitted the file
Xname is obtained from the 'errorfile' option (defaults to "AztecC.Err" for
Xthe Amiga, "errors" on other systems). Further errors can be jumped to
Xwith the ":cn" command. See reference.doc section 5.5.
X.SH OPTIONS
XThe options, if present, must precede the filelist. The options may be given
Xin any order.
X.TP 12
X-r
XRecovery mode. The autoscript file is read to recover a
Xcrashed editing session. It has almost the same effect as
X"-s file.vim". See reference.doc, chapter "Recovery after a crash".
X.TP
X-v
XView mode. The 'readonly' option will be set. You can still
Xedit the buffer, but will be prevented from accidental
Xoverwriting a file. If you do want to overwrite a file, add
Xan exclamation mark to the Ex command, as in ":w!". The
X'readonly' option can be reset with ":set noro" (see reference.doc,
Xoptions chapter).
X.TP
X-b
XBinary. A few options will be set that makes it possible to edit a binary or
Xexecutable file.
X.TP
X-x
X(Amiga only) Vim is not restarted to open a new window. This option should
Xbe used when Vim is executed by a program that will wait for the edit
Xsession to finish (e.g. mail). The ":sh" and ":!" commands will not work.
X.TP
X-n
XNo autoscript file will be written. Recovery after a crash
Xwill be impossible. Handy if you want to edit a file on a
Xvery slow medium (e.g. floppy). Can also be done with ":set
Xuc=0".
X.TP
X-s {scriptin}
XThe script file {scriptin} is read. The characters in the
Xfile are interpreted as if you had typed them. The same can
Xbe done with the command ":source! {scriptin}". If the end
Xof the file is reached before the editor exits, further
Xcharacters are read from the keyboard.
X.TP
X-w {scriptout}
XAll the characters that you type are recorded in the file
X{scriptout}, until you exit VIM. This is useful if you want
Xto create a script file to be used with "vim -s" or
X":source!".
X.TP
X-T terminal
XTells Vim the name of the terminal you are using. Should be a terminal known
Xto Vim (builtin) or defined in the termcap file.
X.TP
X-d device
XOpen "device" for use as a terminal. Only on the Amiga. Example:
X"\-d con:20/30/600/150".
X.SH SEE ALSO
XVim documentation:
X.br
Xreference.doc: A complete reference of Vim (long)
X.br
Xindex: Overview of all command characters (useful when mapping)
X.br
Xdifference.doc: Overview of the differences between vi and Vim
X.br
Xunix.doc: Unix-specific comments
X.br
Xvim.hlp: File used by the on-line help (short)
X.SH AUTHOR
XMost of VIM was made by Bram Moolenaar.
X.br
XVIM is based on Stevie, worked on by: Tim Thompson,
XTony Andrews and G.R. (Fred) Walter
X.SH BUGS
XProbably.
END_OF_FILE
if test 5091 -ne `wc -c <'vim/doc/vim.1'`; then
echo shar: \"'vim/doc/vim.1'\" unpacked with wrong size!
fi
chmod +x 'vim/doc/vim.1'
# end of 'vim/doc/vim.1'
fi
if test -f 'vim/src/addcr.bat' -a "${1}" != "-c" ; then
echo shar: Will not clobber existing file \"'vim/src/addcr.bat'\"
else
echo shar: Extracting \"'vim/src/addcr.bat'\" \(3570 characters\)
sed "s/^X//" >'vim/src/addcr.bat' <<'END_OF_FILE'
Xaddcr <addcr.c >tmp
Xcp tmp addcr.c
Xaddcr <alloc.c >tmp
Xcp tmp alloc.c
Xaddcr <ascii.h >tmp
Xcp tmp ascii.h
Xaddcr <buffers.c >tmp
Xcp tmp buffers.c
Xaddcr <charset.c >tmp
Xcp tmp charset.c
Xaddcr <cmdline.c >tmp
Xcp tmp cmdline.c
Xaddcr <cmdtab.h >tmp
Xcp tmp cmdtab.h
Xaddcr <cmdtab.tab >tmp
Xcp tmp cmdtab.tab
Xaddcr <csearch.c >tmp
Xcp tmp csearch.c
Xaddcr <debug.h >tmp
Xcp tmp debug.h
Xaddcr <digraph.c >tmp
Xcp tmp digraph.c
Xaddcr <edit.c >tmp
Xcp tmp edit.c
Xaddcr <env.h >tmp
Xcp tmp env.h
Xaddcr <fileio.c >tmp
Xcp tmp fileio.c
Xaddcr <globals.h >tmp
Xcp tmp globals.h
Xaddcr <help.c >tmp
Xcp tmp help.c
Xaddcr <keymap.h >tmp
Xcp tmp keymap.h
Xaddcr <linefunc.c >tmp
Xcp tmp linefunc.c
Xaddcr <macros.h >tmp
Xcp tmp macros.h
Xaddcr <main.c >tmp
Xcp tmp main.c
Xaddcr <makefile >tmp
Xcp tmp makefile
Xaddcr <mark.c >tmp
Xcp tmp mark.c
Xaddcr <mark.h >tmp
Xcp tmp mark.h
Xaddcr <message.c >tmp
Xcp tmp message.c
Xaddcr <misccmds.c >tmp
Xcp tmp misccmds.c
Xaddcr <mkcmdtab.c >tmp
Xcp tmp mkcmdtab.c
Xaddcr <msdos.c >tmp
Xcp tmp msdos.c
Xaddcr <msdos.h >tmp
Xcp tmp msdos.h
Xaddcr <normal.c >tmp
Xcp tmp normal.c
Xaddcr <ops.c >tmp
Xcp tmp ops.c
Xaddcr <ops.h >tmp
Xcp tmp ops.h
Xaddcr <param.c >tmp
Xcp tmp param.c
Xaddcr <param.h >tmp
Xcp tmp param.h
Xaddcr <proto.h >tmp
Xcp tmp proto.h
Xaddcr <quickfix.c >tmp
Xcp tmp quickfix.c
Xaddcr <regexp.c >tmp
Xcp tmp regexp.c
Xaddcr <regexp.h >tmp
Xcp tmp regexp.h
Xaddcr <regmagic.h >tmp
Xcp tmp regmagic.h
Xaddcr <regsub.c >tmp
Xcp tmp regsub.c
Xaddcr <screen.c >tmp
Xcp tmp screen.c
Xaddcr <script.c >tmp
Xcp tmp script.c
Xaddcr <search.c >tmp
Xcp tmp search.c
Xaddcr <storage.c >tmp
Xcp tmp storage.c
Xaddcr <tag.c >tmp
Xcp tmp tag.c
Xaddcr <tags >tmp
Xcp tmp tags
Xaddcr <term.c >tmp
Xcp tmp term.c
Xaddcr <term.h >tmp
Xcp tmp term.h
Xaddcr <termlib.c >tmp
Xcp tmp termlib.c
Xaddcr <termlib.fix >tmp
Xcp tmp termlib.fix
Xaddcr <undo.c >tmp
Xcp tmp undo.c
Xaddcr <version.c >tmp
Xcp tmp version.c
Xaddcr <vim.h >tmp
Xcp tmp vim.h
Xaddcr <vim.prj >tmp
Xcp tmp vim.prj
Xaddcr <vimresp >tmp
Xcp tmp vimresp
Xaddcr <proto\alloc.pro >tmp
Xcp tmp proto\alloc.pro
Xaddcr <proto\amiga.pro >tmp
Xcp tmp proto\amiga.pro
Xaddcr <proto\buffers.pro >tmp
Xcp tmp proto\buffers.pro
Xaddcr <proto\charset.pro >tmp
Xcp tmp proto\charset.pro
Xaddcr <proto\cmdline.pro >tmp
Xcp tmp proto\cmdline.pro
Xaddcr <proto\csearch.pro >tmp
Xcp tmp proto\csearch.pro
Xaddcr <proto\digraph.pro >tmp
Xcp tmp proto\digraph.pro
Xaddcr <proto\edit.pro >tmp
Xcp tmp proto\edit.pro
Xaddcr <proto\fileio.pro >tmp
Xcp tmp proto\fileio.pro
Xaddcr <proto\help.pro >tmp
Xcp tmp proto\help.pro
Xaddcr <proto\linefunc.pro >tmp
Xcp tmp proto\linefunc.pro
Xaddcr <proto\main.pro >tmp
Xcp tmp proto\main.pro
Xaddcr <proto\mark.pro >tmp
Xcp tmp proto\mark.pro
Xaddcr <proto\message.pro >tmp
Xcp tmp proto\message.pro
Xaddcr <proto\misccmds.pro >tmp
Xcp tmp proto\misccmds.pro
Xaddcr <proto\normal.pro >tmp
Xcp tmp proto\normal.pro
Xaddcr <proto\ops.pro >tmp
Xcp tmp proto\ops.pro
Xaddcr <proto\param.pro >tmp
Xcp tmp proto\param.pro
Xaddcr <proto\quickfix.pro >tmp
Xcp tmp proto\quickfix.pro
Xaddcr <proto\regexp.pro >tmp
Xcp tmp proto\regexp.pro
Xaddcr <proto\regsub.pro >tmp
Xcp tmp proto\regsub.pro
Xaddcr <proto\screen.pro >tmp
Xcp tmp proto\screen.pro
Xaddcr <proto\script.pro >tmp
Xcp tmp proto\script.pro
Xaddcr <proto\search.pro >tmp
Xcp tmp proto\search.pro
Xaddcr <proto\storage.pro >tmp
Xcp tmp proto\storage.pro
Xaddcr <proto\tag.pro >tmp
Xcp tmp proto\tag.pro
Xaddcr <proto\term.pro >tmp
Xcp tmp proto\term.pro
Xaddcr <proto\termlib.pro >tmp
Xcp tmp proto\termlib.pro
Xaddcr <proto\undo.pro >tmp
Xcp tmp proto\undo.pro
Xdel tmp
END_OF_FILE
if test 3570 -ne `wc -c <'vim/src/addcr.bat'`; then
echo shar: \"'vim/src/addcr.bat'\" unpacked with wrong size!
fi
chmod +x 'vim/src/addcr.bat'
# end of 'vim/src/addcr.bat'
fi
if test -f 'vim/src/alloc.c' -a "${1}" != "-c" ; then
echo shar: Will not clobber existing file \"'vim/src/alloc.c'\"
else
echo shar: Extracting \"'vim/src/alloc.c'\" \(3295 characters\)
sed "s/^X//" >'vim/src/alloc.c' <<'END_OF_FILE'


X/* vi:ts=4:sw=4
X *
X * VIM - Vi IMproved
X *
X * Code Contributions By: Bram Moolenaar mo...@oce.nl
X * Tim Thompson twitch!tjt
X * Tony Andrews onecom!wldrdg!tony
X * G. R. (Fred) Walter watmath!watcgl!grwalter
X */
X
X/*

X * alloc.c
X *
X * This file contains various routines dealing with allocation and
X * deallocation of memory. And some funcions for copying text.


X */
X
X#include "vim.h"
X#include "globals.h"
X#include "proto.h"
X

X#ifdef AMIGA
X# undef FALSE /* these are redefined in exec/types.h */
X# undef TRUE
X# include <exec/types.h>
X# include <exec/memory.h>
X# undef FALSE
X# define FALSE 0 /* define FALSE and TRUE as ints instead of longs */
X# undef TRUE
X# define TRUE 1
X#endif /* AMIGA */
X
X#ifdef MSDOS
X# include <alloc.h>
X#endif /* MSDOS */
X
X#define PANIC_FACTOR_CHIP 8192L
X
X/*
X * Note: if unsinged is 16 bits we can only allocate up to 64K with alloc().
X * Use lalloc for larger blocks.


X */
X char *

Xalloc(size)
X unsigned size;
X{
X return (lalloc((u_long)size, TRUE));
X}
X
X char *
Xlalloc(size, message)
X u_long size;
X int message;
X{
X register char *p; /* pointer to new storage space */
X
X#ifdef MSDOS
X if (size >= 0xfff0) /* in MSDOS we can't deal with >64K blocks */
X p = NULL;
X else
X#endif
X
X if ((p = (char *)malloc(size)) != NULL)
X {
X#ifdef AMIGA
X if (AvailMem((long)MEMF_CHIP) < PANIC_FACTOR_CHIP)
X { /* System is low... no go! */
X free(p);
X p = NULL;
X }
X#endif
X#ifdef MSDOS
X if (coreleft() < PANIC_FACTOR_CHIP)
X { /* System is low... no go! */
X free(p);
X p = NULL;


X }
X#endif
X }
X /*

X * Avoid repeating the error message many times (they take 1 second each).
X * Did_outofmem_msg is reset when a character is read.
X */
X if (message && p == NULL && !did_outofmem_msg)
X {
X emsg(e_outofmem);
X did_outofmem_msg = TRUE;
X }
X return (p);
X}
X
X/*
X * copy a string into newly allocated memory


X */
X char *

Xstrsave(string)
X char *string;
X{
X char *p;
X
X p = alloc((unsigned) (strlen(string) + 1));
X if (p != NULL)
X strcpy(p, string);
X return p;
X}
X
X char *
Xstrnsave(string, len)
X char *string;
X int len;
X{
X char *p;
X
X p = alloc((unsigned) (len + 1));
X if (p != NULL)
X {
X strncpy(p, string, (size_t)len);
X p[len] = NUL;
X }
X return p;
X}
X
X/*
X * copy a number of spaces
X */
X void
Xcopy_spaces(ptr, count)
X char *ptr;
X size_t count;
X{
X register size_t i = count;
X register char *p = ptr;
X
X while (i--)
X *p++ = ' ';
X}
X
X#ifdef NO_FREE_NULL
X#undef free
X/*
X * replacement for free() that cannot handle NULL pointers
X */
X void
XnofreeNULL(x)
X void *x;
X{
X if (x != NULL)
X free(x);
X}
X#endif
X
X#ifdef BSD_UNIX
X char *
Xbsdmemset(ptr, c, size)
X char *ptr;
X int c;
X long size;
X{
X register char *p = ptr;
X
X while (size-- > 0)
X *p++ = c;
X return ptr;
X}
X#endif
X
X#ifdef MEMMOVE
X/*
X * Version of memmove that handles overlapping source and destination.
X * For systems that don't have a function that is guaranteed to do that (SYSV).
X */
X void *
Xmemmove(desti, source, len)
X void *source, *desti;
X#ifdef __sgi
X size_t len;
X#else
X int len;
X#endif
X{
X char *src = (char *)source;
X char *dst = (char *)desti;
X
X if (dst > src && dst < src + len) /* overlap, copy backwards */
X {
X src +=len;
X dst +=len;
X while (--len >= 0)
X *--dst = *--src;
X }
X else /* copy forwards */
X while (--len >= 0)
X *dst++ = *src++;
X return desti;
X}
X#endif
END_OF_FILE
if test 3295 -ne `wc -c <'vim/src/alloc.c'`; then
echo shar: \"'vim/src/alloc.c'\" unpacked with wrong size!
fi
chmod +x 'vim/src/alloc.c'
# end of 'vim/src/alloc.c'
fi
if test -f 'vim/src/charset.c' -a "${1}" != "-c" ; then
echo shar: Will not clobber existing file \"'vim/src/charset.c'\"
else
echo shar: Extracting \"'vim/src/charset.c'\" \(2093 characters\)
sed "s/^X//" >'vim/src/charset.c' <<'END_OF_FILE'


X/* vi:ts=4:sw=4
X *
X * VIM - Vi IMproved
X *
X * Code Contributions By: Bram Moolenaar mo...@oce.nl
X * Tim Thompson twitch!tjt
X * Tony Andrews onecom!wldrdg!tony
X * G. R. (Fred) Walter watmath!watcgl!grwalter
X */
X

X#include "vim.h"
X#include "globals.h"
X#include "proto.h"
X#include "param.h"
X
X

X char *
Xtranschar(c)
X unsigned c;
X{
X static char buf[3];
X
X if (c < ' ')
X {
X if (c == NL)
X c = NUL; /* we use newline in place of a NUL */
X buf[0] = '^';
X buf[1] = '@' + c;
X buf[2] = NUL;
X }
X else if (c <= '~' || c > 0xa0 || p_gr)
X {
X buf[0] = c;
X buf[1] = NUL;
X }
X else
X {
X if (c == 0x7f) /* DEL displayed as ^?, not ~? */
X buf[0] = '^';
X else
X buf[0] = '~';
X buf[1] = c - 0x80 + '@';
X buf[2] = NUL;
X }
X return buf;
X}
X
X/*
X * output 'len' characters in 'str' (including NULs) with translation
X * if 'len' is -1, output upto a NUL character
X * return the number of characters it takes on the screen
X */
X int
Xouttrans(str, len)
X register char *str;
X register int len;
X{
X int retval = 0;
X
X if (len == -1)
X len = strlen(str);
X while (--len >= 0)
X {
X outstrn(transchar(*(u_char *)str));
X retval += charsize(*(u_char *)str);
X ++str;
X }
X return retval;
X}
X
X/*
X * return the number of characters 'c' will take on the screen
X */
X int
Xcharsize(c)
X int c;
X{
X return ((c >= ' ' && (p_gr || c <= '~')) || c > 0xa0 ? 1 : 2);
X}
X
X/*
X * return the number of characters string 's' will take on the screen
X */
X int
Xstrsize(s)
X char *s;
X{
X int len = 0;
X
X while (*s)
X len += charsize(*s++);
X return len;
X}
X
X/*
X * return the number of characters 'c' will take on the screen, taking
X * into account the size of a tab
X */
X int
Xchartabsize(c, col)
X register int c;
X int col;
X{
X if ((c >= ' ' && (c <= '~' || p_gr)) || c > 0xa0)
X return 1;
X else if (c == TAB && !p_list)
X return (int)(p_ts - (col % p_ts));
X else
X return 2;
X}
X
X/*
X * return TRUE if 'c' is an identifier character
X */
X int
Xisidchar(c)
X int c;
X{
X#ifdef __STDC__
X return (isalnum(c) || c == '_');
X#else
X return (isalpha(c) || isdigit(c) || c == '_');
X#endif
X}
END_OF_FILE
if test 2093 -ne `wc -c <'vim/src/charset.c'`; then
echo shar: \"'vim/src/charset.c'\" unpacked with wrong size!
fi
chmod +x 'vim/src/charset.c'
# end of 'vim/src/charset.c'
fi
if test -f 'vim/src/help.c' -a "${1}" != "-c" ; then
echo shar: Will not clobber existing file \"'vim/src/help.c'\"
else
echo shar: Extracting \"'vim/src/help.c'\" \(3532 characters\)
sed "s/^X//" >'vim/src/help.c' <<'END_OF_FILE'


X/* vi:ts=4:sw=4
X *
X * VIM - Vi IMproved
X *
X * Code Contributions By: Bram Moolenaar mo...@oce.nl
X * Tim Thompson twitch!tjt
X * Tony Andrews onecom!wldrdg!tony
X * G. R. (Fred) Walter watmath!watcgl!grwalter
X */
X
X/*

X * help.c: display help from the vim.hlp file


X */
X
X#include "vim.h"
X#include "globals.h"
X#include "proto.h"
X#include "param.h"
X

Xstatic long helpfilepos; /* position in help file */
Xstatic FILE *helpfd; /* file descriptor of help file */
X
X#define MAXSCREENS 52 /* one screen for a-z and A-Z */
X
X void
Xhelp()
X{
X int c;
X int eof;
X int screens;
X int i;
X long filepos[MAXSCREENS]; /* seek position for each screen */
X int screennr; /* screen number; index == 0, 'c' == 1, 'd' == 2, etc */
X#ifdef MSDOS
X char *fnamep;
X#endif
X
X/*
X * try to open the file specified by the "helpfile" option
X */
X if ((helpfd = fopen(p_hf, READBIN)) == NULL)
X {
X#ifdef MSDOS
X /*
X * for MSDOS: try the DOS search path
X */
X fnamep = searchpath("vim.hlp");
X if (fnamep == NULL || (helpfd = fopen(fnamep, READBIN)) == NULL)
X {
X smsg("Sorry, help file \"%s\" and \"vim.hlp\" not found", p_hf);
X return;
X }
X#else
X smsg("Sorry, help file \"%s\" not found", p_hf);
X return;
X#endif
X }
X helpfilepos = 0;
X screennr = 0;
X for (i = 0; i < MAXSCREENS; ++i)
X filepos[i] = 0;
X State = HELP;


X for (;;)
X {

X screens = redrawhelp(); /* show one or more screens */
X eof = (screens < 0);
X if (!eof && screennr + screens < MAXSCREENS)
X filepos[screennr + screens] = ftell(helpfd);
X
X if ((c = vgetc()) == '\n' || c == '\r' || c == Ctrl('C') || c == ESC)
X break;
X
X if (c == ' ' ||
X#ifdef MSDOS
X (c == K_NUL && vpeekc() == 'Q') || /* page down */
X#endif
X c == Ctrl('F')) /* one screen forwards */
X {
X if (screennr < MAXSCREENS && !eof)
X ++screennr;
X }
X else if (c == 'a') /* go to first screen */
X screennr = 0;
X else if (c == 'b' ||
X#ifdef MSDOS
X (c == K_NUL && vpeekc() == 'I') || /* page up */
X#endif
X c == Ctrl('B')) /* go one screen backwards */
X {
X if (screennr > 0)
X --screennr;
X }
X else if (isalpha(c)) /* go to specified screen */
X {
X if (isupper(c))
X c = c - 'A' + 'z' + 1; /* 'A' comes after 'z' */
X screennr = c - 'b';
X }
X#ifdef MSDOS
X if (c == K_NUL)
X c = vgetc();
X#endif
X for (i = screennr; i > 0; --i)
X if (filepos[i])
X break;
X fseek(helpfd, filepos[i], 0);
X while (i < screennr)
X {
X while ((c = getc(helpfd)) != '\f' && c != -1)
X ;
X if (c == -1)
X break;
X filepos[++i] = ftell(helpfd); /* store the position just after the '\f' */
X }
X screennr = i; /* required when end of file reached */
X helpfilepos = filepos[screennr];
X }
X State = NORMAL;
X script_winsize_pp();
X fclose(helpfd);
X updateScreen(CLEAR);
X}
X
X int
Xredrawhelp()
X{
X int nextc;
X int col;
X int line = 0;
X int screens = 1;
X
X fseek(helpfd, helpfilepos, 0);
X outstr(T_ED);
X windgoto(0,0);
X while ((nextc = getc(helpfd)) != -1 && (nextc != '\f' || line < Rows - 24))
X {
X if (nextc == Ctrl('B')) /* begin of invert */
X outstr(T_TI);
X else if (nextc == Ctrl('E')) /* end of invert */
X outstr(T_TP);
X else if (nextc == '\f') /* start of next screen */
X {
X ++screens;
X outchar('\n');
X ++line;
X }
X else
X {
X outchar((char)nextc);
X if (nextc == '\n')
X ++line;
X }
X }
X windgoto(0, (int)(Columns - strlen(Version) - 1));
X outstrn(Version);
X col = (int)Columns - 52;
X if (col < 0)
X col = 0;
X windgoto((int)Rows - 1, col);
X outstrn("<space = next; return = quit; a = index; b = back>");
X return (nextc == -1 ? -1 : screens);
X}
END_OF_FILE
if test 3532 -ne `wc -c <'vim/src/help.c'`; then
echo shar: \"'vim/src/help.c'\" unpacked with wrong size!
fi
chmod +x 'vim/src/help.c'
# end of 'vim/src/help.c'
fi
if test -f 'vim/src/keymap.h' -a "${1}" != "-c" ; then
echo shar: Will not clobber existing file \"'vim/src/keymap.h'\"
else
echo shar: Extracting \"'vim/src/keymap.h'\" \(2135 characters\)
sed "s/^X//" >'vim/src/keymap.h' <<'END_OF_FILE'


X/* vi:ts=4:sw=4
X *
X * VIM - Vi IMproved
X *
X * Code Contributions By: Bram Moolenaar mo...@oce.nl
X * Tim Thompson twitch!tjt
X * Tony Andrews onecom!wldrdg!tony
X * G. R. (Fred) Walter watmath!watcgl!grwalter
X */
X
X/*

X * Keycode definitions for special keys
X *
X * On systems that have any of these keys, the routine 'inchar' in the
X * machine-dependent code should return one of the codes here.
X */
X
X/*
X * On MSDOS we use other codes, because the codes 0x80 - 0xb0 are used
X * for special characters. If this is changed also change the numbers in
X * term.h and main.c.
X */
X#ifdef MSDOS
X# define K_OFF 0x30
X#else
X# define K_OFF 0x00
X#endif
X
X#define K_CCIRCM 0x1e /* control circumflex */
X
X/*
X * careful: the next entries must be in the same order as the termcap strings
X * in term.h and the numbers must be consecutive (used by inchar()).
X */
X#define K_UARROW (K_OFF + 0x80)
X#define K_DARROW (K_OFF + 0x81)
X#define K_LARROW (K_OFF + 0x82)
X#define K_RARROW (K_OFF + 0x83)
X#define K_SUARROW (K_OFF + 0x84)
X#define K_SDARROW (K_OFF + 0x85)
X#define K_SLARROW (K_OFF + 0x86)
X#define K_SRARROW (K_OFF + 0x87)
X
X#define K_F1 (K_OFF + 0x88) /* function keys */
X#define K_F2 (K_OFF + 0x89)
X#define K_F3 (K_OFF + 0x8a)
X#define K_F4 (K_OFF + 0x8b)
X#define K_F5 (K_OFF + 0x8c)
X#define K_F6 (K_OFF + 0x8d)
X#define K_F7 (K_OFF + 0x8e)
X#define K_F8 (K_OFF + 0x8f)
X#define K_F9 (K_OFF + 0x90)
X#define K_F10 (K_OFF + 0x91)
X
X#define K_SF1 (K_OFF + 0x92) /* shifted function keys */
X#define K_SF2 (K_OFF + 0x93)
X#define K_SF3 (K_OFF + 0x94)
X#define K_SF4 (K_OFF + 0x95)
X#define K_SF5 (K_OFF + 0x96)
X#define K_SF6 (K_OFF + 0x97)
X#define K_SF7 (K_OFF + 0x98)
X#define K_SF8 (K_OFF + 0x99)
X#define K_SF9 (K_OFF + 0x9a)
X#define K_SF10 (K_OFF + 0x9b)
X
X#define K_HELP (K_OFF + 0x9c)
X#define K_UNDO (K_OFF + 0x9d)
X
X/*
X * NULs cannot be in the input string, therefore CTRL-@ is replaced by K_ZERO.
X * K_NUL is used for MSDOS extended keys (same value used in term.h).
X */
X#define K_NUL (K_OFF + 0x9e) /* for MSDOS: special key follows */
X#define K_ZERO (K_OFF + 0x9f) /* replaces ^@ */
END_OF_FILE
if test 2135 -ne `wc -c <'vim/src/keymap.h'`; then
echo shar: \"'vim/src/keymap.h'\" unpacked with wrong size!
fi
chmod +x 'vim/src/keymap.h'
# end of 'vim/src/keymap.h'
fi
if test -f 'vim/src/linefunc.c' -a "${1}" != "-c" ; then
echo shar: Will not clobber existing file \"'vim/src/linefunc.c'\"
else
echo shar: Extracting \"'vim/src/linefunc.c'\" \(2618 characters\)
sed "s/^X//" >'vim/src/linefunc.c' <<'END_OF_FILE'


X/* vi:ts=4:sw=4
X *
X * VIM - Vi IMproved
X *
X * Code Contributions By: Bram Moolenaar mo...@oce.nl
X * Tim Thompson twitch!tjt
X * Tony Andrews onecom!wldrdg!tony
X * G. R. (Fred) Walter watmath!watcgl!grwalter
X */
X
X/*

X * linefunc.c: some functions to move to the next/previous line and
X * to the next/previous character


X */
X
X#include "vim.h"
X#include "globals.h"
X#include "proto.h"
X

X/*
X * coladvance(col)
X *
X * Try to advance the Cursor to the specified column.


X */
X
X void

Xcoladvance(wcol)
X colnr_t wcol;
X{
X int index;
X register u_char *ptr;
X register colnr_t col;
X
X ptr = (u_char *)nr2ptr(Curpos.lnum);
X
X /* try to advance to the specified column */
X index = -1;
X col = 0;
X while (col <= wcol && *ptr)
X {
X ++index;
X /* Count a tab for what it's worth (if list mode not on) */
X col += chartabsize(*ptr, col);
X ++ptr;
X }
X if (index < 0)
X Curpos.col = 0;
X else
X Curpos.col = index;
X}
X
X/*
X * inc(p)
X *
X * Increment the line pointer 'p' crossing line boundaries as necessary. Return
X * 1 when crossing a line, -1 when at end of file, 0 otherwise.
X */
X int
Xinc(lp)
X register FPOS *lp;
X{
X register char *p = pos2ptr(lp);
X
X if (*p != NUL)
X { /* still within line */
X lp->col++;
X return ((p[1] != NUL) ? 0 : 1);
X }
X if (lp->lnum != line_count)
X { /* there is a next line */
X lp->col = 0;
X lp->lnum++;
X return 1;
X }
X return -1;
X}
X
X int
XincCurpos()
X{
X return inc(&Curpos);
X}
X
X/*
X * incl(lp): same as inc(), but skip the NUL at the end of non-empty lines
X */
X int
Xincl(lp)
X register FPOS *lp;
X{
X register int r;
X
X if ((r = inc(lp)) == 1 && lp->col)
X r = inc(lp);
X return r;
X}
X
X/*
X * dec(p)
X *
X * Decrement the line pointer 'p' crossing line boundaries as necessary. Return
X * 1 when crossing a line, -1 when at start of file, 0 otherwise.
X */
X int
Xdec(lp)
X register FPOS *lp;
X{
X if (lp->col > 0)
X { /* still within line */
X lp->col--;
X return 0;
X }
X if (lp->lnum > 1)
X { /* there is a prior line */
X lp->lnum--;
X lp->col = strlen(nr2ptr(lp->lnum));
X return 1;
X }
X return -1; /* at start of file */
X}
X
X int
XdecCurpos()
X{
X return dec(&Curpos);
X}
X
X/*
X * decl(lp): same as dec(), but skip the NUL at the end of non-empty lines
X */
X int
Xdecl(lp)
X register FPOS *lp;
X{
X register int r;
X
X if ((r = dec(lp)) == 1 && lp->col)
X r = dec(lp);
X return r;
X}
X
X/*
X * make sure Curpos in on a valid character
X */
X void
XadjustCurpos()
X{
X int len;
X
X if (Curpos.lnum == 0)
X Curpos.lnum = 1;
X if (Curpos.lnum > line_count)
X Curpos.lnum = line_count;
X
X len = strlen(nr2ptr(Curpos.lnum));
X if (len == 0)
X Curpos.col = 0;
X else if (Curpos.col >= len)
X Curpos.col = len - 1;
X}
END_OF_FILE
if test 2618 -ne `wc -c <'vim/src/linefunc.c'`; then
echo shar: \"'vim/src/linefunc.c'\" unpacked with wrong size!
fi
chmod +x 'vim/src/linefunc.c'
# end of 'vim/src/linefunc.c'
fi
if test -f 'vim/src/makefile.bcc' -a "${1}" != "-c" ; then
echo shar: Will not clobber existing file \"'vim/src/makefile.bcc'\"
else
echo shar: Extracting \"'vim/src/makefile.bcc'\" \(3722 characters\)
sed "s/^X//" >'vim/src/makefile.bcc' <<'END_OF_FILE'
X#
X# Makefile for Borland C++ 2.0
X# Can also be used for Turbo C++
X#
X# The options are at the end of this file
X#
X
X.AUTODEPEND
X
X# *Translator Definitions*
X# use tcc for Turbo C++
XCC = bcc +VIM.CFG
X#CC = tcc +VIM.CFG
XTASM = TASM
XTLIB = tlib
XTLINK = tlink
X#
X# Adjust the paths for your environment
X#
XLIBPATH = E:\BORLANDC\LIB
XINCLUDEPATH = E:\BORLANDC\INCLUDE
X
X
X# *Implicit Rules*
X.c.obj:
X $(CC) -c {$< }
X
X.cpp.obj:
X $(CC) -c {$< }
X
X# *List Macros*
X
X
XEXE_dependencies = \
X alloc.obj \
X buffers.obj \
X charset.obj \
X cmdline.obj \
X csearch.obj \
X digraph.obj \
X edit.obj \
X fileio.obj \
X help.obj \
X linefunc.obj \
X main.obj \
X mark.obj \
X message.obj \
X misccmds.obj \
X msdos.obj \
X normal.obj \
X ops.obj \
X param.obj \
X quickfix.obj \
X regexp.obj \
X regsub.obj \
X screen.obj \
X script.obj \
X search.obj \
X storage.obj \
X tag.obj \
X term.obj \
X undo.obj \
X version.obj
X
X# *Explicit Rules*
X# add /v for source degubbing
Xvim.exe: vim.cfg $(EXE_dependencies)
X $(CC) -c version.c
X $(TLINK) /x/c/L$(LIBPATH) @&&|
Xc0l.obj+
Xalloc.obj+
Xbuffers.obj+
Xcharset.obj+
Xcmdline.obj+
Xcsearch.obj+
Xdigraph.obj+
Xedit.obj+
Xfileio.obj+
Xhelp.obj+
Xlinefunc.obj+
Xmain.obj+
Xmark.obj+
Xmessage.obj+
Xmisccmds.obj+
Xmsdos.obj+
Xnormal.obj+
Xops.obj+
Xparam.obj+
Xquickfix.obj+
Xregexp.obj+
Xregsub.obj+
Xscreen.obj+
Xscript.obj+
Xsearch.obj+
Xstorage.obj+
Xtag.obj+
Xterm.obj+
Xundo.obj+
Xversion.obj
Xvim
X # no map file
Xfp87.lib+
Xmathl.lib+
Xcl.lib
X|
X
X
X# *Individual File Dependencies*
Xalloc.obj: alloc.c
X
Xbuffers.obj: buffers.c
X
Xcharset.obj: charset.c
X
Xcmdline.obj: cmdline.c cmdtab.h
X
Xcmdtab.h: cmdtab.tab mkcmdtab.exe
X mkcmdtab cmdtab.tab cmdtab.h
X
Xmkcmdtab.exe: mkcmdtab.obj
X $(CC) -ml -omkcmdtab mkcmdtab.obj
X
Xmkcmdtab.obj: mkcmdtab.c
X $(CC) $(CFLAGS) mkcmdtab.c
X
Xcsearch.obj: csearch.c
X
Xdigraph.obj: digraph.c
X
Xedit.obj: edit.c
X
Xfileio.obj: fileio.c
X
Xhelp.obj: help.c
X
Xlinefunc.obj: linefunc.c
X
Xmain.obj: main.c globals.h param.h
X
Xmark.obj: mark.c mark.h
X
Xmessage.obj: message.c
X
Xmisccmds.obj: misccmds.c
X
Xmsdos.obj: msdos.c
X
Xnormal.obj: normal.c ops.h
X
Xops.obj: ops.c ops.h
X
Xparam.obj: param.c
X
Xquickfix.obj: quickfix.c
X
Xregexp.obj: regexp.c
X
Xregsub.obj: regsub.c
X
Xscreen.obj: screen.c
X
Xscript.obj: script.c
X
Xsearch.obj: search.c
X
Xstorage.obj: storage.c
X
Xtag.obj: tag.c mark.h
X
Xterm.obj: term.c term.h
X
Xundo.obj: undo.c
X
Xversion.obj: version.c
X
X# *Compiler Configuration File*
X# The following compile options can be changed for better machines.
X# replace -1- with -2 to produce code for a 80286 or higher
X# replace -1- with -3 to produce code for a 80386 or higher
X# add -v for source debugging
Xvim.cfg: makefile
X copy &&|
X-ml
X-1-
X-f-
X-C
X-N
X-O
X-Z
X-k-
X-d
X-h
X-vi-
X-H=VIM.SYM
X-w-par
X-w-pro
X-weas
X-wpre
X-I$(INCLUDEPATH)
X-L$(LIBPATH)
X-DPC;MSDOS;DIGRAPHS
X| vim.cfg
X
X#
X# options:
X### -DDIGRAPHS digraph support (at the cost of 1.6 Kbyte code)
X### -DNO_ARP do not use arp.library, DOS 2.0 required
X### -DCOMPATIBLE start in vi-compatible mode
X### -DNOBACKUP default is no backup file
X### -DDEBUG output a lot of debugging garbage
X### -DTERMCAP include termcap file support
X### -DNO_BUILTIN_TCAPS do not include builtin termcap entries
X### (use only with -DTERMCAP)
X### -DSOME_BUILTIN_TCAPS include most useful builtin termcap entries
X### (use only without -DNO_BUILTIN_TCAPS)
X### -DALL_BUILTIN_TCAPS include all builtin termcap entries
X### (use only without -DNO_BUILTIN_TCAPS)
X### -DVIMRC_FILE name of the .vimrc file in current dir
X### -DEXRC_FILE name of the .exrc file in current dir
X### -DSYSVIMRC_FILE name of the global .vimrc file
X### -DSYSEXRC_FILE name of the global .exrc file
X### -DDEFVIMRC_FILE name of the system-wide .vimrc file
X### -DVIM_HLP name of the help file
END_OF_FILE
if test 3722 -ne `wc -c <'vim/src/makefile.bcc'`; then
echo shar: \"'vim/src/makefile.bcc'\" unpacked with wrong size!
fi
chmod +x 'vim/src/makefile.bcc'
# end of 'vim/src/makefile.bcc'
fi
if test -f 'vim/src/makefile.dice' -a "${1}" != "-c" ; then
echo shar: Will not clobber existing file \"'vim/src/makefile.dice'\"
else
echo shar: Extracting \"'vim/src/makefile.dice'\" \(3076 characters\)
sed "s/^X//" >'vim/src/makefile.dice' <<'END_OF_FILE'
X#
X# Makefile for VIM, using DICE 2.06.40 and 2.06.21
X#
X
X#>>>>> choose options:
X### -DDIGRAPHS digraph support (at the cost of 1.6 Kbyte code)
X### -DNO_ARP do not use arp.library, DOS 2.0 required
X### -DCOMPATIBLE start in vi-compatible mode
X### -DNOBACKUP default is no backup file
X### -DDEBUG output a lot of debugging garbage
X### -DTERMCAP include termcap file support
X### -DNO_BUILTIN_TCAPS do not include builtin termcap entries
X### (use only with -DTERMCAP)
X### -DSOME_BUILTIN_TCAPS include most useful builtin termcap entries
X### (use only without -DNO_BUILTIN_TCAPS)
X### -DALL_BUILTIN_TCAPS include all builtin termcap entries
X### (use only without -DNO_BUILTIN_TCAPS)
XDEFINES = -DTERMCAP -DDIGRAPHS -DSOME_BUILTIN_TCAPS
X
X#>>>>> if TERMCAP is defined termlib.o has to be used
XTERMLIB = termlib.o
X#TERMLIB =
X
X#>>>>> end of choices
X###########################################################################
X
XCFLAGS = -c -DAMIGA $(DEFINES)
X
XINCL = vim.syms
XPRE = -H${INCL}=vim.h
XLIBS = -lmanx -la
XCC = dcc
XLD = dcc
X
X.c.o:
X ${CC} ${PRE} ${CFLAGS} $*.c -o $@
X
XOBJ = alloc.o amiga.o buffers.o charset.o cmdline.o csearch.o digraph.o \
X edit.o fileio.o help.o linefunc.o main.o mark.o message.o misccmds.o \
X normal.o ops.o param.o quickfix.o regexp.o regsub.o screen.o \
X script.o search.o storage.o tag.o undo.o $(TERMLIB)
X
X/Vim: $(OBJ) version.c
X ${CC} $(CFLAGS) version.c -o version.o
X ${LD} -o /Vim $(OBJ) version.o $(LIBS)
X
Xdebug: $(OBJ) version.c
X ${CC} $(CFLAGS) version.c -o version.o
X ${LD} -s -o /Vim $(OBJ) version.o $(LIBS)
X
Xctags:
X csh -c ctags *.c *.h
X
X# can't use delete here, too many file names
Xclean:
X csh -c rm -f $(OBJ) version.o mkcmdtab.o /Vim $(INCL) mkcmdtab
X
X$(INCL) : vim.h globals.h keymap.h macros.h ascii.h term.h amiga.h
X delete $(INCL)
X
X###########################################################################
X
Xalloc.o: alloc.c $(INCL)
X
Xamiga.o: amiga.c $(INCL) amiga.h
X
Xbuffers.o: buffers.c $(INCL)
X
Xcharset.o: charset.c $(INCL)
X
Xcmdline.o: cmdline.c $(INCL) cmdtab.h
X
Xcsearch.o: csearch.c $(INCL) regexp.h
X
Xdigraph.o: digraph.c $(INCL)
X
Xedit.o: edit.c $(INCL)
X
Xfileio.o: fileio.c $(INCL)
X
Xhelp.o: help.c $(INCL)
X
Xlinefunc.o: linefunc.c $(INCL)
X
Xmain.o: main.c
X ${CC} ${CFLAGS} main.c -o main.o
X
Xmark.o: mark.c $(INCL) mark.h
X
Xmessage.o: message.c $(INCL)
X
Xmisccmds.o: misccmds.c $(INCL)
X
Xnormal.o: normal.c $(INCL) ops.h
X
Xops.o: ops.c $(INCL) ops.h
X
Xparam.o: param.c $(INCL)
X# Because of a bug in DC1 2.06.40, initialisation of unions does not
X# work correctly. dc1-21 is DC1 2.06.21 which does work.
X rename dc1-21 dc1
X ${CC} ${CFLAGS} param.c -o param.o
X rename dc1 dc1-21
X
Xquickfix.o: quickfix.c $(INCL)
X
Xregexp.o: regexp.c $(INCL) regexp.h
X
Xregsub.o: regsub.c $(INCL) regexp.h
X
Xscreen.o: screen.c $(INCL)
X
Xscript.o: script.c $(INCL)
X
Xsearch.o: search.c $(INCL) regexp.h
X
Xtag.o: tags.c $(INCL) mark.h
X
Xtermlib.o: termlib.c $(INCL)
X
Xstorage.o: storage.c $(INCL)
X
Xundo.o: undo.c $(INCL)
X
Xcmdtab.h: cmdtab.tab mkcmdtab
X mkcmdtab cmdtab.tab cmdtab.h
X
Xmkcmdtab: mkcmdtab.o
X ${LD} -o mkcmdtab mkcmdtab.o
END_OF_FILE
if test 3076 -ne `wc -c <'vim/src/makefile.dice'`; then
echo shar: \"'vim/src/makefile.dice'\" unpacked with wrong size!
fi
chmod +x 'vim/src/makefile.dice'
# end of 'vim/src/makefile.dice'
fi
if test -f 'vim/src/makefile.dos' -a "${1}" != "-c" ; then
echo shar: Will not clobber existing file \"'vim/src/makefile.dos'\"
else
echo shar: Extracting \"'vim/src/makefile.dos'\" \(3714 characters\)
sed "s/^X//" >'vim/src/makefile.dos' <<'END_OF_FILE'
X#
X# Makefile for VIM on MSDOS, using Turbo C
X#
X
X#>>>>> choose options:
X### -DDIGRAPHS digraph support (at the cost of 1.6 Kbyte code)
X### -DCOMPATIBLE start in vi-compatible mode
X### -DNOBACKUP default is no backup file
X### -DDEBUG output a lot of debugging garbage
X### -DTERMCAP include termcap file support
X### -DNO_BUILTIN_TCAPS do not include builtin termcap entries
X### (use only with -DTERMCAP)
X### -DSOME_BUILTIN_TCAPS include most useful builtin termcap entries
X### (use only without -DNO_BUILTIN_TCAPS)
X### -DALL_BUILTIN_TCAPS include all builtin termcap entries
X### (use only without -DNO_BUILTIN_TCAPS)
X### -DVIMRC_FILE name of the .vimrc file in current dir
X### -DEXRC_FILE name of the .exrc file in current dir
X### -DSYSVIMRC_FILE name of the global .vimrc file
X### -DSYSEXRC_FILE name of the global .exrc file
X### -DDEFVIMRC_FILE name of the system-wide .vimrc file
X### -DVIM_HLP name of the help file
XDEFINES = -DDIGRAPHS
X
X#>>>>> name of the compiler and linker, name of lib directory
XCC = tcc
XLINK = tlink
XLIB = c:\turboc\lib
X
X#>>>>> end of choices
X###########################################################################
X
XINCL = vim.h globals.h param.h keymap.h macros.h ascii.h term.h msdos.h
XCFLAGS = -c -ml -DMSDOS $(DEFINES)
X
XOBJ = alloc.obj msdos.obj buffers.obj charset.obj cmdline.obj csearch.obj \
X digraph.obj edit.obj fileio.obj help.obj linefunc.obj main.obj mark.obj \
X message.obj misccmds.obj normal.obj ops.obj param.obj quickfix.obj \
X regexp.obj regsub.obj screen.obj script.obj search.obj storage.obj \
X tag.obj term.obj undo.obj
X
X..\vim: $(OBJ) version.c
X $(CC) $(CFLAGS) version.c
X $(LINK) /c /m $(LIB)\C0l @vimresp,..\vim,..\vim,$(LIB)\emu $(LIB)\Cl
X
Xctags:
X command /c ctags *.c *.h
X
Xclean:
X del $(OBJ) version.obj mkcmdtab.obj ..\vim mkcmdtab
X
Xaddcr: addcr.c
X $(CC) addcr.c
X command /c addcr.bat
X
X###########################################################################
X
Xalloc.obj: alloc.c $(INCL)
X $(CC) $(CFLAGS) alloc.c
X
Xmsdos.obj: msdos.c $(INCL) msdos.h
X $(CC) $(CFLAGS) msdos.c
X
Xbuffers.obj: buffers.c $(INCL)
X $(CC) $(CFLAGS) buffers.c
X
Xcharset.obj: charset.c $(INCL)
X $(CC) $(CFLAGS) charset.c
X
Xcmdline.obj: cmdline.c $(INCL) cmdtab.h
X $(CC) $(CFLAGS) cmdline.c
X
Xcsearch.obj: csearch.c $(INCL)
X $(CC) $(CFLAGS) csearch.c
X
Xdigraph.obj: digraph.c $(INCL)
X $(CC) $(CFLAGS) digraph.c
X
Xedit.obj: edit.c $(INCL)
X $(CC) $(CFLAGS) edit.c
X
Xfileio.obj: fileio.c $(INCL)
X $(CC) $(CFLAGS) fileio.c
X
Xhelp.obj: help.c $(INCL)
X $(CC) $(CFLAGS) help.c
X
Xlinefunc.obj: linefunc.c $(INCL)
X $(CC) $(CFLAGS) linefunc.c
X
Xmain.obj: main.c $(INCL)
X $(CC) $(CFLAGS) main.c
X
Xmark.obj: mark.c $(INCL)
X $(CC) $(CFLAGS) mark.c
X
Xmessage.obj: message.c $(INCL)
X $(CC) $(CFLAGS) message.c
X
Xmisccmds.obj: misccmds.c $(INCL)
X $(CC) $(CFLAGS) misccmds.c
X
Xnormal.obj: normal.c $(INCL) ops.h
X $(CC) $(CFLAGS) normal.c
X
Xops.obj: ops.c $(INCL) ops.h
X $(CC) $(CFLAGS) ops.c
X
Xparam.obj: param.c $(INCL)
X $(CC) $(CFLAGS) param.c
X
Xquickfix.obj: quickfix.c $(INCL)
X $(CC) $(CFLAGS) quickfix.c
X
Xregexp.obj: regexp.c $(INCL)
X $(CC) $(CFLAGS) regexp.c
X
Xregsub.obj: regsub.c $(INCL)
X $(CC) $(CFLAGS) regsub.c
X
Xscreen.obj: screen.c $(INCL)
X $(CC) $(CFLAGS) screen.c
X
Xscript.obj: script.c $(INCL)
X $(CC) $(CFLAGS) script.c
X
Xsearch.obj: search.c $(INCL)
X $(CC) $(CFLAGS) search.c
X
Xstorage.obj: storage.c $(INCL)
X $(CC) $(CFLAGS) storage.c
X
Xtag.obj: tag.c $(INCL)
X $(CC) $(CFLAGS) tag.c
X
Xterm.obj: term.c $(INCL)
X $(CC) $(CFLAGS) term.c
X
Xundo.obj: undo.c $(INCL)
X $(CC) $(CFLAGS) undo.c
X
Xcmdtab.h: cmdtab.tab mkcmdtab.exe
X mkcmdtab cmdtab.tab cmdtab.h
X
Xmkcmdtab.exe: mkcmdtab.obj
X $(CC) -ml -omkcmdtab mkcmdtab.obj
X
Xmkcmdtab.obj: mkcmdtab.c
X $(CC) $(CFLAGS) mkcmdtab.c
END_OF_FILE
if test 3714 -ne `wc -c <'vim/src/makefile.dos'`; then
echo shar: \"'vim/src/makefile.dos'\" unpacked with wrong size!
fi
chmod +x 'vim/src/makefile.dos'
# end of 'vim/src/makefile.dos'
fi
if test -f 'vim/src/message.c' -a "${1}" != "-c" ; then
echo shar: Will not clobber existing file \"'vim/src/message.c'\"
else
echo shar: Extracting \"'vim/src/message.c'\" \(3525 characters\)
sed "s/^X//" >'vim/src/message.c' <<'END_OF_FILE'


X/* vi:ts=4:sw=4
X *
X * VIM - Vi IMproved
X *
X * Code Contributions By: Bram Moolenaar mo...@oce.nl
X * Tim Thompson twitch!tjt
X * Tony Andrews onecom!wldrdg!tony
X * G. R. (Fred) Walter watmath!watcgl!grwalter
X */
X
X/*

X * message.c: functions for displaying messages on the command line


X */
X
X#include "vim.h"
X#include "globals.h"

X#define MESSAGE


X#include "proto.h"
X#include "param.h"
X

Xstatic int msg_invert = FALSE; /* message should be inverted */
X
X/*
X * msg(s) - displays the string 's' on the status line
X */
X void
Xmsg(s)
X char *s;
X{
X if (Columns == 0) /* terminal not initialized */
X {
X fprintf(stderr, s);
X fflush(stderr);
X return;
X }
X
X start_msg();
X if (msg_invert && T_TI)
X {
X outstr(T_TI);
X char_count -= strlen(T_TI);
X }
X outtrans(s, -1);
X if (msg_invert && T_TP)
X {
X outstr(T_TP);
X msg_invert = FALSE;
X char_count -= strlen(T_TP);
X }
X end_msg();
X}
X
X#ifndef PROTO /* automatic prototype generation does not understand this */
X/* VARARGS */
X void
Xsmsg(s, a1, a2, a3, a4, a5, a6, a7, a8, a9, a10)
X char *s;
X long a1, a2, a3, a4, a5, a6, a7, a8, a9, a10;
X{
X sprintf(IObuff, s, a1, a2, a3, a4, a5, a6, a7, a8, a9, a10);
X msg(IObuff);
X}
X#endif
X
X/*
X * emsg() - display an error message
X *
X * Rings the bell, if appropriate, and calls message() to do the real work
X */
X void
Xemsg(s)
X char *s;
X{
X if (p_eb)
X beep(); /* also includes flush_buffers() */
X else
X flush_buffers(FALSE); /* flush internal buffers */
X msg_invert = TRUE;
X msg(s);
X if (char_count < sc_col) /* if wait_return not called */
X sleep(1); /* give the user a chance to read the message */
X}
X
X void
Xemsg2(s, a1)
X char *s, *a1;
X{
X sprintf(IObuff, s, a1);
X emsg(IObuff);
X}
X
Xextern int global_busy, global_wait; /* shared with csearch.c, cmdline.c */
X
X void
Xwait_return(redraw)
X int redraw;
X{
X u_char c;
X int oldState;
X int tmpState;
X
X /* with the global command we only need one return at the end */
X if (global_busy)
X {
X global_wait = 1;
X starttermcap();
X return;
X }
X oldState = State;
X State = HITRETURN;
X if (got_int)
X outstrn("Interrupt: ");
X
X#ifdef ORG_HITRETURN
X outstrn("Press RETURN to continue");
X do {
X c = vgetc();
X } while (strchr("\r\n: ", c) == NULL);
X if (c == ':') /* this can vi too (but not always!) */
X stuffcharReadbuff(c);
X#else
X outstrn("Press RETURN or enter command to continue");
X c = vgetc();
X breakcheck();
X if (strchr("\r\n ", c) == NULL)
X stuffcharReadbuff(c);
X#endif
X
X if (!termcap_active) /* start termcap before redrawing */
X starttermcap();
X
X/*
X * If the window size changed set_winsize() will redraw the screen.
X * Otherwise the screen is only redrawn if 'redraw' is set.
X */
X tmpState = State;
X State = oldState; /* restore State before set_winsize */
X if (tmpState == SETWSIZE) /* got resize event while in vgetc() */
X set_winsize(0, 0, FALSE);
X else if (redraw)
X updateScreen(CLEAR);
X
X script_winsize_pp();
X}
X
X void
Xstart_msg()
X{
X gotocmdline(TRUE, NUL);
X char_count = 0;
X}
X
X void
Xend_msg()
X{
X /*
X * if the string is larger than the window,
X * or the ruler option is set and we run into it,
X * we have to redraw the window.
X * Do not do this if we are abandoning the file.
X */
X if (!exiting && char_count >= sc_col)
X {
X outchar('\n');
X wait_return(TRUE);
X }
X else
X flushbuf();
X}
X
X void
Xcheck_msg()
X{
X /*
X * if the string is larger than the window,
X * or the ruler option is set and we run into it,
X * we have to redraw the window later.
X */
X if (char_count >= sc_col)
X must_redraw = CLEAR;
X cmdoffset = char_count / Columns;
X}
END_OF_FILE
if test 3525 -ne `wc -c <'vim/src/message.c'`; then
echo shar: \"'vim/src/message.c'\" unpacked with wrong size!
fi
chmod +x 'vim/src/message.c'
# end of 'vim/src/message.c'
fi
if test -f 'vim/src/msdos.h' -a "${1}" != "-c" ; then
echo shar: Will not clobber existing file \"'vim/src/msdos.h'\"
else
echo shar: Extracting \"'vim/src/msdos.h'\" \(2144 characters\)
sed "s/^X//" >'vim/src/msdos.h' <<'END_OF_FILE'
X/* vi:ts=8:sw=4


X *
X * VIM - Vi IMproved
X *
X * Code Contributions By: Bram Moolenaar mo...@oce.nl
X * Tim Thompson twitch!tjt
X * Tony Andrews onecom!wldrdg!tony
X * G. R. (Fred) Walter watmath!watcgl!grwalter
X */
X
X/*

X * MSDOS Machine-dependent filenames.
X */
X#ifdef SYSEXRC_FILE
X# undef SYSEXRC_FILE
X# undef SYSVIMRC_FILE
X#endif /* SYSEXRC_FILE */
X#define SYSEXRC_FILE "$VIM\\_exrc"
X#define SYSVIMRC_FILE "$VIM\\_vimrc"
X
X#ifdef EXRC_FILE
X# undef EXRC_FILE
X# undef VIMRC_FILE
X#endif /* EXRC_FILE */
X#define EXRC_FILE "_exrc"
X#define VIMRC_FILE "_vimrc"
X
X#ifdef VIM_HLP
X# undef VIM_HLP
X#endif /* VIM_HLP */
X#define VIM_HLP "$VIM\\vim.hlp"
X
X#ifdef TMPNAME1
X# undef TMPNAME1
X# undef TMPNAME2
X# undef TMPNAMELEN
X#endif /* TMPNAME1 */
X#define TMPNAME1 "viXXXXXX" /* put it in current dir */
X#define TMPNAME2 "voXXXXXX" /* is there a better place? */
X#define TMPNAMELEN 10
X
X/*
X * MSDOS Machine-dependent routines.
X */
X
X#ifdef remove
X# undef remove /* MSDOS remove()s when not readonly */
X#endif
X#define remove vim_remove
X
X/* use chdir() that also changes the default drive */
X#define chdir vim_chdir
X
X/* msdos.c */
Xvoid vim_delay __ARGS((void));
Xint vim_remove __ARGS((char *));
Xvoid flushbuf __ARGS((void));
Xvoid outchar __ARGS((unsigned));
Xvoid outstr __ARGS((char *));
Xint GetChars __ARGS((char *, int, int));
Xvoid mch_suspend __ARGS((void));
Xvoid mch_windinit __ARGS((void));
Xvoid check_win __ARGS((int, char **));
Xvoid fname_case __ARGS((char *));
Xvoid settitle __ARGS((char *));
Xvoid resettitle __ARGS((void));
Xint dirname __ARGS((char *, int));
Xint FullName __ARGS((char *, char *, int));
Xlong getperm __ARGS((char *));
Xint setperm __ARGS((char *, long));
Xint isdir __ARGS((char *));
Xvoid mch_windexit __ARGS((int));
Xvoid mch_settmode __ARGS((int));
Xint mch_get_winsize __ARGS((void));
Xvoid mch_set_winsize __ARGS((void));
Xint call_shell __ARGS((char *, int, int));
Xvoid breakcheck __ARGS((void));
Xchar *modname __ARGS((char *, char *));
Xint has_wildcard __ARGS((char *));
Xint ExpandWildCards __ARGS((int, char **, int *, char ***, int, int));
Xvoid FreeWild __ARGS((int, char **));
Xvoid set_window __ARGS((void));
END_OF_FILE
if test 2144 -ne `wc -c <'vim/src/msdos.h'`; then
echo shar: \"'vim/src/msdos.h'\" unpacked with wrong size!
fi
chmod +x 'vim/src/msdos.h'
# end of 'vim/src/msdos.h'
fi
if test -f 'vim/src/tccon_tc.uue' -a "${1}" != "-c" ; then
echo shar: Will not clobber existing file \"'vim/src/tccon_tc.uue'\"
else
echo shar: Extracting \"'vim/src/tccon_tc.uue'\" \(2410 characters\)
sed "s/^X//" >'vim/src/tccon_tc.uue' <<'END_OF_FILE'
X
Xbegin 644 tcconfig.tc
XM5'5R8F\@0R!#;VYF:6=U<F%T:6]N($9I;&4@&@`!#1(7`1H``@$!``(````";
XM``(``0`#``(``@`$``$```4``0``!@`!```(``$`!`D``@````T``@`!``X`2
XM`@```!$``0`($@`"````$P`"`!D`%``"````%0`"``$`%@`"````%P`"``$`^
XM&``"``$`9``!``%E``$``68``0`!9P`!``%H``$``6D``0`!:@`!``%K``$`F
XM`6P``0`!;0`!``%N``$``6\``0`!<``!``%Q``$``7(``0`!<P`!``%T``$`"
XM`74``0`!=@`!``%W``$``7@``0`!>0`!``%Z``$``7L``0``?``!``%]``$`2
XM`7X``0``?P`!``&```$``8(``0``A``!``&%``$``<@``0``R0`!``#*``$`Q
XM`<L``0``S``!``#-``$``,X``0`!SP`!``#0``$`&=$``0!DT@`!`"#5``$`Q
XM`-<``0``V``!``#9``$``=H``0`!VP`!``#<``$``=T``0`!W@`!``#?``$``
XM`.```0``X0`!``#B``$``2P!1```````````````````````````````````8
XM`````````````````````````````````````````````````````````"T!N
XM@`!$.EQ40UQ)3D-,541%````````````````````````````````````````1
XM`````````````````````````````````````````````````````````````
XM`````````````````````````````````````````````````````"X!@`!$S
XM.EQ40UQ,24(`````````````````````````````````````````````````@
XM`````````````````````````````````````````````````````````````
XM`````````````````````````````````````````````````"\!4`!624TN:
XM4%)*````````````````````````````````````````````````````````L
XM`````````````````````````````````````````#`!!``S,@``,0$%`#(UX
XM````,@$%`#$P,```,P%_`$U31$]3.U=)3$1?0T%21%,`````````````````Y
XM`````````````````````````````````````````````````````````````
XM`````````````````````````````````````````````````````````````
XM```````````T`1X`*@``````````````````````````````````````-0$>1
XM`"H``````````````````````````````````````#8!'@`J````````````I
XM```````````````````````````W`1X`*@```````````````````````````
XM````````````.`$>`"H``````````````````````````````````````#D![
XM'@`J```````````````````````````````````````Z`1X`*@``````````+
XM````````````````````````````.P$>`"H`````````````````````````$
XM`````````````#P!'@`J```````````````````````````````````````]"
XM`8``````````````````````````````````````````````````````````!
XM`````````````````````````````````````````````````````````````
XM```````````````````````````````````````````````````````^`00`#
XM.````#\!4```````````````````````````````````````````````````(
XM`````````````````````````````````````````````````````````$`!!
XM1`!$.EQ40P``````````````````````````````````````````````````U
XM`````````````````````````````````$$!4```````````````````````2
XM`````````````````````````````````````````````````````````````
X9`````````````````````````/__`@`:````:
X``
Xend
Xsize 1690
END_OF_FILE
if test 2410 -ne `wc -c <'vim/src/tccon_tc.uue'`; then
echo shar: \"'vim/src/tccon_tc.uue'\" unpacked with wrong size!
fi
chmod +x 'vim/src/tccon_tc.uue'
# end of 'vim/src/tccon_tc.uue'
fi
if test -f 'vim/src/unix.h' -a "${1}" != "-c" ; then
echo shar: Will not clobber existing file \"'vim/src/unix.h'\"
else
echo shar: Extracting \"'vim/src/unix.h'\" \(2448 characters\)
sed "s/^X//" >'vim/src/unix.h' <<'END_OF_FILE'


X/* vi:ts=4:sw=4
X *
X * VIM - Vi IMproved
X *
X * Code Contributions By: Bram Moolenaar mo...@oce.nl
X * Tim Thompson twitch!tjt
X * Tony Andrews onecom!wldrdg!tony
X * G. R. (Fred) Walter watmath!watcgl!grwalter
X */
X
X/*

X * Unix system-dependent filenames
X */
X#define BACKUPDIR "$HOME"
X
X#ifdef TMPNAME1
X# undef TMPNAME1
X# undef TMPNAME2
X# undef TMPNAMELEN
X#endif /* TMPNAME1 */
X#define TMPNAME1 "/tmp/viXXXXXX"
X#define TMPNAME2 "/tmp/voXXXXXX"
X#define TMPNAMELEN 15
X
X#ifdef MAX_COLUMNS
X# undef MAX_COLUMNS
X#endif /* MAX_COLUMNS */
X#define MAX_COLUMNS 1024
X
X#define stricmp vim_stricmp
X
Xvoid flushbuf __ARGS((void));
Xvoid outchar __ARGS((unsigned));
Xvoid outstr __ARGS((char *));
Xvoid mch_write __ARGS((char *, int));
Xint GetChars __ARGS((char *, int, int));
Xvoid vim_delay __ARGS((void));
Xvoid mch_suspend __ARGS((void));
Xvoid mch_windinit __ARGS((void));
Xvoid check_win __ARGS((int, char **));
Xvoid fname_case __ARGS((char *));
Xvoid settitle __ARGS((char *));
Xvoid resettitle __ARGS((void));
Xvoid mch_settmode __ARGS((int));
Xint dirname __ARGS((char *, int));
Xint FullName __ARGS((char *, char *, int));
Xlong getperm __ARGS((char *));
Xint setperm __ARGS((char *, int));
Xint isdir __ARGS((char *));
Xvoid mch_windexit __ARGS((int));
Xint mch_get_winsize __ARGS((void));
Xvoid mch_set_winsize __ARGS((void));
Xint call_shell __ARGS((char *, int, int));
Xvoid breakcheck __ARGS((void));
X#ifdef SCO
Xint chmod __ARGS((const char *, mode_t));
X#endif
X#if !defined(linux) && !defined(__NeXT) && !defined(M_UNIX) && !defined(ISC) && !defined(USL)
Xint remove __ARGS((const char *));
X/*
X * If you get an error message on "const" in the lines above, try
X * adding "-Dconst=" to the options in the makefile.
X */
X
X/* generic functions, not in unix.c */
X# if !defined(SCO) && !defined(SOLARIS)
Xvoid sleep __ARGS((int));
X# endif
Xint rename __ARGS((const char *, const char *));
X#endif
X
Xint stricmp __ARGS((char *, char *));
X
Xint has_wildcard __ARGS((char *));
Xint have_wildcard __ARGS((int, char **));
Xint ExpandWildCards __ARGS((int, char **, int *, char ***, int, int));
Xvoid FreeWild __ARGS((int, char **));
X
X/* memmove is not present on all systems, use our own version or bcopy */
X#if !defined(SCO) && !defined(SOLARIS) && !defined(AIX) && !defined(UTS4) && !defined(USL)
X# ifdef SYSV_UNIX
X# define MEMMOVE
Xvoid *memmove __ARGS((void *, void *, int));
X# else
X# define memmove(to, from, len) bcopy(from, to, len)
X# endif
X#endif
END_OF_FILE
if test 2448 -ne `wc -c <'vim/src/unix.h'`; then
echo shar: \"'vim/src/unix.h'\" unpacked with wrong size!
fi
chmod +x 'vim/src/unix.h'
# end of 'vim/src/unix.h'
fi
if test -f 'vim/termcap' -a "${1}" != "-c" ; then
echo shar: Will not clobber existing file \"'vim/termcap'\"
else
echo shar: Extracting \"'vim/termcap'\" \(2694 characters\)
sed "s/^X//" >'vim/termcap' <<'END_OF_FILE'
X#
X# Demonstration of a termcap file
X#
Xsx|ansi|any ansi terminal with pessimistic assumptions:\
X :co#80:li#24:cl=50\E[;H\E[2J:bs:am:cm=\E[%i%d;%dH:\
X :nd=\E[C:up=\E[A:ce=\E[K:ho=\E[H:pt:
XMu|sun|Sun Microsystems Workstation console:\
X :am:bs:km:mi:ms:pt:li#34:co#80:cl=^L:cm=\E[%i%d;%dH:\
X :ce=\E[K:cd=\E[J:\
X :so=\E[7m:se=\E[m:us=\E[4m:ue=\E[m:rs=\E[s:\
X :md=\E[1m:mr=\E[7m:me=\E[m:\
X :al=\E[L:dl=\E[M:im=:ei=:ic=\E[@:dc=\E[P:\
X :AL=\E[%dL:DL=\E[%dM:IC=\E[%d@:DC=\E[%dP:\
X :up=\E[A:nd=\E[C:ku=\E[A:kd=\E[B:kr=\E[C:kl=\E[D:\
X :k1=\E[224z:k2=\E[225z:k3=\E[226z:k4=\E[227z:k5=\E[228z:\
X :k6=\E[229z:k7=\E[230z:k8=\E[231z:k9=\E[232z:
XM-|sun-e|sun-nic|sune|Sun Microsystems Workstation without insert character:\
X :ic@:im@:ei@:tc=sun:
XMu|sun-s|Sun Microsystems Workstation window with status line:\
X :hs:ts=\E]l:fs=\E\\:ds=\E]l\E\\:tc=sun:
XMu|sun-e-s|sun-s-e|Sun Microsystems Workstation with status hacked for emacs:\
X :hs:ts=\E]l:fs=\E\\:ds=\E]l\E\\:tc=sun-e:
XM0|sun-48|Sun 48-line window:\
X :li#48:co#80:tc=sun:
XM1|sun-34|Sun 34-line window:\
X :li#34:co#80:tc=sun:
XM2|sun-24|Sun 24-line window:\
X :li#24:co#80:tc=sun:
XM3|sun-17|Sun 17-line window:\
X :li#17:co#80:tc=sun:
Xv9|925a|tvi925a|TeleVideo Model 925:\
X :al=\EE:am:bs:bt=\EI:bw:cd=\EY:ce=\ET:cl=^Z:cm=\E=%+ %+ :co#80:dc=\EW:\
X :dl=\ER:do=^V:ei=:ic=\EQ:if=/usr/share/lib/tabset/std:im=:kb=^H:kd=^V:\
X :kh=^^:kl=^H:kn#12:kr=^L:ku=^K:li#24:nd=^L:pt:se=\EG0:sg#1:so=\EG4:\
X :ue=\EG0:ug#1:ul:up=^K:us=\EG8:is=\El\
X :vb=\Eb\200\200\200\200\200\200\200\200\200\200\200\200\200\200\Ed:\
X :ve=\E.4:vs=\E.2:
Xd0|vt100|vt100-am|vt100am|dec vt100:\
X :do=^J:co#80:li#24:cl=50\E[;H\E[2J:sf=5\ED:\
X :le=^H:bs:am:cm=5\E[%i%d;%dH:nd=2\E[C:up=2\E[A:\
X :ce=3\E[K:cd=50\E[J:so=2\E[7m:se=2\E[m:us=2\E[4m:ue=2\E[m:\
X :md=2\E[1m:mr=2\E[7m:mb=2\E[5m:me=2\E[m:is=\E[1;24r\E[24;1H:\
X :rf=/usr/share/lib/tabset/vt100:\
X :rs=\E>\E[?3l\E[?4l\E[?5l\E[?7h\E[?8h:ks=\E[?1h\E=:ke=\E[?1l\E>:\
X :ku=\EOA:kd=\EOB:kr=\EOC:kl=\EOD:kb=^H:\
X :ho=\E[H:k1=\EOP:k2=\EOQ:k3=\EOR:k4=\EOS:pt:sr=5\EM:vt#3:xn:\
X :sc=\E7:rc=\E8:cs=\E[%i%d;%dr:
X# Amiga termcap by Bram Moolenaar
XAA|amiga|Amiga ANSI:\
X :co#80:li#25:am:do=\E[B:ce=\E[K:cd=\E[J:\
X :cl=\014:ku=\233A:kd=\233B:kl=\233D:kr=\233C:kb=^H:\
X :#4=\233 A:%i=\233 @:%1=\233?~:\
X :k1=\2330~:k2=\2331~:k3=\2332~:k4=\2333~:k5=\2334~:\
X :k6=\2335~:k7=\2336~:k8=\2337~:k9=\2338~:k;=\2339~:\
X :F1=\23310~:F2=\23311~:F3=\23312~:F4=\23313~:F5=\23314~:\
X :F6=\23315~:F7=\23316~:F8=\23317~:F9=\23318~:FA=\23319~:\
X :al=\E[L:AL=\E[%dL:dl=\E[M:DL=\E[%dM:le=^H:cm=\E[%i%d;%dH:\
X :nd=\E[C:RI=\E[%dC:up=\E[A:\
X :ce=\E[K:ho=\E[H:dc=\E[P:ic=\E[@:vi=\E[0 p:ve=\E[1 p:\
X :so=\E[2m:se=\E[m:us=\E[4m:ue=\E[m:mr=\E[7m:mb=\E[7;2m:me=\E[m:
X#
X# END OF TERMCAP
X#
END_OF_FILE
if test 2694 -ne `wc -c <'vim/termcap'`; then
echo shar: \"'vim/termcap'\" unpacked with wrong size!
fi
chmod +x 'vim/termcap'
# end of 'vim/termcap'
fi
if test -f 'vim/uganda.txt' -a "${1}" != "-c" ; then
echo shar: Will not clobber existing file \"'vim/uganda.txt'\"
else
echo shar: Extracting \"'vim/uganda.txt'\" \(3078 characters\)
sed "s/^X//" >'vim/uganda.txt' <<'END_OF_FILE'
XVim is public domain. If you are happy with Vim and want to express that,
Xdon't send me money. I don't need it. But I know a place where they do need
Xyour money. Please read on.
X
XSummer 1993 I spent one month in Uganda with a Dutch team. What I experienced
Xthere was very impressive. Together with local people we built a nursery
Xschool in Kibale. In only three weeks from nothing to a roofed building!
X
XKibale is a small town in the south of Uganda. It is an area that is suffering
Xfrom AIDS very badly. About 30% of the adults are infected. Because parents
Xdie, there are many orphans. They need a lot of help. The Kibale children
Xcentre is working hard to provide the needy with food, medical care and
Xeducation. Food and medical care to keep them healthy now, and education so
Xthat they can take care of themselves in the future. This is the best charity
Xprogram I have ever encountered.
X
XThe key to solving the problems in this area is education. This has been
Xneglected in the past years with president Idi Amin and the following civil
Xwars. The people have to learn how to take care of themselves and how to avoid
Xinfections. There is also help for people who are ill, but the primary goal
Xis to prevent people from getting ill.
X
XI was impressed by the progress that is being made there. The work is very
Xwell organized. Every dollar is spent on something useful. Our team brought
Xabout $2000. For that money we were able to built most of a two classroom
Xnursery school. They have further plans to build a primary school and houses
Xfor the teachers. They also need money for books and other teaching materials.
X
XIf you want to support the Kibale children centre, please send a contribution.
X
XHow do you know that the money will be spent right? First of all you have my
Xpersonal guarantee as the author of Vim. Further the project is co-sponsored
Xand inspected by World Vision and International Child Care Fund. I will visit
Xthe project a second time in January 1994. Friends of mine will go there in
Xthe summer of 1994. So I keep informed about what is happening there.
X
XIf you have any further questions, send me e-mail: mo...@oce.nl.
X
XThe director of the project is:
XSekaran Vellasamy
Xp.o. box 1658
XMasaka, Uganda, East Africa
X
XTransfering money from Holland:
XUse one of my accounts:
XRabobank Venlo, nr. 3765.05.117
XPostbank, nr. 1644503
X
XTransfering money from Europe:
XTo avoid banking costs the best thing is to send me a Eurocheque. But any
Xother method should work.
X
XTransfering money from USA:
XSend me a check that can be cashed in Holland. Any "standard" banking check
Xshould be OK. Please consider adding $10 for banking costs.
X
XMy address: Bram Moolenaar
X Clematisstraat 30
X 5925 BE Venlo
X The Netherlands.
X
XOr you can transfer the money directly to the director of the project.
XI don't know how well this works and what the costs are.
X
XGold Trust Bank LTD - Kampala
Xa/c no. 36059709
XCitibank, N.A.
XGlobal Clearance Services
X111 Wall Street 16th floor
XNew York 10043
XU.S.A.
XBeneficiary Mr. Sekaran Vellasamy a/c no. 2100
END_OF_FILE
if test 3078 -ne `wc -c <'vim/uganda.txt'`; then
echo shar: \"'vim/uganda.txt'\" unpacked with wrong size!
fi
chmod +x 'vim/uganda.txt'
# end of 'vim/uganda.txt'
fi
echo shar: End of archive 2 \(of 25\).
cp /dev/null ark2isdone


MISSING=""
for I in 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 ; do
if test ! -f ark${I}isdone ; then
MISSING="${MISSING} ${I}"
fi
done
if test "${MISSING}" = "" ; then
echo You have unpacked all 25 archives.
rm -f ark[1-9]isdone ark[1-9][0-9]isdone
else
echo You still need to unpack the following archives:
echo " " ${MISSING}
fi
## End of shell archive.
exit 0

===============================================================================

Bram Moolenaar

unread,
Dec 20, 1993, 10:48:04 PM12/20/93
to
Submitted-by: mo...@oce.nl (Bram Moolenaar)
Posting-number: Volume 41, Issue 59
Archive-name: vim/part09

Environment: UNIX, AMIGA, MS-DOS
Supersedes: vim: Volume 37, Issue 1-24

#! /bin/sh


# This is a shell archive. Remove anything before this line, then unpack
# it by saving it into a file and typing "sh file". To overwrite existing
# files, type "sh file -c". You can also feed this as standard input via
# unshar, or by typing "sh <file", e.g.. If this archive is complete, you
# will see the following message at the end:

# "End of archive 9 (of 25)."
# Contents: vim/doc/index vim/src/tags
# Wrapped by mool@oce-rd2 on Wed Dec 15 09:50:05 1993


PATH=/bin:/usr/bin:/usr/ucb ; export PATH

if test -f 'vim/doc/index' -a "${1}" != "-c" ; then
echo shar: Will not clobber existing file \"'vim/doc/index'\"
else
echo shar: Extracting \"'vim/doc/index'\" \(21291 characters\)
sed "s/^X//" >'vim/doc/index' <<'END_OF_FILE'
Xindex of vim commands for
X 1. insert mode
X 2. VI commands (normal mode)
X 3. command line editing
X 4. EX commands
X
X(for an overview of options see the end of reference.doc)
X
X1. INSERT MODE
X==============
X
Xchar action
X-----------------------------------------------------------------------
X^@ insert previously inserted text and stop insert {vi: up to 128
X chars}
X^A insert previously inserted text {not in Vi}
X^D delete one shiftwidth of indent in the current line {vi:
X only after auto-indent}
X when preceded with <0> or <^>, delete all indent, with <^>
X restore it in the next line
X^E insert the character which is below the cursor
X^H <BS> delete character before the cursor {vi: does not cross lines,
X does not delete autoindents}
X^J <LF> begin new line
X^K {char1} {char2} enter digraph (only when compiled with it) {vi: no digraphs}
X^M <CR> begin new line
X^O execute a single command and return to insert mode
X^P toggle 'revins' option.
X^R <0-9a-z> insert contents of register <0-9a-z> {not in vi}
X^T insert one shiftwidth of indent in current line {vi: only in
X autoindent}
X^U delete all entered characters in the current line
X^V insert next non-digit literally, insert three digit decimal
X number as a single byte.
X^W delete word before the cursor
X^Y insert the character which is above the cursor
X^[ <ESC> end insert mode
X<DEL> same as ^H <BS>
X<C_UP> cursor one line up
X<C_DOWN> cursor one line down
X<C_LEFT> cursor one character left
X<C_RIGHT> cursor one character right
X<SC_UP> one screenfull backward
X<SC_DOWN> one screenfull forward
X<SC_LEFT> cursor one word left
X<SC_RIGHT> cursor one word right
X{char1}<BS>{char2} enter digraph (only when compiled with it and 'digraph'
X option set) {vi: no digraphs}
X
X
X2. VI COMMANDS
X==============
X
XCHAR means non-blank char
XWORD means sequences of non-blank chars
XN is number entered before the command
X<move> is a cursor movement command
XNmove is the text that is moved over with a cursor movement command
XSECTION is a section that possibly starts with '}' instead of '{'
X
Xnote: 1 = cursor movement command; 2 = can be undone/redone
X
Xchar note vim normal mode (vi: what the unix vi does)
X------------------------------------------------------------------------------
X^@ error
X^A 2 add N to number at/after cursor {vi: no ^A}
X^B 1 scroll N screens Backwards
X^C interrupt current (search) command
X^D scroll Down N lines (default: half a screen)
X^E scroll N lines upwards (N lines Extra)
X^F 1 scroll N screens Forward
X^G display current file name and position
X^H <BS> 1 cursor N chars to the left
X^I <TAB> 1 go to N newer entry in jump list
X^J <LF> 1 cursor N lines downward
X^K error
X^L redraw screen
X^M <CR> 1 cursor to the first CHAR N lines lower
X^N 1 cursor N lines downward
X^O 1 go to N older entry in jump list
X^P 1 cursor N lines upward
X^V start blockwise Visual (vi: no Visual)
X^R 2 redo changes which were undone with 'u' (vi: retype
X the screen)
X^S 2 subtract N from number at/after cursor {vi: no ^S}
X^T jump to N older Tag in tag list
X^U scroll N lines Upwards (default: half a screen)
X^V error
X^W error
X^X error
X^Y scroll N lines downwards
X^Z suspend program (or start new shell)
X^[ <ESC> error
X^\ error
X^] :ta to ident under cursor
X^^ edit Nth alternate file (equivalent to :e #N)
X^_ error
X
X<SPACE> 1 cursor N chars to the right
X!<move><filter> filter Nmove text through the "filter" command
X!!<filter> filter N lines through the "filter" command
X"<a-zA-Z0-9.> use buffer <a-zA-Z0-9.> for next delete, yank or put
X (upper case to append)(<.> only works for put)
X# 1 search backward for the Nth occurrence of the ident under
X the cursor {not in vi}
X$ 1 cursor to the end of line N from the cursor
X% 1 find the next (curly/square) bracket on this line and go
X to its match. With count: go to N percentage in the file.
X& 2 repeat last :s
X'<a-zA-Z> 1 cursor to the first CHAR on the line with mark <a-zA-Z>
X'[ 1 cursor to the first CHAR on the line of the start of
X last operated text or start of putted text
X'] 1 cursor to the first CHAR on the line of the end of
X last operated text or end of putted text
X'' 1 cursor to the first CHAR of the line where the cursor was
X before the latest jump.
X( 1 cursor N sentences backward
X) 1 cursor N sentences forward
X* 1 search forward for the Nth occurrence of the ident under
X the cursor {not in vi}
X+ 1 cursor to the first CHAR N lines lower
X, 1 repeat latest f, t, F or T in opposite direction N times
X- 1 cursor to the first CHAR N lines higher
X. 2 repeat last change with count replaced by N
X/<pattern> 1 search forward for the Nth occurrence of <pattern>
X0 1 cursor to the first char of the line
X1 prepend to command to give a count
X2 "
X3 "
X4 "
X5 "
X6 "
X7 "
X8 "
X9 "
X: Ex command (see below)
X; 1 repeat latest f, t, F or T N times
X<<move> 2 shift the Nmove lines one shiftwidth leftwards
X<< 2 shift N lines one shiftwidth leftwards
X=<move> 2 filter Nmove lines through "indent" (vi: when option
X 'lisp' is set autoindent Nmove lines)
X== 2 filter N lines through "indent"
X><move> 2 shift Nmove lines one shiftwidth rightwards
X>> 2 shift N lines one shiftwidth rightwards
X?<pattern> 1 search backward for the Nth previous occurrence of
X <pattern>
X@<a-z> 2 execute the contents of named buffer <a-z> N times
X@@ 2 repeat the previous @<a-z> N times
XA 2 append text at the end of the line N times
XB 1 cursor N WORDS backward
X<"x>C 2 change from the cursor position to the end of the line,
X and N-1 more lines [into buffer x]; synonym for c$
X<"x>D 2 delete the characters under the cursor until the end of
X the line and N-1 more lines [into buffer x]; synonym for d$
XE 1 cursor forward to the end of WORD N
XF<char> cursor to the Nth occurrence of <char> to the left
XG 1 cursor to line N, default last line
XH 1 cursor to line N from top of screen
XI 2 insert text before the first CHAR on the line N times
XJ 2 Join N lines; default is 2
XK lookup Keyword under the cursor with "keywordprg"
XL 1 cursor to line N from bottom of screen
XM 1 cursor to middle line of screen
XN 1 repeat the latest '/' or '?' N times in opposite
X direction
XO 2 begin a new line above the cursor and insert text, repeat
X N times (vi: blank N screen lines)
X<"x>P 2 put the text [from buffer x] before the cursor N times
XV start Visual mode on lines (vi: go to Ex mode)
XR 2 enter replace mode: overtype existing characters, repeat the
X entered text N-1 times
X<"x>S 2 delete N lines [into buffer x] and start insert; synonym
X for ^cc or 0cc, depending on autoindent
XT<char> 1 cursor till after Nth occurrence of <char> to the left
XU 2 undo all latest changes on one line (vi: while not moved
X off of it)
X While in Visual mode: make uppercase
XQ<move> 2 Join N lines and re-format them
XW 1 cursor N WORDS forward
X<"x>X 2 delete N characters before the cursor [into buffer x]
X<"x>Y yank N lines [into buffer x]; synonym for yy
XZZ store current file, if modified, and exit
X[[ 1 cursor N sections backward
X[] 1 cursor N SECTIONS backward
X\ error
X]] 1 cursor N sections forward
X][ 1 cursor N SECTIONS forward
X^ 1 cursor to the first CHAR of the line
X_ 1 cursor to the first CHAR N - 1 lines lower
X`<a-zA-Z> 1 cursor to the mark <a-zA-Z>
X`[ 1 cursor to the start of last operated text or start of
X putted text
X`] 1 cursor to the end of last operated text or end of
X putted text
X`` 1 cursor to the position before latest jump
Xa 2 append text after the cursor N times
Xb 1 cursor N words backward
X<"x>c<move> 2 delete Nmove text [into buffer x] and start insert
X<"x>cc 2 delete N lines [into buffer x] and start insert
X<"x>d<move> 2 delete Nmove text [into buffer x]
X<"x>dd 2 delete N lines [into buffer x]
Xe 1 cursor forward to the end of word N
Xf<char> 1 cursor to Nth occurrence of <char> to the right
Xg error
Xh 1 cursor N chars to the left
Xi 2 insert text before the cursor N times
Xj 1 cursor N lines downward
Xk 1 cursor N lines upward
Xl 1 cursor N chars to the right
Xm<a-z> set mark <a-z> at cursor position
Xn 1 repeat the latest '/' or '?' N times
Xo 2 begin a new line below the cursor and insert text, repeat
X N times (vi: blank N screen lines)
X While Visual: cursor moves other end
X<"x>p 2 put the text [from buffer x] after the cursor N times
Xv start Visual mode with characters (vi: no Visual)
Xr<char> 2 replace N chars by <char>
X<"x>s 2 (substitute) delete N characters [into buffer x] and
X start insert
Xt<char> 1 cursor till before Nth occurrence of <char> to the right
Xu 2 undo changes (vi: only one level)
X With Visual: make lowercase (vi: no Visual)
Xq<a-zA-Z> record typed characters into named buffer <a-zA-Z>
X (upper case to append)
Xq stops recording (vi: no recording)
Xw 1 cursor N words forward
X<"x>x 2 delete N characters under and after the cursor [into
X buffer x]
X<"x>y<move> yank Nmove text [into buffer x]
X<"x>yy yank N lines [into buffer x]
Xz<CR> redraw, cursor line to top of window
Xz. redraw, cursor line to center of window
Xz- redraw, cursor line at bottom of window
X{ 1 cursor N paragraphs backward
X| 1 cursor to column N
X} 1 cursor N paragraphs forward
X~ 2 option notildeop: switch case of N characters under
X cursor and move the cursor N characters to the right
X (vi: no count)
X~<move> option tildeop: switch case of Nmove text (vi: no tildeop
X option)
X<DEL> when entering a number: remove the last digit
X<HELP> show the file vim:vim.hlp page by page (vi: no help)
X<C_UP> 1 move cursor N lines upwards
X<C_DOWN> 1 move cursor N lines downwards
X<C_LEFT> 1 move cursor N chars to the left
X<C_RIGHT> 1 move cursor N chars to the right
X<SC_UP> 1 scroll N screens Backwards (same as ^B)
X<SC_DOWN> 1 scroll N screens Forwards (same as ^F)
X<SC_LEFT> 1 cursor N words backward (same as b)
X<SC_RIGHT> 1 cursor N words forward (same as w)
X
X
X3. command line editing
X=======================
X
XGet to the command line with the ':', '!', '/' or '?' commands.
XNormal characters are inserted at the current cursor position.
X(vi: can only alter last character in the line)
X
X^A do filename completion on the pattern in front of the cursor
X and insert all matches
X^B cursor to begin of command line
X^D list filenames that match the pattern in front of the cursor
X^E cursor to end of command line
X^H delete the character in front of the cursor
X^L do filename completion on the pattern in front of the cursor
X and insert the longest common part
X^N after an <ESC> with multiple matches: go to next match
X otherwise: same as <C_DOWN>
X^P after an <ESC> with multiple matches: go to previous match
X otherwise: same as <C_UP>
X^U remove all characters
X^V insert next non-digit literally, insert three digit decimal
X number as a single byte. {Vi: type the CTRL-V twice to get one}
X^W delete the word in front of the cursor
X'wildchar' option (default <TAB>)
X do filename completion on the pattern in front of the cursor
X<DEL> delete the character under the cursor
X<C_UP> recall previous command line from history
X<C_DOWN> recall next command line from history
X<C_LEFT> cursor left
X<C_RIGHT> cursor right
X<SC_LEFT> cursor one word left
X<SC_RIGHT> cursor one word right
X<SC_UP> recall previous command line that matches pattern in front of
X the cursor
X<SC_DOWN> recall next command line that matches pattern in front of the
X cursor
X
X
X4. EX commands
X==============
X
Xlines that start with " or # are ignored
X
X<range> stands for a series of line specifiers, separated with ',' or ';'.
XWhen separated with ';' the cursor position will be set to that line before
Xinterpreting the next line specifier.
XThe default line specifier (for most commands) is the Cursor position.
Xline numbers may be specified with:
X <number> the absolute line number
X . the current line
X $ the last line in the file
X % equal to 1,$ (the entire file)
X 't position of mark t
X /<pattern> the next line where <pattern> matches
X ?<pattern> the previous line where <pattern> matches
XEach may be followed (several times) by '+' or '-' and an optional number.
XThis number is added or subtracted from the preceding line number.
Xif the number is omitted, 1 is used.
XExamples:
X .+3 three lines below the cursor
X /that+1 the line below the next line containing "that"
X .,$ from current line until end of file
X
XIn the commands below the characters in square brackets are optional.
X
X:<range> set the cursor on the (last) specified line number
X
X:ab[breviate] list all abbreviations
X:ab[breviate] <lhs> list abbreviation for <lhs>
X:ab[breviate] <lhs> <rhs>
X add <lhs> to the list of abbreviations
X
X:a[ppend] {vi: append text}
X
X:ar[gs] print the file list, with the current file in []
X
X:ca[bbrev] like ":ab", but for command line mode only {not in
X vi}
X
X:cc [nr] Display error [nr] (default is same error)
X
X:cd On non-Unix systems: Print the current directory
X name. {vi: no cd command}
X:cd On Unix systems: Change the current directory to the
X home directory. {vi: no cd command}
X:cd <path> change the current directory to <path>
X
X:[range]ce[nter] [width] center lines in [range] between [width] columns
X (default 'textwidth' or 80). {vi: no such command}
X
X:cf read error file (from errorfile option) and jump to
X the first error
X
X:c[hange] {vi: replace lines}
X
X:ch[dir] same as :cd
X
X:cm[ap] like :map, but for command line mode only {not in vi}
X
X:cn display next error
X
X:cno[remap] like :noremap, but for command line mode only {not in vi}
X
X:cnorea[bbrev] <lhs> <rhs>
X like ":cab", but no remapping for this <rhs> {not in
X vi}
X
X:[range]co[py] {address} copy lines from [range] to {address}
X
X:cp display previous error
X
X:cq Quit without writing and return an error code
X
X:cu[nmap] like :unmap, but for command line mode only {not in vi}
X
X:cuna[bbrev] like ":unab", but for command line mode only {not in
X vi}
X
X:[<range>]d[elete] [x] [count]
X delete <range> lines (default: current line)
X
X:dig[raphs] display currently defined digraphs {not in vi}
X
X:dig[raphs] {char1}{char2} {number} ...
X define the character pair {char1} {char2} to be the
X digraph for character {number}. {number} is entered
X as digits.
X
X:di[splay] display the contents of numbered and named buffers
X {vi: no such command}
X
X:e[dit] [file] edit 'file' (default: current file), unless changes have
X been made {vi: allow +n to start at certain position}
X:e[dit]! [file] edit 'file' (default: current file) always
X
X:ex same as :edit
X
X:f[ile] prints the current file name and some more info
X:f[ile] <name> sets current file name to <name>
X:files lists the alternate file names
X
X:<range>g[lobal]/<pattern>/<cmd>
X execute the EX command <cmd> on the lines where <pattern>
X matches
X:<range>g[lobal]!/<pattern>/<cmd>
X execute the EX command <cmd> on the lines where <pattern>
X does not match
X
X:h[elp] show the help file page by page {vi: no help}
X
X:ia[bbrev] like ":ab", but for insert mode only {not in vi}
X
X:i[nsert] {vi: insert text}
X
X:im[ap] like :map, but for insert mode only {not in vi}
X
X:ino[remap] like :noremap, but for insert mode only {not in vi}
X
X:inorea[bbrev] <lhs> <rhs>
X like ":iab", but no remapping for this <rhs> {not in
X vi}
X
X:iuna[bbrev] like ":unab", but for insert mode only {not in vi}
X
X:iu[nmap] like :unmap, but for insert mode only {not in vi}
X
X:<range>j[oin] join <range> lines
X
X:ju[mps] print jump list {vi: no such command}
X
X:[range]k<a-z> set mark without a space
X
X:[range]le[ft] [indent] left align lines in [range]. Sets the indent in the
X lines to [indent] (default 0). {vi: no such command}
X
X:[range]l[ist] list lines
X
X:mak[e] [arguments] Run the program given with 'makeprg', with optional
X [arguments]. The output is saved in the error file.
X Then the ":cf" command is executed to jump to the
X first error.
X
X:map <lhs> <rhs> map the key sequence <lhs> to <rhs> in normal mode
X:map! <lhs> <rhs> map the key sequence <lhs> to <rhs> in insert mode
X
X:[range]ma[rk] <a-z> set mark
X
X:marks list all marks {vi: no such command}
X
X:mk[exrc] write options to .exrc file
X:mkv[imrc] write options to .vimrc file {not in vi}
X
X:[range]m[ove] {address} move lines from [range] to {address}
X
X:n[ext] edit next file, unless changes have been made
X:n[ext]! edit next file
X:n[ext] <filelist> define <filelist> as the new list of files and edit
X the first one, unless changes have been made
X:n[ext]! <filelist> define <filelist> as the new list of files and edit
X the first one {vi: +command to start editing at a
X specified position}
X
X:norea[bbrev] <lhs> <rhs>
X like ":ab", but no remapping for this <rhs> {not in
X vi}
X
X:nore[map] <lhs> <rhs> map the key sequence <lhs> to <rhs> in normal mode,
X disallow remapping of <rhs> {not in vi}
X:nore[map]! <lhs> <rhs> map the key sequence <lhs> to <rhs> in insert mode,
X disallow remapping of <rhs> {not in vi}
X
X:nu[mber] {vi: print specified lines with their line number}
X
X:N[ext] edit previous file in file list, unless changes have
X been made
X:N[ext]! edit previous file in file list
X
X:o[pen] {vi: start editing in open mode}
X
X:[count]po[p][!] jump to [count] older tag in tag list {vi: no such command}
X
X:pres[erve] {vi: emergency exit}
X
X:pr[evious] same as :Next
X
X:<range>p[rint] print the specified lines
X
X:pu[t] [x] insert text from buffer [x] below current line
X:pu[t]! [x] insert text from buffer [x] above current line
X
X:pwd Print the current directory name. {vi: no such command}
X
X:q[uit] quit, unless changes have been made
X:q[uit]! quit always, without writing
X
X:r[ead] <name> insert the file <name> below the cursor
X:r[ead]!<cmd> excute <cmd> and insert its standard output below the
X cursor
X
X:rec[over] {vi: recover a file after a crash or :preserve}
X
X:rew[ind] start editing the first file in the file list, unless
X changes have been made
X:rew[ind]! start editing the first file in the file list
X
X:[range]ri[ght] [width] right align lines in [range] at [width] columns
X (default 'textwidth' or 80). {vi: no such command}
X
X:se[t] show all modified options {vi: non-default options}
X:se[t] all show all options
X:se[t] <option> set toggle option on, show value of string or number
X option
X:se[t] no<option> set toggle option off
X:se[t] inv<option> invert toggle option
X:se[t] <option>=<value> set string or number option to <value>
X:se[t] <option>? show value of <option>
X
X:sh[ell] escape to a shell {vi: shell name from option 'shell'}
X
X:so[urce] <file> read EX commands from <file>
X:so[urce]! <file> read VI commands from <file> {vi: no such command}
X
X:st[op][!] suspend the editor
X
X:<range>s[ubstitute]/<pattern>/<string>/<option>
X for each line in <range> replace the first occurrence of
X <pattern> by <string>; with <option> 'g' all occurrences
X on the line are replaced; with <option> 'c' each
X replace has to be confirmed
X:<range>s[ubstitute] repeat last :substitute
X
X:sus[pend][!] suspend the editor
X
X:t synonym for copy
X
X:ta[g] <ident> search for <indent> in the tags file and execute
X the accompanying command, unless changes have been made
X:ta[g]! <ident> search for <indent> in the tags file and execute
X the accompanying command
X
X:[count]ta[g][!] jump to [count] newer tag in tag list {vi: no such command}
X
X:tags print the tag list {vi: no such command}
X
X:una[bbreviate] <lhs> remove <lhs> from abbreviation list
X
X:u[ndo] undo last change
X
X:unm[ap] <lhs> remove the mapping of <lhs> for normal mode
X:unm[ap]! <lhs> remove the mapping of <lhs> for insert mode
X
X:ve[rsion] print the version number of the editor
X
X:<range>v[global]/<pattern>/<cmd>
X execute the EX command <cmd> on the lines where <pattern>
X does not match
X
X:vi[sual] {vi: switch from EX or open to visual mode}
X
X:wi[nsize] <width> <height>
X Set effective window size to <width> columns and <height>
X rows. Does not change actual window size. Should only be
X used from script files. {vi: no such command}
X
X:<range>w[rite][!] write the specified lines to the current file
X:<range>w[rite] <file> write the specified lines to <file>, unless it
X already exists
X:<range>w[rite]! <file> write the specified lines to <file>
X:<range>w[rite][!] >> append the specified lines to the current file
X:<range>w[rite][!] >> <file>
X append the specified lines to <file>
X:<range>w[rite] !<cmd> execute <cmd> with <range> lines as standard input
X
X:wq write the current file and exit if no more files
X:wq! write the current file and exit
X:wq <file> write to <file> and exit if no more files
X:wq! <file> write to <file> and exit
X
X:x[it][!] [file] same as :wq, but write only when changes have been made
X
X:y[ank] [x] copy lines into buffer [x]
X
X:z {vi: print some lines}
X
X:@<reg> execute contents of buffer <reg> as an Ex command
X {only in some versions of vi}
X
X:@@ repeat last :@<reg> command.
X
X:![!]<cmd> [!][<arg>] execute <cmd> with the shell, replace the optional bangs
X with the previously given command, append the optional
X <arg>
X:<range>![!]<cmd> [!][<arg>]
X filter <range> lines through <cmd>, replace the optional bangs
X with the previously given command, append the optional
X <arg>
X
X:< shift left
X
X:> shift right
X
X:= print the line number
X
X:& same as :substitute
X
X:~ {vi: do a substitute on the previous regular expression}
END_OF_FILE
if test 21291 -ne `wc -c <'vim/doc/index'`; then
echo shar: \"'vim/doc/index'\" unpacked with wrong size!
fi
chmod +x 'vim/doc/index'
# end of 'vim/doc/index'
fi
if test -f 'vim/src/tags' -a "${1}" != "-c" ; then
echo shar: Will not clobber existing file \"'vim/src/tags'\"
else
echo shar: Extracting \"'vim/src/tags'\" \(20073 characters\)
sed "s/^X//" >'vim/src/tags' <<'END_OF_FILE'
XAppendCharToRedobuff buffers.c /^AppendCharToRedobuff(c)$/
XAppendNumberToRedobuff buffers.c /^AppendNumberToRedobuff(n)$/
XAppendToRedobuff buffers.c /^AppendToRedobuff(s)$/
XChk_Abort amiga.c /^Chk_Abort()$/
XCtrl ascii.h /^#define Ctrl(x) ((x) & 0x1f)$/
XCurpos2ptr storage.c /^Curpos2ptr()$/
XDoOneCmd cmdline.c /^DoOneCmd(buff)$/
XExpandOne cmdline.c /^ExpandOne(str, list_notfound, mode)$/
XExpandWildCards amiga.c /^ExpandWildCards(num_pat, pat, num_file, file, file/
XFAIL regexp.c /^#define FAIL(m) { emsg(m); return NULL; }$/
XFreeWild amiga.c /^FreeWild(num, file)$/
XFullName amiga.c /^FullName(fname, buf, len)$/
XGetChars amiga.c /^GetChars(buf, maxlen, time)$/
XINIT normal.c /^#define INIT(x) x$/
XISSPECIAL edit.c /^#define ISSPECIAL(c) ((c) < ' ' || (c) >= DEL)$/
XMP amiga.c /^#define MP(xx) ((struct MsgPort *)((struct FileHan/
XMaddcr addcr.c /^main(argc, argv)$/
XMagic regexp.c /^#define Magic(x) ((x)|('\\\\'<<8))$/
XMeta ascii.h /^#define Meta(x) ((x) | 0x80)$/
XMmain main.c /^main(argc, argv)$/
XMmkcmdtab mkcmdtab.c /^main(argc, argv)$/
XNEXT regexp.c /^#define NEXT(p) (((*((p)+1)&0377)<<8) + (*((p)+2)&/
XOP regexp.c /^#define OP(p) (*(p))$/
XOPENDEBUG debug.h /^# define OPENDEBUG(file)\\$/
XOPERAND regexp.c /^#define OPERAND(p) ((p) + 3)$/
XOpencmd misccmds.c /^Opencmd(dir, redraw, delspaces)$/
XPeekChr regexp.c /^#define PeekChr() curchr \/* shortcut only when las/
XRead unix.c /^Read(buf, maxlen)$/
XRealWaitForChar unix.c /^RealWaitForChar(ticks)$/
XResetRedobuff buffers.c /^ResetRedobuff()$/
XSupdatescript script.c /^Supdatescript(str)$/
XTO_LOWER macros.h /^# define TO_LOWER(c) (isupper(c) ? tolower(c) : (c/
XTO_UPPER macros.h /^# define TO_UPPER(c) (islower(c) ? toupper(c) : (c/
XTTEST term.c /^# define TTEST(a) debug1("%s: ", "a"); if (a) {deb/
XUCHARAT regexp.c /^#define UCHARAT(p) ((int)*(unsigned char *)(p))$/
XWaitForChar msdos.c /^WaitForChar(msec)$/
X__ARGS regsub.c /^# define __ARGS(a) a$/
X__PARMS vim.h /^# define __PARMS(x) x$/
X_addfmt termlib.c /^_addfmt(buf, fmt, val) \/* add val to b/
X_chdrive msdos.c /^_chdrive(drive)$/
X_find termlib.c /^_find(s, set) \/* finds next c in s that's a memb/
X_match termlib.c /^_match(s1, s2) \/* returns length o/
Xadd_buff buffers.c /^add_buff(buf, s)$/
Xadd_char_buff buffers.c /^add_char_buff(buf, c)$/
Xadd_num_buff buffers.c /^add_num_buff(buf, n)$/
Xaddfile msdos.c /^addfile(fl, f, isdir)$/
Xaddstar cmdline.c /^addstar(fname, len)$/
XadjustCurpos linefunc.c /^adjustCurpos()$/
Xadjustmark mark.c /^adjustmark(old, new)$/
Xalloc alloc.c /^alloc(size)$/
Xalloc_block storage.c /^alloc_block()$/
Xalloc_line storage.c /^alloc_line(size)$/
Xappendline storage.c /^appendline(after, s)$/
Xask_yesno misccmds.c /^ask_yesno(str)$/
Xautowrite cmdline.c /^autowrite()$/
Xbck_word search.c /^bck_word(count, type)$/
Xbeep misccmds.c /^beep()$/
Xbeginline edit.c /^beginline(flag)$/
Xblink msdos.c /^blink(n)$/
Xblock_prep ops.c /^block_prep(lnum, delete)$/
Xbreakcheck amiga.c /^breakcheck()$/
Xbsdmemset alloc.c /^bsdmemset(ptr, c, size)$/
Xbuf1line macros.h /^#define buf1line() (line_count == 1)$/
Xbufempty macros.h /^#define bufempty() (buf1line() && lineempty((linen/
Xbzero unix.c /^# define bzero(a, b) memset((a), 0, (b))$/
Xcall_shell amiga.c /^call_shell(cmd, filter, cooked)$/
Xcanincrease storage.c /^canincrease(n)$/
Xcatch_cbrk msdos.c /^catch_cbrk()$/
Xcatch_cint msdos.c /^catch_cint(bp, di, si, ds, es, dx, cx, bx, ax)$/
Xcbrk_handler msdos.c /^cbrk_handler()$/
Xccheck_abbr cmdline.c /^ccheck_abbr(c)$/
Xchange_warning misccmds.c /^change_warning()$/
Xcharsize charset.c /^charsize(c)$/
Xchartabsize charset.c /^chartabsize(c, col)$/
Xcheck_abbr buffers.c /^check_abbr(c, ptr, col, mincol)$/
Xcheck_changed cmdline.c /^check_changed(checkaw)$/
Xcheck_fname cmdline.c /^check_fname()$/
Xcheck_more cmdline.c /^check_more(message)$/
Xcheck_msg message.c /^check_msg()$/
Xcheck_readonly cmdline.c /^check_readonly()$/
Xcheck_termcode term.c /^check_termcode(buf)$/
Xcheck_win amiga.c /^check_win(argc, argv)$/
Xcheck_winsize term.c /^check_winsize()$/
Xcheckclearop normal.c /^checkclearop()$/
Xcheckclearopq normal.c /^checkclearopq()$/
Xchk_mline fileio.c /^chk_mline(lnum)$/
Xclear_line screen.c /^clear_line()$/
Xclear_termparam param.c /^clear_termparam()$/
Xclearmarked storage.c /^clearmarked()$/
Xclearopbeep normal.c /^clearopbeep()$/
Xclrallmarks mark.c /^clrallmarks()$/
Xclrtags tag.c /^clrtags()$/
Xcls search.c /^cls()$/
Xcmdchecklen cmdline.c /^cmdchecklen()$/
Xcoladvance linefunc.c /^coladvance(wcol)$/
Xcomp_Botline screen.c /^comp_Botline()$/
Xcomp_col param.c /^comp_col()$/
Xcopy_redo buffers.c /^copy_redo()$/
Xcopy_spaces alloc.c /^copy_spaces(ptr, count)$/
Xcstrchr regexp.c /^cstrchr(s, c)$/
Xcstrncmp regexp.c /^cstrncmp(s1, s2, n)$/
Xcurs_columns screen.c /^curs_columns(scroll)$/
Xcursor_off term.c /^cursor_off()$/
Xcursor_on term.c /^cursor_on()$/
Xcursorcmd cmdline.c /^cursorcmd()$/
Xcursupdate screen.c /^cursupdate()$/
Xdebug debug.h /^# define debug(x) {fprintf(debugfp,x);fflush(debug/
Xdebug1 debug.h /^# define debug1(x,a) {fprintf(debugfp,x,a);fflush(/
Xdebug2 debug.h /^# define debug2(x,a,b) {fprintf(debugfp,x,a,b);ffl/
Xdebug3 debug.h /^# define debug3(x,a,b,c) {fprintf(debugfp,x,a,b,c)/
Xdec linefunc.c /^dec(lp)$/
XdecCurpos linefunc.c /^decCurpos()$/
Xdecl linefunc.c /^decl(lp)$/
Xdecrmarks mark.c /^decrmarks()$/
Xdecrtags tag.c /^decrtags()$/
Xdel_typestr buffers.c /^del_typestr(len)$/
Xdelchar misccmds.c /^delchar(fixpos)$/
Xdellines misccmds.c /^dellines(nlines, doscreen, undo)$/
Xdelmode screen.c /^delmode()$/
Xdelsline storage.c /^delsline(nr, delmarks)$/
Xdirname amiga.c /^dirname(buf, len)$/
Xdo_Lower regsub.c /^do_Lower(d, c)$/
Xdo_Upper regsub.c /^do_Upper(d, c)$/
Xdo_align cmdline.c /^do_align(start, end, width, type)$/
Xdo_copy regsub.c /^do_copy(d, c)$/
Xdo_lower regsub.c /^do_lower(d, c)$/
Xdo_mlines fileio.c /^do_mlines()$/
Xdo_upper regsub.c /^do_upper(d, c)$/
Xdoaddsub ops.c /^doaddsub(c, Prenum1)$/
Xdoarglist cmdline.c /^doarglist(str)$/
Xdobang cmdline.c /^dobang(addr_count, arg)$/
Xdochange ops.c /^dochange()$/
Xdocmdline cmdline.c /^docmdline(cmdline)$/
Xdodelete ops.c /^dodelete()$/
Xdodigraph digraph.c /^dodigraph(c)$/
Xdodis ops.c /^dodis()$/
Xdodojoin ops.c /^dodojoin(count, insert_space, redraw)$/
Xdoecmd cmdline.c /^doecmd(arg, sarg)$/
Xdoexecbuf ops.c /^doexecbuf(c)$/
Xdofilter cmdline.c /^dofilter(buff, do_in, do_out)$/
Xdoformat ops.c /^doformat()$/
Xdoglob csearch.c /^doglob(type, lp, up, cmd)$/
Xdojoin ops.c /^dojoin(insert_space, redraw)$/
Xdojumps mark.c /^dojumps()$/
Xdomake cmdline.c /^domake(arg)$/
Xdomap buffers.c /^domap(maptype, keys, mode)$/
Xdomarks mark.c /^domarks()$/
Xdoput ops.c /^doput(dir, count)$/
Xdorecord ops.c /^dorecord(c)$/
Xdos_packet amiga.c /^dos_packet(pid, action, arg)$/
Xdosearch search.c /^dosearch(dirc, str, reverse, count, echo)$/
Xdoset param.c /^doset(arg)$/
Xdoshell cmdline.c /^doshell(cmd)$/
Xdoshift ops.c /^doshift(op)$/
Xdosource cmdline.c /^dosource(fname)$/
Xdosub csearch.c /^dosub(lp, up, cmd, nextcommand)$/
Xdotag tag.c /^dotag(tag, type, count)$/
Xdotags tag.c /^dotags()$/
Xdotilde ops.c /^dotilde()$/
Xdowrite cmdline.c /^dowrite(arg, append)$/
Xdoyank ops.c /^doyank(deleting)$/
Xecheck_abbr edit.c /^echeck_abbr(c)$/
Xedit edit.c /^edit(count)$/
Xemsg message.c /^emsg(s)$/
Xemsg2 message.c /^emsg2(s, a1)$/
Xend_msg message.c /^end_msg()$/
Xend_word search.c /^end_word(count, type, stop)$/
Xequal macros.h /^#define equal(a, b) (((a).lnum == (b).lnum) && ((a/
Xexpand_env misccmds.c /^expand_env(src, dst, dstlen)$/
Xexpandpath msdos.c /^expandpath(fl, path, fonly, donly, notf)$/
Xfilealloc storage.c /^filealloc()$/
Xfileinfo misccmds.c /^fileinfo(fullname)$/
Xfilemess fileio.c /^filemess(name, s)$/
Xfill_inbuf unix.c /^fill_inbuf()$/
Xfindfunc search.c /^findfunc(dir, what, count)$/
Xfindpar search.c /^findpar(dir, count, what)$/
Xfindparam param.c /^findparam(arg)$/
Xfindsent search.c /^findsent(dir, count)$/
Xfindtag tag.c /^findtag(tag)$/
Xfirstmarked storage.c /^firstmarked()$/
Xflush_buffers buffers.c /^flush_buffers(typeahead)$/
Xflushbuf term.c /^flushbuf()$/
Xfm_getname mark.c /^fm_getname(fmark)$/
Xfname_case amiga.c /^fname_case(name)$/
Xfnamecmp vim.h /^# define fnamecmp(x, y) stricmp((x), (y))$/
Xfree vim.h /^# define free(x) nofreeNULL(x)$/
Xfree_buff buffers.c /^free_buff(buf)$/
Xfree_line storage.c /^free_line(ptr)$/
Xfree_yank ops.c /^free_yank(n)$/
Xfree_yank_all ops.c /^free_yank_all()$/
Xfreeall storage.c /^freeall()$/
Xfreefiles amiga.c /^freefiles()$/
Xfullpathcmp misccmds.c /^fullpathcmp(s1, s2)$/
Xfwd_word search.c /^fwd_word(count, type, eol)$/
Xgchar misccmds.c /^gchar(pos)$/
XgcharCurpos misccmds.c /^gcharCurpos()$/
Xget_address cmdline.c /^get_address(ptr)$/
Xget_bufcont buffers.c /^get_bufcont(buffer, dozero)$/
Xget_fib amiga.c /^get_fib(fname)$/
Xget_indent misccmds.c /^get_indent()$/
Xget_inserted buffers.c /^get_inserted()$/
Xget_literal edit.c /^get_literal(nextc)$/
Xget_recorded buffers.c /^get_recorded()$/
Xget_yank_buffer ops.c /^get_yank_buffer(writing)$/
Xgetaltfile cmdline.c /^getaltfile(n, lnum, setpm)$/
Xgetaltfname cmdline.c /^getaltfname(n)$/
Xgetchr regexp.c /^getchr()$/
Xgetcmdline cmdline.c /^getcmdline(firstc, buff)$/
Xgetdigits misccmds.c /^getdigits(pp)$/
Xgetdigraph digraph.c /^getdigraph(char1, char2)$/
Xgetent termlib.c /^getent(tbuf, term, termcap, buflen)$/
Xgetfile cmdline.c /^getfile(fname, sfname, setpm)$/
Xgetlinecol term.c /^getlinecol()$/
Xgetmark mark.c /^getmark(c, changefile)$/
Xgetout main.c /^getout(r)$/
Xgetperm amiga.c /^getperm(name)$/
Xgettail misccmds.c /^gettail(fname)$/
Xgetvcol screen.c /^getvcol(pos, type)$/
Xgotchars buffers.c /^gotchars(s, len)$/
Xgotocmdend cmdline.c /^gotocmdend()$/
Xgotocmdline cmdline.c /^gotocmdline(clr, firstc)$/
Xhas_wildcard amiga.c /^has_wildcard(p)$/
Xhave_wildcard unix.c /^have_wildcard(num, file)$/
Xhelp help.c /^help()$/
Xinc linefunc.c /^inc(lp)$/
XincCurpos linefunc.c /^incCurpos()$/
Xinchar term.c /^inchar(buf, maxlen, time)$/
Xincl linefunc.c /^incl(lp)$/
Xincrmarks mark.c /^incrmarks()$/
Xincrtags tag.c /^incrtags()$/
Xinindent misccmds.c /^inindent()$/
Xinit_typestr buffers.c /^init_typestr()$/
Xinit_yank ops.c /^init_yank()$/
Xinitchr regexp.c /^initchr(str)$/
Xinmacro search.c /^inmacro(opt, s)$/
Xins_typestr buffers.c /^ins_typestr(str, noremap)$/
Xinschar misccmds.c /^inschar(c)$/
Xinsertbuf ops.c /^insertbuf(c)$/
Xinsertchar edit.c /^insertchar(c)$/
Xinsfile amiga.c /^insfile(name, isdir)$/
Xinsstr misccmds.c /^insstr(s)$/
Xisdir amiga.c /^isdir(name)$/
Xisidchar charset.c /^isidchar(c)$/
Xismult regexp.c /^ismult(c)$/
Xispathsep misccmds.c /^ispathsep(c)$/
Xisspace vim.h /^# define isspace(x) (((x) >= 9 && (x) <= 13) || (/
Xistermparam param.c /^istermparam(p)$/
Xlalloc alloc.c /^lalloc(size, message)$/
Xlineempty macros.h /^#define lineempty(p) (*nr2ptr(p) == NUL)$/
Xlistdigraphs digraph.c /^listdigraphs()$/
Xlock2name amiga.c /^lock2name(lock, buf, len)$/
Xlt macros.h /^#define lt(a, b) (((a).lnum != (b).lnum) \\$/
Xltoreq macros.h /^#define ltoreq(a, b) (((a).lnum != (b).lnum) \\$/
Xm_blockalloc storage.c /^m_blockalloc(size, message)$/
Xm_blockfree storage.c /^m_blockfree()$/
Xmakemap buffers.c /^makemap(fd)$/
Xmakescriptname script.c /^makescriptname()$/
Xmakeset param.c /^makeset(fd)$/
Xmaketitle misccmds.c /^maketitle()$/
Xmark2pos mark.c /^mark2pos(markp)$/
Xmch_get_winsize amiga.c /^mch_get_winsize()$/
Xmch_set_winsize amiga.c /^mch_set_winsize()$/
Xmch_settmode amiga.c /^mch_settmode(raw)$/
Xmch_suspend amiga.c /^mch_suspend()$/
Xmch_windexit amiga.c /^mch_windexit(r)$/
Xmch_windinit amiga.c /^mch_windinit()$/
Xmch_write amiga.c /^mch_write(p, len)$/
Xmemmove alloc.c /^memmove(desti, source, len)$/
Xmemset vim.h /^# define memset(ptr, c, size) bsdmemset((ptr), (c)/
Xmktemp cmdline.c /^# define mktemp(a) tmpnam(a)$/
Xmkup regexp.c /^#define mkup(c) (reg_ic ? TO_UPPER(c) : (c))$/
Xmodname script.c /^modname(fname, ext)$/
Xmovemark mark.c /^movemark(count)$/
Xmsg message.c /^msg(s)$/
Xmsgmore misccmds.c /^msgmore(n)$/
Xmyregcomp search.c /^myregcomp(pat)$/
Xnextent termlib.c /^nextent(tbuf, termcap, buflen) \/* Read 1 e/
Xnextwild cmdline.c /^nextwild(buff, type)$/
XnofreeNULL alloc.c /^nofreeNULL(x)$/
Xnormal normal.c /^normal()$/
Xnr2ptr storage.c /^nr2ptr(nr)$/
Xonedown edit.c /^onedown(n)$/
Xoneleft edit.c /^oneleft()$/
Xonepage edit.c /^onepage(dir, count)$/
Xoneright edit.c /^oneright()$/
Xoneup edit.c /^oneup(n)$/
Xopenrecover script.c /^openrecover()$/
Xopenscript script.c /^openscript(name)$/
Xotherfile misccmds.c /^otherfile(s)$/
Xoutchar term.c /^outchar(c)$/
Xoutnum term.c /^outnum(n)$/
Xoutnuml term.c /^outnuml(n)$/
Xoutstr term.c /^outstr(s)$/
Xoutstrn term.c /^outstrn(s)$/
Xouttrans charset.c /^outtrans(str, len)$/
Xparam_expand param.c /^param_expand(i, dofree)$/
Xparamchanged param.c /^paramchanged(arg)$/
Xparse_builtin_tcap term.c /^parse_builtin_tcap(tc, s)$/
Xpchar macros.h /^#define pchar(lp, c) (*(nr2ptr((lp).lnum) + (lp).c/
XpcharCurpos misccmds.c /^pcharCurpos(c)$/
Xpeekchr regexp.c /^peekchr()$/
Xplines misccmds.c /^plines(p)$/
Xplines_m misccmds.c /^plines_m(first, last)$/
Xplural misccmds.c /^plural(n)$/
Xpos2ptr storage.c /^pos2ptr(pos)$/
Xpremsg normal.c /^premsg(c1, c2)$/
Xprep_redo normal.c /^prep_redo(num, cmd, c, nchar)$/
Xprintdigraph digraph.c /^printdigraph(p)$/
Xprt_line screen.c /^prt_line(s)$/
Xpstrcmp msdos.c /^pstrcmp(a, b)$/
Xptr2nr storage.c /^ptr2nr(ptr, start)$/
Xputcmdline cmdline.c /^putcmdline(c, buff)$/
Xputdigraph digraph.c /^putdigraph(str)$/
Xputescstr buffers.c /^putescstr(fd, str, set)$/
Xqf_adjustmark quickfix.c /^qf_adjustmark(old, new)$/
Xqf_clrallmarks quickfix.c /^qf_clrallmarks()$/
Xqf_free quickfix.c /^qf_free()$/
Xqf_init quickfix.c /^qf_init()$/
Xqf_jump quickfix.c /^qf_jump(errornr)$/
Xqf_list quickfix.c /^qf_list()$/
Xqf_types quickfix.c /^qf_types(c, nr)$/
Xread_redo buffers.c /^read_redo(init)$/
Xread_stuff buffers.c /^read_stuff(advance)$/
Xreadfile fileio.c /^readfile(fname, sfname, from, newfile)$/
Xredrawcmd cmdline.c /^redrawcmd()$/
Xredrawcmdline cmdline.c /^redrawcmdline()$/
Xredrawhelp help.c /^redrawhelp()$/
Xreg regexp.c /^reg(paren, flagp)$/
Xregatom regexp.c /^regatom(flagp)$/
Xregbranch regexp.c /^regbranch(flagp)$/
Xregc regexp.c /^regc(b)$/
Xregcomp regexp.c /^regcomp(exp)$/
Xregdump regexp.c /^regdump(r)$/
Xregexec regexp.c /^regexec(prog, string, at_bol)$/
Xreginsert regexp.c /^reginsert(op, opnd)$/
Xregmatch regexp.c /^regmatch(prog)$/
Xregnext regexp.c /^regnext(p)$/
Xregnode regexp.c /^regnode(op)$/
Xregoptail regexp.c /^regoptail(p, val)$/
Xregpiece regexp.c /^regpiece(flagp)$/
Xregprop regexp.c /^regprop(op)$/
Xregrepeat regexp.c /^regrepeat(p)$/
Xregsub regsub.c /^regsub(prog, source, dest, copy, magic)$/
Xregtail regexp.c /^regtail(p, val)$/
Xregtilde regsub.c /^regtilde(source, magic)$/
Xregtry regexp.c /^regtry(prog, string)$/
Xremove unix.c /^remove(buf)$/
Xrename unix.c /^rename(src, dest)$/
Xreplaceline storage.c /^replaceline(lnum, new)$/
Xresettitle amiga.c /^resettitle()$/
Xs_del screen.c /^s_del(row, nlines, invalid)$/
Xs_ins screen.c /^s_ins(row, nlines, invalid)$/
Xsamealtfile cmdline.c /^samealtfile(n)$/
Xsave_line storage.c /^save_line(src)$/
Xscreenalloc screen.c /^screenalloc(clear)$/
Xscreenchar screen.c /^screenchar(p, row, col)$/
Xscreenclear screen.c /^screenclear()$/
Xscreenclear2 screen.c /^screenclear2()$/
Xscreenfill screen.c /^screenfill(srow, c)$/
Xscreenline screen.c /^screenline(lnum, startrow, endrow)$/
Xscript_winsize script.c /^script_winsize()$/
Xscript_winsize_pp script.c /^script_winsize_pp()$/
Xscriptfullpath script.c /^scriptfullpath()$/
Xscrolldown screen.c /^scrolldown(nlines)$/
Xscrollup screen.c /^scrollup(nlines)$/
Xsearchc search.c /^searchc(c, dir, type, count)$/
Xsearchit search.c /^searchit(pos, dir, str, count, end)$/
Xset_Changed misccmds.c /^set_Changed()$/
Xset_indent misccmds.c /^set_indent(size, delete)$/
Xset_init param.c /^set_init()$/
Xset_keymap amiga.c /^set_keymap(name)$/
Xset_redo_ins buffers.c /^set_redo_ins()$/
Xset_term term.c /^set_term(term)$/
Xset_window msdos.c /^set_window()$/
Xset_winheight term.c /^set_winheight(height)$/
Xset_winsize term.c /^set_winsize(width, height, mustset)$/
Xsetaltfname cmdline.c /^setaltfname(arg, sarg, lnum, newfile)$/
Xsetcursor term.c /^setcursor()$/
Xsetfname misccmds.c /^setfname(s, ss)$/
Xsetmark mark.c /^setmark(c)$/
Xsetmarked storage.c /^setmarked(lnum)$/
Xsetpcmark mark.c /^setpcmark()$/
Xsetperm amiga.c /^setperm(name, perm)$/
Xsettitle amiga.c /^settitle(str)$/
Xsettmode term.c /^settmode(raw)$/
Xshift_line ops.c /^shift_line(left, round)$/
Xshowmap buffers.c /^showmap(mp)$/
Xshowmatch search.c /^showmatch()$/
Xshowmatches cmdline.c /^showmatches(file, len)$/
Xshowmode screen.c /^showmode()$/
Xshowonep param.c /^showonep(p)$/
Xshowparams param.c /^showparams(all)$/
Xshowruler screen.c /^showruler(always)$/
Xsig_winch unix.c /^sig_winch()$/
Xskip_chars search.c /^skip_chars(class, dir)$/
Xskipchr regexp.c /^skipchr()$/
Xskipspace misccmds.c /^skipspace(pp)$/
Xskiptodigit misccmds.c /^skiptodigit(pp)$/
Xskiptospace misccmds.c /^skiptospace(pp)$/
Xsleep amiga.c /^sleep(n)$/
Xsmsg message.c /^smsg(s, a1, a2, a3, a4, a5, a6, a7, a8, a9, a10)$/
Xsortcmp amiga.c /^sortcmp(a, b)$/
XstartPS search.c /^startPS(lnum, para)$/
Xstart_arrow edit.c /^start_arrow()$/
Xstart_msg message.c /^start_msg()$/
Xstart_redo buffers.c /^start_redo(count)$/
Xstart_redo_ins buffers.c /^start_redo_ins()$/
Xstart_stuff buffers.c /^start_stuff()$/
Xstartinmargin ops.c /^startinmargin()$/
Xstartinsert ops.c /^startinsert(initstr, startln, count)$/
Xstartscript script.c /^startscript()$/
Xstarttermcap term.c /^starttermcap()$/
Xstop_arrow edit.c /^stop_arrow()$/
Xstop_insert edit.c /^stop_insert()$/
Xstop_redo_ins buffers.c /^stop_redo_ins()$/
Xstopscript script.c /^stopscript()$/
Xstoptermcap term.c /^stoptermcap()$/
Xstrchr vim.h /^# define strchr(ptr, c) index((ptr), (c))$/
Xstrcspn regexp.c /^strcspn(s1, s2)$/
Xstrlowcpy msdos.c /^strlowcpy(d, s)$/
Xstrnfcpy regsub.c /^strnfcpy(f, d, s, n)$/
Xstrnsave alloc.c /^strnsave(string, len)$/
Xstrrchr vim.h /^# define strrchr(ptr, c) rindex((ptr), (c))$/
Xstrsave alloc.c /^strsave(string)$/
Xstrsize charset.c /^strsize(s)$/
XstuffReadbuff buffers.c /^stuffReadbuff(s)$/
Xstuff_empty buffers.c /^stuff_empty()$/
Xstuff_inserted edit.c /^stuff_inserted(c, count, no_esc)$/
Xstuff_yank ops.c /^stuff_yank(bufname, p)$/
XstuffcharReadbuff buffers.c /^stuffcharReadbuff(c)$/
XstuffnumReadbuff buffers.c /^stuffnumReadbuff(n)$/
Xswapchar ops.c /^swapchar(pos)$/
Xtermcapinit term.c /^termcapinit(term)$/
Xtgetent termlib.c /^tgetent(tbuf, term)$/
Xtgetflag termlib.c /^tgetflag(id)$/
Xtgetnum termlib.c /^tgetnum(id)$/
Xtgetstr termlib.c /^tgetstr(id, buf)$/
Xtgoto term.c /^tgoto(cm, x, y)$/
Xtinit termlib.c /^tinit(name)$/
Xtltoa term.c /^tltoa(i)$/
Xtputs termlib.c /^tputs(cp, affcnt, outc)$/
Xtranschar charset.c /^transchar(c)$/
Xttest term.c /^ttest(pairs)$/
Xu_clearall undo.c /^u_clearall()$/
Xu_clearline undo.c /^u_clearline()$/
Xu_freeentry undo.c /^u_freeentry(uep, n)$/
Xu_freelist undo.c /^u_freelist(uhp)$/
Xu_getbot undo.c /^u_getbot()$/
Xu_inssub undo.c /^u_inssub(lnum)$/
Xu_redo undo.c /^u_redo(count)$/
Xu_save undo.c /^u_save(top, bot)$/
Xu_saveCurpos undo.c /^u_saveCurpos()$/
Xu_savecommon undo.c /^u_savecommon(top, bot, nocopy, newbot)$/
Xu_savedel undo.c /^u_savedel(lnum, nlines)$/
Xu_saveline undo.c /^u_saveline(lnum)$/
Xu_savesub undo.c /^u_savesub(lnum)$/
Xu_sync undo.c /^u_sync()$/
Xu_undo undo.c /^u_undo(count)$/
Xu_undoline undo.c /^u_undoline()$/
Xu_undoredo undo.c /^u_undoredo()$/
Xungetchr regexp.c /^ungetchr()$/
Xunregc regexp.c /^unregc()$/
XupdateScreen screen.c /^updateScreen(type)$/
Xupdateline screen.c /^updateline()$/
Xupdatescript script.c /^updatescript(c)$/
Xusage main.c /^usage(n)$/
Xvgetc buffers.c /^vgetc()$/
Xvgetorpeek buffers.c /^vgetorpeek(advance)$/
Xvim_chdir msdos.c /^vim_chdir(path)$/
Xvim_delay amiga.c /^vim_delay()$/
Xvim_remove msdos.c /^vim_remove(name)$/
Xvimgetenv amiga.c /^vimgetenv(var)$/
Xvpeekc buffers.c /^vpeekc()$/
Xwait_return message.c /^wait_return(redraw)$/
Xwin_resize_off amiga.c /^win_resize_off()$/
Xwin_resize_on amiga.c /^win_resize_on()$/
Xwindgoto term.c /^windgoto(row, col)$/
Xwrite_buf fileio.c /^write_buf(fd, buf, len)$/
Xwriteit fileio.c /^writeit(fname, sfname, start, end, append, forceit/
END_OF_FILE
if test 20073 -ne `wc -c <'vim/src/tags'`; then
echo shar: \"'vim/src/tags'\" unpacked with wrong size!
fi
chmod +x 'vim/src/tags'
# end of 'vim/src/tags'
fi
echo shar: End of archive 9 \(of 25\).
cp /dev/null ark9isdone


MISSING=""
for I in 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 ; do
if test ! -f ark${I}isdone ; then
MISSING="${MISSING} ${I}"
fi
done
if test "${MISSING}" = "" ; then
echo You have unpacked all 25 archives.
rm -f ark[1-9]isdone ark[1-9][0-9]isdone
else
echo You still need to unpack the following archives:
echo " " ${MISSING}
fi
## End of shell archive.
exit 0

===============================================================================

Bram Moolenaar

unread,
Dec 20, 1993, 10:44:00 PM12/20/93
to
Submitted-by: mo...@oce.nl (Bram Moolenaar)
Posting-number: Volume 41, Issue 54
Archive-name: vim/part04

Environment: UNIX, AMIGA, MS-DOS
Supersedes: vim: Volume 37, Issue 1-24

#! /bin/sh


# This is a shell archive. Remove anything before this line, then unpack
# it by saving it into a file and typing "sh file". To overwrite existing
# files, type "sh file -c". You can also feed this as standard input via
# unshar, or by typing "sh <file", e.g.. If this archive is complete, you
# will see the following message at the end:

# "End of archive 4 (of 25)."
# Contents: vim/doc/vim_man.uue vim/src/globals.h
# vim/src/makefile.manx vim/src/makefile.sas vim/src/tag.c
# vim/src/vim.h
# Wrapped by mool@oce-rd2 on Wed Dec 15 09:50:04 1993


PATH=/bin:/usr/bin:/usr/ucb ; export PATH

if test -f 'vim/doc/vim_man.uue' -a "${1}" != "-c" ; then
echo shar: Will not clobber existing file \"'vim/doc/vim_man.uue'\"
else
echo shar: Extracting \"'vim/doc/vim_man.uue'\" \(9655 characters\)
sed "s/^X//" >'vim/doc/vim_man.uue' <<'END_OF_FILE'
X
Xbegin 644 vim.man
XM"@I624TH,2D@("`@("`@("`@("`@("`@("`@("`@("`@(%5315(@0T]-34%.<
XM1%,@("`@("`@("`@("`@("`@("`@("`@("`@("!624TH,2D*"@I."$X(3D$(&
XM00A!30A-"$U%"$4(10H@("`@('9I;2`M(%9I($E-<')O=F5D+"!A('!R;V=R_
XM86UM97)S('1E>'0@961I=&]R"@I3"%,(4UD(60A93@A."$Y/"$\(3U`(4`A0`
XM4PA3"%-)"$D(25,(4PA3"B`@("`@=@AV"'9I"&D(:6T(;0AM(%MO<'1I;VYS"
XM72!;9FEL92`N+ET*("`@("!V"'8(=FD(:0AI;0AM"&T@6V]P=&EO;G-=("UTT
XM('1A9PH@("`@('8(=@AV:0AI"&EM"&T(;2!;;W!T:6]N<UT@*UMC;VUM86YD#
XM72!F:6QE("XN"B`@("`@=@AV"'9I"&D(:6T(;0AM(%MO<'1I;VYS72`M8R![&
XM8V]M;6%N9'T@9FEL92`N+@H@("`@('8(=@AV:0AI"&EM"&T(;2!;;W!T:6]NJ
XM<UT@+64@6V5R<F]R9FEL95T*"D0(1`A$10A%"$53"%,(4T,(0PA#4@A2"%))D
XM"$D(25`(4`A05`A4"%1)"$D(24\(3PA/3@A."$X*("`@("!6"%8(5FD(:0AI7
XM;0AM"&T@:7,@82!T97AT(&5D:71O<B!T:&%T(&ES('5P=V%R9',@8V]M<&%TW
XM:6)L92!T;R!V:2X@270@8V%N(&)E('5S960@('1O"B`@("`@961I="!A;GD@N
XM05-#24D@=&5X="X@270@:7,@97-P96-I86QL>2!U<V5F=6P@9F]R(&5D:71IJ
XM;F<@<')O9W)A;7,N"@H@("`@(%1H97)E(&%R92!A(&QO="!O9B!E;FAA;F-EI
XM;65N=',@86)O=F4@=FDZ(&UU;'1I(&QE=F5L('5N9&\L(&-O;6UA;F0@(&QIF
XM;F4*("`@("!E9&ET:6YG+"`@(&9I;&5N86UE("`@8V]M<&QE=&EO;BP@(&]N1
XM("!L:6YE("!H96QP+"`@<75O=&EN9RP@(&5T8RXN("!296%D"B`@("`@9&EFA
XM9F5R96YC92YD;V,@9F]R(&$@<W5M;6%R>2!O9B!T:&4@9&EF9F5R96YC97,@F
XM8F5T=V5E;B!V:2!A;F0@5FEM+@H*("`@("!-;W-T(&]F=&5N(%8(5@A6:0AI5
XM"&EM"&T(;2!I<R!S=&%R=&5D('1O(&5D:70@82!S:6YG;&4@9FEL92!W:71HC
XM('1H92!C;VUM86YD"@H@("`@("`@("`@=FEM(&9I;&4*"B`@("`@36]R92!G.
XM96YE<F%L;'D@5DE-(&ES('-T87)T960@=VET:#H*"B`@("`@("`@("!V:6T@1
XM6V]P=&EO;G-=(%MF:6QE;&ES=%T*"B`@("`@268@=&AE(&9I;&5L:7-T(&EST
XM(&UI<W-I;F<L('1H92!E9&ET;W(@=VEL;"!S=&%R="!W:71H(&%N("!E;7!TU
XM>2`@8G5F9F5R+@H@("`@($]T:&5R=VES92!E>&%C=&QY(&]N92!O=70@;V8@.
XM=&AE(&9O;&QO=VEN9R!F;W5R(&UA>2!B92!U<V5D('1O(&-H;V]S92!O;F4*]
XM("`@("!O<B!M;W)E(&9I;&5S('1O(&)E(&5D:71E9"X*"B`@("`@9FEL92`N0
XM+B`@("`@02!L:7-T(&]F(&9I;&4@;F%M97,N(%1H92!F:7)S="!O;F4@*&%L"
XM<&AA8F5T:6-A;&QY*2!W:6QL("!B90H@("`@("`@("`@("`@("`@('1H92!CH
XM=7)R96YT(&9I;&4@86YD(')E860@:6YT;R!T:&4@8G5F9F5R+B!4:&4@8W5R=
XM<V]R('=I;&P@8F4*("`@("`@("`@("`@("`@("!P;W-I=&EO;F5D(&]N('1HT
XM92!F:7)S="!L:6YE(&]F('1H92!B=69F97(N(%EO=2`@8V%N("!G970@('1O%
XM"B`@("`@("`@("`@("`@("`@=&AE(&]T:&5R(&9I;&5S('=I=&@@=&AE("(Z9
XM;F5X="(@8V]M;6%N9"X*"B`@("`@*UMN=6U=(&9I;&4@+BX*("`@("`@("`@;
XM("`@("`@("!386UE(&%S('1H92!A8F]V92P@8G5T('1H92!C=7)S;W(@=VELJ
XM;"!B92!P;W-I=&EO;F5D(&]N("!L:6YE"B`@("`@("`@("`@("`@("`@(FYU%
XM;2(N("!)9B`B;G5M(B!I<R!M:7-S:6YG+"!T:&4@8W5R<V]R('=I;&P@8F4@@
XM<&]S:71I;VYE9"!O;@H@("`@("`@("`@("`@("`@('1H92!L87-T(&QI;F4NP
XM"@H@("`@("LO<&%T(&9I;&4@+BX*("`@("`@("`@("`@("`@("!386UE(&%SS
XM('1H92!A8F]V92P@8G5T('1H92!C=7)S;W(@=VEL;"!B92!P;W-I=&EO;F5DA
XM("!O;B`@=&AE"B`@("`@("`@("`@("`@("`@9FER<W0@("!O8V-U<G)E;F-EY
XM("`@;V8@("`B<&%T(B`@:6X@('1H92`@8W5R<F5N="`@9FEL92`@*'-E90H@H
XM("`@("`@("`@("`@("`@(')E9F5R96YC92YD;V,L('-E8W1I;VX@(G!A='1ET
XM<FX@<V5A<F-H97,B(&9O<B`@=&AE("!A=F%I;&%B;&4*("`@("`@("`@("`@#
XM("`@("!S96%R8V@@<&%T=&5R;G,I+@H*("`@("`K>V-O;6UA;F1](&9I;&4@4
XM+BX*"B`@("`@+6,@>V-O;6UA;F1](&9I;&4@+BX*("`@("`@("`@("`@("`@]
XM("!386UE(&%S('1H92!A8F]V92P@8G5T('MC;VUM86YD?2!W:6QL(&)E(&5X2
XM96-U=&5D("!A9G1E<B`@=&AE"B`@("`@("`@("`@("`@("`@9FEL92`@:&%S3
XM("!B965N("!R96%D+B`@>V-O;6UA;F1]("!I<R`@:6YT97)P<F5T960@(&%S1
XM("!A;B!%>`H@("`@("`@("`@("`@("`@(&-O;6UA;F0N($EF('1H92![8V]MM
XM;6%N9'T@8V]N=&%I;G,@<W!A8V5S(&ET(&UU<W0@8F4@96YC;&]S960*("`@?
XM("`@("`@("`@("`@("!I;B`@9&]U8FQE("!Q=6]T97,@("AT:&ES(&1E<&5N_
XM9',@;VX@=&AE('-H96QL('1H870@:7,@=7-E9"DN"B`@("`@("`@("`@("`@L
XM("`@17AA;7!L93H@5FEM("(K<V5T('-I(B!M86EN+F,*"@H*"B`@("`@("`@1
XM("`@("`@("`@("`@("`@("`@("`@("`@,C@@36%R8V@@,3DY,B`@("`@("`@J
XM("`@("`@("`@("`@("`@("`@("`@("`@,0H*#`H*5DE-*#$I("`@("`@("`@S
XM("`@("`@("`@("`@("`@("!54T52($-/34U!3D13("`@("`@("`@("`@("`@Q
XM("`@("`@("`@("`@5DE-*#$I"@H*("`@("`M="![=&%G?2`@("!4:&4@9FEL=
XM92!T;R!E9&ET(&%N9"!T:&4@:6YI=&EA;"!C=7)S;W(@<&]S:71I;VX@9&5P8
XM96YD<R!O;B!A"B`@("`@("`@("`@("`@("`@(G1A9R(L("!A("!S;W)T(&]F<
XM(&=O=&\@;&%B96PN('MT86=](&ES(&QO;VME9"!U<"!I;B!T:&4@=&%G<PH@K
XM("`@("`@("`@("`@("`@(&9I;&4L('1H92!A<W-O8VEA=&5D(&9I;&4@8F5CW
XM;VUE<R!T:&4@8W5R<F5N="`@9FEL92`@86YD("!T:&4*("`@("`@("`@("`@6
XM("`@("!A<W-O8VEA=&5D("!C;VUM86YD("!I<R`@97AE8W5T960N("!-;W-TC
XM;'D@=&AI<R!I<R!U<V5D(&9O<B!#"B`@("`@("`@("`@("`@("`@<')O9W)A)
XM;7,N('MT86=]('1H96X@<VAO=6QD(&)E(&$@9G5N8W1I;VX@;F%M92X@5&AE^
XM(&5F9F5C="!I<PH@("`@("`@("`@("`@("`@('1H870@('1H92`@9FEL92`@%
XM8V]N=&%I;FEN9R!T:&%T(&9U;F-T:6]N(&)E8V]M97,@=&AE(&-U<G)E;G0*-
XM("`@("`@("`@("`@("`@("!F:6QE(&%N9"!T:&4@(&-U<G-O<B`@:7,@('!O-
XM<VET:6]N960@(&]N("!T:&4@('-T87)T("!O9B`@=&AE"B`@("`@("`@("`@K
XM("`@("`@9G5N8W1I;VX@*'-E92!R969E<F5N8V4N9&]C+"!S96-T:6]N(")T5
XM86<@<V5A<F-H97,B*2X*"B`@("`@+64@6V5R<F]R9FEL95T*("`@("`@("`@!
XM("`@("`@("!3=&%R="!I;B!Q=6EC:T9I>"!M;V1E+B!4:&4@9FEL92!;97)RA
XM;W)F:6QE72!I<R!R96%D(&%N9"`@=&AE"B`@("`@("`@("`@("`@("`@9FER5
XM<W0@(&5R<F]R(&ES(&1I<W!L87EE9"X@268@6V5R<F]R9FEL95T@:7,@;VUIL
XM='1E9"!T:&4@9FEL90H@("`@("`@("`@("`@("`@(&YA;64@:7,@;V)T86ENV
XM960@9G)O;2!T:&4@("=E<G)O<F9I;&4G("!O<'1I;VX@("AD969A=6QT<R`@O
XM=&\*("`@("`@("`@("`@("`@("`B07IT96-#+D5R<B(@(&9O<B`@=&AE("!!K
XM;6EG82P@(")E<G)O<G,B("!O;B`@;W1H97(@<WES=&5M<RDN"B`@("`@("`@#
XM("`@("`@("`@1G5R=&AE<B!E<G)O<G,@8V%N(&)E(&IU;7!E9"!T;R!W:71HZ
XM('1H92`B.F-N(B`@8V]M;6%N9"X@(%-E90H@("`@("`@("`@("`@("`@(')E[
XM9F5R96YC92YD;V,@<V5C=&EO;B`U+C4N"@I/"$\(3U`(4`A05`A4"%1)"$D(V
XM24\(3PA/3@A."$Y3"%,(4PH@("`@(%1H92!O<'1I;VYS+"!I9B!P<F5S96YT\
XM+"!M=7-T('!R96-E9&4@=&AE(&9I;&5L:7-T+B!4:&4@(&]P=&EO;G,@(&UAS
XM>2`@8F4*("`@("!G:79E;B!I;B!A;GD@;W)D97(N"@H@("`@("UR("`@("`@?
XM("`@(%)E8V]V97)Y(&UO9&4N(%1H92!A=71O<V-R:7!T("!F:6QE("!I<R`@M
XM<F5A9"`@=&\@(')E8V]V97(@(&$*("`@("`@("`@("`@("`@("!C<F%S:&5D:
XM(&5D:71I;F<@<V5S<VEO;BX@270@:&%S(&%L;6]S="!T:&4@<V%M92!E9F9E<
XM8W0@87,@(BUS"B`@("`@("`@("`@("`@("`@9FEL92YV:6TB+B`@4V5E("!R0
XM969E<F5N8V4N9&]C+"`@8VAA<'1E<B`@(E)E8V]V97)Y("!A9G1E<B`@80H@"
XM("`@("`@("`@("`@("`@(&-R87-H(BX*"B`@("`@+78@("`@("`@("`@5FEE<
XM=R!M;V1E+B!4:&4@)W)E861O;FQY)R!O<'1I;VX@=VEL;"!B92!S970N(%EOQ
XM=2`@8V%N("!S=&EL;`H@("`@("`@("`@("`@("`@(&5D:70@('1H92`@8G5F=
XM9F5R+"`@8G5T("!W:6QL("!B92`@<')E=F5N=&5D("!F<F]M(&%C8VED96YT/
XM86P*("`@("`@("`@("`@("`@("!O=F5R=W)I=&EN9R!A(&9I;&4N($EF('EO]
XM=2!D;R!W86YT('1O(&]V97)W<FET92!A("!F:6QE+"`@861D"B`@("`@("`@,
XM("`@("`@("`@86X@(&5X8VQA;6%T:6]N("!M87)K("!T;R`@=&AE("!%>"`@0
XM8V]M;6%N9"P@87,@:6X@(CIW(2(N(%1H90H@("`@("`@("`@("`@("`@("=R>
XM96%D;VYL>2<@(&]P=&EO;B`@8V%N("!B92`@<F5S970@('=I=&@@("(Z<V5TL
XM("!N;W)O(B`@("AS964*("`@("`@("`@("`@("`@("!R969E<F5N8V4N9&]CB
XM+"!O<'1I;VYS(&-H87!T97(I+@H*("`@("`M8B`@("`@("`@("!":6YA<GDN,
XM($$@9F5W(&]P=&EO;G,@=VEL;"!B92!S970@=&AA="!M86ME<R!I="`@<&]SK
XM<VEB;&4@('1O"B`@("`@("`@("`@("`@("`@961I="!A(&)I;F%R>2!O<B!EN
XM>&5C=71A8FQE(&9I;&4N"@H@("`@("UX("`@("`@("`@("A!;6EG82!O;FQYM
XM*2!6:6T@:7,@;F]T(')E<W1A<G1E9"!T;R!O<&5N(&$@;F5W('=I;F1O=RX@6
XM(%1H:7,*("`@("`@("`@("`@("`@("!O<'1I;VX@('-H;W5L9"!B92!U<V5D"
XM('=H96X@5FEM(&ES(&5X96-U=&5D(&)Y(&$@<')O9W)A;2!T:&%T"B`@("`@@
XM("`@("`@("`@("`@=VEL;"!W86ET(&9O<B!T:&4@961I="!S97-S:6]N('1O"
XM("!F:6YI<V@@("AE+F<N("!M86EL*2X@(%1H90H@("`@("`@("`@("`@("`@V
XM("(Z<V@B(&%N9"`B.B$B(&-O;6UA;F1S('=I;&P@;F]T('=O<FLN"@H@("`@K
XM("UN("`@("`@("`@($YO(&%U=&]S8W)I<'0@9FEL92!W:6QL(&)E('=R:71T_
XM96XN(%)E8V]V97)Y("!A9G1E<B`@82`@8W)A<V@*("`@("`@("`@("`@("`@>
XM("!W:6QL("!B92`@:6UP;W-S:6)L92X@($AA;F1Y("!I9B!Y;W4@=V%N="!T2
XM;R!E9&ET(&$@9FEL92!O;B!A"B`@("`@("`@("`@("`@("`@=F5R>2!S;&]W)
XM(&UE9&EU;2`H92YG+B!F;&]P<'DI+B!#86X@86QS;R!B92!D;VYE("!W:71H,
XM("`B.G-E=`H@("`@("`@("`@("`@("`@('5C/3`B+@H*("`@("`M<R![<V-R>
XM:7!T:6Y]"B`@("`@("`@("`@("`@("`@5&AE('-C<FEP="!F:6QE('MS8W)IM
XM<'1I;GT@:7,@<F5A9"X@(%1H92`@8VAA<F%C=&5R<R`@:6X@('1H90H@("`@!
XM("`@("`@("`@("`@(&9I;&4@(&%R92`@:6YT97)P<F5T960@87,@:68@>6]U^
XM(&AA9"!T>7!E9"!T:&5M+B!4:&4@<V%M92!C86X*("`@("`@("`@("`@("`@2
XM("!B92!D;VYE('=I=&@@=&AE(&-O;6UA;F0@(CIS;W5R8V4A('MS8W)I<'1I0
XM;GTB+B!)9B!T:&4@96YD(&]F"B`@("`@("`@("`@("`@("`@=&AE("`@9FEL]
XM92`@:7,@(')E86-H960@(&)E9F]R92`@=&AE("!E9&ET;W(@(&5X:71S+"`@A
XM9G5R=&AE<@H@("`@("`@("`@("`@("`@(&-H87)A8W1E<G,@87)E(')E860@^
XM9G)O;2!T:&4@:V5Y8F]A<F0N"@H@("`@("UW('MS8W)I<'1O=71]"B`@("`@[
XM("`@("`@("`@("`@06QL('1H92!C:&%R86-T97)S('1H870@>6]U('1Y<&4@*
XM87)E("!R96-O<F1E9"`@:6X@('1H92`@9FEL90H@("`@("`@("`@("`@("`@"
XM('MS8W)I<'1O=71]+"`@=6YT:6P@('EO=2!E>&ET(%9)32X@5&AI<R!I<R!U7
XM<V5F=6P@:68@>6]U('=A;G0*"@H@("`@("`@("`@("`@("`@("`@("`@("`@C
XM("`@("`@(#(X($UA<F-H(#$Y.3(@("`@("`@("`@("`@("`@("`@("`@("`@J
XM("`@("`@(#(*"@P*"E9)32@Q*2`@("`@("`@("`@("`@("`@("`@("`@("`@T
XM55-%4B!#3TU-04Y$4R`@("`@("`@("`@("`@("`@("`@("`@("`@(%9)32@Q6
XM*0H*"B`@("`@("`@("`@("`@("`@=&\@8W)E871E("!A("!S8W)I<'0@(&9IC
XM;&4@('1O("!B92`@=7-E9"`@=VET:"`@(G9I;2`@+7,B("!O<@H@("`@("`@C
XM("`@("`@("`@("(Z<V]U<F-E(2(N"@H@("`@("U4('1E<FUI;F%L(%1E;&QSS
XM(%9I;2!T:&4@;F%M92!O9B!T:&4@=&5R;6EN86P@>6]U(&%R92!U<VEN9RX@I
XM4VAO=6QD(&)E(&$*("`@("`@("`@("`@("`@("!T97)M:6YA;"`@:VYO=VX@J
XM('1O("!6:6T@("AB=6EL=&EN*2!O<B!D969I;F5D(&EN('1H92!T97)M8V%P+
XM"B`@("`@("`@("`@("`@("`@9FEL92X*"B`@("`@+60@9&5V:6-E("`@3W!E1
XM;B`B9&5V:6-E(B!F;W(@=7-E(&%S("!A("!T97)M:6YA;"X@($]N;'D@(&]NT
XM("!T:&4@($%M:6=A+@H@("`@("`@("`@("`@("`@($5X86UP;&4Z("`B+60@1
XM8V]N.C(P+S,P+S8P,"\Q-3`B+@H*4PA3"%-%"$4(144(10A%($$(00A!3`A,V
XM"$Q3"%,(4T\(3PA/"B`@("`@5FEM("!D;V-U;65N=&%T:6]N.B`@4F5F97)E]
XM;F-E+F1O8RP@(&EN9&5X+"`@(&1I9F9E<F5N8V4N9&]C+"`@('5N:7@N9&]C-
XM+`H@("`@('9I;2YH;'`N"@I!"$$(054(50A55`A4"%1("$@(2$\(3PA/4@A25
XM"%(*("`@("!-;W-T(&]F(%9)32!W87,@;6%D92!B>2!"<F%M($UO;VQE;F%AS
XM<BX*("`@("!624T@:7,@8F%S960@;VX@4W1E=FEE+"!W;W)K960@;VX@8GDZH
XM(%1I;2!4:&]M<'-O;BP@5&]N>2!!;F1R97=S(&%N9"!'+E(N"B`@("`@*$9R>
XM960I(%=A;'1E<@H*0@A""$)5"%4(54<(1PA'4PA3"%,*("`@("!0<F]B86)L4
XM>2X*"@H*"@H*"@H*"@H*"@H*"@H*"@H*"@H*"@H*"@H*"@H*"@H*"B`@("`@#
XM("`@("`@("`@("`@("`@("`@("`@("`@("`@,C@@36%R8V@@,3DY,B`@("`@J
X>("`@("`@("`@("`@("`@("`@("`@("`@("`@,PH*G
X``
Xend
Xsize 6870
END_OF_FILE
if test 9655 -ne `wc -c <'vim/doc/vim_man.uue'`; then
echo shar: \"'vim/doc/vim_man.uue'\" unpacked with wrong size!
fi
chmod +x 'vim/doc/vim_man.uue'
# end of 'vim/doc/vim_man.uue'
fi
if test -f 'vim/src/globals.h' -a "${1}" != "-c" ; then
echo shar: Will not clobber existing file \"'vim/src/globals.h'\"
else
echo shar: Extracting \"'vim/src/globals.h'\" \(9305 characters\)
sed "s/^X//" >'vim/src/globals.h' <<'END_OF_FILE'


X/* vi:ts=4:sw=4
X *
X * VIM - Vi IMproved
X *
X * Code Contributions By: Bram Moolenaar mo...@oce.nl
X * Tim Thompson twitch!tjt
X * Tony Andrews onecom!wldrdg!tony
X * G. R. (Fred) Walter watmath!watcgl!grwalter
X */
X
X/*

X * definition of global variables
X *
X * EXTERN is only defined in main.c (and in param.h)
X */
X
X#ifndef EXTERN
X# define EXTERN extern
X# define INIT(x)
X#else
X# ifndef INIT
X# define INIT(x) x
X# endif
X#endif
X
X/*
X * Number of Rows and Columns in the current window.
X * Must be long to be able to use them as options in param.c.
X */
XEXTERN long Rows; /* currently used nr. of rows */
XEXTERN long Columns;
XEXTERN long Rows_max; /* maximal physical nr. of rows */
X
XEXTERN char *Filename INIT(= NULL); /* Current file name */
XEXTERN char *sFilename INIT(= NULL); /* Filename without path */
XEXTERN char *xFilename INIT(= NULL); /* Filename maybe without path */
X
XEXTERN linenr_t Topline; /* number of the line at the top of the screen */
XEXTERN linenr_t Botline; /* number of the line below the bottom of the
X * screen */
XEXTERN int redraw_msg INIT(= TRUE);
X /* TRUE when "insert mode" needs updating */
XEXTERN int emptyrows INIT(= 0); /* number of '~' rows on screen */
XEXTERN linenr_t line_count; /* current number of lines in the file */
X
XEXTERN FPOS Curpos; /* current position of the cursor */
X
XEXTERN int Curscol; /* Current position of cursor (column) */
XEXTERN int Cursrow; /* Current position of cursor (row) */
X
XEXTERN int Cursvcol; /* Current virtual column, the column number
X * of the file's actual line, as opposed to
X * the column number we're at on the screen.
X * This makes a difference on lines that span
X * more than one screen line. */
X
XEXTERN colnr_t Curswant INIT(= 0); /* The column we'd like to be at. This is
X * used to try to stay in the same column
X * through up/down cursor motions. */
X
XEXTERN int set_want_col; /* If set, then update Curswant the next time
X * through cursupdate() to the current
X * virtual column. */
X
XEXTERN int cmdoffset INIT(= 0); /* offset for command line position */
XEXTERN int ru_col; /* column for ruler */
XEXTERN int sc_col; /* column for shown command */
X
XEXTERN int char_count; /* number of characters sent to screen */
X
XEXTERN int starting INIT(= TRUE);
X /* set to FALSE when starting up finished */
XEXTERN int exiting INIT(= FALSE);
X /* set to TRUE when abandoning Vim */
X
XEXTERN int secure INIT(= FALSE);
X /* set to TRUE when only "safe" commands are
X * allowed, e.g. when sourcing .exrc or .vimrc
X * in current directory */
X
XEXTERN FPOS Visual; /* start position of Visual
X * (Visual.lnum == 0 when not active) */
XEXTERN int Visual_block INIT(= FALSE);
X /* Visual is blockwise */
X
XEXTERN FPOS Insstart; /* This is where the latest insert/append
X * mode started. */
X
X/*
X * This flag is used to make auto-indent work right on lines where only a
X * <RETURN> or <ESC> is typed. It is set when an auto-indent is done, and
X * reset when any other editting is done on the line. If an <ESC> or <RETURN>
X * is received, and did_ai is TRUE, the line is truncated.
X */
XEXTERN int did_ai INIT(= FALSE);
X
X/*
X * This flag is set when a smart indent has been performed. When the next typed
X * character is a '{' the inserted tab will be deleted again.
X */
XEXTERN int did_si INIT(= FALSE);
X
X/*
X * This flag is set after an auto indent. If the next typed character is a '}'
X * one indent character will be removed.
X */
XEXTERN int can_si INIT(= FALSE);
X
XEXTERN int old_indent INIT(= 0); /* for ^^D command in insert mode */
X
X/*
X * This flag is set after doing a reverse replace in column 0.
X * An extra space has been inserted in column 0.
X */
XEXTERN int extraspace INIT(= FALSE);
X
XEXTERN int State INIT(= NORMAL); /* This is the current state of the command
X * interpreter. */
X
XEXTERN int Recording INIT(= FALSE);/* TRUE when recording into a register */
XEXTERN int Exec_reg INIT(= FALSE); /* TRUE when executing a register */
X
XEXTERN int Changed INIT(= FALSE); /* Set to TRUE if something in the file has
X * been changed and not written out. */
X
XEXTERN int NotEdited INIT(= FALSE);/* Set to TRUE with ":file xxx" command,
X * reset when file is written out. */
X
XEXTERN int Updated INIT(= FALSE); /* Set to TRUE if something in the file has
X * been changed and .vim not flushed yet */
X
XEXTERN int did_cd INIT(= FALSE); /* TRUE when :cd dir used */
XEXTERN int no_abbr INIT(= TRUE); /* TRUE when no abbreviations loaded */
X
X
XEXTERN char *IObuff; /* sprintf's are done into this buffer */
X
XEXTERN int RedrawingDisabled INIT(= FALSE);
X /* Set to TRUE if doing :g */
X#ifndef MSDOS
XEXTERN int thisfile_sn INIT(= FALSE); /* this file uses shortname */
X#endif
X
XEXTERN int readonlymode INIT(= FALSE); /* Set to TRUE for "view" */
XEXTERN int recoverymode INIT(= FALSE); /* Set to TRUE for "-r" option */
X
XEXTERN int KeyTyped; /* TRUE if user typed the character */
XEXTERN int must_redraw INIT(= 0); /* type of redraw necessary */
X
XEXTERN char **files INIT(= NULL); /* list of input files */
XEXTERN int numfiles INIT(= 0); /* number of input files */
XEXTERN int curfile INIT(= 0); /* number of the current file */
XEXTERN int files_exp INIT(= FALSE); /* *files must be freed */
X#define NSCRIPT 15
XEXTERN FILE *scriptin[NSCRIPT]; /* streams to read script from */
XEXTERN int curscript INIT(= 0); /* index in scriptin[] */
XEXTERN FILE *scriptout INIT(= NULL); /* stream to write script to */
X
XEXTERN int got_int INIT(= FALSE); /* set to TRUE when interrupt
X signal occurred */
XEXTERN int term_console INIT(= FALSE); /* set to TRUE when Amiga window used */
XEXTERN int termcap_active INIT(= FALSE); /* set to TRUE by starttermcap() */
XEXTERN int bangredo INIT(= FALSE); /* set to TRUE whith ! command */
XEXTERN int searchcmdlen; /* length of previous search command */
XEXTERN int did_outofmem_msg INIT(= FALSE); /* set after out of memory msg */
X
X#ifdef DEBUG
XEXTERN FILE *debugfp INIT(=NULL);
X#endif
X
Xextern char *Version; /* this is in version.c */
Xextern char *longVersion; /* this is in version.c */
X
X/*
X * The error messages that can be shared are included here.
X * Excluded are very specific errors and debugging messages.
X */
XEXTERN char e_abbr[] INIT(="No such abbreviation");
XEXTERN char e_abort[] INIT(="Command aborted");
XEXTERN char e_ambmap[] INIT(="Ambiguous mapping");
XEXTERN char e_argreq[] INIT(="Argument required");
XEXTERN char e_curdir[] INIT(="Command not allowed from from .exrc/.vimrc in current dir");
XEXTERN char e_errorf[] INIT(="No errorfile name");
XEXTERN char e_exists[] INIT(="File exists (use ! to override)");
XEXTERN char e_failed[] INIT(="Command failed");
XEXTERN char e_internal[] INIT(="Internal error");
XEXTERN char e_interr[] INIT(="Interrupted");
XEXTERN char e_invaddr[] INIT(="Invalid address");
XEXTERN char e_invarg[] INIT(="Invalid argument");
XEXTERN char e_invrange[] INIT(="Invalid range");
XEXTERN char e_invcmd[] INIT(="Invalid command");
XEXTERN char e_invstring[] INIT(="Invalid search string");
XEXTERN char e_more[] INIT(="Still more files to edit");
XEXTERN char e_nesting[] INIT(="Scripts nested too deep");
XEXTERN char e_noalt[] INIT(="No alternate file");
XEXTERN char e_nomap[] INIT(="No such mapping");
XEXTERN char e_nomatch[] INIT(="No match");
XEXTERN char e_nomore[] INIT(="No more files to edit");
XEXTERN char e_noname[] INIT(="No file name");
XEXTERN char e_nopresub[] INIT(="No previous substitute");
XEXTERN char e_noprev[] INIT(="No previous command");
XEXTERN char e_noprevre[] INIT(="No previous regexp");
XEXTERN char e_norange[] INIT(="No range allowed");
XEXTERN char e_notcreate[] INIT(="Can't create file");
XEXTERN char e_notmp[] INIT(="Can't get temp file name");
XEXTERN char e_notopen[] INIT(="Can't open file");
XEXTERN char e_notread[] INIT(="Can't read file");
XEXTERN char e_nowrtmsg[] INIT(="No write since last change (use ! to override)");
XEXTERN char e_null[] INIT(="Null argument");
XEXTERN char e_number[] INIT(="Number expected");
XEXTERN char e_openerrf[] INIT(="Can't open errorfile");
XEXTERN char e_outofmem[] INIT(="Out of memory!");
XEXTERN char e_patnotf[] INIT(="Pattern not found");
XEXTERN char e_positive[] INIT(="Argument must be positive");
XEXTERN char e_quickfix[] INIT(="No errorfile; use :cf");
XEXTERN char e_re_damg[] INIT(="Damaged match string");
XEXTERN char e_re_corr[] INIT(="Corrupted regexp program");
XEXTERN char e_readonly[] INIT(="File is readonly");
XEXTERN char e_readerrf[] INIT(="Error while reading errorfile");
XEXTERN char e_scroll[] INIT(="Invalid scroll size");
XEXTERN char e_toocompl[] INIT(="Command too complex");
XEXTERN char e_toombra[] INIT(="Too many (");
XEXTERN char e_toomket[] INIT(="Too many )");
XEXTERN char e_toomsbra[] INIT(="Too many [");
XEXTERN char e_toolong[] INIT(="Command too long");
XEXTERN char e_toomany[] INIT(="Too many file names");
XEXTERN char e_trailing[] INIT(="Trailing characters");
XEXTERN char e_umark[] INIT(="Unknown mark");
XEXTERN char e_unknown[] INIT(="Unknown");
XEXTERN char e_write[] INIT(="Error while writing");
XEXTERN char e_zerocount[] INIT(="Zero count");
END_OF_FILE
if test 9305 -ne `wc -c <'vim/src/globals.h'`; then
echo shar: \"'vim/src/globals.h'\" unpacked with wrong size!
fi
chmod +x 'vim/src/globals.h'
# end of 'vim/src/globals.h'
fi
if test -f 'vim/src/makefile.manx' -a "${1}" != "-c" ; then
echo shar: Will not clobber existing file \"'vim/src/makefile.manx'\"
else
echo shar: Extracting \"'vim/src/makefile.manx'\" \(8112 characters\)
sed "s/^X//" >'vim/src/makefile.manx' <<'END_OF_FILE'
X#
X# Makefile for VIM on the Amiga, using Aztec/Manx C 5.0 or later
X#
X# Note: not all dependencies are included. This was done to avoid having
X# to compile everything when a global variable or function is added


X#
X
X#>>>>> choose options:
X### -DDIGRAPHS digraph support (at the cost of 1.6 Kbyte code)
X### -DNO_ARP do not use arp.library, DOS 2.0 required
X### -DCOMPATIBLE start in vi-compatible mode
X### -DNOBACKUP default is no backup file
X### -DDEBUG output a lot of debugging garbage
X### -DTERMCAP include termcap file support
X### -DNO_BUILTIN_TCAPS do not include builtin termcap entries
X### (use only with -DTERMCAP)
X### -DSOME_BUILTIN_TCAPS include most useful builtin termcap entries
X### (use only without -DNO_BUILTIN_TCAPS)
X### -DALL_BUILTIN_TCAPS include all builtin termcap entries
X### (use only without -DNO_BUILTIN_TCAPS)

X### -Dconst for compilers that don't have type const


X### -DVIMRC_FILE name of the .vimrc file in current dir
X### -DEXRC_FILE name of the .exrc file in current dir
X### -DSYSVIMRC_FILE name of the global .vimrc file
X### -DSYSEXRC_FILE name of the global .exrc file
X### -DDEFVIMRC_FILE name of the system-wide .vimrc file
X### -DVIM_HLP name of the help file

XDEFINES = -DDIGRAPHS -DSOME_BUILTIN_TCAPS -DVIM_ISSPACE


X
X#>>>>> if TERMCAP is defined termlib.o has to be used

X#TERMLIB = termlib.o
XTERMLIB =
X
X#>>>>> choose between debugging (-bs) or optimizing (-so)
XOPTIONS = -so
X#OPTIONS = -bs


X
X#>>>>> end of choices
X###########################################################################
X

XCFLAGS = $(OPTIONS) -wapruq -ps -qf $(DEFINES) -DAMIGA
X
XLIBS = -lc16
XSYMS = vim.syms


X
XOBJ = alloc.o amiga.o buffers.o charset.o cmdline.o csearch.o digraph.o \
X edit.o fileio.o help.o linefunc.o main.o mark.o message.o misccmds.o \
X normal.o ops.o param.o quickfix.o regexp.o regsub.o screen.o \

X script.o search.o storage.o tag.o term.o undo.o $(TERMLIB)
X
XPRO = proto/alloc.pro proto/buffers.pro proto/charset.pro proto/cmdline.pro \
X proto/csearch.pro proto/digraph.pro proto/edit.pro proto/fileio.pro \
X proto/help.pro proto/linefunc.pro proto/main.pro proto/mark.pro \
X proto/message.pro proto/misccmds.pro proto/normal.pro proto/ops.pro \
X proto/param.pro proto/quickfix.pro proto/regexp.pro proto/regsub.pro \
X proto/screen.pro proto/script.pro proto/search.pro proto/storage.pro \
X proto/tag.pro proto/term.pro proto/termlib.pro \
X proto/undo.pro proto/amiga.pro
X
X/Vim: $(OBJ) version.c
X cc $(CFLAGS) version.c
X ln +q -m -o /Vim $(OBJ) version.o $(LIBS)
X
Xdebug: $(OBJ) version.c
X cc $(CFLAGS) version.c
X ln +q -m -g -o /Vim $(OBJ) version.o $(LIBS)
X
Xproto: $(SYMS) $(PRO)


X
Xctags:
X csh -c ctags *.c *.h
X
X# can't use delete here, too many file names
Xclean:

X csh -c rm -f $(OBJ) version.o mkcmdtab.o /Vim $(SYMS) mkcmdtab
X
X$(SYMS) : vim.h keymap.h macros.h ascii.h term.h
X cc $(CFLAGS) -ho$(SYMS) vim.h
X
X###########################################################################
X
Xalloc.o: alloc.c $(SYMS)
X cc $(CFLAGS) -hi$(SYMS) alloc.c
X
Xproto/alloc.pro: alloc.c
X cc -qa -qp $(CFLAGS) -DPROTO -hi$(SYMS) alloc.c
X csh -c mv -f alloc.pro proto
X
Xamiga.o: amiga.c $(SYMS)
X cc $(CFLAGS) -hi$(SYMS) amiga.c
X
Xproto/amiga.pro: amiga.c
X cc -qa -qp $(CFLAGS) -DPROTO -hi$(SYMS) amiga.c
X csh -c mv -f amiga.pro proto
X
Xbuffers.o: buffers.c $(SYMS)
X cc $(CFLAGS) -hi$(SYMS) buffers.c
X
Xproto/buffers.pro: buffers.c
X cc -qa -qp $(CFLAGS) -DPROTO -hi$(SYMS) buffers.c
X csh -c mv -f buffers.pro proto
X
Xcharset.o: charset.c $(SYMS)
X cc $(CFLAGS) -hi$(SYMS) charset.c
X
Xproto/charset.pro: charset.c
X cc -qa -qp $(CFLAGS) -DPROTO -hi$(SYMS) charset.c
X csh -c mv -f charset.pro proto
X
Xcmdline.o: cmdline.c $(SYMS) cmdtab.h
X cc $(CFLAGS) -hi$(SYMS) cmdline.c
X
Xproto/cmdline.pro: cmdline.c
X cc -qa -qp $(CFLAGS) -DPROTO -hi$(SYMS) cmdline.c
X csh -c mv -f cmdline.pro proto
X
Xcsearch.o: csearch.c $(SYMS)
X cc $(CFLAGS) -hi$(SYMS) csearch.c
X
Xproto/csearch.pro: csearch.c
X cc -qa -qp $(CFLAGS) -DPROTO -hi$(SYMS) csearch.c
X csh -c mv -f csearch.pro proto
X
Xdigraph.o: digraph.c $(SYMS)
X cc $(CFLAGS) -hi$(SYMS) digraph.c
X
Xproto/digraph.pro: digraph.c
X cc -qa -qp $(CFLAGS) -DPROTO -hi$(SYMS) digraph.c
X csh -c mv -f digraph.pro proto
X
Xedit.o: edit.c $(SYMS)
X cc $(CFLAGS) -hi$(SYMS) edit.c
X
Xproto/edit.pro: edit.c
X cc -qa -qp $(CFLAGS) -DPROTO -hi$(SYMS) edit.c
X csh -c mv -f edit.pro proto
X
Xfileio.o: fileio.c $(SYMS)
X cc $(CFLAGS) -hi$(SYMS) fileio.c
X
Xproto/fileio.pro: fileio.c
X cc -qa -qp $(CFLAGS) -DPROTO -hi$(SYMS) fileio.c
X csh -c mv -f fileio.pro proto
X
Xhelp.o: help.c $(SYMS)
X cc $(CFLAGS) -hi$(SYMS) help.c
X
Xproto/help.pro: help.c
X cc -qa -qp $(CFLAGS) -DPROTO -hi$(SYMS) help.c
X csh -c mv -f help.pro proto
X
Xlinefunc.o: linefunc.c $(SYMS)
X cc $(CFLAGS) -hi$(SYMS) linefunc.c
X
Xproto/linefunc.pro: linefunc.c
X cc -qa -qp $(CFLAGS) -DPROTO -hi$(SYMS) linefunc.c
X csh -c mv -f linefunc.pro proto
X
Xmain.o: main.c $(SYMS) param.h globals.h
X cc $(CFLAGS) -hi$(SYMS) main.c
X
Xproto/main.pro: main.c
X cc -qa -qp $(CFLAGS) -DPROTO -hi$(SYMS) main.c
X csh -c mv -f main.pro proto
X
Xmark.o: mark.c $(SYMS) mark.h
X cc $(CFLAGS) -hi$(SYMS) mark.c
X
Xproto/mark.pro: mark.c
X cc -qa -qp $(CFLAGS) -DPROTO -hi$(SYMS) mark.c
X csh -c mv -f mark.pro proto
X
Xmessage.o: message.c $(SYMS)
X cc $(CFLAGS) -hi$(SYMS) message.c
X
Xproto/message.pro: message.c
X cc -qa -qp $(CFLAGS) -DPROTO -hi$(SYMS) message.c
X csh -c mv -f message.pro proto
X
Xmisccmds.o: misccmds.c $(SYMS)
X cc $(CFLAGS) -hi$(SYMS) misccmds.c
X
Xproto/misccmds.pro: misccmds.c
X cc -qa -qp $(CFLAGS) -DPROTO -hi$(SYMS) misccmds.c
X csh -c mv -f misccmds.pro proto
X
Xnormal.o: normal.c $(SYMS) ops.h
X cc $(CFLAGS) -hi$(SYMS) normal.c
X
Xproto/normal.pro: normal.c
X cc -qa -qp $(CFLAGS) -DPROTO -hi$(SYMS) normal.c
X csh -c mv -f normal.pro proto
X
Xops.o: ops.c $(SYMS) ops.h
X cc $(CFLAGS) -hi$(SYMS) ops.c
X
Xproto/ops.pro: ops.c
X cc -qa -qp $(CFLAGS) -DPROTO -hi$(SYMS) ops.c
X csh -c mv -f ops.pro proto
X
Xparam.o: param.c $(SYMS)
X cc $(CFLAGS) -hi$(SYMS) param.c
X
Xproto/param.pro: param.c
X cc -qa -qp $(CFLAGS) -DPROTO -hi$(SYMS) param.c
X csh -c mv -f param.pro proto
X
Xquickfix.o: quickfix.c $(SYMS)
X cc $(CFLAGS) -hi$(SYMS) quickfix.c
X
Xproto/quickfix.pro: quickfix.c
X cc -qa -qp $(CFLAGS) -DPROTO -hi$(SYMS) quickfix.c
X csh -c mv -f quickfix.pro proto
X
Xregexp.o: regexp.c $(SYMS)
X cc $(CFLAGS) -hi$(SYMS) regexp.c
X
Xproto/regexp.pro: regexp.c
X cc -qa -qp $(CFLAGS) -DPROTO -hi$(SYMS) regexp.c
X csh -c mv -f regexp.pro proto
X
Xregsub.o: regsub.c $(SYMS)
X cc $(CFLAGS) -hi$(SYMS) regsub.c
X
Xproto/regsub.pro: regsub.c
X cc -qa -qp $(CFLAGS) -DPROTO -hi$(SYMS) regsub.c
X csh -c mv -f regsub.pro proto
X
Xscreen.o: screen.c $(SYMS)
X cc $(CFLAGS) -hi$(SYMS) screen.c
X
Xproto/screen.pro: screen.c
X cc -qa -qp $(CFLAGS) -DPROTO -hi$(SYMS) screen.c
X csh -c mv -f screen.pro proto
X
Xscript.o: script.c $(SYMS)
X cc $(CFLAGS) -hi$(SYMS) script.c
X
Xproto/script.pro: script.c
X cc -qa -qp $(CFLAGS) -DPROTO -hi$(SYMS) script.c
X csh -c mv -f script.pro proto
X
Xsearch.o: search.c $(SYMS)
X cc $(CFLAGS) -hi$(SYMS) search.c
X
Xproto/search.pro: search.c
X cc -qa -qp $(CFLAGS) -DPROTO -hi$(SYMS) search.c
X csh -c mv -f search.pro proto
X
Xstorage.o: storage.c $(SYMS)
X cc $(CFLAGS) -hi$(SYMS) storage.c
X
Xproto/storage.pro: storage.c
X cc -qa -qp $(CFLAGS) -DPROTO -hi$(SYMS) storage.c
X csh -c mv -f storage.pro proto
X
Xtag.o: tag.c $(SYMS) mark.h
X cc $(CFLAGS) -hi$(SYMS) tag.c
X
Xproto/tag.pro: tag.c
X cc -qa -qp $(CFLAGS) -DPROTO -hi$(SYMS) tag.c
X csh -c mv -f tag.pro proto
X
Xterm.o: term.c $(SYMS) term.h
X cc $(CFLAGS) -hi$(SYMS) term.c
X
Xproto/term.pro: term.c
X cc -qa -qp $(CFLAGS) -DPROTO -hi$(SYMS) term.c
X csh -c mv -f term.pro proto
X
Xtermlib.o: termlib.c $(SYMS)
X cc $(CFLAGS) termlib.c
X
Xproto/termlib.pro: termlib.c
X cc -qa -qp $(CFLAGS) -DPROTO termlib.c
X#the manx compiler generates a wrong prototype for tputs
X vim -s termlib.fix termlib.pro
X csh -c mv -f termlib.pro proto
X
Xundo.o: undo.c $(SYMS)
X cc $(CFLAGS) -hi$(SYMS) undo.c
X
Xproto/undo.pro: undo.c
X cc -qa -qp $(CFLAGS) -DPROTO -hi$(SYMS) undo.c
X csh -c mv -f undo.pro proto


X
Xcmdtab.h: cmdtab.tab mkcmdtab
X mkcmdtab cmdtab.tab cmdtab.h
X
Xmkcmdtab: mkcmdtab.o

X ln +q -o mkcmdtab mkcmdtab.o -lc16
END_OF_FILE
if test 8112 -ne `wc -c <'vim/src/makefile.manx'`; then
echo shar: \"'vim/src/makefile.manx'\" unpacked with wrong size!
fi
chmod +x 'vim/src/makefile.manx'
# end of 'vim/src/makefile.manx'
fi
if test -f 'vim/src/makefile.sas' -a "${1}" != "-c" ; then
echo shar: Will not clobber existing file \"'vim/src/makefile.sas'\"
else
echo shar: Extracting \"'vim/src/makefile.sas'\" \(7825 characters\)
sed "s/^X//" >'vim/src/makefile.sas' <<'END_OF_FILE'
X#
X# Makefile for VIM on the Amiga, using SAS/Lattice C 6.0 to 6.3
X#
X# Do NOT use the peephole optimizer! It messes up all kinds of things.
X# For 6.0 and 6.1, expand_env() will not work correctly.
X# For 6.2 and 6.3 the call to free_line in u_freeentry is wrong.
X# You should use Manx Aztec C whenever possible.
X#
X# The prototypes from Manx and SAS are incompatible. If the prototypes
X# were generated by Manx, first do "touch *.c; make proto" before "make".
X#
X# Note: not all dependencies are included. This was done to avoid having
X# to compile everything when a global variable or function is added


X#
X
X#>>>>> choose options:

X### DEF=DIGRAPHS digraph support (at the cost of 1.6 Kbyte code)
X### DEF=NO_ARP do not use arp.library, DOS 2.0 required
X### DEF=COMPATIBLE start in vi-compatible mode
X### DEF=NOBACKUP default is no backup file
X### DEF=DEBUG output a lot of debugging garbage
X### DEF=TERMCAP include termcap file support
X### DEF=NO_BUILTIN_TCAPS do not include builtin termcap entries


X### (use only with -DTERMCAP)

X### DEF=SOME_BUILTIN_TCAPS include most useful builtin termcap entries


X### (use only without -DNO_BUILTIN_TCAPS)

X### DEF=ALL_BUILTIN_TCAPS include all builtin termcap entries


X### (use only without -DNO_BUILTIN_TCAPS)

XDEFINES = DEF=DIGRAPHS DEF=SOME_BUILTIN_TCAPS


X
X#>>>>> if TERMCAP is defined termlib.o has to be used

X#TERMLIB = termlib.o
XTERMLIB =
X
X#>>>>> choose NODEBUG for normal compiling, the other for debugging and profiling
X# don't switch on debugging when generating proto files, it crashes the compiler.
XDBG = NODEBUG
X#DBG = DBG=SF
X
X#>>>>> choose NOOPTPEEP for 6.0 to 6.3, NOOPT for debugging
X# when all the optimizer bugs are finally solved you can use OPT
X#OPTIMIZE=OPT
XOPTIMIZE=NOOPTPEEP
X#OPTIMIZE=NOOPT


X
X#>>>>> end of choices
X###########################################################################
X

XCC = sc
XGST = vim.gst
XCOPTS = SINT SCODE SDATA
X
XCFLAGS = NOLINK $(OPTIMIZE) $(COPTS) DEF=AMIGA DEF=SASC $(DBG) $(DEFINES) GST=$(GST)
X
XPROPT = DEF=PROTO GPROTO GPPARM


X
XOBJ = alloc.o amiga.o buffers.o charset.o cmdline.o csearch.o digraph.o \
X edit.o fileio.o help.o linefunc.o main.o mark.o message.o misccmds.o \
X normal.o ops.o param.o quickfix.o regexp.o regsub.o screen.o \

X script.o search.o storage.o tag.o term.o undo.o $(TERMLIB)
X
XPRO = proto/alloc.pro proto/buffers.pro proto/charset.pro proto/cmdline.pro \
X proto/csearch.pro proto/digraph.pro proto/edit.pro proto/fileio.pro \
X proto/help.pro proto/linefunc.pro proto/main.pro proto/mark.pro \
X proto/message.pro proto/misccmds.pro proto/normal.pro proto/ops.pro \
X proto/param.pro proto/quickfix.pro proto/regexp.pro proto/regsub.pro \
X proto/screen.pro proto/script.pro proto/search.pro proto/storage.pro \
X proto/tag.pro proto/term.pro proto/termlib.pro \
X proto/undo.pro proto/amiga.pro
X
X/Vim: $(OBJ) version.c
X $(CC) $(CFLAGS) version.c
X $(CC) LINK $(COPTS) $(OBJ) version.o $(DBG) PNAME=/Vim
X
Xdebug: $(OBJ) version.c
X $(CC) $(CFLAGS) version.c
X $(CC) LINK $(COPTS) $(OBJ) version.o $(DBG) PNAME=/Vim
X
Xproto: $(GST) $(PRO)


X
Xctags:
X csh -c ctags *.c *.h
X
X# can't use delete here, too many file names
Xclean:

X csh -c rm -f $(OBJ) version.o mkcmdtab.o /Vim $(GST) mkcmdtab
X
X$(GST) : vim.h keymap.h macros.h ascii.h term.h
X $(CC) $(CFLAGS) MGST=$(GST) vim.h
X
X###########################################################################
X
Xalloc.o: alloc.c $(GST)


X $(CC) $(CFLAGS) alloc.c
X

Xproto/alloc.pro: alloc.c $(GST)
X $(CC) $(CFLAGS) GPFILE=proto/alloc.pro $(PROPT) alloc.c
X
Xamiga.o: amiga.c $(GST)
X $(CC) $(CFLAGS) amiga.c
X
Xproto/amiga.pro: amiga.c $(GST)
X $(CC) $(CFLAGS) GPFILE=proto/amiga.pro $(PROPT) amiga.c
X
Xbuffers.o: buffers.c $(GST)


X $(CC) $(CFLAGS) buffers.c
X

Xproto/buffers.pro: buffers.c $(GST)
X $(CC) $(CFLAGS) GPFILE=proto/buffers.pro $(PROPT) buffers.c
X
Xcharset.o: charset.c $(GST)


X $(CC) $(CFLAGS) charset.c
X

Xproto/charset.pro: charset.c $(GST)
X $(CC) $(CFLAGS) GPFILE=proto/charset.pro $(PROPT) charset.c
X
Xcmdline.o: cmdline.c $(GST) cmdtab.h


X $(CC) $(CFLAGS) cmdline.c
X

Xproto/cmdline.pro: cmdline.c $(GST)
X $(CC) $(CFLAGS) GPFILE=proto/cmdline.pro $(PROPT) cmdline.c
X
Xcsearch.o: csearch.c $(GST)


X $(CC) $(CFLAGS) csearch.c
X

Xproto/csearch.pro: csearch.c $(GST)
X $(CC) $(CFLAGS) GPFILE=proto/csearch.pro $(PROPT) csearch.c
X
Xdigraph.o: digraph.c $(GST)


X $(CC) $(CFLAGS) digraph.c
X

Xproto/digraph.pro: digraph.c $(GST)
X $(CC) $(CFLAGS) GPFILE=proto/digraph.pro $(PROPT) digraph.c
X
Xedit.o: edit.c $(GST)


X $(CC) $(CFLAGS) edit.c
X

Xproto/edit.pro: edit.c $(GST)
X $(CC) $(CFLAGS) GPFILE=proto/edit.pro $(PROPT) edit.c
X
Xfileio.o: fileio.c $(GST)


X $(CC) $(CFLAGS) fileio.c
X

Xproto/fileio.pro: fileio.c $(GST)
X $(CC) $(CFLAGS) GPFILE=proto/fileio.pro $(PROPT) fileio.c
X
Xhelp.o: help.c $(GST)


X $(CC) $(CFLAGS) help.c
X

Xproto/help.pro: help.c $(GST)
X $(CC) $(CFLAGS) GPFILE=proto/help.pro $(PROPT) help.c
X
Xlinefunc.o: linefunc.c $(GST)


X $(CC) $(CFLAGS) linefunc.c
X

Xproto/linefunc.pro: linefunc.c $(GST)
X $(CC) $(CFLAGS) GPFILE=proto/linefunc.pro $(PROPT) linefunc.c
X
Xmain.o: main.c $(GST)


X $(CC) $(CFLAGS) main.c
X

Xproto/main.pro: main.c $(GST)
X $(CC) $(CFLAGS) GPFILE=proto/main.pro $(PROPT) main.c
X
Xmark.o: mark.c $(GST) mark.h


X $(CC) $(CFLAGS) mark.c
X

Xproto/mark.pro: mark.c $(GST)
X $(CC) $(CFLAGS) GPFILE=proto/mark.pro $(PROPT) mark.c
X
Xmessage.o: message.c $(GST)


X $(CC) $(CFLAGS) message.c
X

Xproto/message.pro: message.c $(GST)
X $(CC) $(CFLAGS) GPFILE=proto/message.pro $(PROPT) message.c
X
Xmisccmds.o: misccmds.c $(GST)


X $(CC) $(CFLAGS) misccmds.c
X

Xproto/misccmds.pro: misccmds.c $(GST)
X $(CC) $(CFLAGS) GPFILE=proto/misccmds.pro $(PROPT) misccmds.c
X
Xnormal.o: normal.c $(GST) ops.h


X $(CC) $(CFLAGS) normal.c
X

Xproto/normal.pro: normal.c $(GST)
X $(CC) $(CFLAGS) GPFILE=proto/normal.pro $(PROPT) normal.c
X
Xops.o: ops.c $(GST) ops.h


X $(CC) $(CFLAGS) ops.c
X

Xproto/ops.pro: ops.c $(GST)
X $(CC) $(CFLAGS) GPFILE=proto/ops.pro $(PROPT) ops.c
X
Xparam.o: param.c $(GST)


X $(CC) $(CFLAGS) param.c
X

Xproto/param.pro: param.c $(GST)
X $(CC) $(CFLAGS) GPFILE=proto/param.pro $(PROPT) param.c
X
Xquickfix.o: quickfix.c $(GST)


X $(CC) $(CFLAGS) quickfix.c
X

Xproto/quickfix.pro: quickfix.c $(GST)
X $(CC) $(CFLAGS) GPFILE=proto/quickfix.pro $(PROPT) quickfix.c
X
Xregexp.o: regexp.c $(GST)


X $(CC) $(CFLAGS) regexp.c
X

Xproto/regexp.pro: regexp.c $(GST)
X $(CC) $(CFLAGS) GPFILE=proto/regexp.pro $(PROPT) regexp.c
X
Xregsub.o: regsub.c $(GST)


X $(CC) $(CFLAGS) regsub.c
X

Xproto/regsub.pro: regsub.c $(GST)
X $(CC) $(CFLAGS) GPFILE=proto/regsub.pro $(PROPT) regsub.c
X
Xscreen.o: screen.c $(GST)


X $(CC) $(CFLAGS) screen.c
X

Xproto/screen.pro: screen.c $(GST)
X $(CC) $(CFLAGS) GPFILE=proto/screen.pro $(PROPT) screen.c
X
Xscript.o: script.c $(GST)


X $(CC) $(CFLAGS) script.c
X

Xproto/script.pro: script.c $(GST)
X $(CC) $(CFLAGS) GPFILE=proto/script.pro $(PROPT) script.c
X
Xsearch.o: search.c $(GST)


X $(CC) $(CFLAGS) search.c
X

Xproto/search.pro: search.c $(GST)
X $(CC) $(CFLAGS) GPFILE=proto/search.pro $(PROPT) search.c
X
Xstorage.o: storage.c $(GST)


X $(CC) $(CFLAGS) storage.c
X

Xproto/storage.pro: storage.c $(GST)
X $(CC) $(CFLAGS) GPFILE=proto/storage.pro $(PROPT) storage.c
X
Xtag.o: tag.c $(GST) mark.h


X $(CC) $(CFLAGS) tag.c
X

Xproto/tag.pro: tag.c $(GST)
X $(CC) $(CFLAGS) GPFILE=proto/tag.pro $(PROPT) tag.c
X
Xterm.o: term.c $(GST)


X $(CC) $(CFLAGS) term.c
X

Xproto/term.pro: term.c $(GST)
X $(CC) $(CFLAGS) GPFILE=proto/term.pro $(PROPT) term.c
X
Xtermlib.o: termlib.c $(GST)
X $(CC) $(CFLAGS) termlib.c
X
Xproto/termlib.pro: termlib.c $(GST)
X $(CC) $(CFLAGS) GPFILE=proto/termlib.pro $(PROPT) termlib.c
X
Xundo.o: undo.c $(GST)


X $(CC) $(CFLAGS) undo.c
X

Xproto/undo.pro: undo.c $(GST)
X $(CC) $(CFLAGS) GPFILE=proto/undo.pro $(PROPT) undo.c


X
Xcmdtab.h: cmdtab.tab mkcmdtab
X mkcmdtab cmdtab.tab cmdtab.h
X

Xmkcmdtab.o: mkcmdtab.c


X $(CC) $(CFLAGS) mkcmdtab.c
X

Xmkcmdtab: mkcmdtab.o
X $(CC) LINK $(COPTS) mkcmdtab.o PNAME=mkcmdtab
END_OF_FILE
if test 7825 -ne `wc -c <'vim/src/makefile.sas'`; then
echo shar: \"'vim/src/makefile.sas'\" unpacked with wrong size!
fi
chmod +x 'vim/src/makefile.sas'
# end of 'vim/src/makefile.sas'
fi
if test -f 'vim/src/tag.c' -a "${1}" != "-c" ; then
echo shar: Will not clobber existing file \"'vim/src/tag.c'\"
else
echo shar: Extracting \"'vim/src/tag.c'\" \(9080 characters\)
sed "s/^X//" >'vim/src/tag.c' <<'END_OF_FILE'


X/* vi:ts=4:sw=4
X *
X * VIM - Vi IMproved
X *
X * Code Contributions By: Bram Moolenaar mo...@oce.nl
X * Tim Thompson twitch!tjt
X * Tony Andrews onecom!wldrdg!tony
X * G. R. (Fred) Walter watmath!watcgl!grwalter
X */
X
X/*

X * Code to handle tags and the tag stack


X */
X
X#include "vim.h"
X#include "globals.h"
X#include "proto.h"
X#include "param.h"

X#include "mark.h"
X
X#define TAGSTACKSIZE 20
X
X/*
X * the taggy struct is used to store the information about a :tag command:
X * the tag name and the cursor position BEFORE the :tag command
X */
Xstruct taggy
X{
X char *tagname; /* tag name */
X struct filemark fmark; /* cursor position */
X};
X
X/*
X * the tagstack grows from 0 upwards:
X * entry 0: older
X * entry 1: newer
X * entry 2: newest
X */
Xstatic struct taggy tagstack[TAGSTACKSIZE]; /* the tag stack */
Xstatic int tagstackidx = 0; /* index just below active entry */
Xstatic int tagstacklen = 0; /* number of tags on the stack */
X
Xstatic int findtag __ARGS((char *));
X
Xstatic char bottommsg[] = "at bottom of tag stack";
Xstatic char topmsg[] = "at top of tag stack";
X
X/*
X * Jump to tag; handling of tag stack
X *
X * *tag != NUL (:tag): jump to new tag, add to tag stack
X * type == 1 (:pop) || type == 2 (CTRL-T): jump to old position
X * type == 0 (:tag): jump to old tag
X */
X void
Xdotag(tag, type, count)
X char *tag;
X int type;
X int count;
X{
X int i;
X struct taggy temptag;
X
X if (*tag != NUL) /* new pattern, add to the stack */
X {
X /*
X * if last used entry is not at the top, put it at the top by rotating


X * the stack until it is (the newer entries will be at the bottom)

X */
X while (tagstackidx < tagstacklen)
X {
X temptag = tagstack[tagstacklen - 1];
X for (i = tagstacklen - 1; i > 0; --i)
X tagstack[i] = tagstack[i - 1];
X tagstack[0] = temptag;
X ++tagstackidx;
X }
X /* if tagstack is full: remove oldest entry */
X if (++tagstacklen > TAGSTACKSIZE)
X {
X tagstacklen = TAGSTACKSIZE;
X free(tagstack[0].tagname);
X for (i = 1; i < tagstacklen; ++i)
X tagstack[i - 1] = tagstack[i];
X --tagstackidx;
X }
X /*
X * remember the tag and the position before the jump
X */
X tagstack[tagstackidx].tagname = strsave(tag);
X tagstack[tagstackidx].fmark.lnum = Curpos.lnum;
X tagstack[tagstackidx].fmark.mark.col = Curpos.col;
X tagstack[tagstackidx].fmark.mark.ptr = nr2ptr(Curpos.lnum);
X tagstack[tagstackidx].fmark.fnum = 0;
X }
X else if (tagstacklen == 0) /* empty stack */
X {
X emsg("tag stack empty");
X return;
X }
X else if (type) /* go to older position */
X {
X if ((tagstackidx -= count) < 0)
X {
X tagstackidx = 0;
X emsg(bottommsg);
X }
X else if (tagstackidx >= tagstacklen) /* must have been count == 0 */
X {
X emsg(topmsg);
X return;
X }
X if (tagstack[tagstackidx].fmark.mark.ptr == NULL) /* jump to other file */
X {
X if (getaltfile(tagstack[tagstackidx].fmark.fnum - 1, tagstack[tagstackidx].fmark.lnum, TRUE))
X {
X /* emsg(e_notopen); */
X return;
X }
X /* "refresh" this position, so we will not fall off the altfile array */
X tagstack[tagstackidx].fmark.fnum = 0;
X tagstack[tagstackidx].fmark.mark.ptr = nr2ptr(Curpos.lnum);
X }
X else
X Curpos.lnum = ptr2nr(tagstack[tagstackidx].fmark.mark.ptr, (linenr_t)1);
X Curpos.col = tagstack[tagstackidx].fmark.mark.col;
X return;
X }
X else /* go to newer pattern */
X {
X if ((tagstackidx += count - 1) >= tagstacklen)
X {
X tagstackidx = tagstacklen - 1;
X emsg(topmsg);
X }
X else if (tagstackidx < 0) /* must have been count == 0 */
X {
X emsg(bottommsg);
X tagstackidx = 0;
X return;
X }
X }
X if (findtag(tagstack[tagstackidx].tagname) > 0)
X ++tagstackidx;
X else if (bufempty()) /* "vim -t tag" failed, start script now */
X startscript();
X}
X
X/*
X * invalidate the line pointer for all tags
X * called when abandoning the current file
X */
X void
Xclrtags()


X{
X int i;
X

X for (i = 0; i < tagstacklen; ++i)
X tagstack[i].fmark.mark.ptr = NULL;
X}
X
X/*
X * increment the file number for all tags


X * called when adding a file to the file stack
X */
X void

Xincrtags()


X{
X int i;
X

X for (i = 0; i < tagstacklen; ++i)


X {
X#if 0 /* this would take too much time */

X if (tagstack[i].fmark.fnum == 0) /* current file */
X tagstack[i].fmark.lnum = ptr2nr(tagstack[i].fmark.mark.ptr, 1);
X#endif
X ++tagstack[i].fmark.fnum;
X }
X}
X
X/*
X * decrement the file number for the tags of the current file


X * called when not adding the current file name to the file stack
X */
X void

Xdecrtags()


X{
X int i;
X

X for (i = 0; i < tagstacklen; ++i)
X if (tagstack[i].fmark.fnum == 1)
X tagstack[i].fmark.fnum = 0;
X}
X
X/*
X * Print the tag stack (use the occasion to update the line numbers)
X */
X void
Xdotags()


X{
X int i;
X char *name;
X
X#ifdef AMIGA

X settmode(0); /* set cooked mode so output can be halted */
X#endif

X outstrn("\n # TO tag FROM line in file\n");
X for (i = 0; i < tagstacklen; ++i)
X {
X if (tagstack[i].tagname != NULL)
X {
X name = fm_getname(&(tagstack[i].fmark));


X if (name == NULL) /* file name not available */
X continue;
X

X sprintf(IObuff, "%c%2d %-15s %4ld %s\n",
X i == tagstackidx ? '>' : ' ',
X i + 1,
X tagstack[i].tagname,
X tagstack[i].fmark.lnum,


X name);
X outstrn(IObuff);
X }
X flushbuf();
X }

X if (tagstackidx == tagstacklen) /* idx at top of stack */


X outstrn(">\n");
X#ifdef AMIGA
X settmode(1);
X#endif
X wait_return(TRUE);

X}
X
X/*
X * findtag(tag) - goto tag
X * return 0 for failure, 1 for success
X */
X static int
Xfindtag(tag)
X char *tag;
X{
X FILE *tp, *fopen();
X char lbuf[LSIZE];
X char pbuf[LSIZE]; /* search pattern buffer */
X char *fname, *str;
X int cmplen;
X char *m = "No tags file";
X register char *p;
X char *np; /* pointer into file name string */
X char sbuf[CMDBUFFSIZE + 1]; /* tag file name */
X int i;
X int save_secure;
X
X if (tag == NULL) /* out of memory condition */
X return 0;
X
X if ((cmplen = p_tl) == 0)
X cmplen = 999;
X
X /* get stack of tag file names from tags option */
X for (np = p_tags; *np; )
X {
X for (i = 0; i < CMDBUFFSIZE && *np; ++i) /* copy next file name into lbuf */
X {
X if (*np == ' ')
X {
X ++np;
X break;
X }
X sbuf[i] = *np++;
X }
X sbuf[i] = 0;
X if ((tp = fopen(sbuf, "r")) == NULL)
X continue;
X while (fgets(lbuf, LSIZE, tp) != NULL)
X {
X m = "Format error in tags file %s"; /* default error message */
X
X /* find start of file name, after first white space */
X fname = lbuf;
X skiptospace(&fname); /* skip tag */
X if (*fname == NUL)
X goto erret;
X *fname++ = '\0';
X
X if (strncmp(lbuf, tag, (size_t)cmplen) == 0) /* Tag found */
X {
X fclose(tp);
X skipspace(&fname);
X
X /* find start of search command, after second white space */
X str = fname;
X skiptospace(&str);
X if (*str == NUL)
X goto erret;
X *str++ = '\0';
X skipspace(&str);
X
X /*
X * If the command is a string like "/^function fname"
X * scan through the search string. If we see a magic
X * char, we have to quote it. This lets us use "real"
X * implementations of ctags.
X */
X if (*str == '/' || *str == '?')
X {
X p = pbuf;
X *p++ = *str++; /* copy the '/' or '?' */
X if (*str == '^')
X *p++ = *str++; /* copy the '^' */
X
X while (*str)
X {
X switch (*str)
X {
X case '\\': if (str[1] == '(') /* remove '\' before '(' */
X ++str;
X else
X *p++ = *str++;


X break;
X
X case '\r':

X case '\n': *p++ = pbuf[0]; /* copy '/' or '?' */
X *str = 'n'; /* no setpcmark() for search */
X str[1] = NUL; /* delete NL after CR */
X break;
X
X /*
X * if string ends in search character: skip it
X * else escape it with '\'
X */
X case '/':
X case '?': if (*str != pbuf[0]) /* not the search char */
X break;
X /* last char */
X if (str[1] == '\n' || str[1] == '\r')
X {
X ++str;
X continue;
X }
X case '[':
X if (!p_magic)
X break;
X case '^':
X case '*':
X case '.': *p++ = '\\';
X break;
X }
X *p++ = *str++;
X }
X }
X else /* not a search command, just copy it */
X for (p = pbuf; *str && *str != '\n'; )
X *p++ = *str++;
X *p = NUL;


X
X RedrawingDisabled = TRUE;

X /* expand filename (for environment variables) */
X if ((p = ExpandOne((u_char *)fname, 1, -1)) != NULL)
X fname = p;
X i = getfile(fname, NULL, TRUE);
X if (p)
X free(p);


X if (i <= 0)
X {

X set_want_col = TRUE;


X
X RedrawingDisabled = FALSE;

X save_secure = secure;
X secure = 1;
X docmdline((u_char *)pbuf);


X if (secure == 2) /* done something that is not allowed */
X wait_return(TRUE);

X secure = save_secure;
X
X /* print the file message after redraw */
X if (p_im && i == -1)
X stuffReadbuff("\033\007i"); /* ESC CTRL-G i */
X else
X stuffcharReadbuff('\007'); /* CTRL-G */
X return 1;
X }
X RedrawingDisabled = FALSE;


X return 0;
X }
X }

X m = NULL;
X
Xerret:
X fclose(tp);
X if (m)
X {
X emsg2(m, sbuf);
X sleep(1);
X }
X }
X if (m == NULL)
X emsg("tag not found");
X else if (*np == NUL)
X emsg(m);
X return 0;
X}
END_OF_FILE
if test 9080 -ne `wc -c <'vim/src/tag.c'`; then
echo shar: \"'vim/src/tag.c'\" unpacked with wrong size!
fi
chmod +x 'vim/src/tag.c'
# end of 'vim/src/tag.c'
fi
if test -f 'vim/src/vim.h' -a "${1}" != "-c" ; then
echo shar: Will not clobber existing file \"'vim/src/vim.h'\"
else
echo shar: Extracting \"'vim/src/vim.h'\" \(8136 characters\)
sed "s/^X//" >'vim/src/vim.h' <<'END_OF_FILE'


X/* vi:ts=4:sw=4
X *
X * VIM - Vi IMproved
X *
X * Code Contributions By: Bram Moolenaar mo...@oce.nl
X * Tim Thompson twitch!tjt
X * Tony Andrews onecom!wldrdg!tony
X * G. R. (Fred) Walter watmath!watcgl!grwalter
X */
X

X#if defined(SYSV_UNIX) || defined(BSD_UNIX)
X# ifndef UNIX
X# define UNIX
X# endif
X#endif
X
X#include "debug.h"
X
X#include <stdio.h>
X
X#include <ctype.h>
X#ifndef DOMAIN
X#include <limits.h> /* For MAX_INT, remove this if it does not exist */
X#endif
X
X#ifdef BSD_UNIX
X# include <strings.h>
X# ifdef __STDC__
X# include <string.h>
X# endif
X#else
X# include <string.h>
X#endif
X
X#include "ascii.h"
X#include "keymap.h"
X#include "term.h"
X#include "macros.h"
X#ifdef LATTICE
X# include <sys/types.h>
X# include <sys/stat.h>
X#else
X# ifdef _DCC
X# include <sys/stat.h>
X# else
X# ifdef MSDOS
X# include <sys\stat.h>
X# else
X# ifdef UNIX
X# ifndef linux
X# define volatile /* needed for gcc */
X# define signed /* needed for gcc */
X# endif
X# include <sys/types.h>
X# include <sys/stat.h>
X# else
X# include <stat.h>
X# endif
X# endif
X# endif
X#endif
X
X#ifndef DOMAIN
X# include <stdlib.h>
X#endif
X
X#ifdef AMIGA
X/*
X * arpbase.h must be included before functions.h
X */
X# include <libraries/arpbase.h>
X
X/*
X * This won't be needed if you have a version of Lattice 4.01 without broken
X * break signal handling.
X */
X#include <signal.h>
X#endif
X
X#ifndef AMIGA
X/*
X * For the Amiga we use a version of getenv that does local variables under 2.0
X */
X#define vimgetenv(x) getenv(x)
X#endif
X
X#ifdef AZTEC_C
X# include <functions.h>
X# define __ARGS(x) x
X# define __PARMS(x) x
X#endif
X
X#ifdef SASC
X# include <clib/exec_protos.h>
X# define __ARGS(x) x
X# define __PARMS(x) x
X#endif
X
X#ifdef _DCC
X# include <functions.h>
X# define __ARGS(x) x
X# define __PARMS(x) x
X#endif
X
X#ifdef __TURBOC__
X# define __ARGS(x) x
X#endif
X
X#ifdef MSDOS
X# include <dos.h>
X# include <dir.h>
X#endif
X
X#ifdef SOLARIS
X# include <stdlib.h>
X# include <unistd.h>
X#endif
X
X#ifdef UNIX
X# ifdef SCO
X# undef M_XENIX
X# include <sys/ndir.h> /* for MAXNAMLEN */
X# else
X# if defined(SOLARIS) || defined(AIX)
X# include <dirent.h> /* for MAXNAMLEN */
X# else
X# include <sys/dir.h> /* for MAXNAMLEN */
X# endif
X# endif
X# ifdef USL
X# define MAXNAMLEN DIRSIZ
X# endif
X# if defined(UFS_MAXNAMLEN) && !defined(MAXNAMLEN)
X# define MAXNAMLEN UFS_MAXNAMLEN /* for dynix/ptx */
X# endif
X# if defined(NAME_MAX) && !defined(MAXNAMLEN)
X# define MAXNAMLEN NAME_MAX /* for Linux before .99p3 */
X# endif
X# if !defined(MAXNAMLEN)
X# define MAXNAMLEN 512 /* for all other Unix */
X# endif
X#endif
X
X#ifdef UNICOS /* would make sense for other systems too */
X# include <errno.h>
X#endif
X
X#if defined(__STDC__) || defined(__GNUC__)
X# ifndef __ARGS
X# define __ARGS(x) x
X# endif /* __ARGS */
X# if defined(_SEQUENT_)
X# include "ptx_stdlib.h"
X# endif
X# if defined(sun) && !defined(SOLARIS)
X# include "sun_stdlib.h"
X# endif
X# if defined(linux) || defined(SCO) || defined(M_UNIX)
X# include <unistd.h> /* may make sense for others too. jw. */
X# endif
X#else /*__STDC__*/
X# if defined(_SEQUENT_) && !defined(_STDLIB_H_)
X extern char *getenv();
X extern void *malloc();
X# endif
X#endif /* __STDC__ */
X
X#ifndef __ARGS
X#define __ARGS(x) ()
X#endif
X#ifndef __PARMS
X#define __PARMS(x) ()
X#endif
X
X/*
X * for systems that do not allow free(NULL)
X */
X#ifdef NO_FREE_NULL
X# define free(x) nofreeNULL(x)
X extern void nofreeNULL __ARGS((void *));
X#endif
X
X/*
X * fnamecmp() is used to compare filenames.
X * On some systems case in a filename does not matter, on others it does.
X * (this does not account for maximum name lengths, thus it is not 100% accurate!)
X */
X#if defined(AMIGA) || defined(MSDOS)
X# define fnamecmp(x, y) stricmp((x), (y))
X#else
X# define fnamecmp(x, y) strcmp((x), (y))
X#endif
X
X/* flags for updateScreen() */
X#define VALID 90 /* buffer not changed */
X#define NOT_VALID 91 /* buffer changed */
X#define VALID_TO_CURSCHAR 92 /* buffer before cursor not changed */
X#define INVERTED 93 /* redisplay inverted part */
X#define CLEAR 94 /* first clear screen */
X#define CURSUPD 95 /* update cursor first */
X
X/* values for State */
X/*
X * The lowest three bits are used to distinguish normal/cmdline/insert+replace
X * mode. This is used for mapping.
X */
X#define NORMAL 0x01
X#define NORMAL_BUSY 0x11 /* busy interpreting a command */
X#define CMDLINE 0x02
X#define INSERT 0x04
X#define REPLACE 0x24 /* replace mode */
X#define HELP 0x30 /* displaying help */
X#define NOMAPPING 0x40 /* no :mapping mode for vgetc() */
X#define HITRETURN 0x51 /* waiting for a return */
X#define SETWSIZE 0x60 /* window size has changed */
X#define ABBREV 0x80 /* abbreviation instead of mapping */
X
X/* directions */
X#define FORWARD 1
X#define BACKWARD -1
X
X/* for GetChars */
X#define T_PEEK 1 /* do not wait at all */
X#define T_WAIT 2 /* wait for a short time */
X#define T_BLOCK 3 /* wait forever */
X
X#define VISUALLINE MAXCOL /* Visual is linewise */
X
X/*
X * Names for the EXRC, HELP and temporary files.
X * Some of these may have been defined in the makefile.
X */
X#ifndef SYSVIMRC_FILE
X# define SYSVIMRC_FILE "s:.vimrc"
X#endif
X#ifndef SYSEXRC_FILE
X# define SYSEXRC_FILE "s:.exrc"
X#endif
X#ifndef VIMRC_FILE
X# define VIMRC_FILE ".vimrc"
X#endif
X#ifndef EXRC_FILE
X# define EXRC_FILE ".exrc"
X#endif
X#ifndef VIM_HLP
X# define VIM_HLP "vim:vim.hlp"
X#endif
X#define TMPNAME1 "t:viXXXXXX"
X#define TMPNAME2 "t:voXXXXXX"
X#define TMPNAMELEN 12
X
X/*
X * Boolean constants
X */
X#ifndef TRUE
X#define FALSE (0) /* note: this is an int, not a long! */
X#define TRUE (1)
X#endif
X
X/*
X * Maximum screen width
X */
X#define MAX_COLUMNS 255L
X
X/*
X * Buffer sizes
X */
X#ifdef UNIX /* Unix has plenty of memory */
X# define CMDBUFFSIZE 1024 /* size of the command processing buffer */
X#else
X# define CMDBUFFSIZE 256 /* size of the command processing buffer */
X#endif
X
X#define LSIZE 512 /* max. size of a line in the tags file */
X
X#define IOSIZE (1024+1) /* file i/o and sprintf buffer size */
X
X#define TERMBUFSIZE 1024
X
X#ifdef linux
X# define TBUFSZ 2048 /* buffer size for termcap entry */
X#else
X# define TBUFSZ 1024 /* buffer size for termcap entry */
X#endif
X
X/*
X * maximum length of a file name path
X */
X#ifdef UNIX
X# define MAXPATHL 1024 /* Unix has long paths and plenty of memory */
X#else
X# define MAXPATHL 128 /* not too long to put name on stack */
X#endif
X
X#ifdef MSDOS
X# define BASENAMELEN 8 /* length of base of file name */
X#else
X# ifdef UNIX
X# define BASENAMELEN (MAXNAMLEN - 5)
X# else
X# define BASENAMELEN 26 /* Amiga */
X# endif
X#endif
X
X#ifdef MSDOS
X# define WRITEBIN "wb" /* no CR-LF translation */
X# define READBIN "rb"
X#else
X# define WRITEBIN "w"
X# define READBIN "r"
X#endif
X
X#define CHANGED set_Changed()
X#define UNCHANGED Changed = 0
X
X#if !defined(BSD_UNIX) && !defined(linux) && !defined(SASC) && !defined(__sgi) && !defined(SCO) && !defined(hpux) && !defined(SOLARIS) && !defined(M_UNIX) && !defined(AIX) && !defined(_UTS) && !defined(USL)
Xtypedef unsigned char u_char; /* shorthand */
Xtypedef unsigned short u_short; /* shorthand */
Xtypedef unsigned int u_int; /* shorthand */
Xtypedef unsigned long u_long; /* shorthand */
X#endif
X
X#if defined(BSD_UNIX) && !defined(__STDC__)
X# define strchr(ptr, c) index((ptr), (c))
X# define strrchr(ptr, c) rindex((ptr), (c))
X#endif
X
X#ifdef BSD_UNIX
X# define memset(ptr, c, size) bsdmemset((ptr), (c), (size))
Xchar *bsdmemset __ARGS((char *, int, long));
X#endif
X
Xtypedef long linenr_t; /* line number type */
Xtypedef unsigned colnr_t; /* column number type */
Xtypedef struct fpos FPOS; /* file position type */
X
X#define INVLNUM (0x7fffffff) /* invalid line number */
X#ifdef MAX_INT
X# define MAXCOL MAX_INT /* maximum column number */
X#else
X# define MAXCOL 32767 /* maximum column number */
X#endif
X
Xstruct fpos
X{
X linenr_t lnum; /* line number */
X colnr_t col; /* column number */
X};
X
X/*
X * Some versions of isspace() handle Meta character like a space!
X * This define fixes that.
X */
X#ifdef VIM_ISSPACE
X# ifdef isspace
X# undef isspace
X# endif /* isspace */
X# define isspace(x) (((x) >= 9 && (x) <= 13) || ((x) == 32))
X#endif /* VIM_ISSPACE */
END_OF_FILE
if test 8136 -ne `wc -c <'vim/src/vim.h'`; then
echo shar: \"'vim/src/vim.h'\" unpacked with wrong size!
fi
chmod +x 'vim/src/vim.h'
# end of 'vim/src/vim.h'
fi
echo shar: End of archive 4 \(of 25\).
cp /dev/null ark4isdone


MISSING=""
for I in 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 ; do
if test ! -f ark${I}isdone ; then
MISSING="${MISSING} ${I}"
fi
done
if test "${MISSING}" = "" ; then
echo You have unpacked all 25 archives.
rm -f ark[1-9]isdone ark[1-9][0-9]isdone
else
echo You still need to unpack the following archives:
echo " " ${MISSING}
fi
## End of shell archive.
exit 0

===============================================================================

Bram Moolenaar

unread,
Dec 20, 1993, 10:44:49 PM12/20/93
to
Submitted-by: mo...@oce.nl (Bram Moolenaar)
Posting-number: Volume 41, Issue 56
Archive-name: vim/part06

Environment: UNIX, AMIGA, MS-DOS
Supersedes: vim: Volume 37, Issue 1-24

#! /bin/sh


# This is a shell archive. Remove anything before this line, then unpack
# it by saving it into a file and typing "sh file". To overwrite existing
# files, type "sh file -c". You can also feed this as standard input via
# unshar, or by typing "sh <file", e.g.. If this archive is complete, you
# will see the following message at the end:

# "End of archive 6 (of 25)."
# Contents: vim/src/script.c vim/src/term.h vim/src/termlib.c
# vim/src/undo.c
# Wrapped by mool@oce-rd2 on Wed Dec 15 09:50:05 1993


PATH=/bin:/usr/bin:/usr/ucb ; export PATH

if test -f 'vim/src/script.c' -a "${1}" != "-c" ; then
echo shar: Will not clobber existing file \"'vim/src/script.c'\"
else
echo shar: Extracting \"'vim/src/script.c'\" \(12921 characters\)
sed "s/^X//" >'vim/src/script.c' <<'END_OF_FILE'


X/* vi:ts=4:sw=4
X *
X * VIM - Vi IMproved
X *
X * Code Contributions By: Bram Moolenaar mo...@oce.nl
X * Tim Thompson twitch!tjt
X * Tony Andrews onecom!wldrdg!tony
X * G. R. (Fred) Walter watmath!watcgl!grwalter
X */
X
X/*

X * script.c: functions for handling script files


X */
X
X#include "vim.h"
X#include "globals.h"
X#include "proto.h"
X#include "param.h"
X

Xstatic char *scriptname; /* name of the script in use */
Xstatic FILE *autoscriptfd = NULL;
Xstatic char *makescriptname __ARGS((void));
Xstatic void Supdatescript __ARGS((char *));
X
Xextern int global_busy; /* this is in csearch.c */
X
X/*
X * for Amiga Dos 2.0x we use Open/Close/Flush instead of fopen/fclose
X */
X#ifdef AMIGA
X# ifndef NO_ARP
Xextern int dos2; /* this is in amiga.c */
X# endif
X# ifdef SASC
X# include <proto/dos.h>


X# endif
X#endif
X
X/*

X * We use this flag to avoid writing :win to commands to the script file
X * during startup.
X */
Xstatic int script_started = FALSE;
X
X/*
X * startscript(): open automatic script file
X */
X void
Xstartscript()
X{
X int n;
X char buf[25];
X#ifdef AMIGA
X int r;
X FILE *dummyfd = NULL;
X#endif


X#ifdef UNIX
X# ifdef SCO

X mode_t oldmask;
X# else
X int oldmask;
X# endif
X#endif
X
X script_started = TRUE;
X
X#ifdef AMIGA
X/*
X * With Amiga DOS 2.0 the system may lockup with the sequence: write to .vim
X * file, close it, delete it, create a new .vim file and write to it.
X * This is a problem in the filesystem hash chains (solved in version 39.xx).
X * The Delay seems to solve this problem, maybe because DOS gets a chance to
X * finish closing and deleting the old .vim file. Also do this for DOS 1.3,
X * just in case.
X */
X if (stopscript())
X Delay(10L); /* This should fix the lockup bug */
X#else
X stopscript(); /* stop any old script */
X#endif
X
X if (p_uc == 0 || exiting) /* no auto script wanted/needed */
X return;
X if (Changed)
X emsg("Warning: buffer already changed, auto script file will be incomplete");
X
X#ifdef AMIGA
X/*
X * If we start editing a new file, e.g. "test.doc", which resides on an MSDOS
X * compatible filesystem, it is possible that the file "test.doc.vim" which we
X * create will be exactly the same file. To avoid this problem we temporarily
X * create "test.doc".
X */
X if (!(p_sn || thisfile_sn) && xFilename && getperm(xFilename) < 0)
X dummyfd = fopen(xFilename, "w");
X#endif
X
X/*
X * we try different names until we find one that does not exist yet
X */
X scriptname = makescriptname();


X for (;;)
X {

X if (scriptname == NULL) /* must be out of memory */
X break;
X if ((n = strlen(scriptname)) == 0) /* safety check */
X {
X free(scriptname);
X break;
X }
X
X /*
X * check if the scriptfile already exists
X */
X if (getperm(scriptname) < 0) /* it does not exist */
X {
X /*
X * Create the autoscript file.
X */
X#ifdef UNIX
X /*
X * Disallow others to read our .vim file. This is useful if the
X * .vim file is put in some public place like /tmp.
X */
X# ifdef SCO
X oldmask = umask((mode_t)066); /* rw------- */
X# else
X oldmask = umask(066); /* rw------- */
X# endif
X#endif
X#ifdef AMIGA
X# ifndef NO_ARP
X if (dos2)
X# endif
X autoscriptfd = (FILE *)Open((UBYTE *)scriptname, (long)MODE_NEWFILE);
X# ifndef NO_ARP
X else
X autoscriptfd = fopen(scriptname, "w");
X# endif
X#else /* !AMIGA */
X autoscriptfd = fopen(scriptname, WRITEBIN);
X#endif /* AMIGA */
X#ifdef UNIX
X umask(oldmask); /* back to default umask */
X#endif
X
X#ifdef AMIGA
X /*
X * on the Amiga getperm() will return -1 when the file exists but
X * is being used by another program. This happens if you edit
X * a file twice.
X */
X if (autoscriptfd != NULL || (IoErr() != ERROR_OBJECT_IN_USE && IoErr() != ERROR_OBJECT_EXISTS))
X#endif


X break;
X }
X /*

X * get here when file already exists
X */
X if (scriptname[n - 1] == 'm') /* first try */
X {
X#ifdef AMIGA
X /*
X * on MS-DOS compatible filesystems (e.g. messydos) file.doc.vim
X * and file.doc are the same file. To guess if this problem is
X * present try if file.doc.vix exists. If it does, we set thisfile_sn
X * and try file_doc.vim (dots replaced by underscores for this file),
X * and try again. If it doesn't we assume that "file.doc.vim" already
X * exists.
X */
X if (!(p_sn || thisfile_sn)) /* not tried yet */
X {
X scriptname[n - 1] = 'x';
X r = getperm(scriptname); /* try "file.vix" */
X scriptname[n - 1] = 'm';
X if (r >= 0) /* it seems to exist */
X {
X thisfile_sn = TRUE;
X free(scriptname);
X scriptname = makescriptname(); /* '.' replaced by '_' */
X continue; /* try again */
X }
X }
X#endif
X /* if we get here ".vim" file really exists */
X if (!recoverymode)
X emsg(".vim file exists: an edit of this file has not been finished");
X }
X
X if (scriptname[n - 1] == 'a') /* tried enough names, give up */
X {
X free(scriptname);
X break;
X }
X --scriptname[n - 1]; /* change last char of the name */
X }
X if (autoscriptfd != NULL) /* ".vim" file has been created */
X {
X script_winsize(); /* always start with a :win command */
X /* output cursor position if neccessary */
X if (Curpos.lnum > 1 || Curpos.col > 0)
X {
X sprintf(buf, "%ldG0%dl", (long)Curpos.lnum, (int)Curpos.col);
X Supdatescript(buf);
X }
X }
X
X#ifdef AMIGA
X if (dummyfd) /* file has been created temporarily */
X {
X fclose(dummyfd);
X remove(xFilename);
X }
X#endif
X}
X
X int
Xstopscript()
X{
X if (!autoscriptfd)
X return FALSE; /* nothing to stop */
X
X#ifdef AMIGA
X# ifndef NO_ARP
X if (dos2)
X# endif
X Close((BPTR)autoscriptfd);
X# ifndef NO_ARP
X else
X fclose(autoscriptfd);
X# endif
X#else
X fclose(autoscriptfd);
X#endif
X remove(scriptname); /* delete the file */
X autoscriptfd = NULL;
X free(scriptname);
X return TRUE;
X}
X
X/*
X * open new script file
X * return 0 on success, 1 on error
X */
X int
Xopenscript(name)
X char *name;
X{
X int oldcurscript;
X
X if (curscript + 1 == NSCRIPT)
X {
X emsg(e_nesting);
X return 1;
X }
X else
X {
X if (scriptin[curscript] != NULL) /* already reading script */
X ++curscript;
X if ((scriptin[curscript] = fopen((char *)name, READBIN)) == NULL)
X {
X emsg(e_notopen);
X if (curscript)
X --curscript;
X return 1;
X }
X /*
X * With command ":g/pat/so! file" we have to execute the
X * commands from the file now.
X */
X if (global_busy)
X {
X State = NORMAL;
X oldcurscript = curscript;
X do
X {
X normal();
X vpeekc(); /* check for end of file */
X }
X while (scriptin[oldcurscript]);
X State = CMDLINE;
X }
X }


X return 0;
X}
X

X/*
X * updatescipt() is called when a character has to be written into the script file
X * or when we have waited some time for a character (c == 0)
X */
X void
Xupdatescript(c)
X int c;
X{
X static int count = 0;
X
X if (c && scriptout)
X putc(c, scriptout);
X if (autoscriptfd == NULL || (c == 0 && count == 0)) /* nothing to do */
X return;
X if (c)
X {
X#ifdef AMIGA
X# ifndef NO_ARP
X if (dos2)
X# endif
X FPutC((BPTR)autoscriptfd, (unsigned long)c);
X# ifndef NO_ARP
X else
X putc(c, autoscriptfd);
X# endif
X#else
X putc(c, autoscriptfd);
X#endif
X ++count;
X }
X if ((c == 0 || count >= p_uc) && Updated)
X {
X /*
X * Before DOS 2.0x we have to close and open the file in order to really
X * get the characters in the file to disk!
X * With DOS 2.0x Flush() can be used for that
X */
X#ifdef AMIGA
X# ifndef NO_ARP
X if (dos2)
X# endif
X Flush((BPTR)autoscriptfd);
X# ifndef NO_ARP
X else
X {
X fclose(autoscriptfd);
X autoscriptfd = fopen(scriptname, "a");
X }
X# endif
X#else /* !AMIGA */
X fclose(autoscriptfd);
X# ifdef MSDOS
X autoscriptfd = fopen(scriptname, "ab");
X# else
X autoscriptfd = fopen(scriptname, "a");
X# endif
X#endif
X count = 0;
X Updated = 0;
X }
X}
X
X static void
XSupdatescript(str)
X char *str;
X{
X while (*str)
X updatescript(*str++);
X}
X
X/*
X * try to open the ".vim" file for recovery
X * if recoverymode is 1: start recovery, set recoverymode to 2
X * if recoverymode is 2: stop recovery mode
X */
X void
Xopenrecover()
X{
X char *fname;
X struct stat efile, rfile;
X
X if (recoverymode == 2) /* end of recovery */
X {
X recoverymode = 0;
X if (got_int)
X emsg("Recovery Interrupted");
X else
X msg("Recovery completed; If everything is OK: Save this file and delete the .vim file");
X /* The cursor will be in the wrong place after the msg() */
X /* We need to fix it here because we are called from inchar() */
X setcursor();
X flushbuf();
X }
X else
X {
X fname = makescriptname();
X if (fname)
X {
X recoverymode = 2;
X if (xFilename != NULL &&
X stat(xFilename, &efile) != -1 &&
X stat(fname, &rfile) != -1 &&
X efile.st_mtime > rfile.st_mtime)
X emsg(".vim file is older; file not recovered");
X else
X {
X if (openscript(fname))
X emsg("Cannot open .vim file; file not recovered");
X }
X free(fname);
X }
X }
X}
X
X/*
X * make script name out of the filename


X */
X static char *

Xmakescriptname()
X{
X char *r, *s, *fname;
X
X r = modname(xFilename, ".vim");
X if (*p_dir == 0 || r == NULL)
X return r;
X
X fname = gettail(r);
X s = alloc((unsigned)(strlen(p_dir) + strlen(fname) + 1));
X if (s != NULL)
X {
X strcpy(s, p_dir);
X if (*s && !ispathsep(*(s + strlen(s) - 1))) /* don't add '/' after ':' */
X strcat(s, PATHSEPSTR);
X strcat(s, fname);
X }
X free(r);
X return s;
X}
X
X/*
X * add full path to auto script name, used before first :cd command.
X */
X void
Xscriptfullpath()
X{
X char *s;
X
X if (!autoscriptfd)
X return; /* nothing to do */
X /*
X * on the Amiga we cannot get the full path name while the file is open
X * so we close it for a moment
X */
X#ifdef AMIGA
X# ifndef NO_ARP
X if (dos2)
X# endif
X Close((BPTR)autoscriptfd);
X# ifndef NO_ARP
X else
X fclose(autoscriptfd);
X# endif
X#endif
X
X if (FullName(scriptname, IObuff, IOSIZE))
X {
X s = strsave(IObuff);
X if (s)
X {
X free(scriptname);
X scriptname = s;
X }
X }
X
X#ifdef AMIGA
X# ifndef NO_ARP
X if (dos2)
X# endif
X {
X autoscriptfd = (FILE *)Open((UBYTE *)scriptname, (long)MODE_OLDFILE);
X if (autoscriptfd)
X Seek((BPTR)autoscriptfd, 0L, (long)OFFSET_END);
X }
X# ifndef NO_ARP
X else
X autoscriptfd = fopen(scriptname, "a");
X# endif
X#endif
X}
X
X/*
X * add extention to filename - change path/fo.o.h to path/fo.o.h.ext or
X * fo_o_h.ext for MSDOS or when dotfname option reset.
X *
X * Assumed that fname is a valid name found in the filesystem we assure that
X * the return value is a different name and ends in ".ext".
X * "ext" MUST start with a "." and MUST be at most 4 characters long.
X * Space for the returned name is allocated, must be freed later.
X */
X
X char *
Xmodname(fname, ext)
X char *fname, *ext;
X{
X char *retval;
X register char *s;
X register char *ptr;
X register int fnamelen, extlen;
X char currentdir[512];
X
X extlen = strlen(ext);
X
X /*
X * if there is no filename we must get the name of the current directory
X * (we need the full path in case :cd is used)
X */
X if (fname == NULL || *fname == NUL)
X {
X (void)dirname(currentdir, 511);
X strcat(currentdir, PATHSEPSTR);
X fnamelen = strlen(currentdir);
X }
X else
X fnamelen = strlen(fname);
X retval = alloc((unsigned) (fnamelen + extlen + 1));
X if (retval != NULL)
X {
X if (fname == NULL || *fname == NUL)
X strcpy(retval, currentdir);
X else
X strcpy(retval, fname);
X /*
X * search backwards until we hit a '/', '\' or ':' replacing all '.' by '_'
X * for MSDOS or when dotfname option reset.
X * Then truncate what is after the '/', '\' or ':' to 8 characters for MSDOS
X * and 26 characters for AMIGA and UNIX.
X */
X for (ptr = retval + fnamelen; ptr >= retval; ptr--)
X {
X#ifndef MSDOS
X if (p_sn || thisfile_sn)
X#endif
X if (*ptr == '.') /* replace '.' by '_' */
X *ptr = '_';
X if (ispathsep(*ptr))
X break;
X }
X ptr++;
X
X /* the filename has at most BASENAMELEN characters. */
X if (strlen(ptr) > (unsigned)BASENAMELEN)
X ptr[BASENAMELEN] = '\0';
X#ifndef MSDOS
X if ((p_sn || thisfile_sn) && strlen(ptr) > (unsigned)8)
X ptr[8] = '\0';
X#endif
X s = ptr + strlen(ptr);
X
X /*
X * Append the extention.
X * ext must start with '.' and cannot exceed 3 more characters.
X */
X strcpy(s, ext);
X if (fname != NULL && strcmp(fname, retval) == 0)
X {
X /* after modification still the same name? */
X /* we search for a character that can be replaced by '_' */
X while (--s >= ptr)
X {
X if (*s != '_')
X {
X *s = '_';
X break;
X }
X }
X if (s < ptr)
X {
X /* fname was "________.<ext>" how tricky! */
X *ptr = 'v';
X }
X }
X }
X return retval;
X}
X
X/*
X * the new window size must be used in scripts;
X * write a ":winsize width height" command to the (auto)script
X * Postpone this action if not in NORMAL State, otherwise we may insert the
X * command halfway another command.
X */
Xint script_winsize_postponed = FALSE;
X
X void
Xscript_winsize()
X{
X char buf[25];
X
X if (!script_started || State != NORMAL) /* postpone action */
X {
X script_winsize_postponed = TRUE;
X return;
X }
X
X sprintf(buf, ":win %d %d\r", (int)Columns, (int)Rows);
X Supdatescript(buf);
X script_winsize_postponed = FALSE;
X}
X
X/*
X * This function is called after each "State = NORMAL"
X */
X void
Xscript_winsize_pp()
X{
X if (script_winsize_postponed)
X script_winsize();
X}
END_OF_FILE
if test 12921 -ne `wc -c <'vim/src/script.c'`; then
echo shar: \"'vim/src/script.c'\" unpacked with wrong size!
fi
chmod +x 'vim/src/script.c'
# end of 'vim/src/script.c'
fi
if test -f 'vim/src/term.h' -a "${1}" != "-c" ; then
echo shar: Will not clobber existing file \"'vim/src/term.h'\"
else
echo shar: Extracting \"'vim/src/term.h'\" \(13223 characters\)
sed "s/^X//" >'vim/src/term.h' <<'END_OF_FILE'


X/* vi:ts=4:sw=4
X *

X * term.h -- VIM - Vi IMproved


X *
X * Code Contributions By: Bram Moolenaar mo...@oce.nl
X * Tim Thompson twitch!tjt
X * Tony Andrews onecom!wldrdg!tony
X * G. R. (Fred) Walter watmath!watcgl!grwalter
X */
X
X/*

X * This file contains the machine dependent escape sequences that the editor
X * needs to perform various operations. Some of the sequences here are
X * optional. Anything not available should be indicated by a null string. In
X * the case of insert/delete line sequences, the editor checks the capability
X * and works around the deficiency, if necessary.
X */
X
X/*
X * the terminal capabilities are stored in this structure
X * keep in sync with array in term.c
X */
Xtypedef struct _tcarr
X{
X/* output codes */
X char *t_name; /* name of this terminal entry */
X char *t_el; /* el ce clear to end of line */
X char *t_il; /* il1 al add new blank line */
X char *t_cil; /* il AL add number of blank lines */
X char *t_dl; /* dl1 dl delete line */
X char *t_cdl; /* dl DL delete number of lines */
X char *t_ed; /* clear cl clear screen */
X char *t_ci; /* civis vi cursur invisible */
X char *t_cv; /* cnorm ve cursur visible */
X char *t_tp; /* sgr0 me normal mode */
X char *t_ti; /* rev mr reverse mode */
X char *t_cm; /* cup cm cursor motion */
X char *t_sr; /* ri sr scroll reverse (backward) */
X char *t_cri; /* cuf RI cursor number of chars right */
X char *t_vb; /* flash vb visual bell */
X char *t_ks; /* smkx ks put terminal in "keypad transmit" mode */
X char *t_ke; /* rmkx ke out of "keypad transmit" mode */
X char *t_ts; /* ti put terminal in termcap mode */
X char *t_te; /* te out of termcap mode */
X
X/* key codes */
X char *t_ku; /* kcuu1 ku arrow up */
X char *t_kd; /* kcud1 kd arrow down */
X char *t_kl; /* kcub1 kl arrow left */
X char *t_kr; /* kcuf1 kr arrow right */
X char *t_sku; /* shift arrow up */
X char *t_skd; /* shift arrow down */
X char *t_skl; /* kLFT #4 shift arrow left */
X char *t_skr; /* kRIT % shift arrow right */
X char *t_f1; /* kf1 k1 function key 1 */
X char *t_f2; /* kf2 k2 function key 2 */
X char *t_f3; /* kf3 k3 function key 3 */
X char *t_f4; /* kf4 k4 function key 4 */
X char *t_f5; /* kf5 k5 function key 5 */
X char *t_f6; /* kf6 k6 function key 6 */
X char *t_f7; /* kf7 k7 function key 7 */
X char *t_f8; /* kf8 k8 function key 8 */
X char *t_f9; /* kf9 k9 function key 9 */
X char *t_f10; /* kf10 k; function key 10 */
X char *t_sf1; /* kf11 F1 shifted function key 1 */
X char *t_sf2; /* kf12 F2 shifted function key 2 */
X char *t_sf3; /* kf13 F3 shifted function key 3 */
X char *t_sf4; /* kf14 F4 shifted function key 4 */
X char *t_sf5; /* kf15 F5 shifted function key 5 */
X char *t_sf6; /* kf16 F6 shifted function key 6 */
X char *t_sf7; /* kf17 F7 shifted function key 7 */
X char *t_sf8; /* kf18 F8 shifted function key 8 */
X char *t_sf9; /* kf19 F9 shifted function key 9 */
X char *t_sf10; /* kf20 FA shifted function key 10 */
X char *t_help; /* khlp %1 help key */
X char *t_undo; /* kund &8 undo key */
X /* adjust inchar() for last entry! */
X} Tcarr;
X
Xextern Tcarr term_strings; /* currently used terminal strings */
X
X/*
X * strings used for terminal
X */
X#define T_EL (term_strings.t_el)
X#define T_IL (term_strings.t_il)
X#define T_CIL (term_strings.t_cil)
X#define T_DL (term_strings.t_dl)
X#define T_CDL (term_strings.t_cdl)
X#define T_ED (term_strings.t_ed)
X#define T_CI (term_strings.t_ci)
X#define T_CV (term_strings.t_cv)
X#define T_TP (term_strings.t_tp)
X#define T_TI (term_strings.t_ti)
X#define T_CM (term_strings.t_cm)
X#define T_SR (term_strings.t_sr)
X#define T_CRI (term_strings.t_cri)
X#define T_VB (term_strings.t_vb)
X#define T_KS (term_strings.t_ks)
X#define T_KE (term_strings.t_ke)
X#define T_TS (term_strings.t_ts)
X#define T_TE (term_strings.t_te)
X
X
X#ifndef TERMINFO
X# ifndef NO_BUILTIN_TCAPS
X/*
X * here are the builtin termcap entries.
X * They not stored as complete Tcarr structures, as such a structure
X * is to big.
X * Each termcap is a concatenated string of entries, where '\0' characters
X * followed by a skip character sepereate the capabilities. The skip
X * character is the relative structure offset for the following entry.
X * See parse_builtin_tcap() in term.c for all details.
X */
X# define AMIGA_TCAP "amiga\0\
X\0\033[K\0\
X\0\033[L\0\
X\0\033[%dL\0\
X\0\033[M\0\
X\0\033[%dM\0\
X\0\014\0\
X\0\033[0 p\0\
X\0\033[1 p\0\
X\0\033[0m\0\
X\0\033[7m\0\
X\0\033[%i%d;%dH\0\
X\1\033[%dC\0\
X\5\233A\0\
X\0\233B\0\
X\0\233D\0\
X\0\233C\0\
X\0\233T\0\
X\0\233S\0\
X\0\233 A\0\
X\0\233 @\0\
X\0\233\060~\0\
X\0\233\061~\0\
X\0\233\062~\0\
X\0\233\063~\0\
X\0\233\064~\0\
X\0\233\065~\0\
X\0\233\066~\0\
X\0\233\067~\0\
X\0\233\070~\0\
X\0\233\071~\0\
X\0\233\061\060~\0\
X\0\233\061\061~\0\
X\0\233\061\062~\0\
X\0\233\061\063~\0\
X\0\233\061\064~\0\
X\0\233\061\065~\0\
X\0\233\061\066~\0\
X\0\233\061\067~\0\
X\0\233\061\070~\0\
X\0\233\061\071~\0\
X\0\233?~\0\
X\0\0"
X
X# define ATARI_TCAP "atari\0\
X\0\033l\0\
X\0\033L\0\
X\1\033M\0\
X\1\033E\0\
X\0\033f\0\
X\0\033e\0\
X\0\0"
X
X# define ANSI_TCAP "ansi\0\
X\0\033[2K\0\
X\0\033[L\0\
X\0\033[%dL\0\
X\0\033[M\0\
X\0\033[%dM\0\
X\0\033[2J\0\
X\2\033[0m\0\
X\0\033[7m\0\
X\0\033[%i%d;%dH\0\
X\1\033[%dC\0\
X\0\0"
X
X/*
X * These codes are valid when nansi.sys or equivalent has been installed.
X * Function keys on a PC are preceded with a NUL. These are converted into
X * K_NUL '\316' in GetChars(), because we cannot handle NULs in key codes.
X * CTRL-arrow is used instead of SHIFT-arrow.
X */
X# define PCANSI_TCAP "pcansi\0\
X\0\033[K\0\
X\0\033[L\0\
X\1\033[M\0\
X\1\033[2J\0\
X\2\033[0m\0\
X\0\033[7m\0\
X\0\033[%i%d;%dH\0\
X\1\033[%dC\0\
X\5\316H\0\
X\0\316P\0\
X\0\316K\0\
X\0\316M\0\
X\2\316s\0\
X\0\316t\0\
X\0\316;\0\
X\0\316<\0\
X\0\316=\0\
X\0\316>\0\
X\0\316?\0\
X\0\316@\0\
X\0\316A\0\
X\0\316B\0\
X\0\316C\0\
X\0\316D\0\
X\0\316T\0\
X\0\316U\0\
X\0\316V\0\
X\0\316W\0\
X\0\316X\0\
X\0\316Y\0\
X\0\316Z\0\
X\0\316[\0\
X\0\316\\\0\
X\0\316]\0\
X\0\0"
X
X/*
X * These codes are valid for the pc video.
X * The entries that start with ESC | are translated into conio calls in msdos.c.
X */
X# define PCTERM_TCAP "pcterm\0\
X\0\033|K\0\
X\0\033|L\0\
X\1\033|M\0\
X\1\033|J\0\
X\2\033|0m\0\
X\0\033|79m\0\
X\0\033|%i%d;%dH\0\
X\7\316H\0\
X\0\316P\0\
X\0\316K\0\
X\0\316M\0\
X\2\316s\0\
X\0\316t\0\
X\0\316;\0\
X\0\316<\0\
X\0\316=\0\
X\0\316>\0\
X\0\316?\0\
X\0\316@\0\
X\0\316A\0\
X\0\316B\0\
X\0\316C\0\
X\0\316D\0\
X\0\316T\0\
X\0\316U\0\
X\0\316V\0\
X\0\316W\0\
X\0\316X\0\
X\0\316Y\0\
X\0\316Z\0\
X\0\316[\0\
X\0\316\\\0\
X\0\316]\0\
X\0\0"
X
X# define VT52_TCAP "vt52\0\
X\0\033K\0\
X\0\033T\0\
X\1\033U\0\
X\1\014\0\
X\2\033SO\0\
X\0\033S2\0\
X\0\033Y%+ %+ \0\
X\0\0"
X
X/*
X * The xterm termcap is missing F14 and F15, because they send the same
X * codes as the undo and help key, although they don't work on all keyboards.
X */
X# define XTERM_TCAP "xterm\0\
X\0\033[K\0\
X\0\033[L\0\
X\0\033[%dL\0\
X\0\033[M\0\
X\0\033[%dM\0\
X\0\033[H\033[2J\0\
X\2\033[m\0\
X\0\033[7m\0\
X\0\033[%i%d;%dH\0\
X\0\033M\0\
X\0\033[%dC\0\
X\1\033[?1h\033=\0\
X\0\033[?1l\033>\0\
X\0\0337\033[?47h\0\
X\0\033[2J\033[?47l\0338\0\
X\0\033OA\0\
X\0\033OB\0\
X\0\033OD\0\
X\0\033OC\0\
X\0\033Ox\0\
X\0\033Or\0\
X\0\033Ot\0\
X\0\033Ov\0\
X\0\033[11~\0\
X\0\033[12~\0\
X\0\033[13~\0\
X\0\033[14~\0\
X\0\033[15~\0\
X\0\033[17~\0\
X\0\033[18~\0\
X\0\033[19~\0\
X\0\033[20~\0\
X\0\033[21~\0\
X\0\033[23~\0\
X\0\033[24~\0\
X\0\033[25~\0\
X\2\033[29~\0\
X\0\033[31~\0\
X\0\033[32~\0\
X\0\033[33~\0\
X\0\033[34~\0\
X\0\033[28~\0\
X\0\033[26~\0\
X\0\0"
X
X# define DEBUG_TCAP "debug\0\
X\0[EL]\0\
X\0[IL]\0\
X\0[CIL%d]\0\
X\0[DL]\0\
X\0[CDL%d]\0\
X\0[ED]\0\
X\0[CI]\0\
X\0[CV]\0\
X\0[TP]\0\
X\0[TI]\0\
X\0[%dCM%d]\0\
X\0[SR]\0\
X\0[CRI%d]\0\
X\0[VB]\0\
X\0[KS]\0\
X\0[KE]\0\
X\0[TI]\0\
X\0[TE]\0\
X\0[KU]\0\
X\0[KD]\0\
X\0[KL]\0\
X\0[KR]\0\
X\0[SKU]\0\
X\0[SKD]\0\
X\0[SKL]\0\
X\0[SKR]\0\
X\0[F1]\0\
X\0[F2]\0\
X\0[F3]\0\
X\0[F4]\0\
X\0[F5]\0\
X\0[F6]\0\
X\0[F7]\0\
X\0[F8]\0\
X\0[F9]\0\
X\0[F10]\0\
X\0[SF1]\0\
X\0[SF2]\0\
X\0[SF3]\0\
X\0[SF4]\0\
X\0[SF5]\0\
X\0[SF6]\0\
X\0[SF7]\0\
X\0[SF8]\0\
X\0[SF9]\0\
X\0[SF10]\0\
X\0[HELP]\0\
X\0[UNDO]\0\
X\0\0"
X
X# ifdef ATARI
X# define DFLT_TCAP ATARI_TCAP
X# endif /* ATARI */
X
X# ifdef AMIGA
X# define DFLT_TCAP AMIGA_TCAP
X# endif /* AMIGA */
X
X# ifdef MSDOS
X# define DFLT_TCAP PCTERM_TCAP
X# endif /* MSDOS */
X
X# ifdef UNIX
X# define DFLT_TCAP ANSI_TCAP
X# endif /* UNIX */
X
X# else /* NO_BUILTIN_TCAPS */
X# define DUMB_TCAP "dumb\0\
X\5\014\0\
X\4\033[%i%d;%dH\0\
X\0\0"
X# endif /* NO_BUILTIN_TCAPS */
X
X#else /* TERMINFO */
X# ifndef NO_BUILTIN_TCAPS
X/*
X * here are the builtin termcap entries.
X * They not stored as complete Tcarr structures, as such a structure
X * is to big.
X * Each termcap is a concatenated string of entries, where '\0' characters
X * followed by a skip character sepereate the capabilities. The skip
X * character is the relative structure offset for the following entry.
X * See parse_builtin_tcap() in term.c for all details.
X */
X# define AMIGA_TCAP "amiga\0\
X\0\033[K\0\
X\0\033[L\0\
X\0\033[%p1%dL\0\
X\0\033[M\0\
X\0\033[%p1%dM\0\
X\0\014\0\
X\0\033[0 p\0\
X\0\033[1 p\0\
X\0\033[0m\0\
X\0\033[7m\0\
X\0\033[%i%p1%d;%p2%dH\0\
X\1\033[%p1%dC\0\
X\5\233A\0\
X\0\233B\0\
X\0\233D\0\
X\0\233C\0\
X\0\233T\0\
X\0\233S\0\
X\0\233 A\0\
X\0\233 @\0\
X\0\233\060~\0\
X\0\233\061~\0\
X\0\233\062~\0\
X\0\233\063~\0\
X\0\233\064~\0\
X\0\233\065~\0\
X\0\233\066~\0\
X\0\233\067~\0\
X\0\233\070~\0\
X\0\233\071~\0\
X\0\233\061\060~\0\
X\0\233\061\061~\0\
X\0\233\061\062~\0\
X\0\233\061\063~\0\
X\0\233\061\064~\0\
X\0\233\061\065~\0\
X\0\233\061\066~\0\
X\0\233\061\067~\0\
X\0\233\061\070~\0\
X\0\233\061\071~\0\
X\0\233?~\0\
X\0\0"
X
X# define ATARI_TCAP "atari\0\
X\0\033l\0\
X\0\033L\0\
X\1\033M\0\
X\1\033E\0\
X\0\033f\0\
X\0\033e\0\
X\0\0"
X
X# define ANSI_TCAP "ansi\0\
X\0\033[2K\0\
X\0\033[L\0\
X\0\033[%p1%dL\0\
X\0\033[M\0\
X\0\033[%p1%dM\0\
X\0\033[2J\0\
X\2\033[0m\0\
X\0\033[7m\0\
X\0\033[%i%p1%d;%p2%dH\0\
X\1\033[%p1%dC\0\
X\0\0"
X
X/*
X * These codes are valid when nansi.sys or equivalent has been installed.
X * Function keys on a PC are preceded with a NUL. These are converted into
X * K_NUL '\316' in GetChars(), because we cannot handle NULs in key codes.
X * CTRL-arrow is used instead of SHIFT-arrow.
X */
X# define PCANSI_TCAP "pcansi\0\
X\0\033[K\0\
X\0\033[L\0\
X\1\033[M\0\
X\1\033[2J\0\
X\2\033[0m\0\
X\0\033[7m\0\
X\0\033[%i%p1%d;%p2%dH\0\
X\1\033[%p1%dC\0\
X\5\316H\0\
X\0\316P\0\
X\0\316K\0\
X\0\316M\0\
X\2\316s\0\
X\0\316t\0\
X\0\316;\0\
X\0\316<\0\
X\0\316=\0\
X\0\316>\0\
X\0\316?\0\
X\0\316@\0\
X\0\316A\0\
X\0\316B\0\
X\0\316C\0\
X\0\316D\0\
X\0\316T\0\
X\0\316U\0\
X\0\316V\0\
X\0\316W\0\
X\0\316X\0\
X\0\316Y\0\
X\0\316Z\0\
X\0\316[\0\
X\0\316\\\0\
X\0\316]\0\
X\0\0"
X
X/*
X * These codes are valid for the pc video.
X * The entries that start with ESC | are translated into conio calls in msdos.c.
X */
X# define PCTERM_TCAP "pcterm\0\
X\0\033|K\0\
X\0\033|L\0\
X\1\033|M\0\
X\1\033|J\0\
X\2\033|0m\0\
X\0\033|79m\0\
X\0\033|%i%p1%d;%p2%dH\0\
X\7\316H\0\
X\0\316P\0\
X\0\316K\0\
X\0\316M\0\
X\2\316s\0\
X\0\316t\0\
X\0\316;\0\
X\0\316<\0\
X\0\316=\0\
X\0\316>\0\
X\0\316?\0\
X\0\316@\0\
X\0\316A\0\
X\0\316B\0\
X\0\316C\0\
X\0\316D\0\
X\0\316T\0\
X\0\316U\0\
X\0\316V\0\
X\0\316W\0\
X\0\316X\0\
X\0\316Y\0\
X\0\316Z\0\
X\0\316[\0\
X\0\316\\\0\
X\0\316]\0\
X\0\0"
X
X# define VT52_TCAP "vt52\0\
X\0\033K\0\
X\0\033T\0\
X\1\033U\0\
X\1\014\0\
X\2\033SO\0\
X\0\033S2\0\
X\0\033Y%+ %+ \0\
X\0\0"
X
X/*
X * The xterm termcap is missing F14 and F15, because they send the same
X * codes as the undo and help key, although they don't work on all keyboards.
X */
X# define XTERM_TCAP "xterm\0\
X\0\033[K\0\
X\0\033[L\0\
X\0\033[%p1%dL\0\
X\0\033[M\0\
X\0\033[%p1%dM\0\
X\0\033[H\033[2J\0\
X\2\033[m\0\
X\0\033[7m\0\
X\0\033[%i%p1%d;%p2%dH\0\
X\0\033M\0\
X\0\033[%p1%dC\0\
X\1\033[?1h\033=\0\
X\0\033[?1l\033>\0\
X\0\0337\033[?47h\0\
X\0\033[2J\033[?47l\0338\0\
X\0\033OA\0\
X\0\033OB\0\
X\0\033OD\0\
X\0\033OC\0\
X\0\033Ox\0\
X\0\033Or\0\
X\0\033Ot\0\
X\0\033Ov\0\
X\0\033[11~\0\
X\0\033[12~\0\
X\0\033[13~\0\
X\0\033[14~\0\
X\0\033[15~\0\
X\0\033[17~\0\
X\0\033[18~\0\
X\0\033[19~\0\
X\0\033[20~\0\
X\0\033[21~\0\
X\0\033[23~\0\
X\0\033[24~\0\
X\0\033[25~\0\
X\2\033[29~\0\
X\0\033[31~\0\
X\0\033[32~\0\
X\0\033[33~\0\
X\0\033[34~\0\
X\0\033[28~\0\
X\0\033[26~\0\
X\0\0"
X
X# define DEBUG_TCAP "debug\0\
X\0[EL]\0\
X\0[IL]\0\
X\0[CIL%p1%d]\0\
X\0[DL]\0\
X\0[CDL%p1%d]\0\
X\0[ED]\0\
X\0[CI]\0\
X\0[CV]\0\
X\0[TP]\0\
X\0[TI]\0\
X\0[%p1%dCM%p2%d]\0\
X\0[SR]\0\
X\0[CRI%p1%d]\0\
X\0[VB]\0\
X\0[KS]\0\
X\0[KE]\0\
X\0[TI]\0\
X\0[TE]\0\
X\0[KU]\0\
X\0[KD]\0\
X\0[KL]\0\
X\0[KR]\0\
X\0[SKU]\0\
X\0[SKD]\0\
X\0[SKL]\0\
X\0[SKR]\0\
X\0[F1]\0\
X\0[F2]\0\
X\0[F3]\0\
X\0[F4]\0\
X\0[F5]\0\
X\0[F6]\0\
X\0[F7]\0\
X\0[F8]\0\
X\0[F9]\0\
X\0[F10]\0\
X\0[SF1]\0\
X\0[SF2]\0\
X\0[SF3]\0\
X\0[SF4]\0\
X\0[SF5]\0\
X\0[SF6]\0\
X\0[SF7]\0\
X\0[SF8]\0\
X\0[SF9]\0\
X\0[SF10]\0\
X\0[HELP]\0\
X\0[UNDO]\0\
X\0\0"
X
X# ifdef ATARI
X# define DFLT_TCAP ATARI_TCAP
X# endif /* ATARI */
X
X# ifdef AMIGA
X# define DFLT_TCAP AMIGA_TCAP
X# endif /* AMIGA */
X
X# ifdef MSDOS
X# define DFLT_TCAP PCTERM_TCAP
X# endif /* MSDOS */
X
X# ifdef UNIX
X# define DFLT_TCAP ANSI_TCAP
X# endif /* UNIX */
X
X# else /* NO_BUILTIN_TCAPS */
X/*
X * The most minimal terminal: only clear screen and cursor positioning
X */
X# define DUMB_TCAP "dumb\0\
X\5\014\0\
X\4\033[%i%p1%d;%p2%dH\0\
X\0\0"
X# endif /* NO_BUILTIN_TCAPS */
X
X#endif
END_OF_FILE
if test 13223 -ne `wc -c <'vim/src/term.h'`; then
echo shar: \"'vim/src/term.h'\" unpacked with wrong size!
fi
chmod +x 'vim/src/term.h'
# end of 'vim/src/term.h'
fi
if test -f 'vim/src/termlib.c' -a "${1}" != "-c" ; then
echo shar: Will not clobber existing file \"'vim/src/termlib.c'\"
else
echo shar: Extracting \"'vim/src/termlib.c'\" \(15527 characters\)
sed "s/^X//" >'vim/src/termlib.c' <<'END_OF_FILE'
X/* vi:sw=4:ts=4:
X The following software is (C) 1984 Peter da Silva,
X the Mad Australian, in the public domain. It may
X be re-distributed for any purpose with the inclusion
X of this notice. */
X/* modified by Bram Moolenaar */
X
X/* TERMLIB: Terminal independant database. */
X
X#include "vim.h"
X#include "proto.h"
X#include "proto/termlib.pro"
X
X#ifndef AMIGA
X# include <sgtty.h>
X#endif
X
Xstatic int getent __PARMS((char *, char *, FILE *, int));
Xstatic int nextent __PARMS((char *, FILE *, int));
Xstatic int _match __PARMS((char *, char *));
Xstatic char *_addfmt __PARMS((char *, char *, int));
Xstatic char *_find __PARMS((char *, char *));
X
X/*
X * Global variables for termlib
X */
X
Xchar *tent; /* Pointer to terminal entry, set by tgetent */
Xchar PC = 0; /* Pad character, default NULL */
Xchar *UP = 0, *BC = 0; /* Pointers to UP and BC strings from database */
Xshort ospeed; /* Baud rate (1-16, 1=300, 16=19200), as in stty */
X
X/*
X * Module: tgetent
X *
X * Purpose: Get termcap entry for <term> into buffer at <tbuf>.
X *
X * Calling conventions: char tbuf[TBUFSZ+], term=canonical name for
X * terminal.
X *
X * Returned values: 1 = success, -1 = can't open file,
X * 0 = can't find terminal.
X *
X * Notes
X * Should probably supply static buffer.
X *
X * Uses environment variables "TERM" and
X * "TERMCAP". If TERM = term (that is, if the argument
X * matches the environment) then it looks at TERMCAP.
X * If TERMCAP begins with a slash, then it assumes
X * this is the file to search rather than /etc/termcap.
X * If TERMCAP does not begin with a slash, and it
X * matches TERM, then this is used as the entry.
X *
X * This could be simplified considerably for non-UNIX
X * systems.
X */
X
X#ifdef AMIGA
X# define TERMCAPFILE "s:termcap"
X#else
X# define TERMCAPFILE "/etc/termcap"
X#endif
X
Xtgetent(tbuf, term)
X char *tbuf; /* Buffer to hold termcap entry, TBUFSZ bytes max */
X char *term; /* Name of terminal */
X{
X char tcbuf[32]; /* Temp buffer to handle */
X char *tcptr = tcbuf; /* extended entries */
X char *tcap = TERMCAPFILE; /* Default termcap file */
X char *tmp;
X FILE *termcap;


X int retval = 0;

X int len;
X
X if ((tmp = (char *)vimgetenv("TERMCAP")) != NULL)
X {
X if (*tmp == '/') /* TERMCAP = name of termcap file */
X tcap = tmp ;
X else /* TERMCAP = termcap entry itself */
X {
X int tlen = strlen(term);
X
X while (*tmp && *tmp != ':') /* Check if TERM matches */
X {
X while (*tmp == '|')
X tmp++;
X if (_match(tmp, term) == tlen)
X {
X strcpy(tbuf, tmp);
X tent = tbuf;
X return 1;
X }
X else
X tmp = _find(tmp, ":|");
X }
X }
X }
X if (!(termcap = fopen(tcap, "r")))
X {
X strcpy(tbuf, tcap);


X return -1;
X }
X

X len = 0;
X while (getent(tbuf + len, term, termcap, TBUFSZ - len))
X {
X if ((term = tgetstr("tc", &tcptr))) /* extended entry */
X {
X rewind(termcap);
X len = strlen(tbuf);
X }
X else
X {
X retval = 1;
X tent = tbuf;
X break;
X }
X }
X fclose(termcap);


X return retval;
X}
X

X static int
Xgetent(tbuf, term, termcap, buflen)
X char *tbuf, *term;
X FILE *termcap;
X int buflen;
X{
X char *tptr;
X int tlen = strlen(term);
X
X while (nextent(tbuf, termcap, buflen)) /* For each possible entry */
X {
X tptr = tbuf;
X while (*tptr && *tptr != ':') /* : terminates name field */
X {
X while (*tptr == '|') /* | seperates names */
X tptr++;
X if (_match(tptr, term) == tlen) /* FOUND! */
X {
X tent = tbuf;
X return 1;
X }
X else /* Look for next name */
X tptr = _find(tptr, ":|");
X }
X }


X return 0;
X}
X

X static int
Xnextent(tbuf, termcap, buflen) /* Read 1 entry from TERMCAP file */
X char *tbuf;
X FILE *termcap;
X int buflen;
X{
X char *lbuf = tbuf; /* lbuf=line buffer */
X /* read lines straight into buffer */
X
X while (lbuf < tbuf+buflen && /* There's room and */
X fgets(lbuf, (int)(tbuf+buflen-lbuf), termcap)) /* another line */
X {
X int llen = strlen(lbuf);
X
X if (*lbuf == '#') /* eat comments */
X continue;
X if (lbuf[-1] == ':' && /* and whitespace */
X lbuf[0] == '\t' &&
X lbuf[1] == ':')
X {
X strcpy(lbuf, lbuf+2);
X llen -= 2;
X }
X if (lbuf[llen-2] == '\\') /* and continuations */
X lbuf += llen-2;
X else
X {
X lbuf[llen-1]=0; /* no continuation, return */


X return 1;
X }
X }

X
X return 0; /* ran into end of file */
X}
X
X/*
X * Module: tgetflag
X *
X * Purpose: returns flag true or false as to the existence of a given
X * entry. used with 'bs', 'am', etc...
X *
X * Calling conventions: id is the 2 character capability id.
X *
X * Returned values: 1 for success, 0 for failure.
X */
X
Xtgetflag(id)
X char *id;
X{
X char buf[256], *ptr = buf;
X
X return tgetstr(id, &ptr) ? 1 : 0;
X}
X
X/*
X * Module: tgetnum
X *
X * Purpose: get numeric value such as 'li' or 'co' from termcap.
X *
X * Calling conventions: id = 2 character id.
X *
X * Returned values: -1 for failure, else numerical value.
X */
X
Xtgetnum(id)
Xchar *id;
X{
X char *ptr, buf[256];
X ptr = buf;
X
X if (tgetstr(id, &ptr))
X return atoi(buf);
X else


X return 0;
X}
X

X/*
X * Module: tgetstr
X *
X * Purpose: get terminal capability string from database.
X *
X * Calling conventions: id is the two character capability id.
X * (*buf) points into a hold buffer for the
X * id. the capability is copied into the buffer
X * and (*buf) is advanced to point to the next
X * free byte in the buffer.
X *
X * Returned values: 0 = no such entry, otherwise returns original
X * (*buf) (now a pointer to the string).
X *
X * Notes
X * It also decodes certain escape sequences in the buffer.
X * they should be obvious from the code:
X * \E = escape.
X * \n, \r, \t, \f, \b match the 'c' escapes.
X * ^x matches control-x (^@...^_).
X * \nnn matches nnn octal.
X * \x, where x is anything else, matches x. I differ
X * from the standard library here, in that I allow ^: to match
X * :.
X *
X */
X
Xchar *
Xtgetstr(id, buf)
Xchar *id, **buf;
X{
X int len = strlen(id);
X char *tmp=tent;
X char *hold;
X int i;
X
X do {
X tmp = _find(tmp, ":"); /* For each field */
X while (*tmp == ':') /* skip empty fields */
X tmp++;
X if (!*tmp)
X break;
X
X if (_match(id, tmp) == len) {
X tmp += len; /* find '=' '@' or '#' */
X if (*tmp == '@') /* :xx@: entry for tc */
X return 0; /* deleted entry */
X hold= *buf;
X while (*++tmp && *tmp != ':') {/* not at end of field */
X switch(*tmp) {
X case '\\': /* Expand escapes here */
X switch(*++tmp) {
X case 0: /* ignore backslashes */
X tmp--; /* at end of entry */
X break; /* shouldn't happen */
X case 'e':
X case 'E': /* ESC */
X *(*buf)++ = '\033';
X break;
X case 'n': /* \n */
X *(*buf)++ = '\n';
X break;
X case 'r': /* \r */
X *(*buf)++ = '\r';
X break;
X case 't': /* \t */
X *(*buf)++ = '\t';
X break;
X case 'b': /* \b */
X *(*buf)++ = '\b';
X break;
X case 'f': /* \f */
X *(*buf)++ = '\f';
X break;
X case '0': /* \nnn */
X case '1':
X case '2':
X case '3':
X case '4':
X case '5':
X case '6':
X case '7':
X case '8':
X case '9':
X **buf = 0;
X /* get up to three digits */
X for (i = 0; i < 3 && isdigit(*tmp); ++i)
X **buf = **buf * 8 + *tmp++ - '0';
X (*buf)++;
X tmp--;
X break;
X default: /* \x, for all other x */
X *(*buf)++= *tmp;
X }
X break;
X case '^': /* control characters */
X *(*buf)++ = *++tmp - '@';
X break;
X default:
X *(*buf)++ = *tmp;
X }
X }
X *(*buf)++ = 0;
X return hold;
X }
X } while (*tmp);
X


X return 0;
X}
X

X/*
X * Module: tgoto
X *
X * Purpose: decode cm cursor motion string.
X *
X * Calling conventions: cm is cursor motion string.
X * line, col, are the desired destination.
X *
X * Returned values: a string pointing to the decoded string, or
X * "OOPS" if it cannot be decoded.
X *
X * Notes
X * The accepted escapes are:
X * %d as in printf, 0 origin.
X * %2, %3 like %02d, %03d in printf.
X * %. like %c
X * %+x adds <x> to value, then %.
X * %>xy if value>x, adds y. No output.
X * %i increments line& col, no output.
X * %r reverses order of line&col. No output.
X * %% prints as a single %.
X * %n exclusive or row & col with 0140.
X * %B BCD, no output.
X * %D reverse coding (x-2*(x%16)), no output.
X */
X
Xchar *
Xtgoto(cm, col, line)
Xchar *cm; /* cm string, from termcap */
Xint col, /* column, x position */
X line; /* line, y position */
X{
X char gx, gy, /* x, y */
X *ptr, /* pointer in 'cm' */
X reverse = 0, /* reverse flag */
X *bufp, /* pointer in returned string */
X addup = 0, /* add upline */
X addbak = 0, /* add backup */
X c;
X static char buffer[32];
X
X if (!cm)
X return "OOPS"; /* Kludge, but standard */
X
X bufp = buffer;
X ptr = cm;
X
X while (*ptr) {
X if ((c = *ptr++) != '%') { /* normal char */
X *bufp++ = c;
X } else { /* % escape */
X switch(c = *ptr++) {
X case 'd': /* decimal */
X bufp = _addfmt(bufp, "%d", line);
X line = col;
X break;
X case '2': /* 2 digit decimal */
X bufp = _addfmt(bufp, "%02d", line);
X line = col;
X break;
X case '3': /* 3 digit decimal */
X bufp = _addfmt(bufp, "%03d", line);
X line = col;
X break;
X case '>': /* %>xy: if >x, add y */
X gx = *ptr++;
X gy = *ptr++;
X if (col>gx) col += gy;
X if (line>gx) line += gy;
X break;
X case '+': /* %+c: add c */
X line += *ptr++;
X case '.': /* print x/y */
X if (line == '\t' || /* these are */
X line == '\n' || /* chars that */
X line == '\004' || /* UNIX hates */
X line == '\0') {
X line++; /* so go to next pos */
X if (reverse == (line == col))
X addup=1; /* and mark UP */
X else
X addbak=1; /* or BC */
X }
X *bufp++=line;
X line = col;
X break;
X case 'r': /* r: reverse */
X gx = line;
X line = col;
X col = gx;
X reverse = 1;
X break;
X case 'i': /* increment (1-origin screen) */
X col++;
X line++;
X break;
X case '%': /* %%=% literally */
X *bufp++='%';
X break;
X case 'n': /* magic DM2500 code */
X line ^= 0140;
X col ^= 0140;
X break;
X case 'B': /* bcd encoding */
X line = line/10<<4+line%10;
X col = col/10<<4+col%10;
X break;
X case 'D': /* magic Delta Data code */
X line = line-2*(line&15);
X col = col-2*(col&15);
X break;
X default: /* Unknown escape */
X return "OOPS";
X }
X }
X }
X
X if (addup) /* add upline */
X if (UP) {
X ptr=UP;
X while (isdigit(*ptr) || *ptr == '.')
X ptr++;
X if (*ptr == '*')
X ptr++;
X while (*ptr)
X *bufp++ = *ptr++;
X }
X
X if (addbak) /* add backspace */
X if (BC) {
X ptr=BC;
X while (isdigit(*ptr) || *ptr == '.')
X ptr++;
X if (*ptr == '*')
X ptr++;
X while (*ptr)
X *bufp++ = *ptr++;
X }
X else
X *bufp++='\b';
X
X *bufp = 0;
X
X return(buffer);
X}
X
X/*
X * Module: tinit
X *
X * Purpose: simplified terminal initialisation.
X *
X * Calling conventions: name is name of terminal.
X *
X * Returned values: none.
X *
X * Notes
X * tinit calls tgetent, then sets up the global
X * variables PC, UP, BC, ospeed appropriately.
X *
X */
X
X#if 0 /* already included in term.c */
X
Xchar tbuf[TBUFSZ]; /* Buffer for termcap entry */
Xchar junkbuf[TBUFSZ]; /* Big buffer for junk */
Xchar *junkptr;
X
Xtinit(name)
Xchar *name;
X{
X#ifndef AMIGA
X struct sgttyb sgbuf;
X#endif
X char *ps;
X
X junkptr = junkbuf;
X
X tgetent(tbuf, name);
X
X ps = tgetstr("pc", &junkptr);
X if (ps) PC = *ps;
X UP = tgetstr("up", &junkptr);
X BC = tgetstr("bc", &junkptr);
X
X#ifdef AMIGA
X ospeed=0;
X#else
X gtty(1, &sgbuf);
X ospeed=sgbuf.sg_ospeed;
X#endif
X return 0;
X}
X#endif
X
X/*
X * Module: tputs
X *
X * Purpose: decode padding information
X *
X * Calling conventions: cp = string to be padded, affcnt = # of items
X * affected (lines, characters, whatever),
X * outc = routine to output 1 character.
X *
X * Returned values: none
X *
X * Notes
X * cp has padding information ahead of it, in the form
X * nnnTEXT or nnn*TEXT. nnn is the number of milliseconds to delay,
X * and may be a decimal (nnn.mmm). If the asterisk is given, then
X * the delay is multiplied by afcnt. The delay is produced by outputting
X * a number of nulls (or other padding char) after printing the
X * TEXT.
X *
X */
X
Xlong _bauds[16]={
X 0, 50, 75, 110,
X 134, 150, 200, 300,
X 600, 1200, 1800, 2400,
X 4800, 9600, 19200, 19200 };
X
Xtputs(cp, affcnt, outc)
Xchar *cp; /* string to print */
Xint affcnt; /* Number of lines affected */
Xvoid (*outc) __ARGS((unsigned int)); /* routine to output 1 character */
X{
X long frac, /* 10^(#digits after decimal point) */
X counter, /* digits */
X atol();
X
X if (isdigit(*cp)) {
X counter = 0;
X frac = 1000;
X while (isdigit(*cp))
X counter = counter * 10L + (long)(*cp++ - '0');
X if (*cp == '.')
X while (isdigit(*++cp)) {
X counter = counter * 10L + (long)(*cp++ - '0');
X frac = frac * 10;
X }
X if (*cp!='*') { /* multiply by affected lines */
X if (affcnt>1) affcnt = 1;
X }
X else
X cp++;
X
X /* Calculate number of characters for padding counter/frac ms delay */
X if (ospeed)
X counter = (counter * _bauds[ospeed] * (long)affcnt) / frac;
X
X while (*cp) /* output string */
X (*outc)(*cp++);
X if (ospeed)
X while (counter--) /* followed by pad characters */
X (*outc)(PC);
X }
X else
X while (*cp)
X (*outc)(*cp++);


X return 0;
X}
X

X/*
X * Module: tutil.c
X *
X * Purpose: Utility routines for TERMLIB functions.
X *
X */
X
X static int
X_match(s1, s2) /* returns length of text common to s1 and s2 */
Xchar *s1, *s2;
X{
X int i = 0;
X
X while (s1[i] && s1[i] == s2[i])
X i++;
X
X return i;
X}
X
X static char *
X_find(s, set) /* finds next c in s that's a member of set, returns pointer */
Xchar *s, *set;
X{
X for(; *s; s++) {
X char *ptr = set;
X
X while (*ptr && *s != *ptr)
X ptr++;
X
X if (*ptr)
X return s;
X }
X
X return s;
X}
X
X static char *
X_addfmt(buf, fmt, val) /* add val to buf according to format fmt */
Xchar *buf, *fmt;
Xint val;
X{
X sprintf(buf, fmt, val);
X while (*buf)
X buf++;


X return buf;
X}
END_OF_FILE

if test 15527 -ne `wc -c <'vim/src/termlib.c'`; then
echo shar: \"'vim/src/termlib.c'\" unpacked with wrong size!
fi
chmod +x 'vim/src/termlib.c'
# end of 'vim/src/termlib.c'
fi
if test -f 'vim/src/undo.c' -a "${1}" != "-c" ; then
echo shar: Will not clobber existing file \"'vim/src/undo.c'\"
else
echo shar: Extracting \"'vim/src/undo.c'\" \(14257 characters\)
sed "s/^X//" >'vim/src/undo.c' <<'END_OF_FILE'


X/* vi:ts=4:sw=4
X *
X * VIM - Vi IMproved
X *
X * Code Contributions By: Bram Moolenaar mo...@oce.nl
X * Tim Thompson twitch!tjt
X * Tony Andrews onecom!wldrdg!tony
X * G. R. (Fred) Walter watmath!watcgl!grwalter
X */
X
X/*

X * undo.c: multi level undo facility
X *