Path: utzoo!utgpu!news-server.csri.toronto.edu!rutgers!sun-barr!lll-winken!ncis.tis.llnl.gov!blackbird!lonex.radc.af.mil!wlbr!roger.imsd.contel.com!mh From: mh@roger.imsd.contel.com (Mike H.) Newsgroups: comp.windows.news Subject: NeWS version of elvis (the vi clone) part 2 of 9 Message-ID: <1991Jan11.015157.27020@wlbr.imsd.contel.com> Date: 11 Jan 91 01:51:57 GMT Sender: news@wlbr.imsd.contel.com (news) Distribution: comp Organization: Contel FSD, Westlake Village, CA Lines: 3292 Nntp-Posting-Host: roger.imsd.contel.com #! /bin/sh # This is a shell archive, meaning: # 1. Remove everything above the #! /bin/sh line. # 2. Save the resulting text in a file. # 3. Execute the file with /bin/sh (not csh) to create the files: # CHANGE_NOTES # Makefile # Makefile.mix # config.h # curses.h # elvis_cps.h # osk.h # regexp.h # vi.h # wconfig.h # This archive created: Thu Jan 10 17:21:06 1991 export PATH; PATH=/bin:$PATH if test -f 'CHANGE_NOTES' then echo shar: will not over-write existing file "'CHANGE_NOTES'" else cat << \SHAR_EOF > 'CHANGE_NOTES' Mike Hoegeman's change log, this is not gospel of every single change i made Dec 7 00:00 - date of my copy of elvis version 1.4 ***BUG*** -rw------- 1 mh 16474 Dec 20 20:39 input.c -rw------- 1 mh 13527 Dec 20 20:47 vcmd.c added indentref arg to input(). this is so autoindent works right with the 'O' command. I don't know about anybody else but for me this *has* to work like the standard vi since i use it constantly. ***BUG*** ***BUG*** -rw------- 1 mh 20109 Dec 20 23:14 redraw.c A bug (i put a hack in to work around it. see the /* HACK */ comment) To exercise the bug do the following. - move cursor to a line not at the top or bottom of the screen - make a change (like add a couples of X's at the beginning) - hit '-' to move the cursor up one line - hit 'dd' (it's more obvious if the line you dd is blank) notice that the line the cursor is on is displaying the old deleted line it looks like smartlno is not getting readjusted properly ***BUG*** -rw-r--r-- 1 mh 7618 Dec 20 10:01 elvis.ps Various futzing to get ps file closer to using scalable fonts misc minor tweaks -rw-r--r-- 1 mh 1652 Dec 19 13:38 elvismug.im1 elvismug.im1 is a sun raster format file that has a rather grainy picture of elvis. will use this for icon image when i get around to it. it would be nice to get a better picture. this one came from the pbm package bitmaps. It might look pretty good in color/grayscale. -rw-r--r-- 1 mh 1015 Dec 19 13:03 elvis_cps.cps elvis_cps.cps file mod to get filename on icon. ***BUG*** -rw-r--r-- 1 mh 25955 Dec 20 17:25 Makefile -rw-r--r-- 1 mh 2525 Dec 20 17:23 tnamerec.c -rw------- 1 mh 5248 Dec 20 17:10 virec.c -rw------- 1 mh 8195 Jan 1 15:50 config.h -rw------- 1 mh 12876 Dec 20 13:00 tmp.c Modified tmp.c virec.c config.h and added module tnamerec.c to allow editing multiple instances of the same file at once. May want to just put tnamerec.c into virec.c since that is the only place it is used. The temp file name now has the pid of the process added on to the end with a '-' in front of it (see TMPNAME in config.h). Also changed the tmpfile prefix from elv to El so that a filename would still fit in 14 chars (for sysV). see tnamerec.c for how virec handles this change. Added tnamerec to Makefile of course. note that this won't work for DOG, etc.. but there are suitable ifdefs to make it backwards compatible for those unfortunates. ***BUG*** -rw------- 1 mh 20089 Dec 20 22:23 redraw.c replaced constant 5 in nudgecursor() with macro NUDGE_COST because a move is always cheaper in PostScript than a string display. this will also allow other ports to define their NUDGE_COST's. should this be put in (w)config.h ?? -rw------- 1 mh 8026 Dec 21 12:56 main.c -rw-r--r-- 1 mh 2353 Dec 21 15:06 wconfig.h -rw------- 1 mh 13569 Dec 21 15:05 ow.c Added Customflags() macro to main(), this is to allow custom version of elvis to process any version specific flags without having to clutter up the standard elvis code with ifdefs's. in wconfig.h the macro is defined to a no-op for the standard tty version of elvis. for the openwindows version Customflags() is defined to be ow_customflags in ow.c. ow_customflags() is a good reference for someone wanting to make their own Customflags() function. -rw------- 1 mh 13569 Dec 21 15:05 ow.c -rw------- 1 mh 20227 Dec 21 14:57 redraw.c -rw-r--r-- 1 mh 2353 Dec 21 15:06 wconfig.h Made final fixes to ow termcap modules to switch to using the standard termcap functions if no server is running the Ow.tty global determines which display style to use. Rearranged various ow related globals into a single structure so that conversion to threads will be easier. something similar will have to be done for the regular elvis globals to make it threadable. -rw------- 1 mh 8026 Dec 30 21:52 main.c Changed a resume_curses() call in trapint() to the Resume_curses() macro front end. Somehow I missed this before. Without this fix your parent shell window will wack out if type ctrl C in it after starting an elvis window that is not backgrounded. -rw-r--r-- 1 mh 7852 Jan 1 14:47 elvis.ps Fixed a bug in the /RSR method of ElvisCanvas that left it's argument on the stack, this (eventually) would cause a stack overflow if you scrolled around in a file long enough -rw------- 1 mh 15041 Jan 1 18:18 ow.c -rw------- 1 mh 17635 Jan 1 18:23 tio.c -rw-r--r-- 1 mh 2533 Jan 1 18:21 wconfig.h isolated out the display specific parts of displaying a string on the msg line into the Rendermsg and Appendmsg macro's (in wconfig.h ) :: for the standard termcap interface they are rendermsg and appendmsg ( in tio.c ) :: for the OPENWINDOWS version as ow_rendermsg and ow_appendmsg now in ow.c -rw------- 1 mh 16672 Jan 1 23:20 input.c Replaced beep()'s with Beep()'s. this would mess up the display in subtle ways by trying to render a ^G on the display when using the display version -rw-r--r-- 1 mh 8580 Jan 1 23:06 elvis.ps -rw------- 1 mh 15544 Jan 1 20:29 ow.c Put in the cQ cX cV cI cR capabilities for the OPENWINDOWS version of elvis. Now the cursor changes shape when you switch from insert mode to command mode to the :ex command line -rw-r--r-- 1 mh 8627 Jan 2 20:04 elvis.ps Fixed bug that did not show up until mutiple cursor types were implemented. The ST did not hide the cursor before it started drawing text. this was OK with a simple block cursor because the text always blanked over the of the old cursor completely. -rw------- 1 mh 16880 Jan 4 00:31 input.c Fixed up autoindent a little more to make work work pretty much like the real vi. this was just a 4 or 5 line change below the interactive loop in input() see the MCH comment SHAR_EOF fi # end of overwriting check if test -f 'Makefile' then echo shar: will not over-write existing file "'Makefile'" else cat << \SHAR_EOF > 'Makefile' # combined Makefile for ELVIS - a clone of `vi` # # After editing this Makefile as described below, you should... # # Use `make` to compile all programs # Use `make install` to copy the programs to the BIN directory # Use `make clean` to remove all object files # Use `make clobber` to remove everything except source & documentation # Use `make tags` to build new "tags" and "refs" files # Use `make uue` to produce uuencoded compressed tar archives of the source # Use `make sh` to produce shar archives of the source # Use `make print` to print the Elvis documentation # # Several groups of Makefile settings are included below. Choose *ONE* group # of settings for your particular system, and leave the others commented out. # The meanings of these settings are: # O the filename extension for unlinked object files -- usually .o # E the filename extension for executable files -- usually null # EXTRA version-specific object files used in elvis # EXTRA2 version-specific object files used in elvis, virec, & refont # LIBS any special libraries, such as "-ltermcap" # BIN directory where executables should be installed # CC the C compiler command, possibly with "memory model" flags # CFLAGS compiler flags used to select compile-time options # OF link flag to control the output file's name -- usually -o # RF flag used to denote "compile but don't link" -- usually -c # DATE a "cc" flag that defines "DATE". e.g. DATE=-DDATE=\"7/4/76\" # EVAL the word "eval", if DATE requires it # PROGS the list of all programs # CHMEM any extra commands to be run after ELVIS is linked # SORT if the "tags" file must be sorted, then SORT=-DSORT # INST installation method: inst.dos, inst.tos, inst.os9, or inst.unix # RM the name of a program that deletes files # PR1 used to print documentation -- typically "refont -c" # PR2 used to send text to printer -- typically "| lpr" # DUMMY usually nothing, but OS9 needs "dummy" # DOC name of "doc" directory, with a trailing slash #---- These settings are recommended for System-V UNIX and SCO XENIX-386 ---- #O= .o #E= #EXTRA= #EXTRA2= #LIBS= -ltermcap #BIN= /usr/local/bin #CFLAGS= -DM_SYSV -O #OF= -o #RF= -c #DATE= -DDATE=\'\"`date`\"\' #EVAL= eval #PROGS= elvis$E ctags$E ref$E virec$E refont$E #CHMEM= #SORT= -DSORT #INST= inst.unix #RM= rm -f #PR1= refont -c #PR2= | lp #DUMMY= #DOC= doc/ #---- These settings are recommended for SCO XENIX-286 ---- #O= .o #E= #EXTRA= #EXTRA2= #LIBS= -ltermcap #BIN= /usr/local/bin #CC= cc -M2s -i #CFLAGS= -DM_SYSV -Ox -DCS_IBMPC #OF= -o #RF= -c #DATE= -DDATE=\'\"`date`\"\' #EVAL= eval #PROGS= elvis$E ctags$E ref$E virec$E refont$E #CHMEM= #SORT= -DSORT #INST= inst.unix #RM= rm -f #PR1= refont -c #PR2= | lp #DUMMY= #DOC= doc/ #---- These settings are recommended for BSD 4.3 UNIX ---- #O= .o #E= #EXTRA= #EXTRA2= #LIBS= -ltermcap #BIN= /usr/local/bin #CFLAGS= -Dbsd -O #OF= -o #RF= -c #DATE= -DDATE=\'\"`date`\"\' #EVAL= eval #PROGS= elvis$E ctags$E ref$E virec$E refont$E #CHMEM= #SORT= -DSORT #INST= inst.unix #RM= rm -f #PR1= refont -c #PR2= | lpr #DUMMY= #DOC= doc/ #---- These settings are recommended for sunOS with OPENWINDOWS (X11/NeWS) CHOWN=echo "Chown turned off, would be --> chown" #CC=gcc -traditional -g CC=cc -O O= .o E= EXTRA= ow$O EXTRA2= LIBS=-lwire -lcps -ltermcap BIN=/usr/local/bin PS=$(BIN)/elvis.ps #PS=/usr/local/src/share/elvis.ps CFLAGS= -DMALLOC_DEBUG=0 -DSUNOS=1 -Dbsd -DRUNFILE=\"$(PS)\" -DOPENWINDOWS=1 \ -I$(OPENWINHOME)/include -L$(OPENWINHOME)/lib OF=-o RF= -c DATE= -DDATE=\'\"`date`\"\' EVAL= eval PROGS= elvis_cps.h elvis.ps elvis$E ctags$E ref$E virec$E refont$E CHMEM= SORT= -DSORT INST= inst.unix RM= rm -f PR1= refont -c PR2= | lpr DUMMY= DOC= doc/ #---- These settings are recommended for Coherent ---- #O=.o #E= #EXTRA= #EXTRA2= #LIBS= -lterm #BIN= /usr/bin #CC= cc #CFLAGS= -O -DCOHERENT -DCRUNCH -DNO_CHARATTR -DNO_CURSORSHAPE \ # -DNO_DIGRAPH -DNO_MKEXRC -VSUVAR #OF= -o #RF= -c #DATE= -DDATE=\'\"`date`\"\' #EVAL= eval #PROGS= elvis$E ctags$E ref$E virec$E refont$E #CHMEM= fixstack 2000 elvis$E #SORT= #INST= inst.unix #RM= rm -f #PR1= refont -b #PR2= | lpr #DUMMY= #DOC= doc/ #---- These settings are recommended for Minix-ST ---- #O= .o #E= #EXTRA= #EXTRA2= #LIBS= #BIN= /usr/bin #CC= cc #CFLAGS= #OF= -o #RF= -c #DATE= -DDATE=\'\"`date`\"\' #EVAL= eval #PROGS= elvis$E ctags$E ref$E virec$E refont$E #CHMEM= chmem =18000 elvis #SORT= #INST= inst.unix #RM= rm -f #PR1= lpr #PR2= #DUMMY= #DOC= doc/ #---- These settings are recommended for Minix-PC ---- #O= .s #E= #EXTRA= tinytcap$O #EXTRA2= #LIBS= #BIN= /usr/bin #CC= cc -i #CFLAGS= -O -DCRUNCH -DNO_MKEXRC -DNO_CURSORSHAPE -DNO_CHARATTR \ # -DNO_SHOWMODE -DNO_MODELINE -DNO_OPTCOLS -DNO_DIGRAPH -DNO_ABBR \ # -DNO_AT -DNO_SENTENCE -DNO_ERRLIST #### (all but -DNO_EXTENSIONS, -DNO_RECYCLE, -DNO_MAGIC, and -DNO_CHARSEARCH) #OF= -o #RF= -c #DATE= -DDATE=\'\"`date`\"\' #EVAL= eval #PROGS= elvis$E ctags$E ref$E virec$E refont$E #CHMEM= #SORT= #INST= inst.unix #RM= rm -f #PR1= lpr #PR2= #DUMMY= #DOC= doc/ #---- These settings are recommended for MS-DOS + MS-C + NDMAKE ---- #O= .obj #E= .exe #EXTRA= pc$O sysdos$O tinytcap$O #EXTRA2= #LIBS= #BIN= c:\dos #CC= cl /AM #CFLAGS= -O -DCS_IBMPC -DCS_SPECIAL #OF= -o #RF= -c #DATE= #EVAL= #PROGS= elvis$E ex$E ctags$E ref$E virec$E wildcard$E refont$E #CHMEM= #SORT= #INST= inst.dos #RM= del #PR1= refont -c #PR2= >PRN #DUMMY= #DOC= doc\ #---- These settings are recommended for Atari TOS + Mark Williams C ---- #O=.o #E=.ttp #EXTRA= sysdos$O tinytcap$O #EXTRA2= atari$O #LIBS= #BIN= c:\ #CC= cc -VPEEP #CFLAGS= -O -DCS_IBMPC -DCS_SPECIAL #OF= -o #RF= -c #DATE= #EVAL= #PROGS= elvis$E ctags$E ref$E virec$E wildcard$E shell$E refont$E #CHMEM= #SORT= #INST= inst.tos #RM= rm -f #PR1= refont -e #PR2= >PRT: #DUMMY= #DOC= 'doc\' #---- These settings are recommended for OS-9/68K V2.3 ---- #O= .r #E= #EXTRA= date$O #EXTRA2= osk$O #LIBS= -l=/dd/lib/termlib.l #BIN= /dd/usr/cmds #CC= cc #ODIR= /dd/usr/src/elvis #CFLAGS= -gq -m=2 #OF= -f=$(ODIR)/ #RF= -r #DATE= #EVAL= #PROGS= elvis$E vi$E view$E input$E ctags$E ref$E virec$E refont$E #CHMEM= touch date.r #SORT= #INST= inst.os9 #RM= del *.stb *.dbg #PR1= refont -b #PR2= >/p #DUMMY= dummy #DOC= doc/ ########################################################################### ########################################################################### ### ### ### The rest of this Makefile contains no user-servicable parts ### ### ### ########################################################################### ########################################################################### OBJS= blk$O cmd1$O cmd2$O curses$O cut$O ex$O input$O main$O misc$O \ modify$O move1$O move2$O move3$O move4$O move5$O opts$O recycle$O \ redraw$O regexp$O regsub$O system$O tio$O tmp$O vars$O vcmd$O vi$O ALIAS= alias$O DOCS= $(DOC)index.doc $(DOC)intro.doc $(DOC)visual.doc $(DOC)ex.doc \ $(DOC)regexp.doc $(DOC)options.doc $(DOC)cutbufs.doc $(DOC)differ.doc \ $(DOC)internal.doc $(DOC)cflags.doc $(DOC)termcap.doc \ $(DOC)environ.doc $(DOC)versions.doc SRC1= README KNOWN.BUGS $(DOC)intro.doc $(DOC)visual.doc $(DOC)ex.doc \ $(DOC)versions.doc $(DOC)cflags.doc $(DOC)differ.doc SRC2= $(DOC)cutbufs.doc $(DOC)options.doc $(DOC)environ.doc $(DOC)regexp.doc \ $(DOC)internal.doc $(DOC)termcap.doc $(DOC)index.doc $(DOC)ctags.man \ $(DOC)elvis.man $(DOC)ref.man $(DOC)refont.man $(DOC)virec.man SRC3= Elvis.lnk Elvis.mak Elvis.prj Makefile.mix alias.c atari.c \ ctags.c pc.c ref.c shell.c sysdos.c virec.c wildcard.c \ profile.sh osk.c osk.h date.c SRC4= blk.c cmd1.c cmd2.c config.h curses.c SRC5= curses.h cut.c ex.c input.c main.c misc.c SRC6= modify.c move1.c move2.c move3.c move4.c move5.c opts.c recycle.c \ redraw.c SRC7= regexp.c regexp.h regsub.c system.c tinytcap.c tio.c tmp.c SRC8= vars.c vcmd.c vi.c vi.h refont.c ########################################################################### all: $(PROGS) @echo done. elvis$E: $(OBJS) $(EXTRA) $(EXTRA2) $(CC) $(CFLAGS) $(OF) elvis$E $(OBJS) $(EXTRA) $(EXTRA2) $(LIBS) $(CHMEM) ctags$E: ctags.c $(CC) $(CFLAGS) $(SORT) $(OF)ctags$E ctags.c ref$E: ref.c $(CC) $(CFLAGS) $(OF)ref$E ref.c virec$E: virec.c tnamerec.c $(CC) $(CFLAGS) $(OF) virec$E virec.c tnamerec.c $(EXTRA2) view$E: $(ALIAS) $(CC) $(CFLAGS) $(OF)view$E $(ALIAS) ex$E: $(ALIAS) $(CC) $(CFLAGS) $(OF)ex$E $(ALIAS) vi$E: $(ALIAS) $(CC) $(CFLAGS) $(OF)vi$E $(ALIAS) input$E: $(ALIAS) $(CC) $(CFLAGS) $(OF)input$E $(ALIAS) shell$E: shell.c $(CC) $(CFLAGS) $(OF)shell$E shell.c wildcard$E: wildcard.c $(CC) $(CFLAGS) $(OF)wildcard$E wildcard.c refont$E: refont.c $(CC) $(CFLAGS) $(OF)refont$E refont.c $(EXTRA2) ############################################################################## # The file cmd1.c is compiled with the extra flag -DDATE="today's date". cmd1$O: cmd1.c vi.h config.h $(EVAL) $(CC) $(CFLAGS) $(RF) $(DATE) cmd1.c # "It all depends..." $(OBJS): vi.h curses.h config.h # OS9 must create a custom date.c file, and compile it. date$O: $(OBJS) @echo '/* compilation date of elvis */' >-date.c @echo -r 'char date[] = "' >+date.c @echo -r 'echo -r ' >-/dd/tmp/date.c @date >+/dd/tmp/date.c @shell /dd/tmp/date.c >+date.c @echo '";' >+date.c @del /dd/tmp/date.c $(CC) $(CFLAGS) $(RF) date.c ############################################################################## install: $(INST) @echo Installation complete. inst.unix: $(DUMMY) cp $(PROGS) $(BIN) (cd $(BIN); chmod 755 $(PROGS)) (cd $(BIN); $(CHOWN) bin $(PROGS)) -rm $(BIN)/vi; ln -s $(BIN)/elvis $(BIN)/vi -rm $(BIN)/ex; ln -s $(BIN)/elvis $(BIN)/ex -rm $(BIN)/view; ln -s $(BIN)/elvis $(BIN)/view -rm $(BIN)/input; ln -s $(BIN)/elvis $(BIN)/input inst.dos: $(DUMMY) copy $(PROGS) $(BIN) copy $(BIN)/ex$E $(BIN)/vi$E copy $(BIN)/ex$E $(BIN)/view$E copy $(BIN)/ex$E $(BIN)/input$E inst.tos: $(DUMMY) copy $(PROGS) $(BIN) inst.os9: $(DUMMY) copy $(PROGS) -rw=$(BIN) chd $(BIN); attr -epenprnpw $(PROGS) ############################################################################## clean: $(DUMMY) $(RM) *$O $(DOC)*.1 elvis?.uue elvis?.sh core clobber: clean $(RM) tags refs $(PROGS) ############################################################################## print: refont$E $(PR1) $(DOCS) $(PR2) tags refs: ctags$E ctags -r *.c *.h ############################################################################## uue: elvis1.uue elvis2.uue elvis3.uue elvis4.uue elvis5.uue \ elvis6.uue elvis7.uue elvis8.uue elvis1.uue: $(SRC1) tar cf elvis1.tar $(SRC1) compress -b13 elvis1.tar cp README elvis1.uue uue elvis1.tar.Z - >>elvis1.uue $(RM) elvis1.tar* elvis2.uue: $(SRC2) tar cf elvis2.tar $(SRC2) compress -b13 elvis2.tar uue elvis2.tar.Z $(RM) elvis2.tar* elvis3.uue: $(SRC3) tar cf elvis3.tar $(SRC3) compress -b13 elvis3.tar uuencode elvis3.tar.Z elvis3.uue $(RM) elvis3.tar* elvis4.uue: $(SRC4) tar cf elvis4.tar $(SRC4) compress -b13 elvis4.tar uuencode elvis4.tar.Z elvis4.uue $(RM) elvis4.tar* elvis5.uue: $(SRC5) tar cf elvis5.tar $(SRC5) compress -b13 elvis5.tar uuencode elvis5.tar.Z elvis5.uue $(RM) elvis5.tar* elvis6.uue: $(SRC6) tar cf elvis6.tar $(SRC6) compress -b13 elvis6.tar uuencode elvis6.tar.Z elvis6.uue $(RM) elvis6.tar* elvis7.uue: $(SRC7) tar cf elvis7.tar $(SRC7) compress -b13 elvis7.tar uuencode elvis7.tar.Z elvis7.uue $(RM) elvis7.tar* elvis8.uue: $(SRC8) tar cf elvis8.tar $(SRC8) compress -b13 elvis8.tar uuencode elvis8.tar.Z elvis8.uue $(RM) elvis8.tar* ############################################################################## sh: elvis1.sh elvis2.sh elvis3.sh elvis4.sh elvis5.sh elvis6.sh \ elvis7.sh elvis8.sh elvis1.sh: $(SRC1) cat >elvis1.sh README echo >>elvis1.sh ': ------------------------ CUT HERE --------------------' echo >>elvis1.sh 'test -d doc || mkdir doc || exit 2' shar >>elvis1.sh -h $(SRC1) elvis2.sh: $(SRC2) echo >elvis2.sh ': ------------------------ CUT HERE --------------------' echo >>elvis2.sh 'test -d doc || mkdir doc || exit 2' shar >>elvis2.sh -h $(SRC2) elvis3.sh: $(SRC3) shar $(SRC3) >elvis3.sh elvis4.sh: $(SRC4) shar $(SRC4) >elvis4.sh elvis5.sh: $(SRC5) shar $(SRC5) >elvis5.sh elvis6.sh: $(SRC6) shar $(SRC6) >elvis6.sh elvis7.sh: $(SRC7) shar $(SRC7) >elvis7.sh elvis8.sh: $(SRC8) shar $(SRC8) >elvis8.sh ############################################################################## # Under XENIX only! This stores all sources on a 3.5" 720k floppy disk. floppy: $(SRC1) $(SRC2) $(SRC3) $(SRC4) $(SRC5) $(SRC6) $(SRC7) $(SRC8) tar c5v $(SRC1) $(SRC2) $(SRC3) $(SRC4) $(SRC5) $(SRC6) $(SRC7) $(SRC8) changes: for i in *.[ch] M* ; do \ if test -f $i -a -w $i ; then \ echo $i \ fi;\ done dep: makedep -f $(CFLAGS) -I/usr/include *.c sed '/^#-- DO NOT EDIT FROM THIS LINE DOWN/,$$d' Makefile > tmp echo "#-- DO NOT EDIT FROM THIS LINE DOWN" >> tmp cat dependencies >> tmp mv tmp Makefile rm dependencies #-- DO NOT EDIT FROM THIS LINE DOWN wildcard.o: \ $(FRC) \ /usr/include/stdio.h \ /usr/include/ctype.h virec.o: \ $(FRC) \ config.h \ /usr/include/stdio.h \ /usr/include/ctype.h \ vi.h \ /usr/include/errno.h \ /usr/include/sys/errno.h \ /usr/include/sys/types.h \ /usr/include/sys/stdtypes.h \ /usr/include/sys/sysmacros.h \ /usr/include/sys/fcntl.h \ /usr/include/sys/fcntlcom.h \ /usr/include/sys/stat.h \ /usr/include/fcntl.h \ curses.h \ wconfig.h \ /usr/local/openwin/include/NeWS/wire.h \ /usr/local/openwin/include/NeWS/psmacros.h \ /usr/local/openwin/include/NeWS/psio.h \ /usr/local/openwin/include/NeWS/wire_types.h \ osk.h \ /usr/include/time.h \ wildcard.c vi.o: \ $(FRC) \ config.h \ /usr/include/ctype.h \ vi.h \ /usr/include/errno.h \ /usr/include/sys/errno.h \ /usr/include/sys/types.h \ /usr/include/sys/stdtypes.h \ /usr/include/sys/sysmacros.h \ /usr/include/sys/fcntl.h \ /usr/include/sys/fcntlcom.h \ /usr/include/sys/stat.h \ /usr/include/fcntl.h \ curses.h \ wconfig.h \ /usr/local/openwin/include/NeWS/wire.h \ /usr/local/openwin/include/NeWS/psmacros.h \ /usr/include/stdio.h \ /usr/local/openwin/include/NeWS/psio.h \ /usr/local/openwin/include/NeWS/wire_types.h vcmd.o: \ $(FRC) \ config.h \ vi.h \ /usr/include/errno.h \ /usr/include/sys/errno.h \ /usr/include/sys/types.h \ /usr/include/sys/stdtypes.h \ /usr/include/sys/sysmacros.h \ /usr/include/sys/fcntl.h \ /usr/include/sys/fcntlcom.h \ /usr/include/sys/stat.h \ /usr/include/fcntl.h \ curses.h \ wconfig.h \ /usr/local/openwin/include/NeWS/wire.h \ /usr/local/openwin/include/NeWS/psmacros.h \ /usr/include/stdio.h \ /usr/local/openwin/include/NeWS/psio.h \ /usr/local/openwin/include/NeWS/wire_types.h \ /usr/include/string.h vars.o: \ $(FRC) \ config.h \ vi.h \ /usr/include/errno.h \ /usr/include/sys/errno.h \ /usr/include/sys/types.h \ /usr/include/sys/stdtypes.h \ /usr/include/sys/sysmacros.h \ /usr/include/sys/fcntl.h \ /usr/include/sys/fcntlcom.h \ /usr/include/sys/stat.h \ /usr/include/fcntl.h \ curses.h \ wconfig.h \ /usr/local/openwin/include/NeWS/wire.h \ /usr/local/openwin/include/NeWS/psmacros.h \ /usr/include/stdio.h \ /usr/local/openwin/include/NeWS/psio.h \ /usr/local/openwin/include/NeWS/wire_types.h tnamerec.o: \ $(FRC) \ config.h \ /usr/include/dirent.h \ /usr/include/sys/types.h \ /usr/include/sys/stdtypes.h \ /usr/include/sys/sysmacros.h \ /usr/include/sys/dirent.h tmp.o: \ $(FRC) \ config.h \ /usr/include/ctype.h \ vi.h \ /usr/include/errno.h \ /usr/include/sys/errno.h \ /usr/include/sys/types.h \ /usr/include/sys/stdtypes.h \ /usr/include/sys/sysmacros.h \ /usr/include/sys/fcntl.h \ /usr/include/sys/fcntlcom.h \ /usr/include/sys/stat.h \ /usr/include/fcntl.h \ curses.h \ wconfig.h \ /usr/local/openwin/include/NeWS/wire.h \ /usr/local/openwin/include/NeWS/psmacros.h \ /usr/include/stdio.h \ /usr/local/openwin/include/NeWS/psio.h \ /usr/local/openwin/include/NeWS/wire_types.h \ osk.h \ /usr/include/time.h tio.o: \ $(FRC) \ config.h \ /usr/include/setjmp.h \ /usr/include/machine/setjmp.h \ /usr/include/sun3/setjmp.h \ /usr/include/sun3x/setjmp.h \ /usr/include/sun4/setjmp.h \ /usr/include/sun4c/setjmp.h \ /usr/include/signal.h \ /usr/include/sys/signal.h \ /usr/include/vm/faultcode.h \ /usr/include/sys/stdtypes.h \ vi.h \ /usr/include/errno.h \ /usr/include/sys/errno.h \ /usr/include/sys/types.h \ /usr/include/sys/sysmacros.h \ /usr/include/sys/fcntl.h \ /usr/include/sys/fcntlcom.h \ /usr/include/sys/stat.h \ /usr/include/fcntl.h \ curses.h \ wconfig.h \ /usr/local/openwin/include/NeWS/wire.h \ /usr/local/openwin/include/NeWS/psmacros.h \ /usr/include/stdio.h \ /usr/local/openwin/include/NeWS/psio.h \ /usr/local/openwin/include/NeWS/wire_types.h \ /usr/include/varargs.h tinytcap.o: \ $(FRC) \ config.h system.o: \ $(FRC) \ config.h \ vi.h \ /usr/include/errno.h \ /usr/include/sys/errno.h \ /usr/include/sys/types.h \ /usr/include/sys/stdtypes.h \ /usr/include/sys/sysmacros.h \ /usr/include/sys/fcntl.h \ /usr/include/sys/fcntlcom.h \ /usr/include/sys/stat.h \ /usr/include/fcntl.h \ curses.h \ wconfig.h \ /usr/local/openwin/include/NeWS/wire.h \ /usr/local/openwin/include/NeWS/psmacros.h \ /usr/include/stdio.h \ /usr/local/openwin/include/NeWS/psio.h \ /usr/local/openwin/include/NeWS/wire_types.h \ /usr/include/signal.h \ /usr/include/sys/signal.h \ /usr/include/vm/faultcode.h \ /usr/include/string.h sysdos.o: \ $(FRC) \ config.h \ vi.h \ /usr/include/errno.h \ /usr/include/sys/errno.h \ /usr/include/sys/types.h \ /usr/include/sys/stdtypes.h \ /usr/include/sys/sysmacros.h \ /usr/include/sys/fcntl.h \ /usr/include/sys/fcntlcom.h \ /usr/include/sys/stat.h \ /usr/include/fcntl.h \ curses.h \ wconfig.h \ /usr/local/openwin/include/NeWS/wire.h \ /usr/local/openwin/include/NeWS/psmacros.h \ /usr/include/stdio.h \ /usr/local/openwin/include/NeWS/psio.h \ /usr/local/openwin/include/NeWS/wire_types.h \ /usr/include/string.h shell.o: \ $(FRC) \ /usr/include/stdio.h \ /usr/include/string.h \ /usr/include/sys/stdtypes.h regsub.o: \ $(FRC) \ /usr/include/ctype.h \ config.h \ vi.h \ /usr/include/errno.h \ /usr/include/sys/errno.h \ /usr/include/sys/types.h \ /usr/include/sys/stdtypes.h \ /usr/include/sys/sysmacros.h \ /usr/include/sys/fcntl.h \ /usr/include/sys/fcntlcom.h \ /usr/include/sys/stat.h \ /usr/include/fcntl.h \ curses.h \ wconfig.h \ /usr/local/openwin/include/NeWS/wire.h \ /usr/local/openwin/include/NeWS/psmacros.h \ /usr/include/stdio.h \ /usr/local/openwin/include/NeWS/psio.h \ /usr/local/openwin/include/NeWS/wire_types.h \ regexp.h regexp.o: \ $(FRC) \ /usr/include/setjmp.h \ /usr/include/machine/setjmp.h \ /usr/include/sun3/setjmp.h \ /usr/include/sun3x/setjmp.h \ /usr/include/sun4/setjmp.h \ /usr/include/sun4c/setjmp.h \ /usr/include/ctype.h \ config.h \ vi.h \ /usr/include/errno.h \ /usr/include/sys/errno.h \ /usr/include/sys/types.h \ /usr/include/sys/stdtypes.h \ /usr/include/sys/sysmacros.h \ /usr/include/sys/fcntl.h \ /usr/include/sys/fcntlcom.h \ /usr/include/sys/stat.h \ /usr/include/fcntl.h \ curses.h \ wconfig.h \ /usr/local/openwin/include/NeWS/wire.h \ /usr/local/openwin/include/NeWS/psmacros.h \ /usr/include/stdio.h \ /usr/local/openwin/include/NeWS/psio.h \ /usr/local/openwin/include/NeWS/wire_types.h \ regexp.h refont.o: \ $(FRC) \ /usr/include/stdio.h \ config.h ref.o: \ $(FRC) \ /usr/include/stdio.h redraw.o: \ $(FRC) \ config.h \ vi.h \ /usr/include/errno.h \ /usr/include/sys/errno.h \ /usr/include/sys/types.h \ /usr/include/sys/stdtypes.h \ /usr/include/sys/sysmacros.h \ /usr/include/sys/fcntl.h \ /usr/include/sys/fcntlcom.h \ /usr/include/sys/stat.h \ /usr/include/fcntl.h \ curses.h \ wconfig.h \ /usr/local/openwin/include/NeWS/wire.h \ /usr/local/openwin/include/NeWS/psmacros.h \ /usr/include/stdio.h \ /usr/local/openwin/include/NeWS/psio.h \ /usr/local/openwin/include/NeWS/wire_types.h recycle.o: \ $(FRC) \ config.h \ vi.h \ /usr/include/errno.h \ /usr/include/sys/errno.h \ /usr/include/sys/types.h \ /usr/include/sys/stdtypes.h \ /usr/include/sys/sysmacros.h \ /usr/include/sys/fcntl.h \ /usr/include/sys/fcntlcom.h \ /usr/include/sys/stat.h \ /usr/include/fcntl.h \ curses.h \ wconfig.h \ /usr/local/openwin/include/NeWS/wire.h \ /usr/local/openwin/include/NeWS/psmacros.h \ /usr/include/stdio.h \ /usr/local/openwin/include/NeWS/psio.h \ /usr/local/openwin/include/NeWS/wire_types.h pc.o: \ $(FRC) \ config.h \ vi.h \ /usr/include/errno.h \ /usr/include/sys/errno.h \ /usr/include/sys/types.h \ /usr/include/sys/stdtypes.h \ /usr/include/sys/sysmacros.h \ /usr/include/sys/fcntl.h \ /usr/include/sys/fcntlcom.h \ /usr/include/sys/stat.h \ /usr/include/fcntl.h \ curses.h \ wconfig.h \ /usr/local/openwin/include/NeWS/wire.h \ /usr/local/openwin/include/NeWS/psmacros.h \ /usr/include/stdio.h \ /usr/local/openwin/include/NeWS/psio.h \ /usr/local/openwin/include/NeWS/wire_types.h ow_tcap.o: \ $(FRC) \ /usr/include/varargs.h \ curses.h \ wconfig.h \ config.h \ /usr/local/openwin/include/NeWS/wire.h \ /usr/include/sys/types.h \ /usr/include/sys/stdtypes.h \ /usr/include/sys/sysmacros.h \ /usr/local/openwin/include/NeWS/psmacros.h \ /usr/include/stdio.h \ /usr/local/openwin/include/NeWS/psio.h \ /usr/local/openwin/include/NeWS/wire_types.h ow.o: \ $(FRC) \ /usr/include/stdio.h \ /usr/include/sys/time.h \ /usr/include/time.h \ /usr/include/sys/stdtypes.h \ /usr/include/signal.h \ /usr/include/sys/signal.h \ /usr/include/vm/faultcode.h \ /usr/include/assert.h \ config.h \ vi.h \ /usr/include/errno.h \ /usr/include/sys/errno.h \ /usr/include/sys/types.h \ /usr/include/sys/sysmacros.h \ /usr/include/sys/fcntl.h \ /usr/include/sys/fcntlcom.h \ /usr/include/sys/stat.h \ /usr/include/fcntl.h \ curses.h \ wconfig.h \ /usr/local/openwin/include/NeWS/wire.h \ /usr/local/openwin/include/NeWS/psmacros.h \ /usr/local/openwin/include/NeWS/psio.h \ /usr/local/openwin/include/NeWS/wire_types.h \ elvis_cps.h \ /usr/include/sys/file.h \ /usr/include/sgtty.h \ /usr/include/sys/ioctl.h \ /usr/include/sys/ttychars.h \ /usr/include/sys/ttydev.h \ /usr/include/sys/ttold.h \ /usr/include/sys/ioccom.h \ /usr/include/sys/ttycom.h \ /usr/include/sys/filio.h \ /usr/include/sys/sockio.h osk.o: \ $(FRC) \ /usr/include/stdio.h \ osk.h \ /usr/include/time.h \ /usr/include/sys/stdtypes.h \ /usr/include/errno.h \ /usr/include/sys/errno.h \ /usr/include/signal.h \ /usr/include/sys/signal.h \ /usr/include/vm/faultcode.h opts.o: \ $(FRC) \ config.h \ vi.h \ /usr/include/errno.h \ /usr/include/sys/errno.h \ /usr/include/sys/types.h \ /usr/include/sys/stdtypes.h \ /usr/include/sys/sysmacros.h \ /usr/include/sys/fcntl.h \ /usr/include/sys/fcntlcom.h \ /usr/include/sys/stat.h \ /usr/include/fcntl.h \ curses.h \ wconfig.h \ /usr/local/openwin/include/NeWS/wire.h \ /usr/local/openwin/include/NeWS/psmacros.h \ /usr/include/stdio.h \ /usr/local/openwin/include/NeWS/psio.h \ /usr/local/openwin/include/NeWS/wire_types.h move5.o: \ $(FRC) \ /usr/include/ctype.h \ config.h \ vi.h \ /usr/include/errno.h \ /usr/include/sys/errno.h \ /usr/include/sys/types.h \ /usr/include/sys/stdtypes.h \ /usr/include/sys/sysmacros.h \ /usr/include/sys/fcntl.h \ /usr/include/sys/fcntlcom.h \ /usr/include/sys/stat.h \ /usr/include/fcntl.h \ curses.h \ wconfig.h \ /usr/local/openwin/include/NeWS/wire.h \ /usr/local/openwin/include/NeWS/psmacros.h \ /usr/include/stdio.h \ /usr/local/openwin/include/NeWS/psio.h \ /usr/local/openwin/include/NeWS/wire_types.h move4.o: \ $(FRC) \ config.h \ vi.h \ /usr/include/errno.h \ /usr/include/sys/errno.h \ /usr/include/sys/types.h \ /usr/include/sys/stdtypes.h \ /usr/include/sys/sysmacros.h \ /usr/include/sys/fcntl.h \ /usr/include/sys/fcntlcom.h \ /usr/include/sys/stat.h \ /usr/include/fcntl.h \ curses.h \ wconfig.h \ /usr/local/openwin/include/NeWS/wire.h \ /usr/local/openwin/include/NeWS/psmacros.h \ /usr/include/stdio.h \ /usr/local/openwin/include/NeWS/psio.h \ /usr/local/openwin/include/NeWS/wire_types.h move3.o: \ $(FRC) \ config.h \ vi.h \ /usr/include/errno.h \ /usr/include/sys/errno.h \ /usr/include/sys/types.h \ /usr/include/sys/stdtypes.h \ /usr/include/sys/sysmacros.h \ /usr/include/sys/fcntl.h \ /usr/include/sys/fcntlcom.h \ /usr/include/sys/stat.h \ /usr/include/fcntl.h \ curses.h \ wconfig.h \ /usr/local/openwin/include/NeWS/wire.h \ /usr/local/openwin/include/NeWS/psmacros.h \ /usr/include/stdio.h \ /usr/local/openwin/include/NeWS/psio.h \ /usr/local/openwin/include/NeWS/wire_types.h move2.o: \ $(FRC) \ config.h \ vi.h \ /usr/include/errno.h \ /usr/include/sys/errno.h \ /usr/include/sys/types.h \ /usr/include/sys/stdtypes.h \ /usr/include/sys/sysmacros.h \ /usr/include/sys/fcntl.h \ /usr/include/sys/fcntlcom.h \ /usr/include/sys/stat.h \ /usr/include/fcntl.h \ curses.h \ wconfig.h \ /usr/local/openwin/include/NeWS/wire.h \ /usr/local/openwin/include/NeWS/psmacros.h \ /usr/include/stdio.h \ /usr/local/openwin/include/NeWS/psio.h \ /usr/local/openwin/include/NeWS/wire_types.h \ regexp.h move1.o: \ $(FRC) \ config.h \ /usr/include/ctype.h \ vi.h \ /usr/include/errno.h \ /usr/include/sys/errno.h \ /usr/include/sys/types.h \ /usr/include/sys/stdtypes.h \ /usr/include/sys/sysmacros.h \ /usr/include/sys/fcntl.h \ /usr/include/sys/fcntlcom.h \ /usr/include/sys/stat.h \ /usr/include/fcntl.h \ curses.h \ wconfig.h \ /usr/local/openwin/include/NeWS/wire.h \ /usr/local/openwin/include/NeWS/psmacros.h \ /usr/include/stdio.h \ /usr/local/openwin/include/NeWS/psio.h \ /usr/local/openwin/include/NeWS/wire_types.h modify.o: \ $(FRC) \ config.h \ vi.h \ /usr/include/errno.h \ /usr/include/sys/errno.h \ /usr/include/sys/types.h \ /usr/include/sys/stdtypes.h \ /usr/include/sys/sysmacros.h \ /usr/include/sys/fcntl.h \ /usr/include/sys/fcntlcom.h \ /usr/include/sys/stat.h \ /usr/include/fcntl.h \ curses.h \ wconfig.h \ /usr/local/openwin/include/NeWS/wire.h \ /usr/local/openwin/include/NeWS/psmacros.h \ /usr/include/stdio.h \ /usr/local/openwin/include/NeWS/psio.h \ /usr/local/openwin/include/NeWS/wire_types.h misc.o: \ $(FRC) \ config.h \ vi.h \ /usr/include/errno.h \ /usr/include/sys/errno.h \ /usr/include/sys/types.h \ /usr/include/sys/stdtypes.h \ /usr/include/sys/sysmacros.h \ /usr/include/sys/fcntl.h \ /usr/include/sys/fcntlcom.h \ /usr/include/sys/stat.h \ /usr/include/fcntl.h \ curses.h \ wconfig.h \ /usr/local/openwin/include/NeWS/wire.h \ /usr/local/openwin/include/NeWS/psmacros.h \ /usr/include/stdio.h \ /usr/local/openwin/include/NeWS/psio.h \ /usr/local/openwin/include/NeWS/wire_types.h main.o: \ $(FRC) \ config.h \ /usr/include/signal.h \ /usr/include/sys/signal.h \ /usr/include/vm/faultcode.h \ /usr/include/sys/stdtypes.h \ /usr/include/setjmp.h \ /usr/include/machine/setjmp.h \ /usr/include/sun3/setjmp.h \ /usr/include/sun3x/setjmp.h \ /usr/include/sun4/setjmp.h \ /usr/include/sun4c/setjmp.h \ vi.h \ /usr/include/errno.h \ /usr/include/sys/errno.h \ /usr/include/sys/types.h \ /usr/include/sys/sysmacros.h \ /usr/include/sys/fcntl.h \ /usr/include/sys/fcntlcom.h \ /usr/include/sys/stat.h \ /usr/include/fcntl.h \ curses.h \ wconfig.h \ /usr/local/openwin/include/NeWS/wire.h \ /usr/local/openwin/include/NeWS/psmacros.h \ /usr/include/stdio.h \ /usr/local/openwin/include/NeWS/psio.h \ /usr/local/openwin/include/NeWS/wire_types.h input.o: \ $(FRC) \ /usr/include/ctype.h \ config.h \ vi.h \ /usr/include/errno.h \ /usr/include/sys/errno.h \ /usr/include/sys/types.h \ /usr/include/sys/stdtypes.h \ /usr/include/sys/sysmacros.h \ /usr/include/sys/fcntl.h \ /usr/include/sys/fcntlcom.h \ /usr/include/sys/stat.h \ /usr/include/fcntl.h \ curses.h \ wconfig.h \ /usr/local/openwin/include/NeWS/wire.h \ /usr/local/openwin/include/NeWS/psmacros.h \ /usr/include/stdio.h \ /usr/local/openwin/include/NeWS/psio.h \ /usr/local/openwin/include/NeWS/wire_types.h ex.o: \ $(FRC) \ config.h \ /usr/include/ctype.h \ vi.h \ /usr/include/errno.h \ /usr/include/sys/errno.h \ /usr/include/sys/types.h \ /usr/include/sys/stdtypes.h \ /usr/include/sys/sysmacros.h \ /usr/include/sys/fcntl.h \ /usr/include/sys/fcntlcom.h \ /usr/include/sys/stat.h \ /usr/include/fcntl.h \ curses.h \ wconfig.h \ /usr/local/openwin/include/NeWS/wire.h \ /usr/local/openwin/include/NeWS/psmacros.h \ /usr/include/stdio.h \ /usr/local/openwin/include/NeWS/psio.h \ /usr/local/openwin/include/NeWS/wire_types.h cut.o: \ $(FRC) \ config.h \ vi.h \ /usr/include/errno.h \ /usr/include/sys/errno.h \ /usr/include/sys/types.h \ /usr/include/sys/stdtypes.h \ /usr/include/sys/sysmacros.h \ /usr/include/sys/fcntl.h \ /usr/include/sys/fcntlcom.h \ /usr/include/sys/stat.h \ /usr/include/fcntl.h \ curses.h \ wconfig.h \ /usr/local/openwin/include/NeWS/wire.h \ /usr/local/openwin/include/NeWS/psmacros.h \ /usr/include/stdio.h \ /usr/local/openwin/include/NeWS/psio.h \ /usr/local/openwin/include/NeWS/wire_types.h curses.o: \ $(FRC) \ config.h \ vi.h \ /usr/include/errno.h \ /usr/include/sys/errno.h \ /usr/include/sys/types.h \ /usr/include/sys/stdtypes.h \ /usr/include/sys/sysmacros.h \ /usr/include/sys/fcntl.h \ /usr/include/sys/fcntlcom.h \ /usr/include/sys/stat.h \ /usr/include/fcntl.h \ curses.h \ wconfig.h \ /usr/local/openwin/include/NeWS/wire.h \ /usr/local/openwin/include/NeWS/psmacros.h \ /usr/include/stdio.h \ /usr/local/openwin/include/NeWS/psio.h \ /usr/local/openwin/include/NeWS/wire_types.h \ /usr/include/termio.h \ /usr/include/sys/ioccom.h \ /usr/include/sys/termios.h \ /usr/include/sys/ttydev.h \ /usr/include/sys/ttycom.h \ /usr/include/sgtty.h \ /usr/include/sys/ioctl.h \ /usr/include/sys/ttychars.h \ /usr/include/sys/ttold.h \ /usr/include/sys/filio.h \ /usr/include/sys/sockio.h \ /usr/include/signal.h \ /usr/include/sys/signal.h \ /usr/include/vm/faultcode.h ctags.o: \ $(FRC) \ /usr/include/ctype.h \ /usr/include/stdio.h \ config.h \ wildcard.c cmd2.o: \ $(FRC) \ /usr/include/ctype.h \ config.h \ vi.h \ /usr/include/errno.h \ /usr/include/sys/errno.h \ /usr/include/sys/types.h \ /usr/include/sys/stdtypes.h \ /usr/include/sys/sysmacros.h \ /usr/include/sys/fcntl.h \ /usr/include/sys/fcntlcom.h \ /usr/include/sys/stat.h \ /usr/include/fcntl.h \ curses.h \ wconfig.h \ /usr/local/openwin/include/NeWS/wire.h \ /usr/local/openwin/include/NeWS/psmacros.h \ /usr/include/stdio.h \ /usr/local/openwin/include/NeWS/psio.h \ /usr/local/openwin/include/NeWS/wire_types.h \ regexp.h \ osk.h \ /usr/include/time.h cmd1.o: \ $(FRC) \ config.h \ /usr/include/ctype.h \ vi.h \ /usr/include/errno.h \ /usr/include/sys/errno.h \ /usr/include/sys/types.h \ /usr/include/sys/stdtypes.h \ /usr/include/sys/sysmacros.h \ /usr/include/sys/fcntl.h \ /usr/include/sys/fcntlcom.h \ /usr/include/sys/stat.h \ /usr/include/fcntl.h \ curses.h \ wconfig.h \ /usr/local/openwin/include/NeWS/wire.h \ /usr/local/openwin/include/NeWS/psmacros.h \ /usr/include/stdio.h \ /usr/local/openwin/include/NeWS/psio.h \ /usr/local/openwin/include/NeWS/wire_types.h \ regexp.h blk.o: \ $(FRC) \ config.h \ vi.h \ /usr/include/errno.h \ /usr/include/sys/errno.h \ /usr/include/sys/types.h \ /usr/include/sys/stdtypes.h \ /usr/include/sys/sysmacros.h \ /usr/include/sys/fcntl.h \ /usr/include/sys/fcntlcom.h \ /usr/include/sys/stat.h \ /usr/include/fcntl.h \ curses.h \ wconfig.h \ /usr/local/openwin/include/NeWS/wire.h \ /usr/local/openwin/include/NeWS/psmacros.h \ /usr/include/stdio.h \ /usr/local/openwin/include/NeWS/psio.h \ /usr/local/openwin/include/NeWS/wire_types.h atari.o: \ $(FRC) \ config.h \ vi.h \ /usr/include/errno.h \ /usr/include/sys/errno.h \ /usr/include/sys/types.h \ /usr/include/sys/stdtypes.h \ /usr/include/sys/sysmacros.h \ /usr/include/sys/fcntl.h \ /usr/include/sys/fcntlcom.h \ /usr/include/sys/stat.h \ /usr/include/fcntl.h \ curses.h \ wconfig.h \ /usr/local/openwin/include/NeWS/wire.h \ /usr/local/openwin/include/NeWS/psmacros.h \ /usr/include/stdio.h \ /usr/local/openwin/include/NeWS/psio.h \ /usr/local/openwin/include/NeWS/wire_types.h alias.o: \ $(FRC) \ /usr/include/stdio.h \ config.h SHAR_EOF fi # end of overwriting check if test -f 'Makefile.mix' then echo shar: will not over-write existing file "'Makefile.mix'" else cat << \SHAR_EOF > 'Makefile.mix' # combined Makefile for ELVIS - a clone of `vi` # # After editing this Makefile as described below, you should... # # Use `make` to compile all programs # Use `make install` to copy the programs to the BIN directory # Use `make clean` to remove all object files # Use `make clobber` to remove everything except source & documentation # Use `make tags` to build new "tags" and "refs" files # Use `make uue` to produce uuencoded compressed tar archives of the source # Use `make sh` to produce shar archives of the source # Use `make print` to print the Elvis documentation # # Several groups of Makefile settings are included below. Choose *ONE* group # of settings for your particular system, and leave the others commented out. # The meanings of these settings are: # O the filename extension for unlinked object files -- usually .o # E the filename extension for executable files -- usually null # EXTRA version-specific object files used in elvis # EXTRA2 version-specific object files used in elvis, virec, & refont # LIBS any special libraries, such as "-ltermcap" # BIN directory where executables should be installed # CC the C compiler command, possibly with "memory model" flags # CFLAGS compiler flags used to select compile-time options # OF link flag to control the output file's name -- usually -o # RF flag used to denote "compile but don't link" -- usually -c # DATE a "cc" flag that defines "DATE". e.g. DATE=-DDATE=\"7/4/76\" # EVAL the word "eval", if DATE requires it # PROGS the list of all programs # CHMEM any extra commands to be run after ELVIS is linked # SORT if the "tags" file must be sorted, then SORT=-DSORT # INST installation method: inst.dos, inst.tos, inst.os9, or inst.unix # RM the name of a program that deletes files # PR1 used to print documentation -- typically "refont -c" # PR2 used to send text to printer -- typically "| lpr" # DUMMY usually nothing, but OS9 needs "dummy" # DOC name of "doc" directory, with a trailing slash #---- These settings are recommended for System-V UNIX and SCO XENIX-386 ---- #O= .o #E= #EXTRA= #EXTRA2= #LIBS= -ltermcap #BIN= /usr/local/bin #CFLAGS= -DM_SYSV -O #OF= -o #RF= -c #DATE= -DDATE=\'\"`date`\"\' #EVAL= eval #PROGS= elvis$E ctags$E ref$E virec$E refont$E #CHMEM= #SORT= -DSORT #INST= inst.unix #RM= rm -f #PR1= refont -c #PR2= | lp #DUMMY= #DOC= doc/ #---- These settings are recommended for SCO XENIX-286 ---- #O= .o #E= #EXTRA= #EXTRA2= #LIBS= -ltermcap #BIN= /usr/local/bin #CC= cc -M2s -i #CFLAGS= -DM_SYSV -Ox -DCS_IBMPC #OF= -o #RF= -c #DATE= -DDATE=\'\"`date`\"\' #EVAL= eval #PROGS= elvis$E ctags$E ref$E virec$E refont$E #CHMEM= #SORT= -DSORT #INST= inst.unix #RM= rm -f #PR1= refont -c #PR2= | lp #DUMMY= #DOC= doc/ #---- These settings are recommended for BSD 4.3 UNIX ---- #O= .o #E= #EXTRA= #EXTRA2= #LIBS= -ltermcap #BIN= /usr/local/bin #CFLAGS= -Dbsd -O #OF= -o #RF= -c #DATE= -DDATE=\'\"`date`\"\' #EVAL= eval #PROGS= elvis$E ctags$E ref$E virec$E refont$E #CHMEM= #SORT= -DSORT #INST= inst.unix #RM= rm -f #PR1= refont -c #PR2= | lpr #DUMMY= #DOC= doc/ #---- These settings are recommended for Coherent ---- #O=.o #E= #EXTRA= #EXTRA2= #LIBS= -lterm #BIN= /usr/bin #CC= cc #CFLAGS= -O -DCOHERENT -DCRUNCH -DNO_CHARATTR -DNO_CURSORSHAPE \ # -DNO_DIGRAPH -DNO_MKEXRC -VSUVAR #OF= -o #RF= -c #DATE= -DDATE=\'\"`date`\"\' #EVAL= eval #PROGS= elvis$E ctags$E ref$E virec$E refont$E #CHMEM= fixstack 2000 elvis$E #SORT= #INST= inst.unix #RM= rm -f #PR1= refont -b #PR2= | lpr #DUMMY= #DOC= doc/ #---- These settings are recommended for Minix-ST ---- #O= .o #E= #EXTRA= #EXTRA2= #LIBS= #BIN= /usr/bin #CC= cc #CFLAGS= #OF= -o #RF= -c #DATE= -DDATE=\'\"`date`\"\' #EVAL= eval #PROGS= elvis$E ctags$E ref$E virec$E refont$E #CHMEM= chmem =18000 elvis #SORT= #INST= inst.unix #RM= rm -f #PR1= lpr #PR2= #DUMMY= #DOC= doc/ #---- These settings are recommended for Minix-PC ---- #O= .s #E= #EXTRA= tinytcap$O #EXTRA2= #LIBS= #BIN= /usr/bin #CC= cc -i #CFLAGS= -O -DCRUNCH -DNO_MKEXRC -DNO_CURSORSHAPE -DNO_CHARATTR \ # -DNO_SHOWMODE -DNO_MODELINE -DNO_OPTCOLS -DNO_DIGRAPH -DNO_ABBR \ # -DNO_AT -DNO_SENTENCE -DNO_ERRLIST #### (all but -DNO_EXTENSIONS, -DNO_RECYCLE, -DNO_MAGIC, and -DNO_CHARSEARCH) #OF= -o #RF= -c #DATE= -DDATE=\'\"`date`\"\' #EVAL= eval #PROGS= elvis$E ctags$E ref$E virec$E refont$E #CHMEM= #SORT= #INST= inst.unix #RM= rm -f #PR1= lpr #PR2= #DUMMY= #DOC= doc/ #---- These settings are recommended for MS-DOS + MS-C + NDMAKE ---- #O= .obj #E= .exe #EXTRA= pc$O sysdos$O tinytcap$O #EXTRA2= #LIBS= #BIN= c:\dos #CC= cl /AM #CFLAGS= -O -DCS_IBMPC -DCS_SPECIAL #OF= -o #RF= -c #DATE= #EVAL= #PROGS= elvis$E ex$E ctags$E ref$E virec$E wildcard$E refont$E #CHMEM= #SORT= #INST= inst.dos #RM= del #PR1= refont -c #PR2= >PRN #DUMMY= #DOC= doc\ #---- These settings are recommended for Atari TOS + Mark Williams C ---- #O=.o #E=.ttp #EXTRA= sysdos$O tinytcap$O #EXTRA2= atari$O #LIBS= #BIN= c:\ #CC= cc -VPEEP #CFLAGS= -O -DCS_IBMPC -DCS_SPECIAL #OF= -o #RF= -c #DATE= #EVAL= #PROGS= elvis$E ctags$E ref$E virec$E wildcard$E shell$E refont$E #CHMEM= #SORT= #INST= inst.tos #RM= rm -f #PR1= refont -e #PR2= >PRT: #DUMMY= #DOC= 'doc\' #---- These settings are recommended for OS-9/68K V2.3 ---- #O= .r #E= #EXTRA= date$O #EXTRA2= osk$O #LIBS= -l=/dd/lib/termlib.l #BIN= /dd/usr/cmds #CC= cc #ODIR= /dd/usr/src/elvis #CFLAGS= -gq -m=2 #OF= -f=$(ODIR)/ #RF= -r #DATE= #EVAL= #PROGS= elvis$E vi$E view$E input$E ctags$E ref$E virec$E refont$E #CHMEM= touch date.r #SORT= #INST= inst.os9 #RM= del *.stb *.dbg #PR1= refont -b #PR2= >/p #DUMMY= dummy #DOC= doc/ ########################################################################### ########################################################################### ### ### ### The rest of this Makefile contains no user-servicable parts ### ### ### ########################################################################### ########################################################################### OBJS= blk$O cmd1$O cmd2$O curses$O cut$O ex$O input$O main$O misc$O \ modify$O move1$O move2$O move3$O move4$O move5$O opts$O recycle$O \ redraw$O regexp$O regsub$O system$O tio$O tmp$O vars$O vcmd$O vi$O ALIAS= alias$O DOCS= $(DOC)index.doc $(DOC)intro.doc $(DOC)visual.doc $(DOC)ex.doc \ $(DOC)regexp.doc $(DOC)options.doc $(DOC)cutbufs.doc $(DOC)differ.doc \ $(DOC)internal.doc $(DOC)cflags.doc $(DOC)termcap.doc \ $(DOC)environ.doc $(DOC)versions.doc SRC1= README KNOWN.BUGS $(DOC)intro.doc $(DOC)visual.doc $(DOC)ex.doc \ $(DOC)versions.doc $(DOC)cflags.doc $(DOC)differ.doc SRC2= $(DOC)cutbufs.doc $(DOC)options.doc $(DOC)environ.doc $(DOC)regexp.doc \ $(DOC)internal.doc $(DOC)termcap.doc $(DOC)index.doc $(DOC)ctags.man \ $(DOC)elvis.man $(DOC)ref.man $(DOC)refont.man $(DOC)virec.man SRC3= Elvis.lnk Elvis.mak Elvis.prj Makefile.mix alias.c atari.c \ ctags.c pc.c ref.c shell.c sysdos.c virec.c wildcard.c \ profile.sh osk.c osk.h date.c SRC4= blk.c cmd1.c cmd2.c config.h curses.c SRC5= curses.h cut.c ex.c input.c main.c misc.c SRC6= modify.c move1.c move2.c move3.c move4.c move5.c opts.c recycle.c \ redraw.c SRC7= regexp.c regexp.h regsub.c system.c tinytcap.c tio.c tmp.c SRC8= vars.c vcmd.c vi.c vi.h refont.c ########################################################################### all: $(PROGS) @echo done. elvis$E: $(OBJS) $(EXTRA) $(EXTRA2) $(CC) $(CFLAGS) $(OF)elvis$E $(OBJS) $(EXTRA) $(EXTRA2) $(LIBS) $(CHMEM) ctags$E: ctags.c $(CC) $(CFLAGS) $(SORT) $(OF)ctags$E ctags.c ref$E: ref.c $(CC) $(CFLAGS) $(OF)ref$E ref.c virec$E: virec.c $(CC) $(CFLAGS) $(OF)virec$E virec.c $(EXTRA2) view$E: $(ALIAS) $(CC) $(CFLAGS) $(OF)view$E $(ALIAS) ex$E: $(ALIAS) $(CC) $(CFLAGS) $(OF)ex$E $(ALIAS) vi$E: $(ALIAS) $(CC) $(CFLAGS) $(OF)vi$E $(ALIAS) input$E: $(ALIAS) $(CC) $(CFLAGS) $(OF)input$E $(ALIAS) shell$E: shell.c $(CC) $(CFLAGS) $(OF)shell$E shell.c wildcard$E: wildcard.c $(CC) $(CFLAGS) $(OF)wildcard$E wildcard.c refont$E: refont.c $(CC) $(CFLAGS) $(OF)refont$E refont.c $(EXTRA2) ############################################################################## # The file cmd1.c is compiled with the extra flag -DDATE="today's date". cmd1$O: cmd1.c vi.h config.h $(EVAL) $(CC) $(CFLAGS) $(RF) $(DATE) cmd1.c # "It all depends..." $(OBJS): vi.h curses.h config.h # OS9 must create a custom date.c file, and compile it. date$O: $(OBJS) @echo '/* compilation date of elvis */' >-date.c @echo -r 'char date[] = "' >+date.c @echo -r 'echo -r ' >-/dd/tmp/date.c @date >+/dd/tmp/date.c @shell /dd/tmp/date.c >+date.c @echo '";' >+date.c @del /dd/tmp/date.c $(CC) $(CFLAGS) $(RF) date.c ############################################################################## install: $(INST) @echo Installation complete. inst.unix: $(DUMMY) cp $(PROGS) $(BIN) (cd $(BIN); chmod 755 $(PROGS)) (cd $(BIN); chown bin $(PROGS)) -ln $(BIN)/elvis $(BIN)/vi -ln $(BIN)/elvis $(BIN)/ex -ln $(BIN)/elvis $(BIN)/view -ln $(BIN)/elvis $(BIN)/input inst.dos: $(DUMMY) copy $(PROGS) $(BIN) copy $(BIN)/ex$E $(BIN)/vi$E copy $(BIN)/ex$E $(BIN)/view$E copy $(BIN)/ex$E $(BIN)/input$E inst.tos: $(DUMMY) copy $(PROGS) $(BIN) inst.os9: $(DUMMY) copy $(PROGS) -rw=$(BIN) chd $(BIN); attr -epenprnpw $(PROGS) ############################################################################## clean: $(DUMMY) $(RM) *$O $(DOC)*.1 elvis?.uue elvis?.sh core clobber: clean $(RM) tags refs $(PROGS) ############################################################################## print: refont$E $(PR1) $(DOCS) $(PR2) tags refs: ctags$E ctags -r *.c *.h ############################################################################## uue: elvis1.uue elvis2.uue elvis3.uue elvis4.uue elvis5.uue \ elvis6.uue elvis7.uue elvis8.uue elvis1.uue: $(SRC1) tar cf elvis1.tar $(SRC1) compress -b13 elvis1.tar cp README elvis1.uue uue elvis1.tar.Z - >>elvis1.uue $(RM) elvis1.tar* elvis2.uue: $(SRC2) tar cf elvis2.tar $(SRC2) compress -b13 elvis2.tar uue elvis2.tar.Z $(RM) elvis2.tar* elvis3.uue: $(SRC3) tar cf elvis3.tar $(SRC3) compress -b13 elvis3.tar uuencode elvis3.tar.Z elvis3.uue $(RM) elvis3.tar* elvis4.uue: $(SRC4) tar cf elvis4.tar $(SRC4) compress -b13 elvis4.tar uuencode elvis4.tar.Z elvis4.uue $(RM) elvis4.tar* elvis5.uue: $(SRC5) tar cf elvis5.tar $(SRC5) compress -b13 elvis5.tar uuencode elvis5.tar.Z elvis5.uue $(RM) elvis5.tar* elvis6.uue: $(SRC6) tar cf elvis6.tar $(SRC6) compress -b13 elvis6.tar uuencode elvis6.tar.Z elvis6.uue $(RM) elvis6.tar* elvis7.uue: $(SRC7) tar cf elvis7.tar $(SRC7) compress -b13 elvis7.tar uuencode elvis7.tar.Z elvis7.uue $(RM) elvis7.tar* elvis8.uue: $(SRC8) tar cf elvis8.tar $(SRC8) compress -b13 elvis8.tar uuencode elvis8.tar.Z elvis8.uue $(RM) elvis8.tar* ############################################################################## sh: elvis1.sh elvis2.sh elvis3.sh elvis4.sh elvis5.sh elvis6.sh \ elvis7.sh elvis8.sh elvis1.sh: $(SRC1) cat >elvis1.sh README echo >>elvis1.sh ': ------------------------ CUT HERE --------------------' echo >>elvis1.sh 'test -d doc || mkdir doc || exit 2' shar >>elvis1.sh -h $(SRC1) elvis2.sh: $(SRC2) echo >elvis2.sh ': ------------------------ CUT HERE --------------------' echo >>elvis2.sh 'test -d doc || mkdir doc || exit 2' shar >>elvis2.sh -h $(SRC2) elvis3.sh: $(SRC3) shar $(SRC3) >elvis3.sh elvis4.sh: $(SRC4) shar $(SRC4) >elvis4.sh elvis5.sh: $(SRC5) shar $(SRC5) >elvis5.sh elvis6.sh: $(SRC6) shar $(SRC6) >elvis6.sh elvis7.sh: $(SRC7) shar $(SRC7) >elvis7.sh elvis8.sh: $(SRC8) shar $(SRC8) >elvis8.sh ############################################################################## # Under XENIX only! This stores all sources on a 3.5" 720k floppy disk. floppy: $(SRC1) $(SRC2) $(SRC3) $(SRC4) $(SRC5) $(SRC6) $(SRC7) $(SRC8) tar c5v $(SRC1) $(SRC2) $(SRC3) $(SRC4) $(SRC5) $(SRC6) $(SRC7) $(SRC8) SHAR_EOF fi # end of overwriting check if test -f 'config.h' then echo shar: will not over-write existing file "'config.h'" else cat << \SHAR_EOF > 'config.h' /* * vi configuration file * We try to automatically configure to various compilers and operating * systems. Extend the autoconf section as needed. */ /*************************** autoconf section ************************/ /* standard unix V (?) */ #ifdef M_SYSV # define UNIXV 1 #endif /* xelos system, University of Ulm */ #ifdef xelos # define UNIXV 1 #endif /* BSD UNIX? */ #ifdef bsd # define BSD 1 #endif /* Microsoft C: sorry, Watcom does the same thing */ #ifdef M_I86 # ifndef M_SYSV # define MSDOS 1 # define MICROSOFT 1 # define COMPILED_BY "Microsoft C 5.10" # endif #endif /* Borlands Turbo C */ #ifdef __TURBOC__ # define MSDOS 1 # define TURBOC 1 # define COMPILED_BY "Turbo C 2.00" #endif /* Tos Mark-Williams */ #ifdef M68000 # define TOS 1 # define COMPILED_BY "Mark Williams C" #endif /* OS9/68000 */ #ifdef OSK # define COMPILED_BY "Microware C V2.3 Edition 40" #endif /*************************** end of autoconf section ************************/ /* All undefined symbols are defined to zero here, to allow for older */ /* compilers which dont understand #if defined() or #if UNDEFINED_SYMBOL */ /*************************** operating systems *****************************/ #ifndef BSD # define BSD 0 /* UNIX - Berkeley 4.x */ #endif #ifndef UNIXV # define UNIXV 0 /* UNIX - AT&T SYSV */ #endif #ifndef UNIX7 # define UNIX7 0 /* UNIX - version 7 */ #endif #ifndef MSDOS # define MSDOS 0 /* PC */ #endif #ifndef TOS # define TOS 0 /* Atari ST */ #endif #ifndef AMIGA # define AMIGA 0 /* Commodore Amiga */ #endif #ifndef OSK # define OSK 0 /* OS-9 / 68k */ #endif #ifndef COHERENT # define COHERENT 0 /* Coherent */ #endif /* Minix has no predefines */ #if !BSD && !UNIXV && !UNIX7 && !MSDOS && !TOS && !AMIGA && !OSK && !COHERENT # define MINIX 1 #else # define MINIX 0 #endif /* generic combination of Unices */ #if UNIXV || UNIX7 || BSD || MINIX || COHERENT # define ANY_UNIX 1 #else # define ANY_UNIX 0 #endif /*************************** compilers **************************************/ #ifndef MICROSOFT # define MICROSOFT 0 #endif #ifndef TURBOC # define TURBOC 0 #endif /******************************* Credit ************************************/ #if OPENWINDOWS # define CREDIT "Ported to X11/NeWS by Mike Hoegeman" #endif #if MSDOS # define CREDIT "Ported to MS-DOS by Guntram Blohm & Martin Patzel" #endif #if TOS # define CREDIT "Ported to Atari/TOS by Guntram Blohm & Martin Patzel" #endif #if OSK # define CREDIT "Ported to Microware OS9/68k by Peter Reinig" #endif #if COHERENT # define CREDIT "Ported to Coherent by Esa Ahola" #endif /*************************** functions depending on OS *********************/ /* Only MSDOS, TOS, and OS9 need a special function for reading from the * keyboard. All others just read from file descriptor 0. */ #if !MSDOS && !TOS && !OSK && !OPENWINDOWS # define ttyread(buf, len) read(0, buf, (unsigned)len) /* raw read */ #endif #if !TOS && !OPENWINDOWS # define ttywrite(buf, len) write(1, buf, (unsigned)(len)) /* raw write */ #endif /* The strchr() function is an official standard now, so everybody has it * except Unix version 7 (which is old) and BSD Unix (which is academic). * Those guys use something called index() to do the same thing. */ #if BSD || UNIX7 || OSK # define strchr index #endif extern char *strchr(); /* BSD uses bcopy() instead of memcpy() */ #if BSD #define memcpy(dest, src, siz) bcopy(src, dest, siz) #endif /* text versa binary mode for read/write */ #if !TOS #define tread(fd,buf,n) read(fd,buf,(unsigned)(n)) #define twrite(fd,buf,n) write(fd,buf,(unsigned)(n)) #endif /**************************** Compiler quirks *********************************/ /* the UNIX version 7 and (some) TOS compilers, don't allow "void" */ #if UNIX7 || TOS # define void int #endif /* as far as I know, all compilers except version 7 support unsigned char */ /* NEWFLASH: the Minix-ST compiler has subtle problems with unsigned char */ #if UNIX7 || MINIX # define UCHAR(c) ((c) & 0xff) # define uchar char #else # define UCHAR(c) ((unsigned char)(c)) # define uchar unsigned char #endif /* Some compilers prefer to have malloc declared as returning a (void *) */ #if BSD extern void *malloc(); #else extern char *malloc(); #endif /* Most compilers could benefit from using the "register" storage class */ #if 1 # define REG register #endif /******************* Names of files and environment vars **********************/ #if ANY_UNIX # ifndef TMPDIR # if MINIX # define TMPDIR "/usr/tmp" /* Keep elvis' temp files off RAM disk! */ # else # define TMPDIR "/tmp" /* directory where temp files live */ # endif # endif # define MAXTMPNAMELEN 256 /* length for tmp file name buffer */ # define TMPNAME "%s/El%01x%04x%03x-%03x" /* temp file */ # define CUTNAME "%s/El_%04x%03x" /* cut buffer's temp file */ # ifndef EXRC # define EXRC ".exrc" /* init file in current directory */ # endif # define SCRATCHOUT "%s/soXXXXXX" /* temp file used as input to filter */ # ifndef EXINIT # define EXINIT "EXINIT" # endif # ifndef SHELL # define SHELL "/bin/sh" /* default shell */ # endif # if COHERENT # ifndef REDIRECT # define REDIRECT ">" /* Coherent CC writes errors to stdout */ # endif # endif #endif #if MSDOS || TOS /* do not change TMPNAME, CUTNAME and SCRATCH*: they MUST begin with '%s\\'! */ # ifndef TMPDIR # define TMPDIR "C:\\tmp" /* directory where temp files live */ # endif # define TMPNAME "%s\\elv%x%04x.%03x" /* temp file */ # define CUTNAME "%s\\elv_%04x.%03x" /* cut buffer's temp file */ # if MSDOS # if MICROSOFT # define CC_COMMAND "cl -c" /* C compiler */ # else /* TURBO_C */ # define CC_COMMAND "tc" /* C compiler */ # endif # define MAXTMPNAMELEN 80 /* length for tmp file name buffer */ # endif # define SCRATCHIN "%s\\siXXXXXX" /* DOS ONLY - output of filter program */ # define SCRATCHOUT "%s\\soXXXXXX" /* temp file used as input to filter */ # define SLASH '\\' # ifndef SHELL # if TOS # define SHELL "shell.ttp" /* default shell */ # else # define SHELL "command.com" /* default shell */ # endif # endif # define NEEDSYNC TRUE /* assume ":se sync" by default */ # define REDIRECT ">" /* shell's redirection of stderr */ # ifndef MAXMAPS # define MAXMAPS 40 # endif # ifndef EXINIT # define EXINIT "EXINIT" # endif #endif #if OSK # ifndef TMPDIR # define TMPDIR "/dd/tmp" /* directory where temp files live */ # endif # define TMPNAME "%s/elv%x%04x%03x" /* temp file */ # define CUTNAME "%s/elv_%04x%03x" /* cut buffer's temp file */ # ifndef CC_COMMAND # define CC_COMMAND "cc -r" /* name of the compiler */ # endif # ifndef EXRC # define EXRC ".exrc" /* init file in current directory */ # endif # define SCRATCHOUT "%s/soXXXXXX" /* temp file used as input to filter */ # ifndef SHELL # define SHELL "shell" /* default shell */ # endif # define FILEPERMS (S_IREAD|S_IWRITE) /* file permissions used for creat() */ # define REDIRECT ">>-" /* shell's redirection of stderr */ #endif #ifndef TAGS # define TAGS "tags" /* tags file */ #endif #ifndef TMPNAME # define TMPNAME "%s/elv%x%04x.%03x" /* temp file */ #endif #ifndef CUTNAME # define CUTNAME "%s/elv_%04x.%03x" /* cut buffer's temp file */ #endif #ifndef EXRC # define EXRC "elvis.rc" #endif #ifndef HMEXRC # if !MSDOS && !TOS # define HMEXRC EXRC # endif #endif #ifndef KEYWORDPRG # define KEYWORDPRG "ref" #endif #ifndef SCRATCHOUT # define SCRATCHIN "%s/SIXXXXXX" # define SCRATCHOUT "%s/SOXXXXXX" #endif #ifndef ERRLIST # define ERRLIST "errlist" #endif #ifndef SLASH # define SLASH '/' #endif #ifndef SHELL # define SHELL "shell" #endif #ifndef REG # define REG #endif #ifndef NEEDSYNC # define NEEDSYNC FALSE #endif #ifndef FILEPERMS # define FILEPERMS 0666 #endif #ifndef CC_COMMAND # define CC_COMMAND "cc -c" #endif #ifndef MAKE_COMMAND # define MAKE_COMMAND "make" #endif #ifndef REDIRECT # define REDIRECT "2>" #endif #ifndef MAXMAPS # define MAXMAPS 20 /* number of :map keys */ #endif #ifndef MAXDIGS # define MAXDIGS 30 /* number of :digraph combos */ #endif #ifndef MAXABBR # define MAXABBR 20 /* number of :abbr entries */ #endif SHAR_EOF fi # end of overwriting check if test -f 'curses.h' then echo shar: will not over-write existing file "'curses.h'" else cat << \SHAR_EOF > 'curses.h' /* curses.h */ /* Author: * Steve Kirkendall * 14407 SW Teal Blvd. #C * Beaverton, OR 97005 * kirkenda@cs.pdx.edu */ #include "wconfig.h" /* This is the header file for a small, fast, fake curses package */ /* termcap stuff */ extern char *Tgoto(); extern char *Tgetstr(); extern void Tputs(); #if MSDOS /* BIOS interface used instead of termcap for MS-DOS */ extern int vmode; extern void v_up(); extern void v_cb(); extern void v_cs(); extern void v_ce(); extern void v_cl(); extern void v_cd(); extern void v_al(); extern void v_dl(); extern void v_sr(); extern void v_move(); #endif /* faddch() is a function. a pointer to it is passed to Tputs() */ extern int faddch(); /* data types */ #define WINDOW char /* CONSTANTS & SYMBOLS */ #define TRUE 1 #define FALSE 0 #define A_NORMAL 0 #define A_STANDOUT 1 #define A_BOLD 2 #define A_UNDERLINE 3 #define A_ALTCHARSET 4 #if MSDOS #define KBSIZ (10*1024) #else #define KBSIZ (6*1024) #endif /* extern variables, defined in curses.c */ extern short ospeed; /* tty speed, eg B2400 */ #if OSK extern char PC_; /* Pad char */ #else extern char PC; /* Pad char */ #endif extern WINDOW *stdscr; /* pointer into kbuf[] */ extern WINDOW kbuf[KBSIZ]; /* a very large output buffer */ extern int LINES; /* :li#: number of rows */ extern int COLS; /* :co#: number of columns */ extern int AM; /* :am: boolean: auto margins? */ extern int PT; /* :pt: boolean: physical tabs? */ extern char *BC; /* :bc=: backspace char string */ extern char *VB; /* :vb=: visible bell */ extern char *UP; /* :up=: move cursor up */ extern char *SO; /* :so=: standout start */ extern char *SE; /* :se=: standout end */ extern char *US; /* :us=: underline start */ extern char *UE; /* :ue=: underline end */ extern char *MD; /* :md=: bold start */ extern char *ME; /* :me=: bold end */ extern char *AS; /* :as=: alternate (italic) start */ extern char *AE; /* :ae=: alternate (italic) end */ extern char *CM; /* :cm=: cursor movement */ extern char *CE; /* :ce=: clear to end of line */ extern char *CD; /* :cd=: clear to end of screen */ extern char *AL; /* :al=: add a line */ extern char *DL; /* :dl=: delete a line */ #if OSK extern char *SR_; /* :sr=: scroll reverse */ #else extern char *SR; /* :sr=: scroll reverse */ #endif extern char *KS; /* :ks=: init string for cursor */ extern char *KE; /* :ke=: restore string for cursor */ extern char *KU; /* :ku=: sequence sent by up key */ extern char *KD; /* :kd=: sequence sent by down key */ extern char *KL; /* :kl=: sequence sent by left key */ extern char *KR; /* :kr=: sequence sent by right key */ extern char *PU; /* :PU=: key sequence sent by PgUp key */ extern char *PD; /* :PD=: key sequence sent by PgDn key */ extern char *HM; /* :HM=: key sequence sent by Home key */ extern char *EN; /* :EN=: key sequence sent by End key */ extern char *IM; /* :im=: insert mode start */ extern char *IC; /* :ic=: insert following char */ extern char *EI; /* :ei=: insert mode end */ extern char *DC; /* :dc=: delete a character */ extern char *TI; /* :ti=: terminal init */ /* GB */ extern char *TE; /* :te=: terminal exit */ /* GB */ #ifndef NO_CURSORSHAPE extern char *CQ; /* :cQ=: normal cursor */ extern char *CX; /* :cX=: cursor used for EX command/entry */ extern char *CV; /* :cV=: cursor used for VI command mode */ extern char *CI; /* :cI=: cursor used for VI input mode */ extern char *CR; /* :cR=: cursor used for VI replace mode */ #endif extern char *aend; /* end an attribute -- either UE or ME */ extern char ERASEKEY; /* taken from the ioctl structure */ /* Msdos-versions may use bios; others always termcap. * Will emit some 'code has no effect' warnings in unix. */ #if MSDOS extern char o_pcbios[1]; /* BAH! */ #define CHECKBIOS(x,y) (*o_pcbios ? (x) : (y)) #define VOIDBIOS(x,y) {if (*o_pcbios) {x;} else {y;}} #else #define CHECKBIOS(x,y) (y) #define VOIDBIOS(x,y) {y;} #endif #define do_VB() VOIDBIOS(;, Tputs(VB, 1, faddch)) #define do_UP() VOIDBIOS(v_up(), Tputs(UP, 1, faddch)) #define do_SO() VOIDBIOS((vmode=A_STANDOUT), Tputs(SO, 1, faddch)) #define do_SE() VOIDBIOS((vmode=A_NORMAL), Tputs(SE, 1, faddch)) #define do_US() VOIDBIOS((vmode=A_UNDERLINE), Tputs(US, 1, faddch)) #define do_UE() VOIDBIOS((vmode=A_NORMAL), Tputs(UE, 1, faddch)) #define do_MD() VOIDBIOS((vmode=A_BOLD), Tputs(MD, 1, faddch)) #define do_ME() VOIDBIOS((vmode=A_NORMAL), Tputs(ME, 1, faddch)) #define do_AS() VOIDBIOS((vmode=A_ALTCHARSET), Tputs(AS, 1, faddch)) #define do_AE() VOIDBIOS((vmode=A_NORMAL), Tputs(AE, 1, faddch)) #undef do_CM /* move */ #define do_CE() VOIDBIOS(v_ce(), Tputs(CE, 1, faddch)) #define do_CD() VOIDBIOS(v_cd(), Tputs(CD, 1, faddch)) #define do_AL() VOIDBIOS(v_al(), Tputs(AL, LINES, faddch)) #define do_DL() VOIDBIOS(v_dl(), Tputs(DL, LINES, faddch)) #if OSK #define do_SR() VOIDBIOS(v_sr(), Tputs(SR_, 1, faddch)) #else #define do_SR() VOIDBIOS(v_sr(), Tputs(SR, 1, faddch)) #endif #define do_KS() VOIDBIOS(1, Tputs(KS, 1, faddch)) #define do_KE() VOIDBIOS(1, Tputs(KE, 1, faddch)) #define do_IM() VOIDBIOS(;, Tputs(IM, 1, faddch)) #define do_IC() VOIDBIOS(;, Tputs(IC, 1, faddch)) #define do_EI() VOIDBIOS(;, Tputs(EI, 1, faddch)) #define do_DC() VOIDBIOS(;, Tputs(DC, COLS, faddch)) #define do_TI() VOIDBIOS(;, (void)ttywrite(TI, (unsigned)strlen(TI))) #define do_TE() VOIDBIOS(;, (void)ttywrite(TE, (unsigned)strlen(TE))) #ifndef NO_CURSORSHAPE # define do_CQ() VOIDBIOS(v_cs(), Tputs(CQ, 1, faddch)) # define do_CX() VOIDBIOS(v_cs(), Tputs(CX, 1, faddch)) # define do_CV() VOIDBIOS(v_cs(), Tputs(CV, 1, faddch)) # define do_CI() VOIDBIOS(v_cb(), Tputs(CI, 1, faddch)) # define do_CR() VOIDBIOS(v_cb(), Tputs(CR, 1, faddch)) #endif #define do_aend() VOIDBIOS((vmode=A_NORMAL), Tputs(aend, 1, faddch)) #define has_AM CHECKBIOS(1, AM) #define has_PT CHECKBIOS(0, PT) #define has_VB CHECKBIOS((char *)0, VB) #define has_UP CHECKBIOS((char *)1, UP) #define has_SO CHECKBIOS((char)1, (*SO)) #define has_SE CHECKBIOS((char)1, (*SE)) #define has_US CHECKBIOS((char)1, (*US)) #define has_UE CHECKBIOS((char)1, (*UE)) #define has_MD CHECKBIOS((char)1, (*MD)) #define has_ME CHECKBIOS((char)1, (*ME)) #define has_AS CHECKBIOS((char)1, (*AS)) #define has_AE CHECKBIOS((char)1, (*AE)) #undef has_CM /* cursor move: don't need */ #define has_CB CHECKBIOS(1, 0) #define has_CS CHECKBIOS(1, 0) #define has_CE CHECKBIOS((char *)1, CE) #define has_CD CHECKBIOS((char *)1, CD) #define has_AL CHECKBIOS((char *)1, AL) #define has_DL CHECKBIOS((char *)1, DL) #if OSK #define has_SR CHECKBIOS((char *)1, SR_) #else #define has_SR CHECKBIOS((char *)1, SR) #endif #define has_KS CHECKBIOS((char)1, (*KS)) #define has_KE CHECKBIOS((char)1, (*KE)) #define has_KU CHECKBIOS("#H", KU) #define has_KD CHECKBIOS("#P", KD) #define has_KL CHECKBIOS("#K", KL) #define has_KR CHECKBIOS("#M", KR) #define has_HM CHECKBIOS("#G", HM) #define has_EN CHECKBIOS("#O", EN) #define has_PU CHECKBIOS("#I", PU) #define has_PD CHECKBIOS("#Q", PD) #define has_IM CHECKBIOS((char)0, (*IM)) #define has_IC CHECKBIOS((char)0, (*IC)) #define has_EI CHECKBIOS((char)0, (*EI)) #define has_DC CHECKBIOS((char *)0, DC) #define has_TI CHECKBIOS((char)0, (*TI)) #define has_TE CHECKBIOS((char)0, (*TE)) #ifndef NO_CURSORSHAPE #define has_CQ CHECKBIOS((char *)1, CQ) #endif /* (pseudo)-Curses-functions */ #ifdef lint # define _addCR VOIDBIOS(;, (stdscr[-1] == '\n' ? qaddch('\r') : (stdscr[-1] = '\n'))) #else # if OSK # define _addCR VOIDBIOS(;, (stdscr[-1] == '\n' ? qaddch('\l') : (stdscr[-1] = stdscr[-1]))) # else # define _addCR VOIDBIOS(;, (stdscr[-1] == '\n' ? qaddch('\r') : 0)) #endif #endif #define qaddch(ch) CHECKBIOS(v_put(ch), (*stdscr++ = (ch))) #if OSK #define addch(ch) if (qaddch(ch) == '\n') qaddch('\l'); else #else #define addch(ch) if (qaddch(ch) == '\n') qaddch('\r'); else #endif extern void initscr(); extern void endwin(); extern void suspend_curses(); extern void resume_curses(); extern void attrset(); extern void insch(); extern void qaddstr(); #define addstr(str) {qaddstr(str); _addCR;} #define move(y,x) VOIDBIOS(v_move(x,y), \ Tputs(Tgoto(CM, x, y), 1, faddch)) #define mvaddch(y,x,ch) {move(y,x); addch(ch);} #define refresh() VOIDBIOS(;, wrefresh(stdscr)) #define wrefresh(w) if ((w) != kbuf) VOIDBIOS((w) = kbuf, {ttywrite(kbuf, (unsigned)((w) - kbuf)); (w) = kbuf;}) else #define wqrefresh(w) if ((w) - kbuf > 2000) VOIDBIOS((w) = kbuf, {ttywrite(kbuf, (unsigned)((w) - kbuf)); (w) = kbuf;}) else #define standout() do_SO() #define standend() do_SE() #define clrtoeol() do_CE() #define clrtobot() do_CD() #define insertln() do_AL() #define deleteln() do_DL() #define delch() do_DC() #define scrollok(w,b) #define raw() #define echo() #define cbreak() #define noraw() #define noecho() #define nocbreak() SHAR_EOF fi # end of overwriting check if test -f 'elvis_cps.h' then echo shar: will not over-write existing file "'elvis_cps.h'" else cat << \SHAR_EOF > 'elvis_cps.h' /* DO NOT EDIT THIS FILE. It contains C->PostScript communication definitions that were automatically generated from elvis_cps.cps */ #define ps_RunFile(P__0) pprintf(PostScript, _CPS_ps_RunFile, 6, P__0) static char _CPS_ps_RunFile[] = "%srun "; #define ps_RegisterTag(P__0,P__1) pprintf(PostScript, _CPS_ps_RegisterTag, 7, P__0, P__1) static char _CPS_ps_RegisterTag[] = "%s\2469%d\264"; #define ps_ST(P__0,L__0) pprintf(PostScript, _CPS_ps_ST, 11, L__0, P__0) static char _CPS_ps_ST[] = "%*s/ST C S "; #define ps_scroll_down(P__0) pprintf(PostScript, _CPS_ps_scroll_down, 10, P__0) static char _CPS_ps_scroll_down[] = "%d/SR C S "; #define ps_pswrite(P__0,L__0) pprintf(PostScript, _CPS_ps_pswrite, 3, L__0, P__0) static char _CPS_ps_pswrite[] = "%*p"; #define ps_Cr() pprintf(PostScript, _CPS_ps_Cr, 8) static char _CPS_ps_Cr[] = "/Cr C S "; #define ps_Nl() pprintf(PostScript, _CPS_ps_Nl, 8) static char _CPS_ps_Nl[] = "/Nl C S "; #define ps_CrNl() pprintf(PostScript, _CPS_ps_CrNl, 10) static char _CPS_ps_CrNl[] = "/CrNl C S "; #define ps_beep() pprintf(PostScript, _CPS_ps_beep, 6) static char _CPS_ps_beep[] = "beep\246\222"; #define ps_enable_cursor() pprintf(PostScript, _CPS_ps_enable_cursor, 8) static char _CPS_ps_enable_cursor[] = "/ve C S "; #define ps_disable_cursor() pprintf(PostScript, _CPS_ps_disable_cursor, 8) static char _CPS_ps_disable_cursor[] = "/vi C S "; #define ps_rendermsg(P__0) pprintf(PostScript, _CPS_ps_rendermsg, 24, P__0) static char _CPS_ps_rendermsg[] = "%s\246\220/setfooter win send "; #define ps_appendmsg(P__0,P__1) pprintf(PostScript, _CPS_ps_appendmsg, 32, P__0, P__1) static char _CPS_ps_appendmsg[] = "%s%sappend\246\220/setfooter win send "; #define ps_set_title(P__0) pprintf(PostScript, _CPS_ps_set_title, 94, P__0, P__0, P__0) static char _CPS_ps_set_title[] = "%s/setlabel win send\2463\246 0 && (_CPS_RETURN_ps_get_lines_and_cols(P__0, P__1), 1)) #define _CPS_RETURN_ps_get_lines_and_cols(P__0, P__1) pscanf(PostScriptInput,"dd", P__0, P__1) static char _CPS_ps_get_lines_and_cols[] = "{\200\n\246\311Height\246\321Width\246\321flush } C send "; #ifndef PSMACROS_H #include /* standard cdef macros */ #endif SHAR_EOF fi # end of overwriting check if test -f 'osk.h' then echo shar: will not over-write existing file "'osk.h'" else cat << \SHAR_EOF > 'osk.h' /* * OS9 stat : @(#)stat.h 1.2 87/19/12 */ /* @(#)stat.h 6.1 */ /* * Structure of the result of stat */ #ifndef CLK_TCK #include #endif struct stat { int st_dev; long st_ino; unsigned short st_mode; unsigned short st_nlink; unsigned short st_uid; unsigned short st_gid; int st_rdev; long st_size; time_t st_atime; time_t st_mtime; time_t st_ctime; }; SHAR_EOF fi # end of overwriting check if test -f 'regexp.h' then echo shar: will not over-write existing file "'regexp.h'" else cat << \SHAR_EOF > 'regexp.h' /* * Definitions etc. for regexp(3) routines. * * Caveat: this is V8 regexp(3) [actually, a reimplementation thereof], * not the System V one. */ #define NSUBEXP 10 typedef struct regexp { char *startp[NSUBEXP]; char *endp[NSUBEXP]; int minlen; /* length of shortest possible match */ char first; /* first character, if known; else \0 */ char bol; /* boolean: must start at beginning of line? */ char program[1]; /* Unwarranted chumminess with compiler. */ } regexp; extern regexp *regcomp(); extern int regexec(); extern void regsub(); extern void regerror(); SHAR_EOF fi # end of overwriting check if test -f 'vi.h' then echo shar: will not over-write existing file "'vi.h'" else cat << \SHAR_EOF > 'vi.h' /* vi.h */ /* Author: * Steve Kirkendall * 14407 SW Teal Blvd. #C * Beaverton, OR 97005 * kirkenda@cs.pdx.edu */ /* This is the header file for my version of vi. */ #define VERSION "ELVIS 1.4, by Steve Kirkendall" #define COPYING "This version of ELVIS is freely redistributable." #include extern int errno; #if TOS #define ENOENT (-AEFILNF) #endif #if TOS # include # define O_RDONLY 0 # define O_WRONLY 1 # define O_RDWR 2 #else # if OSK # include # define O_RDONLY S_IREAD # define O_WRONLY S_IWRITE # define O_RDWR (S_IREAD | S_IWRITE) # define ENOENT E_PNNF # else # include # if COHERENT # include # else # include # endif # endif #endif #ifndef O_BINARY # define O_BINARY 0 #endif #include "curses.h" /*------------------------------------------------------------------------*/ /* Miscellaneous constants. */ #define INFINITY 2000000001L /* a very large integer */ #define LONGKEY 10 /* longest possible raw :map key */ #ifndef MAXRCLEN # define MAXRCLEN 1000 /* longest possible .exrc file */ #endif /*------------------------------------------------------------------------*/ /* These describe how temporary files are divided into blocks */ #define BLKSIZE 1024 /* size of blocks */ #define MAXBLKS (BLKSIZE / sizeof(unsigned short)) typedef union { char c[BLKSIZE]; /* for text blocks */ unsigned short n[MAXBLKS]; /* for the header block */ } BLK; /*------------------------------------------------------------------------*/ /* These are used manipulate BLK buffers. */ extern BLK hdr; /* buffer for the header block */ extern BLK *blkget(); /* given index into hdr.c[], reads block */ extern BLK *blkadd(); /* inserts a new block into hdr.c[] */ /*------------------------------------------------------------------------*/ /* These are used to keep track of various flags */ extern struct _viflags { short file; /* file flags */ } viflags; /* file flags */ #define NEWFILE 0x0001 /* the file was just created */ #define READONLY 0x0002 /* the file is read-only */ #define HADNUL 0x0004 /* the file contained NUL characters */ #define MODIFIED 0x0008 /* the file has been modified */ #define NOFILE 0x0010 /* no name is known for the current text */ #define ADDEDNL 0x0020 /* newlines were added to the file */ /* macros used to set/clear/test flags */ #define setflag(x,y) viflags.x |= y #define clrflag(x,y) viflags.x &= ~y #define tstflag(x,y) (viflags.x & y) #define initflags() viflags.file = 0; /* The options */ extern char o_autoindent[1]; extern char o_autoprint[1]; extern char o_autowrite[1]; #ifndef NO_ERRLIST extern char o_cc[30]; #endif #ifndef NO_CHARATTR extern char o_charattr[1]; #endif extern char o_columns[3]; extern char o_digraph[1]; extern char o_directory[30]; extern char o_edcompatible[1]; extern char o_errorbells[1]; extern char o_exrefresh[1]; #ifndef NO_DIGRAPH extern char o_flipcase[80]; #endif #ifndef NO_SENTENCE extern char o_hideformat[1]; #endif extern char o_ignorecase[1]; #ifndef NO_EXTENSIONS extern char o_inputmode[1]; #endif extern char o_keytime[3]; extern char o_keywordprg[80]; extern char o_lines[3]; extern char o_list[1]; #ifndef NO_MAGIC extern char o_magic[1]; #endif #ifndef NO_ERRLIST extern char o_make[30]; #endif #ifndef NO_MODELINE extern char o_modeline[1]; #endif #ifndef NO_SENTENCE extern char o_paragraphs[30]; #endif #if MSDOS extern char o_pcbios[1]; #endif extern char o_readonly[1]; extern char o_report[3]; extern char o_scroll[3]; #ifndef NO_SENTENCE extern char o_sections[30]; #endif extern char o_shell[60]; #ifndef NO_SHOWMATCH extern char o_showmatch[1]; #endif #ifndef NO_SHOWMODE extern char o_smd[1]; #endif extern char o_shiftwidth[3]; extern char o_sidescroll[3]; extern char o_sync[1]; extern char o_tabstop[3]; extern char o_term[30]; extern char o_vbell[1]; extern char o_warn[1]; extern char o_wrapmargin[3]; extern char o_wrapscan[1]; /*------------------------------------------------------------------------*/ /* These help support the single-line multi-change "undo" -- shift-U */ extern char U_text[BLKSIZE]; extern long U_line; /*------------------------------------------------------------------------*/ /* These are used to refer to places in the text */ typedef long MARK; #define markline(x) (long)((x) / BLKSIZE) #define markidx(x) (int)((x) & (BLKSIZE - 1)) #define MARK_UNSET ((MARK)0) #define MARK_FIRST ((MARK)BLKSIZE) #define MARK_LAST ((MARK)(nlines * BLKSIZE)) #define MARK_AT_LINE(x) ((MARK)((x) * BLKSIZE)) #define NMARKS 29 extern MARK mark[NMARKS]; /* marks a-z, plus mark ' and two temps */ extern MARK cursor; /* mark where line is */ /*------------------------------------------------------------------------*/ /* These are used to keep track of the current & previous files. */ extern long origtime; /* modification date&time of the current file */ extern char origname[256]; /* name of the current file */ extern char prevorig[256]; /* name of the preceding file */ extern long prevline; /* line number from preceding file */ /*------------------------------------------------------------------------*/ /* misc housekeeping variables & functions */ extern int tmpfd; /* fd used to access the tmp file */ extern long lnum[MAXBLKS]; /* last line# of each block */ extern long nlines; /* number of lines in the file */ extern char args[BLKSIZE]; /* file names given on the command line */ extern int argno; /* the current element of args[] */ extern int nargs; /* number of filenames in args */ extern long changes; /* counts changes, to prohibit short-cuts */ extern int significant; /* boolean: was a *REAL* change made? */ extern int mustredraw; /* boolean: force total redraw of screen? */ extern BLK tmpblk; /* a block used to accumulate changes */ extern long topline; /* file line number of top line */ extern int leftcol; /* column number of left col */ #define botline (topline + LINES - 2) #define rightcol (leftcol + COLS - 1) extern int physcol; /* physical column number that cursor is on */ extern int physrow; /* physical row number that cursor is on */ extern int exwrote; /* used to detect verbose ex commands */ extern int doingdot; /* boolean: are we doing the "." command? */ extern int doingglobal; /* boolean: are doing a ":g" command? */ extern long rptlines; /* number of lines affected by a command */ extern char *rptlabel; /* description of how lines were affected */ extern char *fetchline(); /* read a given line from tmp file */ extern char *parseptrn(); /* isolate a regexp in a line */ extern MARK paste(); /* paste from cut buffer to a given point */ extern char *wildcard(); /* expand wildcards in filenames */ extern MARK input(); /* inserts characters from keyboard */ extern char *linespec(); /* finds the end of a /regexp/ string */ #define ctrl(ch) ((ch)&037) #ifndef NO_RECYCLE extern long allocate(); /* allocate a free block of the tmp file */ #endif extern int trapint(); /* trap handler for SIGINT */ extern void blkdirty(); /* marks a block as being "dirty" */ extern void blkflush(); /* writes a single dirty block to the disk */ extern void blksync(); /* forces all "dirty" blocks to disk */ extern void blkinit(); /* resets the block cache to "empty" state */ extern void beep(); /* rings the terminal's bell */ extern void exrefresh(); /* writes text to the screen */ extern void msg(); /* writes a printf-style message to the screen */ extern void reset_msg(); /* resets the "manymsgs" flag */ extern void endmsgs(); /* if "manymsgs" is set, then scroll up 1 line */ extern void garbage(); /* reclaims any garbage blocks */ extern void redraw(); /* updates the screen after a change */ extern void resume_curses();/* puts the terminal in "cbreak" mode */ extern void beforedo(); /* saves current revision before a new change */ extern void afterdo(); /* marks end of a beforedo() change */ extern void abortdo(); /* like "afterdo()" followed by "undo()" */ extern int undo(); /* restores file to previous undo() */ extern void dumpkey(); /* lists key mappings to the screen */ extern void mapkey(); /* defines a new key mapping */ extern void savekeys(); /* lists key mappings to a file */ extern void redrawrange(); /* records clues from modify.c */ extern void cut(); /* saves text in a cut buffer */ extern void delete(); /* deletes text */ extern void add(); /* adds text */ extern void change(); /* deletes text, and then adds other text */ extern void cutswitch(); /* updates cut buffers when we switch files */ extern void do_abbr(); /* defines or lists abbreviations */ extern void do_digraph(); /* defines or lists digraphs */ extern void exstring(); /* execute a string as EX commands */ extern void dumpopts(); extern void setopts(); extern void saveopts(); #ifndef NO_DIGRAPH extern void savedigs(); #endif #ifndef NO_ABBR extern void saveabbr(); #endif extern void cutname(); extern void cutname(); extern void initopts(); extern void cutend(); /*------------------------------------------------------------------------*/ /* macros that are used as control structures */ #define BeforeAfter(before, after) for((before),bavar=1;bavar;(after),bavar=0) #define ChangeText BeforeAfter(beforedo(FALSE),afterdo()) extern int bavar; /* used only in BeforeAfter macros */ /*------------------------------------------------------------------------*/ /* These are the movement commands. Each accepts a mark for the starting */ /* location & number and returns a mark for the destination. */ extern MARK m_updnto(); /* k j G */ extern MARK m_right(); /* h */ extern MARK m_left(); /* l */ extern MARK m_tocol(); /* | */ extern MARK m_front(); /* ^ */ extern MARK m_rear(); /* $ */ extern MARK m_fword(); /* w */ extern MARK m_bword(); /* b */ extern MARK m_eword(); /* e */ extern MARK m_fWord(); /* W */ extern MARK m_bWord(); /* B */ extern MARK m_eWord(); /* E */ extern MARK m_fparagraph(); /* } */ extern MARK m_bparagraph(); /* { */ extern MARK m_fsection(); /* ]] */ extern MARK m_bsection(); /* [[ */ extern MARK m_match(); /* % */ #ifndef NO_SENTENCE extern MARK m_fsentence(); /* ) */ extern MARK m_bsentence(); /* ( */ #endif extern MARK m_tomark(); /* 'm */ extern MARK m_nsrch(); /* n */ extern MARK m_Nsrch(); /* N */ extern MARK m_fsrch(); /* /regexp */ extern MARK m_bsrch(); /* ?regexp */ #ifndef NO_CHARSEARCH extern MARK m__ch(); /* ; , */ extern MARK m_fch(); /* f */ extern MARK m_tch(); /* t */ extern MARK m_Fch(); /* F */ extern MARK m_Tch(); /* T */ #endif extern MARK m_row(); /* H L M */ extern MARK m_z(); /* z */ extern MARK m_scroll(); /* ^B ^F ^E ^Y ^U ^D */ /* Some stuff that is used by movement functions... */ extern MARK adjmove(); /* a helper fn, used by move fns */ /* This macro is used to set the default value of cnt */ #define DEFAULT(val) if (cnt < 1) cnt = (val) /* These are used to minimize calls to fetchline() */ extern int plen; /* length of the line */ extern long pline; /* line number that len refers to */ extern long pchgs; /* "changes" level that len refers to */ extern char *ptext; /* text of previous line, if valid */ extern void pfetch(); extern char digraph(); /* This is used to build a MARK that corresponds to a specific point in the * line that was most recently pfetch'ed. */ #define buildmark(text) (MARK)(BLKSIZE * pline + (int)((text) - ptext)) /*------------------------------------------------------------------------*/ /* These are used to handle EX commands. */ #define CMD_NULL 0 /* NOT A VALID COMMAND */ #define CMD_ABBR 1 /* "define an abbreviation" */ #define CMD_ARGS 2 /* "show me the args" */ #define CMD_APPEND 3 /* "insert lines after this line" */ #define CMD_AT 4 /* "execute a cut buffer's contents via EX" */ #define CMD_BANG 5 /* "run a single shell command" */ #define CMD_CC 6 /* "run `cc` and then do CMD_ERRLIST" */ #define CMD_CD 7 /* "change directories" */ #define CMD_CHANGE 8 /* "change some lines" */ #define CMD_COPY 9 /* "copy the selected text to a given place" */ #define CMD_DELETE 10 /* "delete the selected text" */ #define CMD_DIGRAPH 11 /* "add a digraph, or display them all" */ #define CMD_EDIT 12 /* "switch to a different file" */ #define CMD_EQUAL 13 /* "display a line number" */ #define CMD_ERRLIST 14 /* "locate the next error in a list" */ #define CMD_FILE 15 /* "show the file's status" */ #define CMD_GLOBAL 16 /* "globally search & do a command" */ #define CMD_INSERT 17 /* "insert lines before the current line" */ #define CMD_JOIN 18 /* "join the selected line & the one after" */ #define CMD_LIST 19 /* "print lines, making control chars visible" */ #define CMD_MAKE 20 /* "run `make` and then do CMD_ERRLIST" */ #define CMD_MAP 21 /* "adjust the keyboard map" */ #define CMD_MARK 22 /* "mark this line" */ #define CMD_MKEXRC 23 /* "make a .exrc file" */ #define CMD_MOVE 24 /* "move the selected text to a given place" */ #define CMD_NEXT 25 /* "switch to next file in args" */ #define CMD_NUMBER 26 /* "print lines from the file w/ line numbers" */ #define CMD_PRESERVE 27 /* "act as though vi crashed" */ #define CMD_PREVIOUS 28 /* "switch to the previous file in args" */ #define CMD_PRINT 29 /* "print the selected text" */ #define CMD_PUT 30 /* "insert any cut lines before this line" */ #define CMD_QUIT 31 /* "quit without writing the file" */ #define CMD_READ 32 /* "append the given file after this line */ #define CMD_RECOVER 33 /* "recover file after vi crashes" - USE -r FLAG */ #define CMD_REWIND 34 /* "rewind to first file" */ #define CMD_SET 35 /* "set a variable's value" */ #define CMD_SHELL 36 /* "run some lines through a command" */ #define CMD_SHIFTL 37 /* "shift lines left" */ #define CMD_SHIFTR 38 /* "shift lines right" */ #define CMD_SOURCE 39 /* "interpret a file's contents as ex commands" */ #define CMD_STOP 40 /* same as CMD_SUSPEND */ #define CMD_SUBAGAIN 41 /* "repeat the previous substitution" */ #define CMD_SUBSTITUTE 42 /* "substitute text in this line" */ #define CMD_SUSPEND 43 /* "suspend the vi session" */ #define CMD_TR 44 /* "transliterate chars in the selected lines" */ #define CMD_TAG 45 /* "go to a particular tag" */ #define CMD_UNABBR 46 /* "remove an abbreviation definition" */ #define CMD_UNDO 47 /* "undo the previous command" */ #define CMD_UNMAP 48 /* "remove a key sequence map */ #define CMD_VERSION 49 /* "describe which version this is" */ #define CMD_VGLOBAL 50 /* "apply a cmd to lines NOT containing an RE" */ #define CMD_VISUAL 51 /* "go into visual mode" */ #define CMD_WQUIT 52 /* "write this file out (any case) & quit" */ #define CMD_WRITE 53 /* "write the selected(?) text to a given file" */ #define CMD_XIT 54 /* "write this file out (if modified) & quit" */ #define CMD_YANK 55 /* "copy the selected text into the cut buffer" */ #ifdef DEBUG # define CMD_DEBUG 56 /* access to internal data structures */ # define CMD_VALIDATE 57 /* check for internal consistency */ #endif typedef int CMD; extern void ex(); extern void vi(); extern void doexcmd(); #ifndef NO_ABBR extern void cmd_abbr(); #endif extern void cmd_append(); extern void cmd_args(); #ifndef NO_AT extern void cmd_at(); #endif extern void cmd_cd(); extern void cmd_delete(); #ifndef NO_DIGRAPH extern void cmd_digraph(); #endif extern void cmd_edit(); #ifndef NO_ERRLIST extern void cmd_errlist(); #endif extern void cmd_file(); extern void cmd_global(); extern void cmd_join(); extern void cmd_mark(); #ifndef NO_ERRLIST extern void cmd_make(); #endif extern void cmd_map(); #ifndef NO_MKEXRC extern void cmd_mkexrc(); #endif extern void cmd_next(); extern void cmd_print(); extern void cmd_put(); extern void cmd_read(); extern void cmd_set(); extern void cmd_shell(); extern void cmd_shift(); extern void cmd_source(); extern void cmd_substitute(); extern void cmd_tag(); extern void cmd_undo(); extern void cmd_version(); extern void cmd_visual(); extern void cmd_write(); extern void cmd_xit(); extern void cmd_move(); #ifdef DEBUG extern void cmd_debug(); extern void cmd_validate(); #endif /*----------------------------------------------------------------------*/ /* These are used to handle VI commands */ extern MARK v_1ex(); /* : */ extern MARK v_mark(); /* m */ extern MARK v_quit(); /* Q */ extern MARK v_redraw(); /* ^L ^R */ extern MARK v_ulcase(); /* ~ */ extern MARK v_undo(); /* u */ extern MARK v_xchar(); /* x */ extern MARK v_Xchar(); /* X */ extern MARK v_replace(); /* r */ extern MARK v_overtype(); /* R */ extern MARK v_selcut(); /* " */ extern MARK v_paste(); /* p P */ extern MARK v_yank(); /* y Y */ extern MARK v_delete(); /* d D */ extern MARK v_join(); /* J */ extern MARK v_insert(); /* a A i I o O */ extern MARK v_change(); /* c C */ extern MARK v_subst(); /* s */ extern MARK v_lshift(); /* < */ extern MARK v_rshift(); /* > */ extern MARK v_filter(); /* ! */ extern MARK v_status(); /* ^G */ extern MARK v_switch(); /* ^^ */ extern MARK v_tag(); /* ^] */ extern MARK v_xit(); /* ZZ */ extern MARK v_undoline(); /* U */ extern MARK v_again(); /* & */ #ifndef NO_EXTENSIONS extern MARK v_keyword(); /* ^K */ extern MARK v_increment(); /* * */ #endif #ifndef NO_ERRLIST extern MARK v_errlist(); /* * */ #endif #ifndef NO_AT extern MARK v_at(); /* @ */ #endif /*----------------------------------------------------------------------*/ /* These describe what mode we're in */ #define MODE_EX 1 /* executing ex commands */ #define MODE_VI 2 /* executing vi commands */ #define MODE_COLON 3 /* executing an ex command from vi mode */ #define MODE_QUIT 4 extern int mode; #define WHEN_VICMD 1 /* getkey: we're reading a VI command */ #define WHEN_VIINP 2 /* getkey: we're in VI's INPUT mode */ #define WHEN_VIREP 4 /* getkey: we're in VI's REPLACE mode */ #define WHEN_EX 8 /* getkey: we're in EX mode */ #define WHEN_MSG 16 /* getkey: we're at a "more" prompt */ #define WHEN_INMV 256 /* in input mode, interpret the key in VICMD mode */ SHAR_EOF fi # end of overwriting check if test -f 'wconfig.h' then echo shar: will not over-write existing file "'wconfig.h'" else cat << \SHAR_EOF > 'wconfig.h' /* wconfig.h , window related configuration header file */ /* defining macros in this way allows us to fall back on using the dumb terminal functions if no window system is available at runtime the convention used is to make the macro the same name as the original dumb terminal name with the leading letter 'capped -MCH */ #ifndef _elvis_w_macs_ #define _elvis_w_macs_ 1 #include "config.h" #include #if OPENWINDOWS /* || SomeOtherWindowSys || ... */ /* using a window system */ #if OPENWINDOWS /* keep all the flags in a single structure to make it easier to convert to threads later */ struct ow_data { /* flags */ int background; int tty; int wLINES; int wCOLS; /* */ wire_Wire mainWire; int keyFromNews; }; #define ow_data_init(op) {\ (op)->background = 0;\ (op)->tty = 0;\ (op)->wLINES = 44;\ (op)->wCOLS = 80;\ (op)->mainWire = (wire_Wire) NULL;\ (op)->keyFromNews = -1;\ } extern struct ow_data Ow; /* termcap stuff */ #define Tgetent ow_tgetent #define Tputs ow_tputs #define Tgetnum ow_tgetnum #define Tgoto ow_tgoto #define Tgetstr ow_tgetstr #define Tgetflag ow_tgetflag #define Customflags(av, ac_p) ow_customflags(av, ac_p) #define Vi() ow_vi() #define Ex() ow_ex() #define Initscr() ow_initscr() #define Beep() ow_beep() #define Rendermsg(msg) ow_rendermsg(msg); #define Appendmsg(old,new) ow_appendmsg(old,new); #define FlushDisplay() ow_flushdisplay(); #define Getsize ow_getsize #define Resume_curses(quietly) ow_resume_curses((quietly)) #define Suspend_curses() ow_suspend_curses() #define Tmpstart(fname) ow_tmpstart(fname) #define Scrolldown(l,y,x) ow_scrolldown(l,y,x) #define Scrollup(l,y,x) ow_scrollup(l,y,x) #endif #else /* no window system , just use the dumb terminal functions */ /* termcap stuff */ #define Tgetent tgetent #define Tputs tputs #define Tgetnum tgetnum #define Tgoto tgoto #define Tgetstr tgetstr #define Tgetflag tgetflag #define Customflags(av, ac_p) /* no-op */ #define Vi() vi() #define Ex() ex() #define Initscr() initscr() #define Beep() beep() #define Rendermsg(msg) rendermsg(msg); #define Appendmsg(old,new) appendmsg(old,new); #define FlushDisplay() #define Getsize getsize #define Resume_curses(quietly) resume_curses((quietly)) #define Suspend_curses() suspend_curses() #define Tmpstart(fname) tmpstart(fname) #define Scrolldown(l,y,x) scrolldown(l,y,x) #define Scrollup(l,y,x) scrollup(l,y,x) #endif #endif SHAR_EOF fi # end of overwriting check # End of shell archive exit 0