home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Source Code 1992 March
/
Source_Code_CD-ROM_Walnut_Creek_March_1992.iso
/
usenet
/
altsrcs
/
3
/
3494
< prev
next >
Wrap
Internet Message Format
|
1991-06-19
|
56KB
From: pgf@cayman.COM (Paul Fox)
Newsgroups: alt.sources
Subject: Vile 04/17 - vi feel-alike (multi-window)
Message-ID: <4523@cayman.COM>
Date: 7 Jun 91 22:09:22 GMT
#!/bin/sh
# this is vileshar.04 (part 4 of Vile)
# do not concatenate these parts, unpack them in order with /bin/sh
# file dolock.c continued
#
if test ! -r _shar_seq_.tmp; then
echo 'Please unpack part 1 first!'
exit 1
fi
(read Scheck
if test "$Scheck" != 4; then
echo Please unpack part "$Scheck" next!
exit 1
else
exit 0
fi
) < _shar_seq_.tmp || exit 1
echo 'x - continuing file dolock.c'
sed 's/^X//' << 'SHAR_EOF' >> 'dolock.c' &&
X
X if (rname != NULL)
X return(rname);
X else
X return(filespec);
}
X
char *getpath(filespec)
char *filespec;
{
X char rbuff[LFILEN];
X char *rname, *rindex();
X
X strcpy(rbuff,filespec);
X rname = rindex(rbuff,'/');
X
X if (rname == NULL)
X return(NULL);
X else
X {
X *(++rname) = '\0';
X return(rbuff);
X }
X
}
X
char *dolock(fname)
X char *fname;
{
X static char lockname[LFILEN] = LOCKDIR;
X static char username[12];
X static char lmsg[40] = LOCKMSG;
X char *pathfmt;
X struct stat statblk;
X struct passwd *pblk;
X long pid, getpid();
X FILE *lf, *fopen();
X int oldumask;
X
X oldumask = umask(0); /* maximum access allowed to lock files */
X
X
X if (*fname != '/')
X pathfmt = "./%s%s";
X else
X pathfmt = "%s/%s";
X sprintf(lockname,pathfmt,getpath(fname), LOCKDIR);
X
X if (tellall) printf("checking for existence of %s\n",lockname);
X
X if (stat(lockname,&statblk))
X {
X if (tellall) printf("making directory %s\n",lockname);
X mkdir(lockname,0777);
X }
X
X sprintf(lockname,"%s/%s",lockname,gtname(fname));
X
X if (tellall) printf("checking for existence of %s\n",lockname);
X
X if (stat(lockname,&statblk))
X {
makelock: if (tellall) printf("creating %s\n",lockname);
X
X if ((lf = fopen(lockname,FOP_TW)) == NULL)
X LOCKERR("could not create lock file")
X else
X {
X if (parent)
X pid = getppid(); /* parent pid */
X else
X pid = getpid(); /* current pid */
X
X if (tellall)
X printf("pid is %ld\n",pid);
X
X fprintf(lf,"%ld",pid); /* write pid to lock file */
X
X fclose(lf);
X oldumask = umask(oldumask);
X return(NULL);
X }
X }
X else
X {
X if (tellall) printf("reading lock file %s\n",lockname);
X if ((lf = fopen(lockname,FOP_TR)) == NULL)
X LOCKERR("could not read lock file")
X else
X {
X fscanf(lf,"%ld",&pid); /* contains current pid */
X fclose(lf);
X if (tellall)
X printf("pid in %s is %ld\n",lockname, pid);
X if (tellall)
X printf("signaling process %ld\n", pid);
X if (kill(pid,0))
X switch (errno)
X {
X case ESRCH: /* process not found */
X goto makelock;
X break;
X case EPERM: /* process exists, not yours */
X if (tellall)
X puts("process exists");
X break;
X default:
X LOCKERR("kill was bad")
X break;
X }
X else
X if (tellall) puts("kill was good; process exists");
X }
X if ((pblk = getpwuid(statblk.st_uid)) == NULL)
X sprintf(username,"uid %d",atoi(statblk.st_uid));
X else
X strcpy(username,pblk->pw_name);
X
X oldumask = umask(oldumask);
X return(username);
X }
}
X
/**********************
X *
X * undolock -- unlock the file fname
X *
X * if successful, returns NULL
X * if other error, returns "LOCK ERROR: explanation"
X *
X * Jon Reid, 2/19/86
X *
X *********************/
X
char *undolock(fname)
X char *fname;
{
X static char lockname[LFILEN] = LOCKDIR;
X static char lmsg[40] = LOCKMSG;
X char *pathfmt;
X
X if (*fname != '/')
X pathfmt = "./%s%s";
X else
X pathfmt = "%s/%s";
X sprintf(lockname,pathfmt,getpath(fname), LOCKDIR);
X
X sprintf(lockname,"%s/%s",lockname,gtname(fname));
X
X if (tellall) printf("attempting to unlink %s\n",lockname);
X
X if (unlink(lockname))
X {
X strcat(lmsg,"could not remove lock file");
X return(lmsg);
X }
X else
X return(NULL);
}
X
#endif
X
/******************
X * end dolock module
X *******************/
X
#else
dolhello()
{
}
#endif
X
SHAR_EOF
echo 'File dolock.c is complete' &&
chmod 0444 dolock.c ||
echo 'restore of dolock.c failed'
Wc_c="`wc -c < 'dolock.c'`"
test 4340 -eq "$Wc_c" ||
echo 'dolock.c: original size 4340, current size' "$Wc_c"
# ============= ebind.h ==============
echo 'x - extracting ebind.h (Text)'
sed 's/^X//' << 'SHAR_EOF' > 'ebind.h' &&
THIS FILE IS NO LONGER USED -- IT IS INCLUDED FOR HISTORICAL PURPOSES
SEE THE mktbls PROGRAM, AND THE FILE cmdtbl
/* EBIND: Initial default key to function bindings for
X MicroEMACS 3.7
*/
X
/*
X * Command table.
X * This table is *roughly* in ASCII order, left to right across the
X * characters of the command. This explains the funny location of the
X * control-X commands.
X */
KEYTAB keytab[NBINDS] = {
X
X {' ', forwchar},
X {'"', usekreg},
X {'$', gotoeol},
#if CFENCE
X {'%', getfence},
#endif
X {'*', togglelistbuffers},
X {'+', forwbline},
X {',', rev_csrch},
X {'-', backbline},
X {'.', dotcmdplay},
X {'/', forwsearch},
X {'0', gotobol},
X {':', namedcmd},
X {';', rep_csrch},
X {'<', operlshift},
X {'>', operrshift},
X {'?', backsearch},
X {'A', appendeol},
X {'B', backword},
X {'C', chgtoeol},
X {'D', deltoeol},
X {'E', forwendw},
X {'F', bcsrch},
X {'G', gotoline},
X {'H', gotobos},
X {'I', insertbol},
X {'J', join},
X {'K', unarg},
X {'L', gotoeos},
X {'M', gotomos},
X {'N', revsearch},
X {'O', openup},
X {'P', putbefore},
X {'Q', quit},
X {'R', overwrite},
X {'S', chgline},
X {'T', bcsrch_to},
X {'U', lineundo},
X {'V', enlargewind},
X {'W', forwword},
X {'X', backdelchar},
X {'Y', yankline},
X {'Z', quickexit},
X {'[', gotobosec},
X {'\'', golinenmmark},
X {']', gotoeosec},
X {'^', firstnonwhite},
X {'_', histbuff},
X {'`', goexactnmmark},
X {'a', append},
X {'b', backviword},
X {'c', operchg},
X {'d', operdel},
X {'e', forwviendw},
X {'f', fcsrch},
X {'g', operqreplace},
X {'h', backchar},
X {'i', insert},
X {'j', forwline},
X {'k', backline},
X {'l', forwchar},
X {'m', setnmmark},
X {'n', consearch},
X {'o', opendown},
X {'p', putafter},
X {'q', opersreplace},
X {'r', replacechar},
X {'s', chgchar},
X {'t', fcsrch_to},
X {'u', undo},
X {'v', shrinkwind},
X {'w', forwviword},
X {'x', forwdelchar},
X {'y', operyank},
X {'z', poswind},
X {LBRACE, gotobop},
X {'|', gotocol},
X {RBRACE, gotoeop},
X {'~', operflip},
X {tocntrl('['), esc},
#if TAGS
X {tocntrl(']'), gototag},
#endif
X {tocntrl('^'), altbuff},
X {tocntrl('A'), meta},
X {tocntrl('B'), backpage},
X /* ctrl C */
X {tocntrl('D'), forwhpage},
X {tocntrl('E'), mvdnwind},
X {tocntrl('F'), forwpage},
X {tocntrl('G'), showcpos},
X {tocntrl('H'), backchar},
X /* ctrl I */
X {tocntrl('J'), forwline},
X {tocntrl('K'), delwind},
X {tocntrl('L'), refresh},
X {tocntrl('M'), forwbline},
X {tocntrl('N'), nextwind},
X {tocntrl('O'), onlywind},
X {tocntrl('P'), prevwind},
X {tocntrl('Q'), nullproc},
X {tocntrl('R'), insfile},
X {tocntrl('S'), nullproc},
X {tocntrl('T'), splitwind},
X {tocntrl('U'), backhpage},
X {tocntrl('V'), quote},
X {tocntrl('W'), operwrite},
X {tocntrl('X'), cex},
X {tocntrl('Y'), mvupwind},
#if BSD
X {tocntrl('Z'), bktoshell},
#endif
X
X {META|tocntrl('D'), scrnextdw},
X {META|tocntrl('E'), mvdnnxtwind},
X {META|tocntrl('U'), scrnextup},
X {META|tocntrl('Y'), mvupnxtwind},
X {META|'H', help},
X {META|'*', listbuffers},
X {CTLX|'g', operlineqreplace},
X {CTLX|'q', operlinesreplace},
X
#if AEDIT
X {META|' ', detab},
X {META|tocntrl('I'), entab},
X {META|'T', trim},
X {META|'O', deblank},
#endif
#if WORDPRO
X {META|'F', fillpara},
X {META|'J', fillpara},
#endif
X {META|'U', operupper},
X {META|'L', operlower},
#if CRYPT
X {CTLX|'X', setkey},
#endif
#if ISRCH
X {CTLX|'?', risearch},
X {CTLX|'/', fisearch},
#endif
X {CTLX|'(', ctlxlp},
X {CTLX|')', ctlxrp},
X {CTLX|'0', delwind},
X {CTLX|'1', onlywind},
X {CTLX|'2', splitwind},
X {CTLX|'=', showcpos},
X {CTLX|'c', operlinechg},
X {CTLX|'d', operlinedel},
X {CTLX|'e', ctlxe},
X {CTLX|'f', setfillcol},
X {CTLX|'h', help},
X {CTLX|'P', lineputbefore},
X {CTLX|'p', lineputafter},
X {CTLX|'t', settab},
X {CTLX|'y', operlineyank},
X {CTLX|tocntrl('C'), quit},
X {CTLX|tocntrl('X'), finderr},
X {CTLX|'!', pipecmd},
#if TERMCAP
X {SPEC|'0', cbuf1},
X {SPEC|'1', cbuf2},
X {SPEC|'2', cbuf3},
X {SPEC|'3', cbuf4},
X {SPEC|'4', cbuf5},
X {SPEC|'5', cbuf6},
X {SPEC|'6', cbuf7},
X {SPEC|'7', cbuf8},
X {SPEC|'8', cbuf9},
X {SPEC|'9', cbuf10},
#endif
X
#ifdef BEFORE
X {CTLX|'!', spawn},
X {CTLX|'#', filter},
X {CTLX|'@', pipecmd},
#if ! SMALLER
X {CTLX|'a', setvar},
#endif
X {CTLX|'b', usebuffer},
X {CTLX|'g', enlargewind},
X {CTLX|'i', killbuffer},
X {CTLX|'m', setmode},
X {CTLX|'n', filename},
X {CTLX|'w', resize},
X {CTLX|'x', nextbuffer},
X {CTLX|'s', shrinkwind},
X {CTLX|'z', enlargewind},
X {CTLX|'^', enlargewind},
X {CTLX|tocntrl('B'), listbuffers},
X {CTLX|tocntrl('F'), filefind},
X {CTLX|tocntrl('I'), insfile},
X {CTLX|tocntrl('L'), lowerregion},
X {CTLX|tocntrl('M'), delmode},
X {CTLX|tocntrl('N'), mvdnwind},
X {CTLX|tocntrl('P'), mvupwind},
X {CTLX|tocntrl('R'), fileread},
X {CTLX|tocntrl('S'), filesave},
X {CTLX|tocntrl('U'), upperregion},
X {CTLX|tocntrl('V'), viewfile},
X {CTLX|tocntrl('W'), filewrite},
X {CTLX|tocntrl('Z'), shrinkwind},
X /* {tocntrl('C'), insspace}, */
X {tocntrl('T'), twiddle},
X {META|' ', setmark},
X {META|'.', setmark},
X {META|'!', reposition},
X {META|'C', capword},
X {META|'K', bindkey},
X {META|'L', lowerword},
X {META|'M', setgmode},
X {META|'R', sreplace},
X {META|'U', upperword},
X {META|tocntrl('K'), unbindkey},
X {META|tocntrl('L'), reposition},
X {META|tocntrl('M'), delgmode},
X {META|tocntrl('N'), namebuffer},
X {META|tocntrl('R'), qreplace},
X {META|tocntrl('S'), newsize},
X {META|tocntrl('T'), newwidth},
X {META|tocntrl('V'), scrnextdw},
X {META|tocntrl('Z'), scrnextup},
#if WORDPRO
X {META|tocntrl('C'), wordcount},
X /* {META|tocntrl('W'), killpara}, */
#endif
#if PROC
X {META|tocntrl('E'), execproc},
#endif
#if APROP
X {META|'A', apro},
#endif
X /* META|'D', delfword, */
X /* META|0x7F, delbword, */
#if WORDPRO
X {META|'N', gotoeop},
X {META|'P', gotobop},
X {META|'Q', fillpara},
#endif
X
#endif /* BEFORE */
X
#if NeWS
X {SPEC|0, setcursor}, /* mouse support */
X {SPEC|1, newsadjustmode},/* quiet mode setting */
X
/* top fkeys */
X {SPEC|96, filefind},
X {SPEC|97, fileread},
X {SPEC|98, insfile},
X {SPEC|99, viewfile},
X {SPEC|100, filesave},
X {SPEC|101, filewrite},
X {SPEC|102, filename},
X {SPEC|103, yankregion},
X {SPEC|104, unarg},
X
/* right function keys */
X {SPEC|80, backpage},
X {SPEC|81, gotobob},
X {SPEC|82, risearch},
X {SPEC|83, forwpage},
X {SPEC|84, gotoeob},
X {SPEC|85, fisearch},
X {SPEC|86, gotobol},
X {SPEC|87, backline},
X {SPEC|88, gotoeol},
X {SPEC|89, backchar},
X {SPEC|90, setmark},
X {SPEC|91, forwchar},
X {SPEC|92, backword},
X {SPEC|93, forwline},
X {SPEC|94, forwword},
#endif
X
#if MSDOS & (HP150 == 0) & (WANGPC == 0) & (HP110 == 0)
X {SPEC|tocntrl('_'), forwhunt},
X {SPEC|tocntrl('S'), backhunt},
X {SPEC|71, gotobob},
X {SPEC|72, backline},
X {SPEC|73, backpage},
X {SPEC|75, backchar},
X {SPEC|77, forwchar},
X {SPEC|79, gotoeob},
X {SPEC|80, forwline},
X {SPEC|81, forwpage},
X {SPEC|82, insspace},
X {SPEC|83, forwdelchar},
X {SPEC|115, backword},
X {SPEC|116, forwword},
#if WORDPRO
X {SPEC|132, gotobop},
X {SPEC|118, gotoeop},
#endif
X {SPEC|84, cbuf1},
X {SPEC|85, cbuf2},
X {SPEC|86, cbuf3},
X {SPEC|87, cbuf4},
X {SPEC|88, cbuf5},
X {SPEC|89, cbuf6},
X {SPEC|90, cbuf7},
X {SPEC|91, cbuf8},
X {SPEC|92, cbuf9},
X {SPEC|93, cbuf10},
#endif
X
#if HP150
X {SPEC|32, backline},
X {SPEC|33, forwline},
X {SPEC|35, backchar},
X {SPEC|34, forwchar},
X {SPEC|44, gotobob},
X {SPEC|46, forwpage},
X {SPEC|47, backpage},
X {SPEC|82, nextwind},
X {SPEC|68, openline},
X {SPEC|69, deltoeol},
X {SPEC|65, forwdelchar},
X {SPEC|64, ctlxe},
X {SPEC|67, refresh},
X {SPEC|66, reposition},
X {SPEC|83, help},
X {SPEC|81, deskey},
#endif
X
#if HP110
X {SPEC|0x4b, backchar},
X {SPEC|0x4d, forwchar},
X {SPEC|0x48, backline},
X {SPEC|0x50, forwline},
X {SPEC|0x43, help},
X {SPEC|0x73, backword},
X {SPEC|0x74, forwword},
X {SPEC|0x49, backpage},
X {SPEC|0x51, forwpage},
X {SPEC|84, cbuf1},
X {SPEC|85, cbuf2},
X {SPEC|86, cbuf3},
X {SPEC|87, cbuf4},
X {SPEC|88, cbuf5},
X {SPEC|89, cbuf6},
X {SPEC|90, cbuf7},
X {SPEC|91, cbuf8},
#endif
X
#if AMIGA
X {SPEC|'?', help},
X {SPEC|'A', backline},
X {SPEC|'B', forwline},
X {SPEC|'C', forwchar},
X {SPEC|'D', backchar},
X {SPEC|'T', backpage},
X {SPEC|'S', forwpage},
X {SPEC|'a', backword},
X {SPEC|'`', forwword},
X {SPEC|'P', cbuf1},
X {SPEC|'Q', cbuf2},
X {SPEC|'R', cbuf3},
X {SPEC|'S', cbuf4},
X {SPEC|'T', cbuf5},
X {SPEC|'U', cbuf6},
X {SPEC|'V', cbuf7},
X {SPEC|'W', cbuf8},
X {SPEC|'X', cbuf9},
X {SPEC|'Y', cbuf10},
X {127, forwdelchar},
#endif
X
#if ST520
X {SPEC|'b', help},
X {SPEC|'H', backline},
X {SPEC|'P', forwline},
X {SPEC|'M', forwchar},
X {SPEC|'K', backchar},
X {SPEC|'t', setmark},
X {SPEC|'a', put},
X {SPEC|'R', insspace},
X {SPEC|'G', gotobob},
X {127, forwdelchar},
X {SPEC|84, cbuf1},
X {SPEC|85, cbuf2},
X {SPEC|86, cbuf3},
X {SPEC|87, cbuf4},
X {SPEC|88, cbuf5},
X {SPEC|89, cbuf6},
X {SPEC|90, cbuf7},
X {SPEC|91, cbuf8},
X {SPEC|92, cbuf9},
X {SPEC|93, cbuf10},
#endif
X
#if WANGPC
X SPEC|0xE0, quit, /* Cancel */
X SPEC|0xE1, help, /* Help */
X SPEC|0xF1, help, /* ^Help */
X SPEC|0xE3, esc, /* Print */
X SPEC|0xF3, esc, /* ^Print */
X SPEC|0xC0, backline, /* North */
X SPEC|0xD0, gotobob, /* ^North */
X SPEC|0xC1, forwchar, /* East */
X SPEC|0xD1, gotoeol, /* ^East */
X SPEC|0xC2, forwline, /* South */
X SPEC|0xD2, gotobop, /* ^South */
X SPEC|0xC3, backchar, /* West */
X SPEC|0xD3, gotobol, /* ^West */
X SPEC|0xC4, esc, /* Home */
X SPEC|0xD4, gotobob, /* ^Home */
X SPEC|0xC5, filesave, /* Execute */
X SPEC|0xD5, esc, /* ^Execute */
X SPEC|0xC6, insfile, /* Insert */
X SPEC|0xD6, esc, /* ^Insert */
X SPEC|0xC7, forwdelchar, /* Delete */
X SPEC|0xD7, killregion, /* ^Delete */
X SPEC|0xC8, backpage, /* Previous */
X SPEC|0xD8, prevwind, /* ^Previous */
X SPEC|0xC9, forwpage, /* Next */
X SPEC|0xD9, nextwind, /* ^Next */
X SPEC|0xCB, esc, /* Erase */
X SPEC|0xDB, esc, /* ^Erase */
X SPEC|0xDC, esc, /* ^Tab */
X SPEC|0xCD, esc, /* BackTab */
X SPEC|0xDD, esc, /* ^BackTab */
X SPEC|0x80, esc, /* Indent */
X SPEC|0x90, esc, /* ^Indent */
X SPEC|0x81, esc, /* Page */
X SPEC|0x91, esc, /* ^Page */
X SPEC|0x82, esc, /* Center */
X SPEC|0x92, esc, /* ^Center */
X SPEC|0x83, esc, /* DecTab */
X SPEC|0x93, esc, /* ^DecTab */
X SPEC|0x84, esc, /* Format */
X SPEC|0x94, esc, /* ^Format */
X SPEC|0x85, esc, /* Merge */
X SPEC|0x95, esc, /* ^Merge */
X SPEC|0x86, setmark, /* Note */
X SPEC|0x96, esc, /* ^Note */
X SPEC|0x87, esc, /* Stop */
X SPEC|0x97, esc, /* ^Stop */
X SPEC|0x88, forwsearch, /* Srch */
X SPEC|0x98, backsearch, /* ^Srch */
X SPEC|0x89, sreplace, /* Replac */
X SPEC|0x99, qreplace, /* ^Replac */
X SPEC|0x8A, esc, /* Copy */
X SPEC|0x9A, esc, /* ^Copy */
X SPEC|0x8B, esc, /* Move */
X SPEC|0x9B, esc, /* ^Move */
X SPEC|0x8C, namedcmd, /* Command */
X SPEC|0x9C, spawn, /* ^Command */
X SPEC|0x8D, esc, /* ^ */
X SPEC|0x9D, esc, /* ^^ */
X SPEC|0x8E, esc, /* Blank */
X SPEC|0x9E, esc, /* ^Blank */
X SPEC|0x8F, gotoline, /* GoTo */
X SPEC|0x9F, usebuffer, /* ^GoTo */
#endif
X
X
X /* special internal bindings */
X SPEC|META|'W', wrapword, /* called on word wrap */
X SPEC|META|'C', nullproc, /* every command input */
X SPEC|META|'R', nullproc, /* on file read */
X {0, NULL}
};
X
#if RAINBOW
X
#include "rainbow.h"
X
/*
X * Mapping table from the LK201 function keys to the internal EMACS character.
X */
X
short lk_map[][2] = {
X Up_Key, tocntrl('P'),
X Down_Key, tocntrl('N'),
X Left_Key, tocntrl('B'),
X Right_Key, tocntrl('F'),
X Shift+Left_Key, META+'B',
X Shift+Right_Key, META+'F',
X Control+Left_Key, tocntrl('A'),
X Control+Right_Key, tocntrl('E'),
X Prev_Scr_Key, META+'V',
X Next_Scr_Key, tocntrl('V'),
X Shift+Up_Key, META+'<',
X Shift+Down_Key, META+'>',
X Cancel_Key, tocntrl('G'),
X Find_Key, tocntrl('S'),
X Shift+Find_Key, tocntrl('R'),
X Insert_Key, tocntrl('Y'),
X Options_Key, tocntrl('D'),
X Shift+Options_Key, META+'D',
X Remove_Key, tocntrl('W'),
X Shift+Remove_Key, META+'W',
X Select_Key, tocntrl('@'),
X Shift+Select_Key, CTLX+tocntrl('X'),
X Interrupt_Key, tocntrl('U'),
X Keypad_PF2, META+'L',
X Keypad_PF3, META+'C',
X Keypad_PF4, META+'U',
X Shift+Keypad_PF2, CTLX+tocntrl('L'),
X Shift+Keypad_PF4, CTLX+tocntrl('U'),
X Keypad_1, CTLX+'1',
X Keypad_2, CTLX+'2',
X Do_Key, CTLX+'E',
X Keypad_4, CTLX+tocntrl('B'),
X Keypad_5, CTLX+'B',
X Keypad_6, CTLX+'K',
X Resume_Key, META+'!',
X Control+Next_Scr_Key, CTLX+'N',
X Control+Prev_Scr_Key, CTLX+'P',
X Control+Up_Key, CTLX+tocntrl('P'),
X Control+Down_Key, CTLX+tocntrl('N'),
X Help_Key, CTLX+'=',
X Shift+Do_Key, CTLX+'(',
X Control+Do_Key, CTLX+')',
X Keypad_0, CTLX+'Z',
X Shift+Keypad_0, CTLX+tocntrl('Z'),
X Main_Scr_Key, tocntrl('C'),
X Keypad_Enter, CTLX+'!',
X Exit_Key, CTLX+tocntrl('C'),
X Shift+Exit_Key, tocntrl('Z')
};
X
#define lk_map_size (sizeof(lk_map)/2)
#endif
X
SHAR_EOF
chmod 0444 ebind.h ||
echo 'restore of ebind.h failed'
Wc_c="`wc -c < 'ebind.h'`"
test 14722 -eq "$Wc_c" ||
echo 'ebind.h: original size 14722, current size' "$Wc_c"
# ============= edef.h ==============
echo 'x - extracting edef.h (Text)'
sed 's/^X//' << 'SHAR_EOF' > 'edef.h' &&
/* EDEF: Global variable definitions for
X MicroEMACS 3.9
X
X written by Dave G. Conroy
X modified by Steve Wilhite, George Jones
X greatly modified by Daniel Lawrence
*/
X
/* some global function declarations */
X
char *flook();
char *getctext();
char *fnc2engl();
char *tokval();
#if ! SMALLER
char *gtenv();
char *gtfun();
char *gtusr();
char *itoa();
char *ltos();
char *mklower();
char *mkupper();
#endif
#if ! VMALLOC
char *malloc();
#endif
char *strcat();
char *strcpy();
char *strncpy();
char *token();
char *prc2engl();
CMDFUNC *engl2fnc();
CMDFUNC *kcod2fnc();
int prc2kcod();
BUFFER *bfind(); /* Lookup a buffer by name */
WINDOW *wpopup(); /* Pop up window creation */
LINE *lalloc(); /* Allocate a line */
X
/* I know this declaration stuff is really ugly, and I probably won't ever
X * do it again. promise. but it _does_ make it easy to add/change
X * globals. Too bad about "comma". -pgf
X */
#ifdef maindef
# define comma ,
# define decl_init(thing,value) thing = value
# define decl_uninit(thing) thing
#else
# define decl_init(thing,value) extern thing
# define decl_uninit(thing) extern thing
#endif
X
decl_init( char prognam[], "vile");
decl_init( char version[], "version three");
X
decl_init( int tabval, 8); /* which column tabs are on,
X always power of two */
decl_init( int tabmask, 7); /* one less than above. I know it's
X wasteful */
decl_init( int autoindented , -1); /* how many chars (not cols) indented */
decl_uninit( int isnamedcmd ); /* are we typing a command name */
decl_uninit( int calledbefore ); /* called before during this command? */
decl_uninit( short _chartypes_[N_chars] ); /* character types */
decl_uninit( int interrupted ); /* interrupt signal? */
decl_uninit( int insertmode ); /* are we inserting or overwriting? */
decl_uninit( int lineinput ); /* are we inserting linestyle? */
decl_uninit( int lastkey ); /* last keystoke (tgetc) */
decl_uninit( int last1key ); /* last keystoke (kbd_key) */
decl_uninit( int lastcmd ); /* last command (kbd_seq) */
decl_uninit( short fulllineregions ); /* regions should be full lines */
decl_uninit( short doingopcmd ); /* operator command in progress */
decl_uninit( short opcmd ); /* what sort of operator? */
decl_uninit( CMDFUNC *havemotion ); /* so we can use "oper" routines
X internally */
decl_uninit( int fillcol ); /* Fill column */
decl_uninit( short kbdm[NKBDM] ); /* Macro */
decl_uninit( short dotcmdm[NKBDM] ); /* dot commands */
decl_uninit( short tmpcmdm[NKBDM] ); /* dot commands, 'til we're sure */
decl_uninit( int currow ); /* Cursor row */
decl_uninit( int curcol ); /* Cursor column */
decl_uninit( WINDOW *curwp ); /* Current window */
decl_uninit( BUFFER *curbp ); /* Current buffer */
decl_uninit( WINDOW *wheadp ); /* Head of list of windows */
decl_uninit( BUFFER *bheadp ); /* Head of list of buffers */
X
decl_uninit( char sres[NBUFN] ); /* current screen resolution */
X
decl_uninit( char pat[NPAT] ); /* Search pattern */
decl_uninit( char tap[NPAT] ); /* Reversed pattern array. */
decl_uninit( char rpat[NPAT] ); /* replacement pattern */
X
/* The variable matchlen holds the length of the matched
X * string - used by the replace functions.
X * The variable patmatch holds the string that satisfies
X * the search command.
X * The variables matchline and matchoff hold the line and
X * offset position of the start of match.
X */
decl_uninit( int matchlen );
decl_uninit( int mlenold );
decl_uninit( char *patmatch );
decl_uninit( LINE *matchline );
decl_uninit( int matchoff );
X
#if MAGIC
/*
X * The variable magical determines if there are actual
X * metacharacters in the string - if not, then we don't
X * have to use the slower MAGIC mode search functions.
X */
decl_uninit( short int magical );
decl_uninit( MC mcpat[NPAT] ); /* the magic pattern */
decl_uninit( MC tapcm[NPAT] ); /* the reversed magic pattern */
X
#endif
X
/* directive name table:
X This holds the names of all the directives.... */
X
#if ! SMALLER
decl_init(char *dname[],
X { "if" comma "else" comma "endif" comma
X "goto" comma "return" comma "endm" comma
X "while" comma "endwhile" comma "break" comma
X "force" }
X );
#else
decl_init(char *dname[],
X { "endm" }
X );
#endif
X
X
#if DEBUGM
/* vars needed for macro debugging output */
/* global string to hold debug line text */
decl_uninit( char outline[NSTRING] );
#endif
X
#if NeWS
decl_uninit( int inhibit_update ); /* prevents output to terminal */
#endif
X
/* initialized global definitions */
X
decl_init( int curgoal, -1 ); /* column goal */
decl_uninit( char *execstr ); /* pointer to string to execute */
decl_uninit( char golabel[NPAT] ); /* current line to go to */
decl_uninit( int execlevel ); /* execution IF level */
decl_init( int eolexist, TRUE ); /* does clear to EOL exist */
decl_uninit( int revexist ); /* does reverse video exist? */
decl_uninit( int flickcode ); /* do flicker supression? */
X
/* THE FOLLOWING MODE NAME TABLES MUST CORRESPOND EXACTLY WITH THE #DEFINES
X IN ESTRUCT.H */
decl_init( char *othermodes[] , {
X "lazy" comma
X "versionctrl" } );
X
decl_init( int othmode, 0); /* "other" global modes */
X
decl_init( char *valuemodes[] , {
X "tabstop" comma
X "fillcol" } );
X
decl_init( char *modename[] , { /* names of modes */
X "wrap" comma
X "cmode" comma
X "swrap" comma
X "exact" comma
X "view" comma
X "magic" comma
X "crypt" comma
X "asave" comma
X "list" comma
X "dos" comma
X "aindent" } );
X
decl_init( char modecode[], "wcsevmyaldi" );/* letters to represent modes */
X
decl_init( int gmode, MDSWRAP|MDEXACT|MDMAGIC );/* global editor mode */
X
decl_init( int gfcolor, 7 ); /* global forgrnd color (white) */
decl_uninit( int gbcolor ); /* global backgrnd color (black)*/
decl_init( int gasave, 256 ); /* global ASAVE size */
decl_init( int gacount, 256 ); /* count until next ASAVE */
decl_init( int sgarbf, TRUE ); /* TRUE if screen is garbage */
decl_uninit( int mpresf ); /* TRUE if message in last line */
decl_uninit( int clexec ); /* command line execution flag */
decl_uninit( int mstore ); /* storing text to macro flag */
decl_init( int discmd, TRUE ); /* display command flag */
decl_init( int disinp, TRUE ); /* display input characters */
decl_uninit( struct BUFFER *bstore ); /* buffer to store macro text to*/
decl_uninit( int vtrow ); /* Row location of SW cursor */
decl_uninit( int vtcol ); /* Column location of SW cursor */
decl_init( int ttrow, HUGE ); /* Row location of HW cursor */
decl_init( int ttcol, HUGE ); /* Column location of HW cursor */
decl_uninit( int taboff ); /* tab offset for display */
X
decl_init( int cntl_a, tocntrl('A') ); /* current meta character */
decl_init( int cntl_x, tocntrl('X') ); /* current control X prefix char */
decl_init( int reptc, 'K' ); /* current universal repeat char */
decl_init( int abortc, tocntrl('[') ); /* ESC: current abort command char */
decl_init( int quotec, tocntrl('V') ); /* quote char during mlreply() */
decl_init( int killc, tocntrl('U') ); /* current line kill char */
decl_init( int intrc, tocntrl('C') ); /* current interrupt char */
decl_init( int backspc, '\b'); /* current backspace char */
X
#if NeWS
decl_init( char *cname[], { /* names of colors */
X "WHITE" comma "RED" comma "GREEN" comma "YELLOW" comma "BLUE" comma
X "MAGENTA" comma "CYAN" comma "BLACK"} );
#else
decl_init( char *cname[], { /* names of colors */
X "BLACK" comma "RED" comma "GREEN" comma "YELLOW" comma "BLUE" comma
X "MAGENTA" comma "CYAN" comma "WHITE"} );
#endif
X
decl_uninit( int exmode );
X
decl_uninit( KILLREG kbs[NKREGS] ); /* all chars, 1 thru 9, and default */
decl_uninit( short ukb ); /* index of current kbuffs */
decl_uninit( int kregflag ); /* info for pending kill into reg */
decl_uninit( WINDOW *swindow ); /* saved window pointer */
decl_uninit( int cryptflag ); /* currently encrypting? */
decl_uninit( short *tmpcmdptr ); /* current position in dot cmd buf */
decl_init( short *tmpcmdend, &tmpcmdm[0] );/* ptr to end of the dot cmd */
decl_uninit( short *dotcmdptr ); /* current position in dot cmd buf */
decl_init( short *dotcmdend, &dotcmdm[0] );/* ptr to end of the dot command */
decl_init( int dotcmdmode, RECORD ); /* current dot command mode */
decl_uninit( int dotcmdrep ); /* number of repetitions */
decl_uninit( short *kbdptr ); /* current position in keyboard buf */
decl_init( short *kbdend, &kbdm[0] ); /* ptr to end of the keyboard */
decl_init( int kbdmode, STOP ); /* current keyboard macro mode */
decl_uninit( int kbdrep ); /* number of repetitions */
decl_uninit( int seed ); /* random number seed */
decl_uninit( long envram ); /* # of bytes current used malloc */
decl_uninit( int macbug ); /* macro debuging flag */
decl_init( char errorm[], "ERROR" ); /* error literal */
decl_init( char truem[], "TRUE" ); /* true literal */
decl_init( char falsem[], "FALSE" ); /* false litereal */
decl_init( int cmdstatus, TRUE ); /* last command status */
decl_uninit( char palstr[49] ); /* palette string */
decl_uninit( char *fline ); /* dynamic return line */
decl_uninit( int flen ); /* current length of fline */
X
#if FINDERR
decl_init( char febuff[NBUFN], "" ); /* name of buffer to find errors in */
decl_uninit( unsigned newfebuff ); /* is the name new since last time? */
#endif
X
/* defined in nebind.h and nename.h */
extern NTAB nametbl[];
extern CMDFUNC *asciitbl[];
extern KBIND kbindtbl[];
X
/* terminal table defined only in TERM.C */
X
#ifndef termdef
extern TERM term; /* Terminal information. */
#endif
X
X
SHAR_EOF
chmod 0444 edef.h ||
echo 'restore of edef.h failed'
Wc_c="`wc -c < 'edef.h'`"
test 9852 -eq "$Wc_c" ||
echo 'edef.h: original size 9852, current size' "$Wc_c"
# ============= efunc.h ==============
echo 'x - extracting efunc.h (Text)'
sed 's/^X//' << 'SHAR_EOF' > 'efunc.h' &&
THIS FILE IS NO LONGER USED -- IT IS INCLUDED FOR HISTORICAL PURPOSES
SEE THE mktbls PROGRAM, AND THE FILE cmdtbl
/* EFUNC.H: MicroEMACS function declarations and names
X
X This file list all the C code functions used by MicroEMACS
X and the names to use to bind keys to them. To add functions,
X declare it here in both the extern function list and the name
X binding table.
X
*/
X
/* External function declarations */
X
#if FINDERR
extern int finderr(); /* look up and go to next error */
#endif
#if TAGS
extern int gototag(); /* look up and go to a tag */
#endif
extern int operqreplace(); /* do "query replace" on a region */
extern int opersreplace(); /* do "replace" on a region */
extern int operlineqreplace(); /* do "query replace" on a line region */
extern int operlinesreplace(); /* do "replace" on a line region */
extern int operwrite(); /* write a region to a file */
extern int showgmodes(); /* show modes set for current buffer */
extern int showmodes(); /* show modes set for current buffer */
extern int histbuff(); /* switch to num buffer in hist list */
extern int altbuff(); /* switch to previous buffer */
extern int deltoeol(); /* delete to end of line */
extern int chgtoeol(); /* change to end of line */
extern int yankline(); /* yank whole line */
extern int chgline(); /* change whole line */
extern int chgchar(); /* change character */
extern int join(); /* join two line together */
extern int lastnonwhite(); /* goto last non-whitespace on line */
extern int firstnonwhite(); /* goto first non-whitespace on line */
extern int fcsrch(); /* forw scan for char on line */
extern int bcsrch(); /* back scan for char on line */
extern int fcsrch_to(); /* forw scan up to char on line */
extern int bcsrch_to(); /* back scan up to char on line */
extern int rep_csrch(); /* repeat last scan for char on line */
extern int rev_csrch(); /* reverse last scan for char on line */
extern int replacechar(); /* replace character under cursor */
extern int poswind(); /* position window around cursor */
extern int overwrite(); /* overwrite text (temp set OVER mode)*/
extern int undo(); /* undo last command */
extern int lineundo(); /* undo all changes to a line */
extern int dotcmdplay(); /* replay last command */
extern int operdel(); /* Delete with motion operator */
extern int operlinedel(); /* Delete lines with motion operator */
extern int operyank(); /* Yank with motion operator */
extern int operlineyank(); /* Yank lines with motion operator */
extern int operchg(); /* Change with motion operator */
extern int operlinechg(); /* Change lines with motion operator */
extern int operflip(); /* Flip case with motion operator */
extern int operlower(); /* lower case with motion operator */
extern int operupper(); /* upper case with motion operator */
extern int operlshift(); /* Shift lines with motion operator */
extern int operrshift(); /* Shift lines with motion operator */
extern int esc(); /* Abort out of things */
extern int writequit(); /* Write and Quit */
extern int quit(); /* Quit */
extern int quithard(); /* Quit, no questions asked */
extern int ctlxlp(); /* Begin macro */
extern int ctlxrp(); /* End macro */
extern int ctlxe(); /* Execute macro */
extern int fileread(); /* Get a file, read only */
extern int filefind(); /* Get a file, read write */
extern int filewrite(); /* Write a file */
extern int filesave(); /* Save current file */
extern int filename(); /* Adjust file name */
extern int getccol(); /* Get current column */
extern int gotobol(); /* Move to start of line */
extern int forwchar(); /* Move forward by characters */
extern int gotoeol(); /* Move to end of line */
extern int gotobos(); /* Move to beg of screen */
extern int gotomos(); /* Move to mid of screen */
extern int gotoeos(); /* Move to end of screen */
extern int backchar(); /* Move backward by characters */
extern int forwline(); /* Move forward by lines */
extern int forwbline(); /* Move forward by lines, goto bol */
extern int backline(); /* Move backward by lines */
extern int backbline(); /* Move backward by lines, goto bol */
extern int forwpage(); /* Move forward by pages */
extern int forwhpage(); /* Move forward half page */
extern int backpage(); /* Move backward by pages */
extern int backhpage(); /* Move backward half page */
extern int gotobob(); /* Move to start of buffer */
extern int gotoeob(); /* Move to end of buffer */
extern int setfillcol(); /* Set fill column. */
extern int setnmmark(); /* Set named mark */
extern int golinenmmark(); /* go to line of named mark */
extern int goexactnmmark(); /* go exactly to named mark */
extern int setmark(); /* Set mark */
extern int swapmark(); /* Swap "." and mark */
extern int forwsearch(); /* Search forward */
extern int backsearch(); /* Search backwards */
extern int sreplace(); /* search and replace */
extern int qreplace(); /* search and replace w/query */
extern int showcpos(); /* Show the cursor position */
extern int nextwind(); /* Move to the next window */
extern int prevwind(); /* Move to the previous window */
extern int onlywind(); /* Make current window only one */
extern int splitwind(); /* Split current window */
extern int mvdnwind(); /* Move window down */
extern int mvupwind(); /* Move window up */
extern int mvdnnxtwind(); /* Move next window down */
extern int mvupnxtwind(); /* Move next window up */
extern int enlargewind(); /* Enlarge display window. */
extern int shrinkwind(); /* Shrink window. */
extern int listbuffers(); /* Display list of buffers */
extern int togglelistbuffers(); /* Display/unDisplay list of buffers*/
extern int usebuffer(); /* Switch a window to a buffer */
extern int killbuffer(); /* Make a buffer go away. */
extern int reposition(); /* Reposition window */
extern int refresh(); /* Refresh the screen */
extern int tab(); /* Insert tab */
extern int settab(); /* set tab stops */
extern int newline(); /* Insert CR-LF */
extern int opendown(); /* Open up a blank line below */
extern int openup(); /* Open up a blank line above */
extern int append(); /* go into insert mode after dot*/
extern int appendeol(); /* go into insert mode at eol */
extern int insert(); /* go into insert mode */
extern int insertbol(); /* go into insert mode at bol */
extern int quote(); /* Insert literal */
extern int backviword(); /* Backup by vi words */
extern int forwviword(); /* Advance by vi words */
extern int backword(); /* Backup by words */
extern int forwword(); /* Advance by words */
extern int forwendw(); /* Advance to end of words */
extern int forwviendw(); /* Advance to end of vi words */
extern int forwdelchar(); /* Forward delete */
extern int backdelchar(); /* Backward delete */
/* extern int killtext(); /* Kill forward */
extern int put(); /* Yank back from killbuffer. */
extern int putbefore(); /* put back from killbuffer. */
extern int putafter(); /* Put back from killbuffer. */
extern int lineputbefore(); /* put lines back from killbuffer. */
extern int lineputafter(); /* Put lines back from killbuffer. */
#ifdef BEFORE
extern int upperword(); /* Upper case word. */
extern int lowerword(); /* Lower case word. */
extern int capword(); /* Initial capitalize word. */
#endif
/* extern int delfword(); /* Delete forward word. */
/* extern int delbword(); /* Delete backward word. */
extern int spawncli(); /* Run CLI in a subjob. */
extern int spawn(); /* Run a command in a subjob. */
#if BSD
extern int bktoshell(); /* suspend emacs to parent shell*/
extern int rtfrmshell(); /* return from a suspended state*/
#endif
extern int quickexit(); /* low keystroke style exit. */
extern int setmode(); /* set an editor mode */
extern int delmode(); /* delete a mode */
extern int gotoline(); /* go to a numbered line */
extern int gotocol(); /* go to a numbered column */
extern int namebuffer(); /* rename the current buffer */
#if WORDPRO
extern int gotobop(); /* go to beginning/paragraph */
extern int gotoeop(); /* go to end/paragraph */
extern int gotobosec(); /* go to beginning/section */
extern int gotoeosec(); /* go to end/section */
extern int fillpara(); /* fill current paragraph */
#endif
extern int help(); /* get the help file here */
extern int deskey(); /* describe a key's binding */
extern int viewfile(); /* find a file in view mode */
extern int insfile(); /* insert a file */
extern int scrnextup(); /* scroll next window back */
extern int scrnextdw(); /* scroll next window down */
extern int bindkey(); /* bind a function to a key */
extern int unbindkey(); /* unbind a key's function */
extern int namedcmd(); /* execute named command */
extern int desbind(); /* describe bindings */
extern int nextbuffer(); /* switch to the next buffer */
#if BALPHA
extern int prevbuffer(); /* switch to the previous buffer*/
#endif
#if WORDPRO
/* extern int killpara(); /* kill the current paragraph */
#endif
extern int setgmode(); /* set a global mode */
extern int delgmode(); /* delete a global mode */
extern int insspace(); /* insert a space forword */
extern int forwhunt(); /* hunt forward for next match */
extern int backhunt(); /* hunt backwards for next match*/
extern int consearch(); /* continue search for match */
extern int revsearch(); /* continue search for match*/
extern int pipecmd(); /* pipe command into buffer */
extern int filter(); /* filter buffer through dos */
extern int delwind(); /* delete the current window */
extern int cbuf1(); /* execute numbered comd buffer */
extern int cbuf2();
extern int cbuf3();
extern int cbuf4();
extern int cbuf5();
extern int cbuf6();
extern int cbuf7();
extern int cbuf8();
extern int cbuf9();
extern int cbuf10();
extern int cbuf11();
extern int cbuf12();
extern int cbuf13();
extern int cbuf14();
extern int cbuf15();
extern int cbuf16();
extern int cbuf17();
extern int cbuf18();
extern int cbuf19();
extern int cbuf20();
extern int cbuf21();
extern int cbuf22();
extern int cbuf23();
extern int cbuf24();
extern int cbuf25();
extern int cbuf26();
extern int cbuf27();
extern int cbuf28();
extern int cbuf29();
extern int cbuf30();
extern int cbuf31();
extern int cbuf32();
extern int cbuf33();
extern int cbuf34();
extern int cbuf35();
extern int cbuf36();
extern int cbuf37();
extern int cbuf38();
extern int cbuf39();
extern int cbuf40();
extern int storemac(); /* store text for macro */
extern int resize(); /* resize current window */
extern int clrmes(); /* clear the message line */
extern int meta(); /* meta prefix dummy function */
extern int cex(); /* ^X prefix dummy function */
extern int unarg(); /* ^U repeat arg dummy function */
extern int unmark(); /* unmark current buffer */
#if ISRCH
extern int fisearch(); /* forward incremental search */
extern int risearch(); /* reverse incremental search */
#endif
#if WORDPRO
extern int wordcount(); /* count words in region */
#endif
extern int upscreen(); /* force screen update */
extern int usekreg(); /* select named kill registers */
#if FLABEL
extern int fnclabel(); /* set function key label */
#endif
#if APROP
extern int apro(); /* apropos fuction */
#endif
#if CRYPT
extern int setkey(); /* set encryption key */
#endif
extern int wrapword(); /* wordwrap function */
#if CFENCE
extern int getfence(); /* move cursor to a matching fence */
#endif
#if AEDIT
#if 0
extern int indent(); /* Insert CR-LF, then indent */
#endif
extern int deblank(); /* Delete blank lines */
extern int trim(); /* trim whitespace from end of line */
extern int detab(); /* detab rest of line */
extern int entab(); /* entab rest of line */
#endif
#if PROC
extern int storeproc(); /* store names procedure */
extern int execproc(); /* execute procedure */
#endif
#if NeWS
extern int setcursor() ; /* mouse support function */
extern int newsadjustmode() ; /* mouse support function */
#endif
#if ! SMALLER
extern int newsize(); /* change the current screen size */
extern int newwidth(); /* change the current screen width */
extern int setvar(); /* set a variables value */
extern int istring(); /* insert string in text */
extern int savewnd(); /* save current window */
extern int restwnd(); /* restore current window */
extern int writemsg(); /* write text on message line */
extern int twiddle(); /* Twiddle characters */
extern int execcmd(); /* execute a command line */
extern int execbuf(); /* exec commands from a buffer */
extern int execfile(); /* exec commands from a file */
#endif
X
extern int nullproc(); /* does nothing... */
X
X
/* Name to function binding table
X
X This table gives the names of all the bindable functions
X end their C function address. These are used for the bind-to-key
X function.
X
X REDO means the dotcmd command recorder whould not be halted
X UNDO means the undo stacks should be cleared
X MOTION means this command moves dot, and is compatible with
X the operator commands.
X FL only occurs with MOTION, means that if the motion is an operator
X argument, the operation should affect whole lines
X ABS only occurs with MOTION, means that if the motion is absolute,
X i.e. not relative to the current postion or screen. It is used
X for the "lastdotmark", ldmark.
X GOAL signifies a motion that will attempt to retain the
X current column postition.
*/
X
NBIND names[] = {
X {"!", spawn, NONE },
X {"<", pipecmd, NONE },
X {"|", filter, REDO|UNDO},
X {"*", togglelistbuffers, NONE },
X {"abort-command", esc, NONE },
X {"add-mode", setmode, NONE },
X {"add-global-mode", setgmode, NONE },
X {"alternate-buffer", altbuff, NONE },
#if APROP
X {"apropos", apro, NONE },
#endif
X {"append", append, REDO|UNDO },
X {"append-eol", appendeol, REDO|UNDO },
X {"b", usebuffer, NONE },
X {"backward-character", backchar, MOTION },
X {"backward-char-scan", bcsrch, MOTION },
X {"backward-char-scan-to", bcsrch_to, MOTION },
X {"begin-macro", ctlxlp, NONE },
X {"beginning-of-file", gotobob, ABS|MOTION },
X {"beginning-of-line", gotobol, MOTION },
X {"beginning-of-screen", gotobos, MOTION|FL },
X {"bind-key", bindkey, NONE },
X {"buffer-position", showcpos, NONE },
#ifdef BEFORE
X {"case-word-capitalize", capword, REDO|UNDO },
X {"case-word-lower", lowerword, REDO|UNDO },
X {"case-word-upper", upperword, REDO|UNDO },
#endif
X {"change-char", chgchar, REDO|UNDO },
X {"change-file-name", filename, NONE },
X {"change-line", chgline, REDO|UNDO },
X {"change-lines-til", operlinechg, REDO|UNDO },
#if ! SMALLER
X {"change-screen-size", newsize, NONE },
X {"change-screen-width", newwidth, NONE },
#endif
X {"change-til", operchg, REDO|UNDO },
X {"change-to-end-of-line", chgtoeol, REDO|UNDO },
X {"clear-and-redraw", refresh, NONE },
X {"clear-message-line", clrmes, NONE },
X {"continue-search", consearch, ABS|MOTION },
#if WORDPRO
X {"count-words", wordcount, NONE },
#endif
X {"ctlx-prefix", cex, NONE },
X {"db", killbuffer, NONE },
X {"dw", delwind, NONE },
#if AEDIT
X {"delete-blank-lines", deblank, REDO|UNDO },
#endif
X {"delete-buffer", killbuffer, NONE },
X {"delete-global-mode", delgmode, NONE },
X {"delete-mode", delmode, NONE },
X {"delete-next-character", forwdelchar, REDO|UNDO },
X {"delete-lines-til", operlinedel, REDO|UNDO },
X {"delete-other-windows", onlywind, NONE },
X {"delete-previous-character", backdelchar, REDO|UNDO },
X {"delete-til", operdel, REDO|UNDO },
X {"delete-to-end-of-line", deltoeol, REDO|UNDO },
X {"delete-window", delwind, NONE },
X {"describe-bindings", desbind, NONE },
X {"describe-key", deskey, NONE },
#if AEDIT
X {"detab-line", detab, REDO|UNDO },
#endif
X {"e", filefind, NONE },
X {"e!", fileread, NONE },
#if 0
X {"e#", altbuff, NONE },
#endif
X {"edit-file", filefind, NONE },
X {"end-macro", ctlxrp, NONE },
X {"end-of-file", gotoeob, ABS|MOTION },
X {"end-of-line", gotoeol, MOTION|GOAL },
X {"end-of-screen", gotoeos, MOTION|FL },
#if AEDIT
X {"entab-line", entab, REDO|UNDO },
#endif
X {"exchange-point-and-mark", swapmark, ABS|MOTION },
#if ! SMALLER
X {"execute-buffer", execbuf, NONE },
X {"execute-command-line", execcmd, NONE },
X {"execute-file", execfile, NONE },
#endif
X {"execute-macro", ctlxe, REDO },
X {"execute-macro-1", cbuf1, REDO },
X {"execute-macro-2", cbuf2, REDO },
X {"execute-macro-3", cbuf3, REDO },
X {"execute-macro-4", cbuf4, REDO },
X {"execute-macro-5", cbuf5, REDO },
X {"execute-macro-6", cbuf6, REDO },
X {"execute-macro-7", cbuf7, REDO },
X {"execute-macro-8", cbuf8, REDO },
X {"execute-macro-9", cbuf9, REDO },
X {"execute-macro-10", cbuf10, REDO },
X {"execute-macro-11", cbuf11, REDO },
X {"execute-macro-12", cbuf12, REDO },
X {"execute-macro-13", cbuf13, REDO },
X {"execute-macro-14", cbuf14, REDO },
X {"execute-macro-15", cbuf15, REDO },
X {"execute-macro-16", cbuf16, REDO },
X {"execute-macro-17", cbuf17, REDO },
X {"execute-macro-18", cbuf18, REDO },
X {"execute-macro-19", cbuf19, REDO },
X {"execute-macro-20", cbuf20, REDO },
X {"execute-macro-21", cbuf21, REDO },
X {"execute-macro-22", cbuf22, REDO },
X {"execute-macro-23", cbuf23, REDO },
X {"execute-macro-24", cbuf24, REDO },
X {"execute-macro-25", cbuf25, REDO },
X {"execute-macro-26", cbuf26, REDO },
X {"execute-macro-27", cbuf27, REDO },
X {"execute-macro-28", cbuf28, REDO },
X {"execute-macro-29", cbuf29, REDO },
X {"execute-macro-30", cbuf30, REDO },
X {"execute-macro-31", cbuf31, REDO },
X {"execute-macro-32", cbuf32, REDO },
X {"execute-macro-33", cbuf33, REDO },
X {"execute-macro-34", cbuf34, REDO },
X {"execute-macro-35", cbuf35, REDO },
X {"execute-macro-36", cbuf36, REDO },
X {"execute-macro-37", cbuf37, REDO },
X {"execute-macro-38", cbuf38, REDO },
X {"execute-macro-39", cbuf39, REDO },
X {"execute-macro-40", cbuf40, REDO },
X {"execute-named-command", namedcmd, NONE },
#if PROC
X {"execute-procedure", execproc, REDO },
#endif
X {"exit", quit, NONE },
X {"f", filename, NONE },
X {"file-name", filename, NONE },
#if WORDPRO
X {"fill-paragraph", fillpara, REDO|UNDO },
#endif
X {"filter-buffer", filter, REDO|UNDO },
X {"find-file", filefind, NONE },
#if FINDERR
X {"find-next-error", finderr, NONE },
#endif
#if TAGS
X {"find-tag", gototag, NONE },
#endif
X {"first-nonwhite", firstnonwhite, MOTION },
X {"flip-til", operflip, REDO|UNDO },
X {"forward-character", forwchar, MOTION },
X {"forward-char-scan", fcsrch, MOTION },
X {"forward-char-scan-to", fcsrch_to, MOTION },
X {"gmodes", showgmodes, NONE },
X {"goto-column", gotocol, MOTION },
X {"goto-line", gotoline, ABS|MOTION|FL },
/* goline and goexact are special cases-- no ABS, even though they are */
X {"goto-named-mark", golinenmmark, MOTION|FL },
X {"goto-named-mark-exact", goexactnmmark, MOTION },
#if CFENCE
X {"goto-matching-fence", getfence, ABS|MOTION },
#endif
X {"grow-window", enlargewind, NONE },
X {"h", help, NONE },
X {"handle-tab", settab, NONE },
X {"historical-buffer", histbuff, NONE },
X {"hunt-forward", forwhunt, ABS|MOTION },
X {"hunt-backward", backhunt, ABS|MOTION },
X {"help", help, NONE },
X {"i-shell", spawncli, NONE },
#if ISRCH
X {"incremental-search", fisearch, NONE },
#endif
X {"insert", insert, REDO|UNDO },
X {"insert-bol", insertbol, REDO|UNDO },
X {"insert-file", insfile, REDO|UNDO },
X {"insert-space", insspace, REDO|UNDO },
#if ! SMALLER
X {"insert-string", istring, REDO|UNDO },
#endif
X {"join-lines", join, REDO|UNDO },
X {"kill-buffer", killbuffer, NONE },
#if WORDPRO
X /* {"kill-paragraph", killpara, REDO|UNDO }, */
#endif
#if FLABEL
X {"label-function-key", fnclabel, NONE },
#endif
X {"last-nonwhite", lastnonwhite, MOTION },
X {"list-buffers", listbuffers, NONE },
X {"lower-til", operlower, REDO|UNDO },
X {"meta-prefix", meta, NONE },
X {"middle-of-screen", gotomos, MOTION|FL },
X {"modes", showmodes, NONE },
X {"move-next-window-down", mvdnnxtwind, NONE },
X {"move-next-window-up", mvupnxtwind, NONE },
X {"move-window-down", mvdnwind, NONE },
X {"move-window-up", mvupwind, NONE },
X {"n", nextbuffer, NONE },
X {"name-buffer", namebuffer, NONE },
X {"newline", newline, REDO|UNDO },
X {"next-buffer", nextbuffer, NONE },
X {"next-half-page", forwhpage, NONE },
X {"next-line", forwline, GOAL|MOTION|FL },
X {"next-line-at-bol", forwbline, MOTION|FL },
X {"next-page", forwpage, MOTION },
#if WORDPRO
X {"next-paragraph", gotoeop, ABS|MOTION },
#endif
X {"next-punc-word", forwviword, MOTION },
X {"next-punc-word-end", forwviendw, MOTION },
X {"next-section", gotoeosec, ABS|MOTION },
X {"next-window", nextwind, NONE },
X {"next-word", forwword, MOTION },
X {"next-word-end", forwendw, MOTION },
X {"nop", nullproc, NONE },
X {"open-line-below", opendown, REDO|UNDO },
X {"open-line-above", openup, REDO|UNDO },
X {"overwrite", overwrite, REDO|UNDO },
#if BALPHA
X {"p", prevbuffer, NONE },
X {"pb", prevbuffer, NONE },
#else
X {"p", altbuff, NONE },
X {"pb", altbuff, NONE },
#endif
X {"pw", prevwind, NONE },
X {"pipe-command", pipecmd, NONE },
X {"position-window", poswind, NONE },
X {"previous-half-page", backhpage, NONE },
X {"previous-line", backline, GOAL|MOTION|FL },
X {"previous-line-at-bol", backbline, MOTION|FL },
X {"previous-page", backpage, MOTION },
#if WORDPRO
X {"previous-paragraph", gotobop, ABS|MOTION },
#endif
X {"previous-punc-word", backviword, MOTION },
X {"previous-section", gotobosec, ABS|MOTION },
X {"previous-window", prevwind, NONE },
X {"previous-word", backword, MOTION },
X {"put-after", putafter, REDO|UNDO },
X {"put-before", putbefore, REDO|UNDO },
X {"put-as-lines-after", lineputafter, REDO|UNDO },
X {"put-as-lines-before", lineputbefore, REDO|UNDO },
X {"q", quit, NONE },
X {"q!", quithard, NONE },
X {"query-replace-til", operqreplace, UNDO },
X {"query-replace-lines-til", operlineqreplace, UNDO },
X {"quick-exit", quickexit, NONE },
X {"quote-character", quote, REDO|UNDO },
X {"r", insfile, REDO|UNDO},
X {"replace-with-file", fileread, NONE },
X {"redraw-display", reposition, NONE },
X {"repeat-char-scan", rep_csrch, MOTION },
X {"repeat-last-cmd", dotcmdplay, NONE },
X {"replace-character", replacechar, REDO|UNDO },
X {"replace-silent-lines-til", operlinesreplace, REDO|UNDO },
X {"replace-silent-til", opersreplace, REDO|UNDO },
X {"resize-window", resize, NONE },
#if ! SMALLER
X {"restore-window", restwnd, NONE },
#endif
X {"reverse-char-scan", rev_csrch, MOTION },
#if ISRCH
X {"reverse-incremental-search", risearch, NONE },
#endif
X {"reverse-search", revsearch, ABS|MOTION },
#if PROC
X {"run", execproc, NONE },
#endif
X {"save-file", filesave, NONE },
SHAR_EOF
true || echo 'restore of efunc.h failed'
echo 'End of Vile part 4'
echo 'File efunc.h is continued in part 5'
echo 5 > _shar_seq_.tmp
exit 0
--
paul fox, pgf@cayman.com, (617)494-1999
Cayman Systems, 26 Landsdowne St., Cambridge, MA 02139