allbery@uunet.UU.NET (Brandon S. Allbery - comp.sources.misc) (06/22/89)
Posting-number: Volume 7, Issue 53 Submitted-by: fox@marlow.UUCP (Paul Fox) Archive-name: crisp1.9/part33 #!/bin/sh # this is part 12 of a multipart archive # do not concatenate these parts, unpack them in order with /bin/sh # file ./m-vms.h continued # CurArch=12 if test ! -r s2_seq_.tmp then echo "Please unpack part 1 first!" exit 1; fi ( read Scheck if test "$Scheck" != $CurArch then echo "Please unpack part $Scheck next!" exit 1; else exit 0; fi ) < s2_seq_.tmp || exit 1 echo "x - Continuing file ./m-vms.h" sed 's/^X//' << 'SHAR_EOF' >> ./m-vms.h X * * X * CRISP - Custom Reduced Instruction Set Programmers Editor * X * * X * (C) Paul Fox, 1989 * X * 43, Jerome Close Tel: +44 6284 4222 * X * Marlow * X * Bucks. * X * England SL7 1TX * X * * X * * X * Please See COPYRIGHT notice. * X * * X * This file is suitable for the following operating systems: * X * * X * VAX/VMS. * X * * X ************************************************************************/ X X/************************************************************************ X * One of the following should be set to indicate machine type. * X * Some of the definitions may apply to more than one machine * X * type, eg SUN may be more indicative of BSD, but I dont have a * X * generic BSD to try this out on. * X ************************************************************************/ X/*# define SUN*/ X/*# define SYSV*/ X#define VMS X/************************************************************************ X * Some combination of the following may need to be set for * X * operating system dependent features which dont fit under the * X * general category of operating system features. * X ************************************************************************/ X/*# define BSD*/ X/*# define XENIX*/ X X/************************************************************************ X * DIRSIZ_DEFINED should be define'd if the POSIX directory * X * access include files are wrong. (Are they wrong or right ?) * X ************************************************************************/ X# define DIRSIZ_DEFINED X X/************************************************************************ X * The MALLOC definition tells the code that there is no * X * <malloc.h> file and that the malloc() library may behave in * X * strange ways which may force us to optimise our usage. It is * X * really only necessary if your system doesn't support the SVID * X * mallopt() call. drivers are streams modules. * X ************************************************************************/ X# define MALLOC X X/************************************************************************ X * The following # define is used to control the use of the enum * X * OPCODES typedef in the list.h. It doesn't matter if you set * X * this to 'int' as below, but if it is undefined then it is * X * easier to debug the CRISP lisp-code. Older Unix C compilers * X * do not treat enum's and int's as the same type and will * X * complain during compilation. * X ************************************************************************/ X/*# define OPCODE int*/ X X X/************************************************************************ X * If you have support for pty's in your kernel, then define * X * HAVE_PTY. If not #undef it, and normal unnamed pipes will be * X * used instead. * X ************************************************************************/ X/*# define HAVE_PTY*/ X X X/************************************************************************ X * SELECT should be defined if we can do a select() on the * X * keyboard and on the process pty's/pipes. This will tend to be * X * true on BSD systems, and Sys V.4. Alas, poll() isn't * X * generally applicable on V.3 because the standard pipe and tty * X * drivers are streams modules. * X ************************************************************************/ X/*# define SELECT*/ X X/************************************************************************ X * CRISP defines a typedef called u_char. Some Unix systems also * X * define this type in one of the system header files * X * (/usr/include/sys/types.h) which causes a compilation error. * X * If you have this typedef in your system header file, then * X * #define U_CHAR. Otherwise undefine it. * X ************************************************************************/ X/*# define U_CHAR*/ X X X SHAR_EOF echo "File ./m-vms.h is complete" chmod 0644 ./m-vms.h || echo "restore of ./m-vms.h fails" mkdir . >/dev/null 2>&1 echo "x - extracting ./m-xenix.h (Text)" sed 's/^X//' << 'SHAR_EOF' > ./m-xenix.h && X/************************************************************************ X * * X * CRISP - Custom Reduced Instruction Set Programmers Editor * X * * X * (C) Paul Fox, 1989 * X * 43, Jerome Close Tel: +44 6284 4222 * X * Marlow * X * Bucks. * X * England SL7 1TX * X * * X * * X * Please See COPYRIGHT notice. * X * * X * This file is suitable for the following operating systems: * X * * X * Xenix System V/386 * X * Xenix System V/286 (possibly - untested). * X * * X ************************************************************************/ X X/************************************************************************ X * One of the following should be set to indicate machine type. * X * Some of the definitions may apply to more than one machine * X * type, eg SUN may be more indicative of BSD, but I dont have a * X * generic BSD to try this out on. * X ************************************************************************/ X/*# define SUN*/ X# define SYSV X/*#define VMS*/ X/************************************************************************ X * Some combination of the following may need to be set for * X * operating system dependent features which dont fit under the * X * general category of operating system features. * X ************************************************************************/ X/*# define BSD*/ X/*# define XENIX*/ X X/************************************************************************ X * DIRSIZ_DEFINED should be define'd if the POSIX directory * X * access include files are wrong. (Are they wrong or right ?) * X ************************************************************************/ X/*# define DIRSIZ_DEFINED*/ X#undef DIRSIZ_DEFINED X X/************************************************************************ X * The following # define is used to control the use of the enum * X * OPCODE typedef in the list.h. It doesn't matter if you set * X * this to 'int' as below, but if it is undefined then it is * X * easier to debug the CRISP lisp-code. Older Unix C compilers * X * do not treat enum's and int's as the same type and will * X * complain during compilation. * X ************************************************************************/ X# define OPCODE int X/*#undef OPCODE */ X X X/************************************************************************ X * If you have support for pty's in your kernel, then define * X * HAVE_PTY. If not #undef it, and normal unnamed pipes will be * X * used instead. * X ************************************************************************/ X# undef HAVE_PTY X/*# define HAVE_PTY*/ X X/************************************************************************ X * SELECT should be defined if we can do a select() on the * X * keyboard and on the process pty's/pipes. This will tend to be * X * true on BSD systems, and Sys V.4. Alas, poll() isn't * X * generally applicable on V.3 because the standard pipe and tty * X * drivers are streams modules. * X ************************************************************************/ X# undef SELECT X/*# define SELECT*/ X X/************************************************************************ X * CRISP defines a typedef called u_char. Some Unix systems also * X * define this type in one of the system header files * X * (/usr/include/sys/types.h) which causes a compilation error. * X * If you have this typedef in your system header file, then * X * #define U_CHAR. Otherwise undefine it. * X ************************************************************************/ X#undef U_CHAR X/*# define U_CHAR*/ X X X SHAR_EOF chmod 0644 ./m-xenix.h || echo "restore of ./m-xenix.h fails" mkdir . >/dev/null 2>&1 echo "x - extracting ./s-bsd (Text)" sed 's/^X//' << 'SHAR_EOF' > ./s-bsd && X#! /bin/sh X# Machine dependent environment variables to control X# making of CRISP sources. X# X# This file is for generic BSD machines. X# XSHLIB= XG=-g Xexport SHLIB G SHAR_EOF chmod 0755 ./s-bsd || echo "restore of ./s-bsd fails" mkdir . >/dev/null 2>&1 echo "x - extracting ./s-sysv (Text)" sed 's/^X//' << 'SHAR_EOF' > ./s-sysv && X#! /bin/sh X# Machine dependent environment variables to control X# making of CRISP sources. X# X# This file is for generic System V systems, viz: X# X# Microport Unix V.3/386 X# Interactive Unix V.3/386 XSHLIB=-lc_s Xexport SHLIB SHAR_EOF chmod 0755 ./s-sysv || echo "restore of ./s-sysv fails" mkdir . >/dev/null 2>&1 echo "x - extracting ./s-xenix (Text)" sed 's/^X//' << 'SHAR_EOF' > ./s-xenix && X#! /bin/sh X# Machine dependent environment variables to control X# making of CRISP sources. X# X# This file is for generic Xenix System V/386. I no longer X# have a Xenix 286 system so you'll have to let me know if there X# are any problems with this. (You'll need at least -M2l for Xenix X# 286 CFLAGS). X# XSHLIB= Xexport SHLIB SHAR_EOF chmod 0755 ./s-xenix || echo "restore of ./s-xenix fails" mkdir vms >/dev/null 2>&1 echo "x - extracting vms/ccom.com (Text)" sed 's/^X//' << 'SHAR_EOF' > vms/ccom.com && X$ ! VMS command file used by the `ccom' command. X$ set verify X$ cc /debug /nolist 'p1' X$ set noverify X SHAR_EOF chmod 0644 vms/ccom.com || echo "restore of vms/ccom.com fails" mkdir vms >/dev/null 2>&1 echo "x - extracting vms/make.com (Text)" sed 's/^X//' << 'SHAR_EOF' > vms/make.com && X$ set noverify X$ @precomp X$ write sys$output "Compiling CRISP library files" X$ write sys$output "=============================" X$ write sys$output "" X$ X$ X$ write sys$output "Compiling dirlib." X$ @recomp vmsdir.c X$ X$ X$ write sys$output "Compiling foxlib." X$ @recomp bsearch.c X$ @recomp chk_alloc.c X$ @recomp instr.c X$ @recomp memcpy.c X$ @recomp strdup.c X$ @recomp strtok.c X$ @recomp tell.c X$ @recomp vmslib.c X$ X$ X$ write sys$output "Compiling llist." X$ @recomp ll_alloc.c X$ @recomp ll_append.c X$ @recomp ll_clear.c X$ @recomp ll_delete.c X$ @recomp ll_elem.c X$ @recomp ll_first.c X$ @recomp ll_free.c X$ @recomp ll_hook.c X$ @recomp ll_init.c X$ @recomp ll_insert.c X$ @recomp ll_lookup.c X$ @recomp ll_magic.c X$ @recomp ll_next.c X$ @recomp ll_prev.c X$ @recomp ll_push.c X$ @recomp ll_remove.c X$ @recomp ll_unhook.c X$ X$ X$ write sys$output "Compiling splay." X$ @recomp splay.c X$ @recomp sptree.c X$ @recomp spstats.c X$ X$ write sys$output "" X$ write sys$output "Compiling CRISP source files" X$ write sys$output "============================" X$ write sys$output "" X$ @recomp anchor.c X$ @recomp basic.c X$ @recomp bookmark.c X$ @recomp buffer.c X$ @recomp builtin.c X$ @recomp clock.c X$ @recomp config.c X$ @recomp debug.c X$ @recomp display.c X$ @recomp echo.c X$ @recomp env.c X$ @recomp eval.c X$ @recomp file.c X$ @recomp keywd.c X$ @recomp kill.c X$ @recomp language.c X$ @recomp line.c X$ @recomp lisp.c X$ @recomp list.c X$ @recomp m_buf.c X$ @recomp m_msg.c X$ @recomp mac1.c X$ @recomp main.c X$ @recomp map.c X$ @recomp math.c X$ @recomp phys_term.c X$ @recomp playback.c X$ @recomp pty.c X$ @recomp ref_string.c X$ @recomp regexp.c X$ @recomp region.c X$ @recomp register.c X$ @recomp search.c X$ @recomp spawn.c X$ @recomp symbol.c X$ @recomp system.c X$ @recomp termcap.c X$ @recomp tty.c X$ @recomp ttyio.c X$ @recomp ttykbd.c X$ @recomp undo.c X$ @recomp version.c X$ @recomp vms.c X$ @recomp wild.c X$ @recomp window.c X$ @recomp word.c X$ X$ X$ write sys$output "Linking..." X$ define /nolog lnk$library sys$library:vaxcrtl X$ link /executable=cr - X anchor.obj,- X basic.obj,- X bookmark.obj,- X buffer.obj,- X builtin.obj,- X clock.obj,- X config.obj,- X debug.obj,- X display.obj,- X echo.obj,- X env.obj,- X eval.obj,- X file.obj,- X keywd.obj,- X kill.obj,- X language.obj,- X line.obj,- X lisp.obj,- X list.obj,- X m_buf.obj,- X m_msg.obj,- X mac1.obj,- X main.obj,- X map.obj,- X math.obj,- X phys_term.obj,- X playback.obj,- X pty.obj,- X ref_string.obj,- X regexp.obj,- X region.obj,- X register.obj,- X search.obj,- X spawn.obj,- X symbol.obj,- X system.obj,- X termcap.obj,- X tty.obj,- X ttyio.obj,- X ttykbd.obj,- X undo.obj,- X version.obj,- X vms.obj,- X window.obj,- X wild.obj,- X word.obj,- X vmsdir.obj,- X bsearch.obj,- X chk_alloc.obj,- X instr.obj,- X memcpy.obj,- X strdup.obj,- X strtok.obj,- X tell.obj,- X vmslib.obj,- X ll_alloc.obj,- X ll_append.obj,- X ll_clear.obj,- X ll_delete.obj,- X ll_elem.obj,- X ll_first.obj,- X ll_free.obj,- X ll_hook.obj,- X ll_init.obj,- X ll_insert.obj,- X ll_lookup.obj,- X ll_magic.obj,- X ll_next.obj,- X ll_prev.obj,- X ll_push.obj,- X ll_remove.obj,- X ll_unhook.obj,- X splay.obj,- X sptree.obj,- X spstats.obj SHAR_EOF chmod 0644 vms/make.com || echo "restore of vms/make.com fails" mkdir vms >/dev/null 2>&1 echo "x - extracting vms/recomp.com (Text)" sed 's/^X//' << 'SHAR_EOF' > vms/recomp.com && X$ ! VMS command file to recompile a .C file which needs recompilation. X$ ! This is a .C files that has no .OBJ file or that is newer X$ ! than the corresponding .OBJ file. This file is self contained X$ ! and does not require you to do anything before running it. X$ X$ file = f$search(f$parse(p1, ".C"), 1) X$ cmd = p2 X$ if cmd .nes. "" then goto havcmd X$ if "''ccom'" .eqs. "" then @precomp X$ cmd = "ccom" X$havcmd: X$ name = f$parse(file,,,"NAME") X$ obj = name + ".OBJ" X$ if f$search(obj) .eqs. "" then goto docmd X$ if f$cvtime(f$file(file, "RDT")) .les. f$cvtime(f$file(obj, "RDT")) then - X exit X$ docmd: X$ ! write sys$output "Compiling ''name'..." X$ 'cmd' 'file' X$ ! write sys$output "---------------" SHAR_EOF chmod 0644 vms/recomp.com || echo "restore of vms/recomp.com fails" mkdir vms >/dev/null 2>&1 echo "x - extracting vms/precomp.com (Text)" sed 's/^X//' << 'SHAR_EOF' > vms/precomp.com && X$ ! VMS command file to define the `ccom' command X$ ! that is the only way to compile Emacs C source files. X$ X$ define /nolog vaxc$include sys$library, sys$disk:[] X$ define /nolog sys vaxc$include X$ ccom :== @ccom SHAR_EOF chmod 0644 vms/precomp.com || echo "restore of vms/precomp.com fails" mkdir vms >/dev/null 2>&1 echo "x - extracting vms/crisp.com (Text)" sed 's/^X//' << 'SHAR_EOF' > vms/crisp.com && X$ ! The crisp device is equivalent to /usr/local/crisp on the X$ ! unix systems and is the place where all crisp macros and help X$ ! files reside. X$ ! X$ define /translation=concealed crisp_library userdisk:[p_fox.crisp.] X$ set term /dev=vt100 X$ cr == "$ userdisk:[p_fox.crisp]cr.exe" X$ bterm == p1 SHAR_EOF chmod 0644 vms/crisp.com || echo "restore of vms/crisp.com fails" mkdir vms >/dev/null 2>&1 echo "x - extracting vms/login.com (Text)" sed 's/^X//' << 'SHAR_EOF' > vms/login.com && X$ ! Modify the entry below for your terminal type as defined in termcap X$ ! and add this file to your login.com in order to use crisp. X$ @crisp at386 SHAR_EOF chmod 0666 vms/login.com || echo "restore of vms/login.com fails" mkdir vms >/dev/null 2>&1 echo "x - extracting vms/README (Text)" sed 's/^X//' << 'SHAR_EOF' > vms/README && XThe files in this directory are used to help build CRISP on Xa Vax. Unfortunately I dont know how to distribute the CRISP Xsources in such a way that the build under VMS is painless. So Xhere are some notes to make life easy. X X1. Directory Layout. X When I build CRISP on VMS, I make the directory layout flat. X You want a directory, eg [.crisp] with the following X files in it: (using the Unix file-system layout): X X *.com X *.h X *.c X dirlib/vms* X foxlib/*.[ch] X llist/*[ch] X splay/*[ch] X X2. Create a subdirectory [.etc] and put the termcap file in it, X with the name crisp_library:[etc]termcap.dat. X X Create a subdirectory crisp_library:[help] X X Create a subdirectory crisp_library:[macros] X X3. CRISP needs the logical name crisp_library to be set up. A default X value is given in the file vms.c. You may need to change this. X X4. Type: X X @make X X to build the binaries. X X X5. You want to copy the login.com and crisp.com files into your X login.com or somehow arrange for them to be executed so that X your terminal type is set up. X X6. Having built the crisp binary you know need to install the X compiled macro binaries. The simplest thing to do is copy X the binaries from a Unix system to the crisp_library:[macros] X directory. The binaries are machine independent. X X7. CRISP currently creates its undo files in the [.-] directory. X You will need to manually purge these files. X XPlease bear in mind I do not know VMS too well, and so I have tried Xto do some of the donkey work for you so that it will compile. If Xyou have success in installing this and manage to get the logical Xnames all sorted out or have any suggestions to improve the Xinstallation procedure, then please let me know. X XPaul Fox 24 May 1989 SHAR_EOF chmod 0666 vms/README || echo "restore of vms/README fails" rm -f s2_seq_.tmp echo "You have unpacked the last part" exit 0 -- ===================== Reuters Ltd PLC, Tel: +44 628 891313 x. 212 Westthorpe House, UUCP: fox%marlow.uucp@idec.stc.co.uk Little Marlow, Bucks, England SL7 3RQ