home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Usenet 1994 October
/
usenetsourcesnewsgroupsinfomagicoctober1994disk2.iso
/
misc
/
volume44
/
vim
/
part24
< prev
next >
Wrap
Internet Message Format
|
1994-08-18
|
70KB
From: mool@oce.nl (Bram Moolenaar)
Newsgroups: comp.sources.misc
Subject: v44i043: vim - Vi IMproved editor, v3.0, Part24/26
Date: 18 Aug 1994 14:04:00 -0500
Organization: Sterling Software
Sender: kent@sparky.sterling.com
Approved: kent@sparky.sterling.com
Message-ID: <330bb0$e95@sparky.sterling.com>
X-Md4-Signature: 5e953e87198119911a34e710eff73f40
Submitted-by: mool@oce.nl (Bram Moolenaar)
Posting-number: Volume 44, Issue 43
Archive-name: vim/part24
Environment: UNIX, AMIGA, MS-DOS, Windows NT
Supersedes: vim: Volume 41, Issue 50-75
#! /bin/sh
# This is a shell archive. Remove anything before this line, then feed it
# into a shell via "sh file" or similar. To overwrite existing files,
# type "sh file -c".
# Contents: vim/doc/Amiga.doc vim/doc/msdos.doc vim/src/alloc.c
# vim/src/arp_proto.h vim/src/cmdtab.tab vim/src/help.c
# vim/src/linefunc.c vim/src/makefile.archie vim/src/makefile.bcc
# vim/src/makefile.dice vim/src/param.h vim/src/unix.h vim/termcap
# Wrapped by kent@sparky on Mon Aug 15 21:44:15 1994
PATH=/bin:/usr/bin:/usr/ucb:/usr/local/bin:/usr/lbin:$PATH ; export PATH
echo If this archive is complete, you will see the following message:
echo ' "shar: End of archive 24 (of 26)."'
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'\" \(2310 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 codes:
X t_ti (for inverted text)
X t_tb (for bold text)
X t_tp (for normal text after t_ti and t_tb)
X t_so (for standout mode)
X t_se (for normal text after t_so)
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 2310 -ne `wc -c <'vim/doc/Amiga.doc'`; then
echo shar: \"'vim/doc/Amiga.doc'\" unpacked with wrong size!
fi
# end of 'vim/doc/Amiga.doc'
fi
if test -f 'vim/doc/msdos.doc' -a "${1}" != "-c" ; then
echo shar: Will not clobber existing file \"'vim/doc/msdos.doc'\"
else
echo shar: Extracting \"'vim/doc/msdos.doc'\" \(7386 characters\)
sed "s/^X//" >'vim/doc/msdos.doc' <<'END_OF_FILE'
XThis file contains the particularities for the MSDOS version of Vim.
X
XKnown problem: When using smartdrive with write-behind caching, it is
Xpossible that Vim will try to create a swap file on a read-only file system
X(e.g. write protected floppy). You will then be given the message
X "A serious disk error has occurred .., Retry (r)? "
XThere is nothing you can do but unprotecting the floppy or switch off the
Xcomputer. Even CTRL-ALT-DEL will not get you out of this. This is really a
Xproblem of smartdrive, not Vim. Smartdrive works fine otherwise. If this
Xbothers you don't use the write-behind caching.
X
XThe default output method for the screen is to use bios calls. This will work
Xright away on most systems. You do not need ansi.sys. You can use ":mode" to
Xset the current screen mode. See reference.doc, section 20.3.
X
XYou can set the color used in vim with five termcap options:
X
X ":set t_ti=^V^[\|xxm" start of invert mode
X ":set t_tb=^V^[\|xxm" start of bold mode
X ":set t_tp=^V^[\|xxm" back to normal text
X
X ":set t_so=^V^[\|xxm" start of standout mode
X ":set t_se=^V^[\|xxm" back to normal text
X
XWhich of the three modes is used for which action depends on the 'highlight'
X('hl') option. See reference.doc.
X
X^V is CTRL-V
X^[ is ESC
Xxx must be replaced by a decimal code: The foreground color number and
X background color number added together:
X
XCOLOR FOREGROUND BACKGROUND
Xblack 0 0
Xblue 1 16
Xgreen 2 32
Xcyan 3 48
Xred 4 64
Xmagenta 5 80
Xbrown 6 96
Xlighgray 7 112
Xdarkgray 8
Xlightblue 9
Xlightgreen 10
Xlighcyan 11
Xlightred 12
Xlighmagenta 13
Xyellow 14
Xwhite 15
Xblink 128
X
XWhen you use 0, the color is reset to the one used when you started Vim. This
Xis the default for t_tp. The default for t_ti is black on grey, 0 + 112 = 112.
XThe default for t_tb is white on cyan, 15 + 48 = 63. The default for t_so is
Xwhite on blue, 15 + 16 = 31. These colors where choosen, because the also look
Xgood when using an inverted display. But you can change them as you like.
X
XThe termcap codes that are translated into bios calls are:
X ESC |J clear screen
X ESC |K clear to end of line
X ESC |L insert line
X ESC |M delete line
X ESC |row;colH position cursor
X ESC |attrm set character attribute
X
XIf you set these with the ":set" command, don't forget to put a backslash
Xbefore the '|', otherwise it will be recognized as the end of the command.
X
XIf you want to use another output method (e.g. when using a terminal on a COM
Xport), set the terminal name to "pcansi". You can change the termcap options
Xwhen needed (see chapter 20 of reference.doc). Note that the normal IBM
Xansi.sys does not support all the codes of the builtin pcansi terminal. If
Xyou use ansi.sys you will need to delete the termcap entries t_il and t_dl
Xwith
X ":set t_il= t_dl=".
XOtherwise the screen will not be updated correctly. It is better to use
Xnansi.sys, nnansi.sys or the like instead of ansi.sys.
X
XIf you want to use Vim on a terminal connected to a COM: port, reset the
X'bioskey' option. Otherwise the commands will be read from the PC keyboard.
XCTRL-C and CTRL-P may not work correctly with 'bioskey' reset.
X
XIf the "tx" (textmode) option is set (which is the default), Vim will accept a
Xsingle <LF> or a <CR><LF> pair for end-of-line. When writing a file Vim will
Xuse <CR><LF>. Thus if you edit a file and write it, <LF> is replaced with
X<CR><LF>. If the "tx" option is not set the single <LF> will be used for
Xend-of-line. A <CR> will be shown as ^M. You can use Vim to replace <LF> by
X<CR><LF> by reading in any mode and writing in text mode. You can use Vim to
Xreplace <CR><LF> by <LF> by reading in text mode and writing in non-text
Xmode. 'textmode' is set automatically when 'textauto' is on (which is the
Xdefault), so you don't really have to worry about what you are doing.
X
XIf you want to edit a script file or a binary file you should reset the
X'textmode' and 'textauto' options before loading the file. Script files
Xcontain single <LF> characters which would be replaced by <CR><LF>. You can
Xdo this by starting Vim with the "-b" (binary) option.
X
XThe default help filename is "$VIM\vim.hlp". If the environment variable $VIM
Xis not defined or the file is not found, the DOS search path is used to
Xsearch for the file "vim.hlp". If you do not want to put "vim.hlp" in your
Xsearch path, use the command ":set helpfile=pathname" to tell Vim where the
Xhelp file is.
X
XThe ":cd" command recognizes the drive specifier and changes the current
Xdrive. Use ":cd c:" to make drive C the active drive. Use ":cd d:\dos" to go
Xto the directory "dos" in the root of drive D.
X
XThe files "_vimrc" and "_exrc" are used instead of ".vimrc" and ".exrc".
XThe files "$VIM\_vimrc" and "$VIM\_exrc" are used instead of "s:.vimrc" and
X"s:.exrc". To use the file "c:\_vimrc" use the command "set vim=c:".
X
XUse CTRL-break instead of CTRL-C to interrupt searches. The CTRL-C is not
Xdetected until a key is read.
X
XUse CTRL-arrow-left and CTRL-arrow-right instead of SHIFT-arrow-left and
XSHIFT-arrow-right. The arrow-up and arrow-down cannot be used with SHIFT or
XCTRL.
X
XTemporary files (for filtering) are put in the current directory.
X
XThe default for the sh (shell) option is "command". If COMSPEC is defined it
Xis used instead. External commands are started with "command /c
X<command_name>". Typing CTRL-Z starts a new command shell. Return to Vim with
X"exit".
X
XMS-DOS allows for only one filename extention. Therefore, in the original
Xfilename the '.' is replaced by a '_', the name is truncated to 8 characters
Xand the new extention ".vim" or ".bak" is appended. Two examples: "test.c"
Xbecomes "test_c.bak", "ditiseen.tst" becomes "ditiseen.bak". The 'shortname'
Xoption is not available.
X
XThe MS-DOS binary was compiled with Borland-C++ version 3.1, using
Xmakefile.bcc. Other compilers should also work. Use makefile.dos for Turbo-C
X2.0. Use makefile.bcc for other Borland compilers, also Turbo-C++ 3.0 (with
Xsmall changes). If you get all kinds of strange error messages when compiling,
Xyou have to add <CR> characters at the end of each line. This can be done with
Xthe addcr program: "make addcr". This will compile addcr.c to addcr.exe and
Xexecute the addcr.bat file. Sometimes this fails. Then execute the addcr.bat
Xfile from the DOS prompt.
X
XThe "spawno" library by Ralf Brown was used in order to free memory when Vim
Xstarts a shell or other external command. Only about 200 bytes are taken from
Xconventional memory. When recompiling get the spawno library from Simtel,
Xdirectory "msdos/c". It is called something like "spwno413.zip". Or remove the
Xlibrary from the makefile.
X
XA swap file is used to store most of the text. You should be able to edit very
Xlarge files. However, memory is used for undo and other things. If you delete
Xa lot of text you can still run out of memory.
X
XIf Vim gives an "Out of memory" warning you should stop editing. Result of
Xfurther editing actions is unpredictable. Setting 'undolevels' to 0 saves some
Xmemory. Running the maze macros on a big maze is guaranteed to run out of
Xmemory, because each change is remembered for undo. In this case set
X'undolevels' to a negative number. This will switch off undo completely. In a
Xfuture release extended memory will be used to avoid these problems.
X
XThe *.info files are for the Amiga. You don't need them with MSDOS.
END_OF_FILE
if test 7386 -ne `wc -c <'vim/doc/msdos.doc'`; then
echo shar: \"'vim/doc/msdos.doc'\" unpacked with wrong size!
fi
# end of 'vim/doc/msdos.doc'
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'\" \(4132 characters\)
sed "s/^X//" >'vim/src/alloc.c' <<'END_OF_FILE'
X/* vi:ts=4:sw=4
X *
X * VIM - Vi IMproved by Bram Moolenaar
X *
X * Read the file "credits.txt" for a list of people who contributed.
X * Read the file "uganda.txt" for copying and usage conditions.
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/*
X * Some memory is reserved for error messages and for being able to
X * call mf_release_all(), which needs some memory for mf_trans_add().
X */
X#define KEEP_ROOM 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_u *
Xalloc(size)
X unsigned size;
X{
X return (lalloc((long_u)size, TRUE));
X}
X
X char_u *
Xlalloc(size, message)
X long_u size;
X int message;
X{
X register char_u *p; /* pointer to new storage space */
X static int releasing = FALSE; /* don't do mf_release_all() recursive */
X int try_again;
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 /*
X * If out of memory, try to release some memfile blocks.
X * If some blocks are released call malloc again.
X */
X for (;;)
X {
X if ((p = (char_u *)malloc(size)) != NULL)
X {
X if (mch_avail_mem(TRUE) < KEEP_ROOM && !releasing)
X { /* System is low... no go! */
X free((char *)p);
X p = NULL;
X }
X }
X /*
X * Remember that mf_release_all() is being called to avoid an endless loop,
X * because mf_release_all() may call alloc() recursively.
X */
X if (p != NULL || releasing)
X break;
X releasing = TRUE;
X try_again = mf_release_all();
X releasing = FALSE;
X if (!try_again)
X break;
X }
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_u *
Xstrsave(string)
X char_u *string;
X{
X char_u *p;
X
X p = alloc((unsigned) (STRLEN(string) + 1));
X if (p != NULL)
X STRCPY(p, string);
X return p;
X}
X
X char_u *
Xstrnsave(string, len)
X char_u *string;
X int len;
X{
X char_u *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_u *ptr;
X size_t count;
X{
X register size_t i = count;
X register char_u *p = ptr;
X
X while (i--)
X *p++ = ' ';
X}
X
X/*
X * delete spaces at the end of the string
X */
X void
Xdel_spaces(ptr)
X char_u *ptr;
X{
X char_u *q;
X
X q = ptr + STRLEN(ptr);
X while (--q > ptr && isspace(q[0]) && q[-1] != '\\' && q[-1] != Ctrl('V'))
X *q = NUL;
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 *
X#ifdef __sgi
Xmemmove(desti, source, len)
X void *source, *desti;
X size_t len;
X#else
Xmemmove(desti, source, len)
X void *source, *desti;
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
X
X/*
X * compare two strings, ignoring case
X * return 0 for match, 1 for difference
X */
X int
Xvim_strnicmp(s1, s2, len)
X char_u *s1;
X char_u *s2;
X size_t len;
X{
X while (len)
X {
X if (TO_UPPER(*s1) != TO_UPPER(*s2))
X return 1; /* this character different */
X if (*s1 == NUL)
X return 0; /* strings match until NUL */
X ++s1;
X ++s2;
X --len;
X }
X return 0; /* strings match */
X}
END_OF_FILE
if test 4132 -ne `wc -c <'vim/src/alloc.c'`; then
echo shar: \"'vim/src/alloc.c'\" unpacked with wrong size!
fi
# end of 'vim/src/alloc.c'
fi
if test -f 'vim/src/arp_proto.h' -a "${1}" != "-c" ; then
echo shar: Will not clobber existing file \"'vim/src/arp_proto.h'\"
else
echo shar: Extracting \"'vim/src/arp_proto.h'\" \(6655 characters\)
sed "s/^X//" >'vim/src/arp_proto.h' <<'END_OF_FILE'
X#ifndef PROTO_ARP_H
X#define PROTO_ARP_H 1
X
X/*
X ************************************************************************
X * The arp copies of the dos.library calls... *
X ************************************************************************
X */
X
X/* Only include these if you can use ARP.library without dos.library... */
X#ifdef DO_ARP_COPIES
X#pragma amicall(ArpBase, 0x1E, Open(d1, d2))
X#pragma amicall(ArpBase, 0x24, Close(d1))
X#pragma amicall(ArpBase, 0x2A, Read(d1, d2, d3))
X#pragma amicall(ArpBase, 0x30, Write(d1, d2, d3))
X#pragma amicall(ArpBase, 0x36, Input())
X#pragma amicall(ArpBase, 0x3C, Output())
X#pragma amicall(ArpBase, 0x42, Seek(d1, d2, d3))
X#pragma amicall(ArpBase, 0x48, DeleteFile(d1))
X#pragma amicall(ArpBase, 0x4E, Rename(d1, d2))
X#pragma amicall(ArpBase, 0x54, Lock(d1, d2))
X#pragma amicall(ArpBase, 0x5A, UnLock(d1))
X#pragma amicall(ArpBase, 0x60, DupLock(d1))
X#pragma amicall(ArpBase, 0x66, Examine(d1, d2))
X#pragma amicall(ArpBase, 0x6C, ExNext(d1, d2))
X#pragma amicall(ArpBase, 0x72, Info(d1, d2))
X#pragma amicall(ArpBase, 0x78, CreateDir(d1))
X#pragma amicall(ArpBase, 0x7E, CurrentDir(d1))
X#pragma amicall(ArpBase, 0x84, IoErr())
X#pragma amicall(ArpBase, 0x8A, CreateProc(d1, d2, d3, d4))
X#pragma amicall(ArpBase, 0x90, Exit(d1))
X#pragma amicall(ArpBase, 0x96, LoadSeg(d1))
X#pragma amicall(ArpBase, 0x9C, UnLoadSeg(d1))
X#pragma amicall(ArpBase, 0xAE, DeviceProc(d1))
X#pragma amicall(ArpBase, 0xB4, SetComment(d1, d2))
X#pragma amicall(ArpBase, 0xBA, SetProtection(d1, d2))
X#pragma amicall(ArpBase, 0xC0, DateStamp(d1))
X#pragma amicall(ArpBase, 0xC6, Delay(d1))
X#pragma amicall(ArpBase, 0xCC, WaitForChar(d1, d2))
X#pragma amicall(ArpBase, 0xD2, ParentDir(d1))
X#pragma amicall(ArpBase, 0xD8, IsInteractive(d1))
X#pragma amicall(ArpBase, 0xDE, Execute(d1, d2, d3))
X#endif
X
X/*
X ************************************************************************
X * Stuff only in arp.library *
X ************************************************************************
X */
X/* amicall(ArpBase, 0x0E4, Printf(a0, a1)) This does not work without glue */
X/* amicall(ArpBase, 0x0EA, FPrintf(d0, a0, a1)) This does not work without glue */
X#pragma amicall(ArpBase, 0x0F0, Puts(a1))
X#pragma amicall(ArpBase, 0x0F6, Readline(a0))
X#pragma amicall(ArpBase, 0x0FC, GADS(a0, d0, a1, a2, a3))
X#pragma amicall(ArpBase, 0x102, Atol(a0))
X#pragma amicall(ArpBase, 0x108, EscapeString(a0))
X#pragma amicall(ArpBase, 0x10E, CheckAbort(a1))
X#pragma amicall(ArpBase, 0x114, CheckBreak(d1, a1))
X#pragma amicall(ArpBase, 0x11A, Getenv(a0, a1, d0))
X#pragma amicall(ArpBase, 0x120, Setenv(a0, a1))
X#pragma amicall(ArpBase, 0x126, FileRequest(a0))
X#pragma amicall(ArpBase, 0x12C, CloseWindowSafely(a0, a1))
X#pragma amicall(ArpBase, 0x132, CreatePort(a0, d0))
X#pragma amicall(ArpBase, 0x138, DeletePort(a1))
X#pragma amicall(ArpBase, 0x13E, SendPacket(d0, a0, a1))
X#pragma amicall(ArpBase, 0x144, InitStdPacket(d0, a0, a1, a2))
X#pragma amicall(ArpBase, 0x14A, PathName(d0, a0, d1))
X#pragma amicall(ArpBase, 0x150, Assign(a0, a1))
X#pragma amicall(ArpBase, 0x156, DosAllocMem(d0))
X#pragma amicall(ArpBase, 0x15C, DosFreeMem(a1))
X#pragma amicall(ArpBase, 0x162, BtoCStr(a0, d0, d1))
X#pragma amicall(ArpBase, 0x168, CtoBStr(a0, d0, d1))
X#pragma amicall(ArpBase, 0x16E, GetDevInfo(a2))
X#pragma amicall(ArpBase, 0x174, FreeTaskResList())
X#pragma amicall(ArpBase, 0x17A, ArpExit(d0, d2))
X#pragma amicall(ArpBase, 0x180, ArpAlloc(d0))
X/* amicall(ArpBase, 0x186, ArpAllocMem(d0, d1)) Secondary result - IoErr() */
X/* amicall(ArpBase, 0x18C, ArpOpen(d1, d2)) Secondary result - IoErr() */
X/* amicall(ArpBase, 0x192, ArpDupLock(d1)) Secondary result - IoErr() */
X/* amicall(ArpBase, 0x198, ArpLock(d1, d2)) Secondary result - IoErr() */
X/* amicall(ArpBase, 0x19E, RListAlloc(a0, d0)) Secondary result - IoErr() */
X#pragma amicall(ArpBase, 0x1A4, FindCLI(d0))
X#pragma amicall(ArpBase, 0x1AA, QSort(a0, d0, d1, a1))
X
X#pragma amicall(ArpBase, 0x1B0, PatternMatch(a0, a1))
X#pragma amicall(ArpBase, 0x1B6, FindFirst(d0, a0))
X#pragma amicall(ArpBase, 0x1BC, FindNext(a0))
X#pragma amicall(ArpBase, 0x1C2, FreeAnchorChain(a0))
X
X#pragma amicall(ArpBase, 0x1C8, CompareLock(d0, d1))
X
X#pragma amicall(ArpBase, 0x1CE, FindTaskResList())
X#pragma amicall(ArpBase, 0x1D4, CreateTaskResList())
X#pragma amicall(ArpBase, 0x1DA, FreeResList(a1))
X#pragma amicall(ArpBase, 0x1E0, FreeTrackedItem(a1))
X/* amicall(ArpBase, 0x1E6, GetTracker()) Stores the ID in the tracker */
X
X#pragma amicall(ArpBase, 0x1EC, GetAccess(a1))
X#pragma amicall(ArpBase, 0x1F2, FreeAccess(a1))
X
X#pragma amicall(ArpBase, 0x1F8, FreeDAList(a1))
X#pragma amicall(ArpBase, 0x1FE, AddDANode(a0, a1, d0, d1))
X#pragma amicall(ArpBase, 0x204, AddDADevs(a0, d0))
X
X#pragma amicall(ArpBase, 0x20A, Strcmp(a0, a1))
X#pragma amicall(ArpBase, 0x210, Strncmp(a0, a1, d0))
X#pragma amicall(ArpBase, 0x216, Toupper(d0))
X#pragma amicall(ArpBase, 0x21C, SyncRun(a0, a1, d0, d1))
X
X/*
X ************************************************************************
X * Added V32 of arp.library *
X * Note that SpawnShell is ASyncRun but was added at V39 of arp... *
X ************************************************************************
X */
X#pragma amicall(ArpBase, 0x222, ASyncRun(a0, a1, a2))
X#pragma amicall(ArpBase, 0x222, SpawnShell(a0, a1, a2))
X#pragma amicall(ArpBase, 0x228, LoadPrg(d1))
X#pragma amicall(ArpBase, 0x22E, PreParse(a0, a1))
X
X/*
X ************************************************************************
X * Added V33 of arp.library *
X ************************************************************************
X */
X#pragma amicall(ArpBase, 0x234, StamptoStr(a0))
X#pragma amicall(ArpBase, 0x23A, StrtoStamp(a0))
X
X#pragma amicall(ArpBase, 0x240, ObtainResidentPrg(a0))
X#pragma amicall(ArpBase, 0x246, AddResidentPrg(d1, a0))
X#pragma amicall(ArpBase, 0x24C, RemResidentPrg(a0))
X#pragma amicall(ArpBase, 0x252, UnLoadPrg(d1))
X#pragma amicall(ArpBase, 0x258, LMult(d0, d1))
X#pragma amicall(ArpBase, 0x25E, LDiv(d0, d1))
X#pragma amicall(ArpBase, 0x264, LMod(d0, d1))
X
X#pragma amicall(ArpBase, 0x26A, CheckSumPrg(d1))
X#pragma amicall(ArpBase, 0x270, TackOn(a0, a1))
X#pragma amicall(ArpBase, 0x276, BaseName(a0))
X#pragma amicall(ArpBase, 0x27C, ReleaseResidentPrg(d1))
X
X/*
X ************************************************************************
X * Added V36 of arp.library *
X ************************************************************************
X */
X/* amicall(ArpBase, 0x282, SPrintf(d0, a0, a1)) This does not work without glue */
X#pragma amicall(ArpBase, 0x288, GetKeywordIndex(a0, a1))
X/* amicall(ArpBase, 0x28E, ArpOpenLibrary(a1, d0)) Secondary result - IoErr() */
X#pragma amicall(ArpBase, 0x294, ArpAllocFreq())
X
X#endif
END_OF_FILE
if test 6655 -ne `wc -c <'vim/src/arp_proto.h'`; then
echo shar: \"'vim/src/arp_proto.h'\" unpacked with wrong size!
fi
# end of 'vim/src/arp_proto.h'
fi
if test -f 'vim/src/cmdtab.tab' -a "${1}" != "-c" ; then
echo shar: Will not clobber existing file \"'vim/src/cmdtab.tab'\"
else
echo shar: Extracting \"'vim/src/cmdtab.tab'\" \(8606 characters\)
sed "s/^X//" >'vim/src/cmdtab.tab' <<'END_OF_FILE'
X/* vi:ts=4
X *
X * VIM - Vi IMproved
X *
X * Code Contributions By: Bram Moolenaar mool@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 is read by mkcmdtab to produce cmdtab.h.
X *
X * The bars are used to recognize file positions. Do not insert/delete them.|
X */
X
X#define RANGE 0x01 /* allow a linespecs */
X#define BANG 0x02 /* allow a ! after the command name */
X#define EXTRA 0x04 /* allow extra args after command name */
X#define XFILE 0x08 /* expand wildcards in extra part */
X#define NOSPC 0x10 /* no spaces allowed in the extra part */
X#define DFLALL 0x20 /* default file range is 1,$ */
X#define NODFL 0x40 /* do not default to the current file name */
X#define NEEDARG 0x80 /* argument required */
X#define TRLBAR 0x100 /* check for trailing vertical bar */
X#define REGSTR 0x200 /* allow "x for register designation */
X#define COUNT 0x400 /* allow count in argument, after command */
X#define NOTRLCOM 0x800 /* no trailing comment allowed */
X#define ZEROR 0x1000 /* zero line number allowed */
X#define USECTRLV 0x2000 /* do not remove CTRL-V from argument */
X#define NOTADR 0x4000 /* number before command is not an address */
X#define FILES (XFILE + EXTRA) /* multiple extra files allowed */
X#define WORD1 (EXTRA + NOSPC) /* one extra word allowed */
X#define FILE1 (FILES + NOSPC) /* 1 file allowed, defaults to current file */
X#define NAMEDF (FILE1 + NODFL) /* 1 file allowed, defaults to "" */
X#define NAMEDFS (FILES + NODFL) /* multiple files allowed, default is "" */
X
X/*
X * This array maps ex command names to command codes. The order in which
X * command names are listed below is significant -- ambiguous abbreviations
X * are always resolved to be the first possible match (e.g. "r" is taken
X * to mean "read", not "rewind", because "read" comes before "rewind").
X * Not supported commands are included to avoid ambiguities.
X */
Xstatic struct
X{
X char_u *cmd_name; /* name of the command */
X short cmd_argt; /* command line arguments permitted/needed/used */
X} cmdnames[] =
X{
X| {(char_u *)"append", BANG+RANGE+TRLBAR}, /* not supported */
X {(char_u *)"all", TRLBAR},
X {(char_u *)"abbreviate", EXTRA+TRLBAR+NOTRLCOM+USECTRLV},
X {(char_u *)"args", RANGE+NOTADR+BANG+NAMEDFS},
X {(char_u *)"argument", BANG+RANGE+NOTADR+COUNT+EXTRA},
X {(char_u *)"buffer", RANGE+NOTADR+COUNT+TRLBAR},
X {(char_u *)"ball", TRLBAR},
X {(char_u *)"buffers", TRLBAR},
X {(char_u *)"bdelete", BANG+RANGE+NOTADR+COUNT+EXTRA+TRLBAR},
X {(char_u *)"bunload", BANG+RANGE+NOTADR+COUNT+EXTRA+TRLBAR},
X {(char_u *)"bmodified", RANGE+NOTADR+COUNT+TRLBAR},
X {(char_u *)"bnext", RANGE+NOTADR+COUNT+TRLBAR},
X {(char_u *)"bNext", RANGE+NOTADR+COUNT+TRLBAR},
X {(char_u *)"bprevious", RANGE+NOTADR+COUNT+TRLBAR},
X {(char_u *)"brewind", RANGE+TRLBAR},
X {(char_u *)"blast", RANGE+TRLBAR},
X {(char_u *)"change", BANG+RANGE+COUNT+TRLBAR}, /* not supported */
X {(char_u *)"cabbrev", EXTRA+TRLBAR+NOTRLCOM+USECTRLV},
X {(char_u *)"cc", TRLBAR+WORD1+BANG},
X {(char_u *)"cd", NAMEDF+TRLBAR},
X {(char_u *)"center", TRLBAR+RANGE+EXTRA},
X {(char_u *)"cf", TRLBAR+FILE1+BANG},
X {(char_u *)"chdir", NAMEDF+TRLBAR},
X {(char_u *)"cl", TRLBAR},
X {(char_u *)"close", BANG+TRLBAR},
X {(char_u *)"cmap", BANG+EXTRA+TRLBAR+NOTRLCOM+USECTRLV},
X {(char_u *)"cn", TRLBAR+WORD1+BANG},
X {(char_u *)"cnoremap", BANG+EXTRA+TRLBAR+NOTRLCOM+USECTRLV},
X {(char_u *)"cnoreabbrev", EXTRA+TRLBAR+NOTRLCOM+USECTRLV},
X {(char_u *)"copy", RANGE+EXTRA+TRLBAR},
X {(char_u *)"cp", TRLBAR+WORD1+BANG},
X {(char_u *)"cq", TRLBAR+BANG},
X {(char_u *)"cunmap", BANG+EXTRA+TRLBAR+USECTRLV},
X {(char_u *)"cunabbrev", EXTRA+TRLBAR+USECTRLV},
X {(char_u *)"delete", RANGE+REGSTR+COUNT+TRLBAR},
X {(char_u *)"display", TRLBAR},
X {(char_u *)"digraphs", EXTRA+TRLBAR},
X {(char_u *)"edit", BANG+FILE1},
X {(char_u *)"ex", BANG+FILE1},
X {(char_u *)"exit", BANG+FILE1+DFLALL+TRLBAR},
X {(char_u *)"file", FILE1+TRLBAR},
X {(char_u *)"files", TRLBAR},
X {(char_u *)"global", RANGE+BANG+EXTRA+DFLALL},
X {(char_u *)"help", TRLBAR},
X {(char_u *)"insert", BANG+RANGE+TRLBAR}, /* not supported */
X {(char_u *)"iabbrev", EXTRA+TRLBAR+NOTRLCOM+USECTRLV},
X {(char_u *)"imap", BANG+EXTRA+TRLBAR+NOTRLCOM+USECTRLV},
X {(char_u *)"inoremap", BANG+EXTRA+TRLBAR+NOTRLCOM+USECTRLV},
X {(char_u *)"inoreabbrev", EXTRA+TRLBAR+NOTRLCOM+USECTRLV},
X {(char_u *)"iunmap", BANG+EXTRA+TRLBAR+USECTRLV},
X {(char_u *)"iunabbrev", EXTRA+TRLBAR+USECTRLV},
X {(char_u *)"join", RANGE+COUNT+TRLBAR},
X {(char_u *)"jumps", TRLBAR},
X {(char_u *)"k", RANGE+WORD1+TRLBAR},
X {(char_u *)"list", RANGE+COUNT+TRLBAR},
X {(char_u *)"last", EXTRA+BANG},
X {(char_u *)"left", TRLBAR+RANGE+EXTRA},
X {(char_u *)"move", RANGE+EXTRA+TRLBAR},
X {(char_u *)"mark", RANGE+WORD1+TRLBAR},
X {(char_u *)"marks", TRLBAR},
X {(char_u *)"map", BANG+EXTRA+TRLBAR+NOTRLCOM+USECTRLV},
X {(char_u *)"make", NEEDARG+EXTRA+TRLBAR+XFILE},
X {(char_u *)"mkexrc", BANG+FILE1+TRLBAR},
X {(char_u *)"mkvimrc", BANG+FILE1+TRLBAR},
X {(char_u *)"mfstat", TRLBAR}, /* for debugging */
X {(char_u *)"mode", WORD1+TRLBAR},
X {(char_u *)"next", RANGE+NOTADR+BANG+NAMEDFS},
X {(char_u *)"new", BANG+FILE1+RANGE+NOTADR},
X {(char_u *)"number", RANGE+COUNT+TRLBAR},
X {(char_u *)"#", RANGE+COUNT+TRLBAR},
X {(char_u *)"noremap", BANG+EXTRA+TRLBAR+NOTRLCOM+USECTRLV},
X {(char_u *)"noreabbrev", EXTRA+TRLBAR+NOTRLCOM+USECTRLV},
X {(char_u *)"Next", EXTRA+RANGE+NOTADR+COUNT+BANG},
X {(char_u *)"only", BANG+TRLBAR},
X {(char_u *)"print", RANGE+COUNT+TRLBAR},
X {(char_u *)"pop", RANGE+NOTADR+COUNT+TRLBAR+ZEROR},
X {(char_u *)"put", RANGE+BANG+REGSTR+TRLBAR},
X {(char_u *)"preserve", TRLBAR},
X {(char_u *)"previous", EXTRA+RANGE+NOTADR+COUNT+BANG},
X {(char_u *)"pwd", TRLBAR},
X {(char_u *)"quit", BANG+TRLBAR},
X {(char_u *)"qall", BANG+TRLBAR},
X {(char_u *)"read", RANGE+NAMEDF+TRLBAR+ZEROR},
X {(char_u *)"rewind", EXTRA+BANG},
X {(char_u *)"recover", FILE1+TRLBAR}, /* not supported */
X {(char_u *)"redo", TRLBAR},
X {(char_u *)"right", TRLBAR+RANGE+EXTRA},
X {(char_u *)"resize", TRLBAR+WORD1},
X {(char_u *)"substitute", RANGE+EXTRA},
X {(char_u *)"sargument", BANG+RANGE+NOTADR+COUNT+EXTRA},
X {(char_u *)"sall", TRLBAR},
X {(char_u *)"sbuffer", RANGE+NOTADR+COUNT+TRLBAR},
X {(char_u *)"sball", TRLBAR},
X {(char_u *)"sbmodified", RANGE+NOTADR+COUNT+TRLBAR},
X {(char_u *)"sbnext", RANGE+NOTADR+COUNT+TRLBAR},
X {(char_u *)"sbNext", RANGE+NOTADR+COUNT+TRLBAR},
X {(char_u *)"sbprevious", RANGE+NOTADR+COUNT+TRLBAR},
X {(char_u *)"sbrewind", TRLBAR},
X {(char_u *)"sblast", TRLBAR},
X {(char_u *)"suspend", TRLBAR+BANG},
X {(char_u *)"set", EXTRA+TRLBAR},
X {(char_u *)"setkeymap", NAMEDF+TRLBAR},
X {(char_u *)"shell", TRLBAR},
X {(char_u *)"sleep", RANGE+COUNT+NOTADR+TRLBAR},
X {(char_u *)"source", NAMEDF+NEEDARG+TRLBAR},
X {(char_u *)"split", BANG+FILE1+RANGE+NOTADR},
X {(char_u *)"snext", RANGE+NOTADR+BANG+NAMEDFS},
X {(char_u *)"sNext", EXTRA+RANGE+NOTADR+COUNT+BANG},
X {(char_u *)"sprevious", EXTRA+RANGE+NOTADR+COUNT+BANG},
X {(char_u *)"srewind", EXTRA+BANG},
X {(char_u *)"slast", EXTRA+BANG},
X {(char_u *)"stop", TRLBAR+BANG},
X {(char_u *)"sunhide", TRLBAR},
X {(char_u *)"swapname", TRLBAR},
X {(char_u *)"t", RANGE+EXTRA+TRLBAR},
X {(char_u *)"tag", RANGE+NOTADR+COUNT+BANG+WORD1+TRLBAR+ZEROR},
X {(char_u *)"tags", TRLBAR},
X {(char_u *)"unabbreviate", EXTRA+TRLBAR+USECTRLV},
X {(char_u *)"undo", TRLBAR},
X {(char_u *)"unhide", TRLBAR},
X {(char_u *)"unmap", BANG+EXTRA+TRLBAR+USECTRLV},
X {(char_u *)"vglobal", RANGE+EXTRA+DFLALL},
X {(char_u *)"version", TRLBAR},
X {(char_u *)"visual", RANGE+BANG+FILE1},
X {(char_u *)"write", RANGE+BANG+FILE1+DFLALL+TRLBAR},
X {(char_u *)"wnext", RANGE+NOTADR+BANG+FILE1+TRLBAR},
X {(char_u *)"wNext", RANGE+NOTADR+BANG+FILE1+TRLBAR},
X {(char_u *)"wprevious", RANGE+NOTADR+BANG+FILE1+TRLBAR},
X {(char_u *)"winsize", EXTRA+NEEDARG+TRLBAR},
X {(char_u *)"wq", BANG+FILE1+DFLALL+TRLBAR},
X {(char_u *)"wall", BANG+TRLBAR},
X {(char_u *)"wqall", BANG+FILE1+DFLALL+TRLBAR},
X {(char_u *)"xit", BANG+FILE1+DFLALL+TRLBAR},
X {(char_u *)"xall", BANG+TRLBAR},
X {(char_u *)"yank", RANGE+REGSTR+COUNT+TRLBAR},
X {(char_u *)"z", RANGE+COUNT+TRLBAR}, /* not supported */
X {(char_u *)"@", RANGE+EXTRA+TRLBAR},
X {(char_u *)"!", RANGE+NAMEDFS},
X {(char_u *)"<", RANGE+COUNT+TRLBAR},
X {(char_u *)">", RANGE+COUNT+TRLBAR},
X {(char_u *)"=", RANGE+TRLBAR},
X {(char_u *)"&", RANGE+EXTRA},
X {(char_u *)"~", RANGE+EXTRA}
X|
X};
X|
END_OF_FILE
if test 8606 -ne `wc -c <'vim/src/cmdtab.tab'`; then
echo shar: \"'vim/src/cmdtab.tab'\" unpacked with wrong size!
fi
# end of 'vim/src/cmdtab.tab'
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'\" \(3737 characters\)
sed "s/^X//" >'vim/src/help.c' <<'END_OF_FILE'
X/* vi:ts=4:sw=4
X *
X * VIM - Vi IMproved by Bram Moolenaar
X *
X * Read the file "credits.txt" for a list of people who contributed.
X * Read the file "uganda.txt" for copying and usage conditions.
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#if defined(MSDOS) && !defined(NT)
X char_u *fnamep;
X#endif
X
X/*
X * try to open the file specified by the "helpfile" option
X */
X if ((helpfd = fopen((char *)p_hf, READBIN)) == NULL)
X {
X#if defined(MSDOS) && !defined(NT)
X /*
X * for MSDOS: try the DOS search path
X */
X fnamep = searchpath("vim.hlp");
X if (fnamep == NULL || (helpfd = fopen((char *)fnamep, READBIN)) == NULL)
X {
X smsg((char_u *)"Sorry, help file \"%s\" and \"vim.hlp\" not found", p_hf);
X return;
X }
X#else
X smsg((char_u *)"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 fclose(helpfd);
X updateScreen(CLEAR);
X}
X
X/*
X * redraw the help info for the current position in the help file
X *
X * return the number of screens displayed, or -1 if end of file reached
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 (void)set_highlight('h');
X windgoto(0,0);
X while ((nextc = getc(helpfd)) != -1 && (nextc != '\f' || line < Rows - 24))
X {
X if (nextc == Ctrl('B')) /* begin of standout */
X start_highlight();
X else if (nextc == Ctrl('E')) /* end of standout */
X stop_highlight();
X else if (nextc == '\f') /* start of next screen */
X {
X ++screens;
X outchar('\n');
X ++line;
X }
X else
X {
X outchar(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 3737 -ne `wc -c <'vim/src/help.c'`; then
echo shar: \"'vim/src/help.c'\" unpacked with wrong size!
fi
# end of 'vim/src/help.c'
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'\" \(2906 characters\)
sed "s/^X//" >'vim/src/linefunc.c' <<'END_OF_FILE'
X/* vi:ts=4:sw=4
X *
X * VIM - Vi IMproved by Bram Moolenaar
X *
X * Read the file "credits.txt" for a list of people who contributed.
X * Read the file "uganda.txt" for copying and usage conditions.
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 char_u *ptr;
X register colnr_t col;
X
X ptr = ml_get(curwin->w_cursor.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, (long)col);
X ++ptr;
X }
X /*
X * in insert mode it is allowed to be one char beyond the end of the line
X */
X if ((State & INSERT) && col <= wcol)
X ++index;
X if (index < 0)
X curwin->w_cursor.col = 0;
X else
X curwin->w_cursor.col = index;
X}
X
X/*
X * inc(p)
X *
X * Increment the line pointer 'p' crossing line boundaries as necessary.
X * Return 1 when crossing a line, -1 when at end of file, 0 otherwise.
X */
X int
Xinc_cursor()
X{
X return inc(&curwin->w_cursor);
X}
X
X int
Xinc(lp)
X register FPOS *lp;
X{
X register char_u *p = ml_get_pos(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 != curbuf->b_ml.ml_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/*
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.
X * Return 1 when crossing a line, -1 when at start of file, 0 otherwise.
X */
X int
Xdec_cursor()
X{
X return dec(&curwin->w_cursor);
X}
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(ml_get(lp->lnum));
X return 1;
X }
X return -1; /* at start of file */
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 curwin->w_cursor in on a valid character
X */
X void
Xadjust_cursor()
X{
X int len;
X
X if (curwin->w_cursor.lnum == 0)
X curwin->w_cursor.lnum = 1;
X if (curwin->w_cursor.lnum > curbuf->b_ml.ml_line_count)
X curwin->w_cursor.lnum = curbuf->b_ml.ml_line_count;
X
X len = STRLEN(ml_get(curwin->w_cursor.lnum));
X if (len == 0)
X curwin->w_cursor.col = 0;
X else if (curwin->w_cursor.col >= len)
X curwin->w_cursor.col = len - 1;
X}
END_OF_FILE
if test 2906 -ne `wc -c <'vim/src/linefunc.c'`; then
echo shar: \"'vim/src/linefunc.c'\" unpacked with wrong size!
fi
# end of 'vim/src/linefunc.c'
fi
if test -f 'vim/src/makefile.archie' -a "${1}" != "-c" ; then
echo shar: Will not clobber existing file \"'vim/src/makefile.archie'\"
else
echo shar: Extracting \"'vim/src/makefile.archie'\" \(2888 characters\)
sed "s/^X//" >'vim/src/makefile.archie' <<'END_OF_FILE'
X#
X# Makefile for Vim on Acorn Archimedes, using gcc and UnixLib
X#
X
XMACHINE = -DARCHIE
X
X### gcc on the Arc.
XCC=gcc
X
X### Name of target
XTARGET = vim
X
X# To keep the command line down, all the defs have gone into
X# the macro file "defs"
XDEFS = -include defs -O2
X
X#>>>>> link with termlib or termcap only if TERMCAP is defined
X### default
XLIBS =
X
X#>>>>> end of choices
X###########################################################################
X
XCFLAGS = -c $(MACHINE) $(DEFS)
X
XINCL = h.vim h.globals h.param h.keymap h.macros h.ascii h.term h.unix h.debug
X
XOBJ = o.alloc o.archie o.buffer o.charset o.cmdcmds o.cmdline o.csearch o.digraph \
X o.edit o.fileio o.getchar o.help o.linefunc o.main o.mark o.memfile o.memline o.message o.misccmds \
X o.normal o.ops o.param o.quickfix o.regexp o.regsub o.screen \
X o.search o.tag o.term o.undo o.window
X
X$(TARGET): $(OBJ) c.version
X $(CC) $(CFLAGS) version.c
X rename o.mkcmdtab tempfile
X $(CC) -o $(TARGET) o.* $(LIBS)
X rename tempfile o.mkcmdtab
X
X###########################################################################
X
Xo.alloc: c.alloc $(INCL)
X $(CC) $(CFLAGS) alloc.c
X
Xo.archie: c.archie $(INCL) h.archie
X $(CC) $(CFLAGS) archie.c
X
Xo.buffer: c.buffer $(INCL)
X $(CC) $(CFLAGS) buffer.c
X
Xo.charset: c.charset $(INCL)
X $(CC) $(CFLAGS) charset.c
X
Xo.cmdcmds: c.cmdcmds $(INCL)
X $(CC) $(CFLAGS) cmdcmds.c
X
Xo.cmdline: c.cmdline $(INCL) h.cmdtab
X $(CC) $(CFLAGS) cmdline.c
X
Xo.csearch: c.csearch $(INCL)
X $(CC) $(CFLAGS) csearch.c
X
Xo.digraph: c.digraph $(INCL)
X $(CC) $(CFLAGS) digraph.c
X
Xo.edit: c.edit $(INCL)
X $(CC) $(CFLAGS) edit.c
X
Xo.fileio: c.fileio $(INCL)
X $(CC) $(CFLAGS) fileio.c
X
Xo.getchar: c.getchar $(INCL)
X $(CC) $(CFLAGS) getchar.c
X
Xo.help: c.help $(INCL)
X $(CC) $(CFLAGS) help.c
X
Xo.linefunc: c.linefunc $(INCL)
X $(CC) $(CFLAGS) linefunc.c
X
Xo.main: c.main $(INCL)
X $(CC) $(CFLAGS) main.c
X
Xo.mark: c.mark $(INCL)
X $(CC) $(CFLAGS) mark.c
X
Xo.memfile: c.memfile $(INCL)
X $(CC) $(CFLAGS) memfile.c
X
Xo.memline: c.memline $(INCL)
X $(CC) $(CFLAGS) memline.c
X
Xo.message: c.message $(INCL)
X $(CC) $(CFLAGS) message.c
X
Xo.misccmds: c.misccmds $(INCL)
X $(CC) $(CFLAGS) misccmds.c
X
Xo.normal: c.normal $(INCL) h.ops
X $(CC) $(CFLAGS) normal.c
X
Xo.ops: c.ops $(INCL) h.ops
X $(CC) $(CFLAGS) ops.c
X
Xo.param: c.param $(INCL)
X $(CC) $(CFLAGS) param.c
X
Xo.quickfix: c.quickfix $(INCL)
X $(CC) $(CFLAGS) quickfix.c
X
Xo.regexp: c.regexp $(INCL)
X $(CC) $(CFLAGS) regexp.c
X
Xo.regsub: c.regsub $(INCL)
X $(CC) $(CFLAGS) regsub.c
X
Xo.screen: c.screen $(INCL)
X $(CC) $(CFLAGS) screen.c
X
Xo.search: c.search $(INCL)
X $(CC) $(CFLAGS) search.c
X
Xo.tag: c.tag $(INCL)
X $(CC) $(CFLAGS) tag.c
X
Xo.term: c.term $(INCL)
X $(CC) $(CFLAGS) term.c
X
Xo.undo: c.undo $(INCL)
X $(CC) $(CFLAGS) undo.c
X
Xo.window: c.window $(INCL)
X $(CC) $(CFLAGS) window.c
X
Xh.cmdtab: cmdtab mkcmdtab
X mkcmdtab cmdtab h.cmdtab
X
Xmkcmdtab: o.mkcmdtab
X $(CC) -o mkcmdtab mkcmdtab.o
END_OF_FILE
if test 2888 -ne `wc -c <'vim/src/makefile.archie'`; then
echo shar: \"'vim/src/makefile.archie'\" unpacked with wrong size!
fi
# end of 'vim/src/makefile.archie'
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'\" \(4338 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# use the first two if you don't have the spawno library
X# then also remove the SPAWNO define further down and the line
X# with spawnl.lib
X#
X#LIBPATH = C:\BORLANDC\LIB
X#INCLUDEPATH = C:\BORLANDC\INCLUDE
XLIBPATH = C:\BORLANDC\LIB;C:\CC\SPAWN
XINCLUDEPATH = C:\BORLANDC\INCLUDE;C:\CC\SPAWN
X
X
X# *Implicit Rules*
X#
X# use -v for debugging
X#
X.c.obj:
X $(CC) -c {$< }
X# $(CC) -c -v {$< }
X
X# *List Macros*
X
X
XEXE_dependencies = \
X alloc.obj \
X buffer.obj \
X charset.obj \
X cmdcmds.obj \
X cmdline.obj \
X csearch.obj \
X digraph.obj \
X edit.obj \
X fileio.obj \
X getchar.obj \
X help.obj \
X linefunc.obj \
X main.obj \
X mark.obj \
X memfile.obj \
X memline.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 search.obj \
X tag.obj \
X term.obj \
X undo.obj \
X window.obj \
X version.obj
X
X# *Explicit Rules*
X# add /v to TLINK for degubbing
Xvim.exe: vim.cfg $(EXE_dependencies)
X $(CC) -c version.c
X $(TLINK) /x/c/L$(LIBPATH) @&&|
Xc0l.obj+
Xalloc.obj+
Xbuffer.obj+
Xcharset.obj+
Xcmdcmds.obj+
Xcmdline.obj+
Xcsearch.obj+
Xdigraph.obj+
Xedit.obj+
Xfileio.obj+
Xgetchar.obj+
Xhelp.obj+
Xlinefunc.obj+
Xmain.obj+
Xmark.obj+
Xmemfile.obj+
Xmemline.obj+
Xmessage.obj+
Xmisccmds.obj+
Xmsdos.obj+
Xnormal.obj+
Xops.obj+
Xparam.obj+
Xquickfix.obj+
Xregexp.obj+
Xregsub.obj+
Xscreen.obj+
Xsearch.obj+
Xtag.obj+
Xterm.obj+
Xundo.obj+
Xwindow.obj+
Xversion.obj
Xvim
X # no map file
Xfp87.lib+
Xmathl.lib+
Xspawnl.lib+
Xcl.lib
X|
X
X
X# *Individual File Dependencies*
Xalloc.obj: alloc.c
X
Xbuffer.obj: buffer.c
X
Xcharset.obj: charset.c
X
Xcmdcmds.obj: cmdcmds.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
Xgetchar.obj: getchar.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
X
Xmemfile.obj: memfile.c
X
Xmemline.obj: memline.c
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
Xsearch.obj: search.c
X
Xtag.obj: tag.c
X
Xterm.obj: term.c term.h
X
Xundo.obj: undo.c
X
Xwindow.obj: window.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;SPAWNO;DIGRAPHS;WEBB_COMPLETE;WEBB_KEYWORD_COMPL
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
X### -DWEBB_COMPLETE include Webb's code for command line completion
X### -DWEBB_KEYWORD_COMPL include Webb's code for keyword completion
X### -DNOTITLE 'title' option off by default
END_OF_FILE
if test 4338 -ne `wc -c <'vim/src/makefile.bcc'`; then
echo shar: \"'vim/src/makefile.bcc'\" unpacked with wrong size!
fi
# 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'\" \(3750 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# LAST CHANGES NOT TESTED
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### -DWEBB_COMPLETE include Webb's code for command line completion
X### -DWEBB_KEYWORD_COMPL include Webb's code for keyword completion
X### -DNOTITLE 'title' option off by default
XDEFINES = -DTERMCAP -DDIGRAPHS -DSOME_BUILTIN_TCAPS \
X -DWEBB_COMPLETE -DWEBB_KEYWORD_COMPL
X
X#>>>>> if TERMCAP is defined obj/termlib.o has to be used
XTERMLIB = obj/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 = obj/alloc.o obj/amiga.o obj/buffer.o obj/charset.o obj/cmdcmds.o obj/cmdline.o \
X obj/csearch.o obj/digraph.o obj/edit.o obj/fileio.o obj/getchar.o obj/help.o \
X obj/linefunc.o obj/main.o obj/mark.o obj/memfile.o obj/memline.o obj/message.o obj/misccmds.o \
X obj/normal.o obj/ops.o obj/param.o obj/quickfix.o obj/regexp.o \
X obj/regsub.o obj/screen.o obj/search.o \
X obj/tag.o obj/term.o obj/undo.o obj/window.o $(TERMLIB)
X
X/Vim: $(OBJ) version.c
X ${CC} $(CFLAGS) version.c -o obj/version.o
X ${LD} -o /Vim $(OBJ) obj/version.o $(LIBS)
X
Xdebug: $(OBJ) version.c
X ${CC} $(CFLAGS) version.c -o obj/version.o
X ${LD} -s -o /Vim $(OBJ) 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) obj/version.o obj/mkcmdtab.o /Vim $(INCL) mkcmdtab cmdtab.h
X
X$(INCL) : vim.h globals.h keymap.h macros.h ascii.h term.h amiga.h structs.h
X delete $(INCL)
X
X###########################################################################
X
Xobj/alloc.o: alloc.c $(INCL)
X
Xobj/amiga.o: amiga.c $(INCL) amiga.h
X
Xobj/buffer.o: buffer.c $(INCL)
X
Xobj/charset.o: charset.c $(INCL)
X
Xobj/cmdcmds.o: cmdcmds.c $(INCL)
X
Xobj/cmdline.o: cmdline.c $(INCL) cmdtab.h
X
Xobj/csearch.o: csearch.c $(INCL) regexp.h
X
Xobj/digraph.o: digraph.c $(INCL)
X
Xobj/edit.o: edit.c $(INCL)
X
Xobj/fileio.o: fileio.c $(INCL)
X
Xobj/getchar.o: getchar.c $(INCL)
X
Xobj/help.o: help.c $(INCL)
X
Xobj/linefunc.o: linefunc.c $(INCL)
X
Xobj/main.o: main.c
X ${CC} ${CFLAGS} main.c -o main.o
X
Xobj/mark.o: mark.c $(INCL)
X
Xobj/memfile.o: memfile.c $(INCL)
X
Xobj/memline.o: memline.c $(INCL)
X
Xobj/message.o: message.c $(INCL)
X
Xobj/misccmds.o: misccmds.c $(INCL)
X
Xobj/normal.o: normal.c $(INCL) ops.h
X
Xobj/ops.o: ops.c $(INCL) ops.h
X
Xobj/param.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
Xobj/quickfix.o: quickfix.c $(INCL)
X
Xobj/regexp.o: regexp.c $(INCL) regexp.h
X
Xobj/regsub.o: regsub.c $(INCL) regexp.h
X
Xobj/screen.o: screen.c $(INCL)
X
Xobj/search.o: search.c $(INCL) regexp.h
X
Xobj/tag.o: tags.c $(INCL)
X
Xobj/termlib.o: termlib.c $(INCL)
X
Xobj/undo.o: undo.c $(INCL)
X
Xobj/window.o: window.c $(INCL)
X
Xcmdtab.h: cmdtab.tab mkcmdtab
X mkcmdtab cmdtab.tab cmdtab.h
X
Xmkcmdtab: obj/mkcmdtab.o
X ${LD} -o mkcmdtab obj/mkcmdtab.o
END_OF_FILE
if test 3750 -ne `wc -c <'vim/src/makefile.dice'`; then
echo shar: \"'vim/src/makefile.dice'\" unpacked with wrong size!
fi
# end of 'vim/src/makefile.dice'
fi
if test -f 'vim/src/param.h' -a "${1}" != "-c" ; then
echo shar: Will not clobber existing file \"'vim/src/param.h'\"
else
echo shar: Extracting \"'vim/src/param.h'\" \(8458 characters\)
sed "s/^X//" >'vim/src/param.h' <<'END_OF_FILE'
X/* vi:ts=4:sw=4
X *
X * VIM - Vi IMproved by Bram Moolenaar
X *
X * Read the file "credits.txt" for a list of people who contributed.
X * Read the file "uganda.txt" for copying and usage conditions.
X */
X
X/*
X * param.h: definition of global variables for settable parameters
X *
X * EXTERN is only defined in main.c (and vim.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 * The following are actual variabables for the parameters
X */
X
XEXTERN int p_aw INIT(= FALSE); /* auto-write */
XEXTERN long p_bs INIT(= 0); /* backspace over newlines in insert mode */
X#if defined(COMPATIBLE) || defined(NOBACKUP)
XEXTERN int p_bk INIT(= FALSE); /* make backups when writing out files */
X#else
XEXTERN int p_bk INIT(= TRUE); /* make backups when writing out files */
X#endif
X#ifdef MSDOS
XEXTERN int p_biosk INIT(= TRUE); /* Use bioskey() instead of kbhit() */
X#endif
X#ifdef UNIX
XEXTERN char_u *p_bdir INIT(= (char_u *)BACKUPDIR); /* directory for backups */
X#endif
XEXTERN long p_ch INIT(= 1L); /* command line height */
XEXTERN int p_cp INIT(= FALSE); /* vi-compatible */
X#ifdef DIGRAPHS
XEXTERN int p_dg INIT(= FALSE); /* enable digraphs */
X#endif /* DIGRAPHS */
XEXTERN char_u *p_dir INIT(= (char_u *)DEF_DIR); /* directory for swap file */
XEXTERN char_u *p_ep INIT(= (char_u *)"indent"); /* program name for '=' command */
XEXTERN int p_ea INIT(= TRUE); /* make windows equal height */
XEXTERN int p_ed INIT(= FALSE); /* :s is ed compatible */
XEXTERN int p_eb INIT(= FALSE); /* ring bell for errors */
X#ifdef AMIGA
XEXTERN char_u *p_ef INIT(= (char_u *)"AztecC.Err"); /* name of errorfile */
X#else
XEXTERN char_u *p_ef INIT(= (char_u *)"errors"); /* name of errorfile */
X#endif
X#ifdef AMIGA
XEXTERN char_u *p_efm INIT(= (char_u *)"%f>%l:%c:%t:%n:%m");/* error format */
X#else
X# ifdef ARCHIE
XEXTERN char_u *p_efm INIT(= (char_u *)"%f:%l:%m"); /* error format */
X# else
XEXTERN char_u *p_efm INIT(= (char_u *)"\"%f\",%*[^0123456789]%l: %m"); /* error format */
X# endif
X#endif
X#ifdef COMPATIBLE
XEXTERN int p_ek INIT(= FALSE); /* function keys with ESC in insert mode */
X#else
XEXTERN int p_ek INIT(= TRUE); /* function keys with ESC in insert mode */
X#endif
XEXTERN int p_exrc INIT(= FALSE); /* read .exrc in current dir */
XEXTERN char_u *p_fp INIT(= (char_u *)""); /* name of format program */
XEXTERN int p_gd INIT(= FALSE); /* /g is default for :s */
X#ifdef MSDOS
XEXTERN int p_gr INIT(= TRUE); /* display graphic characters */
X#else
XEXTERN int p_gr INIT(= FALSE); /* display graphic characters */
X#endif
XEXTERN int p_icon INIT(= FALSE); /* put file name in icon if possible */
XEXTERN long p_hi INIT(= 20); /* command line history size */
XEXTERN char_u *p_hf INIT(= (char_u *)VIM_HLP); /* name of help file */
XEXTERN int p_hid INIT(= FALSE); /* buffers can be hidden */
XEXTERN char_u *p_hl INIT(= (char_u *)"db,es,hs,rs,vi,si");
X /* which highlight mode to use */
XEXTERN int p_ic INIT(= FALSE); /* ignore case in searches */
XEXTERN int p_im INIT(= FALSE); /* start editing in input mode */
XEXTERN int p_wi INIT(= FALSE); /* inversion of text is weird */
XEXTERN char_u *p_kp INIT(= (char_u *)"ref"); /* keyword program */
XEXTERN int p_js INIT(= TRUE); /* use two spaces after period with Join */
XEXTERN long p_ls INIT(= 1); /* last window has status line */
XEXTERN int p_magic INIT(= TRUE); /* use some characters for reg exp */
XEXTERN char_u *p_mp INIT(= (char_u *)"make"); /* program for :make command */
XEXTERN long p_mm INIT(= MAXMEM); /* maximal amount of memory for buffer */
XEXTERN long p_mmt INIT(= MAXMEMTOT); /* maximal amount of memory for Vim */
XEXTERN long p_mls INIT(= 5); /* number of mode lines */
X#ifdef COMPATIBLE
XEXTERN int p_more INIT(= FALSE); /* wait when screen full when listing */
X#else
XEXTERN int p_more INIT(= TRUE); /* wait when screen full when listing */
X#endif
XEXTERN int p_nb INIT(= FALSE); /* screen output not buffered (for testing) */
XEXTERN int p_paste INIT(= FALSE); /* paste mode */
X#ifdef AMIGA
XEXTERN char_u *p_path INIT(= (char_u *)"."); /* path for "]f" and "^Wf" */
X#else
X# ifdef MSDOS
XEXTERN char_u *p_path INIT(= (char_u *)"."); /* path for "]f" and "^Wf" */
X# else
XEXTERN char_u *p_path INIT(= (char_u *)". /usr/include"); /* path for "]f" and "^Wf" */
X# endif
X#endif
XEXTERN char_u *p_pm INIT(= (char_u *)""); /* patchmode file suffix */
XEXTERN char_u *p_para INIT(= (char_u *)"IPLPPPQPP LIpplpipbp"); /* paragraphs */
XEXTERN int p_remap INIT(= TRUE); /* remap */
XEXTERN long p_report INIT(= 2); /* minimum number of lines for report */
XEXTERN int p_ru INIT(= FALSE); /* show column/line number */
XEXTERN int p_ri INIT(= FALSE); /* reverse direction of insert */
XEXTERN int p_secure INIT(= FALSE); /* do .exrc and .vimrc in secure mode */
XEXTERN long p_sj INIT(= 1); /* scroll jump size */
XEXTERN char_u *p_sections INIT(= (char_u *)"SHNHH HUnhsh"); /* sections */
X#ifdef MSDOS
XEXTERN char_u *p_sh INIT(= (char_u *)"command"); /* name of shell to use */
X#else
X# ifdef ARCHIE
XEXTERN char_u *p_sh INIT(= (char_u *)"gos"); /* name of shell to use */
X# else
XEXTERN char_u *p_sh INIT(= (char_u *)"sh"); /* name of shell to use */
X# endif
X#endif
X#ifdef UNIX
X# ifdef ARCHIE
XEXTERN char_u *p_sp INIT(= (char_u *)"2>"); /* string for output of make */
X# else
XEXTERN char_u *p_sp INIT(= (char_u *)"| tee"); /* string for output of make */
X# endif
X#else
XEXTERN char_u *p_sp INIT(= (char_u *)">"); /* string for output of make */
X#endif
XEXTERN long p_ss INIT(= 0); /* sideways scrolling offset */
XEXTERN long p_st INIT(= 0); /* type of shell */
XEXTERN int p_sr INIT(= FALSE); /* shift round off (for < and >) */
XEXTERN int p_sb INIT(= FALSE); /* split window backwards */
X#if defined(COMPATIBLE) || defined(UNIX)
XEXTERN int p_sc INIT(= FALSE); /* show command in status line */
X#else
XEXTERN int p_sc INIT(= TRUE); /* show command in status line */
X#endif
XEXTERN int p_sm INIT(= FALSE); /* showmatch */
X#if defined(COMPATIBLE)
XEXTERN int p_smd INIT(= FALSE); /* show mode */
X#else
XEXTERN int p_smd INIT(= TRUE); /* show mode */
X#endif
XEXTERN int p_sta INIT(= FALSE); /* smart-tab for expand-tab */
XEXTERN char_u *p_su INIT(= (char_u *)".bak.o.h.info.swp"); /* suffixes for wildcard expansion */
XEXTERN long p_tl INIT(= 0); /* used tag length */
XEXTERN char_u *p_tags INIT(= (char_u *)"tags"); /* tags search path */
X#if defined(COMPATIBLE)
XEXTERN int p_ta INIT(= FALSE); /* auto textmode detection */
X#else
XEXTERN int p_ta INIT(= TRUE); /* auto textmode detection */
X#endif
XEXTERN int p_terse INIT(= FALSE); /* terse messages */
XEXTERN int p_tf INIT(= FALSE); /* terminal fast I/O */
XEXTERN int p_to INIT(= FALSE); /* tilde is an operator */
X#if defined(COMPATIBLE)
XEXTERN int p_tr INIT(= FALSE); /* tag file name is relative */
X#else
XEXTERN int p_tr INIT(= TRUE); /* tag file name is relative */
X#endif
XEXTERN int p_timeout INIT(= TRUE); /* mappings entered within one second */
XEXTERN long p_tm INIT(= 1000); /* timeoutlen (msec) */
X#ifdef NOTITLE
XEXTERN int p_title INIT(= FALSE); /* set window title if possible */
X#else
XEXTERN int p_title INIT(= TRUE); /* set window title if possible */
X#endif
XEXTERN int p_ttimeout INIT(= FALSE); /* key codes entered within one second */
X#ifdef COMPATIBLE
XEXTERN long p_ul INIT(= 0); /* number of Undo Levels */
XEXTERN long p_uc INIT(= 0); /* update count for swap file */
X#else
XEXTERN long p_ul INIT(= 100); /* number of Undo Levels */
XEXTERN long p_uc INIT(= 200); /* update count for swap file */
X#endif
XEXTERN long p_ut INIT(= 4000); /* update time for swap file */
XEXTERN int p_vb INIT(= FALSE); /* visual bell only (no beep) */
XEXTERN int p_warn INIT(= TRUE); /* warn for changes at shell command */
XEXTERN int p_ws INIT(= TRUE); /* wrap scan */
X#ifdef COMPATIBLE
XEXTERN long p_ww INIT(= 0); /* which keys wrap to next/prev line */
X#else
XEXTERN long p_ww INIT(= 3); /* which keys wrap to next/prev line */
X#endif
X#ifdef COMPATIBLE
XEXTERN long p_wc INIT(= Ctrl('E')); /* character for wildcard exapansion */
X#else
XEXTERN long p_wc INIT(= TAB); /* character for wildcard exapansion */
X#endif
XEXTERN long p_wh INIT(= 0); /* desired window height */
XEXTERN int p_wa INIT(= FALSE); /* write any */
X#if defined(COMPATIBLE) || defined(NOBACKUP)
XEXTERN int p_wb INIT(= FALSE); /* write backup files */
X#else
XEXTERN int p_wb INIT(= TRUE); /* write backup files */
X#endif
XEXTERN int p_ye INIT(= FALSE); /* Y yanks to end of line */
END_OF_FILE
if test 8458 -ne `wc -c <'vim/src/param.h'`; then
echo shar: \"'vim/src/param.h'\" unpacked with wrong size!
fi
# end of 'vim/src/param.h'
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'\" \(3085 characters\)
sed "s/^X//" >'vim/src/unix.h' <<'END_OF_FILE'
X/* vi:ts=4:sw=4
X *
X * VIM - Vi IMproved by Bram Moolenaar
X *
X * Read the file "credits.txt" for a list of people who contributed.
X * Read the file "uganda.txt" for copying and usage conditions.
X */
X
X/*
X * Unix system-dependent filenames
X */
X
X#ifndef SYSEXRC_FILE
X# define SYSEXRC_FILE "$HOME/.exrc"
X#endif
X
X#ifndef SYSVIMRC_FILE
X# define SYSVIMRC_FILE "$HOME/.vimrc"
X#endif
X
X#ifndef EXRC_FILE
X# define EXRC_FILE ".exrc"
X#endif
X
X#ifndef VIMRC_FILE
X# define VIMRC_FILE ".vimrc"
X#endif
X
X#ifndef DEFVIMRC_FILE
X# define DEFVIMRC_FILE "/usr/local/etc/vimrc"
X#endif
X
X#ifndef VIM_HLP
X# define VIM_HLP "/usr/local/lib/vim.hlp"
X#endif
X
X#ifndef BACKUPDIR
X# define BACKUPDIR "$HOME"
X#endif
X
X#ifndef DEF_DIR
X# define DEF_DIR "/tmp"
X#endif
X
X#define TMPNAME1 "/tmp/viXXXXXX"
X#define TMPNAME2 "/tmp/voXXXXXX"
X#define TMPNAMELEN 15
X
X#ifndef MAXMEM
X# define MAXMEM 512 /* use up to 512Kbyte for buffer */
X#endif
X#ifndef MAXMEMTOT
X# define MAXMEMTOT 2048 /* use up to 2048Kbyte for Vim */
X#endif
X
X#define BASENAMELEN (MAXNAMLEN - 5)
X
X#define stricmp vim_stricmp
X
X/*
X * prototypes for functions not in unix.c
X */
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) && !defined(SOLARIS)
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# if 0 /* should be in unistd.h */
Xvoid sleep __ARGS((int));
X# endif
X
Xint rename __ARGS((const char *, const char *));
X#endif
X
Xint stricmp __ARGS((char *, 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) && !defined(MIPS) && !defined(__NetBSD__) && !defined(__FreeBSD__) && !defined(linux) && !defined(UNISYS)
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# if !(defined(hpux) && defined(__STDC__))
X# ifdef linux
Xextern void bcopy __ARGS((const void *, void *, int));
X# else
Xextern void bcopy __ARGS((char *, char *, int));
X# endif
X# endif
X# endif
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
X/*
X * Most unixes don't have these in include files.
X * If you get a "redefined" error, delete the offending line.
X */
X#if !defined(__NetBSD__) && !defined(__FreeBSD__)
X extern int ioctl __ARGS((int, int, ...));
X#endif
Xextern int fsync __ARGS((int));
Xextern char *getwd __ARGS((char *));
X#if !defined(__NetBSD__) && !defined(__FreeBSD__)
X# ifdef linux
X extern void bzero __ARGS((void *, int));
X# else
X extern void bzero __ARGS((char *, int));
X# endif
X#endif
X#if defined(system_that_does_not_have_access_in_an_include_file)
Xextern int access __ARGS((char *, int));
X#endif
END_OF_FILE
if test 3085 -ne `wc -c <'vim/src/unix.h'`; then
echo shar: \"'vim/src/unix.h'\" unpacked with wrong size!
fi
# 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
# end of 'vim/termcap'
fi
echo shar: End of archive 24 \(of 26\).
cp /dev/null ark24isdone
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 26 ; do
if test ! -f ark${I}isdone ; then
MISSING="${MISSING} ${I}"
fi
done
if test "${MISSING}" = "" ; then
echo You have unpacked all 26 archives.
rm -f ark[1-9]isdone ark[1-9][0-9]isdone
else
echo You still must unpack the following archives:
echo " " ${MISSING}
fi
exit 0
exit 0 # Just in case...