home *** CD-ROM | disk | FTP | other *** search
- From: pgf@cayman.COM (Paul Fox)
- Newsgroups: alt.sources
- Subject: Vile 10/17 - vi feel-alike (multi-window)
- Message-ID: <4529@cayman.COM>
- Date: 7 Jun 91 22:09:52 GMT
-
- #!/bin/sh
- # this is vileshar.10 (part 10 of Vile)
- # do not concatenate these parts, unpack them in order with /bin/sh
- # file nefunc.h continued
- #
- if test ! -r _shar_seq_.tmp; then
- echo 'Please unpack part 1 first!'
- exit 1
- fi
- (read Scheck
- if test "$Scheck" != 10; then
- echo Please unpack part "$Scheck" next!
- exit 1
- else
- exit 0
- fi
- ) < _shar_seq_.tmp || exit 1
- echo 'x - continuing file nefunc.h'
- sed 's/^X//' << 'SHAR_EOF' >> 'nefunc.h' &&
- #endif
- #if !SMALLER
- extern int cbuf40();
- X CMDFUNC f_cbuf40 = { cbuf40, REDO };
- #endif
- extern int delwind();
- X CMDFUNC f_delwind = { delwind, NONE };
- #if AEDIT
- extern int deblank();
- X CMDFUNC f_deblank = { deblank, REDO|UNDO };
- #endif
- extern int delgmode();
- X CMDFUNC f_delgmode = { delgmode, NONE };
- extern int delmode();
- X CMDFUNC f_delmode = { delmode, NONE|(EXRCOK|EXTRA) };
- extern int deltoeol();
- X CMDFUNC f_deltoeol = { deltoeol, REDO|UNDO };
- #if REBIND
- extern int desbind();
- X CMDFUNC f_desbind = { desbind, NONE };
- #endif
- #if REBIND
- extern int deskey();
- X CMDFUNC f_deskey = { deskey, NONE };
- #endif
- #if AEDIT
- extern int detab();
- X CMDFUNC f_detab = { detab, REDO|UNDO };
- #endif
- extern int dotcmdplay();
- X CMDFUNC f_dotcmdplay = { dotcmdplay, NONE };
- #if !SMALLER
- extern int execbuf();
- X CMDFUNC f_execbuf = { execbuf, NONE };
- #endif
- #if NEVER
- extern int execcmd();
- X CMDFUNC f_execcmd = { execcmd, NONE };
- #endif
- #if !SMALLER
- extern int execfile();
- X CMDFUNC f_execfile = { execfile, NONE };
- #endif
- #if PROC
- extern int execproc();
- X CMDFUNC f_execproc = { execproc, REDO };
- #endif
- extern int enlargewind();
- X CMDFUNC f_enlargewind = { enlargewind, NONE };
- #if AEDIT
- extern int entab();
- X CMDFUNC f_entab = { entab, REDO|UNDO };
- #endif
- extern int esc();
- X CMDFUNC f_esc = { esc, NONE };
- extern int fcsrch();
- X CMDFUNC f_fcsrch = { fcsrch, MOTION };
- extern int fcsrch_to();
- X CMDFUNC f_fcsrch_to = { fcsrch_to, MOTION };
- extern int filefind();
- X CMDFUNC f_filefind = { filefind, NONE|(BANG|FILE1|PLUS) };
- extern int filename();
- X CMDFUNC f_filename = { filename, NONE|(NAMEDF) };
- extern int fileread();
- X CMDFUNC f_fileread = { fileread, NONE };
- #if !SMALLER
- extern int filesave();
- X CMDFUNC f_filesave = { filesave, NONE };
- #endif
- extern int filewrite();
- X CMDFUNC f_filewrite = { filewrite, NONE };
- extern int filter();
- X CMDFUNC f_filter = { filter, REDO|UNDO };
- #if FINDERR
- extern int finderr();
- X CMDFUNC f_finderr = { finderr, NONE };
- #endif
- extern int firstnonwhite();
- X CMDFUNC f_firstnonwhite = { firstnonwhite, MOTION };
- #if ISRCH
- extern int fisearch();
- X CMDFUNC f_fisearch = { fisearch, NONE };
- #endif
- extern int flipchar();
- X CMDFUNC f_flipchar = { flipchar, REDO|UNDO };
- #if FLABEL
- extern int fnclabel();
- X CMDFUNC f_fnclabel = { fnclabel, NONE };
- #endif
- extern int forwdelchar();
- X CMDFUNC f_forwdelchar = { forwdelchar, REDO|UNDO };
- extern int forwhpage();
- X CMDFUNC f_forwhpage = { forwhpage, NONE };
- extern int forwchar();
- X CMDFUNC f_forwchar = { forwchar, MOTION };
- extern int forwpage();
- X CMDFUNC f_forwpage = { forwpage, MOTION };
- extern int forwline();
- X CMDFUNC f_forwline = { forwline, GOAL|MOTION|FL };
- extern int forwbline();
- X CMDFUNC f_forwbline = { forwbline, MOTION|FL };
- extern int forwword();
- X CMDFUNC f_forwword = { forwword, MOTION };
- extern int forwviword();
- X CMDFUNC f_forwviword = { forwviword, MOTION };
- extern int forwendw();
- X CMDFUNC f_forwendw = { forwendw, MOTION };
- extern int forwviendw();
- X CMDFUNC f_forwviendw = { forwviendw, MOTION };
- #if !SMALLER
- extern int forwhunt();
- X CMDFUNC f_forwhunt = { forwhunt, ABS|MOTION };
- #endif
- extern int forwsearch();
- X CMDFUNC f_forwsearch = { forwsearch, ABS|MOTION };
- #if CFENCE
- extern int getfence();
- X CMDFUNC f_getfence = { getfence, ABS|MOTION };
- #endif
- #if GLOBALS
- extern int globals();
- X CMDFUNC f_globals = { globals, NONE };
- #endif
- extern int godotplus();
- X CMDFUNC f_godotplus = { godotplus, MOTION|FL };
- extern int gomark();
- X CMDFUNC f_gomark = { gomark, MOTION|FL|(RANGE) };
- #if WORDPRO
- extern int gotobop();
- X CMDFUNC f_gotobop = { gotobop, ABS|MOTION };
- #endif
- #if WORDPRO
- extern int gotoeop();
- X CMDFUNC f_gotoeop = { gotoeop, ABS|MOTION };
- #endif
- #if !SMALLER
- extern int gotobob();
- X CMDFUNC f_gotobob = { gotobob, ABS|MOTION };
- #endif
- #if !SMALLER
- extern int gotoeob();
- X CMDFUNC f_gotoeob = { gotoeob, ABS|MOTION };
- #endif
- extern int gotobol();
- X CMDFUNC f_gotobol = { gotobol, MOTION };
- extern int gotoeol();
- X CMDFUNC f_gotoeol = { gotoeol, MOTION|GOAL };
- extern int gotobos();
- X CMDFUNC f_gotobos = { gotobos, MOTION|FL };
- extern int gotomos();
- X CMDFUNC f_gotomos = { gotomos, MOTION|FL };
- extern int gotoeos();
- X CMDFUNC f_gotoeos = { gotoeos, MOTION|FL };
- #if WORDPRO
- extern int gotobosec();
- X CMDFUNC f_gotobosec = { gotobosec, ABS|MOTION };
- #endif
- #if WORDPRO
- extern int gotoeosec();
- X CMDFUNC f_gotoeosec = { gotoeosec, ABS|MOTION };
- #endif
- #if TAGS
- extern int gototag();
- X CMDFUNC f_gototag = { gototag, NONE|(BANG|WORD1) };
- #endif
- extern int gotocol();
- X CMDFUNC f_gotocol = { gotocol, MOTION };
- extern int gotoline();
- X CMDFUNC f_gotoline = { gotoline, ABS|MOTION|FL|(RANGE) };
- extern int golinenmmark();
- X CMDFUNC f_golinenmmark = { golinenmmark, MOTION|FL };
- extern int goexactnmmark();
- X CMDFUNC f_goexactnmmark = { goexactnmmark, MOTION };
- extern int help();
- X CMDFUNC f_help = { help, NONE };
- extern int histbuff();
- X CMDFUNC f_histbuff = { histbuff, NONE };
- extern int insert();
- X CMDFUNC f_insert = { insert, REDO|UNDO };
- extern int insertbol();
- X CMDFUNC f_insertbol = { insertbol, REDO|UNDO };
- #if BEFORE
- extern int insfiletop();
- X CMDFUNC f_insfiletop = { insfiletop, REDO|UNDO };
- #endif
- extern int insfile();
- X CMDFUNC f_insfile = { insfile, REDO|UNDO|GLOBOK|(FROM|ZERO|NAMEDF) };
- #if !SMALLER
- extern int insspace();
- X CMDFUNC f_insspace = { insspace, REDO|UNDO };
- #endif
- #if !SMALLER
- extern int istring();
- X CMDFUNC f_istring = { istring, REDO|UNDO };
- #endif
- extern int join();
- X CMDFUNC f_join = { join, REDO|UNDO };
- extern int killbuffer();
- X CMDFUNC f_killbuffer = { killbuffer, NONE };
- extern int showlength();
- X CMDFUNC f_showlength = { showlength, NONE };
- #if !SMALLER
- extern int lastnonwhite();
- X CMDFUNC f_lastnonwhite = { lastnonwhite, MOTION };
- #endif
- extern int listbuffers();
- X CMDFUNC f_listbuffers = { listbuffers, NONE };
- extern int lineputafter();
- X CMDFUNC f_lineputafter = { lineputafter, REDO|UNDO|GLOBOK|(FROM|ZERO|WORD1) };
- extern int lineputbefore();
- X CMDFUNC f_lineputbefore = { lineputbefore, REDO|UNDO|GLOBOK|(FROM|WORD1) };
- extern int lineundo();
- X CMDFUNC f_lineundo = { lineundo, NONE };
- extern int map();
- X CMDFUNC f_map = { map, NONE|(EXRCOK|BANG|EXTRA) };
- extern int cntl_af();
- X CMDFUNC f_cntl_af = { cntl_af, NONE };
- extern int opermove();
- X CMDFUNC f_opermove = { opermove, OPER|(RANGE|EXTRA) };
- extern int mvdnnxtwind();
- X CMDFUNC f_mvdnnxtwind = { mvdnnxtwind, NONE };
- extern int mvupnxtwind();
- X CMDFUNC f_mvupnxtwind = { mvupnxtwind, NONE };
- extern int mvdnwind();
- X CMDFUNC f_mvdnwind = { mvdnwind, GOAL };
- extern int mvupwind();
- X CMDFUNC f_mvupwind = { mvupwind, GOAL };
- extern int mvrightwind();
- X CMDFUNC f_mvrightwind = { mvrightwind, GOAL };
- extern int mvleftwind();
- X CMDFUNC f_mvleftwind = { mvleftwind, GOAL };
- extern int nextbuffer();
- X CMDFUNC f_nextbuffer = { nextbuffer, NONE|(BANG|NAMEDFS) };
- extern int namebuffer();
- X CMDFUNC f_namebuffer = { namebuffer, NONE };
- #if !SMALLER
- extern int newline();
- X CMDFUNC f_newline = { newline, REDO|UNDO };
- #endif
- extern int newlength();
- X CMDFUNC f_newlength = { newlength, NONE };
- extern int newwidth();
- X CMDFUNC f_newwidth = { newwidth, NONE };
- extern int nextwind();
- X CMDFUNC f_nextwind = { nextwind, NONE };
- extern int nullproc();
- X CMDFUNC f_nullproc = { nullproc, NONE };
- extern int onamedcmd();
- X CMDFUNC f_onamedcmd = { onamedcmd, NONE };
- extern int namedcmd();
- X CMDFUNC f_namedcmd = { namedcmd, NONE };
- extern int ex();
- X CMDFUNC f_ex = { ex, NONE|(BANG|FILE1) };
- extern int operchg();
- X CMDFUNC f_operchg = { operchg, OPER|REDO|UNDO };
- extern int operlinechg();
- X CMDFUNC f_operlinechg = { operlinechg, OPER|REDO|UNDO|(RANGE) };
- extern int operdel();
- X CMDFUNC f_operdel = { operdel, OPER|REDO|UNDO };
- extern int operlinedel();
- X CMDFUNC f_operlinedel = { operlinedel, OPER|REDO|UNDO|GLOBOK|(RANGE+WORD1) };
- extern int operfilter();
- X CMDFUNC f_operfilter = { operfilter, OPER|REDO|UNDO|(EXRCOK|RANGE|NAMEDFS|DFLNONE|NL) };
- #if WORDPRO
- extern int operformat();
- X CMDFUNC f_operformat = { operformat, OPER|REDO|UNDO|(RANGE) };
- #endif
- extern int operflip();
- X CMDFUNC f_operflip = { operflip, OPER|REDO|UNDO|GLOBOK|(RANGE) };
- #if GLOBALS
- extern int operglobals();
- X CMDFUNC f_operglobals = { operglobals, OPER|(/*RANGE|*/BANG|EXTRA|DFLALL) };
- #endif
- #if GLOBALS
- extern int opervglobals();
- X CMDFUNC f_opervglobals = { opervglobals, OPER|(RANGE|BANG|EXTRA|DFLALL) };
- #endif
- extern int operlower();
- X CMDFUNC f_operlower = { operlower, OPER|REDO|UNDO|GLOBOK|(RANGE) };
- #if GLOBALS
- extern int operlist();
- X CMDFUNC f_operlist = { operlist, OPER|GLOBOK|(RANGE) };
- #endif
- #if GLOBALS
- extern int operprint();
- X CMDFUNC f_operprint = { operprint, OPER|GLOBOK|(RANGE) };
- #endif
- extern int operupper();
- X CMDFUNC f_operupper = { operupper, OPER|REDO|UNDO|GLOBOK|(RANGE) };
- extern int operlshift();
- X CMDFUNC f_operlshift = { operlshift, OPER|REDO|UNDO|GLOBOK|(RANGE) };
- extern int operrshift();
- X CMDFUNC f_operrshift = { operrshift, OPER|REDO|UNDO|GLOBOK|(RANGE) };
- extern int opersubst();
- X CMDFUNC f_opersubst = { opersubst, OPER|REDO|UNDO|GLOBOK|(RANGE|EXTRA) };
- extern int operyank();
- X CMDFUNC f_operyank = { operyank, OPER };
- extern int operlineyank();
- X CMDFUNC f_operlineyank = { operlineyank, OPER|(RANGE|WORD1) };
- extern int openup();
- X CMDFUNC f_openup = { openup, REDO|UNDO|(FROM) };
- extern int opendown();
- X CMDFUNC f_opendown = { opendown, REDO|UNDO|(FROM|ZERO) };
- extern int operwrite();
- X CMDFUNC f_operwrite = { operwrite, OPER|(RANGE|BANG|FILE1|DFLALL) };
- extern int overwrite();
- X CMDFUNC f_overwrite = { overwrite, REDO|UNDO };
- extern int onlywind();
- X CMDFUNC f_onlywind = { onlywind, NONE };
- extern int poswind();
- X CMDFUNC f_poswind = { poswind, NONE };
- extern int prevwind();
- X CMDFUNC f_prevwind = { prevwind, NONE };
- extern int pipecmd();
- X CMDFUNC f_pipecmd = { pipecmd, NONE };
- extern int putafter();
- X CMDFUNC f_putafter = { putafter, REDO|UNDO };
- extern int putbefore();
- X CMDFUNC f_putbefore = { putbefore, REDO|UNDO };
- extern int quit();
- X CMDFUNC f_quit = { quit, NONE|(BANG) };
- extern int quithard();
- X CMDFUNC f_quithard = { quithard, NONE };
- extern int quickexit();
- X CMDFUNC f_quickexit = { quickexit, NONE|(BANG|NL) };
- extern int quote();
- X CMDFUNC f_quote = { quote, REDO|UNDO };
- extern int refresh();
- X CMDFUNC f_refresh = { refresh, NONE };
- #if !SMALLER
- extern int reposition();
- X CMDFUNC f_reposition = { reposition, NONE };
- #endif
- extern int rep_csrch();
- X CMDFUNC f_rep_csrch = { rep_csrch, MOTION };
- extern int replacechar();
- X CMDFUNC f_replacechar = { replacechar, REDO|UNDO };
- extern int respawn();
- X CMDFUNC f_respawn = { respawn, NONE };
- #if !SMALLER
- extern int resize();
- X CMDFUNC f_resize = { resize, NONE };
- #endif
- #if !SMALLER
- extern int restwnd();
- X CMDFUNC f_restwnd = { restwnd, NONE };
- #endif
- extern int rev_csrch();
- X CMDFUNC f_rev_csrch = { rev_csrch, MOTION };
- #if ISRCH
- extern int risearch();
- X CMDFUNC f_risearch = { risearch, NONE };
- #endif
- extern int revsearch();
- X CMDFUNC f_revsearch = { revsearch, ABS|MOTION };
- extern int scrforwsearch();
- X CMDFUNC f_scrforwsearch = { scrforwsearch, ABS|MOTION };
- extern int scrbacksearch();
- X CMDFUNC f_scrbacksearch = { scrbacksearch, ABS|MOTION };
- extern int scrsearchpat();
- X CMDFUNC f_scrsearchpat = { scrsearchpat, NONE };
- extern int settab();
- X CMDFUNC f_settab = { settab, NONE };
- extern int spawncli();
- X CMDFUNC f_spawncli = { spawncli, NONE };
- #if !SMALLER
- extern int savewnd();
- X CMDFUNC f_savewnd = { savewnd, NONE };
- #endif
- extern int scrnextup();
- X CMDFUNC f_scrnextup = { scrnextup, NONE };
- extern int scrnextdw();
- X CMDFUNC f_scrnextdw = { scrnextdw, NONE };
- extern int setfillcol();
- X CMDFUNC f_setfillcol = { setfillcol, NONE };
- #if CRYPT
- extern int setkey();
- X CMDFUNC f_setkey = { setkey, NONE };
- #endif
- extern int setmode();
- X CMDFUNC f_setmode = { setmode, NONE|(EXRCOK|EXTRA) };
- extern int setgmode();
- X CMDFUNC f_setgmode = { setgmode, NONE };
- extern int setnmmark();
- X CMDFUNC f_setnmmark = { setnmmark, NONE|(FROM+WORD1) };
- #if !SMALLER
- extern int setvar();
- X CMDFUNC f_setvar = { setvar, NONE };
- #endif
- #if VMALLOC
- extern int setvmalloc();
- X CMDFUNC f_setvmalloc = { setvmalloc, NONE };
- #endif
- extern int showcpos();
- X CMDFUNC f_showcpos = { showcpos, NONE };
- extern int showmodes();
- X CMDFUNC f_showmodes = { showmodes, NONE };
- extern int showgmodes();
- X CMDFUNC f_showgmodes = { showgmodes, NONE };
- extern int showversion();
- X CMDFUNC f_showversion = { showversion, NONE|(EXRCOK) };
- extern int shrinkwind();
- X CMDFUNC f_shrinkwind = { shrinkwind, NONE };
- extern int source();
- X CMDFUNC f_source = { source, NONE|(EXRCOK|NAMEDF) };
- extern int spawn();
- X CMDFUNC f_spawn = { spawn, NONE };
- extern int splitwind();
- X CMDFUNC f_splitwind = { splitwind, NONE };
- extern int storemac();
- X CMDFUNC f_storemac = { storemac, NONE };
- #if PROC
- extern int storeproc();
- X CMDFUNC f_storeproc = { storeproc, NONE };
- #endif
- extern int subst_again();
- X CMDFUNC f_subst_again = { subst_again, REDO|UNDO|GLOBOK|(RANGE|EXTRA) };
- extern int opertransf();
- X CMDFUNC f_opertransf = { opertransf, OPER|(RANGE+EXTRA) };
- extern int togglelistbuffers();
- X CMDFUNC f_togglelistbuffers = { togglelistbuffers, NONE };
- extern int trimline();
- X CMDFUNC f_trimline = { trimline, REDO|UNDO|GLOBOK };
- #if !SMALLER
- extern int twiddle();
- X CMDFUNC f_twiddle = { twiddle, REDO|UNDO };
- #endif
- #if REBIND
- extern int unbindkey();
- X CMDFUNC f_unbindkey = { unbindkey, NONE };
- #endif
- extern int undo();
- X CMDFUNC f_undo = { undo, NONE };
- extern int unarg();
- X CMDFUNC f_unarg = { unarg, NONE };
- extern int unimpl();
- X CMDFUNC f_unimpl = { unimpl, NONE };
- extern int unmark();
- X CMDFUNC f_unmark = { unmark, NONE };
- extern int unmap();
- X CMDFUNC f_unmap = { unmap, NONE|(EXRCOK|BANG|EXTRA) };
- #if TAGS
- extern int untagpop();
- X CMDFUNC f_untagpop = { untagpop, NONE };
- #endif
- #if !SMALLER
- extern int upscreen();
- X CMDFUNC f_upscreen = { upscreen, NONE };
- #endif
- extern int usebuffer();
- X CMDFUNC f_usebuffer = { usebuffer, NONE };
- extern int usekreg();
- X CMDFUNC f_usekreg = { usekreg, REDO };
- extern int visual();
- X CMDFUNC f_visual = { visual, NONE };
- #if GLOBALS
- extern int vglobals();
- X CMDFUNC f_vglobals = { vglobals, NONE };
- #endif
- extern int viewfile();
- X CMDFUNC f_viewfile = { viewfile, NONE };
- extern int writequit();
- X CMDFUNC f_writequit = { writequit, NONE|(NL) };
- #if !SMALLER
- extern int wrapword();
- X CMDFUNC f_wrapword = { wrapword, REDO|UNDO };
- #endif
- #if !SMALLER
- extern int writemsg();
- X CMDFUNC f_writemsg = { writemsg, NONE };
- #endif
- extern int yankline();
- X CMDFUNC f_yankline = { yankline, NONE };
- SHAR_EOF
- echo 'File nefunc.h is complete' &&
- chmod 0664 nefunc.h ||
- echo 'restore of nefunc.h failed'
- Wc_c="`wc -c < 'nefunc.h'`"
- test 19211 -eq "$Wc_c" ||
- echo 'nefunc.h: original size 19211, current size' "$Wc_c"
- # ============= nename.h ==============
- echo 'x - extracting nename.h (Text)'
- sed 's/^X//' << 'SHAR_EOF' > 'nename.h' &&
- /* nename.h: this header file was produced automatically by
- X * the ./mktbls program, based on input from the file cmdtbl
- X */
- X
- /* if you maintain this by hand, keep it in */
- /* alphabetical order!!!! */
- X
- NTAB nametbl[] = {
- X { "!", &f_operfilter },
- X { "!!", &f_respawn },
- X { "&", &f_subst_again },
- X { "*", &f_togglelistbuffers },
- X { ":", &f_namedcmd },
- X { "<", &f_operlshift },
- X { "=", &f_showlength },
- X { ">", &f_operrshift },
- X { "E", &f_filefind },
- X { "L", &f_operlower },
- X { "Put", &f_lineputbefore },
- X { "Q", &f_quit },
- #if (BEFORE)
- X { "R", &f_insfiletop },
- #endif
- X { "U", &f_operupper },
- X { "W", &f_operwrite },
- X { "WQ", &f_writequit },
- X { "Wq", &f_writequit },
- X { "_", &f_histbuff },
- X { "a", &f_opendown },
- #if (!FEWNAMES)
- X { "abort-command", &f_esc },
- #endif
- #if (!FEWNAMES)
- X { "alternate-buffer", &f_altbuff },
- #endif
- X { "append", &f_opendown },
- #if (!FEWNAMES)
- X { "append-eol", &f_appendeol },
- #endif
- #if (!FEWNAMES)
- X { "appendchar", &f_append },
- #endif
- #if (APROP|REBIND)
- X { "apropos", &f_apro },
- #endif
- X { "b", &f_usebuffer },
- #if (!FEWNAMES)
- X { "backward-char-scan", &f_bcsrch },
- #endif
- #if (!FEWNAMES)
- X { "backward-char-scan-to", &f_bcsrch_to },
- #endif
- #if (!FEWNAMES)
- X { "backward-character", &f_backchar },
- #endif
- #if (!FEWNAMES)
- X { "begin-macro", &f_ctlxlp },
- #endif
- #if (!SMALLER) & (!FEWNAMES)
- X { "beginning-of-file", &f_gotobob },
- #endif
- #if (!FEWNAMES)
- X { "beginning-of-line", &f_gotobol },
- #endif
- #if (!FEWNAMES)
- X { "beginning-of-screen", &f_gotobos },
- #endif
- #if (REBIND)
- X { "bind-key", &f_bindkey },
- #endif
- X { "buffer", &f_usebuffer },
- #if (!FEWNAMES)
- X { "buffer-length", &f_showlength },
- #endif
- X { "c", &f_opercopy },
- X { "ch", &f_operlinechg },
- #if (!FEWNAMES)
- X { "change-char", &f_chgchar },
- #endif
- #if (!FEWNAMES)
- X { "change-file-name", &f_filename },
- #endif
- #if (!FEWNAMES)
- X { "change-line", &f_chgline },
- #endif
- #if (!FEWNAMES)
- X { "change-lines-til", &f_operlinechg },
- #endif
- #if (!FEWNAMES)
- X { "change-til", &f_operchg },
- #endif
- #if (!FEWNAMES)
- X { "change-to-end-of-line", &f_chgtoeol },
- #endif
- #if (!FEWNAMES)
- X { "clear-and-redraw", &f_refresh },
- #endif
- #if (!FEWNAMES)
- X { "clear-message-line", &f_clrmes },
- #endif
- X { "cntl_a-prefix", &f_cntl_af },
- #if (!FEWNAMES)
- X { "cntl_x-prefix", &f_cntl_xf },
- #endif
- #if (!FEWNAMES)
- X { "continue-search", &f_consearch },
- #endif
- X { "copy", &f_opercopy },
- X { "d", &f_operlinedel },
- #if (AEDIT) & (!FEWNAMES)
- X { "delete-blank-lines", &f_deblank },
- #endif
- #if (!FEWNAMES)
- X { "delete-buffer", &f_killbuffer },
- #endif
- #if (!FEWNAMES)
- X { "delete-global-mode", &f_delgmode },
- #endif
- #if (!FEWNAMES)
- X { "delete-lines-til", &f_operlinedel },
- #endif
- #if (!FEWNAMES)
- X { "delete-mode", &f_delmode },
- #endif
- #if (!FEWNAMES)
- X { "delete-next-character", &f_forwdelchar },
- #endif
- #if (!FEWNAMES)
- X { "delete-other-windows", &f_onlywind },
- #endif
- #if (!FEWNAMES)
- X { "delete-previous-character", &f_backdelchar },
- #endif
- #if (!FEWNAMES)
- X { "delete-til", &f_operdel },
- #endif
- #if (!FEWNAMES)
- X { "delete-to-end-of-line", &f_deltoeol },
- #endif
- #if (!FEWNAMES)
- X { "delete-window", &f_delwind },
- #endif
- #if (REBIND)
- X { "describe-bindings", &f_desbind },
- #endif
- #if (REBIND)
- X { "describe-key", &f_deskey },
- #endif
- #if (AEDIT) & (!FEWNAMES)
- X { "detab-line", &f_detab },
- #endif
- X { "e", &f_filefind },
- X { "e!", &f_fileread },
- #if (!FEWNAMES)
- X { "edit-file", &f_filefind },
- #endif
- #if (!FEWNAMES)
- X { "end-macro", &f_ctlxrp },
- #endif
- #if (!SMALLER) & (!FEWNAMES)
- X { "end-of-file", &f_gotoeob },
- #endif
- #if (!FEWNAMES)
- X { "end-of-line", &f_gotoeol },
- #endif
- #if (!FEWNAMES)
- X { "end-of-screen", &f_gotoeos },
- #endif
- #if (AEDIT) & (!FEWNAMES)
- X { "entab-line", &f_entab },
- #endif
- X { "ex", &f_ex },
- #if (!SMALLER) & (!FEWNAMES)
- X { "execute-buffer", &f_execbuf },
- #endif
- #if (NEVER) & (!FEWNAMES)
- X { "execute-command-line", &f_execcmd },
- #endif
- #if (!SMALLER) & (!FEWNAMES)
- X { "execute-file", &f_execfile },
- #endif
- #if (!FEWNAMES)
- X { "execute-macro", &f_ctlxe },
- #endif
- #if (!FEWNAMES)
- X { "execute-macro-1", &f_cbuf1 },
- #endif
- #if (!FEWNAMES)
- X { "execute-macro-10", &f_cbuf10 },
- #endif
- #if (!SMALLER) & (!FEWNAMES)
- X { "execute-macro-11", &f_cbuf11 },
- #endif
- #if (!SMALLER) & (!FEWNAMES)
- X { "execute-macro-12", &f_cbuf12 },
- #endif
- #if (!SMALLER) & (!FEWNAMES)
- X { "execute-macro-13", &f_cbuf13 },
- #endif
- #if (!SMALLER) & (!FEWNAMES)
- X { "execute-macro-14", &f_cbuf14 },
- #endif
- #if (!SMALLER) & (!FEWNAMES)
- X { "execute-macro-15", &f_cbuf15 },
- #endif
- #if (!SMALLER) & (!FEWNAMES)
- X { "execute-macro-16", &f_cbuf16 },
- #endif
- #if (!SMALLER) & (!FEWNAMES)
- X { "execute-macro-17", &f_cbuf17 },
- #endif
- #if (!SMALLER) & (!FEWNAMES)
- X { "execute-macro-18", &f_cbuf18 },
- #endif
- #if (!SMALLER) & (!FEWNAMES)
- X { "execute-macro-19", &f_cbuf19 },
- #endif
- #if (!FEWNAMES)
- X { "execute-macro-2", &f_cbuf2 },
- #endif
- #if (!SMALLER) & (!FEWNAMES)
- X { "execute-macro-20", &f_cbuf20 },
- #endif
- #if (!SMALLER) & (!FEWNAMES)
- X { "execute-macro-21", &f_cbuf21 },
- #endif
- #if (!SMALLER) & (!FEWNAMES)
- X { "execute-macro-22", &f_cbuf22 },
- #endif
- #if (!SMALLER) & (!FEWNAMES)
- X { "execute-macro-23", &f_cbuf23 },
- #endif
- #if (!SMALLER) & (!FEWNAMES)
- X { "execute-macro-24", &f_cbuf24 },
- #endif
- #if (!SMALLER) & (!FEWNAMES)
- X { "execute-macro-25", &f_cbuf25 },
- #endif
- #if (!SMALLER) & (!FEWNAMES)
- X { "execute-macro-26", &f_cbuf26 },
- #endif
- #if (!SMALLER) & (!FEWNAMES)
- X { "execute-macro-27", &f_cbuf27 },
- #endif
- #if (!SMALLER) & (!FEWNAMES)
- X { "execute-macro-28", &f_cbuf28 },
- #endif
- #if (!SMALLER) & (!FEWNAMES)
- X { "execute-macro-29", &f_cbuf29 },
- #endif
- #if (!FEWNAMES)
- X { "execute-macro-3", &f_cbuf3 },
- #endif
- #if (!SMALLER) & (!FEWNAMES)
- X { "execute-macro-30", &f_cbuf30 },
- #endif
- #if (!SMALLER) & (!FEWNAMES)
- X { "execute-macro-31", &f_cbuf31 },
- #endif
- #if (!SMALLER) & (!FEWNAMES)
- X { "execute-macro-32", &f_cbuf32 },
- #endif
- #if (!SMALLER) & (!FEWNAMES)
- X { "execute-macro-33", &f_cbuf33 },
- #endif
- #if (!SMALLER) & (!FEWNAMES)
- X { "execute-macro-34", &f_cbuf34 },
- #endif
- #if (!SMALLER) & (!FEWNAMES)
- X { "execute-macro-35", &f_cbuf35 },
- #endif
- #if (!SMALLER) & (!FEWNAMES)
- X { "execute-macro-36", &f_cbuf36 },
- #endif
- #if (!SMALLER) & (!FEWNAMES)
- X { "execute-macro-37", &f_cbuf37 },
- #endif
- #if (!SMALLER) & (!FEWNAMES)
- X { "execute-macro-38", &f_cbuf38 },
- #endif
- #if (!SMALLER) & (!FEWNAMES)
- X { "execute-macro-39", &f_cbuf39 },
- #endif
- #if (!FEWNAMES)
- X { "execute-macro-4", &f_cbuf4 },
- #endif
- #if (!SMALLER) & (!FEWNAMES)
- X { "execute-macro-40", &f_cbuf40 },
- #endif
- #if (!FEWNAMES)
- X { "execute-macro-5", &f_cbuf5 },
- #endif
- #if (!FEWNAMES)
- X { "execute-macro-6", &f_cbuf6 },
- #endif
- #if (!FEWNAMES)
- X { "execute-macro-7", &f_cbuf7 },
- #endif
- #if (!FEWNAMES)
- X { "execute-macro-8", &f_cbuf8 },
- #endif
- #if (!FEWNAMES)
- X { "execute-macro-9", &f_cbuf9 },
- #endif
- #if (!FEWNAMES)
- X { "execute-named-command", &f_namedcmd },
- #endif
- #if (!FEWNAMES)
- X { "execute-named-command-old", &f_onamedcmd },
- #endif
- #if (PROC) & (!FEWNAMES)
- X { "execute-procedure", &f_execproc },
- #endif
- X { "exit", &f_quit },
- X { "f", &f_filename },
- X { "file", &f_filename },
- X { "filename", &f_filename },
- #if (!FEWNAMES)
- X { "filter-buffer", &f_filter },
- #endif
- #if (!FEWNAMES)
- X { "filter-til", &f_operfilter },
- #endif
- #if (!FEWNAMES)
- X { "find-file", &f_filefind },
- #endif
- #if (FINDERR) & (!FEWNAMES)
- X { "find-next-error", &f_finderr },
- #endif
- #if (TAGS) & (!FEWNAMES)
- X { "find-tag", &f_gototag },
- #endif
- #if (!FEWNAMES)
- X { "first-nonwhite", &f_firstnonwhite },
- #endif
- #if (!FEWNAMES)
- X { "flip-character", &f_flipchar },
- #endif
- #if (!FEWNAMES)
- X { "flip-til", &f_operflip },
- #endif
- #if (WORDPRO) & (!FEWNAMES)
- X { "format-til", &f_operformat },
- #endif
- #if (!FEWNAMES)
- X { "forward-char-scan", &f_fcsrch },
- #endif
- #if (!FEWNAMES)
- X { "forward-char-scan-to", &f_fcsrch_to },
- #endif
- #if (!FEWNAMES)
- X { "forward-character", &f_forwchar },
- #endif
- #if (GLOBALS)
- X { "g", &f_operglobals },
- #endif
- #if (GLOBALS)
- X { "global", &f_operglobals },
- #endif
- X { "gmodes", &f_showgmodes },
- #if (!FEWNAMES)
- X { "goto-column", &f_gotocol },
- #endif
- #if (!FEWNAMES)
- X { "goto-line", &f_gotoline },
- #endif
- #if (CFENCE) & (!FEWNAMES)
- X { "goto-matching-fence", &f_getfence },
- #endif
- #if (!FEWNAMES)
- X { "goto-named-mark", &f_golinenmmark },
- #endif
- #if (!FEWNAMES)
- X { "goto-named-mark-exact", &f_goexactnmmark },
- #endif
- #if (!FEWNAMES)
- X { "grow-window", &f_enlargewind },
- #endif
- X { "h", &f_help },
- #if (!FEWNAMES)
- X { "handle-tab", &f_settab },
- #endif
- X { "help", &f_help },
- #if (!FEWNAMES)
- X { "historical-buffer", &f_histbuff },
- #endif
- #if (!SMALLER)
- X { "hunt-backward", &f_backhunt },
- #endif
- #if (!SMALLER) & (!FEWNAMES)
- X { "hunt-forward", &f_forwhunt },
- #endif
- X { "i", &f_openup },
- #if (!FEWNAMES)
- X { "i-shell", &f_spawncli },
- #endif
- #if (ISRCH) & (!FEWNAMES)
- X { "incremental-search", &f_fisearch },
- #endif
- X { "insert", &f_openup },
- #if (!FEWNAMES)
- X { "insert-bol", &f_insertbol },
- #endif
- #if (!FEWNAMES)
- X { "insert-file", &f_insfile },
- #endif
- #if (BEFORE) & (!FEWNAMES)
- X { "insert-file-at-top", &f_insfiletop },
- #endif
- #if (!SMALLER) & (!FEWNAMES)
- X { "insert-space", &f_insspace },
- #endif
- #if (!SMALLER)
- X { "insert-string", &f_istring },
- #endif
- #if (!FEWNAMES)
- X { "insertchar", &f_insert },
- #endif
- #if (!FEWNAMES)
- X { "join-lines", &f_join },
- #endif
- X { "k", &f_setnmmark },
- X { "ki", &f_killbuffer },
- #if (!FEWNAMES)
- X { "kill-buffer", &f_killbuffer },
- #endif
- #if (GLOBALS)
- X { "l", &f_operlist },
- #endif
- #if (FLABEL)
- X { "label-fkey", &f_fnclabel },
- #endif
- #if (FLABEL) & (!FEWNAMES)
- X { "label-function-key", &f_fnclabel },
- #endif
- #if (!SMALLER) & (!FEWNAMES)
- X { "last-nonwhite", &f_lastnonwhite },
- #endif
- #if (!FEWNAMES)
- X { "list-buffers", &f_listbuffers },
- #endif
- #if (GLOBALS) & (!FEWNAMES)
- X { "list-lines-til", &f_operlist },
- #endif
- #if (!FEWNAMES)
- X { "lower-til", &f_operlower },
- #endif
- X { "m", &f_opermove },
- X { "map", &f_map },
- #if (!FEWNAMES)
- X { "middle-of-screen", &f_gotomos },
- #endif
- X { "modes", &f_showmodes },
- X { "move", &f_opermove },
- #if (!FEWNAMES)
- X { "move-next-window-down", &f_mvdnnxtwind },
- #endif
- #if (!FEWNAMES)
- X { "move-next-window-up", &f_mvupnxtwind },
- #endif
- #if (!FEWNAMES)
- X { "move-window-down", &f_mvdnwind },
- #endif
- #if (!FEWNAMES)
- X { "move-window-left", &f_mvleftwind },
- #endif
- #if (!FEWNAMES)
- X { "move-window-right", &f_mvrightwind },
- #endif
- #if (!FEWNAMES)
- X { "move-window-up", &f_mvupwind },
- #endif
- X { "n", &f_nextbuffer },
- #if (!SMALLER)
- X { "newline", &f_newline },
- #endif
- #if (!FEWNAMES)
- X { "next-buffer", &f_nextbuffer },
- #endif
- #if (!FEWNAMES)
- X { "next-half-page", &f_forwhpage },
- #endif
- #if (!FEWNAMES)
- X { "next-line", &f_forwline },
- #endif
- #if (!FEWNAMES)
- X { "next-line-at-bol", &f_forwbline },
- #endif
- #if (!FEWNAMES)
- X { "next-page", &f_forwpage },
- #endif
- #if (WORDPRO) & (!FEWNAMES)
- X { "next-paragraph", &f_gotoeop },
- #endif
- #if (!FEWNAMES)
- X { "next-punc-word", &f_forwviword },
- #endif
- #if (!FEWNAMES)
- X { "next-punc-word-end", &f_forwviendw },
- #endif
- #if (WORDPRO) & (!FEWNAMES)
- X { "next-section", &f_gotoeosec },
- #endif
- #if (!FEWNAMES)
- X { "next-window", &f_nextwind },
- #endif
- #if (!FEWNAMES)
- X { "next-word", &f_forwword },
- #endif
- #if (!FEWNAMES)
- X { "next-word-end", &f_forwendw },
- #endif
- #if (!FEWNAMES)
- X { "nop", &f_nullproc },
- #endif
- #if (GLOBALS)
- X { "og", &f_globals },
- #endif
- #if (!FEWNAMES)
- X { "open-line-above", &f_openup },
- #endif
- #if (!FEWNAMES)
- X { "open-line-below", &f_opendown },
- #endif
- #if (GLOBALS)
- X { "ov", &f_vglobals },
- #endif
- #if (!FEWNAMES)
- X { "overwrite", &f_overwrite },
- #endif
- #if (GLOBALS)
- X { "p", &f_operprint },
- #endif
- #if (!FEWNAMES)
- X { "pipe-command", &f_pipecmd },
- #endif
- #if (!FEWNAMES)
- X { "position", &f_showcpos },
- #endif
- #if (!FEWNAMES)
- X { "position-window", &f_poswind },
- #endif
- #if (!FEWNAMES)
- X { "previous-half-page", &f_backhpage },
- #endif
- #if (!FEWNAMES)
- X { "previous-line", &f_backline },
- #endif
- #if (!FEWNAMES)
- X { "previous-line-at-bol", &f_backbline },
- #endif
- #if (!FEWNAMES)
- X { "previous-page", &f_backpage },
- #endif
- #if (WORDPRO) & (!FEWNAMES)
- X { "previous-paragraph", &f_gotobop },
- #endif
- #if (!FEWNAMES)
- X { "previous-punc-word", &f_backviword },
- #endif
- #if (WORDPRO) & (!FEWNAMES)
- X { "previous-section", &f_gotobosec },
- #endif
- #if (!FEWNAMES)
- X { "previous-window", &f_prevwind },
- #endif
- #if (!FEWNAMES)
- X { "previous-word", &f_backword },
- #endif
- #if (GLOBALS) & (!FEWNAMES)
- X { "print-lines-til", &f_operprint },
- #endif
- X { "put", &f_lineputafter },
- #if (!FEWNAMES)
- X { "put-after", &f_putafter },
- #endif
- #if (!FEWNAMES)
- X { "put-as-lines-after", &f_lineputafter },
- #endif
- #if (!FEWNAMES)
- X { "put-as-lines-before", &f_lineputbefore },
- #endif
- #if (!FEWNAMES)
- X { "put-before", &f_putbefore },
- #endif
- X { "q", &f_quit },
- X { "q!", &f_quithard },
- #if (!FEWNAMES)
- X { "quick-exit", &f_quickexit },
- #endif
- #if (!FEWNAMES)
- X { "quote-character", &f_quote },
- #endif
- X { "r", &f_insfile },
- #if (REBIND)
- X { "rebind-key", &f_bindkey },
- #endif
- #if (!SMALLER)
- X { "redraw-display", &f_reposition },
- #endif
- X { "rename-buffer", &f_namebuffer },
- #if (!FEWNAMES)
- X { "repeat-char-scan", &f_rep_csrch },
- #endif
- #if (!FEWNAMES)
- X { "repeat-last-cmd", &f_dotcmdplay },
- #endif
- #if (!FEWNAMES)
- X { "replace-character", &f_replacechar },
- #endif
- #if (!FEWNAMES)
- X { "replace-with-file", &f_fileread },
- #endif
- #if (!FEWNAMES)
- X { "rerun-shell-command", &f_respawn },
- #endif
- #if (!SMALLER)
- X { "resize-window", &f_resize },
- #endif
- #if (!SMALLER)
- X { "restore-window", &f_restwnd },
- #endif
- #if (!FEWNAMES)
- X { "reverse-char-scan", &f_rev_csrch },
- #endif
- #if (ISRCH) & (!FEWNAMES)
- X { "reverse-incremental-search", &f_risearch },
- #endif
- #if (!FEWNAMES)
- X { "reverse-search", &f_revsearch },
- #endif
- #if (PROC)
- X { "run", &f_execproc },
- #endif
- X { "s", &f_opersubst },
- #if (!SMALLER)
- X { "save-file", &f_filesave },
- #endif
- #if (!SMALLER)
- X { "save-window", &f_savewnd },
- #endif
- X { "screen-columns", &f_newwidth },
- X { "screen-rows", &f_newlength },
- #if (!FEWNAMES)
- X { "screen-search-forward", &f_scrforwsearch },
- #endif
- #if (!FEWNAMES)
- X { "screen-search-pattern-grab", &f_scrsearchpat },
- #endif
- #if (!FEWNAMES)
- X { "screen-search-reverse", &f_scrbacksearch },
- #endif
- #if (!FEWNAMES)
- X { "scroll-next-down", &f_scrnextdw },
- #endif
- #if (!FEWNAMES)
- X { "scroll-next-up", &f_scrnextup },
- #endif
- #if (!FEWNAMES)
- X { "search-forward", &f_forwsearch },
- #endif
- #if (!FEWNAMES)
- X { "search-reverse", &f_backsearch },
- #endif
- #if (!FEWNAMES)
- X { "select-buffer", &f_usebuffer },
- #endif
- X { "set", &f_setmode },
- #if (CRYPT)
- X { "set-crypt-key", &f_setkey },
- #endif
- X { "set-fill-column", &f_setfillcol },
- X { "set-global-mode", &f_setgmode },
- #if (!FEWNAMES)
- X { "set-mode", &f_setmode },
- #endif
- #if (!FEWNAMES)
- X { "set-named-mark", &f_setnmmark },
- #endif
- X { "set-tab", &f_settab },
- #if (!SMALLER)
- X { "set-variable", &f_setvar },
- #endif
- X { "setall", &f_showmodes },
- X { "setg", &f_setgmode },
- X { "setgall", &f_showgmodes },
- X { "setgno", &f_delgmode },
- X { "setno", &f_delmode },
- #if (!SMALLER)
- X { "setv", &f_setvar },
- #endif
- X { "sh", &f_spawncli },
- X { "shell", &f_spawncli },
- #if (!FEWNAMES)
- X { "shell-command", &f_spawn },
- #endif
- #if (!FEWNAMES)
- X { "shift-left-til", &f_operlshift },
- #endif
- #if (!FEWNAMES)
- X { "shift-right-til", &f_operrshift },
- #endif
- X { "show-global-modes", &f_showgmodes },
- X { "show-modes", &f_showmodes },
- #if (!FEWNAMES)
- X { "shrink-window", &f_shrinkwind },
- #endif
- X { "source", &f_source },
- #if (!FEWNAMES)
- X { "split-current-window", &f_splitwind },
- #endif
- X { "store-macro", &f_storemac },
- #if (PROC)
- X { "store-procedure", &f_storeproc },
- #endif
- #if (!FEWNAMES)
- X { "substitute", &f_opersubst },
- #endif
- #if (!FEWNAMES)
- X { "substitute-again", &f_subst_again },
- #endif
- #if (UNIX&&defined(SIGTSTP)) & (!FEWNAMES)
- X { "suspend-emacs", &f_bktoshell },
- #endif
- X { "t", &f_opertransf },
- #if (TAGS)
- X { "ta", &f_gototag },
- #endif
- #if (TAGS)
- X { "tag", &f_gototag },
- #endif
- #if (!FEWNAMES)
- X { "toggle-buffer-list", &f_togglelistbuffers },
- #endif
- #if (!SMALLER) & (!FEWNAMES)
- X { "transpose-characters", &f_twiddle },
- #endif
- X { "trim", &f_trimline },
- #if (!FEWNAMES)
- X { "trim-line", &f_trimline },
- #endif
- #if (REBIND)
- X { "unbind-key", &f_unbindkey },
- #endif
- #if (!FEWNAMES)
- X { "undo-change", &f_undo },
- #endif
- #if (!FEWNAMES)
- X { "undo-line-changes", &f_lineundo },
- #endif
- #if (!FEWNAMES)
- X { "unimplemented-command", &f_unimpl },
- #endif
- #if (!FEWNAMES)
- X { "universal-argument", &f_unarg },
- #endif
- X { "unmap", &f_unmap },
- X { "unmark-buffer", &f_unmark },
- X { "unset", &f_delmode },
- X { "unsetg", &f_delgmode },
- #if (TAGS) & (!FEWNAMES)
- X { "untag-pop", &f_untagpop },
- #endif
- #if (!SMALLER)
- X { "update-screen", &f_upscreen },
- #endif
- #if (!FEWNAMES)
- X { "upper-til", &f_operupper },
- #endif
- #if (!FEWNAMES)
- X { "use-named-kill-register", &f_usekreg },
- #endif
- #if (GLOBALS)
- X { "v", &f_opervglobals },
- #endif
- X { "version", &f_showversion },
- #if (GLOBALS)
- X { "vglobal", &f_opervglobals },
- #endif
- X { "view-file", &f_viewfile },
- X { "visual", &f_visual },
- #if (VMALLOC)
- X { "vmalloc", &f_setvmalloc },
- #endif
- X { "w", &f_operwrite },
- X { "wq", &f_writequit },
- #if (!SMALLER)
- X { "wrap-word", &f_wrapword },
- #endif
- #if (!FEWNAMES)
- X { "write-file", &f_filewrite },
- #endif
- #if (!FEWNAMES)
- X { "write-file-and-quit", &f_writequit },
- #endif
- #if (!SMALLER)
- X { "write-message", &f_writemsg },
- #endif
- #if (!FEWNAMES)
- X { "write-til", &f_operwrite },
- #endif
- X { "x", &f_quickexit },
- X { "xit", &f_quickexit },
- X { "y", &f_operlineyank },
- #if (!FEWNAMES)
- X { "yank-line", &f_yankline },
- #endif
- #if (!FEWNAMES)
- X { "yank-lines-til", &f_operlineyank },
- #endif
- #if (!FEWNAMES)
- X { "yank-til", &f_operyank },
- #endif
- X { "|", &f_filter },
- X { "~", &f_operflip },
- X { NULL, NULL }
- };
- SHAR_EOF
- chmod 0664 nename.h ||
- echo 'restore of nename.h failed'
- Wc_c="`wc -c < 'nename.h'`"
- test 17247 -eq "$Wc_c" ||
- echo 'nename.h: original size 17247, current size' "$Wc_c"
- # ============= news.c ==============
- echo 'x - extracting news.c (Text)'
- sed 's/^X//' << 'SHAR_EOF' > 'news.c' &&
- /* news: Unix (SunOS4 and Unicos) NeWS video driver
- X for MicroEMACS
- X
- X The bulk of the code is contained in news.cps.
- X
- X P.R.Ove
- */
- X
- #define termdef 1 /* don't define "term" external */
- X
- #include <stdio.h>
- #include "news.h"
- #include "signal.h"
- #include "estruct.h"
- #include "edef.h"
- X
- #if NeWS
- X
- #define MARGIN 8
- #define SCRSIZ 64
- #define NPAUSE 10 /* # times thru update to pause */
- #define BEL 0x07
- #define ESC 0x1B
- #define min(x,y) ((x) < (y) ? (x) : (y))
- #define max(x,y) ((x) > (y) ? (x) : (y))
- #define P(i) (0x7fff & (i)) /* avoid (-) (long ints) */
- X
- extern int newsopen();
- extern int newsgetc();
- extern int newsputc();
- extern int newsflush();
- extern int newsclose();
- extern int newskopen();
- extern int newskclose();
- extern int newsmove();
- extern int newseeol();
- extern int newseeop();
- extern int newsbeep();
- extern int newsrev();
- extern int newscres();
- #if COLOR
- extern int newsfcol();
- extern int newsbcol();
- X
- int cfcolor = -1; /* current forground color */
- int cbcolor = -1; /* current background color */
- #endif
- X
- X
- TERM term = {
- X NULL, /* these four values are set dynamically at open time */
- X NULL,
- X NULL,
- X NULL,
- X MARGIN,
- X SCRSIZ,
- X NPAUSE,
- X newsopen,
- X newsclose,
- X newskopen,
- X newskclose,
- X newsgetc,
- X newsputc,
- X newsflush,
- X newsmove,
- X newseeol,
- X newseeop,
- X newsbeep,
- X newsrev,
- X newscres
- #if COLOR
- X , newsfcol,
- X newsbcol
- #endif
- };
- X
- X
- newsquit() /* for killing when ^C is received */
- {
- X newsclose() ;
- X exit(0) ;
- }
- X
- X
- newsopen()
- {
- int rows, cols ;
- X if (term.t_nrow <= 0) term.t_nrow = 36 ; /* default size */
- X term.t_nrow = min(term.t_nrow, 100) ;
- X term.t_nrow = max(term.t_nrow, 5) ;
- X ps_open_PostScript() ;
- X signal(SIGHUP, newsquit) ;
- X signal(SIGINT, newsquit) ;
- X signal(SIGTERM, newsquit) ;
- X ps_initialize(term.t_nrow) ;
- X ps_flush_PostScript() ;
- X ps_getscreensize(&rows, &cols) ;
- X term.t_ncol = cols ;
- X term.t_mrow = term.t_nrow ;
- X term.t_mcol = max(term.t_ncol*2, 200) ; /* to change screen size */
- }
- X
- X
- newsclose()
- {
- X ps_terminate() ;
- X ps_flush_PostScript() ;
- X sleep(1) ;
- X ps_close_PostScript() ;
- }
- X
- X
- newskopen() /* taken care of above */
- {}
- newskclose()
- {}
- X
- X
- /* refresh when the screen changes size */
- newsrefresh()
- {
- int rows, cols ;
- X ps_getscreensize(&rows, &cols) ;
- X if (cols != term.t_ncol) {
- X ps_statefix() ; /* NeWS "bug" workaround */
- X newwidth(P(TRUE), P(cols)) ;
- X }
- }
- X
- X
- /* update screen without data transfer (useful for color updates) */
- newslocalupdate()
- {
- X ps_localupdate() ;
- }
- X
- X
- newsscroll(first, match, count)
- int first, match, count ;
- {
- X ps_scroller(P(first), P(match), P(count)) ;
- }
- X
- X
- newsdump(s) /* debugging routine */
- char *s ;
- {
- X ps_dump(s) ;
- X ps_flush_PostScript() ;
- }
- X
- X
- newsmove(row, col)
- register int row, col;
- {
- X ps_move(P(row),P(col)) ;
- }
- X
- X
- newsflush()
- {
- X if (!typahead()) ps_flush_PostScript() ;
- }
- X
- X
- newsputc(c) /* only ordinary characters will be sent here */
- char c ;
- {
- X ps_putc(P(c)) ;
- }
- X
- X
- newsputline(row, s, fgcolor, bgcolor)
- int row, fgcolor, bgcolor ;
- char *s ;
- {
- X ps_putline(P(row), s, P(fgcolor), P(bgcolor)) ;
- }
- X
- X
- newsfastputline(row, s) /* using existing colors */
- int row ;
- char *s ;
- {
- X ps_fastputline(P(row), s) ;
- }
- X
- X
- newssetrowcolors(row, fg, bg)
- int row, fg, bg ;
- {
- X ps_setrowcolors(P(row), P(fg), P(bg)) ;
- }
- X
- X
- newscls() {ps_cls();}
- newsinserton() {ps_inserton();}
- newsinsertoff() {ps_insertoff();}
- newscmodeon() {ps_cmodeon();}
- newscmodeoff() {ps_cmodeoff();}
- newsimmediateon() {ps_immediateon();}
- newsimmediateoff() {ps_immediateoff();}
- X
- X
- #define NEWSBUFSIZ 1000
- X
- newsgetc()
- {
- static char inbuf[NEWSBUFSIZ] ;
- static int buf_count = 0, buf_index = 0, raw_count = 0 ;
- int i, j ;
- X
- X if ( buf_index >= buf_count ) {
- X ps_gets(&buf_count, inbuf) ;
- X buf_index = 0 ;
- X }
- X
- X if ( buf_count == 0 ) return(0) ; /* shouldn't happen */
- X buf_index++ ;
- X inhibit_update = ( buf_index < buf_count ) ;
- X
- X /* force update before 1st special character if not on message line */
- /* if ( buf_index > 1 &&
- X ( inbuf[buf_index-1]<32 || inbuf[buf_index-1]==127 ) &&
- X isprint(inbuf[buf_index-2]) &&
- X ttrow != term.t_nrow
- X )
- X update(TRUE) ;
- */
- X
- X /* return the next character */
- X /* fprintf(stderr, "received char %d\n", 0xFF & inbuf[buf_index-1]) ; */
- X return( 0xFF & inbuf[buf_index-1] ) ;
- }
- X
- X
- X
- newseeol()
- {
- X ps_eeol() ;
- }
- X
- X
- newseeop()
- {
- X ps_eeop() ;
- }
- X
- X
- newsrev(state) /* change reverse video status */
- int state; /* FALSE = normal video, TRUE = reverse video */
- {
- }
- X
- X
- newscres() /* change screen resolution */
- {
- X return(TRUE);
- }
- X
- X
- spal(dummy) /* change palette string */
- {
- }
- X
- X
- #if COLOR /* defined but not used, color is set by lines */
- newsfcol()
- {
- }
- newsbcol()
- {
- }
- #endif
- X
- X
- newsbeep()
- {
- }
- X
- X
- /* REPORT_MODES
- X *
- X * Tell the workstation what mode we are in. Should be called whenever
- X * a buffer/window/file/mode is changed.
- X */
- newsreportmodes()
- {
- int i ;
- X
- for (i=0; i < NUMMODES; i++) {
- X if (strcmp("OVER", modename[i]) == 0) {
- X if ( 1 << i & curwp->w_bufp->b_mode ) ps_insertoff() ;
- X else ps_inserton() ;
- X }
- X else if (strcmp("CMODE", modename[i]) == 0) {
- X if ( 1 << i & curwp->w_bufp->b_mode ) ps_cmodeon() ;
- X else ps_cmodeoff() ;
- X }
- }
- }
- X
- X
- #if FLABEL
- fnclabel(f, n) /* label a function key */
- X
- int f,n; /* default flag, numeric argument [unused] */
- X
- {
- X /* on machines with no function keys...don't bother */
- X return(TRUE);
- }
- #endif
- #else
- X
- hello()
- {
- }
- X
- #endif
- SHAR_EOF
- chmod 0444 news.c ||
- echo 'restore of news.c failed'
- Wc_c="`wc -c < 'news.c'`"
- test 5376 -eq "$Wc_c" ||
- echo 'news.c: original size 5376, current size' "$Wc_c"
- # ============= news.cps ==============
- echo 'x - extracting news.cps (Text)'
- sed 's/^X//' << 'SHAR_EOF' > 'news.cps' &&
- %! news.cps
- %
- % Definitions for MicroEmacs NeWS front end.
- %
- % P.R.Ove
- X
- X
- X
- % C interface
- %
- % Keep these guys short. The defs should be sent in ps_initdef
- #define GETS_TAG 0
- #define GETSCREENSIZE_TAG 1
- X
- % Main channel to the remote process.
- cdef ps_gets(int n, string s)
- X getstring % stack: string
- X GETS_TAG tagprint % id tag
- X dup length typedprint % send length
- X typedprint % send string
- => GETS_TAG (n, s)
- X
- cdef ps_getscreensize(int rows, int cols)
- X GETSCREENSIZE_TAG tagprint
- X win /Rows get typedprint
- X win /Cols get typedprint
- => GETSCREENSIZE_TAG (rows, cols)
- X
- cdef ps_move(int row, int col)
- X {row col remotemove} win send
- X
- cdef ps_eeol()
- X {erase_eol} win send
- X
- cdef ps_eeop()
- X {erase_eop} win send
- X
- cdef ps_cls()
- X {clrscreen} win send
- X
- cdef ps_setrowcolors(int row, int fg, int bg)
- X {Fgcolor row fg put Bgcolor row bg put} win send
- X
- cdef ps_terminate() % why must I do this?
- X {unmap} win send
- X
- cdef ps_putc(int c)
- X {c putc} win send
- X
- cdef ps_putline(int row, string s, int fgcol, int bgcol)
- X {row s fgcol bgcol putline} win send
- X
- cdef ps_fastputline(int row, string s) % first use cls
- X {row s fastputline} win send % (for fast screen updates)
- X
- cdef ps_scroller(int src, int dest, int n)
- X {src dest n scroller} win send
- X
- cdef ps_dump(string s) % debugging aid
- { (ps_dump: %\n) [s] dbgprintf
- X 0 1 3 { (row % = %\n) [3 -1 roll dup Image exch get] dbgprintf } for
- X (\n) [] dbgprintf
- } win send
- X
- cdef ps_insertoff()
- X {overtypemode} win send
- X
- cdef ps_inserton()
- X {insertmode} win send
- X
- cdef ps_cmodeon()
- X {cmodeon} win send
- X
- cdef ps_cmodeoff()
- X {cmodeoff} win send
- X
- cdef ps_immediateon()
- X {immediateon} win send
- X
- cdef ps_immediateoff()
- X {immediateoff} win send
- X
- cdef ps_statefix() % NeWS bug workaround
- X {State setstate} win send
- X
- cdef ps_localupdate()
- X {imagetoscreen} win send
- X
- X
- X
- cdef ps_initialize(int arg_rows)
- X
- % basic non-graphics utilities
- X /ctrl { % (A) => ctrl A
- X 0 get dup 96 gt {32 sub} if
- X 64 sub
- X } def
- X /ascii { 0 get } def % (A) => 65
- X /ESC 27 def
- X /CTRLX (X) ctrl def
- X /SPEC 128 def
- X /BLANK 32 def
- X /bounds { % r c => r c (restrain)
- X exch LastRow min exch
- X LastCol min
- X exch 0 max exch
- X 0 max
- X } def
- X /rc_xy { % r c => x y
- X bounds
- X CharWidth mul exch
- X 1 add Rows exch sub CharHeight mul
- X } def
- X /xy_rc { % x y => r c
- X CharHeight idiv LastRow exch sub
- X exch CharWidth idiv
- X bounds
- X } def
- X /clrstring { % string => - % slow, used to init "blanks"
- X 0 1 2 index length 1 sub
- X {1 index exch 32 put } for pop
- X } def
- X /blankline { % Image row => - % faster, uses "blanks"
- X blanks Cols string copy put
- X } def
- X /chartostring { % 65 => (A)
- X ( ) dup 0 4 -1 roll put
- X } def
- X
- X
- % Color definitions
- X /setcoloring { % flag => - (true for color)
- X { /WHITE 0 0 1 hsbcolor def
- X /CYAN .5 .3 1 hsbcolor def
- X /MAGENTA .82 .3 1 hsbcolor def
- X /YELLOW .165 .3 1 hsbcolor def
- X /BLUE .6 .3 1 hsbcolor def
- X /RED 1 .3 1 hsbcolor def
- X /GREEN .3 .3 1 hsbcolor def
- X /BLACK 0 0 0 hsbcolor def
- X /shade {colortable exch get setcolor} def
- X }
- X { /BLACK 0 def
- X /CYAN .87 def
- X /MAGENTA .8 def
- X /YELLOW .95 def
- X /BLUE .6 def
- X /RED .7 def
- X /GREEN .5 def
- X /WHITE 1 def
- X /shade {colortable exch get setgray} def
- X } ifelse
- X /colortable [WHITE RED GREEN YELLOW
- X BLUE MAGENTA CYAN BLACK] def
- X } def
- X
- X
- % Low level drawing utilities (don't effect the image buffer).
- X /rc_moveto {rc_xy moveto} def % r c => -
- X /showchar { % r c int => -
- X gsave
- X Fgcolor 3 index get shade
- X 3 -1 roll 3 -1 roll
- X rc_moveto
- X chartostring show
- X grestore
- X } def
- X /whitebox { % r c count - (for erasing characters)
- X gsave
- X Bgcolor 3 index get shade
- X 3 -1 roll 3 -1 roll rc_xy translate
- X BoxWidth mul dup % stack: width width
- X newpath
- X 0 BoxBottom moveto
- X BoxBottom lineto
- X BoxTop lineto
- X 0 BoxTop lineto
- X closepath fill
- X grestore
- X } def
- X /blackbox { % r c - (for text cursor)
- X gsave
- X Fgcolor 2 index get shade rc_xy translate
- X newpath
- X 0 BoxBottom moveto
- X BoxWidth BoxBottom lineto
- X BoxWidth BoxTop lineto
- X 0 BoxTop lineto
- X closepath fill
- X grestore
- X } def
- X
- X
- % Text manipulation routines (effect cursor and image buffer).
- % These can call the lower routines, but calling each other is
- % risky (accidental recursion).
- X % text cursor
- X /tcursormove { % r c => -
- X bounds
- X Tccol Cols lt { % screen width may have changed
- X Tcrow Tccol 1 whitebox
- X Tcrow Tccol Image Tcrow get Tccol get showchar
- X } if
- X /Tccol exch store /Tcrow exch store
- X Tcrow Tccol blackbox
- X Tcrow Tccol rc_moveto
- X gsave
- X ColorDisplay? % can't make grey chars on b&w
- X {Bgcolor Tcrow get shade}
- X {0 shade}
- X ifelse
- X Tcrow Tccol rc_moveto
- X Image Tcrow get Tccol get chartostring show
- X grestore
- X } def
- X % mouse cursor
- X /mcursorwait { % when waiting for remote to position
- X /hourg /hourg_m ClientCanvas setstandardcursor
- X } def
- X /mcursornormal {
- X /ptr /ptr_m ClientCanvas setstandardcursor
- X } def
- X /remotemove { % row col => -
- X /prefix_flag false store
- X 1 index MessageLine eq {no_prefixes} {normal_prefixes} ifelse
- X tcursormove
- X mcursornormal
- X } def
- X /onmessageline? {
- X {Tcrow MessageLine eq} win send
- X } def
- X /putc { % like overtypechar, but handles backspace
- X dup 8 eq {
- X pop
- X Tcrow Tccol 1 whitebox
- X Image Tcrow get Tccol 32 put
- X Tcrow Tccol 1 sub tcursormove }
- X {overtypechar}
- X ifelse
- X } def
- X /overtypechar { % int => - (at current)
- X Tcrow Tccol 1 whitebox
- X BoldFont setfont
- X Tcrow Tccol 2 index showchar
- X Image Tcrow get Tccol 2 index put
- X Tcrow Tccol 1 add tcursormove
- X NormalFont setfont
- X pop
- X } def
- X /insertchar { % int => - (at current location)
- X Image Tcrow get Tccol % char line index
- X 2 copy Cols Tccol sub 1 sub getinterval % char line index tail
- X exch 1 add exch % shift index
- X putinterval % write tail
- X gsave
- X Tcrow Tccol Cols Tccol sub whitebox % clear line
- X Tcrow Tccol rc_moveto
- X Fgcolor Tcrow get shade
- X Image Tcrow get Tccol Cols Tccol sub getinterval show
- X overtypechar % put char
- X grestore
- X } def
- X /writechar { % int => -
- X InsertMode {insertchar} {overtypechar} ifelse
- X } def
- X /fastputline { % row string => - (assume all cleared)
- X gsave
- X Fgcolor 2 index get shade
- X exch dup 0 rc_moveto
- X Image exch get copy show % transfer text
- X grestore
- X } def
- X /putline { % row string fgcol bgcol => -
- X gsave
- X Bgcolor 4 index 3 -1 roll put
- X Fgcolor 3 index 3 -1 roll put
- X Fgcolor 2 index get shade
- X Image 2 index blankline % clear image line
- X Image 2 index get copy pop % transfer text
- X dup 0 Cols whitebox % clear screen line
- X dup 0 rc_moveto
- X Image exch get show
- X grestore
- X } def
- X /scroller { % src dest count => -
- X Image 3 index 2 index getinterval
- X Image 3 index 3 -1 roll putinterval
- X 1 index add 1 sub 1 exch {
- X dup 0 Cols whitebox
- X dup Image exch get fastputline
- X } for
- X pop % src popped
- X } def
- X /imagetoscreen { % display text buffer
- X gsave
- X clearpage
- X 0 1 LastRow {
- X dup Fgcolor exch get shade
- X dup 0 rc_moveto
- X Image exch get show
- X } for
- X Tcrow Tccol tcursormove
- X grestore
- X } def
- X /clearpage { % clear the display (not Image buffer)
- X 0 1 LastRow {0 Cols whitebox} for
- X } def
- X /cls { % clear text buffer and screen
- X 0 1 LastRow {Image exch blankline} for
- X clearpage
- X } def
- X /clrscreen { % all but message line
- X Image MessageLine get dup length string copy
- X cls
- X MessageLine exch fastputline
- X } def
- X /erase_eol { % clear to end of line, from cursor
- X Image Tcrow get % line
- X Tccol % index
- X blanks 0 Cols Tccol sub getinterval % blanks
- X putinterval % insert them
- X Tcrow Tccol Cols Tccol sub whitebox
- X Tcrow Tccol tcursormove
- X } def
- X /erase_eop { % clear to end of page, from cursor
- X erase_eol
- X Tcrow 1 add 1 MessageLine {
- X Image 1 index blankline
- X 0 Cols whitebox
- X } for
- X } def
- X
- X
- X
- X
- X % Window definition, menus, etc
- X
- X /filemenu [
- X (find) { [CTRLX (F) ctrl] sendarray }
- X (read) { [CTRLX (R) ctrl] sendarray }
- X (insert) { [CTRLX (I) ctrl] sendarray }
- X (view) { [CTRLX (V) ctrl] sendarray }
- X (save) { [CTRLX (S) ctrl] sendarray }
- X (write) { [CTRLX (W) ctrl] sendarray }
- X ] /new DefaultMenu send def
- X /buffermenu [
- X (next) { [CTRLX (X) ascii] sendarray }
- X (list) { [CTRLX (B) ctrl] sendarray }
- X (select) { [CTRLX (B) ascii] sendarray }
- X (kill) { [CTRLX (K) ascii] sendarray }
- X (overtype mode) { (\201SLover\n) sendarray }
- X (C mode) { (\201SLcmode\n) sendarray }
- X ] /new DefaultMenu send def
- X /windowmenu [
- X (split) { [CTRLX (2) ascii] sendarray }
- X (delete) { [CTRLX (0) ascii] sendarray }
- X (delete others) { [CTRLX (1) ascii] sendarray }
- X (redraw) { [ESC (L) ctrl] sendarray }
- X (white) { (\201SLwhite\n) sendarray }
- X (blue) { (\201SLblue\n) sendarray }
- X (yellow) { (\201SLyellow\n) sendarray }
- X (cyan) { (\201SLcyan\n) sendarray }
- X (red) { (\201SLred\n) sendarray }
- X (magenta) { (\201SLmagenta\n) sendarray }
- X (green) { (\201SLgreen\n) sendarray }
- X ] /new DefaultMenu send def
- X /searchmenu [
- X (search) { [(S) ctrl] sendarray }
- X (reverse search) { [(R) ctrl] sendarray }
- X (incremental search) { [CTRLX (S) ascii] sendarray }
- X (reverse incremental search) { [CTRLX (R) ascii] sendarray }
- X ] /new DefaultMenu send def
- X /replacemenu [
- X (replace) { [ESC (R) ascii] sendarray }
- X (query replace) { [ESC (R) ctrl] sendarray }
- X ] /new DefaultMenu send def
- X /argmenu
- X [(prompt) (2) (3) (4) (5) (10) (100) (1000)]
- X [{[(U) ctrl] sendarray}
- X {[(U) ctrl] sendarray currentkey ( ) cvs sendarray} ]
- X /new DefaultMenu send def
- X /pagemenu [
- X (beginning) { [ESC (<) ascii] sendarray }
- X (end) { [ESC (>) ascii] sendarray }
- X (next) { [(V) ctrl] sendarray }
- X (previous) { [(Z) ctrl] sendarray }
- X ] /new DefaultMenu send def
- X /miscmenu [
- X (bind function key) { [ESC (K) ascii] sendarray }
- X (color) { {true setcoloring PaintClient} win send }
- X (B & W) { {false setcoloring PaintClient} win send }
- X ] /new DefaultMenu send def
- X /globalmodemenu [
- X (overtype) { (\201SGover\n) sendarray }
- X (insert) { (\201RGover\n) sendarray }
- X (C mode) { (\201SGcmode\n) sendarray }
- X (C mode off) { (\201RGcmode\n) sendarray }
- X (white) { (\201SGwhite\n) sendarray }
- X (blue) { (\201SGblue\n) sendarray }
- X (yellow) { (\201SGyellow\n) sendarray }
- X (cyan) { (\201SGcyan\n) sendarray }
- X (red) { (\201SGred\n) sendarray }
- X (magenta) { (\201SGmagenta\n) sendarray }
- X (green) { (\201SGgreen\n) sendarray }
- X ] /new DefaultMenu send def
- X
- X
- X % Mode menu support
- X /emacsmode { % (OVER) flag => - (false to reset)
- X [CTRLX (M) 4 -1 roll {ascii} {ctrl} ifelse] sendarray
- X sendarray (\n) sendarray
- X } def
- X /overtypemode {
- X /InsertMode false store
- X (overtype mode) /searchkey buffermenu send {
- X (insert mode) { (\201RLover\n) sendarray }
- X /changeitem buffermenu send
- X } if
- X } def
- X /insertmode {
- X /InsertMode true store
- X (insert mode) /searchkey buffermenu send {
- X (overtype mode) { (\201SLover\n) sendarray }
- X /changeitem buffermenu send
- X } if
- X } def
- X /cmodeon {
- X (\)}]#) {times exch default_short put} forall
- X (C mode) /searchkey buffermenu send {
- X (C mode off) { (\201RLcmode\n) sendarray }
- X /changeitem buffermenu send
- X } if
- X } def
- X /cmodeoff {
- X (\)}]#) {times exch default_long put} forall
- X (C mode off) /searchkey buffermenu send {
- X (C mode) { (\201SLcmode\n) sendarray }
- X /changeitem buffermenu send
- X } if
- X } def
- X
- X /request_refresh { [(L) ctrl] sendarray } def
- X /zap {
- X /unmap win send % hide it in case we miss
- X [CTRLX (C) ctrl (Y) ascii] sendarray
- X } def
- X
- X
- X
- X
- X /win framebuffer /new DefaultWindow send def % Create a window
- X /wincanvas {win /ClientCanvas get} def
- X
- X % define window context
- X {
- X /State 0 def
- X /NormalFont 0 def
- X /BoldFont 0 def
- X /Rows arg_rows 2 add def % space for messages
- X /Cols 80 def
- X /LastRow Rows 1 sub def
- X /LastCol Cols 1 sub def
- X /MessageLine Rows 2 sub def
- X /Fgcolor [Rows {7} repeat] def
- X /Bgcolor [Rows {0} repeat] def
- X /Tcrow 0 def % text cursor location
- X /Tccol 0 def
- X /Image Rows array def
- X /Height 0 def
- X /Width 0 def
- X /CharHeight 0 def
- X /CharWidth 0 def
- X /BoxTop 0 def % cursor and wipeout box
- X /BoxBottom 0 def
- X /BoxWidth 0 def
- X /OldFrame [0 0] def % to detect resize repaints
- X /InsertMode true def % local insert/overtype
- X /FrameLabel (NeWS Distributed uEMACS) def
- X /framechanged? {
- X OldFrame 0 get Width ne
- X OldFrame 1 get Height ne
- X or
- X } def
- X /trimwindow { % so that it is multiple of char size
- X ClientCanvas setcanvas
- X clippath pathbbox 3 -1 roll pop 3 -1 roll pop
- X /Height exch store
- X Height Rows Height Rows div round mul sub
- X dup 0 ne
- X { FrameHeight exch sub
- X /FrameHeight exch store
- X FrameX FrameY FrameWidth FrameHeight reshape }
- X { pop }
- X ifelse
- X } def
- X /PaintClient {
- X stopeventtraps
- X trimwindow
- X initwindow
- X framechanged?
- X { 0 1 LastRow {Image exch Cols string put} for
- X request_refresh
- X }
- X { imagetoscreen }
- X ifelse
- X starteventtraps
- X } def
- X /ClientMenu [
- X (Paging ...) pagemenu
- X (Files ...) filemenu
- X (Buffers ...) buffermenu
- X (Windows ...) windowmenu
- X (Global modes ...) globalmodemenu
- X (Search ...) searchmenu
- X (Replace ...) replacemenu
- X (Argument ...) argmenu
- X (Miscellaneous ...) miscmenu
- X (quit) { [CTRLX (C) ctrl] sendarray }
- X (save & exit) { [ESC (Z) ascii] sendarray }
- X ] /new DefaultMenu send def
- X } win send
- X
- X /initwindow {
- X /OldFrame [Width Height] store
- X ClientCanvas setcanvas
- X clippath pathbbox 3 -1 roll pop 3 -1 roll pop
- X /Height exch store /Width exch store
- X /CharHeight Height Rows div store
- X /NormalFont (Courier) findfont CharHeight scalefont store
- X /BoldFont (Courier-Oblique) findfont CharHeight scalefont store
- X NormalFont setfont
- X /CharWidth (A) stringwidth pop store
- X /Cols Width CharWidth idiv store
- X /LastCol Cols 1 sub store
- X /BoxWidth CharWidth store
- X gsave newpath 0 0 moveto ([|/) true charpath pathbbox
- X /BoxTop exch 1 sub store pop pop pop
- X gsave newpath 0 0 moveto (_py) true charpath pathbbox pop pop
- X /BoxBottom exch store pop
- X /BoxTop BoxTop CharHeight BoxBottom add max store
- X /blanks Cols string dup clrstring def
- X % Make the remote guy kill us
- % Don't mess around with the frame or icon menus!
- % They may not have selections called "Zap"!
- % Use DestroyClient instead.
- % (Zap) /searchkey win /FrameMenu get send {
- % (Zap) {zap} /changeitem
- % win /FrameMenu get send
- % } if
- % (Zap) /searchkey win /IconMenu get send {
- % (Zap) {zap} /changeitem
- % win /IconMenu get send
- % } if
- X NormalFont setfont
- X /State currentstate store
- X } def
- X
- X /DestroyClient {
- X zap
- X /DestroyClient super send
- X } def
- X
- X /starteventtraps {
- X % Input dispatcher. Catches all kbd input and mouse activity.
- X /dispatcher_pid {
- X wincanvas addkbdinterests pop
- X wincanvas addfunctionstringsinterest pop
- X createevent dup begin
- X /Name dictbegin
- X 0 1 127 { dup def } for
- X /MiddleMouseButton dup def
- X /InsertValue dup def
- X dictend def
- X /Action /DownTransition def
- X /Canvas wincanvas def
- X end expressinterest
- X createevent dup begin
- X /Name dictbegin
- X /LeftMouseButton dup def
- X /MouseDragged dup def
- X dictend def
- X /Action null def
- X /Canvas wincanvas def
- X end expressinterest
- X systemdict /IP currentprocess put
- X
- X % input loop
- X { clear
- X awaitevent begin
- X % only ascii allowed on message line
- X onmessageline?
- X {keyeventdict Name known}
- X {eventdict Name known}
- X ifelse
- X { % Invoke the right handler
- X XLocation YLocation Action
- X eventdict Name get exec
- X } if
- X end
- X } loop
- X } fork def
- X
- X % Mouse still handler (derived from mouse drag event).
- X /stillmouse_pid {
- X createevent dup begin
- X /Name /MouseStill def
- X /Canvas wincanvas def
- X end expressinterest
- X
- X % input loop
- X { clear
- X awaitevent begin
- X 128 addtobuf % SPEC code
- X Xl Yl /xy_rc win send
- X exch addtobuf addtobuf
- X default_short outtimerrefresh
- X end
- X } loop
- X } fork def
- X } def
- X
- X /stopeventtraps {
- X currentdict /dispatcher_pid known
- X {dispatcher_pid killprocess} if
- X currentdict /stillmouse_pid known
- X {stillmouse_pid killprocess} if
- X } def
- X
- X
- X % distribution mechanism: character timing and prefixes
- SHAR_EOF
- true || echo 'restore of news.cps failed'
- echo 'End of Vile part 10'
- echo 'File news.cps is continued in part 11'
- echo 11 > _shar_seq_.tmp
- exit 0
- --
- paul fox, pgf@cayman.com, (617)494-1999
- Cayman Systems, 26 Landsdowne St., Cambridge, MA 02139
-