From d7148b21fe4fff228acf5b7006cf9323bd750df7 Mon Sep 17 00:00:00 2001 From: Linus Torvalds Date: Tue, 31 May 2005 08:50:56 -0700 Subject: [PATCH] Initial import of em-4.0.15-lt This is a slightly updated version of uemacs-PK (PK is Pekka Kutvonen) which was used at Helsinki University a long time ago. My fingers cannot be retrained. --- ansi.c | 264 ++++ basic.c | 462 +++++++ bind.c | 708 ++++++++++ buffer.c | 544 ++++++++ crypt.c | 221 +++ display.c | 1570 +++++++++++++++++++++ dosmake.bat | 2 + ebind.h | 249 ++++ edef.h | 323 +++++ efunc.h | 431 ++++++ emacs.hlp | 172 +++ emacs.lnk | 29 + emacs.prj | 27 + emacs.ps | 3667 +++++++++++++++++++++++++++++++++++++++++++++++++ emacs.rc | 285 ++++ emacs.wri | Bin 0 -> 88320 bytes epath.h | 53 + estruct.h | 731 ++++++++++ eval.c | 879 ++++++++++++ evar.h | 212 +++ exec.c | 1148 ++++++++++++++++ file.c | 635 +++++++++ fileio.c | 228 +++ ibmpc.c | 517 +++++++ input.c | 713 ++++++++++ isearch.c | 521 +++++++ line.c | 655 +++++++++ lock.c | 166 +++ main.c | 895 ++++++++++++ makefile | 124 ++ makefile.dos | 22 + makefile.unx | 121 ++ makefilepatch | 61 + pklock.c | 125 ++ posix.c | 159 +++ random.c | 1221 ++++++++++++++++ readme | 182 +++ readme.39e | 331 +++++ region.c | 212 +++ search.c | 1585 +++++++++++++++++++++ shell.cmd | 57 + spawn.c | 628 +++++++++ tcap.c | 386 ++++++ termio.c | 451 ++++++ vmslink.com | 29 + vmsmake.com | 28 + vmsvt.c | 519 +++++++ vt52.c | 190 +++ window.c | 733 ++++++++++ word.c | 717 ++++++++++ 50 files changed, 24188 insertions(+) create mode 100644 ansi.c create mode 100644 basic.c create mode 100644 bind.c create mode 100644 buffer.c create mode 100644 crypt.c create mode 100644 display.c create mode 100644 dosmake.bat create mode 100644 ebind.h create mode 100644 edef.h create mode 100644 efunc.h create mode 100644 emacs.hlp create mode 100644 emacs.lnk create mode 100644 emacs.prj create mode 100644 emacs.ps create mode 100644 emacs.rc create mode 100644 emacs.wri create mode 100644 epath.h create mode 100644 estruct.h create mode 100644 eval.c create mode 100644 evar.h create mode 100644 exec.c create mode 100644 file.c create mode 100644 fileio.c create mode 100644 ibmpc.c create mode 100644 input.c create mode 100644 isearch.c create mode 100644 line.c create mode 100644 lock.c create mode 100644 main.c create mode 100644 makefile create mode 100644 makefile.dos create mode 100644 makefile.unx create mode 100644 makefilepatch create mode 100644 pklock.c create mode 100644 posix.c create mode 100644 random.c create mode 100644 readme create mode 100644 readme.39e create mode 100644 region.c create mode 100644 search.c create mode 100644 shell.cmd create mode 100644 spawn.c create mode 100644 tcap.c create mode 100644 termio.c create mode 100644 vmslink.com create mode 100644 vmsmake.com create mode 100644 vmsvt.c create mode 100644 vt52.c create mode 100644 window.c create mode 100644 word.c diff --git a/ansi.c b/ansi.c new file mode 100644 index 0000000..1f582b3 --- /dev/null +++ b/ansi.c @@ -0,0 +1,264 @@ +/* ANSI.C + * + * The routines in this file provide support for ANSI style terminals + * over a serial line. The serial I/O services are provided by routines in + * "termio.c". It compiles into nothing if not an ANSI device. + * + * modified by Petri Kutvonen + */ + +#define termdef 1 /* don't define "term" external */ + +#include +#include "estruct.h" +#include "edef.h" + +#if ANSI + +#define NROW 25 /* Screen size. */ +#define NCOL 80 /* Edit if you want to. */ + +#if PKCODE +#define MROW 64 +#endif +#define NPAUSE 100 /* # times thru update to pause */ +#define MARGIN 8 /* size of minimim margin and */ +#define SCRSIZ 64 /* scroll size for extended lines */ +#define BEL 0x07 /* BEL character. */ +#define ESC 0x1B /* ESC character. */ + +extern int ttopen(); /* Forward references. */ +extern int ttgetc(); +extern int ttputc(); +extern int ttflush(); +extern int ttclose(); +extern int ansimove(); +extern int ansieeol(); +extern int ansieeop(); +extern int ansibeep(); +extern int ansiopen(); +extern int ansirev(); +extern int ansiclose(); +extern int ansikopen(); +extern int ansikclose(); +extern int ansicres(); + +#if COLOR +extern int ansifcol(); +extern int ansibcol(); + +int cfcolor = -1; /* current forground color */ +int cbcolor = -1; /* current background color */ + +#endif + +/* + * Standard terminal interface dispatch table. Most of the fields point into + * "termio" code. + */ +TERM term = { +#if PKCODE + MROW-1, +#else + NROW-1, +#endif + NROW-1, + NCOL, + NCOL, + MARGIN, + SCRSIZ, + NPAUSE, + ansiopen, + ansiclose, + ansikopen, + ansikclose, + ttgetc, + ttputc, + ttflush, + ansimove, + ansieeol, + ansieeop, + ansibeep, + ansirev, + ansicres +#if COLOR + , ansifcol, + ansibcol +#endif +#if SCROLLCODE + , NULL +#endif +}; + +#if COLOR +ansifcol(color) /* set the current output color */ + +int color; /* color to set */ + +{ + if (color == cfcolor) + return; + ttputc(ESC); + ttputc('['); + ansiparm(color+30); + ttputc('m'); + cfcolor = color; +} + +ansibcol(color) /* set the current background color */ + +int color; /* color to set */ + +{ + if (color == cbcolor) + return; + ttputc(ESC); + ttputc('['); + ansiparm(color+40); + ttputc('m'); + cbcolor = color; +} +#endif + +ansimove(row, col) +{ + ttputc(ESC); + ttputc('['); + ansiparm(row+1); + ttputc(';'); + ansiparm(col+1); + ttputc('H'); +} + +ansieeol() +{ + ttputc(ESC); + ttputc('['); + ttputc('K'); +} + +ansieeop() +{ +#if COLOR + ansifcol(gfcolor); + ansibcol(gbcolor); +#endif + ttputc(ESC); + ttputc('['); + ttputc('J'); +} + +ansirev(state) /* change reverse video state */ + +int state; /* TRUE = reverse, FALSE = normal */ + +{ +#if COLOR + int ftmp, btmp; /* temporaries for colors */ +#endif + + ttputc(ESC); + ttputc('['); + ttputc(state ? '7': '0'); + ttputc('m'); +#if COLOR + if (state == FALSE) { + ftmp = cfcolor; + btmp = cbcolor; + cfcolor = -1; + cbcolor = -1; + ansifcol(ftmp); + ansibcol(btmp); + } +#endif +} + +ansicres() /* change screen resolution */ + +{ + return(TRUE); +} + +spal(dummy) /* change pallette settings */ + +{ + /* none for now */ +} + +ansibeep() +{ + ttputc(BEL); + ttflush(); +} + +ansiparm(n) +register int n; +{ + register int q,r; + + q = n/10; + if (q != 0) { + r = q/10; + if (r != 0) { + ttputc((r%10)+'0'); + } + ttputc((q%10) + '0'); + } + ttputc((n%10) + '0'); +} + +ansiopen() +{ +#if V7 | USG | BSD + register char *cp; + char *getenv(); + + if ((cp = getenv("TERM")) == NULL) { + puts("Shell variable TERM not defined!"); + exit(1); + } + if (strcmp(cp, "vt100") != 0) { + puts("Terminal type not 'vt100'!"); + exit(1); + } +#endif + strcpy(sres, "NORMAL"); + revexist = TRUE; + ttopen(); +} + +ansiclose() + +{ +#if COLOR + ansifcol(7); + ansibcol(0); +#endif + ttclose(); +} + +ansikopen() /* open the keyboard (a noop here) */ + +{ +} + +ansikclose() /* close the keyboard (a noop here) */ + +{ +} + +#if FNLABEL +fnclabel(f, n) /* label a function key */ + +int f,n; /* default flag, numeric argument [unused] */ + +{ + /* on machines with no function keys...don't bother */ + return(TRUE); +} +#endif +#else +ansihello() +{ +} +#endif diff --git a/basic.c b/basic.c new file mode 100644 index 0000000..7414744 --- /dev/null +++ b/basic.c @@ -0,0 +1,462 @@ +/* BASIC.C + * + * The routines in this file move the cursor around on the screen. They + * compute a new value for the cursor, then adjust ".". The display code + * always updates the cursor location, so only moves between lines, or + * functions that adjust the top line in the window and invalidate the + * framing, are hard. + * + * modified by Petri Kutvonen + */ + +#include +#include "estruct.h" +#include "edef.h" + +/* + * Move the cursor to the + * beginning of the current line. + * Trivial. + */ +gotobol(f, n) +{ + curwp->w_doto = 0; + return (TRUE); +} + +/* + * Move the cursor backwards by "n" characters. If "n" is less than zero call + * "forwchar" to actually do the move. Otherwise compute the new cursor + * location. Error if you try and move out of the buffer. Set the flag if the + * line pointer for dot changes. + */ +backchar(f, n) +register int n; +{ + register LINE *lp; + + if (n < 0) + return (forwchar(f, -n)); + while (n--) { + if (curwp->w_doto == 0) { + if ((lp=lback(curwp->w_dotp)) == curbp->b_linep) + return (FALSE); + curwp->w_dotp = lp; + curwp->w_doto = llength(lp); + curwp->w_flag |= WFMOVE; + } else + curwp->w_doto--; + } + return (TRUE); +} + +/* + * Move the cursor to the end of the current line. Trivial. No errors. + */ +gotoeol(f, n) +{ + curwp->w_doto = llength(curwp->w_dotp); + return (TRUE); +} + +/* + * Move the cursor forwards by "n" characters. If "n" is less than zero call + * "backchar" to actually do the move. Otherwise compute the new cursor + * location, and move ".". Error if you try and move off the end of the + * buffer. Set the flag if the line pointer for dot changes. + */ +forwchar(f, n) +register int n; +{ + if (n < 0) + return (backchar(f, -n)); + while (n--) { + if (curwp->w_doto == llength(curwp->w_dotp)) { + if (curwp->w_dotp == curbp->b_linep) + return (FALSE); + curwp->w_dotp = lforw(curwp->w_dotp); + curwp->w_doto = 0; + curwp->w_flag |= WFMOVE; + } else + curwp->w_doto++; + } + return (TRUE); +} + +gotoline(f, n) /* move to a particular line. + argument (n) must be a positive integer for + this to actually do anything */ + +{ + register int status; /* status return */ + char arg[NSTRING]; /* buffer to hold argument */ + + /* get an argument if one doesnt exist */ + if (f == FALSE) { + if ((status = mlreply("Line to GOTO: ", arg, NSTRING)) != TRUE) { + mlwrite("(Aborted)"); + return(status); + } + n = atoi(arg); + } + + if (n < 1) /* if a bogus argument...then leave */ + return(FALSE); + + /* first, we go to the start of the buffer */ + curwp->w_dotp = lforw(curbp->b_linep); + curwp->w_doto = 0; + return(forwline(f, n-1)); +} + +/* + * Goto the beginning of the buffer. Massive adjustment of dot. This is + * considered to be hard motion; it really isn't if the original value of dot + * is the same as the new value of dot. Normally bound to "M-<". + */ +gotobob(f, n) +{ + curwp->w_dotp = lforw(curbp->b_linep); + curwp->w_doto = 0; + curwp->w_flag |= WFHARD; + return (TRUE); +} + +/* + * Move to the end of the buffer. Dot is always put at the end of the file + * (ZJ). The standard screen code does most of the hard parts of update. + * Bound to "M->". + */ +gotoeob(f, n) +{ + curwp->w_dotp = curbp->b_linep; + curwp->w_doto = 0; + curwp->w_flag |= WFHARD; + return (TRUE); +} + +/* + * Move forward by full lines. If the number of lines to move is less than + * zero, call the backward line function to actually do it. The last command + * controls how the goal column is set. Bound to "C-N". No errors are + * possible. + */ +forwline(f, n) +{ + register LINE *dlp; + + if (n < 0) + return (backline(f, -n)); + + /* if we are on the last line as we start....fail the command */ + if (curwp->w_dotp == curbp->b_linep) + return(FALSE); + + /* if the last command was not note a line move, + reset the goal column */ + if ((lastflag&CFCPCN) == 0) + curgoal = getccol(FALSE); + + /* flag this command as a line move */ + thisflag |= CFCPCN; + + /* and move the point down */ + dlp = curwp->w_dotp; + while (n-- && dlp!=curbp->b_linep) + dlp = lforw(dlp); + + /* reseting the current position */ + curwp->w_dotp = dlp; + curwp->w_doto = getgoal(dlp); + curwp->w_flag |= WFMOVE; + return (TRUE); +} + +/* + * This function is like "forwline", but goes backwards. The scheme is exactly + * the same. Check for arguments that are less than zero and call your + * alternate. Figure out the new line and call "movedot" to perform the + * motion. No errors are possible. Bound to "C-P". + */ +backline(f, n) +{ + register LINE *dlp; + + if (n < 0) + return (forwline(f, -n)); + + + /* if we are on the last line as we start....fail the command */ + if (lback(curwp->w_dotp) == curbp->b_linep) + return(FALSE); + + /* if the last command was not note a line move, + reset the goal column */ + if ((lastflag&CFCPCN) == 0) + curgoal = getccol(FALSE); + + /* flag this command as a line move */ + thisflag |= CFCPCN; + + /* and move the point up */ + dlp = curwp->w_dotp; + while (n-- && lback(dlp)!=curbp->b_linep) + dlp = lback(dlp); + + /* reseting the current position */ + curwp->w_dotp = dlp; + curwp->w_doto = getgoal(dlp); + curwp->w_flag |= WFMOVE; + return (TRUE); +} + +#if WORDPRO +gotobop(f, n) /* go back to the beginning of the current paragraph + here we look for a or or + combination to delimit the beginning of a paragraph */ + +int f, n; /* default Flag & Numeric argument */ + +{ + register int suc; /* success of last backchar */ + + if (n < 0) /* the other way...*/ + return(gotoeop(f, -n)); + + while (n-- > 0) { /* for each one asked for */ + + /* first scan back until we are in a word */ + suc = backchar(FALSE, 1); + while (!inword() && suc) + suc = backchar(FALSE, 1); + curwp->w_doto = 0; /* and go to the B-O-Line */ + + /* and scan back until we hit a or + or a */ + while (lback(curwp->w_dotp) != curbp->b_linep) + if (llength(curwp->w_dotp) != 0 && +#if PKCODE + ((justflag == TRUE) || +#endif + lgetc(curwp->w_dotp, curwp->w_doto) != TAB && + lgetc(curwp->w_dotp, curwp->w_doto) != ' ') +#if PKCODE + ) +#endif + curwp->w_dotp = lback(curwp->w_dotp); + else + break; + + /* and then forward until we are in a word */ + suc = forwchar(FALSE, 1); + while (suc && !inword()) + suc = forwchar(FALSE, 1); + } + curwp->w_flag |= WFMOVE; /* force screen update */ + return(TRUE); +} + +gotoeop(f, n) /* go forword to the end of the current paragraph + here we look for a or or + combination to delimit the beginning of a paragraph */ + +int f, n; /* default Flag & Numeric argument */ + +{ + register int suc; /* success of last backchar */ + + if (n < 0) /* the other way...*/ + return(gotobop(f, -n)); + + while (n-- > 0) { /* for each one asked for */ + + /* first scan forward until we are in a word */ + suc = forwchar(FALSE, 1); + while (!inword() && suc) + suc = forwchar(FALSE, 1); + curwp->w_doto = 0; /* and go to the B-O-Line */ + if (suc) /* of next line if not at EOF */ + curwp->w_dotp = lforw(curwp->w_dotp); + + /* and scan forword until we hit a or + or a */ + while (curwp->w_dotp != curbp->b_linep) { + if (llength(curwp->w_dotp) != 0 && +#if PKCODE + ((justflag == TRUE) || +#endif + lgetc(curwp->w_dotp, curwp->w_doto) != TAB && + lgetc(curwp->w_dotp, curwp->w_doto) != ' ') +#if PKCODE + ) +#endif + curwp->w_dotp = lforw(curwp->w_dotp); + else + break; + } + + /* and then backward until we are in a word */ + suc = backchar(FALSE, 1); + while (suc && !inword()) { + suc = backchar(FALSE, 1); + } + curwp->w_doto = llength(curwp->w_dotp); /* and to the EOL */ + } + curwp->w_flag |= WFMOVE; /* force screen update */ + return(TRUE); +} +#endif + +/* + * This routine, given a pointer to a LINE, and the current cursor goal + * column, return the best choice for the offset. The offset is returned. + * Used by "C-N" and "C-P". + */ +getgoal(dlp) +register LINE *dlp; +{ + register int c; + register int col; + register int newcol; + register int dbo; + + col = 0; + dbo = 0; + while (dbo != llength(dlp)) { + c = lgetc(dlp, dbo); + newcol = col; + if (c == '\t') + newcol |= tabmask; + else if (c<0x20 || c==0x7F) + ++newcol; + ++newcol; + if (newcol > curgoal) + break; + col = newcol; + ++dbo; + } + return (dbo); +} + +/* + * Scroll forward by a specified number of lines, or by a full page if no + * argument. Bound to "C-V". The "2" in the arithmetic on the window size is + * the overlap; this value is the default overlap value in ITS EMACS. Because + * this zaps the top line in the display window, we have to do a hard update. + */ +forwpage(f, n) +register int n; +{ + register LINE *lp; + + if (f == FALSE) { +#if SCROLLCODE + if (term.t_scroll != NULL) + if (overlap == 0) + n = curwp->w_ntrows / 3 * 2; + else + n = curwp->w_ntrows - overlap; + else +#endif + n = curwp->w_ntrows - 2; /* Default scroll. */ + if (n <= 0) /* Forget the overlap */ + n = 1; /* if tiny window. */ + } else if (n < 0) + return (backpage(f, -n)); +#if CVMVAS + else /* Convert from pages */ + n *= curwp->w_ntrows; /* to lines. */ +#endif + lp = curwp->w_linep; + while (n-- && lp!=curbp->b_linep) + lp = lforw(lp); + curwp->w_linep = lp; + curwp->w_dotp = lp; + curwp->w_doto = 0; +#if SCROLLCODE + curwp->w_flag |= WFHARD|WFKILLS; +#else + curwp->w_flag |= WFHARD; +#endif + return (TRUE); +} + +/* + * This command is like "forwpage", but it goes backwards. The "2", like + * above, is the overlap between the two windows. The value is from the ITS + * EMACS manual. Bound to "M-V". We do a hard update for exactly the same + * reason. + */ +backpage(f, n) +register int n; +{ + register LINE *lp; + + if (f == FALSE) { +#if SCROLLCODE + if (term.t_scroll != NULL) + if (overlap == 0) + n = curwp->w_ntrows / 3 * 2; + else + n = curwp->w_ntrows - overlap; + else +#endif + n = curwp->w_ntrows - 2; /* Default scroll. */ + if (n <= 0) /* Don't blow up if the */ + n = 1; /* window is tiny. */ + } else if (n < 0) + return (forwpage(f, -n)); +#if CVMVAS + else /* Convert from pages */ + n *= curwp->w_ntrows; /* to lines. */ +#endif + lp = curwp->w_linep; + while (n-- && lback(lp)!=curbp->b_linep) + lp = lback(lp); + curwp->w_linep = lp; + curwp->w_dotp = lp; + curwp->w_doto = 0; +#if SCROLLCODE + curwp->w_flag |= WFHARD|WFINS; +#else + curwp->w_flag |= WFHARD; +#endif + return (TRUE); +} + +/* + * Set the mark in the current window to the value of "." in the window. No + * errors are possible. Bound to "M-.". + */ +setmark(f, n) +{ + curwp->w_markp = curwp->w_dotp; + curwp->w_marko = curwp->w_doto; + mlwrite("(Mark set)"); + return (TRUE); +} + +/* + * Swap the values of "." and "mark" in the current window. This is pretty + * easy, bacause all of the hard work gets done by the standard routine + * that moves the mark about. The only possible error is "no mark". Bound to + * "C-X C-X". + */ +swapmark(f, n) +{ + register LINE *odotp; + register int odoto; + + if (curwp->w_markp == NULL) { + mlwrite("No mark in this window"); + return (FALSE); + } + odotp = curwp->w_dotp; + odoto = curwp->w_doto; + curwp->w_dotp = curwp->w_markp; + curwp->w_doto = curwp->w_marko; + curwp->w_markp = odotp; + curwp->w_marko = odoto; + curwp->w_flag |= WFMOVE; + return (TRUE); +} diff --git a/bind.c b/bind.c new file mode 100644 index 0000000..c12fc67 --- /dev/null +++ b/bind.c @@ -0,0 +1,708 @@ +/* BIND.C + * + * This file is for functions having to do with key bindings, + * descriptions, help commands and startup file. + * + * written 11-feb-86 by Daniel Lawrence + * modified by Petri Kutvonen + */ + +#include +#include "estruct.h" +#include "edef.h" +#include "epath.h" + +extern int meta(), cex(), unarg(), ctrlg(); /* dummy prefix binding functions */ + +help(f, n) /* give me some help!!!! + bring up a fake buffer and read the help file + into it with view mode */ +{ + register WINDOW *wp; /* scaning pointer to windows */ + register BUFFER *bp; /* buffer pointer to help */ + char *fname; /* ptr to file returned by flook() */ + + /* first check if we are already here */ + bp = bfind("emacs.hlp", FALSE, BFINVS); + + if (bp == NULL) { + fname = flook(pathname[1], FALSE); + if (fname == NULL) { + mlwrite("(Help file is not online)"); + return(FALSE); + } + } + + /* split the current window to make room for the help stuff */ + if (splitwind(FALSE, 1) == FALSE) + return(FALSE); + + if (bp == NULL) { + /* and read the stuff in */ + if (getfile(fname, FALSE) == FALSE) + return(FALSE); + } else + swbuffer(bp); + + /* make this window in VIEW mode, update all mode lines */ + curwp->w_bufp->b_mode |= MDVIEW; + curwp->w_bufp->b_flag |= BFINVS; + wp = wheadp; + while (wp != NULL) { + wp->w_flag |= WFMODE; + wp = wp->w_wndp; + } + return(TRUE); +} + +deskey(f, n) /* describe the command for a certain key */ + +{ + register int c; /* key to describe */ + register char *ptr; /* string pointer to scan output strings */ + char outseq[NSTRING]; /* output buffer for command sequence */ + int (*getbind())(); + + /* prompt the user to type us a key to describe */ + mlwrite(": describe-key "); + + /* get the command sequence to describe + change it to something we can print as well */ + cmdstr(c = getckey(FALSE), &outseq[0]); + + /* and dump it out */ + ostring(outseq); + ostring(" "); + + /* find the right ->function */ + if ((ptr = getfname(getbind(c))) == NULL) + ptr = "Not Bound"; + + /* output the command sequence */ + ostring(ptr); +} + +/* bindtokey: add a new key to the key binding table */ + +bindtokey(f, n) + +int f, n; /* command arguments [IGNORED] */ + +{ + register unsigned int c;/* command key to bind */ + register int (*kfunc)();/* ptr to the requested function to bind to */ + register KEYTAB *ktp; /* pointer into the command table */ + register int found; /* matched command flag */ + char outseq[80]; /* output buffer for keystroke sequence */ + int (*getname())(); + + /* prompt the user to type in a key to bind */ + mlwrite(": bind-to-key "); + + /* get the function name to bind it to */ + kfunc = getname(); + if (kfunc == NULL) { + mlwrite("(No such function)"); + return(FALSE); + } + ostring(" "); + + /* get the command sequence to bind */ + c = getckey((kfunc == meta) || (kfunc == cex) || + (kfunc == unarg) || (kfunc == ctrlg)); + + /* change it to something we can print as well */ + cmdstr(c, &outseq[0]); + + /* and dump it out */ + ostring(outseq); + + /* if the function is a prefix key */ + if (kfunc == meta || kfunc == cex || + kfunc == unarg || kfunc == ctrlg) { + + /* search for an existing binding for the prefix key */ + ktp = &keytab[0]; + found = FALSE; + while (ktp->k_fp != NULL) { + if (ktp->k_fp == kfunc) + unbindchar(ktp->k_code); + ++ktp; + } + + /* reset the appropriate global prefix variable */ + if (kfunc == meta) + metac = c; + if (kfunc == cex) + ctlxc = c; + if (kfunc == unarg) + reptc = c; + if (kfunc == ctrlg) + abortc = c; + } + + /* search the table to see if it exists */ + ktp = &keytab[0]; + found = FALSE; + while (ktp->k_fp != NULL) { + if (ktp->k_code == c) { + found = TRUE; + break; + } + ++ktp; + } + + if (found) { /* it exists, just change it then */ + ktp->k_fp = kfunc; + } else { /* otherwise we need to add it to the end */ + /* if we run out of binding room, bitch */ + if (ktp >= &keytab[NBINDS]) { + mlwrite("Binding table FULL!"); + return(FALSE); + } + + ktp->k_code = c; /* add keycode */ + ktp->k_fp = kfunc; /* and the function pointer */ + ++ktp; /* and make sure the next is null */ + ktp->k_code = 0; + ktp->k_fp = NULL; + } + return(TRUE); +} + +/* unbindkey: delete a key from the key binding table */ + +unbindkey(f, n) + +int f, n; /* command arguments [IGNORED] */ + +{ + register int c; /* command key to unbind */ + char outseq[80]; /* output buffer for keystroke sequence */ + + /* prompt the user to type in a key to unbind */ + mlwrite(": unbind-key "); + + /* get the command sequence to unbind */ + c = getckey(FALSE); /* get a command sequence */ + + /* change it to something we can print as well */ + cmdstr(c, &outseq[0]); + + /* and dump it out */ + ostring(outseq); + + /* if it isn't bound, bitch */ + if (unbindchar(c) == FALSE) { + mlwrite("(Key not bound)"); + return(FALSE); + } + return(TRUE); +} + +unbindchar(c) + +int c; /* command key to unbind */ + +{ + register KEYTAB *ktp; /* pointer into the command table */ + register KEYTAB *sktp; /* saved pointer into the command table */ + register int found; /* matched command flag */ + + /* search the table to see if the key exists */ + ktp = &keytab[0]; + found = FALSE; + while (ktp->k_fp != NULL) { + if (ktp->k_code == c) { + found = TRUE; + break; + } + ++ktp; + } + + /* if it isn't bound, bitch */ + if (!found) + return(FALSE); + + /* save the pointer and scan to the end of the table */ + sktp = ktp; + while (ktp->k_fp != NULL) + ++ktp; + --ktp; /* backup to the last legit entry */ + + /* copy the last entry to the current one */ + sktp->k_code = ktp->k_code; + sktp->k_fp = ktp->k_fp; + + /* null out the last one */ + ktp->k_code = 0; + ktp->k_fp = NULL; + return(TRUE); +} + +desbind(f, n) /* describe bindings + bring up a fake buffer and list the key bindings + into it with view mode */ + +#if APROP +{ + buildlist(TRUE, ""); +} + +apro(f, n) /* Apropos (List functions that match a substring) */ + +{ + char mstring[NSTRING]; /* string to match cmd names to */ + int status; /* status return */ + + status = mlreply("Apropos string: ", mstring, NSTRING - 1); + if (status != TRUE) + return(status); + + return(buildlist(FALSE, mstring)); +} + +buildlist(type, mstring) /* build a binding list (limited or full) */ + +int type; /* true = full list, false = partial list */ +char *mstring; /* match string if a partial list */ + +#endif +{ + register WINDOW *wp; /* scanning pointer to windows */ + register KEYTAB *ktp; /* pointer into the command table */ + register NBIND *nptr; /* pointer into the name binding table */ + register BUFFER *bp; /* buffer to put binding list into */ + char *strp; /* pointer int string to send */ + int cpos; /* current position to use in outseq */ + char outseq[80]; /* output buffer for keystroke sequence */ + + /* split the current window to make room for the binding list */ + if (splitwind(FALSE, 1) == FALSE) + return(FALSE); + + /* and get a buffer for it */ + bp = bfind("*Binding list*", TRUE, 0); + if (bp == NULL || bclear(bp) == FALSE) { + mlwrite("Can not display binding list"); + return(FALSE); + } + + /* let us know this is in progress */ + mlwrite("(Building binding list)"); + + /* disconect the current buffer */ + if (--curbp->b_nwnd == 0) { /* Last use. */ + curbp->b_dotp = curwp->w_dotp; + curbp->b_doto = curwp->w_doto; + curbp->b_markp = curwp->w_markp; + curbp->b_marko = curwp->w_marko; + } + + /* connect the current window to this buffer */ + curbp = bp; /* make this buffer current in current window */ + bp->b_mode = 0; /* no modes active in binding list */ + bp->b_nwnd++; /* mark us as more in use */ + wp = curwp; + wp->w_bufp = bp; + wp->w_linep = bp->b_linep; + wp->w_flag = WFHARD|WFFORCE; + wp->w_dotp = bp->b_dotp; + wp->w_doto = bp->b_doto; + wp->w_markp = NULL; + wp->w_marko = 0; + + /* build the contents of this window, inserting it line by line */ + nptr = &names[0]; + while (nptr->n_func != NULL) { + + /* add in the command name */ + strcpy(outseq, nptr->n_name); + cpos = strlen(outseq); + +#if APROP + /* if we are executing an apropos command..... */ + if (type == FALSE && + /* and current string doesn't include the search string */ + strinc(outseq, mstring) == FALSE) + goto fail; +#endif + /* search down any keys bound to this */ + ktp = &keytab[0]; + while (ktp->k_fp != NULL) { + if (ktp->k_fp == nptr->n_func) { + /* padd out some spaces */ + while (cpos < 28) + outseq[cpos++] = ' '; + + /* add in the command sequence */ + cmdstr(ktp->k_code, &outseq[cpos]); + strcat(outseq, "\n"); + + /* and add it as a line into the buffer */ + if (linstr(outseq) != TRUE) + return(FALSE); + + cpos = 0; /* and clear the line */ + } + ++ktp; + } + + /* if no key was bound, we need to dump it anyway */ + if (cpos > 0) { + outseq[cpos++] = '\n'; + outseq[cpos] = 0; + if (linstr(outseq) != TRUE) + return(FALSE); + } + +fail: /* and on to the next name */ + ++nptr; + } + + curwp->w_bufp->b_mode |= MDVIEW;/* put this buffer view mode */ + curbp->b_flag &= ~BFCHG; /* don't flag this as a change */ + wp->w_dotp = lforw(bp->b_linep);/* back to the beginning */ + wp->w_doto = 0; + wp = wheadp; /* and update ALL mode lines */ + while (wp != NULL) { + wp->w_flag |= WFMODE; + wp = wp->w_wndp; + } + mlwrite(""); /* clear the mode line */ + return(TRUE); +} + +#if APROP +strinc(source, sub) /* does source include sub? */ + +char *source; /* string to search in */ +char *sub; /* substring to look for */ + +{ + char *sp; /* ptr into source */ + char *nxtsp; /* next ptr into source */ + char *tp; /* ptr into substring */ + + /* for each character in the source string */ + sp = source; + while (*sp) { + tp = sub; + nxtsp = sp; + + /* is the substring here? */ + while (*tp) { + if (*nxtsp++ != *tp) + break; + else + tp++; + } + + /* yes, return a success */ + if (*tp == 0) + return(TRUE); + + /* no, onward */ + sp++; + } + return(FALSE); +} +#endif + +/* get a command key sequence from the keyboard */ + +unsigned int getckey(mflag) + +int mflag; /* going for a meta sequence? */ + +{ + register unsigned int c; /* character fetched */ + char tok[NSTRING]; /* command incoming */ + + /* check to see if we are executing a command line */ + if (clexec) { + macarg(tok); /* get the next token */ + return(stock(tok)); + } + + /* or the normal way */ + if (mflag) + c = get1key(); + else + c = getcmd(); + return(c); +} + +/* execute the startup file */ + +startup(sfname) + +char *sfname; /* name of startup file (null if default) */ + +{ + char *fname; /* resulting file name to execute */ + + /* look up the startup file */ + if (*sfname != 0) + fname = flook(sfname, TRUE); + else + fname = flook(pathname[0], TRUE); + + /* if it isn't around, don't sweat it */ + if (fname == NULL) + return(TRUE); + + /* otherwise, execute the sucker */ + return(dofile(fname)); +} + +/* Look up the existance of a file along the normal or PATH + environment variable. Look first in the HOME directory if + asked and possible +*/ + +char *flook(fname, hflag) + +char *fname; /* base file name to search for */ +int hflag; /* Look in the HOME environment variable first? */ + +{ + register char *home; /* path to home directory */ + register char *path; /* environmental PATH variable */ + register char *sp; /* pointer into path spec */ + register int i; /* index */ + static char fspec[NSTRING]; /* full path spec to search */ + char *getenv(); + +#if ENVFUNC + + if (hflag) { + home = getenv("HOME"); + if (home != NULL) { + /* build home dir file spec */ + strcpy(fspec, home); + strcat(fspec, "/"); + strcat(fspec, fname); + + /* and try it out */ + if (ffropen(fspec) == FIOSUC) { + ffclose(); + return(fspec); + } + } + } +#endif + + /* always try the current directory first */ + if (ffropen(fname) == FIOSUC) { + ffclose(); + return(fname); + } + +#if ENVFUNC + /* get the PATH variable */ + path = getenv("PATH"); + if (path != NULL) + while (*path) { + + /* build next possible file spec */ + sp = fspec; + while (*path && (*path != PATHCHR)) + *sp++ = *path++; + + /* add a terminating dir separator if we need it */ + if (sp != fspec) + *sp++ = '/'; + *sp = 0; + strcat(fspec, fname); + + /* and try it out */ + if (ffropen(fspec) == FIOSUC) { + ffclose(); + return(fspec); + } + + if (*path == PATHCHR) + ++path; + } +#endif + + /* look it up via the old table method */ + for (i=2; i < NPNAMES; i++) { + strcpy(fspec, pathname[i]); + strcat(fspec, fname); + + /* and try it out */ + if (ffropen(fspec) == FIOSUC) { + ffclose(); + return(fspec); + } + } + + return(NULL); /* no such luck */ +} + +cmdstr(c, seq) /* change a key command to a string we can print out */ + +int c; /* sequence to translate */ +char *seq; /* destination string for sequence */ + +{ + char *ptr; /* pointer into current position in sequence */ + + ptr = seq; + + /* apply meta sequence if needed */ + if (c & META) { + *ptr++ = 'M'; + *ptr++ = '-'; + } + + /* apply ^X sequence if needed */ + if (c & CTLX) { + *ptr++ = '^'; + *ptr++ = 'X'; + } + + /* apply SPEC sequence if needed */ + if (c & SPEC) { + *ptr++ = 'F'; + *ptr++ = 'N'; + } + + /* apply control sequence if needed */ + if (c & CONTROL) { + *ptr++ = '^'; + } + + /* and output the final sequence */ + + *ptr++ = c & 255; /* strip the prefixes */ + + *ptr = 0; /* terminate the string */ +} + +/* This function looks a key binding up in the binding table */ + +int (*getbind(c))() + +int c; /* key to find what is bound to it */ + +{ + register KEYTAB *ktp; + + ktp = &keytab[0]; /* Look in key table. */ + while (ktp->k_fp != NULL) { + if (ktp->k_code == c) + return(ktp->k_fp); + ++ktp; + } + + /* no such binding */ + return(NULL); +} + +/* getfname: This function takes a ptr to function and gets the name + associated with it +*/ + +char *getfname(func) + +int (*func)(); /* ptr to the requested function to bind to */ + +{ + register NBIND *nptr; /* pointer into the name binding table */ + + /* skim through the table, looking for a match */ + nptr = &names[0]; + while (nptr->n_func != NULL) { + if (nptr->n_func == func) + return(nptr->n_name); + ++nptr; + } + return(NULL); +} + +int (*fncmatch(fname))() /* match fname to a function in the names table + and return any match or NULL if none */ + +char *fname; /* name to attempt to match */ + +{ + register NBIND *ffp; /* pointer to entry in name binding table */ + + /* scan through the table, returning any match */ + ffp = &names[0]; + while (ffp->n_func != NULL) { + if (strcmp(fname, ffp->n_name) == 0) + return(ffp->n_func); + ++ffp; + } + return(NULL); +} + +/* stock: String key name TO Command Key */ + +unsigned int stock(keyname) + +char *keyname; /* name of key to translate to Command key form */ + +{ + register unsigned int c; /* key sequence to return */ + + /* parse it up */ + c = 0; + + /* first, the META prefix */ + if (*keyname == 'M' && *(keyname+1) == '-') { + c = META; + keyname += 2; + } + + /* next the function prefix */ + if (*keyname == 'F' && *(keyname+1) == 'N') { + c |= SPEC; + keyname += 2; + } + + /* control-x as well... (but not with FN) */ + if (*keyname == '^' && *(keyname+1) == 'X'&& !(c & SPEC)) { + c |= CTLX; + keyname += 2; + } + + /* a control char? */ + if (*keyname == '^' && *(keyname+1) != 0) { + c |= CONTROL; + ++keyname; + } + if (*keyname < 32) { + c |= CONTROL; + *keyname += 'A'; + } + + + /* make sure we are not lower case (not with function keys)*/ + if (*keyname >= 'a' && *keyname <= 'z' && !(c & SPEC)) + *keyname -= 32; + + /* the final sequence... */ + c |= *keyname; + return(c); +} + +char *transbind(skey) /* string key name to binding name.... */ + +char *skey; /* name of keey to get binding for */ + +{ + char *bindname; + unsigned int stock(); + int (*getbind())(); + + bindname = getfname(getbind(stock(skey))); + if (bindname == NULL) + bindname = "ERROR"; + + return(bindname); +} diff --git a/buffer.c b/buffer.c new file mode 100644 index 0000000..93daa25 --- /dev/null +++ b/buffer.c @@ -0,0 +1,544 @@ +/* BUFFER.C + * + * Buffer management. + * Some of the functions are internal, + * and some are actually attached to user + * keys. Like everyone else, they set hints + * for the display system + * + * modified by Petri Kutvonen + */ + +#include +#include "estruct.h" +#include "edef.h" + +/* + * Attach a buffer to a window. The + * values of dot and mark come from the buffer + * if the use count is 0. Otherwise, they come + * from some other window. + */ +usebuffer(f, n) +{ + register BUFFER *bp; + register int s; + char bufn[NBUFN]; + + if ((s=mlreply("Use buffer: ", bufn, NBUFN)) != TRUE) + return (s); + if ((bp=bfind(bufn, TRUE, 0)) == NULL) + return (FALSE); + return(swbuffer(bp)); +} + +nextbuffer(f, n) /* switch to the next buffer in the buffer list */ + +int f, n; /* default flag, numeric argument */ +{ + register BUFFER *bp; /* eligable buffer to switch to*/ + register BUFFER *bbp; /* eligable buffer to switch to*/ + + /* make sure the arg is legit */ + if (f == FALSE) + n = 1; + if (n < 1) + return(FALSE); + + bbp = curbp; + while (n-- > 0) { + /* advance to the next buffer */ + bp = bbp->b_bufp; + + /* cycle through the buffers to find an eligable one */ + while (bp == NULL || bp->b_flag & BFINVS) { + if (bp == NULL) + bp = bheadp; + else + bp = bp->b_bufp; + + /* don't get caught in an infinite loop! */ + if (bp == bbp) + return(FALSE); + + } + + bbp = bp; + } + + return(swbuffer(bp)); +} + +swbuffer(bp) /* make buffer BP current */ + +BUFFER *bp; + +{ + register WINDOW *wp; + + if (--curbp->b_nwnd == 0) { /* Last use. */ + curbp->b_dotp = curwp->w_dotp; + curbp->b_doto = curwp->w_doto; + curbp->b_markp = curwp->w_markp; + curbp->b_marko = curwp->w_marko; + } + curbp = bp; /* Switch. */ + if (curbp->b_active != TRUE) { /* buffer not active yet*/ + /* read it in and activate it */ + readin(curbp->b_fname, TRUE); + curbp->b_dotp = lforw(curbp->b_linep); + curbp->b_doto = 0; + curbp->b_active = TRUE; + curbp->b_mode |= gmode; /* P.K. */ + } + curwp->w_bufp = bp; + curwp->w_linep = bp->b_linep; /* For macros, ignored. */ + curwp->w_flag |= WFMODE|WFFORCE|WFHARD; /* Quite nasty. */ + if (bp->b_nwnd++ == 0) { /* First use. */ + curwp->w_dotp = bp->b_dotp; + curwp->w_doto = bp->b_doto; + curwp->w_markp = bp->b_markp; + curwp->w_marko = bp->b_marko; + cknewwindow(); + return (TRUE); + } + wp = wheadp; /* Look for old. */ + while (wp != NULL) { + if (wp!=curwp && wp->w_bufp==bp) { + curwp->w_dotp = wp->w_dotp; + curwp->w_doto = wp->w_doto; + curwp->w_markp = wp->w_markp; + curwp->w_marko = wp->w_marko; + break; + } + wp = wp->w_wndp; + } + cknewwindow(); + return (TRUE); +} + +/* + * Dispose of a buffer, by name. + * Ask for the name. Look it up (don't get too + * upset if it isn't there at all!). Get quite upset + * if the buffer is being displayed. Clear the buffer (ask + * if the buffer has been changed). Then free the header + * line and the buffer header. Bound to "C-X K". + */ +killbuffer(f, n) + +{ + register BUFFER *bp; + register int s; + char bufn[NBUFN]; + + if ((s=mlreply("Kill buffer: ", bufn, NBUFN)) != TRUE) + return(s); + if ((bp=bfind(bufn, FALSE, 0)) == NULL) /* Easy if unknown. */ + return (TRUE); + if(bp->b_flag & BFINVS) /* Deal with special buffers */ + return (TRUE); /* by doing nothing. */ + return(zotbuf(bp)); +} + +zotbuf(bp) /* kill the buffer pointed to by bp */ + +register BUFFER *bp; + +{ + register BUFFER *bp1; + register BUFFER *bp2; + register int s; + + if (bp->b_nwnd != 0) { /* Error if on screen. */ + mlwrite("Buffer is being displayed"); + return (FALSE); + } + if ((s=bclear(bp)) != TRUE) /* Blow text away. */ + return (s); + free((char *) bp->b_linep); /* Release header line. */ + bp1 = NULL; /* Find the header. */ + bp2 = bheadp; + while (bp2 != bp) { + bp1 = bp2; + bp2 = bp2->b_bufp; + } + bp2 = bp2->b_bufp; /* Next one in chain. */ + if (bp1 == NULL) /* Unlink it. */ + bheadp = bp2; + else + bp1->b_bufp = bp2; + free((char *) bp); /* Release buffer block */ + return (TRUE); +} + +namebuffer(f,n) /* Rename the current buffer */ + +int f, n; /* default Flag & Numeric arg */ + +{ + register BUFFER *bp; /* pointer to scan through all buffers */ + char bufn[NBUFN]; /* buffer to hold buffer name */ + + /* prompt for and get the new buffer name */ +ask: if (mlreply("Change buffer name to: ", bufn, NBUFN) != TRUE) + return(FALSE); + + /* and check for duplicates */ + bp = bheadp; + while (bp != NULL) { + if (bp != curbp) { + /* if the names the same */ + if (strcmp(bufn, bp->b_bname) == 0) + goto ask; /* try again */ + } + bp = bp->b_bufp; /* onward */ + } + + strcpy(curbp->b_bname, bufn); /* copy buffer name to structure */ + curwp->w_flag |= WFMODE; /* make mode line replot */ + mlerase(); + return(TRUE); +} + +/* + List all of the active buffers. First update the special + buffer that holds the list. Next make sure at least 1 + window is displaying the buffer list, splitting the screen + if this is what it takes. Lastly, repaint all of the + windows that are displaying the list. Bound to "C-X C-B". + A numeric argument forces it to list invisable buffers as + well. +*/ + +listbuffers(f, n) +{ + register WINDOW *wp; + register BUFFER *bp; + register int s; + + if ((s=makelist(f)) != TRUE) + return (s); + if (blistp->b_nwnd == 0) { /* Not on screen yet. */ + if ((wp=wpopup()) == NULL) + return (FALSE); + bp = wp->w_bufp; + if (--bp->b_nwnd == 0) { + bp->b_dotp = wp->w_dotp; + bp->b_doto = wp->w_doto; + bp->b_markp = wp->w_markp; + bp->b_marko = wp->w_marko; + } + wp->w_bufp = blistp; + ++blistp->b_nwnd; + } + wp = wheadp; + while (wp != NULL) { + if (wp->w_bufp == blistp) { + wp->w_linep = lforw(blistp->b_linep); + wp->w_dotp = lforw(blistp->b_linep); + wp->w_doto = 0; + wp->w_markp = NULL; + wp->w_marko = 0; + wp->w_flag |= WFMODE|WFHARD; + } + wp = wp->w_wndp; + } + return (TRUE); +} + +/* + * This routine rebuilds the + * text in the special secret buffer + * that holds the buffer list. It is called + * by the list buffers command. Return TRUE + * if everything works. Return FALSE if there + * is an error (if there is no memory). Iflag + * indecates weather to list hidden buffers. + */ +#define MAXLINE MAXCOL +makelist(iflag) + +int iflag; /* list hidden buffer flag */ + +{ + register char *cp1; + register char *cp2; + register int c; + register BUFFER *bp; + register LINE *lp; + register int s; + register int i; + long nbytes; /* # of bytes in current buffer */ + char b[7+1]; + char line[MAXLINE]; + + blistp->b_flag &= ~BFCHG; /* Don't complain! */ + if ((s=bclear(blistp)) != TRUE) /* Blow old text away */ + return (s); + strcpy(blistp->b_fname, ""); + if (addline("ACT MODES Size Buffer File") == FALSE + || addline("--- ----- ---- ------ ----") == FALSE) + return (FALSE); + bp = bheadp; /* For all buffers */ + + /* build line to report global mode settings */ + cp1 = &line[0]; + *cp1++ = ' '; + *cp1++ = ' '; + *cp1++ = ' '; + *cp1++ = ' '; + + /* output the mode codes */ + for (i = 0; i < NUMMODES; i++) + if (gmode & (1 << i)) + *cp1++ = modecode[i]; + else + *cp1++ = '.'; + strcpy(cp1, " Global Modes"); + if (addline(line) == FALSE) + return(FALSE); + + /* output the list of buffers */ + while (bp != NULL) { + /* skip invisable buffers if iflag is false */ + if (((bp->b_flag&BFINVS) != 0) && (iflag != TRUE)) { + bp = bp->b_bufp; + continue; + } + cp1 = &line[0]; /* Start at left edge */ + + /* output status of ACTIVE flag (has the file been read in? */ + if (bp->b_active == TRUE) /* "@" if activated */ + *cp1++ = '@'; + else + *cp1++ = ' '; + + /* output status of changed flag */ + if ((bp->b_flag&BFCHG) != 0) /* "*" if changed */ + *cp1++ = '*'; + else + *cp1++ = ' '; + + /* report if the file is truncated */ + if ((bp->b_flag&BFTRUNC) != 0) + *cp1++ = '#'; + else + *cp1++ = ' '; + + *cp1++ = ' '; /* space */ + + /* output the mode codes */ + for (i = 0; i < NUMMODES; i++) { + if (bp->b_mode & (1 << i)) + *cp1++ = modecode[i]; + else + *cp1++ = '.'; + } + *cp1++ = ' '; /* Gap. */ + nbytes = 0L; /* Count bytes in buf. */ + lp = lforw(bp->b_linep); + while (lp != bp->b_linep) { + nbytes += (long)llength(lp)+1L; + lp = lforw(lp); + } + ltoa(b, 7, nbytes); /* 6 digit buffer size. */ + cp2 = &b[0]; + while ((c = *cp2++) != 0) + *cp1++ = c; + *cp1++ = ' '; /* Gap. */ + cp2 = &bp->b_bname[0]; /* Buffer name */ + while ((c = *cp2++) != 0) + *cp1++ = c; + cp2 = &bp->b_fname[0]; /* File name */ + if (*cp2 != 0) { + while (cp1 < &line[3+1+5+1+6+4+NBUFN]) + *cp1++ = ' '; + while ((c = *cp2++) != 0) { + if (cp1 < &line[MAXLINE-1]) + *cp1++ = c; + } + } + *cp1 = 0; /* Add to the buffer. */ + if (addline(line) == FALSE) + return (FALSE); + bp = bp->b_bufp; + } + return (TRUE); /* All done */ +} + +ltoa(buf, width, num) + +char buf[]; +int width; +long num; + +{ + buf[width] = 0; /* End of string. */ + while (num >= 10) { /* Conditional digits. */ + buf[--width] = (int)(num%10L) + '0'; + num /= 10L; + } + buf[--width] = (int)num + '0'; /* Always 1 digit. */ + while (width != 0) /* Pad with blanks. */ + buf[--width] = ' '; +} + +/* + * The argument "text" points to + * a string. Append this line to the + * buffer list buffer. Handcraft the EOL + * on the end. Return TRUE if it worked and + * FALSE if you ran out of room. + */ +addline(text) +char *text; +{ + register LINE *lp; + register int i; + register int ntext; + + ntext = strlen(text); + if ((lp=lalloc(ntext)) == NULL) + return (FALSE); + for (i=0; ib_linep->l_bp->l_fp = lp; /* Hook onto the end */ + lp->l_bp = blistp->b_linep->l_bp; + blistp->b_linep->l_bp = lp; + lp->l_fp = blistp->b_linep; + if (blistp->b_dotp == blistp->b_linep) /* If "." is at the end */ + blistp->b_dotp = lp; /* move it to new line */ + return (TRUE); +} + +/* + * Look through the list of + * buffers. Return TRUE if there + * are any changed buffers. Buffers + * that hold magic internal stuff are + * not considered; who cares if the + * list of buffer names is hacked. + * Return FALSE if no buffers + * have been changed. + */ +anycb() +{ + register BUFFER *bp; + + bp = bheadp; + while (bp != NULL) { + if ((bp->b_flag&BFINVS)==0 && (bp->b_flag&BFCHG)!=0) + return (TRUE); + bp = bp->b_bufp; + } + return (FALSE); +} + +/* + * Find a buffer, by name. Return a pointer + * to the BUFFER structure associated with it. + * If the buffer is not found + * and the "cflag" is TRUE, create it. The "bflag" is + * the settings for the flags in in buffer. + */ +BUFFER * +bfind(bname, cflag, bflag) +register char *bname; +{ + register BUFFER *bp; + register BUFFER *sb; /* buffer to insert after */ + register LINE *lp; + char *malloc(); + + bp = bheadp; + while (bp != NULL) { + if (strcmp(bname, bp->b_bname) == 0) + return (bp); + bp = bp->b_bufp; + } + if (cflag != FALSE) { + if ((bp=(BUFFER *)malloc(sizeof(BUFFER))) == NULL) + return (NULL); + if ((lp=lalloc(0)) == NULL) { + free((char *) bp); + return (NULL); + } + /* find the place in the list to insert this buffer */ + if (bheadp == NULL || strcmp(bheadp->b_bname, bname) > 0) { + /* insert at the beginning */ + bp->b_bufp = bheadp; + bheadp = bp; + } else { + sb = bheadp; + while (sb->b_bufp != NULL) { + if (strcmp(sb->b_bufp->b_bname, bname) > 0) + break; + sb = sb->b_bufp; + } + + /* and insert it */ + bp->b_bufp = sb->b_bufp; + sb->b_bufp = bp; + } + + /* and set up the other buffer fields */ + bp->b_active = TRUE; + bp->b_dotp = lp; + bp->b_doto = 0; + bp->b_markp = NULL; + bp->b_marko = 0; + bp->b_flag = bflag; + bp->b_mode = gmode; + bp->b_nwnd = 0; + bp->b_linep = lp; + strcpy(bp->b_fname, ""); + strcpy(bp->b_bname, bname); +#if CRYPT + bp->b_key[0] = 0; +#endif + lp->l_fp = lp; + lp->l_bp = lp; + } + return (bp); +} + +/* + * This routine blows away all of the text + * in a buffer. If the buffer is marked as changed + * then we ask if it is ok to blow it away; this is + * to save the user the grief of losing text. The + * window chain is nearly always wrong if this gets + * called; the caller must arrange for the updates + * that are required. Return TRUE if everything + * looks good. + */ +bclear(bp) +register BUFFER *bp; +{ + register LINE *lp; + register int s; + + if ((bp->b_flag&BFINVS) == 0 /* Not scratch buffer. */ + && (bp->b_flag&BFCHG) != 0 /* Something changed */ + && (s=mlyesno("Discard changes")) != TRUE) + return (s); + bp->b_flag &= ~BFCHG; /* Not changed */ + while ((lp=lforw(bp->b_linep)) != bp->b_linep) + lfree(lp); + bp->b_dotp = bp->b_linep; /* Fix "." */ + bp->b_doto = 0; + bp->b_markp = NULL; /* Invalidate "mark" */ + bp->b_marko = 0; + return (TRUE); +} + +unmark(f, n) /* unmark the current buffers change flag */ + +int f, n; /* unused command arguments */ + +{ + curbp->b_flag &= ~BFCHG; + curwp->w_flag |= WFMODE; + return(TRUE); +} diff --git a/crypt.c b/crypt.c new file mode 100644 index 0000000..ffd27dc --- /dev/null +++ b/crypt.c @@ -0,0 +1,221 @@ +/* CRYPT.C + * + * Encryption routines + * + * written by Dana Hoggatt and Daniel Lawrence + */ + +#include +#include "estruct.h" +#include "edef.h" + +#if CRYPT + +static int mod95(); + +setkey(f, n) /* reset encryption key of current buffer */ + +int f; /* default flag */ +int n; /* numeric argument */ + +{ + register int status; /* return status */ + int odisinp; /* original vlaue of disinp */ + char key[NPAT]; /* new encryption string */ + + /* turn command input echo off */ + odisinp = disinp; + disinp = FALSE; + + /* get the string to use as an encrytion string */ + status = mlreply("Encryption String: ", key, NPAT - 1); + disinp = odisinp; + if (status != TRUE) + return(status); + + /* and encrypt it */ + crypt((char *)NULL, 0); + crypt(key, strlen(key)); + + /* and save it off */ + strcpy(curbp->b_key, key); + mlwrite(" "); /* clear it off the bottom line */ + return(TRUE); +} + +/********** + * + * crypt - in place encryption/decryption of a buffer + * + * (C) Copyright 1986, Dana L. Hoggatt + * 1216, Beck Lane, Lafayette, IN + * + * When consulting directly with the author of this routine, + * please refer to this routine as the "DLH-POLY-86-B CIPHER". + * + * This routine was written for Dan Lawrence, for use in V3.8 of + * MicroEMACS, a public domain text/program editor. + * + * I kept the following goals in mind when preparing this function: + * + * 1. All printable characters were to be encrypted back + * into the printable range, control characters and + * high-bit characters were to remain unaffected. this + * way, encrypted would still be just as cheap to + * transmit down a 7-bit data path as they were before. + * + * 2. The encryption had to be portable. The encrypted + * file from one computer should be able to be decrypted + * on another computer. + * + * 3. The encryption had to be inexpensive, both in terms + * of speed and space. + * + * 4. The system needed to be secure against all but the + * most determined of attackers. + * + * For encryption of a block of data, one calls crypt passing + * a pointer to the data block and its length. The data block is + * encrypted in place, that is, the encrypted output overwrites + * the input. Decryption is totally isomorphic, and is performed + * in the same manner by the same routine. + * + * Before using this routine for encrypting data, you are expected + * to specify an encryption key. This key is an arbitrary string, + * to be supplied by the user. To set the key takes two calls to + * crypt(). First, you call + * + * crypt(NULL, vector) + * + * This resets all internal control information. Typically (and + * specifically in the case on MICRO-emacs) you would use a "vector" + * of 0. Other values can be used to customize your editor to be + * "incompatable" with the normally distributed version. For + * this purpose, the best results will be obtained by avoiding + * multiples of 95. + * + * Then, you "encrypt" your password by calling + * + * crypt(pass, strlen(pass)) + * + * where "pass" is your password string. Crypt() will destroy + * the original copy of the password (it becomes encrypted), + * which is good. You do not want someone on a multiuser system + * to peruse your memory space and bump into your password. + * Still, it is a better idea to erase the password buffer to + * defeat memory perusal by a more technical snooper. + * + * For the interest of cryptologists, at the heart of this + * function is a Beaufort Cipher. The cipher alphabet is the + * range of printable characters (' ' to '~'), all "control" + * and "high-bit" characters are left unaltered. + * + * The key is a variant autokey, derived from a wieghted sum + * of all the previous clear text and cipher text. A counter + * is used as salt to obiterate any simple cyclic behavior + * from the clear text, and key feedback is used to assure + * that the entire message is based on the original key, + * preventing attacks on the last part of the message as if + * it were a pure autokey system. + * + * Overall security of encrypted data depends upon three + * factors: the fundamental cryptographic system must be + * difficult to compromise; exhaustive searching of the key + * space must be computationally expensive; keys and plaintext + * must remain out of sight. This system satisfies this set + * of conditions to within the degree desired for MicroEMACS. + * + * Though direct methods of attack (against systems such as + * this) do exist, they are not well known and will consume + * considerable amounts of computing time. An exhaustive + * search requires over a billion investigations, on average. + * + * The choice, entry, storage, manipulation, alteration, + * protection and security of the keys themselves are the + * responsiblity of the user. + * + **********/ + +crypt(bptr, len) +register char *bptr; /* buffer of characters to be encrypted */ +register unsigned len; /* number of characters in the buffer */ +{ + register int cc; /* current character being considered */ + + static long key = 0; /* 29 bit encipherment key */ + static int salt = 0; /* salt to spice up key with */ + + if (!bptr) { /* is there anything here to encrypt? */ + key = len; /* set the new key */ + salt = len; /* set the new salt */ + return; + } + while (len--) { /* for every character in the buffer */ + + cc = *bptr; /* get a character out of the buffer */ + + /* only encipher printable characters */ + if ((cc >= ' ') && (cc <= '~')) { + +/** If the upper bit (bit 29) is set, feed it back into the key. This + assures us that the starting key affects the entire message. **/ + + key &= 0x1FFFFFFFL; /* strip off overflow */ + if (key & 0x10000000L) { + key ^= 0x0040A001L; /* feedback */ + } + +/** Down-bias the character, perform a Beaufort encipherment, and + up-bias the character again. We want key to be positive + so that the left shift here will be more portable and the + mod95() faster **/ + + cc = mod95((int)(key % 95) - (cc - ' ')) + ' '; + +/** the salt will spice up the key a little bit, helping to obscure + any patterns in the clear text, particularly when all the + characters (or long sequences of them) are the same. We do + not want the salt to go negative, or it will affect the key + too radically. It is always a good idea to chop off cyclics + to prime values. **/ + + if (++salt >= 20857) { /* prime modulus */ + salt = 0; + } + +/** our autokey (a special case of the running key) is being + generated by a wieghted checksum of clear text, cipher + text, and salt. **/ + + key = key + key + cc + *bptr + salt; + } + *bptr++ = cc; /* put character back into buffer */ + } + return; +} + +static int mod95(val) + +register int val; + +{ + /* The mathematical MOD does not match the computer MOD */ + + /* Yes, what I do here may look strange, but it gets the + job done, and portably at that. */ + + while (val >= 9500) + val -= 9500; + while (val >= 950) + val -= 950; + while (val >= 95) + val -= 95; + while (val < 0) + val += 95; + return (val); +} +#else +nocrypt() +{ +} +#endif diff --git a/display.c b/display.c new file mode 100644 index 0000000..45aca3b --- /dev/null +++ b/display.c @@ -0,0 +1,1570 @@ +/* DISPLAY.C + * + * The functions in this file handle redisplay. There are two halves, the + * ones that update the virtual display screen, and the ones that make the + * physical display screen the same as the virtual display screen. These + * functions use hints that are left in the windows by the commands. + * + * modified by Petri Kutvonen + */ + +#include +#include "estruct.h" +#include "edef.h" + +typedef struct VIDEO { + int v_flag; /* Flags */ +#if COLOR + int v_fcolor; /* current forground color */ + int v_bcolor; /* current background color */ + int v_rfcolor; /* requested forground color */ + int v_rbcolor; /* requested background color */ +#endif + char v_text[1]; /* Screen data. */ +} VIDEO; + +#define VFCHG 0x0001 /* Changed flag */ +#define VFEXT 0x0002 /* extended (beyond column 80) */ +#define VFREV 0x0004 /* reverse video status */ +#define VFREQ 0x0008 /* reverse video request */ +#define VFCOL 0x0010 /* color change requested */ + +VIDEO **vscreen; /* Virtual screen. */ +#if MEMMAP == 0 || SCROLLCODE +VIDEO **pscreen; /* Physical screen. */ +#endif + +int displaying = TRUE; +#if UNIX +#include +#endif +#ifdef SIGWINCH +#include +/* for window size changes */ +int chg_width, chg_height; +#endif + +/* + * Initialize the data structures used by the display code. The edge vectors + * used to access the screens are set up. The operating system's terminal I/O + * channel is set up. All the other things get initialized at compile time. + * The original window has "WFCHG" set, so that it will get completely + * redrawn on the first call to "update". + */ +vtinit() +{ + register int i; + register VIDEO *vp; + char *malloc(); + + TTopen(); /* open the screen */ + TTkopen(); /* open the keyboard */ + TTrev(FALSE); + vscreen = (VIDEO **) malloc(term.t_mrow*sizeof(VIDEO *)); + + if (vscreen == NULL) + exit(1); + +#if MEMMAP == 0 || SCROLLCODE + pscreen = (VIDEO **) malloc(term.t_mrow*sizeof(VIDEO *)); + + if (pscreen == NULL) + exit(1); +#endif + + for (i = 0; i < term.t_mrow; ++i) + { + vp = (VIDEO *) malloc(sizeof(VIDEO)+term.t_mcol); + + if (vp == NULL) + exit(1); + + vp->v_flag = 0; +#if COLOR + vp->v_rfcolor = 7; + vp->v_rbcolor = 0; +#endif + vscreen[i] = vp; +#if MEMMAP == 0 || SCROLLCODE + vp = (VIDEO *) malloc(sizeof(VIDEO)+term.t_mcol); + + if (vp == NULL) + exit(1); + + vp->v_flag = 0; + pscreen[i] = vp; +#endif + } +} + +#if CLEAN +/* free up all the dynamically allocated video structures */ + +vtfree() +{ + int i; + for (i = 0; i < term.t_mrow; ++i) { + free(vscreen[i]); +#if MEMMAP == 0 || SCROLLCODE + free(pscreen[i]); +#endif + } + free(vscreen); +#if MEMMAP == 0 || SCROLLCODE + free(pscreen); +#endif +} +#endif + +/* + * Clean up the virtual terminal system, in anticipation for a return to the + * operating system. Move down to the last line and clear it out (the next + * system prompt will be written in the line). Shut down the channel to the + * terminal. + */ +vttidy() +{ + mlerase(); + movecursor(term.t_nrow, 0); + TTflush(); + TTclose(); + TTkclose(); +#ifdef PKCODE + write(1, "\r", 1); +#endif +} + +/* + * Set the virtual cursor to the specified row and column on the virtual + * screen. There is no checking for nonsense values; this might be a good + * idea during the early stages. + */ +vtmove(row, col) +{ + vtrow = row; + vtcol = col; +} + +/* Write a character to the virtual screen. The virtual row and + column are updated. If we are not yet on left edge, don't print + it yet. If the line is too long put a "$" in the last column. + This routine only puts printing characters into the virtual + terminal buffers. Only column overflow is checked. +*/ + +vtputc(c) + +int c; + +{ + register VIDEO *vp; /* ptr to line being updated */ + + vp = vscreen[vtrow]; + + if (vtcol >= term.t_ncol) { + ++vtcol; + vp->v_text[term.t_ncol - 1] = '$'; + } else if (c < 0x20 || c == 0x7F) { + if (c == '\t') { + do { + vtputc(' '); + } while (((vtcol + taboff)&tabmask) != 0); + } else { + vtputc('^'); + vtputc(c ^ 0x40); + } + } else { + if (vtcol >= 0) + vp->v_text[vtcol] = c; + ++vtcol; + } +} + +/* + * Erase from the end of the software cursor to the end of the line on which + * the software cursor is located. + */ +vteeol() +{ +/* register VIDEO *vp; */ + register char *vcp = vscreen[vtrow]->v_text; + +/* vp = vscreen[vtrow]; */ + while (vtcol < term.t_ncol) +/* vp->v_text[vtcol++] = ' '; */ + vcp[vtcol++] = ' '; +} + +/* upscreen: user routine to force a screen update + always finishes complete update */ + +upscreen(f, n) + +{ + update(TRUE); + return(TRUE); +} + +#if SCROLLCODE +int scrflags; +#endif + +/* + * Make sure that the display is right. This is a three part process. First, + * scan through all of the windows looking for dirty ones. Check the framing, + * and refresh the screen. Second, make sure that "currow" and "curcol" are + * correct for the current window. Third, make the virtual and physical + * screens the same. + */ +update(force) + +int force; /* force update past type ahead? */ + +{ + register WINDOW *wp; + +#if TYPEAH && ! PKCODE + if (force == FALSE && typahead()) + return(TRUE); +#endif +#if VISMAC == 0 + if (force == FALSE && kbdmode == PLAY) + return(TRUE); +#endif + + displaying = TRUE; + +#if SCROLLCODE + + /* first, propagate mode line changes to all instances of + a buffer displayed in more than one window */ + wp = wheadp; + while (wp != NULL) { + if (wp->w_flag & WFMODE) { + if (wp->w_bufp->b_nwnd > 1) { + /* make sure all previous windows have this */ + register WINDOW *owp; + owp = wheadp; + while (owp != NULL) { + if (owp->w_bufp == wp->w_bufp) + owp->w_flag |= WFMODE; + owp = owp->w_wndp; + } + } + } + wp = wp->w_wndp; + } + +#endif + + /* update any windows that need refreshing */ + wp = wheadp; + while (wp != NULL) { + if (wp->w_flag) { + /* if the window has changed, service it */ + reframe(wp); /* check the framing */ +#if SCROLLCODE + if (wp->w_flag & (WFKILLS|WFINS)) { + scrflags |= (wp->w_flag & (WFINS|WFKILLS)); + wp->w_flag &= ~(WFKILLS|WFINS); + } +#endif + if ((wp->w_flag & ~WFMODE) == WFEDIT) + updone(wp); /* update EDITed line */ + else if (wp->w_flag & ~WFMOVE) + updall(wp); /* update all lines */ +#if SCROLLCODE + if (scrflags || (wp->w_flag & WFMODE)) +#else + if (wp->w_flag & WFMODE) +#endif + modeline(wp); /* update modeline */ + wp->w_flag = 0; + wp->w_force = 0; + } + /* on to the next window */ + wp = wp->w_wndp; + } + + /* recalc the current hardware cursor location */ + updpos(); + +#if MEMMAP && ! SCROLLCODE + /* update the cursor and flush the buffers */ + movecursor(currow, curcol - lbound); +#endif + + /* check for lines to de-extend */ + upddex(); + + /* if screen is garbage, re-plot it */ + if (sgarbf != FALSE) + updgar(); + + /* update the virtual screen to the physical screen */ + updupd(force); + + /* update the cursor and flush the buffers */ + movecursor(currow, curcol - lbound); + TTflush(); + displaying = FALSE; +#if SIGWINCH + while (chg_width || chg_height) + newscreensize(chg_height,chg_width); +#endif + return(TRUE); +} + +/* reframe: check to see if the cursor is on in the window + and re-frame it if needed or wanted */ + +reframe(wp) + +WINDOW *wp; + +{ + register LINE *lp, *lp0; + register int i; + + /* if not a requested reframe, check for a needed one */ + if ((wp->w_flag & WFFORCE) == 0) { +#if SCROLLCODE + /* loop from one line above the window to one line after */ + lp = wp->w_linep; + lp0 = lback(lp); + if (lp0 == wp->w_bufp->b_linep) + i = 0; + else { + i = -1; + lp = lp0; + } + for (; i <= (int)(wp->w_ntrows); i++) +#else + lp = wp->w_linep; + for (i = 0; i < wp->w_ntrows; i++) +#endif + { + /* if the line is in the window, no reframe */ + if (lp == wp->w_dotp) { +#if SCROLLCODE + /* if not _quite_ in, we'll reframe gently */ + if ( i < 0 || i == wp->w_ntrows) { + /* if the terminal can't help, then + we're simply outside */ + if (term.t_scroll == NULL) + i = wp->w_force; + break; + } +#endif + return(TRUE); + } + + /* if we are at the end of the file, reframe */ + if (lp == wp->w_bufp->b_linep) + break; + + /* on to the next line */ + lp = lforw(lp); + } + } + +#if SCROLLCODE + if (i == -1) { /* we're just above the window */ + i = scrollcount; /* put dot at first line */ + scrflags |= WFINS; + } else if (i == wp->w_ntrows) { /* we're just below the window */ + i = -scrollcount; /* put dot at last line */ + scrflags |= WFKILLS; + } else /* put dot where requested */ +#endif + i = wp->w_force; /* (is 0, unless reposition() was called) */ + + wp->w_flag |= WFMODE; + + /* how far back to reframe? */ + if (i > 0) { /* only one screen worth of lines max */ + if (--i >= wp->w_ntrows) + i = wp->w_ntrows - 1; + } else if (i < 0) { /* negative update???? */ + i += wp->w_ntrows; + if (i < 0) + i = 0; + } else + i = wp->w_ntrows / 2; + + /* backup to new line at top of window */ + lp = wp->w_dotp; + while (i != 0 && lback(lp) != wp->w_bufp->b_linep) { + --i; + lp = lback(lp); + } + + /* and reset the current line at top of window */ + wp->w_linep = lp; + wp->w_flag |= WFHARD; + wp->w_flag &= ~WFFORCE; + return(TRUE); +} + +/* updone: update the current line to the virtual screen */ + +updone(wp) + +WINDOW *wp; /* window to update current line in */ + +{ + register LINE *lp; /* line to update */ + register int sline; /* physical screen line to update */ + register int i; + + /* search down the line we want */ + lp = wp->w_linep; + sline = wp->w_toprow; + while (lp != wp->w_dotp) { + ++sline; + lp = lforw(lp); + } + + /* and update the virtual line */ + vscreen[sline]->v_flag |= VFCHG; + vscreen[sline]->v_flag &= ~VFREQ; + vtmove(sline, 0); + for (i=0; i < llength(lp); ++i) + vtputc(lgetc(lp, i)); +#if COLOR + vscreen[sline]->v_rfcolor = wp->w_fcolor; + vscreen[sline]->v_rbcolor = wp->w_bcolor; +#endif + vteeol(); +} + +/* updall: update all the lines in a window on the virtual screen */ + +updall(wp) + +WINDOW *wp; /* window to update lines in */ + +{ + register LINE *lp; /* line to update */ + register int sline; /* physical screen line to update */ + register int i; + + /* search down the lines, updating them */ + lp = wp->w_linep; + sline = wp->w_toprow; + while (sline < wp->w_toprow + wp->w_ntrows) { + + /* and update the virtual line */ + vscreen[sline]->v_flag |= VFCHG; + vscreen[sline]->v_flag &= ~VFREQ; + vtmove(sline, 0); + if (lp != wp->w_bufp->b_linep) { + /* if we are not at the end */ + for (i=0; i < llength(lp); ++i) + vtputc(lgetc(lp, i)); + lp = lforw(lp); + } + + /* on to the next one */ +#if COLOR + vscreen[sline]->v_rfcolor = wp->w_fcolor; + vscreen[sline]->v_rbcolor = wp->w_bcolor; +#endif + vteeol(); + ++sline; + } + +} + +/* updpos: update the position of the hardware cursor and handle extended + lines. This is the only update for simple moves. */ + +updpos() + +{ + register LINE *lp; + register int c; + register int i; + + /* find the current row */ + lp = curwp->w_linep; + currow = curwp->w_toprow; + while (lp != curwp->w_dotp) { + ++currow; + lp = lforw(lp); + } + + /* find the current column */ + curcol = 0; + i = 0; + while (i < curwp->w_doto) { + c = lgetc(lp, i++); + if (c == '\t') + curcol |= tabmask; + else + if (c < 0x20 || c == 0x7f) + ++curcol; + + ++curcol; + } + + /* if extended, flag so and update the virtual line image */ + if (curcol >= term.t_ncol - 1) { + vscreen[currow]->v_flag |= (VFEXT | VFCHG); + updext(); + } else + lbound = 0; +} + +/* upddex: de-extend any line that derserves it */ + +upddex() + +{ + register WINDOW *wp; + register LINE *lp; + register int i,j; + + wp = wheadp; + + while (wp != NULL) { + lp = wp->w_linep; + i = wp->w_toprow; + + while (i < wp->w_toprow + wp->w_ntrows) { + if (vscreen[i]->v_flag & VFEXT) { + if ((wp != curwp) || (lp != wp->w_dotp) || + (curcol < term.t_ncol - 1)) { + vtmove(i, 0); + for (j = 0; j < llength(lp); ++j) + vtputc(lgetc(lp, j)); + vteeol(); + + /* this line no longer is extended */ + vscreen[i]->v_flag &= ~VFEXT; + vscreen[i]->v_flag |= VFCHG; + } + } + lp = lforw(lp); + ++i; + } + /* and onward to the next window */ + wp = wp->w_wndp; + } +} + +/* updgar: if the screen is garbage, clear the physical screen and + the virtual screen and force a full update */ + +updgar() + +{ + register char *txt; + register int i,j; + + for (i = 0; i < term.t_nrow; ++i) { + vscreen[i]->v_flag |= VFCHG; +#if REVSTA + vscreen[i]->v_flag &= ~VFREV; +#endif +#if COLOR + vscreen[i]->v_fcolor = gfcolor; + vscreen[i]->v_bcolor = gbcolor; +#endif +#if MEMMAP == 0 || SCROLLCODE + txt = pscreen[i]->v_text; + for (j = 0; j < term.t_ncol; ++j) + txt[j] = ' '; +#endif + } + + movecursor(0, 0); /* Erase the screen. */ + (*term.t_eeop)(); + sgarbf = FALSE; /* Erase-page clears */ + mpresf = FALSE; /* the message area. */ +#if COLOR + mlerase(); /* needs to be cleared if colored */ +#endif +} + +/* updupd: update the physical screen from the virtual screen */ + +updupd(force) + +int force; /* forced update flag */ + +{ + register VIDEO *vp1; + register int i; + +#if SCROLLCODE + if (scrflags & WFKILLS) + scrolls(FALSE); + if (scrflags & WFINS) + scrolls(TRUE); + scrflags = 0; +#endif + + for (i = 0; i < term.t_nrow; ++i) { + vp1 = vscreen[i]; + + /* for each line that needs to be updated*/ + if ((vp1->v_flag & VFCHG) != 0) { +#if TYPEAH && ! PKCODE + if (force == FALSE && typahead()) + return(TRUE); +#endif +#if MEMMAP && ! SCROLLCODE + updateline(i, vp1); +#else + updateline(i, vp1, pscreen[i]); +#endif + } + } + return(TRUE); +} + +#if SCROLLCODE + +/* optimize out scrolls (line breaks, and newlines) */ +/* arg. chooses between looking for inserts or deletes */ +int +scrolls(inserts) /* returns true if it does something */ +{ + struct VIDEO *vpv ; /* virtual screen image */ + struct VIDEO *vpp ; /* physical screen image */ + int i, j, k ; + int rows, cols ; + int first, match, count, ptarget, vtarget, end ; + int longmatch, longcount; + int from, to; + + if (!term.t_scroll) /* no way to scroll */ + return FALSE; + + rows = term.t_nrow ; + cols = term.t_ncol ; + + first = -1 ; + for (i = 0; i < rows; i++) { /* find first wrong line */ + if (!texttest(i,i)) { + first = i; + break; + } + } + + if (first < 0) + return FALSE; /* no text changes */ + + vpv = vscreen[first] ; + vpp = pscreen[first] ; + + if (inserts) { + /* determine types of potential scrolls */ + end = endofline(vpv->v_text,cols) ; + if ( end == 0 ) + ptarget = first ; /* newlines */ + else if ( strncmp(vpp->v_text, vpv->v_text, end) == 0 ) + ptarget = first + 1 ; /* broken line newlines */ + else + ptarget = first ; + } else { + vtarget = first + 1 ; + } + + /* find the matching shifted area */ + match = -1 ; + longmatch = -1; + longcount = 0; + from = inserts ? ptarget : vtarget; + for (i = from+1; i < rows-longcount /* P.K. */; i++) { + if (inserts ? texttest(i,from) : texttest(from,i) ) { + match = i ; + count = 1 ; + for (j=match+1, k=from+1; j 0 && texttest(first, match-1)) { + vtarget-- ; + match-- ; + count++ ; + } + } + + /* do the scroll */ + if (match>0 && count>2) { /* got a scroll */ + /* move the count lines starting at ptarget to match */ + if (inserts) { + from = ptarget; + to = match; + } else { + from = match; + to = vtarget; + } +#if 0 + { + char line[NLINE]; + sprintf(line, + "scrolls: move the %d lines starting at %d to %d, first %d, scrolls %d", + count,from,to,first, 2*count >= abs(from-to)); + mlwrite(line); + } +#endif + if (2*count < abs(from-to)) + return(FALSE); + scrscroll(from, to, count) ; + for (i = 0; i < count; i++) { + vpp = pscreen[to+i] ; + vpv = vscreen[to+i]; + strncpy(vpp->v_text, vpv->v_text, cols) ; + vpp->v_flag = vpv->v_flag; /* XXX */ + if (vpp->v_flag & VFREV) { + vpp->v_flag &= ~VFREV; + vpp->v_flag |= ~VFREQ; + } +#if MEMMAP + vscreen[to+i]->v_flag &= ~VFCHG; +#endif + } + if (inserts) { + from = ptarget; + to = match; + } else { + from = vtarget+count; + to = match+count; + } +#if MEMMAP == 0 + for (i = from; i < to; i++) { + char *txt; + txt = pscreen[i]->v_text; + for (j = 0; j < term.t_ncol; ++j) + txt[j] = ' '; + vscreen[i]->v_flag |= VFCHG; + } +#endif + return(TRUE) ; + } + return(FALSE) ; +} + +/* move the "count" lines starting at "from" to "to" */ +scrscroll(from, to, count) +{ + ttrow = ttcol = -1; + (*term.t_scroll)(from,to,count); +} + +texttest(vrow,prow) /* return TRUE on text match */ +int vrow, prow ; /* virtual, physical rows */ +{ +struct VIDEO *vpv = vscreen[vrow] ; /* virtual screen image */ +struct VIDEO *vpp = pscreen[prow] ; /* physical screen image */ + + return (!memcmp(vpv->v_text, vpp->v_text, term.t_ncol)) ; +} + +/* return the index of the first blank of trailing whitespace */ +int +endofline(s,n) +char *s ; +{ +int i ; + for (i = n - 1; i >= 0; i--) + if (s[i] != ' ') return(i+1) ; + return(0) ; +} + +#endif /* SCROLLCODE */ + +/* updext: update the extended line which the cursor is currently + on at a column greater than the terminal width. The line + will be scrolled right or left to let the user see where + the cursor is + */ + +updext() + +{ + register int rcursor; /* real cursor location */ + register LINE *lp; /* pointer to current line */ + register int j; /* index into line */ + + /* calculate what column the real cursor will end up in */ + rcursor = ((curcol - term.t_ncol) % term.t_scrsiz) + term.t_margin; + taboff = lbound = curcol - rcursor + 1; + + /* scan through the line outputing characters to the virtual screen */ + /* once we reach the left edge */ + vtmove(currow, -lbound); /* start scanning offscreen */ + lp = curwp->w_dotp; /* line to output */ + for (j=0; jv_text[0] = '$'; +} + +/* + * Update a single line. This does not know how to use insert or delete + * character sequences; we are using VT52 functionality. Update the physical + * row and column variables. It does try an exploit erase to end of line. The + * RAINBOW version of this routine uses fast video. + */ +#if MEMMAP +/* UPDATELINE specific code for the IBM-PC and other compatables */ + +updateline(row, vp1 +#if SCROLLCODE + , vp2 +#endif +) + +int row; /* row of screen to update */ +struct VIDEO *vp1; /* virtual screen image */ + +#if SCROLLCODE +struct VIDEO *vp2; +#endif +{ +#if SCROLLCODE + register char *cp1; + register char *cp2; + register int nch; + + cp1 = &vp1->v_text[0]; + cp2 = &vp2->v_text[0]; + nch = term.t_ncol; + do + { + *cp2 = *cp1; + ++cp2; + ++cp1; + } + while (--nch); +#endif +#if COLOR + scwrite(row, vp1->v_text, vp1->v_rfcolor, vp1->v_rbcolor); + vp1->v_fcolor = vp1->v_rfcolor; + vp1->v_bcolor = vp1->v_rbcolor; +#else + if (vp1->v_flag & VFREQ) + scwrite(row, vp1->v_text, 0, 7); + else + scwrite(row, vp1->v_text, 7, 0); +#endif + vp1->v_flag &= ~(VFCHG | VFCOL); /* flag this line as changed */ + +} + +#else + +updateline(row, vp1, vp2) + +int row; /* row of screen to update */ +struct VIDEO *vp1; /* virtual screen image */ +struct VIDEO *vp2; /* physical screen image */ + +{ +#if RAINBOW +/* UPDATELINE specific code for the DEC rainbow 100 micro */ + + register char *cp1; + register char *cp2; + register int nch; + + /* since we don't know how to make the rainbow do this, turn it off */ + flags &= (~VFREV & ~VFREQ); + + cp1 = &vp1->v_text[0]; /* Use fast video. */ + cp2 = &vp2->v_text[0]; + putline(row+1, 1, cp1); + nch = term.t_ncol; + + do + { + *cp2 = *cp1; + ++cp2; + ++cp1; + } + while (--nch); + *flags &= ~VFCHG; +#else +/* UPDATELINE code for all other versions */ + + register char *cp1; + register char *cp2; + register char *cp3; + register char *cp4; + register char *cp5; + register int nbflag; /* non-blanks to the right flag? */ + int rev; /* reverse video flag */ + int req; /* reverse video request flag */ + + + /* set up pointers to virtual and physical lines */ + cp1 = &vp1->v_text[0]; + cp2 = &vp2->v_text[0]; + +#if COLOR + TTforg(vp1->v_rfcolor); + TTbacg(vp1->v_rbcolor); +#endif + +#if REVSTA | COLOR + /* if we need to change the reverse video status of the + current line, we need to re-write the entire line */ + rev = (vp1->v_flag & VFREV) == VFREV; + req = (vp1->v_flag & VFREQ) == VFREQ; + if ((rev != req) +#if COLOR + || (vp1->v_fcolor != vp1->v_rfcolor) || (vp1->v_bcolor != vp1->v_rbcolor) +#endif + ) { + movecursor(row, 0); /* Go to start of line. */ + /* set rev video if needed */ + if (rev != req) + (*term.t_rev)(req); + + /* scan through the line and dump it to the screen and + the virtual screen array */ + cp3 = &vp1->v_text[term.t_ncol]; + while (cp1 < cp3) { + TTputc(*cp1); + ++ttcol; + *cp2++ = *cp1++; + } + /* turn rev video off */ + if (rev != req) + (*term.t_rev)(FALSE); + + /* update the needed flags */ + vp1->v_flag &= ~VFCHG; + if (req) + vp1->v_flag |= VFREV; + else + vp1->v_flag &= ~VFREV; +#if COLOR + vp1->v_fcolor = vp1->v_rfcolor; + vp1->v_bcolor = vp1->v_rbcolor; +#endif + return(TRUE); + } +#endif + + /* advance past any common chars at the left */ + while (cp1 != &vp1->v_text[term.t_ncol] && cp1[0] == cp2[0]) { + ++cp1; + ++cp2; + } + +/* This can still happen, even though we only call this routine on changed + * lines. A hard update is always done when a line splits, a massive + * change is done, or a buffer is displayed twice. This optimizes out most + * of the excess updating. A lot of computes are used, but these tend to + * be hard operations that do a lot of update, so I don't really care. + */ + /* if both lines are the same, no update needs to be done */ + if (cp1 == &vp1->v_text[term.t_ncol]) { + vp1->v_flag &= ~VFCHG; /* flag this line is changed */ + return(TRUE); + } + + /* find out if there is a match on the right */ + nbflag = FALSE; + cp3 = &vp1->v_text[term.t_ncol]; + cp4 = &vp2->v_text[term.t_ncol]; + + while (cp3[-1] == cp4[-1]) { + --cp3; + --cp4; + if (cp3[0] != ' ') /* Note if any nonblank */ + nbflag = TRUE; /* in right match. */ + } + + cp5 = cp3; + + /* Erase to EOL ? */ + if (nbflag == FALSE && eolexist == TRUE && (req != TRUE)) { + while (cp5!=cp1 && cp5[-1]==' ') + --cp5; + + if (cp3-cp5 <= 3) /* Use only if erase is */ + cp5 = cp3; /* fewer characters. */ + } + + movecursor(row, cp1 - &vp1->v_text[0]); /* Go to start of line. */ +#if REVSTA + TTrev(rev); +#endif + + while (cp1 != cp5) { /* Ordinary. */ + TTputc(*cp1); + ++ttcol; + *cp2++ = *cp1++; + } + + if (cp5 != cp3) { /* Erase. */ + TTeeol(); + while (cp1 != cp3) + *cp2++ = *cp1++; + } +#if REVSTA + TTrev(FALSE); +#endif + vp1->v_flag &= ~VFCHG; /* flag this line as updated */ + return(TRUE); +#endif +} +#endif + +/* + * Redisplay the mode line for the window pointed to by the "wp". This is the + * only routine that has any idea of how the modeline is formatted. You can + * change the modeline format by hacking at this routine. Called by "update" + * any time there is a dirty window. + */ +modeline(wp) + WINDOW *wp; +{ + register char *cp; + register int c; + register int n; /* cursor position count */ + register BUFFER *bp; + register int i; /* loop index */ + register int lchar; /* character to draw line in buffer with */ + register int firstm; /* is this the first mode? */ + char tline[NLINE]; /* buffer for part of mode line */ + + n = wp->w_toprow+wp->w_ntrows; /* Location. */ + vscreen[n]->v_flag |= VFCHG | VFREQ | VFCOL;/* Redraw next time. */ +#if COLOR + vscreen[n]->v_rfcolor = 0; /* black on */ + vscreen[n]->v_rbcolor = 7; /* white.....*/ +#endif + vtmove(n, 0); /* Seek to right line. */ + if (wp == curwp) /* mark the current buffer */ +#if PKCODE + lchar = '-'; +#else + lchar = '='; +#endif + else +#if REVSTA + if (revexist) + lchar = ' '; + else +#endif + lchar = '-'; + + bp = wp->w_bufp; +#if PKCODE == 0 + if ((bp->b_flag&BFTRUNC) != 0) + vtputc('#'); + else +#endif + vtputc(lchar); + + if ((bp->b_flag&BFCHG) != 0) /* "*" if changed. */ + vtputc('*'); + else + vtputc(lchar); + + n = 2; + + strcpy(tline, " "); + strcat(tline, PROGNAME); + strcat(tline, " "); + strcat(tline, VERSION); + strcat(tline, ": "); + cp = &tline[0]; + while ((c = *cp++) != 0) + { + vtputc(c); + ++n; + } + + cp = &bp->b_bname[0]; + while ((c = *cp++) != 0) + { + vtputc(c); + ++n; + } + + strcpy(tline, " ("); + + /* display the modes */ + + firstm = TRUE; + if ((bp->b_flag&BFTRUNC) != 0) + { + firstm = FALSE; + strcat(tline, "Truncated"); + } + for (i = 0; i < NUMMODES; i++) /* add in the mode flags */ + if (wp->w_bufp->b_mode & (1 << i)) { + if (firstm != TRUE) + strcat(tline, " "); + firstm = FALSE; + strcat(tline, mode2name[i]); + } + strcat(tline,") "); + + cp = &tline[0]; + while ((c = *cp++) != 0) + { + vtputc(c); + ++n; + } + +#if 0 + vtputc(lchar); + vtputc((wp->w_flag&WFCOLR) != 0 ? 'C' : lchar); + vtputc((wp->w_flag&WFMODE) != 0 ? 'M' : lchar); + vtputc((wp->w_flag&WFHARD) != 0 ? 'H' : lchar); + vtputc((wp->w_flag&WFEDIT) != 0 ? 'E' : lchar); + vtputc((wp->w_flag&WFMOVE) != 0 ? 'V' : lchar); + vtputc((wp->w_flag&WFFORCE) != 0 ? 'F' : lchar); + vtputc(lchar); + n += 8; +#endif + +#if PKCODE + if (bp->b_fname[0] != 0 && + strcmp(bp->b_bname, bp->b_fname) != 0) +#else + if (bp->b_fname[0] != 0) /* File name. */ +#endif + { +#if PKCODE == 0 + cp = "File: "; + + while ((c = *cp++) != 0) + { + vtputc(c); + ++n; + } +#endif + + cp = &bp->b_fname[0]; + + while ((c = *cp++) != 0) + { + vtputc(c); + ++n; + } + + vtputc(' '); + ++n; + } + + while (n < term.t_ncol) /* Pad to full width. */ + { + vtputc(lchar); + ++n; + } + + { /* determine if top line, bottom line, or both are visible */ + LINE *lp = wp->w_linep; + int rows = wp->w_ntrows; + char *msg = NULL; + + vtcol = n - 7; /* strlen(" top ") plus a couple */ + while (rows--) { + lp = lforw(lp); + if (lp == wp->w_bufp->b_linep) { + msg = " Bot "; + break; + } + } + if (lback(wp->w_linep) == wp->w_bufp->b_linep) { + if (msg) { + if (wp->w_linep == wp->w_bufp->b_linep) + msg = " Emp "; + else + msg = " All "; + } else { + msg = " Top "; + } + } + if (!msg) + { + LINE *lp; + int numlines, predlines, ratio; + + lp = lforw(bp->b_linep); + numlines = 0; + while (lp != bp->b_linep) { + if (lp == wp->w_linep) { + predlines = numlines; + } + ++numlines; + lp = lforw(lp); + } + if (wp->w_dotp == bp->b_linep) { + msg = " Bot "; + } else { + ratio = 0; + if (numlines != 0) + ratio = (100L*predlines) / numlines; + if (ratio > 99) + ratio = 99; + sprintf(tline, " %2d%% ", ratio); + msg = tline; + } + } + + cp = msg; + while ((c = *cp++) != 0) + { + vtputc(c); + ++n; + } + } +} + +upmode() /* update all the mode lines */ + +{ + register WINDOW *wp; + + wp = wheadp; + while (wp != NULL) { + wp->w_flag |= WFMODE; + wp = wp->w_wndp; + } +} + +/* + * Send a command to the terminal to move the hardware cursor to row "row" + * and column "col". The row and column arguments are origin 0. Optimize out + * random calls. Update "ttrow" and "ttcol". + */ +movecursor(row, col) + { + if (row!=ttrow || col!=ttcol) + { + ttrow = row; + ttcol = col; + TTmove(row, col); + } + } + +/* + * Erase the message line. This is a special routine because the message line + * is not considered to be part of the virtual screen. It always works + * immediately; the terminal buffer is flushed via a call to the flusher. + */ +mlerase() + { + int i; + + movecursor(term.t_nrow, 0); + if (discmd == FALSE) + return; + +#if COLOR + TTforg(7); + TTbacg(0); +#endif + if (eolexist == TRUE) + TTeeol(); + else { + for (i = 0; i < term.t_ncol - 1; i++) + TTputc(' '); + movecursor(term.t_nrow, 1); /* force the move! */ + movecursor(term.t_nrow, 0); + } + TTflush(); + mpresf = FALSE; + } + +/* + * Write a message into the message line. Keep track of the physical cursor + * position. A small class of printf like format items is handled. Assumes the + * stack grows down; this assumption is made by the "++" in the argument scan + * loop. Set the "message line" flag TRUE. + */ + +mlwrite(fmt, arg) + +char *fmt; /* format string for output */ +char *arg; /* pointer to first argument to print */ + +{ + register int c; /* current char in format string */ + register char *ap; /* ptr to current data field */ + + /* if we are not currently echoing on the command line, abort this */ + if (discmd == FALSE) { + movecursor(term.t_nrow, 0); + return; + } + +#if COLOR + /* set up the proper colors for the command line */ + TTforg(7); + TTbacg(0); +#endif + + /* if we can not erase to end-of-line, do it manually */ + if (eolexist == FALSE) { + mlerase(); + TTflush(); + } + + movecursor(term.t_nrow, 0); + ap = (char *) &arg; + while ((c = *fmt++) != 0) { + if (c != '%') { + TTputc(c); + ++ttcol; + } else { + c = *fmt++; + switch (c) { +#if PKCODE + case '*': + ap = *(char **)ap; + break; +#endif + case 'd': + mlputi(*(int *)ap, 10); + ap += sizeof(int); + break; + + case 'o': + mlputi(*(int *)ap, 8); + ap += sizeof(int); + break; + + case 'x': + mlputi(*(int *)ap, 16); + ap += sizeof(int); + break; + + case 'D': + mlputli(*(long *)ap, 10); + ap += sizeof(long); + break; + + case 's': + mlputs(*(char **)ap); + ap += sizeof(char *); + break; + + case 'f': + mlputf(*(int *)ap); + ap += sizeof(int); + break; + + default: + TTputc(c); + ++ttcol; + } + } + } + + /* if we can, erase to the end of screen */ + if (eolexist == TRUE) + TTeeol(); + TTflush(); + mpresf = TRUE; +} + +/* Force a string out to the message line regardless of the + current $discmd setting. This is needed when $debug is TRUE + and for the write-message and clear-message-line commands +*/ + +mlforce(s) + +char *s; /* string to force out */ + +{ + register int oldcmd; /* original command display flag */ + + oldcmd = discmd; /* save the discmd value */ + discmd = TRUE; /* and turn display on */ + mlwrite(s); /* write the string out */ + discmd = oldcmd; /* and restore the original setting */ +} + +/* + * Write out a string. Update the physical cursor position. This assumes that + * the characters in the string all have width "1"; if this is not the case + * things will get screwed up a little. + */ +mlputs(s) + char *s; + { + register int c; + + while ((c = *s++) != 0) + { + TTputc(c); + ++ttcol; + } + } + +/* + * Write out an integer, in the specified radix. Update the physical cursor + * position. + */ +mlputi(i, r) + { + register int q; + static char hexdigits[] = "0123456789ABCDEF"; + + if (i < 0) + { + i = -i; + TTputc('-'); + } + + q = i/r; + + if (q != 0) + mlputi(q, r); + + TTputc(hexdigits[i%r]); + ++ttcol; + } + +/* + * do the same except as a long integer. + */ +mlputli(l, r) + long l; + { + register long q; + + if (l < 0) + { + l = -l; + TTputc('-'); + } + + q = l/r; + + if (q != 0) + mlputli(q, r); + + TTputc((int)(l%r)+'0'); + ++ttcol; + } + +/* + * write out a scaled integer with two decimal places + */ + +mlputf(s) + +int s; /* scaled integer to output */ + +{ + int i; /* integer portion of number */ + int f; /* fractional portion of number */ + + /* break it up */ + i = s / 100; + f = s % 100; + + /* send out the integer portion */ + mlputi(i, 10); + TTputc('.'); + TTputc((f / 10) + '0'); + TTputc((f % 10) + '0'); + ttcol += 3; +} + +#if RAINBOW + +putline(row, col, buf) + int row, col; + char buf[]; + { + int n; + + n = strlen(buf); + if (col + n - 1 > term.t_ncol) + n = term.t_ncol - col + 1; + Put_Data(row, col, n, buf); + } +#endif + +/* Get terminal size from system. + Store number of lines into *heightp and width into *widthp. + If zero or a negative number is stored, the value is not valid. */ + +getscreensize (widthp, heightp) +int *widthp, *heightp; +{ +#ifdef TIOCGWINSZ + struct winsize size; + *widthp = 0; + *heightp = 0; + if (ioctl (0, TIOCGWINSZ, &size) < 0) + return; + *widthp = size.ws_col; + *heightp = size.ws_row; +#else + *widthp = 0; + *heightp = 0; +#endif +} + +#ifdef SIGWINCH +void sizesignal(signr) +int signr; +{ + int w, h; + extern int errno; + int old_errno = errno; + + getscreensize (&w, &h); + + if (h && w && (h-1 != term.t_nrow || w != term.t_ncol)) + newscreensize(h, w); + + signal (SIGWINCH, sizesignal); + errno = old_errno; +} + +newscreensize (h, w) +int h, w; +{ + /* do the change later */ + if (displaying) { + chg_width = w; + chg_height = h; + return; + } + chg_width = chg_height = 0; + if (h - 1 < term.t_mrow) + newsize(TRUE,h); + if (w < term.t_mcol) + newwidth(TRUE,w); + + update(TRUE); + return TRUE; +} + +#endif + diff --git a/dosmake.bat b/dosmake.bat new file mode 100644 index 0000000..3956635 --- /dev/null +++ b/dosmake.bat @@ -0,0 +1,2 @@ +cl -AL -Ot -Gs -c *.c +link @emacs.lnk diff --git a/ebind.h b/ebind.h new file mode 100644 index 0000000..432462a --- /dev/null +++ b/ebind.h @@ -0,0 +1,249 @@ +/* EBIND.H + * + * Initial default key to function bindings + * + * Modified by Petri Kutvonen + */ + +/* + * Command table. + * This table is *roughly* in ASCII order, left to right across the + * characters of the command. This explains the funny location of the + * control-X commands. + */ +KEYTAB keytab[NBINDS] = { + {CONTROL|'A', gotobol}, + {CONTROL|'B', backchar}, + {CONTROL|'C', insspace}, + {CONTROL|'D', forwdel}, + {CONTROL|'E', gotoeol}, + {CONTROL|'F', forwchar}, + {CONTROL|'G', ctrlg}, + {CONTROL|'H', backdel}, + {CONTROL|'I', tab}, + {CONTROL|'J', indent}, + {CONTROL|'K', killtext}, + {CONTROL|'L', refresh}, + {CONTROL|'M', newline}, + {CONTROL|'N', forwline}, + {CONTROL|'O', openline}, + {CONTROL|'P', backline}, + {CONTROL|'Q', quote}, + {CONTROL|'R', backsearch}, + {CONTROL|'S', forwsearch}, + {CONTROL|'T', twiddle}, + {CONTROL|'U', unarg}, + {CONTROL|'V', forwpage}, + {CONTROL|'W', killregion}, + {CONTROL|'X', cex}, + {CONTROL|'Y', yank}, + {CONTROL|'Z', backpage}, + {CONTROL|']', meta}, + {CTLX|CONTROL|'B', listbuffers}, + {CTLX|CONTROL|'C', quit}, /* Hard quit. */ +#if PKCODE & AEDIT + {CTLX|CONTROL|'A', detab}, +#endif +#if PKCODE + {CTLX|CONTROL|'D', filesave}, /* alternative */ +#else +#if AEDIT + {CTLX|CONTROL|'D', detab}, +#endif +#endif +#if AEDIT + {CTLX|CONTROL|'E', entab}, +#endif + {CTLX|CONTROL|'F', filefind}, + {CTLX|CONTROL|'I', insfile}, + {CTLX|CONTROL|'L', lowerregion}, + {CTLX|CONTROL|'M', delmode}, + {CTLX|CONTROL|'N', mvdnwind}, + {CTLX|CONTROL|'O', deblank}, + {CTLX|CONTROL|'P', mvupwind}, + {CTLX|CONTROL|'R', fileread}, + {CTLX|CONTROL|'S', filesave}, +#if AEDIT + {CTLX|CONTROL|'T', trim}, +#endif + {CTLX|CONTROL|'U', upperregion}, + {CTLX|CONTROL|'V', viewfile}, + {CTLX|CONTROL|'W', filewrite}, + {CTLX|CONTROL|'X', swapmark}, + {CTLX|CONTROL|'Z', shrinkwind}, + {CTLX|'?', deskey}, + {CTLX|'!', spawn}, + {CTLX|'@', pipecmd}, + {CTLX|'#', filter}, + {CTLX|'$', execprg}, + {CTLX|'=', showcpos}, + {CTLX|'(', ctlxlp}, + {CTLX|')', ctlxrp}, + {CTLX|'^', enlargewind}, + {CTLX|'0', delwind}, + {CTLX|'1', onlywind}, + {CTLX|'2', splitwind}, + {CTLX|'A', setvar}, + {CTLX|'B', usebuffer}, + {CTLX|'C', spawncli}, +#if BSD | __hpux | SVR4 + {CTLX|'D', bktoshell}, +#endif + {CTLX|'E', ctlxe}, + {CTLX|'F', setfillcol}, + {CTLX|'K', killbuffer}, + {CTLX|'M', setmode}, + {CTLX|'N', filename}, + {CTLX|'O', nextwind}, + {CTLX|'P', prevwind}, +#if PKCODE + {CTLX|'Q', quote}, /* alternative */ +#endif +#if ISRCH + {CTLX|'R', risearch}, + {CTLX|'S', fisearch}, +#endif + {CTLX|'W', resize}, + {CTLX|'X', nextbuffer}, + {CTLX|'Z', enlargewind}, +#if WORDPRO + {META|CONTROL|'C', wordcount}, +#endif +#if PKCODE + {META|CONTROL|'D', newsize}, +#endif +#if PROC + {META|CONTROL|'E', execproc}, +#endif +#if CFENCE + {META|CONTROL|'F', getfence}, +#endif + {META|CONTROL|'H', delbword}, + {META|CONTROL|'K', unbindkey}, + {META|CONTROL|'L', reposition}, + {META|CONTROL|'M', delgmode}, + {META|CONTROL|'N', namebuffer}, + {META|CONTROL|'R', qreplace}, + {META|CONTROL|'S', newsize}, + {META|CONTROL|'T', newwidth}, + {META|CONTROL|'V', scrnextdw}, +#if WORDPRO + {META|CONTROL|'W', killpara}, +#endif + {META|CONTROL|'Z', scrnextup}, + {META|' ', setmark}, + {META|'?', help}, + {META|'!', reposition}, + {META|'.', setmark}, + {META|'>', gotoeob}, + {META|'<', gotobob}, + {META|'~', unmark}, +#if APROP + {META|'A', apro}, +#endif + {META|'B', backword}, + {META|'C', capword}, + {META|'D', delfword}, +#if CRYPT + {META|'E', setkey}, +#endif + {META|'F', forwword}, + {META|'G', gotoline}, +#if PKCODE +#if WORDPRO + {META|'J', justpara}, +#endif +#endif + {META|'K', bindtokey}, + {META|'L', lowerword}, + {META|'M', setgmode}, +#if WORDPRO + {META|'N', gotoeop}, + {META|'P', gotobop}, + {META|'Q', fillpara}, +#endif + {META|'R', sreplace}, +#if PKCODE + {META|'S', forwsearch}, /* alternative P.K. */ +#else +#if BSD + {META|'S', bktoshell}, +#endif +#endif + {META|'U', upperword}, + {META|'V', backpage}, + {META|'W', copyregion}, + {META|'X', namedcmd}, + {META|'Z', quickexit}, + {META|0x7F, delbword}, + +#if MSDOS + {SPEC|CONTROL|'_', forwhunt}, + {SPEC|CONTROL|'S', backhunt}, + {SPEC|71, gotobol}, + {SPEC|72, backline}, + {SPEC|73, backpage}, + {SPEC|75, backchar}, + {SPEC|77, forwchar}, + {SPEC|79, gotoeol}, + {SPEC|80, forwline}, + {SPEC|81, forwpage}, + {SPEC|82, insspace}, + {SPEC|83, forwdel}, + {SPEC|115, backword}, + {SPEC|116, forwword}, +#if WORDPRO + {SPEC|132, gotobop}, + {SPEC|118, gotoeop}, +#endif + {SPEC|84, cbuf1}, + {SPEC|85, cbuf2}, + {SPEC|86, cbuf3}, + {SPEC|87, cbuf4}, + {SPEC|88, cbuf5}, + {SPEC|89, cbuf6}, + {SPEC|90, cbuf7}, + {SPEC|91, cbuf8}, + {SPEC|92, cbuf9}, + {SPEC|93, cbuf10}, +#if PKCODE + {SPEC|117, gotoeob}, + {SPEC|119, gotobob}, + {SPEC|141, gotobop}, + {SPEC|145, gotoeop}, + {SPEC|146, yank}, + {SPEC|147, killregion}, +#endif +#endif + +#if VT220 + {SPEC|'1', fisearch}, /* VT220 keys */ + {SPEC|'2', yank}, + {SPEC|'3', killregion}, + {SPEC|'4', setmark}, + {SPEC|'5', backpage}, + {SPEC|'6', forwpage}, + {SPEC|'A', backline}, + {SPEC|'B', forwline}, + {SPEC|'C', forwchar}, + {SPEC|'D', backchar}, + {SPEC|'c', meta}, + {SPEC|'d', backchar}, + {SPEC|'e', forwline}, + {SPEC|'f', gotobob}, + {SPEC|'h', help}, + {SPEC|'i', cex}, +#endif + + {0x7F, backdel}, + + /* special internal bindings */ + SPEC|META|'W', wrapword, /* called on word wrap */ + SPEC|META|'C', nullproc, /* every command input */ + SPEC|META|'R', nullproc, /* on file read */ + SPEC|META|'X', nullproc, /* on window change P.K. */ + + {0, NULL} +}; + + diff --git a/edef.h b/edef.h new file mode 100644 index 0000000..67aa375 --- /dev/null +++ b/edef.h @@ -0,0 +1,323 @@ +/* EDEF.H + * + * Global variable definitions + * + * written by Dave G. Conroy + * modified by Steve Wilhite, George Jones + * greatly modified by Daniel Lawrence + * modified by Petri Kutvonen + */ + +/* some global fuction declarations */ + +char *flook(); +char *getctext(); +char *getfname(); +char *getval(); +char *gtenv(); +char *gtfun(); +char *gtusr(); +char *itoa(); +char *ltos(); +char *malloc(); +char *mklower(); +char *mkupper(); +char *strcat(); +char *strcpy(); +char *strncpy(); +char *token(); +char *transbind(); +unsigned int getckey(); +unsigned int stock(); + +#ifdef maindef + +/* for MAIN.C */ + +/* initialized global definitions */ + +int fillcol = 72; /* Current fill column */ +short kbdm[NKBDM]; /* Macro */ +char *execstr = NULL; /* pointer to string to execute */ +char golabel[NPAT] = ""; /* current line to go to */ +int execlevel = 0; /* execution IF level */ +int eolexist = TRUE; /* does clear to EOL exist */ +int revexist = FALSE; /* does reverse video exist? */ +int flickcode = FALSE; /* do flicker supression? */ +char *modename[] = { /* name of modes */ + "WRAP", "CMODE", "SPELL", "EXACT", "VIEW", "OVER", + "MAGIC", "CRYPT", "ASAVE"}; +char *mode2name[] = { /* name of modes */ + "Wrap", "Cmode", "Spell", "Exact", "View", "Over", + "Magic", "Crypt", "Asave"}; +char modecode[] = "WCSEVOMYA"; /* letters to represent modes */ +int gmode = 0; /* global editor mode */ +int gflags = GFREAD; /* global control flag */ +#if PKCODE & IBMPC +int gfcolor = 8; /* global forgrnd color (white) */ +#else +int gfcolor = 7; /* global forgrnd color (white) */ +#endif +int gbcolor = 0; /* global backgrnd color (black)*/ +int gasave = 256; /* global ASAVE size */ +int gacount = 256; /* count until next ASAVE */ +int sgarbf = TRUE; /* TRUE if screen is garbage */ +int mpresf = FALSE; /* TRUE if message in last line */ +int clexec = FALSE; /* command line execution flag */ +int mstore = FALSE; /* storing text to macro flag */ +int discmd = TRUE; /* display command flag */ +int disinp = TRUE; /* display input characters */ +struct BUFFER *bstore = NULL; /* buffer to store macro text to*/ +int vtrow = 0; /* Row location of SW cursor */ +int vtcol = 0; /* Column location of SW cursor */ +int ttrow = HUGE; /* Row location of HW cursor */ +int ttcol = HUGE; /* Column location of HW cursor */ +int lbound = 0; /* leftmost column of current line + being displayed */ +int taboff = 0; /* tab offset for display */ +int metac = CONTROL | '['; /* current meta character */ +int ctlxc = CONTROL | 'X'; /* current control X prefix char */ +int reptc = CONTROL | 'U'; /* current universal repeat char */ +int abortc = CONTROL | 'G'; /* current abort command char */ + +int quotec = 0x11; /* quote char during mlreply() */ +int tabmask = 0x07; /* tabulator mask */ +char *cname[] = { /* names of colors */ + "BLACK", "RED", "GREEN", "YELLOW", "BLUE", + "MAGENTA", "CYAN", "WHITE" +#if PKCODE & IBMPC + ,"HIGH" +#endif + }; +KILL *kbufp = NULL; /* current kill buffer chunk pointer */ +KILL *kbufh = NULL; /* kill buffer header pointer */ +int kused = KBLOCK; /* # of bytes used in kill buffer */ +WINDOW *swindow = NULL; /* saved window pointer */ +int cryptflag = FALSE; /* currently encrypting? */ +short *kbdptr; /* current position in keyboard buf */ +short *kbdend = &kbdm[0]; /* ptr to end of the keyboard */ +int kbdmode = STOP; /* current keyboard macro mode */ +int kbdrep = 0; /* number of repetitions */ +int restflag = FALSE; /* restricted use? */ +int lastkey = 0; /* last keystoke */ +int seed = 0; /* random number seed */ +long envram = 0l; /* # of bytes current in use by malloc */ +int macbug = FALSE; /* macro debuging flag */ +char errorm[] = "ERROR"; /* error literal */ +char truem[] = "TRUE"; /* true literal */ +char falsem[] = "FALSE"; /* false litereal */ +int cmdstatus = TRUE; /* last command status */ +char palstr[49] = ""; /* palette string */ +int saveflag = 0; /* Flags, saved with the $target var */ +char *fline = NULL; /* dynamic return line */ +int flen = 0; /* current length of fline */ +int rval = 0; /* return value of a subprocess */ +#if CALLED +int eexitflag = FALSE; /* EMACS exit flag */ +int eexitval = 0; /* and the exit return value */ +#endif +#if PKCODE +int nullflag = FALSE; /* accept null characters */ +int justflag = FALSE; /* justify, don't fill */ +#endif +int overlap = 0; /* line overlap in forw/back page */ +int scrollcount = 1; /* number of lines to scroll */ + +/* uninitialized global definitions */ + +int currow; /* Cursor row */ +int curcol; /* Cursor column */ +int thisflag; /* Flags, this command */ +int lastflag; /* Flags, last command */ +int curgoal; /* Goal for C-P, C-N */ +WINDOW *curwp; /* Current window */ +BUFFER *curbp; /* Current buffer */ +WINDOW *wheadp; /* Head of list of windows */ +BUFFER *bheadp; /* Head of list of buffers */ +BUFFER *blistp; /* Buffer for C-X C-B */ + +BUFFER *bfind(); /* Lookup a buffer by name */ +WINDOW *wpopup(); /* Pop up window creation */ +LINE *lalloc(); /* Allocate a line */ +char sres[NBUFN]; /* current screen resolution */ + +char pat[NPAT]; /* Search pattern */ +char tap[NPAT]; /* Reversed pattern array. */ +char rpat[NPAT]; /* replacement pattern */ + +/* The variable matchlen holds the length of the matched + * string - used by the replace functions. + * The variable patmatch holds the string that satisfies + * the search command. + * The variables matchline and matchoff hold the line and + * offset position of the *start* of match. + */ +unsigned int matchlen = 0; +unsigned int mlenold = 0; +char *patmatch = NULL; +LINE *matchline = NULL; +int matchoff = 0; + +#if MAGIC +/* + * The variables magical and rmagical determine if there + * were actual metacharacters in the search and replace strings - + * if not, then we don't have to use the slower MAGIC mode + * search functions. + */ +short int magical = FALSE; +short int rmagical = FALSE; +MC mcpat[NPAT]; /* the magic pattern */ +MC tapcm[NPAT]; /* the reversed magic pattern */ +RMC rmcpat[NPAT]; /* the replacement magic array */ + +#endif + +/* directive name table: + This holds the names of all the directives.... */ + +char *dname[] = { + "if", "else", "endif", + "goto", "return", "endm", + "while", "endwhile", "break", + "force" +}; + +#if DEBUGM +/* vars needed for macro debugging output */ +char outline[NSTRING]; /* global string to hold debug line text */ +#endif + +#else + +/* for all the other .C files */ + +/* initialized global external declarations */ + +extern int fillcol; /* Fill column */ +extern short kbdm[]; /* Holds kayboard macro data */ +extern char pat[]; /* Search pattern */ +extern char rpat[]; /* Replacement pattern */ +extern char *execstr; /* pointer to string to execute */ +extern char golabel[]; /* current line to go to */ +extern int execlevel; /* execution IF level */ +extern int eolexist; /* does clear to EOL exist? */ +extern int revexist; /* does reverse video exist? */ +extern int flickcode; /* do flicker supression? */ +extern char *modename[]; /* text names of modes */ +extern char *mode2name[]; /* text names of modes */ +extern char modecode[]; /* letters to represent modes */ +extern KEYTAB keytab[]; /* key bind to functions table */ +extern NBIND names[]; /* name to function table */ +extern int gmode; /* global editor mode */ +extern int gflags; /* global control flag */ +extern int gfcolor; /* global forgrnd color (white) */ +extern int gbcolor; /* global backgrnd color (black)*/ +extern int gasave; /* global ASAVE size */ +extern int gacount; /* count until next ASAVE */ +extern int sgarbf; /* State of screen unknown */ +extern int mpresf; /* Stuff in message line */ +extern int clexec; /* command line execution flag */ +extern int mstore; /* storing text to macro flag */ +extern int discmd; /* display command flag */ +extern int disinp; /* display input characters */ +extern struct BUFFER *bstore; /* buffer to store macro text to*/ +extern int vtrow; /* Row location of SW cursor */ +extern int vtcol; /* Column location of SW cursor */ +extern int ttrow; /* Row location of HW cursor */ +extern int ttcol; /* Column location of HW cursor */ +extern int lbound; /* leftmost column of current line + being displayed */ +extern int taboff; /* tab offset for display */ +extern int metac; /* current meta character */ +extern int ctlxc; /* current control X prefix char */ +extern int reptc; /* current universal repeat char */ +extern int abortc; /* current abort command char */ + +extern int quotec; /* quote char during mlreply() */ +extern int tabmask; +extern char *cname[]; /* names of colors */ +extern KILL *kbufp; /* current kill buffer chunk pointer */ +extern KILL *kbufh; /* kill buffer header pointer */ +extern int kused; /* # of bytes used in KB */ +extern WINDOW *swindow; /* saved window pointer */ +extern int cryptflag; /* currently encrypting? */ +extern short *kbdptr; /* current position in keyboard buf */ +extern short *kbdend; /* ptr to end of the keyboard */ +extern int kbdmode; /* current keyboard macro mode */ +extern int kbdrep; /* number of repetitions */ +extern int restflag; /* restricted use? */ +extern int lastkey; /* last keystoke */ +extern int seed; /* random number seed */ +extern long envram; /* # of bytes current in use by malloc */ +extern int macbug; /* macro debuging flag */ +extern char errorm[]; /* error literal */ +extern char truem[]; /* true literal */ +extern char falsem[]; /* false litereal */ +extern int cmdstatus; /* last command status */ +extern char palstr[]; /* palette string */ +extern int saveflag; /* Flags, saved with the $target var */ +extern char *fline; /* dynamic return line */ +extern int flen; /* current length of fline */ +extern int rval; /* return value of a subprocess */ +#if CALLED +extern int eexitflag; /* EMACS exit flag */ +extern int eexitval; /* and the exit return value */ +#endif +#if PKCODE +extern int justflag; /* justify, don't fill */ +#endif +extern int overlap; /* line overlap in forw/back page */ +extern int scrollcount; /* number of lines to scroll */ + +/* uninitialized global external declarations */ + +extern int currow; /* Cursor row */ +extern int curcol; /* Cursor column */ +extern int thisflag; /* Flags, this command */ +extern int lastflag; /* Flags, last command */ +extern int curgoal; /* Goal for C-P, C-N */ +extern WINDOW *curwp; /* Current window */ +extern BUFFER *curbp; /* Current buffer */ +extern WINDOW *wheadp; /* Head of list of windows */ +extern BUFFER *bheadp; /* Head of list of buffers */ +extern BUFFER *blistp; /* Buffer for C-X C-B */ + +extern BUFFER *bfind(); /* Lookup a buffer by name */ +extern WINDOW *wpopup(); /* Pop up window creation */ +extern LINE *lalloc(); /* Allocate a line */ +extern char sres[NBUFN]; /* current screen resolution */ +extern char pat[]; /* Search pattern */ +extern char tap[]; /* Reversed pattern array. */ +extern char rpat[]; /* replacement pattern */ + +extern unsigned int matchlen; +extern unsigned int mlenold; +extern char *patmatch; +extern LINE *matchline; +extern int matchoff; + +#if MAGIC +extern short int magical; +extern short int rmagical; +extern MC mcpat[NPAT]; /* the magic pattern */ +extern MC tapcm[NPAT]; /* the reversed magic pattern */ +extern RMC rmcpat[NPAT]; /* the replacement magic array */ +#endif + +extern char *dname[]; /* directive name table */ + +#if DEBUGM +/* vars needed for macro debugging output */ +extern char outline[]; /* global string to hold debug line text */ +#endif + +#endif + +/* terminal table defined only in TERM.C */ + +#ifndef termdef +extern TERM term; /* Terminal information. */ +#endif + + diff --git a/efunc.h b/efunc.h new file mode 100644 index 0000000..cb8de1e --- /dev/null +++ b/efunc.h @@ -0,0 +1,431 @@ +/* EFUNC.H + * + * Function declarations and names + * + * This file list all the C code functions used + * and the names to use to bind keys to them. To add functions, + * declare it here in both the extern function list and the name + * binding table. + * + * modified by Petri Kutvonen + */ + +/* External function declarations */ + +extern int ctrlg(); /* Abort out of things */ +extern int quit(); /* Quit */ +extern int ctlxlp(); /* Begin macro */ +extern int ctlxrp(); /* End macro */ +extern int ctlxe(); /* Execute macro */ +extern int fileread(); /* Get a file, read only */ +extern int filefind(); /* Get a file, read write */ +extern int filewrite(); /* Write a file */ +extern int filesave(); /* Save current file */ +extern int filename(); /* Adjust file name */ +extern int getccol(); /* Get current column */ +extern int gotobol(); /* Move to start of line */ +extern int forwchar(); /* Move forward by characters */ +extern int gotoeol(); /* Move to end of line */ +extern int backchar(); /* Move backward by characters */ +extern int forwline(); /* Move forward by lines */ +extern int backline(); /* Move backward by lines */ +extern int forwpage(); /* Move forward by pages */ +extern int backpage(); /* Move backward by pages */ +extern int gotobob(); /* Move to start of buffer */ +extern int gotoeob(); /* Move to end of buffer */ +extern int setfillcol(); /* Set fill column. */ +extern int setmark(); /* Set mark */ +extern int swapmark(); /* Swap "." and mark */ +extern int forwsearch(); /* Search forward */ +extern int backsearch(); /* Search backwards */ +extern int sreplace(); /* search and replace */ +extern int qreplace(); /* search and replace w/query */ +extern int showcpos(); /* Show the cursor position */ +extern int nextwind(); /* Move to the next window */ +extern int prevwind(); /* Move to the previous window */ +extern int onlywind(); /* Make current window only one */ +extern int splitwind(); /* Split current window */ +extern int mvdnwind(); /* Move window down */ +extern int mvupwind(); /* Move window up */ +extern int enlargewind(); /* Enlarge display window. */ +extern int shrinkwind(); /* Shrink window. */ +extern int listbuffers(); /* Display list of buffers */ +extern int usebuffer(); /* Switch a window to a buffer */ +extern int killbuffer(); /* Make a buffer go away. */ +extern int reposition(); /* Reposition window */ +extern int refresh(); /* Refresh the screen */ +extern int twiddle(); /* Twiddle characters */ +extern int tab(); /* Insert tab */ +extern int newline(); /* Insert CR-LF */ +extern int indent(); /* Insert CR-LF, then indent */ +extern int openline(); /* Open up a blank line */ +extern int deblank(); /* Delete blank lines */ +extern int quote(); /* Insert literal */ +extern int backword(); /* Backup by words */ +extern int forwword(); /* Advance by words */ +extern int forwdel(); /* Forward delete */ +extern int backdel(); /* Backward delete */ +extern int killtext(); /* Kill forward */ +extern int yank(); /* Yank back from killbuffer. */ +extern int upperword(); /* Upper case word. */ +extern int lowerword(); /* Lower case word. */ +extern int upperregion(); /* Upper case region. */ +extern int lowerregion(); /* Lower case region. */ +extern int capword(); /* Initial capitalize word. */ +extern int delfword(); /* Delete forward word. */ +extern int delbword(); /* Delete backward word. */ +extern int killregion(); /* Kill region. */ +extern int copyregion(); /* Copy region to kill buffer. */ +extern int spawncli(); /* Run CLI in a subjob. */ +extern int spawn(); /* Run a command in a subjob. */ +#if BSD | __hpux | SVR4 +extern int bktoshell(); /* suspend emacs to parent shell*/ +extern int rtfrmshell(); /* return from a suspended state*/ +#endif +extern int quickexit(); /* low keystroke style exit. */ +extern int setmode(); /* set an editor mode */ +extern int delmode(); /* delete a mode */ +extern int gotoline(); /* go to a numbered line */ +extern int namebuffer(); /* rename the current buffer */ +#if WORDPRO +extern int gotobop(); /* go to beginning/paragraph */ +extern int gotoeop(); /* go to end/paragraph */ +extern int fillpara(); /* fill current paragraph */ +#if PKCODE +extern int justpara(); /* justify current paragraph */ +#endif +#endif +extern int help(); /* get the help file here */ +extern int deskey(); /* describe a key's binding */ +extern int viewfile(); /* find a file in view mode */ +extern int insfile(); /* insert a file */ +extern int scrnextup(); /* scroll next window back */ +extern int scrnextdw(); /* scroll next window down */ +extern int bindtokey(); /* bind a function to a key */ +extern int unbindkey(); /* unbind a key's function */ +extern int namedcmd(); /* execute named command */ +extern int desbind(); /* describe bindings */ +extern int execcmd(); /* execute a command line */ +extern int execbuf(); /* exec commands from a buffer */ +extern int execfile(); /* exec commands from a file */ +extern int nextbuffer(); /* switch to the next buffer */ +#if WORDPRO +extern int killpara(); /* kill the current paragraph */ +#endif +extern int setgmode(); /* set a global mode */ +extern int delgmode(); /* delete a global mode */ +extern int insspace(); /* insert a space forword */ +extern int forwhunt(); /* hunt forward for next match */ +extern int backhunt(); /* hunt backwards for next match*/ +extern int pipecmd(); /* pipe command into buffer */ +extern int filter(); /* filter buffer through dos */ +extern int delwind(); /* delete the current window */ +extern int cbuf1(); /* execute numbered comd buffer */ +extern int cbuf2(); +extern int cbuf3(); +extern int cbuf4(); +extern int cbuf5(); +extern int cbuf6(); +extern int cbuf7(); +extern int cbuf8(); +extern int cbuf9(); +extern int cbuf10(); +extern int cbuf11(); +extern int cbuf12(); +extern int cbuf13(); +extern int cbuf14(); +extern int cbuf15(); +extern int cbuf16(); +extern int cbuf17(); +extern int cbuf18(); +extern int cbuf19(); +extern int cbuf20(); +extern int cbuf21(); +extern int cbuf22(); +extern int cbuf23(); +extern int cbuf24(); +extern int cbuf25(); +extern int cbuf26(); +extern int cbuf27(); +extern int cbuf28(); +extern int cbuf29(); +extern int cbuf30(); +extern int cbuf31(); +extern int cbuf32(); +extern int cbuf33(); +extern int cbuf34(); +extern int cbuf35(); +extern int cbuf36(); +extern int cbuf37(); +extern int cbuf38(); +extern int cbuf39(); +extern int cbuf40(); +extern int storemac(); /* store text for macro */ +extern int resize(); /* resize current window */ +extern int clrmes(); /* clear the message line */ +extern int meta(); /* meta prefix dummy function */ +extern int cex(); /* ^X prefix dummy function */ +extern int unarg(); /* ^U repeat arg dummy function */ +extern int istring(); /* insert string in text */ +extern int unmark(); /* unmark current buffer */ +#if ISRCH +extern int fisearch(); /* forward incremental search */ +extern int risearch(); /* reverse incremental search */ +#endif +#if WORDPRO +extern int wordcount(); /* count words in region */ +#endif +extern int savewnd(); /* save current window */ +extern int restwnd(); /* restore current window */ +extern int upscreen(); /* force screen update */ +extern int writemsg(); /* write text on message line */ +#if FNLABEL +extern int fnclabel(); /* set function key label */ +#endif +#if APROP +extern int apro(); /* apropos fuction */ +#endif +#if CRYPT +extern int setkey(); /* set encryption key */ +#endif +extern int wrapword(); /* wordwrap function */ +#if CFENCE +extern int getfence(); /* move cursor to a matching fence */ +#endif +extern int newsize(); /* change the current screen size */ +extern int setvar(); /* set a variables value */ +extern int newwidth(); /* change the current screen width */ +#if AEDIT +extern int trim(); /* trim whitespace from end of line */ +extern int detab(); /* detab rest of line */ +extern int entab(); /* entab rest of line */ +#endif +#if PROC +extern int storeproc(); /* store names procedure */ +extern int execproc(); /* execute procedure */ +#endif +extern int nullproc(); /* does nothing... */ +extern int ovstring(); /* overwrite a string */ +extern int execprg(); /* execute a program */ + +extern int cknewwindow(); + +/* Name to function binding table + + This table gives the names of all the bindable functions + end their C function address. These are used for the bind-to-key + function. +*/ + +NBIND names[] = { + {"abort-command", ctrlg}, + {"add-mode", setmode}, + {"add-global-mode", setgmode}, +#if APROP + {"apropos", apro}, +#endif + {"backward-character", backchar}, + {"begin-macro", ctlxlp}, + {"beginning-of-file", gotobob}, + {"beginning-of-line", gotobol}, + {"bind-to-key", bindtokey}, + {"buffer-position", showcpos}, + {"case-region-lower", lowerregion}, + {"case-region-upper", upperregion}, + {"case-word-capitalize", capword}, + {"case-word-lower", lowerword}, + {"case-word-upper", upperword}, + {"change-file-name", filename}, + {"change-screen-size", newsize}, + {"change-screen-width", newwidth}, + {"clear-and-redraw", refresh}, + {"clear-message-line", clrmes}, + {"copy-region", copyregion}, +#if WORDPRO + {"count-words", wordcount}, +#endif + {"ctlx-prefix", cex}, + {"delete-blank-lines", deblank}, + {"delete-buffer", killbuffer}, + {"delete-mode", delmode}, + {"delete-global-mode", delgmode}, + {"delete-next-character", forwdel}, + {"delete-next-word", delfword}, + {"delete-other-windows", onlywind}, + {"delete-previous-character", backdel}, + {"delete-previous-word", delbword}, + {"delete-window", delwind}, + {"describe-bindings", desbind}, + {"describe-key", deskey}, +#if AEDIT + {"detab-line", detab}, +#endif + {"end-macro", ctlxrp}, + {"end-of-file", gotoeob}, + {"end-of-line", gotoeol}, +#if AEDIT + {"entab-line", entab}, +#endif + {"exchange-point-and-mark", swapmark}, + {"execute-buffer", execbuf}, + {"execute-command-line", execcmd}, + {"execute-file", execfile}, + {"execute-macro", ctlxe}, + {"execute-macro-1", cbuf1}, + {"execute-macro-2", cbuf2}, + {"execute-macro-3", cbuf3}, + {"execute-macro-4", cbuf4}, + {"execute-macro-5", cbuf5}, + {"execute-macro-6", cbuf6}, + {"execute-macro-7", cbuf7}, + {"execute-macro-8", cbuf8}, + {"execute-macro-9", cbuf9}, + {"execute-macro-10", cbuf10}, + {"execute-macro-11", cbuf11}, + {"execute-macro-12", cbuf12}, + {"execute-macro-13", cbuf13}, + {"execute-macro-14", cbuf14}, + {"execute-macro-15", cbuf15}, + {"execute-macro-16", cbuf16}, + {"execute-macro-17", cbuf17}, + {"execute-macro-18", cbuf18}, + {"execute-macro-19", cbuf19}, + {"execute-macro-20", cbuf20}, + {"execute-macro-21", cbuf21}, + {"execute-macro-22", cbuf22}, + {"execute-macro-23", cbuf23}, + {"execute-macro-24", cbuf24}, + {"execute-macro-25", cbuf25}, + {"execute-macro-26", cbuf26}, + {"execute-macro-27", cbuf27}, + {"execute-macro-28", cbuf28}, + {"execute-macro-29", cbuf29}, + {"execute-macro-30", cbuf30}, + {"execute-macro-31", cbuf31}, + {"execute-macro-32", cbuf32}, + {"execute-macro-33", cbuf33}, + {"execute-macro-34", cbuf34}, + {"execute-macro-35", cbuf35}, + {"execute-macro-36", cbuf36}, + {"execute-macro-37", cbuf37}, + {"execute-macro-38", cbuf38}, + {"execute-macro-39", cbuf39}, + {"execute-macro-40", cbuf40}, + {"execute-named-command", namedcmd}, +#if PROC + {"execute-procedure", execproc}, +#endif + {"execute-program", execprg}, + {"exit-emacs", quit}, +#if WORDPRO + {"fill-paragraph", fillpara}, +#endif + {"filter-buffer", filter}, + {"find-file", filefind}, + {"forward-character", forwchar}, + {"goto-line", gotoline}, +#if CFENCE + {"goto-matching-fence", getfence}, +#endif + {"grow-window", enlargewind}, + {"handle-tab", tab}, + {"hunt-forward", forwhunt}, + {"hunt-backward", backhunt}, + {"help", help}, + {"i-shell", spawncli}, +#if ISRCH + {"incremental-search", fisearch}, +#endif + {"insert-file", insfile}, + {"insert-space", insspace}, + {"insert-string", istring}, +#if WORDPRO +#if PKCODE + {"justify-paragraph", justpara}, +#endif + {"kill-paragraph", killpara}, +#endif + {"kill-region", killregion}, + {"kill-to-end-of-line", killtext}, +#if FNLABEL + {"label-function-key", fnclabel}, +#endif + {"list-buffers", listbuffers}, + {"meta-prefix", meta}, + {"move-window-down", mvdnwind}, + {"move-window-up", mvupwind}, + {"name-buffer", namebuffer}, + {"newline", newline}, + {"newline-and-indent", indent}, + {"next-buffer", nextbuffer}, + {"next-line", forwline}, + {"next-page", forwpage}, +#if WORDPRO + {"next-paragraph", gotoeop}, +#endif + {"next-window", nextwind}, + {"next-word", forwword}, + {"nop", nullproc}, + {"open-line", openline}, + {"overwrite-string", ovstring}, + {"pipe-command", pipecmd}, + {"previous-line", backline}, + {"previous-page", backpage}, +#if WORDPRO + {"previous-paragraph", gotobop}, +#endif + {"previous-window", prevwind}, + {"previous-word", backword}, + {"query-replace-string", qreplace}, + {"quick-exit", quickexit}, + {"quote-character", quote}, + {"read-file", fileread}, + {"redraw-display", reposition}, + {"resize-window", resize}, + {"restore-window", restwnd}, + {"replace-string", sreplace}, +#if ISRCH + {"reverse-incremental-search", risearch}, +#endif +#if PROC + {"run", execproc}, +#endif + {"save-file", filesave}, + {"save-window", savewnd}, + {"scroll-next-up", scrnextup}, + {"scroll-next-down", scrnextdw}, + {"search-forward", forwsearch}, + {"search-reverse", backsearch}, + {"select-buffer", usebuffer}, + {"set", setvar}, +#if CRYPT + {"set-encryption-key", setkey}, +#endif + {"set-fill-column", setfillcol}, + {"set-mark", setmark}, + {"shell-command", spawn}, + {"shrink-window", shrinkwind}, + {"split-current-window", splitwind}, + {"store-macro", storemac}, +#if PROC + {"store-procedure", storeproc}, +#endif +#if BSD | __hpux | SVR4 + {"suspend-emacs", bktoshell}, +#endif + {"transpose-characters", twiddle}, +#if AEDIT + {"trim-line", trim}, +#endif + {"unbind-key", unbindkey}, + {"universal-argument", unarg}, + {"unmark-buffer", unmark}, + {"update-screen", upscreen}, + {"view-file", viewfile}, + {"wrap-word", wrapword}, + {"write-file", filewrite}, + {"write-message", writemsg}, + {"yank", yank}, + + {"", NULL} +}; diff --git a/emacs.hlp b/emacs.hlp new file mode 100644 index 0000000..375de33 --- /dev/null +++ b/emacs.hlp @@ -0,0 +1,172 @@ +=> uEmacs/PK 4.0 HELP INDEX +.. The very basics +.. Cursor movement +.. File commands +.. Miscellaneous character commands +.. Mode commands +.. Keys and commands +.. Deleting and inserting +.. Formatting +.. Window commands +.. Buffer commands +.. Searching and replacing +.. Accessing the operating system +.. Macro commands +.. Miscellaneous +.. Functions +.. System variables +.. File name completion +------------------------------------------------------------------------------- +=> THE VERY BASICS +Notations: ^X means and X. The key is on most systems. +Exiting: ^G aborts almost any operation. ^X ^C will get you out of uEmacs. + +A BUFFER is a named area containing a FILE being edited. Many buffers may +be active at once. Many WINDOWS may be active at once on the screen. All +windows may show different parts of the same buffer, or each may display a +different one. +------------------------------------------------------------------------------- +=> CURSOR MOVEMENT +Backward character .... ^B Forward character ..... ^F +Previous word ......... Meta B Next word ............. Meta F +Beginning of line ..... ^A End of line ........... ^E +Previous line ......... ^P Next line ............. ^N +Previous paragraph .... Meta P Next paragraph ........ Meta N +Previous page ......... ^Z Next page ............. ^V +Beginning of file ..... Meta < End of file ........... Meta > +------------------------------------------------------------------------------- +=> FILE COMMANDS +Find file ............. ^X ^F Quick exit ............ Meta Z +View file ............. ^X ^V Exit emacs ............ ^X ^C +Insert file ........... ^X ^I +Change file name ...... ^X N Filter buffer ......... ^X # +Save file ............. ^X ^D +Read file ............. ^X ^R +Write file ............ ^X ^W Execute file .......... not bound +------------------------------------------------------------------------------- +=> MISCELLANEOUS CHARACTER COMMANDS +Newline ............... ^M Transpose characters .. ^T +Newline and indent .... ^J Trim line ............. ^X ^T +Open line ............. ^O +Handle tab ............ ^I Quote character ....... ^X Q +Insert space .......... ^C +Goto line ............. Meta G Abort command ......... ^G +Goto matching fence ... Meta ^F +------------------------------------------------------------------------------- +=> MODE COMMANDS +Add mode .............. ^X M Add global mode ....... Meta M +Delete mode ........... ^X ^M Delete global mode .... Meta ^M +OVER :: Overwrite, don't insert MAGIC :: Match patterns in search +WRAP :: Automatic carriage return ^ $ Beginning and end of line +VIEW :: View only, don't change . Any character \c Character c +CMODE :: C program indenting c* Any number of character c +EXACT :: Match case in search [ ] Character class +------------------------------------------------------------------------------- +=> KEYS AND COMMANDS +Bind to key ........... Meta K Help .................. Meta ? +Unbind key ............ Meta ^K Apropos ............... Meta A +Describe key .......... ^X ? Abort command ......... ^G +Describe bindings ..... not bound +Meta prefix ........... Esc :: Although meta-prefix can be bound to +Cntlx prefix .......... ^X :: some other key, no other command can +Execute named command . Meta X :: be bound to Esc. +------------------------------------------------------------------------------- +=> DELETING AND INSERTING +Delete previous character ^H Delete next character . ^D +Delete previous word .. Meta ^H Delete next word ...... Meta D +Kill to end of line ... ^K Set mark .............. Meta Space +Kill region ........... ^W Yank .................. ^Y +Kill paragraph ........ Meta ^W Exchange point and mark ^X ^X +Delete blank lines .... ^X ^O :: A region is defined as the area between +Copy region ........... Meta W :: the mark and the current position. +------------------------------------------------------------------------------- +=> FORMATTING +Case word upper ....... Meta U Case word lower ....... Meta L +Case region upper ..... ^X ^U Case region lower ..... ^X ^L +Case word capitalize .. Meta C Trim line ............. ^X ^T + Detab line ............ ^X ^A +Set fill column ....... ^X F Entab line ............ ^X ^E +Fill paragraph ........ Meta Q Change screen size .... Meta ^D +Justify paragraph ..... Meta J Change screen width ... Meta ^T +------------------------------------------------------------------------------- +=> WINDOW COMMANDS +Split current window .. ^X 2 Next window ........... ^X O +Delete other windows .. ^X 1 Previous window ....... ^X P +Delete window ......... ^X 0 Scroll next up ........ Meta ^Z +Grow window ........... ^X Z Scroll next down ...... Meta ^V +Shrink window ......... ^X ^Z Resize window ......... ^X W +Move window up ........ ^X ^P Save window ........... not bound +Move window down ...... ^X ^N Restore window ........ not bound +------------------------------------------------------------------------------- +=> BUFFER COMMANDS +Next buffer ........... ^X X Buffer position ....... ^X = +Select buffer ......... ^X B Unmark buffer ......... Meta ~ +List buffers .......... ^X ^B +Delete buffer ......... ^X K Write message ......... not bound +Name buffer ........... Meta ^N Clear message line .... not bound +Filter buffer ......... ^X # +Pipe command .......... ^X @ Execute buffer ........ not bound +------------------------------------------------------------------------------- +=> SEARCHING AND REPLACING +Search forward ........ Meta S :: End string with Meta. +Incremental search .... ^X S :: Search next ^X, stop Meta, cancel ^G. +Search reverse ........ ^R +Reverse incremental search Hunt forward .......... Alt-S +....................... ^X R Hunt backward ......... Alt-R +Replace string ........ Meta R +Query replace string .. Meta ^R :: Yes/no Y/N, replace rest !, cancel ^G. +------------------------------------------------------------------------------- +=> ACCESSING THE OPERATING SYSTEM +Quick exit ............ Meta Z :: Write out all changed buffers and exit. +Exit emacs ............ ^X ^C :: Exit without automatic save. +I shell ............... ^X C :: Start a new command processor. +Shell command ......... ^X ! :: Execute one operating system command. +Pipe command .......... ^X @ :: Pipe command results to a new buffer. * +Filter buffer ......... ^X # :: Filter buffer through a program. * +Execute program ....... ^X $ :: * Not under VMS. +------------------------------------------------------------------------------- +=> MACRO COMMANDS +Begin macro ........... ^X ( +End macro ............. ^X ) +Execute macro ......... ^X E +Store macro ........... not bound +Execute macro nn ...... not bound +Store procedure ....... not bound +Execute procedure ..... Meta ^E +------------------------------------------------------------------------------- +=> MISCELLANEOUS +Universal argument .... ^U Set mark .............. Meta Space +Clear and redraw ...... ^L Exchange point and mark ^X ^X +Redraw display ........ Meta ^L +Execute named command . Meta X Insert string ......... not bound +Execute command line .. not bound Overwrite string ...... not bound +Set encryption key .... Meta E Wrap word ............. not bound +Count words ........... Meta ^C Update screen ......... not bound +------------------------------------------------------------------------------- +=> SYSTEM VARIABLES +Set ................... Meta ^A Current buffer name ... $cbufname +Tabulator (4, 8)....... $tab Current file name ..... $cfname +Screen resolution ..... $sres :: NORMAL, CGA, EGA, VGA +Display commands ...... $discmd :: TRUE, FALSE +Scrolling enabled ..... $scroll :: TRUE, FALSE, can only be reset +Scrolling movement .... $jump :: # lines, default 1, 0 = 1/2 page +Page overlap .......... $overlap :: # lines, default 0, 0 = 1/3 page +------------------------------------------------------------------------------- +=> FUNCTIONS +&neg, &abs, &add, &sub, &tim, &div, &mod ... Arithmetic +&equ, &les, &gre ........................... Arithmetic comparisons +¬, &and, &or ............................ Logical +&lef s len, &rig s pos, &mid s pos len ..... Substring +&cat, &len, &upp, &low, &asc, &chr ......... Other string operations +&seq, &sle, &sgr ........................... String comparisons +&sin ....................................... String index +------------------------------------------------------------------------------- +=> FILE NAME COMPLETION + +File name completion can be used with all file commands (find-file, +view-file, ...) but it works only under UNIX and MS-DOS. It is invoked +by a or . If there exist more than one possible completions +they are displayed one by one. If the file name contains wild card +characters, the name is expanded instead of simple completion. Special +characters can be entered verbatim by prefixing them with ^V (or ^Q). +------------------------------------------------------------------------------- diff --git a/emacs.lnk b/emacs.lnk new file mode 100644 index 0000000..e242c23 --- /dev/null +++ b/emacs.lnk @@ -0,0 +1,29 @@ +ANSI.OBJ+ +BASIC.OBJ+ +BIND.OBJ+ +BUFFER.OBJ+ +CRYPT.OBJ+ +DISPLAY.OBJ+ +EVAL.OBJ+ +EXEC.OBJ+ +FILE.OBJ+ +FILEIO.OBJ+ +IBMPC.OBJ+ +INPUT.OBJ+ +ISEARCH.OBJ+ +LINE.OBJ+ +LOCK.OBJ+ +MAIN.OBJ+ +RANDOM.OBJ+ +REGION.OBJ+ +SEARCH.OBJ+ +SPAWN.OBJ+ +TCAP.OBJ+ +TERMIO.OBJ+ +VMSVT.OBJ+ +VT52.OBJ+ +WINDOW.OBJ+ +WORD.OBJ/E/STACK:20000 +EMACS.EXE/NOI/NOE +NUL +; diff --git a/emacs.prj b/emacs.prj new file mode 100644 index 0000000..2399d5b --- /dev/null +++ b/emacs.prj @@ -0,0 +1,27 @@ +ANSI (EBIND.H EDEF.H EFUNC.H EPATH.H ESTRUCT.H EVAR.H) +BASIC (EBIND.H EDEF.H EFUNC.H EPATH.H ESTRUCT.H EVAR.H) +BIND (EBIND.H EDEF.H EFUNC.H EPATH.H ESTRUCT.H EVAR.H) +BUFFER (EBIND.H EDEF.H EFUNC.H EPATH.H ESTRUCT.H EVAR.H) +CRYPT (EBIND.H EDEF.H EFUNC.H EPATH.H ESTRUCT.H EVAR.H) +DISPLAY (EBIND.H EDEF.H EFUNC.H EPATH.H ESTRUCT.H EVAR.H) +EVAL (EBIND.H EDEF.H EFUNC.H EPATH.H ESTRUCT.H EVAR.H) +EXEC (EBIND.H EDEF.H EFUNC.H EPATH.H ESTRUCT.H EVAR.H) +FILE (EBIND.H EDEF.H EFUNC.H EPATH.H ESTRUCT.H EVAR.H) +FILEIO (EBIND.H EDEF.H EFUNC.H EPATH.H ESTRUCT.H EVAR.H) +IBMPC (EBIND.H EDEF.H EFUNC.H EPATH.H ESTRUCT.H EVAR.H) +INPUT (EBIND.H EDEF.H EFUNC.H EPATH.H ESTRUCT.H EVAR.H) +ISEARCH (EBIND.H EDEF.H EFUNC.H EPATH.H ESTRUCT.H EVAR.H) +LINE (EBIND.H EDEF.H EFUNC.H EPATH.H ESTRUCT.H EVAR.H) +LOCK (EBIND.H EDEF.H EFUNC.H EPATH.H ESTRUCT.H EVAR.H) +MAIN (EBIND.H EDEF.H EFUNC.H EPATH.H ESTRUCT.H EVAR.H) +PKLOCK (EBIND.H EDEF.H EFUNC.H EPATH.H ESTRUCT.H EVAR.H) +RANDOM (EBIND.H EDEF.H EFUNC.H EPATH.H ESTRUCT.H EVAR.H) +REGION (EBIND.H EDEF.H EFUNC.H EPATH.H ESTRUCT.H EVAR.H) +SEARCH (EBIND.H EDEF.H EFUNC.H EPATH.H ESTRUCT.H EVAR.H) +SPAWN (EBIND.H EDEF.H EFUNC.H EPATH.H ESTRUCT.H EVAR.H) +TCAP (EBIND.H EDEF.H EFUNC.H EPATH.H ESTRUCT.H EVAR.H) +TERMIO (EBIND.H EDEF.H EFUNC.H EPATH.H ESTRUCT.H EVAR.H) +VMSVT (EBIND.H EDEF.H EFUNC.H EPATH.H ESTRUCT.H EVAR.H) +VT52 (EBIND.H EDEF.H EFUNC.H EPATH.H ESTRUCT.H EVAR.H) +WINDOW (EBIND.H EDEF.H EFUNC.H EPATH.H ESTRUCT.H EVAR.H) +WORD (EBIND.H EDEF.H EFUNC.H EPATH.H ESTRUCT.H EVAR.H) diff --git a/emacs.ps b/emacs.ps new file mode 100644 index 0000000..7a63fc5 --- /dev/null +++ b/emacs.ps @@ -0,0 +1,3667 @@ +%!PS-Adobe-1.0 +%%DocumentFonts: Courier +%%Title: (mpage) +%%Creator: mpage +%%CreationDate: Tue Dec 3 13:26:16 1991 +%%Pages: (atend) +%%BoundingBox: 20 20 596 776 +%%EndComments + +/mp_stm usertime def +/mp_pgc statusdict begin pagecount end def +statusdict begin /jobname () def end +%%%BoundingBox: 13 10 577 832 +%%%Creator: Windows PSCRIPT +%%%Title: Write - EMACS +%%%Pages: (atend) +%%%EndComments +/showsheet { showpage } bind def +/showpage { } def +statusdict begin 0 setjobtimeout end +statusdict begin statusdict /jobname (Write - EMACS) put end +/Win33Dict 290 dict def Win33Dict begin/bd{bind def}bind def/in{72 +mul}bd/ed{exch def}bd/ld{load def}bd/tr/translate ld/gs/gsave ld/gr/grestore +ld/M/moveto ld/L/lineto ld/rmt/rmoveto ld/rlt/rlineto ld/rct/rcurveto +ld/st/stroke ld/n/newpath ld/sm/setmatrix ld/cm/currentmatrix ld/cp/closepath +ld/ARC/arcn ld/TR{65536 div}bd/lj/setlinejoin ld/lc/setlinecap ld/ml/setmiterlimit +ld/sl/setlinewidth ld/sc{0 index 2 index eq 2 index 4 index eq and{pop +pop 255 div setgray}{3{255 div 3 1 roll}repeat setrgbcolor}ifelse}bd/FC{bR +bG bB sc}bd/fC{/bB ed/bG ed/bR ed}bd/HC{hR hG hB sc}bd/hC{/hB ed/hG +ed/hR ed}bd/PC{pR pG pB sc}bd/pC{/pB ed/pG ed/pR ed}bd/sM matrix def/PenW +1 def/iPen 5 def/mxF matrix def/mxE matrix def/fBE false def/iDevRes +72 0 matrix defaultmatrix dtransform dup mul exch dup mul add sqrt +def/SS{/SV save def}bd/RS{SV restore}bd/EJ{gsave showpage grestore}bd/#C{userdict +begin/#copies ed end}bd/SM{/iRes ed/cyP exch def/cxP exch def/cyM exch +def/cxM exch def 72 iRes div dup neg scale 0 ne{cyP cxP neg tr 90 rotate +cxM cyM}{cxM cyM cyP sub}ifelse tr 0 0 transform .25 add round .25 +sub exch .25 add round .25 sub exch itransform translate}bd/SJ{1 index +0 eq{pop pop/fBE false def}{1 index/Break ed div/dxBreak ed/fBE true +def}ifelse}bd/ANSIVec[ 16#0/grave 16#1/acute 16#2/circumflex 16#3/tilde +16#4/macron 16#5/breve 16#6/dotaccent 16#7/dieresis 16#8/ring 16#9/cedilla +16#A/hungarumlaut 16#B/ogonek 16#C/caron 16#D/dotlessi 16#27/quotesingle +16#60/grave 16#7C/bar 16#91/quoteleft 16#92/quoteright 16#93/quotedblleft +16#94/quotedblright 16#95/bullet 16#96/endash 16#97/emdash 16#A0/space +16#A4/currency 16#A6/brokenbar 16#A7/section 16#A8/dieresis 16#A9/copyright +16#AA/ordfeminine 16#AB/guillemotleft 16#AC/logicalnot 16#AD/hyphen +16#AE/registered 16#AF/macron 16#B0/degree 16#B1/plusminus 16#B2/twosuperior +16#B3/threesuperior 16#B4/acute 16#B5/mu 16#B6/paragraph 16#B7/periodcentered +16#B8/cedilla 16#B9/onesuperior 16#BA/ordmasculine 16#BB/guillemotright +16#BC/onequarter 16#BD/onehalf 16#BE/threequarters 16#BF/questiondown +16#C0/Agrave 16#C1/Aacute 16#C2/Acircumflex 16#C3/Atilde 16#C4/Adieresis +16#C5/Aring 16#C6/AE 16#C7/Ccedilla 16#C8/Egrave 16#C9/Eacute 16#CA/Ecircumflex +16#CB/Edieresis 16#CC/Igrave 16#CD/Iacute 16#CE/Icircumflex 16#CF/Idieresis +16#D0/Eth 16#D1/Ntilde 16#D2/Ograve 16#D3/Oacute 16#D4/Ocircumflex +16#D5/Otilde 16#D6/Odieresis 16#D7/multiply 16#D8/Oslash 16#D9/Ugrave +16#DA/Uacute 16#DB/Ucircumflex 16#DC/Udieresis 16#DD/Yacute 16#DE/Thorn +16#DF/germandbls 16#E0/agrave 16#E1/aacute 16#E2/acircumflex 16#E3/atilde +16#E4/adieresis 16#E5/aring 16#E6/ae 16#E7/ccedilla 16#E8/egrave 16#E9/eacute +16#EA/ecircumflex 16#EB/edieresis 16#EC/igrave 16#ED/iacute 16#EE/icircumflex +16#EF/idieresis 16#F0/eth 16#F1/ntilde 16#F2/ograve 16#F3/oacute 16#F4/ocircumflex +16#F5/otilde 16#F6/odieresis 16#F7/divide 16#F8/oslash 16#F9/ugrave +16#FA/uacute 16#FB/ucircumflex 16#FC/udieresis 16#FD/yacute 16#FE/thorn +16#FF/ydieresis ] def/reencdict 12 dict def/IsChar{basefontdict/CharStrings +get exch known}bd/MapCh{dup IsChar not{pop/bullet}if newfont/Encoding +get 3 1 roll put}bd/MapDegree{16#b0/degree IsChar{/degree}{/ring}ifelse +MapCh}bd/MapBB{16#a6/brokenbar IsChar{/brokenbar}{/bar}ifelse MapCh}bd/ANSIFont{reencdict +begin/newfontname ed/basefontname ed FontDirectory newfontname known +not{/basefontdict basefontname findfont def/newfont basefontdict maxlength +dict def basefontdict{exch dup/FID ne{dup/Encoding eq{exch dup length +array copy newfont 3 1 roll put}{exch newfont 3 1 roll put}ifelse}{pop +pop}ifelse}forall newfont/FontName newfontname put 127 1 159{newfont/Encoding +get exch/bullet put}for ANSIVec aload pop ANSIVec length 2 idiv{MapCh}repeat +MapDegree MapBB newfontname newfont definefont pop}if newfontname end}bd/SB{FC/str +ed str length fBE not{dup 1 gt{1 sub}if}if/cbStr ed/dxGdi ed/y0 ed/x0 +ed str stringwidth esc 0 ne{mxE itransform exch neg dxGdi add cbStr +div exch mxE transform}{exch neg dxGdi add cbStr div exch}ifelse/dyExtra +ed/dxExtra ed x0 y0 M fBE{dxBreak 0 BCh dxExtra dyExtra str awidthshow}{dxExtra +dyExtra str ashow}ifelse fUL{x0 y0 M dxUL dyUL rmt dxGdi fBE{Break +add}if 0 mxE transform rlt cyUL sl st}if fSO{x0 y0 M dxSO dySO rmt +dxGdi fBE{Break add}if 0 mxE transform rlt cyUL sl st}if n/fBE false +def}bd/font{/name ed/Ascent ed 0 ne/fSO ed 0 ne/fUL ed/Sy ed/Sx ed +10.0 div/ori ed -10.0 div/esc ed/BCh ed name findfont [Sx 0 0 Sy neg +0 Ascent] esc mxE rotate mxF concatmatrix makefont setfont fUL{currentfont +dup/FontInfo get/UnderlinePosition known not{pop/Courier findfont}if/FontInfo +get/UnderlinePosition get 1000 div 0 exch mxF transform/dyUL ed/dxUL +ed}if fSO{0 .3 mxF transform/dySO ed/dxSO ed}if fUL fSO or{currentfont +dup/FontInfo get/UnderlineThickness known not{pop/Courier findfont}if/FontInfo +get/UnderlineThickness get 1000 div Sy mul/cyUL ed}if}bd/min{2 copy +gt{exch}if pop}bd/max{2 copy lt{exch}if pop}bd/CP{/ft ed{{ft 0 eq{clip}{eoclip}ifelse}stopped{currentflat +1 add setflat}{exit}ifelse}loop}bd/patfont 10 dict def patfont begin/FontType +3 def/FontMatrix [1 0 0 1 0 0] def/FontBBox [0 0 32 32] def/Encoding +StandardEncoding def/BuildChar{pop pop 32 0 0 0 32 32 setcachedevice +2 2 scale 16 16 false [1 0 0 1 .25 .25]{pat}imagemask}bd end/p{/pat +32 string def{}forall 0 1 7{dup 2 mul pat exch 3 index put dup 2 mul +1 add pat exch 3 index put dup 2 mul 16 add pat exch 3 index put 2 +mul 17 add pat exch 2 index put pop}for}bd/pfill{/PatFont patfont definefont +setfont/ch(AAAA)def X0 128 X1{Y0 32 Y1{1 index exch M ch show}for pop}for}bd/vert{X0 +w X1{dup Y0 M Y1 L st}for}bd/horz{Y0 w Y1{dup X0 exch M X1 exch L st}for}bd/fdiag{X0 +w X1{Y0 M X1 X0 sub dup rlt st}for Y0 w Y1{X0 exch M Y1 Y0 sub dup +rlt st}for}bd/bdiag{X0 w X1{Y1 M X1 X0 sub dup neg rlt st}for Y0 w +Y1{X0 exch M Y1 Y0 sub dup neg rlt st}for}bd/AU{1 add cvi 15 or}bd/AD{1 +sub cvi -16 and}bd/SHR{pathbbox AU/Y1 ed AU/X1 ed AD/Y0 ed AD/X0 ed}bd/hfill{2 +sl [] 0 setdash n/w iRes 20 div 8 div round 8 mul def dup 0 eq{horz}if +dup 1 eq{vert}if dup 2 eq{fdiag}if dup 3 eq{bdiag}if dup 4 eq{horz +vert}if 5 eq{fdiag bdiag}if}bd/F{/ft ed fm 256 and 0 ne{gs FC ft 0 +eq{fill}{eofill}ifelse gr}if fm 1536 and 0 ne{SHR gs HC ft CP fm 1024 +and 0 ne{/Tmp save def pfill Tmp restore}{fm 15 and hfill}ifelse gr}if}bd/S{PenW +sl PC st}bd/m matrix def/GW{iRes 12 div PenW add cvi}bd/DoW{iRes 50 +div PenW add cvi}bd/DW{iRes 8 div PenW add cvi}bd/SP{/PenW ed/iPen +ed iPen 0 eq{[] 0 setdash}if iPen 1 eq{[DW GW] 0 setdash}if iPen 2 +eq{[DoW GW] 0 setdash}if iPen 3 eq{[DW GW DoW GW] 0 setdash}if iPen +4 eq{[DW GW DoW GW DoW GW] 0 setdash}if}bd/E{m cm pop tr scale 0 0 +1 0 360 arc cp m sm}bd/AG{/sy ed/sx ed sx div 4 1 roll sy div 4 1 roll +sx div 4 1 roll sy div 4 1 roll atan/a2 ed atan/a1 ed sx sy scale a1 +a2 ARC}def/A{m cm pop tr AG m sm}def/P{m cm pop tr 0 0 M AG cp m sm}def/RR{m +cm pop/y2 ed/x2 ed/ys y2 x2 div 1 max def/xs x2 y2 div 1 max def/y1 +exch ys div def/x1 exch xs div def/y0 exch ys div def/x0 exch xs div +def/r2 x2 y2 min def xs ys scale x0 r2 add y0 M x1 y0 x1 y1 r2 arcto +4{pop}repeat x1 y1 x0 y1 r2 arcto 4{pop}repeat x0 y1 x0 y0 r2 arcto +4{pop}repeat x0 y0 x1 y0 r2 arcto 4{pop}repeat m sm cp}bd/PP{{rlt}repeat}bd/OB{gs +sc B fill gr}bd/B{M/dy ed/dx ed dx 0 rlt 0 dy rlt dx neg 0 rlt cp}bd/CB{B +clip n}bd +%%EndProlog +% %%Page: 1 1 +%%Page: 1 1 +/sheetsave save def +gsave +24 817 translate -90 rotate +393 596 div 548 842 div scale +0 0 moveto 0 842 lineto 596 842 lineto 596 0 lineto +closepath clip newpath +0 54 39 2478 3507 300 SM +SS +0 0 0 fC +32 0 0 150 150 0 0 152 /Symbol font +714 255 86 (m) SB +32 0 0 150 150 0 0 145 /Times-Bold /font29 ANSIFont font +800 262 467 (Emacs/) SB +32 0 0 117 117 0 0 113 /Times-Bold /font29 ANSIFont font +1267 294 162 (PK) SB +32 0 0 150 150 0 0 145 /Times-Bold /font29 ANSIFont font +1429 262 226 ( 4.0) SB +32 0 0 58 58 0 0 52 /Times-Roman /font32 ANSIFont font +635 517 1099 (Full screen editor based on MicroEMACS 3.9e) SB +32 0 0 58 58 0 0 54 /Times-Italic /font31 ANSIFont font +867 648 635 (written by Dave G. Conroy) SB +710 717 949 (greatly modified by Daniel M. Lawrence) SB +827 786 714 (modified by Petri H. Kutvonen) SB +32 0 0 46 46 0 0 41 /Times-BoldItalic /font30 ANSIFont font +32 0 0 46 46 0 0 44 /Times-Bold /font29 ANSIFont font +1010 959 349 (Copyright notices) SB +32 0 0 46 46 0 0 43 /Times-Italic /font31 ANSIFont font +48 6 SJ +418 1069 767 (MicroEMACS 3.9e \251 Copyright 1987 by ) SB +36 4 SJ +1233 1069 741 (Daniel M. Lawrence. Reference Manual) SB +12 6 SJ +418 1123 717 (Copyright 1987 by Brian Straight and ) SB +18 6 SJ +1147 1123 845 (Daniel M. Lawrence. All Rights Reserved. No) SB +418 1177 1189 (copyright claimed for modifications made by Petri H. Kutvonen.) SB +32 0 0 46 46 0 0 44 /Times-Bold /font29 ANSIFont font +856 1339 715 (Original statement of copying policy) SB +32 0 0 46 46 0 0 43 /Times-Italic /font31 ANSIFont font +110 10 SJ +418 1449 1182 (MicroEMACS 3.9e can be copied and distributed freely for any ) SB +1710 1449 300 (non-commercial) SB +9 3 SJ +418 1503 552 (purposes. MicroEMACS 3.9e ) SB +28 7 SJ +979 1503 1003 (can only be corporated into commercial software with) SB +418 1557 1108 (the permission of the current author [Daniel M. Lawrence].) SB +32 0 0 58 58 0 0 56 /Times-Bold /font29 ANSIFont font +182 1719 466 (INTRODUCTION) SB +32 0 0 50 50 0 0 45 /Times-Roman /font32 ANSIFont font +35 5 SJ +182 1850 546 (uEmacs/PK 4.0 is a screen ) SB +80 10 SJ +763 1850 1344 (editor for programming and word processing. It is available for the) SB +4 4 SJ +182 1914 608 (IBM-PC and its clones, UNIX) SB +32 0 0 42 42 0 0 38 /Times-Roman /font32 ANSIFont font +794 1909 15 (\256) SB +32 0 0 50 50 0 0 45 /Times-Roman /font32 ANSIFont font +8 8 SJ +809 1914 939 ( System V and 4.[23]BSD \(including SunOS, ) SB +6 3 SJ +1756 1914 425 (DEC Ultrix and IBM) SB +182 1972 1116 (AIX\), and VAX/VMS. Some of its capabilities include:) SB +32 0 0 50 50 0 0 41 /ZapfDingbats font +182 2094 38 (o) SB +32 0 0 50 50 0 0 45 /Times-Roman /font32 ANSIFont font +359 2090 804 (Multiple windows on screen at one time) SB +32 0 0 50 50 0 0 41 /ZapfDingbats font +182 2212 38 (o) SB +32 0 0 50 50 0 0 45 /Times-Roman /font32 ANSIFont font +359 2208 683 (Multiple files in the editor at once) SB +32 0 0 50 50 0 0 41 /ZapfDingbats font +182 2330 38 (o) SB +32 0 0 50 50 0 0 45 /Times-Roman /font32 ANSIFont font +359 2326 734 (Limited on-screen formatting of text) SB +32 0 0 50 50 0 0 41 /ZapfDingbats font +182 2448 38 (o) SB +32 0 0 50 50 0 0 45 /Times-Roman /font32 ANSIFont font +359 2444 609 (User changeable command set) SB +32 0 0 50 50 0 0 41 /ZapfDingbats font +182 2566 38 (o) SB +32 0 0 50 50 0 0 45 /Times-Roman /font32 ANSIFont font +359 2562 558 (User written editing macros) SB +32 0 0 50 50 0 0 41 /ZapfDingbats font +182 2684 38 (o) SB +32 0 0 50 50 0 0 45 /Times-Roman /font32 ANSIFont font +359 2680 973 (Compatibility across all supported environments) SB +11 11 SJ +359 2796 1339 (This manual is designed as a reference manual. All the commands ) SB +8 4 SJ +1709 2796 470 (in uEmacs are listed, in) SB +182 2854 1612 (functional groups, along with detailed descriptions of what each command does.) SB +32 0 0 42 42 0 0 38 /Times-Roman /font32 ANSIFont font +182 3183 198 (uEmacs 4.0) SB +891 3183 209 ( ) SB +32 0 0 50 50 0 0 45 /Times-Roman /font32 ANSIFont font +1100 3176 43 ( -) SB +32 0 0 42 42 0 0 38 /Times-Roman /font32 ANSIFont font +1143 3183 11 ( ) SB +32 0 0 50 50 0 0 45 /Times-Roman /font32 ANSIFont font +1154 3176 25 (1) SB +32 0 0 42 42 0 0 38 /Times-Roman /font32 ANSIFont font +1179 3183 11 ( ) SB +32 0 0 50 50 0 0 45 /Times-Roman /font32 ANSIFont font +1190 3176 17 (-) SB +32 0 0 42 42 0 0 38 /Times-Roman /font32 ANSIFont font +1918 3183 269 (December 1991) SB +showpage +% %%Page: 2 2 +grestore sheetsave restore +/sheetsave save def +gsave +24 416 translate -90 rotate +393 596 div 548 842 div scale +0 0 moveto 0 842 lineto 596 842 lineto 596 0 lineto +closepath clip newpath +0 54 39 2478 3507 300 SM +0 0 0 fC +32 0 0 58 58 0 0 56 /Times-Bold /font29 ANSIFont font +182 197 456 (HOW TO START) SB +32 0 0 50 50 0 0 45 /Times-Roman /font32 ANSIFont font +182 328 1837 (uEmacs is invoked from the operating system command level with a command of the form:) SB +32 0 0 50 50 0 0 48 /Times-Bold /font29 ANSIFont font +359 442 130 (emacs) SB +32 0 0 50 50 0 0 45 /Times-Roman /font32 ANSIFont font +489 445 37 ( {) SB +32 0 0 50 50 0 0 47 /Times-Italic /font31 ANSIFont font +526 443 147 (options) SB +32 0 0 50 50 0 0 45 /Times-Roman /font32 ANSIFont font +673 445 37 (} ) SB +32 0 0 50 50 0 0 47 /Times-Italic /font31 ANSIFont font +710 443 125 (filelist) SB +32 0 0 50 50 0 0 45 /Times-Roman /font32 ANSIFont font +182 563 455 (where options may be:) SB +32 0 0 50 50 0 0 48 /Times-Bold /font29 ANSIFont font +182 677 42 (-v) SB +32 0 0 50 50 0 0 45 /Times-Roman /font32 ANSIFont font +536 680 584 (All the following files are in ) SB +32 0 0 50 50 0 0 47 /Times-Italic /font31 ANSIFont font +1120 678 100 (View) SB +32 0 0 50 50 0 0 45 /Times-Roman /font32 ANSIFont font +1220 680 372 ( mode \(read only\).) SB +32 0 0 50 50 0 0 48 /Times-Bold /font29 ANSIFont font +182 738 39 (-e) SB +32 0 0 50 50 0 0 45 /Times-Roman /font32 ANSIFont font +536 741 735 (All the following files can be edited.) SB +32 0 0 50 50 0 0 48 /Times-Bold /font29 ANSIFont font +182 857 42 (-g) SB +32 0 0 50 50 0 0 47 /Times-Italic /font31 ANSIFont font +224 858 25 (n) SB +32 0 0 50 50 0 0 45 /Times-Roman /font32 ANSIFont font +536 860 380 (Go directly to line ) SB +32 0 0 50 50 0 0 47 /Times-Italic /font31 ANSIFont font +916 858 25 (n) SB +32 0 0 50 50 0 0 45 /Times-Roman /font32 ANSIFont font +941 860 316 ( of the first file.) SB +32 0 0 50 50 0 0 48 /Times-Bold /font29 ANSIFont font +182 918 29 (+) SB +32 0 0 50 50 0 0 47 /Times-Italic /font31 ANSIFont font +211 919 25 (n) SB +32 0 0 50 50 0 0 45 /Times-Roman /font32 ANSIFont font +536 921 380 (Go directly to line ) SB +32 0 0 50 50 0 0 47 /Times-Italic /font31 ANSIFont font +916 919 25 (n) SB +32 0 0 50 50 0 0 45 /Times-Roman /font32 ANSIFont font +941 921 316 ( of the first file.) SB +32 0 0 50 50 0 0 48 /Times-Bold /font29 ANSIFont font +182 1037 36 (-s) SB +32 0 0 50 50 0 0 47 /Times-Italic /font31 ANSIFont font +218 1038 116 (string) SB +32 0 0 50 50 0 0 45 /Times-Roman /font32 ANSIFont font +536 1040 795 (Go to the end of the first occurrence of ) SB +32 0 0 50 50 0 0 47 /Times-Italic /font31 ANSIFont font +1331 1038 116 (string) SB +32 0 0 50 50 0 0 45 /Times-Roman /font32 ANSIFont font +1447 1040 313 ( in the first file.) SB +32 0 0 50 50 0 0 48 /Times-Bold /font29 ANSIFont font +182 1156 39 (-r) SB +32 0 0 50 50 0 0 45 /Times-Roman /font32 ANSIFont font +15 5 SJ +536 1159 819 (Restricted mode. Prevents uEmacs from ) SB +20 5 SJ +1370 1159 797 (executing many of its commands which) SB +34 17 SJ +536 1219 1556 (would allow you to break out of it, or edit files other then the ones named on ) SB +2126 1219 61 (the) SB +536 1277 298 (command line.) SB +32 0 0 50 50 0 0 48 /Times-Bold /font29 ANSIFont font +182 1391 45 (-n) SB +32 0 0 50 50 0 0 45 /Times-Roman /font32 ANSIFont font +536 1394 1112 (Allow reading of files which contain NULL characters.) SB +32 0 0 50 50 0 0 48 /Times-Bold /font29 ANSIFont font +182 1510 47 (@) SB +32 0 0 50 50 0 0 47 /Times-Italic /font31 ANSIFont font +229 1511 83 (sfile) SB +32 0 0 50 50 0 0 45 /Times-Roman /font32 ANSIFont font +536 1513 392 (Execute macro file ) SB +32 0 0 50 50 0 0 47 /Times-Italic /font31 ANSIFont font +928 1511 83 (sfile) SB +32 0 0 50 50 0 0 45 /Times-Roman /font32 ANSIFont font +1011 1513 707 ( instead of the standard startup file.) SB +182 1623 85 (and ) SB +32 0 0 50 50 0 0 47 /Times-Italic /font31 ANSIFont font +267 1621 125 (filelist) SB +32 0 0 50 50 0 0 45 /Times-Roman /font32 ANSIFont font +392 1623 848 ( is a list of files to be edited. For example:) SB +32 0 0 42 42 0 0 33 /Courier /font0 ANSIFont font +359 1752 1125 (emacs @start1.cmd -g56 test.c -v head.h def.h) SB +32 0 0 50 50 0 0 45 /Times-Roman /font32 ANSIFont font +48 12 SJ +359 1856 1506 (means to first execute macro file start1.cmd instead of the standard startup ) SB +5 1 SJ +1913 1856 269 (file, emacs.rc) SB +6 3 SJ +182 1914 324 (\(or .emacsrc on ) SB +42 14 SJ +512 1914 1633 (UNIX, see appendix for details\) and then read in test.c, position the cursor to line) SB +45 9 SJ +182 1972 792 (56, and be ready to read in files head.h ) SB +18 3 SJ +1019 1972 252 (and def.h in ) SB +32 0 0 50 50 0 0 47 /Times-Italic /font31 ANSIFont font +1289 1970 100 (View) SB +32 0 0 50 50 0 0 45 /Times-Roman /font32 ANSIFont font +36 6 SJ +1389 1972 762 ( \(read-only\) mode. In the simple case,) SB +182 2031 659 (uEmacs is usually run by typing:) SB +32 0 0 50 50 0 0 48 /Times-Bold /font29 ANSIFont font +359 2145 130 (emacs) SB +32 0 0 50 50 0 0 45 /Times-Roman /font32 ANSIFont font +489 2148 13 ( ) SB +32 0 0 50 50 0 0 47 /Times-Italic /font31 ANSIFont font +502 2146 64 (file) SB +32 0 0 50 50 0 0 45 /Times-Roman /font32 ANSIFont font +182 2266 135 (where ) SB +32 0 0 50 50 0 0 47 /Times-Italic /font31 ANSIFont font +317 2264 64 (file) SB +32 0 0 50 50 0 0 45 /Times-Roman /font32 ANSIFont font +381 2266 710 ( is the name of the file to be edited.) SB +32 0 0 58 58 0 0 56 /Times-Bold /font29 ANSIFont font +182 2439 1119 (HOW TO GET HELP AND HOW TO EXIT) SB +32 0 0 50 50 0 0 48 /Times-Bold /font29 ANSIFont font +6 1 SJ +182 2571 112 (Esc ?) SB +32 0 0 50 50 0 0 45 /Times-Roman /font32 ANSIFont font +66 11 SJ +300 2574 967 ( \(or actually Meta ? as you soon will learn\) will ) SB +49 7 SJ +1333 2574 805 (bring up a short summary of all uEmacs) SB +182 2635 1105 (commands. On a VT200 or equivalent you can use the ) SB +32 0 0 50 50 0 0 48 /Times-Bold /font29 ANSIFont font +1287 2632 103 (Help) SB +32 0 0 50 50 0 0 45 /Times-Roman /font32 ANSIFont font +1390 2635 499 ( key. On an IBM-PC try ) SB +32 0 0 50 50 0 0 48 /Times-Bold /font29 ANSIFont font +1889 2632 56 (F1) SB +32 0 0 50 50 0 0 45 /Times-Roman /font32 ANSIFont font +1945 2635 13 (.) SB +16 4 SJ +359 2757 375 (Don't panic if you ) SB +20 4 SJ +750 2757 517 (get stuck within uEmacs. ) SB +32 0 0 50 50 0 0 48 /Times-Bold /font29 ANSIFont font +1287 2754 145 (Ctrl-G) SB +32 0 0 50 50 0 0 45 /Times-Roman /font32 ANSIFont font +30 6 SJ +1432 2757 725 ( will abort almost any operation and) SB +32 0 0 50 50 0 0 48 /Times-Bold /font29 ANSIFont font +182 2815 297 (Ctrl-X Ctrl-C) SB +32 0 0 50 50 0 0 45 /Times-Roman /font32 ANSIFont font +479 2818 569 ( will get you out of uEmacs.) SB +32 0 0 42 42 0 0 38 /Times-Roman /font32 ANSIFont font +182 3183 198 (uEmacs 4.0) SB +891 3183 209 ( ) SB +32 0 0 50 50 0 0 45 /Times-Roman /font32 ANSIFont font +1100 3176 43 ( -) SB +32 0 0 42 42 0 0 38 /Times-Roman /font32 ANSIFont font +1143 3183 11 ( ) SB +32 0 0 50 50 0 0 45 /Times-Roman /font32 ANSIFont font +1154 3176 25 (2) SB +32 0 0 42 42 0 0 38 /Times-Roman /font32 ANSIFont font +1179 3183 11 ( ) SB +32 0 0 50 50 0 0 45 /Times-Roman /font32 ANSIFont font +1190 3176 17 (-) SB +32 0 0 42 42 0 0 38 /Times-Roman /font32 ANSIFont font +1918 3183 269 (December 1991) SB +showpage +% %%Page: 3 3 +grestore sheetsave restore +showsheet +%%Page: 2 2 +/sheetsave save def +gsave +24 817 translate -90 rotate +393 596 div 548 842 div scale +0 0 moveto 0 842 lineto 596 842 lineto 596 0 lineto +closepath clip newpath +0 54 39 2478 3507 300 SM +0 0 0 fC +32 0 0 58 58 0 0 56 /Times-Bold /font29 ANSIFont font +182 197 867 (HOW TO TYPE IN COMMANDS) SB +32 0 0 50 50 0 0 45 /Times-Roman /font32 ANSIFont font +42 14 SJ +182 328 1616 (Most commands in uEmacs are a single keystroke, or a keystroke preceded by a ) SB +4 1 SJ +1840 328 343 (command prefix.) SB +20 4 SJ +182 387 593 (Control commands appear in ) SB +18 3 SJ +795 387 472 (the documentation like ) SB +32 0 0 50 50 0 0 48 /Times-Bold /font29 ANSIFont font +1285 384 65 (^A) SB +32 0 0 50 50 0 0 45 /Times-Roman /font32 ANSIFont font +42 7 SJ +1350 387 795 ( which means to depress the key) SB +12 6 SJ +182 448 652 (and while holding it down, type ) SB +21 7 SJ +846 448 876 (the A character. Meta commands appear as ) SB +32 0 0 50 50 0 0 48 /Times-Bold /font29 ANSIFont font +3 1 SJ +1743 445 160 (Meta A) SB +32 0 0 50 50 0 0 45 /Times-Roman /font32 ANSIFont font +6 2 SJ +1906 448 275 ( which means) SB +77 7 SJ +182 508 727 (to strike the key \( on ) SB +108 9 SJ +986 508 1093 (most computers\) and then after releasing it, type the A) SB +182 567 1014 (character. Control-X commands usually appear as ) SB +32 0 0 50 50 0 0 48 /Times-Bold /font29 ANSIFont font +1 1 SJ +1197 564 114 (^X A) SB +32 0 0 50 50 0 0 45 /Times-Roman /font32 ANSIFont font +8 8 SJ +1312 567 867 ( which means to hold down the control key) SB +182 627 184 (and type ) SB +13 13 SJ +367 627 1807 (the X character then type the A character. Both meta commands and control-X commands) SB +24 8 SJ +182 685 945 (can be control characters as well, for example, ) SB +12 3 SJ +1151 685 235 (^X ^O \(the ) SB +32 0 0 50 50 0 0 47 /Times-Italic /font31 ANSIFont font +1398 683 358 (delete-blank-lines) SB +32 0 0 50 50 0 0 45 /Times-Roman /font32 ANSIFont font +12 3 SJ +1756 685 419 ( command\) means to) SB +182 744 1594 (hold down , type X, keep holding down and type the O character.) SB +98 14 SJ +359 860 1529 (Many commands in uEmacs can be executed a number of times. In order to ) SB +8 1 SJ +1986 860 193 (make one) SB +7 7 SJ +182 918 1048 (command repeat many times, type \(\) ) SB +14 7 SJ +1237 918 936 (followed by a number, and then the command.) SB +182 976 255 (for example:) SB +359 1092 237 (Meta 12 ^K) SB +36 12 SJ +359 1208 1414 (will delete 12 lines starting at the cursor and going down. Sometimes, ) SB +12 3 SJ +1809 1208 366 (the repeat count is) SB +48 16 SJ +182 1266 1760 (used as an argument to the command as in the set-tab command where the repeat count ) SB +8 2 SJ +1990 1266 189 (is used to) SB +182 1324 625 (set the spacing of the tab stops.) SB +32 0 0 58 58 0 0 56 /Times-Bold /font29 ANSIFont font +182 1496 609 (THE COMMAND LIST) SB +32 0 0 50 50 0 0 45 /Times-Roman /font32 ANSIFont font +24 6 SJ +182 1627 509 (The following is a list of ) SB +55 11 SJ +715 1627 1417 (all the commands in uEmacs. Listed is the command name, the default) SB +130 13 SJ +182 1685 1603 (\(normal\) keystrokes used to invoke it, and alternative keys for the IBM-PC and ) SB +1915 1685 272 (VT200-series) SB +182 1743 1120 (terminals, and a description of what the command does.) SB +32 0 0 58 58 0 0 56 /Times-Bold /font29 ANSIFont font +182 1915 459 (Moving the cursor) SB +32 0 0 50 50 0 0 47 /Times-Italic /font31 ANSIFont font +182 2044 285 (previous-page) SB +32 0 0 50 50 0 0 45 /Times-Roman /font32 ANSIFont font +891 2046 54 (^Z) SB +1186 2046 127 (Pg Up) SB +1600 2046 197 (Prev Scrn) SB +359 2163 1021 (Move one screen towards the beginning of the file.) SB +32 0 0 50 50 0 0 47 /Times-Italic /font31 ANSIFont font +182 2277 197 (next-page) SB +32 0 0 50 50 0 0 45 /Times-Roman /font32 ANSIFont font +891 2279 59 (^V) SB +1186 2279 127 (Pg Dn) SB +1600 2279 202 (Next Scrn) SB +359 2396 893 (Move one screen towards the end of the file.) SB +32 0 0 50 50 0 0 47 /Times-Italic /font31 ANSIFont font +182 2510 337 (beginning-of-file) SB +32 0 0 50 50 0 0 45 /Times-Roman /font32 ANSIFont font +891 2512 143 (Meta <) SB +1186 2512 145 (^Home) SB +359 2629 878 (Place the cursor at the beginning of the file.) SB +32 0 0 50 50 0 0 47 /Times-Italic /font31 ANSIFont font +182 2743 209 (end-of-file) SB +32 0 0 50 50 0 0 45 /Times-Roman /font32 ANSIFont font +891 2745 143 (Meta >) SB +1186 2745 104 (^End) SB +359 2862 750 (Place the cursor at the end of the file.) SB +32 0 0 42 42 0 0 38 /Times-Roman /font32 ANSIFont font +182 3183 198 (uEmacs 4.0) SB +891 3183 209 ( ) SB +32 0 0 50 50 0 0 45 /Times-Roman /font32 ANSIFont font +1100 3176 43 ( -) SB +32 0 0 42 42 0 0 38 /Times-Roman /font32 ANSIFont font +1143 3183 11 ( ) SB +32 0 0 50 50 0 0 45 /Times-Roman /font32 ANSIFont font +1154 3176 25 (3) SB +32 0 0 42 42 0 0 38 /Times-Roman /font32 ANSIFont font +1179 3183 11 ( ) SB +32 0 0 50 50 0 0 45 /Times-Roman /font32 ANSIFont font +1190 3176 17 (-) SB +32 0 0 42 42 0 0 38 /Times-Roman /font32 ANSIFont font +1918 3183 269 (December 1991) SB +showpage +% %%Page: 4 4 +grestore sheetsave restore +/sheetsave save def +gsave +24 416 translate -90 rotate +393 596 div 548 842 div scale +0 0 moveto 0 842 lineto 596 842 lineto 596 0 lineto +closepath clip newpath +0 54 39 2478 3507 300 SM +0 0 0 fC +32 0 0 50 50 0 0 47 /Times-Italic /font31 ANSIFont font +182 201 370 (forward-character) SB +32 0 0 50 50 0 0 45 /Times-Roman /font32 ANSIFont font +891 203 51 (^F) SB +32 0 0 50 50 0 0 51 /Symbol font +1186 197 49 (\336) SB +32 0 0 50 50 0 0 45 /Times-Roman /font32 ANSIFont font +32 0 0 50 50 0 0 51 /Symbol font +1600 197 49 (\336) SB +32 0 0 50 50 0 0 45 /Times-Roman /font32 ANSIFont font +359 322 1766 (Move the cursor one character to the right. Go down to the beginning of the next line if ) SB +2126 322 61 (the) SB +182 380 968 (cursor was already at the end of the current line.) SB +32 0 0 50 50 0 0 47 /Times-Italic /font31 ANSIFont font +182 498 406 (backward-character) SB +32 0 0 50 50 0 0 45 /Times-Roman /font32 ANSIFont font +891 500 56 (^B) SB +32 0 0 50 50 0 0 51 /Symbol font +1186 494 49 (\334) SB +32 0 0 50 50 0 0 45 /Times-Roman /font32 ANSIFont font +32 0 0 50 50 0 0 51 /Symbol font +1600 494 49 (\334) SB +32 0 0 50 50 0 0 45 /Times-Roman /font32 ANSIFont font +45 15 SJ +359 619 1440 (Move the cursor one character to the left. Go to the end of the previous ) SB +12 3 SJ +1844 619 331 (line if the cursor) SB +182 677 798 (was at the beginning of the current line.) SB +32 0 0 50 50 0 0 47 /Times-Italic /font31 ANSIFont font +182 795 202 (next-word) SB +32 0 0 50 50 0 0 45 /Times-Roman /font32 ANSIFont font +891 797 143 (Meta F) SB +1186 797 23 (^) SB +32 0 0 50 50 0 0 51 /Symbol font +1209 791 49 (\336) SB +32 0 0 50 50 0 0 45 /Times-Roman /font32 ANSIFont font +359 916 1013 (Place the cursor at the beginning of the next word.) SB +32 0 0 50 50 0 0 47 /Times-Italic /font31 ANSIFont font +182 1034 290 (previous-word) SB +32 0 0 50 50 0 0 45 /Times-Roman /font32 ANSIFont font +891 1036 148 (Meta B) SB +1186 1036 23 (^) SB +32 0 0 50 50 0 0 51 /Symbol font +1209 1030 49 (\334) SB +32 0 0 50 50 0 0 45 /Times-Roman /font32 ANSIFont font +359 1155 1099 (Place the cursor at the beginning of the previous word.) SB +32 0 0 50 50 0 0 47 /Times-Italic /font31 ANSIFont font +182 1269 348 (beginning-of-line) SB +32 0 0 50 50 0 0 45 /Times-Roman /font32 ANSIFont font +891 1271 59 (^A) SB +1186 1271 122 (Home) SB +359 1388 978 (Move cursor to the beginning of the current line.) SB +32 0 0 50 50 0 0 47 /Times-Italic /font31 ANSIFont font +182 1502 220 (end-of-line) SB +32 0 0 50 50 0 0 45 /Times-Roman /font32 ANSIFont font +891 1504 54 (^E) SB +1186 1504 81 (End) SB +359 1621 924 (Move the cursor to the end of the current line.) SB +32 0 0 50 50 0 0 47 /Times-Italic /font31 ANSIFont font +182 1739 175 (next-line) SB +32 0 0 50 50 0 0 45 /Times-Roman /font32 ANSIFont font +891 1741 59 (^N) SB +32 0 0 50 50 0 0 51 /Symbol font +1186 1735 30 (\337) SB +32 0 0 50 50 0 0 45 /Times-Roman /font32 ANSIFont font +32 0 0 50 50 0 0 51 /Symbol font +1600 1735 30 (\337) SB +32 0 0 50 50 0 0 45 /Times-Roman /font32 ANSIFont font +359 1860 638 (Move the cursor down one line.) SB +32 0 0 50 50 0 0 47 /Times-Italic /font31 ANSIFont font +182 1978 263 (previous-line) SB +32 0 0 50 50 0 0 45 /Times-Roman /font32 ANSIFont font +891 1980 51 (^P) SB +32 0 0 50 50 0 0 51 /Symbol font +1186 1974 30 (\335) SB +32 0 0 50 50 0 0 45 /Times-Roman /font32 ANSIFont font +32 0 0 50 50 0 0 51 /Symbol font +1600 1974 30 (\335) SB +32 0 0 50 50 0 0 45 /Times-Roman /font32 ANSIFont font +359 2099 577 (Move the cursor up one line.) SB +32 0 0 50 50 0 0 47 /Times-Italic /font31 ANSIFont font +182 2213 181 (goto-line) SB +32 0 0 50 50 0 0 45 /Times-Roman /font32 ANSIFont font +891 2215 151 (Meta G) SB +26 13 SJ +359 2332 1181 (Goto a specific line in the file. I.e. Meta 65 Meta G would ) SB +18 6 SJ +1566 2332 603 (put the cursor on the 65th line) SB +182 2390 420 (of the current buffer.) SB +32 0 0 50 50 0 0 47 /Times-Italic /font31 ANSIFont font +182 2508 313 (next-paragraph) SB +32 0 0 50 50 0 0 45 /Times-Roman /font32 ANSIFont font +891 2510 151 (Meta N) SB +1186 2510 23 (^) SB +32 0 0 50 50 0 0 51 /Symbol font +1209 2504 30 (\337) SB +32 0 0 50 50 0 0 45 /Times-Roman /font32 ANSIFont font +359 2629 1179 (Put the cursor at the first end of paragraph after the cursor.) SB +32 0 0 50 50 0 0 47 /Times-Italic /font31 ANSIFont font +182 2747 401 (previous-paragraph) SB +32 0 0 50 50 0 0 45 /Times-Roman /font32 ANSIFont font +891 2749 143 (Meta P) SB +1186 2749 23 (^) SB +32 0 0 50 50 0 0 51 /Symbol font +1209 2743 30 (\335) SB +32 0 0 50 50 0 0 45 /Times-Roman /font32 ANSIFont font +359 2868 1343 (Put the cursor at the first beginning of paragraph before the cursor.) SB +32 0 0 42 42 0 0 38 /Times-Roman /font32 ANSIFont font +182 3183 198 (uEmacs 4.0) SB +891 3183 209 ( ) SB +32 0 0 50 50 0 0 45 /Times-Roman /font32 ANSIFont font +1100 3176 43 ( -) SB +32 0 0 42 42 0 0 38 /Times-Roman /font32 ANSIFont font +1143 3183 11 ( ) SB +32 0 0 50 50 0 0 45 /Times-Roman /font32 ANSIFont font +1154 3176 25 (4) SB +32 0 0 42 42 0 0 38 /Times-Roman /font32 ANSIFont font +1179 3183 11 ( ) SB +32 0 0 50 50 0 0 45 /Times-Roman /font32 ANSIFont font +1190 3176 17 (-) SB +32 0 0 42 42 0 0 38 /Times-Roman /font32 ANSIFont font +1918 3183 269 (December 1991) SB +showpage +% %%Page: 5 5 +grestore sheetsave restore +showsheet +%%Page: 3 3 +/sheetsave save def +gsave +24 817 translate -90 rotate +393 596 div 548 842 div scale +0 0 moveto 0 842 lineto 596 842 lineto 596 0 lineto +closepath clip newpath +0 54 39 2478 3507 300 SM +0 0 0 fC +32 0 0 58 58 0 0 56 /Times-Bold /font29 ANSIFont font +182 197 548 (Deleting and inserting) SB +32 0 0 50 50 0 0 47 /Times-Italic /font31 ANSIFont font +182 330 517 (delete-previous-character) SB +32 0 0 50 50 0 0 45 /Times-Roman /font32 ANSIFont font +891 332 59 (^H) SB +32 0 0 50 50 0 0 51 /Symbol font +1186 326 49 (\254) SB +32 0 0 50 50 0 0 45 /Times-Roman /font32 ANSIFont font +20 10 SJ +359 451 1162 (Delete the character immediately to the left of the cursor. ) SB +18 6 SJ +1541 451 628 (If the cursor is at the beginning) SB +182 509 1396 (of a line, this will join the current line on the end of the previous one.) SB +32 0 0 50 50 0 0 47 /Times-Italic /font31 ANSIFont font +182 623 429 (delete-next-character) SB +32 0 0 50 50 0 0 45 /Times-Roman /font32 ANSIFont font +891 625 59 (^D) SB +1186 625 72 (Del) SB +359 742 1350 (Delete the character the cursor is on. If the cursor is at the end of a ) SB +5 5 SJ +1710 742 472 (line, the next line is put) SB +182 800 577 (at the end of the current one.) SB +32 0 0 50 50 0 0 47 /Times-Italic /font31 ANSIFont font +182 919 422 (delete-previous word) SB +32 0 0 50 50 0 0 45 /Times-Roman /font32 ANSIFont font +891 921 174 (Meta ^H) SB +1186 921 115 (Meta ) SB +32 0 0 50 50 0 0 51 /Symbol font +1301 915 49 (\254) SB +32 0 0 50 50 0 0 45 /Times-Roman /font32 ANSIFont font +359 1040 686 (Delete the word before the cursor.) SB +32 0 0 50 50 0 0 47 /Times-Italic /font31 ANSIFont font +182 1154 338 (delete-next-word) SB +32 0 0 50 50 0 0 45 /Times-Roman /font32 ANSIFont font +891 1156 151 (Meta D) SB +359 1273 757 (Delete the word starting at the cursor.) SB +32 0 0 50 50 0 0 47 /Times-Italic /font31 ANSIFont font +182 1388 357 (kill-to-end-of-line) SB +32 0 0 50 50 0 0 45 /Times-Roman /font32 ANSIFont font +891 1390 59 (^K) SB +359 1507 1588 (When used with no argument, this command deletes all text from the cursor to ) SB +3 3 SJ +1948 1507 236 (the end of a) SB +30 10 SJ +182 1565 926 (line. When used on a blank line, it deletes the ) SB +32 8 SJ +1138 1565 1017 (blank line. When used with an argument, it deletes) SB +182 1623 595 (the specified number of lines.) SB +32 0 0 50 50 0 0 47 /Times-Italic /font31 ANSIFont font +182 1737 243 (insert-space) SB +32 0 0 50 50 0 0 45 /Times-Roman /font32 ANSIFont font +891 1739 56 (^C) SB +1186 1739 61 (Ins) SB +359 1856 1017 (Insert a space before the character the cursor is on.) SB +32 0 0 50 50 0 0 47 /Times-Italic /font31 ANSIFont font +182 1970 155 (newline) SB +32 0 0 50 50 0 0 45 /Times-Roman /font32 ANSIFont font +891 1972 136 (Return) SB +1186 1972 109 (Enter) SB +24 12 SJ +359 2089 1185 (Insert a newline into the text, move the cursor down to the ) SB +12 4 SJ +1568 2089 607 (beginning of the next physical) SB +182 2147 921 (line, carrying any text that was after it with it.) SB +32 0 0 50 50 0 0 47 /Times-Italic /font31 ANSIFont font +182 2261 389 (newline-and-indent) SB +32 0 0 50 50 0 0 45 /Times-Roman /font32 ANSIFont font +891 2263 42 (^J) SB +359 2380 1670 (Insert a newline into the text, and indent the new line the same as the previous line.) SB +32 0 0 50 50 0 0 47 /Times-Italic /font31 ANSIFont font +182 2498 217 (handle-tab) SB +32 0 0 50 50 0 0 45 /Times-Roman /font32 ANSIFont font +891 2500 40 (^I) SB +32 0 0 50 50 0 0 51 /Symbol font +1186 2494 59 (\256|) SB +32 0 0 50 50 0 0 45 /Times-Roman /font32 ANSIFont font +1600 2500 78 (Tab) SB +48 4 SJ +359 2619 515 (With no argument, move ) SB +143 11 SJ +922 2619 1122 (the cursor to the beginning of the next tab stop. With an) SB +24 6 SJ +182 2677 610 (argument of zero, use real tab ) SB +45 9 SJ +816 2677 1326 (characters when tabbing. With a non-zero argument, use spaces to) SB +182 2735 593 (tab every argument positions.) SB +32 0 0 50 50 0 0 47 /Times-Italic /font31 ANSIFont font +182 2849 358 (delete-blank-lines) SB +32 0 0 50 50 0 0 45 /Times-Roman /font32 ANSIFont font +891 2851 131 (^X ^O) SB +359 2968 1383 (Delete all the blank lines before and after the current cursor position.) SB +32 0 0 42 42 0 0 38 /Times-Roman /font32 ANSIFont font +182 3183 198 (uEmacs 4.0) SB +891 3183 209 ( ) SB +32 0 0 50 50 0 0 45 /Times-Roman /font32 ANSIFont font +1100 3176 43 ( -) SB +32 0 0 42 42 0 0 38 /Times-Roman /font32 ANSIFont font +1143 3183 11 ( ) SB +32 0 0 50 50 0 0 45 /Times-Roman /font32 ANSIFont font +1154 3176 25 (5) SB +32 0 0 42 42 0 0 38 /Times-Roman /font32 ANSIFont font +1179 3183 11 ( ) SB +32 0 0 50 50 0 0 45 /Times-Roman /font32 ANSIFont font +1190 3176 17 (-) SB +32 0 0 42 42 0 0 38 /Times-Roman /font32 ANSIFont font +1918 3183 269 (December 1991) SB +showpage +% %%Page: 6 6 +grestore sheetsave restore +/sheetsave save def +gsave +24 416 translate -90 rotate +393 596 div 548 842 div scale +0 0 moveto 0 842 lineto 596 842 lineto 596 0 lineto +closepath clip newpath +0 54 39 2478 3507 300 SM +0 0 0 fC +32 0 0 50 50 0 0 47 /Times-Italic /font31 ANSIFont font +182 197 175 (trim-line) SB +32 0 0 50 50 0 0 45 /Times-Roman /font32 ANSIFont font +891 199 126 (^X ^T) SB +359 316 902 (Delete trailing white space from current line.) SB +32 0 0 50 50 0 0 47 /Times-Italic /font31 ANSIFont font +182 430 203 (detab-line) SB +32 0 0 50 50 0 0 45 /Times-Roman /font32 ANSIFont font +891 432 131 (^X ^A) SB +359 549 1533 (Change tabulator characters to appropriate number of spaces on current line.) SB +32 0 0 50 50 0 0 47 /Times-Italic /font31 ANSIFont font +182 663 203 (entab-line) SB +32 0 0 50 50 0 0 45 /Times-Roman /font32 ANSIFont font +891 665 126 (^X ^E) SB +359 782 1382 (Change spaces to tabulator characters where possible on current line.) SB +32 0 0 50 50 0 0 47 /Times-Italic /font31 ANSIFont font +182 896 294 (kill-paragraph) SB +32 0 0 50 50 0 0 45 /Times-Roman /font32 ANSIFont font +891 898 185 (Meta ^W) SB +359 1015 1022 (Delete the paragraph that the cursor is currently in.) SB +32 0 0 50 50 0 0 47 /Times-Italic /font31 ANSIFont font +182 1129 211 (kill-region) SB +32 0 0 50 50 0 0 45 /Times-Roman /font32 ANSIFont font +891 1131 70 (^W) SB +1186 1131 95 (^Del) SB +1600 1131 166 (Remove) SB +359 1248 1702 (Delete all the characters from the cursor to the mark set with the set-mark command.) SB +32 0 0 50 50 0 0 47 /Times-Italic /font31 ANSIFont font +182 1362 241 (copy-region) SB +32 0 0 50 50 0 0 45 /Times-Roman /font32 ANSIFont font +891 1364 162 (Meta W) SB +40 10 SJ +359 1481 1139 (Copy all the characters between the cursor and the mark ) SB +20 4 SJ +1538 1481 629 (set with the set-mark command) SB +182 1539 1184 (into the kill buffer \(so they can later be yanked elsewhere\).) SB +32 0 0 50 50 0 0 47 /Times-Italic /font31 ANSIFont font +182 1653 189 (open-line) SB +32 0 0 50 50 0 0 45 /Times-Roman /font32 ANSIFont font +891 1655 59 (^O) SB +359 1772 1160 (Insert a newline at the cursor, but do not move the cursor.) SB +32 0 0 58 58 0 0 56 /Times-Bold /font29 ANSIFont font +182 1944 248 (Searching) SB +32 0 0 50 50 0 0 47 /Times-Italic /font31 ANSIFont font +182 2073 309 (search-forward) SB +32 0 0 50 50 0 0 45 /Times-Roman /font32 ANSIFont font +891 2075 51 (^S) SB +1600 2075 143 (Meta S) SB +60 10 SJ +359 2192 1087 (Search for a string from the current cursor position to ) SB +49 7 SJ +1506 2192 632 (the end of the file. The string is) SB +22 11 SJ +182 2250 1161 (typed on on the bottom line of the screen, and terminated ) SB +15 5 SJ +1365 2250 807 (with the key. Special characters) SB +16 8 SJ +182 2308 806 (can be typed in by preceding them with ) SB +39 13 SJ +1004 2308 1144 (a ^Q or ^V. A single ^Q or ^V indicates a null string. On) SB +40 5 SJ +182 2366 852 (successive searches, hitting alone ) SB +72 8 SJ +1074 2366 833 (causes the last search string to be reused. ) SB +32 0 0 50 50 0 0 47 /Times-Italic /font31 ANSIFont font +9 1 SJ +1979 2364 199 (Note: The) SB +182 2423 1700 (command ^S cannot be used if your terminal uses XON-XOFF-flow control. Use the ) SB +2 2 SJ +1883 2423 302 (second form or) SB +182 2482 387 (incremental-search) SB +32 0 0 50 50 0 0 45 /Times-Roman /font32 ANSIFont font +569 2484 13 ( ) SB +32 0 0 50 50 0 0 47 /Times-Italic /font31 ANSIFont font +582 2482 157 (instead.) SB +182 2599 294 (search-reverse) SB +32 0 0 50 50 0 0 45 /Times-Roman /font32 ANSIFont font +891 2601 56 (^R) SB +359 2718 1778 (This command searches backwards in the file. In all other ways it is like search-forward.) SB +32 0 0 42 42 0 0 38 /Times-Roman /font32 ANSIFont font +182 3183 198 (uEmacs 4.0) SB +891 3183 209 ( ) SB +32 0 0 50 50 0 0 45 /Times-Roman /font32 ANSIFont font +1100 3176 43 ( -) SB +32 0 0 42 42 0 0 38 /Times-Roman /font32 ANSIFont font +1143 3183 11 ( ) SB +32 0 0 50 50 0 0 45 /Times-Roman /font32 ANSIFont font +1154 3176 25 (6) SB +32 0 0 42 42 0 0 38 /Times-Roman /font32 ANSIFont font +1179 3183 11 ( ) SB +32 0 0 50 50 0 0 45 /Times-Roman /font32 ANSIFont font +1190 3176 17 (-) SB +32 0 0 42 42 0 0 38 /Times-Roman /font32 ANSIFont font +1918 3183 269 (December 1991) SB +showpage +% %%Page: 7 7 +grestore sheetsave restore +showsheet +%%Page: 4 4 +/sheetsave save def +gsave +24 817 translate -90 rotate +393 596 div 548 842 div scale +0 0 moveto 0 842 lineto 596 842 lineto 596 0 lineto +closepath clip newpath +0 54 39 2478 3507 300 SM +0 0 0 fC +32 0 0 50 50 0 0 47 /Times-Italic /font31 ANSIFont font +182 197 387 (incremental-search) SB +32 0 0 50 50 0 0 45 /Times-Roman /font32 ANSIFont font +891 199 100 (^X S) SB +1600 199 92 (Find) SB +359 316 1212 (This command is similar to forward-search, but it processes ) SB +5 5 SJ +1572 316 610 (the search as each character of) SB +60 15 SJ +182 374 1378 (the input string is typed in. This allows the user to only use as many ) SB +20 4 SJ +1620 374 547 (keystrokes as are needed to) SB +182 432 1969 (uniquely specify the string being searched. Several control characters are active while i-searching:) SB +359 548 178 (^S or ^X) SB +714 548 960 (Skip to the next occurrence of the current string) SB +359 606 56 (^R) SB +714 606 943 (Skip to the last occurrence of the current string) SB +359 668 127 (^H or ) SB +32 0 0 50 50 0 0 51 /Symbol font +486 662 49 (\254) SB +32 0 0 50 50 0 0 45 /Times-Roman /font32 ANSIFont font +16 2 SJ +714 668 178 (Back up ) SB +90 10 SJ +908 668 1189 (to the last match \(possibly deleting the last character on the) SB +714 729 271 (search string\)) SB +359 787 59 (^G) SB +714 787 628 (Abort the search, return to start) SB +359 845 102 (Meta) SB +714 845 500 (End the search, stay here) SB +359 961 1388 (Always remember to terminate the search by hitting \(or ^G\).) SB +32 0 0 50 50 0 0 47 /Times-Italic /font31 ANSIFont font +182 1075 549 (reverse-incremental-search) SB +32 0 0 50 50 0 0 45 /Times-Roman /font32 ANSIFont font +891 1077 105 (^X R) SB +359 1194 1717 (This command is the same as incremental-search, but it starts in the reverse direction.) SB +32 0 0 50 50 0 0 47 /Times-Italic /font31 ANSIFont font +182 1308 266 (hunt-forward) SB +32 0 0 50 50 0 0 45 /Times-Roman /font32 ANSIFont font +891 1310 175 (unbound) SB +1186 1310 513 (\( S on the IBM PC\)) SB +359 1427 1274 (This command repeats the last search with the last search string) SB +32 0 0 50 50 0 0 47 /Times-Italic /font31 ANSIFont font +182 1541 302 (hunt-backward) SB +32 0 0 50 50 0 0 45 /Times-Roman /font32 ANSIFont font +891 1543 175 (unbound) SB +1186 1543 518 (\( R on the IBM PC\)) SB +359 1660 1569 (The last search string is looked for starting at the cursor and going backwards.) SB +32 0 0 58 58 0 0 56 /Times-Bold /font29 ANSIFont font +182 1832 248 (Replacing) SB +32 0 0 50 50 0 0 47 /Times-Italic /font31 ANSIFont font +182 1961 282 (replace-string) SB +32 0 0 50 50 0 0 45 /Times-Roman /font32 ANSIFont font +891 1963 148 (Meta R) SB +359 2080 455 (This command allows ) SB +11 11 SJ +815 2080 1361 (you to replace all occurrences of one string with another string. The) SB +24 12 SJ +182 2138 1335 (replacement starts at the current location of the cursor and goes to ) SB +18 6 SJ +1541 2138 628 (the end of the current buffer. A) SB +182 2196 1201 (numeric argument will limit the number of strings replaced.) SB +32 0 0 50 50 0 0 47 /Times-Italic /font31 ANSIFont font +182 2310 412 (query-replace-string) SB +32 0 0 50 50 0 0 45 /Times-Roman /font32 ANSIFont font +891 2312 171 (Meta ^R) SB +30 3 SJ +359 2429 467 (Like the replace-string ) SB +88 8 SJ +856 2429 1243 (command, this command will replace one string with another.) SB +14 1 SJ +182 2487 209 (However, ) SB +240 16 SJ +405 2487 1542 (it allows you to step through each string and ask you if you wish to make the) SB +22 11 SJ +182 2545 1262 (replacement. When the computer asks if you wish to make the ) SB +9 3 SJ +1466 2545 712 (replacement, the following answers) SB +182 2603 246 (are allowed:) SB +359 2719 36 (Y) SB +714 2719 1129 (Make the replacement and continue on to the next string) SB +359 2777 36 (N) SB +714 2777 858 (Don't make the replacement, then continue) SB +359 2835 17 (!) SB +714 2835 903 (Replace the rest of the strings without asking) SB +359 2893 59 (^G) SB +714 2893 376 (Stop the command) SB +359 2951 13 (.) SB +714 2951 768 (Go back to place the command started) SB +359 3009 22 (?) SB +714 3009 396 (Get a list of options) SB +32 0 0 42 42 0 0 38 /Times-Roman /font32 ANSIFont font +182 3183 198 (uEmacs 4.0) SB +891 3183 209 ( ) SB +32 0 0 50 50 0 0 45 /Times-Roman /font32 ANSIFont font +1100 3176 43 ( -) SB +32 0 0 42 42 0 0 38 /Times-Roman /font32 ANSIFont font +1143 3183 11 ( ) SB +32 0 0 50 50 0 0 45 /Times-Roman /font32 ANSIFont font +1154 3176 25 (7) SB +32 0 0 42 42 0 0 38 /Times-Roman /font32 ANSIFont font +1179 3183 11 ( ) SB +32 0 0 50 50 0 0 45 /Times-Roman /font32 ANSIFont font +1190 3176 17 (-) SB +32 0 0 42 42 0 0 38 /Times-Roman /font32 ANSIFont font +1918 3183 269 (December 1991) SB +showpage +% %%Page: 8 8 +grestore sheetsave restore +/sheetsave save def +gsave +24 416 translate -90 rotate +393 596 div 548 842 div scale +0 0 moveto 0 842 lineto 596 842 lineto 596 0 lineto +closepath clip newpath +0 54 39 2478 3507 300 SM +0 0 0 fC +32 0 0 58 58 0 0 56 /Times-Bold /font29 ANSIFont font +182 313 715 (Capitalizing and transposing) SB +32 0 0 50 50 0 0 47 /Times-Italic /font31 ANSIFont font +182 442 340 (case-word-upper) SB +32 0 0 50 50 0 0 45 /Times-Roman /font32 ANSIFont font +891 444 151 (Meta U) SB +359 561 879 (Change the following word into upper case.) SB +32 0 0 50 50 0 0 47 /Times-Italic /font31 ANSIFont font +182 675 418 (case-word-capitalize) SB +32 0 0 50 50 0 0 45 /Times-Roman /font32 ANSIFont font +891 677 148 (Meta C) SB +359 794 613 (Capitalize the following word.) SB +32 0 0 50 50 0 0 47 /Times-Italic /font31 ANSIFont font +182 908 337 (case-word-lower) SB +32 0 0 50 50 0 0 45 /Times-Roman /font32 ANSIFont font +891 910 146 (Meta L) SB +359 1027 840 (Change the following word to lower case.) SB +32 0 0 50 50 0 0 47 /Times-Italic /font31 ANSIFont font +182 1141 368 (case-region-upper) SB +32 0 0 50 50 0 0 45 /Times-Roman /font32 ANSIFont font +891 1143 131 (^X ^U) SB +359 1260 1403 (Change all the alphabetic characters in a marked region to upper case.) SB +32 0 0 50 50 0 0 47 /Times-Italic /font31 ANSIFont font +182 1374 365 (case-region-lower) SB +32 0 0 50 50 0 0 45 /Times-Roman /font32 ANSIFont font +891 1376 126 (^X ^L) SB +359 1493 1403 (Change all the alphabetic characters in a marked region to lower case.) SB +32 0 0 50 50 0 0 47 /Times-Italic /font31 ANSIFont font +182 1607 422 (transpose-characters) SB +32 0 0 50 50 0 0 45 /Times-Roman /font32 ANSIFont font +891 1609 54 (^T) SB +359 1726 1174 (Swap the last and second last characters behind the cursor.) SB +32 0 0 50 50 0 0 47 /Times-Italic /font31 ANSIFont font +182 1840 321 (quote-character) SB +32 0 0 50 50 0 0 45 /Times-Roman /font32 ANSIFont font +891 1842 59 (^Q) SB +1600 1842 108 (^X Q) SB +40 5 SJ +359 1959 633 (Insert the next typed character, ) SB +81 9 SJ +1032 1959 1074 (ignoring the fact that it may be a command character.) SB +32 0 0 50 50 0 0 47 /Times-Italic /font31 ANSIFont font +182 2015 1573 (Note: This command may cause problems if XON-XOFF-flow control is used.) SB +32 0 0 58 58 0 0 56 /Times-Bold /font29 ANSIFont font +182 2190 661 (Regions and the kill buffer) SB +32 0 0 50 50 0 0 47 /Times-Italic /font31 ANSIFont font +182 2319 174 (set-mark) SB +32 0 0 50 50 0 0 45 /Times-Roman /font32 ANSIFont font +891 2321 234 (Meta Space) SB +1600 2321 122 (Select) SB +30 10 SJ +359 2438 1046 (This command is used to delimit the beginning of a ) SB +16 4 SJ +1435 2438 736 (marked region. Many commands are) SB +112 16 SJ +182 2496 1576 (effective for a region of text. A region is defined as the text between the mark ) SB +16 2 SJ +1870 2496 301 (and the current) SB +10 5 SJ +182 2554 561 (cursor position. To delete a ) SB +36 12 SJ +753 2554 1398 (section of text, for example, one moves the cursor to the beginning of) SB +10 5 SJ +182 2612 444 (the text to be deleted, ) SB +30 10 SJ +636 2612 1521 (issues the set-mark command by typing , moves the cursor) SB +102 17 SJ +182 2670 1569 (to the end of the text to be deleted, and then deletes it by using the kill-region ) SB +7 1 SJ +1853 2670 327 (\(^W\) command.) SB +16 16 SJ +182 2728 1395 (Only one mark can be set in one window or one buffer at a time, and ) SB +8 4 SJ +1593 2728 586 (uEmacs will try to remember) SB +182 2786 1316 (a mark set in an offscreen buffer when it is called back on screen.) SB +32 0 0 42 42 0 0 38 /Times-Roman /font32 ANSIFont font +182 3183 198 (uEmacs 4.0) SB +891 3183 209 ( ) SB +32 0 0 50 50 0 0 45 /Times-Roman /font32 ANSIFont font +1100 3176 43 ( -) SB +32 0 0 42 42 0 0 38 /Times-Roman /font32 ANSIFont font +1143 3183 11 ( ) SB +32 0 0 50 50 0 0 45 /Times-Roman /font32 ANSIFont font +1154 3176 25 (8) SB +32 0 0 42 42 0 0 38 /Times-Roman /font32 ANSIFont font +1179 3183 11 ( ) SB +32 0 0 50 50 0 0 45 /Times-Roman /font32 ANSIFont font +1190 3176 17 (-) SB +32 0 0 42 42 0 0 38 /Times-Roman /font32 ANSIFont font +1918 3183 269 (December 1991) SB +showpage +% %%Page: 9 9 +grestore sheetsave restore +showsheet +%%Page: 5 5 +/sheetsave save def +gsave +24 817 translate -90 rotate +393 596 div 548 842 div scale +0 0 moveto 0 842 lineto 596 842 lineto 596 0 lineto +closepath clip newpath +0 54 39 2478 3507 300 SM +0 0 0 fC +32 0 0 50 50 0 0 47 /Times-Italic /font31 ANSIFont font +182 197 519 (exchange-point-and-mark) SB +32 0 0 50 50 0 0 45 /Times-Roman /font32 ANSIFont font +891 199 131 (^X ^X) SB +12 12 SJ +359 316 1411 (This command moves the cursor to the current marked position in the ) SB +4 2 SJ +1782 316 401 (current window and) SB +12 3 SJ +182 374 333 (moves the mark ) SB +80 16 SJ +527 374 1580 (to where the cursor was. This is very useful in finding where a mark was, or in) SB +182 432 845 (returning to a position previously marked.) SB +32 0 0 58 58 0 0 56 /Times-Bold /font29 ANSIFont font +182 604 515 (Copying and moving) SB +32 0 0 50 50 0 0 47 /Times-Italic /font31 ANSIFont font +182 733 211 (kill-region) SB +32 0 0 50 50 0 0 45 /Times-Roman /font32 ANSIFont font +891 735 70 (^W) SB +1600 735 166 (Remove) SB +4 2 SJ +359 852 312 (This command ) SB +42 14 SJ +675 852 1470 (is used to copy the current region \(as defined by the current mark and the) SB +182 910 536 (cursor\) into the kill buffer.) SB +32 0 0 50 50 0 0 47 /Times-Italic /font31 ANSIFont font +182 1024 94 (yank) SB +32 0 0 50 50 0 0 45 /Times-Roman /font32 ANSIFont font +891 1026 59 (^Y) SB +1186 1026 84 (^Ins) SB +1600 1026 224 (Insert Here) SB +10 5 SJ +359 1143 550 (This copies the contents of ) SB +33 11 SJ +919 1143 1235 (the kill buffer into the text at the current cursor position. This) SB +182 1201 1918 (does not clear the kill buffer, and thus may be used to make multiple copies of a section of text.) SB +32 0 0 50 50 0 0 47 /Times-Italic /font31 ANSIFont font +182 1315 241 (copy-region) SB +32 0 0 50 50 0 0 45 /Times-Roman /font32 ANSIFont font +891 1317 162 (Meta W) SB +60 5 SJ +359 1434 705 (This command copies the contents ) SB +104 8 SJ +1124 1434 959 (of the current region into the kill buffer without) SB +182 1492 691 (deleting it from the current buffer.) SB +32 0 0 58 58 0 0 56 /Times-Bold /font29 ANSIFont font +182 1664 481 (Modes of operation) SB +32 0 0 50 50 0 0 47 /Times-Italic /font31 ANSIFont font +182 1793 200 (add-mode) SB +32 0 0 50 50 0 0 45 /Times-Roman /font32 ANSIFont font +891 1795 116 (^X M) SB +359 1912 662 (Add a mode to the current buffer) SB +32 0 0 50 50 0 0 47 /Times-Italic /font31 ANSIFont font +182 2026 244 (delete-mode) SB +32 0 0 50 50 0 0 45 /Times-Roman /font32 ANSIFont font +891 2028 139 (^X ^M) SB +359 2145 765 (Delete a mode from the current buffer) SB +32 0 0 50 50 0 0 47 /Times-Italic /font31 ANSIFont font +182 2259 345 (add-global-mode) SB +32 0 0 50 50 0 0 45 /Times-Roman /font32 ANSIFont font +891 2261 159 (Meta M) SB +18 6 SJ +359 2378 522 (Add a mode to the global ) SB +40 10 SJ +899 2378 1248 (modes which get inherited by any new buffers that are created) SB +182 2436 276 (while editing.) SB +32 0 0 50 50 0 0 47 /Times-Italic /font31 ANSIFont font +182 2550 389 (delete-global-mode) SB +32 0 0 50 50 0 0 45 /Times-Roman /font32 ANSIFont font +891 2552 182 (Meta ^M) SB +17 17 SJ +359 2669 1696 (Delete a mode from the global mode list. This mode list is displayed as the first line ) SB +2 1 SJ +2072 2669 113 (in the) SB +182 2727 920 (output produced by the list-buffers command.) SB +39 13 SJ +359 2843 1528 (Modes are assigned to all buffers that exist during an editing session. These ) SB +4 1 SJ +1926 2843 257 (modes effect) SB +182 2901 1609 (the way text is inserted, and the operation of some commands. Legal modes are:) SB +32 0 0 42 42 0 0 38 /Times-Roman /font32 ANSIFont font +182 3183 198 (uEmacs 4.0) SB +891 3183 209 ( ) SB +32 0 0 50 50 0 0 45 /Times-Roman /font32 ANSIFont font +1100 3176 43 ( -) SB +32 0 0 42 42 0 0 38 /Times-Roman /font32 ANSIFont font +1143 3183 11 ( ) SB +32 0 0 50 50 0 0 45 /Times-Roman /font32 ANSIFont font +1154 3176 25 (9) SB +32 0 0 42 42 0 0 38 /Times-Roman /font32 ANSIFont font +1179 3183 11 ( ) SB +32 0 0 50 50 0 0 45 /Times-Roman /font32 ANSIFont font +1190 3176 17 (-) SB +32 0 0 42 42 0 0 38 /Times-Roman /font32 ANSIFont font +1918 3183 269 (December 1991) SB +showpage +% %%Page: 10 10 +grestore sheetsave restore +/sheetsave save def +gsave +24 416 translate -90 rotate +393 596 div 548 842 div scale +0 0 moveto 0 842 lineto 596 842 lineto 596 0 lineto +closepath clip newpath +0 54 39 2478 3507 300 SM +0 0 0 fC +32 0 0 50 50 0 0 48 /Times-Bold /font29 ANSIFont font +359 197 121 (Over ) SB +32 0 0 50 50 0 0 45 /Times-Roman /font32 ANSIFont font +480 200 17 (-) SB +32 0 0 50 50 0 0 48 /Times-Bold /font29 ANSIFont font +497 197 13 ( ) SB +32 0 0 50 50 0 0 45 /Times-Roman /font32 ANSIFont font +510 200 327 (Overwrite mode) SB +25 5 SJ +359 318 616 (In this mode, typed characters ) SB +42 7 SJ +1000 318 1145 (replace existing characters rather than being inserted into) SB +90 10 SJ +359 376 1422 (existing lines. Newlines still insert themselves, but all other characters ) SB +20 2 SJ +1871 376 296 (will write over) SB +70 14 SJ +359 434 1619 (existing characters on the current line being edited. This mode is very useful for ) SB +2048 434 139 (editing) SB +359 492 524 (charts, figures, and tables.) SB +32 0 0 50 50 0 0 48 /Times-Bold /font29 ANSIFont font +359 606 138 (Wrap ) SB +32 0 0 50 50 0 0 45 /Times-Roman /font32 ANSIFont font +497 609 17 (-) SB +32 0 0 50 50 0 0 48 /Times-Bold /font29 ANSIFont font +514 606 13 ( ) SB +32 0 0 50 50 0 0 45 /Times-Roman /font32 ANSIFont font +527 609 351 (Word wrap mode) SB +359 727 610 (In this mode, when the cursor ) SB +10 10 SJ +970 727 1207 (crosses the current fill column \(which defaults to 72\) it will,) SB +21 7 SJ +359 785 884 (at the next word break, automatically insert ) SB +28 7 SJ +1264 785 895 (a newline, dragging the last word down with) SB +60 12 SJ +359 843 1512 (it. This makes typing prose much easier since the newline \(\) only ) SB +18 3 SJ +1931 843 238 (needs to be) SB +359 901 515 (used between paragraphs.) SB +32 0 0 50 50 0 0 48 /Times-Bold /font29 ANSIFont font +359 1015 121 (View ) SB +32 0 0 50 50 0 0 45 /Times-Roman /font32 ANSIFont font +480 1018 645 (- File viewing \(read-only\) mode) SB +359 1136 1347 (In this mode, no commands which can change the text are allowed.) SB +32 0 0 50 50 0 0 48 /Times-Bold /font29 ANSIFont font +359 1250 196 (Cmode - ) SB +32 0 0 50 50 0 0 45 /Times-Roman /font32 ANSIFont font +555 1253 492 (C program editing mode) SB +28 4 SJ +359 1371 344 (This mode is for ) SB +72 9 SJ +731 1371 1384 (editing programs written in the 'C' programming language. When the) SB +24 8 SJ +359 1429 844 (newline is used, the editor will attempt to ) SB +28 7 SJ +1227 1429 932 (place the cursor at the proper indentation level) SB +8 1 SJ +359 1487 63 (on ) SB +117 13 SJ +430 1487 1640 (the next line. Close braces are automatically un-idented for the user, and also pre-) SB +78 6 SJ +359 1545 973 (processor commands are automatically set flush ) SB +84 6 SJ +1410 1545 693 (with the left margin. When a close) SB +359 1603 1644 (parenthesis or brace is typed, if the matching open is on screen, the cursor briefly ) SB +1 1 SJ +2004 1603 182 (moves to) SB +63 7 SJ +359 1661 703 (it, and then back. \(Typing any key ) SB +70 7 SJ +1125 1661 992 (will abort this fence matching, executing the next) SB +359 1719 477 (command immediately\)) SB +32 0 0 50 50 0 0 48 /Times-Bold /font29 ANSIFont font +359 1833 122 (Exact) SB +32 0 0 50 50 0 0 45 /Times-Roman /font32 ANSIFont font +481 1836 721 ( - Exact case matching on searching) SB +105 7 SJ +359 1954 990 (Normally case is insignificant during the various ) SB +64 4 SJ +1454 1954 669 (search commands. This forces all) SB +359 2012 900 (matching to take character case into account.) SB +32 0 0 50 50 0 0 48 /Times-Bold /font29 ANSIFont font +359 2126 133 (Magic) SB +32 0 0 50 50 0 0 45 /Times-Roman /font32 ANSIFont font +492 2129 778 ( - Regular expression pattern matching) SB +20 10 SJ +359 2247 1484 (This feature causes search commands to accept various pattern characters ) SB +6 2 SJ +1863 2247 318 (to allow regular) SB +359 2305 1123 (expression search and replaces. See chapter "The Magic) SB +32 0 0 50 50 0 0 47 /Times-Italic /font31 ANSIFont font +1482 2303 13 ( ) SB +32 0 0 50 50 0 0 45 /Times-Roman /font32 ANSIFont font +1495 2305 364 (Mode" for details.) SB +32 0 0 50 50 0 0 48 /Times-Bold /font29 ANSIFont font +359 2420 127 (Asave) SB +32 0 0 50 50 0 0 45 /Times-Roman /font32 ANSIFont font +486 2423 355 ( - Automatic save) SB +359 2541 1814 (This causes uEmacs to write your current file on disk when a certain number \(default 256\)) SB +359 2599 740 (of new characters have been entered.) SB +32 0 0 58 58 0 0 56 /Times-Bold /font29 ANSIFont font +182 2771 536 (On-screen formatting) SB +32 0 0 50 50 0 0 47 /Times-Italic /font31 ANSIFont font +182 2900 292 (set-fill-column) SB +32 0 0 50 50 0 0 45 /Times-Roman /font32 ANSIFont font +891 2902 100 (^X F) SB +359 3019 500 (Sets the column used by ) SB +32 0 0 50 50 0 0 47 /Times-Italic /font31 ANSIFont font +859 3017 111 (Wrap) SB +32 0 0 50 50 0 0 45 /Times-Roman /font32 ANSIFont font +970 3019 222 ( mode and ) SB +32 0 0 50 50 0 0 47 /Times-Italic /font31 ANSIFont font +1192 3017 286 (fill-paragraph) SB +32 0 0 50 50 0 0 45 /Times-Roman /font32 ANSIFont font +1478 3019 98 ( and ) SB +32 0 0 50 50 0 0 47 /Times-Italic /font31 ANSIFont font +1576 3017 352 (justify-paragraph) SB +32 0 0 50 50 0 0 45 /Times-Roman /font32 ANSIFont font +1928 3019 242 ( commands.) SB +32 0 0 42 42 0 0 38 /Times-Roman /font32 ANSIFont font +182 3183 198 (uEmacs 4.0) SB +891 3183 209 ( ) SB +32 0 0 50 50 0 0 45 /Times-Roman /font32 ANSIFont font +1100 3176 43 ( -) SB +32 0 0 42 42 0 0 38 /Times-Roman /font32 ANSIFont font +1143 3183 11 ( ) SB +32 0 0 50 50 0 0 45 /Times-Roman /font32 ANSIFont font +1154 3176 50 (10) SB +32 0 0 42 42 0 0 38 /Times-Roman /font32 ANSIFont font +1204 3183 11 ( ) SB +32 0 0 50 50 0 0 45 /Times-Roman /font32 ANSIFont font +1215 3176 17 (-) SB +32 0 0 42 42 0 0 38 /Times-Roman /font32 ANSIFont font +1918 3183 269 (December 1991) SB +showpage +% %%Page: 11 11 +grestore sheetsave restore +showsheet +%%Page: 6 6 +/sheetsave save def +gsave +24 817 translate -90 rotate +393 596 div 548 842 div scale +0 0 moveto 0 842 lineto 596 842 lineto 596 0 lineto +closepath clip newpath +0 54 39 2478 3507 300 SM +0 0 0 fC +32 0 0 50 50 0 0 47 /Times-Italic /font31 ANSIFont font +182 259 217 (handle-tab) SB +32 0 0 50 50 0 0 45 /Times-Roman /font32 ANSIFont font +891 261 40 (^I) SB +32 0 0 50 50 0 0 51 /Symbol font +1186 255 59 (\256|) SB +32 0 0 50 50 0 0 45 /Times-Roman /font32 ANSIFont font +1600 261 78 (Tab) SB +56 7 SJ +359 380 795 (Given a numeric argument, the tab key ) SB +72 8 SJ +1210 380 905 (resets the normal behavior of the tab key. An) SB +90 18 SJ +182 438 1829 (argument of zero causes the tab key to generate hardware tabs \(at each 8 or 4 columns, see ) SB +2101 438 86 ($tab) SB +14 14 SJ +182 496 1681 (variable\). A non-zero argument will cause the tab key to generate enough spaces to ) SB +4 2 SJ +1877 496 306 (reach a column) SB +182 554 1578 (of a multiple of the argument given. This also resets the spacing used while in ) SB +32 0 0 50 50 0 0 47 /Times-Italic /font31 ANSIFont font +1760 552 141 (Cmode) SB +32 0 0 50 50 0 0 45 /Times-Roman /font32 ANSIFont font +1901 554 13 (.) SB +32 0 0 50 50 0 0 47 /Times-Italic /font31 ANSIFont font +182 669 286 (fill-paragraph) SB +32 0 0 50 50 0 0 45 /Times-Roman /font32 ANSIFont font +891 671 151 (Meta Q) SB +13 13 SJ +359 788 1488 (This takes all the text in the current paragraph \(as defined by surrounding ) SB +6 3 SJ +1860 788 321 (blank lines, or a) SB +182 846 1664 (leading indent\) and attempt to fill it from the left margin to the current fill column.) SB +32 0 0 50 50 0 0 47 /Times-Italic /font31 ANSIFont font +182 960 352 (justify-paragraph) SB +32 0 0 50 50 0 0 45 /Times-Roman /font32 ANSIFont font +891 962 134 (Meta J) SB +12 2 SJ +359 1079 148 (This is ) SB +28 4 SJ +519 1079 444 (a modified version of ) SB +32 0 0 50 50 0 0 47 /Times-Italic /font31 ANSIFont font +991 1077 299 (fill-paragraph.) SB +32 0 0 50 50 0 0 45 /Times-Roman /font32 ANSIFont font +63 9 SJ +1290 1079 834 ( The left margin is taken to be the current) SB +182 1138 1423 (column. No extra white space is inserted after punctuation. The cursor ) SB +5 5 SJ +1606 1138 576 (is moved to the beginning of) SB +182 1196 312 (next paragraph.) SB +32 0 0 50 50 0 0 47 /Times-Italic /font31 ANSIFont font +182 1310 297 (buffer-position) SB +32 0 0 50 50 0 0 45 /Times-Roman /font32 ANSIFont font +891 1312 100 (^X =) SB +359 1429 312 (This command ) SB +13 13 SJ +672 1429 1502 (reports on the current and total lines and characters of the current buffer. It) SB +182 1487 1515 (also gives the hexadecimal code of the character currently under the cursor.) SB +32 0 0 58 58 0 0 56 /Times-Bold /font29 ANSIFont font +182 1659 443 (Multiple windows) SB +32 0 0 50 50 0 0 47 /Times-Italic /font31 ANSIFont font +182 1788 421 (split-current-window) SB +32 0 0 50 50 0 0 45 /Times-Roman /font32 ANSIFont font +891 1790 97 (^X 2) SB +66 11 SJ +359 1907 1330 (If possible, this command splits the current window into two near ) SB +14 2 SJ +1755 1907 418 (equal windows, each) SB +24 12 SJ +182 1965 1611 (displaying the buffer displayed by the original window. A numeric argument of ) SB +9 3 SJ +1817 1965 361 (1 forces the upper) SB +24 6 SJ +182 2023 611 (window to be the new current ) SB +60 12 SJ +817 2023 1310 (window, and an argument of 2 forces the lower window to be the) SB +182 2081 425 (new current window.) SB +32 0 0 50 50 0 0 47 /Times-Italic /font31 ANSIFont font +182 2195 291 (delete-window) SB +32 0 0 50 50 0 0 45 /Times-Roman /font32 ANSIFont font +891 2197 97 (^X 0) SB +15 3 SJ +359 2314 494 (This command attempts ) SB +66 11 SJ +868 2314 1253 (to delete the current window, retrieving the lines for use in the) SB +182 2372 537 (window above or below it.) SB +32 0 0 50 50 0 0 47 /Times-Italic /font31 ANSIFont font +182 2486 432 (delete-other-windows) SB +32 0 0 50 50 0 0 45 /Times-Roman /font32 ANSIFont font +891 2488 97 (^X 1) SB +40 8 SJ +359 2605 988 (All other windows are deleted by this command. ) SB +30 5 SJ +1387 2605 770 (The current window becomes the only) SB +182 2663 842 (window, using the entire available screen.) SB +32 0 0 50 50 0 0 47 /Times-Italic /font31 ANSIFont font +182 2777 255 (next-window) SB +32 0 0 50 50 0 0 45 /Times-Roman /font32 ANSIFont font +891 2779 108 (^X O) SB +24 6 SJ +359 2896 671 (Make the next window down the ) SB +40 8 SJ +1054 2896 1029 (current window. With an argument, this makes the ) SB +32 0 0 50 50 0 0 47 /Times-Italic /font31 ANSIFont font +2123 2894 25 (n) SB +32 0 0 50 50 0 0 45 /Times-Roman /font32 ANSIFont font +2148 2896 39 (th) SB +182 2955 591 (window from the top current.) SB +32 0 0 42 42 0 0 38 /Times-Roman /font32 ANSIFont font +182 3183 198 (uEmacs 4.0) SB +891 3183 209 ( ) SB +32 0 0 50 50 0 0 45 /Times-Roman /font32 ANSIFont font +1100 3176 43 ( -) SB +32 0 0 42 42 0 0 38 /Times-Roman /font32 ANSIFont font +1143 3183 11 ( ) SB +32 0 0 50 50 0 0 45 /Times-Roman /font32 ANSIFont font +1154 3176 50 (11) SB +32 0 0 42 42 0 0 38 /Times-Roman /font32 ANSIFont font +1204 3183 11 ( ) SB +32 0 0 50 50 0 0 45 /Times-Roman /font32 ANSIFont font +1215 3176 17 (-) SB +32 0 0 42 42 0 0 38 /Times-Roman /font32 ANSIFont font +1918 3183 269 (December 1991) SB +showpage +% %%Page: 12 12 +grestore sheetsave restore +/sheetsave save def +gsave +24 416 translate -90 rotate +393 596 div 548 842 div scale +0 0 moveto 0 842 lineto 596 842 lineto 596 0 lineto +closepath clip newpath +0 54 39 2478 3507 300 SM +0 0 0 fC +32 0 0 50 50 0 0 47 /Times-Italic /font31 ANSIFont font +182 197 343 (previous-window) SB +32 0 0 50 50 0 0 45 /Times-Roman /font32 ANSIFont font +891 199 100 (^X P) SB +8 1 SJ +359 316 126 (Make ) SB +117 13 SJ +493 316 1513 (the next window up the current window. With an argument, this makes the ) SB +32 0 0 50 50 0 0 47 /Times-Italic /font31 ANSIFont font +2123 314 25 (n) SB +32 0 0 50 50 0 0 45 /Times-Roman /font32 ANSIFont font +2148 316 39 (th) SB +182 375 917 (window from the bottom the current window.) SB +32 0 0 50 50 0 0 47 /Times-Italic /font31 ANSIFont font +182 489 338 (scroll-next-down) SB +32 0 0 50 50 0 0 45 /Times-Roman /font32 ANSIFont font +891 491 174 (Meta ^V) SB +359 608 746 (Scroll the next window down a page.) SB +32 0 0 50 50 0 0 47 /Times-Italic /font31 ANSIFont font +182 722 280 (scroll-next-up) SB +32 0 0 50 50 0 0 45 /Times-Roman /font32 ANSIFont font +891 724 169 (Meta ^Z) SB +359 841 685 (Scroll the next window up a page.) SB +32 0 0 58 58 0 0 56 /Times-Bold /font29 ANSIFont font +182 1013 517 (Controlling windows) SB +32 0 0 50 50 0 0 47 /Times-Italic /font31 ANSIFont font +182 1142 274 (grow-window) SB +32 0 0 50 50 0 0 45 /Times-Roman /font32 ANSIFont font +891 1144 95 (^X ^) SB +359 1261 1526 (Enlarge the current window by the argument number of lines \(1 by default\).) SB +32 0 0 50 50 0 0 47 /Times-Italic /font31 ANSIFont font +182 1375 296 (shrink-window) SB +32 0 0 50 50 0 0 45 /Times-Roman /font32 ANSIFont font +891 1377 126 (^X ^Z) SB +359 1494 1504 (Shrink the current window by the argument number of lines \(1 by default\).) SB +32 0 0 50 50 0 0 47 /Times-Italic /font31 ANSIFont font +182 1608 287 (resize-window) SB +32 0 0 50 50 0 0 45 /Times-Roman /font32 ANSIFont font +891 1610 119 (^X W) SB +2 2 SJ +359 1727 239 (Change the ) SB +28 14 SJ +600 1727 1559 (size of the current window to the number of line specified by the argument, if) SB +182 1785 176 (possible.) SB +32 0 0 50 50 0 0 47 /Times-Italic /font31 ANSIFont font +182 1899 402 (move-window-down) SB +32 0 0 50 50 0 0 45 /Times-Roman /font32 ANSIFont font +891 1901 131 (^X ^N) SB +359 2018 1193 (Move the window into the current buffer down by one line.) SB +32 0 0 50 50 0 0 47 /Times-Italic /font31 ANSIFont font +182 2132 344 (move-window-up) SB +32 0 0 50 50 0 0 45 /Times-Roman /font32 ANSIFont font +891 2134 123 (^X ^P) SB +359 2251 1132 (Move the window into the current buffer up by one line.) SB +32 0 0 50 50 0 0 47 /Times-Italic /font31 ANSIFont font +182 2365 304 (redraw-display) SB +32 0 0 50 50 0 0 45 /Times-Roman /font32 ANSIFont font +891 2367 169 (Meta ^L) SB +16 8 SJ +359 2484 990 (Redraw the current window with the current line ) SB +24 8 SJ +1365 2484 798 (in the middle of the window, or with an) SB +182 2542 771 (argument, with the current line on the ) SB +32 0 0 50 50 0 0 47 /Times-Italic /font31 ANSIFont font +953 2540 25 (n) SB +32 0 0 50 50 0 0 45 /Times-Roman /font32 ANSIFont font +978 2542 598 (th line of the current window.) SB +32 0 0 50 50 0 0 47 /Times-Italic /font31 ANSIFont font +182 2657 354 (clear-and-redraw) SB +32 0 0 50 50 0 0 45 /Times-Roman /font32 ANSIFont font +891 2659 54 (^L) SB +99 9 SJ +359 2776 1089 (Clear the screen and redraw the entire display. Useful ) SB +36 3 SJ +1547 2776 604 (on timesharing systems where) SB +182 2834 1020 (messages and other things can garbage the display.) SB +32 0 0 42 42 0 0 38 /Times-Roman /font32 ANSIFont font +182 3183 198 (uEmacs 4.0) SB +891 3183 209 ( ) SB +32 0 0 50 50 0 0 45 /Times-Roman /font32 ANSIFont font +1100 3176 43 ( -) SB +32 0 0 42 42 0 0 38 /Times-Roman /font32 ANSIFont font +1143 3183 11 ( ) SB +32 0 0 50 50 0 0 45 /Times-Roman /font32 ANSIFont font +1154 3176 50 (12) SB +32 0 0 42 42 0 0 38 /Times-Roman /font32 ANSIFont font +1204 3183 11 ( ) SB +32 0 0 50 50 0 0 45 /Times-Roman /font32 ANSIFont font +1215 3176 17 (-) SB +32 0 0 42 42 0 0 38 /Times-Roman /font32 ANSIFont font +1918 3183 269 (December 1991) SB +showpage +% %%Page: 13 13 +grestore sheetsave restore +showsheet +%%Page: 7 7 +/sheetsave save def +gsave +24 817 translate -90 rotate +393 596 div 548 842 div scale +0 0 moveto 0 842 lineto 596 842 lineto 596 0 lineto +closepath clip newpath +0 54 39 2478 3507 300 SM +0 0 0 fC +32 0 0 58 58 0 0 56 /Times-Bold /font29 ANSIFont font +182 197 404 (Multiple buffers) SB +32 0 0 50 50 0 0 47 /Times-Italic /font31 ANSIFont font +182 327 249 (select-buffer) SB +32 0 0 50 50 0 0 45 /Times-Roman /font32 ANSIFont font +891 329 105 (^X B) SB +18 3 SJ +359 446 325 (Switch to using ) SB +77 11 SJ +702 446 1408 (another buffer in the current window. uEmacs will prompt you for the) SB +182 504 517 (name of the buffer to use.) SB +32 0 0 50 50 0 0 47 /Times-Italic /font31 ANSIFont font +182 618 219 (next-buffer) SB +32 0 0 50 50 0 0 45 /Times-Roman /font32 ANSIFont font +891 620 108 (^X X) SB +359 737 1425 (Switch to using the next buffer in the buffer list in the current window.) SB +32 0 0 50 50 0 0 47 /Times-Italic /font31 ANSIFont font +182 851 244 (name-buffer) SB +32 0 0 50 50 0 0 45 /Times-Roman /font32 ANSIFont font +891 853 174 (Meta ^N) SB +359 970 780 (Change the name of the current buffer.) SB +32 0 0 50 50 0 0 47 /Times-Italic /font31 ANSIFont font +182 1084 255 (delete-buffer) SB +32 0 0 50 50 0 0 45 /Times-Roman /font32 ANSIFont font +891 1086 108 (^X K) SB +22 11 SJ +359 1203 1256 (Dispose of an undisplayed buffer in the editor and reclaim the ) SB +12 4 SJ +1637 1203 538 (space. This does not delete) SB +182 1261 664 (the file the buffer was read from.) SB +32 0 0 50 50 0 0 47 /Times-Italic /font31 ANSIFont font +182 1375 216 (list-buffers) SB +32 0 0 50 50 0 0 45 /Times-Roman /font32 ANSIFont font +891 1377 128 (^X ^B) SB +359 1494 511 (Split the current window ) SB +13 13 SJ +871 1494 1303 (and in one half bring up a list of all the buffers currently existing) SB +6 6 SJ +182 1552 648 (in the editor. The active modes, ) SB +22 11 SJ +836 1552 1329 (change flag, and active flag for each buffer is also displayed. \(The) SB +182 1610 1852 (change flag is an * if the buffer has been changed and not written out. The active flag is not ) SB +2 2 SJ +2035 1610 150 (an @ if) SB +10 2 SJ +182 1668 154 (the file ) SB +96 16 SJ +346 1668 1745 (had been specified on the command line, but has not been read in yet since nothing has) SB +182 1726 483 (switched to that buffer.\)) SB +32 0 0 58 58 0 0 56 /Times-Bold /font29 ANSIFont font +182 1898 461 (Reading from disk) SB +32 0 0 50 50 0 0 47 /Times-Italic /font31 ANSIFont font +182 2027 159 (find-file) SB +32 0 0 50 50 0 0 45 /Times-Roman /font32 ANSIFont font +891 2029 123 (^X ^F) SB +7 1 SJ +359 2146 105 (Find ) SB +128 16 SJ +471 2146 1588 (the named file. If it is already in a buffer, make that buffer active in the current) SB +182 2204 1478 (window, otherwise attempt to create a new buffer and read the file into it.) SB +32 0 0 50 50 0 0 47 /Times-Italic /font31 ANSIFont font +182 2318 172 (read-file) SB +32 0 0 50 50 0 0 45 /Times-Roman /font32 ANSIFont font +891 2320 128 (^X ^R) SB +40 4 SJ +359 2437 415 (Read the named file ) SB +99 9 SJ +814 2437 1274 (into the current buffer \(overwriting the previous contents of the) SB +182 2495 1398 (current buffer. If the change flag is set, a confirmation will be asked\).) SB +32 0 0 50 50 0 0 47 /Times-Italic /font31 ANSIFont font +182 2610 194 (insert-file) SB +32 0 0 50 50 0 0 45 /Times-Roman /font32 ANSIFont font +891 2612 112 (^X ^I) SB +359 2729 1341 (Insert the named file into the current position of the current buffer.) SB +32 0 0 50 50 0 0 47 /Times-Italic /font31 ANSIFont font +182 2843 172 (view-file) SB +32 0 0 50 50 0 0 45 /Times-Roman /font32 ANSIFont font +891 2845 131 (^X ^V) SB +6 2 SJ +359 2962 296 (Like find-file, ) SB +56 14 SJ +661 2962 1470 (this command either finds the file in a buffer, or creates a new buffer and) SB +182 3020 1080 (reads the file in. In addition, this leaves that buffer in ) SB +32 0 0 50 50 0 0 47 /Times-Italic /font31 ANSIFont font +1262 3018 100 (View) SB +32 0 0 50 50 0 0 45 /Times-Roman /font32 ANSIFont font +1362 3020 137 ( mode.) SB +32 0 0 42 42 0 0 38 /Times-Roman /font32 ANSIFont font +182 3183 198 (uEmacs 4.0) SB +891 3183 209 ( ) SB +32 0 0 50 50 0 0 45 /Times-Roman /font32 ANSIFont font +1100 3176 43 ( -) SB +32 0 0 42 42 0 0 38 /Times-Roman /font32 ANSIFont font +1143 3183 11 ( ) SB +32 0 0 50 50 0 0 45 /Times-Roman /font32 ANSIFont font +1154 3176 50 (13) SB +32 0 0 42 42 0 0 38 /Times-Roman /font32 ANSIFont font +1204 3183 11 ( ) SB +32 0 0 50 50 0 0 45 /Times-Roman /font32 ANSIFont font +1215 3176 17 (-) SB +32 0 0 42 42 0 0 38 /Times-Roman /font32 ANSIFont font +1918 3183 269 (December 1991) SB +showpage +% %%Page: 14 14 +grestore sheetsave restore +/sheetsave save def +gsave +24 416 translate -90 rotate +393 596 div 548 842 div scale +0 0 moveto 0 842 lineto 596 842 lineto 596 0 lineto +closepath clip newpath +0 54 39 2478 3507 300 SM +0 0 0 fC +32 0 0 58 58 0 0 56 /Times-Bold /font29 ANSIFont font +182 313 790 (Automatic file name completion) SB +32 0 0 50 50 0 0 45 /Times-Roman /font32 ANSIFont font +30 6 SJ +182 444 696 (File name completion can be used ) SB +30 5 SJ +908 444 668 (with all file oriented commands \() SB +32 0 0 50 50 0 0 47 /Times-Italic /font31 ANSIFont font +6 1 SJ +1606 442 370 (find-file, view-file,) SB +32 0 0 50 50 0 0 45 /Times-Roman /font32 ANSIFont font +18 3 SJ +1982 444 187 ( ...\) but it) SB +68 17 SJ +182 503 1834 (works only under UNIX and MS-DOS. It is invoked by a or . If there exist ) SB +2084 503 103 (more) SB +16 4 SJ +182 561 617 (than one possible completions ) SB +60 12 SJ +815 561 1312 (they are displayed one by one. If the file name contains wild card) SB +12 3 SJ +182 619 423 (characters, the name ) SB +50 10 SJ +617 619 1520 (is expanded instead of simple completion. Special characters can be entered) SB +182 677 899 (verbatim by prefixing them with ^V \(or ^Q\).) SB +32 0 0 58 58 0 0 56 /Times-Bold /font29 ANSIFont font +182 849 348 (Saving to disk) SB +32 0 0 50 50 0 0 47 /Times-Italic /font31 ANSIFont font +182 978 169 (save-file) SB +32 0 0 50 50 0 0 45 /Times-Roman /font32 ANSIFont font +891 980 123 (^X ^S) SB +1600 980 131 (^X ^D) SB +359 1097 355 (If the contents of ) SB +14 14 SJ +715 1097 1458 (the current buffer have been changed, write it back to the file it was read) SB +182 1155 124 (from. ) SB +32 0 0 50 50 0 0 47 /Times-Italic /font31 ANSIFont font +306 1153 1169 (Use ^X ^D if your terminal uses XON-XOFF-flow control.) SB +182 1270 183 (write-file) SB +32 0 0 50 50 0 0 45 /Times-Roman /font32 ANSIFont font +891 1272 142 (^X ^W) SB +36 6 SJ +359 1389 664 (Write the contents of the current ) SB +70 10 SJ +1059 1389 1058 (file to the named file, this also changes the file name) SB +182 1447 1107 (associated with the current buffer to the new file name.) SB +32 0 0 50 50 0 0 47 /Times-Italic /font31 ANSIFont font +182 1561 350 (change-file-name) SB +32 0 0 50 50 0 0 45 /Times-Roman /font32 ANSIFont font +891 1563 108 (^X N) SB +359 1680 1495 (Change the name associated with the current buffer to the file name given.) SB +32 0 0 50 50 0 0 47 /Times-Italic /font31 ANSIFont font +182 1795 197 (quick-exit) SB +32 0 0 50 50 0 0 45 /Times-Roman /font32 ANSIFont font +891 1797 146 (Meta Z) SB +30 10 SJ +359 1914 1035 (Write out all changed buffers to the files they were ) SB +28 7 SJ +1424 1914 735 (read from and exit the editor. This is) SB +182 1972 636 (the normal way to exit uEmacs.) SB +32 0 0 58 58 0 0 56 /Times-Bold /font29 ANSIFont font +182 2144 771 (Accessing the operating system) SB +32 0 0 50 50 0 0 47 /Times-Italic /font31 ANSIFont font +182 2273 305 (shell-command) SB +32 0 0 50 50 0 0 45 /Times-Roman /font32 ANSIFont font +891 2275 89 (^X !) SB +359 2392 408 (Send one command ) SB +10 10 SJ +768 2392 1409 (to execute to the operating system command processor, or shell. Upon) SB +182 2450 1344 (completion, uEmacs will wait for a keystroke to redraw the screen.) SB +32 0 0 50 50 0 0 47 /Times-Italic /font31 ANSIFont font +182 2564 297 (pipe-command) SB +32 0 0 50 50 0 0 45 /Times-Roman /font32 ANSIFont font +891 2566 118 (^X @) SB +18 9 SJ +359 2683 1268 (Execute one operating system command and pipe the resulting ) SB +15 5 SJ +1645 2683 527 (output into a buffer by the) SB +182 2741 426 (name of "command".) SB +32 0 0 50 50 0 0 47 /Times-Italic /font31 ANSIFont font +182 2855 233 (filter-buffer) SB +32 0 0 50 50 0 0 45 /Times-Roman /font32 ANSIFont font +415 2857 13 ( ) SB +891 2857 97 (^X #) SB +20 10 SJ +359 2974 1338 (Execute one operating system command, using the contents of the ) SB +9 3 SJ +1717 2974 461 (current buffer as input,) SB +182 3032 1497 (and sending the results back to the same buffer, replacing the original text.) SB +32 0 0 42 42 0 0 38 /Times-Roman /font32 ANSIFont font +182 3183 198 (uEmacs 4.0) SB +891 3183 209 ( ) SB +32 0 0 50 50 0 0 45 /Times-Roman /font32 ANSIFont font +1100 3176 43 ( -) SB +32 0 0 42 42 0 0 38 /Times-Roman /font32 ANSIFont font +1143 3183 11 ( ) SB +32 0 0 50 50 0 0 45 /Times-Roman /font32 ANSIFont font +1154 3176 50 (14) SB +32 0 0 42 42 0 0 38 /Times-Roman /font32 ANSIFont font +1204 3183 11 ( ) SB +32 0 0 50 50 0 0 45 /Times-Roman /font32 ANSIFont font +1215 3176 17 (-) SB +32 0 0 42 42 0 0 38 /Times-Roman /font32 ANSIFont font +1918 3183 269 (December 1991) SB +showpage +% %%Page: 15 15 +grestore sheetsave restore +showsheet +%%Page: 8 8 +/sheetsave save def +gsave +24 817 translate -90 rotate +393 596 div 548 842 div scale +0 0 moveto 0 842 lineto 596 842 lineto 596 0 lineto +closepath clip newpath +0 54 39 2478 3507 300 SM +0 0 0 fC +32 0 0 50 50 0 0 47 /Times-Italic /font31 ANSIFont font +182 255 125 (i-shell) SB +32 0 0 50 50 0 0 45 /Times-Roman /font32 ANSIFont font +891 257 105 (^X C) SB +359 374 260 (Push up to a ) SB +11 11 SJ +620 374 1556 (new command processor or shell. Upon exiting the shell, uEmacs will redraw) SB +182 432 622 (its screen and continue editing.) SB +32 0 0 50 50 0 0 47 /Times-Italic /font31 ANSIFont font +182 546 301 (suspend-emacs) SB +32 0 0 50 50 0 0 45 /Times-Roman /font32 ANSIFont font +891 548 108 (^X D) SB +1600 548 482 (\(only under 4.[23]BSD\)) SB +359 665 1756 (This command suspends the editing processor and puts it into the background. The "fg") SB +182 723 610 (command will restart uEmacs.) SB +32 0 0 50 50 0 0 47 /Times-Italic /font31 ANSIFont font +182 837 213 (exit-emacs) SB +32 0 0 50 50 0 0 45 /Times-Roman /font32 ANSIFont font +891 839 128 (^X ^C) SB +12 12 SJ +359 956 1404 (Exit uEmacs back to the operating system. If there are any unwritten, ) SB +4 2 SJ +1775 956 408 (changed buffers, the) SB +182 1014 736 (editor will promt to discard changes.) SB +32 0 0 58 58 0 0 56 /Times-Bold /font29 ANSIFont font +182 1186 717 (Key bindings and commands) SB +32 0 0 50 50 0 0 47 /Times-Italic /font31 ANSIFont font +182 1315 228 (bind-to-key) SB +32 0 0 50 50 0 0 45 /Times-Roman /font32 ANSIFont font +891 1317 151 (Meta K) SB +96 16 SJ +359 1434 1669 (This command takes one of the named commands and binds it to a key. From then ) SB +2124 1434 63 (on,) SB +182 1492 1232 (whenever that key is struck, the bound command is executed.) SB +32 0 0 50 50 0 0 47 /Times-Italic /font31 ANSIFont font +182 1606 222 (unbind-key) SB +32 0 0 50 50 0 0 45 /Times-Roman /font32 ANSIFont font +891 1608 174 (Meta ^K) SB +359 1725 749 (This unbinds a command from a key.) SB +32 0 0 50 50 0 0 47 /Times-Italic /font31 ANSIFont font +182 1839 251 (describe-key) SB +32 0 0 50 50 0 0 45 /Times-Roman /font32 ANSIFont font +891 1841 94 (^X ?) SB +50 5 SJ +359 1958 615 (This command will allow you ) SB +132 12 SJ +1024 1958 1031 (to type a key and it will then report the name of the) SB +182 2016 573 (command bound to that key.) SB +32 0 0 50 50 0 0 47 /Times-Italic /font31 ANSIFont font +182 2130 510 (execute-named-command) SB +32 0 0 50 50 0 0 45 /Times-Roman /font32 ANSIFont font +891 2132 151 (Meta X) SB +21 7 SJ +359 2249 795 (This command will prompt you for the ) SB +28 7 SJ +1175 2249 984 (name of a command to execute. Typing ) SB +15 5 SJ +182 2307 524 (part way through will tell ) SB +56 14 SJ +721 2307 1410 (the editor to attempt to complete the name on its own. If it then beeps,) SB +182 2365 784 (there is no such command to complete.) SB +32 0 0 50 50 0 0 47 /Times-Italic /font31 ANSIFont font +182 2479 357 (describe-bindings) SB +32 0 0 50 50 0 0 45 /Times-Roman /font32 ANSIFont font +891 2481 175 (unbound) SB +359 2598 983 (This command splits the current window, and in ) SB +9 9 SJ +1343 2598 835 (one of the windows makes a list of all the) SB +182 2656 1148 (named commands, and the keys currently bound to them.) SB +32 0 0 50 50 0 0 47 /Times-Italic /font31 ANSIFont font +182 2770 163 (apropos) SB +32 0 0 50 50 0 0 45 /Times-Roman /font32 ANSIFont font +891 2772 151 (Meta A) SB +359 2889 791 (This command is a modification of the ) SB +1150 2889 210 (command ) SB +32 0 0 50 50 0 0 47 /Times-Italic /font31 ANSIFont font +1360 2887 370 (describe-bindings.) SB +32 0 0 50 50 0 0 45 /Times-Roman /font32 ANSIFont font +1730 2889 346 ( It lists all named) SB +182 2948 807 (commands that match a given substring.) SB +32 0 0 42 42 0 0 38 /Times-Roman /font32 ANSIFont font +182 3183 198 (uEmacs 4.0) SB +891 3183 209 ( ) SB +32 0 0 50 50 0 0 45 /Times-Roman /font32 ANSIFont font +1100 3176 43 ( -) SB +32 0 0 42 42 0 0 38 /Times-Roman /font32 ANSIFont font +1143 3183 11 ( ) SB +32 0 0 50 50 0 0 45 /Times-Roman /font32 ANSIFont font +1154 3176 50 (15) SB +32 0 0 42 42 0 0 38 /Times-Roman /font32 ANSIFont font +1204 3183 11 ( ) SB +32 0 0 50 50 0 0 45 /Times-Roman /font32 ANSIFont font +1215 3176 17 (-) SB +32 0 0 42 42 0 0 38 /Times-Roman /font32 ANSIFont font +1918 3183 269 (December 1991) SB +showpage +% %%Page: 16 16 +grestore sheetsave restore +/sheetsave save def +gsave +24 416 translate -90 rotate +393 596 div 548 842 div scale +0 0 moveto 0 842 lineto 596 842 lineto 596 0 lineto +closepath clip newpath +0 54 39 2478 3507 300 SM +0 0 0 fC +32 0 0 58 58 0 0 56 /Times-Bold /font29 ANSIFont font +182 255 510 (Command execution) SB +32 0 0 50 50 0 0 45 /Times-Roman /font32 ANSIFont font +12 4 SJ +182 386 475 (Commands can also be ) SB +36 9 SJ +669 386 1482 (executed as command scripts. This allows commands and their arguments) SB +182 444 1607 (to be stored in files and executed. The general form of a command script line is:) SB +359 560 24 ({) SB +32 0 0 50 50 0 0 47 /Times-Italic /font31 ANSIFont font +383 558 431 (optional repeat count) SB +32 0 0 50 50 0 0 45 /Times-Roman /font32 ANSIFont font +814 560 37 (} ) SB +32 0 0 50 50 0 0 47 /Times-Italic /font31 ANSIFont font +851 558 319 (command-name) SB +32 0 0 50 50 0 0 45 /Times-Roman /font32 ANSIFont font +1170 560 37 ( {) SB +32 0 0 50 50 0 0 47 /Times-Italic /font31 ANSIFont font +1207 558 390 (optional arguments) SB +32 0 0 50 50 0 0 45 /Times-Roman /font32 ANSIFont font +1597 560 24 (}) SB +32 0 0 50 50 0 0 47 /Times-Italic /font31 ANSIFont font +182 675 452 (execute-command-line) SB +32 0 0 50 50 0 0 45 /Times-Roman /font32 ANSIFont font +891 677 175 (unbound) SB +359 794 597 (Execute a typed in script line.) SB +32 0 0 50 50 0 0 47 /Times-Italic /font31 ANSIFont font +182 908 285 (execute-buffer) SB +32 0 0 50 50 0 0 45 /Times-Roman /font32 ANSIFont font +891 910 175 (unbound) SB +70 14 SJ +359 1027 1445 (Executes script lines in the named buffer. If the buffer is off screen and ) SB +12 2 SJ +1874 1027 301 (an error occurs) SB +182 1085 1382 (during execution, the cursor will be left on the line causing the error.) SB +32 0 0 50 50 0 0 47 /Times-Italic /font31 ANSIFont font +182 1199 230 (execute-file) SB +32 0 0 50 50 0 0 45 /Times-Roman /font32 ANSIFont font +891 1201 175 (unbound) SB +359 1318 1663 (Executes script lines from a file. This is the normal way to execute a special script.) SB +32 0 0 50 50 0 0 47 /Times-Italic /font31 ANSIFont font +182 1432 379 (clear-message-line) SB +32 0 0 50 50 0 0 45 /Times-Roman /font32 ANSIFont font +891 1434 175 (unbound) SB +12 1 SJ +359 1551 140 (Clears ) SB +182 14 SJ +511 1551 1494 (the message line during script execution. This is useful so as not to leave a) SB +182 1609 1098 (confusing message from the last commands in a script.) SB +32 0 0 50 50 0 0 47 /Times-Italic /font31 ANSIFont font +182 1723 287 (write-message) SB +32 0 0 50 50 0 0 45 /Times-Roman /font32 ANSIFont font +891 1725 175 (unbound) SB +359 1842 778 (Write a message on the command line.) SB +32 0 0 50 50 0 0 47 /Times-Italic /font31 ANSIFont font +182 1956 288 (unmark-buffer) SB +32 0 0 50 50 0 0 45 /Times-Roman /font32 ANSIFont font +891 1958 175 (unbound) SB +27 9 SJ +359 2075 1089 (Remove the change flag from the current buffer. This ) SB +24 6 SJ +1475 2075 688 (is very useful in scripts where you) SB +182 2133 1905 (are creating help windows, and don't want uEmacs to complain about not saving them to a file.) SB +32 0 0 50 50 0 0 47 /Times-Italic /font31 ANSIFont font +182 2247 246 (insert-string) SB +32 0 0 50 50 0 0 45 /Times-Roman /font32 ANSIFont font +891 2249 175 (unbound) SB +63 9 SJ +359 2366 1003 (Insert a string into the current buffer. This allows ) SB +56 7 SJ +1425 2366 706 (you to build up text within a buffer) SB +182 2424 1630 (without reading it in from a file. Some special characters are allowed, as follows:) SB +359 2540 52 (~n) SB +714 2540 158 (newline) SB +359 2598 41 (~t) SB +714 2598 61 (tab) SB +359 2656 52 (~b) SB +714 2656 204 (backspace) SB +359 2714 44 (~f) SB +714 2714 184 (formfeed) SB +32 0 0 50 50 0 0 47 /Times-Italic /font31 ANSIFont font +182 2828 323 (overwrite-string) SB +32 0 0 50 50 0 0 45 /Times-Roman /font32 ANSIFont font +891 2830 175 (unbound) SB +359 2947 1252 (Insert or overwrite a string into the current buffer. Works like ) SB +32 0 0 50 50 0 0 47 /Times-Italic /font31 ANSIFont font +1611 2945 246 (insert-string) SB +32 0 0 50 50 0 0 45 /Times-Roman /font32 ANSIFont font +1857 2947 65 ( in ) SB +32 0 0 50 50 0 0 47 /Times-Italic /font31 ANSIFont font +1922 2945 99 (Over) SB +32 0 0 50 50 0 0 45 /Times-Roman /font32 ANSIFont font +2021 2947 137 ( mode.) SB +32 0 0 42 42 0 0 38 /Times-Roman /font32 ANSIFont font +182 3183 198 (uEmacs 4.0) SB +891 3183 209 ( ) SB +32 0 0 50 50 0 0 45 /Times-Roman /font32 ANSIFont font +1100 3176 43 ( -) SB +32 0 0 42 42 0 0 38 /Times-Roman /font32 ANSIFont font +1143 3183 11 ( ) SB +32 0 0 50 50 0 0 45 /Times-Roman /font32 ANSIFont font +1154 3176 50 (16) SB +32 0 0 42 42 0 0 38 /Times-Roman /font32 ANSIFont font +1204 3183 11 ( ) SB +32 0 0 50 50 0 0 45 /Times-Roman /font32 ANSIFont font +1215 3176 17 (-) SB +32 0 0 42 42 0 0 38 /Times-Roman /font32 ANSIFont font +1918 3183 269 (December 1991) SB +showpage +% %%Page: 17 17 +grestore sheetsave restore +showsheet +%%Page: 9 9 +/sheetsave save def +gsave +24 817 translate -90 rotate +393 596 div 548 842 div scale +0 0 moveto 0 842 lineto 596 842 lineto 596 0 lineto +closepath clip newpath +0 54 39 2478 3507 300 SM +0 0 0 fC +32 0 0 58 58 0 0 56 /Times-Bold /font29 ANSIFont font +182 255 274 (Screen size) SB +32 0 0 50 50 0 0 45 /Times-Roman /font32 ANSIFont font +45 9 SJ +182 386 948 (On an IBM-PC the screen size is controlled by ) SB +42 7 SJ +1175 386 970 (the monitor type. Although 25x80 is the default,) SB +108 9 SJ +182 444 848 (43x80 can be used on an EGA screen and ) SB +117 9 SJ +1138 444 932 (52x80 on a VGA screen. The screen size is set) SB +133 7 SJ +182 502 1153 (automatically when setting the screen resolution variable ) SB +100 5 SJ +1468 502 619 ($sres to "EGA" or "VGA" \(see) SB +182 560 521 (Environmental variables\).) SB +30 6 SJ +359 676 708 (Under UNIX and VMS the default ) SB +48 8 SJ +1097 676 1042 (screen size depends on terminal settings used by the) SB +24 3 SJ +182 734 413 (operating system. If ) SB +99 11 SJ +619 734 1469 (you use a window system under UNIX, uEmacs can even detect dynamic) SB +182 792 1178 (changes of virtual screen size and resize itself accordingly.) SB +359 908 1733 (However, the screen size can be controlled manually by the following two commands:) SB +32 0 0 50 50 0 0 47 /Times-Italic /font31 ANSIFont font +182 1022 381 (change-screen-size) SB +32 0 0 50 50 0 0 45 /Times-Roman /font32 ANSIFont font +891 1024 174 (Meta ^D) SB +359 1141 770 (Change the number of lines on screen.) SB +32 0 0 50 50 0 0 47 /Times-Italic /font31 ANSIFont font +182 1255 418 (change-screen-width) SB +32 0 0 50 50 0 0 45 /Times-Roman /font32 ANSIFont font +891 1257 169 (Meta ^T) SB +359 1374 845 (Change the number of columns on screen.) SB +32 0 0 58 58 0 0 56 /Times-Bold /font29 ANSIFont font +182 1546 671 (Keyboard macro execution) SB +32 0 0 50 50 0 0 45 /Times-Roman /font32 ANSIFont font +16 8 SJ +182 1677 1059 (Also available is one keyboard macro, which allows ) SB +24 8 SJ +1257 1677 906 (you to record a number of commands as they) SB +182 1735 668 (are executed and play them back.) SB +32 0 0 50 50 0 0 47 /Times-Italic /font31 ANSIFont font +182 1849 255 (begin-macro) SB +32 0 0 50 50 0 0 45 /Times-Roman /font32 ANSIFont font +891 1851 89 (^X \() SB +359 1968 650 (Start recording keyboard macro.) SB +32 0 0 50 50 0 0 47 /Times-Italic /font31 ANSIFont font +182 2082 216 (end-macro) SB +32 0 0 50 50 0 0 45 /Times-Roman /font32 ANSIFont font +891 2084 89 (^X \)) SB +359 2201 647 (Stop recording keyboard macro.) SB +32 0 0 50 50 0 0 47 /Times-Italic /font31 ANSIFont font +182 2315 293 (execute-macro) SB +32 0 0 50 50 0 0 45 /Times-Roman /font32 ANSIFont font +475 2317 13 ( ) SB +891 2317 103 (^X E) SB +359 2434 511 (Execute keyboard macro.) SB +32 0 0 58 58 0 0 56 /Times-Bold /font29 ANSIFont font +182 2606 541 (THE MAGIC MODE) SB +32 0 0 50 50 0 0 45 /Times-Roman /font32 ANSIFont font +48 6 SJ +182 2740 619 (In the Magic mode of uEmacs ) SB +81 9 SJ +849 2740 1257 (certain characters gain special meanings when used in a search) SB +50 5 SJ +182 2798 719 (pattern. Collectively they are know ) SB +99 9 SJ +951 2798 1137 (as regular expressions, and a limited number of them are) SB +49 7 SJ +182 2856 1041 (supported in uEmacs. They grant greater flexibility ) SB +40 5 SJ +1272 2856 875 (when using the search command. However,) SB +182 2914 1039 (they do not affect the incremental search command.) SB +32 0 0 42 42 0 0 38 /Times-Roman /font32 ANSIFont font +182 3183 198 (uEmacs 4.0) SB +891 3183 209 ( ) SB +32 0 0 50 50 0 0 45 /Times-Roman /font32 ANSIFont font +1100 3176 43 ( -) SB +32 0 0 42 42 0 0 38 /Times-Roman /font32 ANSIFont font +1143 3183 11 ( ) SB +32 0 0 50 50 0 0 45 /Times-Roman /font32 ANSIFont font +1154 3176 50 (17) SB +32 0 0 42 42 0 0 38 /Times-Roman /font32 ANSIFont font +1204 3183 11 ( ) SB +32 0 0 50 50 0 0 45 /Times-Roman /font32 ANSIFont font +1215 3176 17 (-) SB +32 0 0 42 42 0 0 38 /Times-Roman /font32 ANSIFont font +1918 3183 269 (December 1991) SB +showpage +% %%Page: 18 18 +grestore sheetsave restore +/sheetsave save def +gsave +24 416 translate -90 rotate +393 596 div 548 842 div scale +0 0 moveto 0 842 lineto 596 842 lineto 596 0 lineto +closepath clip newpath +0 54 39 2478 3507 300 SM +0 0 0 fC +32 0 0 50 50 0 0 45 /Times-Roman /font32 ANSIFont font +359 199 853 (The symbols that have special meaning in ) SB +32 0 0 50 50 0 0 47 /Times-Italic /font31 ANSIFont font +1212 197 128 (Magic) SB +32 0 0 50 50 0 0 45 /Times-Roman /font32 ANSIFont font +1340 199 350 ( mode are ^, $, ., ) SB +6 6 SJ +1691 199 490 (*, [ \(and ], used with it\),) SB +18 9 SJ +182 258 672 (and \\ . The characters ^ and $ fix ) SB +30 10 SJ +872 258 1285 (the search pattern to the beginning and end of line, respectively.) SB +18 18 SJ +182 316 1826 (The ^ character must appear at the beginning of the search string, and the $ must appear at ) SB +2 1 SJ +2026 316 159 (the end,) SB +182 374 1592 (otherwise they loose their meaning and are treated just like any other character.) SB +359 490 330 (For example, in ) SB +32 0 0 50 50 0 0 47 /Times-Italic /font31 ANSIFont font +689 488 128 (Magic) SB +32 0 0 50 50 0 0 45 /Times-Roman /font32 ANSIFont font +817 490 1033 ( mode, searching for the pattern "t$" would put the ) SB +3 3 SJ +1851 490 333 (cursor at the end) SB +30 15 SJ +182 549 1412 (of any line that ended with the letter 't'. Note that this is different than ) SB +9 3 SJ +1624 549 554 (searching for "t", that) SB +45 15 SJ +182 607 1567 (is, 't' followed by a newline character. The character $ \(and ^, for that matter\) ) SB +8 2 SJ +1794 607 385 (matches a position,) SB +14 7 SJ +182 665 761 (not a character, so the cursor remains ) SB +39 13 SJ +957 665 1191 (at the end of the line. But a newline is a character that must) SB +182 723 255 (be matched, ) SB +17 17 SJ +438 723 1732 (just like any other character, which means that the cursor is placed just after it - on the) SB +182 781 529 (beginning of the next line.) SB +84 14 SJ +359 897 1533 (The character . has a very simple meaning - it matches any single character, ) SB +7 1 SJ +1976 897 204 (except the) SB +4 4 SJ +182 955 472 (newline. Thus a search ) SB +26 13 SJ +658 955 1503 (for "bad.er" could match "badger", "badder" \(slang\), or up to the 'r' of "bad) SB +182 1013 131 (error".) SB +55 5 SJ +359 1129 520 (The character * is known ) SB +120 10 SJ +934 1129 1133 (as closure, and means that zero or more of the preceding) SB +34 17 SJ +182 1187 1893 (character will match. If there is no character preceding, * has no special meaning, and since it ) SB +2109 1187 78 (will) SB +112 16 SJ +182 1245 1755 (not match with a newline, * will have no special meaning if preceded by the beginning ) SB +8 1 SJ +2049 1245 130 (of line) SB +182 1303 958 (symbol ^ or the literal newline character .) SB +359 1419 1366 (The notion of zero or more characters is important. If, for example, ) SB +4 4 SJ +1726 1419 457 (your cursor was on the) SB +182 1477 75 (line) SB +32 0 0 42 42 0 0 33 /Courier /font0 ANSIFont font +359 1591 800 (This line is missing two vowels.) SB +32 0 0 50 50 0 0 45 /Times-Roman /font32 ANSIFont font +80 16 SJ +359 1693 1709 (and a search was made for "a*", the cursor would not move, because it is guaranteed ) SB +2148 1693 39 (to) SB +182 1751 1845 (match no letter 'a' , which satisfies the search conditions. If you wanted to search for one or ) SB +1 1 SJ +2028 1751 158 (more of) SB +42 7 SJ +182 1809 694 (the letter 'a', you would search for ) SB +77 11 SJ +918 1809 1192 ("aa*", which would match the letter a, then zero or more of) SB +182 1867 113 (them.) SB +132 12 SJ +359 1983 1292 (The character [ indicates the beginning of a character class. It is ) SB +36 3 SJ +1783 1983 368 (similar to the 'any') SB +15 15 SJ +182 2041 1712 (character ., but you get to choose which characters you want to match. The character ) SB +4 2 SJ +1909 2041 274 (class is ended) SB +182 2099 1844 (with the character ]. So, while a search for "ba.e" will match "bane", "bade", "bale", "bate", ) SB +1 1 SJ +2027 2099 159 (etc, you) SB +21 7 SJ +182 2157 714 (can limit it to matching "babe" and ) SB +36 9 SJ +917 2157 1234 ("bake" by searching for "ba[bk]e". Only one of the characters) SB +9 9 SJ +182 2215 821 (inside the [ and ] will match a character. ) SB +22 11 SJ +1012 2215 1153 (If in fact you want to match any character except those in) SB +24 12 SJ +182 2273 1141 (the character class, you can put a ^ as the first character. ) SB +24 8 SJ +1347 2273 816 (It must be the first character of the class,) SB +182 2331 1492 (or else it has no special meaning. So, a search for [^aeiou] will match any ) SB +3 3 SJ +1675 2331 509 (character except a vowel,) SB +182 2389 1074 (but a search for [aeiou^] will match any vowel or a ^.) SB +359 2505 784 (If you have a lot of characters in order ) SB +10 10 SJ +1144 2505 1033 (that you want to put in the character class, you may) SB +9 9 SJ +182 2563 783 (use a dash \(-\) as a range character. So, ) SB +22 11 SJ +974 2563 1077 ([a-z] will match any letter \(or any lower case letter if ) SB +32 0 0 50 50 0 0 47 /Times-Italic /font31 ANSIFont font +2073 2561 114 (Exact) SB +32 0 0 50 50 0 0 45 /Times-Roman /font32 ANSIFont font +27 9 SJ +182 2622 934 (mode is on\), and [0-9a-f] will match any digit ) SB +40 10 SJ +1143 2622 1004 (or any letter 'a' through 'f', which happen to be the) SB +10 10 SJ +182 2680 1144 (characters for hexadecimal numbers. If the dash is at the ) SB +16 8 SJ +1336 2680 835 (beginning or end of a character class, it is) SB +182 2738 457 (taken to be just a dash.) SB +32 0 0 42 42 0 0 38 /Times-Roman /font32 ANSIFont font +182 3183 198 (uEmacs 4.0) SB +891 3183 209 ( ) SB +32 0 0 50 50 0 0 45 /Times-Roman /font32 ANSIFont font +1100 3176 43 ( -) SB +32 0 0 42 42 0 0 38 /Times-Roman /font32 ANSIFont font +1143 3183 11 ( ) SB +32 0 0 50 50 0 0 45 /Times-Roman /font32 ANSIFont font +1154 3176 50 (18) SB +32 0 0 42 42 0 0 38 /Times-Roman /font32 ANSIFont font +1204 3183 11 ( ) SB +32 0 0 50 50 0 0 45 /Times-Roman /font32 ANSIFont font +1215 3176 17 (-) SB +32 0 0 42 42 0 0 38 /Times-Roman /font32 ANSIFont font +1918 3183 269 (December 1991) SB +showpage +% %%Page: 19 19 +grestore sheetsave restore +showsheet +%%Page: 10 10 +/sheetsave save def +gsave +24 817 translate -90 rotate +393 596 div 548 842 div scale +0 0 moveto 0 842 lineto 596 842 lineto 596 0 lineto +closepath clip newpath +0 54 39 2478 3507 300 SM +0 0 0 fC +32 0 0 50 50 0 0 45 /Times-Roman /font32 ANSIFont font +40 8 SJ +359 199 816 (The escape character \\ is for those times ) SB +36 6 SJ +1215 199 483 (when you want to be in ) SB +32 0 0 50 50 0 0 47 /Times-Italic /font31 ANSIFont font +1734 197 128 (Magic) SB +32 0 0 50 50 0 0 45 /Times-Roman /font32 ANSIFont font +18 3 SJ +1862 199 307 ( mode, but also) SB +6 6 SJ +182 258 657 (want to use a regular expression ) SB +24 12 SJ +845 258 1318 (character to be just a character. It turns off the special meaning of) SB +39 13 SJ +182 316 1068 (the character. So a search for "it \\ ." will search for a ) SB +32 8 SJ +1289 316 866 (line with "it.", and not "it" followed by any) SB +3 3 SJ +182 374 416 (other character. The ) SB +32 16 SJ +601 374 1554 (escape character will also let you put ^, -, or ] inside a character class with no) SB +182 432 390 (special side effects.) SB +32 0 0 58 58 0 0 56 /Times-Bold /font29 ANSIFont font +182 612 470 (uEmacs MACROS) SB +32 0 0 50 50 0 0 45 /Times-Roman /font32 ANSIFont font +32 4 SJ +182 735 526 (Macros are programs that ) SB +90 10 SJ +740 735 1357 (are used to customize the editor and to perform complicated editing) SB +10 5 SJ +182 793 535 (tasks. They may be stored ) SB +33 11 SJ +727 793 1427 (in files or buffers and may be executed using an appropriate command,) SB +24 4 SJ +182 851 280 (or bound to a ) SB +14 2 SJ +486 851 503 (particular keystroke. The) SB +32 0 0 50 50 0 0 47 /Times-Italic /font31 ANSIFont font +7 1 SJ +1003 849 416 ( execute-macro-) SB +32 0 0 50 50 0 0 45 /Times-Roman /font32 ANSIFont font +35 5 SJ +1426 851 726 ( editor commands cause the macros,) SB +12 12 SJ +182 910 1239 (numbered from 1 to 40, to be executed. Macros are stored by ) SB +10 5 SJ +1433 910 628 (executing files that contain the ) SB +32 0 0 50 50 0 0 47 /Times-Italic /font31 ANSIFont font +2071 908 116 (store-) SB +182 967 127 (macro) SB +32 0 0 50 50 0 0 45 /Times-Roman /font32 ANSIFont font +36 6 SJ +309 969 677 ( command. The macro number is ) SB +21 3 SJ +1022 969 250 (given to the ) SB +32 0 0 50 50 0 0 47 /Times-Italic /font31 ANSIFont font +7 1 SJ +1293 967 256 (store-macro ) SB +32 0 0 50 50 0 0 45 /Times-Roman /font32 ANSIFont font +28 4 SJ +1556 969 603 (command as an argument. All) SB +182 1028 1416 (script lines then encountered will be stored rather than being executed.) SB +3 3 SJ +359 1136 328 (There are many ) SB +18 9 SJ +690 1136 1479 (different aspects to the macro language within uEmacs. Editor commands) SB +3 3 SJ +182 1194 308 (are the various ) SB +20 10 SJ +493 1194 1674 (commands that manipulate text, buffers, windows, etc, within the editor. Directives) SB +45 15 SJ +182 1252 1855 (are commands which control what lines get executed within a macro. Also there are various ) SB +2082 1252 105 (types) SB +21 3 SJ +182 1310 572 (of variables. Environmental ) SB +80 10 SJ +775 1310 1332 (variables both control and report on different aspects of the editor.) SB +28 14 SJ +182 1368 1902 (User variables hold string values which may be changed and inspected. Buffer variables allow ) SB +2112 1368 75 (text) SB +165 11 SJ +182 1426 1405 (to be placed into variables. Interactive variables allow the program to ) SB +48 3 SJ +1752 1426 387 (prompt the user for) SB +182 1484 1377 (information. Functions can be used to manipulate all these variables.) SB +32 0 0 58 58 0 0 56 /Times-Bold /font29 ANSIFont font +182 1640 239 (Variables) SB +32 0 0 50 50 0 0 45 /Times-Roman /font32 ANSIFont font +25 5 SJ +182 1763 569 (Variables in uEmacs can be ) SB +60 10 SJ +776 1763 1351 (used to return values within expressions, as repeat counts to editing) SB +15 5 SJ +182 1821 491 (commands, or as text to ) SB +48 12 SJ +688 1821 1451 (be inserted into buffers and messages. The value of these variables is set) SB +10 2 SJ +182 1879 195 (using the ) SB +32 0 0 50 50 0 0 47 /Times-Italic /font31 ANSIFont font +387 1877 55 (set) SB +32 0 0 50 50 0 0 45 /Times-Roman /font32 ANSIFont font +10 2 SJ +442 1879 102 ( \(^X ) SB +78 13 SJ +554 1879 1555 (A\) command. For example, to set the current fill column to 64 characters, the) SB +182 1938 737 (following macro line would be used:) SB +32 0 0 42 42 0 0 33 /Courier /font0 ANSIFont font +359 2044 375 (set $fillcol 64) SB +32 0 0 50 50 0 0 45 /Times-Roman /font32 ANSIFont font +32 16 SJ +359 2138 1599 (or to have the contents of %name inserted at the point in the current buffer, the ) SB +1990 2138 197 (command) SB +182 2196 330 (to use would be:) SB +32 0 0 42 42 0 0 33 /Courier /font0 ANSIFont font +359 2302 475 (insert-string %name) SB +32 0 0 58 58 0 0 56 /Times-Bold /font29 ANSIFont font +182 2444 614 (Environmental variables) SB +32 0 0 50 50 0 0 45 /Times-Roman /font32 ANSIFont font +32 0 0 50 50 0 0 47 /Times-Italic /font31 ANSIFont font +359 2565 928 ("What good is a quote if you can't change it?") SB +32 0 0 50 50 0 0 45 /Times-Roman /font32 ANSIFont font +15 3 SJ +182 2676 399 (These variables are ) SB +78 13 SJ +596 2676 1513 (used to change different aspects of the way the editor works. Also they will) SB +3 3 SJ +182 2734 362 (return the current ) SB +24 12 SJ +547 2734 1616 (settings if used as part of an expression. All environmental variable names begin) SB +182 2792 435 (with a dollar sign \($\).) SB +32 0 0 42 42 0 0 38 /Times-Roman /font32 ANSIFont font +182 3183 198 (uEmacs 4.0) SB +891 3183 209 ( ) SB +32 0 0 50 50 0 0 45 /Times-Roman /font32 ANSIFont font +1100 3176 43 ( -) SB +32 0 0 42 42 0 0 38 /Times-Roman /font32 ANSIFont font +1143 3183 11 ( ) SB +32 0 0 50 50 0 0 45 /Times-Roman /font32 ANSIFont font +1154 3176 50 (19) SB +32 0 0 42 42 0 0 38 /Times-Roman /font32 ANSIFont font +1204 3183 11 ( ) SB +32 0 0 50 50 0 0 45 /Times-Roman /font32 ANSIFont font +1215 3176 17 (-) SB +32 0 0 42 42 0 0 38 /Times-Roman /font32 ANSIFont font +1918 3183 269 (December 1991) SB +showpage +% %%Page: 20 20 +grestore sheetsave restore +/sheetsave save def +gsave +24 416 translate -90 rotate +393 596 div 548 842 div scale +0 0 moveto 0 842 lineto 596 842 lineto 596 0 lineto +closepath clip newpath +0 54 39 2478 3507 300 SM +0 0 0 fC +32 0 0 50 50 0 0 45 /Times-Roman /font32 ANSIFont font +359 199 180 ($pagelen) SB +714 199 764 (Number of screen lines used currently) SB +359 257 203 ($curwidth) SB +714 257 699 (Number of columns used currently) SB +359 315 150 ($curcol) SB +714 315 830 (Current column of point in current buffer) SB +359 373 164 ($curline) SB +714 373 755 (Current line of point in current buffer) SB +359 431 222 ($cbufname) SB +714 431 539 (Name of the current buffer) SB +359 489 172 ($cfname) SB +714 489 619 (File name of the current buffer) SB +359 547 136 ($wline) SB +714 547 707 (Number of lines in current window) SB +359 605 158 ($cwline) SB +714 605 467 (Current line in window) SB +359 663 145 ($fillcol) SB +714 663 418 (Current fill column \() SB +32 0 0 50 50 0 0 47 /Times-Italic /font31 ANSIFont font +1132 661 111 (Wrap) SB +32 0 0 50 50 0 0 45 /Times-Roman /font32 ANSIFont font +1243 663 150 ( mode, ) SB +32 0 0 50 50 0 0 47 /Times-Italic /font31 ANSIFont font +1393 661 664 (fill-paragraph, justify-paragraph) SB +32 0 0 50 50 0 0 45 /Times-Roman /font32 ANSIFont font +2057 663 17 (\)) SB +359 722 153 ($lwidth) SB +714 722 423 (Width of current line) SB +359 780 100 ($line) SB +714 780 390 (Text of current line) SB +359 838 175 ($curchar) SB +714 838 688 (Current character under the cursor) SB +359 954 156 ($flicker) SB +714 954 1374 (Flicker flag, set to TRUE if IBM CGA or old AT&T/Olivetti, set to ) SB +714 1012 471 (FALSE for most others) SB +359 1070 102 ($sres) SB +714 1070 520 (Current screen resolution:) SB +714 1128 936 (CGA, MONO, EGA, or VGA on the IBM-PC,) SB +714 1186 477 (NORMAL on all others) SB +359 1302 147 ($debug) SB +714 1302 650 (Flag to trigger macro debugging) SB +359 1360 169 ($discmd) SB +714 1360 938 (If TRUE, display commands on command line) SB +359 1418 138 ($status) SB +90 10 SJ +714 1418 1147 (Return status of the success of the last command \(TRUE ) SB +10 1 SJ +1951 1418 226 (or FALSE\)) SB +714 1476 483 (usually used with !force) SB +359 1592 135 ($asave) SB +714 1592 901 (Number of characters between auto-saves in ) SB +32 0 0 50 50 0 0 47 /Times-Italic /font31 ANSIFont font +1615 1590 119 (Asave) SB +32 0 0 50 50 0 0 45 /Times-Roman /font32 ANSIFont font +1734 1592 124 ( mode) SB +359 1651 158 ($acount) SB +714 1651 842 (Number of characters until next auto-save) SB +359 1767 172 ($version) SB +714 1767 484 (uEmacs version number) SB +359 1825 225 ($progname) SB +714 1825 761 (Returns program name, "uEmacs/PK") SB +359 1941 152 ($search) SB +714 1941 288 (Search pattern) SB +359 1999 169 ($replace) SB +714 1999 1098 (Replacement pattern, can e.g. be set to an empty string) SB +359 2057 147 ($match) SB +714 2057 485 (Last matched pattern in ) SB +32 0 0 50 50 0 0 47 /Times-Italic /font31 ANSIFont font +1199 2055 128 (Magic) SB +32 0 0 50 50 0 0 45 /Times-Roman /font32 ANSIFont font +1327 2057 124 ( mode) SB +359 2116 92 ($kill) SB +714 2116 449 (Kill buffer \(read only\)) SB +359 2232 86 ($tab) SB +45 9 SJ +714 2232 960 ("Hard" tabulator stop, 8 or 4, use the command ) SB +32 0 0 50 50 0 0 47 /Times-Italic /font31 ANSIFont font +1719 2230 217 (handle-tab) SB +32 0 0 50 50 0 0 45 /Times-Roman /font32 ANSIFont font +15 3 SJ +1936 2232 133 ( to set ) SB +2084 2232 103 (other) SB +714 2291 415 (\(soft\) tabulator stops) SB +359 2407 136 ($scroll) SB +714 2407 953 (Scrolling flag, TRUE if your screen can scroll, ) SB +3 3 SJ +1668 2407 516 (FALSE otherwise, can be) SB +714 2465 1143 (set to FALSE if you don't like uEmacs's way of scrolling) SB +359 2523 128 ($jump) SB +35 7 SJ +714 2523 713 (Number of lines to scroll when top ) SB +36 6 SJ +1462 2523 689 (or end of screen has been reached,) SB +714 2581 900 (default 1, the value 0 has a special meaning: ) SB +5 5 SJ +1615 2581 567 (scroll 1/2 page \(which is the) SB +714 2639 679 (default if scrolling is not enabled\)) SB +359 2697 175 ($overlap) SB +12 4 SJ +714 2697 591 (Number of overlapping lines ) SB +20 5 SJ +1317 2697 750 (when browsing files with commands ) SB +32 0 0 50 50 0 0 47 /Times-Italic /font31 ANSIFont font +2087 2695 100 (next-) SB +7 1 SJ +714 2754 110 (page ) SB +32 0 0 50 50 0 0 45 /Times-Roman /font32 ANSIFont font +7 1 SJ +831 2756 85 (and ) SB +32 0 0 50 50 0 0 47 /Times-Italic /font31 ANSIFont font +923 2754 298 (previous-page,) SB +32 0 0 50 50 0 0 45 /Times-Roman /font32 ANSIFont font +63 9 SJ +1221 2756 651 ( 2 is a typical value, default is 0 ) SB +16 2 SJ +1935 2756 236 (which has a) SB +714 2815 521 (special meaning: 1/3 page) SB +32 0 0 42 42 0 0 38 /Times-Roman /font32 ANSIFont font +182 3183 198 (uEmacs 4.0) SB +891 3183 209 ( ) SB +32 0 0 50 50 0 0 45 /Times-Roman /font32 ANSIFont font +1100 3176 43 ( -) SB +32 0 0 42 42 0 0 38 /Times-Roman /font32 ANSIFont font +1143 3183 11 ( ) SB +32 0 0 50 50 0 0 45 /Times-Roman /font32 ANSIFont font +1154 3176 50 (20) SB +32 0 0 42 42 0 0 38 /Times-Roman /font32 ANSIFont font +1204 3183 11 ( ) SB +32 0 0 50 50 0 0 45 /Times-Roman /font32 ANSIFont font +1215 3176 17 (-) SB +32 0 0 42 42 0 0 38 /Times-Roman /font32 ANSIFont font +1918 3183 269 (December 1991) SB +showpage +% %%Page: 21 21 +grestore sheetsave restore +showsheet +%%Page: 11 11 +/sheetsave save def +gsave +24 817 translate -90 rotate +393 596 div 548 842 div scale +0 0 moveto 0 842 lineto 596 842 lineto 596 0 lineto +closepath clip newpath +0 54 39 2478 3507 300 SM +0 0 0 fC +32 0 0 58 58 0 0 56 /Times-Bold /font29 ANSIFont font +182 197 358 (User variables) SB +32 0 0 50 50 0 0 45 /Times-Roman /font32 ANSIFont font +126 14 SJ +182 320 1740 (User variables allow you, the user, to store strings and manipulate them. These strings ) SB +10 1 SJ +2048 320 129 (can be) SB +182 378 905 (pieces of text, numbers \(in text form\), or the ) SB +7 7 SJ +1088 378 1092 (logical values TRUE and FALSE. These variables can) SB +108 12 SJ +182 436 1532 (be combined, tested, inserted into buffers, and otherwise used to control the ) SB +20 2 SJ +1822 436 345 (way your macros) SB +8 2 SJ +182 494 252 (execute. Up ) SB +75 15 SJ +442 494 1670 (to 100 user variables may be in use in one editing session. All users variable names) SB +120 15 SJ +182 552 1732 (must begin with a percent sign \(%\) and may contain any printing characters. Only the ) SB +9 1 SJ +2034 552 144 (first 10) SB +36 9 SJ +182 610 1383 (characters are significant \(i.e. differences beyond the tenth character ) SB +15 3 SJ +1601 610 571 (are ignored\). Most operators) SB +182 668 994 (will truncate strings to a length of 128 characters.) SB +32 0 0 58 58 0 0 56 /Times-Bold /font29 ANSIFont font +182 824 402 (Buffer variables) SB +32 0 0 50 50 0 0 45 /Times-Roman /font32 ANSIFont font +121 11 SJ +182 947 1208 (Buffer variables are special in that they can only be queried ) SB +60 5 SJ +1511 947 616 (and cannot be set. What buffer) SB +21 21 SJ +182 1005 1890 (variables are is a way to take text from a buffer and place it in a variable. For example, if you ) SB +2093 1005 94 (have) SB +182 1063 484 (a buffer by the name of ) SB +32 0 0 50 50 0 0 47 /Times-Italic /font31 ANSIFont font +666 1061 119 (rigel2) SB +32 0 0 50 50 0 0 45 /Times-Roman /font32 ANSIFont font +785 1063 494 (, and it contains the text:) SB +32 0 0 42 42 0 0 33 /Courier /font0 ANSIFont font +359 1170 200 (Richmond) SB +359 1212 225 (Lafayette) SB +359 1254 350 (<*>Bloomington) SB +1186 1254 800 (\(where <*> is the current point\)) SB +359 1296 300 (Indianapolis) SB +359 1338 100 (Gary) SB +359 1380 1800 (-* uEmacs/PK 4.0: rigel2 \(Wrap\) /data/rigel2.txt ---------------- All --) SB +32 0 0 50 50 0 0 45 /Times-Roman /font32 ANSIFont font +359 1474 758 (and within a command you reference ) SB +32 0 0 50 50 0 0 47 /Times-Italic /font31 ANSIFont font +1117 1472 144 (#rigel2) SB +32 0 0 50 50 0 0 45 /Times-Roman /font32 ANSIFont font +1261 1474 115 (, like:) SB +32 0 0 42 42 0 0 33 /Courier /font0 ANSIFont font +359 1581 525 (insert-string #rigel2) SB +32 0 0 50 50 0 0 45 /Times-Roman /font32 ANSIFont font +18 9 SJ +359 1675 928 (uEmacs would start at the current point in the ) SB +32 0 0 50 50 0 0 47 /Times-Italic /font31 ANSIFont font +2 1 SJ +1305 1673 132 (rigel2 ) SB +32 0 0 50 50 0 0 45 /Times-Roman /font32 ANSIFont font +24 8 SJ +1439 1675 724 (buffer and grab all the text up to the) SB +48 12 SJ +182 1734 1178 (end of that line and pass that back. Then it would advance ) SB +35 7 SJ +1408 1734 744 (the point to the beginning of the next) SB +13 13 SJ +182 1792 1774 (line. Thus, after our last command executes, the string "Bloomington" gets inserted into ) SB +2 1 SJ +1969 1792 216 (the current) SB +182 1850 444 (buffer, and the buffer ) SB +32 0 0 50 50 0 0 47 /Times-Italic /font31 ANSIFont font +626 1848 132 (rigel2 ) SB +32 0 0 50 50 0 0 45 /Times-Roman /font32 ANSIFont font +758 1850 394 (now looks like this:) SB +32 0 0 42 42 0 0 33 /Courier /font0 ANSIFont font +359 1957 200 (Richmond) SB +359 1999 225 (Lafayette) SB +359 2041 275 (Bloomington) SB +359 2083 375 (<*>Indianapolis) SB +1186 2083 800 (\(where <*> is the current point\)) SB +359 2125 100 (Gary) SB +359 2167 1800 (-* uEmacs/PK 4.0: rigel2 \(Wrap\) /data/rigel2.txt ---------------- All --) SB +32 0 0 50 50 0 0 45 /Times-Roman /font32 ANSIFont font +359 2261 798 (As you have probably noticed, a buffer ) SB +8 8 SJ +1158 2261 1021 (variable consists of the buffer name, preceded by a) SB +182 2319 306 (pound sign \(#\).) SB +32 0 0 58 58 0 0 56 /Times-Bold /font29 ANSIFont font +182 2475 512 (Interactive variables) SB +32 0 0 50 50 0 0 45 /Times-Roman /font32 ANSIFont font +10 10 SJ +182 2598 1243 (Interactive variables are actually a method to prompt the user ) SB +16 8 SJ +1435 2598 736 (for a string. This is done by using an) SB +1 1 SJ +182 2656 49 (at ) SB +34 17 SJ +232 2656 1921 (sign \(@\) followed either with a quoted string, or a variable containing a string. The string is the) SB +182 2714 695 (placed on the bottom line, and the ) SB +13 13 SJ +878 2714 1296 (editor waits for the user to type in a string. Then the string typed) SB +182 2772 1585 (in by the users is returned as the value of the interactive variable. For example:) SB +32 0 0 42 42 0 0 33 /Courier /font0 ANSIFont font +359 2878 600 (set %quest "What file? ") SB +359 2920 425 (find-file @%quest) SB +32 0 0 50 50 0 0 45 /Times-Roman /font32 ANSIFont font +359 3006 1195 (will ask the user for a file name, and then attempt to find it.) SB +32 0 0 42 42 0 0 38 /Times-Roman /font32 ANSIFont font +182 3183 198 (uEmacs 4.0) SB +891 3183 209 ( ) SB +32 0 0 50 50 0 0 45 /Times-Roman /font32 ANSIFont font +1100 3176 43 ( -) SB +32 0 0 42 42 0 0 38 /Times-Roman /font32 ANSIFont font +1143 3183 11 ( ) SB +32 0 0 50 50 0 0 45 /Times-Roman /font32 ANSIFont font +1154 3176 50 (21) SB +32 0 0 42 42 0 0 38 /Times-Roman /font32 ANSIFont font +1204 3183 11 ( ) SB +32 0 0 50 50 0 0 45 /Times-Roman /font32 ANSIFont font +1215 3176 17 (-) SB +32 0 0 42 42 0 0 38 /Times-Roman /font32 ANSIFont font +1918 3183 269 (December 1991) SB +showpage +% %%Page: 22 22 +grestore sheetsave restore +/sheetsave save def +gsave +24 416 translate -90 rotate +393 596 div 548 842 div scale +0 0 moveto 0 842 lineto 596 842 lineto 596 0 lineto +closepath clip newpath +0 54 39 2478 3507 300 SM +0 0 0 fC +32 0 0 58 58 0 0 56 /Times-Bold /font29 ANSIFont font +182 247 244 (Functions) SB +32 0 0 50 50 0 0 45 /Times-Roman /font32 ANSIFont font +5 1 SJ +182 370 210 (Functions ) SB +84 14 SJ +397 370 1706 (can be used to manipulate variables in various ways. Functions can have one, two, or) SB +182 428 479 (three arguments. These ) SB +11 11 SJ +662 428 1514 (arguments will always be placed after the function on the current command) SB +34 17 SJ +182 486 1895 (line. For example, if we wanted to increase the current fill column by two, using uEmacs's set ) SB +2111 486 76 (\(^X) SB +182 544 615 (A\) command, we would write:) SB +32 0 0 42 42 0 0 33 /Courier /font0 ANSIFont font +359 650 700 (set $fillcol &add $fillcol 2) SB +359 700 800 ( \\ \\ \\ \\ \\___) SB +32 0 0 42 42 0 0 38 /Times-Roman /font32 ANSIFont font +1159 695 264 (second operand) SB +32 0 0 42 42 0 0 33 /Courier /font0 ANSIFont font +359 750 800 ( \\ \\ \\ \\________) SB +32 0 0 42 42 0 0 38 /Times-Roman /font32 ANSIFont font +1159 745 215 (first operand) SB +32 0 0 42 42 0 0 33 /Courier /font0 ANSIFont font +359 800 800 ( \\ \\ \\______________) SB +32 0 0 42 42 0 0 38 /Times-Roman /font32 ANSIFont font +1159 795 326 (function to execute) SB +32 0 0 42 42 0 0 33 /Courier /font0 ANSIFont font +359 850 800 ( \\ \\____________________) SB +32 0 0 42 42 0 0 38 /Times-Roman /font32 ANSIFont font +1159 845 239 (variable to set) SB +32 0 0 42 42 0 0 33 /Courier /font0 ANSIFont font +359 900 800 ( \\__________________________) SB +32 0 0 42 42 0 0 38 /Times-Roman /font32 ANSIFont font +1159 895 355 (set \(^X A\) command) SB +32 0 0 50 50 0 0 45 /Times-Roman /font32 ANSIFont font +40 10 SJ +359 994 1391 (Function names always begin with the ampersand \(&\) character, and ) SB +10 2 SJ +1790 994 387 (are only significant) SB +10 5 SJ +182 1052 548 (to the first three characters ) SB +30 10 SJ +740 1052 1417 (after the ampersand. Functions will normally expect one of three types) SB +182 1110 1306 (of arguments, and will automatically convert types when needed.) SB +32 0 0 50 50 0 0 47 /Times-Italic /font31 ANSIFont font +182 1216 86 (num) SB +32 0 0 50 50 0 0 45 /Times-Roman /font32 ANSIFont font +359 1218 1394 (An ascii string of digits which is interpreted as a numeric value. Any ) SB +3 3 SJ +1754 1218 430 (string which does not) SB +359 1277 1205 (start with a digit or a minus sign \(-\) will be considered zero.) SB +32 0 0 50 50 0 0 47 /Times-Italic /font31 ANSIFont font +182 1391 52 (str) SB +32 0 0 50 50 0 0 45 /Times-Roman /font32 ANSIFont font +359 1393 1599 (An arbitrary string of characters. Strings are limited to 128 characters in length.) SB +32 0 0 50 50 0 0 47 /Times-Italic /font31 ANSIFont font +182 1508 64 (log) SB +32 0 0 50 50 0 0 45 /Times-Roman /font32 ANSIFont font +20 4 SJ +359 1510 534 (A logical value consisting ) SB +54 9 SJ +913 1510 1220 (of the string "TRUE" or "FALSE". Numeric strings will also) SB +359 1569 581 (evaluate to "FALSE" if they ) SB +10 10 SJ +941 1569 1236 (are equal to zero, and "TRUE" if they are non-zero. Arbitrary) SB +359 1627 889 (text strings will have the value of "FALSE".) SB +32 0 0 50 50 0 0 47 /Times-Italic /font31 ANSIFont font +182 1741 654 (Numeric functions: \(return num\)) SB +32 0 0 50 50 0 0 48 /Times-Bold /font29 ANSIFont font +182 1850 123 (&add) SB +32 0 0 50 50 0 0 45 /Times-Roman /font32 ANSIFont font +32 0 0 50 50 0 0 47 /Times-Italic /font31 ANSIFont font +536 1851 185 (num num) SB +32 0 0 50 50 0 0 45 /Times-Roman /font32 ANSIFont font +891 1853 372 (Add two numbers.) SB +32 0 0 50 50 0 0 48 /Times-Bold /font29 ANSIFont font +182 1911 117 (&sub) SB +32 0 0 50 50 0 0 45 /Times-Roman /font32 ANSIFont font +32 0 0 50 50 0 0 47 /Times-Italic /font31 ANSIFont font +536 1912 185 (num num) SB +32 0 0 50 50 0 0 45 /Times-Roman /font32 ANSIFont font +891 1914 850 (Subtract the second number from the first.) SB +32 0 0 50 50 0 0 48 /Times-Bold /font29 ANSIFont font +182 1972 115 (&tim) SB +32 0 0 50 50 0 0 45 /Times-Roman /font32 ANSIFont font +297 1975 41 (es) SB +32 0 0 50 50 0 0 47 /Times-Italic /font31 ANSIFont font +536 1973 185 (num num) SB +32 0 0 50 50 0 0 45 /Times-Roman /font32 ANSIFont font +891 1975 461 (Multiply two numbers.) SB +32 0 0 50 50 0 0 48 /Times-Bold /font29 ANSIFont font +182 2033 109 (&div) SB +32 0 0 50 50 0 0 45 /Times-Roman /font32 ANSIFont font +291 2036 61 (ide) SB +32 0 0 50 50 0 0 47 /Times-Italic /font31 ANSIFont font +536 2034 185 (num num) SB +32 0 0 50 50 0 0 45 /Times-Roman /font32 ANSIFont font +891 2036 1248 (Divide the first number by the second giving an integer result.) SB +32 0 0 50 50 0 0 48 /Times-Bold /font29 ANSIFont font +182 2094 137 (&mod) SB +32 0 0 50 50 0 0 45 /Times-Roman /font32 ANSIFont font +32 0 0 50 50 0 0 47 /Times-Italic /font31 ANSIFont font +536 2095 185 (num num) SB +32 0 0 50 50 0 0 45 /Times-Roman /font32 ANSIFont font +891 2097 1274 (Return the reminder of dividing the first number by the second.) SB +32 0 0 50 50 0 0 48 /Times-Bold /font29 ANSIFont font +182 2155 117 (&neg) SB +32 0 0 50 50 0 0 45 /Times-Roman /font32 ANSIFont font +299 2158 58 (ate) SB +32 0 0 50 50 0 0 47 /Times-Italic /font31 ANSIFont font +536 2156 86 (num) SB +32 0 0 50 50 0 0 45 /Times-Roman /font32 ANSIFont font +891 2158 457 (Multiply the arg by -1.) SB +32 0 0 50 50 0 0 48 /Times-Bold /font29 ANSIFont font +182 2216 114 (&abs) SB +32 0 0 50 50 0 0 45 /Times-Roman /font32 ANSIFont font +32 0 0 50 50 0 0 47 /Times-Italic /font31 ANSIFont font +536 2217 86 (num) SB +32 0 0 50 50 0 0 45 /Times-Roman /font32 ANSIFont font +891 2219 314 (Absolute value.) SB +32 0 0 50 50 0 0 47 /Times-Italic /font31 ANSIFont font +182 2327 851 (String manipulation functions: \(return str\)) SB +32 0 0 50 50 0 0 48 /Times-Bold /font29 ANSIFont font +182 2436 106 (&cat) SB +32 0 0 50 50 0 0 45 /Times-Roman /font32 ANSIFont font +32 0 0 50 50 0 0 47 /Times-Italic /font31 ANSIFont font +536 2437 117 (str str) SB +32 0 0 50 50 0 0 45 /Times-Roman /font32 ANSIFont font +891 2439 815 (Concatenate the two strings to form one.) SB +32 0 0 50 50 0 0 48 /Times-Bold /font29 ANSIFont font +182 2497 95 (&lef) SB +32 0 0 50 50 0 0 45 /Times-Roman /font32 ANSIFont font +277 2500 14 (t) SB +32 0 0 50 50 0 0 47 /Times-Italic /font31 ANSIFont font +536 2498 151 (str num) SB +32 0 0 50 50 0 0 45 /Times-Roman /font32 ANSIFont font +891 2500 828 (Return the num leftmost characters from ) SB +32 0 0 50 50 0 0 47 /Times-Italic /font31 ANSIFont font +1719 2498 52 (str) SB +32 0 0 50 50 0 0 45 /Times-Roman /font32 ANSIFont font +1771 2500 13 (.) SB +32 0 0 50 50 0 0 48 /Times-Bold /font29 ANSIFont font +182 2558 103 (&rig) SB +32 0 0 50 50 0 0 45 /Times-Roman /font32 ANSIFont font +285 2561 39 (ht) SB +32 0 0 50 50 0 0 47 /Times-Italic /font31 ANSIFont font +536 2559 151 (str num) SB +32 0 0 50 50 0 0 45 /Times-Roman /font32 ANSIFont font +891 2561 856 (Return the num rightmost characters from ) SB +32 0 0 50 50 0 0 47 /Times-Italic /font31 ANSIFont font +1747 2559 52 (str) SB +32 0 0 50 50 0 0 45 /Times-Roman /font32 ANSIFont font +1799 2561 13 (.) SB +32 0 0 50 50 0 0 48 /Times-Bold /font29 ANSIFont font +182 2619 126 (&mid) SB +32 0 0 50 50 0 0 45 /Times-Roman /font32 ANSIFont font +32 0 0 50 50 0 0 47 /Times-Italic /font31 ANSIFont font +536 2620 300 (str num1 num2) SB +32 0 0 50 50 0 0 45 /Times-Roman /font32 ANSIFont font +891 2622 283 (Starting from ) SB +32 0 0 50 50 0 0 47 /Times-Italic /font31 ANSIFont font +1174 2620 111 (num1) SB +32 0 0 50 50 0 0 45 /Times-Roman /font32 ANSIFont font +1285 2622 239 ( position in ) SB +32 0 0 50 50 0 0 47 /Times-Italic /font31 ANSIFont font +1524 2620 52 (str) SB +32 0 0 50 50 0 0 45 /Times-Roman /font32 ANSIFont font +1576 2622 159 (, return ) SB +32 0 0 50 50 0 0 47 /Times-Italic /font31 ANSIFont font +1735 2620 111 (num2) SB +32 0 0 50 50 0 0 45 /Times-Roman /font32 ANSIFont font +1846 2622 228 ( characters.) SB +32 0 0 50 50 0 0 48 /Times-Bold /font29 ANSIFont font +182 2680 126 (&upp) SB +32 0 0 50 50 0 0 45 /Times-Roman /font32 ANSIFont font +308 2683 39 (er) SB +32 0 0 50 50 0 0 47 /Times-Italic /font31 ANSIFont font +536 2681 52 (str) SB +32 0 0 50 50 0 0 45 /Times-Roman /font32 ANSIFont font +891 2683 223 (Uppercase ) SB +32 0 0 50 50 0 0 47 /Times-Italic /font31 ANSIFont font +1114 2681 65 (str.) SB +32 0 0 50 50 0 0 48 /Times-Bold /font29 ANSIFont font +182 2741 117 (&low) SB +32 0 0 50 50 0 0 45 /Times-Roman /font32 ANSIFont font +299 2744 39 (er) SB +32 0 0 50 50 0 0 47 /Times-Italic /font31 ANSIFont font +536 2742 52 (str) SB +32 0 0 50 50 0 0 45 /Times-Roman /font32 ANSIFont font +891 2744 229 (Lowercase ) SB +32 0 0 50 50 0 0 47 /Times-Italic /font31 ANSIFont font +1120 2742 65 (str.) SB +32 0 0 50 50 0 0 48 /Times-Bold /font29 ANSIFont font +182 2802 114 (&chr) SB +32 0 0 50 50 0 0 45 /Times-Roman /font32 ANSIFont font +32 0 0 50 50 0 0 47 /Times-Italic /font31 ANSIFont font +536 2803 86 (num) SB +32 0 0 50 50 0 0 45 /Times-Roman /font32 ANSIFont font +891 2805 917 (Return a single character with character code ) SB +32 0 0 50 50 0 0 47 /Times-Italic /font31 ANSIFont font +1808 2803 99 (num.) SB +32 0 0 50 50 0 0 48 /Times-Bold /font29 ANSIFont font +182 2863 117 (&env) SB +32 0 0 50 50 0 0 45 /Times-Roman /font32 ANSIFont font +32 0 0 50 50 0 0 47 /Times-Italic /font31 ANSIFont font +536 2864 52 (str) SB +32 0 0 50 50 0 0 45 /Times-Roman /font32 ANSIFont font +891 2866 808 (Retrieve a system environment variable.) SB +32 0 0 50 50 0 0 48 /Times-Bold /font29 ANSIFont font +182 2924 112 (&bin) SB +32 0 0 50 50 0 0 45 /Times-Roman /font32 ANSIFont font +294 2927 89 (ding) SB +32 0 0 50 50 0 0 47 /Times-Italic /font31 ANSIFont font +536 2925 52 (str) SB +32 0 0 50 50 0 0 45 /Times-Roman /font32 ANSIFont font +891 2927 914 (Look up what function name is bound to key ) SB +32 0 0 50 50 0 0 47 /Times-Italic /font31 ANSIFont font +1805 2925 65 (str.) SB +32 0 0 50 50 0 0 48 /Times-Bold /font29 ANSIFont font +182 2985 112 (>k) SB +32 0 0 50 50 0 0 45 /Times-Roman /font32 ANSIFont font +294 2988 47 (ey) SB +32 0 0 50 50 0 0 47 /Times-Italic /font31 ANSIFont font +536 2986 52 (str) SB +32 0 0 50 50 0 0 45 /Times-Roman /font32 ANSIFont font +891 2988 1068 (Waits and returns next keystroke, argument not used.) SB +32 0 0 50 50 0 0 48 /Times-Bold /font29 ANSIFont font +182 3046 101 (&fin) SB +32 0 0 50 50 0 0 45 /Times-Roman /font32 ANSIFont font +283 3049 25 (d) SB +32 0 0 50 50 0 0 47 /Times-Italic /font31 ANSIFont font +536 3047 52 (str) SB +32 0 0 50 50 0 0 45 /Times-Roman /font32 ANSIFont font +891 3049 306 (Look for a file ) SB +32 0 0 50 50 0 0 47 /Times-Italic /font31 ANSIFont font +1197 3047 52 (str) SB +32 0 0 50 50 0 0 45 /Times-Roman /font32 ANSIFont font +1249 3049 813 ( on the search path, return the full name.) SB +32 0 0 42 42 0 0 38 /Times-Roman /font32 ANSIFont font +182 3183 198 (uEmacs 4.0) SB +891 3183 209 ( ) SB +32 0 0 50 50 0 0 45 /Times-Roman /font32 ANSIFont font +1100 3176 43 ( -) SB +32 0 0 42 42 0 0 38 /Times-Roman /font32 ANSIFont font +1143 3183 11 ( ) SB +32 0 0 50 50 0 0 45 /Times-Roman /font32 ANSIFont font +1154 3176 50 (22) SB +32 0 0 42 42 0 0 38 /Times-Roman /font32 ANSIFont font +1204 3183 11 ( ) SB +32 0 0 50 50 0 0 45 /Times-Roman /font32 ANSIFont font +1215 3176 17 (-) SB +32 0 0 42 42 0 0 38 /Times-Roman /font32 ANSIFont font +1918 3183 269 (December 1991) SB +showpage +% %%Page: 23 23 +grestore sheetsave restore +showsheet +%%Page: 12 12 +/sheetsave save def +gsave +24 817 translate -90 rotate +393 596 div 548 842 div scale +0 0 moveto 0 842 lineto 596 842 lineto 596 0 lineto +closepath clip newpath +0 54 39 2478 3507 300 SM +0 0 0 fC +32 0 0 50 50 0 0 47 /Times-Italic /font31 ANSIFont font +182 247 848 (Logical and testing functions: \(return log\)) SB +32 0 0 50 50 0 0 48 /Times-Bold /font29 ANSIFont font +182 356 112 (¬) SB +32 0 0 50 50 0 0 45 /Times-Roman /font32 ANSIFont font +32 0 0 50 50 0 0 47 /Times-Italic /font31 ANSIFont font +536 357 64 (log) SB +32 0 0 50 50 0 0 45 /Times-Roman /font32 ANSIFont font +891 359 675 (Return the opposite logical value.) SB +32 0 0 50 50 0 0 48 /Times-Bold /font29 ANSIFont font +182 417 123 (&and) SB +32 0 0 50 50 0 0 45 /Times-Roman /font32 ANSIFont font +32 0 0 50 50 0 0 47 /Times-Italic /font31 ANSIFont font +536 418 191 (log1 log2) SB +32 0 0 50 50 0 0 45 /Times-Roman /font32 ANSIFont font +891 420 149 (If both ) SB +32 0 0 50 50 0 0 47 /Times-Italic /font31 ANSIFont font +1040 418 89 (log1) SB +32 0 0 50 50 0 0 45 /Times-Roman /font32 ANSIFont font +1129 420 98 ( and ) SB +32 0 0 50 50 0 0 47 /Times-Italic /font31 ANSIFont font +1227 418 89 (log2) SB +32 0 0 50 50 0 0 45 /Times-Roman /font32 ANSIFont font +1316 420 521 ( are TRUE, return TRUE.) SB +32 0 0 50 50 0 0 48 /Times-Bold /font29 ANSIFont font +182 478 89 (&or) SB +32 0 0 50 50 0 0 45 /Times-Roman /font32 ANSIFont font +32 0 0 50 50 0 0 47 /Times-Italic /font31 ANSIFont font +536 479 191 (log1 log2) SB +32 0 0 50 50 0 0 45 /Times-Roman /font32 ANSIFont font +891 481 174 (If either ) SB +32 0 0 50 50 0 0 47 /Times-Italic /font31 ANSIFont font +1065 479 89 (log1) SB +32 0 0 50 50 0 0 45 /Times-Roman /font32 ANSIFont font +1154 481 68 ( or ) SB +32 0 0 50 50 0 0 47 /Times-Italic /font31 ANSIFont font +1222 479 89 (log2) SB +32 0 0 50 50 0 0 45 /Times-Roman /font32 ANSIFont font +1311 481 493 ( is TRUE, return TRUE.) SB +32 0 0 50 50 0 0 48 /Times-Bold /font29 ANSIFont font +182 539 120 (&equ) SB +32 0 0 50 50 0 0 45 /Times-Roman /font32 ANSIFont font +302 542 36 (al) SB +32 0 0 50 50 0 0 47 /Times-Italic /font31 ANSIFont font +536 540 235 (num1 num2) SB +32 0 0 50 50 0 0 45 /Times-Roman /font32 ANSIFont font +891 542 47 (If ) SB +32 0 0 50 50 0 0 47 /Times-Italic /font31 ANSIFont font +938 540 111 (num1) SB +32 0 0 50 50 0 0 45 /Times-Roman /font32 ANSIFont font +1049 542 98 ( and ) SB +32 0 0 50 50 0 0 47 /Times-Italic /font31 ANSIFont font +1147 540 111 (num2) SB +32 0 0 50 50 0 0 45 /Times-Roman /font32 ANSIFont font +1258 542 750 ( are numerically equal, return TRUE.) SB +32 0 0 50 50 0 0 48 /Times-Bold /font29 ANSIFont font +182 600 97 (&les) SB +32 0 0 50 50 0 0 45 /Times-Roman /font32 ANSIFont font +279 603 19 (s) SB +32 0 0 50 50 0 0 47 /Times-Italic /font31 ANSIFont font +536 601 235 (num1 num2) SB +32 0 0 50 50 0 0 45 /Times-Roman /font32 ANSIFont font +891 603 47 (If ) SB +32 0 0 50 50 0 0 47 /Times-Italic /font31 ANSIFont font +938 601 111 (num1) SB +32 0 0 50 50 0 0 45 /Times-Roman /font32 ANSIFont font +1049 603 245 ( is less than ) SB +32 0 0 50 50 0 0 47 /Times-Italic /font31 ANSIFont font +1294 601 111 (num2) SB +32 0 0 50 50 0 0 45 /Times-Roman /font32 ANSIFont font +1405 603 303 (, return TRUE.) SB +32 0 0 50 50 0 0 48 /Times-Bold /font29 ANSIFont font +182 661 111 (&gre) SB +32 0 0 50 50 0 0 45 /Times-Roman /font32 ANSIFont font +293 664 75 (ater) SB +32 0 0 50 50 0 0 47 /Times-Italic /font31 ANSIFont font +536 662 235 (num1 num2) SB +32 0 0 50 50 0 0 45 /Times-Roman /font32 ANSIFont font +771 664 13 ( ) SB +891 664 47 (If ) SB +32 0 0 50 50 0 0 47 /Times-Italic /font31 ANSIFont font +938 662 111 (num1) SB +32 0 0 50 50 0 0 45 /Times-Roman /font32 ANSIFont font +1049 664 310 ( is greater than ) SB +32 0 0 50 50 0 0 47 /Times-Italic /font31 ANSIFont font +1359 662 111 (num2) SB +32 0 0 50 50 0 0 45 /Times-Roman /font32 ANSIFont font +1470 664 303 (, return TRUE.) SB +32 0 0 50 50 0 0 48 /Times-Bold /font29 ANSIFont font +182 722 111 (&seq) SB +32 0 0 50 50 0 0 45 /Times-Roman /font32 ANSIFont font +293 725 61 (ual) SB +32 0 0 50 50 0 0 47 /Times-Italic /font31 ANSIFont font +536 723 167 (str1 str2) SB +32 0 0 50 50 0 0 45 /Times-Roman /font32 ANSIFont font +891 725 908 (If the two strings are the same, return TRUE.) SB +32 0 0 50 50 0 0 48 /Times-Bold /font29 ANSIFont font +182 783 97 (&sle) SB +32 0 0 50 50 0 0 45 /Times-Roman /font32 ANSIFont font +279 786 38 (ss) SB +32 0 0 50 50 0 0 47 /Times-Italic /font31 ANSIFont font +536 784 167 (str1 str2) SB +32 0 0 50 50 0 0 45 /Times-Roman /font32 ANSIFont font +891 786 47 (If ) SB +32 0 0 50 50 0 0 47 /Times-Italic /font31 ANSIFont font +938 784 77 (str1) SB +32 0 0 50 50 0 0 45 /Times-Roman /font32 ANSIFont font +1015 786 538 ( is less alphabetically than ) SB +32 0 0 50 50 0 0 47 /Times-Italic /font31 ANSIFont font +1553 784 77 (str2) SB +32 0 0 50 50 0 0 45 /Times-Roman /font32 ANSIFont font +1630 786 303 (, return TRUE.) SB +32 0 0 50 50 0 0 48 /Times-Bold /font29 ANSIFont font +182 844 108 (&sgr) SB +32 0 0 50 50 0 0 45 /Times-Roman /font32 ANSIFont font +290 847 97 (eater) SB +32 0 0 50 50 0 0 47 /Times-Italic /font31 ANSIFont font +536 845 167 (str1 str2) SB +32 0 0 50 50 0 0 45 /Times-Roman /font32 ANSIFont font +891 847 47 (If ) SB +32 0 0 50 50 0 0 47 /Times-Italic /font31 ANSIFont font +938 845 77 (str1) SB +32 0 0 50 50 0 0 45 /Times-Roman /font32 ANSIFont font +1015 847 658 ( is alphabetically greater than or ) SB +32 0 0 50 50 0 0 47 /Times-Italic /font31 ANSIFont font +1673 845 77 (str2) SB +32 0 0 50 50 0 0 45 /Times-Roman /font32 ANSIFont font +1750 847 303 (, return TRUE.) SB +32 0 0 50 50 0 0 48 /Times-Bold /font29 ANSIFont font +182 905 103 (&exi) SB +32 0 0 50 50 0 0 45 /Times-Roman /font32 ANSIFont font +285 908 33 (st) SB +32 0 0 50 50 0 0 47 /Times-Italic /font31 ANSIFont font +536 906 52 (str) SB +32 0 0 50 50 0 0 45 /Times-Roman /font32 ANSIFont font +891 908 127 (If file ) SB +32 0 0 50 50 0 0 47 /Times-Italic /font31 ANSIFont font +1018 906 52 (str) SB +32 0 0 50 50 0 0 45 /Times-Roman /font32 ANSIFont font +1070 908 429 ( exists, return TRUE.) SB +32 0 0 50 50 0 0 47 /Times-Italic /font31 ANSIFont font +182 1024 1166 (Other string functions \(return num\) and special functions:) SB +32 0 0 50 50 0 0 48 /Times-Bold /font29 ANSIFont font +182 1141 103 (&sin) SB +32 0 0 50 50 0 0 45 /Times-Roman /font32 ANSIFont font +285 1144 72 (dex) SB +32 0 0 50 50 0 0 47 /Times-Italic /font31 ANSIFont font +536 1142 167 (str1 str2) SB +32 0 0 50 50 0 0 45 /Times-Roman /font32 ANSIFont font +891 1144 593 (Returns position of substring ) SB +32 0 0 50 50 0 0 47 /Times-Italic /font31 ANSIFont font +1484 1142 77 (str2) SB +32 0 0 50 50 0 0 45 /Times-Roman /font32 ANSIFont font +1561 1144 154 ( within ) SB +32 0 0 50 50 0 0 47 /Times-Italic /font31 ANSIFont font +1715 1142 90 (str1,) SB +32 0 0 50 50 0 0 45 /Times-Roman /font32 ANSIFont font +1805 1144 357 ( or 0 if not found.) SB +32 0 0 50 50 0 0 48 /Times-Bold /font29 ANSIFont font +182 1202 108 (&asc) SB +32 0 0 50 50 0 0 45 /Times-Roman /font32 ANSIFont font +290 1205 28 (ii) SB +32 0 0 50 50 0 0 47 /Times-Italic /font31 ANSIFont font +536 1203 52 (str) SB +32 0 0 50 50 0 0 45 /Times-Roman /font32 ANSIFont font +891 1205 819 (Returns ASCII code of first character of ) SB +32 0 0 50 50 0 0 47 /Times-Italic /font31 ANSIFont font +1710 1203 65 (str.) SB +32 0 0 50 50 0 0 48 /Times-Bold /font29 ANSIFont font +182 1263 112 (&ind) SB +32 0 0 50 50 0 0 45 /Times-Roman /font32 ANSIFont font +294 1266 89 (irect) SB +32 0 0 50 50 0 0 47 /Times-Italic /font31 ANSIFont font +536 1264 52 (str) SB +32 0 0 50 50 0 0 45 /Times-Roman /font32 ANSIFont font +891 1266 188 (Evaluate ) SB +32 0 0 50 50 0 0 47 /Times-Italic /font31 ANSIFont font +1079 1264 52 (str) SB +32 0 0 50 50 0 0 45 /Times-Roman /font32 ANSIFont font +1131 1266 276 ( as a variable.) SB +33 11 SJ +359 1376 1593 (This last function deserves more explanation. The &IND function evaluates its ) SB +1985 1376 202 (argument,) SB +90 15 SJ +182 1434 1639 (takes the resulting string, and then uses it as a variable name. For example, given ) SB +7 1 SJ +1911 1434 269 (the following) SB +182 1492 303 (code sequence:) SB +32 0 0 42 42 0 0 33 /Courier /font0 ANSIFont font +359 1598 600 (; set up reference table) SB +359 1640 200 (set %one) SB +714 1640 250 ("elephant") SB +359 1682 225 (set %two ) SB +714 1682 225 ("giraffe") SB +359 1724 275 (set %three ) SB +714 1724 200 ("donkey") SB +359 1808 275 (set %index ) SB +714 1808 125 ("two") SB +359 1850 625 (insert-string &ind %index) SB +32 0 0 50 50 0 0 45 /Times-Roman /font32 ANSIFont font +99 9 SJ +359 1936 1034 (the string "giraffe" would have been inserted at the ) SB +60 5 SJ +1492 1936 635 (point in the current buffer. This) SB +182 1994 1075 (indirection can be safely nested up to about 10 levels.) SB +32 0 0 58 58 0 0 56 /Times-Bold /font29 ANSIFont font +182 2150 249 (Directives) SB +32 0 0 50 50 0 0 45 /Times-Roman /font32 ANSIFont font +42 6 SJ +182 2273 918 (Directives are commands which only operate ) SB +64 8 SJ +1142 2273 981 (within an executing macro, i.e. they do not make) SB +42 14 SJ +182 2331 1439 (sense as a single command. As such, they cannot be called up singly or ) SB +12 3 SJ +1663 2331 512 (bound to keystroke. Used) SB +182 2389 1412 (within macros, they control what lines are executed and in what order.) SB +3 3 SJ +359 2497 468 (Directives always start ) SB +22 11 SJ +830 2497 1335 (with the exclamation mark \(!\) character and must be the first thing) SB +182 2555 560 (placed on a line. Directives ) SB +6 6 SJ +743 2555 1438 (executed singly \(via the execute-command-line command\) interactively) SB +182 2613 317 (will be ignored.) SB +32 0 0 50 50 0 0 48 /Times-Bold /font29 ANSIFont font +182 2777 182 (!ENDM ) SB +32 0 0 58 58 0 0 56 /Times-Bold /font29 ANSIFont font +364 2769 216 (directive) SB +32 0 0 50 50 0 0 45 /Times-Roman /font32 ANSIFont font +128 16 SJ +182 2892 1700 (This directive is used to terminate a macro being stored. For example, if a file being ) SB +2010 2892 177 (executed) SB +182 2950 342 (contains the text:) SB +32 0 0 42 42 0 0 38 /Times-Roman /font32 ANSIFont font +182 3183 198 (uEmacs 4.0) SB +891 3183 209 ( ) SB +32 0 0 50 50 0 0 45 /Times-Roman /font32 ANSIFont font +1100 3176 43 ( -) SB +32 0 0 42 42 0 0 38 /Times-Roman /font32 ANSIFont font +1143 3183 11 ( ) SB +32 0 0 50 50 0 0 45 /Times-Roman /font32 ANSIFont font +1154 3176 50 (23) SB +32 0 0 42 42 0 0 38 /Times-Roman /font32 ANSIFont font +1204 3183 11 ( ) SB +32 0 0 50 50 0 0 45 /Times-Roman /font32 ANSIFont font +1215 3176 17 (-) SB +32 0 0 42 42 0 0 38 /Times-Roman /font32 ANSIFont font +1918 3183 269 (December 1991) SB +showpage +% %%Page: 24 24 +grestore sheetsave restore +/sheetsave save def +gsave +24 416 translate -90 rotate +393 596 div 548 842 div scale +0 0 moveto 0 842 lineto 596 842 lineto 596 0 lineto +closepath clip newpath +0 54 39 2478 3507 300 SM +0 0 0 fC +32 0 0 42 42 0 0 33 /Courier /font0 ANSIFont font +359 247 25 (;) SB +536 247 1300 (Read in a file in view mode, and make the window red) SB +359 289 50 (26) SB +536 289 275 (store-macro) SB +536 331 675 (find-file @"File to view: ") SB +536 373 375 (add-mode "view") SB +536 415 350 (add-mode "red") SB +359 457 125 (!endm) SB +359 499 1175 (write-message "[Consult macro has been loaded]") SB +32 0 0 50 50 0 0 45 /Times-Roman /font32 ANSIFont font +28 7 SJ +359 584 998 (only the lines between the store-macro command ) SB +30 6 SJ +1385 584 772 (and the !ENDM directive are stored in) SB +182 642 201 (macro 26.) SB +32 0 0 50 50 0 0 48 /Times-Bold /font29 ANSIFont font +182 806 205 (!FORCE ) SB +32 0 0 58 58 0 0 56 /Times-Bold /font29 ANSIFont font +387 798 216 (directive) SB +32 0 0 50 50 0 0 45 /Times-Roman /font32 ANSIFont font +21 7 SJ +182 921 802 (When uEmacs executes a macro, if any ) SB +40 10 SJ +1005 921 1142 (command fails, the macro is terminated at that point. If a) SB +182 979 2004 (line is preceded by a !FORCE directive, execution continues weather the command succeeds or not.) SB +32 0 0 42 42 0 0 33 /Courier /font0 ANSIFont font +359 1085 25 (;) SB +536 1085 625 (Merge the top two windows) SB +359 1127 275 (save-window) SB +891 1127 800 ( ;remember what window we are at) SB +359 1169 325 (1 next-window) SB +891 1169 550 ( ;go to the top window) SB +359 1211 325 (delete-window) SB +891 1211 650 ( ;merge it with the second) SB +359 1253 525 (!force restore-window) SB +891 1253 500 ( ;This will continue) SB +182 1295 25 ( ) SB +359 1295 350 (add-mode "red") SB +32 0 0 50 50 0 0 48 /Times-Bold /font29 ANSIFont font +182 1436 263 (!IF, !ELSE, ) SB +32 0 0 58 58 0 0 56 /Times-Bold /font29 ANSIFont font +445 1428 93 (and) SB +32 0 0 50 50 0 0 48 /Times-Bold /font29 ANSIFont font +538 1436 198 ( !ENDIF ) SB +32 0 0 58 58 0 0 56 /Times-Bold /font29 ANSIFont font +736 1428 239 (directives) SB +32 0 0 50 50 0 0 45 /Times-Roman /font32 ANSIFont font +12 4 SJ +182 1551 497 (The !IF directive allows ) SB +48 12 SJ +691 1551 1448 (statements only to be executed if a condition specified in the directive is) SB +24 3 SJ +182 1609 322 (met. Every line ) SB +108 12 SJ +528 1609 1551 (following the !IF directive, until the first !ELSE or !ENDIF directive, is only) SB +6 6 SJ +182 1667 816 (executed if the expression following the ) SB +18 9 SJ +1004 1667 1165 (!IF directive evaluates to a TRUE value. For example, the) SB +182 1725 1451 (following macro segment creates the portion of a text file automatically.) SB +32 0 0 42 42 0 0 33 /Courier /font0 ANSIFont font +359 1831 1000 (!if &sequal %curplace "timespace vortex") SB +536 1873 950 (insert-string "First, rematerialize~n") SB +359 1915 150 (!endif) SB +359 1957 675 (!if &sequal %planet "earth") SB +536 1999 975 (!if &sequal %time "late 20th century" ) SB +714 2041 800 (write-message "Contact U.N.I.T.") SB +536 2083 125 (!else) SB +714 2125 1175 (insert-string "Investigate the situation....~n") SB +714 2167 1000 (insert-string "\(SAY 'stay here Sara'\)~n") SB +536 2209 150 (!endif) SB +359 2251 125 (!else) SB +536 2293 1250 (set %conditions @"Atmosphere conditions outside? ") SB +536 2335 750 (!if &sequal %conditions "safe") SB +714 2377 1050 (insert-string &cat "Go outside......" "~n") SB +714 2419 775 (insert-string "lock the door~n") SB +536 2461 125 (!else) SB +714 2503 1250 (insert-string "Dematerialize... try somewhen else") SB +714 2545 175 (newline) SB +536 2587 150 (!endif) SB +359 2629 150 (!endif) SB +32 0 0 42 42 0 0 38 /Times-Roman /font32 ANSIFont font +182 3183 198 (uEmacs 4.0) SB +891 3183 209 ( ) SB +32 0 0 50 50 0 0 45 /Times-Roman /font32 ANSIFont font +1100 3176 43 ( -) SB +32 0 0 42 42 0 0 38 /Times-Roman /font32 ANSIFont font +1143 3183 11 ( ) SB +32 0 0 50 50 0 0 45 /Times-Roman /font32 ANSIFont font +1154 3176 50 (24) SB +32 0 0 42 42 0 0 38 /Times-Roman /font32 ANSIFont font +1204 3183 11 ( ) SB +32 0 0 50 50 0 0 45 /Times-Roman /font32 ANSIFont font +1215 3176 17 (-) SB +32 0 0 42 42 0 0 38 /Times-Roman /font32 ANSIFont font +1918 3183 269 (December 1991) SB +showpage +% %%Page: 25 25 +grestore sheetsave restore +showsheet +%%Page: 13 13 +/sheetsave save def +gsave +24 817 translate -90 rotate +393 596 div 548 842 div scale +0 0 moveto 0 842 lineto 596 842 lineto 596 0 lineto +closepath clip newpath +0 54 39 2478 3507 300 SM +0 0 0 fC +32 0 0 50 50 0 0 48 /Times-Bold /font29 ANSIFont font +182 205 180 (!GOTO ) SB +32 0 0 58 58 0 0 56 /Times-Bold /font29 ANSIFont font +362 197 216 (directive) SB +32 0 0 50 50 0 0 45 /Times-Roman /font32 ANSIFont font +13 13 SJ +182 320 1568 (Flow can be controlled within a uEmacs macro using the !GOTO directive. It ) SB +6 3 SJ +1763 320 418 (takes as an argument) SB +10 10 SJ +182 378 930 (a label. A label consists of a line starting with ) SB +16 8 SJ +1122 378 1049 (an asterisk \(*\) and then an alphanumeric label. Only) SB +182 436 1164 (labels in the currently executing macro can be jumped to, ) SB +7 7 SJ +1347 436 833 (and trying to jump to a non-existing label) SB +182 494 656 (terminates execution of a macro.) SB +32 0 0 42 42 0 0 33 /Courier /font0 ANSIFont font +359 600 25 (;) SB +536 600 1325 (Create a block of DATA statements for a BASIC program) SB +536 642 650 (insert-string "1000 DATA ") SB +536 684 425 (set %linenum 1000) SB +359 726 150 (*nxtin) SB +536 768 325 (update-screen) SB +891 768 725 (;make sure we see the changes) SB +536 810 650 (set %data @"Next number: ") SB +536 852 450 (!if &equal %data 0) SB +714 894 300 (!goto finish) SB +536 936 150 (!endif) SB +536 978 575 (!if &greater $curcol 60) SB +714 1020 675 (2 delete-previous-character) SB +714 1062 175 (newline) SB +714 1104 725 (set %linenum &add %linenum 10) SB +714 1146 900 (insert-string &cat %linenum " DATA ") SB +536 1188 150 (!endif) SB +536 1230 725 (insert-string &cat %data ", ") SB +536 1272 275 (!goto nxtin) SB +359 1314 175 (*finish) SB +536 1356 675 (2 delete-previous-character) SB +536 1398 175 (newline) SB +32 0 0 50 50 0 0 48 /Times-Bold /font29 ANSIFont font +182 1548 240 (!RETURN ) SB +32 0 0 58 58 0 0 56 /Times-Bold /font29 ANSIFont font +422 1540 216 (directive) SB +32 0 0 50 50 0 0 45 /Times-Roman /font32 ANSIFont font +182 1663 1806 (The !RETURN directive causes the current macro to exit, either returning to the caller \(if ) SB +2 2 SJ +1989 1663 196 (any\) or to) SB +182 1721 627 (interactive mode. For example:) SB +32 0 0 42 42 0 0 33 /Courier /font0 ANSIFont font +359 1827 25 (;) SB +536 1827 900 (Check the monitor type and set %mtyp) SB +359 1869 600 (!if &sequal $sres "MONO") SB +536 1911 275 (set %mtyp 1) SB +536 1953 175 (!return) SB +359 1995 125 (!else) SB +536 2037 275 (set %mtyp 2) SB +359 2079 150 (!endif) SB +359 2121 1250 (insert-string "You are on a MONOCHROME machine!~n") SB +32 0 0 50 50 0 0 48 /Times-Bold /font29 ANSIFont font +182 2290 204 (!WHILE ) SB +32 0 0 58 58 0 0 56 /Times-Bold /font29 ANSIFont font +386 2282 93 (and) SB +32 0 0 50 50 0 0 48 /Times-Bold /font29 ANSIFont font +479 2290 322 ( !ENDWHILE ) SB +32 0 0 58 58 0 0 56 /Times-Bold /font29 ANSIFont font +801 2282 239 (directives) SB +32 0 0 50 50 0 0 45 /Times-Roman /font32 ANSIFont font +182 2416 1105 (The !WHILE directive causes a block of of statements ) SB +1287 2416 895 (to be executed while a condition specified in) SB +182 2474 1903 (the directive is TRUE. Every line following the !WHILE directive until the first !ENDWHILE) SB +182 2532 1031 (directive belongs to body of the loop. For example:) SB +32 0 0 42 42 0 0 33 /Courier /font0 ANSIFont font +359 2646 25 (;) SB +536 2646 1275 (Now we know that emacs.hlp is visible, switch to it) SB +359 2688 1025 (!while ¬ &sequal $cbufname "emacs.hlp") SB +536 2730 275 (next-window) SB +359 2772 225 (!endwhile) SB +32 0 0 42 42 0 0 38 /Times-Roman /font32 ANSIFont font +182 3183 198 (uEmacs 4.0) SB +891 3183 209 ( ) SB +32 0 0 50 50 0 0 45 /Times-Roman /font32 ANSIFont font +1100 3176 43 ( -) SB +32 0 0 42 42 0 0 38 /Times-Roman /font32 ANSIFont font +1143 3183 11 ( ) SB +32 0 0 50 50 0 0 45 /Times-Roman /font32 ANSIFont font +1154 3176 50 (25) SB +32 0 0 42 42 0 0 38 /Times-Roman /font32 ANSIFont font +1204 3183 11 ( ) SB +32 0 0 50 50 0 0 45 /Times-Roman /font32 ANSIFont font +1215 3176 17 (-) SB +32 0 0 42 42 0 0 38 /Times-Roman /font32 ANSIFont font +1918 3183 269 (December 1991) SB +showpage +% %%Page: 26 26 +grestore sheetsave restore +/sheetsave save def +gsave +24 416 translate -90 rotate +393 596 div 548 842 div scale +0 0 moveto 0 842 lineto 596 842 lineto 596 0 lineto +closepath clip newpath +0 54 39 2478 3507 300 SM +0 0 0 fC +32 0 0 58 58 0 0 56 /Times-Bold /font29 ANSIFont font +182 263 1273 (APPENDIX: Search order for the initialization file) SB +32 0 0 50 50 0 0 45 /Times-Roman /font32 ANSIFont font +182 407 1560 (Under UNIX uEmacs searches for its initialization file in the following order:) SB +32 0 0 50 50 0 0 48 /Times-Bold /font29 ANSIFont font +182 521 38 (1.) SB +32 0 0 50 50 0 0 45 /Times-Roman /font32 ANSIFont font +359 524 1030 (File given with the @-option on the command line.) SB +32 0 0 50 50 0 0 48 /Times-Bold /font29 ANSIFont font +182 582 38 (2.) SB +32 0 0 50 50 0 0 45 /Times-Roman /font32 ANSIFont font +32 0 0 50 50 0 0 47 /Times-Italic /font31 ANSIFont font +359 583 178 (.emacsrc) SB +32 0 0 50 50 0 0 45 /Times-Roman /font32 ANSIFont font +537 585 501 ( in the current directory.) SB +32 0 0 50 50 0 0 48 /Times-Bold /font29 ANSIFont font +182 643 38 (3.) SB +32 0 0 50 50 0 0 45 /Times-Roman /font32 ANSIFont font +32 0 0 50 50 0 0 47 /Times-Italic /font31 ANSIFont font +359 644 178 (.emacsrc) SB +32 0 0 50 50 0 0 45 /Times-Roman /font32 ANSIFont font +537 646 501 ( in your home directory.) SB +32 0 0 50 50 0 0 48 /Times-Bold /font29 ANSIFont font +182 704 38 (4.) SB +32 0 0 50 50 0 0 45 /Times-Roman /font32 ANSIFont font +359 707 160 (System ) SB +32 0 0 50 50 0 0 47 /Times-Italic /font31 ANSIFont font +519 705 178 (.emacsrc) SB +32 0 0 50 50 0 0 45 /Times-Roman /font32 ANSIFont font +697 707 994 ( in a standard place \(compiled into the program\).) SB +8 1 SJ +182 826 47 (If ) SB +108 12 SJ +237 826 1231 (any of the files 1-3 is found the system initialization file will ) SB +32 0 0 50 50 0 0 48 /Times-Bold /font29 ANSIFont font +1576 823 70 (not) SB +32 0 0 50 50 0 0 45 /Times-Roman /font32 ANSIFont font +36 4 SJ +1646 826 505 ( be executed. The system) SB +32 0 0 50 50 0 0 47 /Times-Italic /font31 ANSIFont font +182 885 178 (.emacsrc) SB +32 0 0 50 50 0 0 45 /Times-Roman /font32 ANSIFont font +90 9 SJ +360 887 1008 ( tries to execute two additional initialization files ) SB +32 0 0 50 50 0 0 48 /Times-Bold /font29 ANSIFont font +1458 884 103 (after) SB +32 0 0 50 50 0 0 45 /Times-Roman /font32 ANSIFont font +20 2 SJ +1561 887 87 ( the ) SB +22 2 SJ +1668 887 497 (system initialization file,) SB +182 947 161 (namely:) SB +32 0 0 50 50 0 0 48 /Times-Bold /font29 ANSIFont font +182 1061 38 (5.) SB +32 0 0 50 50 0 0 45 /Times-Roman /font32 ANSIFont font +32 0 0 50 50 0 0 47 /Times-Italic /font31 ANSIFont font +359 1062 112 (.emrc) SB +32 0 0 50 50 0 0 45 /Times-Roman /font32 ANSIFont font +471 1064 501 ( in your home directory.) SB +32 0 0 50 50 0 0 48 /Times-Bold /font29 ANSIFont font +182 1122 38 (6.) SB +32 0 0 50 50 0 0 47 /Times-Italic /font31 ANSIFont font +359 1123 112 (.emrc) SB +32 0 0 50 50 0 0 45 /Times-Roman /font32 ANSIFont font +471 1125 501 ( in the current directory.) SB +48 12 SJ +182 1243 1577 (The preferred method for modifying your uEmacs environment is to create an ) SB +32 0 0 50 50 0 0 47 /Times-Italic /font31 ANSIFont font +1807 1241 112 (.emrc) SB +32 0 0 50 50 0 0 45 /Times-Roman /font32 ANSIFont font +8 2 SJ +1919 1243 26 ( ) SB +10 2 SJ +1953 1243 224 (file in your) SB +28 7 SJ +182 1303 785 (home directory where you can put any ) SB +32 0 0 50 50 0 0 48 /Times-Bold /font29 ANSIFont font +4 1 SJ +995 1300 462 (additional commands) SB +32 0 0 50 50 0 0 45 /Times-Roman /font32 ANSIFont font +12 3 SJ +1461 1303 211 ( you want ) SB +20 4 SJ +1684 1303 483 (to be executed. You can) SB +182 1363 591 (further tailor this by creating ) SB +32 0 0 50 50 0 0 47 /Times-Italic /font31 ANSIFont font +773 1361 138 (.emrc ) SB +32 0 0 50 50 0 0 45 /Times-Roman /font32 ANSIFont font +911 1363 529 (files in any subdirectories.) SB +182 1480 1318 (Under MS-DOS the search order is similar but a little bit simpler:) SB +32 0 0 50 50 0 0 48 /Times-Bold /font29 ANSIFont font +182 1594 38 (1.) SB +32 0 0 50 50 0 0 45 /Times-Roman /font32 ANSIFont font +359 1597 1030 (File given with the @-option on the command line.) SB +32 0 0 50 50 0 0 48 /Times-Bold /font29 ANSIFont font +182 1655 38 (2.) SB +32 0 0 50 50 0 0 45 /Times-Roman /font32 ANSIFont font +32 0 0 50 50 0 0 47 /Times-Italic /font31 ANSIFont font +359 1656 178 (emacs.rc) SB +32 0 0 50 50 0 0 45 /Times-Roman /font32 ANSIFont font +537 1658 501 ( in the current directory.) SB +32 0 0 50 50 0 0 48 /Times-Bold /font29 ANSIFont font +182 1716 38 (3.) SB +32 0 0 50 50 0 0 45 /Times-Roman /font32 ANSIFont font +359 1719 160 (System ) SB +32 0 0 50 50 0 0 47 /Times-Italic /font31 ANSIFont font +519 1717 191 (emacs.rc,) SB +32 0 0 50 50 0 0 45 /Times-Roman /font32 ANSIFont font +710 1719 1308 ( along the DOS %path, usually in the same directory as uEmacs.) SB +182 1837 242 (The system ) SB +32 0 0 50 50 0 0 47 /Times-Italic /font31 ANSIFont font +424 1835 178 (emacs.rc) SB +32 0 0 50 50 0 0 45 /Times-Roman /font32 ANSIFont font +602 1837 596 ( tries then to execute the file:) SB +32 0 0 50 50 0 0 48 /Times-Bold /font29 ANSIFont font +182 1952 38 (4.) SB +32 0 0 50 50 0 0 47 /Times-Italic /font31 ANSIFont font +359 1953 112 (em.rc) SB +32 0 0 50 50 0 0 45 /Times-Roman /font32 ANSIFont font +471 1955 501 ( in the current directory.) SB +32 0 0 42 42 0 0 38 /Times-Roman /font32 ANSIFont font +182 3183 198 (uEmacs 4.0) SB +891 3183 209 ( ) SB +32 0 0 50 50 0 0 45 /Times-Roman /font32 ANSIFont font +1100 3176 43 ( -) SB +32 0 0 42 42 0 0 38 /Times-Roman /font32 ANSIFont font +1143 3183 11 ( ) SB +32 0 0 50 50 0 0 45 /Times-Roman /font32 ANSIFont font +1154 3176 50 (26) SB +32 0 0 42 42 0 0 38 /Times-Roman /font32 ANSIFont font +1204 3183 11 ( ) SB +32 0 0 50 50 0 0 45 /Times-Roman /font32 ANSIFont font +1215 3176 17 (-) SB +32 0 0 42 42 0 0 38 /Times-Roman /font32 ANSIFont font +1918 3183 269 (December 1991) SB +showpage +% %%Trailer +grestore sheetsave restore +showsheet +%%Trailer +end +%%Pages: 13 diff --git a/emacs.rc b/emacs.rc new file mode 100644 index 0000000..407d908 --- /dev/null +++ b/emacs.rc @@ -0,0 +1,285 @@ +; EMACS.RC / .emascrc +; +; Startup file for MicroEMACS 3.9 and uEmacs/PK 4.0 +; This file is executed every time the editor is entered. +; +; Modified by Petri Kutvonen, last edited September 1991. + +set $discmd "FALSE" + +; First, try to resolve if we are on a PC ... yes, this is a kludge + +!if &seq $sres "NORMAL" + set %system "OTHER" +!else + set %system "PC" +!endif + +!if &seq %system "PC" + +; PC specific initialization + +write-message "(Setting up)" + +; Comment out or change this line if you want more than 25 lines, +; other possible $sres values include EGA and VGA + +set $sres "CGA" + +; Uncomment next line if your old screen "snows" + +;set $flicker "TRUE" + +; If your screen "snows" you'll not like scrolling + +!if &seq $flicker "TRUE" + set $scroll "FALSE" +!endif + +; Function keys (unshifted) +; f1 f2 f3 f4 f5 f6 f7 f8 f9 f10 +; FN; FN< FN= FN> FN? FN@ FNA FNB FNC FND + +bind-to-key help FN; +bind-to-key exit-emacs FND + +; Function keys (shifted) +; F1 F2 F3 F4 F5 F6 F7 F8 F9 F10 +; FNT FNU FNV FNW FNX FNY FNZ FN[ FN\ FN] + +; Other special keys (unshifted) +; Home End Ins Del PgUp PgDn +; FNG FNO FNR FNS FNI FNQ + +; Some common Alt-keys +; Alt-X Alt-Z Alt-C Alt-F Alt-O +; FN- FN, FN. FN! FN^X + +bind-to-key exit-emacs FN- +bind-to-key quick-exit FN, +bind-to-key i-shell FN. +bind-to-key find-file FN! +bind-to-key view-file FN/ +bind-to-key next-window FN^X + +; Set screen colors + +; You can define a DOS environment variable EMACS_BW (any value) +; if you don't like colors, e.g. if you have a LCD screen + +!if &seq &env "EMACS_BW" "" + add-global-mode "blue" + add-global-mode "HIGH" +!endif + +!endif + +; Help facility + +40 store-macro + set $discmd "FALSE" + !if ¬ &seq $cbufname "emacs.hlp" + write-message "(Loading Help)" + !force help + !force 8 resize-window + !if &seq %system "PC" + !if &seq &env "EMACS_BW" "" + add-mode "red" + !endif + bind-to-key execute-macro-38 FNI + bind-to-key execute-macro-37 FNQ + !else + bind-to-key execute-macro-38 FN5 + bind-to-key execute-macro-37 FN6 + !endif + beginning-of-line + 2 forward-character + 1 redraw-display + save-window + !if &seq %system "PC" + set %hlpupdn " / " + set %hlphelp "" + !else + set %hlpupdn " / " + set %hlphelp "" + !endif + execute-macro-39 + !else + set %hlpcode &lef $line 2 + !if &seq %hlpcode ".." + set %hlptopic &mid $line 4 99 + end-of-line + !force search-forward %hlptopic + beginning-of-line + 2 forward-character + 1 redraw-display + execute-macro-39 + !else + !if &seq %system "PC" + bind-to-key previous-page FNI + bind-to-key next-page FNQ + !else + bind-to-key previous-page FN5 + bind-to-key next-page FN6 + !endif + !force restore-window + !force delete-window + clear-message-line + !endif + !endif + set $discmd "TRUE" +!endm + +bind-to-key execute-macro-40 M-? +!if &seq %system "PC" + bind-to-key execute-macro-40 FN; +!else + bind-to-key execute-macro-40 FNh +!endif + +; Help on Help + +39 store-macro + !if &seq &rig $line 5 "INDEX" + write-message &cat "Select topic from list and press " %hlphelp + !else + write-message &cat "Use " &cat %hlpupdn &cat " to scan help file -- " &cat %hlphelp " to toggle help window" + !endif +!endm + +; Previous help page + +38 store-macro + !if &seq $cbufname "emacs.hlp" + beginning-of-line + !force search-reverse "=>" + 2 forward-character + 1 redraw-display + execute-macro-39 + !else + previous-page + !endif +!endm + +; Next help page + +37 store-macro + !if &seq $cbufname "emacs.hlp" + beginning-of-line + 2 forward-character + !force search-forward "=>" + 1 redraw-display + execute-macro-39 + !else + next-page + !endif +!endm + +; Set up auto CMODE + +36 store-macro + !if &seq &mid $cfname 1 7 "/tmp/Re" + add-mode "wrap" + !return + !endif + !if &gre &sin $cfname "/.ed" 0 + add-mode "wrap" + !return + !endif + !if &gre &sin $cfname "/.let" 0 + add-mode "wrap" + !return + !endif + !if &gre &sin $cfname "/.art" 0 + add-mode "wrap" + !return + !endif + !if &gre &sin $cfname "/nn." 0 + add-mode "wrap" + !return + !endif + set %rctmp &sin $cfname "." + !if &equ %rctmp 0 + !return + !endif + set %rctmp &mid $cfname &add %rctmp 1 5 + !if &or &seq %rctmp "c" &seq %rctmp "h" + add-mode "cmode" + !endif + !if &or &seq %rctmp "txt" &or &seq %rctmp "doc" &or &seq %rctmp "tmp" &seq %rctmp "tex" + add-mode "wrap" + !endif + +!endm + +bind-to-key execute-macro-36 M-FNR + +; Setup for ASCII {|}[\] to ISO Latin-1 translation + +21 store-macro + insert-string "ä" +!endm +22 store-macro + insert-string "ö" +!endm +23 store-macro + insert-string "å" +!endm +24 store-macro + insert-string "Ä" +!endm +25 store-macro + insert-string "Ö" +!endm +26 store-macro + insert-string "Å" +!endm + +27 store-macro + bind-to-key execute-macro-21 { + bind-to-key execute-macro-22 | + bind-to-key execute-macro-23 } + bind-to-key execute-macro-24 [ + bind-to-key execute-macro-25 \ + bind-to-key execute-macro-26 ] + write-message "ISO Latin-1 äöåÄÖÅ" +!endm + +28 store-macro + unbind-key { + unbind-key | + unbind-key } + unbind-key [ + unbind-key \ + unbind-key ] + write-message "ASCII {|}[\]" +!endm + +bind-to-key execute-macro-27 ^X[ +bind-to-key execute-macro-28 ^X] + +; Make cut-paste easier in window systems + +bind-to-key newline ^J + +; uEmacs/PK specific initialization + +!if &seq $progname "uEmacs/PK" + +; Don't scroll on a Sun + + !if &or &seq $TERM "sun" &seq $TERM "sun-cmd" + set $scroll "FALSE" + !endif + +; Execute local initialization files + + !if &seq %system "PC" + !force execute-file "EM.RC" + !else + !force execute-file &cat $HOME "/.emrc" + !force execute-file ".emrc" + !endif +!endif + +set $discmd "TRUE" diff --git a/emacs.wri b/emacs.wri new file mode 100644 index 0000000000000000000000000000000000000000..16ffbc9da7d82139377f01f5a620e4adc4af59b0 GIT binary patch literal 88320 zcmc${31D1TbvJ%2C4mvP0|Y^#EHA=I>|iOjNkT|M635$^#7itY-eNf;X(Ww3nvpdl z$qHc!bOBllrBJ>$(9(Wg*eUb_%D!}A>qjZ{4`uH{Y5Ca8-hNd7-|u(seecakc48Ig z3(U`>H}BnZ@44rkd+xdC-na2RX7*Zq^xt2+(d>V&czxIFyWY_C#;!MY#p}!e_s#cF z#;Tr~ZIh*uMsnrAhC-o`EcIW1vLfj(Y%PzJCx^?^$;Kx?dE=^{RXshEdh&|BxA5Vf zp6xT$YSI{)E|+Ubd9>23Pbb5rMtL-;*OFb8k?H!jU7NQICQlrAav2ZLO;?&t+&Mg- zY%R@}lN|%emU?ZvKHoDwT`o1N^T}j=v@%w~^SY&0DOZzS1IewWx#@Ck1V!Y3-&<}@ zSCZmDa?4C}wq7gOP`|>eo-OsM`RU5|L^G+?o0XArgY|B!OY&+Ej<;=m@-10=_HdCrD@z~ANl~OGkY)+R%v{V~K39XUn4l$?keG zlGbCSTB=N<>0@A`w{xV_tki3bWU@3`W(^m$cz|tN)w2ift<+GvMzho`PnK)Vq&}vS zE4A@ts$Q*(%rC`-5mbD*%p1va)_k&Q9;txT z)Xel$y-{uqwD)tuQtLH5siJY$G%7WkRBBDOHZ7o0A8XE)rpw7(r8$u_C(6lGd3v(a zXrRfgKCg_-OoRK)q%_l)6rAoClTrGf06SS;`P!bIdSTa0 zwON@$73V6o(fVA2+830v1W~A!lO`mq<<7B6RfUMnL34HQi0-?!GFf4#q0d7>VA*7; z*<=IQIpxz$mUjS>oQzDAYU5?`i2X}uHpDCpq$Jk!wk? zeU!W^q`f@4o>#|aY9mxOlsi6MpP533me8@|E}f(0CZqs#KyYNbGUaLsKFm#kY30($ zgd|%UREJJLCwo>F_Z&?2?@0#tZ{D{be+Rm#b)`02KZ(M|rt6d9e;tw!K7d-or6;nn zTAqakl!BB}3PCs6A?W==S*HAHb+6RZ6ZR|{26HoG794}crDSITp=LFHsE3^T=`I=^n9r@wsWCxb0vC&RLV0sZ5(LSaW8CS|%j zLfa1YuT~(7sdkT5rW;KW9_V?(x!jDx8?;lkaZy0QY)ct(7kQ(S>mzPIMx;Uh09&Vq z=V+t2=|TZk8AXmz=-BdsWbZV%53!39qwXr7E|1IvF@{kDJ!xi?uepf|WMQs8Q-w^D zwaI*ahAkfkA5SLr8Cm8^bA18}L|z5H*HNcwR?KThi;~nz91Wn#tZyn2;Gj%iKNyBy z1O@gGdk}STt@cWc)N2shTC)4Vt+!G|r%PztbVCo{)Zm?k!Zx+0>?*0J6a4}%K{MF# zZig|h)J99NkN7g(oS6!p)S{OcU%Qo|sfJ6$ds6|xg!Zlku>!1qsQRPHNFU@H_jCQbv)BeXi>*9q7(RFl#%u?N5r^Zrz(~-n}&m*R~zn z2}`%CXIo<=xlufY%y~t2!Ghu%>@*dkQ3r?SDlkITa%sA@&c6>+qZ3FMhHDJ>O$-AV zO{S$~XiaQhPz87%duq7#_WheSY>+ygnyJi|s`M8~g9d4)fuRrWDweBL$;tA(KT?ZB zcoSuB-zbeJY^~QWYbI0h+(wehm`WHgqYBNLk(08(=wvtHa9W$w)&3n`>C!N3TB=Ug zA^7x@f-y$}*^PehA^&HKKf-cZ!(a_UsjGUD+^Dht@ZN37&fUqDJ-c>+!-M!~7b(QX zQ!;WR88`;sp(D{qm@y15vM{CWZ@4ya=0{;s;7DeJ39gP+PRkF+W7VvD%6(}%n#fm zj&fLnM+*}GGYG$(V`m+s803K7Zm2N&7BbwVzX)5)`$Ij0oVbjv3r{^aJ_JlEtDNJmF7Hl}1>n zFzmCCMzcNzKGUP!U)&b$QF80fK{~bjQE28vqM{`<+dTkU>|FhF{fY^_9Pc>l#O~tg zgC0VW81hS)(+8(4ulyB963B{NG^Xmbtr32_A)LG={N%1zfaRPZlwAG|Z`*bxeRq-Cz!vF@>+?n9uPS%2C5iD=qYP7P_@o z*o}+#r_dIcSjDAe`s-u;B!Rk0h_5dU6*1RDQwn>lCAiF4^P=dc&qnzORRopx(rzdW zZL5u*rL4s@TL}k??C4Le6}Y&)@WsLxBj<88l9p#S(=|a+pMivP4jP`IAB$>Dj=DpJ zaXwe(9QCW}o>@@VTrFcLf?5rA=ov1JoLp4hn+u;We4Z>+Pv^>BvcA>wSX0#vHO*0r z;&jG(y1p)ITYD`fJ&bI`Zr)xPB0ukU7mHae0HPQx)t@i$=EBhD&!xavh~h0MG;IP! zh|Hz(Y%Wk1BOimwJX3$Rw7I7TT+A1>t*}jk*xnX))R-!dASgN#WWjB`R4>^% z09n-iS6}7-!YkF}6W&fdT*{kmw87+}IhH)u|?}lSZtm$T6 zEo{;H1)DolEpZ7m$2pF`Q&<(6!YUt1&lD@L397t^4C5p%WVYp~w6J$EJ)f(g`Hc$K zoE8`F1}ry#x(yvVm@!>anU2F!j-0;HkomG2#%9 zYC50G#Oe%o4>7xwno>#&Nt!cKU5)eTo*u4y_NPSU!>|clmQAH5*AK(x<{TH9a}A*Y z@z47vmzf}1|HPf0WNky!21Fj9OXzq65fGW3hv|g{Ems?5^~E|GPsH?UsoYS!Q>z(` zTo?ykeAj~nLtI>eZnt;xPX-ZM8<}vAq@nNqVfMog7!2d%APD)Ln#{rz)S5@jaI=)s z#FN78=H0&a+4&`pKu z$#q(Y-#8(-IEXyLS|SQbbw$@rdP${Z=r#s$hi=D;T?}N#OX#~%7=OgqF-FytZlD$@ zl-rmY(Q++D6lWttJTL=t{X*rqjK=^uY?~YGY6$@fzddpTTCSixM}Mx$H_O*1WL6yU zhXyGm>`mOpn?i^fVW$v9;MGQQXwUBcLwmMw?;qpBObE;kBnLtmx>3d@E$~mWy;#DX z)@psJil77~0++Pz0;Ti|&=45lhDPjt5C^S)##+TDBjv*9qG<#u%nslyK-_(8X|9Br z2u4P9yu!Dk{2+E9xN>oIWX>Ut+tCN@#8D2`91LOTij+?$> z8VyO5wn~j2WxIgFM4>N04sGGuHdP+X7Fnek;18CmC|?@>#_jk&W(Kvgg5K!inOf!4 z3>|p)li)jK>M&fUNCt*N1O~}=3bV&n^Fqx+v8=&3lSj2Hq4Q7zLxPYM%JQMY;K|BV zR7H*8t?QAb9)}KZGoIa7Xn9PcdOsd3lH}_Og_|J=TtMOAjpFqOTdph`Ri=RrxRqaTX zD3A#Y*cco^dIIs-oT;9v4I@H3T3CDi=4$hX1U>HzWHQIzE$iBK#>20Rtx#%D7n`O) zGHN)6hc=q~mZBNDJ}6wKQPsL99)OigPmnZU_PBH;>DdhX%2S96LToUHMl%>8?Duj} zC5_&T_#X5%EP#iH+#;n5^O%5+p#kZzBuvMASu@8XsI+6Y~?q`5!itVwX%Kn7M=K%uS#y5x44f$}QG9T;eIOsR1aTH=eOXM2`S%C8S#{eBLkne4J^ zTOOswJPZlq(oGv>bsY_Gr8Xl^IP{=wsW+ylu)7deZngN+R)XlmK@Vm06fWj$Rs9o) z`BDWR^8y)=L8=)88;z5YcDH?lSOd`mVdU*83@Gu0Dnh(lr8HG(ma3JzXpH5|PJ=<5`AEySq_0S8Ka!!!NKkP#I{=1l2@{qU<|^!= zxwh_y!_we%G%IE#(t|f4socV%(u-|<#o}5X$KadQ;?}d)0xZ$pEp>2TKQ@N5uUu0g z4WeJFPEC~H>q7_AQAq~5BsU+9mls2>FK%Wa5o$^jxq2>#L`y3$(Ny=8v!G!E9@2iW zVsNhH0wM#>z6`FO{?4^zxD2n~r!8)uWH;b%W@T~)aGN}@+fZ_tXi!2u3LvLFEfI=8 zjx{n$5N{cSV}dWRj4)W9@CDI}LYY35xwse`B3XjpEJg~1|D{m?9zxE%K+Y>24fB5MVw`XE1-w9M$CA$x=I!*pp>6&YI+&l7Ke;5xTIlJ6(;2n-ICVoebO0HTr?OmTL-L2T}PJ#a9br}4qqP|3k$2EFonH* z&V%qF^EYL&;iUO}oZ7D}pN3u_f3<%KQTV3fgzR!@;LxFV0X|NWP~)s+y`>1Kpd1~Y^KUmA+(xC`$K^jctCkS_}#s883ryQ zr4@?dO7xA_RXWVD3-1jT!&j(ou4`$O4s!4eF`<@uXijMv)oE#Plnl(qqM}hob1YHo zbNYpbuR{ZaM&yhMOeKReG$ccZ5m~J@qIE1{c9C@ylG%fxW88-aBOf!0YLv5-fP}uy zm0YadoPTotUlE-VCatLrx!T2qkr~cJmHQqInLLxpn4%31v3{@(i08B#3J$kRN5xv$ z9ZC=n+gcdKELyiExR^RPvM20wC`dk#Cucgi#F()m?F@+#a??Faxn9G?(&%VEvt-#9 zhmu`j{^n8UP$*|ObX}~BmzAzoWseQd`Y)#0id9>%$0@gaYKkEKS*ORAm_Z zW|A6n?kY9RDwNg^5#*S`n7-GJ0z=b-u>*5TM4J%gQpy^0SHUE7joaV;mP)vDf0kzC zYJ#u}5?ei#p|&bfhH_PDz=534h9F;1RU9su4>+U@jbLCNoxx;7W*#cU68d8U!Z?na zBKv?{ra%Sa$V!k$pU?q{H>tk9RlGn{56=I}J+Ny@f5LybQNYQe4LfN# zL4Y^Ik8gE*(s>v1iO~j1aq8UQw-R)N3W_#)U?=jaN zqAp{V@foC928MIj1!m|y2eDiaHXel6p3Lz(i(AA-4Tv%vzEH`H7%?mw>xbAO<6hO7 z$y&13l_#WQK}qV#lQzLRbAgRXgu!mgGu8Y5EC09d*UT*1T;blsE+@)(Mmvrlwgbcxj)%LZRQ4~w1Y#BwFpCA0K)ySXki;&FbOXcX1>H6z+j! zOO^dJj2#Ej47JF^Os&7dLSV?)KFT9%g&+n^2omy8hiSNDz7-2Mq&${IYblD(-&l19 z;fpMW#=HzT6_BsM0nC6@A#^yXPGHXv#xpGTuzu7y85j7~p1h%WDZ8JGKKwa#7oBa; z6Z&RIRxgjyiE>vS`G{EC4mJ>G2a$n+WbJ;JTaGo%gmzYkKq^WeufZOHp+dzeSOd*xkyYL`8KMh(a4NBru_p7kMCf*uMwGk?)!J1W$8^3w*;gLN zdM9lpx>q9%vV|abh#|)k6(W`bjA0Olne!RxqB@Z>2$UhQvDUGuv@TM5=^ZC~?UX|! z*Q3BCW2z1!i$YmP#7d!y$G2j|KL>0p+x9x;bYiJs-41B;S%RNAA_&f!T zqb(MM5h%vS$d=p**KLoVoe~N7BC(6DdTM4u zVCys?@eSp0tK!b$R(_DBA)7DI#)ISuhBd`P$dy=k&z*L}Cwyy}Ywc5F_r(zcW(+%#G+gCt ztRbn6II|Y^JxZ6eA3@4u`;;_6|QQ0GF`H*vkfWG~~h1E`VpTsd_Bfs~{jDu;SDD zIb>dNie5g&eZu||R9V^3sX*5IC@r!ve=emgNEI zP?Jn{;C!X><39#Zr`2X{$`|E<=lf9<#3M{h{bm;qoXpS~R}E^1dZuy8ypY6dA!r1* zCf(hj`H==b7?x-hLZz_p4I>X7p)x89JqVWdxB6OVW;-#%75i$=n~!*=7Oly2G&fxfVh!XI!RF^wl(cJdjF z>J>H*Stob)o~b5W$^U89BV_k1 zQ6AI~^FTNSWI{jZV9}Tk-Hw_K>PJ;%5tk5G>CUpd9*@Yht@8Zd6_t?e&6g2U4vAf$IWz#t6OUcCCe~t68Q*_jVi#BSqGKw7B$W(8moDw~SIeNyirOSzP+B0mI@Djmc zg@Uza;EiAhYt1nY5xW7Buk5#|F~LrSCM!dXaeb2IK1GbF)C4~bLg~9OYPjBjw)qh5 zmK396Z5-nwS~Omo9>%XKJr=8}z{+&o4Z%On1GxAWLWeGtH&a!?3^=3^1-Ga%5yKyh z%#92WOi1!;G?=tAjKG|aIJM93DGvpSK)SijFM2Jw-qKzRX#l;_)@p>mJc{Zeh_;%+ z=p*MRYo$kPDgIkB?aNm$KJP`Nd&AJ0uOT;jZbihF5e_&2;5_}`7{P6=Vu-N#BvZ%x zsCzU42%dbpsNkgZJN#4c$50wG+Zl?|pn_WE!@kb8A@v@eDHRag5tN(s;n7ovCrZ^Z zhAtpnGQi>LrLg*!fy_d(pOn7nv+|Y#AZv`2UVrpg#iy>IvQa#Z}S-c13 z-4x3cndtg0 zHnOemXB=kMV(3u#pZp_%=qJJDZ(YNS^$+|^_b#=H4dMn6K|YMN6a<%eAcul)SVu=< zPkEGszlWt`y~*;OsP;||R7OL&KMxmGyVw(hYU4 zPb16BGki6lhc0pg?>W-&?y zSSx5UWG|kt6HjnSYk)Z98B^)WMz|4NBpQZTPtucuuHXodpgAF>e&}``zcO^&I-h$F zB5X$0lEJ09VX(4AJdx&272sYv7#LRi?5YPd7bB0s5U&p*PV`+&jAJn_#putLQA|1U zB1m(rs3=;d4f%{>ohg;x&k#&&&I0I7AJod>*($AC1Rpok>!1}HiM$m#4N~Wp8jU)( zHE2PY+pa_-IO)MM#!_J`MTO77ym)!yaX&BlNWB}i-O}cL+@F?Fe5DKYY>g2cbr{H^5B*A1&V#>X!I5oBsjB)*WvN^vku%C z7)RFo&}t~Dwqdvj*FcZN2fga>y+YC}H9z&zM^dm2FF8Yt?IT@vhdRGfB( zsi%9nY{w7>^OF=L3n!VReMvK(?@9_Dy4YZ45L1xxH0sirfwu>D zO9y^=g|-$7Yja~wdT`^S9RBdE>p>`z%dgyrL}6lY&!7enu5?mOmhn`Jbau&Md_4UuEpGDU0YhIZMDgA|mS;~1A8XKKMcj($4aUU`gRgmNu+ zCyA3dEd^r$jKdi`d*29f3l?Uujg(?R_ngNM>BvXMYj~Y|tFd?ku4=l)>5^6%!flGI zb68Jj=M?s=6cx#G#6gJ$N*hSFhqDqnZeyUqS{d`+p;K^VxK;$igbZ$+)#U@Owq?Ys z`N+$2`?La&4HT?ru9DjRty=nT^sZuk<)h0)KyWb6!SRp78Fp^z zMaQ3Ftz7CNIZuCddjPIfUjV^&QRrC1t5X30Jop$*hSB3{E1cOfGREVj`F9Xg^sgpNCC2!^TQTqC}k|JVyT;( zrI01)X?jjPOz5;O$x%n@2rm1XBu-B3;(~M>F;!fy{_KeRQTt#3d3We_RFG14ne<&BPNNd&>LvR%XvoX*y<3477du?M>n1c)ldBp|T)$p>WAP`z&b2~Mv zqb=u{?vtgX$fPpS1PghXaFc(S69!qqvBY%B)aPlS#BE5%6zEC_mVkp{SNYP*2(8v4 z42#1voG#P{4zlB8Y$~_mG4!d#BJhBk8iH6H z?eB{rNYq4hLp!k%3qa05*iA`ev4@@wgQ~LEt9k~}x9}CXPQ=U}coFeXJIXV}A^ytI zlkP58(qL>68{iF-^_mj>XwI;XUFH5Z>M@lr^S8d{L&;Xpjn*QQ;ysbV6#kHk_D$xm-GgsbQ03R56FpAa1T$^M~16L`G zeW*Ym=L3D9*N3wkke0J8I~yG4CO*^fkVoM_YtRU%spnf78>7WH99)X&0KHNOV+cZo z3Wohift5=-+LUK-3akk6_Hc-|XF>Q$!a?uISNN^mP1D2zOfou;LBaRB(ZS}hhvUw9 zWNu6S$Z_z2>x6Ki$_U{zyKb6_QJt5N;Jmc35wu+-LRaR*0vqN1Oy1C_?EJF_8>RW2DV^SWQaVc(R715%6_!Y9^)vly~l! z^>+|t9U@M1u*=>L0Foi{#5AsX9Ny1iPOlSTEWL_(ba=gh%uePFwPv~Ic2cW~;p~=D zw&@{vY(QIvtOOjy5#O2|u2(55a7Yy%ZQ~V_4dUMGlgrm9N0EhymLJnO zPT`c5N;A9>;*P}4Ypy$n#HckGrcaZxv05<`7FLs2v)nQk4pF0(@kK4z6hxYNlm*O) z(%^=&&^0ml?fWvr-Hh$z{#Ud{ZqR)YGs$_&;7|qxZ+KJedC0y7V=#-+k*1eVqB? zkqYDeh+*d_$Y8kZS}5kr|O36nom38ytPuN;;*+x)j)ZXUejSQ^;l zLc%Eqp2yxws5l;JVSw5Rqdt(_438|U6dIT-D-dUAVJ70l(cx$9y=aQV5#r9ebXJ4% zwX;5mfFBkHN3cJ--iyRh2})#Gs*`C`p*~!gEx9)x7G0vq_0zvh`Gx-GqzOx0>C?>3 zSGqZQ5j;qC1=8i=>v_UFJD_hEuPi7}GrGrDK&VJv9LL4=`i9g<`Y+t20oBGc9s*^- zmrY+rt2qJ%1%b z9L5rI#g!|yFz^_Z!>^e)x`1w@=+|=j|EePRs5cs6(5G)T3n#7WZ{YADE=UfS#`KOS ziBRcs*@RRL{6JUn5;F{>B9uMNoKvDkf~`Ir@-SDSo9x^MN26UTU6w>8Yhb|;Z}*@- zjoJp%@C$u`7$F_RqUfdN1Y4o9R%yyetoP?6^0{aFN@|LGTiyzfG;o)e77o|M(?=2&FeEp5X@T1IjV%ey$K5k@&#}l7^sG4rU|#TMhp< z`ER*7;;g5W@24d|D54n9)kF!yD3j8LuP5;pPQP~%e-0+==_kfKN@`T;1>hm}PWG#qnKh6*U~yDj@W$cw z@a;kA-Rf((EEs)QPTTL)cNI^;klp1Gf3*9a*3)j!yqj7&=;%p(Trh#7B}WW%0ow|RrWLgCvqDVeCpt) zjh(L+qdvjE$ypCLknS1hL>XhNWCbg?+I8?$?PgkpmDWf>c*X3{Qtz+DbEO#75?OwIS<3p=ulGHeRoYc z7I94mP|b%piBlA5c)0yi+hfrdE$S(+NY0&*$?}csKI*1#zTCBW%f3B$sSe%@sn^aa zXo#g6ZpaN2IL^)#00U=7;MLYA8Gj)M!*Um!ir=s)7F|5azzGsCc~T{uH(zRo%;2Of zjS)O;L#INtFN8ok!a}Tg7w$@<3_f9ndC#9h8v+wzN4ny~Tzs5zKBAqDnEqopve21IJ#lO%rbhiJj z5hf&=K;syKVgNxx$mJlfPK-EtO+B6wru@(zU%>*=Gdv~R1@469CdM}vJIhvI@F0S2 zH7yV+cS`aF+Yzd}__Tnuaf)&6*SaL70f95@9!RHjB~6|oEnYdVdE9(0Swv%FaAF%I z0$rW*o8_@daroR-s@Lsl+ZJi0 z@Udxc_T9dG*LDM;R|pfxai7{fd?2Zx2R4IZy>v+war z1H>Nr6K8`shiRq~HqzT*JDF`4@@Lb_@oDfp7z`E?R@m7SFdB$Fp|dMB8iug@Z+m#b zBxY>TW{6+3Es(0%*Idp;2^cC;Y6BQt_`lo3?o*^$fBbR)2CEIxo zNy4C?Upti?N4piJMivG)YKg`*-&ZTZWHGD7bcOv1uE?Ss2A6z;I3#jSARmdti+&I) z-JCl+YCG7M&bL6APms59i3}@K+=i%av-tUHY}k$C7n;U9v#54ZOpR2Uq6FqE!d+m= zYgimgLpf4;5J#c%y+jnki^NL_{3Tq)

nEd3v>UbQC)yUq|PS*CsHO#iHLs)Cq6n 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 QWfP}*f3CGM1GfL@FCwS2sQ>@~ literal 0 HcmV?d00001 diff --git a/epath.h b/epath.h new file mode 100644 index 0000000..fe1d57a --- /dev/null +++ b/epath.h @@ -0,0 +1,53 @@ +/* EPATH.H + * + * This file contains certain info needed to locate the + * initialization (etc) files on a system dependent basis + * + * modified by Petri Kutvonen + */ + +/* possible names and paths of help files under different OSs */ + +char *pathname[] = + +#if MSDOS +{ + "emacs.rc", + "emacs.hlp", + "\\sys\\public\\", + "\\usr\\bin\\", + "\\bin\\", + "\\", + "" +}; +#endif + +#if V7 | BSD | USG +{ + ".emacsrc", + "emacs.hlp", +#if PKCODE + "/usr/global/lib/", + "/usr/local/bin/", + "/usr/local/lib/", +#endif + "/usr/local/", + "/usr/lib/", + "" +}; +#endif + +#if VMS +{ + "emacs.rc", + "emacs.hlp", + "", +#if PKCODE + "sys$login:", + "emacs_dir:", +#endif + "sys$sysdevice:[vmstools]" +}; +#endif + +#define NPNAMES (sizeof(pathname)/sizeof(char *)) diff --git a/estruct.h b/estruct.h new file mode 100644 index 0000000..30772d5 --- /dev/null +++ b/estruct.h @@ -0,0 +1,731 @@ +/* ESTRUCT.H + * + * Structure and preprocessor defines + * + * written by Dave G. Conroy + * modified by Steve Wilhite, George Jones + * substantially modified by Daniel Lawrence + * modified by Petri Kutvonen + */ + +#define MAXCOL 500 +#define MAXROW 500 + +#ifdef MSDOS +#undef MSDOS +#endif +#ifdef EGA +#undef EGA +#endif +#ifdef CTRLZ +#undef CTRLZ +#endif + +/* Program Identification..... + + PROGNAME should always be MicroEMACS for a distibrution + unmodified version. People using MicroEMACS as a shell + for other products should change this to reflect their + product. Macros can query this via the $progname variable + + this version in called uEmacs/PK +*/ + +#define PROGNAME "uEmacs/PK" +#define VERSION "4.0.15" + +/* Machine/OS definitions */ + +#if defined(AUTOCONF) || defined(MSDOS) || defined(BSD) || defined(SYSV) || defined(VMS) + +/* make an intelligent guess about the target system */ + +#if defined(__TURBOC__) +#define MSDOS 1 /* MS/PC DOS 3.1-4.0 with Turbo C 2.0 */ +#else +#define MSDOS 0 +#endif + +#if defined(BSD) || defined(sun) || defined(ultrix) || (defined(vax) && defined(unix)) || defined(ultrix) || defined(__osf__) +#ifndef BSD +#define BSD 1 /* Berkeley UNIX */ +#endif +#else +#define BSD 0 +#endif + +#if defined(SVR4) || defined(__linux__) /* ex. SunOS 5.3 */ +#define SVR4 1 +#define SYSV 1 +#undef BSD +#endif + +#if defined(SYSV) || defined(u3b2) || defined(_AIX) || (defined(i386) && defined(unix)) || defined(__hpux) +#define USG 1 /* System V UNIX */ +#else +#define USG 0 +#endif + +#if defined(VMS) || (defined(vax) && ! defined(unix)) +#define VMS 1 /* VAX/VMS */ +#else +#define VMS 0 +#endif + +#define V7 0 /* no more */ + +#else + +#define MSDOS 1 /* MS-DOS */ +#define V7 0 /* V7 UNIX or Coherent or BSD4.2*/ +#define BSD 0 /* UNIX BSD 4.2 and ULTRIX */ +#define USG 0 /* UNIX system V */ +#define VMS 0 /* VAX/VMS */ + +#endif /*autoconf */ + +#ifndef AUTOCONF + +/* Compiler definitions */ +#define UNIX 0 /* a random UNIX compiler */ +#define MSC 0 /* MicroSoft C compiler, versions 3 up */ +#define TURBO 1 /* Turbo C/MSDOS */ + +#else + +#define UNIX (V7 | BSD | USG) +#define MSC 0 +#define TURBO MSDOS + +#endif /*autoconf */ + +/* Debugging options */ + +#define RAMSIZE 0 /* dynamic RAM memory usage tracking */ +#define RAMSHOW 0 /* auto dynamic RAM reporting */ + +#ifndef AUTOCONF + +/* Special keyboard definitions */ + +#define VT220 0 /* Use keypad escapes P.K. */ +#define VT100 0 /* Handle VT100 style keypad. */ + +/* Terminal Output definitions */ + +#define ANSI 0 /* ANSI escape sequences */ +#define VMSVT 0 /* various VMS terminal entries */ +#define VT52 0 /* VT52 terminal (Zenith). */ +#define TERMCAP 0 /* Use TERMCAP */ +#define IBMPC 1 /* IBM-PC CGA/MONO/EGA driver */ + +#else + +#define VT220 (UNIX | VMS) +#define VT100 0 + +#define ANSI 0 +#define VMSVT VMS +#define VT52 0 +#define TERMCAP UNIX +#define IBMPC MSDOS + +#endif /*autoconf */ + +/* Configuration options */ + +#define CVMVAS 1 /* arguments to page forward/back in pages */ +#define CLRMSG 0 /* space clears the message line with no insert */ +#define CFENCE 1 /* fench matching in CMODE */ +#define TYPEAH 1 /* type ahead causes update to be skipped */ +#define DEBUGM 1 /* $debug triggers macro debugging */ +#define VISMAC 0 /* update display during keyboard macros */ +#define CTRLZ 0 /* add a ^Z at end of files under MSDOS only */ +#define ADDCR 0 /* ajout d'un CR en fin de chaque ligne (ST520) */ +#define NBRACE 1 /* new style brace matching command */ +#define REVSTA 1 /* Status line appears in reverse video */ + +#ifndef AUTOCONF + +#define COLOR 1 /* color commands and windows */ +#define FILOCK 0 /* file locking under unix BSD 4.2 */ + +#else + +#define COLOR MSDOS +#ifdef SVR4 +#define FILOCK 1 +#else +#define FILOCK BSD +#endif + +#endif /* autoconf */ + +#define ISRCH 1 /* Incremental searches like ITS EMACS */ +#define WORDPRO 1 /* Advanced word processing features */ +#define FNLABEL 0 /* function key label code [HP150] */ +#define APROP 1 /* Add code for Apropos command */ +#define CRYPT 1 /* file encryption enabled? */ +#define MAGIC 1 /* include regular expression matching? */ +#define AEDIT 1 /* advanced editing options: en/detabbing */ +#define PROC 1 /* named procedures */ +#define CLEAN 0 /* de-alloc memory on exit */ +#define CALLED 0 /* is emacs a called subroutine? or stand alone */ + +#define ASCII 1 /* always using ASCII char sequences for now */ +#define EBCDIC 0 /* later IBM mainfraim versions will use EBCDIC */ + +#ifndef AUTOCONF + +#define XONXOFF 0 /* don't disable XON-XOFF flow control P.K. */ +#define NATIONL 0 /* interprete [,],\,{,},| as characters P.K. */ + +#else + +#define XONXOFF (UNIX | VMS) +#define NATIONL (UNIX | VMS) + +#endif /* autoconf */ + +#define PKCODE 1 /* include my extensions P.K., define always */ +#define IBMCHR MSDOS /* use IBM PC character set P.K. */ +#define SCROLLCODE 1 /* scrolling code P.K. */ + +/* System dependant library redefinitions, structures and includes */ + +#if TURBO +#include +#include +#undef peek +#undef poke +#define peek(a,b,c,d) movedata(a,b,FP_SEG(c),FP_OFF(c),d) +#define poke(a,b,c,d) movedata(FP_SEG(c),FP_OFF(c),a,b,d) +#endif + +#if VMS +#define atoi xatoi +#define abs xabs +#define getname xgetname +#endif + +#if MSDOS & MSC +#include +#include +#define peek(a,b,c,d) movedata(a,b,FP_SEG(c),FP_OFF(c),d) +#define poke(a,b,c,d) movedata(FP_SEG(c),FP_OFF(c),a,b,d) +#define movmem(a, b, c) memcpy(b, a, c) +#endif + +#if VMS +#define unlink(a) delete(a) +#endif + +/* define some ability flags */ + +#if IBMPC +#define MEMMAP 1 +#else +#define MEMMAP 0 +#endif + +#if MSDOS | V7 | USG | BSD +#define ENVFUNC 1 +#else +#define ENVFUNC 0 +#endif + +/* Emacs global flag bit definitions (for gflags) */ + +#define GFREAD 1 + +/* internal constants */ + +#define NBINDS 256 /* max # of bound keys */ +#define NFILEN 80 /* # of bytes, file name */ +#define NBUFN 16 /* # of bytes, buffer name */ +#define NLINE 256 /* # of bytes, input line */ +#define NSTRING 128 /* # of bytes, string buffers */ +#define NKBDM 256 /* # of strokes, keyboard macro */ +#define NPAT 128 /* # of bytes, pattern */ +#define HUGE 1000 /* Huge number */ +#define NLOCKS 100 /* max # of file locks active */ +#define NCOLORS 8 /* number of supported colors */ +#define KBLOCK 250 /* sizeof kill buffer chunks */ +#define NBLOCK 16 /* line block chunk size */ +#define NVSIZE 10 /* max #chars in a var name */ + +#define CONTROL 0x0100 /* Control flag, or'ed in */ +#define META 0x0200 /* Meta flag, or'ed in */ +#define CTLX 0x0400 /* ^X flag, or'ed in */ +#define SPEC 0x0800 /* special key (function keys) */ + +#if PKCODE +#define MAXNLINE 100000 /* max lines from one file */ +#endif + +#ifdef FALSE +#undef FALSE +#endif +#ifdef TRUE +#undef TRUE +#endif + +#define FALSE 0 /* False, no, bad, etc. */ +#define TRUE 1 /* True, yes, good, etc. */ +#define ABORT 2 /* Death, ^G, abort, etc. */ +#define FAILED 3 /* not-quite fatal false return */ + +#define STOP 0 /* keyboard macro not in use */ +#define PLAY 1 /* playing */ +#define RECORD 2 /* recording */ + +/* Directive definitions */ + +#define DIF 0 +#define DELSE 1 +#define DENDIF 2 +#define DGOTO 3 +#define DRETURN 4 +#define DENDM 5 +#define DWHILE 6 +#define DENDWHILE 7 +#define DBREAK 8 +#define DFORCE 9 + +#define NUMDIRS 10 + +/* + * PTBEG, PTEND, FORWARD, and REVERSE are all toggle-able values for + * the scan routines. + */ +#define PTBEG 0 /* Leave the point at the beginning on search */ +#define PTEND 1 /* Leave the point at the end on search */ +#define FORWARD 0 /* forward direction */ +#define REVERSE 1 /* backwards direction */ + +#define FIOSUC 0 /* File I/O, success. */ +#define FIOFNF 1 /* File I/O, file not found. */ +#define FIOEOF 2 /* File I/O, end of file. */ +#define FIOERR 3 /* File I/O, error. */ +#define FIOMEM 4 /* File I/O, out of memory */ +#define FIOFUN 5 /* File I/O, eod of file/bad line*/ + +#define CFCPCN 0x0001 /* Last command was C-P, C-N */ +#define CFKILL 0x0002 /* Last command was a kill */ + +#define BELL 0x07 /* a bell character */ +#define TAB 0x09 /* a tab character */ + +#if V7 | USG | BSD +#define PATHCHR ':' +#else +#define PATHCHR ';' +#endif + +#define INTWIDTH sizeof(int) * 3 + +/* Macro argument token types */ + +#define TKNUL 0 /* end-of-string */ +#define TKARG 1 /* interactive argument */ +#define TKBUF 2 /* buffer argument */ +#define TKVAR 3 /* user variables */ +#define TKENV 4 /* environment variables */ +#define TKFUN 5 /* function.... */ +#define TKDIR 6 /* directive */ +#define TKLBL 7 /* line label */ +#define TKLIT 8 /* numeric literal */ +#define TKSTR 9 /* quoted string literal */ +#define TKCMD 10 /* command name */ + +/* Internal defined functions */ + +#define nextab(a) (a & ~tabmask) + (tabmask+1) +#ifdef abs +#undef abs +#endif + +/* DIFCASE represents the integer difference between upper + and lower case letters. It is an xor-able value, which is + fortunate, since the relative positions of upper to lower + case letters is the opposite of ascii in ebcdic. +*/ + +#ifdef islower +#undef islower +#endif + +#if PKCODE +#ifdef isupper +#undef isupper +#endif +#endif + +#if ASCII + +#define DIFCASE 0x20 + +#if NATIONL +#define LASTUL ']' +#define LASTLL '}' +#else +#define LASTUL 'Z' +#define LASTLL 'z' +#endif + +#if IBMCHR + +#define isletter(c) (('a' <= c && LASTLL >= c) || ('A' <= c && LASTUL >= c) || (128<=c && c<=167)) +#define islower(c) (('a' <= c && LASTLL >= c)) +#define isupper(c) (('A' <= c && LASTUL >= c)) + +#else + +#define isletter(c) isxletter((0xFF & (c))) +#define islower(c) isxlower((0xFF & (c))) +#define isupper(c) isxupper((0xFF & (c))) + +#define isxletter(c) (('a' <= c && LASTLL >= c) || ('A' <= c && LASTUL >= c) || (192<=c && c<=255)) +#define isxlower(c) (('a' <= c && LASTLL >= c) || (224 <= c && 252 >= c)) +#define isxupper(c) (('A' <= c && LASTUL >= c) || (192 <= c && 220 >= c)) + +#endif + +#endif + +#if EBCDIC + +#define DIFCASE 0x40 +#define isletter(c) (('a' <= c && 'i' >= c) || ('j' <= c && 'r' >= c) || ('s' <= c && 'z' >= c) || ('A' <= c && 'I' >= c) || ('J' <= c && 'R' >= c) || ('S' <= c && 'Z' >= c)) +#define islower(c) (('a' <= c && 'i' >= c) || ('j' <= c && 'r' >= c) || ('s' <= c && 'z' >= c)) +#if PKCODE +#define isupper(c) (('A' <= c && 'I' >= c) || ('J' <= c && 'R' >= c) || ('S' <= c && 'Z' >= c)) +#endif + +#endif + +/* Dynamic RAM tracking and reporting redefinitions */ + +#if RAMSIZE +#define malloc allocate +#define free release +#endif + +/* De-allocate memory always on exit (if the operating system or + main program can not +*/ + +#if CLEAN +#define exit(a) cexit(a) +#endif + +/* + * There is a window structure allocated for every active display window. The + * windows are kept in a big list, in top to bottom screen order, with the + * listhead at "wheadp". Each window contains its own values of dot and mark. + * The flag field contains some bits that are set by commands to guide + * redisplay. Although this is a bit of a compromise in terms of decoupling, + * the full blown redisplay is just too expensive to run for every input + * character. + */ +typedef struct WINDOW { + struct WINDOW *w_wndp; /* Next window */ + struct BUFFER *w_bufp; /* Buffer displayed in window */ + struct LINE *w_linep; /* Top line in the window */ + struct LINE *w_dotp; /* Line containing "." */ + short w_doto; /* Byte offset for "." */ + struct LINE *w_markp; /* Line containing "mark" */ + short w_marko; /* Byte offset for "mark" */ + char w_toprow; /* Origin 0 top row of window */ + char w_ntrows; /* # of rows of text in window */ + char w_force; /* If NZ, forcing row. */ + char w_flag; /* Flags. */ +#if COLOR + char w_fcolor; /* current forground color */ + char w_bcolor; /* current background color */ +#endif +} WINDOW; + +#define WFFORCE 0x01 /* Window needs forced reframe */ +#define WFMOVE 0x02 /* Movement from line to line */ +#define WFEDIT 0x04 /* Editing within a line */ +#define WFHARD 0x08 /* Better to a full display */ +#define WFMODE 0x10 /* Update mode line. */ +#define WFCOLR 0x20 /* Needs a color change */ + +#if SCROLLCODE +#define WFKILLS 0x40 /* something was deleted */ +#define WFINS 0x80 /* something was inserted */ +#endif + + +/* + * Text is kept in buffers. A buffer header, described below, exists for every + * buffer in the system. The buffers are kept in a big list, so that commands + * that search for a buffer by name can find the buffer header. There is a + * safe store for the dot and mark in the header, but this is only valid if + * the buffer is not being displayed (that is, if "b_nwnd" is 0). The text for + * the buffer is kept in a circularly linked list of lines, with a pointer to + * the header line in "b_linep". + * Buffers may be "Inactive" which means the files associated with them + * have not been read in yet. These get read in at "use buffer" time. + */ +typedef struct BUFFER { + struct BUFFER *b_bufp; /* Link to next BUFFER */ + struct LINE *b_dotp; /* Link to "." LINE structure */ + short b_doto; /* Offset of "." in above LINE */ + struct LINE *b_markp; /* The same as the above two, */ + short b_marko; /* but for the "mark" */ + struct LINE *b_linep; /* Link to the header LINE */ + char b_active; /* window activated flag */ + char b_nwnd; /* Count of windows on buffer */ + char b_flag; /* Flags */ + int b_mode; /* editor mode of this buffer */ + char b_fname[NFILEN]; /* File name */ + char b_bname[NBUFN]; /* Buffer name */ +#if CRYPT + char b_key[NPAT]; /* current encrypted key */ +#endif +} BUFFER; + +#define BFINVS 0x01 /* Internal invisable buffer */ +#define BFCHG 0x02 /* Changed since last write */ +#define BFTRUNC 0x04 /* buffer was truncated when read */ + +/* mode flags */ +#define NUMMODES 9 /* # of defined modes */ + +#define MDWRAP 0x0001 /* word wrap */ +#define MDCMOD 0x0002 /* C indentation and fence match*/ +#define MDSPELL 0x0004 /* spell error parcing */ +#define MDEXACT 0x0008 /* Exact matching for searches */ +#define MDVIEW 0x0010 /* read-only buffer */ +#define MDOVER 0x0020 /* overwrite mode */ +#define MDMAGIC 0x0040 /* regular expresions in search */ +#define MDCRYPT 0x0080 /* encrytion mode active */ +#define MDASAVE 0x0100 /* auto-save mode */ + +/* + * The starting position of a region, and the size of the region in + * characters, is kept in a region structure. Used by the region commands. + */ +typedef struct { + struct LINE *r_linep; /* Origin LINE address. */ + short r_offset; /* Origin LINE offset. */ + long r_size; /* Length in characters. */ +} REGION; + +/* + * All text is kept in circularly linked lists of "LINE" structures. These + * begin at the header line (which is the blank line beyond the end of the + * buffer). This line is pointed to by the "BUFFER". Each line contains a the + * number of bytes in the line (the "used" size), the size of the text array, + * and the text. The end of line is not stored as a byte; it's implied. Future + * additions will include update hints, and a list of marks into the line. + */ +typedef struct LINE { + struct LINE *l_fp; /* Link to the next line */ + struct LINE *l_bp; /* Link to the previous line */ + short l_size; /* Allocated size */ + short l_used; /* Used size */ + char l_text[1]; /* A bunch of characters. */ +} LINE; + +#define lforw(lp) ((lp)->l_fp) +#define lback(lp) ((lp)->l_bp) +#define lgetc(lp, n) ((lp)->l_text[(n)]&0xFF) +#define lputc(lp, n, c) ((lp)->l_text[(n)]=(c)) +#define llength(lp) ((lp)->l_used) + +/* + * The editor communicates with the display using a high level interface. A + * "TERM" structure holds useful variables, and indirect pointers to routines + * that do useful operations. The low level get and put routines are here too. + * This lets a terminal, in addition to having non standard commands, have + * funny get and put character code too. The calls might get changed to + * "termp->t_field" style in the future, to make it possible to run more than + * one terminal type. + */ +typedef struct { + short t_mrow; /* max number of rows allowable */ + short t_nrow; /* current number of rows used */ + short t_mcol; /* max Number of columns. */ + short t_ncol; /* current Number of columns. */ + short t_margin; /* min margin for extended lines*/ + short t_scrsiz; /* size of scroll region " */ + int t_pause; /* # times thru update to pause */ + int (*t_open)(); /* Open terminal at the start. */ + int (*t_close)(); /* Close terminal at end. */ + int (*t_kopen)(); /* Open keyboard */ + int (*t_kclose)(); /* close keyboard */ + int (*t_getchar)(); /* Get character from keyboard. */ + int (*t_putchar)(); /* Put character to display. */ + int (*t_flush)(); /* Flush output buffers. */ + int (*t_move)(); /* Move the cursor, origin 0. */ + int (*t_eeol)(); /* Erase to end of line. */ + int (*t_eeop)(); /* Erase to end of page. */ + int (*t_beep)(); /* Beep. */ + int (*t_rev)(); /* set reverse video state */ + int (*t_rez)(); /* change screen resolution */ +#if COLOR + int (*t_setfor)(); /* set forground color */ + int (*t_setback)(); /* set background color */ +#endif +#if SCROLLCODE + int (*t_scroll)(); /* scroll a region of the screen */ +#endif +} TERM; + +/* TEMPORARY macros for terminal I/O (to be placed in a machine + dependant place later) */ + +#define TTopen (*term.t_open) +#define TTclose (*term.t_close) +#define TTkopen (*term.t_kopen) +#define TTkclose (*term.t_kclose) +#define TTgetc (*term.t_getchar) +#define TTputc (*term.t_putchar) +#define TTflush (*term.t_flush) +#define TTmove (*term.t_move) +#define TTeeol (*term.t_eeol) +#define TTeeop (*term.t_eeop) +#define TTbeep (*term.t_beep) +#define TTrev (*term.t_rev) +#define TTrez (*term.t_rez) +#if COLOR +#define TTforg (*term.t_setfor) +#define TTbacg (*term.t_setback) +#endif + +/* structure for the table of initial key bindings */ + +typedef struct { + short k_code; /* Key code */ + int (*k_fp)(); /* Routine to handle it */ +} KEYTAB; + +/* structure for the name binding table */ + +typedef struct { + char *n_name; /* name of function key */ + int (*n_func)(); /* function name is bound to */ +} NBIND; + +/* The editor holds deleted text chunks in the KILL buffer. The + kill buffer is logically a stream of ascii characters, however + due to its unpredicatable size, it gets implemented as a linked + list of chunks. (The d_ prefix is for "deleted" text, as k_ + was taken up by the keycode structure) +*/ + +typedef struct KILL { + struct KILL *d_next; /* link to next chunk, NULL if last */ + char d_chunk[KBLOCK]; /* deleted text */ +} KILL; + +/* When emacs' command interpetor needs to get a variable's name, + rather than it's value, it is passed back as a VDESC variable + description structure. The v_num field is a index into the + appropriate variable table. +*/ + +typedef struct VDESC { + int v_type; /* type of variable */ + int v_num; /* ordinal pointer to variable in list */ +} VDESC; + +/* The !WHILE directive in the execution language needs to + stack references to pending whiles. These are stored linked + to each currently open procedure via a linked list of + the following structure +*/ + +typedef struct WHBLOCK { + LINE *w_begin; /* ptr to !while statement */ + LINE *w_end; /* ptr to the !endwhile statement*/ + int w_type; /* block type */ + struct WHBLOCK *w_next; /* next while */ +} WHBLOCK; + +#define BTWHILE 1 +#define BTBREAK 2 + +/* + * Incremental search defines. + */ +#if ISRCH + +#define CMDBUFLEN 256 /* Length of our command buffer */ + +#define IS_ABORT 0x07 /* Abort the isearch */ +#define IS_BACKSP 0x08 /* Delete previous char */ +#define IS_TAB 0x09 /* Tab character (allowed search char) */ +#define IS_NEWLINE 0x0D /* New line from keyboard (Carriage return) */ +#define IS_QUOTE 0x11 /* Quote next character */ +#define IS_REVERSE 0x12 /* Search backward */ +#define IS_FORWARD 0x13 /* Search forward */ +#define IS_VMSQUOTE 0x16 /* VMS quote character */ +#define IS_VMSFORW 0x18 /* Search forward for VMS */ +#define IS_QUIT 0x1B /* Exit the search */ +#define IS_RUBOUT 0x7F /* Delete previous character */ + +/* IS_QUIT is no longer used, the variable metac is used instead */ + +#endif + +#if MAGIC +/* + * Defines for the metacharacters in the regular expression + * search routines. + */ +#define MCNIL 0 /* Like the '\0' for strings.*/ +#define LITCHAR 1 /* Literal character, or string.*/ +#define ANY 2 +#define CCL 3 +#define NCCL 4 +#define BOL 5 +#define EOL 6 +#define DITTO 7 +#define CLOSURE 256 /* An or-able value.*/ +#define MASKCL CLOSURE - 1 + +#define MC_ANY '.' /* 'Any' character (except newline).*/ +#define MC_CCL '[' /* Character class.*/ +#define MC_NCCL '^' /* Negate character class.*/ +#define MC_RCCL '-' /* Range in character class.*/ +#define MC_ECCL ']' /* End of character class.*/ +#define MC_BOL '^' /* Beginning of line.*/ +#define MC_EOL '$' /* End of line.*/ +#define MC_CLOSURE '*' /* Closure - does not extend past newline.*/ +#define MC_DITTO '&' /* Use matched string in replacement.*/ +#define MC_ESC '\\' /* Escape - suppress meta-meaning.*/ + +#define BIT(n) (1 << (n)) /* An integer with one bit set.*/ +#define CHCASE(c) ((c) ^ DIFCASE) /* Toggle the case of a letter.*/ + +/* HICHAR - 1 is the largest character we will deal with. + * HIBYTE represents the number of bytes in the bitmap. + */ +#define HICHAR 256 +#define HIBYTE HICHAR >> 3 + +/* Typedefs that define the bitmap type for searching (BITMAP), + * the meta-character structure for MAGIC mode searching (MC), + * and the meta-character structure for MAGIC mode replacment (RMC). + */ +typedef char *BITMAP; + +typedef struct { + short int mc_type; + union { + int lchar; + BITMAP cclmap; + } u; +} MC; + +typedef struct { + short int mc_type; + char *rstr; +} RMC; +#endif + diff --git a/eval.c b/eval.c new file mode 100644 index 0000000..496b5aa --- /dev/null +++ b/eval.c @@ -0,0 +1,879 @@ +/* EVAL.C + * + * Expression evaluation functions + * + * written 1986 by Daniel Lawrence + * modified by Petri Kutvonen + */ + +#include +#include "estruct.h" +#include "edef.h" +#include "evar.h" + +varinit() /* initialize the user variable list */ + +{ + register int i; + + for (i=0; i < MAXVARS; i++) + uv[i].u_name[0] = 0; +} + +char *gtfun(fname) /* evaluate a function */ + +char *fname; /* name of function to evaluate */ + +{ + register int fnum; /* index to function to eval */ + register int status; /* return status */ + register char *tsp; /* temporary string pointer */ + char arg1[NSTRING]; /* value of first argument */ + char arg2[NSTRING]; /* value of second argument */ + char arg3[NSTRING]; /* value of third argument */ + static char result[2 * NSTRING]; /* string result */ + char *flook(); /* look file up on path */ + char *xlat(); /* translate a char string */ +#if ENVFUNC + char *getenv(); /* get environment string */ +#endif + + /* look the function up in the function table */ + fname[3] = 0; /* only first 3 chars significant */ + mklower(fname); /* and let it be upper or lower case */ + for (fnum = 0; fnum < NFUNCS; fnum++) + if (strcmp(fname, funcs[fnum].f_name) == 0) + break; + + /* return errorm on a bad reference */ + if (fnum == NFUNCS) + return(errorm); + + /* if needed, retrieve the first argument */ + if (funcs[fnum].f_type >= MONAMIC) { + if ((status = macarg(arg1)) != TRUE) + return(errorm); + + /* if needed, retrieve the second argument */ + if (funcs[fnum].f_type >= DYNAMIC) { + if ((status = macarg(arg2)) != TRUE) + return(errorm); + + /* if needed, retrieve the third argument */ + if (funcs[fnum].f_type >= TRINAMIC) + if ((status = macarg(arg3)) != TRUE) + return(errorm); + } + } + + + /* and now evaluate it! */ + switch (fnum) { + case UFADD: return(itoa(atoi(arg1) + atoi(arg2))); + case UFSUB: return(itoa(atoi(arg1) - atoi(arg2))); + case UFTIMES: return(itoa(atoi(arg1) * atoi(arg2))); + case UFDIV: return(itoa(atoi(arg1) / atoi(arg2))); + case UFMOD: return(itoa(atoi(arg1) % atoi(arg2))); + case UFNEG: return(itoa(-atoi(arg1))); + case UFCAT: strcpy(result, arg1); + return(strcat(result, arg2)); + case UFLEFT: return(strncpy(result, arg1, atoi(arg2))); + case UFRIGHT: return(strcpy(result, + &arg1[(strlen(arg1) - atoi(arg2))])); + case UFMID: return(strncpy(result, &arg1[atoi(arg2)-1], + atoi(arg3))); + case UFNOT: return(ltos(stol(arg1) == FALSE)); + case UFEQUAL: return(ltos(atoi(arg1) == atoi(arg2))); + case UFLESS: return(ltos(atoi(arg1) < atoi(arg2))); + case UFGREATER: return(ltos(atoi(arg1) > atoi(arg2))); + case UFSEQUAL: return(ltos(strcmp(arg1, arg2) == 0)); + case UFSLESS: return(ltos(strcmp(arg1, arg2) < 0)); + case UFSGREAT: return(ltos(strcmp(arg1, arg2) > 0)); + case UFIND: return(strcpy(result, getval(arg1))); + case UFAND: return(ltos(stol(arg1) && stol(arg2))); + case UFOR: return(ltos(stol(arg1) || stol(arg2))); + case UFLENGTH: return(itoa(strlen(arg1))); + case UFUPPER: return(mkupper(arg1)); + case UFLOWER: return(mklower(arg1)); + case UFTRUTH: return(ltos(atoi(arg1) == 42)); + case UFASCII: return(itoa((int)arg1[0])); + case UFCHR: result[0] = atoi(arg1); + result[1] = 0; + return(result); + case UFGTKEY: result[0] = tgetc(); + result[1] = 0; + return(result); + case UFRND: return(itoa((ernd() % abs(atoi(arg1))) + 1)); + case UFABS: return(itoa(abs(atoi(arg1)))); + case UFSINDEX: return(itoa(sindex(arg1, arg2))); + case UFENV: +#if ENVFUNC + tsp = getenv(arg1); + return(tsp == NULL ? "" : tsp); +#else + return(""); +#endif + case UFBIND: return(transbind(arg1)); + case UFEXIST: return(ltos(fexist(arg1))); + case UFFIND: + tsp = flook(arg1, TRUE); + return(tsp == NULL ? "" : tsp); + case UFBAND: return(itoa(atoi(arg1) & atoi(arg2))); + case UFBOR: return(itoa(atoi(arg1) | atoi(arg2))); + case UFBXOR: return(itoa(atoi(arg1) ^ atoi(arg2))); + case UFBNOT: return(itoa(~atoi(arg1))); + case UFXLATE: return(xlat(arg1, arg2, arg3)); + } + + exit(-11); /* never should get here */ +} + +char *gtusr(vname) /* look up a user var's value */ + +char *vname; /* name of user variable to fetch */ + +{ + + register int vnum; /* ordinal number of user var */ + + /* scan the list looking for the user var name */ + for (vnum = 0; vnum < MAXVARS; vnum++) { + if (uv[vnum].u_name[0] == 0) + return(errorm); + if (strcmp(vname, uv[vnum].u_name) == 0) + return(uv[vnum].u_value); + } + + /* return errorm if we run off the end */ + return(errorm); +} + +char *gtenv(vname) + +char *vname; /* name of environment variable to retrieve */ + +{ + register int vnum; /* ordinal number of var refrenced */ + char *getkill(); + + /* scan the list, looking for the referenced name */ + for (vnum = 0; vnum < NEVARS; vnum++) + if (strcmp(vname, envars[vnum]) == 0) + break; + + /* return errorm on a bad reference */ + if (vnum == NEVARS) +#if ENVFUNC + { + extern char *getenv(); + char *ename = getenv(vname); + + if (ename != NULL) + return(ename); + else + return(errorm); + } +#else + return(errorm); +#endif + + /* otherwise, fetch the appropriate value */ + switch (vnum) { + case EVFILLCOL: return(itoa(fillcol)); + case EVPAGELEN: return(itoa(term.t_nrow + 1)); + case EVCURCOL: return(itoa(getccol(FALSE))); + case EVCURLINE: return(itoa(getcline())); + case EVRAM: return(itoa((int)(envram / 1024l))); + case EVFLICKER: return(ltos(flickcode)); + case EVCURWIDTH:return(itoa(term.t_ncol)); + case EVCBUFNAME:return(curbp->b_bname); + case EVCFNAME: return(curbp->b_fname); + case EVSRES: return(sres); + case EVDEBUG: return(ltos(macbug)); + case EVSTATUS: return(ltos(cmdstatus)); + case EVPALETTE: return(palstr); + case EVASAVE: return(itoa(gasave)); + case EVACOUNT: return(itoa(gacount)); + case EVLASTKEY: return(itoa(lastkey)); + case EVCURCHAR: + return(curwp->w_dotp->l_used == + curwp->w_doto ? itoa('\n') : + itoa(lgetc(curwp->w_dotp, curwp->w_doto))); + case EVDISCMD: return(ltos(discmd)); + case EVVERSION: return(VERSION); + case EVPROGNAME:return(PROGNAME); + case EVSEED: return(itoa(seed)); + case EVDISINP: return(ltos(disinp)); + case EVWLINE: return(itoa(curwp->w_ntrows)); + case EVCWLINE: return(itoa(getwpos())); + case EVTARGET: saveflag = lastflag; + return(itoa(curgoal)); + case EVSEARCH: return(pat); + case EVREPLACE: return(rpat); + case EVMATCH: return((patmatch == NULL)? "": patmatch); + case EVKILL: return(getkill()); + case EVCMODE: return(itoa(curbp->b_mode)); + case EVGMODE: return(itoa(gmode)); + case EVTPAUSE: return(itoa(term.t_pause)); + case EVPENDING: +#if TYPEAH + return(ltos(typahead())); +#else + return(falsem); +#endif + case EVLWIDTH: return(itoa(llength(curwp->w_dotp))); + case EVLINE: return(getctext()); + case EVGFLAGS: return(itoa(gflags)); + case EVRVAL: return(itoa(rval)); + case EVTAB: return(itoa(tabmask+1)); + case EVOVERLAP: return(itoa(overlap)); + case EVSCROLLCOUNT: + return(itoa(scrollcount)); +#if SCROLLCODE + case EVSCROLL: return(ltos(term.t_scroll != NULL)); +#else + case EVSCROLL: return(ltos(0)); +#endif + } + exit(-12); /* again, we should never get here */ +} + +char *getkill() /* return some of the contents of the kill buffer */ + +{ + register int size; /* max number of chars to return */ + static char value[NSTRING]; /* temp buffer for value */ + + if (kbufh == NULL) + /* no kill buffer....just a null string */ + value[0] = 0; + else { + /* copy in the contents... */ + if (kused < NSTRING) + size = kused; + else + size = NSTRING - 1; + strncpy(value, kbufh->d_chunk, size); + } + + /* and return the constructed value */ + return(value); +} + +int setvar(f, n) /* set a variable */ + +int f; /* default flag */ +int n; /* numeric arg (can overide prompted value) */ + +{ + register int status; /* status return */ +#if DEBUGM + register char *sp; /* temp string pointer */ + register char *ep; /* ptr to end of outline */ +#endif + VDESC vd; /* variable num/type */ + char var[NVSIZE+1]; /* name of variable to fetch */ + char value[NSTRING]; /* value to set variable to */ + + /* first get the variable to set.. */ + if (clexec == FALSE) { + status = mlreply("Variable to set: ", &var[0], NVSIZE); + if (status != TRUE) + return(status); + } else { /* macro line argument */ + /* grab token and skip it */ + execstr = token(execstr, var, NVSIZE + 1); + } + + /* check the legality and find the var */ + findvar(var, &vd, NVSIZE + 1); + + /* if its not legal....bitch */ + if (vd.v_type == -1) { + mlwrite("%%No such variable as '%s'", var); + return(FALSE); + } + + /* get the value for that variable */ + if (f == TRUE) + strcpy(value, itoa(n)); + else { + status = mlreply("Value: ", &value[0], NSTRING); + if (status != TRUE) + return(status); + } + + /* and set the appropriate value */ + status = svar(&vd, value); + +#if DEBUGM + /* if $debug == TRUE, every assignment will echo a statment to + that effect here. */ + + if (macbug) { + strcpy(outline, "((("); + + /* assignment status */ + strcat(outline, ltos(status)); + strcat(outline, ":"); + + /* variable name */ + strcat(outline, var); + strcat(outline, ":"); + + /* and lastly the value we tried to assign */ + strcat(outline, value); + strcat(outline, ")))"); + + /* expand '%' to "%%" so mlwrite wont bitch */ + sp = outline; + while (*sp) + if (*sp++ == '%') { + /* advance to the end */ + ep = --sp; + while (*ep++) + ; + /* null terminate the string one out */ + *(ep + 1) = 0; + /* copy backwards */ + while(ep-- > sp) + *(ep + 1) = *ep; + + /* and advance sp past the new % */ + sp += 2; + } + + /* write out the debug line */ + mlforce(outline); + update(TRUE); + + /* and get the keystroke to hold the output */ + if (get1key() == abortc) { + mlforce("(Macro aborted)"); + status = FALSE; + } + } +#endif + + /* and return it */ + return(status); +} + +findvar(var, vd, size) /* find a variables type and name */ + +char *var; /* name of var to get */ +VDESC *vd; /* structure to hold type and ptr */ +int size; /* size of var array */ + +{ + register int vnum; /* subscript in varable arrays */ + register int vtype; /* type to return */ + +fvar: vtype = -1; + switch (var[0]) { + + case '$': /* check for legal enviromnent var */ + for (vnum = 0; vnum < NEVARS; vnum++) + if (strcmp(&var[1], envars[vnum]) == 0) { + vtype = TKENV; + break; + } + break; + + case '%': /* check for existing legal user variable */ + for (vnum = 0; vnum < MAXVARS; vnum++) + if (strcmp(&var[1], uv[vnum].u_name) == 0) { + vtype = TKVAR; + break; + } + if (vnum < MAXVARS) + break; + + /* create a new one??? */ + for (vnum = 0; vnum < MAXVARS; vnum++) + if (uv[vnum].u_name[0] == 0) { + vtype = TKVAR; + strcpy(uv[vnum].u_name, &var[1]); + break; + } + break; + + case '&': /* indirect operator? */ + var[4] = 0; + if (strcmp(&var[1], "ind") == 0) { + /* grab token, and eval it */ + execstr = token(execstr, var, size); + strcpy(var, getval(var)); + goto fvar; + } + } + + /* return the results */ + vd->v_num = vnum; + vd->v_type = vtype; + return; +} + +int svar(var, value) /* set a variable */ + +VDESC *var; /* variable to set */ +char *value; /* value to set to */ + +{ + register int vnum; /* ordinal number of var refrenced */ + register int vtype; /* type of variable to set */ + register int status; /* status return */ + register int c; /* translated character */ + register char * sp; /* scratch string pointer */ + + /* simplify the vd structure (we are gonna look at it a lot) */ + vnum = var->v_num; + vtype = var->v_type; + + /* and set the appropriate value */ + status = TRUE; + switch (vtype) { + case TKVAR: /* set a user variable */ + if (uv[vnum].u_value != NULL) + free(uv[vnum].u_value); + sp = malloc(strlen(value) + 1); + if (sp == NULL) + return(FALSE); + strcpy(sp, value); + uv[vnum].u_value = sp; + break; + + case TKENV: /* set an environment variable */ + status = TRUE; /* by default */ + switch (vnum) { + case EVFILLCOL: fillcol = atoi(value); + break; + case EVPAGELEN: status = newsize(TRUE, atoi(value)); + break; + case EVCURCOL: status = setccol(atoi(value)); + break; + case EVCURLINE: status = gotoline(TRUE, atoi(value)); + break; + case EVRAM: break; + case EVFLICKER: flickcode = stol(value); + break; + case EVCURWIDTH:status = newwidth(TRUE, atoi(value)); + break; + case EVCBUFNAME:strcpy(curbp->b_bname, value); + curwp->w_flag |= WFMODE; + break; + case EVCFNAME: strcpy(curbp->b_fname, value); + curwp->w_flag |= WFMODE; + break; + case EVSRES: status = TTrez(value); + break; + case EVDEBUG: macbug = stol(value); + break; + case EVSTATUS: cmdstatus = stol(value); + break; + case EVPALETTE: strncpy(palstr, value, 48); + spal(palstr); + break; + case EVASAVE: gasave = atoi(value); + break; + case EVACOUNT: gacount = atoi(value); + break; + case EVLASTKEY: lastkey = atoi(value); + break; + case EVCURCHAR: ldelete(1L, FALSE); /* delete 1 char */ + c = atoi(value); + if (c == '\n') + lnewline(FALSE, 1); + else + linsert(1, c); + backchar(FALSE, 1); + break; + case EVDISCMD: discmd = stol(value); + break; + case EVVERSION: break; + case EVPROGNAME:break; + case EVSEED: seed = atoi(value); + break; + case EVDISINP: disinp = stol(value); + break; + case EVWLINE: status = resize(TRUE, atoi(value)); + break; + case EVCWLINE: status = forwline(TRUE, + atoi(value) - getwpos()); + break; + case EVTARGET: curgoal = atoi(value); + thisflag = saveflag; + break; + case EVSEARCH: strcpy(pat, value); + rvstrcpy(tap, pat); +#if MAGIC + mcclear(); +#endif + break; + case EVREPLACE: strcpy(rpat, value); + break; + case EVMATCH: break; + case EVKILL: break; + case EVCMODE: curbp->b_mode = atoi(value); + curwp->w_flag |= WFMODE; + break; + case EVGMODE: gmode = atoi(value); + break; + case EVTPAUSE: term.t_pause = atoi(value); + break; + case EVPENDING: break; + case EVLWIDTH: break; + case EVLINE: putctext(value); + case EVGFLAGS: gflags = atoi(value); + break; + case EVRVAL: break; + case EVTAB: tabmask = atoi(value)-1; + if (tabmask != 0x07 && tabmask != 0x03) + tabmask = 0x07; + curwp->w_flag |= WFHARD; + break; + case EVOVERLAP: overlap = atoi(value); + break; + case EVSCROLLCOUNT: + scrollcount = atoi(value); + break; + case EVSCROLL: +#if SCROLLCODE + if (! stol(value)) + term.t_scroll = NULL; +#endif + break; + } + break; + } + return(status); +} + +/* atoi: ascii string to integer......This is too + inconsistant to use the system's */ + +atoi(st) + +char *st; + +{ + int result; /* resulting number */ + int sign; /* sign of resulting number */ + char c; /* current char being examined */ + + result = 0; + sign = 1; + + /* skip preceding whitespace */ + while (*st == ' ' || *st == '\t') + ++st; + + /* check for sign */ + if (*st == '-') { + sign = -1; + ++st; + } + if (*st == '+') + ++st; + + /* scan digits, build value */ + while ((c = *st++)) + if (c >= '0' && c <= '9') + result = result * 10 + c - '0'; + else + return(0); + + return(result * sign); +} + +/* itoa: integer to ascii string.......... This is too + inconsistant to use the system's */ + +char *itoa(i) + +int i; /* integer to translate to a string */ + +{ + register int digit; /* current digit being used */ + register char *sp; /* pointer into result */ + register int sign; /* sign of resulting number */ + static char result[INTWIDTH+1]; /* resulting string */ + + /* record the sign...*/ + sign = 1; + if (i < 0) { + sign = -1; + i = -i; + } + + /* and build the string (backwards!) */ + sp = result + INTWIDTH; + *sp = 0; + do { + digit = i % 10; + *(--sp) = '0' + digit; /* and install the new digit */ + i = i / 10; + } while (i); + + /* and fix the sign */ + if (sign == -1) { + *(--sp) = '-'; /* and install the minus sign */ + } + + return(sp); +} + +int gettyp(token) /* find the type of a passed token */ + +char *token; /* token to analyze */ + +{ + register char c; /* first char in token */ + + /* grab the first char (this is all we need) */ + c = *token; + + /* no blanks!!! */ + if (c == 0) + return(TKNUL); + + /* a numeric literal? */ + if (c >= '0' && c <= '9') + return(TKLIT); + + switch (c) { + case '"': return(TKSTR); + + case '!': return(TKDIR); + case '@': return(TKARG); + case '#': return(TKBUF); + case '$': return(TKENV); + case '%': return(TKVAR); + case '&': return(TKFUN); + case '*': return(TKLBL); + + default: return(TKCMD); + } +} + +char *getval(token) /* find the value of a token */ + +char *token; /* token to evaluate */ + +{ + register int status; /* error return */ + register BUFFER *bp; /* temp buffer pointer */ + register int blen; /* length of buffer argument */ + register int distmp; /* temporary discmd flag */ + static char buf[NSTRING];/* string buffer for some returns */ + + switch (gettyp(token)) { + case TKNUL: return(""); + + case TKARG: /* interactive argument */ + strcpy(token, getval(&token[1])); + distmp = discmd; /* echo it always! */ + discmd = TRUE; + status = getstring(token, + buf, NSTRING, ctoec('\n')); + discmd = distmp; + if (status == ABORT) + return(errorm); + return(buf); + + case TKBUF: /* buffer contents fetch */ + + /* grab the right buffer */ + strcpy(token, getval(&token[1])); + bp = bfind(token, FALSE, 0); + if (bp == NULL) + return(errorm); + + /* if the buffer is displayed, get the window + vars instead of the buffer vars */ + if (bp->b_nwnd > 0) { + curbp->b_dotp = curwp->w_dotp; + curbp->b_doto = curwp->w_doto; + } + + /* make sure we are not at the end */ + if (bp->b_linep == bp->b_dotp) + return(errorm); + + /* grab the line as an argument */ + blen = bp->b_dotp->l_used - bp->b_doto; + if (blen > NSTRING) + blen = NSTRING; + strncpy(buf, bp->b_dotp->l_text + bp->b_doto, + blen); + buf[blen] = 0; + + /* and step the buffer's line ptr ahead a line */ + bp->b_dotp = bp->b_dotp->l_fp; + bp->b_doto = 0; + + /* if displayed buffer, reset window ptr vars*/ + if (bp->b_nwnd > 0) { + curwp->w_dotp = curbp->b_dotp; + curwp->w_doto = 0; + curwp->w_flag |= WFMOVE; + } + + /* and return the spoils */ + return(buf); + + case TKVAR: return(gtusr(token+1)); + case TKENV: return(gtenv(token+1)); + case TKFUN: return(gtfun(token+1)); + case TKDIR: return(errorm); + case TKLBL: return(errorm); + case TKLIT: return(token); + case TKSTR: return(token+1); + case TKCMD: return(token); + } +} + +int stol(val) /* convert a string to a numeric logical */ + +char *val; /* value to check for stol */ + +{ + /* check for logical values */ + if (val[0] == 'F') + return(FALSE); + if (val[0] == 'T') + return(TRUE); + + /* check for numeric truth (!= 0) */ + return((atoi(val) != 0)); +} + +char *ltos(val) /* numeric logical to string logical */ + +int val; /* value to translate */ + +{ + if (val) + return(truem); + else + return(falsem); +} + +char *mkupper(str) /* make a string upper case */ + +char *str; /* string to upper case */ + +{ + char *sp; + + sp = str; + while (*sp) { + if ('a' <= *sp && *sp <= 'z') + *sp += 'A' - 'a'; + ++sp; + } + return(str); +} + +char *mklower(str) /* make a string lower case */ + +char *str; /* string to lower case */ + +{ + char *sp; + + sp = str; + while (*sp) { + if ('A' <= *sp && *sp <= 'Z') + *sp += 'a' - 'A'; + ++sp; + } + return(str); +} + +int abs(x) /* take the absolute value of an integer */ + +int x; + +{ + return(x < 0 ? -x : x); +} + +int ernd() /* returns a random integer */ + +{ + seed = abs(seed * 1721 + 10007); + return(seed); +} + +int sindex(source, pattern) /* find pattern within source */ + +char *source; /* source string to search */ +char *pattern; /* string to look for */ + +{ + char *sp; /* ptr to current position to scan */ + char *csp; /* ptr to source string during comparison */ + char *cp; /* ptr to place to check for equality */ + + /* scanning through the source string */ + sp = source; + while (*sp) { + /* scan through the pattern */ + cp = pattern; + csp = sp; + while (*cp) { + if (!eq(*cp, *csp)) + break; + ++cp; + ++csp; + } + + /* was it a match? */ + if (*cp == 0) + return((int)(sp - source) + 1); + ++sp; + } + + /* no match at all.. */ + return(0); +} + +/* Filter a string through a translation table */ + +char *xlat(source, lookup, trans) + +char *source; /* string to filter */ +char *lookup; /* characters to translate */ +char *trans; /* resulting translated characters */ + +{ + register char *sp; /* pointer into source table */ + register char *lp; /* pointer into lookup table */ + register char *rp; /* pointer into result */ + static char result[NSTRING]; /* temporary result */ + + /* scan source string */ + sp = source; + rp = result; + while (*sp) { + /* scan lookup table for a match */ + lp = lookup; + while (*lp) { + if (*sp == *lp) { + *rp++ = trans[lp - lookup]; + goto xnext; + } + ++lp; + } + + /* no match, copy in the source char untranslated */ + *rp++ = *sp; + +xnext: ++sp; + } + + /* terminate and return the result */ + *rp = 0; + return(result); +} diff --git a/evar.h b/evar.h new file mode 100644 index 0000000..d4c0919 --- /dev/null +++ b/evar.h @@ -0,0 +1,212 @@ +/* EVAR.H + * + * Environment and user variable definitions + * + * written 1986 by Daniel Lawrence + * modified by Petri Kutvonen + */ + +/* structure to hold user variables and their definitions */ + +typedef struct UVAR { + char u_name[NVSIZE + 1]; /* name of user variable */ + char *u_value; /* value (string) */ +} UVAR; + +/* current user variables (This structure will probably change) */ + +#define MAXVARS 255 + +UVAR uv[MAXVARS + 1]; /* user variables */ + +/* list of recognized environment variables */ + +char *envars[] = { + "fillcol", /* current fill column */ + "pagelen", /* number of lines used by editor */ + "curcol", /* current column pos of cursor */ + "curline", /* current line in file */ + "ram", /* ram in use by malloc */ + "flicker", /* flicker supression */ + "curwidth", /* current screen width */ + "cbufname", /* current buffer name */ + "cfname", /* current file name */ + "sres", /* current screen resolution */ + "debug", /* macro debugging */ + "status", /* returns the status of the last command */ + "palette", /* current palette string */ + "asave", /* # of chars between auto-saves */ + "acount", /* # of chars until next auto-save */ + "lastkey", /* last keyboard char struck */ + "curchar", /* current character under the cursor */ + "discmd", /* display commands on command line */ + "version", /* current version number */ + "progname", /* returns current prog name - "MicroEMACS" */ + "seed", /* current random number seed */ + "disinp", /* display command line input characters */ + "wline", /* # of lines in current window */ + "cwline", /* current screen line in window */ + "target", /* target for line moves */ + "search", /* search pattern */ + "replace", /* replacement pattern */ + "match", /* last matched magic pattern */ + "kill", /* kill buffer (read only) */ + "cmode", /* mode of current buffer */ + "gmode", /* global modes */ + "tpause", /* length to pause for paren matching */ + "pending", /* type ahead pending flag */ + "lwidth", /* width of current line */ + "line", /* text of current line */ + "gflags", /* global internal emacs flags */ + "rval", /* child process return value */ + "tab", /* tab 4 or 8 */ + "overlap", + "jump", +#if SCROLLCODE + "scroll", /* scroll enabled */ +#endif +}; + +#define NEVARS sizeof(envars) / sizeof(char *) + +/* and its preprocesor definitions */ + +#define EVFILLCOL 0 +#define EVPAGELEN 1 +#define EVCURCOL 2 +#define EVCURLINE 3 +#define EVRAM 4 +#define EVFLICKER 5 +#define EVCURWIDTH 6 +#define EVCBUFNAME 7 +#define EVCFNAME 8 +#define EVSRES 9 +#define EVDEBUG 10 +#define EVSTATUS 11 +#define EVPALETTE 12 +#define EVASAVE 13 +#define EVACOUNT 14 +#define EVLASTKEY 15 +#define EVCURCHAR 16 +#define EVDISCMD 17 +#define EVVERSION 18 +#define EVPROGNAME 19 +#define EVSEED 20 +#define EVDISINP 21 +#define EVWLINE 22 +#define EVCWLINE 23 +#define EVTARGET 24 +#define EVSEARCH 25 +#define EVREPLACE 26 +#define EVMATCH 27 +#define EVKILL 28 +#define EVCMODE 29 +#define EVGMODE 30 +#define EVTPAUSE 31 +#define EVPENDING 32 +#define EVLWIDTH 33 +#define EVLINE 34 +#define EVGFLAGS 35 +#define EVRVAL 36 +#define EVTAB 37 +#define EVOVERLAP 38 +#define EVSCROLLCOUNT 39 +#define EVSCROLL 40 + +/* list of recognized user functions */ + +typedef struct UFUNC { + char *f_name; /* name of function */ + int f_type; /* 1 = monamic, 2 = dynamic */ +} UFUNC; + +#define NILNAMIC 0 +#define MONAMIC 1 +#define DYNAMIC 2 +#define TRINAMIC 3 + +UFUNC funcs[] = { + "add", DYNAMIC, /* add two numbers together */ + "sub", DYNAMIC, /* subtraction */ + "tim", DYNAMIC, /* multiplication */ + "div", DYNAMIC, /* division */ + "mod", DYNAMIC, /* mod */ + "neg", MONAMIC, /* negate */ + "cat", DYNAMIC, /* concatinate string */ + "lef", DYNAMIC, /* left string(string, len) */ + "rig", DYNAMIC, /* right string(string, pos) */ + "mid", TRINAMIC, /* mid string(string, pos, len) */ + "not", MONAMIC, /* logical not */ + "equ", DYNAMIC, /* logical equality check */ + "les", DYNAMIC, /* logical less than */ + "gre", DYNAMIC, /* logical greater than */ + "seq", DYNAMIC, /* string logical equality check */ + "sle", DYNAMIC, /* string logical less than */ + "sgr", DYNAMIC, /* string logical greater than */ + "ind", MONAMIC, /* evaluate indirect value */ + "and", DYNAMIC, /* logical and */ + "or", DYNAMIC, /* logical or */ + "len", MONAMIC, /* string length */ + "upp", MONAMIC, /* uppercase string */ + "low", MONAMIC, /* lower case string */ + "tru", MONAMIC, /* Truth of the universe logical test */ + "asc", MONAMIC, /* char to integer conversion */ + "chr", MONAMIC, /* integer to char conversion */ + "gtk", NILNAMIC, /* get 1 charater */ + "rnd", MONAMIC, /* get a random number */ + "abs", MONAMIC, /* absolute value of a number */ + "sin", DYNAMIC, /* find the index of one string in another */ + "env", MONAMIC, /* retrieve a system environment var */ + "bin", MONAMIC, /* loopup what function name is bound to a key */ + "exi", MONAMIC, /* check if a file exists */ + "fin", MONAMIC, /* look for a file on the path... */ + "ban", DYNAMIC, /* bitwise and 9-10-87 jwm */ + "bor", DYNAMIC, /* bitwise or 9-10-87 jwm */ + "bxo", DYNAMIC, /* bitwise xor 9-10-87 jwm */ + "bno", MONAMIC, /* bitwise not */ + "xla", TRINAMIC, /* XLATE character string translation */ +}; + +#define NFUNCS sizeof(funcs) / sizeof(UFUNC) + +/* and its preprocesor definitions */ + +#define UFADD 0 +#define UFSUB 1 +#define UFTIMES 2 +#define UFDIV 3 +#define UFMOD 4 +#define UFNEG 5 +#define UFCAT 6 +#define UFLEFT 7 +#define UFRIGHT 8 +#define UFMID 9 +#define UFNOT 10 +#define UFEQUAL 11 +#define UFLESS 12 +#define UFGREATER 13 +#define UFSEQUAL 14 +#define UFSLESS 15 +#define UFSGREAT 16 +#define UFIND 17 +#define UFAND 18 +#define UFOR 19 +#define UFLENGTH 20 +#define UFUPPER 21 +#define UFLOWER 22 +#define UFTRUTH 23 +#define UFASCII 24 +#define UFCHR 25 +#define UFGTKEY 26 +#define UFRND 27 +#define UFABS 28 +#define UFSINDEX 29 +#define UFENV 30 +#define UFBIND 31 +#define UFEXIST 32 +#define UFFIND 33 +#define UFBAND 34 +#define UFBOR 35 +#define UFBXOR 36 +#define UFBNOT 37 +#define UFXLATE 38 diff --git a/exec.c b/exec.c new file mode 100644 index 0000000..4003462 --- /dev/null +++ b/exec.c @@ -0,0 +1,1148 @@ +/* EXEC.C + * + * This file is for functions dealing with execution of + * commands, command lines, buffers, files and startup files + * + * written 1986 by Daniel Lawrence + * modified by Petri Kutvonen + */ + +#include +#include "estruct.h" +#include "edef.h" + +/* namedcmd: execute a named command even if it is not bound */ + +namedcmd(f, n) + +int f, n; /* command arguments [passed through to command executed] */ + +{ + register int (*kfunc)(); /* ptr to the requexted function to bind to */ + int (*getname())(); + + /* prompt the user to type a named command */ + mlwrite(": "); + + /* and now get the function name to execute */ + kfunc = getname(); + if (kfunc == NULL) { + mlwrite("(No such function)"); + return(FALSE); + } + + /* and then execute the command */ + return((*kfunc)(f, n)); +} + +/* execcmd: Execute a command line command to be typed in + by the user */ + +execcmd(f, n) + +int f, n; /* default Flag and Numeric argument */ + +{ + register int status; /* status return */ + char cmdstr[NSTRING]; /* string holding command to execute */ + + /* get the line wanted */ + if ((status = mlreply(": ", cmdstr, NSTRING)) != TRUE) + return(status); + + execlevel = 0; + return(docmd(cmdstr)); +} + +/* docmd: take a passed string as a command line and translate + it to be executed as a command. This function will be + used by execute-command-line and by all source and + startup files. Lastflag/thisflag is also updated. + + format of the command line is: + + {# arg} {} + +*/ + +docmd(cline) + +char *cline; /* command line to execute */ + +{ + register int f; /* default argument flag */ + register int n; /* numeric repeat value */ + int (*fnc)(); /* function to execute */ + int status; /* return status of function */ + int oldcle; /* old contents of clexec flag */ + char *oldestr; /* original exec string */ + char tkn[NSTRING]; /* next token off of command line */ + int (*fncmatch())(); + + /* if we are scanning and not executing..go back here */ + if (execlevel) + return(TRUE); + + oldestr = execstr; /* save last ptr to string to execute */ + execstr = cline; /* and set this one as current */ + + /* first set up the default command values */ + f = FALSE; + n = 1; + lastflag = thisflag; + thisflag = 0; + + if ((status = macarg(tkn)) != TRUE) { /* and grab the first token */ + execstr = oldestr; + return(status); + } + + /* process leadin argument */ + if (gettyp(tkn) != TKCMD) { + f = TRUE; + strcpy(tkn, getval(tkn)); + n = atoi(tkn); + + /* and now get the command to execute */ + if ((status = macarg(tkn)) != TRUE) { + execstr = oldestr; + return(status); + } + } + + /* and match the token to see if it exists */ + if ((fnc = fncmatch(tkn)) == NULL) { + mlwrite("(No such Function)"); + execstr = oldestr; + return(FALSE); + } + + /* save the arguments and go execute the command */ + oldcle = clexec; /* save old clexec flag */ + clexec = TRUE; /* in cline execution */ + status = (*fnc)(f, n); /* call the function */ + cmdstatus = status; /* save the status */ + clexec = oldcle; /* restore clexec flag */ + execstr = oldestr; + return(status); +} + +/* token: chop a token off a string + return a pointer past the token +*/ + +char *token(src, tok, size) + +char *src, *tok; /* source string, destination token string */ +int size; /* maximum size of token */ + +{ + register int quotef; /* is the current string quoted? */ + register char c; /* temporary character */ + + /* first scan past any whitespace in the source string */ + while (*src == ' ' || *src == '\t') + ++src; + + /* scan through the source string */ + quotef = FALSE; + while (*src) { + /* process special characters */ + if (*src == '~') { + ++src; + if (*src == 0) + break; + switch (*src++) { + case 'r': c = 13; break; + case 'n': c = 10; break; + case 't': c = 9; break; + case 'b': c = 8; break; + case 'f': c = 12; break; + default: c = *(src-1); + } + if (--size > 0) { + *tok++ = c; + } + } else { + /* check for the end of the token */ + if (quotef) { + if (*src == '"') + break; + } else { + if (*src == ' ' || *src == '\t') + break; + } + + /* set quote mode if quote found */ + if (*src == '"') + quotef = TRUE; + + /* record the character */ + c = *src++; + if (--size > 0) + *tok++ = c; + } + } + + /* terminate the token and exit */ + if (*src) + ++src; + *tok = 0; + return(src); +} + +macarg(tok) /* get a macro line argument */ + +char *tok; /* buffer to place argument */ + +{ + int savcle; /* buffer to store original clexec */ + int status; + + savcle = clexec; /* save execution mode */ + clexec = TRUE; /* get the argument */ + status = nextarg("", tok, NSTRING, ctoec('\n')); + clexec = savcle; /* restore execution mode */ + return(status); +} + +/* nextarg: get the next argument */ + +nextarg(prompt, buffer, size, terminator) + +char *prompt; /* prompt to use if we must be interactive */ +char *buffer; /* buffer to put token into */ +int size; /* size of the buffer */ +int terminator; /* terminating char to be used on interactive fetch */ + +{ + /* if we are interactive, go get it! */ + if (clexec == FALSE) + return(getstring(prompt, buffer, size, terminator)); + + /* grab token and advance past */ + execstr = token(execstr, buffer, size); + + /* evaluate it */ + strcpy(buffer, getval(buffer)); + return(TRUE); +} + +/* storemac: Set up a macro buffer and flag to store all + executed command lines there */ + +storemac(f, n) + +int f; /* default flag */ +int n; /* macro number to use */ + +{ + register struct BUFFER *bp; /* pointer to macro buffer */ + char bname[NBUFN]; /* name of buffer to use */ + + /* must have a numeric argument to this function */ + if (f == FALSE) { + mlwrite("No macro specified"); + return(FALSE); + } + + /* range check the macro number */ + if (n < 1 || n > 40) { + mlwrite("Macro number out of range"); + return(FALSE); + } + + /* construct the macro buffer name */ + strcpy(bname, "*Macro xx*"); + bname[7] = '0' + (n / 10); + bname[8] = '0' + (n % 10); + + /* set up the new macro buffer */ + if ((bp = bfind(bname, TRUE, BFINVS)) == NULL) { + mlwrite("Can not create macro"); + return(FALSE); + } + + /* and make sure it is empty */ + bclear(bp); + + /* and set the macro store pointers to it */ + mstore = TRUE; + bstore = bp; + return(TRUE); +} + +#if PROC +/* storeproc: Set up a procedure buffer and flag to store all + executed command lines there */ + +storeproc(f, n) + +int f; /* default flag */ +int n; /* macro number to use */ + +{ + register struct BUFFER *bp; /* pointer to macro buffer */ + register int status; /* return status */ + char bname[NBUFN]; /* name of buffer to use */ + + /* a numeric argument means its a numbered macro */ + if (f == TRUE) + return(storemac(f, n)); + + /* get the name of the procedure */ + if ((status = mlreply("Procedure name: ", &bname[1], NBUFN-2)) != TRUE) + return(status); + + /* construct the macro buffer name */ + bname[0] = '*'; + strcat(bname, "*"); + + /* set up the new macro buffer */ + if ((bp = bfind(bname, TRUE, BFINVS)) == NULL) { + mlwrite("Can not create macro"); + return(FALSE); + } + + /* and make sure it is empty */ + bclear(bp); + + /* and set the macro store pointers to it */ + mstore = TRUE; + bstore = bp; + return(TRUE); +} + +/* execproc: Execute a procedure */ + +execproc(f, n) + +int f, n; /* default flag and numeric arg */ + +{ + register BUFFER *bp; /* ptr to buffer to execute */ + register int status; /* status return */ + char bufn[NBUFN+2]; /* name of buffer to execute */ + + /* find out what buffer the user wants to execute */ + if ((status = mlreply("Execute procedure: ", &bufn[1], NBUFN)) != TRUE) + return(status); + + /* construct the buffer name */ + bufn[0] = '*'; + strcat(bufn, "*"); + + /* find the pointer to that buffer */ + if ((bp=bfind(bufn, FALSE, 0)) == NULL) { + mlwrite("No such procedure"); + return(FALSE); + } + + /* and now execute it as asked */ + while (n-- > 0) + if ((status = dobuf(bp)) != TRUE) + return(status); + return(TRUE); +} +#endif + +/* execbuf: Execute the contents of a buffer of commands */ + +execbuf(f, n) + +int f, n; /* default flag and numeric arg */ + +{ + register BUFFER *bp; /* ptr to buffer to execute */ + register int status; /* status return */ + char bufn[NSTRING]; /* name of buffer to execute */ + + /* find out what buffer the user wants to execute */ + if ((status = mlreply("Execute buffer: ", bufn, NBUFN)) != TRUE) + return(status); + + /* find the pointer to that buffer */ + if ((bp=bfind(bufn, FALSE, 0)) == NULL) { + mlwrite("No such buffer"); + return(FALSE); + } + + /* and now execute it as asked */ + while (n-- > 0) + if ((status = dobuf(bp)) != TRUE) + return(status); + return(TRUE); +} + +/* dobuf: execute the contents of the buffer pointed to + by the passed BP + + Directives start with a "!" and include: + + !endm End a macro + !if (cond) conditional execution + !else + !endif + !return Return (terminating current macro) + !goto