home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Usenet 1994 October
/
usenetsourcesnewsgroupsinfomagicoctober1994disk2.iso
/
misc
/
volume37
/
vim
/
part10
< prev
next >
Wrap
Text File
|
1993-04-24
|
40KB
|
1,311 lines
Newsgroups: comp.sources.misc
From: mool@oce.nl (Bram Moolenaar)
Subject: v37i010: vim - Vi IMitation editor v1.27, Part10/24
Message-ID: <1993Apr25.013249.22121@sparky.imd.sterling.com>
X-Md4-Signature: 9deda35be89b3c582eb5d52aada5fe78
Date: Sun, 25 Apr 1993 01:32:49 GMT
Approved: kent@sparky.imd.sterling.com
Submitted-by: mool@oce.nl (Bram Moolenaar)
Posting-number: Volume 37, Issue 10
Archive-name: vim/part10
Environment: UNIX, AMIGA, MS-DOS
#! /bin/sh
# This is a shell archive. Remove anything before this line, then unpack
# it by saving it into a file and typing "sh file". To overwrite existing
# files, type "sh file -c". You can also feed this as standard input via
# unshar, or by typing "sh <file", e.g.. If this archive is complete, you
# will see the following message at the end:
# "End of archive 10 (of 23)."
# Contents: vim/src/tags vim/src/term.c
# Wrapped by mool@oce-rd2 on Mon Apr 19 15:50:10 1993
PATH=/bin:/usr/bin:/usr/ucb ; export PATH
if test -f 'vim/src/tags' -a "${1}" != "-c" ; then
echo shar: Will not clobber existing file \"'vim/src/tags'\"
else
echo shar: Extracting \"'vim/src/tags'\" \(17914 characters\)
sed "s/^X//" >'vim/src/tags' <<'END_OF_FILE'
XAppendNumberToRedobuff buffers.c /^AppendNumberToRedobuff(n)$/
XAppendToRedobuff buffers.c /^AppendToRedobuff(s)$/
XChk_Abort amiga.c /^Chk_Abort()$/
XCtrl ascii.h /^#define Ctrl(x) ((x) & 0x1f)$/
XDoOneCmd cmdline.c /^DoOneCmd(buff)$/
XExpandOne cmdline.c /^ExpandOne(str, list_notfound, mode)$/
XExpandWildCards amiga.c /^ExpandWildCards(num_pat, pat, num_file, file, file/
XFAIL regexp.c /^#define FAIL(m) { emsg(m); return NULL; }$/
XFreeWild amiga.c /^FreeWild(num, file)$/
XFullName amiga.c /^FullName(fname, buf, len)$/
XGetChars amiga.c /^GetChars(buf, maxlen, type)$/
XINIT normal.c /^#define INIT(x) x$/
XISSPECIAL edit.c /^#define ISSPECIAL(c) ((c) < ' ' || (c) >= DEL)$/
XMP amiga.c /^#define MP(xx) ((struct MsgPort *)((struct FileHan/
XMaddcr addcr.c /^main(argc, argv)$/
XMagic regexp.c /^#define Magic(x) ((x)|('\\\\'<<8))$/
XMmain main.c /^main(argc, argv)$/
XMmkcmdtab mkcmdtab.c /^main(argc, argv)$/
XNEXT regexp.c /^#define NEXT(p) (((*((p)+1)&0377)<<8) + (*((p)+2)&/
XOP regexp.c /^#define OP(p) (*(p))$/
XOPENDEBUG debug.h /^# define OPENDEBUG(file)\\$/
XOPERAND regexp.c /^#define OPERAND(p) ((p) + 3)$/
XOpencmd misccmds.c /^Opencmd(dir, redraw)$/
XPeekChr regexp.c /^#define PeekChr() curchr \/* shortcut only when las/
XRead unix.c /^Read(buf, maxlen)$/
XRealWaitForChar unix.c /^RealWaitForChar(ticks)$/
XResetBuffers buffers.c /^ResetBuffers()$/
XSupdatescript script.c /^Supdatescript(str)$/
XTTEST term.c /^# define TTEST(a) debug1("%s: ", "a"); if (a) {deb/
XUCHARAT regexp.c /^#define UCHARAT(p) ((int)*(unsigned char *)(p))$/
XWaitForChar msdos.c /^WaitForChar(msec)$/
X__ARGS regsub.c /^# define __ARGS(a) a$/
X__PARMS vim.h /^# define __PARMS(x) x$/
X_addfmt termlib.c /^_addfmt(buf, fmt, val) \/* add val to b/
X_find termlib.c /^_find(s, set) \/* finds next c in s that's a memb/
X_match termlib.c /^_match(s1, s2) \/* returns length o/
Xadd_buff buffers.c /^add_buff(buf, s)$/
Xadd_num_buff buffers.c /^add_num_buff(buf, n)$/
Xaddfile msdos.c /^addfile(fl, f)$/
Xaddstar cmdline.c /^addstar(fname, len)$/
XadjustCurpos linefunc.c /^adjustCurpos()$/
Xadjust_lnum normal.c /^adjust_lnum()$/
Xadjustmark mark.c /^adjustmark(old, new)$/
Xalloc alloc.c /^alloc(size)$/
Xalloc_block storage.c /^alloc_block()$/
Xalloc_line storage.c /^alloc_line(size)$/
Xappendline storage.c /^appendline(after, s)$/
Xask_yesno misccmds.c /^ask_yesno(str)$/
Xautowrite cmdline.c /^autowrite()$/
Xbck_word search.c /^bck_word(count, type)$/
Xbeep misccmds.c /^beep()$/
Xbeginline edit.c /^beginline(flag)$/
Xblink msdos.c /^blink(n)$/
Xblock_prep ops.c /^block_prep(lnum, delete)$/
Xbreakcheck amiga.c /^breakcheck()$/
Xbsdmemset alloc.c /^bsdmemset(ptr, c, size)$/
Xbuf1line macros.h /^#define buf1line() (line_count == 1)$/
Xbufempty macros.h /^#define bufempty() (buf1line() && lineempty((linen/
Xbzero unix.c /^# define bzero(a, b) memset((a), 0, (b))$/
Xcall_shell amiga.c /^call_shell(cmd, filter)$/
Xcanincrease storage.c /^canincrease(n)$/
Xcatch_cbrk msdos.c /^catch_cbrk()$/
Xcatch_cint msdos.c /^catch_cint(bp, di, si, ds, es, dx, cx, bx, ax)$/
Xcbrk_handler msdos.c /^cbrk_handler()$/
Xcharsize charset.c /^charsize(c)$/
Xchartabsize charset.c /^chartabsize(c, col)$/
Xcheck_changed cmdline.c /^check_changed(checkaw)$/
Xcheck_fname cmdline.c /^check_fname()$/
Xcheck_list storage.c /^check_list()$/
Xcheck_more cmdline.c /^check_more()$/
Xcheck_readonly cmdline.c /^check_readonly()$/
Xcheck_win amiga.c /^check_win(argc, argv)$/
Xcheck_winsize term.c /^check_winsize()$/
Xcheckclearop normal.c /^checkclearop()$/
Xcheckclearopq normal.c /^checkclearopq()$/
Xchk_mline fileio.c /^chk_mline(lnum)$/
Xclear_line screen.c /^clear_line()$/
Xclear_termparam param.c /^clear_termparam()$/
Xclearmarked storage.c /^clearmarked()$/
Xclearopbeep normal.c /^clearopbeep()$/
Xclrallmarks mark.c /^clrallmarks()$/
Xclrtags tag.c /^clrtags()$/
Xcls search.c /^cls()$/
Xcmdchecklen cmdline.c /^cmdchecklen()$/
Xcoladvance linefunc.c /^coladvance(wcol)$/
Xcomp_Botline screen.c /^comp_Botline()$/
Xcopy_redo buffers.c /^copy_redo()$/
Xcopy_spaces alloc.c /^copy_spaces(ptr, count)$/
Xcstrchr regexp.c /^cstrchr(s, c)$/
Xcstrncmp regexp.c /^cstrncmp(s1, s2, n)$/
Xcurs_columns screen.c /^curs_columns()$/
Xcursorcmd cmdline.c /^cursorcmd()$/
Xcursupdate screen.c /^cursupdate()$/
Xdebug debug.h /^# define debug(x) {fprintf(debugfp,x);fflush(debug/
Xdebug1 debug.h /^# define debug1(x,a) {fprintf(debugfp,x,a);fflush(/
Xdebug2 debug.h /^# define debug2(x,a,b) {fprintf(debugfp,x,a,b);ffl/
Xdebug3 debug.h /^# define debug3(x,a,b,c) {fprintf(debugfp,x,a,b,c)/
Xdec linefunc.c /^dec(lp)$/
XdecCurpos linefunc.c /^decCurpos()$/
Xdecl linefunc.c /^decl(lp)$/
Xdecrmarks mark.c /^decrmarks()$/
Xdecrtags tag.c /^decrtags()$/
Xdelchar misccmds.c /^delchar(fixpos)$/
Xdellines misccmds.c /^dellines(nlines, can_update)$/
Xdelmode screen.c /^delmode()$/
Xdelsline storage.c /^delsline(nr, delmarks)$/
Xdirname amiga.c /^dirname(buf, len)$/
Xdo_Lower regsub.c /^do_Lower(d, c)$/
Xdo_Upper regsub.c /^do_Upper(d, c)$/
Xdo_copy regsub.c /^do_copy(d, c)$/
Xdo_lower regsub.c /^do_lower(d, c)$/
Xdo_mlines fileio.c /^do_mlines()$/
Xdo_upper regsub.c /^do_upper(d, c)$/
Xdoaddsub ops.c /^doaddsub(c, Prenum1)$/
Xdoarglist cmdline.c /^doarglist(str)$/
Xdobang cmdline.c /^dobang(addr_count, arg)$/
Xdochange ops.c /^dochange()$/
Xdocmdline cmdline.c /^docmdline(cmdline)$/
Xdodelete ops.c /^dodelete()$/
Xdodis ops.c /^dodis()$/
Xdodojoin ops.c /^dodojoin(count, flag, redraw)$/
Xdoecmd cmdline.c /^doecmd(arg)$/
Xdoexecbuf ops.c /^doexecbuf(c)$/
Xdofilter cmdline.c /^dofilter(buff, do_in, do_out)$/
Xdoformat ops.c /^doformat()$/
Xdoglob csearch.c /^doglob(type, lp, up, cmd)$/
Xdojoin ops.c /^dojoin(insert_space)$/
Xdojumps mark.c /^dojumps()$/
Xdomap buffers.c /^domap(maptype, keys, mode)$/
Xdomarks mark.c /^domarks()$/
Xdoput ops.c /^doput(dir, count)$/
Xdorecord ops.c /^dorecord(c)$/
Xdos_packet amiga.c /^dos_packet(pid, action, arg)$/
Xdosearch search.c /^dosearch(dir, str, reverse, count, echo)$/
Xdoset param.c /^doset(arg)$/
Xdoshell cmdline.c /^doshell(cmd)$/
Xdoshift ops.c /^doshift(op)$/
Xdosource cmdline.c /^dosource(fname)$/
Xdosub csearch.c /^dosub(lp, up, cmd, nextcommand)$/
Xdotag tag.c /^dotag(tag, type, count)$/
Xdotags tag.c /^dotags()$/
Xdotilde ops.c /^dotilde()$/
Xdowrite cmdline.c /^dowrite(arg, append)$/
Xdoyank ops.c /^doyank(deleting)$/
Xedit edit.c /^edit(count)$/
Xemsg message.c /^emsg(s)$/
Xend_word search.c /^end_word(count, type, stop)$/
Xequal macros.h /^#define equal(a, b) (((a).lnum == (b).lnum) && ((a/
Xexpand_env misccmds.c /^expand_env(src, dst, dstlen)$/
Xexpandpath msdos.c /^expandpath(fl, path, fonly, donly, notf)$/
Xfilealloc storage.c /^filealloc()$/
Xfileinfo misccmds.c /^fileinfo()$/
Xfilemess fileio.c /^filemess(name, s)$/
Xfill_inbuf unix.c /^fill_inbuf()$/
Xfindfunc search.c /^findfunc(dir, what, count)$/
Xfindpar search.c /^findpar(dir, count, what)$/
Xfindsent search.c /^findsent(dir, count)$/
Xfindtag tag.c /^findtag(tag)$/
Xfirstmarked storage.c /^firstmarked()$/
Xfirsttaborspace tag.c /^firsttaborspace(str)$/
Xflush_buffers buffers.c /^flush_buffers()$/
Xflushbuf amiga.c /^flushbuf()$/
Xfm_getname mark.c /^fm_getname(fmark)$/
Xfname_case amiga.c /^fname_case(name)$/
Xfnamecmp vim.h /^# define fnamecmp(x, y) stricmp((x), (y))$/
Xfree vim.h /^# define free(x) nofreeNULL(x)$/
Xfree_buff buffers.c /^free_buff(buf)$/
Xfree_line storage.c /^free_line(ptr)$/
Xfree_yank ops.c /^free_yank(n)$/
Xfree_yank_all ops.c /^free_yank_all()$/
Xfreeall storage.c /^freeall()$/
Xfreefiles amiga.c /^freefiles()$/
Xfullpathcmp misccmds.c /^fullpathcmp(s1, s2)$/
Xfwd_word search.c /^fwd_word(count, type)$/
Xgchar misccmds.c /^gchar(pos)$/
XgcharCurpos misccmds.c /^gcharCurpos()$/
Xget_address cmdline.c /^get_address(ptr)$/
Xget_bufcont buffers.c /^get_bufcont(buffer)$/
Xget_fib amiga.c /^get_fib(fname)$/
Xget_indent misccmds.c /^get_indent()$/
Xget_inserted buffers.c /^get_inserted()$/
Xget_literal edit.c /^get_literal(nextc)$/
Xget_recorded buffers.c /^get_recorded()$/
Xget_yank_buffer ops.c /^get_yank_buffer(writing)$/
Xgetaltfile cmdline.c /^getaltfile(n, lnum, setpm)$/
Xgetaltfname cmdline.c /^getaltfname(n)$/
Xgetchr regexp.c /^getchr()$/
Xgetcmdline cmdline.c /^getcmdline(firstc, buff)$/
Xgetdigits misccmds.c /^getdigits(pp)$/
Xgetdigraph digraph.c /^getdigraph(char1, char2)$/
Xgetent termlib.c /^getent(tbuf, term, termcap, buflen)$/
Xgetfile cmdline.c /^getfile(fname, setpm)$/
Xgetlinecol term.c /^getlinecol()$/
Xgetmark mark.c /^getmark(c, changefile)$/
Xgetout main.c /^getout(r)$/
Xgetperm amiga.c /^getperm(name)$/
Xgetvcol screen.c /^getvcol(pos, type)$/
Xgotocmdline cmdline.c /^gotocmdline(clr, firstc)$/
Xhas_wildcard amiga.c /^has_wildcard(p)$/
Xhelp help.c /^help()$/
Xinc linefunc.c /^inc(lp)$/
XincCurpos linefunc.c /^incCurpos()$/
Xinchar term.c /^inchar(async, waitforever)$/
Xincl linefunc.c /^incl(lp)$/
Xincrmarks mark.c /^incrmarks()$/
Xincrtags tag.c /^incrtags()$/
Xinindent misccmds.c /^inindent()$/
Xinit_yank ops.c /^init_yank()$/
Xinitchr regexp.c /^initchr(str)$/
Xinmacro search.c /^inmacro(opt, s)$/
Xins_mapbuf buffers.c /^ins_mapbuf(str)$/
Xinschar misccmds.c /^inschar(c)$/
Xinsertbuf ops.c /^insertbuf(c)$/
Xinsertchar edit.c /^insertchar(c)$/
Xinsfile amiga.c /^insfile(name)$/
Xinsstr misccmds.c /^insstr(s)$/
Xisdir amiga.c /^isdir(name)$/
Xisidchar charset.c /^isidchar(c)$/
Xismult regexp.c /^ismult(c)$/
Xistermparam param.c /^istermparam(p)$/
Xlalloc alloc.c /^lalloc(size, message)$/
Xlineempty macros.h /^#define lineempty(p) (*nr2ptr(p) == NUL)$/
Xlistdigraphs digraph.c /^listdigraphs()$/
Xlock2name amiga.c /^lock2name(lock, buf, len)$/
Xlt macros.h /^#define lt(a, b) (((a).lnum != (b).lnum) \\$/
Xltoreq macros.h /^#define ltoreq(a, b) (((a).lnum != (b).lnum) \\$/
Xm_blockalloc storage.c /^m_blockalloc(size, message)$/
Xm_blockfree storage.c /^m_blockfree()$/
Xm_error storage.c /^m_error()$/
Xmakemap buffers.c /^makemap(fd)$/
Xmakescriptname script.c /^makescriptname()$/
Xmakeset param.c /^makeset(fd)$/
Xmaketitle misccmds.c /^maketitle()$/
Xmark2pos mark.c /^mark2pos(markp)$/
Xmch_get_winsize amiga.c /^mch_get_winsize()$/
Xmch_set_winsize amiga.c /^mch_set_winsize()$/
Xmch_settmode amiga.c /^mch_settmode(raw)$/
Xmch_suspend amiga.c /^mch_suspend()$/
Xmch_windexit amiga.c /^mch_windexit(r)$/
Xmch_windinit amiga.c /^mch_windinit()$/
Xmemmove unix.h /^#define memmove(to, from, len) memcpy(to, from, le/
Xmemset vim.h /^#define memset(ptr, c, size) bsdmemset(ptr, c, siz/
Xmkstr alloc.c /^mkstr(c)$/
Xmktemp cmdline.c /^# define mktemp(a) tmpnam(a)$/
Xmkup regexp.c /^#define mkup(c) (reg_ic ? toupper(c) : (c))$/
Xmodname script.c /^modname(fname, ext)$/
Xmovemark mark.c /^movemark(count)$/
Xmsg message.c /^msg(s)$/
Xmsgmore misccmds.c /^msgmore(n)$/
Xmyregcomp search.c /^myregcomp(pat)$/
Xnextent termlib.c /^nextent(tbuf, termcap, buflen) \/* Read 1 e/
XnofreeNULL alloc.c /^nofreeNULL(x)$/
Xnormal normal.c /^normal()$/
Xnr2ptr storage.c /^nr2ptr(nr)$/
Xonedown edit.c /^onedown(n)$/
Xoneleft edit.c /^oneleft()$/
Xonepage edit.c /^onepage(dir, count)$/
Xoneright edit.c /^oneright()$/
Xoneup edit.c /^oneup(n)$/
Xopenrecover script.c /^openrecover()$/
Xopenscript script.c /^openscript(name)$/
Xotherfile misccmds.c /^otherfile(s)$/
Xoutchar amiga.c /^outchar(c)$/
Xoutnum term.c /^outnum(n)$/
Xoutstr msdos.c /^outstr(s)$/
Xoutstrn term.c /^outstrn(s)$/
Xouttrans charset.c /^outtrans(str, len)$/
Xparse_builtin_tcap term.c /^parse_builtin_tcap(tc, s)$/
Xpchar macros.h /^#define pchar(lp, c) (*(nr2ptr((lp).lnum) + (lp).c/
Xpeekchr regexp.c /^peekchr()$/
Xpeekpeekchr regexp.c /^peekpeekchr()$/
Xplines misccmds.c /^plines(p)$/
Xplines_m misccmds.c /^plines_m(first, last)$/
Xplural misccmds.c /^plural(n)$/
Xpos2ptr storage.c /^pos2ptr(pos)$/
Xpremsg normal.c /^premsg(c1, c2)$/
Xprep_redo normal.c /^prep_redo(num, cmd, c, nchar)$/
Xprintdigraph digraph.c /^printdigraph(p)$/
Xprt_line screen.c /^prt_line(s)$/
Xpstrcmp msdos.c /^pstrcmp(a, b)$/
Xptr2nr storage.c /^ptr2nr(ptr, start)$/
Xputdigraph digraph.c /^putdigraph(str)$/
Xqf_adjustmark quickfix.c /^qf_adjustmark(old, new)$/
Xqf_clrallmarks quickfix.c /^qf_clrallmarks()$/
Xqf_free quickfix.c /^qf_free()$/
Xqf_init quickfix.c /^qf_init(fname)$/
Xqf_jump quickfix.c /^qf_jump(errornr)$/
Xqf_list quickfix.c /^qf_list()$/
Xread_redo buffers.c /^read_redo(init)$/
Xread_stuff buffers.c /^read_stuff(advance)$/
Xreadfile fileio.c /^readfile(fname, from, newfile)$/
Xredrawcmd cmdline.c /^redrawcmd()$/
Xredrawcmdline cmdline.c /^redrawcmdline()$/
Xredrawhelp help.c /^redrawhelp()$/
Xreg regexp.c /^reg(paren, flagp)$/
Xregatom regexp.c /^regatom(flagp)$/
Xregbranch regexp.c /^regbranch(flagp)$/
Xregc regexp.c /^regc(b)$/
Xregcomp regexp.c /^regcomp(exp)$/
Xregdump regexp.c /^regdump(r)$/
Xregexec regexp.c /^regexec(prog, string, at_bol)$/
Xreginsert regexp.c /^reginsert(op, opnd)$/
Xregmatch regexp.c /^regmatch(prog)$/
Xregnext regexp.c /^regnext(p)$/
Xregnode regexp.c /^regnode(op)$/
Xregoptail regexp.c /^regoptail(p, val)$/
Xregpiece regexp.c /^regpiece(flagp)$/
Xregprop regexp.c /^regprop(op)$/
Xregrepeat regexp.c /^regrepeat(p)$/
Xregsub regsub.c /^regsub(prog, source, dest, copy, magic)$/
Xregtail regexp.c /^regtail(p, val)$/
Xregtry regexp.c /^regtry(prog, string)$/
Xremove msdos.c /^remove(name)$/
Xrename unix.c /^rename(src, dst)$/
Xreplaceline storage.c /^replaceline(lnum, new)$/
Xresettitle amiga.c /^resettitle()$/
Xs_del screen.c /^s_del(row, nlines, invalid)$/
Xs_ins screen.c /^s_ins(row, nlines, invalid)$/
Xsamealtfile cmdline.c /^samealtfile(n)$/
Xsave_line storage.c /^save_line(src)$/
Xscreenalloc screen.c /^screenalloc()$/
Xscreenchar screen.c /^screenchar(p, row, col)$/
Xscreenclear screen.c /^screenclear()$/
Xscreenfill screen.c /^screenfill(srow, c)$/
Xscreenline screen.c /^screenline(lnum, startrow, endrow)$/
Xscript_winsize script.c /^script_winsize()$/
Xscript_winsize_pp script.c /^script_winsize_pp()$/
Xscrolldown screen.c /^scrolldown(nlines)$/
Xscrollup screen.c /^scrollup(nlines)$/
Xsearchc search.c /^searchc(c, dir, type, count)$/
Xsearchit search.c /^searchit(pos, dir, str, count, end)$/
Xset_Changed misccmds.c /^set_Changed()$/
Xset_indent misccmds.c /^set_indent(size, delete)$/
Xset_init param.c /^set_init()$/
Xset_keymap amiga.c /^set_keymap(name)$/
Xset_redo_ins buffers.c /^set_redo_ins()$/
Xset_term term.c /^set_term(term)$/
Xset_winsize term.c /^set_winsize(width, height, mustset)$/
Xsetaltfname cmdline.c /^setaltfname(arg, lnum, newfile)$/
Xsetcursor term.c /^setcursor()$/
Xsetfname misccmds.c /^setfname(s)$/
Xsetmark mark.c /^setmark(c)$/
Xsetmarked storage.c /^setmarked(lnum)$/
Xsetpcmark mark.c /^setpcmark()$/
Xsetperm amiga.c /^setperm(name, perm)$/
Xsettitle amiga.c /^settitle(str)$/
Xsettmode term.c /^settmode(raw)$/
Xshift_line ops.c /^shift_line(left)$/
Xshowmap buffers.c /^showmap(mp)$/
Xshowmatch search.c /^showmatch()$/
Xshowmatches cmdline.c /^showmatches(file, len)$/
Xshowmode screen.c /^showmode()$/
Xshowonep param.c /^showonep(p)$/
Xshowparams param.c /^showparams(all)$/
Xshowruler screen.c /^showruler(always)$/
Xsig_winch unix.c /^sig_winch(sig, code, scp)$/
Xskip_chars search.c /^skip_chars(class, dir)$/
Xskipchr regexp.c /^skipchr()$/
Xskipspace misccmds.c /^skipspace(pp)$/
Xskiptospace misccmds.c /^skiptospace(pp)$/
Xsleep amiga.c /^sleep(n)$/
Xsmsg message.c /^smsg(s, a1, a2, a3, a4, a5, a6, a7, a8, a9, a10)$/
XstartPS search.c /^startPS(lnum, para)$/
Xstart_arrow edit.c /^start_arrow()$/
Xstart_redo buffers.c /^start_redo(count)$/
Xstart_redo_ins buffers.c /^start_redo_ins()$/
Xstart_stuff buffers.c /^start_stuff()$/
Xstartinsert ops.c /^startinsert(initstr, startln, count)$/
Xstartscript script.c /^startscript()$/
Xstarttermcap term.c /^starttermcap()$/
Xstop_arrow edit.c /^stop_arrow()$/
Xstop_insert edit.c /^stop_insert()$/
Xstop_redo_ins buffers.c /^stop_redo_ins()$/
Xstopscript script.c /^stopscript()$/
Xstoptermcap term.c /^stoptermcap()$/
Xstrchr vim.h /^#define strchr(ptr, c) index(ptr, c)$/
Xstrcspn regexp.c /^strcspn(s1, s2)$/
Xstrlowcpy msdos.c /^strlowcpy(d, s)$/
Xstrnfcpy regsub.c /^strnfcpy(f, d, s, n)$/
Xstrnsave alloc.c /^strnsave(string, len)$/
Xstrrchr vim.h /^#define strrchr(ptr, c) rindex(ptr, c)$/
Xstrsave alloc.c /^strsave(string)$/
Xstrsize charset.c /^strsize(s)$/
XstuffReadbuff buffers.c /^stuffReadbuff(s)$/
Xstuff_empty buffers.c /^stuff_empty()$/
Xstuff_inserted edit.c /^stuff_inserted(c, count, no_esc)$/
Xstuff_yank ops.c /^stuff_yank(bufname, p)$/
XstuffnumReadbuff buffers.c /^stuffnumReadbuff(n)$/
Xswapchar ops.c /^swapchar(pos)$/
Xtermcapinit term.c /^termcapinit(term)$/
Xtextfile msdos.c /^textfile(on)$/
Xtgetent termlib.c /^tgetent(tbuf, term)$/
Xtgetflag termlib.c /^tgetflag(id)$/
Xtgetnum termlib.c /^tgetnum(id)$/
Xtgetstr termlib.c /^tgetstr(id, buf)$/
Xtgoto term.c /^tgoto(cm, x, y)$/
Xtinit termlib.c /^tinit(name)$/
Xtltoa term.c /^tltoa(i)$/
Xtputs termlib.c /^tputs(cp, affcnt, outc)$/
Xtranschar charset.c /^transchar(c)$/
Xttest term.c /^ttest(pairs)$/
Xu_clearall undo.c /^u_clearall()$/
Xu_clearline undo.c /^u_clearline()$/
Xu_freeentry undo.c /^u_freeentry(uep, n)$/
Xu_freelist undo.c /^u_freelist(uhp)$/
Xu_getbot undo.c /^u_getbot()$/
Xu_redo undo.c /^u_redo(count)$/
Xu_save undo.c /^u_save(top, bot)$/
Xu_saveCurpos undo.c /^u_saveCurpos()$/
Xu_savecommon undo.c /^u_savecommon(top, bot, flag, ptr)$/
Xu_savedel undo.c /^u_savedel(lnum, ptr)$/
Xu_saveline undo.c /^u_saveline(lnum)$/
Xu_savesub undo.c /^u_savesub(lnum, ptr)$/
Xu_sync undo.c /^u_sync()$/
Xu_undo undo.c /^u_undo(count)$/
Xu_undoline undo.c /^u_undoline()$/
Xu_undoredo undo.c /^u_undoredo()$/
Xungetchr regexp.c /^ungetchr()$/
Xunregc regexp.c /^unregc()$/
XupdateScreen screen.c /^updateScreen(type)$/
Xupdateline screen.c /^updateline()$/
Xupdatescript script.c /^updatescript(c)$/
Xusage main.c /^usage(n)$/
Xvgetc buffers.c /^vgetc()$/
Xvgetorpeek buffers.c /^vgetorpeek(advance)$/
Xvim_delay amiga.c /^vim_delay()$/
Xvimgetenv amiga.c /^vimgetenv(var)$/
Xvpeekc buffers.c /^vpeekc()$/
Xwait_return message.c /^wait_return(redraw)$/
Xwin_resize_off amiga.c /^win_resize_off()$/
Xwin_resize_on amiga.c /^win_resize_on()$/
Xwindgoto term.c /^windgoto(row, col)$/
Xwriteit fileio.c /^writeit(fname, start, end, append, forceit)$/
END_OF_FILE
if test 17914 -ne `wc -c <'vim/src/tags'`; then
echo shar: \"'vim/src/tags'\" unpacked with wrong size!
fi
# end of 'vim/src/tags'
fi
if test -f 'vim/src/term.c' -a "${1}" != "-c" ; then
echo shar: Will not clobber existing file \"'vim/src/term.c'\"
else
echo shar: Extracting \"'vim/src/term.c'\" \(18112 characters\)
sed "s/^X//" >'vim/src/term.c' <<'END_OF_FILE'
X/* vi:sw=4:ts=4:
X *
X * term.c -- VIM - Vi IMitation
X *
X * primitive termcap support added
X *
X * NOTE: padding and variable substitution is not performed,
X * when compiling without TERMCAP, we use tputs() and tgoto() dummies.
X *
X * 14.6.92
X */
X
X#include "vim.h"
X#include "globals.h"
X#include "param.h"
X#include "proto.h"
X#ifdef TERMCAP
X# ifdef linux
X# include <termcap.h>
X# define TPUTSFUNCAST (outfuntype)
X# else
X# define TPUTSFUNCAST
X# ifdef AMIGA
X# include "proto/termlib.pro"
X# endif
X# endif
X#endif
X
X#ifdef DEBUG
X# define TTEST(a) debug1("%s: ", "a"); if (a) {debug2("%02x %s\n", *a, a + 1);} else debug("NULL\n");
X#endif
X
Xstatic void parse_builtin_tcap __ARGS((Tcarr *tc, char *s));
X
X/*
X * Builtin_tcaps must always contain DFLT_TCAP as the first entry!
X * DFLT_TCAP is used, when no terminal is specified with -T option or $TERM.
X * The entries are compact, therefore they normally are included even when
X * TERMCAP is defined.
X * When TERMCAP is defined, the builtin entries can be accessed with
X * "builtin_amiga", "builtin_ansi", "builtin_debug", etc.
X */
Xstatic char *builtin_tcaps[] =
X{
X#ifndef NO_BUILTIN_TCAPS
X DFLT_TCAP, /* almost allways included */
X# if !defined(UNIX) && (defined(ALL_BUILTIN_TCAPS) || defined(SOME_BUILTIN_TCAPS))
X ANSI_TCAP, /* default for unix */
X# endif
X# if !defined(AMIGA) && (defined(ALL_BUILTIN_TCAPS) || defined(SOME_BUILTIN_TCAPS))
X AMIGA_TCAP, /* default for amiga */
X# endif
X# if !defined(MSDOS) && (defined(ALL_BUILTIN_TCAPS) || defined(SOME_BUILTIN_TCAPS))
X PCTERM_TCAP, /* default for MSdos */
X# endif
X# if !defined(ATARI) && defined(ALL_BUILTIN_TCAPS)
X ATARI_TCAP, /* default for Atari */
X# endif
X# if defined(UNIX) || defined(ALL_BUILTIN_TCAPS) || defined(SOME_BUILTIN_TCAPS)
X XTERM_TCAP, /* always included on unix */
X# endif
X# ifdef ALL_BUILTIN_TCAPS
X VT52_TCAP,
X# endif
X# if defined(DEBUG) || defined(ALL_BUILTIN_TCAPS)
X DEBUG_TCAP, /* always included when debugging */
X# endif
X#else /* NO_BUILTIN_TCAPS */
X "dump\0\0\0",
X#endif /* NO_BUILTIN_TCAPS */
X NULL,
X};
X
X/*
X * Term_strings contains currently used terminal strings.
X * It is initialized with the default values by parse_builtin_tcap().
X * The values can be changed by setting the parameter with the same name.
X */
XTcarr term_strings;
X
X/*
X * Parsing of the builtin termcap entries.
X * The terminal's name is not set, as this is already done in termcapinit().
X * Chop builtin termcaps, string entries are already '\0' terminated.
X * not yet implemented:
X * boolean entries could be empty strings;
X * numeric entries would need a flag (e.g. high bit of the skip byte),
X * so that parse_builtin_tcap can handle them.
X */
X static void
Xparse_builtin_tcap(tc, s)
X Tcarr *tc;
X char *s;
X{
X char **p = &tc->t_name;
X
X p++;
X for (;;)
X {
X while (*s++)
X ;
X p += *s++;
X if (!*s)
X return;
X *p++ = s;
X }
X}
X
X#ifdef TERMCAP
X# ifndef linux /* included in <termlib.h> */
X# ifndef AMIGA /* included in proto/termlib.pro */
Xint tgetent();
Xint tgetnum();
Xchar *tgetstr();
Xint tputs();
X# endif /* AMIGA */
X# ifndef hpux
Xextern short ospeed;
X# endif
X# endif /* linux */
X# ifndef hpux
Xextern char *UP, *BC, PC;
X# endif
X#endif /* TERMCAP */
X
X void
Xset_term(term)
X char *term;
X{
X char **p = builtin_tcaps;
X#ifdef TERMCAP
X int builtin = 0;
X#endif
X int width = 0, height = 0;
X
X clear_termparam(); /* clear old parameters */
X if (!strncmp(term, "builtin_", (size_t)8))
X {
X term += 8;
X#ifdef TERMCAP
X builtin = 1;
X#endif
X }
X#ifdef TERMCAP
X else
X {
X for (;;)
X {
X char *p;
X static char tstrbuf[TBUFSZ];
X char tbuf[TBUFSZ];
X char *tp = tstrbuf;
X int i;
X
X i = tgetent(tbuf, term);
X if (i == -1)
X {
X emsg("Cannot open termcap file");
X builtin = 1;
X break;
X }
X if (i == 0)
X {
X emsg("terminal entry not found");
X builtin = 1;
X break;
X }
X
X /* output strings */
X T_EL = tgetstr("ce", &tp);
X T_IL = tgetstr("al", &tp);
X T_CIL = tgetstr("AL", &tp);
X T_DL = tgetstr("dl", &tp);
X T_CDL = tgetstr("DL", &tp);
X T_ED = tgetstr("cl", &tp);
X T_CI = tgetstr("vi", &tp);
X T_CV = tgetstr("ve", &tp);
X T_TP = tgetstr("me", &tp);
X T_TI = tgetstr("mr", &tp);
X T_CM = tgetstr("cm", &tp);
X T_SR = tgetstr("sr", &tp);
X T_CRI = tgetstr("RI", &tp);
X T_VB = tgetstr("vb", &tp);
X T_KS = tgetstr("ks", &tp);
X T_KE = tgetstr("ke", &tp);
X T_TS = tgetstr("ti", &tp);
X T_TE = tgetstr("te", &tp);
X
X /* key codes */
X term_strings.t_ku = tgetstr("ku", &tp);
X term_strings.t_kd = tgetstr("kd", &tp);
X term_strings.t_kl = tgetstr("kl", &tp);
X term_strings.t_kr = tgetstr("kr", &tp);
X /* term_strings.t_sku = tgetstr("", &tp); termcap code unknown */
X /* term_strings.t_skd = tgetstr("", &tp); termcap code unknown */
X term_strings.t_sku = NULL;
X term_strings.t_skd = NULL;
X term_strings.t_skl = tgetstr("#4", &tp);
X term_strings.t_skr = tgetstr("%i", &tp);
X term_strings.t_f1 = tgetstr("k1", &tp);
X term_strings.t_f2 = tgetstr("k2", &tp);
X term_strings.t_f3 = tgetstr("k3", &tp);
X term_strings.t_f4 = tgetstr("k4", &tp);
X term_strings.t_f5 = tgetstr("k5", &tp);
X term_strings.t_f6 = tgetstr("k6", &tp);
X term_strings.t_f7 = tgetstr("k7", &tp);
X term_strings.t_f8 = tgetstr("k8", &tp);
X term_strings.t_f9 = tgetstr("k9", &tp);
X term_strings.t_f10 = tgetstr("k;", &tp);
X term_strings.t_sf1 = tgetstr("F1", &tp); /* really function keys 11-20 */
X term_strings.t_sf2 = tgetstr("F2", &tp);
X term_strings.t_sf3 = tgetstr("F3", &tp);
X term_strings.t_sf4 = tgetstr("F4", &tp);
X term_strings.t_sf5 = tgetstr("F5", &tp);
X term_strings.t_sf6 = tgetstr("F6", &tp);
X term_strings.t_sf7 = tgetstr("F7", &tp);
X term_strings.t_sf8 = tgetstr("F8", &tp);
X term_strings.t_sf9 = tgetstr("F9", &tp);
X term_strings.t_sf10 = tgetstr("FA", &tp);
X term_strings.t_help = tgetstr("%1", &tp);
X term_strings.t_undo = tgetstr("&8", &tp);
X
X height = tgetnum("li");
X width = tgetnum("co");
X
X# ifndef hpux
X BC = tgetstr("bc", &tp);
X UP = tgetstr("up", &tp);
X p = tgetstr("pc", &tp);
X if (p)
X PC = *p;
X ospeed = 0;
X# endif
X break;
X }
X }
X if (builtin)
X#endif
X {
X while (*p && strcmp(term, *p))
X p++;
X if (!*p)
X {
X fprintf(stderr, "'%s' not builtin. Available terminals are:\n", term);
X for (p = builtin_tcaps; *p; p++)
X fprintf(stderr, "\t%s\n", *p);
X sleep(2);
X fprintf(stderr, "defaulting to '%s'\n", *builtin_tcaps);
X sleep(2);
X p = builtin_tcaps;
X free(term_strings.t_name);
X term_strings.t_name = strsave(term = *p);
X }
X parse_builtin_tcap(&term_strings, *p);
X }
X#if defined(AMIGA) || defined(MSDOS)
X /* DFLT_TCAP indicates that it is the machine console. */
X if (strcmp(term, *builtin_tcaps))
X term_console = FALSE;
X else
X {
X term_console = TRUE;
X# ifdef AMIGA
X win_resize_on(); /* enable window resizing reports */
X# endif
X }
X#endif
X ttest(TRUE);
X /* display initial screen after ttest() checking. jw. */
X if (width <= 0 || height <= 0)
X {
X /* termcap failed to report size */
X /* set defaults, in case mch_get_winsize also fails */
X width = 80;
X height = 24;
X }
X set_winsize(width, height, FALSE);
X}
X
X#if defined(TERMCAP) && defined(UNIX)
X/*
X * Get Columns and Rows from the termcap. Used after a window signal if the
X * ioctl() fails. It doesn't make sense to call tgetent each time if the "co"
X * and "li" entries never change. But this may happen on some systems.
X */
X void
Xgetlinecol()
X{
X char tbuf[TBUFSZ];
X
X if (term_strings.t_name && tgetent(tbuf, term_strings.t_name) > 0)
X {
X if (Columns == 0)
X Columns = tgetnum("co");
X if (Rows == 0)
X Rows = tgetnum("li");
X }
X}
X#endif
X
Xstatic char *tltoa __PARMS((unsigned long));
X
X static char *
Xtltoa(i)
X unsigned long i;
X{
X static char buf[16];
X char *p;
X
X p = buf + 15;
X *p = '\0';
X do
X {
X --p;
X *p = i % 10 + '0';
X i /= 10;
X }
X while (i > 0 && p > buf);
X return p;
X}
X
X#ifndef TERMCAP
X
X/*
X * minimal tgoto() implementation.
X * no padding and we only parse for %i %d and %+char
X */
X
X char *
Xtgoto(cm, x, y)
X char *cm;
X int x, y;
X{
X static char buf[30];
X char *p, *s, *e;
X
X if (!cm)
X return "OOPS";
X e = buf + 29;
X for (s = buf; s < e && *cm; cm++)
X {
X if (*cm != '%')
X {
X *s++ = *cm;
X continue;
X }
X switch (*++cm)
X {
X case 'd':
X p = tltoa((unsigned long)y);
X y = x;
X while (*p)
X *s++ = *p++;
X break;
X case 'i':
X x++;
X y++;
X break;
X case '+':
X *s++ = (char)(*++cm + y);
X y = x;
X break;
X case '%':
X *s++ = *cm;
X break;
X default:
X return "OOPS";
X }
X }
X *s = '\0';
X return buf;
X}
X
X#endif /* TERMCAP */
X
X/*
X * Termcapinit is called from main() to initialize the terminal.
X * The optional argument is given with the -T command line option.
X */
X void
Xtermcapinit(term)
X char *term;
X{
X if (!term)
X term = (char *)vimgetenv("TERM");
X if (!term || !*term)
X term = *builtin_tcaps;
X term_strings.t_name = strsave(term);
X set_term(term);
X}
X
X/*
X * a never-padding outstr.
X * use this whenever you don't want to run the string through tputs.
X * tputs above is harmless, but tputs from the termcap library
X * is likely to strip off leading digits, that it mistakes for padding
X * information. (jw)
X */
X void
Xoutstrn(s)
X char *s;
X{
X while (*s)
X outchar(*s++);
X}
X
X#ifndef MSDOS /* there is a special version of outstr() in msdos.c */
X/*
X * outstr(s): put a string character at a time into the output buffer.
X * If TERMCAP is defined use the termcap parser. (jw)
X */
X void
Xoutstr(s)
X register char *s;
X{
X if (s)
X#ifdef TERMCAP
X tputs(s, 1, TPUTSFUNCAST outchar);
X#else
X while (*s)
X outchar(*s++);
X#endif
X}
X#endif /* MSDOS */
X
X/*
X * cursor positioning using termcap parser. (jw)
X */
X void
Xwindgoto(row, col)
X int row;
X int col;
X{
X#ifdef TERMCAP
X tputs(tgoto(T_CM, col, row), 1, TPUTSFUNCAST outchar);
X#else
X outstr(tgoto(T_CM, col, row));
X#endif
X}
X
X/*
X * Set cursor to current position.
X * Should be optimized for minimal terminal output.
X */
X
X void
Xsetcursor()
X{
X if (!RedrawingDisabled)
X windgoto(Cursrow, Curscol);
X}
X
X void
Xttest(pairs)
X int pairs;
X{
X char buf[70];
X char *s = "terminal capability %s required.\n";
X char *t = NULL;
X
X#ifdef TTEST
X TTEST(T_EL);
X TTEST(T_IL);
X TTEST(T_CIL);
X TTEST(T_DL);
X TTEST(T_CDL);
X TTEST(T_ED);
X TTEST(T_CI);
X TTEST(T_CV);
X TTEST(T_TP);
X TTEST(T_TI);
X TTEST(T_CM);
X TTEST(T_SR);
X TTEST(T_CRI);
X#endif /* TTEST */
X
X /* hard requirements */
X if (!T_ED || !*T_ED) /* erase display */
X t = "cl";
X if (!T_CM || !*T_CM) /* cursor motion */
X t = "cm";
X
X if (t)
X {
X sprintf(buf, s, t);
X emsg(buf);
X }
X
X if (pairs)
X {
X /* optional pairs */
X if ((!T_TP || !*T_TP) ^ (!T_TI || !*T_TI))
X {
X debug2("cap :me=%s:mr=%s: ignored\n", T_TP, T_TI);
X T_TP = T_TI = NULL;
X }
X if ((!T_CI || !*T_CI) ^ (!T_CV || !*T_CV))
X {
X debug2("cap :vi=%s:ve=%s: ignored\n", T_CI, T_CV);
X T_CI = T_CV = NULL;
X }
X }
X}
X
X/*
X * inchar() - get a character from
X * 1. a scriptfile
X * 2. the keyboard - take care of interpreting escape sequences
X *
X * If we got an interrupt all input is read until none is available.
X * If async is TRUE there is no waiting for the char and we keep the
X * character.
X * If waitforever is FALSE we wait for 1 second for a character to arrive.
X */
X
X#define INBUFLEN 50 /* buffer lengt, must be enough to contain an
X Amiga raw keycode report */
X
X int
Xinchar(async, waitforever)
X int async;
X int waitforever;
X{
X static u_char buf[INBUFLEN+1]; /* already entered characters */
X static int len = 0; /* number of valid chars in buf */
X static int lastc = -1; /* last character from script file */
X register int c;
X register int slen = 0;
X register char **p;
X#ifdef AMIGA
X char *s;
X#endif /* AMIGA */
X int first;
X int mode_deleted = FALSE;
X
X if (!async)
X flushbuf();
X
X/*
X * Check for interrupt.
X */
X breakcheck();
X
X/*
X * first try script file
X * If interrupted: Stop reading script files.
X */
Xretry:
X if (scriptin[curscript] != NULL)
X {
X if (!got_int && lastc >= 0)
X c = lastc;
X else if (got_int || (c = getc(scriptin[curscript])) < 0) /* reached EOF */
X {
X lastc = -1;
X fclose(scriptin[curscript]);
X scriptin[curscript] = NULL;
X if (curscript > 0)
X --curscript;
X /* recovery may be delayed till after reading a script file */
X if (recoverymode)
X openrecover();
X goto retry; /* may read other script if this one was nested */
X }
X if (c == 0)
X c = K_ZERO; /* replace ^@ with special code */
X if (async)
X lastc = c;
X else
X lastc = -1;
X return c;
X }
X
X/*
X * If we got an interrupt, skip all previously typed characters and
X * reset interrupt flag.
X */
X if (got_int) /* skip typed characters */
X {
X while (GetChars((char *)buf, INBUFLEN, T_PEEK))
X ;
X got_int = FALSE;
X len = 0;
X }
X/*
X * get character(s) from the keyboard
X * this is repeated until we have found that
X * - it is not an escape sequence, return the first char
X * - it is the start of an escape sequence, but it is not completed within
X * a short time, return the first char
X * - it is an escape seqence, translate it into a single byte code
X */
X first = TRUE;
X for (;;)
X {
X if (!first || len == 0)
X {
X /*
X * special case: if we get an <ESC> in insert mode and there are
X * no more characters at once, we pretend to go out of insert mode.
X * This prevents the one second delay after typing an <ESC>.
X * If we get something after all, we may have to redisplay the
X * mode. That the cursor is in the wrong place does not matter.
X */
X if (!async && len == 1 && buf[0] == ESC && (State == INSERT || State == REPLACE) && (p_timeout || p_ttimeout))
X {
X slen = GetChars((char *)buf + len, INBUFLEN - len, T_PEEK);
X if (slen != 0)
X {
X len += slen;
X goto gotchar;
X }
X if (p_mo)
X {
X delmode();
X mode_deleted = TRUE;
X }
X if (Curscol) /* move cursor one left if possible */
X --Curscol;
X else if (Curpos.col != 0 && Cursrow)
X {
X --Cursrow;
X Curscol = Columns - 1;
X }
X setcursor();
X flushbuf();
X }
X /*
X * When async == TRUE do not wait for characters to arrive: T_PEEK
X * When getting the first character wait until one arrives: T_BLOCK
X * When waiting for a key sequence to complete
X * and 'timeout' or !waitforever set wait a short time: T_WAIT
X * and 'timeout' not set wait until one arrives: T_BLOCK
X */
X slen = GetChars((char *)buf + len, INBUFLEN - len,
X async ? T_PEEK : ((len == 0 || !(p_timeout || p_ttimeout))
X && waitforever) ? T_BLOCK : T_WAIT);
X if (got_int)
X goto retry; /* CTRL-C typed, flush input buffer */
X len += slen;
X if ((async || !waitforever) && len == 0) /* nothing typed */
X return NUL;
X if (slen == 0) /* escape sequence not completed in time */
X break;
X }
X first = FALSE;
X
X if (async) /* when we get here: len != 0 */
X return (int)buf[0];
X
Xgotchar:
X if (State != NOMAPPING)
X {
X /* search in the escape sequences for the characters we have */
X for (p = (char **)&term_strings.t_ku; p != (char **)&term_strings.t_undo + 1; ++p)
X {
X if (*p == NULL)
X continue;
X slen = strlen(*p);
X if (strncmp(*p, (char *)buf, (size_t)(slen > len ? len : slen)) == 0)
X break;
X }
X }
X if (State == NOMAPPING || p == (char **)&term_strings.t_undo + 1) /* no match */
X {
X#ifdef AMIGA /* check for window bounds report */
X buf[len] = 0;
X if ((buf[0] & 0xff) == CSI && ((s = strchr((char *)buf, 'r')) || (s = strchr((char *)buf, '|'))))
X {
X slen = s - buf + 1;
X p = NULL;
X }
X else
X#endif
X break;
X }
X if (slen <= len) /* got the complete sequence */
X {
X if (mode_deleted)
X showmode();
X len -= slen;
X memmove((char *)buf, (char *)buf + slen, (size_t)len);
X#ifdef AMIGA
X if (p == NULL) /* got window bounds report */
X {
X set_winsize(0, 0, FALSE); /* get size and redraw screen */
X continue;
X }
X#endif
X
X /* this relies on the Key numbers to be consecutive! */
X return (int)(K_UARROW + (p - (char **)&term_strings.t_ku));
X }
X /*
X * get here when we got an incomplete sequence,
X * we need some more characters
X */
X }
X c = buf[0];
X memmove((char *)buf, (char *)buf+1, (size_t)--len);
X if (c == 0)
X c = K_ZERO; /* replace ^@ with special code */
X /* delete "INSERT" message if we return an ESC */
X if (c == ESC && p_mo && !mode_deleted && (State == INSERT || State == REPLACE))
X delmode();
X return c;
X}
X
X/*
X * outnum - output a (big) number fast
X */
X void
Xoutnum(n)
X register long n;
X{
X outstrn(tltoa((unsigned long)n));
X}
X
X void
Xcheck_winsize()
X{
X if (Columns < 5)
X Columns = 5;
X else if (Columns > MAX_COLUMNS)
X Columns = MAX_COLUMNS;
X if (Rows < 2)
X Rows = 2;
X p_scroll = Rows >> 1;
X}
X
X/*
X * set window size
X * If 'mustset' is TRUE, we must set Rows and Columns, do not get real
X * window size (this is used for the :win command during recovery).
X * If 'mustset' is FALSE, we may try to get the real window size and if
X * it fails use 'width' and 'height'.
X */
X void
Xset_winsize(width, height, mustset)
X int width, height;
X int mustset;
X{
X register int tmp;
X
X if (width < 0 || height < 0) /* just checking... */
X return;
X
X if (State == HITRETURN) /* postpone the resizing */
X {
X State = SETWINSIZE;
X return;
X }
X screenclear();
X#ifdef AMIGA
X flushbuf(); /* must do this before mch_get_winsize for some obscure reason */
X#endif /* AMIGA */
X if (mustset || mch_get_winsize())
X {
X debug("mch_get_win failed\n");
X Rows = height;
X Columns = width;
X mch_set_winsize();
X }
X check_winsize(); /* always check, to get p_scroll right */
X if (State == HELP)
X redrawhelp();
X else if (!starting)
X {
X tmp = RedrawingDisabled;
X RedrawingDisabled = FALSE;
X comp_Botline();
X updateScreen(CURSUPD);
X RedrawingDisabled = tmp;
X if (State == CMDLINE)
X redrawcmdline();
X else
X setcursor();
X }
X flushbuf();
X}
X
X void
Xsettmode(raw)
X int raw;
X{
X static int oldraw = FALSE;
X
X if (oldraw == raw) /* skip if already in desired mode */
X return;
X oldraw = raw;
X
X mch_settmode(raw); /* machine specific function */
X}
X
X void
Xstarttermcap()
X{
X outstr(T_KS); /* start "keypad transmit" mode */
X outstr(T_TS); /* start termcap mode */
X}
X
X void
Xstoptermcap()
X{
X outstr(T_KE); /* stop "keypad transmit" mode */
X outstr(T_TE); /* stop termcap mode */
X}
END_OF_FILE
if test 18112 -ne `wc -c <'vim/src/term.c'`; then
echo shar: \"'vim/src/term.c'\" unpacked with wrong size!
fi
# end of 'vim/src/term.c'
fi
echo shar: End of archive 10 \(of 23\).
cp /dev/null ark10isdone
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 ; do
if test ! -f ark${I}isdone ; then
MISSING="${MISSING} ${I}"
fi
done
if test "${MISSING}" = "" ; then
echo You have unpacked all 23 archives.
rm -f ark[1-9]isdone ark[1-9][0-9]isdone
else
echo You still need to unpack the following archives:
echo " " ${MISSING}
fi
## End of shell archive.
exit 0
-------------8<----------------8<----------------8<---------------8<--------
Bram Moolenaar | DISCLAIMER: This note does not
Oce Nederland B.V., Research & Development | necessarily represent the position
p.o. box 101, 5900 MA Venlo | of Oce-Nederland B.V. Therefore
The Netherlands phone +31 77 594077 | no liability or responsibility for
UUCP: mool@oce.nl fax +31 77 595450 | whatever will be accepted.
exit 0 # Just in case...