home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Usenet 1994 October
/
usenetsourcesnewsgroupsinfomagicoctober1994disk2.iso
/
misc
/
volume44
/
vim
/
part23
< prev
next >
Wrap
Internet Message Format
|
1994-08-18
|
71KB
From: mool@oce.nl (Bram Moolenaar)
Newsgroups: comp.sources.misc
Subject: v44i042: vim - Vi IMproved editor, v3.0, Part23/26
Date: 18 Aug 1994 14:03:45 -0500
Organization: Sterling Software
Sender: kent@sparky.sterling.com
Approved: kent@sparky.sterling.com
Message-ID: <330bah$e8n@sparky.sterling.com>
X-Md4-Signature: 4e2dfed972896acc5c8dc3466ed1ccb5
Submitted-by: mool@oce.nl (Bram Moolenaar)
Posting-number: Volume 44, Issue 42
Archive-name: vim/part23
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/src/makefile.dos vim/src/makefile.manx
# vim/src/makefile.sas vim/src/mark.c vim/src/message.c
# vim/src/proto/cmdline.pro vim/src/quickfix.c vim/src/vim.h
# Wrapped by kent@sparky on Mon Aug 15 21:44:14 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 23 (of 26)."'
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'\" \(5010 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
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 = -DDIGRAPHS -DWEBB_COMPLETE -DWEBB_KEYWORD_COMPL
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 structs.h
XCFLAGS = -c -ml -DMSDOS $(DEFINES)
X
XOBJ = obj/alloc.obj obj/msdos.obj obj/buffer.obj obj/charset.obj obj/cmdcmds.obj obj/cmdline.obj \
X obj/csearch.obj obj/digraph.obj obj/edit.obj obj/fileio.obj obj/getchar.obj obj/help.obj \
X obj/linefunc.obj obj/main.obj obj/mark.obj obj/memfile.obj obj/memline.obj obj/message.obj obj/misccmds.obj \
X obj/normal.obj obj/ops.obj obj/param.obj obj/quickfix.obj obj/regexp.obj \
X obj/regsub.obj obj/screen.obj obj/search.obj \
X obj/tag.obj obj/term.obj obj/undo.obj obj/window.obj $(TERMLIB)
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 cmdtab.h
X
Xaddcr: addcr.c
X $(CC) addcr.c
X command /c addcr.bat
X
X###########################################################################
X
Xobj/alloc.obj: alloc.c $(INCL)
X $(CC) $(CFLAGS) alloc.c -o obj/alloc.obj
X
Xobj/msdos.obj: msdos.c $(INCL) msdos.h
X $(CC) $(CFLAGS) msdos.c -o obj/msdos.obj
X
Xobj/buffer.obj: buffer.c $(INCL)
X $(CC) $(CFLAGS) buffer.c -o obj/buffer.obj
X
Xobj/charset.obj: charset.c $(INCL)
X $(CC) $(CFLAGS) charset.c -o obj/charset.obj
X
Xobj/cmdcmds.obj: cmdcmds.c $(INCL)
X $(CC) $(CFLAGS) cmdcmds.c -o obj/cmdcmds.obj
X
Xobj/cmdline.obj: cmdline.c $(INCL) cmdtab.h
X $(CC) $(CFLAGS) cmdline.c -o obj/cmdline.obj
X
Xobj/csearch.obj: csearch.c $(INCL)
X $(CC) $(CFLAGS) csearch.c -o obj/csearch.obj
X
Xobj/digraph.obj: digraph.c $(INCL)
X $(CC) $(CFLAGS) digraph.c -o obj/digraph.obj
X
Xobj/edit.obj: edit.c $(INCL)
X $(CC) $(CFLAGS) edit.c -o obj/edit.obj
X
Xobj/fileio.obj: fileio.c $(INCL)
X $(CC) $(CFLAGS) fileio.c -o obj/fileio.obj
X
Xobj/getchar.obj: getchar.c $(INCL)
X $(CC) $(CFLAGS) getchar.c -o obj/getchar.obj
X
Xobj/help.obj: help.c $(INCL)
X $(CC) $(CFLAGS) help.c -o obj/help.obj
X
Xobj/linefunc.obj: linefunc.c $(INCL)
X $(CC) $(CFLAGS) linefunc.c -o obj/linefunc.obj
X
Xobj/main.obj: main.c $(INCL)
X $(CC) $(CFLAGS) main.c -o obj/main.obj
X
Xobj/mark.obj: mark.c $(INCL)
X $(CC) $(CFLAGS) mark.c -o obj/mark.obj
X
Xobj/memfile.obj: memfile.c $(INCL)
X $(CC) $(CFLAGS) memfile.c -o obj/memfile.obj
X
Xobj/memline.obj: memline.c $(INCL)
X $(CC) $(CFLAGS) memline.c -o obj/memline.obj
X
Xobj/message.obj: message.c $(INCL)
X $(CC) $(CFLAGS) message.c -o obj/message.obj
X
Xobj/misccmds.obj: misccmds.c $(INCL)
X $(CC) $(CFLAGS) misccmds.c -o obj/misccmds.obj
X
Xobj/normal.obj: normal.c $(INCL) ops.h
X $(CC) $(CFLAGS) normal.c -o obj/normal.obj
X
Xobj/ops.obj: ops.c $(INCL) ops.h
X $(CC) $(CFLAGS) ops.c -o obj/ops.obj
X
Xobj/param.obj: param.c $(INCL)
X $(CC) $(CFLAGS) param.c -o obj/param.obj
X
Xobj/quickfix.obj: quickfix.c $(INCL)
X $(CC) $(CFLAGS) quickfix.c -o obj/quickfix.obj
X
Xobj/regexp.obj: regexp.c $(INCL)
X $(CC) $(CFLAGS) regexp.c -o obj/regexp.obj
X
Xobj/regsub.obj: regsub.c $(INCL)
X $(CC) $(CFLAGS) regsub.c -o obj/regsub.obj
X
Xobj/screen.obj: screen.c $(INCL)
X $(CC) $(CFLAGS) screen.c -o obj/screen.obj
X
Xobj/search.obj: search.c $(INCL)
X $(CC) $(CFLAGS) search.c -o obj/search.obj
X
Xobj/tag.obj: tag.c $(INCL)
X $(CC) $(CFLAGS) tag.c -o obj/tag.obj
X
Xobj/term.obj: term.c $(INCL)
X $(CC) $(CFLAGS) term.c -o obj/term.obj
X
Xobj/undo.obj: undo.c $(INCL)
X $(CC) $(CFLAGS) undo.c -o obj/undo.obj
X
Xobj/window.obj: window.c $(INCL)
X $(CC) $(CFLAGS) window.c -o obj/window.obj
X
Xcmdtab.h: cmdtab.tab mkcmdtab.exe
X mkcmdtab cmdtab.tab cmdtab.h
X
Xmkcmdtab.exe: obj/mkcmdtab.obj
X $(CC) -ml -o mkcmdtab obj/mkcmdtab.obj
X
Xobj/mkcmdtab.obj: mkcmdtab.c
X $(CC) $(CFLAGS) mkcmdtab.c -o obj/mkcmdtab.obj
END_OF_FILE
if test 5010 -ne `wc -c <'vim/src/makefile.dos'`; then
echo shar: \"'vim/src/makefile.dos'\" unpacked with wrong size!
fi
# end of 'vim/src/makefile.dos'
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'\" \(10141 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
X### -DNOTITLE 'title' option off by default
X### -DWEBB_COMPLETE include Webb's code for command line completion
X### -DWEBB_KEYWORD_COMPL include Webb's code for keyword completion
X
XDEFINES = -DDIGRAPHS -DSOME_BUILTIN_TCAPS -DVIM_ISSPACE \
X -DWEBB_COMPLETE -DWEBB_KEYWORD_COMPL
X
X#>>>>> if TERMCAP is defined obj/termlib.o has to be used
X#TERMLIB = obj/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 = 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
XPRO = proto/alloc.pro proto/buffer.pro proto/charset.pro proto/cmdcmds.pro proto/cmdline.pro \
X proto/csearch.pro proto/digraph.pro proto/edit.pro proto/fileio.pro \
X proto/getchar.pro proto/help.pro proto/linefunc.pro proto/main.pro proto/mark.pro \
X proto/memfile.pro proto/memline.pro 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/search.pro \
X proto/tag.pro proto/term.pro proto/termlib.pro \
X proto/undo.pro proto/window.pro proto/amiga.pro
X
X/Vim: $(OBJ) version.c
X cc $(CFLAGS) version.c -o obj/version.o
X ln +q -m -o /Vim $(OBJ) obj/version.o $(LIBS)
X
Xdebug: $(OBJ) version.c
X cc $(CFLAGS) version.c -o obj/version.o
X ln +q -m -g -o /Vim $(OBJ) 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) obj/version.o obj/mkcmdtab.o obj/termlib.o /Vim $(SYMS) mkcmdtab cmdtab.h
X
X$(SYMS) : vim.h keymap.h macros.h ascii.h term.h structs.h amiga.h
X cc $(CFLAGS) -ho$(SYMS) vim.h
X
X###########################################################################
X
Xobj/alloc.o: alloc.c $(SYMS)
X cc $(CFLAGS) -hi$(SYMS) alloc.c -o obj/alloc.o
X
Xproto/alloc.pro: alloc.c $(SYMS)
X cc -qa -qp $(CFLAGS) -DPROTO -hi$(SYMS) alloc.c
X csh -c mv -f alloc.pro proto
X
Xobj/amiga.o: amiga.c $(SYMS)
X cc $(CFLAGS) -hi$(SYMS) amiga.c -o obj/amiga.o
X
Xproto/amiga.pro: amiga.c $(SYMS)
X cc -qa -qp $(CFLAGS) -DPROTO -hi$(SYMS) amiga.c
X csh -c mv -f amiga.pro proto
X
Xobj/buffer.o: buffer.c $(SYMS)
X cc $(CFLAGS) -hi$(SYMS) buffer.c -o obj/buffer.o
X
Xproto/buffer.pro: buffer.c $(SYMS)
X cc -qa -qp $(CFLAGS) -DPROTO -hi$(SYMS) buffer.c
X csh -c mv -f buffer.pro proto
X
Xobj/charset.o: charset.c $(SYMS)
X cc $(CFLAGS) -hi$(SYMS) charset.c -o obj/charset.o
X
Xproto/charset.pro: charset.c $(SYMS)
X cc -qa -qp $(CFLAGS) -DPROTO -hi$(SYMS) charset.c
X csh -c mv -f charset.pro proto
X
Xobj/cmdcmds.o: cmdcmds.c $(SYMS)
X cc $(CFLAGS) -hi$(SYMS) cmdcmds.c -o obj/cmdcmds.o
X
Xproto/cmdcmds.pro: cmdcmds.c $(SYMS)
X cc -qa -qp $(CFLAGS) -DPROTO -hi$(SYMS) cmdcmds.c
X csh -c mv -f cmdcmds.pro proto
X
Xobj/cmdline.o: cmdline.c $(SYMS) cmdtab.h
X cc $(CFLAGS) -hi$(SYMS) cmdline.c -o obj/cmdline.o
X
Xproto/cmdline.pro: cmdline.c $(SYMS) cmdtab.h
X cc -qa -qp $(CFLAGS) -DPROTO -hi$(SYMS) cmdline.c
X csh -c mv -f cmdline.pro proto
X
Xobj/csearch.o: csearch.c $(SYMS)
X cc $(CFLAGS) -hi$(SYMS) csearch.c -o obj/csearch.o
X
Xproto/csearch.pro: csearch.c $(SYMS)
X cc -qa -qp $(CFLAGS) -DPROTO -hi$(SYMS) csearch.c
X csh -c mv -f csearch.pro proto
X
Xobj/digraph.o: digraph.c $(SYMS)
X cc $(CFLAGS) -hi$(SYMS) digraph.c -o obj/digraph.o
X
Xproto/digraph.pro: digraph.c $(SYMS)
X cc -qa -qp $(CFLAGS) -DPROTO -hi$(SYMS) digraph.c
X csh -c mv -f digraph.pro proto
X
Xobj/edit.o: edit.c $(SYMS)
X cc $(CFLAGS) -hi$(SYMS) edit.c -o obj/edit.o
X
Xproto/edit.pro: edit.c $(SYMS)
X cc -qa -qp $(CFLAGS) -DPROTO -hi$(SYMS) edit.c
X csh -c mv -f edit.pro proto
X
Xobj/fileio.o: fileio.c $(SYMS)
X cc $(CFLAGS) -hi$(SYMS) fileio.c -o obj/fileio.o
X
Xproto/fileio.pro: fileio.c $(SYMS)
X cc -qa -qp $(CFLAGS) -DPROTO -hi$(SYMS) fileio.c
X csh -c mv -f fileio.pro proto
X
Xobj/getchar.o: getchar.c $(SYMS)
X cc $(CFLAGS) -hi$(SYMS) getchar.c -o obj/getchar.o
X
Xproto/getchar.pro: getchar.c $(SYMS)
X cc -qa -qp $(CFLAGS) -DPROTO -hi$(SYMS) getchar.c
X csh -c mv -f getchar.pro proto
X
Xobj/help.o: help.c $(SYMS)
X cc $(CFLAGS) -hi$(SYMS) help.c -o obj/help.o
X
Xproto/help.pro: help.c $(SYMS)
X cc -qa -qp $(CFLAGS) -DPROTO -hi$(SYMS) help.c
X csh -c mv -f help.pro proto
X
Xobj/linefunc.o: linefunc.c $(SYMS)
X cc $(CFLAGS) -hi$(SYMS) linefunc.c -o obj/linefunc.o
X
Xproto/linefunc.pro: linefunc.c $(SYMS)
X cc -qa -qp $(CFLAGS) -DPROTO -hi$(SYMS) linefunc.c
X csh -c mv -f linefunc.pro proto
X
Xobj/main.o: main.c $(SYMS) param.h globals.h
X cc $(CFLAGS) -hi$(SYMS) main.c -o obj/main.o
X
Xproto/main.pro: main.c $(SYMS)
X cc -qa -qp $(CFLAGS) -DPROTO -hi$(SYMS) main.c
X csh -c mv -f main.pro proto
X
Xobj/mark.o: mark.c $(SYMS)
X cc $(CFLAGS) -hi$(SYMS) mark.c -o obj/mark.o
X
Xproto/mark.pro: mark.c $(SYMS)
X cc -qa -qp $(CFLAGS) -DPROTO -hi$(SYMS) mark.c
X csh -c mv -f mark.pro proto
X
Xobj/memfile.o: memfile.c $(SYMS)
X cc $(CFLAGS) -hi$(SYMS) memfile.c -o obj/memfile.o
X
Xproto/memfile.pro: memfile.c $(SYMS)
X cc -qa -qp $(CFLAGS) -DPROTO -hi$(SYMS) memfile.c
X csh -c mv -f memfile.pro proto
X
Xobj/memline.o: memline.c $(SYMS)
X cc $(CFLAGS) -hi$(SYMS) memline.c -o obj/memline.o
X
Xproto/memline.pro: memline.c $(SYMS)
X cc -qa -qp $(CFLAGS) -DPROTO -hi$(SYMS) memline.c
X csh -c mv -f memline.pro proto
X
Xobj/message.o: message.c $(SYMS)
X cc $(CFLAGS) -hi$(SYMS) message.c -o obj/message.o
X
Xproto/message.pro: message.c $(SYMS)
X cc -qa -qp $(CFLAGS) -DPROTO -hi$(SYMS) message.c
X csh -c mv -f message.pro proto
X
Xobj/misccmds.o: misccmds.c $(SYMS)
X cc $(CFLAGS) -hi$(SYMS) misccmds.c -o obj/misccmds.o
X
Xproto/misccmds.pro: misccmds.c $(SYMS)
X cc -qa -qp $(CFLAGS) -DPROTO -hi$(SYMS) misccmds.c
X csh -c mv -f misccmds.pro proto
X
Xobj/normal.o: normal.c $(SYMS) ops.h
X cc $(CFLAGS) -hi$(SYMS) normal.c -o obj/normal.o
X
Xproto/normal.pro: normal.c $(SYMS)
X cc -qa -qp $(CFLAGS) -DPROTO -hi$(SYMS) normal.c
X csh -c mv -f normal.pro proto
X
Xobj/ops.o: ops.c $(SYMS) ops.h
X cc $(CFLAGS) -hi$(SYMS) ops.c -o obj/ops.o
X
Xproto/ops.pro: ops.c $(SYMS)
X cc -qa -qp $(CFLAGS) -DPROTO -hi$(SYMS) ops.c
X csh -c mv -f ops.pro proto
X
Xobj/param.o: param.c $(SYMS)
X cc $(CFLAGS) -hi$(SYMS) param.c -o obj/param.o
X
Xproto/param.pro: param.c $(SYMS)
X cc -qa -qp $(CFLAGS) -DPROTO -hi$(SYMS) param.c
X csh -c mv -f param.pro proto
X
Xobj/quickfix.o: quickfix.c $(SYMS)
X cc $(CFLAGS) -hi$(SYMS) quickfix.c -o obj/quickfix.o
X
Xproto/quickfix.pro: quickfix.c $(SYMS)
X cc -qa -qp $(CFLAGS) -DPROTO -hi$(SYMS) quickfix.c
X csh -c mv -f quickfix.pro proto
X
Xobj/regexp.o: regexp.c $(SYMS)
X cc $(CFLAGS) -hi$(SYMS) regexp.c -o obj/regexp.o
X
Xproto/regexp.pro: regexp.c $(SYMS)
X cc -qa -qp $(CFLAGS) -DPROTO -hi$(SYMS) regexp.c
X csh -c mv -f regexp.pro proto
X
Xobj/regsub.o: regsub.c $(SYMS)
X cc $(CFLAGS) -hi$(SYMS) regsub.c -o obj/regsub.o
X
Xproto/regsub.pro: regsub.c $(SYMS)
X cc -qa -qp $(CFLAGS) -DPROTO -hi$(SYMS) regsub.c
X csh -c mv -f regsub.pro proto
X
Xobj/screen.o: screen.c $(SYMS)
X cc $(CFLAGS) -hi$(SYMS) screen.c -o obj/screen.o
X
Xproto/screen.pro: screen.c $(SYMS)
X cc -qa -qp $(CFLAGS) -DPROTO -hi$(SYMS) screen.c
X csh -c mv -f screen.pro proto
X
Xobj/search.o: search.c $(SYMS)
X cc $(CFLAGS) -hi$(SYMS) search.c -o obj/search.o
X
Xproto/search.pro: search.c $(SYMS)
X cc -qa -qp $(CFLAGS) -DPROTO -hi$(SYMS) search.c
X csh -c mv -f search.pro proto
X
Xobj/tag.o: tag.c $(SYMS)
X cc $(CFLAGS) -hi$(SYMS) tag.c -o obj/tag.o
X
Xproto/tag.pro: tag.c $(SYMS)
X cc -qa -qp $(CFLAGS) -DPROTO -hi$(SYMS) tag.c
X csh -c mv -f tag.pro proto
X
Xobj/term.o: term.c $(SYMS) term.h
X cc $(CFLAGS) -hi$(SYMS) term.c -o obj/term.o
X
Xproto/term.pro: term.c $(SYMS)
X cc -qa -qp $(CFLAGS) -DPROTO -hi$(SYMS) term.c
X csh -c mv -f term.pro proto
X
Xobj/termlib.o: termlib.c $(SYMS)
X cc $(CFLAGS) termlib.c -o obj/termlib.o
X
Xproto/termlib.pro: termlib.c $(SYMS)
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
Xobj/undo.o: undo.c $(SYMS)
X cc $(CFLAGS) -hi$(SYMS) undo.c -o obj/undo.o
X
Xproto/undo.pro: undo.c $(SYMS)
X cc -qa -qp $(CFLAGS) -DPROTO -hi$(SYMS) undo.c
X csh -c mv -f undo.pro proto
X
Xobj/window.o: window.c $(SYMS)
X cc $(CFLAGS) -hi$(SYMS) window.c -o obj/window.o
X
Xproto/window.pro: window.c $(SYMS)
X cc -qa -qp $(CFLAGS) -DPROTO -hi$(SYMS) window.c
X csh -c mv -f window.pro proto
X
Xcmdtab.h: cmdtab.tab mkcmdtab
X mkcmdtab cmdtab.tab cmdtab.h
X
Xmkcmdtab: obj/mkcmdtab.o
X ln +q -o mkcmdtab obj/mkcmdtab.o -lc16
X
Xobj/mkcmdtab.o: mkcmdtab.c
X cc $(CFLAGS) mkcmdtab.c -o obj/mkcmdtab.o
END_OF_FILE
if test 10141 -ne `wc -c <'vim/src/makefile.manx'`; then
echo shar: \"'vim/src/makefile.manx'\" unpacked with wrong size!
fi
# 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'\" \(9401 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# Don't know about 6.50, might work...
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)
X### DEF=WEBB_COMPLETE include Webb's code for command line completion
X### DEF=WEBB_KEYWORD_COMPL include Webb's code for keyword completion
X### DEF=NOTITLE 'title' option off by default
XDEFINES = DEF=DIGRAPHS DEF=SOME_BUILTIN_TCAPS \
X DEF=WEBB_COMPLETE DEF=WEBB_KEYWORD_COMPL
X
X#>>>>> if TERMCAP is defined obj/termlib.o has to be used
X#TERMLIB = obj/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 = 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
XPRO = proto/alloc.pro proto/buffer.pro proto/charset.pro proto/cmdcmds.pro proto/cmdline.pro \
X proto/csearch.pro proto/digraph.pro proto/edit.pro proto/fileio.pro \
X proto/getchar.pro proto/help.pro proto/linefunc.pro proto/main.pro proto/mark.pro \
X proto/memfile.pro proto/memline.pro 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/search.pro \
X proto/tag.pro proto/term.pro proto/termlib.pro \
X proto/undo.pro proto/window.pro proto/amiga.pro
X
X/Vim: $(OBJ) version.c
X $(CC) $(CFLAGS) version.c OBJNAME=obj/
X $(CC) LINK $(COPTS) $(OBJ) obj/version.o $(DBG) PNAME=/Vim
X
Xdebug: $(OBJ) version.c
X $(CC) $(CFLAGS) version.c OBJNAME=obj/
X $(CC) LINK $(COPTS) $(OBJ) 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) obj/version.o obj/mkcmdtab.o /Vim $(GST) mkcmdtab cmdtab.h
X
X$(GST) : vim.h keymap.h macros.h ascii.h term.h structs.h
X $(CC) $(CFLAGS) MGST=$(GST) vim.h
X
X###########################################################################
X
Xobj/alloc.o: alloc.c $(GST)
X $(CC) $(CFLAGS) alloc.c OBJNAME=obj/
X
Xproto/alloc.pro: alloc.c $(GST)
X $(CC) $(CFLAGS) GPFILE=proto/alloc.pro $(PROPT) alloc.c
X
Xobj/amiga.o: amiga.c $(GST)
X $(CC) $(CFLAGS) amiga.c OBJNAME=obj/
X
Xproto/amiga.pro: amiga.c $(GST)
X $(CC) $(CFLAGS) GPFILE=proto/amiga.pro $(PROPT) amiga.c
X
Xobj/buffer.o: buffer.c $(GST)
X $(CC) $(CFLAGS) buffer.c OBJNAME=obj/
X
Xproto/buffer.pro: buffer.c $(GST)
X $(CC) $(CFLAGS) GPFILE=proto/buffer.pro $(PROPT) buffer.c
X
Xobj/charset.o: charset.c $(GST)
X $(CC) $(CFLAGS) charset.c OBJNAME=obj/
X
Xproto/charset.pro: charset.c $(GST)
X $(CC) $(CFLAGS) GPFILE=proto/charset.pro $(PROPT) charset.c
X
Xobj/cmdcmds.o: cmdcmds.c $(GST)
X $(CC) $(CFLAGS) cmdcmds.c OBJNAME=obj/
X
Xproto/cmdcmds.pro: cmdcmds.c $(GST)
X $(CC) $(CFLAGS) GPFILE=proto/cmdcmds.pro $(PROPT) cmdcmds.c
X
Xobj/cmdline.o: cmdline.c $(GST) cmdtab.h
X $(CC) $(CFLAGS) cmdline.c OBJNAME=obj/
X
Xproto/cmdline.pro: cmdline.c $(GST) cmdtab.h
X $(CC) $(CFLAGS) GPFILE=proto/cmdline.pro $(PROPT) cmdline.c
X
Xobj/csearch.o: csearch.c $(GST)
X $(CC) $(CFLAGS) csearch.c OBJNAME=obj/
X
Xproto/csearch.pro: csearch.c $(GST)
X $(CC) $(CFLAGS) GPFILE=proto/csearch.pro $(PROPT) csearch.c
X
Xobj/digraph.o: digraph.c $(GST)
X $(CC) $(CFLAGS) digraph.c OBJNAME=obj/
X
Xproto/digraph.pro: digraph.c $(GST)
X $(CC) $(CFLAGS) GPFILE=proto/digraph.pro $(PROPT) digraph.c
X
Xobj/edit.o: edit.c $(GST)
X $(CC) $(CFLAGS) edit.c OBJNAME=obj/
X
Xproto/edit.pro: edit.c $(GST)
X $(CC) $(CFLAGS) GPFILE=proto/edit.pro $(PROPT) edit.c
X
Xobj/fileio.o: fileio.c $(GST)
X $(CC) $(CFLAGS) fileio.c OBJNAME=obj/
X
Xproto/fileio.pro: fileio.c $(GST)
X $(CC) $(CFLAGS) GPFILE=proto/fileio.pro $(PROPT) fileio.c
X
Xobj/getchar.o: getchar.c $(GST)
X $(CC) $(CFLAGS) getchar.c OBJNAME=obj/
X
Xproto/getchar.pro: getchar.c $(GST)
X $(CC) $(CFLAGS) GPFILE=proto/getchar.pro $(PROPT) getchar.c
X
Xobj/help.o: help.c $(GST)
X $(CC) $(CFLAGS) help.c OBJNAME=obj/
X
Xproto/help.pro: help.c $(GST)
X $(CC) $(CFLAGS) GPFILE=proto/help.pro $(PROPT) help.c
X
Xobj/linefunc.o: linefunc.c $(GST)
X $(CC) $(CFLAGS) linefunc.c OBJNAME=obj/
X
Xproto/linefunc.pro: linefunc.c $(GST)
X $(CC) $(CFLAGS) GPFILE=proto/linefunc.pro $(PROPT) linefunc.c
X
Xobj/main.o: main.c $(GST)
X $(CC) $(CFLAGS) main.c OBJNAME=obj/
X
Xproto/main.pro: main.c $(GST)
X $(CC) $(CFLAGS) GPFILE=proto/main.pro $(PROPT) main.c
X
Xobj/mark.o: mark.c $(GST)
X $(CC) $(CFLAGS) mark.c OBJNAME=obj/
X
Xproto/mark.pro: mark.c $(GST)
X $(CC) $(CFLAGS) GPFILE=proto/mark.pro $(PROPT) mark.c
X
Xobj/memfile.o: memfile.c $(GST)
X $(CC) $(CFLAGS) memfile.c OBJNAME=obj/
X
Xproto/memfile.pro: memfile.c $(GST)
X $(CC) $(CFLAGS) GPFILE=proto/memfile.pro $(PROPT) memfile.c
X
Xobj/memline.o: memline.c $(GST)
X $(CC) $(CFLAGS) memline.c OBJNAME=obj/
X
Xproto/memline.pro: memline.c $(GST)
X $(CC) $(CFLAGS) GPFILE=proto/memline.pro $(PROPT) memline.c
X
Xobj/message.o: message.c $(GST)
X $(CC) $(CFLAGS) message.c OBJNAME=obj/
X
Xproto/message.pro: message.c $(GST)
X $(CC) $(CFLAGS) GPFILE=proto/message.pro $(PROPT) message.c
X
Xobj/misccmds.o: misccmds.c $(GST)
X $(CC) $(CFLAGS) misccmds.c OBJNAME=obj/
X
Xproto/misccmds.pro: misccmds.c $(GST)
X $(CC) $(CFLAGS) GPFILE=proto/misccmds.pro $(PROPT) misccmds.c
X
Xobj/normal.o: normal.c $(GST) ops.h
X $(CC) $(CFLAGS) normal.c OBJNAME=obj/
X
Xproto/normal.pro: normal.c $(GST)
X $(CC) $(CFLAGS) GPFILE=proto/normal.pro $(PROPT) normal.c
X
Xobj/ops.o: ops.c $(GST) ops.h
X $(CC) $(CFLAGS) ops.c OBJNAME=obj/
X
Xproto/ops.pro: ops.c $(GST)
X $(CC) $(CFLAGS) GPFILE=proto/ops.pro $(PROPT) ops.c
X
Xobj/param.o: param.c $(GST)
X $(CC) $(CFLAGS) param.c OBJNAME=obj/
X
Xproto/param.pro: param.c $(GST)
X $(CC) $(CFLAGS) GPFILE=proto/param.pro $(PROPT) param.c
X
Xobj/quickfix.o: quickfix.c $(GST)
X $(CC) $(CFLAGS) quickfix.c OBJNAME=obj/
X
Xproto/quickfix.pro: quickfix.c $(GST)
X $(CC) $(CFLAGS) GPFILE=proto/quickfix.pro $(PROPT) quickfix.c
X
Xobj/regexp.o: regexp.c $(GST)
X $(CC) $(CFLAGS) regexp.c OBJNAME=obj/
X
Xproto/regexp.pro: regexp.c $(GST)
X $(CC) $(CFLAGS) GPFILE=proto/regexp.pro $(PROPT) regexp.c
X
Xobj/regsub.o: regsub.c $(GST)
X $(CC) $(CFLAGS) regsub.c OBJNAME=obj/
X
Xproto/regsub.pro: regsub.c $(GST)
X $(CC) $(CFLAGS) GPFILE=proto/regsub.pro $(PROPT) regsub.c
X
Xobj/screen.o: screen.c $(GST)
X $(CC) $(CFLAGS) screen.c OBJNAME=obj/
X
Xproto/screen.pro: screen.c $(GST)
X $(CC) $(CFLAGS) GPFILE=proto/screen.pro $(PROPT) screen.c
X
Xobj/search.o: search.c $(GST)
X $(CC) $(CFLAGS) search.c OBJNAME=obj/
X
Xproto/search.pro: search.c $(GST)
X $(CC) $(CFLAGS) GPFILE=proto/search.pro $(PROPT) search.c
X
Xobj/tag.o: tag.c $(GST)
X $(CC) $(CFLAGS) tag.c OBJNAME=obj/
X
Xproto/tag.pro: tag.c $(GST)
X $(CC) $(CFLAGS) GPFILE=proto/tag.pro $(PROPT) tag.c
X
Xobj/term.o: term.c $(GST)
X $(CC) $(CFLAGS) term.c OBJNAME=obj/
X
Xproto/term.pro: term.c $(GST)
X $(CC) $(CFLAGS) GPFILE=proto/term.pro $(PROPT) term.c
X
Xobj/termlib.o: termlib.c $(GST)
X $(CC) $(CFLAGS) termlib.c OBJNAME=obj/
X
Xproto/termlib.pro: termlib.c $(GST)
X $(CC) $(CFLAGS) GPFILE=proto/termlib.pro $(PROPT) termlib.c
X
Xobj/undo.o: undo.c $(GST)
X $(CC) $(CFLAGS) undo.c OBJNAME=obj/
X
Xproto/undo.pro: undo.c $(GST)
X $(CC) $(CFLAGS) GPFILE=proto/undo.pro $(PROPT) undo.c
X
Xobj/window.o: window.c $(GST)
X $(CC) $(CFLAGS) window.c OBJNAME=obj/
X
Xproto/window.pro: window.c $(GST)
X $(CC) $(CFLAGS) GPFILE=proto/window.pro $(PROPT) window.c
X
Xcmdtab.h: cmdtab.tab mkcmdtab
X mkcmdtab cmdtab.tab cmdtab.h
X
Xobj/mkcmdtab.o: mkcmdtab.c
X $(CC) $(CFLAGS) mkcmdtab.c OBJNAME=obj/
X
Xmkcmdtab: obj/mkcmdtab.o
X $(CC) LINK $(COPTS) obj/mkcmdtab.o PNAME=mkcmdtab
END_OF_FILE
if test 9401 -ne `wc -c <'vim/src/makefile.sas'`; then
echo shar: \"'vim/src/makefile.sas'\" unpacked with wrong size!
fi
# end of 'vim/src/makefile.sas'
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'\" \(10133 characters\)
sed "s/^X//" >'vim/src/mark.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 * 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
X/*
X * This file contains routines to maintain and manipulate marks.
X */
X
Xstatic struct filemark namedfm[NMARKS]; /* new marks with file nr */
X
X/*
X * setmark(c) - set named mark 'c' at current cursor position
X *
X * Returns OK on success, FAIL 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 curbuf->b_namedm[i] = curwin->w_cursor;
X return OK;
X }
X if (isupper(c))
X {
X i = c - 'A';
X namedfm[i].mark = curwin->w_cursor;
X namedfm[i].fnum = curbuf->b_fnum;
X return OK;
X }
X return FAIL;
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 curwin->w_prev_pcmark = curwin->w_pcmark;
X curwin->w_pcmark = curwin->w_cursor;
X
X#ifndef ROTATE
X /*
X * simply add the new entry at the end of the list
X */
X curwin->w_jumplistidx = curwin->w_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 (curwin->w_jumplistidx < curwin->w_jumplistlen)
X ++curwin->w_jumplistidx;
X while (curwin->w_jumplistidx < curwin->w_jumplistlen)
X {
X tempmark = curwin->w_jumplist[curwin->w_jumplistlen - 1];
X for (i = curwin->w_jumplistlen - 1; i > 0; --i)
X curwin->w_jumplist[i] = curwin->w_jumplist[i - 1];
X curwin->w_jumplist[0] = tempmark;
X ++curwin->w_jumplistidx;
X }
X#endif
X
X /* only add new entry if it differs from the last one */
X if (curwin->w_jumplistlen == 0 ||
X curwin->w_jumplist[curwin->w_jumplistidx - 1].mark.lnum !=
X curwin->w_pcmark.lnum ||
X curwin->w_jumplist[curwin->w_jumplistidx - 1].fnum !=
X curbuf->b_fnum)
X {
X /* if jumplist is full: remove oldest entry */
X if (++curwin->w_jumplistlen > JUMPLISTSIZE)
X {
X curwin->w_jumplistlen = JUMPLISTSIZE;
X for (i = 1; i < curwin->w_jumplistlen; ++i)
X curwin->w_jumplist[i - 1] = curwin->w_jumplist[i];
X --curwin->w_jumplistidx;
X }
X
X#ifdef ARCHIE
X /* Workaround for a bug in gcc 2.4.5 R2 on the Archimedes
X * Should be fixed in 2.5.x.
X */
X curwin->w_jumplist[curwin->w_jumplistidx].mark.ptr = curwin->w_pcmark.ptr;
X curwin->w_jumplist[curwin->w_jumplistidx].mark.col = curwin->w_pcmark.col;
X#else
X curwin->w_jumplist[curwin->w_jumplistidx].mark = curwin->w_pcmark;
X#endif
X curwin->w_jumplist[curwin->w_jumplistidx].fnum = curbuf->b_fnum;
X ++curwin->w_jumplistidx;
X }
X}
X
X/*
X * checkpcmark() - To change context, call setpcmark(), then move the current
X * position to where ever, then call checkpcmark(). This
X * ensures that the previous context will only be changed if
X * the cursor moved to a different line. -- webb.
X * If pcmark was deleted (with "dG") the previous mark is restored.
X */
X void
Xcheckpcmark()
X{
X if (curwin->w_prev_pcmark.lnum != 0 &&
X (curwin->w_pcmark.lnum == curwin->w_cursor.lnum ||
X curwin->w_pcmark.lnum == 0))
X {
X curwin->w_pcmark = curwin->w_prev_pcmark;
X curwin->w_prev_pcmark.lnum = 0; /* Show it has been checked */
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 (curwin->w_jumplistlen == 0) /* nothing to jump to */
X return (FPOS *)NULL;
X
X if (curwin->w_jumplistidx + count < 0 ||
X curwin->w_jumplistidx + count >= curwin->w_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 (curwin->w_jumplistidx == curwin->w_jumplistlen)
X {
X setpcmark();
X --curwin->w_jumplistidx; /* skip the new entry */
X }
X
X curwin->w_jumplistidx += count;
X /* jump to other file */
X if (curwin->w_jumplist[curwin->w_jumplistidx].fnum != curbuf->b_fnum)
X {
X if (buflist_getfile(curwin->w_jumplist[curwin->w_jumplistidx].fnum,
X curwin->w_jumplist[curwin->w_jumplistidx].mark.lnum, FALSE) == FAIL)
X return (FPOS *)NULL;
X curwin->w_cursor.col = curwin->w_jumplist[curwin->w_jumplistidx].mark.col;
X pos = (FPOS *)-1;
X }
X else
X pos = &(curwin->w_jumplist[curwin->w_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 static FPOS pos_copy;
X
X posp = NULL;
X if (c == '\'' || c == '`') /* previous context mark */
X {
X pos_copy = curwin->w_pcmark; /* need to make a copy because b_pcmark */
X posp = &pos_copy; /* may be changed soon */
X }
X else if (c == '[') /* to start of previous operator */
X {
X if (curbuf->b_startop.lnum > 0 &&
X curbuf->b_startop.lnum <= curbuf->b_ml.ml_line_count)
X posp = &(curbuf->b_startop);
X }
X else if (c == ']') /* to end of previous operator */
X {
X if (curbuf->b_endop.lnum > 0 &&
X curbuf->b_endop.lnum <= curbuf->b_ml.ml_line_count)
X posp = &(curbuf->b_endop);
X }
X else if (islower(c)) /* normal named mark */
X posp = &(curbuf->b_namedm[c - 'a']);
X else if (isupper(c)) /* named file mark */
X {
X c -= 'A';
X posp = &(namedfm[c].mark);
X if (namedfm[c].fnum != curbuf->b_fnum &&
X namedfm[c].mark.lnum != 0 && changefile)
X {
X if (buflist_getfile(namedfm[c].fnum, namedfm[c].mark.lnum, TRUE) == OK)
X {
X curwin->w_cursor.col = namedfm[c].mark.col;
X posp = (FPOS *)-1;
X }
X }
X }
X return posp;
X}
X
X/*
X * clrallmarks() - clear all marks in the buffer 'buf'
X *
X * Used mainly when trashing the entire buffer during ":e" type commands
X */
X void
Xclrallmarks(buf)
X BUF *buf;
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].mark.lnum = 0;
X
X for (i = 0; i < NMARKS; i++)
X buf->b_namedm[i].lnum = 0;
X buf->b_startop.lnum = 0; /* start/end op mark cleared */
X buf->b_endop.lnum = 0;
X}
X
X/*
X * get name of file from a filemark
X */
X char_u *
Xfm_getname(fmark)
X struct filemark *fmark;
X{
X char_u *name;
X
X if (fmark->fnum != curbuf->b_fnum) /* not current file */
X {
X name = buflist_nr2name(fmark->fnum);
X if (name == NULL)
X return (char_u *)"-unknown-";
X return name;
X }
X return (char_u *)"-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_u *name;
X
X gotocmdline(TRUE, NUL);
X msg_outstr((char_u *)"\nmark line file\n");
X for (i = 0; i < NMARKS; ++i)
X {
X if (curbuf->b_namedm[i].lnum != 0)
X {
X sprintf((char *)IObuff, " %c %5ld\n", i + 'a',
X curbuf->b_namedm[i].lnum);
X msg_outstr(IObuff);
X }
X flushbuf();
X }
X for (i = 0; i < NMARKS; ++i)
X {
X if (namedfm[i].mark.lnum != 0)
X {
X name = fm_getname(&namedfm[i]);
X if (name == NULL) /* file name not available */
X continue;
X
X sprintf((char *)IObuff, " %c %5ld %s\n",
X i + 'A',
X namedfm[i].mark.lnum,
X name);
X msg_outstr(IObuff);
X }
X flushbuf(); /* show one line at a time */
X }
X msg_end();
X}
X
X/*
X * print the jumplist
X */
X void
Xdojumps()
X{
X int i;
X char_u *name;
X
X gotocmdline(TRUE, NUL);
X msg_outstr((char_u *)"\n jump line file\n");
X for (i = 0; i < curwin->w_jumplistlen; ++i)
X {
X if (curwin->w_jumplist[i].mark.lnum != 0)
X {
X name = fm_getname(&curwin->w_jumplist[i]);
X if (name == NULL) /* file name not available */
X continue;
X
X sprintf((char *)IObuff, "%c %2d %5ld %s\n",
X i == curwin->w_jumplistidx ? '>' : ' ',
X i + 1,
X curwin->w_jumplist[i].mark.lnum,
X name);
X msg_outstr(IObuff);
X }
X flushbuf();
X }
X if (curwin->w_jumplistidx == curwin->w_jumplistlen)
X msg_outstr((char_u *)">\n");
X msg_end();
X}
X
X/*
X * adjust marks between line1 and line2 (inclusive) to move 'inc' lines
X * If 'inc' is MAXLNUM the mark is made invalid.
X */
X void
Xmark_adjust(line1, line2, inc)
X linenr_t line1;
X linenr_t line2;
X long inc;
X{
X int i;
X int fnum = curbuf->b_fnum;
X linenr_t *lp;
X WIN *win;
X
X/* named marks, lower case and upper case */
X for (i = 0; i < NMARKS; i++)
X {
X lp = &(curbuf->b_namedm[i].lnum);
X if (*lp >= line1 && *lp <= line2)
X {
X if (inc == MAXLNUM)
X *lp = 0;
X else
X *lp += inc;
X }
X if (namedfm[i].fnum == fnum)
X {
X lp = &(namedfm[i].mark.lnum);
X if (*lp >= line1 && *lp <= line2)
X {
X if (inc == MAXLNUM)
X *lp = 0;
X else
X *lp += inc;
X }
X }
X }
X
X/* previous context mark */
X lp = &(curwin->w_pcmark.lnum);
X if (*lp >= line1 && *lp <= line2)
X {
X if (inc == MAXLNUM)
X *lp = 0;
X else
X *lp += inc;
X }
X
X/* previous pcmark */
X lp = &(curwin->w_prev_pcmark.lnum);
X if (*lp >= line1 && *lp <= line2)
X {
X if (inc == MAXLNUM)
X *lp = 0;
X else
X *lp += inc;
X }
X
X/* quickfix marks */
X qf_mark_adjust(line1, line2, inc);
X
X/* jumplist marks */
X for (win = firstwin; win != NULL; win = win->w_next)
X {
X for (i = 0; i < win->w_jumplistlen; ++i)
X if (win->w_jumplist[i].fnum == fnum)
X {
X lp = &(win->w_jumplist[i].mark.lnum);
X if (*lp >= line1 && *lp <= line2)
X {
X if (inc == MAXLNUM)
X *lp = 0;
X else
X *lp += inc;
X }
X }
X /*
X * also adjust the line at the top of the window and the cursor position
X * for windows with the same buffer.
X */
X if (win != curwin && win->w_buffer == curbuf)
X {
X if (win->w_topline >= line1 && win->w_topline <= line2)
X {
X if (inc == MAXLNUM) /* topline is deleted */
X win->w_topline = line1;
X else /* keep topline on the same line */
X win->w_topline += inc;
X }
X if (win->w_cursor.lnum >= line1 && win->w_cursor.lnum <= line2)
X {
X if (inc == MAXLNUM) /* line with cursor is deleted */
X {
X win->w_cursor.lnum = line1;
X win->w_cursor.col = 0;
X }
X else /* keep cursor on the same line */
X win->w_cursor.lnum += inc;
X }
X }
X }
X}
END_OF_FILE
if test 10133 -ne `wc -c <'vim/src/mark.c'`; then
echo shar: \"'vim/src/mark.c'\" unpacked with wrong size!
fi
# end of 'vim/src/mark.c'
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'\" \(9490 characters\)
sed "s/^X//" >'vim/src/message.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 * message.c: functions for displaying messages on the command line
X */
X
X#include "vim.h"
X#include "globals.h"
X#define MESSAGE /* don't include prototype for smsg() */
X#include "proto.h"
X#include "param.h"
X
Xstatic int msg_check_screen __ARGS((void));
X
Xstatic int lines_left = -1; /* lines left for listing */
X
X/*
X * msg(s) - displays the string 's' on the status line
X * return TRUE if wait_return not called
X */
X int
Xmsg(s)
X char_u *s;
X{
X if (!screen_valid()) /* terminal not initialized */
X {
X fprintf(stderr, (char *)s);
X fflush(stderr);
X return TRUE;
X }
X
X msg_start();
X if (msg_highlight) /* actually it is highlighting instead of invert */
X start_highlight();
X msg_outtrans(s, -1);
X if (msg_highlight)
X {
X stop_highlight();
X msg_highlight = FALSE; /* clear for next call */
X }
X msg_ceol();
X return msg_end();
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_u *s;
X long a1, a2, a3, a4, a5, a6, a7, a8, a9, a10;
X{
X sprintf((char *)IObuff, (char *)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 * return TRUE if wait_return not called
X */
X int
Xemsg(s)
X char_u *s;
X{
X if (p_eb)
X beep(); /* also includes flush_buffers() */
X else
X flush_buffers(FALSE); /* flush internal buffers */
X (void)set_highlight('e'); /* set highlight mode for error messages */
X msg_highlight = TRUE;
X/*
X * Msg returns TRUE if wait_return() was not called.
X * In that case may call sleep() to give the user a chance to read the message.
X * Don't call sleep() if dont_sleep is set.
X */
X if (msg(s))
X {
X if (dont_sleep)
X {
X msg_outchar('\n'); /* one message per line, don't overwrite */
X cmdline_row = msg_row;
X need_wait_return = TRUE;
X }
X else
X sleep(1); /* give the user a chance to read the message */
X return TRUE;
X }
X return FALSE;
X}
X
X int
Xemsg2(s, a1)
X char_u *s, *a1;
X{
X sprintf((char *)IObuff, (char *)s, (char *)a1);
X return emsg(IObuff);
X}
X
X/*
X * wait for the user to hit a key (normally a return)
X * if 'redraw' is TRUE, clear and redraw the screen
X * if 'redraw' is FALSE, just redraw the screen
X * if 'redraw' is -1, don't redraw at all
X */
X void
Xwait_return(redraw)
X int redraw;
X{
X int c;
X int oldState;
X int tmpState;
X
X/*
X * With the global command (and some others) we only need one return at the
X * end. Adjust cmdline_row to avoid the next message overwriting the last one.
X */
X if (no_wait_return)
X {
X need_wait_return = TRUE;
X cmdline_row = msg_row;
X if (!termcap_active)
X starttermcap();
X return;
X }
X need_wait_return = FALSE;
X lines_left = -1;
X oldState = State;
X State = HITRETURN;
X if (got_int)
X msg_outstr((char_u *)"Interrupt: ");
X
X (void)set_highlight('r');
X start_highlight();
X#ifdef ORG_HITRETURN
X msg_outstr("Press RETURN to continue");
X stop_highlight();
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 msg_outstr((char_u *)"Press RETURN or enter command to continue");
X stop_highlight();
X do
X {
X c = vgetc();
X got_int = FALSE;
X } while (c == Ctrl('C'));
X breakcheck();
X if (strchr("\r\n ", c) == NULL)
X stuffcharReadbuff(c);
X#endif
X
X /*
X * If the user hits ':' we get a command line from the next line.
X */
X if (c == ':')
X cmdline_row = msg_row;
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 and no ':' typed.
X */
X tmpState = State;
X State = oldState; /* restore State before set_winsize */
X msg_check();
X if (tmpState == SETWSIZE) /* got resize event while in vgetc() */
X set_winsize(0, 0, FALSE);
X else if (redraw == TRUE)
X {
X if (c == ':')
X must_redraw = CLEAR;
X else
X updateScreen(CLEAR);
X }
X else if (msg_scrolled && c != ':' && redraw != -1)
X updateScreen(VALID);
X
X if (c == ':')
X skip_redraw = TRUE; /* skip redraw once */
X}
X
X/*
X * Prepare for outputting characters in the command line.
X */
X void
Xmsg_start()
X{
X did_msg = TRUE; /* for doglob() */
X keep_msg = NULL; /* don't display old message now */
X msg_pos(cmdline_row, 0);
X cursor_off();
X lines_left = cmdline_row;
X}
X
X/*
X * Move message position. This should always be used after moving the cursor.
X * Use negative value if row or col does not have to be changed.
X */
X void
Xmsg_pos(row, col)
X int row, col;
X{
X if (row >= 0)
X msg_row = row;
X if (col >= 0)
X msg_col = col;
X screen_start();
X}
X
X void
Xmsg_outchar(c)
X int c;
X{
X char_u buf[2];
X
X buf[0] = c;
X buf[1] = NUL;
X msg_outstr(buf);
X}
X
X void
Xmsg_outnum(n)
X long n;
X{
X char_u buf[20];
X
X sprintf((char *)buf, "%ld", n);
X msg_outstr(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
Xmsg_outtrans(str, len)
X register char_u *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 msg_outstr(transchar(*str));
X retval += charsize(*str);
X ++str;
X }
X return retval;
X}
X
X/*
X * print line for :p command
X */
X void
Xmsg_prt_line(s)
X char_u *s;
X{
X register int si = 0;
X register int c;
X register int col = 0;
X
X int n_extra = 0;
X int n_spaces = 0;
X char_u *p = NULL; /* init to make SASC shut up */
X int n;
X
X for (;;)
X {
X if (n_extra)
X {
X --n_extra;
X c = *p++;
X }
X else if (n_spaces)
X {
X --n_spaces;
X c = ' ';
X }
X else
X {
X c = s[si++];
X if (c == TAB && !curwin->w_p_list)
X {
X /* tab amount depends on current column */
X n_spaces = curbuf->b_p_ts - col % curbuf->b_p_ts - 1;
X c = ' ';
X }
X else if (c == NUL && curwin->w_p_list)
X {
X p = (char_u *)"";
X n_extra = 1;
X c = '$';
X }
X else if (c != NUL && (n = charsize(c)) > 1)
X {
X n_extra = n - 1;
X p = transchar(c);
X c = *p++;
X }
X }
X
X if (c == NUL)
X break;
X
X msg_outchar(c);
X col++;
X }
X}
X
X/*
X * output a string to the screen at position msg_row, msg_col
X * Update msg_row and msg_col for the next message.
X */
X void
Xmsg_outstr(s)
X char_u *s;
X{
X int c;
X
X /*
X * if there is no valid screen, use fprintf so we can see error messages
X */
X if (!msg_check_screen())
X {
X fprintf(stderr, (char *)s);
X return;
X }
X
X while (*s)
X {
X /*
X * the screen is scrolled up when:
X * - When outputting a newline in the last row
X * - when outputting a character in the last column of the last row
X * (some terminals scroll automatically, some don't. To avoid problems
X * we scroll ourselves)
X */
X if (msg_row >= Rows - 1 && (*s == '\n' || msg_col >= Columns - 1))
X {
X screen_del_lines(0, 0, 1, (int)Rows); /* always works */
X msg_row = Rows - 2;
X if (msg_col >= Columns) /* can happen after screen resize */
X msg_col = Columns - 1;
X ++msg_scrolled;
X if (cmdline_row > 0)
X --cmdline_row;
X /*
X * if screen is completely filled wait for a character
X */
X if (p_more && --lines_left == 0)
X {
X windgoto((int)Rows - 1, 0);
X outstr((char_u *)"-- more --");
X c = vgetc();
X if (c == CR || c == NL)
X lines_left = 1;
X else if (c == 'q' || c == Ctrl('C'))
X got_int = TRUE;
X else
X lines_left = Rows - 1;
X outstr((char_u *)"\r ");
X }
X screen_start();
X }
X if (*s == '\n')
X {
X msg_col = 0;
X ++msg_row;
X }
X else
X {
X screen_outchar(*s, msg_row, msg_col);
X if (++msg_col >= Columns)
X {
X msg_col = 0;
X ++msg_row;
X }
X }
X ++s;
X }
X}
X
X/*
X * msg_check_screen - check if the screen is initialized.
X * Also check msg_row and msg_col, if they are too big it may cause a crash.
X */
X static int
Xmsg_check_screen()
X{
X if (!screen_valid())
X return FALSE;
X
X if (msg_row >= Rows)
X msg_row = Rows - 1;
X if (msg_col >= Columns)
X msg_col = Columns - 1;
X return TRUE;
X}
X
X/*
X * clear from current message position to end of screen
X * Note: msg_col is not updated, so we remember the end of the message
X * for msg_check().
X */
X void
Xmsg_ceol()
X{
X if (!msg_check_screen())
X return;
X screen_fill(msg_row, msg_row + 1, msg_col, (int)Columns, ' ', ' ');
X screen_fill(msg_row + 1, (int)Rows, 0, (int)Columns, ' ', ' ');
X}
X
X/*
X * end putting a message on the screen
X * call wait_return if the message does not fit in the available space
X * return TRUE if wait_return not called.
X */
X int
Xmsg_end()
X{
X lines_left = -1;
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 or editing the command line.
X */
X if (!exiting && msg_check() && State != CMDLINE)
X {
X msg_outchar('\n');
X wait_return(FALSE);
X return FALSE;
X }
X flushbuf();
X return TRUE;
X}
X
X/*
X * If the written message has caused the screen to scroll up, or if we
X * run into the shown command or ruler, we have to redraw the window later.
X */
X int
Xmsg_check()
X{
X lines_left = -1;
X if (msg_scrolled || (msg_row == Rows - 1 && msg_col >= sc_col))
X {
X if (must_redraw < NOT_VALID)
X must_redraw = NOT_VALID;
X redraw_cmdline = TRUE;
X return TRUE;
X }
X return FALSE;
X}
END_OF_FILE
if test 9490 -ne `wc -c <'vim/src/message.c'`; then
echo shar: \"'vim/src/message.c'\" unpacked with wrong size!
fi
# end of 'vim/src/message.c'
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'\" \(761 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 compute_cmdrow __PARMS((void));
Xvoid redrawcmd __PARMS((void));
Xint docmdline __PARMS((unsigned char *cmdline));
Xint autowrite __PARMS((struct buffer *buf));
Xvoid autowrite_all __PARMS((void));
Xint doecmd __PARMS((unsigned char *fname, unsigned char *sfname, unsigned char *command, int hide, long newlnum));
Xvoid gotocmdline __PARMS((int clr, int firstc));
Xvoid gotocmdend __PARMS((void));
Xint check_fname __PARMS((void));
Xint getfile __PARMS((unsigned char *fname, unsigned char *sfname, int setpm, long lnum));
Xunsigned char *ExpandOne __PARMS((unsigned char *str, int list_notfound, int mode));
Xint dosource __PARMS((unsigned char *fname));
END_OF_FILE
if test 761 -ne `wc -c <'vim/src/proto/cmdline.pro'`; then
echo shar: \"'vim/src/proto/cmdline.pro'\" unpacked with wrong size!
fi
# end of 'vim/src/proto/cmdline.pro'
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'\" \(9335 characters\)
sed "s/^X//" >'vim/src/quickfix.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 * 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_u *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 int qf_fnum; /* file number for the line */
X int qf_col; /* column where the error occurred */
X int qf_nr; /* error number */
X char_u *qf_text; /* description of the error */
X char_u qf_cleared;/* set to TRUE if line has been deleted */
X char_u qf_type; /* type of the error (mostly 'E') */
X char_u 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 */
X
X/*
X * Read the errorfile into memory, line by line, building the error list.
X * Return FAIL for error, OK for success.
X */
X int
Xqf_init()
X{
X char_u namebuf[CMDBUFFSIZE + 1];
X char_u errmsg[CMDBUFFSIZE + 1];
X int col;
X int type;
X int 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_u *pfmt, *fmtstr;
X#ifdef UTS2
X char_u *(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 FAIL;
X }
X if ((fd = fopen((char *)p_ef, "r")) == NULL)
X {
X emsg2(e_openerrf, p_ef);
X return FAIL;
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 = 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((char *)IObuff, CMDBUFFSIZE, fd) != NULL && !got_int)
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((char *)IObuff, (char *)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 (namebuf[0] == NUL) /* no file name */
X qfp->qf_fnum = 0;
X else
X qfp->qf_fnum = buflist_add(namebuf);
X if ((qfp->qf_text = strsave(errmsg)) == NULL)
X goto error1;
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_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 breakcheck();
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, 0); /* display first error */
X return OK;
X }
X emsg(e_readerrf);
Xerror1:
X free(qfp);
Xerror2:
X fclose(fd);
X qf_free();
X return FAIL;
X}
X
X/*
X * jump to a quickfix line
X * if dir == FORWARD go "errornr" valid entries forward
X * if dir == BACKWARD go "errornr" valid entries backward
X * else if "errornr" is zero, redisplay the same line
X * else go to entry "errornr"
X */
X void
Xqf_jump(dir, errornr)
X int dir;
X int errornr;
X{
X linenr_t i;
X
X if (qf_count == 0)
X {
X emsg(e_quickfix);
X return;
X }
X
X if (dir == FORWARD) /* next valid entry */
X {
X while (errornr--)
X {
X do
X {
X if (qf_index == qf_count || qf_ptr->qf_next == NULL)
X break;
X ++qf_index;
X qf_ptr = qf_ptr->qf_next;
X } while (!qf_nonevalid && !qf_ptr->qf_valid);
X }
X }
X else if (dir == BACKWARD) /* previous valid entry */
X {
X while (errornr--)
X {
X do
X {
X if (qf_index == 1 || qf_ptr->qf_prev == NULL)
X break;
X --qf_index;
X qf_ptr = qf_ptr->qf_prev;
X } while (!qf_nonevalid && !qf_ptr->qf_valid);
X }
X }
X else if (errornr != 0) /* go to specified number */
X {
X while (errornr < qf_index && qf_index > 1 && qf_ptr->qf_prev != NULL)
X {
X --qf_index;
X qf_ptr = qf_ptr->qf_prev;
X }
X while (errornr > qf_index && qf_index < qf_count && qf_ptr->qf_next != NULL)
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_fnum == 0 || buflist_getfile(qf_ptr->qf_fnum, (linenr_t)1, TRUE) == OK)
X {
X /*
X * Go to line with error, unless qf_lnum is 0.
X */
X i = qf_ptr->qf_lnum;
X if (i > 0)
X {
X if (i > curbuf->b_ml.ml_line_count)
X i = curbuf->b_ml.ml_line_count;
X curwin->w_cursor.lnum = i;
X }
X curwin->w_cursor.col = qf_ptr->qf_col;
X adjust_cursor();
X cursupdate();
X smsg((char_u *)"(%d of %d) %s%s: %s", qf_index, qf_count,
X qf_ptr->qf_cleared ? (char_u *)"(line deleted) " : (char_u *)"",
X qf_types(qf_ptr->qf_type, qf_ptr->qf_nr), qf_ptr->qf_text);
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 for (i = 1; !got_int && i <= qf_count; ++i)
X {
X sprintf((char *)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 msg_outstr(IObuff);
X msg_outchar('\n');
X qfp = qfp->qf_next;
X flushbuf(); /* show one line at a time */
X breakcheck();
X }
X wait_return(FALSE);
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_text);
X free(qf_start);
X qf_start = qfp;
X --qf_count;
X }
X}
X
X/*
X * qf_mark_adjust: adjust marks
X */
X void
Xqf_mark_adjust(line1, line2, inc)
X linenr_t line1;
X linenr_t line2;
X long inc;
X{
X register 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 if (qfp->qf_fnum == curbuf->b_fnum &&
X qfp->qf_lnum >= line1 && qfp->qf_lnum <= line2)
X {
X if (inc == MAXLNUM)
X qfp->qf_cleared = TRUE;
X else
X qfp->qf_lnum += inc;
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_u *
Xqf_types(c, nr)
X int c, nr;
X{
X static char_u buf[20];
X char_u *p1;
X
X p1 = (char_u *)" Error";
X if (c == 'W' || c == 'w')
X p1 = (char_u *)"Warning";
X else if (nr <= 0 && c != 'E' && c != 'e')
X p1 = (char_u *)"";
X
X if (nr <= 0)
X return p1;
X
X sprintf((char *)buf, "%s %3d", p1, nr);
X return buf;
X}
END_OF_FILE
if test 9335 -ne `wc -c <'vim/src/quickfix.c'`; then
echo shar: \"'vim/src/quickfix.c'\" unpacked with wrong size!
fi
# end of 'vim/src/quickfix.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'\" \(8836 characters\)
sed "s/^X//" >'vim/src/vim.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#if defined(SYSV_UNIX) || defined(BSD_UNIX)
X# ifndef UNIX
X# define UNIX
X# endif
X#endif
X
X/*
X * Shorhand for unsinged variables. Many systems, but not all, have u_char
X * already defined, so we use char_u to avoid trouble.
X */
Xtypedef unsigned char char_u;
Xtypedef unsigned short short_u;
Xtypedef unsigned int int_u;
Xtypedef unsigned long long_u;
X
X#include <stdio.h>
X#include <ctype.h>
X
X#if !defined(DOMAIN) && !defined(NOLIMITS)
X# include <limits.h> /* For INT_MAX, remove this if it does not exist */
X#endif
X
X#ifdef BSD_UNIX
X# ifndef apollo
X# include <strings.h>
X# endif
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
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#if !defined(DOMAIN) && !defined(NOSTDLIB)
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) (char_u *)getenv((char *)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#if defined(MSDOS) && !defined(NT)
X# include <dos.h>
X# include <dir.h>
X#endif
X
X#ifdef SOLARIS
X# include <stdlib.h>
X#endif
X
X#ifdef UNIX
X# include <unistd.h> /* any unix that doesn't have it? */
X# ifdef SCO
X# undef M_XENIX
X# include <sys/ndir.h> /* for MAXNAMLEN */
X# else
X# if defined(SOLARIS) || defined(AIX) || defined(ARCHIE)
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#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((char *)(x), (char *)(y))
X#else
X# define fnamecmp(x, y) strcmp((char *)(x), (char *)(y))
X#endif
X
X/*
X * flags for updateScreen()
X * The higher the value, the higher the priority
X */
X#define VALID 10 /* buffer not changed */
X#define INVERTED 20 /* redisplay inverted part */
X#define VALID_TO_CURSCHAR 30 /* buffer at/below cursor changed */
X#define NOT_VALID 40 /* buffer changed */
X#define CURSUPD 50 /* buffer changed, update cursor first */
X#define CLEAR 60 /* screen messed up, clear it */
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 ONLYKEY 0x70 /* like NOMAPPING, but keys allowed */
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/* return values for functions */
X#define OK 1
X#define FAIL 0
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#ifdef WEBB_COMPLETE
X/*
X * values for command line completion
X */
X#define CONTEXT_UNKNOWN -2
X#define EXPAND_UNSUCCESSFUL -1
X#define EXPAND_NOTHING 0
X#define EXPAND_COMMANDS 1
X#define EXPAND_FILES 2
X#define EXPAND_DIRECTORIES 3
X#define EXPAND_SETTINGS 4
X#define EXPAND_BOOL_SETTINGS 5
X#define EXPAND_TAGS 6
X#endif /* WEBB_COMPLETE */
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 and minimum screen size (height is unlimited)
X */
X#ifdef UNIX
X# define MAX_COLUMNS 1024L
X#else
X# define MAX_COLUMNS 255L
X#endif
X#define MIN_COLUMNS 5
X#define MIN_ROWS 1
X#define STATUS_HEIGHT 1 /* height of a status line under a window */
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 WRITEBIN "wb" /* no CR-LF translation */
X# define READBIN "rb"
X# define APPENDBIN "ab"
X#else
X# define WRITEBIN "w"
X# define READBIN "r"
X# define APPENDBIN "a"
X#endif
X
X#define CHANGED set_Changed()
X#define UNCHANGED(buf) unset_Changed(buf)
X
X/*
X * defines to avoid typecasts from (char_u *) to (char *) and back
X */
X#define STRCHR(s, c) (char_u *)strchr((char *)(s), c)
X#define STRRCHR(s, c) (char_u *)strrchr((char *)(s), c)
X#define STRLEN(s) strlen((char *)(s))
X#define STRCPY(d, s) strcpy((char *)(d), (char *)(s))
X#define STRNCPY(d, s, n) strncpy((char *)(d), (char *)(s), n)
X#define STRCMP(d, s) strcmp((char *)(d), (char *)(s))
X#define STRNCMP(d, s, n) strncmp((char *)(d), (char *)(s), n)
X#define STRCAT(d, s) strcat((char *)(d), (char *)(s))
X
X#define MSG(s) msg((char_u *)(s))
X#define EMSG(s) emsg((char_u *)(s))
X#define EMSG2(s, p) emsg2((char_u *)(s), (char_u *)(p))
X#define OUTSTR(s) outstr((char_u *)(s))
X#define OUTSTRN(s) outstrn((char_u *)(s))
X
Xtypedef long linenr_t; /* line number type */
Xtypedef unsigned colnr_t; /* column number type */
X
X#define MAXLNUM (0x7fffffff) /* maximum (invalid) line number */
X#ifdef INT_MAX
X# define MAXCOL INT_MAX /* maximum column number */
X#else
X# define MAXCOL 32767 /* maximum column number, 15 bits */
X#endif
X
X/*
X * Some versions of isspace() handle Meta characters 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 */
X
X/*
X * iswhite() is used for "^" and the like
X */
X#define iswhite(x) ((x) == ' ' || (x) == '\t')
X
X#include "structs.h" /* file that defines many structures */
X
X#ifdef AMIGA
X# include "amiga.h"
X#endif
X
X#ifdef ARCHIE
X# include "archie.h"
X#endif
X
X#ifdef MSDOS
X# include "msdos.h"
X#endif
X
X#ifdef UNIX
X# include "unix.h"
X#endif
END_OF_FILE
if test 8836 -ne `wc -c <'vim/src/vim.h'`; then
echo shar: \"'vim/src/vim.h'\" unpacked with wrong size!
fi
# end of 'vim/src/vim.h'
fi
echo shar: End of archive 23 \(of 26\).
cp /dev/null ark23isdone
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...