# ed - errs << '-*-END-*-' 1,15c cc -E -DTABS=8 -DLISPCODE -DCHDIR -DUCVISUAL -DMACROS -DVFORK -DVMUNIX -O ex_cmds.c | /usr/ucb/xstr -c - cc -DTABS=8 -DLISPCODE -DCHDIR -DUCVISUAL -DMACROS -DVFORK -DVMUNIX -O -c x.c mv x.o ex_cmds.o /usr/ucb/xstr cc -c -S xs.c ed - <:rofix xs.s as -o strings.o xs.s rm xs.s . w q '-*-END-*-' ed - ex.c << '-*-END-*-' 121a #endif . 117a #ifndef VMUNIX . 103a #endif . 101a #ifndef VMUNIX . 73a #endif . 72a #ifndef VMUNIX . w q '-*-END-*-' ed - ex.h << '-*-END-*-' 182c int xchng; /* Suppresses multiple "No writes" in !cmd */ . 178c int tchng; /* If nonzero, then [Modified] */ . 167c int otchng; /* Backup tchng to find changes in macros */ . 163c int notecnt; /* Count for notify (to visual from cmd) */ . 140a #endif . 139a #ifndef VMUNIX . 136c int dirtcnt; /* When >= MAXDIRT, should sync temporary */ . 133c int chng; /* Warn "No write" */ . 107a #endif . 106a #ifdef VMUNIX # define BUFSIZ 1024 #else . 53a #else typedef int line; #endif . 52a #ifndef VMUNIX . w q '-*-END-*-' ed - ex_argv.h << '-*-END-*-' 17c int firstln; /* From +lineno */ . w q '-*-END-*-' ed - ex_cmds.c << '-*-END-*-' 599c printf("Version 3.2, January 4, 1980"); . 263a */ . 262a /* . w q '-*-END-*-' ed - ex_cmdsub.c << '-*-END-*-' 1039,1040c if (src[1] == 0 && src[0] == dest[strlen(dest)-1]) error("No tail recursion"); . 1034,1035c * Prevent tail recursion. We really should be * checking to see if src is a suffix of dest . 543a value(MAGIC) = 0; . 536a value(MAGIC) = omagic; . 533a /* * BUG: if it isn't found (user edited header * line) we get left in nomagic mode. */ value(MAGIC) = 0; . 459d w q '-*-END-*-' ed - ex_data.c << '-*-END-*-' 42a "mapinput", "mi", ONOFF, 0, 0, 0, . 41d w q '-*-END-*-' ed - ex_io.c << '-*-END-*-' 692a #endif . 691a #ifndef VMUNIX . 479a */ . 478a /* . 21a #else int cntln; #endif . 20a #ifndef VMUNIX . 16,17c int altdot; int oldadot; . w q '-*-END-*-' ed - ex_re.c << '-*-END-*-' 413c error("Line overflow@in substitute"); . w q '-*-END-*-' ed - ex_subr.c << '-*-END-*-' 587a #endif . 586a #ifdef VMUNIX char *std_errlist[] = { #else . 352a #endif . 349a #ifdef VMUNIX strcpy(linebuf, seekpt); #else . 346a # endif . 345a # ifdef lint char *seekpt; # else . 343c #ifdef VMUNIX . 322a # endif . 321a # ifdef lint char *seekpt; # else . 319c #ifdef VMUNIX . w q '-*-END-*-' ed - ex_temp.c << '-*-END-*-' 30,32c tline = INCRMT * (HBLKS+2); blocks[0] = HBLKS; blocks[1] = HBLKS+1; . 26c if (tline == INCRMT * (HBLKS+2)) . w q '-*-END-*-' ed - ex_temp.h << '-*-END-*-' 86a #else int Flines; #endif . 85a #ifndef VMUNIX . 62a #else int tline; #endif . 61a #ifndef VMUNIX . 40,41c * Basically, the editor deals with the file as a sequence of BUFSIZ character * blocks. Each block contains some number of lines (and lines . 35a #else #define BLKMSK 077777 #define BNDRY 2 #define INCRMT 02000 #define LBTMSK 01776 #define NMBLKS 077770 #define OFFBTS 10 #define OFFMSK 01777 #define SHFT 0 #endif . 27a #ifndef VMUNIX . 24,26c * For VMUNIX you get more than you could ever want. * VMUNIX uses long (32 bit) integers giving much more * space in the temp file and no waste. This doubles core * requirements but allows files of essentially unlimited size to be edited. . 7,9c * is packed into 16 bits (32 on VMUNIX). All but the low bit index the temp * file; the last is used by global commands. The parameters below control * how much the other bits are shifted left before they index the temp file. . w q '-*-END-*-' ed - ex_tune.h << '-*-END-*-' 73c #define TUBESIZE 3400 /* Maximum screen size for visual */ #else #define TUBELINES 66 #define TUBECOLS 160 #define TUBESIZE 6600 /* 66 * 100 */ #endif . 71c #ifndef VMUNIX #define TUBELINES 40 /* Number of screen lines for visual */ . 64c * and then never freed by the system. Thus if you have no terminals . 59c #define NCARGS LBSIZE /* Maximum arglist chars in "next" */ #else #define NCARGS 5120 #define NARGS (NCARGS/6) #endif . 57a #ifndef VMUNIX . 50c * Except on VMUNIX, these are a ridiculously small due to the . 44a #define HBLKS 1 /* struct header fits in BUFSIZ*HBLKS */ #else #define LBLKS 900 #define HBLKS 2 #endif . 43a #ifndef VMUNIX . 35a #endif . 33a #ifdef VMUNIX #define LBSIZE 1024 #define ESIZE 512 #else . 30c * Most other definitions are quite generous. . 13,15c #define EXRECOVER libpath(ex3.2recover) #define EXPRESERVE libpath(ex3.2preserve) #ifndef VMUNIX #define EXSTRINGS libpath(ex3.2strings) #endif . w q '-*-END-*-' ed - ex_vars.h << '-*-END-*-' 12,13c #define MAGIC 11 #define MAPINPUT 12 . w q '-*-END-*-' ed - ex_vget.c << '-*-END-*-' 475a vsave(); . w q '-*-END-*-' ed - ex_vis.h << '-*-END-*-' 217c int vSCROLL; /* Number lines to scroll on ^D/^U */ . 206c int lastcnt; /* Count for last command */ . 195,196c int Vlines; /* Number of file lines "before" vi command */ int Xcnt; /* External variable holding last cmd's count */ . w q '-*-END-*-' ed - ex_vmain.c << '-*-END-*-' 1003a inopen = 1; /* might have been -1 */ . 766c if (value(AUTOWRITE)) globp = "e! #"; else globp = "e #"; . w q '-*-END-*-' ed - ex_vops2.c << '-*-END-*-' 755c * LBSIZE characters and also does hacks for the R command. . w q '-*-END-*-' ed - expreserve.c << '-*-END-*-' 173c if (H.Blocks[0] != HBLKS || H.Blocks[1] != HBLKS+1) { . 33a #else int Flines; #endif . 32a #ifndef VMUNIX . 27a #else #define LBLKS 900 #endif . 26a #ifndef VMUNIX . 9a #ifdef VMUNIX #define HBLKS 2 #else #define HBLKS 1 #endif . w q '-*-END-*-' ed - exrecover.c << '-*-END-*-' 741c if ((*iofcn)(tfile, buf, BUFSIZ) != BUFSIZ) . 567c *ip = (HBLKS*(BUFSIZ-8)) >> SHFT; . 525c maxt = (size >> SHFT) | (BNDRY-1); . 491c ignorl(lseek(tfile, (long)(BUFSIZ*HBLKS-8), 0)); . w q '-*-END-*-' ed - makefile << '-*-END-*-' 130,131c @${PR} -h sys/stat.h ${INCLUDE}/sys/stat.h @${PR} -h sys/types.h ${INCLUDE}/sys/types.h . 105c # cp ex${VERSION}strings ${DESTDIR}/${LIBDIR}/ex${VERSION}strings . 94c # -cp ex${VERSION}strings ${LIBDIR}/ex${VERSION}strings . 84c ${CC} ${CFLAGS} -c -O expreserve.c . 81c ${CC} expreserve.o -o expreserve . 77,78c exrecover.o: exrecover.c ${CC} ${CFLAGS} -c -O exrecover.c . 75c ${CC} ${CFLAGS} exrecover.o -o exrecover . 50,52c # ${MKSTR} - ex${VERSION}strings x $*.c ${CC} -E ${CFLAGS} $*.c | ${XSTR} -c - # rm -f x$*.c . 35c CFLAGS= -DTABS=8 -DLISPCODE -DCHDIR -DUCVISUAL -DMACROS -DVFORK -DVMUNIX ${NONDEBUGFLAGS} . 15a # -DVMUNIX makes an ex which can edit very large files (eg the w2a dictionary) # this allows 200000 lines and about 16M byte temp files. . 1c VERSION=3.2 . w q '-*-END-*-'