home *** CD-ROM | disk | FTP | other *** search
Text File | 1992-08-09 | 90.5 KB | 3,132 lines |
- *** ../orig/bind.c Mon Jul 27 21:51:43 1992
- --- bind.c Mon Jul 27 21:54:31 1992
- ***************
- *** 383,389 ****
- char outseq[80]; /* output buffer for keystroke sequence */
-
- /* get a buffer for the binding list */
- ! listbuf = bfind(TEXT21, TRUE, 0);
- /* "Binding list" */
- if (listbuf == NULL || bclear(listbuf) == FALSE) {
- mlwrite(TEXT22);
- --- 383,389 ----
- char outseq[80]; /* output buffer for keystroke sequence */
-
- /* get a buffer for the binding list */
- ! listbuf = bfind(TEXT21, TRUE, BFINVS);
- /* "Binding list" */
- if (listbuf == NULL || bclear(listbuf) == FALSE) {
- mlwrite(TEXT22);
- ***************
- *** 996,1002 ****
- #if PROTO
- int setkey(KEYTAB *key, char *name)
- #else
- ! setkey(key, type, name)
-
- KEYTAB *key; /* ptr to key to set */
- char *name; /* name of function or buffer */
- --- 996,1002 ----
- #if PROTO
- int setkey(KEYTAB *key, char *name)
- #else
- ! setkey(key, name)
-
- KEYTAB *key; /* ptr to key to set */
- char *name; /* name of function or buffer */
- *** ../orig/buffer.c Mon Jul 27 21:51:43 1992
- --- buffer.c Mon Jul 27 21:54:32 1992
- ***************
- *** 33,39 ****
- if (!bp)
- return(ABORT);
-
- ! /* make it invisable if there is an argument */
- if (f == TRUE)
- bp->b_flag |= BFINVS;
-
- --- 33,39 ----
- if (!bp)
- return(ABORT);
-
- ! /* make it invisible if there is an argument */
- if (f == TRUE)
- bp->b_flag |= BFINVS;
-
- ***************
- *** 178,183 ****
- --- 178,187 ----
- if (bp == NULL)
- return(ABORT);
-
- + /* make it invisible if there is an argument */
- + if (f == TRUE)
- + bp->b_flag |= BFINVS;
- +
- return(pop(bp));
- }
-
- ***************
- *** 278,284 ****
-
- /* Build and popup a buffer containing the list of all buffers.
- Bound to "C-X C-B". A numeric argument forces it to list
- ! invisable buffers as well.
- */
-
- PASCAL NEAR listbuffers(f, n)
- --- 282,288 ----
-
- /* Build and popup a buffer containing the list of all buffers.
- Bound to "C-X C-B". A numeric argument forces it to list
- ! invisible buffers as well.
- */
-
- PASCAL NEAR listbuffers(f, n)
- ***************
- *** 348,354 ****
-
- /* 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;
- --- 352,358 ----
-
- /* output the list of buffers */
- while (bp != NULL) {
- ! /* skip invisible buffers if iflag is false */
- if (((bp->b_flag&BFINVS) != 0) && (iflag != TRUE)) {
- bp = bp->b_bufp;
- continue;
- *** ../orig/char.c Mon Jul 27 21:51:43 1992
- --- char.c Mon Jul 27 21:54:33 1992
- ***************
- *** 95,103 ****
- }
-
- #if PROTO
- ! char PASCAL NEAR upperc(char ch) /* return the upper case equivalant of a character */
- #else
- ! char PASCAL NEAR upperc(ch) /* return the upper case equivalant of a character */
-
- char ch; /* character to get uppercase euivalant of */
- #endif
- --- 95,103 ----
- }
-
- #if PROTO
- ! int PASCAL NEAR upperc(char ch) /* return the upper case equivalant of a character */
- #else
- ! int PASCAL NEAR upperc(ch) /* return the upper case equivalant of a character */
-
- char ch; /* character to get uppercase euivalant of */
- #endif
- *** ../orig/display.c Mon Jul 27 21:51:44 1992
- --- display.c Mon Jul 27 21:54:36 1992
- ***************
- *** 693,699 ****
-
- /* set up to scan pop up buffer */
- lp = lforw(popbuf->b_linep);
- ! mlerase();
- numlines = term.t_nrow-2;
- cline = 0;
-
- --- 693,699 ----
-
- /* set up to scan pop up buffer */
- lp = lforw(popbuf->b_linep);
- ! /* mlerase(); do we really need this? */
- numlines = term.t_nrow-2;
- cline = 0;
-
- ***************
- *** 1024,1030 ****
- 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 */
-
- /* don't bother if there is none! */
- if (modeflag == FALSE)
- --- 1024,1031 ----
- 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 */
- ! char time[6]; /* to hold current time */
-
- /* don't bother if there is none! */
- if (modeflag == FALSE)
- ***************
- *** 1085,1090 ****
- --- 1086,1106 ----
- strcat(tline, VERSION);
- strcat(tline, " ");
-
- + /* display the time on the bottom most modeline if active */
- + if (timeflag && wp->w_wndp == (WINDOW *)NULL) {
- +
- + /* get the current time/date string */
- + getdtime(time);
- + if (strcmp(time, "") != 0) {
- +
- + /* append the hour/min string */
- + strcat(tline, "[");
- + strcat(tline, time);
- + strcat(tline, "] ");
- + strcpy(lasttime, time);
- + }
- + }
- +
- /* are we horizontally scrolled? */
- if (wp->w_fcol > 0) {
- strcat(tline, "[<");
- ***************
- *** 1092,1097 ****
- --- 1108,1123 ----
- strcat(tline, "]");
- }
-
- + /* display the point position in buffer if on current modeline */
- + if (posflag && wp == curwp) {
- +
- + strcat(tline, "L:");
- + strcat(tline, int_asc(getlinenum(bp, wp->w_dotp)));
- + strcat(tline, " C:");
- + strcat(tline, int_asc(getccol(FALSE)));
- + strcat(tline, " ");
- + }
- +
- /* display the modes */
- strcat(tline, "(");
- firstm = TRUE;
- ***************
- *** 1166,1172 ****
- }
- }
-
- ! PASCAL NEAR upmode() /* update all the mode lines */
-
- {
- register WINDOW *wp;
- --- 1192,1216 ----
- }
- }
-
- ! VOID PASCAL NEAR getdtime(ts) /* get the current display time string */
- !
- ! char *ts;
- !
- ! {
- ! char buf[80];
- !
- ! strcpy(buf, timeset());
- ! if (strcmp(buf, errorm) == 0) {
- ! *ts = 0;
- ! return;
- ! }
- !
- ! buf[16] = 0;
- ! strcpy(ts, &buf[11]);
- ! return;
- ! }
- !
- ! VOID PASCAL NEAR upmode() /* update all the mode lines */
-
- {
- register WINDOW *wp;
- ***************
- *** 1178,1184 ****
- }
- }
-
- ! PASCAL NEAR upwind() /* force hard updates on all windows */
-
- {
- register WINDOW *wp;
- --- 1222,1228 ----
- }
- }
-
- ! VOID PASCAL NEAR upwind() /* force hard updates on all windows */
-
- {
- register WINDOW *wp;
- ***************
- *** 1213,1219 ****
- * immediately; the terminal buffer is flushed via a call to the flusher.
- */
-
- ! PASCAL NEAR mlferase()
-
- {
- register int save_discmd;
- --- 1257,1263 ----
- * immediately; the terminal buffer is flushed via a call to the flusher.
- */
-
- ! VOID PASCAL NEAR mlferase()
-
- {
- register int save_discmd;
- ***************
- *** 1224,1230 ****
- discmd = save_discmd;;
- }
-
- ! PASCAL NEAR mlerase()
-
- {
- int i;
- --- 1268,1274 ----
- discmd = save_discmd;;
- }
-
- ! VOID PASCAL NEAR mlerase()
-
- {
- int i;
- *** ../orig/dolock.c Mon Jul 27 21:51:44 1992
- --- dolock.c Mon Jul 27 21:54:37 1992
- ***************
- *** 53,59 ****
- }
- #endif
-
- ! #if FILOCK && (MSDOS || OS2 || SUN)
- #if OS2 || (MSDOS && MSC)
- #include <sys/types.h>
- #endif
- --- 53,59 ----
- }
- #endif
-
- ! #if FILOCK && (MSDOS || OS2 || SUN || USG || V7 || BSD)
- #if OS2 || (MSDOS && MSC)
- #include <sys/types.h>
- #endif
- ***************
- *** 71,77 ****
- --- 71,79 ----
- #if ZTC
- extern volatile int errno;
- #else
- + #if MSC == 0
- extern int errno;
- + #endif
- #endif
- #endif
-
- *** ../orig/dutch.h Mon Jul 27 21:51:44 1992
- --- dutch.h Mon Jul 27 21:55:31 1992
- ***************
- *** 235,238 ****
- #define TEXT225 "[Switched to screen %s]"
- #define TEXT226 "%%Can not kill an executing buffer"
- #define TEXT227 "\n--- Press any key to Continue ---"
- !
- --- 235,238 ----
- #define TEXT225 "[Switched to screen %s]"
- #define TEXT226 "%%Can not kill an executing buffer"
- #define TEXT227 "\n--- Press any key to Continue ---"
- ! #define TEXT228 "[Kill ring cleared]"
- *** ../orig/ebind.h Mon Jul 27 21:51:44 1992
- --- ebind.h Mon Jul 27 21:55:32 1992
- ***************
- *** 94,99 ****
- --- 94,100 ----
- #endif
- {CTLX|'W', BINDFNC, resize},
- {CTLX|'X', BINDFNC, nextbuffer},
- + {CTLX|'Y', BINDFNC, cycle_ring},
- {CTLX|'Z', BINDFNC, enlargewind},
- {META|CTRL|'C', BINDFNC, wordcount},
- {META|CTRL|'E', BINDFNC, execproc},
- ***************
- *** 109,114 ****
- --- 110,116 ----
- {META|CTRL|'V', BINDFNC, nextdown},
- {META|CTRL|'W', BINDFNC, killpara},
- {META|CTRL|'X', BINDFNC, execcmd},
- + {META|CTRL|'Y', BINDFNC, clear_ring},
- {META|CTRL|'Z', BINDFNC, nextup},
- {META|' ', BINDFNC, setmark},
- {META|'?', BINDFNC, help},
- ***************
- *** 142,147 ****
- --- 144,150 ----
- {META|'V', BINDFNC, backpage},
- {META|'W', BINDFNC, copyregion},
- {META|'X', BINDFNC, namedcmd},
- + {META|'Y', BINDFNC, yank_pop},
- {META|'Z', BINDFNC, quickexit},
- {META|CTRL|'?', BINDFNC, delbword},
-
- *** ../orig/edef.h Mon Jul 27 21:51:44 1992
- --- edef.h Mon Jul 27 21:55:33 1992
- ***************
- *** 47,53 ****
- --- 47,56 ----
- NOSHARE int DNEAR discmd = TRUE; /* display command flag */
- NOSHARE int DNEAR disinp = TRUE; /* display input characters */
- NOSHARE int DNEAR modeflag = TRUE; /* display modelines flag */
- + NOSHARE int DNEAR timeflag = FALSE; /* display time */
- + NOSHARE char DNEAR lasttime[6] = ""; /* last time string displayed */
- NOSHARE int DNEAR popflag = TRUE; /* pop-up windows enabled? */
- + NOSHARE int DNEAR posflag = TRUE; /* display point position */
- NOSHARE int cpending = FALSE; /* input character pending? */
- NOSHARE int charpending; /* character pushed back */
- NOSHARE int DNEAR sscroll = FALSE; /* smooth scrolling enabled flag*/
- ***************
- *** 81,90 ****
- "GRAY", "LRED", "LGREEN", "LYELLOW", "LBLUE",
- "LMAGENTA", "LCYAN", "WHITE"};
-
- ! NOSHARE KILL *kbufp = NULL; /* current kill buffer chunk pointer*/
- ! NOSHARE KILL *kbufh = NULL; /* kill buffer header pointer */
- ! NOSHARE int kskip = 0; /* # of bytes to skip in 1st kill chunk */
- ! NOSHARE int kused = KBLOCK; /* # of bytes used in last kill chunk*/
- NOSHARE WINDOW *swindow = NULL; /* saved window pointer */
- NOSHARE int cryptflag = FALSE; /* currently encrypting? */
- NOSHARE int oldcrypt = FALSE; /* using old(broken) encryption? */
- --- 84,94 ----
- "GRAY", "LRED", "LGREEN", "LYELLOW", "LBLUE",
- "LMAGENTA", "LCYAN", "WHITE"};
-
- ! NOSHARE int kill_index; /* current index into kill ring */
- ! NOSHARE KILL *kbufp[NRING]; /* current kill buffer chunk pointer*/
- ! NOSHARE KILL *kbufh[NRING]; /* kill buffer header pointer */
- ! NOSHARE int kskip[NRING]; /* # of bytes to skip in 1st kill chunk */
- ! NOSHARE int kused[NRING]; /* # of bytes used in last kill chunk*/
- NOSHARE WINDOW *swindow = NULL; /* saved window pointer */
- NOSHARE int cryptflag = FALSE; /* currently encrypting? */
- NOSHARE int oldcrypt = FALSE; /* using old(broken) encryption? */
- ***************
- *** 150,158 ****
- NOSHARE KEYTAB exbhook; /* executed when exiting a buffer */
- NOSHARE KEYTAB bufhook; /* executed when entering a buffer */
-
- ! /* The variable patmatch holds the
- ! string that satisfies the search command.
- ! */
- NOSHARE char *patmatch = NULL;
-
- #if MAGIC
- --- 154,167 ----
- NOSHARE KEYTAB exbhook; /* executed when exiting a buffer */
- NOSHARE KEYTAB bufhook; /* executed when entering a buffer */
-
- ! /* The variables matchline and matchoff hold the line
- ! * and offset position of the *start* of the match.
- ! * The variable patmatch holds the string that satisfies
- ! * the search command.
- ! */
- ! NOSHARE int matchlen;
- ! NOSHARE int matchoff;
- ! NOSHARE LINE *matchline;
- NOSHARE char *patmatch = NULL;
-
- #if MAGIC
- ***************
- *** 235,241 ****
- --- 244,253 ----
- NOSHARE extern int DNEAR discmd; /* display command flag */
- NOSHARE extern int DNEAR disinp; /* display input characters */
- NOSHARE extern int DNEAR modeflag; /* display modelines flag */
- + NOSHARE extern int DNEAR timeflag; /* display time */
- + NOSHARE extern char DNEAR lasttime[]; /* last time string displayed */
- NOSHARE extern int DNEAR popflag; /* pop-up windows enabled? */
- + NOSHARE extern int DNEAR posflag; /* display point position */
- NOSHARE extern int cpending; /* input character pending? */
- NOSHARE extern int charpending; /* character pushed back */
- NOSHARE extern int DNEAR sscroll; /* smooth scrolling enabled flag*/
- ***************
- *** 265,274 ****
- NOSHARE extern int DNEAR quotec; /* quote char during mlreply() */
- NOSHARE extern CONST char *cname[]; /* names of colors */
-
- ! NOSHARE extern KILL *kbufp; /* current kill buffer chunk pointer */
- ! NOSHARE extern KILL *kbufh; /* kill buffer header pointer */
- ! NOSHARE extern int kskip; /* # of bytes to skip in 1st kill chunk */
- ! NOSHARE extern int kused; /* # of bytes used in kill buffer*/
- NOSHARE extern WINDOW *swindow; /* saved window pointer */
- NOSHARE extern int cryptflag; /* currently encrypting? */
- NOSHARE extern int oldcrypt; /* using old(broken) encryption? */
- --- 277,287 ----
- NOSHARE extern int DNEAR quotec; /* quote char during mlreply() */
- NOSHARE extern CONST char *cname[]; /* names of colors */
-
- ! NOSHARE extern int kill_index; /* current index into kill ring */
- ! NOSHARE extern KILL *kbufp[]; /* current kill buffer chunk pointer */
- ! NOSHARE extern KILL *kbufh[]; /* kill buffer header pointer */
- ! NOSHARE extern int kskip[]; /* # of bytes to skip in 1st kill chunk */
- ! NOSHARE extern int kused[]; /* # of bytes used in kill buffer*/
- NOSHARE extern WINDOW *swindow; /* saved window pointer */
- NOSHARE extern int cryptflag; /* currently encrypting? */
- NOSHARE extern int oldcrypt; /* using old(broken) encryption? */
- ***************
- *** 334,339 ****
- --- 347,355 ----
- NOSHARE extern KEYTAB exbhook; /* executed when exiting a buffer */
- NOSHARE extern KEYTAB bufhook; /* executed when entering a buffer */
-
- + NOSHARE extern int matchlen;
- + NOSHARE extern int matchoff;
- + NOSHARE extern LINE *matchline;
- NOSHARE extern char *patmatch;
-
- #if MAGIC
- *** ../orig/efunc.h Mon Jul 27 21:51:45 1992
- --- efunc.h Mon Jul 27 21:55:34 1992
- ***************
- *** 45,53 ****
- --- 45,55 ----
- {"count-words", wordcount},
- {"ctlx-prefix", cex},
- {"cycle-screens", cycle_screens},
- + {"cycle-ring", cycle_ring},
- {"delete-blank-lines", deblank},
- {"delete-buffer", killbuffer},
- {"delete-global-mode", delgmode},
- + {"delete-kill-ring", clear_ring},
- {"delete-mode", delmode},
- {"delete-next-character", forwdel},
- {"delete-next-word", delfword},
- ***************
- *** 241,246 ****
- --- 243,249 ----
- {"write-file", filewrite},
- {"write-message", writemsg},
- {"yank", yank},
- + {"yank-pop", yank_pop},
-
- {"", NULL}
- };
- *** ../orig/english.h Mon Jul 27 21:51:45 1992
- --- english.h Mon Jul 27 21:55:35 1992
- ***************
- *** 230,233 ****
- --- 230,234 ----
- #define TEXT224 "%%Row origin out of range"
- #define TEXT225 "[Switched to screen %s]"
- #define TEXT226 "%%Can not kill an executing buffer"
- + #define TEXT228 "[Kill ring cleared]"
- #define TEXT227 "\n--- Press any key to Continue ---"
- *** ../orig/epath.h Mon Jul 27 21:51:45 1992
- --- epath.h Mon Jul 27 21:55:35 1992
- ***************
- *** 12,21 ****
- ".emacsrc",
- "emacs.hlp",
- "",
- ! "sys:c/",
- ! "sys:t/",
- ! "sys:s/",
- ! "c:/",
- ":t/",
- ":s/"
- };
- --- 12,18 ----
- ".emacsrc",
- "emacs.hlp",
- "",
- ! "c:",
- ":t/",
- ":s/"
- };
- *** ../orig/eproto.h Mon Jul 27 21:51:45 1992
- --- eproto.h Mon Jul 27 21:55:37 1992
- ***************
- *** 62,69 ****
- extern char *undolock(char *fname);
- extern char *PASCAL NEAR regtostr(char *buf, REGION *region);
- extern char PASCAL NEAR lowerc(char ch);
- ! extern char PASCAL NEAR upperc(char ch);
- ! #if ZTC
- extern int (PASCAL NEAR *PASCAL NEAR fncmatch(char *fname))(int, int);
- extern int (PASCAL NEAR *PASCAL NEAR getname(char *prompt))(int, int);
- #else /* Sun (and others?) screwed up the prototyping.*/
- --- 62,69 ----
- extern char *undolock(char *fname);
- extern char *PASCAL NEAR regtostr(char *buf, REGION *region);
- extern char PASCAL NEAR lowerc(char ch);
- ! extern int PASCAL NEAR upperc(char ch);
- ! #if ZTC || TURBO
- extern int (PASCAL NEAR *PASCAL NEAR fncmatch(char *fname))(int, int);
- extern int (PASCAL NEAR *PASCAL NEAR getname(char *prompt))(int, int);
- #else /* Sun (and others?) screwed up the prototyping.*/
- ***************
- *** 124,131 ****
- --- 124,136 ----
- extern int PASCAL NEAR isletter(register unsigned int ch);
- extern int PASCAL NEAR islower(register unsigned int ch);
- extern int PASCAL NEAR is_num(char *st);
- + extern int PASCAL NEAR isearch(int dir);
- extern int PASCAL NEAR isupper(register unsigned int ch);
- + extern int PASCAL NEAR ldelnewline(void);
- + extern int PASCAL NEAR linstr(char *instr);
- + extern int PASCAL NEAR lnewline(void);
- extern int PASCAL NEAR lookup_color(char *sp);
- + extern int PASCAL NEAR lover(char *ostr);
- extern int PASCAL NEAR mceq(int bc, MC *mt);
- extern int PASCAL NEAR mcscanner(int direct, int beg_or_end, int repeats);
- extern int PASCAL NEAR mcstr(void);
- ***************
- *** 223,228 ****
- --- 228,234 ----
- extern PASCAL NEAR cex(int f, int n);
- extern PASCAL NEAR cinsert(void);
- extern PASCAL NEAR clean(void);
- + extern PASCAL NEAR clear_ring(int f, int n);
- extern PASCAL NEAR clrmes(int f, int n);
- extern PASCAL NEAR cmdstr(int c, char *seq);
- extern PASCAL NEAR copyregion(int f, int n);
- ***************
- *** 233,238 ****
- --- 239,245 ----
- extern PASCAL NEAR ctoec(int c);
- extern PASCAL NEAR ctrlg(int f, int n);
- extern PASCAL NEAR cycle_screens(int f, int n);
- + extern PASCAL NEAR cycle_ring(int f, int n);
- extern PASCAL NEAR dcline(int argc, char *argv[], int firstflag);
- extern PASCAL NEAR deblank(int f, int n);
- extern PASCAL NEAR debug(BUFFER *bp, char *eline, int *skipflag);
- ***************
- *** 311,320 ****
- extern PASCAL NEAR inspound(void);
- extern PASCAL NEAR insspace(int f, int n);
- extern PASCAL NEAR inword(void);
- - extern PASCAL NEAR isearch(int dir);
- extern PASCAL NEAR ismodeline(WINDOW *wp, int row);
- extern PASCAL NEAR istring(int f, int n);
- ! extern PASCAL NEAR kdelete(void);
- extern PASCAL NEAR killbuffer(int f, int n);
- extern PASCAL NEAR killpara(int f, int n);
- extern PASCAL NEAR killregion(int f, int n);
- --- 318,326 ----
- extern PASCAL NEAR inspound(void);
- extern PASCAL NEAR insspace(int f, int n);
- extern PASCAL NEAR inword(void);
- extern PASCAL NEAR ismodeline(WINDOW *wp, int row);
- extern PASCAL NEAR istring(int f, int n);
- ! extern PASCAL NEAR next_kill(void);
- extern PASCAL NEAR killbuffer(int f, int n);
- extern PASCAL NEAR killpara(int f, int n);
- extern PASCAL NEAR killregion(int f, int n);
- ***************
- *** 322,336 ****
- extern PASCAL NEAR kinsert(int back, char c);
- extern PASCAL NEAR lchange(register int flag);
- extern PASCAL NEAR ldelete(long n, int kflag);
- - extern PASCAL NEAR ldelnewline(void);
- extern PASCAL NEAR lfree(LINE *lp);
- extern PASCAL NEAR linsert(int n, char c);
- - extern PASCAL NEAR linstr(char *instr);
- extern PASCAL NEAR listbuffers(int f, int n);
- extern PASCAL NEAR list_screens(int f, int n);
- - extern PASCAL NEAR lnewline(void);
- extern PASCAL NEAR long_asc(char buf[], int width, long num);
- - extern PASCAL NEAR lover(char *ostr);
- extern PASCAL NEAR lowerregion(int f, int n);
- extern PASCAL NEAR lowerword(int f, int n);
- extern PASCAL NEAR lowrite(char c);
- --- 328,338 ----
- ***************
- *** 340,350 ****
- extern PASCAL NEAR mouse_screen(void);
- extern PASCAL NEAR screenlist(int iflag);
- extern PASCAL NEAR makelit(char *s);
- - extern VOID PASCAL NEAR mcclear(void);
- extern PASCAL NEAR meexit(int status);
- extern PASCAL NEAR meta(int f, int n);
- - extern PASCAL NEAR mlerase(void);
- - extern PASCAL NEAR mlferase(void);
- extern PASCAL NEAR mlforce(char *s);
- extern PASCAL NEAR mlout(int c);
- extern PASCAL NEAR mlputf(int s);
- --- 342,349 ----
- ***************
- *** 392,398 ****
- extern PASCAL NEAR quote(int f, int n);
- extern PASCAL NEAR rdonly(void);
- extern PASCAL NEAR readin(char fname[], int lockfl);
- - extern PASCAL NEAR reeat(int c);
- extern PASCAL NEAR reform(char *para);
- extern PASCAL NEAR reframe(WINDOW *wp);
- extern PASCAL NEAR refresh(int f, int n);
- --- 391,396 ----
- ***************
- *** 403,418 ****
- extern PASCAL NEAR resizm(int f, int n);
- extern PASCAL NEAR resterr(void);
- extern PASCAL NEAR restwnd(int f, int n);
- - extern VOID PASCAL NEAR rmcclear(void);
- - extern VOID PASCAL NEAR rvstrcpy(char *rvstr, char *str);
- extern PASCAL NEAR savewnd(int f, int n);
- extern PASCAL NEAR scwrite(int row, char *outstr, int forg, int bacg);
- - extern VOID PASCAL NEAR setbit(int bc, BITMAP cclmap);
- extern PASCAL NEAR setccol(int pos);
- extern PASCAL NEAR setekey(int f, int n);
- extern PASCAL NEAR setfillcol(int f, int n);
- extern PASCAL NEAR setgmode(int f, int n);
- - extern VOID PASCAL NEAR setjtable(void);
- extern PASCAL NEAR setmark(int f, int n);
- extern PASCAL NEAR setmod(int f, int n);
- extern PASCAL NEAR setwlist(char *wclist);
- --- 401,412 ----
- ***************
- *** 454,464 ****
- extern PASCAL NEAR updone(WINDOW *wp);
- extern PASCAL NEAR updpos(void);
- extern PASCAL NEAR updupd(int force);
- - extern PASCAL NEAR upmode(void);
- extern PASCAL NEAR upperregion(int f, int n);
- extern PASCAL NEAR upperword(int f, int n);
- extern PASCAL NEAR upscreen(int f, int n);
- - extern PASCAL NEAR upwind(void);
- extern PASCAL NEAR usebuffer(int f, int n);
- extern PASCAL NEAR varclean(void);
- extern PASCAL NEAR varinit(void);
- --- 448,456 ----
- ***************
- *** 475,484 ****
- --- 467,488 ----
- extern PASCAL NEAR writemsg(int f, int n);
- extern PASCAL NEAR writeout(char *fn, char *mode);
- extern PASCAL NEAR yank(int f, int n);
- + extern PASCAL NEAR yank_pop(int f, int n);
- extern PASCAL NEAR zotbuf(BUFFER *bp);
- extern unsigned int PASCAL NEAR chcase(register unsigned int ch);
- extern unsigned int PASCAL NEAR getckey(int mflag);
- extern unsigned int PASCAL NEAR stock(char *keyname);
- + extern VOID PASCAL NEAR getdtime(char *ts);
- + extern VOID PASCAL NEAR mcclear(void);
- + extern VOID PASCAL NEAR mlerase(void);
- + extern VOID PASCAL NEAR mlferase(void);
- + extern VOID PASCAL NEAR reeat(int c);
- + extern VOID PASCAL NEAR rmcclear(void);
- + extern VOID PASCAL NEAR rvstrcpy(char *rvstr, char *str);
- + extern VOID PASCAL NEAR setbit(int bc, BITMAP cclmap);
- + extern VOID PASCAL NEAR setjtable(void);
- + extern VOID PASCAL NEAR upmode(void);
- + extern VOID PASCAL NEAR upwind(void);
- extern WINDOW *PASCAL NEAR mousewindow(int row);
- extern int PASCAL NEAR wpopup(BUFFER *popbuf);
-
- ***************
- *** 549,555 ****
- extern char *undolock();
- extern char *PASCAL NEAR regtostr();
- extern char PASCAL NEAR lowerc();
- ! extern char PASCAL NEAR upperc();
- extern int (PASCAL NEAR *PASCAL NEAR fncmatch())();
- extern int (PASCAL NEAR *PASCAL NEAR getname())();
- extern int a1getc();
- --- 553,559 ----
- extern char *undolock();
- extern char *PASCAL NEAR regtostr();
- extern char PASCAL NEAR lowerc();
- ! extern int PASCAL NEAR upperc();
- extern int (PASCAL NEAR *PASCAL NEAR fncmatch())();
- extern int (PASCAL NEAR *PASCAL NEAR getname())();
- extern int a1getc();
- ***************
- *** 606,613 ****
- --- 610,622 ----
- extern int PASCAL NEAR isletter();
- extern int PASCAL NEAR islower();
- extern int PASCAL NEAR is_num();
- + extern int PASCAL NEAR isearch();
- extern int PASCAL NEAR isupper();
- + extern int PASCAL NEAR ldelnewline();
- + extern int PASCAL NEAR linstr();
- + extern int PASCAL NEAR lnewline();
- extern int PASCAL NEAR lookup_color();
- + extern int PASCAL NEAR lover();
- extern int PASCAL NEAR mceq();
- extern int PASCAL NEAR mcscanner();
- extern int PASCAL NEAR mcstr();
- ***************
- *** 705,710 ****
- --- 714,720 ----
- extern PASCAL NEAR cex();
- extern PASCAL NEAR cinsert();
- extern PASCAL NEAR clean();
- + extern PASCAL NEAR clear_ring();
- extern PASCAL NEAR clrmes();
- extern PASCAL NEAR cmdstr();
- extern PASCAL NEAR copyregion();
- ***************
- *** 715,720 ****
- --- 725,731 ----
- extern PASCAL NEAR ctoec();
- extern PASCAL NEAR ctrlg();
- extern PASCAL NEAR cycle_screens();
- + extern PASCAL NEAR cycle_ring();
- extern PASCAL NEAR dcline();
- extern PASCAL NEAR deblank();
- extern PASCAL NEAR debug();
- ***************
- *** 794,803 ****
- extern PASCAL NEAR insspace();
- extern PASCAL NEAR inword();
- extern PASCAL NEAR isearch();
- - extern PASCAL NEAR isearch();
- extern PASCAL NEAR ismodeline();
- extern PASCAL NEAR istring();
- ! extern PASCAL NEAR kdelete();
- extern PASCAL NEAR killbuffer();
- extern PASCAL NEAR killpara();
- extern PASCAL NEAR killregion();
- --- 805,813 ----
- extern PASCAL NEAR insspace();
- extern PASCAL NEAR inword();
- extern PASCAL NEAR isearch();
- extern PASCAL NEAR ismodeline();
- extern PASCAL NEAR istring();
- ! extern PASCAL NEAR next_kill();
- extern PASCAL NEAR killbuffer();
- extern PASCAL NEAR killpara();
- extern PASCAL NEAR killregion();
- ***************
- *** 805,819 ****
- extern PASCAL NEAR kinsert();
- extern PASCAL NEAR lchange();
- extern PASCAL NEAR ldelete();
- - extern PASCAL NEAR ldelnewline();
- extern PASCAL NEAR lfree();
- extern PASCAL NEAR linsert();
- - extern PASCAL NEAR linstr();
- extern PASCAL NEAR listbuffers();
- extern PASCAL NEAR list_screens();
- - extern PASCAL NEAR lnewline();
- extern PASCAL NEAR long_asc();
- - extern PASCAL NEAR lover();
- extern PASCAL NEAR lowerregion();
- extern PASCAL NEAR lowerword();
- extern PASCAL NEAR lowrite();
- --- 815,825 ----
- ***************
- *** 823,833 ****
- extern PASCAL NEAR mouse_screen();
- extern PASCAL NEAR screenlist();
- extern PASCAL NEAR makelit();
- - extern VOID PASCAL NEAR mcclear();
- extern PASCAL NEAR meexit();
- extern PASCAL NEAR meta();
- - extern PASCAL NEAR mlerase();
- - extern PASCAL NEAR mlferase();
- extern PASCAL NEAR mlforce();
- extern PASCAL NEAR mlout();
- extern PASCAL NEAR mlputf();
- --- 829,836 ----
- ***************
- *** 875,881 ****
- extern PASCAL NEAR quote();
- extern PASCAL NEAR rdonly();
- extern PASCAL NEAR readin();
- - extern PASCAL NEAR reeat();
- extern PASCAL NEAR reform();
- extern PASCAL NEAR reframe();
- extern PASCAL NEAR refresh();
- --- 878,883 ----
- ***************
- *** 886,901 ****
- extern PASCAL NEAR resizm();
- extern PASCAL NEAR resterr();
- extern PASCAL NEAR restwnd();
- - extern VOID PASCAL NEAR rmcclear();
- - extern VOID PASCAL NEAR rvstrcpy();
- extern PASCAL NEAR savewnd();
- extern PASCAL NEAR scwrite();
- - extern VOID PASCAL NEAR setbit();
- extern PASCAL NEAR setccol();
- extern PASCAL NEAR setekey();
- extern PASCAL NEAR setfillcol();
- extern PASCAL NEAR setgmode();
- - extern VOID PASCAL NEAR setjtable();
- extern PASCAL NEAR setmark();
- extern PASCAL NEAR setmod();
- extern PASCAL NEAR setwlist();
- --- 888,899 ----
- ***************
- *** 937,947 ****
- extern PASCAL NEAR updone();
- extern PASCAL NEAR updpos();
- extern PASCAL NEAR updupd();
- - extern PASCAL NEAR upmode();
- extern PASCAL NEAR upperregion();
- extern PASCAL NEAR upperword();
- extern PASCAL NEAR upscreen();
- - extern PASCAL NEAR upwind();
- extern PASCAL NEAR usebuffer();
- extern PASCAL NEAR varclean();
- extern PASCAL NEAR varinit();
- --- 935,943 ----
- ***************
- *** 958,967 ****
- --- 954,975 ----
- extern PASCAL NEAR writemsg();
- extern PASCAL NEAR writeout();
- extern PASCAL NEAR yank();
- + extern PASCAL NEAR yank_pop();
- extern PASCAL NEAR zotbuf();
- extern unsigned int PASCAL NEAR chcase();
- extern unsigned int PASCAL NEAR getckey();
- extern unsigned int PASCAL NEAR stock();
- + extern VOID PASCAL NEAR getdtime();
- + extern VOID PASCAL NEAR mcclear();
- + extern VOID PASCAL NEAR mlerase();
- + extern VOID PASCAL NEAR mlferase();
- + extern VOID PASCAL NEAR reeat();
- + extern VOID PASCAL NEAR rmcclear();
- + extern VOID PASCAL NEAR rvstrcpy();
- + extern VOID PASCAL NEAR setbit();
- + extern VOID PASCAL NEAR setjtable();
- + extern VOID PASCAL NEAR upmode();
- + extern VOID PASCAL NEAR upwind();
- extern WINDOW *PASCAL NEAR mousewindow();
- extern int PASCAL NEAR wpopup();
-
- *** estruct.h.orig Fri Oct 25 13:39:08 1991
- --- estruct.h Sun Aug 9 13:07:49 1992
- ***************
- *** 31,37 ****
- */
-
- #define PROGNAME "MicroEMACS"
- ! #define VERSION "3.11"
-
- /* Machine/OS definitions */
- /* [Set one of these!!] */
- --- 31,37 ----
- */
-
- #define PROGNAME "MicroEMACS"
- ! #define VERSION "3.11c"
-
- /* Machine/OS definitions */
- /* [Set one of these!!] */
- ***************
- *** 43,49 ****
- #define FINDER 0 /* Macintosh OS */
- #define HPUX 0 /* HPUX HP 9000 minicomputer */
- #define MPE 0 /* HP MPE/XL */
- ! #define MSDOS 0 /* MS-DOS */
- #define OS2 0 /* Microsoft or IBM OS/2 */
- #define SMOS 0 /* Supermax UNIX System V */
- #define SUN 0 /* SUN v4.0 */
- --- 43,49 ----
- #define FINDER 0 /* Macintosh OS */
- #define HPUX 0 /* HPUX HP 9000 minicomputer */
- #define MPE 0 /* HP MPE/XL */
- ! #define MSDOS 1 /* MS-DOS */
- #define OS2 0 /* Microsoft or IBM OS/2 */
- #define SMOS 0 /* Supermax UNIX System V */
- #define SUN 0 /* SUN v4.0 */
- ***************
- *** 62,68 ****
- #define DTL 0 /* DataLight C v3.12 */
- #define GCC 0 /* the GNU C compiler */
- #define LATTICE 0 /* Lattice 2.14 through 3.0 compilers */
- ! #define MSC 0 /* MicroSoft C compile version 3 & 4 & 5.1 */
- #define MWC 0 /* Mark Williams C */
- #define TURBO 0 /* Turbo C/MSDOS */
- #define UNIX 0 /* a standard UNIX compiler (cc) */
- --- 62,68 ----
- #define DTL 0 /* DataLight C v3.12 */
- #define GCC 0 /* the GNU C compiler */
- #define LATTICE 0 /* Lattice 2.14 through 3.0 compilers */
- ! #define MSC 0 /* MicroSoft C compile version 3 & 4 & 5.1 & 6 */
- #define MWC 0 /* Mark Williams C */
- #define TURBO 0 /* Turbo C/MSDOS */
- #define UNIX 0 /* a standard UNIX compiler (cc) */
- ***************
- *** 82,88 ****
-
- /* Special keyboard/network definitions */
-
- ! #define ATKBD 0 /* AT-style keyboard with F11, F12 & grey keys */
- #define WANGPC 0 /* WangPC - mostly escape sequences */
- #define VT100 0 /* Handle VT100 style keypad - NOT VMS. */
- #define NOVELL 0 /* IBMPC Novell NetWare flag! */
- --- 82,88 ----
-
- /* Special keyboard/network definitions */
-
- ! #define ATKBD 1 /* AT-style keyboard with F11, F12 & grey keys */
- #define WANGPC 0 /* WangPC - mostly escape sequences */
- #define VT100 0 /* Handle VT100 style keypad - NOT VMS. */
- #define NOVELL 0 /* IBMPC Novell NetWare flag! */
- ***************
- *** 103,108 ****
- --- 103,109 ----
- #define FMR 0 /* Fujitsu FMR series driver */
- #define HP110 0 /* HP110 screen driver */
- #define HP150 0 /* HP150 screen driver */
- + #define I55 0 /* IBM PS55 DOS J4.0/V */
- #define IBMPC 0 /* IBM-PC CGA/MONO/EGA/VGA drvr */
- #define MAC 0 /* Macintosh */
- #define NEC 0 /* NEC-9801VM driver */
- ***************
- *** 117,123 ****
-
- /* Windowing system style (pick one) */
-
- ! #define WINDOW_TEXT 0 /* Text mode.... simple updates */
- #define WINDOW_XVT 0 /* using XVT/any platform */
- #define WINDOW_MSWIN 0 /* MicroSoft Windows */
- #define WINDOW_X 0 /* X/Unix */
- --- 118,124 ----
-
- /* Windowing system style (pick one) */
-
- ! #define WINDOW_TEXT 1 /* Text mode.... simple updates */
- #define WINDOW_XVT 0 /* using XVT/any platform */
- #define WINDOW_MSWIN 0 /* MicroSoft Windows */
- #define WINDOW_X 0 /* X/Unix */
- ***************
- *** 146,152 ****
- #define REVSTA 1 /* Status line appears in reverse video */
- #define COLOR 1 /* color commands and windows */
-
- ! #define FILOCK 1 /* file locking under unix BSD 4.2 */
- #define ISRCH 1 /* Incremental searches like ITS EMACS */
- #define FLABEL 1 /* function key label code [HP150] */
- #define CRYPT 1 /* file encryption enabled? */
- --- 147,153 ----
- #define REVSTA 1 /* Status line appears in reverse video */
- #define COLOR 1 /* color commands and windows */
-
- ! #define FILOCK 0 /* file locking under unix BSD 4.2 */
- #define ISRCH 1 /* Incremental searches like ITS EMACS */
- #define FLABEL 1 /* function key label code [HP150] */
- #define CRYPT 1 /* file encryption enabled? */
- ***************
- *** 153,159 ****
- #define MAGIC 1 /* include regular expression matching? */
- #define MOUSE 1 /* Include routines for mouse actions */
- #define NOISY 1 /* Use a fancy BELL if it exists */
- ! #define CTAGS 0 /* include vi-like tagging? */
- #define SPEECH 0 /* spoken EMACS, for the sight impared [not ready] */
- #define VARARG 1 /* use varargs.h for mlwrite() */
-
- --- 154,160 ----
- #define MAGIC 1 /* include regular expression matching? */
- #define MOUSE 1 /* Include routines for mouse actions */
- #define NOISY 1 /* Use a fancy BELL if it exists */
- ! #define CTAGS 1 /* include vi-like tagging? */
- #define SPEECH 0 /* spoken EMACS, for the sight impared [not ready] */
- #define VARARG 1 /* use varargs.h for mlwrite() */
-
- ***************
- *** 174,180 ****
- #define VOID
- #define NOSHARE $low32k $align(1) /* attempt to optimize read/write vars. */
- #else
- ! #ifdef __STDC__
- #define CONST const
- #define VOID void
- #define NOSHARE
- --- 175,181 ----
- #define VOID
- #define NOSHARE $low32k $align(1) /* attempt to optimize read/write vars. */
- #else
- ! #if __STDC__ || MSC || TURBO || DTL || GCC || ZTC
- #define CONST const
- #define VOID void
- #define NOSHARE
- ***************
- *** 193,199 ****
-
- /* multibyte character support? */
-
- ! #if NEC || FMR
- #define DBCS 1 /* double byte character sets enabled */
- #define INSDEL 1 /* use insert/delete line display optimizations */
-
- --- 194,200 ----
-
- /* multibyte character support? */
-
- ! #if NEC || FMR || I55
- #define DBCS 1 /* double byte character sets enabled */
- #define INSDEL 1 /* use insert/delete line display optimizations */
-
- ***************
- *** 213,219 ****
- #define PROTO 0
- #endif
-
- ! #if __STDC__ && (GCC == 0) /* if ANSI C compatible */
- #define ETYPE union
- #else
- #define ETYPE struct
- --- 214,222 ----
- #define PROTO 0
- #endif
-
- !
- ! /* Gnu can't for some reason...*/
- ! #if (__STDC__ && (GCC == 0)) || MSC || TURBO || DTL || VMS || GCC || ZTC
- #define ETYPE union
- #else
- #define ETYPE struct
- ***************
- *** 411,416 ****
- --- 414,420 ----
- #define NLOCKS 100 /* max # of file locks active */
- #define NCOLORS 16 /* number of supported colors */
- #define KBLOCK 250 /* sizeof kill buffer chunks */
- + #define NRING 16 /* # of buffers in kill ring */
- #define NBLOCK 16 /* line block chunk size */
- #define NVSIZE 10 /* max #chars in a var name */
- #define NMARKS 10 /* number of marks */
- ***************
- *** 487,492 ****
- --- 491,497 ----
- #define CFCPCN 0x0001 /* Last command was C-P, C-N */
- #define CFKILL 0x0002 /* Last command was a kill */
- #define CFSRCH 0x0004 /* last command was a search */
- + #define CFYANK 0x0008 /* last command was a yank */
-
- #define SRNORM 0 /* end past, begin front */
- #define SRBEGIN 1 /* always at front */
- *** ../orig/eval.c Mon Jul 27 21:51:46 1992
- --- eval.c Mon Jul 27 21:54:39 1992
- ***************
- *** 328,333 ****
- --- 328,334 ----
- case EVFMTLEAD: return(fmtlead);
- case EVWCHARS: return(getwlist(result));
- case EVPOPFLAG: return(ltos(popflag));
- + case EVPOSFLAG: return(ltos(posflag));
- case EVYANKFLAG: return(ltos(yankflag));
- case EVSCRNAME: return(first_screen->s_screen_name);
- case EVCURWIND: return(int_asc(getcwnum()));
- ***************
- *** 335,340 ****
- --- 336,342 ----
- case EVORGCOL: return(int_asc(term.t_colorg));
- case EVORGROW: return(int_asc(term.t_roworg));
- case EVDESKCLR: return(cname[deskcolor]);
- + case EVTIMEFLAG: return(ltos(timeflag));
- }
- meexit(-12); /* again, we should never get here */
- }
- ***************
- *** 363,369 ****
- static char value[NSTRING]; /* temp buffer for value */
-
- /* no kill buffer....just a null string */
- ! if (kbufh == (KILL *)NULL) {
- value[0] = 0;
- return(value);
- }
- --- 365,371 ----
- static char value[NSTRING]; /* temp buffer for value */
-
- /* no kill buffer....just a null string */
- ! if (kbufh[kill_index] == (KILL *)NULL) {
- value[0] = 0;
- return(value);
- }
- ***************
- *** 373,382 ****
- size = NSTRING - 1;
-
- /* backed up characters? */
- ! if (kskip > 0) {
- ! kptr = kbufh;
- ! sp = &(kptr->d_chunk[kskip]);
- ! counter = kskip;
- while (counter++ < KBLOCK) {
- *vp++ = *sp++;
- if (--size == 0) {
- --- 375,384 ----
- size = NSTRING - 1;
-
- /* backed up characters? */
- ! if (kskip[kill_index] > 0) {
- ! kptr = kbufh[kill_index];
- ! sp = &(kptr->d_chunk[kskip[kill_index]]);
- ! counter = kskip[kill_index];
- while (counter++ < KBLOCK) {
- *vp++ = *sp++;
- if (--size == 0) {
- ***************
- *** 386,396 ****
- }
- kptr = kptr->d_next;
- } else {
- ! kptr = kbufh;
- }
-
- if (kptr != (KILL *)NULL) {
- ! while (kptr != kbufp) {
- sp = kptr->d_chunk;
- for (counter = 0; counter < KBLOCK; counter++) {
- *vp++ = *sp++;
- --- 388,398 ----
- }
- kptr = kptr->d_next;
- } else {
- ! kptr = kbufh[kill_index];
- }
-
- if (kptr != (KILL *)NULL) {
- ! while (kptr != kbufp[kill_index]) {
- sp = kptr->d_chunk;
- for (counter = 0; counter < KBLOCK; counter++) {
- *vp++ = *sp++;
- ***************
- *** 401,407 ****
- }
- kptr = kptr->d_next;
- }
- ! counter = kused;
- sp = kptr->d_chunk;
- while (counter--) {
- *vp++ = *sp++;
- --- 403,409 ----
- }
- kptr = kptr->d_next;
- }
- ! counter = kused[kill_index];
- sp = kptr->d_chunk;
- while (counter--) {
- *vp++ = *sp++;
- ***************
- *** 763,768 ****
- --- 765,773 ----
- break;
- case EVPOPFLAG: popflag = stol(value);
- break;
- + case EVPOSFLAG: posflag = stol(value);
- + upmode();
- + break;
- case EVYANKFLAG: yankflag = stol(value);
- break;
- case EVSCRNAME: select_screen(lookup_screen(value), TRUE);
- ***************
- *** 782,787 ****
- --- 787,795 ----
- #endif
- }
- break;
- + case EVTIMEFLAG: timeflag = stol(value);
- + upmode();
- + break;
- }
- break;
- }
- ***************
- *** 1264,1270 ****
- char outseq[256]; /* output buffer for keystroke sequence */
-
- /* and get a buffer for it */
- ! varbuf = bfind(TEXT56, TRUE, 0);
- /* "Variable list" */
- if (varbuf == NULL || bclear(varbuf) == FALSE) {
- mlwrite(TEXT57);
- --- 1272,1278 ----
- char outseq[256]; /* output buffer for keystroke sequence */
-
- /* and get a buffer for it */
- ! varbuf = bfind(TEXT56, TRUE, BFINVS);
- /* "Variable list" */
- if (varbuf == NULL || bclear(varbuf) == FALSE) {
- mlwrite(TEXT57);
- ***************
- *** 1334,1340 ****
- char outseq[80]; /* output buffer for keystroke sequence */
-
- /* get a buffer for the function list */
- ! fncbuf = bfind(TEXT211, TRUE, 0);
- /* "Function list" */
- if (fncbuf == NULL || bclear(fncbuf) == FALSE) {
- mlwrite(TEXT212);
- --- 1342,1348 ----
- char outseq[80]; /* output buffer for keystroke sequence */
-
- /* get a buffer for the function list */
- ! fncbuf = bfind(TEXT211, TRUE, BFINVS);
- /* "Function list" */
- if (fncbuf == NULL || bclear(fncbuf) == FALSE) {
- mlwrite(TEXT212);
- *** ../orig/evar.h Mon Jul 27 21:51:46 1992
- --- evar.h Mon Jul 27 21:55:40 1992
- ***************
- *** 69,74 ****
- --- 69,75 ----
- "paralead", /* paragraph leadin characters */
- "pending", /* type ahead pending flag */
- "popflag", /* pop-up windows active? */
- + "posflag", /* display point position on modeline? */
- "progname", /* returns current prog name - "MicroEMACS" */
- "ram", /* ram in use by malloc */
- "readhook", /* read file execution hook */
- ***************
- *** 87,92 ****
- --- 88,94 ----
- "sterm", /* search terminator character */
- "target", /* target for line moves */
- "time", /* date and time */
- + "timeflag", /* display time? */
- "tpause", /* length to pause for paren matching */
- "version", /* current version number */
- "wchars", /* set of characters legal in words */
- ***************
- *** 151,183 ****
- #define EVPARALEAD 46
- #define EVPENDING 47
- #define EVPOPFLAG 48
- ! #define EVPROGNAME 49
- ! #define EVRAM 50
- ! #define EVREADHK 51
- ! #define EVREGION 52
- ! #define EVREPLACE 53
- ! #define EVRVAL 54
- ! #define EVSCRNAME 55
- ! #define EVSEARCH 56
- ! #define EVSEARCHPNT 57
- ! #define EVSEED 58
- ! #define EVSOFTTAB 59
- ! #define EVSRES 60
- ! #define EVSSAVE 61
- ! #define EVSSCROLL 62
- ! #define EVSTATUS 63
- ! #define EVSTERM 64
- ! #define EVTARGET 65
- ! #define EVTIME 66
- ! #define EVTPAUSE 67
- ! #define EVVERSION 68
- ! #define EVWCHARS 69
- ! #define EVWLINE 70
- ! #define EVWRAPHK 71
- ! #define EVWRITEHK 72
- ! #define EVXPOS 73
- ! #define EVYANKFLAG 74
- ! #define EVYPOS 75
-
- /* list of recognized user functions */
-
- --- 153,187 ----
- #define EVPARALEAD 46
- #define EVPENDING 47
- #define EVPOPFLAG 48
- ! #define EVPOSFLAG 49
- ! #define EVPROGNAME 50
- ! #define EVRAM 51
- ! #define EVREADHK 52
- ! #define EVREGION 53
- ! #define EVREPLACE 54
- ! #define EVRVAL 55
- ! #define EVSCRNAME 56
- ! #define EVSEARCH 57
- ! #define EVSEARCHPNT 58
- ! #define EVSEED 59
- ! #define EVSOFTTAB 60
- ! #define EVSRES 61
- ! #define EVSSAVE 62
- ! #define EVSSCROLL 63
- ! #define EVSTATUS 64
- ! #define EVSTERM 65
- ! #define EVTARGET 66
- ! #define EVTIME 67
- ! #define EVTIMEFLAG 68
- ! #define EVTPAUSE 69
- ! #define EVVERSION 70
- ! #define EVWCHARS 71
- ! #define EVWLINE 72
- ! #define EVWRAPHK 73
- ! #define EVWRITEHK 74
- ! #define EVXPOS 75
- ! #define EVYANKFLAG 76
- ! #define EVYPOS 77
-
- /* list of recognized user functions */
-
- *** ../orig/file.c Mon Jul 27 21:51:47 1992
- --- file.c Mon Jul 27 22:10:30 1992
- ***************
- *** 568,574 ****
- int sflag; /* are we safe saving? */
- char tname[NSTRING]; /* temporary file name */
- char buf[NSTRING]; /* message buffer */
- ! #if BSD | SUN | V7
- struct stat st; /* we need info about the file permisions */
- #endif
-
- --- 568,574 ----
- int sflag; /* are we safe saving? */
- char tname[NSTRING]; /* temporary file name */
- char buf[NSTRING]; /* message buffer */
- ! #if BSD | SUN | V7 | XENIX
- struct stat st; /* we need info about the file permisions */
- #endif
-
- ***************
- *** 648,654 ****
- strcat(buf, "s");
-
- if (sflag) {
- ! #if BSD | SUN | V7
- /* get the permisions on the original file */
- stat(fn, &st);
- #endif
- --- 648,654 ----
- strcat(buf, "s");
-
- if (sflag) {
- ! #if BSD | SUN | V7 | XENIX
- /* get the permisions on the original file */
- stat(fn, &st);
- #endif
- ***************
- *** 655,662 ****
- /* erase original file */
- /* rename temporary file to original name */
- if (unlink(fn) == 0 && rename(tname, fn) == 0) {
- ! #if BSD | SUN | V7
- chmod(fn, (int)st.st_uid, (int)st.st_gid);
- chmod(fn, (int)st.st_mode);
- #else
- ;
- --- 655,664 ----
- /* erase original file */
- /* rename temporary file to original name */
- if (unlink(fn) == 0 && rename(tname, fn) == 0) {
- ! #if BSD | SUN | V7 | XENIX
- ! #if !(PC_BSD)
- chmod(fn, (int)st.st_uid, (int)st.st_gid);
- + #endif /* !(PC_BSD) */
- chmod(fn, (int)st.st_mode);
- #else
- ;
- ***************
- *** 840,846 ****
- return(status);
-
- /* get a buffer for the file list */
- ! dirbuf = bfind("File List", TRUE, 0);
- if (dirbuf == NULL || bclear(dirbuf) == FALSE) {
- mlwrite("Can not display file list");
- /* "Can not display function list" */
- --- 842,848 ----
- return(status);
-
- /* get a buffer for the file list */
- ! dirbuf = bfind("File List", TRUE, BFINVS);
- if (dirbuf == NULL || bclear(dirbuf) == FALSE) {
- mlwrite("Can not display file list");
- /* "Can not display function list" */
- *** ../orig/french.h Mon Jul 27 21:51:48 1992
- --- french.h Mon Jul 27 21:55:40 1992
- ***************
- *** 270,273 ****
- #define TEXT225 "[Switched to screen %s]"
- #define TEXT226 "%%Can not kill an executing buffer"
- #define TEXT227 "\n--- Press any key to Continue ---"
- !
- --- 270,273 ----
- #define TEXT225 "[Switched to screen %s]"
- #define TEXT226 "%%Can not kill an executing buffer"
- #define TEXT227 "\n--- Press any key to Continue ---"
- ! #define TEXT228 "[List du ratures vide']"
- *** ../orig/german.h Mon Jul 27 21:51:48 1992
- --- german.h Mon Jul 27 21:55:41 1992
- ***************
- *** 292,295 ****
- --- 292,296 ----
- #define TEXT225 "[Switched to screen %s]"
- #define TEXT226 "%%Can not kill an executing buffer"
- #define TEXT227 "\n--- Press any key to Continue ---"
- + #define TEXT228 "[Kill ring cleared]"
-
- *** ../orig/history.c Mon Jul 27 21:51:49 1992
- --- history.c Mon Jul 27 21:54:44 1992
- ***************
- *** 1741,1746 ****
- --- 1741,1794 ----
- * than the execute-macro-<n> commands which I am trying to phase out.
- * 31-oct-91
- * [RELEASED version 3.11 for general distribution]
- + * 31-Oct-91 Ken Cornetet
- + * - extra parameter in non-proto version of setkey() deleted
- + * - Microport V/AT modifications. An "ndir" package is needed
- + * (contact Ken at <kenc@ezelmo.UUCP> for this)
- + * Also, set terminfo string "is2" on closing tty
- + * 19-Nov-91 Pete Dunlap
- + * - changed initializers for search path for the AMIGA to more closely
- + * resemble reality, don't need to put boot disk in on each search
- + * - added XENIX to the list of files to preserve permisions
- + * 19-Nov-91 Daniel Lawrence
- + * - added two missing zeroes in the TERM structure for the HP150
- + * 21-nov-91
- + * - added $timeflag, when TRUE displays hour/minute of last keystroke
- + * on bottom modeline
- + * - ? in file/buffer/command name completion brings up a completion
- + * list as will a partial completion attempt.
- + * - changed all lists/description popups to BFINVS invisible buffers
- + * - changed name of buffer list buffer from [List] to [Buffers]
- + * - added some missing systems to the list for dolock() in dolock.c
- + * (notable USG, V7 and BSD)
- + * 23-nov-91
- + * [RELEASED update 3.11a via BBS]
- + * 24-dec-91
- + * - added new commands yank-pop (M-Y), delete-kill-ring (M-^Y),
- + * and cycle-ring (^X-Y) to handle a ring of kill buffers. More
- + * info on their use in the reference manual.
- + * - changed version to 3.11b
- + * 5-jan-92 John M. Gamble
- + * - pop-buffer, with a numeric argument, now behaves like select-buffer
- + * by making that buffer INVISIBLE.
- + * - Reverse search groups handled more sensibly, smaller code.
- + * 7-jan-92 Walter Warniaha/via BBS
- + * - made some fixes to help MSC under MSDOS work properly. Set default
- + * stack to 20K, fixed some variable conflicts.
- + * 15-jan-92
- + * - added $posflag to show point position on current modeline as
- + * suggested by Brian Casiello, defaults to on.
- + * 19-jan-92 John M. Gamble
- + * - On some otherwise ANSI C compilers, __STDC__ is not 1, because we
- + * also make use of the PASCAL modifier, which is not ANSI. So in
- + * ESTRUCT.H, where there is a check on __STDC__, we also list the
- + * other ANSI C compilers. This turns on VOID, CONST, and makes
- + * ETYPE a union instead of a struct.
- + * 25-jan-92 John M. Gamble
- + * - Normal Isearch exit updates the search jump tables too.
- + * 31-jan-91
- + * - fill-paragraph on an empty buffer no longer hangs
- + * - changed version number to 3.11c and released via BBS
- */
-
- history()
- *** ../orig/hp150.c Mon Jul 27 21:51:51 1992
- --- hp150.c Mon Jul 27 21:54:45 1992
- ***************
- *** 56,61 ****
- --- 56,62 ----
-
- union REGS r; /* register set for bios and dos (AGIOS) calls */
- int capslock = 0; /* caps lock flag */
- + int break_flag; /* state of MSDOS control break processing */
-
- /*
- * Standard terminal interface dispatch table. Most of the fields point into
- ***************
- *** 68,73 ****
- --- 69,75 ----
- NCOL,
- MARGIN,
- SCRSIZ,
- + 0, 0,
- NPAUSE,
- openhp,
- closehp,
- ***************
- *** 428,446 ****
- PASCAL NEAR ckeyoff() /* turn control-C trapping off */
-
- {
- ! r.h.ah = 0x33; /* ctrl-break check */
- ! r.h.al = 1; /* set the state of the ctrl-break check */
- ! r.h.dl = 0; /* turn it off */
- ! intdos(&r, &r);
- }
-
- PASCAL NEAR ckeyon() /* turn control-C trapping on */
-
- {
- ! r.h.ah = 0x33; /* ctrl-break check */
- ! r.h.al = 1; /* set the state of the ctrl-break check */
- ! r.h.dl = 1; /* turn it on */
- ! intdos(&r, &r);
- }
-
- #ifdef unsigned
- --- 430,459 ----
- PASCAL NEAR ckeyoff() /* turn control-C trapping off */
-
- {
- ! /* find the current state of the control break inturrupt */
- ! rg.h.ah = 0x33; /* ctrl-break check */
- ! rg.h.al = 0; /* request the state of the ctrl-break check */
- ! intdos(&rg, &rg);
- ! break_flag = rg.h.dl;
- !
- ! /* set the break processing off if it is on */
- ! if (break_flag == 1) {
- ! rg.h.ah = 0x33; /* ctrl-break check */
- ! rg.h.al = 1; /* set the state of the ctrl-break check */
- ! rg.h.dl = 0; /* turn it off */
- ! intdos(&rg, &rg);
- ! }
- }
-
- PASCAL NEAR ckeyon() /* turn control-C trapping on */
-
- {
- ! if (break_flag == 1) {
- ! rg.h.ah = 0x33; /* ctrl-break check */
- ! rg.h.al = 1; /* set the state of the ctrl-break check */
- ! rg.h.dl = 1; /* turn it on */
- ! intdos(&rg, &rg);
- ! }
- }
-
- #ifdef unsigned
- *** ../orig/ibmpc.c Mon Jul 27 21:51:51 1992
- --- ibmpc.c Mon Jul 27 21:54:46 1992
- ***************
- *** 70,77 ****
- int revflag = FALSE; /* are we currently in rev video? */
- int desk_rows; /* number of rows on current desktop */
- int desk_cols; /* number of cols on current desktop */
-
- -
- PASCAL NEAR ibmmove();
- PASCAL NEAR ibmeeol();
- PASCAL NEAR ibmputc();
- --- 70,77 ----
- int revflag = FALSE; /* are we currently in rev video? */
- int desk_rows; /* number of rows on current desktop */
- int desk_cols; /* number of cols on current desktop */
- + int break_flag; /* state of MSDOS control break processing */
-
- PASCAL NEAR ibmmove();
- PASCAL NEAR ibmeeol();
- PASCAL NEAR ibmputc();
- ***************
- *** 258,264 ****
- --- 258,268 ----
- rg.h.bh = 0; /* display page zero */
- rg.x.cx = 1; /* only one please! */
- rg.h.al = ' '; /* character to write */
- + #if COLOR
- rg.h.bl = ((ctrans[gbcolor] << 4) | ctrans[gfcolor]);/* attribute */
- + #else
- + rg.h.bl = 07;
- + #endif
- int86(0x10, &rg, &rg);
- return;
- }
- ***************
- *** 272,278 ****
- --- 276,286 ----
- rg.h.bh = 0; /* display page zero */
- rg.x.cx = 1; /* only one please! */
- rg.h.al = ch; /* character to write */
- + #if COLOR
- rg.h.bl = ((ctrans[gbcolor] << 4) | ctrans[gfcolor]); /* attribute */
- + #else
- + rg.h.bl = 07;
- + #endif
- int86(0x10, &rg, &rg);
-
- /* advance the cursor by 1 position */
- ***************
- *** 422,432 ****
- --- 430,459 ----
- PASCAL NEAR ibmkopen() /* open the keyboard */
-
- {
- + /* find the current state of the control break inturrupt */
- + rg.h.ah = 0x33; /* ctrl-break check */
- + rg.h.al = 0; /* request the state of the ctrl-break check */
- + intdos(&rg, &rg);
- + break_flag = rg.h.dl;
- +
- + /* set the break processing off if it is on */
- + if (break_flag == 1) {
- + rg.h.ah = 0x33; /* ctrl-break check */
- + rg.h.al = 1; /* set the state of the ctrl-break check */
- + rg.h.dl = 0; /* turn it off */
- + intdos(&rg, &rg);
- + }
- }
-
- PASCAL NEAR ibmkclose() /* close the keyboard */
-
- {
- + if (break_flag == 1) {
- + rg.h.ah = 0x33; /* ctrl-break check */
- + rg.h.al = 1; /* set the state of the ctrl-break check */
- + rg.h.dl = 1; /* turn it on */
- + intdos(&rg, &rg);
- + }
- }
-
- PASCAL NEAR scinit(type) /* initialize the screen head pointers */
- *** ../orig/input.c Mon Jul 27 21:51:51 1992
- --- input.c Mon Jul 27 21:54:48 1992
- ***************
- *** 296,301 ****
- --- 296,330 ----
- TTflush();
- if (buf[cpos - 1] == 0)
- return(buf);
- + goto clist;
- +
- + } else if (c == '?') {
- +
- + clist: /* make a completion list! */
- + switch (type) {
- + case CMP_BUFFER:
- + clist_buffer(buf, &cpos);
- + break;
- + case CMP_COMMAND:
- + clist_command(buf, &cpos);
- + break;
- + case CMP_FILENAME:
- + clist_file(buf, &cpos);
- + break;
- + }
- + update(TRUE);
- +
- + /* if it exists, reprompt the user */
- + if (prompt) {
- + buf[cpos] = 0;
- + if (type == CMP_COMMAND)
- + mlwrite("%s%s", prompt, buf);
- + else if (defval)
- + mlwrite("%s[%s]: %s", prompt, defval, buf);
- + else
- + mlwrite("%s: %s", prompt, buf);
- + }
- +
- } else {
- if (cpos < maxlen && c > ' ') {
- buf[cpos++] = c;
- ***************
- *** 383,388 ****
- --- 412,453 ----
- return;
- }
-
- + /* clist_command: Make a completion list based on a partial name */
- +
- + clist_command(name, cpos)
- +
- + char *name; /* command containing the current name to complete */
- + int *cpos; /* ptr to position of next character to insert */
- +
- + {
- + register NBIND *bp; /* trial command to complete */
- + register int curbind; /* index into the names[] array */
- + register int name_len; /* current length of input string */
- + register BUFFER *listbuf;/* buffer to put completion list into */
- +
- + /* get a buffer for the completion list */
- + listbuf = bfind("[Completion list]", TRUE, BFINVS);
- + if (listbuf == NULL || bclear(listbuf) == FALSE) {
- + ctrlg(FALSE, 0);
- + TTflush();
- + return;
- + }
- +
- + name_len = *cpos;
- +
- + /* first, we start at the first command and scan the list */
- + for (curbind = 0; curbind <= numfunc; curbind++) {
- +
- + /* is this a match? */
- + bp = &names[curbind];
- + if (strncmp(name, bp->n_name, name_len) == 0)
- + addline(listbuf, bp->n_name);
- + }
- +
- + wpopup(listbuf);
- + return;
- + }
- +
- /* comp_buffer: Attempt a completion on a buffer name */
-
- comp_buffer(name, cpos)
- ***************
- *** 456,461 ****
- --- 521,564 ----
- return;
- }
-
- + /* clist_buffer: Make a completion list based on a partial buffer name */
- +
- + clist_buffer(name, cpos)
- +
- + char *name; /* command containing the current name to complete */
- + int *cpos; /* ptr to position of next character to insert */
- +
- + {
- + register int name_len; /* current length of input string */
- + register BUFFER *listbuf;/* buffer to put completion list into */
- + register BUFFER *bp; /* trial buffer to complete */
- +
- + /* get a buffer for the completion list */
- + listbuf = bfind("[Completion list]", TRUE, BFINVS);
- + if (listbuf == NULL || bclear(listbuf) == FALSE) {
- + ctrlg(FALSE, 0);
- + TTflush();
- + return;
- + }
- +
- + /* first, we start at the first buffer and scan the list */
- + name_len = *cpos;
- + bp = bheadp;
- +
- + while (bp) {
- +
- + /* is this a match? */
- + if (strncmp(name, bp->b_bname, name_len) == 0)
- + addline(listbuf, bp->b_bname);
- +
- + /* on to the next buffer */
- + bp = bp->b_bufp;
- + }
- +
- + wpopup(listbuf);
- + return;
- + }
- +
- /* comp_file: Attempt a completion on a file name */
-
- comp_file(name, cpos)
- ***************
- *** 532,537 ****
- --- 635,680 ----
-
- TTflush();
-
- + return;
- + }
- +
- + /* clist_file: Make a completion list based on a partial file name */
- +
- + clist_file(name, cpos)
- +
- + char *name; /* command containing the current name to complete */
- + int *cpos; /* ptr to position of next character to insert */
- +
- + {
- + register int name_len; /* current length of input string */
- + register BUFFER *listbuf;/* buffer to put completion list into */
- + register char *fname; /* trial file to complete */
- +
- + /* get a buffer for the completion list */
- + listbuf = bfind("[Completion list]", TRUE, BFINVS);
- + if (listbuf == NULL || bclear(listbuf) == FALSE) {
- + ctrlg(FALSE, 0);
- + TTflush();
- + return;
- + }
- +
- + /* first, we start at the first file and scan the list */
- + name_len = *cpos;
- + name[*cpos] = 0;
- + fname = getffile(name);
- +
- + /* first, we start at the first file and scan the list */
- + while (fname) {
- +
- + /* is this a match? */
- + if (strncmp(name, fname, name_len) == 0)
- + addline(listbuf, fname);
- +
- + /* on to the next file */
- + fname = getnfile();
- + }
- +
- + wpopup(listbuf);
- return;
- }
-
- *** ../orig/isearch.c Mon Jul 27 21:51:51 1992
- --- isearch.c Mon Jul 27 21:54:49 1992
- ***************
- *** 47,54 ****
- static int cmd_offset; /* Current offset into command buff */
- static int cmd_reexecute = -1; /* > 0 if re-executing command */
-
- - PASCAL NEAR reeat(); /* A local function type definition */
- -
- /*
- * Subroutine to do incremental reverse search. It actually uses the
- * same code as the normal incremental search, as both can go both ways.
- --- 47,52 ----
- ***************
- *** 114,123 ****
- * will stall until the pattern string is edited back into something that
- * exists (or until the search is aborted).
- */
- ! PASCAL NEAR isearch(dir)
- !
- int dir;
- -
- {
- int status; /* Search status */
- int col; /* prompt column */
- --- 112,119 ----
- * will stall until the pattern string is edited back into something that
- * exists (or until the search is aborted).
- */
- ! int PASCAL NEAR isearch(dir)
- int dir;
- {
- int status; /* Search status */
- int col; /* prompt column */
- ***************
- *** 162,169 ****
- */
- c = ectoc(expc = get_char());
-
- ! if (expc == sterm) /* Want to quit searching? */
- return(TRUE); /* Quit searching now */
-
- if (expc == abortc) /* If abort search request */
- break; /* Quit searching */
- --- 158,167 ----
- */
- c = ectoc(expc = get_char());
-
- ! if (expc == sterm) { /* Want to quit searching? */
- ! setjtable(); /* Update the jump tables */
- return(TRUE); /* Quit searching now */
- + }
-
- if (expc == abortc) /* If abort search request */
- break; /* Quit searching */
- ***************
- *** 446,452 ****
- return(c); /* and return the last char */
- }
-
- ! PASCAL NEAR reeat(c)
- int c;
- {
- if (eaten_char != -1) /* If we've already been here */
- --- 444,450 ----
- return(c); /* and return the last char */
- }
-
- ! VOID PASCAL NEAR reeat(c)
- int c;
- {
- if (eaten_char != -1) /* If we've already been here */
- ***************
- *** 456,462 ****
- term.t_getchar = uneat; /* Replace it with ours */
- }
- #else
- ! PASCAL NEAR isearch(dir)
-
- int dir;
-
- --- 454,460 ----
- term.t_getchar = uneat; /* Replace it with ours */
- }
- #else
- ! int PASCAL NEAR isearch(dir)
-
- int dir;
-
- *** ../orig/japan.h Mon Jul 27 21:51:52 1992
- --- japan.h Mon Jul 27 21:55:42 1992
- ***************
- *** 232,235 ****
- #define TEXT225 "[Switched to screen %s]"
- #define TEXT226 "%%Can not kill an executing buffer"
- #define TEXT227 "\n--- Press any key to Continue ---"
- !
- --- 232,235 ----
- #define TEXT225 "[Switched to screen %s]"
- #define TEXT226 "%%Can not kill an executing buffer"
- #define TEXT227 "\n--- Press any key to Continue ---"
- ! #define TEXT228 "[Kill ring cleared]"
- *** ../orig/latin.h Mon Jul 27 21:51:52 1992
- --- latin.h Mon Jul 27 21:55:43 1992
- ***************
- *** 228,231 ****
- --- 228,232 ----
- #define TEXT224 "%%Row origin out of range"
- #define TEXT225 "[Switched to screen %s]"
- #define TEXT226 "%%Can not kill an executing buffer"
- + #define TEXT228 "[Kill ring cleared]"
- #define TEXT227 "\n--- Press any key to Continue ---"
- *** ../orig/line.c Mon Jul 27 21:51:52 1992
- --- line.c Mon Jul 27 21:54:52 1992
- ***************
- *** 19,24 ****
- --- 19,26 ----
-
- #define BSIZE(a) (a + NBLOCK - 1) & (~(NBLOCK - 1))
-
- + static long last_size = -1L; /* last # of bytes yanked */
- +
- /*
- * This routine allocates a block of memory large enough to hold a LINE
- * containing "used" characters. Return a pointer to the new block, or
- ***************
- *** 151,157 ****
- * linstr -- Insert a string at the current point
- */
-
- ! PASCAL NEAR linstr(instr)
- char *instr;
- {
- register int status;
- --- 153,159 ----
- * linstr -- Insert a string at the current point
- */
-
- ! int PASCAL NEAR linstr(instr)
- char *instr;
- {
- register int status;
- ***************
- *** 319,325 ****
- * lover -- Overwrite a string at the current point
- */
-
- ! PASCAL NEAR lover(ostr)
-
- char *ostr;
-
- --- 321,327 ----
- * lover -- Overwrite a string at the current point
- */
-
- ! int PASCAL NEAR lover(ostr)
-
- char *ostr;
-
- ***************
- *** 349,355 ****
- * update of dot and mark is a bit easier then in the above case, because the
- * split forces more updating.
- */
- ! PASCAL NEAR lnewline()
- {
- register char *cp1;
- register char *cp2;
- --- 351,357 ----
- * update of dot and mark is a bit easier then in the above case, because the
- * split forces more updating.
- */
- ! int PASCAL NEAR lnewline()
- {
- register char *cp1;
- register char *cp2;
- ***************
- *** 693,699 ****
- * about in memory. Return FALSE on error and TRUE if all looks ok. Called by
- * "ldelete" only.
- */
- ! PASCAL NEAR ldelnewline()
- {
- register char *cp1;
- register char *cp2;
- --- 695,701 ----
- * about in memory. Return FALSE on error and TRUE if all looks ok. Called by
- * "ldelete" only.
- */
- ! int PASCAL NEAR ldelnewline()
- {
- register char *cp1;
- register char *cp2;
- ***************
- *** 843,869 ****
- * new kill context is being created. The kill buffer array is released, just
- * in case the buffer has grown to immense size. No errors.
- */
- ! PASCAL NEAR kdelete()
- {
- KILL *kp; /* ptr to scan kill buffer chunk list */
-
- ! if (kbufh != NULL) {
-
- /* first, delete all the chunks */
- ! kbufp = kbufh;
- ! while (kbufp != NULL) {
- ! kp = kbufp->d_next;
- ! free((char *)kbufp);
- ! kbufp = kp;
- }
-
- /* and reset all the kill buffer pointers */
- ! kbufh = kbufp = NULL;
- ! kskip = 0;
- ! kused = KBLOCK;
- }
- }
-
- /*
- * Insert a character to the kill buffer, allocating new chunks as needed.
- * Return TRUE if all is well, and FALSE on errors.
- --- 845,890 ----
- * new kill context is being created. The kill buffer array is released, just
- * in case the buffer has grown to immense size. No errors.
- */
- !
- ! void kdelete()
- !
- {
- KILL *kp; /* ptr to scan kill buffer chunk list */
-
- ! if (kbufh[kill_index] != NULL) {
-
- /* first, delete all the chunks */
- ! kbufp[kill_index] = kbufh[kill_index];
- ! while (kbufp[kill_index] != NULL) {
- ! kp = kbufp[kill_index]->d_next;
- ! free((char *)kbufp[kill_index]);
- ! kbufp[kill_index] = kp;
- }
-
- /* and reset all the kill buffer pointers */
- ! kbufh[kill_index] = kbufp[kill_index] = NULL;
- ! kskip[kill_index] = 0;
- ! kused[kill_index] = KBLOCK;
- }
- }
-
- + /* next_kill: advance to the next position in the kill ring,
- + pushing the current kill buffer and clearing
- + what will be the new kill buffer
- + */
- +
- + PASCAL NEAR next_kill()
- +
- + {
- + /* advance to the next kill ring entry */
- + kill_index++;
- + if (kill_index == NRING)
- + kill_index = 0;
- +
- + /* and clear it, so it is ready for use */
- + kdelete();
- + }
- +
- /*
- * Insert a character to the kill buffer, allocating new chunks as needed.
- * Return TRUE if all is well, and FALSE on errors.
- ***************
- *** 884,924 ****
- if (direct == FORWARD) {
-
- /* check to see if we need a new chunk */
- ! if (kused >= KBLOCK) {
- if ((nchunk = (KILL *)malloc(sizeof(KILL))) == NULL)
- return(FALSE);
- ! if (kbufh == NULL) /* set head ptr if first time */
- ! kbufh = nchunk;
- ! if (kbufp != NULL) /* point the current to this new one */
- ! kbufp->d_next = nchunk;
- ! kbufp = nchunk;
- ! kbufp->d_next = NULL;
- ! kused = 0;
- }
-
- /* and now insert the character */
- ! kbufp->d_chunk[kused++] = c;
- } else {
- /* BACKWARDS */
- /* check to see if we need a new chunk */
- ! if (kskip == 0) {
- if ((nchunk = (KILL *)malloc(sizeof(KILL))) == NULL)
- return(FALSE);
- ! if (kbufh == NULL) { /* set head ptr if first time */
- ! kbufh = nchunk;
- ! kbufp = nchunk;
- ! kskip = KBLOCK;
- ! kused = KBLOCK;
- nchunk->d_next = (KILL *)NULL;
- } else {
- ! nchunk->d_next = kbufh;
- ! kbufh = nchunk;
- ! kskip = KBLOCK;
- }
- }
-
- /* and now insert the character */
- ! kbufh->d_chunk[--kskip] = c;
- }
- return(TRUE);
- }
- --- 905,945 ----
- if (direct == FORWARD) {
-
- /* check to see if we need a new chunk */
- ! if (kused[kill_index] >= KBLOCK) {
- if ((nchunk = (KILL *)malloc(sizeof(KILL))) == NULL)
- return(FALSE);
- ! if (kbufh[kill_index] == NULL) /* set head ptr if first time */
- ! kbufh[kill_index] = nchunk;
- ! if (kbufp[kill_index] != NULL) /* point the current to this new one */
- ! kbufp[kill_index]->d_next = nchunk;
- ! kbufp[kill_index] = nchunk;
- ! kbufp[kill_index]->d_next = NULL;
- ! kused[kill_index] = 0;
- }
-
- /* and now insert the character */
- ! kbufp[kill_index]->d_chunk[kused[kill_index]++] = c;
- } else {
- /* BACKWARDS */
- /* check to see if we need a new chunk */
- ! if (kskip[kill_index] == 0) {
- if ((nchunk = (KILL *)malloc(sizeof(KILL))) == NULL)
- return(FALSE);
- ! if (kbufh[kill_index] == NULL) { /* set head ptr if first time */
- ! kbufh[kill_index] = nchunk;
- ! kbufp[kill_index] = nchunk;
- ! kskip[kill_index] = KBLOCK;
- ! kused[kill_index] = KBLOCK;
- nchunk->d_next = (KILL *)NULL;
- } else {
- ! nchunk->d_next = kbufh[kill_index];
- ! kbufh[kill_index] = nchunk;
- ! kskip[kill_index] = KBLOCK;
- }
- }
-
- /* and now insert the character */
- ! kbufh[kill_index]->d_chunk[--kskip[kill_index]] = c;
- }
- return(TRUE);
- }
- ***************
- *** 946,954 ****
- return(rdonly()); /* we are in read only mode */
- if (n < 0)
- return(FALSE);
- /* make sure there is something to yank */
- ! if (kbufh == NULL)
- return(TRUE); /* not an error, just nothing */
-
- /*
- * Save the local pointers to hold global ".".
- --- 967,978 ----
- return(rdonly()); /* we are in read only mode */
- if (n < 0)
- return(FALSE);
- +
- /* make sure there is something to yank */
- ! if (kbufh[kill_index] == NULL) {
- ! last_size = 0L;
- return(TRUE); /* not an error, just nothing */
- + }
-
- /*
- * Save the local pointers to hold global ".".
- ***************
- *** 964,995 ****
-
- /* for each time.... */
- while (n--) {
- ! if (kskip > 0) {
- ! kptr = kbufh;
- ! sp = &(kptr->d_chunk[kskip]);
- ! counter = kskip;
- while (counter++ < KBLOCK) {
- Char_insert(*sp);
- ++sp;
- }
- kptr = kptr->d_next;
- } else {
- ! kptr = kbufh;
- }
-
- if (kptr != (KILL *)NULL) {
- ! while (kptr != kbufp) {
- sp = kptr->d_chunk;
- for(counter = 0; counter < KBLOCK; counter++) {
- Char_insert(*sp);
- ++sp;
- }
- kptr = kptr->d_next;
- }
- ! counter = kused;
- sp = kptr->d_chunk;
- while (counter--) {
- Char_insert(*sp);
- ++sp;
- }
- }
- --- 988,1023 ----
-
- /* for each time.... */
- while (n--) {
- ! last_size = 0L;
- ! if (kskip[kill_index] > 0) {
- ! kptr = kbufh[kill_index];
- ! sp = &(kptr->d_chunk[kskip[kill_index]]);
- ! counter = kskip[kill_index];
- while (counter++ < KBLOCK) {
- Char_insert(*sp);
- + last_size++;
- ++sp;
- }
- kptr = kptr->d_next;
- } else {
- ! kptr = kbufh[kill_index];
- }
-
- if (kptr != (KILL *)NULL) {
- ! while (kptr != kbufp[kill_index]) {
- sp = kptr->d_chunk;
- for(counter = 0; counter < KBLOCK; counter++) {
- Char_insert(*sp);
- + last_size++;
- ++sp;
- }
- kptr = kptr->d_next;
- }
- ! counter = kused[kill_index];
- sp = kptr->d_chunk;
- while (counter--) {
- Char_insert(*sp);
- + last_size++;
- ++sp;
- }
- }
- ***************
- *** 1002,1007 ****
- --- 1030,1094 ----
- curwp->w_dotp = lforw(curline);
- curwp->w_doto = curoff;
- }
- + thisflag |= CFYANK;
- + return(TRUE);
- + }
- +
- + PASCAL NEAR cycle_ring(f, n)
- +
- + int f,n; /* prefix flag and argument */
- +
- + {
- + register int orig_index; /* original kill_index */
- +
- + /* if there is an argument, cycle the kill index */
- + if (f) {
- + while (n) {
- + orig_index = kill_index;
- + do {
- + kill_index--;
- + if (kill_index < 0)
- + kill_index = NRING - 1;
- + } while ((orig_index != kill_index) &&
- + (kbufh[kill_index] == (KILL *)NULL));
- + n--;
- + }
- + }
- + }
- +
- + PASCAL NEAR yank_pop(f, n)
- +
- + int f,n; /* prefix flag and argument */
- +
- + {
- + /* defaulted non first call will cycle by 1 */
- + if ((lastflag & CFYANK) && (f == FALSE)) {
- + f = TRUE;
- + n = 1;
- + }
- +
- + /* cycle the kill ring appropriately */
- + cycle_ring(f, n);
- +
- + /* if not the first consectutive time, delete the last yank */
- + if ((lastflag & CFYANK))
- + ldelete(-last_size, FALSE);
- +
- + /* and insert the current kill buffer */
- + return(yank(FALSE, 1));
- + }
- +
- + PASCAL NEAR clear_ring(f, n)
- +
- + int f,n; /* prefix flag and argument */
- +
- + {
- + register int index;
- +
- + for (index = 0; index < NRING; index++)
- + next_kill();
- + mlwrite(TEXT228);
- + /* "[Kill ring cleared]" */
- return(TRUE);
- }
-
- ***************
- *** 1014,1030 ****
- char *sp;
- int counter;
-
- ! if (kbufh == (KILL *)NULL) {
- printf("<EMPTY>\n");
- return;
- }
-
- index = 1;
- ! if (kskip > 0) {
- ! kptr = kbufh;
- ! printf("kskip = %d\nBLOCK %d <", kskip, index++);
- ! sp = &(kptr->d_chunk[kskip]);
- ! counter = kskip;
- while (counter++ < KBLOCK) {
- putchar(*sp++);
- }
- --- 1101,1117 ----
- char *sp;
- int counter;
-
- ! if (kbufh[kill_index] == (KILL *)NULL) {
- printf("<EMPTY>\n");
- return;
- }
-
- index = 1;
- ! if (kskip[kill_index] > 0) {
- ! kptr = kbufh[kill_index];
- ! printf("kskip[kill_index] = %d\nBLOCK %d <", kskip[kill_index], index++);
- ! sp = &(kptr->d_chunk[kskip[kill_index]]);
- ! counter = kskip[kill_index];
- while (counter++ < KBLOCK) {
- putchar(*sp++);
- }
- ***************
- *** 1031,1051 ****
- printf(">\n");
- kptr = kptr->d_next;
- } else {
- ! kptr = kbufh;
- }
-
- if (kptr != (KILL *)NULL) {
- ! while (kptr != kbufp) {
- printf("BLOCK %d <%255s>\n", index++, kptr->d_chunk);
- kptr = kptr->d_next;
- }
- printf("BLOCK %d <", index++);
- ! counter = kused;
- sp = kptr->d_chunk;
- while (counter--) {
- putchar(*sp++);
- }
- ! printf(">\nkused = %d\n", kused);
- }
-
- }
- --- 1118,1138 ----
- printf(">\n");
- kptr = kptr->d_next;
- } else {
- ! kptr = kbufh[kill_index];
- }
-
- if (kptr != (KILL *)NULL) {
- ! while (kptr != kbufp[kill_index]) {
- printf("BLOCK %d <%255s>\n", index++, kptr->d_chunk);
- kptr = kptr->d_next;
- }
- printf("BLOCK %d <", index++);
- ! counter = kused[kill_index];
- sp = kptr->d_chunk;
- while (counter--) {
- putchar(*sp++);
- }
- ! printf(">\nkused[kill_index] = %d\n", kused[kill_index]);
- }
-
- }
- *** ../orig/main.c Mon Jul 27 21:51:53 1992
- --- main.c Mon Jul 27 21:54:53 1992
- ***************
- *** 27,32 ****
- --- 27,36 ----
-
- /* for many different systems, increase the default stack space */
-
- + #if MSDOS && MSC
- + unsigned _stackavail = 20000;
- + #endif
- +
- #if MSDOS && LATTICE
- unsigned _stack = 20000;
- #endif
- ***************
- *** 149,156 ****
- bp = bheadp;
- }
-
- ! /* and the kill buffer */
- ! kdelete();
-
- /* clear some search variables */
- #if MAGIC
- --- 153,160 ----
- bp = bheadp;
- }
-
- ! /* and the kill buffers */
- ! clear_ring();
-
- /* clear some search variables */
- #if MAGIC
- ***************
- *** 374,379 ****
- --- 378,384 ----
- register int mflag; /* negative flag on repeat */
- register int basec; /* c stripped of meta character */
- register int oldflag; /* old last flag value */
- + char time[6]; /* current display time */
-
- /* setup to process commands */
- lastflag = 0; /* Fake last flags. */
- ***************
- *** 407,412 ****
- --- 412,428 ----
- }
- #endif
-
- + /* update time on the bottom modeline? */
- + if (timeflag) {
- + getdtime(time);
- + if (strcmp(lasttime, time) != 0)
- + upmode();
- + }
- +
- + /* update position on current modeline? */
- + if (posflag)
- + upmode();
- +
- /* Fix up the screen */
- update(FALSE);
-
- ***************
- *** 526,531 ****
- --- 542,557 ----
-
- {
- register BUFFER *bp;
- + register int index;
- +
- + /* init the kill ring */
- + for (index = 0; index < NRING; index++) {
- + kbufp[index] = (KILL *)NULL;
- + kbufh[index] = (KILL *)NULL;
- + kskip[index] = 0;
- + kused[index] = KBLOCK;
- + }
- + kill_index = 0;
-
- /* initialize some important globals */
-
- ***************
- *** 544,550 ****
-
- /* allocate the first buffer */
- bp = bfind(bname, TRUE, 0); /* First buffer */
- ! blistp = bfind("[List]", TRUE, BFINVS); /* Buffer list buffer */
- slistp = bfind("[Screens]", TRUE, BFINVS); /* Buffer list buffer */
- if (bp==NULL || blistp==NULL)
- meexit(1);
- --- 570,576 ----
-
- /* allocate the first buffer */
- bp = bfind(bname, TRUE, 0); /* First buffer */
- ! blistp = bfind("[Buffers]", TRUE, BFINVS); /* Buffer list buffer */
- slistp = bfind("[Screens]", TRUE, BFINVS); /* Buffer list buffer */
- if (bp==NULL || blistp==NULL)
- meexit(1);
- *** ../orig/platin.h Mon Jul 27 21:51:54 1992
- --- platin.h Mon Jul 27 21:55:44 1992
- ***************
- *** 232,235 ****
- --- 232,236 ----
- #define TEXT225 "[Switched to screen %s]"
- #define TEXT226 "%%Can not kill an executing buffer"
- #define TEXT227 "\n--- Press any key to Continue ---"
- + #define TEXT228 "[Illkay ingray earedclay]"
-
- *** ../orig/random.c Mon Jul 27 21:51:55 1992
- --- random.c Mon Jul 27 21:54:56 1992
- ***************
- *** 745,751 ****
- return(backdel(f, -n));
- if (f != FALSE) { /* Really a kill. */
- if ((lastflag&CFKILL) == 0)
- ! kdelete();
- thisflag |= CFKILL;
- }
- return(ldelete((long)n, f));
- --- 745,751 ----
- return(backdel(f, -n));
- if (f != FALSE) { /* Really a kill. */
- if ((lastflag&CFKILL) == 0)
- ! next_kill();
- thisflag |= CFKILL;
- }
- return(ldelete((long)n, f));
- ***************
- *** 770,776 ****
- return(forwdel(f, -n));
- if (f != FALSE) { /* Really a kill. */
- if ((lastflag&CFKILL) == 0)
- ! kdelete();
- thisflag |= CFKILL;
- }
- if ((s=backchar(f, n)) == TRUE)
- --- 770,776 ----
- return(forwdel(f, -n));
- if (f != FALSE) { /* Really a kill. */
- if ((lastflag&CFKILL) == 0)
- ! next_kill();
- thisflag |= CFKILL;
- }
- if ((s=backchar(f, n)) == TRUE)
- ***************
- *** 797,803 ****
- if (curbp->b_mode&MDVIEW) /* don't allow this command if */
- return(rdonly()); /* we are in read only mode */
- if ((lastflag&CFKILL) == 0) /* Clear kill buffer if */
- ! kdelete(); /* last wasn't a kill. */
- thisflag |= CFKILL;
-
- if (f == FALSE) {
- --- 797,803 ----
- if (curbp->b_mode&MDVIEW) /* don't allow this command if */
- return(rdonly()); /* we are in read only mode */
- if ((lastflag&CFKILL) == 0) /* Clear kill buffer if */
- ! next_kill(); /* last wasn't a kill. */
- thisflag |= CFKILL;
-
- if (f == FALSE) {
- *** ../orig/region.c Mon Jul 27 21:51:55 1992
- --- region.c Mon Jul 27 21:54:57 1992
- ***************
- *** 64,70 ****
- if ((s=getregion(®ion)) != TRUE)
- return(s);
- if ((lastflag&CFKILL) == 0) /* This is a kill type */
- ! kdelete(); /* command, so do magic */
- thisflag |= CFKILL; /* kill buffer stuff. */
- curwp->w_dotp = region.r_linep;
- curwp->w_doto = region.r_offset;
- --- 64,70 ----
- if ((s=getregion(®ion)) != TRUE)
- return(s);
- if ((lastflag&CFKILL) == 0) /* This is a kill type */
- ! next_kill(); /* command, so do magic */
- thisflag |= CFKILL; /* kill buffer stuff. */
- curwp->w_dotp = region.r_linep;
- curwp->w_doto = region.r_offset;
- ***************
- *** 90,96 ****
- if ((s=getregion(®ion)) != TRUE)
- return(s);
- if ((lastflag&CFKILL) == 0) /* Kill type command. */
- ! kdelete();
- thisflag |= CFKILL;
- linep = region.r_linep; /* Current line. */
- loffs = region.r_offset; /* Current offset. */
- --- 90,96 ----
- if ((s=getregion(®ion)) != TRUE)
- return(s);
- if ((lastflag&CFKILL) == 0) /* Kill type command. */
- ! next_kill();
- thisflag |= CFKILL;
- linep = region.r_linep; /* Current line. */
- loffs = region.r_offset; /* Current offset. */
- *** ../orig/search.c Mon Jul 27 21:51:56 1992
- --- search.c Mon Jul 27 21:55:00 1992
- ***************
- *** 12,23 ****
- #include "edef.h"
- #include "elang.h"
-
- - /* The variables matchline and matchoff hold the line
- - * and offset position of the *start* of the match.
- - */
- - static int matchlen;
- - static int matchoff;
- - static LINE *matchline;
- static int patlenadd;
- static int lastchfjump, lastchbjump;
- static int deltaf[HICHAR], deltab[HICHAR];
- --- 12,17 ----
- ***************
- *** 366,383 ****
- }
- }
- else if (mcptr->mc_type == GRPBEG) {
- ! if (direct == FORWARD) {
- ! group_reg[mcptr->u.group_no].r_offset = curoff;
- ! group_reg[mcptr->u.group_no].r_linep = curline;
- ! }
- ! group_reg[mcptr->u.group_no].r_size = -matchlen;
- }
- else if (mcptr->mc_type == GRPEND) {
- ! if (direct == REVERSE) {
- ! group_reg[mcptr->u.group_no].r_offset = curoff;
- ! group_reg[mcptr->u.group_no].r_linep = curline;
- ! }
- ! group_len[mcptr->u.group_no] = matchlen;
- }
- else if (mcptr->mc_type == BOL) {
- if (curoff != 0)
- --- 360,371 ----
- }
- }
- else if (mcptr->mc_type == GRPBEG) {
- ! group_reg[mcptr->u.group_no].r_offset = curoff;
- ! group_reg[mcptr->u.group_no].r_linep = curline;
- ! group_reg[mcptr->u.group_no].r_size = (direct == FORWARD)? -matchlen: matchlen;
- }
- else if (mcptr->mc_type == GRPEND) {
- ! group_len[mcptr->u.group_no] = (direct == FORWARD)? matchlen: -matchlen;
- }
- else if (mcptr->mc_type == BOL) {
- if (curoff != 0)
- ***************
- *** 543,549 ****
- curline = *pcurline;
- curoff = *pcuroff;
-
- ! if (dir == FORWARD) {
- while (jump != 0) {
- curoff += jump;
- spare = curoff - llength(curline);
- --- 531,538 ----
- curline = *pcurline;
- curoff = *pcuroff;
-
- ! if (dir == FORWARD)
- ! {
- while (jump != 0) {
- curoff += jump;
- spare = curoff - llength(curline);
- ***************
- *** 722,728 ****
- char tpat[NPAT+20];
-
- strcpy(tpat, prompt); /* copy prompt to output string */
- ! strcat(tpat, " ["); /* build new prompt string */
- expandp(&apat[0], &tpat[strlen(tpat)], NPAT/2); /* add old pattern */
- strcat(tpat, "]");
-
- --- 711,717 ----
- char tpat[NPAT+20];
-
- strcpy(tpat, prompt); /* copy prompt to output string */
- ! strcat(tpat, " [");
- expandp(&apat[0], &tpat[strlen(tpat)], NPAT/2); /* add old pattern */
- strcat(tpat, "]");
-
- ***************
- *** 739,745 ****
-
- /* Read a pattern. Either we get one,
- * or we just get the META charater, and use the previous pattern.
- ! * Then, if it's the search string, make a reversed pattern.
- * *Then*, make the meta-pattern, if we are defined that way.
- */
- if ((status = mltreply(tpat, tpat, NPAT, sterm)) == TRUE) {
- --- 728,734 ----
-
- /* Read a pattern. Either we get one,
- * or we just get the META charater, and use the previous pattern.
- ! * Then, if it's the search string, create the delta tables.
- * *Then*, make the meta-pattern, if we are defined that way.
- */
- if ((status = mltreply(tpat, tpat, NPAT, sterm)) == TRUE) {
- ***************
- *** 746,754 ****
- lastflag &= ~CFSRCH;
- strcpy(apat, tpat);
-
- - /* If we are doing the search string,
- - * set the delta tables.
- - */
- if (srch)
- setjtable();
-
- --- 735,740 ----
- ***************
- *** 791,812 ****
- tmpreg.r_offset = matchoff;
- tmpreg.r_linep = matchline;
- tmpreg.r_size = matchlen;
- - regtostr(patmatch, &tmpreg);
-
- ! #if MAGIC
- /*
- * Save the groups.
- */
- ! grpmatch[0] = patmatch;
- ! for (j = 1; j <= group_count; j++) {
- group_reg[j].r_size += group_len[j];
- ! if (grpmatch[j] != NULL) {
- free(grpmatch[j]);
- - }
-
- ! if ((grpmatch[j] = malloc(group_reg[j].r_size + 1)) != NULL) {
- regtostr(grpmatch[j], &group_reg[j]);
- ! } else {
- mlwrite(TEXT94);
- /* "%%Out of memory" */
- return ABORT;
- --- 777,800 ----
- tmpreg.r_offset = matchoff;
- tmpreg.r_linep = matchline;
- tmpreg.r_size = matchlen;
-
- ! #if MAGIC == 0
- ! regtostr(patmatch, &tmpreg);
- ! #else
- /*
- * Save the groups.
- */
- ! grpmatch[0] = regtostr(patmatch, &tmpreg);
- ! for (j = 1; j <= group_count; j++)
- ! {
- group_reg[j].r_size += group_len[j];
- !
- ! if (grpmatch[j] != NULL)
- free(grpmatch[j]);
-
- ! if ((grpmatch[j] = malloc(group_reg[j].r_size + 1)) != NULL)
- regtostr(grpmatch[j], &group_reg[j]);
- ! else {
- mlwrite(TEXT94);
- /* "%%Out of memory" */
- return ABORT;
- ***************
- *** 1026,1032 ****
- /* if this is the point origin, flag so we a can reset it */
- if (curwp->w_dotp == origline) {
- origline = NULL;
- ! lastline = curwp->w_dotp->l_bp;
- }
-
- /* Delete the sucker, and insert its
- --- 1014,1020 ----
- /* if this is the point origin, flag so we a can reset it */
- if (curwp->w_dotp == origline) {
- origline = NULL;
- ! lastline = lback(curwp->w_dotp);
- }
-
- /* Delete the sucker, and insert its
- ***************
- *** 1038,1044 ****
- status = delins(matchlen, &rpat[0], FALSE);
- #endif
- if (origline == NULL) {
- ! origline = lastline->l_fp;
- origoff = 0;
- }
-
- --- 1026,1032 ----
- status = delins(matchlen, &rpat[0], FALSE);
- #endif
- if (origline == NULL) {
- ! origline = lforw(lastline);
- origoff = 0;
- }
-
- ***************
- *** 1430,1437 ****
- #else
- *rtpcm = *--mcptr;
- #endif
- - if (rtpcm->mc_type & (GRPBEG | GRPEND))
- - rtpcm->mc_type ^= (GRPBEG | GRPEND);
- rtpcm++;
- }
- rtpcm->mc_type = MCNIL;
- --- 1418,1423 ----
- *** ../orig/spanish.h Mon Jul 27 21:51:56 1992
- --- spanish.h Mon Jul 27 21:55:44 1992
- ***************
- *** 232,235 ****
- --- 232,236 ----
- #define TEXT225 "[Switched to screen %s]"
- #define TEXT226 "%%Can not kill an executing buffer"
- #define TEXT227 "\n--- Press any key to Continue ---"
- + #define TEXT228 "[Kill ring cleared]"
-
- *** ../orig/unix.c Mon Jul 27 21:51:58 1992
- --- unix.c Mon Jul 27 22:09:01 1992
- ***************
- *** 91,96 ****
- --- 91,99 ----
- /** Overall include files **/
- #include <sys/types.h> /* System type definitions */
- #include <sys/stat.h> /* File status definitions */
- + #if PC_BSD
- + #include <sys/ioctl_compat.h>
- + #endif /* PC_BSD */
- #include <sys/ioctl.h> /* I/O control definitions */
-
- /** Additional include files **/
- ***************
- *** 117,127 ****
- #include <sys/dir.h> /* Directory entry definitions */
- #define DIRENTRY direct
- #endif /* BSD */
- ! #if XENIX
- #include <sys/ndir.h> /* Directory entry definitions */
- #define DIRENTRY direct
- #endif /* XENIX */
- ! #if USG || SMOS || HPUX || SUN || AVIION
- #include <dirent.h> /* Directory entry definitions */
- #define DIRENTRY dirent
- #endif /* USG || SMOS || HPUX || SUN || AVIION */
- --- 120,130 ----
- #include <sys/dir.h> /* Directory entry definitions */
- #define DIRENTRY direct
- #endif /* BSD */
- ! #if XENIX || VAT
- #include <sys/ndir.h> /* Directory entry definitions */
- #define DIRENTRY direct
- #endif /* XENIX */
- ! #if (USG && !VAT) || SMOS || HPUX || SUN || AVIION
- #include <dirent.h> /* Directory entry definitions */
- #define DIRENTRY dirent
- #endif /* USG || SMOS || HPUX || SUN || AVIION */
- ***************
- *** 160,165 ****
- --- 163,169 ----
- char * name; /* Termcap name */
- int value; /* Binding value */
- };
- + char *reset = (char*) NULL; /* reset string kjc */
- #endif /* TERMCAP */
-
- /** Local variables **/
- ***************
- *** 253,258 ****
- --- 257,263 ----
- { "k8", SPEC|'8' }, /* F8 key */
- { "k9", SPEC|'9' }, /* F9 key */
- { "k0", SPEC|'0' }, /* F0 or F10 key */
- + { "k;", SPEC|'0' }, /* F0 or F10 key (kjc) */
- { "kA", CTRL|'O' }, /* Insert line key */
- { "kb", CTRL|'H' }, /* Backspace key */
- { "kC", CTRL|'L' }, /* Clear screen key */
- ***************
- *** 261,266 ****
- --- 266,272 ----
- { "kE", CTRL|'K' }, /* Clear to end of line key */
- { "kF", CTRL|'V' }, /* Scroll forward key */
- { "kH", SPEC|'>' }, /* Home down key */
- + { "@7", SPEC|'>' }, /* Home down key (kjc) */
- { "kh", SPEC|'<' }, /* Home key */
- { "kI", SPEC|'C' }, /* Insert character key */
- { "kL", CTRL|'K' }, /* Delete line key */
- ***************
- *** 304,309 ****
- --- 310,316 ----
- 0, /* Current number of columns */
- MARGIN, /* Margin for extending lines */
- SCRSIZ, /* Scroll size for extending */
- + 0, 0, /* upper left corner default screen */
- NPAUSE, /* # times thru update to pause */
- scopen, /* Open terminal routine */
- scclose, /* Close terminal routine */
- ***************
- *** 315,320 ****
- --- 322,328 ----
- scmove, /* Move cursor routine */
- sceeol, /* Erase to end of line routine */
- sceeop, /* Erase to end of page routine */
- + sceeop, /* Clear the desktop */
- scbeep, /* Beep! routine */
- screv, /* Set reverse video routine */
- scnothing, /* Set resolution routine */
- ***************
- *** 429,434 ****
- --- 437,445 ----
- int ttclose()
- {
- /* Restore original terminal modes */
- + if (reset != (char*)NULL)
- + write(1, reset, strlen(reset));
- +
- #if BSD
- if (ioctl(0, TIOCSETP, &oldsgtty) ||
- ioctl(0, TIOCSETC, &oldtchars) ||
- ***************
- *** 771,781 ****
- --- 782,796 ----
- return(0);
- return(count);
- #else /* not FIONREAD */
- + #ifdef VAT
- + return(0);
- + #else /* not VAT */
- /* Ask hardware for count */
- count = ioctl(0, FIORDCHK, 0);
- if (count < 0)
- return(0);
- return(count);
- + #endif /* VAT */
- #endif /* FIONREAD */
- }
- #endif /* TYPEAH */
- ***************
- *** 804,810 ****
- struct keybind * kp;
-
- char * getenv(), * tgetstr();
- ! #if HPUX
- /* HP-UX doesn't seem to have these in the termcap library */
- char PC, * UP;
- short ospeed;
- --- 819,832 ----
- struct keybind * kp;
-
- char * getenv(), * tgetstr();
- !
- ! #ifndef VAT
- ! #define TGETSTR(a,b) tgetstr((a), (b))
- ! #else
- ! #define TGETSTR(a,b) tgetstr((a), *(b))
- ! #endif
- !
- ! #if HPUX || VAT
- /* HP-UX doesn't seem to have these in the termcap library */
- char PC, * UP;
- short ospeed;
- ***************
- *** 842,858 ****
- /* Start grabbing termcap commands */
- cp = tcapbuf;
-
- /* Get the pad character */
- if (tgetstr("pc", &cp))
- PC = tcapbuf[0];
-
- /* Get up line capability */
- ! UP = tgetstr("up", &cp);
-
- /* Get other capabilities */
- cb = capbind;
- while (cb < &capbind[sizeof(capbind)/sizeof(*capbind)]) {
- ! cb->store = tgetstr(cb->name, &cp);
- cb++;
- }
-
- --- 864,883 ----
- /* Start grabbing termcap commands */
- cp = tcapbuf;
-
- + /* Get the reset string */
- + reset = TGETSTR("is", &cp);
- +
- /* Get the pad character */
- if (tgetstr("pc", &cp))
- PC = tcapbuf[0];
-
- /* Get up line capability */
- ! UP = TGETSTR("up", &cp);
-
- /* Get other capabilities */
- cb = capbind;
- while (cb < &capbind[sizeof(capbind)/sizeof(*capbind)]) {
- ! cb->store = TGETSTR(cb->name, &cp);
- cb++;
- }
-
- ***************
- *** 871,877 ****
- /* Get keybindings */
- kp = keybind;
- while (kp < &keybind[sizeof(keybind)/sizeof(*keybind)]) {
- ! addkey(tgetstr(kp->name, &cp), kp->value);
- kp++;
- }
-
- --- 896,902 ----
- /* Get keybindings */
- kp = keybind;
- while (kp < &keybind[sizeof(keybind)/sizeof(*keybind)]) {
- ! addkey(TGETSTR(kp->name, &cp), kp->value);
- kp++;
- }
-
- ***************
- *** 943,948 ****
- --- 968,975 ----
- int row; /* Row number */
- int col; /* Column number */
- {
- + char *tgoto();
- +
- #if TERMCAP
- /* Call on termcap to create move sequence */
- putpad(tgoto(capbind[CAP_CM].store, col, row));
- *** ../orig/word.c Mon Jul 27 21:51:59 1992
- --- word.c Mon Jul 27 21:55:05 1992
- ***************
- *** 292,298 ****
-
- /* Clear the kill buffer if last command wasn't a kill */
- if ((lastflag&CFKILL) == 0)
- ! kdelete();
- thisflag |= CFKILL; /* this command is a kill */
-
- /* save the current cursor position */
- --- 292,298 ----
-
- /* Clear the kill buffer if last command wasn't a kill */
- if ((lastflag&CFKILL) == 0)
- ! next_kill();
- thisflag |= CFKILL; /* this command is a kill */
-
- /* save the current cursor position */
- ***************
- *** 381,387 ****
-
- /* Clear the kill buffer if last command wasn't a kill */
- if ((lastflag&CFKILL) == 0)
- ! kdelete();
- thisflag |= CFKILL; /* this command is a kill */
-
- if (backchar(FALSE, 1) == FALSE)
- --- 381,387 ----
-
- /* Clear the kill buffer if last command wasn't a kill */
- if ((lastflag&CFKILL) == 0)
- ! next_kill();
- thisflag |= CFKILL; /* this command is a kill */
-
- if (backchar(FALSE, 1) == FALSE)
- ***************
- *** 484,491 ****
- lp = lp->l_fp;
- }
-
- /* create a buffer to hold this stuff */
- ! para = malloc(psize + 100); /***** THIS IS TEMP *****/
- if (para == NULL) {
- mlwrite(TEXT94);
- /* "%%Out of memory" */
- --- 484,495 ----
- lp = lp->l_fp;
- }
-
- + /* must have size! */
- + if (psize == 0)
- + return(TRUE);
- +
- /* create a buffer to hold this stuff */
- ! para = malloc(psize + 10); /* this prabably could be + 1 */
- if (para == NULL) {
- mlwrite(TEXT94);
- /* "%%Out of memory" */
-