Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Path: utzoo!watmath!clyde!rutgers!ames!ucbcad!ucbvax!decvax!decwrl!cookie.dec.com!wecker From: wecker@cookie.dec.com.UUCP Newsgroups: comp.sys.amiga Subject: uEMACS (V1.0 DBW 870220) my own version Part 1/4 Message-ID: <8185@decwrl.DEC.COM> Date: Fri, 20-Feb-87 20:05:22 EST Article-I.D.: decwrl.8185 Posted: Fri Feb 20 20:05:22 1987 Date-Received: Sat, 21-Feb-87 16:25:28 EST Sender: daemon@decwrl.DEC.COM Organization: Digital Equipment Corporation Lines: 1270 # This is a shell archive. # Remove everything above and including the cut line. # Then run the rest of the file through sh. #----cut here-----cut here-----cut here-----cut here----# #!/bin/sh # shar: Shell Archiver # Run the following text with /bin/sh to create: # overview # makefile # uemacs.hlp # ebind.h # edef.h # efunc.h # epath.h # estruct.h # This archive created: Fri Feb 20 17:44:26 1987 echo shar: extracting overview sed 's/^XX//' << \SHAR_EOF > overview XX This set of 4 shar files contains my own version of micro EMACS that I have XX been using for over a year. I am making this software available because it XX has been so useful to me.... however: XX XX I WILL NOT SUPPORT IT!!! (caveat emptor) XX XX The file uemacs.hlp is the only documentation that exists. XX XX Editors are kind of a religous issue... so let's not get into word fights. XX I like EMACS. I do not like mice/keypads/function keys while editing. If XX you want a good portable EMACS, take a look at this kit. XX XX This is an UNSUPPORTED version (my own).. but is the ONLY editor I use on XX the AMIGA, VMS and ULTRIX. You only need to change one define in estruct.h XX (the machine you're on) and recompile (I use Manx on the Amiga). XX XX It includes: XX XX - Full regular expression pattern matching XX - My own micro-lisp for batch mode editing XX - sub-process windows (under ULTRIX) XX - Keypad support on VMS and ULTRIX (which I never use so I XX never got around to checking it out on the AMIGA) XX - Any size window on VMS and ULTRIX (number of rows) XX - Only 75k in size XX - Built in Modes: XX WRAP - auto wrap XX EXACT - exact (case-sensitive) searching XX LISP - language mode XX MODULA - language mode XX C - language mode XX SLOW - slow speed (1200 baud) terminal optimizations XX VIEW - read only mode XX - LOTS AND LOTS of bug fixes from the standard PD version XX - Too many other features to list.. take a look at UEMACS.HLP XX XX Again, I WILL NOT SUPPORT THIS EDITOR. It is for my own personal use, XX but you are welcome to use it however you see fit. XX XX dave decwrl!cookie.dec.com!wecker XX XX SHAR_EOF if test 1618 -ne "`wc -c overview`" then echo shar: error transmitting overview '(should have been 1618 characters)' fi echo shar: extracting makefile sed 's/^XX//' << \SHAR_EOF > makefile XXCFLAGS = -O XXLFLAGS = -O -ltermcap -lc XX XXOFILES = ansi.o basic.o bind.o buffer.o display.o file.o \ XX fileio.o line.o lisp.o lock.o main.o random.o region.o \ XX search.o spawn.o tcap.o termio.o window.o word.o XX XXHFILES = estruct.h edef.h efunc.h epath.h ebind.h XX XXuemacs : $(OFILES) XX $(CC) -o uemacs $(OFILES) $(LFLAGS) XX XX#$(OFILES): $(HFILES) XX XXinstall : XX install -c -m 775 uemacs /staff/bin/uemacs XX XX SHAR_EOF if test 398 -ne "`wc -c makefile`" then echo shar: error transmitting makefile '(should have been 398 characters)' fi echo shar: extracting uemacs.hlp sed 's/^XX//' << \SHAR_EOF > uemacs.hlp XX========================Micro EMACS Help File================================ XX XXBindings: ^ = Control XX M- = prefix XX K- = ansi keypad character XX G- = ansi keypad character (with GOLD prefix) XX XXCommands: XX meta prefix: "M-100 ^Xl" would go to line 100 XX numeric params come first: "^U 100 ^Xl" would go to line 100 XX extended commands: "^U 100 M-X goto-line" would go to line 100 XX init files: "(100 goto-line)" would go to line 100 XX (type Bindings as defined above (e.g. ^C for ) in files) XX XXModes: WRAP - perform word wrapping when the fill-column is reached XX SLOW - do searches interactively (for slow speed terminals) XX EXACT - do all searching with exact case matching XX CMODE - do automatic indentation of C code XX MMODE - do automatic indentation of MODULA code XX LISP - do automatic indentation of LISP code XX VIEW - set buffer to read-only XX XXSearching: In SLOW mode use ^F to go forward, ^R to reverse, ^G to abort XX or any other character to terminate search and draw screen XX All searching is done with (limited) regular expressions: XX ^ = match beginning of line (if beginning of search) XX $ = match end of line (if end of search) XX [or] = match one of "or" (see below) XX [^or]= match anything BUT "or" (see below) XX . = match any one character XX * = match zero or more of previous XX + = match 1 or more of previous XX \( \)= bracket sub expressions XX \ = quote next character (except parens (above)) XX XX "or" = string of characters or ranges: XX [abcde] = [a-e] = [ab-de] = [a-cd-e] XX XXReplacing: \0 = entire match XX \n = nth bracketed [\( \)] sub-expression (1 <= n <= 9) XX XX y = do the replacement (in query mode) XX n = dont' do this replacement, but keep looking XX . = stop replacing and go back to start XX ^G = stop replacing and stary where you are XX XX NOTE: searches can NOT cross lines, but replacements CAN. XX XXmicro-LISP: XX - only 1 buffer may be executed at a time (no recursive buffer executes). XX - The entire contents of a buffer are viewed as a LISP progn. XX - Values may be either INTEGERS or STRINGS (and are interchangable). XX - All functions return a value. Non-LISP functions return success or XX failure via a return value of 0 or 1. XX - The startup file is .uemacsrc and is executed as a micro-LISP progn. XX - The batch file option (-b filename) is also a LISP progn. XX - Program statments (lists) may be arbitrarily nested. XX - If the head of a list evaluates to an integer then this number is used XX as a repeat count/numeric argument. XX - Symbols are single lower case letters (a-z), and may contain any value. XX - Progn labels may be either integers or strings. XX - Comments run from a semi-colon (;) until the end of the line XX - LISTS may only be used as program statements (not data) and are enclosed XX in parenthesis (with whitespace between elements). XX - SYMBOLS are the lower case letters a through z. XX - SUBRS are all built in functions (there are NO user functions). XX - INTEGERS are strings of the digits 0-9 with an optional leading "-". XX - STRINGS are enclosed in double quotes (") and may contain: XX normal characters XX \r = return, \n = newline, \t = tab, \e = escape, \" = ", \\ = \ XX \#, \##, \### = ascii value where # = a digit between 0 and 7 XX - Note that strings ARE allowed to cross line boundaries XX - All arithmetic/logic functions (except not) take 2 arguments and the XX arguments are ALWAYS evaluated (even for "and" and "or"). XX XXExample program: XX ; First ask the user what to search for XX XX (setq a (ask "Search for what? ")) XX XX ; Keep searching until the user says to stop, or there are no more XX ; occurrances of the string in the buffer XX XX "Loop" XX (if (not (search-forward a)) (go "Done")) XX (if (eq (ask "Continue [y] ? ") "n") (go "Done") (go "Loop")) XX XX ; Now show the user the first five characters on the line XX XX "Done" XX (beginning-of-line) XX (set-mark) XX (5 forward-character) XX (copy-region) XX (setq b (yank-string)) XX (ask "Line starts with: <" b "> ") XX (return) XX XXKeypad: +--PF1--+--PF2--+--PF3--+--PF4--+ XX PF1 G- | GOLD | HELP | FIND | DEL L | XX PF2 K-Q G-Q | | DESKEY| REVFND| YANK | XX PF3 K-R G-R +---7---+---8---+---9---+-------+ XX PF4 K-S G-S | F-PARA| B-PARA|COPY- | DEL W | XX 0 K-p G-p | COMMND| FILPAR| REGION| YANK | XX 1 K-q G-q +---4---+---5---+---6---+---,---| XX 2 K-r G-r | F-SCRL| B-SCRL| CUT | DEL C | XX 3 K-s G-s | BOTTM | TOP | YANK | YANK | XX 4 K-t G-t +---1---+---2---+---3---+-ENTER-+ XX 5 K-u G-u | F-WORD| EOL | F-CHAR| | XX 6 K-v G-v | UPCASE| D-EOL | QUOTE | ENTER | XX 7 K-w G-w +-------0-------+---.---+ | XX 8 K-x G-x | BEGIN OF LINE | MARK | SUBS | XX 9 K-y G-y | OPEN LINE | XCHG | | XX - K-m G-m +---------------+-------+-------+ XX , K-l G-l XX . K-n G-n XX ENT K-M G-M XX XXCommand name Description (* = LISP function) XX----------------------- ----------------------------------------------- XX+ - * / % & | * Arith: add,sub,mult,div,mod,and,or XX= != > >= < <= * Logical comparisons (for numeric arguments) XXadd-mode Add or delete a mode for the buffer XXadjust-mode Add or delete a mode for the buffer XXand * Logical and operator XXask * Ask for input, paramaters concatenated for prompt XXbackward-character Move the cursor XXbegin-macro Start remembering keystrokes XXbeginning-of-file Move cursor to top of buffer (sets mark) XXbegining-of-line Cursor to beginning of line XXbind-to-key Define a function to a key XXbuffer-position Report on current buffer stats XXcase-region-lower Translate between dot and mark to lower case XXcase-region-upper Translate between dot and mrak to upper case XXcase-word-capitalize Capitalize one word XXcase-word-lower Downcase one word XXcase-word-upper Upcase one word XXchange-file-name Change the filename associated with a buffer XXclear-and-redraw Refresh the screen XXcopy-region Copy between dot and mark to the kill buffer XXcurbuf * Return current buffer name as a string XXcurchr,curcol,curlin * Return current char,column,line number as an int XXdelete-blank-lines Delete surrounding blank lines XXdelete-buffer Delete an entire buffer XXdelete-mode Change a mode for a buffer XXdelete-next-character Delete forward XXdelete-next-word Delete forward one word XXdelete-other-windows Go back to 1 window display XXdelete-previous-character Remove character in front of cursor XXdelete-previous-word Delete word before cursor XXdelete-window Delete the current window XXdescribe-bindings Give list of all key bindings XXdescribe-key Describe a specific key XXend-macro End defining a macro started with ^X( XXend-of-file Move cursor to end of buffer (sets mark) XXend-of-line Move cursor to end of line XXeq * Compare two strings/integers for equality XXexchange-point-and-mark Jump between dot and mark XXexecute-buffer Execute a buffer as a list of commands XXexecute-command-line Execute a single command line (not implemented) XXexecute-file Execute a file as a list of commands XXexecute-macro Execute a macro defined byt ^X( ^X) XX XXexecute-named-command Execute any of the commands in the 1st column XXexit-emacs Get out of emacs XXfill-paragraph Fill the surrounding paragraph XXfind-file Read a file into the current buffer XXforward-character Move cursor forward XXgo * Goto a label in a LISP progn statment XXgoto-line Jump to a specific line number XXgrow-window Make window bigger XXhandle-tab Insert a tab (different in diff modes) XXhelp Type this file XXif * LISP if (true if int != 0 or string != "") XXinsert-file Insert a file at dot XXkill-region Kill region between dot and mark XXkill-to-end-of-line Kill text (put in kill buffer) XXlist-buffers Show all buffers XXmove-window-down Scroll the current window up XXmove-window-up Scroll the current window down XXname-buffer Change the name for a buffer XXnewline Insert a (different in diff modes) XXnewline-and-indent End line and indent next line XXnext-line Move cursor down one line XXnext-page Scroll screen up XXnext-paragraph Move to next paragraph XXnext-window Jump to the next window (move cursor) XXnext-word Move to next word XXnot * Logical not operator XXopen-line Open up a blank line at cursor XXor * Logical or operator XXprevious-line Cursor up XXprevious-page Scroll screen down XXprevious-paragraph Move cursor back XXprevious-window Go to the previous window on the screen XXprevious-word Move cursor back XXprinc * Insert all arguments into the current buffer XXprogn * LISP progn XXquery-replace-string Replace text interactively (sets mark) XXquick-exit Save files and leave editor XXquote-character Quote the next character XXread-file Read a file in to the buffer (READONLY) XXredraw-display Reposition display (center on current line) XXreplace-string Replace text without asking (sets mark) XXreturn * Leave a LISP progn (optional return value) XXsave-file Save the current file (checkpoint) XXscroll-next-up Scroll other window up XXscroll-next-down Scroll other window down XXsearch-forward Search forward for text (sets mark) XXsearch-reverse Search backward for text (sets mark) XXselect-buffer Pick a buffer to display XXset-fill-column Change the fill column XXset-mark Set the mark XXsetq * Set a LISP variable (a-z) to concat. of parameters XXshell Sprout a subprocess XXshell-command Execute a one line command in a sub shell XXshell-quote Send the next character to a sub-shell XXshrink-window Make the window smaller XXsplit-current-window Divide the current window in half XXsuspend-emacs Pause emacs (on unix) XXtranspose-characters Flip characters before/under cursor XXunbind-key Delete a key binding XXvisit-file Bring a file in (in a new buffer) XXvisit-tag Bring a file in (via the current tagged word) XXwrite-file Write file to a new name XXyank Yank back from the kill buffer XXyank-string * Yank the kill buffer into a LISP string XX XXadd-mode ^X^M adjust-mode ^X^M XXbackward-character ^B,K-D begin-macro ^X( XXbegining-of-file M-<,G-u begining-of-line ^A,K-p XXbind-to-key buffer-position ^X= XXcase-region-lower ^X^L case-region-upper ^X^U XXcase-word-capitalize M-C case-word-lower M-L XXcase-word-upper M-U,G-q change-file-name ^XN XXclear-and-redraw ^L copy-region M-W,K-y,G-y XXdelete-blank-lines ^X^O delete-buffer ^XK XXdelete-mode ^X^M delete-next-character ^D,K-l XXdelete-next-word M-D,K-m delete-other-windows ^X1 XXdelete-previous-character^H,^? delete-previous-word M-^H,M-^? XXdelete-window ^XD describe-bindings M-? XXdescribe-key ^X?,G-Q end-macro ^X) XXend-of-file M->,G-t end-of-line ^E,K-r XXexchange-point-and-mark ^X^X,G-n execute-buffer XXexecute-command-line execute-file XXexecute-macro ^Z,^XE execute-named-command M-X,G-w XXexit-emacs ^X^C fill-paragraph M-G,G-x XXfind-file ^X^R forward-character K-C,K-s XXgoto-line ^XL grow-window ^X>,^X^,^XZ XXhandle-tab ^I help K-Q XXinsert-file ^X^I kill-region ^W,K-v,K-3 XXkill-to-end-of-line ^K,K-S,G-r list-buffers ^X^B XXmove-window-down ^X^N move-window-up XXname-buffer M-^N newline ^M,K-M XXnewline-and-indent ^J next-line ^N,K-B XXnext-page ^V,K-t,K-6 next-paragraph M-N,K-w XXnext-window ^XO next-word M-F,K-q XXopen-line ^O,K-2,G-p previous-line ^P,K-A XXprevious-page M-V,K-u,K-5 previous-paragraph M-P,K-x XXprevious-window ^XP previous-word M-B XXquery-replace-string M-^R,M-Q,G-M quick-exit ^X^F,M-Z XXquote-character ^],G-s read-file ^XR XXredraw-display M-^L,M-! replace-string M-R XXsave-file ^XS scroll-next-up M-^Z XXscroll-next-down M-^V search-forward ^F,K-R,K-1 XXsearch-reverse ^R,G-R select-buffer ^XB XXset-fill-column ^XF set-mark ^XM,^XX,M- ,M-.,K-n,K-4 XXshell-quote ^C shell-command ^X! XXshrink-window ^X^Z,^X< split-current-window ^X2 XXsuspend-emacs ^X^P transpose-characters ^T XXunbind-key M-^C visit-file ^X^V XXvisit-tag ^X^T write-file ^X^W XXyank ^Y,G-S,G-l,G-m,G-v XX XX XX XX XXG-M query-replace-string G-Q describe-key XXG-R search-reverse G-S yank XXG-m yank G-p open-line XXG-q case-word-upper G-r kill-to-end-of-line XXG-s quote-character G-t end-of-file XXG-u begining-of-file G-v yank XXG-x fill-paragraph G-y copy-region XX XXK-1 search-forward K-2 open-line XXK-3 kill-region K-4 set-mark XXK-5 previous-page K-6 next-page XXK-A previous-line K-B next-line XXK-C forward-character K-D backward-character XXK-M newline K-Q help XXK-S kill-to-end-of-line K-l delete-next-character XXK-m delete-next-word K-n set-mark XXK-p begining-of-line K-q next-word XXK-r end-of-line K-s forward-character XXK-t next-page K-u previous-page XXK-v kill-region K-w next-paragraph XXK-x previous-paragraph K-y copy-region XXM- set-mark M-! redraw-display XXM-. set-mark M-< begining-of-file XXM-> end-of-file M-? describe-bindings XXM-B previous-word M-C case-word-capitalize XXM-D delete-next-word M-F next-word XXM-N next-paragraph M-P previous-paragraph XXM-Q query-replace-string M-R replace-string XXM-U case-word-upper M-V previous-page XXM-W copy-region M-X execute-named-command XXM-Z quick-exit M-^C unbind-key XXM-^H delete-previous-word M-^L redraw-display XXM-^N name-buffer M-^R query-replace-string XXM-^V scroll-next-down M-^Z scroll-next-up XXM-^? delete-previous-word ^A begining-of-line XX^B backward-character ^C shell-quote XX^D delete-next-character ^E end-of-line XX^F search-forward ^H delete-previous-character XX^I handle-tab ^J newline-and-indent XX^K kill-to-end-of-line ^L clear-and-redraw XX^M newline ^N next-line XX^O open-line ^P previous-line XX^R search-reverse ^T transpose-characters XX^V next-page ^W kill-region XX^X! shell-command ^X( begin-macro XX^X) end-macro ^X1 delete-other-windows XX^X2 split-current-window ^X< shrink-window XX^X= buffer-position ^X> grow-window XX^X? describe-key ^XB select-buffer XX^XD delete-window ^XE execute-macro XX^XF set-fill-column ^XK delete-buffer XX^XL goto-line ^XM set-mark XX^XN change-file-name ^XO next-window XX^XP previous-window ^XR read-file XX^XS save-file ^XX set-mark XX^XZ grow-window ^X^ grow-window XX^X^B list-buffers ^X^C exit-emacs XX^X^F quick-exit ^X^I insert-file XX^X^L case-region-lower ^X^M add-mode XX^X^M adjust-mode ^X^M delete-mode XX^X^N move-window-down ^X^O delete-blank-lines XX^X^P suspend-emacs ^X^R find-file XX^X^T visit-tag ^X^U case-region-upper XX^X^V visit-file ^X^W write-file XX^X^X exchange-point-and-mark ^X^Z shrink-window XX^Y yank ^] quote-character XX^? delete-previous-character SHAR_EOF if test 18356 -ne "`wc -c uemacs.hlp`" then echo shar: error transmitting uemacs.hlp '(should have been 18356 characters)' fi echo shar: extracting ebind.h sed 's/^XX//' << \SHAR_EOF > ebind.h XX/* EBIND: Initial default key to function bindings for XX * MicroEMACS XX */ XX XX/* XX * Command table. XX * This table is *roughly* in ASCII order, left to right across the XX * characters of the command. This expains the funny location of the XX * control-X commands. XX XX */ XXKEYTAB keytab[NBINDS] = { XX CTRL|']', quote, XX CTRL|'A', gotobol, XX CTRL|'B', backchar, XX#if ULTRIX XX CTRL|'C', shellquote, XX#endif XX CTRL|'D', forwdel, XX CTRL|'E', gotoeol, XX CTRL|'F', forwsearch, XX CTRL|'G', ctrlg, XX CTRL|'H', backdel, XX CTRL|'I', tab, XX CTRL|'J', indent, XX CTRL|'K', killtext, XX CTRL|'L', refresh, XX CTRL|'M', newline, XX CTRL|'N', forwline, XX CTRL|'O', openline, XX CTRL|'P', backline, XX CTRL|'R', backsearch, XX CTRL|'T', twiddle, XX CTRL|'V', forwpage, XX CTRL|'W', killregion, XX CTRL|'Y', yank, XX CTRL|'Z', ctlxe, XX CTLX|CTRL|'B', listbuffers, XX CTLX|CTRL|'C', quit, XX CTLX|CTRL|'F', quickexit, XX CTLX|CTRL|'I', insfile, XX CTLX|CTRL|'L', lowerregion, XX CTLX|CTRL|'M', adjustmode, XX CTLX|CTRL|'N', mvdnwind, XX CTLX|CTRL|'O', deblank, XX#if ULTRIX XX CTLX|CTRL|'P', bktoshell, XX#endif XX CTLX|CTRL|'R', filefind, XX CTLX|CTRL|'T', visittag, XX CTLX|CTRL|'U', upperregion, XX CTLX|CTRL|'V', visitfile, XX CTLX|CTRL|'W', filewrite, XX CTLX|CTRL|'X', swapmark, XX CTLX|CTRL|'Z', shrinkwind, XX CTLX|'?', deskey, XX CTLX|'!', spawn, XX CTLX|'<', shrinkwind, XX CTLX|'=', showcpos, XX CTLX|'>', enlargewind, XX CTLX|'(', ctlxlp, XX CTLX|')', ctlxrp, XX CTLX|'^', enlargewind, XX CTLX|'1', onlywind, XX CTLX|'2', splitwind, XX CTLX|'B', usebuffer, XX CTLX|'D', delwind, XX CTLX|'E', ctlxe, XX CTLX|'F', setfillcol, XX CTLX|'K', killbuffer, XX CTLX|'L', gotoline, XX CTLX|'M', setmark, XX CTLX|'N', filename, XX CTLX|'O', nextwind, XX CTLX|'P', prevwind, XX CTLX|'R', fileread, XX CTLX|'S', filesave, XX CTLX|'X', setmark, XX CTLX|'Z', enlargewind, XX META|CTRL|'C', unbindkey, XX META|CTRL|'H', delbword, XX META|CTRL|'L', reposition, XX META|CTRL|'N', namebuffer, XX META|CTRL|'R', qreplace, XX META|CTRL|'V', scrnextdw, XX META|CTRL|'Z', scrnextup, XX META|' ', setmark, XX META|'?', desbind, XX META|'!', reposition, XX META|'.', setmark, XX META|'>', gotoeob, XX META|'<', gotobob, XX META|'B', backword, XX META|'C', capword, XX META|'D', delfword, XX META|'F', forwword, XX META|'G', fillpara, XX META|'L', lowerword, XX META|'N', gotoeop, XX META|'P', gotobop, XX META|'Q', qreplace, XX META|'R', sreplace, XX META|'U', upperword, XX META|'V', backpage, XX META|'W', copyregion, XX META|'X', namedcmd, XX META|'Z', quickexit, XX META|0x7F, delbword, XX SPEC|'A', backline, XX SPEC|'B', forwline, XX SPEC|'C', forwchar, XX SPEC|'D', backchar, XX SPEC|'M', newline, /* enter*/ XX SPEC|'Q', help, /* PF2 */ XX SPEC|'R', forwsearch, /* PF3 */ XX SPEC|'S', killtext, /* PF4 */ XX SPEC|'l', forwdel, /* , */ XX SPEC|'m', delfword, /* - */ XX SPEC|'n', setmark, /* . */ XX SPEC|'p', gotobol, /* 0 */ XX SPEC|'q', forwword, /* 1 */ XX SPEC|'r', gotoeol, /* 2 */ XX SPEC|'s', forwchar, /* 3 */ XX SPEC|'t', forwpage, /* 4 */ XX SPEC|'u', backpage, /* 5 */ XX SPEC|'v', killregion, /* 6 */ XX SPEC|'w', gotoeop, /* 7 */ XX SPEC|'x', gotobop, /* 8 */ XX SPEC|'y', copyregion, /* 9 */ XX SPEC|'1', forwsearch, XX SPEC|'2', openline, XX SPEC|'3', killregion, XX SPEC|'4', setmark, XX SPEC|'5', backpage, XX SPEC|'6', forwpage, XX GOLD|'M', qreplace, /* enter*/ XX GOLD|'Q', deskey, /* PF2 */ XX GOLD|'R', backsearch, /* PF3 */ XX GOLD|'S', yank, /* PF4 */ XX GOLD|'l', yank, /* , */ XX GOLD|'m', yank, /* - */ XX GOLD|'n', swapmark, /* . */ XX GOLD|'p', openline, /* 0 */ XX GOLD|'q', upperword, /* 1 */ XX GOLD|'r', killtext, /* 2 */ XX GOLD|'s', quote, /* 3 */ XX GOLD|'t', gotoeob, /* 4 */ XX GOLD|'u', gotobob, /* 5 */ XX GOLD|'v', yank, /* 6 */ XX GOLD|'w', namedcmd, /* 7 */ XX GOLD|'x', fillpara, /* 8 */ XX GOLD|'y', copyregion, /* 9 */ XX 0x7F, backdel, XX 0, NULL XX }; SHAR_EOF if test 4038 -ne "`wc -c ebind.h`" then echo shar: error transmitting ebind.h '(should have been 4038 characters)' fi echo shar: extracting edef.h sed 's/^XX//' << \SHAR_EOF > edef.h XX/* EDEF: Global variable definitions for MICROEmacs */ XX XX#ifdef maindef XX XX/* for MAIN.C */ XX XX/* initialized global definitions */ XX XXint batchmode = FALSE; /* batch mode switch */ XXint fillcol = 72; /* Current fill column */ XXshort kbdm[NKBDM] = {CTLX|')'}; /* Macro */ XXchar pat[NPAT]; /* Search pattern */ XXchar rpat[NPAT]; /* replacement pattern */ XXchar sarg[NSTRING] = ""; /* string argument for line exec*/ XXint eolexist = TRUE; /* does clear to EOL exist */ XXchar *modename[] = /* name of modes */ XX { "WRAP", "CMODE", "SLOW", "EXACT", "VIEW", "MMODE", "LISP" }; XXchar modecode[] = "WCSEVML"; /* letters to represent modes */ XXint sgarbf = TRUE; /* TRUE if screen is garbage */ XXint mpresf = FALSE; /* TRUE if message in last line */ XXint clexec = FALSE; /* command line execution flag */ XXint slowterm= FALSE; /* are we running a slow speed term*/ XXBUFFER *procbuf= NULL; /* process buffer pointer */ XX XX/* uninitialized global definitions */ XX XXint currow; /* Cursor row */ XXint curcol; /* Cursor column */ XXint thisflag; /* Flags, this command */ XXint lastflag; /* Flags, last command */ XXint curgoal; /* Goal for C-P, C-N */ XXWINDOW *curwp; /* Current window */ XXBUFFER *curbp; /* Current buffer */ XXWINDOW *wheadp; /* Head of list of windows */ XXBUFFER *bheadp; /* Head of list of buffers */ XXBUFFER *blistp; /* Buffer for C-X C-B */ XXshort *kbdmip; /* Input pointer for above */ XXshort *kbdmop; /* Output pointer for above */ XX XXBUFFER *bfind(); /* Lookup a buffer by name */ XXWINDOW *wpopup(); /* Pop up window creation */ XXLINE *lalloc(); /* Allocate a line */ XXint pid; /* process id of sub process */ XXint outchannel; /* output channel to sub process */ XXint inchannel; /* input channel from sub process */ XX#else XX XX/* for all the other .C files */ XX XX/* initialized global external declarations */ XX XXextern int batchmode; /* batch mode switch */ XXextern int fillcol; /* Fill column */ XXextern short kbdm[]; /* Holds kayboard macro data */ XXextern char pat[]; /* Search pattern */ XXextern char rpat[]; /* Replacement pattern */ XXextern char sarg[]; /* string argument for line exec*/ XXextern int eolexist; /* does clear to EOL exist? */ XXextern char *modename[]; /* text names of modes */ XXextern char modecode[]; /* letters to represent modes */ XXextern KEYTAB keytab[]; /* key bind to functions table */ XXextern NBIND names[]; /* name to function table */ XXextern int sgarbf; /* State of screen unknown */ XXextern int mpresf; /* Stuff in message line */ XXextern int clexec; /* command line execution flag */ XXextern int slowterm; /* are we running a slow speed term*/ XXextern BUFFER *procbuf; /* process buffer pointer */ XX XX/* initialized global external declarations */ XX XXextern int currow; /* Cursor row */ XXextern int curcol; /* Cursor column */ XXextern int thisflag; /* Flags, this command */ XXextern int lastflag; /* Flags, last command */ XXextern int curgoal; /* Goal for C-P, C-N */ XXextern WINDOW *curwp; /* Current window */ XXextern BUFFER *curbp; /* Current buffer */ XXextern WINDOW *wheadp; /* Head of list of windows */ XXextern BUFFER *bheadp; /* Head of list of buffers */ XXextern BUFFER *blistp; /* Buffer for C-X C-B */ XXextern short *kbdmip; /* Input pointer for above */ XXextern short *kbdmop; /* Output pointer for above */ XX XXextern BUFFER *bfind(); /* Lookup a buffer by name */ XXextern WINDOW *wpopup(); /* Pop up window creation */ XXextern LINE *lalloc(); /* Allocate a line */ XXextern int pid; /* process id of sub process */ XXextern int outchannel; /* output channel to sub process */ XXextern int inchannel; /* input channel from sub process */ XX XX#endif XX XX/* terminal table defined only in TERM.C */ XX XX#ifndef termdef XXextern TERM term; /* Terminal information. */ XX#endif XX XX SHAR_EOF if test 4341 -ne "`wc -c edef.h`" then echo shar: error transmitting edef.h '(should have been 4341 characters)' fi echo shar: extracting efunc.h sed 's/^XX//' << \SHAR_EOF > efunc.h XX/* EFUNC.H: MicroEMACS function declarations and names */ XX XX/* External function declarations */ XX XXextern int ctrlg(); /* Abort out of things */ XXextern int quit(); /* Quit */ XXextern int ctlxlp(); /* Begin macro */ XXextern int ctlxrp(); /* End macro */ XXextern int ctlxe(); /* Execute macro */ XXextern int fileread(); /* Get a file, read only */ XXextern int filefind(); /* Get a file, read write */ XXextern int filewrite(); /* Write a file */ XXextern int filesave(); /* Save current file */ XXextern int filename(); /* Adjust file name */ XXextern int getccol(); /* Get current column */ XXextern int gotobol(); /* Move to start of line */ XXextern int forwchar(); /* Move forward by characters */ XXextern int gotoeol(); /* Move to end of line */ XXextern int backchar(); /* Move backward by characters */ XXextern int forwline(); /* Move forward by lines */ XXextern int backline(); /* Move backward by lines */ XXextern int forwpage(); /* Move forward by pages */ XXextern int backpage(); /* Move backward by pages */ XXextern int gotobob(); /* Move to start of buffer */ XXextern int gotoeob(); /* Move to end of buffer */ XXextern int setfillcol(); /* Set fill column. */ XXextern int setmark(); /* Set mark */ XXextern int swapmark(); /* Swap "." and mark */ XXextern int forwsearch(); /* Search forward */ XXextern int backsearch(); /* Search backwards */ XXextern int sreplace(); /* search and replace */ XXextern int qreplace(); /* search and replace w/query */ XXextern int showcpos(); /* Show the cursor position */ XXextern int nextwind(); /* Move to the next window */ XXextern int prevwind(); /* Move to the previous window */ XXextern int onlywind(); /* Make current window only one */ XXextern int delwind(); /* Delete the current window */ XXextern int splitwind(); /* Split current window */ XXextern int mvdnwind(); /* Move window down */ XXextern int mvupwind(); /* Move window up */ XXextern int enlargewind(); /* Enlarge display window. */ XXextern int shrinkwind(); /* Shrink window. */ XXextern int listbuffers(); /* Display list of buffers */ XXextern int usebuffer(); /* Switch a window to a buffer */ XXextern int killbuffer(); /* Make a buffer go away. */ XXextern int reposition(); /* Reposition window */ XXextern int refresh(); /* Refresh the screen */ XXextern int twiddle(); /* Twiddle characters */ XXextern int tab(); /* Insert tab */ XXextern int newline(); /* Insert CR-LF */ XXextern int indent(); /* Insert CR-LF, then indent */ XXextern int openline(); /* Open up a blank line */ XXextern int deblank(); /* Delete blank lines */ XXextern int quote(); /* Insert literal */ XXextern int backword(); /* Backup by words */ XXextern int forwword(); /* Advance by words */ XXextern int forwdel(); /* Forward delete */ XXextern int backdel(); /* Backward delete */ XXextern int killtext(); /* Kill forward */ XXextern int yank(); /* Yank back from killbuffer. */ XXextern int upperword(); /* Upper case word. */ XXextern int lowerword(); /* Lower case word. */ XXextern int upperregion(); /* Upper case region. */ XXextern int lowerregion(); /* Lower case region. */ XXextern int capword(); /* Initial capitalize word. */ XXextern int delfword(); /* Delete forward word. */ XXextern int delbword(); /* Delete backward word. */ XXextern int killregion(); /* Kill region. */ XXextern int copyregion(); /* Copy region to kill buffer. */ XXextern int spawncli(); /* Run CLI in a subjob. */ XXextern int spawn(); /* Run a command in a subjob. */ XXextern int quickexit(); /* low keystroke style exit. */ XXextern int adjustmode(); /* set/unset an editor mode */ XXextern int gotoline(); /* go to a numbered line */ XXextern int namebuffer(); /* rename the current buffer */ XXextern int gotobop(); /* go to begining/paragraph */ XXextern int gotoeop(); /* go to end/paragraph */ XXextern int fillpara(); /* fill current paragraph */ XXextern int help(); /* get the help file here */ XXextern int deskey(); /* describe a key's binding */ XXextern int visitfile(); /* find a file in other window */ XXextern int visittag(); /* find a file (using tag) in other window */ XXextern int insfile(); /* insert a file */ XXextern int scrnextup(); /* scroll next window back */ XXextern int scrnextdw(); /* scroll next window down */ XXextern int bindtokey(); /* bind a function to a key */ XXextern int unbindkey(); /* unbind a key's function */ XXextern int namedcmd(); /* execute named command */ XXextern int desbind(); /* describe bindings */ XXextern int execcmd(); /* execute a command line */ XXextern int execbuf(); /* exec commands from a buffer */ XXextern int execfile(); /* exec commands from a file */ XXextern int l_eval(); /* evaluate a LISP s-expr */ XXextern int l_if(); /* LISP if */ XXextern int l_progn(); /* LISP progn */ XXextern int l_return(); /* LISP return */ XXextern int l_setq(); /* LISP setq */ XXextern int l_go(); /* LISP go */ XXextern int l_yank_str(); /* put the KILL buffer into a LISP string */ XXextern int l_ask(); /* ask the user for input */ XXextern int l_add(); /* arithmetic function */ XXextern int l_sub(); /* arithmetic function */ XXextern int l_mul(); /* arithmetic function */ XXextern int l_div(); /* arithmetic function */ XXextern int l_mod(); /* arithmetic function */ XXextern int l_bitand(); /* arithmetic function */ XXextern int l_bitor(); /* arithmetic function */ XXextern int l_eql(); /* arithmetic function */ XXextern int l_neq(); /* arithmetic function */ XXextern int l_gt(); /* arithmetic function */ XXextern int l_ge(); /* arithmetic function */ XXextern int l_lt(); /* arithmetic function */ XXextern int l_le(); /* arithmetic function */ XXextern int l_not(); /* arithmetic function */ XXextern int l_and(); /* arithmetic function */ XXextern int l_or(); /* arithmetic function */ XXextern int l_eq(); /* arithmetic function */ XXextern int l_curchr(); /* current character (returned as an integer) */ XXextern int l_curlin(); /* current line number in the buffer */ XXextern int l_curcol(); /* current column position */ XXextern int l_curbuf(); /* current buffer name */ XXextern int l_princ(); /* insert text into the buffer */ XX XX#if ULTRIX XXextern int shellquote(); /* send the next character to the sub proc */ XXextern int bktoshell(); /* suspend emacs to parent shell*/ XXextern int rtfrmshell(); /* return from a suspended state*/ XX#endif XX XX/* Name to function binding table XX XX This table gives the names of all the bindable functions XX end their C function address. These are used for the bind-to-key XX function. XX*/ XX XXNBIND names[] = { XX "+", l_add, XX "-", l_sub, XX "*", l_mul, XX "/", l_div, XX "%", l_mod, XX "&", l_bitand, XX "|", l_bitor, XX "=", l_eql, XX "!=", l_neq, XX ">", l_gt, XX ">=", l_ge, XX "<", l_lt, XX "<=", l_le, XX "add-mode", adjustmode, XX "adjust-mode", adjustmode, XX "and", l_and, XX "ask", l_ask, XX "backward-character", backchar, XX "begin-macro", ctlxlp, XX "beginning-of-file", gotobob, XX "beginning-of-line", gotobol, XX "bind-to-key", bindtokey, XX "buffer-position", showcpos, XX "case-region-lower", lowerregion, XX "case-region-upper", upperregion, XX "case-word-capitalize", capword, XX "case-word-lower", lowerword, XX "case-word-upper", upperword, XX "change-file-name", filename, XX "clear-and-redraw", refresh, XX "copy-region", copyregion, XX "curbuf", l_curbuf, XX "curchr", l_curchr, XX "curcol", l_curcol, XX "curlin", l_curlin, XX "delete-blank-lines", deblank, XX "delete-buffer", killbuffer, XX "delete-mode", adjustmode, XX "delete-next-character",forwdel, XX "delete-next-word", delfword, XX "delete-other-windows", onlywind, XX "delete-previous-character",backdel, XX "delete-previous-word", delbword, XX "delete-window", delwind, XX "describe-bindings", desbind, XX "describe-key", deskey, XX "end-macro", ctlxrp, XX "end-of-file", gotoeob, XX "end-of-line", gotoeol, XX "eq", l_eq, XX "eval", l_eval, XX "exchange-point-and-mark",swapmark, XX "execute-buffer", execbuf, XX "execute-command-line", execcmd, XX "execute-file", execfile, XX "execute-macro", ctlxe, XX "execute-named-command",namedcmd, XX "exit-emacs", quit, XX "fill-paragraph", fillpara, XX "find-file", filefind, XX "forward-character", forwchar, XX "go", l_go, XX "goto-line", gotoline, XX "grow-window", enlargewind, XX "handle-tab", tab, XX "help", help, XX "if", l_if, XX "insert-file", insfile, XX "kill-region", killregion, XX "kill-to-end-of-line", killtext, XX "list-buffers", listbuffers, XX "move-window-down", mvdnwind, XX "move-window-up", mvupwind, XX "name-buffer", namebuffer, XX "newline", newline, XX "newline-and-indent", indent, XX "next-line", forwline, XX "next-page", forwpage, XX "next-paragraph", gotoeop, XX "next-window", nextwind, XX "next-word", forwword, XX "not", l_not, XX "open-line", openline, XX "or", l_or, XX "previous-line", backline, XX "previous-page", backpage, XX "previous-paragraph", gotobop, XX "previous-window", prevwind, XX "previous-word", backword, XX "princ", l_princ, XX "progn", l_progn, XX "query-replace-string", qreplace, XX "quick-exit", quickexit, XX "quote-character", quote, XX "read-file", fileread, XX "redraw-display", reposition, XX "replace-string", sreplace, XX "return", l_return, XX "save-file", filesave, XX "scroll-next-up", scrnextup, XX "scroll-next-down", scrnextdw, XX "search-forward", forwsearch, XX "search-reverse", backsearch, XX "select-buffer", usebuffer, XX "set-fill-column", setfillcol, XX "set-mark", setmark, XX "setq", l_setq, XX "shell", spawncli, XX#if ULTRIX XX "shell-quote", shellquote, XX#endif XX "shell-command", spawn, XX "shrink-window", shrinkwind, XX "split-current-window", splitwind, XX#if ULTRIX XX "suspend-emacs", bktoshell, XX#endif XX "transpose-characters", twiddle, XX "unbind-key", unbindkey, XX "visit-file", visitfile, XX "visit-tag", visittag, XX "write-file", filewrite, XX "yank", yank, XX "yank-string", l_yank_str, XX XX "", NULL XX }; SHAR_EOF if test 9741 -ne "`wc -c efunc.h`" then echo shar: error transmitting efunc.h '(should have been 9741 characters)' fi echo shar: extracting epath.h sed 's/^XX//' << \SHAR_EOF > epath.h XX/* PATH: This file contains certain info needed to locate the XX MicroEMACS files on a system dependant basis. */ XX XX#if AMIGA XX#ifdef INBIND XXchar *pathname[5] = { XX ".uemacsrc", XX "uemacs.hlp", XX "", XX ":c/", XX "c:" XX }; XX#else XXextern *pathname[5]; XX#endif XX#endif XX XX#if ULTRIX XX#ifdef INBIND XXchar *pathname[7] = { XX ".uemacsrc", XX "uemacs.hlp", XX "", XX "~/", XX "~/bin/", XX "/staff/bin", XX "/usr/local/bin" XX }; XX#else XXextern char *pathname[7]; XX#endif XX#endif XX XX#if VMS XX#ifdef INBIND XXchar *pathname[6] = { XX "uemacs.rc", XX "uemacs.hlp", XX "", XX "sys$login:", XX "sys$sysexe:", XX "sys$library:" XX }; XX#else XXextern char *pathname[6]; XX#endif XX#endif XX XX#define NPNAMES (sizeof(pathname)/sizeof(char *)) SHAR_EOF if test 723 -ne "`wc -c epath.h`" then echo shar: error transmitting epath.h '(should have been 723 characters)' fi echo shar: extracting estruct.h sed 's/^XX//' << \SHAR_EOF > estruct.h XX/* ESTRUCT: Structure and preprocesser defined for MicroEMACS */ XX XX/* Machine/OS definitions */ XX XX#define AMIGA 0 /* AmigaDOS */ XX#define ULTRIX 1 /* ULTRIX (BSD 4.3) */ XX#define VMS 0 /* VAX/VMS */ XX XX/* Terminal Output and compiler definitions */ XX XX#if AMIGA XX#define ANSI 1 /* ANSI escape sequence processing */ XX#define VMSVT 0 /* various VMS terminal entries */ XX#define TERMCAP 0 /* Use TERMCAP */ XX#define AZTEC 1 /* Aztec C compiler */ XX#define LATTICE 0 /* Lattice C compiler */ XX#endif XX XX#if ULTRIX XX#define ANSI 0 /* ANSI escape sequence processing */ XX#define VMSVT 0 /* various VMS terminal entries */ XX#define TERMCAP 1 /* Use TERMCAP */ XX#define AZTEC 0 /* Aztec C compiler */ XX#define LATTICE 0 /* Lattice C compiler */ XX#endif XX XX#if VMS XX#define ANSI 0 /* ANSI escape sequence processing */ XX#define VMSVT 1 /* various VMS terminal entries */ XX#define TERMCAP 0 /* Use TERMCAP */ XX#define AZTEC 0 /* Aztec C compiler */ XX#define LATTICE 0 /* Lattice C compiler */ XX#endif XX XX/* Configuration options */ XX XX#define CVMVAS 1 /* arguments to page forward/back in pages */ XX#define NFWORD 0 /* forward word jumps to begining of word */ XX#define CLRMSG 0 /* space clears the message line with no insert */ XX#define TYPEAH 1 /* type ahead causes update to be skipped */ XX#define FILOCK 0 /* file locking under unix BSD 4.2 */ XX XX/* internal constants */ XX XX#define NBINDS 180 /* max # of bound keys */ XX#define NFILEN 80 /* # of bytes, file name */ XX#define NBUFN 16 /* # of bytes, buffer name */ XX#define NLINE 256 /* # of bytes, line */ XX#define NSTRING 256 /* # of bytes, string buffers */ XX#define NKBDM 256 /* # of strokes, keyboard macro */ XX#define NPAT 256 /* # of bytes, pattern */ XX#define HUGE 1000 /* Huge number */ XX#define NLOCKS 100 /* max # of file locks active */ XX XX#define AGRAVE 0x60 /* M- prefix, Grave (LK201) */ XX#define METACH 0x1B /* M- prefix, Control-[, ESC */ XX#define CTMECH 0x1C /* C-M- prefix, Control-\ */ XX#define EXITCH 0x1D /* Exit level, Control-] */ XX#define CTRLCH 0x1E /* C- prefix, Control-^ */ XX#define HELPCH 0x1F /* Help key, Control-_ */ XX#define CSICH 0x9B /* CSI sequence on the AMIGA */ XX XX#define CTRL 0x0100 /* Control flag, or'ed in */ XX#define META 0x0200 /* Meta flag, or'ed in */ XX#define CTLX 0x0400 /* ^X flag, or'ed in */ XX#define SPEC 0x0800 /* special key (function keys) */ XX#define GOLD 0x1000 /* gold prefix key (PF1) */ XX XX#define FALSE 0 /* False, no, bad, etc. */ XX#define TRUE 1 /* True, yes, good, etc. */ XX#define ABORT 2 /* Death, ^G, abort, etc. */ XX XX#define FIOSUC 0 /* File I/O, success. */ XX#define FIOFNF 1 /* File I/O, file not found. */ XX#define FIOEOF 2 /* File I/O, end of file. */ XX#define FIOERR 3 /* File I/O, error. */ XX#define FIOLNG 4 /*line longer than allowed len */ XX XX#define CFCPCN 0x0001 /* Last command was C-P, C-N */ XX#define CFKILL 0x0002 /* Last command was a kill */ XX XX#define BELL 0x07 /* a bell character */ XX#define TAB 0x09 /* a tab character */ XX XX/* XX * There is a window structure allocated for every active display window. The XX * windows are kept in a big list, in top to bottom screen order, with the XX * listhead at "wheadp". Each window contains its own values of dot and mark. XX * The flag field contains some bits that are set by commands to guide XX * redisplay; although this is a bit of a compromise in terms of decoupling, XX * the full blown redisplay is just too expensive to run for every input XX * character. XX */ XXtypedef struct WINDOW { XX struct WINDOW *w_wndp; /* Next window */ XX struct BUFFER *w_bufp; /* Buffer displayed in window */ XX struct LINE *w_linep; /* Top line in the window */ XX struct LINE *w_dotp; /* Line containing "." */ XX short w_doto; /* Byte offset for "." */ XX struct LINE *w_markp; /* Line containing "mark" */ XX short w_marko; /* Byte offset for "mark" */ XX char w_toprow; /* Origin 0 top row of window */ XX char w_ntrows; /* # of rows of text in window */ XX char w_force; /* If NZ, forcing row. */ XX char w_flag; /* Flags. */ XX } WINDOW; XX XX#define WFFORCE 0x01 /* Window needs forced reframe */ XX#define WFMOVE 0x02 /* Movement from line to line */ XX#define WFEDIT 0x04 /* Editing within a line */ XX#define WFHARD 0x08 /* Better to a full display */ XX#define WFMODE 0x10 /* Update mode line. */ XX XX/* XX * Text is kept in buffers. A buffer header, described below, exists for every XX * buffer in the system. The buffers are kept in a big list, so that commands XX * that search for a buffer by name can find the buffer header. There is a XX * safe store for the dot and mark in the header, but this is only valid if XX * the buffer is not being displayed (that is, if "b_nwnd" is 0). The text for XX * the buffer is kept in a circularly linked list of lines, with a pointer to XX * the header line in "b_linep". XX * Buffers may be "Inactive" which means the files accosiated with them XX * have not been read in yet. These get read in at "use buffer" time. XX */ XXtypedef struct BUFFER { XX struct BUFFER *b_bufp; /* Link to next BUFFER */ XX struct LINE *b_dotp; /* Link to "." LINE structure */ XX short b_doto; /* Offset of "." in above LINE */ XX struct LINE *b_markp; /* The same as the above two, */ XX short b_marko; /* but for the "mark" */ XX struct LINE *b_linep; /* Link to the header LINE */ XX char b_active; /* window activated flag */ XX char b_nwnd; /* Count of windows on buffer */ XX char b_flag; /* Flags */ XX char b_mode; /* editor mode of this buffer */ XX char b_fname[NFILEN];/* File name */ XX char b_bname[NBUFN]; /* Buffer name */ XX } BUFFER; XX XX#define BFTEMP 0x01 /* Internal temporary buffer */ XX#define BFCHG 0x02 /* Changed since last write */ XX XX/* mode flags */ XX#define NUMMODES 7 /* # of defined modes */ XX XX#define MDWRAP 0x0001 /* word wrap */ XX#define MDCMOD 0x0002 /* C indentation and fence match*/ XX#define MDSLOW 0x0004 /* slow speed searches */ XX#define MDEXACT 0x0008 /* Exact matching for searches */ XX#define MDVIEW 0x0010 /* read-only buffer */ XX#define MDMMOD 0x0020 /* Modula indentation mode */ XX#define MDLISP 0x0040 /* Lisp indentation mode */ XX XX/* XX * The starting position of a region, and the size of the region in XX * characters, is kept in a region structure. Used by the region commands. XX */ XXtypedef struct { XX struct LINE *r_linep; /* Origin LINE address. */ XX short r_offset; /* Origin LINE offset. */ XX int r_size; /* Length in characters. */ XX } REGION; XX XX/* XX * All text is kept in circularly linked lists of "LINE" structures. These XX * begin at the header line (which is the blank line beyond the end of the XX * buffer). This line is pointed to by the "BUFFER". Each line contains a the XX * number of bytes in the line (the "used" size), the size of the text array, XX * and the text. The end of line is not stored as a byte; it's implied. Future XX * additions will include update hints, and a list of marks into the line. XX */ XXtypedef struct LINE { XX struct LINE *l_fp; /* Link to the next line */ XX struct LINE *l_bp; /* Link to the previous line */ XX short l_size; /* Allocated size */ XX short l_used; /* Used size */ XX char l_text[1]; /* A bunch of characters. */ XX } LINE; XX XX#define lforw(lp) ((lp)->l_fp) XX#define lback(lp) ((lp)->l_bp) XX#define lgetc(lp, n) ((lp)->l_text[(n)]&0xFF) XX#define lputc(lp, n, c) ((lp)->l_text[(n)]=(c)) XX#define llength(lp) ((lp)->l_used) XX XX/* XX * The editor communicates with the display using a high level interface. A XX * "TERM" structure holds useful variables, and indirect pointers to routines XX * that do useful operations. The low level get and put routines are here too. XX * This lets a terminal, in addition to having non standard commands, have XX * funny get and put character code too. The calls might get changed to XX * "termp->t_field" style in the future, to make it possible to run more than XX * one terminal type. XX */ XXtypedef struct { XX short t_nrow; /* Number of rows. */ XX short t_ncol; /* Number of columns. */ XX short t_margin; /* min margin for extended lines*/ XX short t_scrsiz; /* size of scroll region " */ XX int (*t_open)(); /* Open terminal at the start. */ XX int (*t_close)(); /* Close terminal at end. */ XX int (*t_getchar)(); /* Get character from keyboard. */ XX int (*t_putchar)(); /* Put character to display. */ XX int (*t_flush)(); /* Flush output buffers. */ XX int (*t_move)(); /* Move the cursor, origin 0. */ XX int (*t_eeol)(); /* Erase to end of line. */ XX int (*t_eeop)(); /* Erase to end of page. */ XX int (*t_beep)(); /* Beep. */ XX int (*t_insert)(); /* Insert n blank lines (scroll down) */ XX int (*t_delete)(); /* Delete n lines (scroll up) */ XX } TERM; XX XX/* structure for the table of initial key bindings */ XX XXtypedef struct { XX short k_code; /* Key code */ XX int (*k_fp)(); /* Routine to handle it */ XX } KEYTAB; XX XX/* structure for the name binding table */ XX XXtypedef struct { XX char *n_name; /* name of function key */ XX int (*n_func)(); /* function name is bound to */ XX } NBIND; SHAR_EOF if test 9841 -ne "`wc -c estruct.h`" then echo shar: error transmitting estruct.h '(should have been 9841 characters)' fi # End of shell archive exit 0