1
0
mirror of synced 2026-04-06 14:22:05 +00:00

Compare commits

...

33 Commits

Author SHA1 Message Date
Larry Masinter
3cb051ea7b Allow (CLOSALL) to work after all (#1164) 2023-04-19 19:47:11 -07:00
Frank Halasz
8bb283e0c4 Merge pull request #1154 from Interlisp/tweak-init2
Tweak INIT: HELPTIME 1 for more break windows; extend font profile
2023-04-19 18:03:08 -07:00
Frank Halasz
6fae5c14e9 Merge branch 'master' into tweak-init2 2023-04-19 17:54:43 -07:00
Frank Halasz
c58ef4ee56 Merge pull request #1161 from Interlisp/minor-usage-tweaks
minor usage tweaks
2023-04-19 17:53:57 -07:00
Frank Halasz
730fc5b678 Merge pull request #1153 from Interlisp/who-line-only
tweak WHO-LINE
2023-04-19 17:46:25 -07:00
Frank Halasz
8d54603329 Merge branch 'master' into who-line-only 2023-04-19 17:45:29 -07:00
Larry Masinter
21ceff5ad9 add internal/MAINTAIN.TXT to explain what MAINTAIN is 2023-04-18 15:21:35 -07:00
Larry Masinter
5a07e6c266 SYSEDIT also sets copyright flag 2023-04-18 15:16:07 -07:00
Larry Masinter
4a09d3a027 Init file set HELPTIME to 1 more break windows; copyright NEVER 2023-04-18 15:15:00 -07:00
Larry Masinter
691563024b Yet another Logo with parameters for substrings. WINDOW.BITMAP move to Window (#1151)
* Yet another Logo with parameters for substrings. WINDOW.BITMAP move to Window

* Added LOGOW.DFASL, so rm LOGOW.LCOM

* LOGOW: Add local variables for most of the hard-coded constants to make it easier to experiment with adjusting said constants.  Adding kerning for substring1.

* LOGOW: Add more kerning options.  Cretaed separate kerned.prin3 function.

* Set default params to Option 8.  Added some top and right margins when placing LOGOW in screen so it doesn't look so squished into the corner.

---------

Co-authored-by: Frank Halasz <frank@halasz.org>
2023-04-18 14:57:41 -07:00
Larry Masinter
0f49e248d3 Tweak INIT: HELPTIME 1 for more break windows; extend font profile 2023-04-13 09:56:16 -07:00
Larry Masinter
54782f5b21 tweak to WHO-LINE: hostname (don't use pup), change dir (don't offer directories that don't exist), package (sort so likely choices are at top) 2023-04-12 22:26:23 -07:00
rmkaplan
d34522d769 GITNFS: Doesn't error if clonepath defaults but is not required (#1123)
If CLONEPATH is NIL, no error if the clone can't be found, just prints a note.  If CLONEPATH is T, will error.
2023-03-30 09:59:27 -07:00
Larry Masinter
c501dc82fb add :EDIT-BY initials to FILECREATED (#1074) 2023-03-24 21:52:44 -07:00
Bill Stumbo
c256a8f411 Merge pull request #1110 from neauoire/patch-1
Changed wiki link to new docs url
2023-03-19 20:44:31 -04:00
Devine Lu Linvega
69dbe43d87 Update README.md 2023-03-19 16:45:17 -07:00
Devine Lu Linvega
989ec5b0b5 Changed wiki link to new docs url 2023-03-19 09:40:25 -07:00
rmkaplan
12b5e90727 GITFNS: Better default directory-finding, better pseudohosts (#1064) (#1065)
* GITFNS:  Better default directory-finding, better pseudohosts  (addresses #1064)

Also updated documentation

* GITFNS:  better error message in GIT-MAKE-PROJECT
2023-02-18 17:19:29 -08:00
Frank Halasz
4b95a8b5d3 Windows installer and medley script for running Medley in Docker on Windows (#1077)
* Update docker file build to use new deb linux installers;  move Dockefile to .github/workflows since its really only useable from the buildDocker.yml workflow

* Fix typo in dockerfile location

* remove extraneous " in >>GITHUB_ENV statements

* Fix handling of TARGETPLATFORM in Dockerfile

* Trying with just one platform

* Fix issues with missing man-db in docker build workflow; added man-db to depends in deb builds for linux

* Sicthed docker from tightvnc to tigervnc to match oio.  This getting the apt package name right.

* Going back to single platform to debug this thing

* Trying with just arm64

* Removing arm/v7 from docker images.  Takes too long to build and just wastes our github actions minutes.  This is assuming its a never used feature since docker is not big on raspberry pis and their ilk.

* Fix typo in control-linux; update build_deb so that files in /usr/local installed by deb are owned by root; add ubuntu user and nano in docker file for dbebugging;  when in draft only create for x86_64 platform

* Fix typo in buildDocker.yml

* Add sudo to docker image; in docker image ensure that all /usr/local/interlisp files are owned by root

* Add securityTypes none to docker entrypoint

* Updated docker base to Ubuntu 22.10 to get fixed xrdp; add xrdp to the docker image; updated user permission in docker image;

* In Dockerfile make xrdp install noninteractive

* Update medley.sh scripts to handle docker case

* Fix a couple of typos

* BuildDcoker: added pulling latest draft release (if any) when this is a draft docker build; removed checkout of medley code cause its not used

* BuildDocker: added medley checkout backin - turns pout its needed by a bunch of actions even though I dont really think they use it

* BuildDocker: moved download assets to use gh instaed of a marketplace action becauase that action could not handle draft releases.

* Tweaking medley.sh and associated tweaks to work Windows via wsl medley and docker

* adding first pass at powershell script for windows docker and wsl

* Tuning how Xvnc, medley, and vncviewer handle the various ways of exiting - eg logout vs closing viewer window.

* Tuning vncviewer launch to make sure that tty works as expected when medley.sh runs in background

* Minor typo fixes and added extra check to use of /run/shm in medley_vnc.sh

* Added SSH_KEY secret to buildReleaseIncDocker workflow

* Gertting the add SSH_KEY secret into orkflows right this time, hopefully

* Adding TERM env variable and setting USER to medley in docker image

* Debugging medley.ps1 and adding a couple of arguments

* Typo in Dockerfile medley

* Synchronizing flag processing and usage for medley.ps1 and medley.sh; refactored medley_args.sh and medley_usage.sh code.

* Adding first pass at windows installer

* Adding first pass an inno setup script for Windows installation

* Update buildLoadup workflow and downloads page for windows installer

* Fix typo in buildLoadup

* BuildLoadup make sure windows runner uses powershell

* Another typo in buildLoadup

* Another typo in buildLoadup; damn those double quotes

* Updating handling of windows installer in buildLoadup, added vncviewer to medley.iss install

* Unknown syntax error in buildLoadup

* Another damn typo from double quotes

* buildLoadup: fixed loadup job outputs

* buidLoadup: fixed bug with COMBINED_RELEASE_TAG; fixed Upload script in windows job to be compatible with actions.script v6.

* buidLoadup: upload win installer adapted to find draft releases as well as full releases

* BuildLoadup: fixing up javascript in actions in windows job to use / instead of \ in pathname

* BuildLoadup: changing win installer update to same action used for other release assets

* Fix windows installer file name; in BuildLoadup move update downl;oad page to the Windows runner because uploading the window-installer changes the release download url, so updating the downloads page must be done after the windows installer upload.; General buildLoadup cleanup

* Run md2html to update downloads page

* Fix typo in build_deb.sh

* Removing some leftover crud in medley_usage.sh

* Fixing up windows installer a bit, mostly cosmetic

* Adding support for WSL1; mostly forcing --vnc and changing how to find open ports and displays since WSL1 networking is different tha WSL2

* Update manual page for new Windows Medley script

* First pass done for man page that incorporates new Windows medley script.  Add Xvnc wait before calling run-medley in case of docker to prevent occasonal missing X windows server error.

* Change buildLoadup to update man page to a draft if this is a draft run.
2023-02-18 06:19:57 -08:00
Frank Halasz
3fa571f798 Fix buildLoadup.yml to craete TARBALL directory if it doesn't exist (#1060) 2023-01-31 00:37:23 -08:00
Frank Halasz
10a598865f Create UNIXUTILS in library to go along with UNIXPRINTER, et al (#1051)
* Create UNIXUTILS file in library with ShellWhich function - linux which command equivalent.  Also move ShellCommand from UNIXPRINT to UNIXUTILS.

* Adding UNIXUTILS to LOADUP-FULL so it gets included in full.sysout

* Change of names from open(er) to browse(r). Refine the browse(r) functions a bit

* Minor bug fixes

* Add (FILES UNIXUTILS) to UNIXPRINTCOMS so that ShellCommand is loaded in case only UNIXPRINT is loaded.  For backward compatibility.
2023-01-30 23:43:10 -08:00
Frank Halasz
f2ef7cc8f6 Installers for Linux: workflow changes and more to support standard Linux installations (#1058)
* Adding LANG environment variable to docker image; adding MAIKO_ and MEDLEY_INSTALLDIR environment variables; Changing /usr/local/bin/run-medley to a symbolic link instead of a shell script

* Added draft input to all workflows, so that can create draft releases as well as regular releases

* Update buildDocker.yml to handle deprecation of set-output and to update versions of actions to handle node 12 to node 16 transition.

* Added scripts and updated github workflows to support creation of deb installers for Linux and WSL

* Fix minor bug in buildLoadup.yml

* First pass implementation of deb installer

* Fixing wget of vncviewer in build_deb.sh

* Fix typo in buildLoadup.yml in call to build_deb.sh

* Multiple small fixes to medley.sh from debugging.  Change postinst script and how its created in build_deb.  Add postrm script in build_deb.

* Reworking vnc portion of Medley.sh - including removing dependency on startx and xinit

* Misc fixes to medley_vnc.sh script; fix creation of postinst and postrm in build_deb.sh

* Cleaning up window geometry amd screen size in medley.sh

* Created apps.sysout loadup with rooms, notecards, clos on top of full.sysout; added plumbing for -apps flag to run-medley to run this syout; created a new init file for this sysout that calls MEDLEYDIR-INIT;  all of this is based on online.sysout

* Create UNIXUTILS file in library with ShellWhich function - linux which command equivalent.  Also move ShellCommand from UNIXPRINT to UNIXUTILS.

* Adding UNIXUTILS to LOADUP-FULL so it gets included in full.sysout

* Change of names from open(er) to browse(r). Refine the browse(r) functions a bit

* Minor bug fixes

* Update Apps.ShowDoc to new ShellBrowsefunction

* Adding apps support into the .github builds;  adding xdg-utils as dependecy in debs

* fixing bug as to where notecards is checked out in BuildLoadup.  Needs to be before loadups so app.sysout can be built

* Added defaulting to Interlisp exec tomedley.sh and APPS-INIT.  Works only in apps.sysout.  Added wlsu package to wsl debs since wlsview is not always installed by defailt.  Fixed Notefiles directories issues in Apps.Init.   Made medley.sh compute medleydir based on where the script is located. Can now work for /usr/lcal/interlisp as well as local directories.

* Added -id - feature to medley.sh so id can be directory mae.  Removed extraneous set -x commands in medley.sh from debugging.  In build_deb.sh changed compression to xz for deb files since debian does not support the zstd compression that ubuntu uses.

* For wsl deb files, make sure wslu package is not 4.0 - which is bad.  Change how we choose an open port and open display in medley_vnc.sh.  Add notecards download to build_deb.sh.  Fix type in medley.sh

* Add (FILES UNIXUTILS) to UNIXPRINTCOMS so that ShellCommand is loaded in case only UNIXPRINT is loaded.  For backward compatibility.

* Moved medley.sh and associates to script/medley dir; fixed up args to medley.sh;  added usage and --help to medley.sh

* Add comprehensive tar files to releases to match deb files for local installs; add --id -- arg to medley.sh

* Remove remaining reference to usr/local/interlisp to ensure local install works

* Fix bug in buildLoadup - couldn't file install tars

* Add medley symbolic linkto loadups, so it comes thru to local install tars

* Fix up error messaging in medley.sh scripts

* Created man page for medley and added it throughout build up, installers, etc.

* Add support for a downloads page on OIO, including creating said page while building a release

* Fix full_release_tag in downloads section of buildLoadup.yml

* Misc fixups on downloads page

* Adding online man page stored on oio static server.

* Fix minor bug in man installation in deb file
2023-01-30 22:19:07 -08:00
Larry Masinter
0c9b539bc4 masterscope extensions doc (internal) + tweak helpsys (#1048) 2023-01-17 22:23:06 -08:00
rmkaplan
b53b6c4ba7 Rmk74 run with pseudohosts (#1017)
* FILEPKG: EDITCALLERS now notices possible new stream after getting filemap

* GITFNS: cdw and cdg commands preserve pseudohost

* SAMEDIR:  match all combinations of truefilename and pseudofilename

* PSEUDOHOSTS:  Bug fix--openstream failure goes thru normal error machinery

* ADIR: Put in stubs for TRUEFILENAME, PSEUDOFILENAME, PSEUDOHOSTP

Also, fix \COPYSYS so it works with pseudhosts
2023-01-16 00:36:39 -08:00
Larry Masinter
e5593ba0dc notify \IDLING.OVER in \IDLE.OUT (#973)
\IDLE.OUT is a backgrround function. For reasons not well understood, sometimes after returning from LOGOUT, the RESETSAVED notify to \IDLING.OVER doesn't happen.
This change insures that it does.
(found during testing of LOGOUT/return from LOGOUT with changing ethernet enalbing)
2022-12-31 08:44:22 -08:00
Larry Masinter
5fea4e6666 loadup-db.sh fix -- don't rely on loadups (#1035) 2022-12-29 19:11:19 -08:00
Larry Masinter
306af20e91 The macroexpansion of UNDOABLY shouldn't depend on runtime rebinding of LISPXHIST (#1023)
The history and undo code was written before the record package; but someone introduced a DEFMACRO UNDOABLY macro to do the work. But cached macroexpansions shouldn't depend on load/run/compile time values.
2022-12-29 18:48:12 -08:00
rmkaplan
bb637c5b73 UNIXCOMM: Eliminated the new shell device in favor of a single shell device (#1034)
Also removed unused functions labeled as "obsolete" after Medley 2
2022-12-23 11:37:23 -08:00
Larry Masinter
7eb12ee68b Revert "Lmm cleanup new shell device (#1006)" (#1033)
This reverts commit 97cb04be46.
2022-12-17 17:22:41 -08:00
Larry Masinter
97cb04be46 Lmm cleanup new shell device (#1006)
* reset defaultexternalformat when returning

* Replace so *SHELL-DEVICE* is default
2022-12-02 20:48:48 -08:00
Frank Halasz
62754015b0 Update Medley build workflow to add clos to release tars and to update various actions to latest versions (#1025)
* Add clos to release tars for Medley.  To ease adding clos to Medley Online.

* Fix buildLoadup.yml to account for the fact that scripts/loadup-all.sh now automatically includes scripts/copy-all.sh.  Was failing due to redundant copying of loadup files.

* Get rid of ::set-output:: in buildLoadup.yml and replace with echo >> .  This is due to that fact that ::set-output:: has been deprecated by Github and will soon cause an error if used in a workflow.

* Update actions/checkout and robinraju/release-downloader to latest versions because versions currently being used relied on Node 12, which has been deprecated.  Newer versions of these actions use Node 16, which is still supported.

* Fix typo in actions/checkout new version number

* Oops.  Node 16 is supported by actions/checkout@v3 not by ...@v2.5.0

* Update AButler/upload-release-assets fron @v2.0 to @v2.0.2 to take care of Node 12 versus Node16 issues caused by Node 12 actions being deprecated by github.

* Fix quoting bugs on conversions from ::set-output:: to

* Try switching to the ncipollo/release-action acgtion in place of using the api to create the release and then the AButler/upload-release-assets action to upload the assets.  This is to solve the failures when try to update a release using the force input parameter.

* Adding step to delete existing release with given tag, if any.  Needed when force parameter is true.

* Fixing typo?

* Typos again?

* Start changing how RELEASE_TAG environment variable is used throughout build_loadup

* Finish changing how RELEASE_TAG environment variable is used throughout build_loadup

* Update abatilo/release-info-action to v1.3.2 to take care of ::set-output:: deprecation

* Add commit to allow testing of release builds

* Fix to Issue#1022 Error during greet

* More fix to Issue#1022.  Turns out need to reset MEDLEYDIR for AFTERMAKESYS as well as at greet time.  Discovered during loadup-online.sh with no greet file.

* Removing AFTERMAKESYS event action from (MEDLEY-INIT-VARS).  Cleaning up a bit the GREET event action in (MEDLEY-INIT-VARS).  Remove issue with MEDLEY-INIT-VARS being called after the user greet file in the AFTERMAKESYS case.
2022-11-26 15:05:45 -08:00
Frank Halasz
9d09033cc4 Fix to Issue#1022 "Error during greet" (#1027)
* Fix to Issue#1022 Error during greet

* More fix to Issue#1022.  Turns out need to reset MEDLEYDIR for AFTERMAKESYS as well as at greet time.  Discovered during loadup-online.sh with no greet file.

* Removing AFTERMAKESYS event action from (MEDLEY-INIT-VARS).  Cleaning up a bit the GREET event action in (MEDLEY-INIT-VARS).  Remove issue with MEDLEY-INIT-VARS being called after the user greet file in the AFTERMAKESYS case.
2022-11-26 11:46:41 -08:00
Nick Briggs
d9c144d966 Allow user override of -title option (#1026) 2022-11-21 13:04:07 -08:00
108 changed files with 5428 additions and 1703 deletions

78
.github/workflows/Dockerfile_medley vendored Normal file
View File

@@ -0,0 +1,78 @@
#*******************************************************************************
#
# Dockerfile to build Medley image from latest Maiko image
# plus latest release tars from github
#
# Copyright 2022-2023 by Interlisp.org
#
# ******************************************************************************
FROM ubuntu:22.10
ARG TARGETPLATFORM
# Handle ARGs, ENV variables, and LABELs
ARG BUILD_DATE=unknown
ARG MEDLEY_RELEASE=unknown
ARG MAIKO_RELEASE=unknown
ARG REPO_OWNER=Interlisp
LABEL name="Medley"
LABEL description="The Medley Interlisp environment"
LABEL url="https://github.com/${REPO_OWNER}/medley"
LABEL build-date=$BUILD_DATE
LABEL medley_release=$MEDLEY_RELEASE
LABEL maiko_release=$MAIKO_RELEASE
ENV MEDLEY_DOCKER_BUILD_DATE=$BUILD_DATE
ENV MEDLEY_RELEASE=$MEDLEY_RELEASE
ENV MAIKO_RELEASE=$MAIKO_RELEASE
ENV LANG=C.UTF-8
# Copy over the release deb files
ADD ./*.deb /tmp
# Install Medley/Maiko and add tightvnc server and xclip to the image
RUN apt-get update \
&& apt-get install -y apt-utils \
&& apt-get install -y tigervnc-standalone-server \
&& apt-get install -y xclip \
&& apt-get install -y man-db \
&& apt-get install -y nano \
&& apt-get install -y sudo \
&& p=$(echo "${TARGETPLATFORM}" | sed -e "s#linux/##") \
&& p=$( \
if [ "$p" = "amd64" ]; \
then echo "x86_64"; \
elif [ "$p" = "arm64" ]; \
then echo "aarch64"; \
elif [ "$p" = "arm/v7" ]; \
then echo "armv7l"; \
else \
echo "x86_64"; \
fi \
) \
&& deb="medley-full-${MEDLEY_RELEASE#medley-}" \
&& deb=${deb}_${MAIKO_RELEASE#maiko-}-linux-${p}.deb \
&& apt-get install -y /tmp/${deb} \
&& chown --recursive root:root /usr/local/interlisp \
&& (if [ -n "$(which unminimize)" ]; then (yes | unminimize); fi)
# "Finalize" image
EXPOSE 5900
RUN adduser --gecos "" medley \
&& adduser --gecos "" ubuntu \
&& adduser medley sudo \
&& adduser ubuntu sudo \
&& (echo 'medley:yeldem' | chpasswd ) \
&& (echo 'ubuntu:utnubu' | chpasswd ) \
&& echo "medley ALL=(ALL) NOPASSWD:ALL" >>/etc/sudoers \
&& echo "ubuntu ALL=(ALL) NOPASSWD:ALL" >>/etc/sudoers \
&& mkdir -p /home/medley/il \
&& chown medley:medley /home/medley/il
ENV TERM=xterm
USER medley
WORKDIR /home/medley
#ENTRYPOINT USER=medley Xvnc -SecurityTypes none -geometry 1280x720 :0 & DISPLAY=:0 medley --full -g 1280x720
ENTRYPOINT /bin/bash

View File

@@ -21,6 +21,12 @@ name: 'Build/Push Docker Image'
on:
workflow_dispatch:
inputs:
draft:
description: "Mark this as a draft release"
type: choice
options:
- 'false'
- 'true'
force:
description: "Force build even if build already successfully completed for this commit"
type: choice
@@ -34,6 +40,11 @@ on:
description: "'True' if medley docker build completed successully"
value: ${{ jobs.complete.outputs.build_successful }}
inputs:
draft:
description: "Mark this as a draft release"
required: false
type: string
default: 'false'
force:
description: "Force build even if build already successfully completed for this commit"
required: false
@@ -60,13 +71,20 @@ jobs:
inputs:
runs-on: ubuntu-latest
outputs:
force: ${{ steps.force.outputs.force }}
draft: ${{ steps.one.outputs.draft }}
force: ${{ steps.one.outputs.force }}
steps:
- id: force
- id: one
run: >
if [ '${{ toJSON(inputs) }}' = 'null' ];
then echo ::set-output name=force::'${{ github.event.inputs.force }}'; echo "workflow_dispatch";
else echo ::set-output name=force::'${{ inputs.force }}'; echo "workflow_call";
then
echo "workflow_dispatch";
echo "draft=${{ github.event.inputs.draft }}" >> $GITHUB_OUTPUT;
echo "force=${{ github.event.inputs.force }}" >> $GITHUB_OUTPUT;
else
echo "workflow_call";
echo "draft=${{ inputs.draft }}" >> $GITHUB_OUTPUT;
echo "force=${{ inputs.force }}" >> $GITHUB_OUTPUT;
fi
@@ -85,7 +103,7 @@ jobs:
steps:
# Checkout the actions for this repo owner
- name: Checkout Actions
uses: actions/checkout@v2
uses: actions/checkout@v3
with:
repository: ${{ github.repository_owner }}/.github
path: ./Actions_${{ github.sha }}
@@ -117,58 +135,61 @@ jobs:
steps:
# Checkout latest commit
- name: Checkout Medley
uses: actions/checkout@v2
uses: actions/checkout@v3
# Find latest release (draft or normal)
# and download its assets
- name: Download linux debs from latest (draft) release
run: |
tag=""
if [ "${{ needs.inputs.outputs.draft }}" = "true" ];
then
tag=$(gh release list | grep Draft | head -n 1 | awk '{ print $3 }')
fi
if [ -z "${tag}" ];
then
tag=$(gh release list | grep Latest | head -n 1 | awk '{ print $3 }')
fi
mkdir -p release_debs
gh release download ${tag} -D release_debs -p '*-linux-*.deb'
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
# Get Maiko and Medley release information from name of deb files
# just downloaded from the Medley latest release
- name: Get info about Miako and Medley releases
id: release_info
run: |
regex="^[^0-9]*\([^_]*\)_\([^-]*-[^-]*\)-\([^-]*\)-\([^.]*\).*\$"
ls -1 release_debs | head -n 1 > debname.tmp
medley_release="medley-$(sed -e "s/${regex}/\1/" debname.tmp)"
maiko_release="maiko-$(sed -e "s/${regex}/\2/" debname.tmp)"
rm -f debname.tmp
echo "MEDLEY_RELEASE=${medley_release}" >> ${GITHUB_ENV}
echo "MAIKO_RELEASE=${maiko_release}" >> ${GITHUB_ENV}
# Set repo env variables
- name: Set repo/docker env variables
id: repo_env
run: |
REPO_NAME=${GITHUB_REPOSITORY#*/}
echo "REPO_NAME=${REPO_NAME}" >> ${GITHUB_ENV}
echo ::set-output name=repo_name::${REPO_NAME}
DOCKER_NAMESPACE=$(echo "${{ github.repository_owner }}" | tr '[:upper:]' '[:lower:]')
echo "DOCKER_NAMESPACE=${DOCKER_NAMESPACE}" >> ${GITHUB_ENV}
echo ::set-output name=docker_namespace::${DOCKER_NAMESPACE}
# Get tag of latest Medley release.
- name: Get Medley Release Information
id: release_info
uses: abatilo/release-info-action@v1.3.0
with:
owner: ${{ github.repository_owner }}
repo: medley
# Get asset tars from latest Medley release
- name: Download Release Assets
uses: robinraju/release-downloader@v1.2
with:
repository: ${{ github.repository_owner }}/medley
token: ${{ secrets.GITHUB_TOKEN }}
latest: true
fileName: "*"
out-file-path: "release_tars"
# Get Maiko release information about latest Maiko Docker Image
- name: Get info from latest Maiko image
id: maiko_setup
run: |
docker pull ${DOCKER_NAMESPACE}/maiko:latest
MAIKO_RELEASE=$(docker run --entrypoint /bin/bash ${DOCKER_NAMESPACE}/maiko:latest -c "echo \${MAIKO_RELEASE}")
echo "MAIKO_RELEASE=${MAIKO_RELEASE}" >> ${GITHUB_ENV}
echo ::set-output name=maiko_release::${MAIKO_RELEASE}
# Setup environment variables
- name: Setup Environment Variables
id: setup_env
run: |
RELEASE_TAG=${{ steps.release_info.outputs.latest_tag }}
DOCKER_IMAGE=${DOCKER_NAMESPACE}/${REPO_NAME}
DOCKER_TAGS="${DOCKER_IMAGE}:latest,${DOCKER_IMAGE}:${RELEASE_TAG#*-}_${MAIKO_RELEASE#*-}"
echo ::set-output name=docker_tags::${DOCKER_TAGS}
echo ::set-output name=docker_image::${DOCKER_IMAGE}
echo ::set-output name=build_time::$(date -u +'%Y-%m-%dT%H:%M:%SZ')
echo ::set-output name=release_tag::${RELEASE_TAG}
echo "release_tag=${RELEASE_TAG}" >> ${GITHUB_ENV}
repo_name="${GITHUB_REPOSITORY#*/}"
docker_namespace="$(echo "${{ github.repository_owner }}" | tr '[:upper:]' '[:lower:]')"
docker_image="${docker_namespace}/${repo_name}"
if [ "${{ needs.inputs.outputs.draft }}" = "false" ];
then
docker_tags="${docker_image}:latest,${docker_image}:${MEDLEY_RELEASE#*-}_${MAIKO_RELEASE#*-}"
platforms="linux/amd64,linux/arm64"
else
docker_tags="${docker_image}:draft"
platforms="linux/amd64"
fi
echo "REPO_NAME=${repo_name}" >> ${GITHUB_ENV}
echo "DOCKER_NAMESPACE=${docker_namespace}" >> ${GITHUB_ENV}
echo "DOCKER_IMAGE=${docker_image}" >> ${GITHUB_ENV}
echo "DOCKER_TAGS=${docker_tags}" >> ${GITHUB_ENV}
echo "BUILD_DATE=$(date -u +'%Y-%m-%dT%H:%M:%SZ')" >> ${GITHUB_ENV}
echo "PLATFORMS=${platforms}" >> ${GITHUB_ENV}
#linux/amd64,linux/arm64,linux/arm/v7
# Setup the Docker Machine Emulation environment.
- name: Set up QEMU
@@ -183,7 +204,7 @@ jobs:
# Login into DockerHub - required to store the created image
- name: Login to DockerHub
uses: docker/login-action@v1
uses: docker/login-action@v2
with:
username: ${{ secrets.DOCKER_USERNAME }}
password: ${{ secrets.DOCKER_PASSWORD }}
@@ -192,21 +213,20 @@ jobs:
# checked out and the release tars just downloaded.
# Push the result to Docker Hub
- name: Build Docker Image for Push to Docker Hub
uses: docker/build-push-action@v2
uses: docker/build-push-action@v3
with:
builder: ${{ steps.buildx.outputs.name }}
build-args: |
BUILD_DATE=${{ steps.setup_env.outputs.build_time }}
RELEASE_TAG=${{ steps.setup_env.outputs.release_tag }}
MAIKO_RELEASE=${{ steps.setup_env.outputs.maiko_release }}
DOCKER_NAMESPACE=${{ steps.repo_env.outputs.docker_namespace }}
BUILD_DATE=${{ env.BUILD_DATE }}
MEDLEY_RELEASE=${{ env.MEDLEY_RELEASE }}
MAIKO_RELEASE=${{ env.MAIKO_RELEASE }}
REPO_OWNER=${{ github.repository_owner }}
context: ./release_tars
file: ./Dockerfile
platforms: linux/amd64,linux/arm64,linux/arm/v7
context: ./release_debs
file: ./.github/workflows/Dockerfile_medley
platforms: ${{ env.PLATFORMS }}
# Push the result to DockerHub
push: true
tags: ${{ steps.setup_env.outputs.docker_tags }}
tags: ${{ env.DOCKER_TAGS }}
######################################################################################
@@ -225,7 +245,7 @@ jobs:
steps:
# Checkout the actions for this repo owner
- name: Checkout Actions
uses: actions/checkout@v2
uses: actions/checkout@v3
with:
repository: ${{ github.repository_owner }}/.github
path: ./Actions_${{ github.sha }}
@@ -241,6 +261,6 @@ jobs:
- name: Output
id: output
run: |
echo ::set-output name=build_successful::'true'
echo "build_successful='true'" >> ${GITHUB_OUTPUT}
######################################################################################

View File

@@ -1,4 +1,4 @@
#re*******************************************************************************
#*******************************************************************************
# buidLoadup.yml
#
# Interlisp workflow to build Medley release and push it to github. This workflow
@@ -10,7 +10,7 @@
#
# 2022-01-17 Frank Halasz based on an earlier version of buildLoadup for Medley.
#
# Copyright 2022 by Interlisp.org
# Copyright 2022-2023 by Interlisp.org
#
# ******************************************************************************
@@ -20,6 +20,12 @@ name: Build/Push Medley Release
on:
workflow_dispatch:
inputs:
draft:
description: "Mark this as a draft release"
type: choice
options:
- 'false'
- 'true'
force:
description: "Force build even if build already successfully completed for this commit"
type: choice
@@ -33,11 +39,19 @@ on:
description: "'True' if medley build completed successully"
value: ${{ jobs.complete.outputs.build_successful }}
inputs:
draft:
description: "Mark this as a draft release"
required: false
type: string
default: 'false'
force:
description: "Force build even if build already successfully completed for this commit"
required: false
type: string
default: 'false'
secrets:
OIO_SSH_KEY:
required: true
defaults:
run:
@@ -54,13 +68,20 @@ jobs:
inputs:
runs-on: ubuntu-latest
outputs:
force: ${{ steps.force.outputs.force }}
draft: ${{ steps.one.outputs.draft }}
force: ${{ steps.one.outputs.force }}
steps:
- id: force
- id: one
run: >
if [ '${{ toJSON(inputs) }}' = 'null' ];
then echo ::set-output name=force::'${{ github.event.inputs.force }}'; echo "workflow_dispatch";
else echo ::set-output name=force::'${{ inputs.force }}'; echo "workflow_call";
then
echo "workflow_dispatch";
echo "draft=${{ github.event.inputs.draft }}" >> $GITHUB_OUTPUT;
echo "force=${{ github.event.inputs.force }}" >> $GITHUB_OUTPUT;
else
echo "workflow_call";
echo "draft=${{ inputs.draft }}" >> $GITHUB_OUTPUT;
echo "force=${{ inputs.force }}" >> $GITHUB_OUTPUT;
fi
@@ -79,7 +100,7 @@ jobs:
steps:
# Checkout the actions for this repo owner
- name: Checkout Actions
uses: actions/checkout@v2
uses: actions/checkout@v3
with:
repository: ${{ github.repository_owner }}/.github
path: ./Actions_${{ github.sha }}
@@ -95,6 +116,8 @@ jobs:
######################################################################################
#
# Do the loadup
#
@@ -102,6 +125,12 @@ jobs:
runs-on: ubuntu-latest
outputs:
combined_release_tag: ${{ steps.job_outputs.outputs.COMBINED_RELEASE_TAG }}
medley_release_tag: ${{ steps.job_outputs.outputs.MEDLEY_RELEASE_TAG }}
medley_short_release_tag: ${{ steps.job_outputs.outputs.MEDLEY_SHORT_RELEASE_TAG }}
debs_filename_base: ${{ steps.debs.outputs.DEBS_FILENAME_BASE }}
needs: [inputs, sentry]
if: |
needs.sentry.outputs.release_not_built == 'true'
@@ -110,7 +139,7 @@ jobs:
steps:
# Checkout the actions for this repo owner
- name: Checkout Actions
uses: actions/checkout@v2
uses: actions/checkout@v3
with:
repository: ${{ github.repository_owner }}/.github
path: ./Actions_${{ github.sha }}
@@ -118,75 +147,111 @@ jobs:
# Checkout latest commit
- name: Checkout Medley
uses: actions/checkout@v2
uses: actions/checkout@v3
# Setup release tag
- name: Setup Release Tag
id: tag
uses: ./../actions/release-tag-action
# Setup environment variables
- name: Setup Environment Variables
id: setup_env
run: |
echo ::set-output name=build_time::$(date -u +'%Y-%m-%dT%H:%M:%SZ')
# Get Maiko release information, retrieves the name of the latest
# release. Used to download the correct Maiko release
- name: Get Maiko Release Information
id: latest_version
uses: abatilo/release-info-action@v1.3.0
id: maiko
uses: abatilo/release-info-action@v1.3.2
with:
owner: ${{ github.repository_owner }}
repo: maiko
# Setup environment variables & establish job outputs
- name: Setup Environment Variables
run: |
echo "build_time=$(date -u +'%Y-%m-%dT%H:%M:%SZ')" >> ${GITHUB_OUTPUT}
echo "TARBALL_DIR=installers/deb/tmp/tarballs" >>${GITHUB_ENV}
echo "DEBS_DIR=installers/deb/debs" >>${GITHUB_ENV}
echo "TARS_DIR=installers/deb/tars" >>${GITHUB_ENV}
echo "MEDLEY_RELEASE_TAG=${RELEASE_TAG}" >>${GITHUB_ENV}
echo "MAIKO_RELEASE_TAG=${{ steps.maiko.outputs.latest_tag }}" >>${GITHUB_ENV}
- name: More Environment Variables
run: |
echo "MEDLEY_SHORT_RELEASE_TAG=${MEDLEY_RELEASE_TAG#medley-}" >>${GITHUB_ENV}
echo "MAIKO_SHORT_RELEASE_TAG=${MAIKO_RELEASE_TAG#maiko-}" >>${GITHUB_ENV}
- name: Even More Environment Variables
run: |
echo "COMBINED_RELEASE_TAG=${MEDLEY_SHORT_RELEASE_TAG}_${MAIKO_SHORT_RELEASE_TAG}" >>${GITHUB_ENV}
- name: Establish job outputs
id: job_outputs
run: |
echo "COMBINED_RELEASE_TAG=${COMBINED_RELEASE_TAG}" >> $GITHUB_OUTPUT;
echo "MEDLEY_RELEASE_TAG=${MEDLEY_RELEASE_TAG}" >> $GITHUB_OUTPUT;
echo "MEDLEY_SHORT_RELEASE_TAG=${MEDLEY_SHORT_RELEASE_TAG}" >> $GITHUB_OUTPUT;
# Setup some needed dirs in workspace
- name: Create work dirs
run: mkdir -p ${TARBALL_DIR}
# Download Maiko Release Assets
- name: Download Release Assets
uses: robinraju/release-downloader@v1.2
uses: robinraju/release-downloader@v1.6
with:
repository: ${{ github.repository_owner }}/maiko
token: ${{ secrets.GITHUB_TOKEN }}
latest: true
fileName: "${{ steps.latest_version.outputs.latest_tag }}-linux.x86_64.tgz"
out-file-path: ${{ env.TARBALL_DIR }}
fileName: "${{ env.MAIKO_RELEASE_TAG }}-linux.*.tgz"
- name: Untar Maiko Release
- name: Untar Maiko Release for use in loadup
run: |
tar -xvzf "${{ steps.latest_version.outputs.latest_tag }}-linux.x86_64.tgz"
tar -xzf "${TARBALL_DIR}/${{ env.MAIKO_RELEASE_TAG }}-linux.x86_64.tgz"
# Checkout Notecards and tar it in the tarballsdir
- name: Checkout Notecards
uses: actions/checkout@v3
with:
repository: ${{ github.repository_owner }}/notecards
path: ./notecards
- run: mv ./notecards ../notecards
- name: Tar notecards into tarball dir
run: |
cd ..
tar cfz medley/${TARBALL_DIR}/notecards.tgz notecards
# Install vnc
- name: Install vnc
run: sudo apt-get update && sudo apt-get install -y tightvncserver
- name: Build Loadout
- name: Build Loadup sysouts and databases
run: |
Xvnc -geometry 1280x720 :0 &
export DISPLAY=":0"
PATH="$PWD/maiko:$PATH"
scripts/loadup-all.sh
scripts/loadup-all.sh -apps
- name: Build loadups release tar
run: |
cp -p tmp/full.sysout tmp/lisp.sysout tmp/whereis.hash loadups/
cp -p tmp/exports.all library/
cd ..
tar cfz medley/tmp/${release_tag}-loadups.tgz \
mkdir -p medley/${TARBALL_DIR}
tar cfz medley/${TARBALL_DIR}/${MEDLEY_RELEASE_TAG}-loadups.tgz \
medley/loadups/lisp.sysout \
medley/loadups/full.sysout \
medley/loadups/apps.sysout \
medley/loadups/whereis.hash \
medley/library/exports.all
env:
release_tag: ${{ steps.tag.outputs.release_tag }}
- name: Build runtime release tar
run: |
cd ..
tar cfz medley/tmp/${release_tag}-runtime.tgz \
mkdir -p medley/${TARBALL_DIR}
tar cfz medley/${TARBALL_DIR}/${MEDLEY_RELEASE_TAG}-runtime.tgz \
--exclude "*~" --exclude "*#*" \
--exclude exports.all \
medley/clos \
medley/docs/dinfo \
medley/docs/man-page/medley.1.gz \
medley/doctools \
medley/greetfiles \
medley/rooms \
medley/medley \
medley/run-medley \
medley/scripts \
medley/fonts/displayfonts \
@@ -197,39 +262,148 @@ jobs:
medley/lispusers \
medley/sources \
medley/internal
env:
release_tag: ${{ steps.tag.outputs.release_tag }}
- name: "Create release"
uses: "actions/github-script@v5"
# Build the deb files as well as the tgz files
- name: Build .deb files for 3 architectures
id: debs
run: |
cd installers/deb
debs_filename_base=$(./build_deb.sh)
echo "DEBS_FILENAME_BASE=${debs_filename_base}" >> $GITHUB_ENV;
echo "DEBS_FILENAME_BASE=${debs_filename_base}" >> $GITHUB_OUTPUT;
# Push the release up to github releases
- name: Delete existing release with same tag (if any)
uses: cb80/delrel@latest
with:
github-token: "${{ secrets.GITHUB_TOKEN }}"
script: |
try {
await github.rest.repos.createRelease({
draft: false,
generate_release_notes: true,
name: process.env.release_tag,
owner: context.repo.owner,
prerelease: false,
repo: context.repo.repo,
tag_name: process.env.release_tag,
});
} catch (error) {
core.setFailed(error.message);
}
env:
release_tag: ${{ steps.tag.outputs.release_tag }}
tag: ${{ env.MEDLEY_RELEASE_TAG }}
continue-on-error: true
- name: "Upload release assets"
uses: AButler/upload-release-assets@v2.0
with:
files: 'tmp/${{ env.release_tag }}-loadups.tgz;tmp/${{ env.release_tag }}-runtime.tgz'
repo-token: ${{ secrets.GITHUB_TOKEN }}
release-tag: ${{ env.release_tag }}
- name: Push the release
id: push_release
uses: ncipollo/release-action@v1
with:
allowUpdates: true
artifacts:
${{ env.TARBALL_DIR }}/${{ env.MEDLEY_RELEASE_TAG }}-loadups.tgz,
${{ env.TARBALL_DIR }}/${{ env.MEDLEY_RELEASE_TAG }}-runtime.tgz,
${{ env.DEBS_DIR }}/*.deb,
${{ env.TARS_DIR }}/*.tgz
tag: ${{ env.MEDLEY_RELEASE_TAG }}
draft: ${{ needs.inputs.outputs.draft }}
prerelease: false
generateReleaseNotes: true
token: ${{ secrets.GITHUB_TOKEN }}
#
# Create the Windows installer, push it up to the release on github and
# update the downloads page on OIO
#
windows_installer:
runs-on: windows-latest
needs: [inputs, sentry, loadup]
if: |
needs.sentry.outputs.release_not_built == 'true'
|| needs.inputs.outputs.force == 'true'
steps:
# Checkout latest commit
- name: Checkout Medley
uses: actions/checkout@v3
# Store the values output from loadup job as environment variables
- name: Environment Variables
shell: powershell
run: |
$crt="${{ needs.loadup.outputs.combined_release_tag }}"
echo "COMBINED_RELEASE_TAG=$crt" | Out-File -FilePath $Env:GITHUB_ENV -Encoding utf8 -Append
$mrt="${{ needs.loadup.outputs.medley_release_tag }}"
echo "MEDLEY_RELEASE_TAG=$mrt" | Out-File -FilePath $Env:GITHUB_ENV -Encoding utf8 -Append
$msrt="${{ needs.loadup.outputs.medley_short_release_tag }}"
echo "MEDLEY_SHORT_RELEASE_TAG=$msrt" | Out-File -FilePath $Env:GITHUB_ENV -Encoding utf8 -Append
$debs="${{ needs.loadup.outputs.debs_filename_base }}"
echo "DEBS_FILENAME_BASE=$debs" | Out-File -FilePath $Env:GITHUB_ENV -Encoding utf8 -Append
# Download vnc viewer
- name: Download vncviewer
shell: powershell
run: |
$url = "https://sourceforge.net/projects/tigervnc/files/stable/1.12.0/vncviewer64-1.12.0.exe"
$output = "installers\win\vncviewer64-1.12.0.exe"
(New-Object System.Net.WebClient).DownloadFile($url, $output)
# Run iscc.exe to compile the installer
- name: Compile medley.iss
shell: powershell
run: |
iscc installers\win\medley.iss
$filename="medley-install_${env:COMBINED_RELEASE_TAG}_x64.exe"
echo "INSTALLER_FILENAME=$filename" | Out-File -FilePath $Env:GITHUB_ENV -Encoding utf8 -Append
# Upload windows installer to release
- name: Upload windows installer to release
id: push
uses: ncipollo/release-action@v1
with:
allowUpdates: true
artifacts: installers/win/${{ env.INSTALLER_FILENAME }}
tag: ${{ env.MEDLEY_RELEASE_TAG }}
token: ${{ secrets.GITHUB_TOKEN }}
omitBodyDuringUpdate: true
omitDraftDuringUpdate: true
omitNameDuringUpdate: true
omitPrereleaseDuringUpdate: true
# Install the OpenSSH Client
- name: Install the OpenSSH Client
shell: powershell
run: |
Add-WindowsCapability -Online -Name OpenSSH.Client~~~~0.0.1.0
# Update the downloads page and the man page on OIO
- name: Update the downloads page and the man page to the OIO static page host
shell: bash
run: |
# Figure out filenames
download_url="${{ steps.push.outputs.html_url }}"
download_url="${download_url/\/tag\//\/download\/}"
local_template="installers/downloads_page/medley_downloads.html"
local_filename="medley_downloads.html"
local_manpath="docs/man-page/man_medley.html"
if [ "${{ needs.inputs.outputs.draft }}" = "true" ];
then
remote_filename="draft_downloads"
remote_manname="man_draft.html"
else
remote_filename="${local_filename%.html}"
remote_manname="man_medley.html"
fi
remote_filepath="/srv/oio/static/${remote_filename}"
remote_manpath="/srv/oio/static/${remote_manname}"
# Fill in downloads page template
sed \
-e "s/@@@MEDLEY.SHORT.RELEASE.TAG@@@/${MEDLEY_SHORT_RELEASE_TAG}/g" \
-e "s~@@@DOWNLOAD_URL@@@~${download_url}~g" \
-e "s/@@@DEBS.FILENAME.BASE@@@/${DEBS_FILENAME_BASE}/g" \
-e "s/@@@WINDOWS.INSTALLER.FILENAME@@@/${INSTALLER_FILENAME}/g" \
< "${local_template}" > "${local_filename}"
# Create sftp instruction file
echo "-rm ${remote_filepath}.oldold" > batch
echo "-rename ${remote_filepath}.old ${remote_filepath}.oldold" >> batch
echo "-rename ${remote_filepath}.html ${remote_filepath}.old" >> batch
echo "-put ${local_filename} ${remote_filepath}.html" >> batch
echo "-put ${local_manpath} ${remote_manpath}" >> batch
# Do the sftp
eval $(ssh-agent)
ssh-add - <<< "${SSH_KEY}"
sftp -o StrictHostKeyChecking=no -b batch ubuntu@online.interlisp.org
env:
release_tag: ${{ steps.tag.outputs.release_tag }}
SSH_KEY: ${{ secrets.OIO_SSH_KEY }}
######################################################################################
@@ -244,12 +418,12 @@ jobs:
outputs:
build_successful: ${{ steps.output.outputs.build_successful }}
needs: [inputs, sentry, loadup]
needs: [inputs, sentry, loadup, windows_installer]
steps:
# Checkout the actions for this repo owner
- name: Checkout Actions
uses: actions/checkout@v2
uses: actions/checkout@v3
with:
repository: ${{ github.repository_owner }}/.github
path: ./Actions_${{ github.sha }}
@@ -265,6 +439,24 @@ jobs:
- name: Output
id: output
run: |
echo ::set-output name=build_successful::'true'
echo "build_successful='true'" >> $GITHUB_OUTPUT
######################################################################################
# - name: Download the Windows installer created in windows job
# uses: actions/download-artifact@v3
# with:
# name: windows_installer
# path: installers/win
# - name: Rename the Windows installer w/ version tag
# run: |
# maiko_release_tag="${{ steps.maiko.outputs.latest_tag }}"
# combined_release_tag="${MEDLEY_RELEASE_TAG#medley-}_${maiko_release_tag#maiko-}"
# windows_installer_filename="medley_install_${combined_release_tag}_x64.exe"
# cd installers/win
# mv medley_install_vXXXVERSIONXXX_x64.exe "${windows_installer_filename}"
# echo "WINDOWS_INSTALLER_FILENAME=${windows_installer_filename}" >>${GITHUB_ENV}

View File

@@ -19,18 +19,97 @@ name: "Build/Push Release & Docker"
# Run this workflow on ...
on:
workflow_dispatch:
inputs:
draft:
description: "Mark this as a draft release"
type: choice
options:
- 'false'
- 'true'
force:
description: "Force build even if build already successfully completed for this commit"
type: choice
options:
- 'false'
- 'true'
workflow_call:
outputs:
successful:
description: "'True' if medley build completed successully"
value: ${{ jobs.complete.outputs.build_successful }}
inputs:
draft:
description: "Mark this as a draft release"
required: false
type: string
default: 'false'
force:
description: "Force build even if build already successfully completed for this commit"
required: false
type: string
default: 'false'
defaults:
run:
shell: bash
# Jobs that compose this workflow
jobs:
######################################################################################
# Regularize the inputs so they can be referenced the same way whether they are
# the result of a workflow_dispatch or a workflow_call
inputs:
runs-on: ubuntu-latest
outputs:
draft: ${{ steps.one.outputs.draft }}
force: ${{ steps.one.outputs.force }}
steps:
- id: one
run: >
if [ '${{ toJSON(inputs) }}' = 'null' ];
then
echo "workflow_dispatch";
echo "draft=${{ github.event.inputs.draft }}" >> $GITHUB_OUTPUT;
echo "force=${{ github.event.inputs.force }}" >> $GITHUB_OUTPUT;
else
echo "workflow_call";
echo "draft=${{ inputs.draft }}" >> $GITHUB_OUTPUT;
echo "force=${{ inputs.force }}" >> $GITHUB_OUTPUT;
fi
######################################################################################
# Build Loadup
do_release:
needs: inputs
uses: ./.github/workflows/buildLoadup.yml
with:
draft: ${{ needs.inputs.outputs.draft }}
force: ${{ needs.inputs.outputs.force }}
secrets:
OIO_SSH_KEY: ${{ secrets.OIO_SSH_KEY }}
######################################################################################
# Build Docker Image
do_docker:
needs: do_release
needs: [inputs, do_release]
uses: ./.github/workflows/buildDocker.yml
with:
draft: ${{ needs.inputs.outputs.draft }}
force: ${{ needs.inputs.outputs.force }}
secrets:
DOCKER_USERNAME: ${{ secrets.DOCKER_USERNAME }}
DOCKER_PASSWORD: ${{ secrets.DOCKER_PASSWORD }}
DOCKER_USERNAME: ${{ secrets.DOCKER_USERNAME }}
DOCKER_PASSWORD: ${{ secrets.DOCKER_PASSWORD }}
######################################################################################

View File

@@ -1,23 +0,0 @@
name: 'Test Docker Login'
# Run this workflow on ...
on:
workflow_dispatch:
defaults:
run:
shell: bash
jobs:
login_test:
runs-on: ubuntu-latest
steps:
- id: only_step
uses: docker/login-action@v1
with:
username: ${{ secrets.DOCKER_USERNAME }}
password: ${{ secrets.DOCKER_PASSWORD }}

6
.gitignore vendored
View File

@@ -10,6 +10,7 @@ loadups/lisp.sysout
loadups/full.sysout
loadups/*.dribble
loadups/whereis.hash
loadups/apps.sysout
# manual cross-reference files
@@ -37,3 +38,8 @@ core
# Mac OS detritus
.DS_Store
*.PS
# nano detritus
*.swp
*.save

View File

@@ -1,54 +0,0 @@
#*******************************************************************************
#
# Dockerfile to build Medley image from latest Maiko image
# plus latest release tars from github
#
# Copyright 2022 by Interlisp.org
#
# ******************************************************************************
ARG DOCKER_NAMESPACE=interlisp
FROM ${DOCKER_NAMESPACE}/maiko:latest
# Add tightvnc server and xclip to the image
RUN apt-get update && apt-get install -y tightvncserver && apt-get install -y xclip
# Handle ARGs, ENV variables, and LABELs
ARG BUILD_DATE=unknown
ARG RELEASE_TAG=unknown
ARG MAIKO_RELEASE=unknown
ARG REPO_OWNER=Interlisp
LABEL name="Medley"
LABEL description="The Medley Interlisp environment"
LABEL url="https://github.com/${REPO_OWNER}/medley"
LABEL build-time=$BUILD_DATE
LABEL release_tag=$RELEASE_TAG
LABEL maiko_release=$MAIKO_RELEASE
ENV MEDLEY_BUILD_DATE=$BUILD_DATE
ENV MEDLEY_RELEASE=$RELEASE_TAG
ARG INSTALL_LOCATION=/usr/local/interlisp
ENV INSTALL_LOCATION=${INSTALL_LOCATION}
ARG DOCKER_NAMESPACE=interlisp
ENV DOCKER_NAMESPACE=${DOCKER_NAMESPACE}
# Copy over the release tars
RUN mkdir -p ${INSTALL_LOCATION}
ADD ./*.tgz ${INSTALL_LOCATION}
# Create a run_medley script in /usr/local/bin
RUN mkdir -p /usr/local/bin && \
echo "#!/bin/bash" > /usr/local/bin/run-medley && \
echo "cd ${INSTALL_LOCATION}/medley" >> /usr/local/bin/run-medley && \
echo './run-medley "$@"' >> /usr/local/bin/run-medley && \
chmod ugo+x /usr/local/bin/run-medley
# "Finalize" image
EXPOSE 5900
RUN adduser --disabled-password --gecos "" medley
USER medley
WORKDIR /home/medley
ENTRYPOINT USER=medley Xvnc -geometry 1280x720 :0 & DISPLAY=:0 ${INSTALL_LOCATION}/medley/run-medley -full -g 1280x720 -sc 1280x720

View File

@@ -105,8 +105,7 @@ dump of your system located in your home directory named
specify a specific image to run, Medley restores that image so that
you can continue right where you left off.
* [Using Medley Interlisp](https://github.com/Interlisp/medley/wiki/Using-Medley-Interlisp)
* [Using Medley Interlisp](https://interlisp.org/doc/info/Using.html)
## Naming conventions and directory structure

2
docs/man-page/man2html.sh Executable file
View File

@@ -0,0 +1,2 @@
#!/bin/bash
pandoc --from man --to html < medley.1 > man_medley.html

View File

@@ -0,0 +1,107 @@
<h1>NAME</h1>
<p><strong>medley</strong> — starts up Medley Interlisp</p>
<h1>SYNOPSIS</h1>
<p><strong>medley</strong> [ flags ... ] [ <em>SYSOUT_FILE</em> ] [ -- <em>PASS_ON_ARGS</em> ]</p>
<h1>DESCRIPTION</h1>
<p>Starts Medley Interlisp in a window.</p>
<h1>OPTIONS</h1>
<p><strong>MEDLEYDIR</strong> is an environment variable set by Medley and used by many of the options described below. MEDLEYDIR is the top level directory of the Medley installation that contains the specific medley script that is invoked after all symbolic links are resolved. In the standard global installation this will be /usr/local/interlisp/medley. But Medley can be installed in multiple places on any given machine and hence MEDLEYDIR is computed on each invocation of medley.</p>
<h2>Flags</h2>
<dl>
<dt><strong>-h, --help</strong></dt>
<dd><p>Prints out a brief summary of the flags and arguments to medley.</p>
</dd>
<dt><strong>-z, --man</strong></dt>
<dd><p>Show the man page for medley</p>
</dd>
<dt><strong>-f, --full</strong></dt>
<dd><p>Start Medley from the standard “full” sysout. full.sysout includes a complete Interlisp and CommonLisp environment with a standard set of development tools. It does not include any of the applications built using Medley. (See <em>SYSOUT_FILE</em> below for more information on starting sysouts.)</p>
</dd>
<dt><strong>-l, --lisp</strong></dt>
<dd><p>Start Medley from the standard “lisp” sysout. lisp.sysout only includes the basic Interlisp and CommonLisp environment. (See <em>SYSOUT_FILE</em> below for more information on starting sysouts.)</p>
</dd>
<dt><strong>-a, --apps</strong></dt>
<dd><p>Start Medley from the standard “apps” sysout. apps.sysout includes everything in full.sysout plus Medley applications including Notecards, Rooms and CLOS. It also includes pre-installed links to key Medley documentation. (See <em>SYSOUT_FILE</em> below for more information on starting sysouts.)</p>
</dd>
<dt><strong>-e, --interlisp (relevent only when --apps is specified)</strong></dt>
<dd><p>Make the initial Exec window within Medley be an Interlisp Exec. Default is to start in an XCL Exec.</p>
</dd>
<dt><strong>-n, --noscroll</strong></dt>
<dd><p>Ordinarily Medley displays scroll bars to enable the user to pan the Medley virtual display within the Medley window. This is true even when the entire virtual display fits within the window. Specifying --noscroll turns off the scroll bars. Note: If --noscroll is specified and the virtual screen is larger than the window, there will be no way to pan to the non-visible parts of the virtual display.</p>
</dd>
<dt><strong>-g <em>WxH</em>, --geometry <em>WxH</em></strong></dt>
<dd><p>Sets the size of the X Window (or VNC window) that Medley runs in to be Width x Height. (Full X Windows geomtery specification with +X+Y is not currently supported). If --geometry is not specified but --screensize is, then the window size will be determined based on the --screensize values and the --noscroll flag. If neither --geometry nor --screensize is provided, then the window size is set to 1440x900 if --noscroll is set and 1462x922 if --noscroll is not set.</p>
</dd>
<dt><strong>-s <em>WxH</em>, --screensize <em>WxH</em></strong></dt>
<dd><p>Sets the size of the virtual display as seen from Medleys point of view. The Medley window is an unscaled viewport onto this virtual display. If --screensize is not specified but --geometry is, then the virtual display size will be set so that the entire virtual display fits into the given window geometry. If neither --screensize nor --geometry is provided, then the screen size is set to 1440x900.</p>
</dd>
<dt><strong>-t <em>STRING</em>, --title <em>STRING</em></strong></dt>
<dd><p>Use STRING as title of Medley window. Ignored when when the --vnc flag is set or when running on Windows (Docker) installations.</p>
</dd>
<dt><strong>-d <em>:N</em>, --display <em>:N</em> ** <strong>Not</strong> applicable to Windows (Docker) installations **</strong></dt>
<dd><p>Use X display :N. Defaults to the value of $DISPLAY. This flag is ignored when the --vnc flag is set as well as on Windows (Docker) installations.</p>
</dd>
<dt><strong>-v, --vnc ** <strong>Applicable</strong> only to WSL installations **</strong></dt>
<dd><p>Use a VNC window running on the Windows side instead of an X window. The VNC window will folllow the Windows desktop scaling setting allowing for much more usable Medley on high resolution displays. On WSL, X windows do not scale well. This flag is always set for WSL1 installations.</p>
</dd>
<dt><strong>-i [<em>ID_STRING</em> | - | --], --id [<em>ID_STRING</em> | - | --]</strong></dt>
<dd><p>Use ID_STRING as the id for this run of Medley, iunless ID_STRING is “-” or “--”. If ID_STRING is “-”, then use the basename of $MEDLEYDIR as the id. If ID_STRING is “--”, then use the basename of the parent directory of $MEDLEYDIR as the id. Only one instance of Medley with a given id can run at a time. The id is used to distinguish the virtual memory stores so that multiple instances of Medley can run simultaneously. Default id is “default”.</p>
</dd>
<dt><strong>-m <em>N</em>, --mem <em>N</em></strong></dt>
<dd><p>Set Medley to run in <em>N</em> MB of virtual memory. Defaults to 256MB.</p>
</dd>
<dt><strong>-p <em>FILE</em>, --vmem <em>FILE</em></strong></dt>
<dd><p>Use FILE as the Medley virtual memory (vmem) store. FILE must be writeable by the current user. Care must be taken not to use the same vmem FILE for two instances of Medley running simultaneously. The --id flag will not protect against vmem collisions when the --vmem flag is used. Default is to store the vmem in LOGINDIR/vmem/lisp_XXX.virtualmem, where XXX is the id of this Medley run (see --id flag above). See --logindir below for setting of LOGINDIR. On Windows (Docker) installations, <em>FILE</em> is specified in the Medley file system, not the host Windows file system.</p>
</dd>
<dt><strong>-r [<em>FILE</em> | -], --greet [<em>FILE</em> | -]</strong></dt>
<dd><p>Use FILE as the Medley greetfile, unless FILE is “-” in which case Medley will start up without using a greetfile. The default Medley greetfile is $MEDLEYDIR/greetfiles/MEDLEYDIR-INIT, except when the --apps flag is used in which case it is $MEDLEYDIR/greetfiles/APPS-INIT. On Windows (Docker) installations, <em>FILE</em> is specified in the Medley file system, not the host Windows file system.</p>
</dd>
<dt><strong>-x [<em>DIR</em> | -], --logindir [<em>DIR</em> | -] ** <strong>On</strong> Linux and WSL installations **</strong></dt>
<dd><p>Use DIR as LOGINDIR in Medley, unless DIR is “-”, in which case use $MEDLEYDIR/logindir. DIR (or $MEDLEYDIR/logindir) must be writeable by the current user. LOGINDIR defaults to $HOME/il. LOGINDIR is used by Medley as the working directory on start-up and where it loads any “personal” initialization file from.</p>
</dd>
<dt><strong>-x [<em>DIR</em> | -], --logindir [<em>DIR</em> | -] ** <strong>On</strong> Windows (Docker) installations **</strong></dt>
<dd><p>Map DIR in the Windows host file system to /home/medley/il in the Medley file system (in the Docker container). LOGINDIR is always /home/medley/il from Medleys standpoint. The “-” value is not valid in this case.</p>
</dd>
<dt><strong>-u, --update ** <strong>Windows</strong> (Docker) installations only **</strong></dt>
<dd><p>Before running Medley, do a pull to retrieve the latest interlisp/medley docker image from Docker Hub.</p>
</dd>
<dt><strong>-b, --background ** <strong>Windows</strong> (Docker) installations only **</strong></dt>
<dd><p>Run Medley in background rather than foreground.</p>
</dd>
<dt><strong>-p <em>PORT</em>, --port <em>PORT</em> ** <strong>Windows</strong> (Docker) installations only **</strong></dt>
<dd><p>Use <em>PORT</em> as the port that VNC viewer uses to contact the VNC server within the Docker container. Default is 5900.</p>
</dd>
<dt><strong>-w [<em>DISTRO</em> | -], --wsl [<em>DISTRO</em> | -] ** <strong>Windows</strong> (Docker) installations only **</strong></dt>
<dd><p>Run Medley in the context of the named WSL <em>DISTRO</em> instead of within Docker. If <em>DISTRO</em> is “-”, used the default WSL distro. Equivalent to typing “wsl -d <em>DISTRO</em> medley ...” into a Command or Powershell window.</p>
</dd>
</dl>
<h2>Other Options</h2>
<dl>
<dt><strong><em>SYSOUT_FILE</em></strong></dt>
<dd><p>The pathname of the file to use as a sysout for Medley to start from. If SYSOUT_FILE is not provided and none of the flags (--apps, --full, --lisp) is used, then Medley will start from the saved virtual memory file from the previous session with the same ID_STRING as this run. If no such virtual memory file exists, then Medley will start from the standard full.sysout (equivalent to specifying the --full flag). On Windows (Docker) installations, <em>SYSOUT_FILE</em> is specified in the Medley file system, not the host Windows file system.</p>
</dd>
<dt><strong><em>PASS_ON_ARGS</em></strong></dt>
<dd><p>All arguments after the “--” flag, are passed unaltered to lde via run-medley.</p>
</dd>
</dl>
<h1>FILES</h1>
<dl>
<dt><strong>$HOME/il</strong></dt>
<dd><p>Default Medley LOGINDIR</p>
</dd>
<dt><strong>$HOME/il/vmem/lisp.virtualmem</strong></dt>
<dd><p>Default virtual memory file</p>
</dd>
<dt><strong>$HOME/il/INIT(.LCOM)</strong></dt>
<dd><p>Default personal init file</p>
</dd>
<dt><strong>$MEDLEYDIR/greetfiles/MEDLEYDIR-INIT(.LCOM)</strong></dt>
<dd><p>Default Medley greetfile</p>
</dd>
</dl>
<h1>BUGS</h1>
<p>See GitHub Issues: &lt;https://github.com/Interlisp/medley/issues&gt;</p>
<h1>COPYRIGHT</h1>
<p>Copyright(c) 2023 by Interlisp.org</p>

3
docs/man-page/md2man.sh Executable file
View File

@@ -0,0 +1,3 @@
#!/bin/bash
pandoc medley.1.md -s -t man -o medley.1
gzip --stdout medley.1 >medley.1.gz

220
docs/man-page/medley.1 Normal file
View File

@@ -0,0 +1,220 @@
.\" Automatically generated by Pandoc 2.5
.\"
.ad l
.TH "MEDLEY" "1" "" "" "Start Medley Interlisp"
.nh \" Turn off hyphenation by default.
.SH NAME
.PP
\f[B]medley\f[R] \[em] starts up Medley Interlisp
.SH SYNOPSIS
.PP
\f[B]medley\f[R] [ flags \&... ] [ \f[I]SYSOUT_FILE\f[R] ] [ \-\-
\f[I]PASS_ON_ARGS\f[R] ]
.SH DESCRIPTION
.PP
Starts Medley Interlisp in a window.
.SH OPTIONS
.PP
\f[B]MEDLEYDIR\f[R] is an environment variable set by Medley and used by
many of the options described below.
MEDLEYDIR is the top level directory of the Medley installation that
contains the specific medley script that is invoked after all symbolic
links are resolved.
In the standard global installation this will be
/usr/local/interlisp/medley.
But Medley can be installed in multiple places on any given machine and
hence MEDLEYDIR is computed on each invocation of medley.
.SS Flags
.PP
\
.TP
.B \-h, \-\-help
Prints out a brief summary of the flags and arguments to medley.
.TP
.B \-z, \-\-man
Show the man page for medley
.TP
.B \-f, \-\-full
Start Medley from the standard \[lq]full\[rq] sysout.
full.sysout includes a complete Interlisp and CommonLisp environment
with a standard set of development tools.
It does not include any of the applications built using Medley.
(See \f[I]SYSOUT_FILE\f[R] below for more information on starting
sysouts.)
.TP
.B \-l, \-\-lisp
Start Medley from the standard \[lq]lisp\[rq] sysout.
lisp.sysout only includes the basic Interlisp and CommonLisp
environment.
(See \f[I]SYSOUT_FILE\f[R] below for more information on starting
sysouts.)
.TP
.B \-a, \-\-apps
Start Medley from the standard \[lq]apps\[rq] sysout.
apps.sysout includes everything in full.sysout plus Medley applications
including Notecards, Rooms and CLOS.
It also includes pre\-installed links to key Medley documentation.
(See \f[I]SYSOUT_FILE\f[R] below for more information on starting
sysouts.)
.TP
.B \-e, \-\-interlisp (relevent only when \-\-apps is specified)
Make the initial Exec window within Medley be an Interlisp Exec.
Default is to start in an XCL Exec.
.TP
.B \-n, \-\-noscroll
Ordinarily Medley displays scroll bars to enable the user to pan the
Medley virtual display within the Medley window.
This is true even when the entire virtual display fits within the
window.
Specifying \-\-noscroll turns off the scroll bars.
Note: If \-\-noscroll is specified and the virtual screen is larger than
the window, there will be no way to pan to the non\-visible parts of the
virtual display.
.TP
.B \-g \f[I]WxH\f[R], \-\-geometry \f[I]WxH\f[R]
Sets the size of the X Window (or VNC window) that Medley runs in to be
Width x Height.
(Full X Windows geomtery specification with +X+Y is not currently
supported).
If \-\-geometry is not specified but \-\-screensize is, then the window
size will be determined based on the \-\-screensize values and the
\-\-noscroll flag.
If neither \-\-geometry nor \-\-screensize is provided, then the window
size is set to 1440x900 if \-\-noscroll is set and 1462x922 if
\-\-noscroll is not set.
.TP
.B \-s \f[I]WxH\f[R], \-\-screensize \f[I]WxH\f[R]
Sets the size of the virtual display as seen from Medley\[cq]s point of
view.
The Medley window is an unscaled viewport onto this virtual display.
If \-\-screensize is not specified but \-\-geometry is, then the virtual
display size will be set so that the entire virtual display fits into
the given window geometry.
If neither \-\-screensize nor \-\-geometry is provided, then the screen
size is set to 1440x900.
.TP
.B \-t \f[I]STRING\f[R], \-\-title \f[I]STRING\f[R]
Use STRING as title of Medley window.
Ignored when when the \-\-vnc flag is set or when running on Windows
(Docker) installations.
.TP
.B \-d \f[I]:N\f[R], \-\-display \f[I]:N\f[R]\ \ \ \ ** \f[B]Not applicable to Windows (Docker) installations\f[R] **
Use X display :N.
Defaults to the value of $DISPLAY.
This flag is ignored when the \-\-vnc flag is set as well as on Windows
(Docker) installations.
.TP
.B \-v, \-\-vnc\ \ \ \ ** \f[B]Applicable only to WSL installations\f[R] **
Use a VNC window running on the Windows side instead of an X window.
The VNC window will folllow the Windows desktop scaling setting allowing
for much more usable Medley on high resolution displays.
On WSL, X windows do not scale well.
This flag is always set for WSL1 installations.
.TP
.B \-i [\f[I]ID_STRING\f[R] | \- | \-\-], \-\-id [\f[I]ID_STRING\f[R] | \- | \-\-]
Use ID_STRING as the id for this run of Medley, iunless ID_STRING is
\[lq]\-\[rq] or \[lq]\-\-\[rq].
If ID_STRING is \[lq]\-\[rq], then use the basename of $MEDLEYDIR as the
id.
If ID_STRING is \[lq]\-\-\[rq], then use the basename of the parent
directory of $MEDLEYDIR as the id.
Only one instance of Medley with a given id can run at a time.
The id is used to distinguish the virtual memory stores so that multiple
instances of Medley can run simultaneously.
Default id is \[lq]default\[rq].
.TP
.B \-m \f[I]N\f[R], \-\-mem \f[I]N\f[R]
Set Medley to run in \f[I]N\f[R] MB of virtual memory.
Defaults to 256MB.
.TP
.B \-p \f[I]FILE\f[R], \-\-vmem \f[I]FILE\f[R]
Use FILE as the Medley virtual memory (vmem) store.
FILE must be writeable by the current user.
Care must be taken not to use the same vmem FILE for two instances of
Medley running simultaneously.
The \-\-id flag will not protect against vmem collisions when the
\-\-vmem flag is used.
Default is to store the vmem in LOGINDIR/vmem/lisp_XXX.virtualmem, where
XXX is the id of this Medley run (see \-\-id flag above).
See \-\-logindir below for setting of LOGINDIR.
On Windows (Docker) installations, \f[I]FILE\f[R] is specified in the
Medley file system, not the host Windows file system.
.TP
.B \-r [\f[I]FILE\f[R] | \-], \-\-greet [\f[I]FILE\f[R] | \-]
Use FILE as the Medley greetfile, unless FILE is \[lq]\-\[rq] in which
case Medley will start up without using a greetfile.
The default Medley greetfile is $MEDLEYDIR/greetfiles/MEDLEYDIR\-INIT,
except when the \-\-apps flag is used in which case it is
$MEDLEYDIR/greetfiles/APPS\-INIT.
On Windows (Docker) installations, \f[I]FILE\f[R] is specified in the
Medley file system, not the host Windows file system.
.TP
.B \-x [\f[I]DIR\f[R] | \-], \-\-logindir [\f[I]DIR\f[R] | \-]\ \ \ \ ** \f[B]On Linux and WSL installations\f[R] **
Use DIR as LOGINDIR in Medley, unless DIR is \[lq]\-\[rq], in which case
use $MEDLEYDIR/logindir.
DIR (or $MEDLEYDIR/logindir) must be writeable by the current user.
LOGINDIR defaults to $HOME/il.
LOGINDIR is used by Medley as the working directory on start\-up and
where it loads any \[lq]personal\[rq] initialization file from.
.TP
.B \-x [\f[I]DIR\f[R] | \-], \-\-logindir [\f[I]DIR\f[R] | \-]\ \ \ \ ** \f[B]On Windows (Docker) installations\f[R] **
Map DIR in the Windows host file system to /home/medley/il in the Medley
file system (in the Docker container).
LOGINDIR is always /home/medley/il from Medley\[cq]s standpoint.
The \[lq]\-\[rq] value is not valid in this case.
.TP
.B \-u, \-\-update\ \ \ \ ** \f[B]Windows (Docker) installations only\f[R] **
Before running Medley, do a pull to retrieve the latest interlisp/medley
docker image from Docker Hub.
.TP
.B \-b, \-\-background\ \ \ \ ** \f[B]Windows (Docker) installations only\f[R] **
Run Medley in background rather than foreground.
.TP
.B \-p \f[I]PORT\f[R], \-\-port \f[I]PORT\f[R]\ \ \ \ ** \f[B]Windows (Docker) installations only\f[R] **
Use \f[I]PORT\f[R] as the port that VNC viewer uses to contact the VNC
server within the Docker container.
Default is 5900.
.TP
.B \-w [\f[I]DISTRO\f[R] | \-], \-\-wsl [\f[I]DISTRO\f[R] | \-]\ \ \ \ ** \f[B]Windows (Docker) installations only\f[R] **
Run Medley in the context of the named WSL \f[I]DISTRO\f[R] instead of
within Docker.
If \f[I]DISTRO\f[R] is \[lq]\-\[rq], used the default WSL distro.
Equivalent to typing \[lq]wsl \-d \f[I]DISTRO\f[R] medley \&...\[rq]
into a Command or Powershell window.
.SS Other Options
.PP
\
.TP
.B \f[I]SYSOUT_FILE\f[R]
The pathname of the file to use as a sysout for Medley to start from.
If SYSOUT_FILE is not provided and none of the flags (\-\-apps,
\-\-full, \-\-lisp) is used, then Medley will start from the saved
virtual memory file from the previous session with the same ID_STRING as
this run.
If no such virtual memory file exists, then Medley will start from the
standard full.sysout (equivalent to specifying the \-\-full flag).
On Windows (Docker) installations, \f[I]SYSOUT_FILE\f[R] is specified in
the Medley file system, not the host Windows file system.
.TP
.B \f[I]PASS_ON_ARGS\f[R]
All arguments after the \[lq]\-\-\[rq] flag, are passed unaltered to lde
via run\-medley.
.SH FILES
.TP
.B $HOME/il
Default Medley LOGINDIR
.TP
.B $HOME/il/vmem/lisp.virtualmem
Default virtual memory file
.TP
.B $HOME/il/INIT(.LCOM)
Default personal init file
.TP
.B $MEDLEYDIR/greetfiles/MEDLEYDIR\-INIT(.LCOM)
Default Medley greetfile
.SH BUGS
.PP
See GitHub Issues: <https://github.com/Interlisp/medley/issues>
.SH COPYRIGHT
.PP
Copyright(c) 2023 by Interlisp.org

BIN
docs/man-page/medley.1.gz Normal file

Binary file not shown.

184
docs/man-page/medley.1.md Normal file
View File

@@ -0,0 +1,184 @@
% MEDLEY(1) | Start Medley Interlisp
---
adjusting: l
hyphenate: false
---
NAME
====
**medley** — starts up Medley Interlisp
SYNOPSIS
========
| **medley** \[ flags ... ] \[ *SYSOUT_FILE* ] \[ \-\- *PASS_ON_ARGS* ]
DESCRIPTION
===========
Starts Medley Interlisp in a window.
OPTIONS
=======
**MEDLEYDIR** is an environment variable set by Medley and used by many of the options described below.
MEDLEYDIR is the top level directory of the Medley installation that contains the specific medley script that
is invoked after all symbolic links are resolved. In the standard global installation this will
be /usr/local/interlisp/medley. But Medley can be installed in multiple places on any given machine and
hence MEDLEYDIR is computed on each invocation of medley.
Flags
-----
&nbsp;
-h, \-\-help
: Prints out a brief summary of the flags and arguments to medley.
-z, \-\-man
: Show the man page for medley
-f, \-\-full
: Start Medley from the standard "full" sysout. full.sysout includes a complete Interlisp and CommonLisp environment
with a standard set of development tools. It does not include any of the applications built using Medley.
(See *SYSOUT_FILE* below for more information on starting sysouts.)
-l, \-\-lisp
: Start Medley from the standard "lisp" sysout. lisp.sysout only includes the basic Interlisp and
CommonLisp environment.
(See *SYSOUT_FILE* below for more information on starting sysouts.)
-a, \-\-apps
: Start Medley from the standard "apps" sysout. apps.sysout includes everything in full.sysout plus Medley
applications including Notecards, Rooms and CLOS. It also includes pre-installed links to key Medley
documentation.
(See *SYSOUT_FILE* below for more information on starting sysouts.)
-e, \-\-interlisp (relevent only when \-\-apps is specified)
: Make the initial Exec window within Medley be an Interlisp Exec. Default is to start in an XCL Exec.
-n, \-\-noscroll
: Ordinarily Medley displays scroll bars to enable the user to pan the Medley virtual display within the
Medley window. This is true even when the entire virtual display fits within the window. Specifying
\-\-noscroll turns off the scroll bars. Note: If \-\-noscroll is specified and the virtual screen is larger
than the window, there will be no way to pan to the non-visible parts of the virtual display.
-g *WxH*, \-\-geometry *WxH*
: Sets the size of the X Window (or VNC window) that Medley runs in to be Width x Height. (Full X Windows
geomtery specification with +X+Y is not currently supported). If \-\-geometry is not specified but \-\-screensize is,
then the window size will be determined based on the \-\-screensize values and the \-\-noscroll flag. If neither
\-\-geometry nor \-\-screensize is provided, then the window size is set to 1440x900 if \-\-noscroll is set and 1462x922
if \-\-noscroll is not set.
-s *WxH*, \-\-screensize *WxH*
: Sets the size of the virtual display as seen from Medley's point of view.
The Medley window is an unscaled viewport onto this virtual display. If \-\-screensize is not specified but
\-\-geometry is, then the virtual display size will be set so that the entire virtual display fits into the given
window geometry. If neither \-\-screensize nor \-\-geometry is provided, then the screen size is set to 1440x900.
-t *STRING*, \-\-title *STRING*
: Use STRING as title of Medley window. Ignored when when the \-\-vnc flag is set or when running on Windows (Docker)
installations.
-d *:N*, \-\-display *:N*&nbsp;&nbsp;&nbsp;&nbsp;\*\* **Not applicable to Windows (Docker) installations** \*\*
~ Use X display :N. Defaults to the value of $DISPLAY. This flag is ignored when the \-\-vnc flag is set as
well as on Windows (Docker) installations.
-v, \-\-vnc&nbsp;&nbsp;&nbsp;&nbsp;\*\* **Applicable only to WSL installations** \*\*
: Use a VNC window running on the Windows side instead of an X window.
The VNC window will folllow the Windows desktop scaling setting allowing
for much more usable Medley on high resolution displays. On WSL, X windows
do not scale well. This flag is always set for WSL1 installations.
-i [*ID_STRING* | - | \-\-], \-\-id [*ID_STRING* | - | \-\-]
: Use ID_STRING as the id for this run of Medley, iunless ID_STRING is "-" or "\-\-".
If ID_STRING is "-", then use the basename of $MEDLEYDIR as the id.
If ID_STRING is "\-\-", then use the basename of the parent directory of $MEDLEYDIR as the id.
Only one instance of Medley with a given id can run at a time.
The id is used to distinguish the virtual memory stores so that multiple
instances of Medley can run simultaneously. Default id is "default".
-m *N*, \-\-mem *N*
: Set Medley to run in *N* MB of virtual memory. Defaults to 256MB.
-p *FILE*, \-\-vmem *FILE*
: Use FILE as the Medley virtual memory (vmem) store. FILE must be writeable by the current user.
Care must be taken not to use the same vmem FILE for two instances of Medley running simultaneously.
The \-\-id flag will not protect against vmem collisions when the \-\-vmem flag is used.
Default is to store the vmem in LOGINDIR/vmem/lisp_XXX.virtualmem, where XXX is the id of this
Medley run (see \-\-id flag above). See \-\-logindir below for setting of LOGINDIR. On Windows (Docker) installations, *FILE* is specified in the Medley file system, not the host Windows file system.
-r \[*FILE* | -], \-\-greet \[*FILE* | -]
: Use FILE as the Medley greetfile, unless FILE is "-" in which case
Medley will start up without using a greetfile. The default Medley greetfile
is $MEDLEYDIR/greetfiles/MEDLEYDIR-INIT, except when the \-\-apps flag is used
in which case it is $MEDLEYDIR/greetfiles/APPS-INIT. On Windows (Docker) installations, *FILE* is
specified in the Medley file system, not the host Windows file system.
-x \[*DIR* | -], \-\-logindir \[*DIR* | -]&nbsp;&nbsp;&nbsp;&nbsp;\*\* **On Linux and WSL installations** \*\*
: Use DIR as LOGINDIR in Medley, unless DIR is "-", in which case use
\$MEDLEYDIR/logindir. DIR (or \$MEDLEYDIR/logindir) must be writeable by the current user.
LOGINDIR defaults to \$HOME/il. LOGINDIR is used by Medley as the working directory on start-up
and where it loads any "personal" initialization file from.
-x \[*DIR* | -], \-\-logindir \[*DIR* | -]&nbsp;&nbsp;&nbsp;&nbsp;\*\* **On Windows (Docker) installations** \*\*
: Map DIR in the Windows host file system to /home/medley/il in the Medley
file system (in the Docker container). LOGINDIR is always /home/medley/il from Medley's standpoint. The "-" value is not valid in this case.
-u, \-\-update&nbsp;&nbsp;&nbsp;&nbsp;\*\* **Windows (Docker) installations only** \*\*
: Before running Medley, do a pull to retrieve the latest interlisp/medley docker image from Docker Hub.
-b, \-\-background&nbsp;&nbsp;&nbsp;&nbsp;\*\* **Windows (Docker) installations only** \*\*
: Run Medley in background rather than foreground.
-p *PORT*, \-\-port *PORT*&nbsp;&nbsp;&nbsp;&nbsp;\*\* **Windows (Docker) installations only** \*\*
: Use *PORT* as the port that VNC viewer uses to contact the VNC server within the Docker container. Default is 5900.
-w \[*DISTRO* | -], \-\-wsl \[*DISTRO* | -]&nbsp;&nbsp;&nbsp;&nbsp;\*\* **Windows (Docker) installations only** \*\*
: Run Medley in the context of the named WSL *DISTRO* instead of within Docker. If *DISTRO* is "-", used the default WSL distro. Equivalent to typing "wsl -d *DISTRO* medley ..." into a Command or Powershell window.
Other Options
-------------
&nbsp;
*SYSOUT_FILE*
: The pathname of the file to use as a sysout for Medley to start from. If SYSOUT_FILE is not
provided and none of the flags (\-\-apps, \-\-full, \-\-lisp) is used, then Medley will start from
the saved virtual memory file from the previous session with the same ID_STRING as this run.
If no such virtual memory file exists, then Medley will start from the standard full.sysout
(equivalent to specifying the \-\-full flag). On Windows (Docker) installations, *SYSOUT_FILE* is
specified in the Medley file system, not the host Windows file system.
*PASS_ON_ARGS*
: All arguments after the "\-\-" flag, are passed unaltered to lde via run-medley.
FILES
=====
\$HOME/il
: Default Medley LOGINDIR
\$HOME/il/vmem/lisp.virtualmem
: Default virtual memory file
\$HOME/il/INIT(.LCOM)
: Default personal init file
\$MEDLEYDIR/greetfiles/MEDLEYDIR-INIT(.LCOM)
: Default Medley greetfile
BUGS
====
See GitHub Issues: <https://github.com/Interlisp/medley/issues>
COPYRIGHT
=========
Copyright(c) 2023 by Interlisp.org

4
docs/man-page/publish.sh Executable file
View File

@@ -0,0 +1,4 @@
#!/bin/bash
./md2man.sh
./man2html.sh

2
docs/man-page/showmd.sh Executable file
View File

@@ -0,0 +1,2 @@
#!/bin/bash
pandoc medley.1.md -s -t man | /usr/bin/man -l -

380
greetfiles/APPS-INIT Normal file
View File

@@ -0,0 +1,380 @@
(DEFINE-FILE-INFO PACKAGE "INTERLISP" READTABLE "INTERLISP" BASE 10)
(FILECREATED "19-Jan-2023 12:44:20" {DSK}<home>frank>il>medley>gmedley>greetfiles>APPS-INIT.;9 21022
:CHANGES-TO (VARS APPS-INITCOMS)
(FNS Apps.DoInit)
:PREVIOUS-DATE "19-Jan-2023 11:57:40" {DSK}<home>frank>il>medley>gmedley>greetfiles>APPS-INIT.;8
)
(PRETTYCOMPRINT APPS-INITCOMS)
(RPAQQ APPS-INITCOMS
[(FILES (SYSLOAD)
MEDLEYDIR-INIT)
(GLOBALVARS Apps.NotecardsActivated Apps.RoomsActivated)
(INITVARS (Apps.NotecardsActivated NIL)
(Apps.RoomsActivated NIL))
(FNS Apps.InitNotecards Apps.DoInit Apps.CreateButtons Apps.CreateLabel Apps.ActivateCLOS
Apps.ActivateRooms Apps.ShowDoc XCL-USER::EXEC_INTERLISP)
(DECLARE%: DONTEVAL@LOAD DOCOPY (P (Apps.DoInit)))
(DECLARE%: FIRST DONTEVAL@LOAD DOCOPY (P (BKSYSBUF " "])
(FILESLOAD (SYSLOAD)
MEDLEYDIR-INIT)
(DECLARE%: DOEVAL@COMPILE DONTCOPY
(GLOBALVARS Apps.NotecardsActivated Apps.RoomsActivated)
)
(RPAQ? Apps.NotecardsActivated NIL)
(RPAQ? Apps.RoomsActivated NIL)
(DEFINEQ
(Apps.InitNotecards
[LAMBDA (DoNotRefreshButtons)
(DECLARE (GLOBALVARS BackgroundMenuCommands BackgroundMenu))
(* ; "Edited 19-Jan-2023 11:57 by FGH")
(* ; "Edited 7-Dec-2022 11:14 by FGH")
(* ; "Edited 12-Nov-2022 14:41 by FGH")
(* ; "Edited 11-Sep-2022 01:09 by fgh")
(* ; "Edited 7-Feb-2022 20:22 by tp7")
(LET* [[SRCDIR (OR (UNIX-GETENV 'NOTEFILESSRC)
(AND (UNIX-GETENV 'NC_INSTALLDIR)
(CONCAT (UNIX-GETENV 'NC_INSTALLDIR)
"/notefiles"))
(LET ((SUBDIR "notecards/notefiles"))
(for DIR in (LIST (CONCAT (MEDLEYDIR)
SUBDIR)
(CONCAT (MEDLEYDIR)
"../" SUBDIR)
(CONCAT (MEDLEYDIR)
"../../" SUBDIR)) thereis (DIRECTORYNAME DIR]
(DESTDIR (OR (UNIX-GETENV 'NOTEFILESDIR)
(AND (UNIX-GETENV 'MEDLEY_USERDIR)
(CONCAT (UNIX-GETENV 'MEDLEY_USERDIR)
"/notefiles"))
(CONCAT LOGINDIR "notefiles"]
[if (AND (NOT (DIRECTORYNAME DESTDIR))
(DIRECTORYNAME SRCDIR))
then (for NF in (DIRECTORY (CONCAT SRCDIR "/*"))
do (COPYFILE NF (PACKFILENAME 'HOST "DSK" 'DIRECTORY DESTDIR 'NAME
(FILENAMEFIELD NF 'NAME)
'EXTENSION
(FILENAMEFIELD NF 'EXTENSION)
'VERSION
(FILENAMEFIELD NF 'VERSION]
(LET* ((PW-REGION (WINDOWPROP PROMPTWINDOW 'REGION))
(LEFT (IPLUS (fetch (REGION RIGHT) of PW-REGION)
20))
(BOTTOM (fetch (REGION BOTTOM) of PW-REGION)))
(NC.BringUpNoteCardsIcon (create POSITION
XCOORD _ LEFT
YCOORD _ BOTTOM)))
(NC.FileBrowserMenu NC.NoteCardsIconWindow (PACKFILENAME 'HOST "DSK" 'DIRECTORY DESTDIR
'NAME "*" 'EXTENSION "notefile")
(CREATEREGION 50 (IDIFFERENCE SCREENHEIGHT 700)
550 220))
(if (NULL (SASSOC 'NoteCards BackgroundMenuCommands))
then (PROGN [SETQ BackgroundMenuCommands (APPEND BackgroundMenuCommands
(LIST '(NoteCards (
NC.BringUpNoteCardsIcon
)
"Bring up the NoteCards control icon."
]
(SETQ BackgroundMenu NIL)))
(SETQ Apps.NotecardsActivated T)
(if (NOT DoNotRefreshButtons)
then (Apps.CreateButtons])
(Apps.DoInit
[LAMBDA NIL
(* ;; "Edited 19-Jan-2023 12:43 by FGH")
(* ;; "Edited 17-Jan-2023 23:23 by FGH")
(* ;; "Edited 7-Dec-2022 11:14 by FGH")
(* ;; "Edited 12-Nov-2022 13:57 by FGH")
(* ;; "Edited 12-Oct-2022 20:23 by fgh")
(* ;; "Edited 6-Sep-2022 17:22 by fgh")
(* ;; "Edited 4-Sep-2022 16:44 by larry")
(* ;; "Edited 18-Mar-2022 18:53 by fgh")
(* ;; "Edited 17-Dec-2021 22:05 by fgh")
(PROGN
(* ;; " Adjust windows so that the exec window and the prompt window don't overlap")
[MAPC (OPENWINDOWS)
(FUNCTION (LAMBDA (W)
(COND
((EQ (WINDOWPROP W 'BUTTONEVENTFN)
'WHEN-WHO-LINE-SELECTED-FN)
(MOVEW W (CAR (WINDOWPROP W 'REGION))
(IDIFFERENCE SCREENHEIGHT 18)))
((STREQUAL (WINDOWPROP W 'TITLE)
"Prompt Window")
(PROGN (MOVEW W (create POSITION
XCOORD _ 50
YCOORD _ (IDIFFERENCE SCREENHEIGHT 120)))
(CLEARW W)))
((STREQUAL (WINDOWPROP W 'TITLE)
"Exec (XCL)")
(PROGN (WINDOWPROP W 'TITLE "Exec (INTERLISP)")
(MOVEW W (create POSITION
XCOORD _ 50
YCOORD _ (IDIFFERENCE SCREENHEIGHT 460]
(* ;; " Set up INITIALSLST based on information passed in from the Linux environment")
[SETQ INITIALSLST (LIST (LIST USERNAME (UNIX-GETENV 'MEDLEY_FIRSTNAME)
(UNIX-GETENV 'MEDLEY_INITIALS]
(LOAD '{DSK}/usr/local/interlisp/medley/lispusers/HELPSYS.LCOM T)
(* ;; "change to interlisp exec if required")
(COND
((OR (STRING-EQUAL (UNIX-GETENV 'MEDLEY_EXEC)
"inter")
(STRING-EQUAL (UNIX-GETENV 'NCO)
"true"))
(BKSYSBUF "(EXEC_INTERLISP)")))
(* ;; "Always Activate CLOS")
(Apps.ActivateCLOS)
(* ;; " activate Notecards if requested")
(COND
((STRING-EQUAL (UNIX-GETENV 'RUN_NOTECARDS)
"true")
(Apps.InitNotecards T)))
(* ;; " activate Rooms if requested")
(COND
((STRING-EQUAL (UNIX-GETENV 'RUN_ROOMS)
"true")
(Apps.ActivateRooms T)))
(* ;; " create the Documentation and ROOMS, Notecards Activation Buttons, if needed")
(Apps.CreateButtons T])
(Apps.CreateButtons
[LAMBDA (DoDocsToo) (* ; "Edited 13-Dec-2022 12:51 by frank")
(* ; "Edited 7-Dec-2022 11:28 by FGH")
(* ; "Edited 5-Dec-2022 17:31 by FGH")
(* ; "Edited 12-Nov-2022 14:52 by FGH")
(* ;; " Create buttons for Documentation and to activate Rooms, Notecards ")
(* ;; "Note: due to bug in DELETE-BUTTON need to create Doc buttons last. This will make sure that the NoteCards/Rooms buttons get properl deleted when they are activated. But the Doc buttons will not necessariy get deleted properly (but then there is never a need for them to be deleted).")
(LET* ((FEATURES (LIST (LIST Apps.NotecardsActivated '(Apps.InitNotecards)
"NOTECARDS")
(LIST Apps.RoomsActivated '(Apps.ActivateRooms)
"ROOMS")))
(FEATURES-LABELS (for FEATURE in FEATURES collect (CADDR FEATURE)))
(DOCS (LIST (LIST "https://interlisp.org/docs/medley/orientation/" "BASICS")
(LIST "https://interlisp.org/documentation/Medley-Primer.pdf" "PRIMER")
(LIST "https://interlisp.org/documentation/IRM.pdf" "MANUAL")
(LIST "https://interlisp.org/documentation/notecards_user_guide_v1.2.pdf"
"NOTECARDS")
(LIST "https://interlisp.org/documentation/ROOMSTECHDESC.pdf" "ROOMS")))
(DOCS-LABELS (for DOC in DOCS collect (CADR DOC)))
(RIGHTMARGINISH 140)
(SECTION1YPOS 225)
(YPOSDELTA 55)
(SECTION2YPOS (IPLUS SECTION1YPOS (ITIMES (IPLUS (LENGTH DOCS)
1)
YPOSDELTA)))
(BUTTONY-FEATURES SECTION2YPOS)
(BUTTONY-DOCS SECTION1YPOS)
(FEATURES-REQUIREDP (OR (NOT Apps.RoomsActivated)
(NOT Apps.NotecardsActivated)))
(IWS NIL)
(BUTTONS NIL))
(* ;; "First remove/re-create feature buttons")
(for W in (OPENWINDOWS) when (MEMBER (WINDOWPROP W 'ICONLABEL)
(LIST "ACTIVATE" "FEATURES")) do (CLOSEW W))
(for B in *ALL-BUTTONS* when (AND (EQ (WINDOWPROP B 'Apps.BUTTON)
'FEATURE)
(MEMBER (BUTTON-LABEL B)
FEATURES-LABELS)) do (DELETE-BUTTON B))
[if FEATURES-REQUIREDP
then [SETQ IWS (LIST (Apps.CreateLabel "ACTIVATE" (IDIFFERENCE SCREENWIDTH
(IDIFFERENCE RIGHTMARGINISH 50
))
(IDIFFERENCE SCREENHEIGHT (IDIFFERENCE SECTION2YPOS 20)))
(Apps.CreateLabel "FEATURES" (IDIFFERENCE SCREENWIDTH
(IDIFFERENCE RIGHTMARGINISH 50
))
(IDIFFERENCE SCREENHEIGHT SECTION2YPOS]
(SETQ BUTTONS (for FEATURE in FEATURES
collect (OR (CAR FEATURE)
(LET (B)
(SETQ BUTTONY-FEATURES (IPLUS BUTTONY-FEATURES
YPOSDELTA))
[SETQ B (CREATE-BUTTON (CADR FEATURE)
(CADDR FEATURE)
(create POSITION
XCOORD _ (IDIFFERENCE
SCREENWIDTH
RIGHTMARGINISH)
YCOORD _ (IDIFFERENCE
SCREENHEIGHT
BUTTONY-FEATURES
]
(WINDOWPROP B 'Apps.BUTTON 'FEATURE)
B]
(* ;; "Then if needed, remove/recreate documentation buttons")
(if DoDocsToo
then (for W in (OPENWINDOWS) when (MEMBER (WINDOWPROP W 'ICONLABEL)
(LIST "DOCUMENTATION"))
do (CLOSEW W))
(for B in *ALL-BUTTONS* when (AND (EQ (WINDOWPROP B 'Apps.BUTTON)
'DOC)
(MEMBER (BUTTON-LABEL B)
DOCS-LABELS)) do (DELETE-BUTTON B))
(SETQ IWS (CONS (Apps.CreateLabel "DOCUMENTATION" (IDIFFERENCE SCREENWIDTH
(IDIFFERENCE
RIGHTMARGINISH 50)
)
(IDIFFERENCE SCREENHEIGHT SECTION1YPOS))
IWS))
(SETQ BUTTONS (APPEND (for DOC in DOCS
collect (LET (B)
(SETQ BUTTONY-DOCS (IPLUS BUTTONY-DOCS
YPOSDELTA))
[SETQ B (CREATE-BUTTON (LIST 'Apps.ShowDoc
(CAR DOC))
(CADR DOC)
(create POSITION
XCOORD _
(IDIFFERENCE
SCREENWIDTH
RIGHTMARGINISH)
YCOORD _
(IDIFFERENCE
SCREENHEIGHT
BUTTONY-DOCS]
(WINDOWPROP B 'Apps.BUTTON 'DOC)
B))
BUTTONS)))
[for B in BUTTONS do (COND
((WINDOWP B)
(WINDOWPROP B 'RIGHTBUTTONFN 'NILL)
(WINDOWPROP B 'BUTTONEVENTFN (FUNCTION (LAMBDA (BUTTON)
(if (LASTMOUSESTATE
(ONLY LEFT))
then (EXECUTE-BUTTON
BUTTON]
[for IW in IWS do (COND
((WINDOWP IW)
(WINDOWPROP IW 'RIGHTBUTTONFN 'NILL]
(for B in BUTTONS when (WINDOWP B) collect B])
(Apps.CreateLabel
[LAMBDA (Text CenterX BottomY) (* ; "Edited 5-Dec-2022 16:49 by FGH")
(LET* ((DS (DSPCREATE))
(FONT (DSPFONT '(HELVETICA 18 BOLD)
DS))
(SR (STRINGREGION Text DS))
(BMW (fetch (REGION WIDTH) of SR))
(BMH (IPLUS (fetch (REGION HEIGHT) of SR)
(fetch (REGION BOTTOM) of SR)))
(BM (BITMAPCREATE BMW BMH))
(POS (create POSITION
XCOORD _ (IDIFFERENCE CenterX (IQUOTIENT BMW 2))
YCOORD _ BottomY))
IW)
(DSPDESTINATION BM DS)
(PRIN1 Text DS)
(SETQ IW (ICONW BM BM POS))
(WINDOWPROP IW 'ICONLABEL Text)
IW])
(Apps.ActivateCLOS
[LAMBDA NIL
(DECLARE (GLOBALVARS BackgroundMenuCommands BackgroundMenu))
(* ; "Edited 12-Nov-2022 14:41 by FGH")
(if (NULL (SASSOC "CLOS Browse Class" BackgroundMenuCommands))
then (PROGN [SETQ BackgroundMenuCommands
(APPEND BackgroundMenuCommands
(LIST '("CLOS Browse Class" (CLOS-BROWSER::BROWSE-CLASS)
"Bring up a class browser."
(SUBITEMS (|all in a package| (CLOS-BROWSER::BROWSE-CLASS
(
CLOS-BROWSER::CLASSES-IN-PACKAGE
(
CLOS-BROWSER::IN-SELECT-PACKAGE
)))
"Select a package and browse all the classes defined in that package."
]
(SETQ BackgroundMenu NIL])
(Apps.ActivateRooms
[LAMBDA (DoNotRefreshButtons)
(DECLARE (GLOBALVARS BackgroundMenuCommands ROOMS:*SUITE-DIRECTORIES*))
(* ; "Edited 7-Dec-2022 11:13 by FGH")
(* ; "Edited 12-Nov-2022 14:56 by FGH")
(if (NULL (SASSOC "Rooms" BackgroundMenuCommands))
then (ROOMS:RESET))
(SETQ ROOMS:*SUITE-DIRECTORIES* (CONS (CONCAT (UNIX-GETENV 'MEDLE_USERDIR)
"/suites")
ROOMS:*SUITE-DIRECTORIES*))
(SETQ Apps.RoomsActivated T)
(PROMPTPRINT "
ROOMS functionality is now available via the Background Menu")
(if (NOT DoNotRefreshButtons)
then (Apps.CreateButtons])
(Apps.ShowDoc
[LAMBDA (URL) (* ; "Edited 18-Jan-2023 20:26 by FGH")
(ShellBrowse URL])
(XCL-USER::EXEC_INTERLISP
[LAMBDA NIL (* ; "Edited 18-Mar-2022 18:53 by fgh")
(PROGN [MAPC (OPENWINDOWS)
(FUNCTION (LAMBDA (W)
(COND
((STREQUAL (WINDOWPROP W 'TITLE)
"Exec (XCL)")
(PROGN (WINDOWPROP W 'TITLE "Exec (INTERLISP)")
(MOVEW W (create POSITION
XCOORD _ 50
YCOORD _ (IDIFFERENCE SCREENHEIGHT 460]
(XCL:SET-DEFAULT-EXEC-TYPE 'INTERLISP)
(XCL:SET-EXEC-TYPE 'INTERLISP])
)
(DECLARE%: DONTEVAL@LOAD DOCOPY
(Apps.DoInit)
)
(DECLARE%: FIRST DONTEVAL@LOAD DOCOPY
(BKSYSBUF " ")
)
(DECLARE%: DONTCOPY
(FILEMAP (NIL (1146 20888 (Apps.InitNotecards 1156 . 5018) (Apps.DoInit 5020 . 8119) (
Apps.CreateButtons 8121 . 16945) (Apps.CreateLabel 16947 . 17757) (Apps.ActivateCLOS 17759 . 19108) (
Apps.ActivateRooms 19110 . 19961) (Apps.ShowDoc 19963 . 20112) (XCL-USER::EXEC_INTERLISP 20114 . 20886
)))))
STOP

BIN
greetfiles/APPS-INIT.LCOM Normal file

Binary file not shown.

View File

@@ -1,10 +1,13 @@
(DEFINE-FILE-INFO PACKAGE "INTERLISP" READTABLE "INTERLISP" BASE 10)
(FILECREATED " 9-Mar-2022 11:50:44" {DSK}<home>larry>medley>greetfiles>MEDLEYDIR-INIT.;2 4690
(FILECREATED "13-Apr-2023 09:44:06" {DSK}<home>larry>il>medley>greetfiles>MEDLEYDIR-INIT.;6 2925
:EDIT-BY "lmm"
:CHANGES-TO (VARS MEDLEYDIR-INITCOMS)
:PREVIOUS-DATE "28-Feb-2022 21:13:20" {DSK}<home>larry>medley>greetfiles>MEDLEYDIR-INIT.;1)
:PREVIOUS-DATE "10-Apr-2023 11:58:07" {DSK}<home>larry>il>medley>greetfiles>MEDLEYDIR-INIT.;5
)
(PRETTYCOMPRINT MEDLEYDIR-INITCOMS)
@@ -13,7 +16,7 @@
([P (LOAD? (CONCAT (OR (UNIX-GETENV "MEDLEYDIR")
"")
"/sources/MEDLEYDIR.LCOM"))
(MEDLEY-INIT-VARS)
(MEDLEY-INIT-VARS 'GREET)
(KEYACTION 'LOCK '(LOCKTOGGLE . IGNORE]
(FILES BACKGROUND-YIELD)
(VARS
@@ -21,24 +24,25 @@
(DWIMWAIT 180)
(HELPDEPTH 4)
(HELPTIME 10)
(HELPTIME 1)
(FILING.ENUMERATION.DEPTH 1)
[LOGINDIR (DIRECTORYNAME (OR (UNIX-GETENV "LOGINDIR")
(UNIX-GETENV "HOME"]
[USERGREETFILES `((,LOGINDIR "INIT" COM)
(,LOGINDIR "INIT"]
(COPYRIGHTFLG 'NEVER)
(COPYRIGHTSRESERVED NIL)
(AUTOBACKTRACEFLG 'ALWAYS)
(MAXLEVEL 30000)
(MAXLOOP 30000))
(FNS INTERLISPMODE)
(ALISTS (FONTDEFS LARGER))))
(ALISTS (FONTDEFS))))
(LOAD? (CONCAT (OR (UNIX-GETENV "MEDLEYDIR")
"")
"/sources/MEDLEYDIR.LCOM"))
(MEDLEY-INIT-VARS)
(MEDLEY-INIT-VARS 'GREET)
(KEYACTION 'LOCK '(LOCKTOGGLE . IGNORE))
@@ -48,7 +52,7 @@
(RPAQQ HELPDEPTH 4)
(RPAQQ HELPTIME 10)
(RPAQQ HELPTIME 1)
(RPAQQ FILING.ENUMERATION.DEPTH 1)
@@ -58,6 +62,8 @@
(RPAQ USERGREETFILES `((,LOGINDIR "INIT" COM)
(,LOGINDIR "INIT")))
(RPAQQ COPYRIGHTFLG NEVER)
(RPAQQ COPYRIGHTSRESERVED NIL)
(RPAQQ AUTOBACKTRACEFLG ALWAYS)
@@ -81,44 +87,7 @@
:PACKAGE "INTERLISP"])
)
(ADDTOVAR FONTDEFS
[LARGER (FONTCHANGEFLG . ALL)
(FILELINELENGTH . 102)
(FONTPROFILE (DEFAULTFONT 1 (GACHA 12)
(GACHA 10)
(TERMINAL 10)
(POSTSCRIPT (TERMINAL 10)))
(ITALICFONT 1 (HELVETICA 12 MIR)
(GACHA 10 MIR)
(MODERN 10 MIR)
(POSTSCRIPT (MODERN 10 MIR)))
(BOLDFONT 2 (HELVETICA 12 BRR)
(HELVETICA 10 BRR)
(MODERN 10 BRR)
(POSTSCRIPT (HELVETICA 12 BRR)))
(LITTLEFONT 3 (HELVETICA 10)
(HELVETICA 6 MIR)
(MODERN 10 MIR)
(POSTSCRIPT (MODERN 10 MIR)))
(TINYFONT 6 (GACHA 10)
(GACHA 6)
(TERMINAL 6)
(POSTSCRIPT (TERMINAL 6)))
(BIGFONT 4 (HELVETICA 12 BRR)
NIL
(MODERN 12 BRR)
(POSTSCRIPT (MODERN 12 BRR)))
(MENUFONT 5 (HELVETICA 12)
(HELVETICA 12)
(POSTSCRIPT (HELVETICA 12)))
(COMMENTFONT 6 (HELVETICA 12)
(HELVETICA 10)
(MODERN 10)
(POSTSCRIPT (MODERN 10)))
(TEXTFONT 7 (TIMESROMAN 12)
NIL
(CLASSIC 12)
(POSTSCRIPT (CLASSIC 12])
(ADDTOVAR FONTDEFS )
(DECLARE%: DONTCOPY
(FILEMAP (NIL (1949 2774 (INTERLISPMODE 1959 . 2772)))))
(FILEMAP (NIL (2051 2876 (INTERLISPMODE 2061 . 2874)))))
STOP

Binary file not shown.

7
installers/deb/.gitignore vendored Normal file
View File

@@ -0,0 +1,7 @@
/tmp
*.deb
*.swp
*.save
/tars
/debs

1
installers/deb/build Symbolic link
View File

@@ -0,0 +1 @@
build_deb.sh

158
installers/deb/build_deb.sh Executable file
View File

@@ -0,0 +1,158 @@
#!/bin/bash
###############################################################################
#
# build_deb.sh: build .deb files for installing Medley Interlisp on Linux
# and WSL
#
# 2023-01-10 Frank Halasz
#
# Copyright 2023 by Interlisp.org
#
###############################################################################
# set -x
# mess with file desscriptors so we get only one line on stdout
# so we can communicate only what we want back to any githib runner
# stash fd 1 in fd 3
exec 3>&1
# make fd 1 (stdout) be the same as stdout
# so none of the std output from this file will be captured by
# $() but it will still be written out to the tty (via stderr)
exec 1>&2
tarball_dir=tmp/tarballs
# Make sure we are in the right directory
if [ ! -f ./control-linux ];
then
echo "Can't find ./control file."
echo "Incorrect cwd?"
echo "Should be in medley/installers/deb"
echo "Exiting"
exit 1
fi
# If running as a github action or -t arg, then skip downloading the tarballs
if ! [[ -n "${GITHUB_WORKSPACE}" || "$1" = "-t" ]];
then
# First, make sure gh is available and we are logged in to github
if [ -z "$(which gh)" ];
then
echo "Can't find gh"
echo "Exiting."
exit 2
fi
gh auth status 2>&1 | grep --quiet --no-messages "Logged in to github.com"
if [ $? -ne 0 ];
then
echo "Not logged into github."
echo "Exiting."
exit 3
fi
# then clear out the ./tmp directory
rm -rf ./tmp
mkdir ./tmp
# then download the maiko and medley tarballs
mkdir -p ${tarball_dir}
echo "Fetching maiko and medley release tarballs"
gh release download --repo interlisp/maiko --dir ${tarball_dir} --pattern "*.tgz"
TAG=$(gh release list --repo interlisp/medley | head -n 1 | awk "{print \$1 }")
gh release download ${TAG} --repo interlisp/medley --dir ${tarball_dir} --pattern "*.tgz"
gh repo clone interlisp/notecards notecards -- --depth 1
(cd notecards; git archive --format=tgz --output=../notecards.tgz --prefix=notecards/ main)
mv notecards.tgz ${tarball_dir}
rm -rf notecards
fi
# Figure out release tags from tarball names
pushd ${tarball_dir} >/dev/null 2>/dev/null
medley_release=$(echo medley-*-loadups.tgz | sed "s/medley-\(.*\)-loadups.tgz/\1/")
maiko_release=$(echo maiko-*-linux.x86_64.tgz | sed "s/maiko-\(.*\)-linux.x86_64.tgz/\1/")
debs_filename_base="medley-full-${medley_release}_${maiko_release}"
popd >/dev/null 2>/dev/null
# For linux and wsl create packages for each arch
for wslp in linux wsl
do
# For each arch create a deb file
for arch_base in x86_64^amd64 armv7l^armhf aarch64^arm64
do
if [[ ${wslp} = wsl && ${arch_base} = armv7l^armhf ]];
then
continue
fi
arch=${arch_base%^*}
debian_arch=${arch_base#*^}
pkg_dir=tmp/pkg/${wslp}-${arch}
#
# Set up the pkg directories for this arch using the release tarballs
#
# Copy in the right control file, modifying as needed
rm -rf ${pkg_dir}
mkdir -p ${pkg_dir}
mkdir -p ${pkg_dir}/DEBIAN
sed \
-e "s/--ARCH--/${debian_arch}/" \
-e "s/--RELEASE--/${medley_release}_${maiko_release}/" \
<control-${wslp} >${pkg_dir}/DEBIAN/control
#
il_dir=${pkg_dir}/usr/local/interlisp
MEDLEYDIR=${il_dir#${pkg_dir}}/medley
# Maiko and Medley files to il_dir (/usr/local/interlisp)
mkdir -p ${il_dir}
tar -x -z -C ${il_dir} \
-f "${tarball_dir}/maiko-${maiko_release}-linux.${arch}.tgz"
tar -x -z -C ${il_dir} \
-f "${tarball_dir}/medley-${medley_release}-runtime.tgz"
tar -x -z -C ${il_dir} \
-f "${tarball_dir}/medley-${medley_release}-loadups.tgz"
tar -x -z -C ${il_dir} \
-f "${tarball_dir}/notecards.tgz"
# Copy the medley man page into place
man_dir="${pkg_dir}/usr/local/man/man1"
mkdir -p "${man_dir}"
cp -p "${il_dir}/medley/docs/man-page/medley.1.gz" "${man_dir}"
# Configure postinst and postrm scripts and put in place in DEBIAN dir
sed -e "s>--MEDLEYDIR-->${MEDLEYDIR}>g" <postinst >${pkg_dir}/DEBIAN/postinst
chmod +x ${pkg_dir}/DEBIAN/postinst
sed -e "s>--MEDLEYDIR-->${MEDLEYDIR}>g" <postrm >${pkg_dir}/DEBIAN/postrm
chmod +x ${pkg_dir}/DEBIAN/postrm
# For wsl scripts, include the vncviewer.exe
if [[ ${wslp} = wsl && ${arch} = x86_64 ]];
then
pushd ./tmp >/dev/null
rm -rf vncviewer64-1.12.0.exe
wget -q https://sourceforge.net/projects/tigervnc/files/stable/1.12.0/vncviewer64-1.12.0.exe
popd >/dev/null
mkdir -p ${il_dir}/wsl
cp -p tmp/vncviewer64-1.12.0.exe ${il_dir}/wsl/vncviewer64-1.12.0.exe
fi
#
# Make sure all files are owned by root
#
sudo su <<< "chown --recursive root:root ${il_dir}"
#
# Create tar file for this arch
#
filename="${debs_filename_base}-${wslp}-${arch}"
mkdir -p tars
echo "Creating tar file tars/${filename}.tgz"
tar -C ${il_dir} -czf tars/${filename}.tgz .
#
# Create the deb file for this arch
#
mkdir -p debs
deb_filepath="debs/${filename}.deb"
rm -rf "${deb_filepath}"
dpkg-deb --build -Zxz "${pkg_dir}" "${deb_filepath}"
#
done
done
# send just one line back to github $() construct
# do this by restoring fd 1 to what it was orginally
exec 1>&3
echo "${debs_filename_base}"

View File

@@ -0,0 +1,9 @@
Package: medley-interlisp
Version: 1.0.1
Release: --RELEASE--
Maintainer: info@interlisp.org
Description: Medley Interlisp for Linux
Homepage: https://github.com/interlisp/medley
Architecture: --ARCH--
Depends: man-db, xdg-utils

View File

@@ -0,0 +1,9 @@
Package: medley-interlisp
Version: 1.0.0
Release: --RELEASE--
Maintainer: info@interlisp.org
Description: Medley Interlisp for Linux
Homepage: https://github.com/interlisp/medley
Architecture: --ARCH--
Depends: wslu ( >= 4.1 ) | wslu ( << 4.0 ), tigervnc-standalone-server, tigervnc-xorg-extension

View File

@@ -0,0 +1,10 @@
#
sudo sed -i s/bullseye/bookworm/ /etc/apt/sources.list
sudo apt update
sudo apt full-upgrade -y
#
sudo apt install wget gnupg2 apt-transport-https
wget -O - https://pkg.wslutiliti.es/public.key | sudo tee -a /etc/apt/trusted.gpg.d/wslu.asc
echo "deb https://pkg.wslutiliti.es/debian bullseye main" | sudo tee -a /etc/apt/sources.list
sudo apt update

8
installers/deb/postinst Normal file
View File

@@ -0,0 +1,8 @@
#!/bin/bash
# put linkto medley.sh into /usr/local/bin
if [[ $1 = configure && ! -e /usr/local/bin/medley ]];
then
ln -s --MEDLEYDIR--/scripts/medley/medley.sh /usr/local/bin/medley
fi
# update the man database
mandb

9
installers/deb/postrm Normal file
View File

@@ -0,0 +1,9 @@
#!/bin/bash
if [[ $1 = remove || $1 = purge ]];
then
if [ "$(realpath /usr/local/bin/medley)" = "--MEDLEYDIR--/scripts/medley.sh" ];
then
rm -f /usr/local/bin/medley
fi
fi

View File

@@ -0,0 +1,3 @@
#!/bin/bash
markdown medley_downloads.md > medley_downloads.html

View File

@@ -0,0 +1,45 @@
<ul>
<li><h1>MEDLEY DOWNLOADS</h1>
<ul>
<li><h2>LINUX (including Windows System for Linux)</h2>
<ul>
<li><h3>Standard Installations (for Debian-based distros)</h3>
<ul>
<li><h4>Standard Linux</h4>
<p><a href="@@@DOWNLOAD_URL@@@/@@@DEBS.FILENAME.BASE@@@-linux-x86_64.deb">Release @@@MEDLEY.SHORT.RELEASE.TAG@@@ for x86_64 machines</a></p>
<p><a href="@@@DOWNLOAD_URL@@@/@@@DEBS.FILENAME.BASE@@@-linux-aarch64.deb">Release @@@MEDLEY.SHORT.RELEASE.TAG@@@ for ARM64 machines</a></p>
<p><a href="@@@DOWNLOAD_URL@@@/@@@DEBS.FILENAME.BASE@@@-linux-armv7l.deb">Release @@@MEDLEY.SHORT.RELEASE.TAG@@@ for ARMv7 machines</a></p></li>
<li><h4>Windows System for Linux</h4>
<p><a href="@@@DOWNLOAD_URL@@@/@@@DEBS.FILENAME.BASE@@@-wsl-x86_64.deb">Release @@@MEDLEY.SHORT.RELEASE.TAG@@@ for x86.64 machines</a></p>
<p><a href="@@@DOWNLOAD_URL@@@/@@@DEBS.FILENAME.BASE@@@-wsl-aarch64.deb">Release @@@MEDLEY.SHORT.RELEASE.TAG@@@ for ARM64 machines</a></p></li>
</ul></li>
<li><h3>Local Installations (for any Linux distro)</h3>
<ul>
<li><h4>Standard Linux</h4>
<p><a href="@@@DOWNLOAD_URL@@@/@@@DEBS.FILENAME.BASE@@@-linux-x86_64.tgz">Release @@@MEDLEY.SHORT.RELEASE.TAG@@@ for x86_64 machines</a></p>
<p><a href="@@@DOWNLOAD_URL@@@/@@@DEBS.FILENAME.BASE@@@-linux-aarch64.tgz">Release @@@MEDLEY.SHORT.RELEASE.TAG@@@ for ARM64 machines</a></p>
<p><a href="@@@DOWNLOAD_URL@@@/@@@DEBS.FILENAME.BASE@@@-linux-armv7l.tgz">Release @@@MEDLEY.SHORT.RELEASE.TAG@@@ for ARMv7 machines</a></p></li>
<li><h4>Windows System for Linux</h4>
<p><a href="@@@DOWNLOAD_URL@@@/@@@DEBS.FILENAME.BASE@@@-wsl-x86_64.tgz">Release @@@MEDLEY.SHORT.RELEASE.TAG@@@ for x86_64 machines</a></p>
<p><a href="@@@DOWNLOAD_URL@@@/@@@DEBS.FILENAME.BASE@@@-wsl-aarch64.tgz">Release @@@MEDLEY.SHORT.RELEASE.TAG@@@ for ARM64 machines</a></p></li>
</ul></li>
</ul></li>
<li><h2>WINDOWS 10/11 (Medley runs in a Docker container)</h2>
<p><a href="@@@DOWNLOAD_URL@@@/@@@WINDOWS.INSTALLER.FILENAME@@@">Release @@@MEDLEY.SHORT.RELEASE.TAG@@@ for Windows x64 machines</a></p></li>
</ul></li>
</ul>

View File

@@ -0,0 +1,45 @@
* # MEDLEY DOWNLOADS
* ## LINUX (including Windows System for Linux)
* ### Standard Installations (for Debian-based distros)
* #### Standard Linux
[Release @@@MEDLEY.SHORT.RELEASE.TAG@@@ for x86\_64 machines](@@@DOWNLOAD_URL@@@/@@@DEBS.FILENAME.BASE@@@-linux-x86\_64.deb)
[Release @@@MEDLEY.SHORT.RELEASE.TAG@@@ for ARM64 machines](@@@DOWNLOAD_URL@@@/@@@DEBS.FILENAME.BASE@@@-linux-aarch64.deb)
[Release @@@MEDLEY.SHORT.RELEASE.TAG@@@ for ARMv7 machines](@@@DOWNLOAD_URL@@@/@@@DEBS.FILENAME.BASE@@@-linux-armv7l.deb)
* #### Windows System for Linux
[Release @@@MEDLEY.SHORT.RELEASE.TAG@@@ for x86\.64 machines](@@@DOWNLOAD_URL@@@/@@@DEBS.FILENAME.BASE@@@-wsl-x86\_64.deb)
[Release @@@MEDLEY.SHORT.RELEASE.TAG@@@ for ARM64 machines](@@@DOWNLOAD_URL@@@/@@@DEBS.FILENAME.BASE@@@-wsl-aarch64.deb)
* ### Local Installations (for any Linux distro)
* #### Standard Linux
[Release @@@MEDLEY.SHORT.RELEASE.TAG@@@ for x86\_64 machines](@@@DOWNLOAD_URL@@@/@@@DEBS.FILENAME.BASE@@@-linux-x86\_64.tgz)
[Release @@@MEDLEY.SHORT.RELEASE.TAG@@@ for ARM64 machines](@@@DOWNLOAD_URL@@@/@@@DEBS.FILENAME.BASE@@@-linux-aarch64.tgz)
[Release @@@MEDLEY.SHORT.RELEASE.TAG@@@ for ARMv7 machines](@@@DOWNLOAD_URL@@@/@@@DEBS.FILENAME.BASE@@@-linux-armv7l.tgz)
* #### Windows System for Linux
[Release @@@MEDLEY.SHORT.RELEASE.TAG@@@ for x86\_64 machines](@@@DOWNLOAD_URL@@@/@@@DEBS.FILENAME.BASE@@@-wsl-x86\_64.tgz)
[Release @@@MEDLEY.SHORT.RELEASE.TAG@@@ for ARM64 machines](@@@DOWNLOAD_URL@@@/@@@DEBS.FILENAME.BASE@@@-wsl-aarch64.tgz)
* ## WINDOWS 10/11 (Medley runs in a Docker container)
[Release @@@MEDLEY.SHORT.RELEASE.TAG@@@ for Windows x64 machines](@@@DOWNLOAD_URL@@@/@@@WINDOWS.INSTALLER.FILENAME@@@)

3
installers/win/.gitignore vendored Normal file
View File

@@ -0,0 +1,3 @@
medley-install_*.exe
vncviewer*.exe

BIN
installers/win/Medley.ico Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 155 KiB

View File

@@ -0,0 +1,165 @@
; Copyright (C) 2021-2023 by Bill Stewart (bstewart at iname.com)
;
; This program is free software; you can redistribute it and/or modify it under
; the terms of the GNU Lesser General Public License as published by the Free
; Software Foundation; either version 3 of the License, or (at your option) any
; later version.
;
; This program is distributed in the hope that it will be useful, but WITHOUT
; ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
; FOR A PARTICULAR PURPOSE. See the GNU General Lesser Public License for more
; details.
;
; You should have received a copy of the GNU Lesser General Public License
; along with this program. If not, see https://www.gnu.org/licenses/.
; Sample Inno Setup (https://www.jrsoftware.org/isinfo.php) script
; demonstrating use of PathMgr.dll.
;
; This script uses PathMgr.dll in the following ways:
; * Copies PathMgr.dll to the target machine (required for uninstall)
; * Defines a task in [Tasks] that should modify the Path
; * Imports the AddDirToPath() DLL function at setup time
; * Imports the RemoveDirFromPath() DLL function at uninstall time
; * Stores task state as custom setting using RegisterPreviousData()
; * Retrieves task state custom setting during setup and uninstall initialize
; * At post install, adds app dir to Path if task selected
; * At uninstall, removes dir from Path if custom setting present
; * Unloads and deletes DLL and removes app dir at uninstall deinitialize
#if Ver < EncodeVer(6,0,0,0)
#error This script requires Inno Setup 6 or later
#endif
[Setup]
AppId={{A17D2D05-C729-4F2A-9CC7-E04906C5A842}
AppName=EditPath
AppVersion=4.0.4.0
UsePreviousAppDir=false
DefaultDirName={autopf}\EditPath
Uninstallable=true
OutputDir=.
OutputBaseFilename=EditPath_Setup
ArchitecturesInstallIn64BitMode=x64
PrivilegesRequired=none
PrivilegesRequiredOverridesAllowed=dialog
[Files]
; Install PathMgr.dll for use with both setup and uninstall; use
; uninsneveruninstall flag because DeinitializeSetup() will delete after
; unloading the DLL; install the 32-bit version of PathMgr.dll because both
; setup and uninstall executables are 32-bit
Source: "i386\PathMgr.dll"; DestDir: "{app}"; Flags: uninsneveruninstall
; Other files to install on target system
Source: "i386\EditPath.exe"; DestDir: "{app}"; Check: not Is64BitInstallMode()
Source: "x86_64\EditPath.exe"; DestDir: "{app}"; Check: Is64BitInstallMode()
Source: "EditPath.md"; DestDir: "{app}"
[Tasks]
Name: modifypath; Description: "&Add to Path"
[Code]
const
MODIFY_PATH_TASK_NAME = 'modifypath'; // Specify name of task
var
PathIsModified: Boolean; // Cache task selection from previous installs
ApplicationUninstalled: Boolean; // Has application been uninstalled?
// Import AddDirToPath() at setup time ('files:' prefix)
function DLLAddDirToPath(DirName: string; PathType, AddType: DWORD): DWORD;
external 'AddDirToPath@files:PathMgr.dll stdcall setuponly';
// Import RemoveDirFromPath() at uninstall time ('{app}\' prefix)
function DLLRemoveDirFromPath(DirName: string; PathType: DWORD): DWORD;
external 'RemoveDirFromPath@{app}\PathMgr.dll stdcall uninstallonly';
// Wrapper for AddDirToPath() DLL function
function AddDirToPath(const DirName: string): DWORD;
var
PathType, AddType: DWORD;
begin
// PathType = 0 - use system Path
// PathType = 1 - use user Path
// AddType = 0 - add to end of Path
// AddType = 1 - add to beginning of Path
if IsAdminInstallMode() then
PathType := 0
else
PathType := 1;
AddType := 0;
result := DLLAddDirToPath(DirName, PathType, AddType);
end;
// Wrapper for RemoveDirFromPath() DLL function
function RemoveDirFromPath(const DirName: string): DWORD;
var
PathType: DWORD;
begin
// PathType = 0 - use system Path
// PathType = 1 - use user Path
if IsAdminInstallMode() then
PathType := 0
else
PathType := 1;
result := DLLRemoveDirFromPath(DirName, PathType);
end;
procedure RegisterPreviousData(PreviousDataKey: Integer);
begin
// Store previous or current task selection as custom user setting
if PathIsModified or WizardIsTaskSelected(MODIFY_PATH_TASK_NAME) then
SetPreviousData(PreviousDataKey, MODIFY_PATH_TASK_NAME, 'true');
end;
function InitializeSetup(): Boolean;
begin
result := true;
// Was task selected during a previous install?
PathIsModified := GetPreviousData(MODIFY_PATH_TASK_NAME, '') = 'true';
end;
function InitializeUninstall(): Boolean;
begin
result := true;
// Was task selected during a previous install?
PathIsModified := GetPreviousData(MODIFY_PATH_TASK_NAME, '') = 'true';
ApplicationUninstalled := false;
end;
procedure CurStepChanged(CurStep: TSetupStep);
begin
if CurStep = ssPostInstall then
begin
// Add app directory to Path at post-install step if task selected
if PathIsModified or WizardIsTaskSelected(MODIFY_PATH_TASK_NAME) then
AddDirToPath(ExpandConstant('{app}'));
end;
end;
procedure CurUninstallStepChanged(CurUninstallStep: TUninstallStep);
begin
if CurUninstallStep = usUninstall then
begin
// Remove app directory from path during uninstall if task was selected;
// use variable because we can't use WizardIsTaskSelected() at uninstall
if PathIsModified then
RemoveDirFromPath(ExpandConstant('{app}'));
end
else if CurUninstallStep = usPostUninstall then
begin
ApplicationUninstalled := true;
end;
end;
procedure DeinitializeUninstall();
begin
if ApplicationUninstalled then
begin
// Unload and delete PathMgr.dll and remove app dir when uninstalling
UnloadDLL(ExpandConstant('{app}\PathMgr.dll'));
DeleteFile(ExpandConstant('{app}\PathMgr.dll'));
RemoveDir(ExpandConstant('{app}'));
end;
end;

View File

@@ -0,0 +1,118 @@
# EditPath
EditPath is a Windows console (text-based, command-line) program for managing the system Path and user Path.
# Author
Bill Stewart - bstewart at iname dot com
# License
EditPath.exe is covered by the GNU Lesser Public License (LPGL). See the file `LICENSE` for details.
# Download
https://github.com/Bill-Stewart/PathMgr/releases/
# Background
The system Path is found in the following location in the Windows registry:
Root: `HKEY_LOCAL_MACHINE`
Subkey: `SYSTEM\CurrentControlSet\Control\Session Manager\Environment`
Value name: `Path`
The current user Path is found in the following location in the registry:
Root: `HKEY_CURRENT_USER`
Subkey: `Environment`
Value name: `Path`
In both cases, the `Path` value is (or should be) the registry type `REG_EXPAND_SZ`, which means that it is a string that can contain values surrounded by `%` characters that Windows will automatically expand to environment variable values. (For example, `%SystemRoot%` will be expanded to `C:\Windows` on most systems.)
The `Path` value contains a `;`-delimited list of directory names that the system should search for executables, library files, scripts, etc. Windows appends the content of the current user Path to the system Path and expands the environment variable references. The resulting string is set as the `Path` environment variable for processes.
EditPath provides a command-line interface for managing the `Path` value in the system location (in `HKEY_LOCAL_MACHINE`) and the current user location (in `HKEY_CURRENT_USER`).
# Usage
The following describes the command-line usage for the program. Parameters are case-sensitive.
**EditPath** [_options_] _type_ _action_
You must specify only one of the following _type_ parameters:
| _type_ | Abbreviation | Description
| ------- | ------------ | -----------
| **--system** | **-s** | Specifies the system Path
| **--user** | **-u** | Specifies the user Path
You must specify only one of the following _action_ parameters:
| _action_ | Abbreviation | Description
| -------- | ------------ | -----------
| **--list** | **-l** | Lists directories in Path
| **--test "**_dirname_**"** | **-t "**_dirname_**"** | Tests if directory exists in Path
| **--add "**_dirname_**"** | **-a "**_dirname_**"** | Adds directory to Path
| **--remove "**_dirname_**"** | **-r "**_dirname_**"** | Removes directory from Path
The following parameters are optional:
| _options_ | Abbreviation | Description
| --------- | ------------ | -----------
| **--quiet** | **-q** | Suppresses result messages
| **--expand** | **-x** | Expands environment variables (**--list** only)
| **--beginning** | **-b** | Adds to beginning of Path (**--add** only)
# Exit Codes
The following table lists typical exit codes when not using **--test** (**-t**).
| Exit Code | Description
| --------- | -----------
| 0 | No errors
| 2 | The Path value is not present in the registry
| 3 | The specified directory does not exist in the Path
| 5 | Access is denied
| 87 | Incorrect parameter(s)
| 183 | The specified directory already exists in the Path
The following table lists typical exit codes when using **--test** (**-t**).
| Exit Code | Description
| --------- | -----------
| 1 | The specified directory exists in the unexpanded Path
| 2 | The specified directory exists in the expanded Path
| 3 | The specified directory does not exist in the Path
# Remarks
* Anything on the command line after **--test**, **--add**, or **--remove** is considered to be the argument for the parameter. To avoid ambiguity, specify the _action_ parameter last on the command line.
* Uexpanded vs. expanded refers to whether the environment variable references (i.e., names between `%` characters) are expanded after retrieving the Path value from the registry. For example, `%SystemRoot%` is unexpanded but `C:\Windows` is expanded.
* The **--add** (**-a**) parameter checks whether the specified directory exists in both the unexpanded and expanded copies of the Path before adding the directory. For example, if the environment variable `TESTAPP` is set to `C:\TestApp` and `%TESTAPP%` is in the Path, specifying `--add C:\TestApp` will return exit code 183 (i.e., the directory already exists in the Path) because `%TESTAPP%` expands to `C:\TestApp`.
* The **--remove** (**-r**) parameter does not expand environment variable references. For example, if the environment variable `TESTAPP` is set to `C:\TestApp` and `%TESTAPP%` is in the Path, specifying `--remove "C:\TestApp"` will return exit code 3 (i.e., the directory does not exist in the Path) because **--remove** does not expand `%TESTAPP%` to `C:\TestApp`. For the command to succeed, you would have to specify `--remove "%TESTAPP%"` instead.
* The program will exit with error code 87 if a parameter (or an argument to a parameter) is missing or not valid, if mutually exclusive parameters are specified, etc.
* The program will exit with error code 5 if the current user does not have permission to update the Path value in the registry (for example, if you try to update the system Path using a standard user account or an unelevated administrator account).
# Examples
1. `EditPath --expand --system --list`
This command outputs the directories in the system Path, with environment variables expanded. You can also write this command as `EditPath -x -s -l`.
2. `EditPath --user --add "%LOCALAPPDATA%\Programs\MyApp"`
Adds the specified directory name to the user Path.
3. `EditPath -s -r "C:\Program Files\MyApp\bin"`
Removes the specified directory from the system Path.
4. `EditPath -s --test "C:\Program Files (x86)\MyApp\bin"`
Returns an exit code of 3 if the specified directory is not in the system Path, 1 if the specified directory is in the unexpanded copy of the system Path, or 2 if the specified directory is in the expanded copy of the system Path.

View File

@@ -0,0 +1,3 @@
Editpath installed here is extracted from Release 1.04 from https://github.com/Bill-Stewart/PathMgr.

Binary file not shown.

Binary file not shown.

128
installers/win/makeflix.iss Normal file
View File

@@ -0,0 +1,128 @@
; -- makeflix.iss --
; fgh 2016-08-19
#define x86_or_x64 "x86"
#define version "1.0.1"
#if x86_or_x64 == "x86"
#define exe_dir "Win32"
#else
#define exe_dir "x64"
#endif
[Setup]
ArchitecturesAllowed={#x86_or_x64}
AppName=Makeflix
AppVersion={#version}
AppPublisher=Lellan, Inc.
AppPublisherURL=http://www.lellan.com/
AppCopyright=Copyright (C) 2012-2017 Lellan, Inc.
DefaultDirName={pf}\Lellan\Makeflix
DefaultGroupName=Lellan
UninstallDisplayIcon={app}\makeflix.exe
Compression=lzma2
SolidCompression=yes
; "ArchitecturesInstallIn64BitMode=x64" requests that the install be
; done in "64-bit mode" on x64, meaning it should use the native
; 64-bit Program Files directory and the 64-bit view of the registry.
ArchitecturesInstallIn64BitMode=x64
; Source Dir is lellan/toolchain/makeflix/windows
SourceDir="..\"
OutputDir="deploy"
OutputBaseFilename="makeflix_v{#version}_{#x86_or_x64}"
SetupIconFile="..\images\Lellan_Logo_20130221.ico"
LicenseFile="..\deploy\EULA.rtf"
DisableWelcomePage=no
[Files]
Source: "makeflix\{#exe_dir}\Release\makeflix.exe"; DestDir: "{app}"; DestName: "makeflix.exe"; Flags: ignoreversion
Source: "deploy\DLLs\{#x86_or_x64}\Qt5Core.dll"; DestDir: "{app}"; Flags: ignoreversion
Source: "deploy\DLLs\{#x86_or_x64}\Qt5Gui.dll"; DestDir: "{app}"; Flags: ignoreversion
Source: "deploy\DLLs\{#x86_or_x64}\Qt5Widgets.dll"; DestDir: "{app}"; Flags: ignoreversion
Source: "deploy\DLLs\{#x86_or_x64}\Qt5Network.dll"; DestDir: "{app}"; Flags: ignoreversion
Source: "deploy\DLLs\{#x86_or_x64}\platforms\qwindows.dll"; DestDir: "{app}\platforms"; Flags: ignoreversion
Source: "deploy\gstreamer\{#x86_or_x64}\*"; DestDir: "{app}\gstreamer"; Flags: recursesubdirs ignoreversion
Source: "deploy\vc_redist\vc_redist.{#x86_or_x64}.exe"; DestDir: "{tmp}"; Flags: deleteafterinstall
Source: "deploy\bonjour\Bonjour.{#x86_or_x64}.msi"; DestDir: "{tmp}" ; Flags: deleteafterinstall
Source: "..\deploy\Makeflix_Open_Source_Libraries.pdf"; DestDir: "{app}"
[Icons]
Name: "{group}\Makeflix"; Filename: "{app}\makeflix.exe"
Name: "{group}\Uninstall Makeflix"; Filename: "{uninstallexe}"
[Run]
#define VCmsg "Installing Microsoft Visual C++ Redistributable ..."
Filename: "{tmp}\vc_redist{#x86_or_x64}.exe"; StatusMsg: "{#VCmsg}"; Check: not VCinstalled
#define BonjourMsg "Installing Apple Bonjour support ..."
Filename: "msiexec"; Parameters: "/i {tmp}\Bonjour.{#x86_or_x64}.msi"; StatusMsg: "{#BonjourMsg}"; Check: not BonjourInstalled
[Registry]
Root: HKLM; Subkey: "SOFTWARE\Microsoft\Windows\CurrentVersion\App Paths\makeflix.exe"; ValueType: string; ValueName: "(Default)"; ValueData: "{app}\makeflix.exe"; Flags: uninsdeletekey
Root: HKLM; Subkey: "SOFTWARE\Microsoft\Windows\CurrentVersion\App Paths\makeflix.exe"; ValueType: string; ValueName: "Path"; ValueData: "{app}\gstreamer\bin"; Flags: uninsdeletekey
[Code]
function VCinstalled: Boolean;
// By Michael Weiner <mailto:spam@cogit.net>
// Function for Inno Setup Compiler
// 13 November 2015
// Modified by Frank G Halasz to handle WOW case
// 23 August 2016
// Returns True if Microsoft Visual C++ Redistributable is installed, otherwise False.
// The programmer may set the year of redistributable to find; see below.
var
names: TArrayOfString;
i: Integer;
dName, key, year, platfm: String;
begin
// Year of redistributable to find; leave null to find installation for any year.
year := '2015';
Result := False;
if Is64BitInstallMode then
begin
platfm := 'x64';
key := 'Software\WOW6432Node\Microsoft\Windows\CurrentVersion\Uninstall';
end
else if not IsWin64 then
begin
platfm := 'x86';
key := 'Software\Microsoft\Windows\CurrentVersion\Uninstall';
end
else
begin
platfm := 'x86';
key := 'Software\WOW6432Node\Microsoft\Windows\CurrentVersion\Uninstall';
end;
// Get an array of all of the uninstall subkey names.
if RegGetSubkeyNames(HKEY_LOCAL_MACHINE, key, names) then
// Uninstall subkey names were found.
begin
i := 0
while ((i < GetArrayLength(names)) and (Result = False)) do
// The loop will end as soon as one instance of a Visual C++ redistributable is found.
begin
// For each uninstall subkey, look for a DisplayName value.
// If not found, then the subkey name will be used instead.
if not RegQueryStringValue(HKEY_LOCAL_MACHINE, key + '\' + names[i], 'DisplayName', dName) then
dName := names[i];
// See if the value contains both of the strings below.
Result := (Pos(Trim('Visual C++ ' + year),dName) * Pos('Redistributable',dName) * Pos(platfm, dName) <> 0)
i := i + 1;
end;
end;
end;
function BonjourInstalled: Boolean;
// Returns True if Apple Bonjour is installed, otherwise False.
// Ignores date/version of Bonjour.
begin
Result := False;
// If this key exists, then
// bonjour services must already be installed
if RegKeyExists(HKEY_LOCAL_MACHINE, 'SYSTEM\CurrentControlSet\Services\Bonjour Service') then
// Uninstall subkey names were found.
begin
Result := True;
end;
end;

65
installers/win/medley.iss Normal file
View File

@@ -0,0 +1,65 @@
;###############################################################################
;#
;# medley.iss - Inno Setup compiler script for creating a Windows
;# installer for the medley.ps1 powrshell script for
;# running Medley within a docker container on Windows
;#
;# 2023-02-12 Frank Halasz
;#
;# Copyright 2023 Interlisp.org
;#
;###############################################################################
#define x86_or_x64 "x64"
#if GetEnv('COMBINED_RELEASE_TAG') != ""
#define VERSION=GetEnv('COMBINED_RELEASE_TAG')
#else
#define VERSION="local"
#endif
[Setup]
PrivilegesRequired=lowest
ArchitecturesAllowed={#x86_or_x64}
AppName=Medley
AppVersion={#version}
AppPublisher=Interlisp.org
AppPublisherURL=https://interlisp.org/
AppCopyright=Copyright (C) 2023 Interlisp.org
DefaultDirName={localappdata}\Medley\Scripts
DefaultGroupName=Medley
Compression=lzma2
SolidCompression=yes
; "ArchitecturesInstallIn64BitMode=x64" requests that the install be
; done in "64-bit mode" on x64, meaning it should use the native
; 64-bit Program Files directory and the 64-bit view of the registry.
ArchitecturesInstallIn64BitMode=x64
OutputDir="."
OutputBaseFilename="medley-install_{#version}_{#x86_or_x64}"
SetupIconFile="Medley.ico"
DisableWelcomePage=no
MissingRunOnceIdsWarning=no
DisableProgramGroupPage=yes
WizardImageFile=medley_logo.bmp
WizardSmallImageFile=medley_logo_small.bmp
WizardImageStretch=no
UninstallDisplayIcon="{app}\Medley.ico"
[Files]
Source: "..\..\scripts\medley\medley.ps1"; DestDir: "{app}"; DestName: "medley.ps1"; Flags: ignoreversion
Source: "..\..\scripts\medley\medley.cmd"; DestDir: "{app}"; DestName: "medley.cmd"; Flags: ignoreversion
Source: "editpath\x86_64\EditPath.exe"; DestDir: "{app}"; DestName: "EditPath.exe"; Flags: ignoreversion
Source: "Medley.ico"; DestDir: "{app}"; DestName: "Medley.ico"; Flags: ignoreversion
Source: "vncviewer64-1.12.0.exe"; DestDir: "{app}"; DestName: "vncviewer64-1.12.0.exe"; Flags: ignoreversion
[Icons]
Name: "{group}\Medley\Uninstall_Medley"; Filename: "{uninstallexe}"
Name: "{group}\Medley\Medley"; Filename: "powershell"; Parameters: "-NoExit -File {app}\medley.ps1 --help"; IconFilename: "{app}\Medley.ico"
[Run]
Filename: "{app}\EditPath.exe"; Parameters: "--user --add {app}"; Flags: runhidden
[UninstallRun]
Filename: "{app}\EditPath.exe"; Parameters: "--user --remove {app}"; Flags: runhidden

Binary file not shown.

After

Width:  |  Height:  |  Size: 53 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 10 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 13 KiB

2
internal/MAINTAIN.TXT Normal file
View File

@@ -0,0 +1,2 @@
MAINTAIN -- Network access to the PUP "Grapevine" server, which did
email, distribution lists. Written ~1985 mainly by Bill van Melle.

View File

@@ -1,18 +1,21 @@
(DEFINE-FILE-INFO PACKAGE "INTERLISP" READTABLE "INTERLISP" BASE 10)
(FILECREATED " 5-Feb-2021 22:18:06" {DSK}<home>larry>ilisp>medley>library>PRESS.;2 455434Q
changes to%: (VARS PRESSCOMS)
(FILECREATED "10-Apr-2023 07:15:37" {DSK}<home>larry>il>medley>library>PRESS.;2 452576Q
previous date%: "20-Jan-93 14:25:20" {DSK}<home>larry>ilisp>medley>library>PRESS.;1)
:EDIT-BY "lmm"
:CHANGES-TO (VARS PRESSCOMS)
:PREVIOUS-DATE " 5-Feb-2021 22:18:06" {DSK}<home>larry>il>medley>library>PRESS.;1)
(* ; "
Copyright (c) 1981, 1982, 1983, 1984, 1985, 1986, 1987, 1990, 1993, 2021 by Venue & Xerox Corporation. All rights reserved.
Copyright (c) 1981-1987, 1990, 1993, 2021 by Venue & Xerox Corporation.
")
(PRETTYCOMPRINT PRESSCOMS)
(RPAQQ PRESSCOMS
(RPAQQ PRESSCOMS
[
(* ;;; "PRESS printing support module")
@@ -28,7 +31,7 @@ Copyright (c) 1981, 1982, 1983, 1984, 1985, 1986, 1987, 1990, 1993, 2021 by Venu
(* ;; "Bitmap printing support")
(FNS PRESSBITMAP FULLPRESSBITMAP SHOWREGION SHOWPRESSBITMAPREGION PRESSWINDOW WINDOW.BITMAP
(FNS PRESSBITMAP FULLPRESSBITMAP SHOWREGION SHOWPRESSBITMAPREGION PRESSWINDOW
\WRITEPRESSBITMAP)
(* ;; "Basic PRESS data structure output functions")
@@ -101,7 +104,7 @@ Copyright (c) 1981, 1982, 1983, 1984, 1985, 1986, 1987, 1990, 1993, 2021 by Venu
ROTATION TITLE)))
((FULLPRESS RAVEN)
(* ;
 "same as PRESS but can scale bitmaps")
 "same as PRESS but can scale bitmaps")
(CANPRINT (PRESS))
(STATUS TRUE)
(PROPERTIES NILL)
@@ -718,19 +721,6 @@ Copyright (c) 1981, 1982, 1983, 1984, 1985, 1986, 1987, 1990, 1993, 2021 by Venu
(\WRITEPRESSBITMAP BITMAP NIL NIL PRSTREAM)
(RETURN (CLOSEF PRSTREAM])
(WINDOW.BITMAP
[LAMBDA (W) (* ; "Edited 12-Jun-90 10:38 by mitani")
(* Returns all of the bitmap of the
 window)
(PROG [BM (REGION (WINDOWPROP W 'REGION]
(CLOSEW W)
(SETQ BM (BITMAPCREATE (fetch (REGION WIDTH) of REGION)
(fetch (REGION HEIGHT) of REGION)))
(BITBLT (WINDOWPROP W 'IMAGECOVERED)
NIL NIL BM)
(OPENW W)
(RETURN BM])
(\WRITEPRESSBITMAP
[LAMBDA (BITMAP XPOS YPOS SCALEFACTOR CLIPPINGREGION PRSTREAM)
(* ; "Edited 12-Jun-90 10:39 by mitani")
@@ -2344,7 +2334,7 @@ Copyright (c) 1981, 1982, 1983, 1984, 1985, 1986, 1987, 1990, 1993, 2021 by Venu
(RPAQQ SPRUCEPAPERTOPSCANS 4096)
(RPAQ SPRUCEPAPERTOPMICAS (FIX (FQUOTIENT (FTIMES SPRUCEPAPERTOPSCANS \MicasPerInch)
ScansPerIn)))
ScansPerIn)))
(RPAQ SPRUCEPAPERRIGHTMICAS (FIX (FTIMES 8.5 \MicasPerInch)))
@@ -2427,85 +2417,74 @@ Copyright (c) 1981, 1982, 1983, 1984, 1985, 1986, 1987, 1990, 1993, 2021 by Venu
(DECLARE%: DONTCOPY
(DECLARE%: EVAL@COMPILE
(DATATYPE PRESSDATA (PRHEADING (* The string to be printed atop
 each page.)
PRHEADINGFONT (* Font to print the heading in)
PRXPOS (* Current X position)
PRYPOS (* Current Y position)
PRFONT (* Current font)
PRCURRFDE PRESSFONTDIR PRWIDTHSCACHE PRCOLOR PRLINEFEED PRPAGESTATE
PDSTREAM ELSTREAM XPRPAGEREGION PRDOCNAME (PRLEFT WORD)
(DATATYPE PRESSDATA (PRHEADING (* The string to be printed atop each
 page.)
PRHEADINGFONT (* Font to print the heading in)
PRXPOS (* Current X position)
PRYPOS (* Current Y position)
PRFONT (* Current font)
PRCURRFDE PRESSFONTDIR PRWIDTHSCACHE PRCOLOR PRLINEFEED PRPAGESTATE
PDSTREAM ELSTREAM XPRPAGEREGION PRDOCNAME (PRLEFT WORD)
(* Page left margin)
(PRBOTTOM WORD) (* Page bottom margin)
(PRRIGHT WORD) (* Page right margin)
(PRTOP WORD) (* Page top margin)
(PRPAGENUM WORD) (* Current Page number)
(PRNEXTFONT# BYTE)
(PRMAXFONTSET BYTE)
(PRPARTSTART INTEGER)
(DLSTARTBYTE INTEGER)
(ELSTARTBYTE INTEGER)
(STARTCHARBYTE INTEGER)
(VECMOVINGRIGHT FLAG) (* If we're drawing a curve with
 vector fonts, are we moving to the
 right?)
(VECWASDISPLAYING FLAG)
(PRBOTTOM WORD) (* Page bottom margin)
(PRRIGHT WORD) (* Page right margin)
(PRTOP WORD) (* Page top margin)
(PRPAGENUM WORD) (* Current Page number)
(PRNEXTFONT# BYTE)
(PRMAXFONTSET BYTE)
(PRPARTSTART INTEGER)
(DLSTARTBYTE INTEGER)
(ELSTARTBYTE INTEGER)
(STARTCHARBYTE INTEGER)
(VECMOVINGRIGHT FLAG) (* If we're drawing a curve with
 vector fonts, are we moving to the
 right?)
(VECWASDISPLAYING FLAG)
(* Used during curve/line clipping to remember whether we were on-screen or
 not, so we know when to force a SETXY.)
(* Used during curve/line clipping to remember whether we were on-screen or not,
 so we know when to force a SETXY.)
VECSEGCHARS (* Cache for vector characters while
 we're moving to the left.)
VECCURX (* Current X position within vector
 code, in Dover spots)
VECCURY (* Current Y position with vector
 code, in Dover spots)
PRSPACEFACTOR PRSPACEWIDTH (CHARWASDISPLAYING FLAG)
(* Says whether we have been
 printing characters inside the
 clipping region)
PRClippingRegion
VECSEGCHARS (* Cache for vector characters while
 we're moving to the left.)
VECCURX (* Current X position within vector
 code, in Dover spots)
VECCURY (* Current Y position with vector
 code, in Dover spots)
PRSPACEFACTOR PRSPACEWIDTH (CHARWASDISPLAYING FLAG)
(* Says whether we have been printing
 characters inside the clipping region)
PRClippingRegion
(* The edges of the paper, as far as PRESS is concerned.
 Used to protect SPRUCE users who get killed when the image goes off-paper)
 Used to protect SPRUCE users who get killed when the image goes off-paper)
)
PRSPACEFACTOR _ 1 PRXPOS _ 0 PRYPOS _ 0
(* We assume that the origin is
 translated to the bottom-left of the
 page region)
PRClippingRegion _ (create REGION
LEFT _ SPRUCEPAPERLEFTMICAS
BOTTOM _ SPRUCEPAPERBOTTOMMICAS
WIDTH _ (DIFFERENCE SPRUCEPAPERRIGHTMICAS
SPRUCEPAPERLEFTMICAS)
HEIGHT _ 29210)
[ACCESSFNS ((PRWIDTH (IDIFFERENCE (fetch (PRESSDATA PRRIGHT) of
DATUM)
(fetch (PRESSDATA PRLEFT) of DATUM)))
(PRHEIGHT (IDIFFERENCE (fetch (PRESSDATA PRTOP) of DATUM)
(fetch (PRESSDATA PRBOTTOM) of DATUM)))
(PRPAGEREGION (fetch (PRESSDATA XPRPAGEREGION) of DATUM)
(PROGN (replace (PRESSDATA XPRPAGEREGION) of
DATUM
with NEWVALUE)
(replace (PRESSDATA PRLEFT) of DATUM
with (fetch (REGION LEFT) of
NEWVALUE
))
(replace (PRESSDATA PRBOTTOM) of DATUM
with (fetch (REGION BOTTOM) of
NEWVALUE))
(replace (PRESSDATA PRRIGHT) of DATUM
with (IPLUS (fetch (REGION LEFT)
of NEWVALUE)
(fetch (REGION WIDTH)
of NEWVALUE)))
(replace (PRESSDATA PRTOP) of DATUM
with (IPLUS (fetch (REGION BOTTOM)
of NEWVALUE)
(fetch (REGION HEIGHT)
of NEWVALUE])
)
PRSPACEFACTOR _ 1 PRXPOS _ 0 PRYPOS _ 0 (* We assume that the origin is
 translated to the bottom-left of the
 page region)
PRClippingRegion _ (create REGION
LEFT _ SPRUCEPAPERLEFTMICAS
BOTTOM _ SPRUCEPAPERBOTTOMMICAS
WIDTH _ (DIFFERENCE SPRUCEPAPERRIGHTMICAS
SPRUCEPAPERLEFTMICAS)
HEIGHT _ 29210)
[ACCESSFNS ((PRWIDTH (IDIFFERENCE (fetch (PRESSDATA PRRIGHT) of DATUM)
(fetch (PRESSDATA PRLEFT) of DATUM)))
(PRHEIGHT (IDIFFERENCE (fetch (PRESSDATA PRTOP) of DATUM)
(fetch (PRESSDATA PRBOTTOM) of DATUM)))
(PRPAGEREGION (fetch (PRESSDATA XPRPAGEREGION) of DATUM)
(PROGN (replace (PRESSDATA XPRPAGEREGION) of DATUM
with NEWVALUE)
(replace (PRESSDATA PRLEFT) of DATUM
with (fetch (REGION LEFT) of NEWVALUE))
(replace (PRESSDATA PRBOTTOM) of DATUM
with (fetch (REGION BOTTOM) of NEWVALUE))
(replace (PRESSDATA PRRIGHT) of DATUM
with (IPLUS (fetch (REGION LEFT) of NEWVALUE)
(fetch (REGION WIDTH) of NEWVALUE)))
(replace (PRESSDATA PRTOP) of DATUM
with (IPLUS (fetch (REGION BOTTOM) of NEWVALUE)
(fetch (REGION HEIGHT) of NEWVALUE])
(RECORD FONTDIRENTRY (DESCR FONT# FONTSET#))
)
@@ -2596,7 +2575,7 @@ Copyright (c) 1981, 1982, 1983, 1984, 1985, 1986, 1987, 1990, 1993, 2021 by Venu
(RPAQ? DEFAULTPAGEREGION (CREATEREGION 2794 1905 16256 24765))
(RPAQ? PRESSBITMAPREGION (CREATEREGION 1270 1270 (FIX (TIMES 7.5 \MicasPerInch))
(TIMES 10 \MicasPerInch)))
(TIMES 10 \MicasPerInch)))
(DECLARE%: DOEVAL@COMPILE DONTCOPY
(GLOBALVARS DEFAULTPAGEREGION)
@@ -2618,7 +2597,7 @@ Copyright (c) 1981, 1982, 1983, 1984, 1985, 1986, 1987, 1990, 1993, 2021 by Venu
(RPAQQ PRESSOPS
(RPAQQ PRESSOPS
(SetX SetY ShowCharacters ShowCharactersShortCode SkipCharactersShortCode
ShowCharactersAndSkipCode SetSpaceXShortCode SetSpaceYShortCode FontCode
SkipControlBytesImmediateCode AlternativeCode OnlyOnCopyCode SetXCode SetYCode
@@ -2739,65 +2718,64 @@ Copyright (c) 1981, 1982, 1983, 1984, 1985, 1986, 1987, 1990, 1993, 2021 by Venu
)
(ADDTOVAR IMAGESTREAMTYPES (PRESS (OPENSTREAM OPENPRSTREAM)
(FONTCREATE \CREATEPRESSFONT)
(CREATECHARSET \CREATECHARSET.PRESS)
(FONTSAVAILABLE \SEARCHPRESSFONTS)))
(FONTCREATE \CREATEPRESSFONT)
(CREATECHARSET \CREATECHARSET.PRESS)
(FONTSAVAILABLE \SEARCHPRESSFONTS)))
(ADDTOVAR PRINTERTYPES
((PRESS SPRUCE PENGUIN DOVER)
(CANPRINT (PRESS))
(STATUS PUP.PRINTER.STATUS)
(PROPERTIES PUP.PRINTER.PROPERTIES)
(SEND EFTP)
(BITMAPSCALE NIL)
(BITMAPFILE (PRESSBITMAP FILE BITMAP SCALEFACTOR REGION ROTATION TITLE)))
((FULLPRESS RAVEN)
(ADDTOVAR PRINTERTYPES ((PRESS SPRUCE PENGUIN DOVER)
(CANPRINT (PRESS))
(STATUS PUP.PRINTER.STATUS)
(PROPERTIES PUP.PRINTER.PROPERTIES)
(SEND EFTP)
(BITMAPSCALE NIL)
(BITMAPFILE (PRESSBITMAP FILE BITMAP SCALEFACTOR REGION ROTATION TITLE)))
((FULLPRESS RAVEN)
(* ;
 "same as PRESS but can scale bitmaps")
(CANPRINT (PRESS))
(STATUS TRUE)
(PROPERTIES NILL)
(SEND EFTP)
(BITMAPSCALE PRESS.BITMAPSCALE)
(BITMAPFILE (FULLPRESSBITMAP FILE BITMAP SCALEFACTOR REGION ROTATION TITLE))))
 "same as PRESS but can scale bitmaps")
(CANPRINT (PRESS))
(STATUS TRUE)
(PROPERTIES NILL)
(SEND EFTP)
(BITMAPSCALE PRESS.BITMAPSCALE)
(BITMAPFILE (FULLPRESSBITMAP FILE BITMAP SCALEFACTOR REGION ROTATION TITLE))))
(ADDTOVAR PRINTFILETYPES
[PRESS (TEST PRESSFILEP)
(EXTENSION (PRESS))
(CONVERSION (TEXT MAKEPRESS TEDIT (LAMBDA (FILE PFILE FONTS HEADING)
(SETQ FILE (OPENTEXTSTREAM FILE))
(TEDIT.FORMAT.HARDCOPY FILE PFILE T NIL NIL
NIL 'PRESS)
(CLOSEF? FILE)
PFILE])
(ADDTOVAR PRINTFILETYPES [PRESS (TEST PRESSFILEP)
(EXTENSION (PRESS))
(CONVERSION (TEXT MAKEPRESS TEDIT
(LAMBDA (FILE PFILE FONTS HEADING)
(SETQ FILE (OPENTEXTSTREAM FILE))
(TEDIT.FORMAT.HARDCOPY FILE PFILE T NIL NIL
NIL 'PRESS)
(CLOSEF? FILE)
PFILE])
(PUTPROPS PRESS COPYRIGHT ("Venue & Xerox Corporation" 3675Q 3676Q 3677Q 3700Q 3701Q 3702Q 3703Q 3706Q
3711Q 3745Q))
(DECLARE%: DONTCOPY
(FILEMAP (NIL (16032Q 73011Q (\SEARCHPRESSFONTS 16044Q . 20001Q) (\GETPRESSFONTNAMES 20003Q . 26641Q)
(\PRESSFAMILYCODELST 26643Q . 30565Q) (\DECODEPRESSFACEBYTE 30567Q . 33356Q) (\CREATEPRESSFONT 33360Q
. 35625Q) (\CREATECHARSET.PRESS 35627Q . 73007Q)) (73446Q 130434Q (PRESSBITMAP 73460Q . 103062Q) (
FULLPRESSBITMAP 103064Q . 111076Q) (SHOWREGION 111100Q . 112442Q) (SHOWPRESSBITMAPREGION 112444Q .
113106Q) (PRESSWINDOW 113110Q . 117247Q) (WINDOW.BITMAP 117251Q . 120432Q) (\WRITEPRESSBITMAP 120434Q
. 130432Q)) (130532Q 160405Q (\BCPLSOUT.PRESS 130544Q . 131521Q) (\PAGEPAD.PRESS 131523Q . 132760Q) (
\ENTITYEND.PRESS 132762Q . 140256Q) (\PARTEND.PRESS 140260Q . 142645Q) (\ENTITYSTART.PRESS 142647Q .
146260Q) (SETX.PRESS 146262Q . 150115Q) (SETXY.PRESS 150117Q . 153121Q) (SETY.PRESS 153123Q . 154523Q)
(SHOW.PRESS 154525Q . 160403Q)) (160467Q 275304Q (OPENPRSTREAM 160501Q . 165630Q) (\BITBLT.PRESS
165632Q . 170244Q) (\BLTSHADE.PRESS 170246Q . 171701Q) (\SCALEDBITBLT.PRESS 171703Q . 174327Q) (
\BITMAPSIZE.PRESS 174331Q . 175271Q) (\CHARWIDTH.PRESS 175273Q . 177342Q) (\CLOSEF.PRESS 177344Q .
207333Q) (\DRAWLINE.PRESS 207335Q . 210673Q) (\ENDPAGE.PRESS 210675Q . 212145Q) (NEWLINE.PRESS 212147Q
. 213560Q) (NEWPAGE.PRESS 213562Q . 214054Q) (SETUPFONTS.PRESS 214056Q . 217607Q) (\DEFINEFONT.PRESS
217611Q . 221733Q) (\DSPBOTTOMMARGIN.PRESS 221735Q . 222531Q) (\DSPCLIPPINGREGION.PRESS 222533Q .
224125Q) (\DSPFONT.PRESS 224127Q . 231121Q) (\DSPLEFTMARGIN.PRESS 231123Q . 232003Q) (
\DSPLINEFEED.PRESS 232005Q . 233315Q) (\DSPRIGHTMARGIN.PRESS 233317Q . 234202Q) (\DSPSPACEFACTOR.PRESS
234204Q . 235610Q) (\DSPTOPMARGIN.PRESS 235612Q . 236375Q) (\DSPXPOSITION.PRESS 236377Q . 237115Q) (
\DSPYPOSITION.PRESS 237117Q . 237635Q) (\FIXLINELENGTH.PRESS 237637Q . 241734Q) (\OUTCHARFN.PRESS
241736Q . 250772Q) (\SETSPACE.PRESS 250774Q . 252270Q) (\STARTPAGE.PRESS 252272Q . 256633Q) (
\STRINGWIDTH.PRESS 256635Q . 272213Q) (SHOWRECTANGLE.PRESS 272215Q . 272736Q) (
\PRESS.CONVERT.NSCHARACTER 272740Q . 275302Q)) (275344Q 406406Q (\ENDVECRUN 275356Q . 305174Q) (
\VECENCODE 305176Q . 306225Q) (\VECPUT 306227Q . 315655Q) (\VECSKIP 315657Q . 316412Q) (\VECFONTINIT
316414Q . 323537Q) (\DRAWCIRCLE.PRESS 323541Q . 326044Q) (\DRAWARC.PRESS 326046Q . 326637Q) (
\DRAWCURVE.PRESS 326641Q . 334577Q) (\DRAWCURVE.PRESS.LINE 334601Q . 343446Q) (\DRAWELLIPSE.PRESS
343450Q . 347227Q) (\GETBRUSHFONT.PRESS 347231Q . 351133Q) (\PRESSCURVE2 351135Q . 406404Q)) (412244Q
417070Q (\PRESSINIT 412256Q . 417066Q)) (446754Q 452043Q (MAKEPRESS 446766Q . 447272Q) (PRESSFILEP
447274Q . 451051Q) (PRESS.BITMAPSCALE 451053Q . 452041Q)))))
(FILEMAP (NIL (15752Q 72731Q (\SEARCHPRESSFONTS 15764Q . 17721Q) (\GETPRESSFONTNAMES 17723Q . 26561Q)
(\PRESSFAMILYCODELST 26563Q . 30505Q) (\DECODEPRESSFACEBYTE 30507Q . 33276Q) (\CREATEPRESSFONT 33300Q
. 35545Q) (\CREATECHARSET.PRESS 35547Q . 72727Q)) (73366Q 127171Q (PRESSBITMAP 73400Q . 103002Q) (
FULLPRESSBITMAP 103004Q . 111016Q) (SHOWREGION 111020Q . 112362Q) (SHOWPRESSBITMAPREGION 112364Q .
113026Q) (PRESSWINDOW 113030Q . 117167Q) (\WRITEPRESSBITMAP 117171Q . 127167Q)) (127267Q 157142Q (
\BCPLSOUT.PRESS 127301Q . 130256Q) (\PAGEPAD.PRESS 130260Q . 131515Q) (\ENTITYEND.PRESS 131517Q .
137013Q) (\PARTEND.PRESS 137015Q . 141402Q) (\ENTITYSTART.PRESS 141404Q . 145015Q) (SETX.PRESS 145017Q
. 146652Q) (SETXY.PRESS 146654Q . 151656Q) (SETY.PRESS 151660Q . 153260Q) (SHOW.PRESS 153262Q .
157140Q)) (157224Q 274041Q (OPENPRSTREAM 157236Q . 164365Q) (\BITBLT.PRESS 164367Q . 167001Q) (
\BLTSHADE.PRESS 167003Q . 170436Q) (\SCALEDBITBLT.PRESS 170440Q . 173064Q) (\BITMAPSIZE.PRESS 173066Q
. 174026Q) (\CHARWIDTH.PRESS 174030Q . 176077Q) (\CLOSEF.PRESS 176101Q . 206070Q) (\DRAWLINE.PRESS
206072Q . 207430Q) (\ENDPAGE.PRESS 207432Q . 210702Q) (NEWLINE.PRESS 210704Q . 212315Q) (NEWPAGE.PRESS
212317Q . 212611Q) (SETUPFONTS.PRESS 212613Q . 216344Q) (\DEFINEFONT.PRESS 216346Q . 220470Q) (
\DSPBOTTOMMARGIN.PRESS 220472Q . 221266Q) (\DSPCLIPPINGREGION.PRESS 221270Q . 222662Q) (\DSPFONT.PRESS
222664Q . 227656Q) (\DSPLEFTMARGIN.PRESS 227660Q . 230540Q) (\DSPLINEFEED.PRESS 230542Q . 232052Q) (
\DSPRIGHTMARGIN.PRESS 232054Q . 232737Q) (\DSPSPACEFACTOR.PRESS 232741Q . 234345Q) (
\DSPTOPMARGIN.PRESS 234347Q . 235132Q) (\DSPXPOSITION.PRESS 235134Q . 235652Q) (\DSPYPOSITION.PRESS
235654Q . 236372Q) (\FIXLINELENGTH.PRESS 236374Q . 240471Q) (\OUTCHARFN.PRESS 240473Q . 247527Q) (
\SETSPACE.PRESS 247531Q . 251025Q) (\STARTPAGE.PRESS 251027Q . 255370Q) (\STRINGWIDTH.PRESS 255372Q .
270750Q) (SHOWRECTANGLE.PRESS 270752Q . 271473Q) (\PRESS.CONVERT.NSCHARACTER 271475Q . 274037Q)) (
274101Q 405143Q (\ENDVECRUN 274113Q . 303731Q) (\VECENCODE 303733Q . 304762Q) (\VECPUT 304764Q .
314412Q) (\VECSKIP 314414Q . 315147Q) (\VECFONTINIT 315151Q . 322274Q) (\DRAWCIRCLE.PRESS 322276Q .
324601Q) (\DRAWARC.PRESS 324603Q . 325374Q) (\DRAWCURVE.PRESS 325376Q . 333334Q) (
\DRAWCURVE.PRESS.LINE 333336Q . 342203Q) (\DRAWELLIPSE.PRESS 342205Q . 345764Q) (\GETBRUSHFONT.PRESS
345766Q . 347670Q) (\PRESSCURVE2 347672Q . 405141Q)) (410775Q 415621Q (\PRESSINIT 411007Q . 415617Q))
(443570Q 446657Q (MAKEPRESS 443602Q . 444106Q) (PRESSFILEP 444110Q . 445665Q) (PRESS.BITMAPSCALE
445667Q . 446655Q)))))
STOP

Binary file not shown.

View File

@@ -1,11 +1,10 @@
(DEFINE-FILE-INFO PACKAGE "INTERLISP" READTABLE "INTERLISP" BASE 10)
(FILECREATED "25-Apr-2022 09:23:16" {DSK}<Users>kaplan>Local>medley3.5>my-medley>library>SAMEDIR.;3 5583
(FILECREATED "31-Oct-2022 13:09:14" {WMEDLEY}<library>SAMEDIR.;4 6221
:CHANGES-TO (FNS HOST&DIRECTORYFIELD CHECKSAMEDIR)
:CHANGES-TO (FNS CHECKSAMEDIR HOST&DIRECTORYFIELD)
:PREVIOUS-DATE " 1-Sep-2020 11:40:26"
{DSK}<Users>kaplan>Local>medley3.5>my-medley>library>SAMEDIR.;1)
:PREVIOUS-DATE "25-Apr-2022 09:23:16" {WMEDLEY}<library>SAMEDIR.;3)
(* ; "
@@ -25,7 +24,8 @@ Copyright (c) 1982, 1984-1987, 1990, 2018, 2020 by Venue & Xerox Corporation.
(DEFINEQ
(CHECKSAMEDIR
[LAMBDA (FILE) (* ; "Edited 25-Apr-2022 09:16 by rmk")
[LAMBDA (FILE) (* ; "Edited 31-Oct-2022 13:08 by rmk")
(* ; "Edited 25-Apr-2022 09:16 by rmk")
(* ; "Edited 1-Sep-2020 11:40 by rmk:")
(* ;; "Check (a) that we are writing FILE to the same directory we last read/wrote it and (b) that a version newer than the current one has not since appeared.")
@@ -44,11 +44,19 @@ Copyright (c) 1982, 1984-1987, 1990, 2018, 2020 by Venue & Xerox Corporation.
(RETURN)) (* ;
 "RMK: Use HOST&DIRECTORYFIELD to canonicalize both file and connected directory")
[SETQ OKHOST/DIRS (CONS (SETQ HOST/DIR (HOST&DIRECTORYFIELD (DIRECTORYNAME T)))
(MKLIST (CDR (ASSOC HOST/DIR MIGRATIONS :TEST 'STRING-EQUAL]
(MKLIST (CDR (OR (ASSOC HOST/DIR MIGRATIONS :TEST 'STRING-EQUAL)
(ASSOC (TRUEFILENAME HOST/DIR)
MIGRATIONS :TEST 'STRING-EQUAL)
(ASSOC (PSEUDOFILENAME HOST/DIR)
MIGRATIONS :TEST 'STRING-EQUAL]
(COND
((for OLDFILE in DATES bind HOST DIR never (CL:MEMBER (HOST&DIRECTORYFIELD (CDR OLDFILE)
)
OKHOST/DIRS :TEST 'STRING-EQUAL))
([for OLDFILE in DATES bind HOST DIR
never (OR (CL:MEMBER (HOST&DIRECTORYFIELD (CDR OLDFILE))
OKHOST/DIRS :TEST 'STRING-EQUAL)
(CL:MEMBER (TRUEFILENAME (HOST&DIRECTORYFIELD (CDR OLDFILE)))
OKHOST/DIRS :TEST 'STRING-EQUAL)
(CL:MEMBER (PSEUDOFILENAME (HOST&DIRECTORYFIELD (CDR OLDFILE)))
OKHOST/DIRS :TEST 'STRING-EQUAL]
(* ;; "The file is going somewhere it has never been before. ")
@@ -90,11 +98,9 @@ Copyright (c) 1982, 1984-1987, 1990, 2018, 2020 by Venue & Xerox Corporation.
(SHOULDNT])
(HOST&DIRECTORYFIELD
[LAMBDA (FILENAME) (* ; "Edited 25-Apr-2022 09:22 by rmk")
[LAMBDA (FILENAME) (* ; "Edited 31-Oct-2022 13:03 by rmk")
(* ; "Edited 25-Apr-2022 09:22 by rmk")
(* ; "Edited 15-Apr-2018 19:05 by rmk:")
(* ;; "Returns the host&dir fields packed together. HOST and device are upper cased")
(PACKFILENAME.STRING 'DEVICE (U-CASE (FILENAMEFIELD.STRING FILENAME 'DEVICE))
'HOST
(U-CASE (FILENAMEFIELD.STRING FILENAME 'HOST))
@@ -116,5 +122,5 @@ Copyright (c) 1982, 1984-1987, 1990, 2018, 2020 by Venue & Xerox Corporation.
)
(PUTPROPS SAMEDIR COPYRIGHT ("Venue & Xerox Corporation" 1982 1984 1985 1986 1987 1990 2018 2020))
(DECLARE%: DONTCOPY
(FILEMAP (NIL (802 5200 (CHECKSAMEDIR 812 . 4623) (HOST&DIRECTORYFIELD 4625 . 5198)))))
(FILEMAP (NIL (731 5838 (CHECKSAMEDIR 741 . 5249) (HOST&DIRECTORYFIELD 5251 . 5836)))))
STOP

Binary file not shown.

View File

@@ -1,16 +1,14 @@
(DEFINE-FILE-INFO PACKAGE "INTERLISP" READTABLE "INTERLISP" BASE 10)
(FILECREATED "25-Jun-2022 18:22:01" {DSK}<home>larry>medley>library>SYSEDIT.;2 1373
(FILECREATED "17-Apr-2023 14:19:03" {DSK}<home>larry>il>medley>library>SYSEDIT.;2 1238
:EDIT-BY "lmm"
:CHANGES-TO (VARS SYSEDITCOMS)
:PREVIOUS-DATE "28-Sep-2021 10:16:44" {DSK}<home>larry>medley>library>SYSEDIT.;1)
:PREVIOUS-DATE "25-Jun-2022 18:22:01" {DSK}<home>larry>il>medley>library>SYSEDIT.;1)
(* ; "
Copyright (c) 1984, 1987, 1990, 2021 by Venue & Xerox Corporation.
")
(PRETTYCOMPRINT SYSEDITCOMS)
(RPAQQ SYSEDITCOMS
@@ -22,7 +20,7 @@ Copyright (c) 1984, 1987, 1990, 2021 by Venue & Xerox Corporation.
(CLISPIFTRANFLG T)
(CROSSCOMPILING 'ASK)
(*REPLACE-OLD-EDIT-DATES* NIL)
(COPYRIGHTFLG 'PRESERVE))
(COPYRIGHTFLG 'NEVER))
(P (RESETVARS ((CROSSCOMPILING T))
(FILESLOAD (SOURCE)
EXPORTS.ALL])
@@ -43,12 +41,11 @@ Copyright (c) 1984, 1987, 1990, 2021 by Venue & Xerox Corporation.
(RPAQQ *REPLACE-OLD-EDIT-DATES* NIL)
(RPAQQ COPYRIGHTFLG PRESERVE)
(RPAQQ COPYRIGHTFLG NEVER)
(RESETVARS ((CROSSCOMPILING T))
(FILESLOAD (SOURCE)
EXPORTS.ALL))
(PUTPROPS SYSEDIT COPYRIGHT ("Venue & Xerox Corporation" 1984 1987 1990 2021))
(DECLARE%: DONTCOPY
(FILEMAP (NIL)))
STOP

View File

@@ -1,11 +1,11 @@
(DEFINE-FILE-INFO PACKAGE "INTERLISP" READTABLE "INTERLISP" BASE 10)
(FILECREATED " 8-Oct-2022 16:06:36" {DSK}<cygdrive>c>Users>Larry>home>medley>library>UNIXCOMM.;2 20352
(FILECREATED "18-Dec-2022 11:55:01" {WMEDLEY}<library>UNIXCOMM.;11 14599
:CHANGES-TO (FNS CREATE-PROCESS-STREAM)
:CHANGES-TO (FNS INITIALIZE-SHELL-DEVICE UNIX-BACKFILEPTR UNIX-STREAM-EOFP)
(VARS UNIXCOMMCOMS)
:PREVIOUS-DATE " 7-Jul-2022 10:42:46"
{DSK}<cygdrive>c>Users>Larry>home>medley>library>UNIXCOMM.;1)
:PREVIOUS-DATE "25-Oct-2022 21:56:00" {WMEDLEY}<library>UNIXCOMM.;9)
(* ; "
@@ -25,10 +25,10 @@ Copyright (c) 1988-1990, 2018, 2022 by Venue & Xerox Corporation.
(FNS FORK-SHELL FORK-UNIX UNIX-KILL UNIX-WRITE CREATE-SHELL-STREAM
CREATE-PROCESS-STREAM UNIXCOMM-AROUNDEXITFN))
[COMS (* ; "Operations on the shell device")
(FNS INITIALIZE-NEW-SHELL-DEVICE UNIX-GET-NEXT-BUFFER UNIX-BACKFILEPTR-NEW
UNIX-STREAM-EOFP-NEW UNIX-STREAM-OUT UNIX-STREAM-CLOSE)
(GLOBALVARS *NEW-SHELL-DEVICE*)
(DECLARE%: DONTEVAL@LOAD DOCOPY (P (INITIALIZE-NEW-SHELL-DEVICE))
(FNS INITIALIZE-SHELL-DEVICE UNIX-GET-NEXT-BUFFER UNIX-BACKFILEPTR UNIX-STREAM-EOFP
UNIX-STREAM-OUT UNIX-STREAM-CLOSE)
(GLOBALVARS *SHELL-DEVICE*)
(DECLARE%: DONTEVAL@LOAD DOCOPY (P (INITIALIZE-SHELL-DEVICE))
(ADDVARS (AROUNDEXITFNS UNIXCOMM-AROUNDEXITFN]
(COMS (* ;
 "Stuff for direct manipulation of Unix sockets")
@@ -36,14 +36,6 @@ Copyright (c) 1988-1990, 2018, 2022 by Venue & Xerox Corporation.
(DECLARE%: EVAL@COMPILE DONTCOPY (MACROS UNIX-CHANNEL)
(P (CHECKIMPORTS '(FILEIO LLSUBRS)
T)))
[COMS
(* ;; "Obsolete stuff. This is for pre-Medley1.2, where there wasn't support for buffered input on the shell device")
(FNS UNIX-BACKFILEPTR UNIX-READ INITIALIZE-SHELL-DEVICE UNIX-STREAM-IN UNIX-STREAM-EOFP
UNIX-STREAM-PEEK)
(GLOBALVARS *SHELL-DEVICE*)
(DECLARE%: EVAL@COMPILE DONTCOPY (MACROS UNIX-PEEKEDCHAR UNIX-LASTCHAR))
(DECLARE%: DONTEVAL@LOAD DOCOPY (P (INITIALIZE-SHELL-DEVICE]
(PROP FILETYPE UNIXCOMM)))
@@ -107,24 +99,17 @@ Copyright (c) 1988-1990, 2018, 2022 by Venue & Xerox Corporation.
(RETURN LENGTH-WRITTEN])
(CREATE-SHELL-STREAM
[LAMBDA (TERMTYPE COMMAND) (* ; "Edited 21-May-90 15:39 by jrb:")
(LET ((CHAN (FORK-SHELL TERMTYPE COMMAND))
(SHELL-DEV (if (SUBRCALL UNIX-HANDLECOMM 8)
then (* ;
 "SUBRCALL tests that this is supported")
*NEW-SHELL-DEVICE*
else *SHELL-DEVICE*)))
[LAMBDA (TERMTYPE COMMAND) (* ; "Edited 11-Oct-2022 09:56 by lmm")
(* ; "Edited 21-May-90 15:39 by jrb:")
(LET ((CHAN (FORK-SHELL TERMTYPE COMMAND)))
(COND
(CHAN (LET ((STR (create STREAM
ACCESS _ 'BOTH
DEVICE _ SHELL-DEV)))
DEVICE _ *SHELL-DEVICE*)))
(CL:SETF (UNIX-CHANNEL STR)
CHAN)
(* ;; "JRB - In a future release, make *SHELL-DEVICE* below SHELL-DEV, or just remove *SHELL-DEVICE* altogether. Must also hack UNIX-STREAM-CLOSE and the aroundexitfn for Unix streams.")
(push (fetch (FDEV OPENFILELST) of *SHELL-DEVICE*)
STR)
STR)
(STREAMPROP STR 'SENDSCREENPARAMS (FUNCTION UNIX.SENDSCREENPARAMS))
(STREAMPROP STR 'SETDISPLAYTYPE (FUNCTION UNIX.SETDISPLAYTYPE))
STR])
@@ -132,49 +117,38 @@ Copyright (c) 1988-1990, 2018, 2022 by Venue & Xerox Corporation.
(CREATE-PROCESS-STREAM
[LAMBDA (COMM)
(* ;; "Edited 11-Oct-2022 10:05 by lmm")
(* ;; "Edited 8-Oct-2022 16:04 by lmm")
(* ;; "Edited 3-Jul-2022 16:04 by rmk: Removed external format here, the device has the environmental defaultg")
(* ;; "Edited 26-Jun-2022 13:52 by larry")
(* ;; "Edited 26-Jun-2022 13:31 by lmm - set external format of shell stream to utf-8 ??")
(* ;; "Edited 21-May-90 15:39 by jrb:")
(LET* ((SHELL-DEV (if (AND (BOUNDP '*NEW-SHELL-DEVICE*)
(SUBRCALL UNIX-HANDLECOMM 8))
then (* ;
 "SUBRCALL tests that this is supported")
*NEW-SHELL-DEVICE*
else *SHELL-DEVICE*))
(STR (create STREAM
ACCESS _ 'BOTH
DEVICE _ SHELL-DEV
EOLCONVENTION _ LF.EOLC))
(CHAN (FORK-UNIX COMM)))
(if CHAN
then (CL:SETF (UNIX-CHANNEL STR)
CHAN)
(* ;; "JRB - In a future release, make *SHELL-DEVICE* below SHELL-DEV, or just remove *SHELL-DEVICE* altogether. Must also hack UNIX-STREAM-CLOSE and the aroundexitfn for Unix streams.")
(push (fetch (FDEV OPENFILELST) of *SHELL-DEVICE*)
STR)
STR
else NIL])
(LET ((CHAN (FORK-UNIX COMM)))
(if CHAN
then (LET ((STR (create STREAM
ACCESS _ 'BOTH
DEVICE _ *SHELL-DEVICE*
EOLCONVENTION _ LF.EOLC)))
(CL:SETF (UNIX-CHANNEL STR)
CHAN)
(push (fetch (FDEV OPENFILELST) of *SHELL-DEVICE*)
STR)
STR])
(UNIXCOMM-AROUNDEXITFN
[LAMBDA (EVENT) (* ; "Edited 2-Jul-90 16:35 by jrb:")
[LAMBDA (EVENT) (* ; "Edited 25-Oct-2022 21:20 by lmm")
(* ; "Edited 11-Oct-2022 10:07 by lmm")
(* ; "Edited 2-Jul-90 16:35 by jrb:")
(CASE EVENT
((AFTERLOGOUT AFTERMAKESYS AFTERSAVEVM AFTERSYSOUT) (for STREAM
in (fetch (FDEV OPENFILELST)
of *SHELL-DEVICE*)
do (CLOSEF STREAM)))
((AFTERLOGOUT AFTERMAKESYS AFTERSAVEVM AFTERSYSOUT)
(for STREAM in (fetch (FDEV OPENFILELST) of *SHELL-DEVICE*) do (CLOSEF STREAM))
(REPLACE (FDEV DEFAULTEXTERNALFORMAT) OF *SHELL-DEVICE* WITH (SYSTEM-EXTERNALFORMAT)))
((BEFORELOGOUT BEFOREMAKESYS BEFORESYSOUT)
(* ;;
 "Make sure any Unix sockets get closed here, so their file system handles get closed as well")
(* ;;
 "Make sure any Unix sockets get closed here, so their file system handles get closed as well")
(for STREAM in (fetch (FDEV OPENFILELST) of *SHELL-DEVICE*)
when (EQ -3 (SUBRCALL UNIX-HANDLECOMM 14 (UNIX-CHANNEL STREAM)))
@@ -187,25 +161,27 @@ Copyright (c) 1988-1990, 2018, 2022 by Venue & Xerox Corporation.
(DEFINEQ
(INITIALIZE-NEW-SHELL-DEVICE
[LAMBDA NIL (* ; "Edited 7-Jul-2022 10:41 by rmk")
(* ; "Edited 3-Jul-2022 16:04 by rmk")
(* ; "Edited 12-Feb-90 17:00 by bvm")
(SETQ *NEW-SHELL-DEVICE* (create FDEV
FDBINABLE _ T
NODIRECTORIES _ T
DEVICENAME _ (FUNCTION UNIX-PTY-NEW)
BIN _ (FUNCTION \BUFFERED.BIN)
BOUT _ (FUNCTION UNIX-STREAM-OUT)
PEEKBIN _ (FUNCTION \BUFFERED.PEEKBIN)
CLOSEFILE _ (FUNCTION UNIX-STREAM-CLOSE)
GETFILEINFO _ (FUNCTION NILL)
SETFILEINFO _ (FUNCTION NILL)
EOFP _ (FUNCTION UNIX-STREAM-EOFP-NEW)
BACKFILEPTR _ (FUNCTION UNIX-BACKFILEPTR-NEW)
GETNEXTBUFFER _ (FUNCTION UNIX-GET-NEXT-BUFFER)
BLOCKIN _ (FUNCTION \BUFFERED.BINS)
DEFAULTEXTERNALFORMAT _ (SYSTEM-EXTERNALFORMAT])
(INITIALIZE-SHELL-DEVICE
[LAMBDA NIL (* ; "Edited 18-Dec-2022 11:53 by rmk")
(* ; "Edited 25-Oct-2022 21:54 by lmm")
(* ;; "only using for holding open list")
 (* ; "Edited 3-Jul-2022 16:15 by rmk")
(* ; "Edited 14-Dec-88 10:45 by bane")
(SETQ *SHELL-DEVICE* (create FDEV
NODIRECTORIES _ T
DEVICENAME _ 'UNIX-PTY
BIN _ (FUNCTION \BUFFERED.BIN)
BOUT _ (FUNCTION UNIX-STREAM-OUT)
PEEKBIN _ (FUNCTION \BUFFERED.PEEKBIN)
CLOSEFILE _ (FUNCTION UNIX-STREAM-CLOSE)
GETFILEINFO _ (FUNCTION NILL)
SETFILEINFO _ (FUNCTION NILL)
EOFP _ (FUNCTION UNIX-STREAM-EOFP)
BACKFILEPTR _ (FUNCTION UNIX-BACKFILEPTR)
GETNEXTBUFFER _ (FUNCTION UNIX-GET-NEXT-BUFFER)
BLOCKIN _ (FUNCTION \BUFFERED.BINS)
DEFAULTEXTERNALFORMAT _ (SYSTEM-EXTERNALFORMAT])
(UNIX-GET-NEXT-BUFFER
[LAMBDA (STREAM WHATFOR NOERRORFLG) (* ;
@@ -240,22 +216,20 @@ Copyright (c) 1988-1990, 2018, 2022 by Venue & Xerox Corporation.
(\EOF.ACTION STREAM])
(T (SHOULDNT)))])
(UNIX-BACKFILEPTR-NEW
[LAMBDA (STREAM) (* ;
 "Edited 13-Jun-90 01:07 by mitani")
(UNIX-BACKFILEPTR
[LAMBDA (STREAM) (* ; "Edited 13-Jun-90 01:07 by mitani")
(COND
((AND (fetch (STREAM CBUFPTR) of STREAM)
(> (fetch (STREAM COFFSET) of STREAM)
0))
(add (fetch (STREAM COFFSET) of STREAM)
-1))
-1))
(T (ERROR "Can't back up this unix Stream" STREAM])
(UNIX-STREAM-EOFP-NEW
[LAMBDA (STREAM) (* ;
 "Edited 13-Jun-90 01:07 by mitani")
(UNIX-STREAM-EOFP
[LAMBDA (STREAM) (* ; "Edited 13-Jun-90 01:07 by mitani")
(* ;;; "true if bsp STREAM is at end of file, i.e. is at a mark")
(* ;;; "true if bsp STREAM is at end of file, i.e. is at a mark")
(COND
((AND (ffetch (STREAM CBUFPTR) of (\DTEST STREAM 'STREAM))
@@ -280,11 +254,11 @@ Copyright (c) 1988-1990, 2018, 2022 by Venue & Xerox Corporation.
)
(DECLARE%: DOEVAL@COMPILE DONTCOPY
(GLOBALVARS *NEW-SHELL-DEVICE*)
(GLOBALVARS *SHELL-DEVICE*)
)
(DECLARE%: DONTEVAL@LOAD DOCOPY
(INITIALIZE-NEW-SHELL-DEVICE)
(INITIALIZE-SHELL-DEVICE)
(ADDTOVAR AROUNDEXITFNS UNIXCOMM-AROUNDEXITFN)
@@ -297,25 +271,23 @@ Copyright (c) 1988-1990, 2018, 2022 by Venue & Xerox Corporation.
(DEFINEQ
(CREATE-UNIX-SOCKET-STREAM
[LAMBDA (PATHNAME) (* ; "Edited 29-May-90 16:23 by jrb:")
(LET [(STR (create STREAM
ACCESS _ 'BOTH
DEVICE _ *NEW-SHELL-DEVICE*
EOLCONVENTION _ LF.EOLC))
(CHAN (SUBRCALL UNIX-HANDLECOMM 12 (\DTEST PATHNAME 'ONED-ARRAY]
[LAMBDA (PATHNAME) (* ; "Edited 11-Oct-2022 10:11 by lmm")
(* ; "Edited 29-May-90 16:23 by jrb:")
(LET [(CHAN (SUBRCALL UNIX-HANDLECOMM 12 (\DTEST PATHNAME 'ONED-ARRAY]
(if CHAN
then (CL:SETF (UNIX-CHANNEL STR)
CHAN)
(* ;; "JRB - In a future release, make *SHELL-DEVICE* below SHELL-DEV, or just remove *SHELL-DEVICE* altogether. Must also hack UNIX-STREAM-CLOSE and the aroundexitfn for Unix streams.")
(push (fetch (FDEV OPENFILELST) of *SHELL-DEVICE*)
STR)
STR
else NIL])
then (LET ((STR (create STREAM
ACCESS _ 'BOTH
DEVICE _ *SHELL-DEVICE*
EOLCONVENTION _ LF.EOLC)))
(CL:SETF (UNIX-CHANNEL STR)
CHAN)
(push (fetch (FDEV OPENFILELST) of *SHELL-DEVICE*)
STR)
STR])
(ACCEPT-UNIX-SOCKET-STREAM
[LAMBDA (SOCKSTREAM) (* ; "Edited 29-May-90 16:31 by jrb:")
[LAMBDA (SOCKSTREAM) (* ; "Edited 11-Oct-2022 10:12 by lmm")
(* ; "Edited 29-May-90 16:31 by jrb:")
(LET ((CHAN (UNIX-CHANNEL SOCKSTREAM))
NEWCHAN)
(SELECTQ (SETQ NEWCHAN (SUBRCALL UNIX-HANDLECOMM 13 CHAN))
@@ -323,15 +295,12 @@ Copyright (c) 1988-1990, 2018, 2022 by Venue & Xerox Corporation.
NEWCHAN)
(LET ((NEWSTREAM (create STREAM
ACCESS _ 'BOTH
DEVICE _ *NEW-SHELL-DEVICE*
DEVICE _ *SHELL-DEVICE*
EOLCONVENTION _ LF.EOLC)))
(CL:SETF (UNIX-CHANNEL NEWSTREAM)
NEWCHAN)
(* ;; "JRB - In a future release, make *SHELL-DEVICE* below SHELL-DEV, or just remove *SHELL-DEVICE* altogether. Must also hack UNIX-STREAM-CLOSE and the aroundexitfn for Unix streams.")
(push (fetch (FDEV OPENFILELST) of *SHELL-DEVICE*)
NEWSTREAM)
NEWSTREAM)
NEWSTREAM])
)
(DECLARE%: EVAL@COMPILE DONTCOPY
@@ -346,122 +315,13 @@ Copyright (c) 1988-1990, 2018, 2022 by Venue & Xerox Corporation.
T)
)
(* ;;
"Obsolete stuff. This is for pre-Medley1.2, where there wasn't support for buffered input on the shell device"
)
(DEFINEQ
(UNIX-BACKFILEPTR
[LAMBDA (STREAM) (* ; "Edited 14-Dec-88 09:52 by bane")
(* ;; "The trick here is to use the existing mechanisms for UNIX-PEEKCHAR")
(COND
((UNIX-PEEKEDCHAR STREAM)
(ERROR "Can only back up one character" STREAM))
((NOT (UNIX-LASTCHAR STREAM))
(ERROR "Can't back up past beginning of stream" STREAM))
(T (CL:SETF (UNIX-PEEKEDCHAR STREAM)
(UNIX-LASTCHAR STREAM])
(UNIX-READ
[LAMBDA (STREAM NO-ERROR) (* ; "Edited 14-Dec-88 09:18 by bane")
(LET* [(CONN (UNIX-CHANNEL STREAM))
(CH (AND CONN (SUBRCALL UNIX-HANDLECOMM 2 (\DTEST CONN 'SMALLP)
0]
(COND
((EQ CH T)
NIL)
[(EQ CH NIL)
(COND
(NO-ERROR NIL)
(T (\EOF.ACTION STREAM]
(T (CL:SETF (UNIX-LASTCHAR STREAM)
CH])
(INITIALIZE-SHELL-DEVICE
[LAMBDA NIL (* ; "Edited 3-Jul-2022 16:15 by rmk")
(* ; "Edited 14-Dec-88 10:45 by bane")
(SETQ *SHELL-DEVICE* (create FDEV
NODIRECTORIES _ T
DEVICENAME _ 'UNIX-PTY
BIN _ 'UNIX-STREAM-IN
BOUT _ 'UNIX-STREAM-OUT
PEEKBIN _ 'UNIX-STREAM-PEEK
CLOSEFILE _ 'UNIX-STREAM-CLOSE
GETFILEINFO _ 'NILL
SETFILEINFO _ 'NILL
EOFP _ 'UNIX-STREAM-EOFP
BACKFILEPTR _ 'UNIX-BACKFILEPTR
DEFAULTEXTERNALFORMAT _ (AND (STRPOS ".UTF-8" (UNIX-GETENV "LANG"))
:UTF-8])
(UNIX-STREAM-IN
[LAMBDA (STREAM) (* ; "Edited 9-May-88 15:05 by ")
(LET (CH)
(if (SETQ CH (UNIX-PEEKEDCHAR STREAM))
then (CL:SETF (UNIX-PEEKEDCHAR STREAM)
NIL)
else (while (NOT (SETQ CH (UNIX-READ STREAM))) do (BLOCK)))
CH])
(UNIX-STREAM-EOFP
[LAMBDA (STREAM) (* ; "Edited 2-Apr-90 11:51 by jds")
(* ;; "EOFP method for unix-shell streams. Notices when there are chars yet to read and doesn't set EOFP.")
(AND (NOT (UNIX-PEEKEDCHAR STREAM))
(LET* [(CONN (UNIX-CHANNEL STREAM))
(CH (AND CONN (SUBRCALL UNIX-HANDLECOMM 2 (\DTEST CONN 'SMALLP)
0]
(COND
((EQ CH T)
NIL)
((EQ CH NIL)
T)
(T (CL:SETF (UNIX-PEEKEDCHAR STREAM)
CH)
(CL:SETF (UNIX-LASTCHAR STREAM)
CH)
NIL])
(UNIX-STREAM-PEEK
[LAMBDA (STREAM NO-ERROR) (* ; "Edited 24-Jun-88 15:07 by drc:")
(OR (UNIX-PEEKEDCHAR STREAM)
(CL:SETF (UNIX-PEEKEDCHAR STREAM)
(UNIX-READ STREAM NO-ERROR])
)
(DECLARE%: DOEVAL@COMPILE DONTCOPY
(GLOBALVARS *SHELL-DEVICE*)
)
(DECLARE%: EVAL@COMPILE DONTCOPY
(DECLARE%: EVAL@COMPILE
(PUTPROPS UNIX-PEEKEDCHAR MACRO ((STR)
(FETCH (STREAM F2) OF STR)))
(PUTPROPS UNIX-LASTCHAR MACRO ((STR)
(FETCH (STREAM F3) OF STR)))
)
)
(DECLARE%: DONTEVAL@LOAD DOCOPY
(INITIALIZE-SHELL-DEVICE)
)
(PUTPROPS UNIXCOMM FILETYPE FAKE-COMPILE-FILE)
(PUTPROPS UNIXCOMM FILETYPE COMPILE-FILE)
(PUTPROPS UNIXCOMM COPYRIGHT ("Venue & Xerox Corporation" 1988 1989 1990 2018 2022))
(DECLARE%: DONTCOPY
(FILEMAP (NIL (2467 8489 (FORK-SHELL 2477 . 3674) (FORK-UNIX 3676 . 3852) (UNIX-KILL 3854 . 4043) (
UNIX-WRITE 4045 . 4756) (CREATE-SHELL-STREAM 4758 . 6074) (CREATE-PROCESS-STREAM 6076 . 7586) (
UNIXCOMM-AROUNDEXITFN 7588 . 8487)) (8537 13831 (INITIALIZE-NEW-SHELL-DEVICE 8547 . 9946) (
UNIX-GET-NEXT-BUFFER 9948 . 12148) (UNIX-BACKFILEPTR-NEW 12150 . 12629) (UNIX-STREAM-EOFP-NEW 12631 .
13177) (UNIX-STREAM-OUT 13179 . 13435) (UNIX-STREAM-CLOSE 13437 . 13829)) (14087 15952 (
CREATE-UNIX-SOCKET-STREAM 14097 . 14958) (ACCEPT-UNIX-SOCKET-STREAM 14960 . 15950)) (16301 19761 (
UNIX-BACKFILEPTR 16311 . 16809) (UNIX-READ 16811 . 17333) (INITIALIZE-SHELL-DEVICE 17335 . 18355) (
UNIX-STREAM-IN 18357 . 18733) (UNIX-STREAM-EOFP 18735 . 19509) (UNIX-STREAM-PEEK 19511 . 19759)))))
(FILEMAP (NIL (1963 7028 (FORK-SHELL 1973 . 3170) (FORK-UNIX 3172 . 3348) (UNIX-KILL 3350 . 3539) (
UNIX-WRITE 3541 . 4252) (CREATE-SHELL-STREAM 4254 . 5138) (CREATE-PROCESS-STREAM 5140 . 5979) (
UNIXCOMM-AROUNDEXITFN 5981 . 7026)) (7076 12267 (INITIALIZE-SHELL-DEVICE 7086 . 8514) (
UNIX-GET-NEXT-BUFFER 8516 . 10716) (UNIX-BACKFILEPTR 10718 . 11130) (UNIX-STREAM-EOFP 11132 . 11613) (
UNIX-STREAM-OUT 11615 . 11871) (UNIX-STREAM-CLOSE 11873 . 12265)) (12515 14221 (
CREATE-UNIX-SOCKET-STREAM 12525 . 13331) (ACCEPT-UNIX-SOCKET-STREAM 13333 . 14219)))))
STOP

Binary file not shown.

View File

@@ -1,27 +1,27 @@
(DEFINE-FILE-INFO PACKAGE "INTERLISP" READTABLE "INTERLISP" BASE 10)
(FILECREATED " 4-May-2018 17:18:00" 
{DSK}<Users>kaplan>Local>medley3.5>lispcore>library>UNIXPRINT.;8 14600
changes to%: (FNS UnixPrintCommand)
(FILECREATED "20-Jan-2023 22:44:05" {DSK}<home>frank>il>medley>gmedley>library>UNIXPRINT.;4 13651
previous date%: "16-Apr-2018 17:25:15"
{DSK}<Users>kaplan>Local>medley3.5>lispcore>library>UNIXPRINT.;7)
:CHANGES-TO (VARS UNIXPRINTCOMS)
:PREVIOUS-DATE "18-Jan-2023 13:28:36" {DSK}<home>frank>il>medley>gmedley>library>UNIXPRINT.;3
)
(* ; "
Copyright (c) 1990, 1991, 1992, 1993, 1995, 1997, 1999, 2001, 2018 by Venue. All rights reserved.
Copyright (c) 1990-1993, 1995, 1997, 1999, 2001, 2018, 2023 by Venue.
")
(PRETTYCOMPRINT UNIXPRINTCOMS)
(RPAQQ UNIXPRINTCOMS
[(FNS InstallUnixPrinter UnixPrint UnixShellQuote UnixTempFile UnixPrintCommand)
(FUNCTIONS ShellCommand)
[(FILES UNIXUTILS)
(FNS InstallUnixPrinter UnixPrint UnixShellQuote UnixTempFile UnixPrintCommand)
(INITVARS (UnixPrinterName NIL)
(UNIXPRINTSWITCHES " -r -s "))
(P
(* ;;
 "(InstallUnixPrinter) commented out because POSTSCRIPT indirects according to platform")
(* ;;
 "(InstallUnixPrinter) commented out because POSTSCRIPT indirects according to platform")
(PRIN1 "Please feel free to edit UnixPrintCommand." PROMPTWINDOW))
(PROP FILETYPE UNIXPRINT)
@@ -31,27 +31,29 @@ Copyright (c) 1990, 1991, 1992, 1993, 1995, 1997, 1999, 2001, 2018 by Venue. Al
(DECLARE%: DONTEVAL@LOAD DOEVAL@COMPILE DONTCOPY COMPILERVARS (ADDVARS (NLAMA)
(NLAML)
(LAMA])
(FILESLOAD UNIXUTILS)
(DEFINEQ
(InstallUnixPrinter
[LAMBDA (PrinterTypes) (* ; "Edited 8-Feb-97 11:33 by rmk:")
[LAMBDA (PrinterTypes) (* ; "Edited 8-Feb-97 11:33 by rmk:")
(* ;; "Set up any printers in PrinterTypes (or just Postscript by default) so that they'll be printed using the unix LPR command.")
(* ;; "Set up any printers in PrinterTypes (or just Postscript by default) so that they'll be printed using the unix LPR command.")
(DECLARE (GLOBALVARS PRINTERTYPES))
(for type inside (OR PrinterTypes '(POSTSCRIPT))
do (for x in PRINTERTYPES when (EQMEMB type (CAR x))
do (LET ((PRINTERTYPE type))
(PUTASSOC 'SEND (LIST 'UnixPrint)
(CDR x])
do (LET ((PRINTERTYPE type))
(PUTASSOC 'SEND (LIST 'UnixPrint)
(CDR x])
(UnixPrint
[LAMBDA (HOST FILE PRINTOPTIONS) (* ; "Edited 7-Dec-2001 14:55 by rmk:")
(* ; "Edited 20-May-92 14:13 by nilsson")
[LAMBDA (HOST FILE PRINTOPTIONS) (* ; "Edited 7-Dec-2001 14:55 by rmk:")
(* ; "Edited 20-May-92 14:13 by nilsson")
(* ;; "Given a print FILE, use the Unix %"lpr%" command to spool it to a printer.")
(* ;; "Given a print FILE, use the Unix %"lpr%" command to spool it to a printer.")
(* ;; "The printer is named by HOST or UnixPrinterName, a Global variable.")
(* ;; "The printer is named by HOST or UnixPrinterName, a Global variable.")
[LET*
((PRINTER (OR HOST UnixPrinterName))
@@ -60,9 +62,9 @@ Copyright (c) 1990, 1991, 1992, 1993, 1995, 1997, 1999, 2001, 2018 by Venue. Al
(NSIDES (LISTGET PRINTOPTIONS '%#SIDES))
(TYPE (PRINTERTYPE PRINTER)))
(* ;; "Removed redundant check (we already know it's a PS printer), JDS 2/19/92:")
(* ;; "Removed redundant check (we already know it's a PS printer), JDS 2/19/92:")
(* ;; "(COND ((NULL TYPE) (ERROR (CONCAT %"Printertype unknown for %" PRINTER))) ((NOT (EQL (U-CASE TYPE) 'POSTSCRIPT)) (ERROR (CONCAT %"Printertype for %" PRINTER %" is not Postscript%"))))")
(* ;; "(COND ((NULL TYPE) (ERROR (CONCAT %"Printertype unknown for %" PRINTER))) ((NOT (EQL (U-CASE TYPE) 'POSTSCRIPT)) (ERROR (CONCAT %"Printertype for %" PRINTER %" is not Postscript%"))))")
[COND
((OR (NULL NAME)
@@ -76,109 +78,103 @@ Copyright (c) 1990, 1991, 1992, 1993, 1995, 1997, 1999, 2001, 2018 by Venue. Al
0)
(SETQ NAME "Medley Output"]
(* ;; "Don't break if you have trouble with preexisting files, e.g. because of protection.")
(* ;; "Don't break if you have trouble with preexisting files, e.g. because of protection.")
(FOR F IN [CAR (NLSETQ (FILDIR (PACKFILENAME 'HOST 'DSK 'EXTENSION '* 'BODY
(UnixTempFile 'medleyprint. T]
(FOR F IN [CAR (NLSETQ (FILDIR (PACKFILENAME 'HOST 'DSK 'EXTENSION '* 'BODY (UnixTempFile
'medleyprint. T]
WHEN (CAR (NLSETQ (IGREATERP (DIFFERENCE (IDATE)
(GETFILEINFO F 'ICREATIONDATE))
120))) DO (NLSETQ (DELFILE F)))
(GETFILEINFO F 'ICREATIONDATE))
120))) DO (NLSETQ (DELFILE F)))
(* ;; "The temp file's name will be of the form medleyprint.<idate>, so all such files can be found for deletion on a subsequent call after a certain amount of time (2 minutes) has gone by. If we delete immediately, it may happen before lpr has done its thing. ")
(* ;; "The temp file's name will be of the form medleyprint.<idate>, so all such files can be found for deletion on a subsequent call after a certain amount of time (2 minutes) has gone by. If we delete immediately, it may happen before lpr has done its thing. ")
(CL:MULTIPLE-VALUE-BIND
(tmpstream tmpname)
(UnixTempFile 'medleyprint.)
(COND
(tmpstream
(CL:MULTIPLE-VALUE-BIND (tmpstream tmpname)
(UnixTempFile 'medleyprint.)
(COND
(tmpstream
(* ;; "First, copy the lisp file to /tmp so lpr can find it.")
(* ;; "First, copy the lisp file to /tmp so lpr can find it.")
[CL:WITH-OPEN-STREAM
(out tmpstream)
(CL:WITH-OPEN-STREAM
(in (OPENSTREAM FILE 'INPUT))
(printout PROMPTWINDOW .TAB0 0 "Spooling output to Unix printer"
(COND
(PRINTER (CONCAT " '" PRINTER "'"))
(T ""))
"...")
(IF NSIDES
THEN
(* ;; "Have to put magic simplex/duplex stuff in the tmp file itself, after the first line, cause there is no other way to control some duplex printers.")
[CL:WITH-OPEN-STREAM
(out tmpstream)
(CL:WITH-OPEN-STREAM
(in (OPENSTREAM FILE 'INPUT))
(printout PROMPTWINDOW .TAB0 0 "Spooling output to Unix printer"
(COND
(PRINTER (CONCAT " '" PRINTER "'"))
(T ""))
"...")
(IF NSIDES
THEN
(* ;; "Have to put magic simplex/duplex stuff in the tmp file itself, after the first line, cause there is no other way to control some duplex printers.")
(BIND C SAWCR
DO (SETQ C (BIN in))
(IF (MEMB C (CHARCODE (CR LF)))
THEN (BOUT out C)
(SETQ SAWCR T)
ELSEIF SAWCR
THEN
(IF (MEMB C (CHARCODE (CR LF)))
THEN (BOUT out C)
(SETQ SAWCR T)
ELSEIF SAWCR
THEN
(* ;; "First char of 2nd line: nonCR/LF after CR/LF")
(* ;;
 "First char of 2nd line: nonCR/LF after CR/LF")
(* ;; "Put out simplex header, then print character in C")
(* ;;
 "Put out simplex header, then print character in C")
(PRINTOUT out "%%BeginSetup" T)
(PRINTOUT out "[{" T "%%%%BeginFeature: *Duplex Simplex" T
"<< /Duplex " (CL:IF (EQ NSIDES 1)
"false"
"true")
" /Tumble false >> setpagedevice" T
"%%%%EndFeature" T "} stopped cleartomark" T)
(PRINTOUT out "%%EndSetup" T)
(BOUT out C)
(COPYCHARS in out (GETFILEPTR in)
-1)
(RETURN)
ELSE (BOUT out C)))
ELSE (COPYCHARS in out 0 -1]
(PRINTOUT out "%%BeginSetup" T)
(PRINTOUT out "[{" T
"%%%%BeginFeature: *Duplex Simplex" T
"<< /Duplex " (CL:IF (EQ NSIDES 1)
"false"
"true")
" /Tumble false >> setpagedevice" T
"%%%%EndFeature" T "} stopped cleartomark" T)
(PRINTOUT out "%%EndSetup" T)
(BOUT out C)
(COPYCHARS in out (GETFILEPTR in)
-1)
(RETURN)
ELSE (BOUT out C)))
ELSE (COPYCHARS in out 0 -1]
(* ;; "Now make Unix print the /tmp file.")
(* ;; "Now make Unix print the /tmp file.")
(ShellCommand (UnixPrintCommand PRINTER COPIES NAME tmpname)
PROMPTWINDOW)
(printout PROMPTWINDOW "done" T))
(T (ERROR "Couldn't create unix temp file"]
(ShellCommand (UnixPrintCommand PRINTER COPIES NAME tmpname)
PROMPTWINDOW)
(printout PROMPTWINDOW "done" T))
(T (ERROR "Couldn't create unix temp file"))))]
T])
(UnixShellQuote
[LAMBDA (STRING)
(DECLARE (LOCALVARS . T)) (* ; "Edited 19-Apr-89 21:14 by TAL")
(DECLARE (LOCALVARS . T)) (* ; "Edited 19-Apr-89 21:14 by TAL")
(LET* ((X (CHCON STRING))
(CT X)
C FLG)
[while (LISTP CT) do (SETQ C (CAR CT))
(COND
([OR (<= (CHARCODE a)
C
(CHARCODE z))
(<= (CHARCODE A)
C
(CHARCODE Z))
(<= (CHARCODE 0)
C
(CHARCODE 9))
(FMEMB C (CHARCODE (- /]
(SETQ CT (CDR CT)))
(T (SETQ FLG T)
(RPLNODE CT (CHARCODE \)
(CONS (COND
((FMEMB C (CHARCODE (CR LF)))
(CHARCODE SPACE))
(T C))
(SETQ CT (CDR CT]
(COND
([OR (<= (CHARCODE a)
C
(CHARCODE z))
(<= (CHARCODE A)
C
(CHARCODE Z))
(<= (CHARCODE 0)
C
(CHARCODE 9))
(FMEMB C (CHARCODE (- /]
(SETQ CT (CDR CT)))
(T (SETQ FLG T)
(RPLNODE CT (CHARCODE \)
(CONS (COND
((FMEMB C (CHARCODE (CR LF)))
(CHARCODE SPACE))
(T C))
(SETQ CT (CDR CT]
(COND
(FLG (CONCATCODES X))
(T STRING])
(UnixTempFile
[LAMBDA (Prefix DontOpen) (* ; "Edited 28-Apr-93 13:49 by rmk:")
(* ; "Edited 12-Jan-89 19:07 by TAL")
[LAMBDA (Prefix DontOpen) (* ; "Edited 28-Apr-93 13:49 by rmk:")
(* ; "Edited 12-Jan-89 19:07 by TAL")
(LET* ([host (AND (BOUNDP 'FISTempDir)
(UNPACKFILENAME.STRING FISTempDir 'HOST]
(dir (OR [COND
@@ -191,39 +187,35 @@ Copyright (c) 1990, 1991, 1992, 1993, 1995, 1997, 1999, 2001, 2018 by Venue. Al
file unix)
(COND
([for i from 1 to 100
thereis (NOT (INFILEP (SETQ file (CONCAT "{UNIX}"
(SETQ unix
(CONCAT "/" dir "/" str i]
thereis (NOT (INFILEP (SETQ file (CONCAT "{UNIX}" (SETQ unix
(CONCAT "/" dir "/" str i]
(CL:VALUES [COND
(DontOpen file)
(T
(* ;;
 "Type TEXT seems to be important for Apple LaserWriters at PARC")
(* ;; "Type TEXT seems to be important for Apple LaserWriters at PARC")
(OPENSTREAM file 'OUTPUT NIL '((TYPE TEXT]
unix])
(UnixPrintCommand
[LAMBDA (PRINTER COPIES NAME TMPNAME) (* ; "Edited 4-May-2018 17:17 by rmk:")
(* ;
 "Edited 20-May-92 14:26 by nilsson")
[LAMBDA (PRINTER COPIES NAME TMPNAME) (* ; "Edited 4-May-2018 17:17 by rmk:")
(* ; "Edited 20-May-92 14:26 by nilsson")
(* ;; "This function is called when the user wants to UNIXPRINT a file. It has to return a string that when sent to a shell prints the file tmpname. In the cub version this should look something like %"/usr/ucb/lpr tmpname%". The arguments to this function are:")
(* ;; "This function is called when the user wants to UNIXPRINT a file. It has to return a string that when sent to a shell prints the file tmpname. In the cub version this should look something like %"/usr/ucb/lpr tmpname%". The arguments to this function are:")
(* ;; " PRINTER - the name of the printer. Usually something like lw or plw.")
(* ;; " PRINTER - the name of the printer. Usually something like lw or plw.")
(* ;; "COPIES - how many copies of this job to be printed.")
(* ;; "COPIES - how many copies of this job to be printed.")
(* ;; "NAME - the name of this job. This gets printed on the banner of your job.")
(* ;; "NAME - the name of this job. This gets printed on the banner of your job.")
(* ;;
 "TMPNAME - The name of the temporary file that contains the postscript code for this job. ")
(* ;; "TMPNAME - The name of the temporary file that contains the postscript code for this job. ")
(* ;; "Note the clever function UnixShellQuote. It converts any lisp name to a string that is quoted according to /bin/sh syntax")
(* ;; "Note the clever function UnixShellQuote. It converts any lisp name to a string that is quoted according to /bin/sh syntax")
(* ;; "UNIXPRINTSWITCHES makes it easy for other sites to change just the lpr switches.")
(* ;; "UNIXPRINTSWITCHES makes it easy for other sites to change just the lpr switches.")
(* ;; "Use raw lpr, let system decide where it is located.")
(* ;; "Use raw lpr, let system decide where it is located.")
(CONCAT "lpr " (COND
((AND PRINTER (NEQ 0 (NCHARS PRINTER)))
@@ -242,21 +234,12 @@ Copyright (c) 1990, 1991, 1992, 1993, 1995, 1997, 1999, 2001, 2018 by Venue. Al
" " TMPNAME])
)
(CL:DEFUN ShellCommand (Cmd &OPTIONAL (Output T))
(CL:WITH-OPEN-STREAM (s (CREATE-PROCESS-STREAM Cmd))
(CL:TAGBODY [SETFILEINFO s 'ENDOFSTREAMOP #'(CL:LAMBDA (s)
(GO OUT]
(CL:LOOP (PRINTCCODE (READCCODE s)
Output))
OUT))
NIL)
(RPAQ? UnixPrinterName NIL)
(RPAQ? UNIXPRINTSWITCHES " -r -s ")
(* ;; "(InstallUnixPrinter) commented out because POSTSCRIPT indirects according to platform")
(* ;; "(InstallUnixPrinter) commented out because POSTSCRIPT indirects according to platform")
(PRIN1 "Please feel free to edit UnixPrintCommand." PROMPTWINDOW)
@@ -266,26 +249,24 @@ Copyright (c) 1990, 1991, 1992, 1993, 1995, 1997, 1999, 2001, 2018 by Venue. Al
(DEFINEQ
(UnixPrintCommand
[LAMBDA (PRINTER COPIES NAME TMPNAME) (* ; "Edited 4-May-2018 17:17 by rmk:")
(* ;
 "Edited 20-May-92 14:26 by nilsson")
[LAMBDA (PRINTER COPIES NAME TMPNAME) (* ; "Edited 4-May-2018 17:17 by rmk:")
(* ; "Edited 20-May-92 14:26 by nilsson")
(* ;; "This function is called when the user wants to UNIXPRINT a file. It has to return a string that when sent to a shell prints the file tmpname. In the cub version this should look something like %"/usr/ucb/lpr tmpname%". The arguments to this function are:")
(* ;; "This function is called when the user wants to UNIXPRINT a file. It has to return a string that when sent to a shell prints the file tmpname. In the cub version this should look something like %"/usr/ucb/lpr tmpname%". The arguments to this function are:")
(* ;; " PRINTER - the name of the printer. Usually something like lw or plw.")
(* ;; " PRINTER - the name of the printer. Usually something like lw or plw.")
(* ;; "COPIES - how many copies of this job to be printed.")
(* ;; "COPIES - how many copies of this job to be printed.")
(* ;; "NAME - the name of this job. This gets printed on the banner of your job.")
(* ;; "NAME - the name of this job. This gets printed on the banner of your job.")
(* ;;
 "TMPNAME - The name of the temporary file that contains the postscript code for this job. ")
(* ;; "TMPNAME - The name of the temporary file that contains the postscript code for this job. ")
(* ;; "Note the clever function UnixShellQuote. It converts any lisp name to a string that is quoted according to /bin/sh syntax")
(* ;; "Note the clever function UnixShellQuote. It converts any lisp name to a string that is quoted according to /bin/sh syntax")
(* ;; "UNIXPRINTSWITCHES makes it easy for other sites to change just the lpr switches.")
(* ;; "UNIXPRINTSWITCHES makes it easy for other sites to change just the lpr switches.")
(* ;; "Use raw lpr, let system decide where it is located.")
(* ;; "Use raw lpr, let system decide where it is located.")
(CONCAT "lpr " (COND
((AND PRINTER (NEQ 0 (NCHARS PRINTER)))
@@ -322,9 +303,9 @@ Copyright (c) 1990, 1991, 1992, 1993, 1995, 1997, 1999, 2001, 2018 by Venue. Al
(ADDTOVAR LAMA )
)
(PUTPROPS UNIXPRINT COPYRIGHT ("Venue" 1990 1991 1992 1993 1995 1997 1999 2001 2018))
(PUTPROPS UNIXPRINT COPYRIGHT ("Venue" 1990 1991 1992 1993 1995 1997 1999 2001 2018 2023))
(DECLARE%: DONTCOPY
(FILEMAP (NIL (1423 11730 (InstallUnixPrinter 1433 . 2041) (UnixPrint 2043 . 7114) (UnixShellQuote
7116 . 8670) (UnixTempFile 8672 . 9980) (UnixPrintCommand 9982 . 11728)) (11732 12105 (ShellCommand
11732 . 12105)) (12439 14197 (UnixPrintCommand 12449 . 14195)))))
(FILEMAP (NIL (1389 11216 (InstallUnixPrinter 1399 . 1991) (UnixPrint 1993 . 6875) (UnixShellQuote
6877 . 8306) (UnixTempFile 8308 . 9531) (UnixPrintCommand 9533 . 11214)) (11550 13243 (
UnixPrintCommand 11560 . 13241)))))
STOP

Binary file not shown.

113
library/UNIXUTILS Normal file
View File

@@ -0,0 +1,113 @@
(DEFINE-FILE-INFO PACKAGE "INTERLISP" READTABLE "INTERLISP" BASE 10)
(FILECREATED "18-Jan-2023 20:36:10" {DSK}<home>frank>il>medley>gmedley>library>UNIXUTILS.;7 5091
:CHANGES-TO (FNS ShellBrowser ShellBrowse ShellOpen)
(VARS UNIXUTILSCOMS)
(FUNCTIONS ShellWhich)
:PREVIOUS-DATE "18-Jan-2023 13:22:28" {DSK}<home>frank>il>medley>gmedley>greetfiles>UNIXUTILS.;1
)
(PRETTYCOMPRINT UNIXUTILSCOMS)
(RPAQQ UNIXUTILSCOMS ((GLOBALVARS ShellBrowser)
(INITVARS (ShellBrowser))
(FUNCTIONS ShellCommand ShellWhich)
(FNS ShellBrowser ShellBrowse)))
(DECLARE%: DOEVAL@COMPILE DONTCOPY
(GLOBALVARS ShellBrowser)
)
(RPAQ? ShellBrowser )
(CL:DEFUN ShellCommand (Cmd &OPTIONAL (Output T))
(CL:WITH-OPEN-STREAM (s (CREATE-PROCESS-STREAM Cmd))
(CL:TAGBODY [SETFILEINFO s 'ENDOFSTREAMOP #'(CL:LAMBDA (s)
(GO OUT]
(CL:LOOP (PRINTCCODE (READCCODE s)
Output))
OUT))
NIL)
(CL:DEFUN ShellWhich (Cmd) (* ; "Edited 18-Jan-2023 13:19 by FGH")
[CL:WITH-OPEN-STREAM (S (OPENSTREAM '{NODIRCORE} 'BOTH))
(ShellCommand (CONCAT "which " Cmd)
S)
(COND
((EQ (GETEOFPTR S)
0)
NIL)
(T (SETFILEPTR S 0)
(MKSTRING (READ S])
(DEFINEQ
(ShellBrowser
[LAMBDA NIL (* ; "Edited 18-Jan-2023 20:30 by FGH")
(OR ShellBrowser (SETQ ShellBrowser (LET (CMDPATH)
(if (STRPOS "darwin" (OR (UNIX-GETENV "OSTYPE")
(UNIX-GETENV "PATH")))
then
(* ;; " MacOS")
"open"
elseif (SETQ CMDPATH (ShellWhich "wslview"))
then
(* ;; "windows with WSL")
CMDPATH
elseif (SETQ CMDPATH (ShellWhich "xdg-open"))
then
(* ;; "Linux systems with xdg-utils installed ")
CMDPATH
elseif (SETQ CMDPATH (ShellWhich "git"))
then
(* ;; " Systems with git installed")
(CONCAT CMDPATH " web--browse")
(* ; "")
elseif (SETQ CMDPATH (ShellWhich "lynx"))
then
(* ;; " Systems with lynx installed")
(LET (CMDPATH2)
(if (SETQ CMDPATH2 (ShellWhich "xterm"))
then (CONCAT CMDPATH2 " -e " CMDPATH)
else (LIST CMDPATH)))
else
(* ;;
 " Out of ideas - just return a dummy function")
"true"])
(ShellBrowse
[LAMBDA (URL) (* ; "Edited 18-Jan-2023 20:32 by FGH")
(* ;; " Open the web page specified by URL using an external browser via shell call")
(* ;;
 " URL must start with http:// or https:// (case ireelevant) or this function will just return NIL.")
(* ;; " Returns T otherwise.")
(SETQ URL (MKSTRING URL))
(if (OR (EQ (STRPOS "http://" (L-CASE URL))
1)
(EQ (STRPOS "https://" (L-CASE URL))
1))
then (LET ((BROWSER (ShellBrowser)))
(if (LISTP BROWSER)
then (CHAT 'SHELL NIL (CONCAT (CAR BROWSER)
" '" URL "'"))
else (ShellCommand (CONCAT BROWSER " '" URL "'"
" >>/tmp/ShellBrowser-warnings-$$.txt")))
T)
else NIL])
)
(DECLARE%: DONTCOPY
(FILEMAP (NIL (764 1137 (ShellCommand 764 . 1137)) (1139 1538 (ShellWhich 1139 . 1538)) (1539 5068 (
ShellBrowser 1549 . 4072) (ShellBrowse 4074 . 5066)))))
STOP

BIN
library/UNIXUTILS.DFASL Normal file

Binary file not shown.

View File

@@ -1,10 +1,10 @@
(DEFINE-FILE-INFO PACKAGE "INTERLISP" READTABLE "INTERLISP" BASE 10)
(FILECREATED " 1-Oct-2022 12:14:04" {WMEDLEY}<lispusers>GITFNS.;5 118357
(FILECREATED "30-Mar-2023 09:08:48" {WMEDLEY}<lispusers>GITFNS.;469 119763
:CHANGES-TO (FNS GIT-INIT)
:CHANGES-TO (FNS GIT-MAKE-PROJECT)
:PREVIOUS-DATE "29-Sep-2022 10:52:34" {DSK}<home>frank>il>medley>wmedley>lispusers>GITFNS.;4)
:PREVIOUS-DATE "11-Mar-2023 23:12:35" {WMEDLEY}<lispusers>GITFNS.;468)
(PRETTYCOMPRINT GITFNSCOMS)
@@ -21,18 +21,20 @@
(* ;; "GIT projects")
(COMS (FNS GIT-CLONEP GIT-INIT GIT-MAKE-PROJECT GIT-GET-PROJECT GIT-PROJECT-PATH
FIND-ANCESTOR-DIRECTORY GIT-FIND-CLONE GIT-MAINBRANCH GIT-MAINBRANCH?)
(COMS (FNS GIT-CLONEP GIT-INIT GIT-MAKE-PROJECT GIT-GET-PROJECT GIT-PUT-PROJECT-FIELD
GIT-PROJECT-PATH FIND-ANCESTOR-DIRECTORY GIT-FIND-CLONE GIT-MAINBRANCH
GIT-MAINBRANCH?)
(DECLARE%: EVAL@COMPILE DONTCOPY (RECORDS GIT-PROJECT PULLREQUEST))
(INITVARS (GIT-DEFAULT-PROJECT 'MEDLEY)
[GIT-DEFAULT-PROJECTS '((MEDLEY T T
[GIT-DEFAULT-PROJECTS '((MEDLEY NIL NIL
(EXPORTS.ALL RDSYS RDSYS.LCOM loadups/ patches/
tmp/ fontsold/ clos/ cltl2/)
(greetfiles scripts sources library lispusers
internal doctools rooms))
(NOTECARDS T T)
(LOOPS T T)
(TEST T T]
(NOTECARDS)
(LOOPS)
(TEST)
(MAIKO]
(GIT-PROJECTS NIL)))
(P (GIT-INIT))
(ADDVARS (AROUNDEXITFNS GIT-INIT))
@@ -149,71 +151,82 @@
ELSE (ERROR "NOT A GIT CLONE" HOST/DIR])
(GIT-INIT
[LAMBDA (EVENT) (* ; "Edited 1-Oct-2022 12:13 by FGH")
[LAMBDA (EVENT) (* ; "Edited 1-Feb-2023 16:22 by rmk")
(* ; "Edited 1-Oct-2022 12:13 by FGH")
(* ; "Edited 8-Aug-2022 21:52 by lmm")
(SELECTQ EVENT
((NIL AFTERMAKESYS AFTERSYSOUT)
(SETQ GIT-PROJECTS NIL)
(for X in GIT-DEFAULT-PROJECTS do (APPLY (FUNCTION GIT-MAKE-PROJECT)
X))
(MKLIST X)))
NIL)
NIL])
(GIT-MAKE-PROJECT
[LAMBDA (PROJECTNAME PROJECTPATH WORKINGPATH EXCLUSIONS DEFAULTSUBDIRS)
[LAMBDA (PROJECTNAME CLONEPATH WORKINGPATH EXCLUSIONS DEFAULTSUBDIRS)
(* ; "Edited 30-Mar-2023 09:06 by rmk")
(* ; "Edited 5-Feb-2023 12:43 by rmk")
(* ; "Edited 1-Feb-2023 16:55 by rmk")
(* ; "Edited 11-Aug-2022 17:54 by rmk")
(* ; "Edited 13-Jul-2022 13:47 by rmk")
(* ; "Edited 6-Jul-2022 19:34 by rmk")
(* ; "Edited 17-May-2022 17:08 by rmk")
(* ; "Edited 13-May-2022 10:40 by rmk")
(* ; "Edited 12-May-2022 00:26 by rmk")
(* ; "Edited 9-May-2022 16:20 by rmk")
(* ;; "PROJECTPATH must resolve to a git clone.")
(* ;; "CLONEPATH must resolve to a git clone.")
(* ;; "Search sequence for PROJECTPATH, if T or NIL")
(* ;; " (UNIX-GETENV PROJECTNAME) Unix variable ROOMS is the full path name.")
(* ;; " (UNIX-GETENV PROJECTNAME)")
(* ;; " (MEDLEYDIR PROJECTNAME) e.g. {dsk}/Users/kaplan/medley3.5/loops/")
(* ;; " (UNIX-GETENV (CONCAT PROJECTNAME DIR)")
(* ;;
 " (MEDLEYDIR (CONCAT %"git-%" PROJECTNAME) e.g. {dsk}/Users/kaplan/medley3.5/git-medley/")
(* ;; " git-PROJECTNAME sister of MEDLEYDIR ")
(* ;;
 " (MEDLEYDIR (CONCAT PROJECTNAME %"DIR%") e.g. {dsk}/Users/kaplan/medley3.5/notecardsdir/")
(* ;; "If not found, error if NIL, return NIL if T ")
(* ;; " (MEDLEYDIR (CONCAT %"git-%" PROJECTNAME) ")
(* ;; "")
(* ;; "The clone pseudohost is PROJECTNAME e.g. {NOTECARDS}")
(* ;; "If there is a >working-PROJECTNAME> parallel to clonepath, its pseudhost is WPROJECTNAME, e.g. WNOTECARDS")
(* ;; "Error if clone is not found.")
(* ;; "WORKINGPATH T or NIL means try to find a parallel to the projectpath, T means don't cause an error if not found. ")
(SETQ PROJECTNAME (U-CASE (MKATOM PROJECTNAME)))
(CL:WHEN (MEMB PROJECTPATH '(NIL T))
[SETQ PROJECTPATH (OR (GIT-CLONEP (MEDLEYDIR (L-CASE PROJECTNAME)
NIL NIL T)
T)
(GIT-CLONEP (UNIX-GETENV PROJECTNAME)
T)
(GIT-CLONEP (UNIX-GETENV (PACK* PROJECTNAME 'DIR))
T)
(GIT-CLONEP (DIRECTORYNAME (CONCAT MEDLEYDIR "../git-" (L-CASE
PROJECTNAME
)
"/"))
T)
(AND (NULL PROJECTPATH)
(ERROR (CONCAT "Can't a find clone directory for " PROJECTNAME])
(CL:WHEN PROJECTPATH
(LET (CLONEPATH GITIGNORE PROJECT GITPATH WP)
(SETQ PROJECTPATH (SLASHIT (PACKFILENAME 'HOST 'UNIX 'DIRECTORY (UNPACKFILENAME.STRING
(TRUEFILENAME
PROJECTPATH)
'DIRECTORY
'RETURN))
T))
(SETQ CLONEPATH (if (GIT-CLONEP PROJECTPATH T T)
elseif (SETQ GITPATH (GIT-PROJECT-PATH PROJECTNAME PROJECTPATH))
then (SETQ PROJECTPATH GITPATH)
(GIT-CLONEP PROJECTPATH NIL T)
else (ERROR "Can't find GIT clone for" PROJECTPATH)))
[SETQ CLONEPATH (if (MEMB CLONEPATH '(NIL T))
then
(* ;; "The %"DIR%" handles MEDLEY -> MEDLEYDIR or LOOPS -> LOOPSDIR.")
(* ;; "")
(OR (GIT-CLONEP (UNIX-GETENV PROJECTNAME)
T)
(GIT-CLONEP (UNIX-GETENV (PACK* PROJECTNAME "DIR"))
T)
(GIT-CLONEP (MEDLEYDIR (L-CASE PROJECTNAME)
NIL NIL T)
T)
(GIT-CLONEP (MEDLEYDIR (CONCAT "../" PROJECTNAME)
NIL NIL T)
T)
(GIT-CLONEP (DIRECTORYNAME (CONCAT MEDLEYDIR "../git-" (L-CASE
PROJECTNAME)
"/"))
T)
(CL:IF CLONEPATH
(ERROR (CONCAT "Can't find a clone directory for " PROJECTNAME))
(PRINTOUT T "Note: Can't find a clone directory for "
PROJECTNAME T)))
elseif (GIT-CLONEP (SLASHIT (PACKFILENAME 'HOST 'DSK 'DIRECTORY
(UNPACKFILENAME.STRING (TRUEFILENAME
CLONEPATH)
'DIRECTORY
'RETURN))
T)
T T)
else (ERROR (CONCAT "Can't find the clone directory " CLONEPATH " for "
PROJECTNAME]
(CL:WHEN CLONEPATH
(LET (GITIGNORE PROJECT WP)
(CL:WHEN (SETQ GITIGNORE (INFILEP (PACKFILENAME.STRING 'NAME ".gitignore" 'BODY
CLONEPATH)))
(SETQ GITIGNORE (CL:WITH-OPEN-FILE (STREAM GITIGNORE)
@@ -229,58 +242,39 @@
:TEST
(FUNCTION STRING.EQUAL)))
(* ;; "The %"my-%" case is for backward compatibility, eventually deprecated.")
(* ;; "We now have the clonepath and the extra parameters for the project. Do we have a separate working environment?")
(SETQ WP
(SELECTQ WORKINGPATH
((T NIL)
(OR (DIRECTORYNAME (PACKFILENAME.STRING
'HOST
'DSK
'BODY
(CONCAT (SUBSTRING CLONEPATH 1
(STRPOS "/" CLONEPATH -2 NIL NIL NIL
FILEDIRCASEARRAY T))
"working-"
(OR (SUBSTRING PROJECTPATH
(OR (STRPOS CLONEPATH PROJECTPATH 1 NIL
NIL T FILEDIRCASEARRAY)
-2))
(L-CASE PROJECTNAME))
">"))
T)
(DIRECTORYNAME (PACKFILENAME.STRING
'HOST
'DSK
'BODY
(CONCAT (SUBSTRING CLONEPATH 1
(STRPOS "/" CLONEPATH -2 NIL NIL NIL
FILEDIRCASEARRAY T))
"my-"
(OR (SUBSTRING PROJECTPATH
(OR (STRPOS CLONEPATH PROJECTPATH 1 NIL
NIL T FILEDIRCASEARRAY)
-2))
(L-CASE PROJECTNAME))
">"))
T)))
(DIRECTORYNAME (PACKFILENAME.STRING 'HOST 'DSK 'BODY
(CONCAT (SUBSTRING CLONEPATH 1
(STRPOS "/" CLONEPATH -2 NIL NIL NIL
FILEDIRCASEARRAY T))
"working-"
(OR (SUBSTRING CLONEPATH
(OR (STRPOS CLONEPATH CLONEPATH 1 NIL
NIL T FILEDIRCASEARRAY)
-2))
(L-CASE PROJECTNAME))
">"))
T))
(DIRECTORYNAME (TRUEFILENAME WORKINGPATH)
T)))
[SETQ WORKINGPATH (if WP
then (UNSLASHIT WP T)
elseif (EQ WORKINGPATH T)
then NIL
else (ERROR (CONCAT "Can't find the working directory "
(OR WORKINGPATH "")
" for " PROJECTNAME]
elseif WORKINGPATH
then (ERROR (CONCAT "Can't find the working directory "
(AND (EQ WORKINGPATH T)
"")
" for " PROJECTNAME]
(SETQ PROJECT (create GIT-PROJECT
PROJECTNAME _ PROJECTNAME
GITHOST _ (PACK* "{" (PSEUDOHOST (CONCAT "G" PROJECTNAME)
PROJECTPATH)
GITHOST _ (PACK* "{" (PSEUDOHOST PROJECTNAME CLONEPATH)
"}")
WHOST _ (AND WORKINGPATH (PACK* "{" (PSEUDOHOST (CONCAT "W"
PROJECTNAME)
WP)
WORKINGPATH)
"}"))
EXCLUSIONS _ EXCLUSIONS
DEFAULTSUBDIRS _ (MKLIST DEFAULTSUBDIRS)
@@ -319,6 +313,34 @@
])
PROJECT))])
(GIT-PUT-PROJECT-FIELD
[LAMBDA (PROJECT FIELD NEWVALUE) (* ; "Edited 11-Mar-2023 23:00 by rmk")
(* ; "Edited 7-Jul-2022 11:25 by rmk")
(* ; "Edited 13-May-2022 10:40 by rmk")
(* ; "Edited 9-May-2022 20:02 by rmk")
(* ; "Edited 8-May-2022 11:38 by rmk")
(* ;; "Replaces the value of a project field with NEWVALUE. The project record is DONTCOPY, to avoid potential name conflicts, so this provides a functional interface. One use: augment EXCLUSIONS with a list of temporary debug and testing files that you don't want to see in the various file listings")
(CL:WHEN (SETQ PROJECT (IF (TYPE? GIT-PROJECT PROJECT)
THEN PROJECT
ELSEIF (CDR (ASSOC (OR (U-CASE PROJECT)
GIT-DEFAULT-PROJECT)
GIT-PROJECTS))
ELSEIF NOERROR
THEN NIL
ELSE (ERROR "NOT A GIT-PROJECT" PROJECT)))
(SELECTQ FIELD
(PROJECTNAME (REPLACE PROJECTNAME OF PROJECT WITH NEWVALUE))
(WHOST (REPLACE WHOST OF PROJECT WITH NEWVALUE))
(GITHOST (REPLACE GITHOST OF PROJECT WITH NEWVALUE))
(EXCLUSIONS (REPLACE EXCLUSIONS OF PROJECT WITH NEWVALUE))
(DEFAULTSUBDIRS
(REPLACE DEFAULTSUBDIRS OF PROJECT WITH NEWVALUE))
(CLONEPATH (REPLACE CLONEPATH OF PROJECT WITH NEWVALUE))
(MAINBRANCH (REPLACE MAINBRANCH OF PROJECT WITH NEWVALUE))
PROJECT))])
(GIT-PROJECT-PATH
[LAMBDA (PROJECTNAME PROJECTPATH) (* ; "Edited 8-May-2022 15:10 by rmk")
@@ -389,11 +411,12 @@
(RPAQ? GIT-DEFAULT-PROJECT 'MEDLEY)
(RPAQ? GIT-DEFAULT-PROJECTS
'((MEDLEY T T (EXPORTS.ALL RDSYS RDSYS.LCOM loadups/ patches/ tmp/ fontsold/ clos/ cltl2/)
'((MEDLEY NIL NIL (EXPORTS.ALL RDSYS RDSYS.LCOM loadups/ patches/ tmp/ fontsold/ clos/ cltl2/)
(greetfiles scripts sources library lispusers internal doctools rooms))
(NOTECARDS T T)
(LOOPS T T)
(TEST T T)))
(NOTECARDS)
(LOOPS)
(TEST)
(MAIKO)))
(RPAQ? GIT-PROJECTS NIL)
@@ -517,7 +540,7 @@
(CL:WHEN [AND SUBDIR (NOT (MEMB (CHCON1 SUBDIR))
(CHARCODE (> /]
(SETQ SUBDIR (CONCAT SUBDIR "/")))
(SLASHIT (/CNDIR (CONCAT (TRUEFILENAME (GIT-GET-PROJECT PROJECT 'GITHOST))
(SLASHIT (/CNDIR (CONCAT (GIT-GET-PROJECT PROJECT 'GITHOST)
(OR SUBDIR "")))
T))
@@ -527,7 +550,7 @@
(CL:WHEN [AND SUBDIR (NOT (MEMB (CHCON1 SUBDIR))
(CHARCODE (> /]
(SETQ SUBDIR (CONCAT SUBDIR "/")))
(SLASHIT (/CNDIR (CONCAT (TRUEFILENAME (GIT-GET-PROJECT PROJECT 'WHOST))
(SLASHIT (/CNDIR (CONCAT (GIT-GET-PROJECT PROJECT 'WHOST)
(OR SUBDIR "")))
T))
@@ -2211,31 +2234,32 @@
(PUTPROPS GITFNS FILETYPE :TCOMPL)
(DECLARE%: DONTCOPY
(FILEMAP (NIL (3905 19378 (GIT-CLONEP 3915 . 5178) (GIT-INIT 5180 . 5692) (GIT-MAKE-PROJECT 5694 .
14079) (GIT-GET-PROJECT 14081 . 16006) (GIT-PROJECT-PATH 16008 . 17052) (FIND-ANCESTOR-DIRECTORY 17054
. 17403) (GIT-FIND-CLONE 17405 . 18486) (GIT-MAINBRANCH 18488 . 18883) (GIT-MAINBRANCH? 18885 . 19376
)) (25826 28614 (ALLSUBDIRS 25836 . 27122) (MEDLEYSUBDIRS 27124 . 27817) (GITSUBDIRS 27819 . 28612)) (
28615 33405 (TOGIT 28625 . 30031) (FROMGIT 30033 . 31014) (GIT-DELETE-FILE 31016 . 31862) (
MYMEDLEY-DELETE-FILES 31864 . 33403)) (33406 36409 (MYMEDLEYSUBDIR 33416 . 33872) (GITSUBDIR 33874 .
34317) (STRIPDIR 34319 . 34690) (STRIPHOST 34692 . 34932) (STRIPNAME 34934 . 35687) (STRIPWHERE 35689
. 36407)) (36410 38312 (GFILE4MFILE 36420 . 36783) (MFILE4GFILE 36785 . 37354) (GIT-REPO-FILENAME
37356 . 38310)) (38361 48183 (GIT-COMMIT 38371 . 39197) (GIT-PUSH 39199 . 39843) (GIT-PULL 39845 .
40457) (GIT-APPROVAL 40459 . 40808) (GIT-GET-FILE 40810 . 42775) (GIT-FILE-EXISTS? 42777 . 43051) (
GIT-REMOTE-UPDATE 43053 . 43777) (GIT-REMOTE-ADD 43779 . 44086) (GIT-FILE-DATE 44088 . 45019) (
GIT-FILE-HISTORY 45021 . 46955) (GIT-PRINT-FILE-HISTORY 46957 . 48007) (GIT-FETCH 48009 . 48181)) (
48213 58806 (GIT-BRANCH-DIFF 48223 . 54563) (GIT-COMMIT-DIFFS 54565 . 55118) (GIT-BRANCH-RELATIONS
55120 . 58804)) (58851 71083 (GIT-BRANCH-NUM 58861 . 59434) (GIT-CHECKOUT 59436 . 60495) (
GIT-WHICH-BRANCH 60497 . 60795) (GIT-MAKE-BRANCH 60797 . 63010) (GIT-BRANCHES 63012 . 65280) (
GIT-BRANCH-EXISTS? 65282 . 65986) (GIT-PICK-BRANCH 65988 . 66316) (GIT-PRC-MENU 66318 . 68321) (
GIT-PULL-REQUESTS 68323 . 70469) (GIT-SHORT-BRANCH-NAME 70471 . 70762) (GIT-LONG-NAME 70764 . 71081))
(71113 74448 (GIT-MY-CURRENT-BRANCH 71123 . 71493) (GIT-MY-BRANCHP 71495 . 72000) (GIT-MY-NEXT-BRANCH
72002 . 72496) (GIT-MY-BRANCHES 72498 . 74446)) (74494 78446 (GIT-ADD-WORKTREE 74504 . 75988) (
GIT-REMOVE-WORKTREE 75990 . 76920) (GIT-LIST-WORKTREES 76922 . 77726) (WORKTREEDIR 77728 . 78444)) (
78494 109703 (GIT-GET-DIFFERENT-FILES 78504 . 84928) (GIT-BRANCHES-COMPARE-DIRECTORIES 84930 . 91087)
(GIT-WORKING-COMPARE-DIRECTORIES 91089 . 95915) (GIT-COMPARE-WORKTREE 95917 . 99895) (GITCDOBJBUTTONFN
99897 . 104387) (GIT-CD-LABELFN 104389 . 105471) (GIT-CD-MENUFN 105473 . 107913) (
GIT-WORKING-COMPARE-FILES 107915 . 108535) (GIT-BRANCHES-COMPARE-FILES 108537 . 109701)) (109773
118290 (CDGITDIR 109783 . 110343) (GIT-COMMAND 110345 . 111903) (GITORIGIN 111905 . 112602) (
GIT-INITIALS 112604 . 112908) (GIT-COMMAND-TO-FILE 112910 . 116399) (PROCESS-COMMAND 116401 . 117014)
(GIT-RESULT-TO-LINES 117016 . 117623) (STRIPLOCAL 117625 . 118288)))))
(FILEMAP (NIL (3979 20805 (GIT-CLONEP 3989 . 5252) (GIT-INIT 5254 . 5884) (GIT-MAKE-PROJECT 5886 .
13487) (GIT-GET-PROJECT 13489 . 15414) (GIT-PUT-PROJECT-FIELD 15416 . 17433) (GIT-PROJECT-PATH 17435
. 18479) (FIND-ANCESTOR-DIRECTORY 18481 . 18830) (GIT-FIND-CLONE 18832 . 19913) (GIT-MAINBRANCH 19915
. 20310) (GIT-MAINBRANCH? 20312 . 20803)) (27232 30020 (ALLSUBDIRS 27242 . 28528) (MEDLEYSUBDIRS
28530 . 29223) (GITSUBDIRS 29225 . 30018)) (30021 34811 (TOGIT 30031 . 31437) (FROMGIT 31439 . 32420)
(GIT-DELETE-FILE 32422 . 33268) (MYMEDLEY-DELETE-FILES 33270 . 34809)) (34812 37815 (MYMEDLEYSUBDIR
34822 . 35278) (GITSUBDIR 35280 . 35723) (STRIPDIR 35725 . 36096) (STRIPHOST 36098 . 36338) (STRIPNAME
36340 . 37093) (STRIPWHERE 37095 . 37813)) (37816 39718 (GFILE4MFILE 37826 . 38189) (MFILE4GFILE
38191 . 38760) (GIT-REPO-FILENAME 38762 . 39716)) (39767 49589 (GIT-COMMIT 39777 . 40603) (GIT-PUSH
40605 . 41249) (GIT-PULL 41251 . 41863) (GIT-APPROVAL 41865 . 42214) (GIT-GET-FILE 42216 . 44181) (
GIT-FILE-EXISTS? 44183 . 44457) (GIT-REMOTE-UPDATE 44459 . 45183) (GIT-REMOTE-ADD 45185 . 45492) (
GIT-FILE-DATE 45494 . 46425) (GIT-FILE-HISTORY 46427 . 48361) (GIT-PRINT-FILE-HISTORY 48363 . 49413) (
GIT-FETCH 49415 . 49587)) (49619 60212 (GIT-BRANCH-DIFF 49629 . 55969) (GIT-COMMIT-DIFFS 55971 . 56524
) (GIT-BRANCH-RELATIONS 56526 . 60210)) (60257 72489 (GIT-BRANCH-NUM 60267 . 60840) (GIT-CHECKOUT
60842 . 61901) (GIT-WHICH-BRANCH 61903 . 62201) (GIT-MAKE-BRANCH 62203 . 64416) (GIT-BRANCHES 64418 .
66686) (GIT-BRANCH-EXISTS? 66688 . 67392) (GIT-PICK-BRANCH 67394 . 67722) (GIT-PRC-MENU 67724 . 69727)
(GIT-PULL-REQUESTS 69729 . 71875) (GIT-SHORT-BRANCH-NAME 71877 . 72168) (GIT-LONG-NAME 72170 . 72487)
) (72519 75854 (GIT-MY-CURRENT-BRANCH 72529 . 72899) (GIT-MY-BRANCHP 72901 . 73406) (
GIT-MY-NEXT-BRANCH 73408 . 73902) (GIT-MY-BRANCHES 73904 . 75852)) (75900 79852 (GIT-ADD-WORKTREE
75910 . 77394) (GIT-REMOVE-WORKTREE 77396 . 78326) (GIT-LIST-WORKTREES 78328 . 79132) (WORKTREEDIR
79134 . 79850)) (79900 111109 (GIT-GET-DIFFERENT-FILES 79910 . 86334) (
GIT-BRANCHES-COMPARE-DIRECTORIES 86336 . 92493) (GIT-WORKING-COMPARE-DIRECTORIES 92495 . 97321) (
GIT-COMPARE-WORKTREE 97323 . 101301) (GITCDOBJBUTTONFN 101303 . 105793) (GIT-CD-LABELFN 105795 .
106877) (GIT-CD-MENUFN 106879 . 109319) (GIT-WORKING-COMPARE-FILES 109321 . 109941) (
GIT-BRANCHES-COMPARE-FILES 109943 . 111107)) (111179 119696 (CDGITDIR 111189 . 111749) (GIT-COMMAND
111751 . 113309) (GITORIGIN 113311 . 114008) (GIT-INITIALS 114010 . 114314) (GIT-COMMAND-TO-FILE
114316 . 117805) (PROCESS-COMMAND 117807 . 118420) (GIT-RESULT-TO-LINES 118422 . 119029) (STRIPLOCAL
119031 . 119694)))))
STOP

Binary file not shown.

View File

@@ -1,95 +1,148 @@
Medley GITFNS2
Medley GITFNS 2
4
1
GITFNS 1
4
By Ron Kaplan This document was last edited in May 2022. GITFNS provides a Medley-oriented interface for comparing the files in two different branches of a git repository. This makes it easier to understand what functions or other definitions have changed in a Lisp source file, or what text has changed in a Tedit file. This may be particularly helpful in evaluating the changes in a pull request.
Separately, GITFNS also provides tools and conventions for bridging between git's file-oriented style of development and version control and Medley's residential development style with its own version control conventions. GITFNS allows for intelligent comparisons between Lisp source files,Tedit files, and text files in a local git clone and a local Medley-style working directory, and for migrating files to and from the git clone and the working directory.
By Ron Kaplan This document was last edited in February 2023. GITFNS provides a Medley-oriented interface for comparing the files in two different branches of a git repository. This makes it easier to understand what functions or other definitions have changed in a Lisp source file, or what text has changed in a Tedit file. This may be particularly helpful in evaluating the changes in a pull request.
Separately, GITFNS also provides tools and conventions for bridging between git's file-oriented style of development and version control and Medley's residential development style with its own version control conventions. GITFNS allows for intelligent comparisons between Lisp source files, Tedit files, and text files in a local git clone and a local Medley-style working directory, and for migrating files to and from the git clone and the working directory.
Git projects: Connecting git clones to GITFNS capabilities
The GITFNS capabilities operate on pre-existing clones of remote git repositories that have been installed at the end of some path on the local disk. The path to a clone can be used to create a "git project" for that clone:
(GIT-MAKE-PROJECT PROJECTNAME PROJECTPATH WORKINGPATH EXCLUSIONS
DEFAULTSUBDIRS) [function]
The GITFNS capabilities operate on pre-existing clones of remote git repositories that have been installed at the end of some path on the local disk. The path to a clone can be used to create a GITFNS "project" for that clone:
(GIT-MAKE-PROJECT PROJECTNAME CLONEPATH WORKINGPATH EXCLUSIONS
DEFAULTSUBDIRS) [Function]
where
PROJECTNAME is the name of the project (e.g. MEDLEY, NOTECARDS, LOOPS...)
PROJECTPATH is the local path to the clone
(e.g. {dsk}<users>...>git-medley)
PROJECTNAME is the name of the project (e.g. MEDLEY, NOTECARDS, LOOPS...)
CLONEPATH specifies the local path to the clone
e.g. {dsk}<users>...>git-medley
WORKINGPATH is optionally the local path to a corresponding Medley-residential working directory (e.g. {dsk}<users>...>working-medley>)
When the project has a WORKINGPATH:
EXCLUSIONS is a list of files and directories to be excluded from comparisons (beyond what its .GITIGNORE specifies)
When the project has a working path:
EXCLUSIONS is a list of files and directories to be excluded from comparisons (including what its .gitignore specifies)
DEFAULTSUBDIRS is a list of subdirectories to be use in working-path comparisons when directories are not otherwise specified.
For convenience, if PROJECTPATH is NIL or T (and not a path), then a squence of probes based on PROJECTNAME attempts to find a clone directory (with a .git subdirectory):
(UNIX-GETENV PROJECTNAME)
(UNIX-GETENV (CONCAT PROJECTNAME 'DIR)
(CONCAT MEDLEYDIR "../git-" PROJECTNAME)
For convenience, if CLONEPATH is NIL or T (and not a path), then a sequence of probes based on PROJECTNAME attempts to find a clone directory (with a .git subdirectory):
(UNIX-GETENV PROJECTNAME) e.g. (UNIX-GETENV 'LOOPS)
(UNIX-GETENV (CONCAT PROJECTNAME "DIR") e.g.{UNIX-GETENV 'LOOPSDIR)
(MEDLEYDIR PROJECTNAME)) a subdirectory of MEDLEYDIR
(MEDLEYDIR (CONCAT "../" PROJECTNAME)) a sister of MEDLEYDIR
(MEDLEYDIR (CONCAT "../git-" PROJECTNAME)
(a sister of MEDLEYDIR named git-PROJECTNAME, e.g. git-notecards)
Thus:
If MEDLEYDIR is defined,
(GIT-MAKE-PROJECT 'MEDLEY) will make the MEDLEY project
(GIT-MAKE-PROJECT 'MEDLEY) will make the MEDLEY project
If NOTECARDS is defined
(GIT-MAKE-PROJECT 'NOTECARDS) will make the NOTECARDS project
If NOTECARDS is not defined but the clone >git-notecards> is a sister of MEDLEYDIR, then the NOTECARDS project will still be created.
If a clone is discovered and a project is created, the value of GIT-MAKE-PROJECT is PROJECTNAME. Otherwise, NIL will be returned if PROJECTPATH is T (= no-error), and PROJECTPATH=NIL will result in an error.
If a clone is discovered and a project is created, the value of GIT-MAKE-PROJECT is PROJECTNAME. Otherwise, NIL will be returned if CLONEPATH is T (= no-error), and CLONEPATH=NIL will result in an error.
When they are created, git projects are registered by name on the a-list GIT-PROJECTS, and they can otherwise be referenced by their names.
The variable GIT-DEFAULT-PROJECT, initially MEDLEY, contains the project name used by the commands below when the optional PROJECTNAME argument is not provided.
GIT-MAKE-PROJECT creates a pseudohost {projectname} whose path prefix is the path that resolved to the clone. The file GITFNS in the clone LISPUSERS directory, for example, can be referenced as {MEDLEY}<LISPUSERS>GITFNS.
GIT-MAKE-PROJECT will also create a pseudohost {Wprojectname} for the user's working environment for the project. If WORKINGPATH is provided, that will be the prefix for that pseudohost. If WORKINGPATH is NIL and a directory named working-projectname> is a sister to the clone directory, the pseudohost will point to that.
When GITFNS is loaded, GIT-MAKE-PROJECT is called for MEDLEY, NOTECARDS, and LOOPS, with PROJECTPATH=T. Thus, those projects will be created automatically, if MEDLEYDIR is defined and the relevant directories exist in their expected relative positions.
When they are created, GIT-PROJECTS are registered by name on the a-list GIT-PROJECTS, and they can otherwise be referenced by their names.
The variable GIT-DEFAULT-PROJECT, initially MEDLEY, contains the project name used by the commands below when the optional projectname argument is not provided.
GIT-MAKE-PROJECT also creates a pseudohost {Gprojectname} whose path prefix is the prefix for the project's clone. If WORKINGPATH is provided, then a second pseudohost {Wprojectname} points to the working files for the project.
GITFNS also defines two directory-connecting commands for conveniently connecting to the git and working pseudohosts of a project:
cdg (projectname) (subdir) [command]
cdw (projectname) (subdir) [command
For example, cdg notecards library connects to {GNOTECARDS}/library/.
(GIT-INIT EVENT) [Function]
GIT-INIT creates the default set of projects when GITFNS is loaded, as specified in the variable GIT-DEFAULT-PROJECTS, initially containing MEDLEY NOTECARDS LOOPS TEST. GIT-INIT is added to AROUNDEXITFNS so that new pseudohost bindings for the default projects will be created if the sysout or makesys is started on a new machine.
GIT-DEFAULT-PROJECTS [Variable]
Determines the projects that are created (or recreated) by GIT-INIT. This is initialized for the MEDLEY NOTECARDS LOOPS TEST projects, with CLONEPATH=NIL GITFNS also defines two directory-connecting commands for conveniently connecting to the git and working pseudohosts of a project:
cdg (projectname) (subdir) [Command]
cdw (projectname) (subdir) [Command]
For example, cdg notecards library connects to {NOTECARDS}/library/.
Comparing directories and files in different git branches
In its simplest application, GITFNS is just an off-to-the-side add-on to whatever work practices the user has developed with respect to a locally installed git project. Its only advantage is to allow for more interpretable git-branch comparisons, especially for pull-request approval. These comparisons are provided by the prc ("pull request compare") Medley executive command:
prc (branch) (DRAFT) (projectname) [command]
This compares the files in branch against the files in the main branch of the project (origin/master or origin/main). Thus, suppose that a pull request has been issued on github for a particular branch, say branch rmk15 of the default project. Then
prc rmk15
prc (branch) (DRAFT) (projectname) [Command] This compares the files in branch against the files in the main branch of the project (origin/master or origin/main). Thus, suppose that a pull request has been issued on github for a particular branch, say branch rmk15 of the default project. Then prc rmk15
brings up a lispusers/COMPAREDIRECTORIES browser for the files that currently differ between origin/rmk15 and origin/master. If the selected files are Lisp source files, the Compare item on the file browser menu will show the differences in a lispusers/COMPARESOURCES browser. The differences for other file types will be shown in a lispusers/COMPARETEXT browser.
If branch is not specified and the shell command gh is available, then a menu of open pull-request branches will be provided. If gh is not available, the menu will offer all known branches. If the optional DRAFT is provided, then the menu will include draft PR's as well as open ones.
If one PR, say rmk15, contains all the commits of another (rmk14), then the menu will indicate this by
rmk15 > rmk14
Note that the prc comparison is read-only: any comments, approvals, or merges of the branch must be specified using the normal Medley-external git interfaces and commands.
prc is the special case of the more general bbc command ("branch-branch compare) for comparing the files in any two branches:
bbc branch1 branch2 (project) [command]
This compares the files in branch1 and branch2, for example
Note that the prc comparison is read-only: any comments, approvals, or merges of the branch must be specified using the normal Medley-external git interfaces and commands. prc is the special case of the more general bbc command ("branch-branch compare") for comparing the files in any two branches:
bbc branch1 branch2 (project) [Command] This compares the files in branch1 and branch2, for example
bbc rmk15 lmm12 (local)
This will compare the files in origin/rmk15 and origin/lmm12 in the GIT-DEFAULT project. branch1 defaults to the origin files of the currently checked out branch, the second defaults to origin/master. If local is non-NIL, then a branch that has neither local/ or origin/ prepended will default to local (e.g. local/rmk15) instead of origin/. Local refers to the files that are currently in the clone directory, which may not be the same as the origin files, depending on the push/pull status.
Either of the branches can be specified with an atom LOCAL, REMOTE, or ORIGIN, in which case bbc will offer menus listing the currently existing branches of that type.
NOTE: Branch comparison makes use of a git command that has a limit (diff.renameLimit) on the number of files that it can successfully compare. A message will be printed if that limit is exceeded, asking whether a larger value for that limit should be applied globally.
The command cob ("check out branch") checks out a specified branch:
cob branch (nexttitlestring) (project) [command]
NOTE: Branch comparison makes use of a git command that has a limit (diff.renameLimit) on the number of files that it can successfully compare. A message will be printed if that limit is exceeded, asking whether a larger value for that limit should be applied globally. The command cob ("check out branch") checks out a specified branch:
cob branch (next-title-string) (project) [Command]
This checks out branch of project and then executes git pull. The branch parameter may also be a local branch, T (= the current working branch), or NEW/NEXT (= the next working branch). The current working branch is the branch named <initials>nnn, e.g. rmk15. The initials are the value of INITIALS as used for SEDIT time stamps, and nnn is the largest of the integers of all of the branches beginning with those initials.
If branch is NEW or NEXT, then a new initialed branch is created and becomes the user's current branch. Its number is one greater than the largest number of previous initialed branches. If nexttitlestring is provided, then that string will be appended to the name of the branch, after the initials and next number, and two hyphens. Spaces in nexttitlestring will also be replaced by hyphens, according to git conventions.
If branch is not provided, a menu of locally available branches pops up.
The currently checked out branch is obtained by the b? command:
b? (project) [command]
If branch is NEW or NEXT, then a new initialed branch is created and becomes the user's current branch. Its number is one greater than the largest number of previous initialed branches. If next-title-string is provided, then that string will be appended to the name of the branch, after the initials and next number, and two hyphens. Spaces in next-title-string will also be replaced by hyphens, according to git conventions.
If branch is not provided, a menu of locally available branches pops up. The currently checked out branch is obtained by the b? command:
b? (project) [Command]
Correlating git source control with separate Medley development
It is generally unsafe to do Medley development by operating with files in a local clone repository. Medley provides a residential development environment that integrates tightly with the local file system. It is important to have consistent access to the source files of the currently running system, especially for files whose contents have been only partially loaded. A git pull or a branch switch that introduces new versions of some files or removes old files altogether can lead to unpredictable disconnects that are hard to recover from. This is true also because development can go on in the same Medley memory image for days if not weeks, so it is important to have explicit control of any file version changes.
GITFNS mitigates the danger by conventions that separate the files in the git clone from the files in the working Medley development directory. The location of the Medley development source tree for a project is given by the WORKINGPATH argument to GIT-MAKE-PROJECT. If WORKINGPATH is T or NIL and there exists a directory >working-projectname> as a sister to the clone, then that is taken to be the WORKINGPATH and thus the prefix for a pseudohost {Wprojectname}.
When Medley development is carried out in the WORKINGPATH, the variable MEDLEYDIR should point initially to the working directory, and the directory search paths (DIRECTORIES, LISPUSERSDIRECTORIES, FONTDIRECTORIES, etc.) all have MEDLEYDIR (or {WMEDLEY}) as a prefix. In that case, the clone for the project, if PROJECTPATH doesn't specify it explicitly, should be located at the >git-medley> sister directory of MEDLEYDIR.
Any back and forth transfer of information between the git clone and Medley development must be done by explicit synchronization actions. Crucially, Medley-updated files do not appear in the clone directories and new clone files do not move to the Medley directories without user intervention.
The files in Medley working tree and the git clone of a project can be compared with the gwc ("git-working-compare") command:
gwc subdirectories (project) [command]
This produces a browser for all the files in the corresponding WORKINGPATH subdirectories that differ from the files in the currently checked out branch of the git clone. If subdirectories is omitted, it defaults to the DEFAULTSUBDIRS of the project. If it is ALL, then files in all subdirectories that are not found in the project's EXCLUSIONS are compared.
In addition to the commands for comparing and viewing files, the menu for this browser also has commands for copying files from the git clone {Gprojectname} to {Wprojectname} and deleting files from {Wprojectname}.
gwc subdirectories (project) [Command]
This produces a browser for all the files in the corresponding WORKINGPATH subdirectories that differ from the files in the currently checked out branch of the git clone. If subdirectories is omitted, it defaults to the DEFAULTSUBDIRS of the project. If it is ALL, then files in all subdirectories that are not found in the project's EXCLUSIONS are compared.
In addition to the commands for comparing and viewing files, the menu for this browser also has commands for copying files from the git clone {projectname} to {Wprojectname} and deleting files from {Wprojectname}.
If the master/main branch is the current branch then the menu has no commands to change the clone directory. The browser will show those files that have been updated from a recent merge, and they can individually be copied from the git branch to realign the two source trees with incremented Medley version numbers. If the comparison is with a different branch, say the user's current staging branch, copying files from the working Medley to the git clone or deleting git files will set git up for future commits.
Note that the menu item for deleting Medley files will cause all version to be removed, not just the latest one, to avoid the possibility that an earlier one is revealed. Deletion for Medley files is also accomplished by renaming to a {Wprojectname}<deletion> subdirectory so that they can be recovered if a deletion is in error. Files in the git-clone are removed from the file system immediately, since git provides its own recovery mechanism for those files.
GITFNS does not (yet?) include functions for commits, pushes, or merges for updating the remote repository. Those have to be done outside of Medley through the usual github interfaces, as guided by the information provided by the comparisons.
(LIST ((PAGE NIL (PAPERSIZE Letter FOLIOINFO (ARABIC) STARTINGPAGE# 1) (0 0 612 792) ((FOLIO NIL (PARALOOKS (QUAD CENTERED) CHARLOOKS (SUPERSCRIPT 0 INVISIBLE OFF SELECTPOINT OFF PROTECTED OFF SIZE 10 FAMILY MODERN OVERLINE OFF STRIKEOUT OFF UNDERLINE OFF EXPANSION REGULAR SLOPE REGULAR WEIGHT MEDIUM INVERTED OFF USERINFO NIL STYLE NIL) FORMATINFO (ARABIC)) (174 36 288 36) NIL) (HEADING NIL (HEADINGTYPE RUNNINGHEAD) (84 744 528 36) NIL) (TEXT NIL NIL (84 96 456 600) NIL))) (PAGE NIL (PAPERSIZE Letter FOLIOINFO (ARABIC)) (0 0 612 792) ((FOLIO NIL (PARALOOKS (QUAD CENTERED) CHARLOOKS (SUPERSCRIPT 0 INVISIBLE OFF SELECTPOINT OFF PROTECTED OFF SIZE 10 FAMILY MODERN OVERLINE OFF STRIKEOUT OFF UNDERLINE OFF EXPANSION REGULAR SLOPE REGULAR WEIGHT MEDIUM INVERTED OFF USERINFO NIL STYLE NIL) FORMATINFO (ARABIC)) (174 36 288 36) NIL) (HEADING NIL (HEADINGTYPE RUNNINGHEAD) (84 744 528 36) NIL) (TEXT NIL NIL (84 96 456 600) NIL))) (PAGE NIL (PAPERSIZE Letter FOLIOINFO (ARABIC)) (0 0 612 792) ((FOLIO NIL (PARALOOKS (QUAD CENTERED) CHARLOOKS (SUPERSCRIPT 0 INVISIBLE OFF SELECTPOINT OFF PROTECTED OFF SIZE 10 FAMILY MODERN OVERLINE OFF STRIKEOUT OFF UNDERLINE OFF EXPANSION REGULAR SLOPE REGULAR WEIGHT MEDIUM INVERTED OFF USERINFO NIL STYLE NIL) FORMATINFO (ARABIC)) (174 36 288 36) NIL) (HEADING NIL (HEADINGTYPE RUNNINGHEAD) (84 744 528 36) NIL) (TEXT NIL NIL (84 96 456 600) NIL))))) .È4 ÈÈ4 ÈÈ4ÈÈ4ÈÈ4ÈÈ4ÈÈ4È È4ÈÈ.È.ŠŠ8.ŠŠ8JÈÈ PAGEHEADING RUNNINGHEADTERMINAL
Note that the menu item for deleting Medley files will cause all versions to be removed, not just the latest one, to avoid the possibility that an earlier one is revealed. Deletion for Medley files is also accomplished by renaming to a {Wprojectname}<deleted> subdirectory so that they can be recovered if a deletion is in error. Files in the git-clone are removed from the file system immediately, since git provides its own recovery mechanism for those files.
GITFNS does not (yet?) include functions for commits, pushes, or merge for updating the remote repository. Those have to be done outside of Medley through the usual github interfaces, as guided by the information provided by the comparisons.
(LIST ((PAGE NIL (PAPERSIZE Letter FOLIOINFO (ARABIC) STARTINGPAGE# 1) (0 0 612 792) ((FOLIO NIL (PARALOOKS (QUAD CENTERED) CHARLOOKS (SUPERSCRIPT 0 INVISIBLE OFF SELECTPOINT OFF PROTECTED OFF SIZE 10 FAMILY MODERN OVERLINE OFF STRIKEOUT OFF UNDERLINE OFF EXPANSION REGULAR SLOPE REGULAR WEIGHT MEDIUM INVERTED OFF USERINFO NIL STYLE NIL) FORMATINFO (ARABIC)) (174 36 288 36) NIL) (HEADING NIL (HEADINGTYPE RUNNINGHEAD) (84 744 528 36) NIL) (TEXT NIL NIL (84 96 456 600) NIL))) (PAGE NIL (PAPERSIZE Letter FOLIOINFO (ARABIC)) (0 0 612 792) ((FOLIO NIL (PARALOOKS (QUAD CENTERED) CHARLOOKS (SUPERSCRIPT 0 INVISIBLE OFF SELECTPOINT OFF PROTECTED OFF SIZE 10 FAMILY MODERN OVERLINE OFF STRIKEOUT OFF UNDERLINE OFF EXPANSION REGULAR SLOPE REGULAR WEIGHT MEDIUM INVERTED OFF USERINFO NIL STYLE NIL) FORMATINFO (ARABIC)) (174 36 288 36) NIL) (HEADING NIL (HEADINGTYPE RUNNINGHEAD) (84 744 528 36) NIL) (TEXT NIL NIL (84 96 456 600) NIL))) (PAGE NIL (PAPERSIZE Letter FOLIOINFO (ARABIC)) (0 0 612 792) ((FOLIO NIL (PARALOOKS (QUAD CENTERED) CHARLOOKS (SUPERSCRIPT 0 INVISIBLE OFF SELECTPOINT OFF PROTECTED OFF SIZE 10 FAMILY MODERN OVERLINE OFF STRIKEOUT OFF UNDERLINE OFF EXPANSION REGULAR SLOPE REGULAR WEIGHT MEDIUM INVERTED OFF USERINFO NIL STYLE NIL) FORMATINFO (ARABIC)) (174 36 288 36) NIL) (HEADING NIL (HEADINGTYPE RUNNINGHEAD) (84 744 528 36) NIL) (TEXT NIL NIL (84 96 456 600) NIL))))).È.È4 ÈÈ4 ÈÈ4ÈÈ4ÈÈ4ÈÈ4ÈÈ4È È4ÈÈ.È.ŠŠ8.ŠŠ8JÈÈ PAGEHEADING RUNNINGHEADTERMINAL
MODERN
TIMESROMAN$TERMINALMODERN
MODERN MODERN
MODERN
  HRULE.GETFN  HRULE.GETFNMODERN
  HRULE.GETFNMODERN
   HRULE.GETFNMODERN   HRULE.GETFNMODERN 
 ,  R Íè  ; âB1 L-.Š$w a  <00>     / 27#h ð  ß  n  ƒ  Ç ƒ ( 'G  !    =c    5  3 $  
 Ç,  I   À  )1          <ö 5H -  & 0   %9"?  M  s  I  ""    ¾   w 6 D l  BZ D
Ù D -. (  2   D   Uf
< D  õz D  œ.D
 HRULE.GETFNMODERN
  HRULE.GETFNMODERN
  HRULE.GETFNMODERN
   HRULE.GETFNMODERN   HRULE.GETFNMODERN  
1

R
Íé

;
¹@,

 "  &  \ 
X
 p  6 ,
 
)
 
) 
+      5     
@ &  
I 7
 o
 E .
8 > I


Y  

$
; 
}
(
) 9
!
0
4  c
 
5  vB 
1OLJ
''

œ
)2
+
 

    Z !  œ
5H

5
5
>$N ! M
§A
@
4

@Ô
â   k 6.  R   < 9  
'
Y" ( ? F 
<00>

ìË
ò1Sýzº

View File

@@ -1,15 +1,15 @@
(DEFINE-FILE-INFO PACKAGE "INTERLISP" READTABLE "INTERLISP" BASE 10)
(FILECREATED "12-Oct-2022 18:33:26" {DSK}<home>frank>il>medley>wmedley>lispusers>HELPSYS.;4 87708
(FILECREATED "13-Jan-2023 10:46:39" {DSK}<home>larry>il>medley>lispusers>HELPSYS.;2 87610
:CHANGES-TO (FNS CLHS.LOOKUP)
:CHANGES-TO (VARS HELPSYSCOMS)
(FNS REPO.LOOKUP)
:PREVIOUS-DATE "12-Oct-2022 18:24:45" {DSK}<home>frank>il>medley>wmedley>lispusers>HELPSYS.;3
)
:PREVIOUS-DATE "12-Oct-2022 18:33:26" {DSK}<home>larry>il>medley>lispusers>HELPSYS.;1)
(* ; "
Copyright (c) 1985-1987, 2020, 2022 by Xerox Corporation.
Copyright (c) 1985-1987, 2020, 2022-2023 by Xerox Corporation.
")
(PRETTYCOMPRINT HELPSYSCOMS)
@@ -34,8 +34,8 @@ Copyright (c) 1985-1987, 2020, 2022 by Xerox Corporation.
[INITVARS (CLHS.ROOT.URL "http://clhs.lisp.se/")
(CLHS.INDEX)
(CLHS.OPENER)
(REPO.TYPES '(FNS FUNCTIONS VARS VARIABLES]
(GLOBALVARS CLHS.INDEX CLHS.OPENER REPO.TYPES CLHS.ROOT.URL))
(HELPSYS.REPO.TYPES '(FNS FUNCTIONS VARS VARIABLES]
(GLOBALVARS CLHS.INDEX CLHS.OPENER HELPSYS.REPO.TYPES CLHS.ROOT.URL))
(COMS
(* ;;; "Interface to DInfo")
@@ -322,12 +322,11 @@ Copyright (c) 1985-1987, 2020, 2022 by Xerox Corporation.
else "git web--browse"])
(REPO.LOOKUP
[LAMBDA (ENTRY TYPES) (* ; "Edited 24-Aug-2022 16:54 by larry")
(* ; "Edited 21-Aug-2022 15:54 by lmm")
(* ; "Edited 19-Aug-2022 20:18 by lmm")
[LAMBDA (ENTRY TYPES) (* ; "Edited 13-Jan-2023 10:46 by lmm")
(* ; "Edited 16-Aug-2022 16:26 by lmm")
(for FL in (WHEREIS ENTRY (OR TYPES REPO.TYPES)
T) bind POS FND
(for FL in (UNION (WHEREIS ENTRY (OR TYPES HELPSYS.REPO.TYPES)
T)
(LIST ENTRY)) bind POS FND
when [SETQ FND (OR (FINDFILE-WITH-EXTENSIONS FL NIL '(TEDIT TXT TED))
(AND (SETQ POS (STRPOS "-" FL))
(FINDFILE-WITH-EXTENSIONS (SUBSTRING FL 1 (CL:1- POS))
@@ -1334,10 +1333,10 @@ Copyright (c) 1985-1987, 2020, 2022 by Xerox Corporation.
(RPAQ? CLHS.OPENER )
(RPAQ? REPO.TYPES '(FNS FUNCTIONS VARS VARIABLES))
(RPAQ? HELPSYS.REPO.TYPES '(FNS FUNCTIONS VARS VARIABLES))
(DECLARE%: DOEVAL@COMPILE DONTCOPY
(GLOBALVARS CLHS.INDEX CLHS.OPENER REPO.TYPES CLHS.ROOT.URL)
(GLOBALVARS CLHS.INDEX CLHS.OPENER HELPSYS.REPO.TYPES CLHS.ROOT.URL)
)
@@ -1698,15 +1697,15 @@ Copyright (c) 1985-1987, 2020, 2022 by Xerox Corporation.
(ADDTOVAR AROUNDEXITFNS \IRM.AROUND-EXIT)
(PUTPROPS HELPSYS FILETYPE :FAKE-COMPILE-FILE)
(PUTPROPS HELPSYS COPYRIGHT ("Xerox Corporation" 1985 1986 1987 2020 2022))
(PUTPROPS HELPSYS COPYRIGHT ("Xerox Corporation" 1985 1986 1987 2020 2022 2023))
(DECLARE%: DONTCOPY
(FILEMAP (NIL (4630 10205 (HELPSYS 4640 . 6481) (IRM.LOOKUP 6483 . 8121) (GENERIC.MAN.LOOKUP 8123 .
9792) (IRM.RESET 9794 . 10203)) (10462 17569 (CLHS.INDEX 10472 . 13170) (CLHS.LOOKUP 13172 . 15072) (
CLHS.OPENER 15074 . 16397) (REPO.LOOKUP 16399 . 17567)) (70641 72159 (IRM.GET.DINFOGRAPH 70651 . 71526
) (IRM.DISPLAY.REF 71528 . 72157)) (72161 72523 (IRM.LOAD-GRAPH 72161 . 72523)) (72848 78352 (
IRM.DISPLAY.CREF 72858 . 74572) (IRM.CREF.BOX 74574 . 75401) (IRM.PUT.CREF 75403 . 75628) (
IRM.GET.CREF 75630 . 76001) (IRM.CREF.BUTTONEVENTFN 76003 . 78350)) (78907 87213 (\IRM.GET.REF 78917
. 80248) (\IRM.SMART.REF 80250 . 82177) (\IRM.CHOOSE.REF 82179 . 83430) (\IRM.WILD.REF 83432 . 84687)
(\IRM.WILDCARD 84689 . 85055) (\IRM.WILD.MATCH 85057 . 86287) (\IRM.GET.HASHFILE 86289 . 86752) (
\IRM.GET.KEYWORDS 86754 . 87211)) (87350 87506 (\IRM.AROUND-EXIT 87350 . 87506)))))
(FILEMAP (NIL (4671 10246 (HELPSYS 4681 . 6522) (IRM.LOOKUP 6524 . 8162) (GENERIC.MAN.LOOKUP 8164 .
9833) (IRM.RESET 9835 . 10244)) (10503 17450 (CLHS.INDEX 10513 . 13211) (CLHS.LOOKUP 13213 . 15113) (
CLHS.OPENER 15115 . 16438) (REPO.LOOKUP 16440 . 17448)) (70538 72056 (IRM.GET.DINFOGRAPH 70548 . 71423
) (IRM.DISPLAY.REF 71425 . 72054)) (72058 72420 (IRM.LOAD-GRAPH 72058 . 72420)) (72745 78249 (
IRM.DISPLAY.CREF 72755 . 74469) (IRM.CREF.BOX 74471 . 75298) (IRM.PUT.CREF 75300 . 75525) (
IRM.GET.CREF 75527 . 75898) (IRM.CREF.BUTTONEVENTFN 75900 . 78247)) (78804 87110 (\IRM.GET.REF 78814
. 80145) (\IRM.SMART.REF 80147 . 82074) (\IRM.CHOOSE.REF 82076 . 83327) (\IRM.WILD.REF 83329 . 84584)
(\IRM.WILDCARD 84586 . 84952) (\IRM.WILD.MATCH 84954 . 86184) (\IRM.GET.HASHFILE 86186 . 86649) (
\IRM.GET.KEYWORDS 86651 . 87108)) (87247 87403 (\IRM.AROUND-EXIT 87247 . 87403)))))
STOP

Binary file not shown.

View File

@@ -1,12 +1,10 @@
(DEFINE-FILE-INFO PACKAGE "INTERLISP" READTABLE "INTERLISP" BASE 10)
(FILECREATED "14-Jul-2022 17:54:43" 
{DSK}<Users>kaplan>Local>medley3.5>working-medley>lispusers>PSEUDOHOSTS.;150 27644
(FILECREATED "31-Oct-2022 23:32:43" {WMEDLEY}<lispusers>PSEUDOHOSTS.;151 27537
:CHANGES-TO (FNS OPENFILE.PH)
:PREVIOUS-DATE "25-Jun-2022 17:24:45"
{DSK}<Users>kaplan>Local>medley3.5>working-medley>lispusers>PSEUDOHOSTS.;149)
:PREVIOUS-DATE "14-Jul-2022 17:54:43" {WMEDLEY}<lispusers>PSEUDOHOSTS.;150)
(PRETTYCOMPRINT PSEUDOHOSTSCOMS)
@@ -314,6 +312,8 @@
(OPENFILE.PH
[LAMBDA (FILE ACCESS RECOG OTHERINFO FDEV OLDSTRING)
(* ;; "Edited 31-Oct-2022 23:32 by rmk")
(* ;; "Edited 14-Jul-2022 17:53 by rmk")
(* ;; "Edited 25-Jun-2022 17:06 by rmk: If the stream was opened through the pseudohost, then it should only be registered on the pseudohost. We assume that it is safe to remove it from the target hosts list. The goal is that OPENP should only see it once, as being open on the pseudohost.")
@@ -325,12 +325,11 @@
(LET ((TARGETDEV (FETCH (PHDEVICE TARGETDEV) OF FDEV))
(STREAM (PSEUDOHOST.TARGETVAL OPENFILE (FILE ACCESS RECOG OTHERINFO FDEV OLDSTRING)
FDEV)))
(IF STREAM
THEN (FDEVOP 'UNREGISTERFILE TARGETDEV TARGETDEV STREAM)
(CHANGE (FETCH (STREAM FULLFILENAME) OF STREAM)
(CONTRACT.PH DATUM FDEV))
(REPLACE (STREAM DEVICE) OF STREAM WITH FDEV)
ELSE (ERROR "File not found: " FILE))
(CL:WHEN STREAM
(FDEVOP 'UNREGISTERFILE TARGETDEV TARGETDEV STREAM)
(CHANGE (FETCH (STREAM FULLFILENAME) OF STREAM)
(CONTRACT.PH DATUM FDEV))
(REPLACE (STREAM DEVICE) OF STREAM WITH FDEV))
STREAM])
(GETFILENAME.PH
@@ -524,13 +523,13 @@
(LOAD 'EXPORTS.ALL))
)
(DECLARE%: DONTCOPY
(FILEMAP (NIL (1350 9382 (PSEUDOHOST 1360 . 6919) (PSEUDOHOSTP 6921 . 7434) (PSEUDOHOSTS 7436 . 7793)
(TARGETHOST 7795 . 8069) (TRUEFILENAME 8071 . 8758) (PSEUDOFILENAME 8760 . 9380)) (9410 16949 (
EXPAND.PH 9420 . 10673) (CONTRACT.PH 10675 . 13340) (SLASHIT 13342 . 14910) (UNSLASHIT 14912 . 16658)
(GETHOSTINFO.PH 16660 . 16947)) (16950 24979 (OPENFILE.PH 16960 . 18058) (GETFILENAME.PH 18060 . 18349
) (DIRECTORYNAMEP.PH 18351 . 18975) (CLOSEFILE.PH 18977 . 19444) (REOPENFILE.PH 19446 . 20011) (
DELETEFILE.PH 20013 . 20297) (OPENP.PH 20299 . 20594) (UNREGISTERFILE.PH 20596 . 21138) (
REGISTERFILE.PH 21140 . 21674) (GENERATEFILES.PH 21676 . 22716) (GETFILEINFO.PH 22718 . 23020) (
SETFILEINFO.PH 23022 . 23221) (NEXTFILEFN.PH 23223 . 23765) (FILEINFOFN.PH 23767 . 24038) (
RENAMEFILE.PH 24040 . 24977)))))
(FILEMAP (NIL (1268 9300 (PSEUDOHOST 1278 . 6837) (PSEUDOHOSTP 6839 . 7352) (PSEUDOHOSTS 7354 . 7711)
(TARGETHOST 7713 . 7987) (TRUEFILENAME 7989 . 8676) (PSEUDOFILENAME 8678 . 9298)) (9328 16867 (
EXPAND.PH 9338 . 10591) (CONTRACT.PH 10593 . 13258) (SLASHIT 13260 . 14828) (UNSLASHIT 14830 . 16576)
(GETHOSTINFO.PH 16578 . 16865)) (16868 24872 (OPENFILE.PH 16878 . 17951) (GETFILENAME.PH 17953 . 18242
) (DIRECTORYNAMEP.PH 18244 . 18868) (CLOSEFILE.PH 18870 . 19337) (REOPENFILE.PH 19339 . 19904) (
DELETEFILE.PH 19906 . 20190) (OPENP.PH 20192 . 20487) (UNREGISTERFILE.PH 20489 . 21031) (
REGISTERFILE.PH 21033 . 21567) (GENERATEFILES.PH 21569 . 22609) (GETFILEINFO.PH 22611 . 22913) (
SETFILEINFO.PH 22915 . 23114) (NEXTFILEFN.PH 23116 . 23658) (FILEINFOFN.PH 23660 . 23931) (
RENAMEFILE.PH 23933 . 24870)))))
STOP

Binary file not shown.

View File

@@ -1,13 +1,16 @@
(DEFINE-FILE-INFO PACKAGE "IL" READTABLE "INTERLISP" BASE 10)
(FILECREATED "26-Mar-2021 11:01:59" {DSK}<home>larry>ilisp>medley>lispusers>WHO-LINE.;4 74359
(DEFINE-FILE-INFO PACKAGE "INTERLISP" READTABLE "INTERLISP" BASE 10)
changes to%: (VARS WHO-LINECOMS)
(FILECREATED "12-Apr-2023 22:10:58" {DSK}<home>larry>il>medley>lispusers>WHO-LINE.;5 75086
previous date%: "26-Mar-2021 10:48:40" {DSK}<home>larry>ilisp>medley>lispusers>WHO-LINE.;3)
:EDIT-BY "lmm"
:CHANGES-TO (FNS WHO-LINE-HOST-NAME SET-PACKAGE-INTERACTIVELY)
:PREVIOUS-DATE "12-Apr-2023 17:45:36" {DSK}<home>larry>il>medley>lispusers>WHO-LINE.;4)
(* ; "
Copyright (c) 1986-1989, 1994, 1998, 2001, 2021 by Xerox Corporation.
Copyright (c) 1986-1989, 1994, 1998, 2001, 2021, 2023 by Xerox Corporation.
")
(PRETTYCOMPRINT WHO-LINECOMS)
@@ -184,7 +187,7 @@ Copyright (c) 1986-1989, 1994, 1998, 2001, 2021 by Xerox Corporation.
(FUNCTIONS INVERT-WHO-LINE-ENTRY)
(DECLARE%: DONTCOPY (RECORDS WHO-LINE-ENTRY))
(* ;
 "Macros that lets us lock down the Who-Line while we evaluate some forms")
 "Macros that lets us lock down the Who-Line while we evaluate some forms")
(FUNCTIONS WITH-WHO-LINE WITH-AVAILABLE-WHO-LINE)
@@ -567,11 +570,10 @@ Copyright (c) 1986-1989, 1994, 1998, 2001, 2021 by Xerox Corporation.
"Cached name of the current logged in user")
(CL:DEFPARAMETER *WHO-LINE-USER-ENTRY* '("User" (WHO-LINE-USERNAME)
10 WHO-LINE-CHANGE-USER (SETQ
*WHO-LINE-CURRENT-USER*
NIL)
"Name of the currently logged in user")
10 WHO-LINE-CHANGE-USER (SETQ *WHO-LINE-CURRENT-USER*
NIL)
"Name of the currently logged in user")
"Who-Line entry for displaying the name of the currently logged in user")
(DECLARE%: DONTEVAL@LOAD DONTEVAL@COMPILE
@@ -591,18 +593,35 @@ Copyright (c) 1986-1989, 1994, 1998, 2001, 2021 by Xerox Corporation.
(DEFINEQ
(WHO-LINE-HOST-NAME
(LAMBDA NIL (* ; "Edited 14-Jan-87 12:46 by smL") (* ;;; "") (* ;;; "Return the name of the curren workstation. Avoid consing up a new string if possible.") (* ;;; "") (* ;; "") (* ;; "The cached value in *WHO-LINE-HOST-NAME* gets invalidated by an entry on the list of \SYSTEMCACHEVARS") (* ;; "") (DECLARE (GLOBALVARS *WHO-LINE-HOST-NAME*)) (if *WHO-LINE-HOST-NAME* then *WHO-LINE-HOST-NAME* else (SETQ *WHO-LINE-HOST-NAME* (ETHERHOSTNAME))))
)
(WHO-LINE-HOST-NAME
[LAMBDA NIL (* ; "Edited 12-Apr-2023 22:09 by lmm")
(* ; "Edited 14-Jan-87 12:46 by smL")
(* ;;; "")
(* ;;; "Return the name of the curren workstation. Avoid consing up a new string if possible.")
(* ;;; "")
(* ;; "")
(* ;; "The cached value in *WHO-LINE-HOST-NAME* gets invalidated by an entry on the list of \SYSTEMCACHEVARS")
(* ;; "")
(DECLARE (GLOBALVARS *WHO-LINE-HOST-NAME*))
(IF *WHO-LINE-HOST-NAME*
THEN *WHO-LINE-HOST-NAME*
ELSE (SETQ *WHO-LINE-HOST-NAME* (UNIX-GETPARM "HOSTNAME"])
)
(DEFGLOBALVAR *WHO-LINE-HOST-NAME* NIL
"Cached name of the current machine, for the Who-Line")
(CL:DEFPARAMETER *WHO-LINE-HOST-NAME-ENTRY* '("on" (WHO-LINE-HOST-NAME)
10 NIL (SETQ *WHO-LINE-HOST-NAME* NIL)
"Name of the currently running machine")
10 NIL (SETQ *WHO-LINE-HOST-NAME* NIL)
"Name of the currently running machine")
"Who-Line entry for displaying the name of the current machine")
(DECLARE%: DONTEVAL@LOAD DONTEVAL@COMPILE
@@ -647,33 +666,41 @@ Copyright (c) 1986-1989, 1994, 1998, 2001, 2021 by Xerox Corporation.
":")
*WHO-LINE-PACKAGE-NAME-CACHE*)))))
(SET-PACKAGE-INTERACTIVELY
(LAMBDA NIL (* ; "Edited 18-Mar-87 13:13 by smL")
(* ;; "")
(* ;; "Let the user interactivly change the current package")
(* ;; "")
(SET-PACKAGE-INTERACTIVELY
[LAMBDA NIL (* ; "Edited 12-Apr-2023 17:44 by lmm")
(* ; "Edited 18-Mar-87 13:13 by smL")
(LET ((PACKAGE
(MENU (create MENU
TITLE _ "Select package"
ITEMS _ (SORT (for PACKAGE in (CL:LIST-ALL-PACKAGES) bind PACKAGE-NAME
collect (SETQ PACKAGE-NAME (CL:PACKAGE-NAME PACKAGE))
`(,(CONCAT (OR (CAR (CL:PACKAGE-NICKNAMES PACKAGE))
PACKAGE-NAME)
":") ',PACKAGE-NAME
,(CONCAT "Set the current package to "
PACKAGE-NAME ":")))
(FUNCTION (LAMBDA (X Y)
(ALPHORDER (CAR X)
(CAR Y)))))
CENTERFLG _ T))))
(if PACKAGE
then (if (SHIFTDOWNP 'SHIFT)
then (WHO-LINE-COPY-INSERT (CONCAT PACKAGE ":"))
else (CL:IN-PACKAGE PACKAGE))))))
(* ;; "")
(* ;; "Let the user interactivly change the current package")
(* ;; "")
(LET* [PKG (MAIN (FOR PN IN '("INTERLISP" "XCL-USER" "USER") WHEN (SETQ PKG (CL:FIND-PACKAGE
PN))
COLLECT (LIST PKG PN)))
(SYSPKG (FOR PN
IN '("LISP" "XEROX-COMMON-LISP" "D-ASSEM" "FASL" "KEYWORD" "CASH-FILE"
"SEDIT" "SYSTEM" "COMPILER" "HASH-FILE" "CONDITIONS" "DEBUGGER")
WHEN (SETQ PKG (CL:FIND-PACKAGE PN)) COLLECT (LIST PKG PN)))
(BOTH (APPEND MAIN SYSPKG))
[UNSORTED (FOR PKG IN (CL:LIST-ALL-PACKAGES) WHEN (NOT (ASSOC PKG BOTH))
COLLECT (LIST PKG (OR (CAR (CL:PACKAGE-NICKNAMES PKG))
(CL:PACKAGE-NAME PKG]
[USERS (SORT UNSORTED (FUNCTION (LAMBDA (X Y)
(ALPHORDER (CADR X)
(CADR Y]
[ITEMS (FOR X IN (APPEND MAIN USERS SYSPKG) COLLECT (LIST (CADR X)
(CAR X]
(SELECTION (MENU (create MENU
TITLE _ "Select package"
ITEMS _ ITEMS
CENTERFLG _ T]
(IF SELECTION
THEN (IF (SHIFTDOWNP 'SHIFT)
THEN (WHO-LINE-COPY-INSERT (CONCAT (CADR SELECTION)
":"))
ELSE (CL:IN-PACKAGE (CAR SELECTION])
(SET-TTY-PACKAGE-INTERACTIVELY
(LAMBDA NIL (* smL "28-Oct-86 09:49") (* ;;; "") (* ;;; "Interactivly let the user change the package of the current TTY process") (* ;;; "") (PROCESS.EVAL (TTY.PROCESS) (QUOTE (SET-PACKAGE-INTERACTIVELY)) T))
@@ -681,15 +708,15 @@ Copyright (c) 1986-1989, 1994, 1998, 2001, 2021 by Xerox Corporation.
)
(DEFGLOBALVAR *WHO-LINE-PACKAGE-NAME-CACHE* (LIST NIL)
"An AList used to cache package names, together with their terminating ':'s")
(CL:DEFPARAMETER *WHO-LINE-PACKAGE-ENTRY* '("Pkg" (CURRENT-TTY-PACKAGE)
10 SET-TTY-PACKAGE-INTERACTIVELY (SETQ
10 SET-TTY-PACKAGE-INTERACTIVELY (SETQ
*WHO-LINE-PACKAGE-NAME-CACHE*
(LIST NIL))
"Package of the current TTY process")
(LIST NIL))
"Package of the current TTY process")
"Who-Line entry for displaying the package of the current TTY process")
@@ -717,9 +744,9 @@ Copyright (c) 1986-1989, 1994, 1998, 2001, 2021 by Xerox Corporation.
)
(CL:DEFPARAMETER *WHO-LINE-READTABLE-ENTRY* '("Rdtbl" (CURRENT-TTY-READTABLE-NAME)
10 SET-TTY-READTABLE-INTERACTIVELY NIL
"Readtable of the current TTY process")
10 SET-TTY-READTABLE-INTERACTIVELY NIL
"Readtable of the current TTY process")
"Who-Line entry for displaying the name of the ReadTable of the current TTY process")
@@ -743,9 +770,9 @@ Copyright (c) 1986-1989, 1994, 1998, 2001, 2021 by Xerox Corporation.
)
(CL:DEFPARAMETER *WHO-LINE-TTY-PROC-ENTRY* '("Tty" (WHO-LINE-TTY-PROCESS)
15 CHANGE-TTY-PROCESS-INTERACTIVELY NIL
"The current TTY process")
15 CHANGE-TTY-PROCESS-INTERACTIVELY NIL
"The current TTY process")
"Who-Line entry for displaying the name of the current TTY process")
@@ -763,58 +790,59 @@ Copyright (c) 1986-1989, 1994, 1998, 2001, 2021 by Xerox Corporation.
(LAMBDA NIL (* ; "Edited 3-Feb-89 14:52 by smL") (* ;;; "Get the currently connected directory") (* ;; "First, update the cached directory / namestring pair to reflect the current TTY proc") (DECLARE (GLOBALVARS *WHO-LINE-LAST-DIRECTORY*)) (* ;; "The connected directory is looked up in the TTY process, in case one day it becomes a per-process var") (LET ((CONNECTED-DIRECTORY (PROCESS.EVALV (TTY.PROCESS) (QUOTE *DEFAULT-PATHNAME-DEFAULTS*)))) (* ; "The CAR contains the path, the CDR contains a string version of the path") (if (NEQ CONNECTED-DIRECTORY (CAR *WHO-LINE-LAST-DIRECTORY*)) then (* ; "The connected directory has changed") (change (CAR *WHO-LINE-LAST-DIRECTORY*) CONNECTED-DIRECTORY) (* ; "Put the host name last, since that is least important") (change (CDR *WHO-LINE-LAST-DIRECTORY*) (if (CL:PATHNAME-DIRECTORY CONNECTED-DIRECTORY) then (CONCAT (CL:PATHNAME-DIRECTORY CONNECTED-DIRECTORY) " on {" (CL:PATHNAME-HOST CONNECTED-DIRECTORY) "}") else (CONCAT "{" (CL:PATHNAME-HOST CONNECTED-DIRECTORY) "}"))) (* ; "Update the list of known directories") (LET ((DIR-NAME (CL:NAMESTRING CONNECTED-DIRECTORY))) (if (NOT (CL:MEMBER DIR-NAME *WHO-LINE-DIRECTORIES* :TEST (CL:FUNCTION STRING-EQUAL))) then (MERGEINSERT DIR-NAME (SORT *WHO-LINE-DIRECTORIES* (CL:FUNCTION UALPHORDER))))))) (* ;; "Return the namestring of the current dir") (CDR *WHO-LINE-LAST-DIRECTORY*))
)
(SET-CONNECTED-DIRECTORY-INTERACTIVELY
(LAMBDA NIL (* ; "Edited 9-Jun-87 08:57 by smL")
(SET-CONNECTED-DIRECTORY-INTERACTIVELY
[LAMBDA NIL (* ; "Edited 12-Apr-2023 08:00 by lmm")
(* ; "Edited 9-Jun-87 08:57 by smL")
(* ;;; "Let the user interactivly change the current connected directory")
(* ;;; "Let the user interactivly change the current connected directory")
(DECLARE (GLOBALVARS *WHO-LINE-DIRECTORIES*))
(* ;; "If the user selects an item while holding down a shift key, copy-insert the name of the directory instead of connecting to it")
(DECLARE (GLOBALVARS *WHO-LINE-DIRECTORIES*))
(if (SHIFTDOWNP 'SHIFT)
then (LET ((NEW-DIRECTORY (MENU (create MENU
(* ;; "If the user selects an item while holding down a shift key, copy-insert the name of the directory instead of connecting to it")
(SETQ *WHO-LINE-DIRECTORIES* (SUBSET *WHO-LINE-DIRECTORIES* (FUNCTION DIRECTORYNAMEP)))
(IF (SHIFTDOWNP 'SHIFT)
THEN (LET [(NEW-DIRECTORY (MENU (create MENU
TITLE _ "Type in directory name:"
ITEMS _ *WHO-LINE-DIRECTORIES*))))
(if NEW-DIRECTORY
then (WHO-LINE-COPY-INSERT NEW-DIRECTORY)))
else (LET ((NEW-DIRECTORY (MENU (create MENU
ITEMS _ *WHO-LINE-DIRECTORIES*]
(IF NEW-DIRECTORY
THEN (WHO-LINE-COPY-INSERT NEW-DIRECTORY)))
ELSE (LET [(NEW-DIRECTORY (MENU (create MENU
TITLE _ "Connect to:"
ITEMS _ (CONS "* Other *" *WHO-LINE-DIRECTORIES*)))))
(if NEW-DIRECTORY
then (if (STRING-EQUAL NEW-DIRECTORY "* Other *")
then (CLEARW PROMPTWINDOW)
ITEMS _ (CONS "* Other *" *WHO-LINE-DIRECTORIES*]
(if NEW-DIRECTORY
then (if (STRING-EQUAL NEW-DIRECTORY "* Other *")
then (CLEARW PROMPTWINDOW)
(SETQ NEW-DIRECTORY (PROMPTFORWORD "Connect to directory "
(CL:NAMESTRING (PROCESS.EVALV
(TTY.PROCESS)
'
*DEFAULT-PATHNAME-DEFAULTS*
))
NIL PROMPTWINDOW NIL 'TTY NIL)))
(if NEW-DIRECTORY
then (ALLOW.BUTTON.EVENTS) (* ;
"Should do this in the current TTY process, in case the conntected directory is a per-process var")
(CNDIR NEW-DIRECTORY)))))))
(if NEW-DIRECTORY
then (ALLOW.BUTTON.EVENTS) (* ;
 "Should do this in the current TTY process, in case the conntected directory is a per-process var")
(CNDIR NEW-DIRECTORY])
)
(DEFGLOBALVAR *WHO-LINE-DIRECTORIES* `(,LOGINHOST/DIR)
"Cached list of known directories for the Who-Line Directory entry")
(DEFGLOBALVAR *WHO-LINE-LAST-DIRECTORY* (LET ((NAMESTRING (CL:NAMESTRING
*DEFAULT-PATHNAME-DEFAULTS*)))
(CONS (PATHNAME NAMESTRING)
(MKSTRING NAMESTRING)))
(DEFGLOBALVAR *WHO-LINE-LAST-DIRECTORY* (LET ((NAMESTRING (CL:NAMESTRING *DEFAULT-PATHNAME-DEFAULTS*)
))
(CONS (PATHNAME NAMESTRING)
(MKSTRING NAMESTRING)))
"Cached name of the current connected directory for the Who-Line Directory entry")
(CL:DEFPARAMETER *WHO-LINE-DIRECTORY-ENTRY* '("Dir" (WHO-LINE-CURRENT-DIRECTORY)
30 SET-CONNECTED-DIRECTORY-INTERACTIVELY
(SETQ *WHO-LINE-LAST-DIRECTORY*
(CONS NIL NIL))
"The currently connected directory")
30 SET-CONNECTED-DIRECTORY-INTERACTIVELY
(SETQ *WHO-LINE-LAST-DIRECTORY* (CONS NIL NIL))
"The currently connected directory")
"Who-Line entry for displaying the name of the currently connected directory")
@@ -887,15 +915,14 @@ Copyright (c) 1986-1989, 1994, 1998, 2001, 2021 by Xerox Corporation.
)
(DEFGLOBALVAR *WHO-LINE-LAST-VMEM* (LIST 0 NIL NIL)
"Cached value for storing the last VMem information for the Who-Line VMem entry")
(CL:DEFPARAMETER *WHO-LINE-VMEM-ENTRY* '("VMem" (WHO-LINE-VMEM)
5 WHO-LINE-SAVE-VMEM (SETQ *WHO-LINE-LAST-VMEM*
(LIST 0 NIL NIL))
"Percentage of VMem currently in use")
"Who-Line entry for displaying the current VMem utilization")
5 WHO-LINE-SAVE-VMEM (SETQ *WHO-LINE-LAST-VMEM*
(LIST 0 NIL NIL))
"Percentage of VMem currently in use")
"Who-Line entry for displaying the current VMem utilization")
(DECLARE%: EVAL@COMPILE DONTCOPY DONTEVAL@LOAD
(FILESLOAD (LOADCOMP)
@@ -938,15 +965,13 @@ Copyright (c) 1986-1989, 1994, 1998, 2001, 2021 by Xerox Corporation.
(CL:THIRD *WHO-LINE-SYMBOL-SPACE*)))
(DEFGLOBALVAR *WHO-LINE-SYMBOL-SPACE* (LIST NIL NIL NIL
"Remembers the previous who-line symbol space"))
"Remembers the previous who-line symbol space"))
(CL:DEFPARAMETER *WHO-LINE-SYMBOL-SPACE-ENTRY* '("Syms" (WHO-LINE-SYMBOL-SPACE)
4 NIL (SETQ *WHO-LINE-SYMBOL-SPACE*
(LIST NIL NIL NIL))
"Percentage of symbol space currently in use"
)
4 NIL (SETQ *WHO-LINE-SYMBOL-SPACE*
(LIST NIL NIL NIL))
"Percentage of symbol space currently in use")
"Who-line entry for displaying percent of symbol space in use")
@@ -991,13 +1016,13 @@ Copyright (c) 1986-1989, 1994, 1998, 2001, 2021 by Xerox Corporation.
)
(DEFGLOBALVAR *WHO-LINE-TIMER* (SETUPTIMER (DIFFERENCE 60 (REMAINDER (IDATE)
60))
NIL
'SECONDS)
"Timer for controlling updates of the Who-Line Time entry")
60))
NIL
'SECONDS)
"Timer for controlling updates of the Who-Line Time entry")
(DEFGLOBALVAR *WHO-LINE-OLD-TIME* (DATE (DATEFORMAT NO.SECONDS))
"Cached value for the Who-Line Time entry")
"Cached value for the Who-Line Time entry")
(CL:DEFPARAMETER *WHO-LINE-TIME-ENTRY*
'("Time" (WHO-LINE-TIME)
@@ -1082,15 +1107,14 @@ Copyright (c) 1986-1989, 1994, 1998, 2001, 2021 by Xerox Corporation.
"Interval between updating the Who-Line activity entry")
(DEFGLOBALVAR *WHO-LINE-ACTIVE-TIMER* (SETUPTIMER *WHO-LINE-ACTIVE-PERIOD* NIL 'MILLISECONDS)
"Timer for controlling updating of the Who-Line activity entry")
(CL:DEFPARAMETER *WHO-LINE-SHOW-ACTIVE-ENTRY* '("" (WHO-LINE-SHOW-ACTIVE)
2 NIL (SETQ *WHO-LINE-ACTIVE-TIMER*
(SETUPTIMER *WHO-LINE-ACTIVE-PERIOD*
NIL 'MILLISECONDS))
"Indication of machine activity")
2 NIL (SETQ *WHO-LINE-ACTIVE-TIMER*
(SETUPTIMER *WHO-LINE-ACTIVE-PERIOD* NIL
'MILLISECONDS))
"Indication of machine activity")
"Who-Line entry for displaying the activity of the machine")
(DECLARE%: DONTEVAL@LOAD DONTEVAL@COMPILE
@@ -1122,10 +1146,10 @@ Copyright (c) 1986-1989, 1994, 1998, 2001, 2021 by Xerox Corporation.
)
(CL:DEFPARAMETER *WHO-LINE-PROFILE-ENTRY* '("Profile" (CURRENT-PROFILE)
10 SET-TTY-PROFILE-INTERACTIVELY NIL
10 SET-TTY-PROFILE-INTERACTIVELY NIL
"The read/write profile of the current TTY process"
)
)
"Who-Line entry for displaying the current read/write profile")
@@ -1176,15 +1200,15 @@ Copyright (c) 1986-1989, 1994, 1998, 2001, 2021 by Xerox Corporation.
"Cached state shown in the Who-Line State entry")
(DEFGLOBALVAR *WHO-LINE-STATE-UNINTERESTING-FNS* '(BLOCK ERRORSET OBTAIN.MONITORLOCK
MONITOR.AWAIT.EVENT AWAIT.EVENT
SI::*UNWIND-PROTECT*)
MONITOR.AWAIT.EVENT AWAIT.EVENT
SI::*UNWIND-PROTECT*)
"Uninteresting fns to skip over in the Who-Line State entry")
(CL:DEFPARAMETER *WHO-LINE-TTY-STATE-ENTRY* '("State" (WHO-LINE-TTY-STATE)
15 NIL (SETQ *WHO-LINE-STATE* NIL)
"Running state of the current TTY process")
15 NIL (SETQ *WHO-LINE-STATE* NIL)
"Running state of the current TTY process")
"Who-Line entry for showing the running state of the current TTY process")
(PUTPROPS AWAIT.EVENT WHO-LINE-STATE "Block")
@@ -1222,9 +1246,8 @@ Copyright (c) 1986-1989, 1994, 1998, 2001, 2021 by Xerox Corporation.
(DEFGLOBALVAR *WHO-LINE-ENTRIES*
`(,*WHO-LINE-USER-ENTRY* ,*WHO-LINE-PACKAGE-ENTRY* ,*WHO-LINE-READTABLE-ENTRY*
,*WHO-LINE-TTY-PROC-ENTRY* ,*WHO-LINE-DIRECTORY-ENTRY* ,*WHO-LINE-VMEM-ENTRY*
,*WHO-LINE-TIME-ENTRY*)
`(,*WHO-LINE-PACKAGE-ENTRY* ,*WHO-LINE-READTABLE-ENTRY* ,*WHO-LINE-TTY-PROC-ENTRY*
,*WHO-LINE-DIRECTORY-ENTRY* ,*WHO-LINE-VMEM-ENTRY* ,*WHO-LINE-TIME-ENTRY*)
"List of all the entries to show in the Who-Line")
(DEFGLOBALVAR *WHO-LINE-ENTRY-REGISTRY*
@@ -1235,13 +1258,13 @@ Copyright (c) 1986-1989, 1994, 1998, 2001, 2021 by Xerox Corporation.
"List of all known Who-Line entries.")
(DEFGLOBALVAR *WHO-LINE-ANCHOR* '(:CENTER :TOP)
"Location to place the Who-Line")
"Location to place the Who-Line")
(DEFGLOBALVAR *WHO-LINE-NAME-FONT* (FONTCREATE '(HELVETICA 8 BOLD))
"Font to use to show entry labels in the Who-Line")
"Font to use to show entry labels in the Who-Line")
(DEFGLOBALVAR *WHO-LINE-VALUE-FONT* (FONTCREATE '(GACHA 8))
"Font to use to show the entry values in the Who-Line")
"Font to use to show the entry values in the Who-Line")
(DEFGLOBALVAR *WHO-LINE-DISPLAY-NAMES?* T
"Flag for enabling or disabling the display of entry names in the Who-Line")
@@ -1578,15 +1601,15 @@ Copyright (c) 1986-1989, 1994, 1998, 2001, 2021 by Xerox Corporation.
(DEFMACRO INVERT-WHO-LINE-ENTRY (ENTRY WINDOW)
`(WITH WHO-LINE-ENTRY ,ENTRY (BLTSHADE BLACKSHADE ,WINDOW NAME-START 0 (DIFFERENCE VALUE-END
NAME-START)
NIL
'INVERT)
(CHANGE INVERTED? (NOT INVERTED?))))
NAME-START)
NIL
'INVERT)
(CHANGE INVERTED? (NOT INVERTED?))))
(DECLARE%: DONTCOPY
(DECLARE%: EVAL@COMPILE
(RECORD WHO-LINE-ENTRY (NAME FORM NAME-START VALUE-START VALUE-END PREV-VALUE WHEN-SELECTED-FN
INVERTED? RESET-FORM DESCRIPTION))
INVERTED? RESET-FORM DESCRIPTION))
)
)
@@ -1606,7 +1629,7 @@ Copyright (c) 1986-1989, 1994, 1998, 2001, 2021 by Xerox Corporation.
`(LET ((,LOCK (OBTAIN.MONITORLOCK (WINDOWPROP ,WHO-LINE 'LOCK)
T)))
(CL:UNWIND-PROTECT (* ;
 "Only eval the forms if we got the lock")
 "Only eval the forms if we got the lock")
(COND
(,LOCK ,@FORMS))
@@ -1614,13 +1637,13 @@ Copyright (c) 1986-1989, 1994, 1998, 2001, 2021 by Xerox Corporation.
[COND
((EQ ,LOCK T) (* ;
 "Had the lock before, so no need to release it")
 "Had the lock before, so no need to release it")
NIL)
((NULL ,LOCK) (* ;
 "Couldn't get the lock, so no need to release it")
 "Couldn't get the lock, so no need to release it")
NIL)
(T (* ;
 "We got the lock, and need to release it")
 "We got the lock, and need to release it")
(RELEASE.MONITORLOCK ,LOCK])])
@@ -1656,24 +1679,25 @@ Copyright (c) 1986-1989, 1994, 1998, 2001, 2021 by Xerox Corporation.
(PUTPROPS WHO-LINE FILETYPE :COMPILE-FILE)
)
(PUTPROPS WHO-LINE COPYRIGHT ("Xerox Corporation" 1986 1987 1988 1989 1994 1998 2001 2021))
(PUTPROPS WHO-LINE COPYRIGHT ("Xerox Corporation" 1986 1987 1988 1989 1994 1998 2001 2021 2023))
(DECLARE%: DONTCOPY
(FILEMAP (NIL (7778 23157 (INSTALL-WHO-LINE-OPTIONS 7788 . 23155)) (23433 24602 (WHO-LINE-USERNAME
23443 . 24090) (WHO-LINE-CHANGE-USER 24092 . 24398) (WHO-LINE-USER-AFTER-LOGIN 24400 . 24600)) (25504
25983 (WHO-LINE-HOST-NAME 25514 . 25981)) (26695 29324 (CURRENT-TTY-PACKAGE 26705 . 27657) (
SET-PACKAGE-INTERACTIVELY 27659 . 29078) (SET-TTY-PACKAGE-INTERACTIVELY 29080 . 29322)) (30244 31296 (
CURRENT-TTY-READTABLE-NAME 30254 . 30508) (SET-READTABLE-INTERACTIVELY 30510 . 31044) (
SET-TTY-READTABLE-INTERACTIVELY 31046 . 31294)) (31811 32383 (WHO-LINE-TTY-PROCESS 31821 . 31999) (
CHANGE-TTY-PROCESS-INTERACTIVELY 32001 . 32381)) (32884 36355 (WHO-LINE-CURRENT-DIRECTORY 32894 .
34301) (SET-CONNECTED-DIRECTORY-INTERACTIVELY 34303 . 36353)) (37720 40173 (WHO-LINE-VMEM 37730 .
39920) (WHO-LINE-SAVE-VMEM 39922 . 40171)) (41097 42239 (WHO-LINE-SYMBOL-SPACE 41097 . 42239)) (43107
44545 (WHO-LINE-TIME 43117 . 43859) (WHO-LINE-SET-TIME 43861 . 44543)) (46079 48712 (
WHO-LINE-SHOW-ACTIVE 46089 . 46867) (\UPDATE-WHO-LINE-ACTIVE-FLAG 46869 . 47837) (
\PERIODICALLY-WHO-LINE-SHOW-ACTIVE 47839 . 48710)) (49873 50798 (CURRENT-PROFILE 49883 . 50128) (
SET-PROFILE-INTERACTIVELY 50130 . 50533) (SET-TTY-PROFILE-INTERACTIVELY 50535 . 50796)) (51360 53343 (
WHO-LINE-TTY-STATE 51370 . 52531) (WHO-LINE-WHAT-IS-RUNNING 52533 . 53341)) (56897 70023 (
REDISPLAY-WHO-LINE 56907 . 59467) (PERIODICALLY-UPDATE-WHO-LINE 59469 . 60607) (SETUP-WHOLINE-TIMER
60609 . 60827) (UPDATE-WHO-LINE 60829 . 63897) (WHEN-WHO-LINE-SELECTED-FN 63899 . 67166) (
WHO-LINE-CONTROL-SELECT 67168 . 69627) (WHO-LINE-COPY-INSERT 69629 . 70021)) (70024 71158 (
WHO-LINE-REDISPLAY-INTERRUPT 70034 . 71156)))))
(FILEMAP (NIL (7838 23217 (INSTALL-WHO-LINE-OPTIONS 7848 . 23215)) (23493 24662 (WHO-LINE-USERNAME
23503 . 24150) (WHO-LINE-CHANGE-USER 24152 . 24458) (WHO-LINE-USER-AFTER-LOGIN 24460 . 24660)) (25470
26206 (WHO-LINE-HOST-NAME 25480 . 26204)) (26906 30232 (CURRENT-TTY-PACKAGE 26916 . 27868) (
SET-PACKAGE-INTERACTIVELY 27870 . 29986) (SET-TTY-PACKAGE-INTERACTIVELY 29988 . 30230)) (31132 32184 (
CURRENT-TTY-READTABLE-NAME 31142 . 31396) (SET-READTABLE-INTERACTIVELY 31398 . 31932) (
SET-TTY-READTABLE-INTERACTIVELY 31934 . 32182)) (32687 33259 (WHO-LINE-TTY-PROCESS 32697 . 32875) (
CHANGE-TTY-PROCESS-INTERACTIVELY 32877 . 33257)) (33748 37557 (WHO-LINE-CURRENT-DIRECTORY 33758 .
35165) (SET-CONNECTED-DIRECTORY-INTERACTIVELY 35167 . 37555)) (38817 41270 (WHO-LINE-VMEM 38827 .
41017) (WHO-LINE-SAVE-VMEM 41019 . 41268)) (42132 43274 (WHO-LINE-SYMBOL-SPACE 42132 . 43274)) (44005
45443 (WHO-LINE-TIME 44015 . 44757) (WHO-LINE-SET-TIME 44759 . 45441)) (46957 49590 (
WHO-LINE-SHOW-ACTIVE 46967 . 47745) (\UPDATE-WHO-LINE-ACTIVE-FLAG 47747 . 48715) (
\PERIODICALLY-WHO-LINE-SHOW-ACTIVE 48717 . 49588)) (50687 51612 (CURRENT-PROFILE 50697 . 50942) (
SET-PROFILE-INTERACTIVELY 50944 . 51347) (SET-TTY-PROFILE-INTERACTIVELY 51349 . 51610)) (52162 54145 (
WHO-LINE-TTY-STATE 52172 . 53333) (WHO-LINE-WHAT-IS-RUNNING 53335 . 54143)) (57628 70754 (
REDISPLAY-WHO-LINE 57638 . 60198) (PERIODICALLY-UPDATE-WHO-LINE 60200 . 61338) (SETUP-WHOLINE-TIMER
61340 . 61558) (UPDATE-WHO-LINE 61560 . 64628) (WHEN-WHO-LINE-SELECTED-FN 64630 . 67897) (
WHO-LINE-CONTROL-SELECT 67899 . 70358) (WHO-LINE-COPY-INSERT 70360 . 70752)) (70755 71889 (
WHO-LINE-REDISPLAY-INTERRUPT 70765 . 71887)) (72291 72677 (INVERT-WHO-LINE-ENTRY 72291 . 72677)) (
72981 73153 (WITH-WHO-LINE 72981 . 73153)) (73155 74399 (WITH-AVAILABLE-WHO-LINE 73155 . 74399)))))
STOP

Binary file not shown.

1
medley Symbolic link
View File

@@ -0,0 +1 @@
scripts/medley/medley.sh

1
release_trigger Normal file
View File

@@ -0,0 +1 @@
release trigger

View File

@@ -41,6 +41,7 @@ pass=""
mem="-m 256"
scroll=22
noscroll=""
title="Medley Interlisp"
if [ -z "$LDEDESTSYSOUT" ] ; then
if [ -z "$LOGINDIR" ] ; then
@@ -112,6 +113,10 @@ while [ "$#" -ne 0 ]; do
mem="-m $2 "
shift
;;
-title)
title="$2"
shift
;;
-vmem | --vmem | -vmfile)
export LDEDESTSYSOUT="$2"
shift
@@ -192,10 +197,10 @@ if ! command -v "$prog" > /dev/null 2>&1; then
fi
fi
echo "running: $prog $noscroll $geometry $screensize $mem $pass $LDESRCESYSOUT"
echo "running: $prog $noscroll $geometry $screensize -title \"$title\" $mem $pass $LDESRCESYSOUT"
echo "greet: $LDEINIT"
export INMEDLEY=1
"$prog" $noscroll $geometry $screensize $mem -title "Medley Interlisp" $pass "$LDESRCESYSOUT"
"$prog" $noscroll $geometry $screensize $mem -title "$title" $pass "$LDESRCESYSOUT"

View File

@@ -16,4 +16,7 @@ fi
./scripts/cpv tmp/lisp.sysout loadups
./scripts/cpv tmp/whereis.hash loadups
./scripts/cpv tmp/exports.all library
if [ "${1}" = "-apps" ]; then
./scripts/cpv tmp/apps.sysout loadups
fi

View File

@@ -7,12 +7,19 @@ if [ ! -x run-medley ] ; then
exit 1
fi
if [ "$1" = "-apps" ]; then
apps="./scripts/loadup-apps-from-full.sh"
else
apps="true"
fi
./scripts/loadup-init.sh && \
./scripts/loadup-mid-from-init.sh && \
./scripts/loadup-lisp-from-mid.sh && \
./scripts/loadup-full-from-lisp.sh && \
${apps} && \
./scripts/loadup-aux.sh && \
./scripts/copy-all.sh
./scripts/copy-all.sh $1
echo "**** DONE ****"

View File

@@ -0,0 +1,73 @@
#!/bin/bash
#set -x
# function to discover what directory this script is being executed from
where_am_i() {
# call this with ${BASH_SOURCE[0]:-$0} as its (only) parameter
local SCRIPT_PATH="$1";
pushd . > '/dev/null';
while [ -h "$SCRIPT_PATH" ];
do
cd "$( dirname -- "$SCRIPT_PATH"; )";
SCRIPT_PATH="$( readlink -f -- "$SCRIPT_PATH"; )";
done
cd "$( dirname -- "$SCRIPT_PATH"; )" > '/dev/null';
SCRIPT_PATH="$( pwd; )";
popd > '/dev/null';
echo "${SCRIPT_PATH}"
}
SCRIPTDIR=$(where_am_i "${BASH_SOURCE[0]:-$0}")
export MEDLEYDIR=$(cd ${SCRIPTDIR} && cd .. && pwd)
export ROOMSDIR=${MEDLEYDIR}/rooms
export CLOSDIR=${MEDLEYDIR}/clos
export NOTECARDSDIR=${MEDLEYDIR}/notecards
if [ ! -e ${NOTECARDSDIR} ]; then
NOTECARDSDIR=$(cd ${MEDLEYDIR}/../ && pwd)/notecards
if [ ! -e ${NOTECARDSDIR} ]; then
NOTECARDSDIR=$(cd ${MEDLEYDIR}/../../ && pwd)/notecards
if [ ! -e ${NOTECARDSDIR} ]; then
NOTECARDSDIR=""
fi
fi
fi
if [ -z "${SYSOUTDIR}" ]; then
export SYSOUTDIR=${MEDLEYDIR}/tmp
fi
if [ -z "${FULLSYSOUTPATH}" ]; then
FULLSYSOUTPATH=${SYSOUTDIR}/full.sysout
if [ ! -e ${FULLSYSOUTPATH} ]; then
FULLSYSOUTPATH=${MEDLEYDIR}/loadups/full.sysout
fi
fi
cd ${MEDLEYDIR}
scr="-sc 1024x768 -g 1042x790"
mkdir -p ${SYSOUTDIR}
touch ${SYSOUTDIR}/loadup.timestamp
./run-medley $scr -loadup "${MEDLEYDIR}/sources/LOADUP-APPS.CM" "${FULLSYSOUTPATH}"
if [ ${SYSOUTDIR}/apps.sysout -nt ${SYSOUTDIR}/loadup.timestamp ]; then
echo ---- made ----
ls -l ${SYSOUTDIR}/apps.*
echo --------------
else
echo XXXXX FAILURE XXXXX
ls -l ${SYSOUTDIR}/apps.*
exit 1
fi

View File

@@ -12,8 +12,7 @@ touch tmp/db.timestamp
scr="-sc 1024x768 -g 1042x790"
echo '" (IL:MEDLEY-INIT-VARS)(IL:FILESLOAD MEDLEY-UTILS)(IL:MAKE-FULLER-DB)(IL:LOGOUT T)"' > tmp/db.cm
./run-medley $scr -loadup "$MEDLEYDIR"/tmp/db.cm -full
./run-medley $scr -loadup "$MEDLEYDIR"/tmp/db.cm -n
if [ tmp/fuller.database -nt tmp/db.timestamp ]; then
echo ---- made ----

View File

@@ -0,0 +1,3 @@
@echo off
powershell medley.ps1 %*

410
scripts/medley/medley.ps1 Executable file
View File

@@ -0,0 +1,410 @@
###############################################################################
#
# medley.ps1 - PowerShell script for running Medley Interlisp in a Docker
# container on Windows. This script will pull the
# interlisp/medley docker container, run the container
# using the Linux medley script as the entrypoint
# passing on the flags as given to this script, and
# then start a vncviewer onto medley running in the
# container.
#
# This script can also be used to start medley in a WSL
# distro, although the same can easily be accomplished
# using the wsl command.
#
# 2023-02-10 Frank Halasz
#
# Copyright 2023 Interlisp.org
#
###############################################################################
#
# Various useful functions
#
# Function to check if docker is installed on this system
function Test-DockerInstalled {
$ErrorActionPreference = "SilentlyContinue"
if (Get-Command "docker" -Syntax)
{ return $true }
else
{ return $false }
}
# Function to check if docker is running on this system
function Test-DockerRunning {
$ErrorActionPreference = "SilentlyContinue"
docker info 2>&1 >$null
if ( $LastExitCode -eq 0 )
{ return $true }
else
{ return $false }
}
# Function to test if WSL is installed on this machine
function Test-WSLInstalled {
#$ErrorActionPreference = "SilentlyContinue"
if ((Get-Command "wsl" -Syntax) -and
(((wsl --list --verbose) -replace "`0" | Measure-Object -Line | Select -ExpandProperty Lines) -gt 1))
{ return $true }
else
{ return $false }
}
# Function to test if a named WSL distro is actually present
function Test-WSLDistro {
param($distro="unknown")
$paddedDistro= " " + $distro + " "
if ( (wsl --list --verbose) -replace "`0" | Select-String -Pattern $paddedDistro )
{ return $true }
else
{ return $false }
}
# Function to test if medley is installed (using standard installation)
# in the wsl distro whose name is the first and only arg. Defaults
# to the default wsl distro
function Test-MedleyInstalled {
param($distro)
if($distro -and (-not (Test-WSLDistro $distro)))
{
return $false
}
if ($distro)
{
$is_installed = wsl -d $distro bash -c "test -e /usr/local/interlisp; echo \`$?"
}
else
{
$is_installed = wsl bash -c "test -e /usr/local/interlisp; echo \`$?"
}
if ($is_installed -eq 0)
{
return $true
}
else
{
return $false
}
}
# Function to find an unused port between 5900 and 5999
function Find-OpenPort {
$min_port=5900
$max_port=5999
$udp_openPorts = Get-NetUDPEndpoint | Where-Object { ($_.LocalPort -ge $min_port) -and ($_.LocalPort -le $max_port) }
$tcp_openPorts = Get-NetTCPConnection | Where-Object { ($_.LocalPort -ge $min_port) -and ($_.LocalPort -le $max_port) }
$openPorts = ($udp_openPorts + $tcp_openPorts) | Select-Object -Property LocalPort | Sort-Object -Property LocalPort -Unique
$expected=$min_port;
foreach ($port in $openPorts)
{
if ( $port.LocalPort -ne $expected )
{
break;
}
else
{
${expected}++
}
}
if ($expected -gt $max_port)
{
Write-Output "Error: No available ports between 5900 and 5999."
Write-Output "Exiting."
exit 34
}
else
{
return $expected
}
}
#
# Function that processes all the arguments to this script
#
function Process-Args {
# Default values for script-scoped varaibles
$script:bg = $false
$script:draft = "latest"
$script:logindir = "${env:USERPROFILE}\AppData\Local\Medley\il"
$script:medleyArgs = @()
$script:noviewer = $false
$script:port = $false
$script:update = $false
$script:wsl = $false
$displayFlag = $false
$display = ""
# Variables local this function
$passRest = $false
$vncRequested = $false
# Loop thru args
for ( $idx = 0; $idx -lt $args.count; $idx++ ) {
$arg = $args[$idx]
if ($passRest)
{
$script:medleyArgs += $args
continue
}
switch($arg) {
{ @("-b", "--background") -contains $_ }
{
$script:bg= $true
}
{ @("-d", "--display") -contains $_ }
{
$displayFlag = $true
$display = $args[$idx+1]
if ( ($idx + 1 -gt $args.count) -or ($display -match "^-") )
{
Write-Output "Error: the `"--display`" flag is missing its value" "Exiting"
exit 33
}
if ( $display -notmatch ":[0-9]+" )
{
Write-Output "Error: the `"--display`" value is not of the form `":N`, where N is number between 0 and 63: $display" "Exiting"
exit 33
}
}
{ @("-h", "--help", "-z", "--man") -contains $_ }
{
$script:noviewer = $true
$script:medleyArgs += $_
}
{ @("-p", "--port") -contains $_ }
{
if ( ($idx + 1 -gt $args.count) -or ($args[$idx+1] -match "^-") )
{
Write-Output "Error: the `"-p / --port`" flag is missing its value" "Exiting"
exit 33
}
$script:port = $args[$idx+1]
if (( $script:port -notmatch "^[0-9]*`$" ) -or ( $script:port -le 1024) -or ( $script:port -gt 65535 ))
{
Write-Output "Error: the value of `"-p / --port`" flag is not an integer between 1025 and 65535: $script:port " "Exiting"
exit 33
}
$idx++
}
{ @("-u", "--update") -contains $_ }
{
$script:update = $true
}
{ @("-v", "--vnc") -contains $_ }
{
$vncRequested = $true
}
{ @("-w", "--wsl") -contains $_ }
{
if (-not (Test-WSLInstalled))
{
Write-Output "Error: The `"-w / --wsl`" flag was used, But WSL is not installed." "Exiting"
exit 33
}
if ( ($idx + 1 -gt $args.count) -or ($args[$idx+1] -match "^-") )
{
Write-Output "Error: the `"--wsl`" flag is missing its value" "Exiting"
exit 33
}
$script:wsl = $true
$script:wslDistro = $args[$idx + 1]
if (($script:wslDistro -ne "-") -and (-not (Test-WSLDistro $script:wslDistro)))
{
Write-Output "Error: value of `"--wsl`" flag is not an installed WsL distro: $script:wslDistro." "Exiting"
exit 33
}
if (-not (Test-MedleyInstalled $script:wslDistro))
{
Write-Output "Error: value of `"--wsl`" flag is an installed WsL distro, but Medley is not installed in standard location: $script:wslDistro." "Exiting"
exit 33
}
$idx++
}
{ @("-x", "--logindir") -contains $_ }
{
$script:logindir=$args[$idx+1]
$idx++
}
{ @("-y", "--draft") -contains $_ }
{
$script:draft="draft"
}
{ $_ -eq "--" }
{
$passRest=$true
$script:medleyArgs += $_
}
default
{
$script:medleyArgs += $_
}
}
}
if ($script:logindir)
{
if ($script:wsl)
{
$script:medleyArgs = @( "--logindir", $script:logindir) + $script:medleyArgs
}
}
if ($script:update -and $script:wsl)
{
Write-Output "Warning: Both the -u or --update flag and the -w or --wsl flags were given. "
Write-Output "The -u or --update flag is not relevant for wsl."
Write-Output "Ignoring the -u or --update flag."
}
if ($vncRequested)
{
if (-not $script:wsl)
{
Write-Output "Warning: The -v or --vnc flag is not relevant when running under docker"
Write-Output "Ignoring the -v or --vnc flag."
}
else
{
$script:medleyArgs = @( "--vnc") + $script:medleyArg
}
}
if ($script:wsl -and $displayFlag)
{
$script:medleyArgs = @( "--display", "$display") + $script:medleyArg
}
}
###############################################################################
#
# Main script
#
#
# Process the arguments
#
Process-Args @args
#
# If we're not calling wsl, check if docker is installed and running,
# check if logindir is a legitamte directory, do the pull if required.
#
if (-not $wsl)
{
# Make sure docker is installed
if (-not (Test-DockerInstalled) )
{
Write-Output "Error: Docker is not installed on this system."
Write-Output "This medley app requires Docker unless the --wsl flag is used"
Write-Output "Exiting."
exit 34
}
# Make sure docker is running
if (-not (Test-DockerRunning) )
{
Write-Output "Error: The Docker engine is installed but not currently running on this system."
Write-Output "This medley app requires the Docker Engine running unless the --wsl flag is used"
Write-Output "Exiting."
exit 33
}
# Check/create logindir
if (-not (Test-Path -Path $logindir -PathType Container))
{
try
{
$null = New-Item -ItemType Directory -Path ${logindir} -Force -ErrorAction Stop
}
catch
{
Write-Output "Error: The specified logindir does not exist and cannot be created: ${logindir}"
Write-Output "Exiting."
exit 35
}
}
# Do a pull if required
if ($update -or (-not (docker image ls interlisp/medley:${draft} | Select-String medley)))
{
docker pull interlisp/medley:${draft}
}
}
#
# Call wsl or run docker
#
if ($wsl)
{
#
# Call wsl
#
if ( $wslDistro -eq "-" )
{
$distro = @()
}
else
{
$distro = @( "-d", $wslDistro )
}
wsl @distro medley @medleyArgs
}
else
{
#
# Run docker and vncviewer
#
# Find an open port to use for vnc
if (-not $port) { $port=Find-OpenPort }
Write-Output "Using VNC_PORT=$port"
# Unless $noviewer is set (i.e., if --help and --man flag are set),
# start the vncviwer in the background.
# But wait for the docker container to actually come up
# before starting it
if (-not $noviewer)
{
Start-Job -InputObject "$port" -ScriptBlock {
$port = $input.Clone()
$stopTime = (Get-Date).AddSeconds(10)
$hit=$false
while ((-not $hit) -and ((Get-Date) -lt $stopTime))
{
docker container ls | Select-String 'medley' | Select-String "${port}->5900" | Set-Variable "hit"
if (-not $hit) { Start-Sleep -Milliseconds 250 }
}
if ($hit)
{
Write-Host $hit
vncviewer64-1.12.0.exe -geometry '+50+50' -ReconnectOnError=off AlertOnFatalError=off localhost:${port}
}
} >$null
}
#
# Run the docker container using medley as the entrypoint and passing on the args
# Run in the foreground unless requested to run in the background by the -b flag.
#
if (-not $bg)
{
docker run -it --rm -p ${port}:5900 -v ${logindir}:/home/medley/il --entrypoint medley --env TERM=xterm interlisp/medley:${draft} --windows @medleyArgs
}
else
{
$dockerArgs=@("run", "--rm", "-p", "${port}:5900", "-v", "${logindir}:/home/medley/il", "--entrypoint", "medley", "interlisp/medley:${draft}", "--windows") + $medleyArgs
Start-Process -NoNewWindow -FilePath "docker" -ArgumentList $dockerArgs
}
}
###############################################################################
#
# Done
#
###############################################################################

142
scripts/medley/medley.sh Executable file
View File

@@ -0,0 +1,142 @@
#!/bin/bash
###############################################################################
#
# medley.sh - script for running Medley Interlisp on Linux/WSL.
# On Linux and WSL when using X Windows it just sets
# up directories and environment variables and then calls
# run-medley. On WSL, there is an option to run without
# or around X Windows by using the XVnc and a VNC viewer
# on the Windows side. This script will start this VNC viewer
# on the Windows side.
#
# 2023-01-12 Frank Halasz
#
# Copyright 2023 Interlisp.org
#
###############################################################################
#set -x
# functions to discover what directory this script is being executed from
get_abs_filename() {
# $1 : relative filename
echo "$(cd "$(dirname "$1")" && pwd)/$(basename "$1")"
}
get_script_dir() {
# call this with ${BASH_SOURCE[0]:-$0} as its (only) parameter
# set -x
local SCRIPT_PATH="$( get_abs_filename "$1" )";
pushd . > '/dev/null';
while [ -h "$SCRIPT_PATH" ];
do
cd "$( dirname -- "$SCRIPT_PATH"; )";
SCRIPT_PATH="$( readlink -f -- "$SCRIPT_PATH"; )";
done
cd "$( dirname -- "$SCRIPT_PATH"; )" > '/dev/null';
SCRIPT_PATH="$( pwd; )";
popd > '/dev/null';
# set +x
echo "${SCRIPT_PATH}"
}
SCRIPTDIR=$(get_script_dir "${BASH_SOURCE[0]:-$0}")
# Define some generally useful functions
source ${SCRIPTDIR}/medley_utils.sh
export MEDLEYDIR=$(cd ${SCRIPTDIR}; cd ../..; pwd)
IL_DIR=$(cd ${MEDLEYDIR}; cd ..; pwd)
export LOGINDIR=${HOME}/il
# Are we running under Docker or if not under WSL?
if [ -n "${MEDLEY_DOCKER_BUILD_DATE}" ];
then
docker='true'
wsl='false'
else
docker='false'
wsl_ver=0
# WSL2
grep --ignore-case --quiet wsl /proc/sys/kernel/osrelease
if [ $? -eq 0 ];
then
wsl='true'
wsl_ver=2
else
# WSL1
grep --ignore-case --quiet microsoft /proc/sys/kernel/osrelease
if [ $? -eq 0 ];
then
if [ $(uname -m) = x86_64 ];
then
wsl='true'
wsl_ver=1
else
echo "ERROR: Running Medley on WSL1 requires an x86_64-based PC."
echo "This is not an x86_64-based PC."
echo "Exiting"
exit 23
fi
else
wsl='false'
fi
fi
fi
# process args
source ${SCRIPTDIR}/medley_args.sh
# Make sure that there is not another instance currently running with this same id
ps ax | grep ldex | grep --quiet "\-id ${run_id}"
if [ $? -eq 0 ];
then
echo "Another instance of Medley Interlisp is already running with the id \"${run_id}\"."
echo "Only a single instance with a given id can be run at the same time."
echo "Please retry using the \"--id <name>\" argument to give this new instance a different id."
echo "Exiting"
exit 3
fi
# Set LDEDESTSYSOUT env variable based on id
if [ -z ${LDEDESTSYSOUT} ];
then
if [ "${run_id}" = "default" ];
then
export LDEDESTSYSOUT=${LOGINDIR}/vmem/lisp.virtualmem
else
export LDEDESTSYSOUT=${LOGINDIR}/vmem/lisp_${run_id}.virtualmem
fi
fi
# Create LOGINDIR if necessary
if [ ! -e ${LOGINDIR} ];
then
mkdir -p ${LOGINDIR}
elif [ ! -d ${LOGINDIR} ];
then
echo "ERROR: Medley requires a directory named ${LOGINDIR}."
echo "But ${LOGINDIR} exists appears not be a directory."
echo "Exiting"
exit 2
fi
mkdir -p ${LOGINDIR}/vmem
# Call run-medley with or without vnc
if [[ ( ${wsl} = false || ${use_vnc} = false ) && ${docker} = false ]];
then
# If not using vnc, just call run-medley
${MEDLEYDIR}/run-medley -id "${run_id}" ${geometry} ${screensize} ${run_args[@]}
else
# do the vnc thing on wsl or docker
source ${SCRIPTDIR}/medley_vnc.sh
fi

218
scripts/medley/medley_args.sh Executable file
View File

@@ -0,0 +1,218 @@
###############################################################################
#
# medley_args.sh - script for processing the args to medley.sh script.
#
# !!!! This script is meant to be SOURCEd from the scripts/medley.sh script.
# !!!! It should not be run as a standlone script.
#
# 2023-01-12 Frank Halasz
#
# Copyright 2023 Interlisp.org
#
###############################################################################
# load usage function
source ${SCRIPTDIR}/medley_usage.sh
# Defaults
apps_flag=false
err_msg=""
full_flag=false
geometry=""
greet_specified=false
lisp_flag=false
noscroll=false
pass_args=false
run_args=()
run_id="default"
screensize=""
sysout_flag=false
sysout_arg=""
use_vnc=false
windows=false
# Loop thru args and process
while [ "$#" -ne 0 ];
do
if [ ${pass_args} = false ];
then
case "$1" in
-a | --apps)
sysout_arg="apps"
apps_flag=true
;;
-d | --display)
check_for_dash_or_end "$1" "$2"
run_args+=(-d $2)
shift
;;
-e | --interlisp)
export MEDLEY_EXEC="inter"
;;
-f | --full)
sysout_arg="-full"
full_flag=true
;;
-g | --geometry)
check_for_dash_or_end "$1" "$2"
geometry="$2"
shift
;;
-h | --help)
usage
;;
-i | --id)
if [ "$2" = "-" ];
then
run_id=$( basename ${MEDLEYDIR} )
elif [ "$2" = "--" ];
then
run_id=$(cd ${MEDLEYDIR}; cd ..; basename $(pwd))
else
check_for_dash_or_end "$1" "$2"
run_id=$(echo "$2" | sed s/[^A-Za-z0-9]//g)
fi
shift
;;
-k | --vmem)
check_for_dash_or_end "$1" "$2"
check_file_writeable_or_creatable "$1" "$2"
export LDEDESTSYSOUT="$2"
shift
;;
-l | --lisp)
sysout_arg="-lisp"
lisp_flag=true
;;
-m | --mem)
check_for_dash_or_end "$1" "$2"
run_args+=(-m $2)
shift
;;
-n | --noscroll)
noscroll=true
run_args+=("-noscroll")
;;
-r | --greet)
if [[ "$2" = "-" || "$2" = "--" ]];
then
run_args+=("--nogreet")
else
check_for_dash_or_end "$1" "$2"
check_file_readable "$1" "$2"
run_args+=("-greet" "$2")
fi
greet_specified='true'
shift
;;
-s | --screensize)
check_for_dash_or_end "$1" "$2"
screensize="$2"
shift
;;
-t | --title)
check_for_dash_or_end "$1" "$2"
run_args+=(-title $2)
shift
;;
-v | --vnc)
if [[ ${wsl} = true && $(uname -m) = x86_64 ]];
then
use_vnc=true
else
echo "Warning: The -v or --vnc flag was set."
echo "But the vnc option is only available when running on "
echo "Windows System for Linux (wsl) on x86_64 machines."
echo "Ignoring the -v or --vnc flag."
use_vnc=false
fi
;;
-x | --logindir)
if [[ "$2" = "-" || "$2" = "--" ]];
then
check_dir_writeable_or_creatable "$1" "${MEDLEYDIR}/logindir"
LOGINDIR="${MEDLEYDIR}/logindir"
else
check_for_dash_or_end "$1" "$2"
check_dir_writeable_or_creatable "$1" "$2"
LOGINDIR="$2"
fi
shift
;;
-z | --man)
/usr/bin/man -l "${MEDLEYDIR}/docs/man-page/medley.1.gz"
exit 0
;;
--windows)
# internal: called from Windows medley.ps1 (via docker)
windows=true
;;
--)
pass_args=true
;;
-*)
err_msg=("ERROR: Unknown flag: $1" )
usage "${err_msg[@]}"
;;
*)
if [[ $# -eq 1 || "$2" = "--" ]];
then
sysout_flag=true
sysout_arg="$2"
else
err_msg=(
"ERROR: sysout argument must be last argument"
"or last argument before the \"--\" flag"
)
usage "${err_msg[@]}"
fi
;;
esac
else
run_args+=("$1")
fi
shift
done
# Figure out screensize and geometry based on arguments
source ${SCRIPTDIR}/medley_geometry.sh
# Figure out the sysout situation
ctr=0
for x in ${lisp_flag} ${full_flag} ${apps_flag} ${sysout_flag};
do
if [ "${x}" = "true" ];
then
(( ctr++ ))
fi
done
if [ ${ctr} -gt 1 ];
then
err_msg=(
"Error: only one sysout can be specified. Two or more sysouts were specified"
"via the -l (--lisp), -f (--full), -a (--apps) flags and/or a sysout filename"
)
usage "${err_msg[@]}"
fi
if [ "${sysout_arg}" = "apps" ];
then
export LDESRCESYSOUT="${MEDLEYDIR}/loadups/apps.sysout"
if [ "${greet_specified}" = "false" ];
then
export LDEINIT="${MEDLEYDIR}/greetfiles/APPS-INIT.LCOM"
fi
else
# pass on to run-medley
unset LDESRCESYSOUT
if [ -n "${sysout_arg}" ];
then
run_args+=("${sysout_arg}")
fi
fi
# if running on WSL1, force use_vnc
if [[ ${wsl} = true && ${wsl_ver} -eq 1 ]];
then
use_vnc=true
fi

View File

@@ -0,0 +1,79 @@
###############################################################################
#
# medley_geometry.sh - script for computing the geometry and screensize
# parameters for a medley session
#
# !!!! This script is meant to be SOURCEd from the scripts/medley.sh script.
# !!!! It should not be run as a standlone script.
#
# 2023-01-17 Frank Halasz
#
# Copyright 2023 Interlisp.org
#
###############################################################################
if [ ${noscroll} = false ];
then
scroll=22
else
scroll=0
fi
if [[ -n ${geometry} && -n ${screensize} ]];
then
gw=$(expr "${geometry}" : "\([0-9]*\)x[0-9]*$")
gh=$(expr "${geometry}" : "[0-9]*x\([0-9]*\)$")
if [[ -z "${gw}" || -z "${gh}" ]];
then
echo "Error: Improperly formed -geometry or -dimension argument: ${geometry}"
echo "Exiting"
exit 7
fi
geometry="-g ${geometry}"
#
sw=$(expr "${screensize}" : "\([0-9]*\)x[0-9]*$")
sh=$(expr "${screensize}" : "[0-9]*x\([0-9]*\)$")
if [[ -z "${sw}" || -z "${sh}" ]];
then
echo "Error: Improperly formed -screensize argument: ${screensize}"
echo "Exiting"
exit 7
fi
screensize="-sc ${screensize}"
elif [[ -n ${geometry} ]];
then
gw=$(expr "${geometry}" : "\([0-9]*\)x[0-9]*$")
gh=$(expr "${geometry}" : "[0-9]*x\([0-9]*\)$")
if [ -n "${gw}" -a -n "${gh}" ] ; then
sw=$(( ((31+${gw})/32*32) - ${scroll} ))
sh=$(( ${gh} - ${scroll} ))
geometry="-g ${gw}x${gh}"
screensize="-sc ${sw}x${sh}"
else
echo "Error: Improperly formed -geometry or -dimension argument: ${geometry}"
echo "Exiting"
exit 7
fi
elif [[ -n ${screensize} ]];
then
sw=$(expr "${screensize}" : "\([0-9]*\)x[0-9]*$")
sh=$(expr "${screensize}" : "[0-9]*x\([0-9]*\)$")
if [ -n "${sw}" -a -n "${sh}" ] ; then
sw=$(( (31+$sw)/32*32 ))
gw=$(( ${scroll}+${sw} ))
gh=$(( ${scroll}+${sh} ))
geometry="-g ${gw}x${gh}"
screensize="-sc ${sw}x${sh}"
else
echo "Error: Improperly formed -screensize argument: ${screensize}"
echo "Exiting"
exit 7
fi
else
screensize="-sc 1440x900"
if [ ${noscroll} = false ];
then
geometry="-g 1462x922"
else
geometry="-g 1440x900"
fi
fi

View File

@@ -0,0 +1,139 @@
###############################################################################
#
# medley_useage.sh - script defining the "usage" for medley.sh script.
#
# !!!! This script is meant to be SOURCEd from the scripts/medley.sh script.
# !!!! It should not be run as a standlone script.
#
# 2023-01-21 Frank Halasz
#
# Copyright 2023 Interlisp.org
#
###############################################################################
PAGER=$( if [ -n $(which more) ]; then echo "more"; else echo "cat"; fi)
usage() {
local err_msg
local msg_path=/tmp/msg-$$
local lines=("$@")
if [ ${wsl} = true ];
then
wsl_incl="+w"
wsl_excl="-w"
else
wsl_incl="-w"
wsl_excl="+w"
fi
if [ ${docker} = true ];
then
docker_incl="+d"
docker_excl="-d"
else
docker_incl="-d"
docker_excl="+d"
fi
if [ ${windows} = true ];
then
windows_incl="+W"
windows_excl="-W"
else
windows_incl="-W"
windows_excl="+W"
fi
if [ $# -ne 0 ];
then
echo > ${msg_path}
echo "$(output_error_msg "${lines[@]}")" >> ${msg_path}
echo >> ${msg_path}
echo >> ${msg_path}
else
touch ${msg_path}
fi
cat ${msg_path} - <<EOF \
| sed -e "/^${docker_excl}/d" -e "s/^${docker_incl}/ /" \
| sed -e "/^${wsl_excl}/d" -e "s/^${wsl_incl}/ /" \
| sed -e "/^${windows_excl}/d" -e "s/^${windows_incl}/ /" \
| ${PAGER}
Usage: medley [flags] [sysout] [--] [pass_args ...]
Note: MEDLEYDIR is the directory at the top of the code tree where this script is executed from
after all symbolic links have been resolved. For standard installations this will be
/usr/local/interlisp/medley. For "local" installations this will be the "medley" sub-directory
under the directory into which the Medley distribution was installed.
flags:
-h | --help : print this usage information
-z | --man : show the man page for medley
-f | --full : start Medley from the "full" sysout
-l | --lisp : start Medley from the "lisp" sysout
-a | --apps : start Medley from the "apps" sysout
-e | --interlisp : (for apps.sysout only) Start in the Interlisp exec
-n | --noscroll : do not use scroll bars in Medley window
-g WxH | --geometry WxH : set the window geometry to Width x Height.
-s WxH | --screensize WxH : set the Medley screen size to be Width x Height
-t STRING | --title STRING : use STRING as title of window
-d :N | --display :N : use X display :N
+w
+w -v | --vnc : (WSL only) Use a VNC window instead of an X window
-i STRING | --id STRING : use STRING as the id for this run of Medley (default: default)
-i - | --id - : for id use the basename of MEDLEYDIR
-i -- | --id -- : for id use the basename of the parent directory of MEDLEYDIR
-m N | --mem N : set Medley memory size to N
-k FILE | --vmem FILE : use FILE as the Medley virtual memory store.
+d FILE must be a file in the Medley file system under LOGINDIR (/home/medley/il).
-r FILE | --greet FILE : use FILE as the Medley greetfile.
+d FILE must be a file in the Medley file system under LOGINDIR (/home/medley/il).
-r - | --greet - : do not use a greetfile
-d
-d -x DIR | --logindir DIR : use DIR as LOGINDIR in Medley
-d
-d -x - | --logindir - : use MEDLEYDIR/logindir as LOGINDIR in Medley
+d
+d -x DIR | --logindir DIR : use DIR (on the host) to map to LOGINDIR (/home/medley/il) in Medley
+d
+d -p N | --port N : use N as the port for connecting to the Xvnc server inside the Docker container
+d
+d -u | --update : first do a pull to get the latest medley Docker image
+W
+W -w DISTRO | --wsl DISTRO : run in WSL (on the named DISTRO) instead of in a Docker container
+W
+W -b | --background : run as background process
sysout:
The pathname of the file to use as a sysout for Medley to start from.
+d The pathname must be in the Medley file system under LOGINDIR (/home/medley/il).
If sysout is not provided and none of the flags [-a, -f & -l] is used, then Medley will start from
the saved virtual memory file for the previous run with the sane id as this run.
pass_args:
All arguments after the "--" flag, are passed unaltered to lde via run-medley.
EOF
exit 1
}

View File

@@ -0,0 +1,133 @@
###############################################################################
#
# medley_utils.sh - script containing various useful functions for medley.sh script.
#
# !!!! This script is meant to be SOURCEd from the scripts/medley.sh script.
# !!!! It should not be run as a standlone script.
#
# 2023-01-23 Frank Halasz
#
# Copyright 2023 Interlisp.org
#
###############################################################################
is_tput=$(which tput)
output_error_msg() {
local lines=("$@")
for line in "${lines[@]}"
do
if [ -n "${is_tput}" ];
then
echo "$(${is_tput} setab 1)$(${is_tput} setaf 7)${line}$(${is_tput} sgr0)"
else
echo "${line}"
fi
done
}
check_for_dash_or_end() {
local err_msg;
if [[ -z "$2" || "$2" = "--" ]];
then
err_msg=(
"Error: the flag \"$1\" requires a value."
"Value is missing."
)
usage "${err_msg[@]}"
elif [ "${2:0:1}" = "-" ];
then
err_msg=(
"Error: either the value for flag \"${1}\" is missing OR"
"the value begins with a \"-\", which is not allowed."
)
usage "${err_msg[@]}"
fi
}
check_file_writeable_or_creatable() {
local msg_core="\"$2\" given as the value of the \"$1\" flag"
local err_msg;
if [[ -e "$%2" ]];
then
if [[ ! -f "$2" ]];
then
err_msg=(
"Error: File ${msg_core} is not a regular file."
"It is either a directory or a device file of some sort."
"Exiting"
)
output_error_msg "${err_msg[@]}"
exit 1
elif [[ ! -w "$2" ]];
then
err_msg=(
"Error: File ${msg_core} exists but is not writeable"
"Exiting"
)
output_error_msg "${err_msg[@]}"
exit 1
fi
else
if [[ ! -w "$(dirname -- $2)" ]];
then
err_msg=(
"Error: File ${msg_core} cannot be created because"
"its directory either doen't exist or is not writeable."
"Exiting"
)
output_error_msg "${err_msg[@]}"
exit 1
fi
fi
}
check_file_readable() {
local msg_core="\"$2\" given as the value of the \"$1\" flag"
if [[ ! -r "$2" ]];
then
err_msg=(
"Error: File ${msg_core}"
"either doesn't exist or is not readable."
"Exiting"
)
output_error_msg "${err_msg[@]}"
exit 1
fi
}
check_dir_writeable_or_creatable() {
local msg_core="\"$2\" given as the value of the \"$1\" flag"
if [[ -e "$%2" ]];
then
if [[ ! -d "$2" ]];
then
err_msg=(
"Error: Pathname ${msg_core} exists but is not a directory."
"Exiting"
)
output_error_msg "${err_msg[@]}"
exit 1
elif [[ ! -w "$2" ]];
then
err_msg=(
"Error: Directory ${msg_core} exists but is not writeable."
"Exiting"
)
output_error_msg "${err_msg[@]}"
exit 1
fi
else
if [[ ! -w "$(dirname -- $2)" ]];
then
err_msg=(
"Error: Directory ${msg_core} cannot be created because"
"its parent directory either doesn't exist or is not writeable."
"Exiting"
)
output_error_msg "${err_msg[@]}"
exit 1
fi
fi
}

250
scripts/medley/medley_vnc.sh Executable file
View File

@@ -0,0 +1,250 @@
###############################################################################
#
# medley_vnc.sh - script for running Medley Interlisp on WSL using Xvnc
# on the Linux side and a vncviewer on the Windows side.
# This script run under Linux will start the right apps
# on both the Linux and Windows sides.
#
# !!!! This script is meant to be SOURCEd from the scripts/medley.sh script.
# !!!! It should not be run as a standlone script.
#
# 2023-01-12 Frank Halasz
#
# Copyright 2023 Interlisp.org
#
###############################################################################
ip_addr() {
ip -4 -br address show dev eth0 | awk '{print $3}' | sed 's-/.*$--'
}
find_open_display() {
local ctr=1
local result=-1
local locked_pid=0
while [ ${ctr} -lt 64 ];
do
if [ ! -e /tmp/.X${ctr}-lock ];
then
result=${ctr}
break
else
locked_pid=$(cat /tmp/.X${ctr}-lock)
ps lax | awk '{print $3}' | grep --quiet ${locked_pid} >/dev/null
if [ $? -eq 1 ];
then
result=${ctr}
break
else
(( ctr++ ))
fi
fi
done
echo ${result}
}
find_open_port() {
local ctr=5900
local result=-1
while [ ${ctr} -lt 6000 ];
do
if [[ ${wsl} = true && ${wsl_ver} -eq 1 ]];
then
netstat.exe -a -n | awk '{ print $2 }' | grep -q ":${ctr}\$"
else
ss -a | grep -q "LISTEN.*:${ctr}[^0-9]"
fi
if [ $? -eq 1 ];
then
result=${ctr}
break
else
(( ctr++ ))
fi
done
echo ${result}
}
#
# Make sure prequisites for vnc support in wsl are in place
#
if [ "${use_vnc}" = "true" ];
then
win_userprofile="$(cmd.exe /c "<nul set /p=%UserProfile%" 2>/dev/null)"
vnc_dir="$(wslpath ${win_userprofile})/AppData/Local/Interlisp"
vnc_exe="vncviewer64-1.12.0.exe"
if [[ $(which Xvnc) = "" || $(Xvnc -version |& grep -iq tigervnc; echo $?) -eq 1 ]];
then
echo "Error: The -v or --vnc flag was set."
echo "But it appears that that TigerVNC \(Xvnc\) has not been installed."
echo "Please install TigerVNC using \"sudo apt install tigervnc-standalone-server tigervnc-xorg-extension\""
echo "Exiting."
exit 4
elif [ ! -e "${vnc_dir}/${vnc_exe}" ];
then
if [ -e "${IL_DIR}/wsl/${vnc_exe}" ];
then
# make sure TigerVNC viewer is in a Windows (not Linux) directory. If its in a Linux directory
# there will be a long delay when it starts up
mkdir -p ${vnc_dir}
cp -p "${IL_DIR}/wsl/${vnc_exe}" "${vnc_dir}/${vnc_exe}"
else
echo "TigerVnc viewer is required by the -vnc option but is not installed."
echo -n "Ok to download from SourceForge? [y, Y, n or N, default n] "
read resp
if [ -z ${resp} ]; then resp=n; else resp=${resp:0:1}; fi
if [[ ${resp} = 'n' || ${resp} = 'N' ]];
then
echo "Ok. You can download the Tiger VNC viewer \(v1.12.0\) .exe yourself and "
echo "place it in ${vnc_dir}/${vnc_exe}. Then retry."
echo "Exiting."
exit 5
else
pushd "${vnc_dir}" >/dev/null
wget https://sourceforge.net/projects/tigervnc/files/stable/1.12.0/vncviewer64-1.12.0.exe
popd >/dev/null
fi
fi
fi
fi
#
# Start the log file so we can trace any issues with vnc, etc
#
LOG=${LOGINDIR}/logs/medley_${run_id}.log
mkdir -p $(dirname -- ${LOG})
echo "START" >${LOG}
#
# If we're running under docker:
# set the VNC_PORT to the value of the --port flag (or its default value)
# set DISPLAY to :0
#
#set -x
if [ "${docker}" = "true" ];
then
export VNC_PORT=5900
export DISPLAY=:0
else
# are we running in background - used for pretty-fying the echos
case $(ps -o stat= -p $$) in
*+*) bg=false ;;
*) bg=true ;;
esac
# For not docker (i.e., for wsl/vnc)
# find an unused display and an available port
#
#set -x
OPEN_DISPLAY=`find_open_display`
if [ ${OPEN_DISPLAY} -eq -1 ];
then
echo "Error: cannot find an unused DISPLAY between 1 and 63"
echo "Exiting"
exit 33
else
if [ ${bg} = true ]; then echo; fi
echo "Using DISPLAY=:${OPEN_DISPLAY}"
fi
export DISPLAY=":${OPEN_DISPLAY}"
export VNC_PORT=`find_open_port`
if [ ${VNC_PORT} -eq -1 ];
then
echo "Error: cannot find an unused port between 5900 and 5999"
echo "Exiting"
exit 33
else
echo "Using VNC_PORT=${VNC_PORT}"
fi
fi
#
# Start the Xvnc server
#
mkdir -p ${LOGINDIR}/logs
/usr/bin/Xvnc "${DISPLAY}" \
-rfbport ${VNC_PORT} \
-geometry "${geometry#-g }" \
-SecurityTypes None \
-NeverShared \
-DisconnectClients=0 \
--MaxDisconnectionTime=10 \
>> ${LOG} 2>&1 &
# Leaving pid wait for all but docker,
# which seems to need it. For all others
# it seems like its not needed but we'll have
# to see how it runs on slower/faster machines
# FGH 2023-02-16
if [ ${docker} = true ];
then
xvnc_pid=""
end_time=$(expr $(date +%s) + 10)
while [ -z "${xvnc_pid}" ];
do
if [ $(date +%s) -gt $end_time ];
then
echo "Xvnc server failed to start."
echo "See log file at ${LOG}"
echo "Exiting"
exit 3
fi
sleep .125
xvnc_pid=$(pgrep -f "Xvnc ${DISPLAY}")
done
# echo "XVNC_PID is ${xvnc_pid}"
fi
#
# Run Medley in foreground if docker, else in background
#
tmp_dir=$(if [[ -d /run/shm && ! -h /run/shm ]]; then echo "/run/shm"; else echo "/tmp"; fi)
medley_run=$(mktemp --tmpdir=${tmp_dir} medley-XXXXX)
cat > ${medley_run} <<..EOF
#!/bin/bash
${MEDLEYDIR}/run-medley -id '${run_id}' ${geometry} ${screensize} ${run_args[@]} \
2>&1 | tee -a ${LOG} | grep -v "broken (explicit kill"
if [ -n "\$(pgrep -f "${vnc_exe}.*:${VNC_PORT}")" ]; then vncconfig -disconnect; fi
..EOF
#cat ${medley_run}
chmod +x ${medley_run}
if [ "${docker}" = "true" ];
then
${medley_run}; rm ${medley_run}
else
(${medley_run}; rm ${medley_run}) &
#
# If not docker (i.e., if wsl/vnc), start the vncviewer on the windows side
#
# First give medley time to startup
# sleep .25
# SLeep appears not to be needed, but faster/slower machines ????
# FGH 2023-02-08
# Then start vnc viewer on Windows side
start_time=$(date +%s)
${vnc_dir}/${vnc_exe} \
-geometry "+50+50" \
-ReconnectOnError=off \
AlertOnFatalError=off \
$(ip_addr):${VNC_PORT} \
>>${LOG} 2>&1 &
wait $!
if [ $( expr $(date +%s) - ${start_time} ) -lt 5 ];
then
if [ -z "$(pgrep -f "Xvnc ${DISPLAY}")" ];
then
echo "Xvnc server failed to start."
echo "See log file at ${LOG}"
echo "Exiting"
exit 3
else
echo "VNC viewer failed to start.";
echo "See log file at ${LOG}";
echo "Exiting" ;
exit 4;
fi
fi
fi
#
# Done, "Go back" to medley.sh
#
true
#######################################

View File

@@ -1,12 +1,10 @@
(DEFINE-FILE-INFO PACKAGE "INTERLISP" READTABLE "INTERLISP" BASE 10)
(FILECREATED "23-May-2022 12:02:10" {DSK}<users>kaplan>local>medley3.5>working-medley>sources>ADIR.;14 65884
(FILECREATED "31-Oct-2022 23:50:03" {WMEDLEY}<sources>ADIR.;19 66146
:CHANGES-TO (FNS UNPACKFILENAME.STRING)
(VARS ADIRCOMS)
:CHANGES-TO (FNS \COPYSYS)
:PREVIOUS-DATE "26-Mar-2022 09:39:50"
{DSK}<users>kaplan>local>medley3.5>working-medley>sources>ADIR.;13)
:PREVIOUS-DATE "31-Oct-2022 14:16:39" {WMEDLEY}<sources>ADIR.;18)
(* ; "
@@ -20,7 +18,10 @@ Copyright (c) 1981-1988, 1990-1992, 1920, 2017, 2020-2021 by Venue & Xerox Corpo
(FNS DELFILE FULLNAME INFILE INFILEP IOFILE OPENFILE OPENSTREAM OUTFILE OUTFILEP
RENAMEFILE SIMPLE.FINDFILE VMEMSIZE \COPYSYS \FLUSHVM \LOGOUT0)
(CONSTANTS (MULTIPLE.STREAMS.PER.FILE.ALLOWED T))
(P (MOVD? 'SIMPLE.FINDFILE 'FINDFILE NIL T))
(P (MOVD? 'SIMPLE.FINDFILE 'FINDFILE NIL T)
(MOVD? 'EVQ 'TRUEFILENAME)
(MOVD? 'EVQ 'PSEUDOFILENAME)
(MOVD? 'NILL 'PSEUDOHOSTP))
(DECLARE%: DONTEVAL@LOAD DOCOPY (P
(* ;; "for the benefit of the call to PATHNAMEP in OPENSTREAM. PATHNAMEP (and pathnames) get defined much later in the loadup.")
@@ -197,26 +198,28 @@ Copyright (c) 1981-1988, 1990-1992, 1920, 2017, 2020-2021 by Venue & Xerox Corpo
(fetch (IFPAGE NActivePages) of \InterfacePage])
(\COPYSYS
[LAMBDA (FILE SYSNAME DONTSAVE) (* ; "Edited 16-Mar-2021 19:46 by larry")
(PROG (FULLNAME VAL HOST)
[LAMBDA (FILE SYSNAME DONTSAVE) (* ; "Edited 31-Oct-2022 23:49 by rmk")
(* ; "Edited 16-Mar-2021 19:46 by larry")
(PROG (FULLNAME VAL TFILE THOST)
RETRY
(SETQ FILE (PACKFILENAME.STRING 'BODY FILE 'BODY "WORK.SYSOUT" 'BODY
\CONNECTED.DIRECTORY))
[SELECTQ [SETQ HOST (U-CASE (FILENAMEFIELD FILE 'HOST]
(DSK [SETQ FULLNAME (PACKFILENAME.STRING 'HOST HOST 'EXTENSION "tmpsysout"
(SETQ FILE (PACKFILENAME.STRING 'BODY FILE 'BODY "WORK.SYSOUT" 'BODY \CONNECTED.DIRECTORY))
(SETQ TFILE (TRUEFILENAME FILE))
[SELECTQ [SETQ THOST (U-CASE (FILENAMEFIELD TFILE 'HOST]
(DSK [SETQ FULLNAME (PACKFILENAME.STRING 'HOST THOST 'NAME 'tmp 'EXTENSION 'SYSOUT
'BODY
(\UFS.RECOGNIZE.FILE FILE 'NON (\GETDEVICEFROMNAME HOST]
(SETQ VAL (\FLUSHVM FULLNAME))
(\UFS.RECOGNIZE.FILE TFILE 'NON (\GETDEVICEFROMNAME THOST]
(SETQ VAL (\FLUSHVM FULLNAME))
(SETQ FULLNAME (RENAMEFILE FULLNAME FILE)))
(UNIX [SETQ FULLNAME (CONCAT "{" HOST "}" (\UFS.RECOGNIZE.FILE FILE 'NON (
(UNIX [SETQ FULLNAME (CONCAT "{" THOST "}" (\UFS.RECOGNIZE.FILE TFILE 'NON (
\GETDEVICEFROMNAME
HOST]
THOST]
(* ; "\DOFLUSHVM ")
(SETQ VAL (\FLUSHVM FULLNAME)))
(PROGN (SETQ VAL (\FLUSHVM))
(SETQ VAL (\FLUSHVM FULLNAME))
(SETQ FULLNAME (RENAMEFILE FULLNAME FILE)))
(PROGN (SETQ VAL (\FLUSHVM))
(LET ((UNIXVAR (UNIX-GETENV "LDEDESTSYSOUT")))
(* ;
 "\FLSUVM saves image to Unix enviroment var or lisp.virtualmem")
 "\FLSUVM saves image to Unix enviroment var or lisp.virtualmem")
(SETQ FULLNAME (COPYFILE (COND
(UNIXVAR (CONCAT "{DSK}" UNIXVAR))
(T "{DSK}~/lisp.virtualmem"))
@@ -231,13 +234,12 @@ Copyright (c) 1981-1988, 1990-1992, 1920, 2017, 2020-2021 by Venue & Xerox Corpo
(RETURN FULLNAME))
((AND (SMALLP VAL)
(IGREATERP 0 VAL)) (* ;
 "Error occurred while making sysout.")
 "Error occurred while making sysout.")
(LISPERROR (IMINUS VAL)
FULLNAME)
(GO RETRY))
(T (* ; "Starting sysout")
(\CLEARSYSBUF T) (* ;
 "Get rid of any spurious typeahead")
(\CLEARSYSBUF T) (* ; "Get rid of any spurious typeahead")
(\RESETKEYBOARD) (* ; "Enable keyhandler")
(RETURN (LIST FULLNAME])
@@ -280,6 +282,12 @@ Copyright (c) 1981-1988, 1990-1992, 1920, 2017, 2020-2021 by Venue & Xerox Corpo
)
(MOVD? 'SIMPLE.FINDFILE 'FINDFILE NIL T)
(MOVD? 'EVQ 'TRUEFILENAME)
(MOVD? 'EVQ 'PSEUDOFILENAME)
(MOVD? 'NILL 'PSEUDOHOSTP)
(DECLARE%: DONTEVAL@LOAD DOCOPY
@@ -1226,14 +1234,14 @@ Copyright (c) 1981-1988, 1990-1992, 1920, 2017, 2020-2021 by Venue & Xerox Corpo
(PUTPROPS ADIR COPYRIGHT ("Venue & Xerox Corporation" 1981 1982 1983 1984 1985 1986 1987 1988 1990
1991 1992 1920 2017 2020 2021))
(DECLARE%: DONTCOPY
(FILEMAP (NIL (3179 14304 (DELFILE 3189 . 3350) (FULLNAME 3352 . 3719) (INFILE 3721 . 3869) (INFILEP
3871 . 4006) (IOFILE 4008 . 4148) (OPENFILE 4150 . 4550) (OPENSTREAM 4552 . 8892) (OUTFILE 8894 . 9045
) (OUTFILEP 9047 . 9183) (RENAMEFILE 9185 . 9491) (SIMPLE.FINDFILE 9493 . 9903) (VMEMSIZE 9905 . 10072
) (\COPYSYS 10074 . 13023) (\FLUSHVM 13025 . 14097) (\LOGOUT0 14099 . 14302)) (14676 36581 (
UNPACKFILENAME.STRING 14686 . 33960) (\UPF.DIRECTORY 33962 . 36579)) (38109 40781 (UNPACKFILENAME
38119 . 38305) (LASTCHPOS 38307 . 39001) (FILENAMEFIELD 39003 . 39488) (FILENAMEFIELD.STRING 39490 .
40069) (PACKFILENAME 40071 . 40414) (PACKFILENAME.STRING 40416 . 40779)) (55251 56164 (
FILEDIRCASEARRAY 55261 . 56162)) (56331 63511 (LOGOUT 56341 . 57258) (MAKESYS 57260 . 58889) (SYSOUT
58891 . 60443) (SAVEVM 60445 . 61245) (HERALD 61247 . 61407) (INTERPRET.REM.CM 61409 . 63134) (
\USEREVENT 63136 . 63509)) (63693 65420 (USERNAME 63703 . 64659) (SETUSERNAME 64661 . 65418)))))
(FILEMAP (NIL (3185 14480 (DELFILE 3195 . 3356) (FULLNAME 3358 . 3725) (INFILE 3727 . 3875) (INFILEP
3877 . 4012) (IOFILE 4014 . 4154) (OPENFILE 4156 . 4556) (OPENSTREAM 4558 . 8898) (OUTFILE 8900 . 9051
) (OUTFILEP 9053 . 9189) (RENAMEFILE 9191 . 9497) (SIMPLE.FINDFILE 9499 . 9909) (VMEMSIZE 9911 . 10078
) (\COPYSYS 10080 . 13199) (\FLUSHVM 13201 . 14273) (\LOGOUT0 14275 . 14478)) (14938 36843 (
UNPACKFILENAME.STRING 14948 . 34222) (\UPF.DIRECTORY 34224 . 36841)) (38371 41043 (UNPACKFILENAME
38381 . 38567) (LASTCHPOS 38569 . 39263) (FILENAMEFIELD 39265 . 39750) (FILENAMEFIELD.STRING 39752 .
40331) (PACKFILENAME 40333 . 40676) (PACKFILENAME.STRING 40678 . 41041)) (55513 56426 (
FILEDIRCASEARRAY 55523 . 56424)) (56593 63773 (LOGOUT 56603 . 57520) (MAKESYS 57522 . 59151) (SYSOUT
59153 . 60705) (SAVEVM 60707 . 61507) (HERALD 61509 . 61669) (INTERPRET.REM.CM 61671 . 63396) (
\USEREVENT 63398 . 63771)) (63955 65682 (USERNAME 63965 . 64921) (SETUSERNAME 64923 . 65680)))))
STOP

Binary file not shown.

View File

@@ -1,23 +1,20 @@
(DEFINE-FILE-INFO PACKAGE "INTERLISP" READTABLE "INTERLISP" BASE 10 FORMAT XCCS)
(FILECREATED " 9-Aug-2021 23:30:19" {DSK}<Users>kaplan>Local>medley3.5>git-medley>sources>AOFD.;5 38301
(DEFINE-FILE-INFO PACKAGE "INTERLISP" READTABLE "INTERLISP" BASE 10)
changes to%: (VARS AOFDCOMS)
(FNS \STRINGSTREAM.INIT)
(FILECREATED "19-Apr-2023 08:05:54" {DSK}<home>larry>il>medley>sources>AOFD.;2 37842
previous date%: " 8-Aug-2021 00:11:00"
{DSK}<Users>kaplan>Local>medley3.5>git-medley>sources>AOFD.;4)
:EDIT-BY "lmm"
:CHANGES-TO (FNS CLOSEALL)
:PREVIOUS-DATE " 9-Aug-2021 23:30:19" {DSK}<home>larry>il>medley>sources>AOFD.;1)
(* ; "
Copyright (c) 1981-1987, 1990, 2021 by Venue & Xerox Corporation.
")
(PRETTYCOMPRINT AOFDCOMS)
(RPAQQ AOFDCOMS
[
(* ;;; "streams (= OpenFileDescriptors)")
(* ;;; "streams (= OpenFileDescriptors)")
(COMS (FNS \ADD-OPEN-STREAM \GENERIC-UNREGISTER-STREAM)
(INITVARS (*ISSUE-CLOSE-WARNINGS* NIL))
@@ -28,7 +25,7 @@ Copyright (c) 1981-1987, 1990, 2021 by Venue & Xerox Corporation.
(\OPENFILES))
(GLOBALVARS DEFAULTEOFCLOSE \OPENFILES))
(COMS
(* ;; "STREAM interface to Read and Write to random memory")
(* ;; "STREAM interface to Read and Write to random memory")
(DECLARE%: DONTCOPY (EXPORT (RECORDS BASEBYTESTREAM)))
(FNS \BASEBYTES.IO.INIT \MAKEBASEBYTESTREAM \MBS.OUTCHARFN \BASEBYTES.NAME.FROM.STREAM
@@ -39,11 +36,11 @@ Copyright (c) 1981-1987, 1990, 2021 by Venue & Xerox Corporation.
(FNS OPENSTRINGSTREAM MAKE-STRING-FORMAT)
(P (MAKE-STRING-FORMAT)))
(COMS
(* ;; "STREAM interface for old-style strings. However (RMK), it appears never to be used, and even commonlisp string-streams are created using the Interlisp OPENSTRINGSTREAM above. For now, keep the function, but don't execute it")
(* ;; "STREAM interface for old-style strings. However (RMK), it appears never to be used, and even commonlisp string-streams are created using the Interlisp OPENSTRINGSTREAM above. For now, keep the function, but don't execute it")
(FNS \STRINGSTREAM.INIT)
(* ;; "(DECLARE%%: DONTEVAL@LOAD DOCOPY (P (\STRINGSTREAM.INIT)))")
(* ;; "(DECLARE%%: DONTEVAL@LOAD DOCOPY (P (\STRINGSTREAM.INIT)))")
)
(COMS (FNS GETSTREAM \ADDOFD \CLEAROFD \DELETEOFD \GETSTREAM \SEARCHOPENFILES)
(DECLARE%: DONTCOPY (EXPORT (MACROS \INSTREAMARG \OUTSTREAMARG \STREAMARG)))
@@ -87,15 +84,17 @@ Copyright (c) 1981-1987, 1990, 2021 by Venue & Xerox Corporation.
(CLOSEALL
[LAMBDA (ALLFLG)
(DECLARE (LOCALVARS . T)) (* hdj "11-Jul-86 10:33")
(if MULTIPLE.STREAMS.PER.FILE.ALLOWED
then (ERROR "CLOSEALL no longer supported")
else (for STREAM in (PROG1 (APPEND \OPENFILES) (* ;
"Need to APPEND because CLOSEF will remove things from \OPENFILES")
) when [AND (fetch USERVISIBLE of STREAM)
(\IOMODEP STREAM NIL T)
(OR ALLFLG (NOT (STREAMPROP STREAM 'CLOSEALL]
collect (CLOSEF STREAM])
(DECLARE (LOCALVARS . T)) (* ; "Edited 19-Apr-2023 08:05 by lmm")
(* hdj "11-Jul-86 10:33")
(* ;; "(if MULTIPLE.STREAMS.PER.FILE.ALLOWED then (ERROR 'CLOSEALL no longer supported'))")
(* ;; "Need to APPEND because CLOSEF will remove things from \OPENFILES")
(for STREAM in (APPEND \OPENFILES) when [AND (fetch USERVISIBLE of STREAM)
(\IOMODEP STREAM NIL T)
(OR ALLFLG (NOT (STREAMPROP STREAM 'CLOSEALL]
collect (CLOSEF STREAM])
(CLOSEF
[LAMBDA (FILE) (* ; "Edited 13-Jun-2021 11:26 by rmk:")
@@ -257,15 +256,12 @@ Copyright (c) 1981-1987, 1990, 2021 by Venue & Xerox Corporation.
(* "FOLLOWING DEFINITIONS EXPORTED")(DECLARE%: EVAL@COMPILE
(RECORD BASEBYTESTREAM STREAM (SUBRECORD STREAM)
[ACCESSFNS ((BIASOFFST (fetch (STREAM FW6) of DATUM)
(replace (STREAM FW6) of DATUM
with NEWVALUE))
(BBSNCHARS (fetch (STREAM FW7) of DATUM)
(replace (STREAM FW7) of DATUM
with NEWVALUE))
(WRITEXTENSIONFN (fetch (STREAM F1) of DATUM)
(replace (STREAM F1) of DATUM
with NEWVALUE])
[ACCESSFNS ((BIASOFFST (fetch (STREAM FW6) of DATUM)
(replace (STREAM FW6) of DATUM with NEWVALUE))
(BBSNCHARS (fetch (STREAM FW7) of DATUM)
(replace (STREAM FW7) of DATUM with NEWVALUE))
(WRITEXTENSIONFN (fetch (STREAM F1) of DATUM)
(replace (STREAM F1) of DATUM with NEWVALUE])
)
(* "END EXPORTED DEFINITIONS")
@@ -770,15 +766,15 @@ Copyright (c) 1981-1987, 1990, 2021 by Venue & Xerox Corporation.
(* "FOLLOWING DEFINITIONS EXPORTED")(DECLARE%: EVAL@COMPILE
(PUTPROPS \INSTREAMARG MACRO ((STRM NOERRORFLG)
(\GETSTREAM STRM 'INPUT NOERRORFLG)))
(\GETSTREAM STRM 'INPUT NOERRORFLG)))
(PUTPROPS \OUTSTREAMARG MACRO ((STRM NOERRORFLG)
(\GETSTREAM STRM 'OUTPUT NOERRORFLG)))
(\GETSTREAM STRM 'OUTPUT NOERRORFLG)))
(PUTPROPS \STREAMARG MACRO [OPENLAMBDA (STRM NOERRORFLG)
(COND
(NOERRORFLG (\GETSTREAM STRM NIL T))
(T (\DTEST STRM 'STREAM])
(COND
(NOERRORFLG (\GETSTREAM STRM NIL T))
(T (\DTEST STRM 'STREAM])
)
(* "END EXPORTED DEFINITIONS")
@@ -802,18 +798,17 @@ Copyright (c) 1981-1987, 1990, 2021 by Venue & Xerox Corporation.
(ADDTOVAR LAMA WHENCLOSE)
)
(PUTPROPS AOFD COPYRIGHT ("Venue & Xerox Corporation" 1981 1982 1983 1984 1985 1986 1987 1990 2021))
(DECLARE%: DONTCOPY
(FILEMAP (NIL (2615 3722 (\ADD-OPEN-STREAM 2625 . 2902) (\GENERIC-UNREGISTER-STREAM 2904 . 3720)) (
3763 11020 (CLOSEALL 3773 . 4478) (CLOSEF 4480 . 5676) (EOFCLOSEF 5678 . 5974) (INPUT 5976 . 6748) (
OPENP 6750 . 7149) (OUTPUT 7151 . 7925) (POSITION 7927 . 8739) (RANDACCESSP 8741 . 9216) (\IOMODEP
9218 . 9855) (WHENCLOSE 9857 . 11018)) (11021 11143 (STREAMADDPROP 11031 . 11141)) (12307 25188 (
\BASEBYTES.IO.INIT 12317 . 15513) (\MAKEBASEBYTESTREAM 15515 . 18827) (\MBS.OUTCHARFN 18829 . 19217) (
\BASEBYTES.NAME.FROM.STREAM 19219 . 19682) (\BASEBYTES.BOUT 19684 . 20401) (\BASEBYTES.SETFILEPTR
20403 . 21024) (\BASEBYTES.READP 21026 . 21662) (\BASEBYTES.BIN 21664 . 22195) (\BASEBYTES.PEEKBIN
22197 . 23028) (\BASEBYTES.TRUNCATEFN 23030 . 23534) (\BASEBYTES.OPENFN 23536 . 24026) (
\BASEBYTES.BLOCKIO 24028 . 25186)) (25311 28620 (OPENSTRINGSTREAM 25321 . 27038) (MAKE-STRING-FORMAT
27040 . 28618)) (28892 33553 (\STRINGSTREAM.INIT 28902 . 33551)) (33630 37202 (GETSTREAM 33640 . 33863
) (\ADDOFD 33865 . 34152) (\CLEAROFD 34154 . 34435) (\DELETEOFD 34437 . 34588) (\GETSTREAM 34590 .
36754) (\SEARCHOPENFILES 36756 . 37200)))))
(FILEMAP (NIL (2459 3566 (\ADD-OPEN-STREAM 2469 . 2746) (\GENERIC-UNREGISTER-STREAM 2748 . 3564)) (
3607 10891 (CLOSEALL 3617 . 4349) (CLOSEF 4351 . 5547) (EOFCLOSEF 5549 . 5845) (INPUT 5847 . 6619) (
OPENP 6621 . 7020) (OUTPUT 7022 . 7796) (POSITION 7798 . 8610) (RANDACCESSP 8612 . 9087) (\IOMODEP
9089 . 9726) (WHENCLOSE 9728 . 10889)) (10892 11014 (STREAMADDPROP 10902 . 11012)) (11989 24870 (
\BASEBYTES.IO.INIT 11999 . 15195) (\MAKEBASEBYTESTREAM 15197 . 18509) (\MBS.OUTCHARFN 18511 . 18899) (
\BASEBYTES.NAME.FROM.STREAM 18901 . 19364) (\BASEBYTES.BOUT 19366 . 20083) (\BASEBYTES.SETFILEPTR
20085 . 20706) (\BASEBYTES.READP 20708 . 21344) (\BASEBYTES.BIN 21346 . 21877) (\BASEBYTES.PEEKBIN
21879 . 22710) (\BASEBYTES.TRUNCATEFN 22712 . 23216) (\BASEBYTES.OPENFN 23218 . 23708) (
\BASEBYTES.BLOCKIO 23710 . 24868)) (24993 28302 (OPENSTRINGSTREAM 25003 . 26720) (MAKE-STRING-FORMAT
26722 . 28300)) (28574 33235 (\STRINGSTREAM.INIT 28584 . 33233)) (33312 36884 (GETSTREAM 33322 . 33545
) (\ADDOFD 33547 . 33834) (\CLEAROFD 33836 . 34117) (\DELETEOFD 34119 . 34270) (\GETSTREAM 34272 .
36436) (\SEARCHOPENFILES 36438 . 36882)))))
STOP

Binary file not shown.

View File

@@ -1,10 +1,10 @@
(DEFINE-FILE-INFO PACKAGE "XEROX-COMMON-LISP" READTABLE "XCL" BASE 10)
(IL:FILECREATED "18-Oct-2022 16:24:32" IL:|{DSK}<home>larry>ilisp>medley>sources>CMLUNDO.;2| 31891
(IL:FILECREATED " 7-Nov-2022 09:54:34" IL:|{DSK}<home>larry>ilisp>medley>sources>CMLUNDO.;2| 31437
:CHANGES-TO (IL:FUNCTIONS UNDOABLY)
:PREVIOUS-DATE "15-Oct-2022 17:21:17" IL:|{DSK}<home>larry>ilisp>medley>sources>CMLUNDO.;1|)
:PREVIOUS-DATE "18-Oct-2022 16:24:32" IL:|{DSK}<home>larry>ilisp>medley>sources>CMLUNDO.;1|)
; Copyright (c) 1986-1988, 1990, 2022 by Venue & Xerox Corporation.
@@ -69,75 +69,71 @@
(DEFUN NOHOOK (FN ARGS &OPTIONAL ENV &AUX (*EVALHOOK* NIL))
(APPLY FN ARGS))
(DEFMACRO UNDOABLY (&REST FORMS &ENVIRONMENT ENV) (IL:* IL:\; "Edited 18-Oct-2022 16:20 by lmm")
(IL:* IL:\; "Edited 15-Oct-2022 11:47 by lmm")
(IF (NULL IL:LISPXHIST)
(IL:MKPROGN FORMS)
(WALK-FORM
(IL:MKPROGN FORMS)
:ENVIRONMENT ENV :WALK-FUNCTION
#'(LAMBDA
(X CONTEXT)
(COND
((NOT (CONSP X))
X)
((NOT (SYMBOLP (CAR X)))
X)
(T
(CASE (CAR X)
((SETQ IL:SETQ SETF)
(VALUES
(IL:MKPROGN
(WITH-COLLECTION
(DO ((TAIL (CDR X)
(CDDR TAIL)))
((NULL TAIL))
(COLLECT
(IF (SYMBOLP (CAR TAIL))
(IF (VARIABLE-LEXICAL-P (CAR TAIL))
`(,(CAR X)
,(CAR TAIL)
,(WALK-FORM-INTERNAL (CADR TAIL)))
(PROGN (COND
((NOT (OR (VARIABLE-SPECIAL-P (CAR TAIL))
(BOUNDP (CAR TAIL))))
(DEFMACRO UNDOABLY (&REST FORMS &ENVIRONMENT ENV) (IL:* IL:\; "Edited 7-Nov-2022 09:52 by lmm")
(WALK-FORM
(IL:MKPROGN FORMS)
:ENVIRONMENT ENV :WALK-FUNCTION
#'(LAMBDA
(X CONTEXT)
(COND
((NOT (CONSP X))
X)
((NOT (SYMBOLP (CAR X)))
X)
(T
(CASE (CAR X)
((SETQ IL:SETQ SETF)
(VALUES
(IL:MKPROGN
(WITH-COLLECTION
(DO ((TAIL (CDR X)
(CDDR TAIL)))
((NULL TAIL))
(COLLECT
(IF (SYMBOLP (CAR TAIL))
(IF (VARIABLE-LEXICAL-P (CAR TAIL))
`(,(CAR X)
,(CAR TAIL)
,(WALK-FORM-INTERNAL (CADR TAIL)))
(PROGN (COND
((NOT (OR (VARIABLE-SPECIAL-P (CAR TAIL))
(BOUNDP (CAR TAIL))))
(IL:* IL:|;;| "should possibly spelling correct? ")
(IL:* IL:|;;| "should possibly spelling correct? ")
(WHEN NIL
(WHEN NIL
(IL:* IL:|;;| "this warning just seems uselsss; it doesn't proclaim anything or mark it as changed in FILEPKG or ...")
(IL:* IL:|;;| "this warning just seems uselsss; it doesn't proclaim anything or mark it as changed in FILEPKG or ...")
(WARN
"Variable ~S proclaimed SPECIAL UNDOABLY.. SETQ"
(CAR TAIL)))))
`(UNDOABLY-SET-SYMBOL ',(CAR TAIL)
,(WALK-FORM-INTERNAL (CADR TAIL)))))
(MULTIPLE-VALUE-BIND
(FORMALS ACTUALS NEW-VALUE SETTER GETTER)
(GET-UNDOABLE-SETF-METHOD (CAR TAIL))
`(,'LET* (,@(MAPCAR #'(LAMBDA (X Y)
(LIST X (WALK-FORM-INTERNAL Y)))
FORMALS ACTUALS)
(,(WALK-FORM-INTERNAL (CAR NEW-VALUE))
,(CADR TAIL)))
,SETTER)))))))
T))
(STOP-UNDOABLY (VALUES (IL:MKPROGN (CDR X))
T))
(T (LET ((UNDONAME (CDR (ASSOC (CAR X)
IL:LISPXFNS :TEST #'EQ))))
(IF UNDONAME
(CONS UNDONAME (CDR X))
(IF (AND (OR (GET (CAR X)
':DEFINER-FOR)
(GET (CAR X)
'IL:DEFINER-FOR))
(NOT *IN-DEFINER*))
(LET ((*IN-DEFINER* T))
(VALUES (WALK-FORM-INTERNAL (MACROEXPAND-1 X))
T))
X)))))))))))
(WARN "Variable ~S proclaimed SPECIAL UNDOABLY.. SETQ"
(CAR TAIL)))))
`(UNDOABLY-SET-SYMBOL ',(CAR TAIL)
,(WALK-FORM-INTERNAL (CADR TAIL)))))
(MULTIPLE-VALUE-BIND
(FORMALS ACTUALS NEW-VALUE SETTER GETTER)
(GET-UNDOABLE-SETF-METHOD (CAR TAIL))
`(,'LET* (,@(MAPCAR #'(LAMBDA (X Y)
(LIST X (WALK-FORM-INTERNAL Y)))
FORMALS ACTUALS)
(,(WALK-FORM-INTERNAL (CAR NEW-VALUE))
,(CADR TAIL)))
,SETTER)))))))
T))
(STOP-UNDOABLY (VALUES (IL:MKPROGN (CDR X))
T))
(T (LET ((UNDONAME (CDR (ASSOC (CAR X)
IL:LISPXFNS :TEST #'EQ))))
(IF UNDONAME
(CONS UNDONAME (CDR X))
(IF (AND (OR (GET (CAR X)
':DEFINER-FOR)
(GET (CAR X)
'IL:DEFINER-FOR))
(NOT *IN-DEFINER*))
(LET ((*IN-DEFINER* T))
(VALUES (WALK-FORM-INTERNAL (MACROEXPAND-1 X))
T))
X))))))))))
(DEFUN UNDOABLY-FMAKUNBOUND (SYMBOL)
(IL:/PUTD SYMBOL NIL)
@@ -692,14 +688,14 @@
)
(IL:PUTPROPS IL:CMLUNDO IL:COPYRIGHT ("Venue & Xerox Corporation" 1986 1987 1988 1990 2022))
(IL:DECLARE\: IL:DONTCOPY
(IL:FILEMAP (NIL (4227 4310 (NOHOOK 4227 . 4310)) (4312 7992 (UNDOABLY 4312 . 7992)) (7994 8214 (
UNDOABLY-FMAKUNBOUND 7994 . 8214)) (8216 8792 (UNDOABLY-MAKUNBOUND 8216 . 8792)) (8794 9521 (
UNDOABLY-SETF 8794 . 9521)) (9523 11417 (UNDOHOOK 9523 . 11417)) (11419 11766 (UNDOABLY-PSETF 11419 .
11766)) (11768 12368 (UNDOABLY-POP 11768 . 12368)) (12370 12930 (UNDOABLY-PUSH 12370 . 12930)) (12932
13391 (UNDOABLY-PUSHNEW 12932 . 13391)) (13393 14759 (UNDOABLY-REMF 13393 . 14759)) (14761 15907 (
UNDOABLY-ROTATEF 14761 . 15907)) (15909 17049 (UNDOABLY-SHIFTF 15909 . 17049)) (18845 20667 (
UNDOABLY-PROCLAIM 18845 . 20667)) (20669 20740 (MAKE-UNDOABLE 20669 . 20740)) (20742 20888 (
STOP-UNDOABLY 20742 . 20888)) (20890 22570 (UNDOABLY-SETF-SYMBOL-FUNCTION 20890 . 22570)) (22572 23161
(UNDOABLY-SETF-MACRO-FUNCTION 22572 . 23161)) (24059 27459 (GET-UNDOABLE-SETF-METHOD 24059 . 27459))
(27461 30185 (UNDOABLY-SET-SYMBOL 27461 . 30185)) (30186 30514 (UNDOABLY-SETQ 30199 . 30512)))))
(IL:FILEMAP (NIL (4227 4310 (NOHOOK 4227 . 4310)) (4312 7538 (UNDOABLY 4312 . 7538)) (7540 7760 (
UNDOABLY-FMAKUNBOUND 7540 . 7760)) (7762 8338 (UNDOABLY-MAKUNBOUND 7762 . 8338)) (8340 9067 (
UNDOABLY-SETF 8340 . 9067)) (9069 10963 (UNDOHOOK 9069 . 10963)) (10965 11312 (UNDOABLY-PSETF 10965 .
11312)) (11314 11914 (UNDOABLY-POP 11314 . 11914)) (11916 12476 (UNDOABLY-PUSH 11916 . 12476)) (12478
12937 (UNDOABLY-PUSHNEW 12478 . 12937)) (12939 14305 (UNDOABLY-REMF 12939 . 14305)) (14307 15453 (
UNDOABLY-ROTATEF 14307 . 15453)) (15455 16595 (UNDOABLY-SHIFTF 15455 . 16595)) (18391 20213 (
UNDOABLY-PROCLAIM 18391 . 20213)) (20215 20286 (MAKE-UNDOABLE 20215 . 20286)) (20288 20434 (
STOP-UNDOABLY 20288 . 20434)) (20436 22116 (UNDOABLY-SETF-SYMBOL-FUNCTION 20436 . 22116)) (22118 22707
(UNDOABLY-SETF-MACRO-FUNCTION 22118 . 22707)) (23605 27005 (GET-UNDOABLE-SETF-METHOD 23605 . 27005))
(27007 29731 (UNDOABLY-SET-SYMBOL 27007 . 29731)) (29732 30060 (UNDOABLY-SETQ 29745 . 30058)))))
IL:STOP

Binary file not shown.

View File

@@ -1,11 +1,12 @@
(DEFINE-FILE-INFO PACKAGE "INTERLISP" READTABLE "INTERLISP" BASE 10)
(FILECREATED " 6-Jan-2022 19:08:15" {DSK}<Users>kaplan>Local>medley3.5>my-medley>sources>DMISC.;3 45512
(FILECREATED " 8-Apr-2023 13:56:13" {DSK}<home>larry>il>medley>sources>DMISC.;2 45464
:CHANGES-TO (FNS FLASHWINDOW)
:EDIT-BY "lmm"
:PREVIOUS-DATE "16-May-90 15:53:57"
{DSK}<Users>kaplan>Local>medley3.5>my-medley>sources>DMISC.;1)
:CHANGES-TO (FNS RINGBELLS)
:PREVIOUS-DATE " 6-Jan-2022 19:08:15" {DSK}<home>larry>il>medley>sources>DMISC.;1)
(* ; "
@@ -216,16 +217,14 @@ with the terms of said license.
(DEFINEQ
(RINGBELLS
[LAMBDA (N) (* ; "Edited 10-May-88 23:01 by MASINTER")
[LAMBDA (N) (* ; "Edited 8-Apr-2023 13:30 by lmm")
(* ; "Edited 10-May-88 23:01 by MASINTER")
(DECLARE (GLOBALVARS RINGBELLS.L1 RINGBELLS.L2))
(OR (FIXP N)
(SETQ N 1))
(SELECTC \MACHINETYPE
((LIST \DAYBREAK \DANDELION \MAIKO)
(to N do (PLAYTUNE RINGBELLS.L1)
(FLASHWINDOW NIL NIL 100)
(PLAYTUNE RINGBELLS.L2)))
(FLASHWINDOW NIL N])
(to N do (PLAYTUNE RINGBELLS.L1)
(FLASHWINDOW NIL NIL 100)
(PLAYTUNE RINGBELLS.L2])
(FLASHWINDOW
[LAMBDA (WIN? N FLASHINTERVAL SHADE) (* ; "Edited 6-Jan-2022 19:08 by rmk")
@@ -951,22 +950,22 @@ with the terms of said license.
(PUTPROPS DMISC COPYRIGHT ("Venue & Xerox Corporation" T 1982 1983 1984 1985 1986 1987 1988 1989 1990)
)
(DECLARE%: DONTCOPY
(FILEMAP (NIL (4747 5450 (BACKSPACEDEL 4757 . 5448)) (5545 5978 (PERIODICALLYRECLAIM 5555 . 5976)) (
6208 7899 (\DIRTYBACKGROUND 6218 . 6640) (\SAVEVMBACKGROUND 6642 . 7426) (COPYVM 7428 . 7897)) (8320
9519 (SETTIME 8330 . 9517)) (9520 13551 (RINGBELLS 9530 . 10023) (FLASHWINDOW 10025 . 11953) (PLAYTUNE
11955 . 13549)) (13813 19345 (DISPLAYDOWN 13823 . 14211) (SETDISPLAYHEIGHT 14213 . 17013) (VIDEORATE
17015 . 19343)) (19769 20490 (DOAROUNDEXITFORMS 19779 . 20488)) (20693 22408 (REALMEMORYSIZE 20703 .
20861) (LISPVERSION 20863 . 21016) (MICROCODEVERSION 21018 . 21176) (BCPLVERSION 21178 . 21331) (
REQUIREVERSION 21333 . 22406)) (22445 27023 (APROPOS 22455 . 26471) (APROPRINT 26473 . 27021)) (27049
30957 (READPRINTERPORT 27059 . 27200) (WRITEPRINTERPORT 27202 . 27357) (\READPRINTERPORT.UFN 27359 .
27548) (\WRITEPRINTERPORT.UFN 27550 . 27748) (\MISC1.UFN 27750 . 27903) (\MISC2.UFN 27905 . 28143) (
\MISC3.UFN 28145 . 28878) (\MISC4.UFN 28880 . 29430) (\MISC5.UFN 29432 . 29585) (\MISC6.UFN 29587 .
29837) (\MISC7.UFN 29839 . 30324) (\MISC8.UFN 30326 . 30627) (\MISC10.UFN 30629 . 30955)) (31011 38460
(\BLKFDIFF.UFN 31021 . 31586) (\BLKFPLUS.UFN 31588 . 32160) (\BLKFTIMES.UFN 32162 . 32737) (
\BLKSEP.UFN 32739 . 33870) (\BLKPERM.UFN 33872 . 34341) (\BLKEXPONENT.UFN 34343 . 34753) (
\BLKFLOATP2COMP.UFN 34755 . 35339) (\BLKSMALLP2FLOAT.UFN 35341 . 35700) (\BLKMAG.UFN 35702 . 36353) (
\FLOATTOBYTE.UFN 36355 . 36934) (\BLKFMAX.UFN 36936 . 37328) (\BLKFMIN.UFN 37330 . 37719) (
\BLKFABSMAX.UFN 37721 . 38090) (\BLKFABSMIN.UFN 38092 . 38458)) (38500 40318 (\P-MISC2.UFN 38510 .
38751) (\LINES-EQUAL-P 38753 . 39137) (\GET-NEXT-RUN 39139 . 40316)) (40319 44498 (IBLT1 40329 . 42331
) (IBLT2 42333 . 44496)))))
(FILEMAP (NIL (4732 5435 (BACKSPACEDEL 4742 . 5433)) (5530 5963 (PERIODICALLYRECLAIM 5540 . 5961)) (
6193 7884 (\DIRTYBACKGROUND 6203 . 6625) (\SAVEVMBACKGROUND 6627 . 7411) (COPYVM 7413 . 7882)) (8305
9504 (SETTIME 8315 . 9502)) (9505 13503 (RINGBELLS 9515 . 9975) (FLASHWINDOW 9977 . 11905) (PLAYTUNE
11907 . 13501)) (13765 19297 (DISPLAYDOWN 13775 . 14163) (SETDISPLAYHEIGHT 14165 . 16965) (VIDEORATE
16967 . 19295)) (19721 20442 (DOAROUNDEXITFORMS 19731 . 20440)) (20645 22360 (REALMEMORYSIZE 20655 .
20813) (LISPVERSION 20815 . 20968) (MICROCODEVERSION 20970 . 21128) (BCPLVERSION 21130 . 21283) (
REQUIREVERSION 21285 . 22358)) (22397 26975 (APROPOS 22407 . 26423) (APROPRINT 26425 . 26973)) (27001
30909 (READPRINTERPORT 27011 . 27152) (WRITEPRINTERPORT 27154 . 27309) (\READPRINTERPORT.UFN 27311 .
27500) (\WRITEPRINTERPORT.UFN 27502 . 27700) (\MISC1.UFN 27702 . 27855) (\MISC2.UFN 27857 . 28095) (
\MISC3.UFN 28097 . 28830) (\MISC4.UFN 28832 . 29382) (\MISC5.UFN 29384 . 29537) (\MISC6.UFN 29539 .
29789) (\MISC7.UFN 29791 . 30276) (\MISC8.UFN 30278 . 30579) (\MISC10.UFN 30581 . 30907)) (30963 38412
(\BLKFDIFF.UFN 30973 . 31538) (\BLKFPLUS.UFN 31540 . 32112) (\BLKFTIMES.UFN 32114 . 32689) (
\BLKSEP.UFN 32691 . 33822) (\BLKPERM.UFN 33824 . 34293) (\BLKEXPONENT.UFN 34295 . 34705) (
\BLKFLOATP2COMP.UFN 34707 . 35291) (\BLKSMALLP2FLOAT.UFN 35293 . 35652) (\BLKMAG.UFN 35654 . 36305) (
\FLOATTOBYTE.UFN 36307 . 36886) (\BLKFMAX.UFN 36888 . 37280) (\BLKFMIN.UFN 37282 . 37671) (
\BLKFABSMAX.UFN 37673 . 38042) (\BLKFABSMIN.UFN 38044 . 38410)) (38452 40270 (\P-MISC2.UFN 38462 .
38703) (\LINES-EQUAL-P 38705 . 39089) (\GET-NEXT-RUN 39091 . 40268)) (40271 44450 (IBLT1 40281 . 42283
) (IBLT2 42285 . 44448)))))
STOP

Binary file not shown.

View File

@@ -1,8 +1,10 @@
(DEFINE-FILE-INFO PACKAGE "INTERLISP" READTABLE "INTERLISP" BASE 10)
(FILECREATED "22-Sep-2022 08:46:29" {DSK}<home>larry>medley>sources>FILEPKG.;2 274247
(FILECREATED "31-Oct-2022 16:05:09" {WMEDLEY}<sources>FILEPKG.;47 274788
:PREVIOUS-DATE "21-Sep-2022 20:51:03" {DSK}<home>larry>medley>sources>FILEPKG.;1)
:CHANGES-TO (FNS EDITCALLERS)
:PREVIOUS-DATE "22-Sep-2022 08:46:29" {WMEDLEY}<sources>FILEPKG.;45)
(* ; "
@@ -3036,14 +3038,14 @@ compiling " T)
(ADDTOVAR USERMACROS
(M NIL (MAKE FILE FILE))
(M (X . Y)
(E (MARKASCHANGED (COND ((LISTP 'X)
(CAR 'X))
(T 'X))
'USERMACROS)
T)
(ORIGINAL (M X . Y))))
(ORIGINAL (M X . Y)))
(M NIL (MAKE FILE FILE)))
(ADDTOVAR EDITMACROS
(M (X . Y)
@@ -4311,6 +4313,8 @@ compiling " T)
(EDITCALLERS
[LAMBDA (ATOMS FILES COMS)
(* ;; "Edited 31-Oct-2022 16:04 by rmk")
(* ;; "Edited 24-Jul-2022 15:45 by rmk")
(* ;; "Edited 21-Jul-2022 21:51 by rmk")
@@ -4423,9 +4427,14 @@ compiling " T)
[NLSETQ (SETQ MAP (LOADFNS NIL FILESTREAM NIL 'FILEMAP]
(* ;; "LOADFNS may implicitly close the file, so reopen for next hit")
(* ;; "LOADFNS may implicitly close the file, so reopen for next hit. Depending on the file device, we may not get the exact same stream, so make sure we close this one too.")
[OPENSTREAM FILESTREAM 'INPUT 'OLD `((EXTERNALFORMAT ,ENV]
[RESETSAVE NIL (LIST (FUNCTION CLOSEF?)
(SETQ FILESTREAM (OPENSTREAM
FILESTREAM
'INPUT
'OLD
`((EXTERNALFORMAT ,ENV]
(CL:UNLESS MAP (* ;
 "Set to T so only try and print once")
(LISPXPRIN1 " no filemap!" T)
@@ -4857,46 +4866,46 @@ compiling " T)
(PUTPROPS FILEPKG COPYRIGHT ("Venue & Xerox Corporation" 1982 1983 1984 1985 1986 1987 1988 1989 1990
1991 1992 1993 1995 2018 2022))
(DECLARE%: DONTCOPY
(FILEMAP (NIL (18942 20615 (SEARCHPRETTYTYPELST 18952 . 19921) (PRETTYDEFMACROS 19923 . 20359) (
FILEPKGCOMPROPS 20361 . 20613)) (21428 55720 (CLEANUP 21438 . 22828) (COMPILEFILES 22830 . 23106) (
COMPILEFILES0 23108 . 23921) (CONTINUEDIT 23923 . 25300) (MAKEFILE 25302 . 37028) (FILECHANGES 37030
. 39794) (FILEPKG.MERGECHANGES 39796 . 40431) (FILEPKG.CHANGEDFNS 40433 . 40745) (MAKEFILE1 40747 .
44959) (COMPILE-FILE? 44961 . 46548) (MAKEFILES 46550 . 48078) (ADDFILE 48080 . 50623) (ADDFILE0 50625
. 54749) (LISTFILES 54751 . 55718)) (56392 89978 (FILEPKGCHANGES 56402 . 57581) (GETFILEPKGTYPE 57583
. 60533) (MARKASCHANGED 60535 . 62166) (FILECOMS 62168 . 62552) (WHEREIS 62554 . 64083) (
SMASHFILECOMS 64085 . 64313) (FILEFNSLST 64315 . 64481) (FILECOMSLST 64483 . 64969) (UPDATEFILES 64971
. 69469) (INFILECOMS? 69471 . 71314) (INFILECOMTAIL 71316 . 72434) (INFILECOMS 72436 . 72597) (
INFILECOM 72599 . 82617) (INFILECOMSVALS 82619 . 82926) (INFILECOMSVAL 82928 . 83936) (INFILECOMSPROP
83938 . 84731) (IFCPROPS 84733 . 85813) (IFCEXPRTYPE 85815 . 86431) (IFCPROPSCAN 86433 . 87394) (
IFCDECLARE 87396 . 88655) (INFILEPAIRS 88657 . 88956) (INFILECOMSMACRO 88958 . 89976)) (90013 120699 (
FILES? 90023 . 92134) (FILES?1 92136 . 92838) (FILES?PRINTLST 92840 . 93622) (ADDTOFILES? 93624 .
104167) (ADDTOFILE 104169 . 105085) (WHATIS 105087 . 107063) (ADDTOCOMS 107065 . 108603) (ADDTOCOM
108605 . 115092) (ADDTOCOM1 115094 . 116265) (ADDNEWCOM 116267 . 117317) (MAKENEWCOM 117319 . 119166)
(DEFAULTMAKENEWCOM 119168 . 120697)) (120769 123586 (MERGEINSERT 120779 . 123122) (MERGEINSERT1 123124
. 123584)) (123740 125101 (ADDTOFILEKEYLST 123750 . 125099)) (125218 136019 (DELFROMFILES 125228 .
126058) (DELFROMCOMS 126060 . 127739) (DELFROMCOM 127741 . 133506) (DELFROMCOM1 133508 . 134307) (
REMOVEITEM 134309 . 135185) (MOVETOFILE 135187 . 136017)) (136233 138604 (SAVEPUT 136243 . 138602)) (
138729 146972 (UNMARKASCHANGED 138739 . 140223) (PREEDITFN 140225 . 142706) (POSTEDITPROPS 142708 .
145002) (POSTEDITALISTS 145004 . 146970)) (147117 166587 (ALISTS.GETDEF 147127 . 147506) (
ALISTS.WHENCHANGED 147508 . 148154) (CLEARCLISPARRAY 148156 . 149334) (EXPRESSIONS.WHENCHANGED 149336
. 149714) (MAKEALISTCOMS 149716 . 150731) (MAKEFILESCOMS 150733 . 152063) (MAKELISPXMACROSCOMS 152065
. 154083) (MAKEPROPSCOMS 154085 . 154711) (MAKEUSERMACROSCOMS 154713 . 156530) (PROPS.WHENCHANGED
156532 . 157153) (FILEGETDEF.LISPXMACROS 157155 . 158454) (FILEGETDEF.ALISTS 158456 . 159047) (
FILEGETDEF.RECORDS 159049 . 159976) (FILEGETDEF.PROPS 159978 . 160773) (FILEGETDEF.MACROS 160775 .
161657) (FILEGETDEF.VARS 161659 . 162262) (FILEGETDEF.FNS 162264 . 163504) (FILEPKGCOMS.PUTDEF 163506
. 165448) (FILES.PUTDEF 165450 . 166318) (VARS.PUTDEF 166320 . 166463) (FILES.WHENCHANGED 166465 .
166585)) (168609 175840 (RENAME 168619 . 170064) (CHANGECALLERS 170066 . 175838)) (175841 223750 (
SHOWDEF 175851 . 177048) (COPYDEF 177050 . 179798) (GETDEF 179800 . 182343) (GETDEFCOM 182345 . 183311
) (GETDEFCOM0 183313 . 184506) (GETDEFCURRENT 184508 . 190820) (GETDEFERR 190822 . 192092) (
GETDEFFROMFILE 192094 . 196323) (GETDEFSAVED 196325 . 197413) (PUTDEF 197415 . 198122) (EDITDEF 198124
. 199107) (DEFAULT.EDITDEF 199109 . 201947) (EDITDEF.FILES 201949 . 202154) (LOADDEF 202156 . 202332)
(DWIMDEF 202334 . 203188) (DELDEF 203190 . 206084) (DELFROMLIST 206086 . 206590) (HASDEF 206592 .
212829) (GETFILEDEF 212831 . 213343) (SAVEDEF 213345 . 215033) (UNSAVEDEF 215035 . 215931) (
COMPAREDEFS 215933 . 219739) (COMPARE 219741 . 220445) (TYPESOF 220447 . 223748)) (223900 232148 (
FILEPKGCOM 223910 . 228686) (FILEPKGTYPE 228688 . 232146)) (244181 260944 (FINDCALLERS 244191 . 244706
) (EDITCALLERS 244708 . 254828) (EDITFROMFILE 254830 . 260259) (FINDATS 260261 . 260533) (LOOKIN
260535 . 260942)) (260945 262616 (SEPRCASE 260955 . 262614)) (263133 268589 (IMPORTFILE 263143 .
264113) (IMPORTEVAL 264115 . 265001) (IMPORTFILESCAN 265003 . 265416) (CHECKIMPORTS 265418 . 266674) (
GATHEREXPORTS 266676 . 267997) (\DUMPEXPORTS 267999 . 268587)) (268927 270997 (CLEARFILEPKG 268937 .
270995)))))
(FILEMAP (NIL (18953 20626 (SEARCHPRETTYTYPELST 18963 . 19932) (PRETTYDEFMACROS 19934 . 20370) (
FILEPKGCOMPROPS 20372 . 20624)) (21439 55731 (CLEANUP 21449 . 22839) (COMPILEFILES 22841 . 23117) (
COMPILEFILES0 23119 . 23932) (CONTINUEDIT 23934 . 25311) (MAKEFILE 25313 . 37039) (FILECHANGES 37041
. 39805) (FILEPKG.MERGECHANGES 39807 . 40442) (FILEPKG.CHANGEDFNS 40444 . 40756) (MAKEFILE1 40758 .
44970) (COMPILE-FILE? 44972 . 46559) (MAKEFILES 46561 . 48089) (ADDFILE 48091 . 50634) (ADDFILE0 50636
. 54760) (LISTFILES 54762 . 55729)) (56403 89989 (FILEPKGCHANGES 56413 . 57592) (GETFILEPKGTYPE 57594
. 60544) (MARKASCHANGED 60546 . 62177) (FILECOMS 62179 . 62563) (WHEREIS 62565 . 64094) (
SMASHFILECOMS 64096 . 64324) (FILEFNSLST 64326 . 64492) (FILECOMSLST 64494 . 64980) (UPDATEFILES 64982
. 69480) (INFILECOMS? 69482 . 71325) (INFILECOMTAIL 71327 . 72445) (INFILECOMS 72447 . 72608) (
INFILECOM 72610 . 82628) (INFILECOMSVALS 82630 . 82937) (INFILECOMSVAL 82939 . 83947) (INFILECOMSPROP
83949 . 84742) (IFCPROPS 84744 . 85824) (IFCEXPRTYPE 85826 . 86442) (IFCPROPSCAN 86444 . 87405) (
IFCDECLARE 87407 . 88666) (INFILEPAIRS 88668 . 88967) (INFILECOMSMACRO 88969 . 89987)) (90024 120710 (
FILES? 90034 . 92145) (FILES?1 92147 . 92849) (FILES?PRINTLST 92851 . 93633) (ADDTOFILES? 93635 .
104178) (ADDTOFILE 104180 . 105096) (WHATIS 105098 . 107074) (ADDTOCOMS 107076 . 108614) (ADDTOCOM
108616 . 115103) (ADDTOCOM1 115105 . 116276) (ADDNEWCOM 116278 . 117328) (MAKENEWCOM 117330 . 119177)
(DEFAULTMAKENEWCOM 119179 . 120708)) (120780 123597 (MERGEINSERT 120790 . 123133) (MERGEINSERT1 123135
. 123595)) (123751 125112 (ADDTOFILEKEYLST 123761 . 125110)) (125229 136030 (DELFROMFILES 125239 .
126069) (DELFROMCOMS 126071 . 127750) (DELFROMCOM 127752 . 133517) (DELFROMCOM1 133519 . 134318) (
REMOVEITEM 134320 . 135196) (MOVETOFILE 135198 . 136028)) (136244 138615 (SAVEPUT 136254 . 138613)) (
138740 146983 (UNMARKASCHANGED 138750 . 140234) (PREEDITFN 140236 . 142717) (POSTEDITPROPS 142719 .
145013) (POSTEDITALISTS 145015 . 146981)) (147128 166598 (ALISTS.GETDEF 147138 . 147517) (
ALISTS.WHENCHANGED 147519 . 148165) (CLEARCLISPARRAY 148167 . 149345) (EXPRESSIONS.WHENCHANGED 149347
. 149725) (MAKEALISTCOMS 149727 . 150742) (MAKEFILESCOMS 150744 . 152074) (MAKELISPXMACROSCOMS 152076
. 154094) (MAKEPROPSCOMS 154096 . 154722) (MAKEUSERMACROSCOMS 154724 . 156541) (PROPS.WHENCHANGED
156543 . 157164) (FILEGETDEF.LISPXMACROS 157166 . 158465) (FILEGETDEF.ALISTS 158467 . 159058) (
FILEGETDEF.RECORDS 159060 . 159987) (FILEGETDEF.PROPS 159989 . 160784) (FILEGETDEF.MACROS 160786 .
161668) (FILEGETDEF.VARS 161670 . 162273) (FILEGETDEF.FNS 162275 . 163515) (FILEPKGCOMS.PUTDEF 163517
. 165459) (FILES.PUTDEF 165461 . 166329) (VARS.PUTDEF 166331 . 166474) (FILES.WHENCHANGED 166476 .
166596)) (168620 175851 (RENAME 168630 . 170075) (CHANGECALLERS 170077 . 175849)) (175852 223761 (
SHOWDEF 175862 . 177059) (COPYDEF 177061 . 179809) (GETDEF 179811 . 182354) (GETDEFCOM 182356 . 183322
) (GETDEFCOM0 183324 . 184517) (GETDEFCURRENT 184519 . 190831) (GETDEFERR 190833 . 192103) (
GETDEFFROMFILE 192105 . 196334) (GETDEFSAVED 196336 . 197424) (PUTDEF 197426 . 198133) (EDITDEF 198135
. 199118) (DEFAULT.EDITDEF 199120 . 201958) (EDITDEF.FILES 201960 . 202165) (LOADDEF 202167 . 202343)
(DWIMDEF 202345 . 203199) (DELDEF 203201 . 206095) (DELFROMLIST 206097 . 206601) (HASDEF 206603 .
212840) (GETFILEDEF 212842 . 213354) (SAVEDEF 213356 . 215044) (UNSAVEDEF 215046 . 215942) (
COMPAREDEFS 215944 . 219750) (COMPARE 219752 . 220456) (TYPESOF 220458 . 223759)) (223911 232159 (
FILEPKGCOM 223921 . 228697) (FILEPKGTYPE 228699 . 232157)) (244192 261485 (FINDCALLERS 244202 . 244717
) (EDITCALLERS 244719 . 255369) (EDITFROMFILE 255371 . 260800) (FINDATS 260802 . 261074) (LOOKIN
261076 . 261483)) (261486 263157 (SEPRCASE 261496 . 263155)) (263674 269130 (IMPORTFILE 263684 .
264654) (IMPORTEVAL 264656 . 265542) (IMPORTFILESCAN 265544 . 265957) (CHECKIMPORTS 265959 . 267215) (
GATHEREXPORTS 267217 . 268538) (\DUMPEXPORTS 268540 . 269128)) (269468 271538 (CLEARFILEPKG 269478 .
271536)))))
STOP

Binary file not shown.

View File

@@ -1,16 +1,20 @@
(DEFINE-FILE-INFO PACKAGE "INTERLISP" READTABLE "INTERLISP" BASE 10)
(FILECREATED " 6-Sep-2021 19:11:32" 
{DSK}<Users>kaplan>Local>medley3.5>git-medley>sources>FONTPROFILE.;4 30288
changes to%: (ALISTS (FONTDEFS BIGGERNS))
(FILECREATED "13-Apr-2023 08:40:30" {DSK}<home>larry>il>medley>sources>FONTPROFILE.;2 35652
previous date%: " 6-Sep-2021 15:52:13"
{DSK}<Users>kaplan>Local>medley3.5>git-medley>sources>FONTPROFILE.;2)
:EDIT-BY "lmm"
:CHANGES-TO (ALISTS (FONTDEFS HUGE)
(FONTDEFS BIG)
(FONTDEFS MEDIUM)
(FONTDEFS STANDARD)
(FONTDEFS BIGGER)
(FONTDEFS NS)
(FONTDEFS BIGGERNS))
(VARS FONTPROFILECOMS)
:PREVIOUS-DATE " 6-Sep-2021 19:11:32" {DSK}<home>larry>il>medley>sources>FONTPROFILE.;1)
(* ; "
Copyright (c) 1986, 1988, 1990-1991, 1999, 2021 by Venue & Xerox Corporation.
")
(PRETTYCOMPRINT FONTPROFILECOMS)
@@ -18,7 +22,7 @@ Copyright (c) 1986, 1988, 1990-1991, 1999, 2021 by Venue & Xerox Corporation.
(
(* ;; "FONT")
(ALISTS (FONTDEFS HUGE BIG MEDIUM STANDARD BIGGER NS BIGGERNS))
(ALISTS (FONTDEFS HUGE BIG MEDIUM STANDARD BIGGER NS BIGGERNS LARGER))
(ADDVARS (CACHEDMENUS BreakMenu WindowMenu BackgroundMenu IconWindowMenu))
[VARS (FONTVARS '(
(* ;; "standard size fonts. Assumes only DEFAULTFONT set")
@@ -76,7 +80,7 @@ Copyright (c) 1986, 1988, 1990-1991, 1999, 2021 by Venue & Xerox Corporation.
(TTYINBOLDFONT (CONS DEFAULTFONT BOLDFONT))
(VALUEFONT DEFAULTFONT)
(* ;
 " for printing out values returned in Exec")
 " for printing out values returned in Exec")
(* ;; "")
@@ -118,110 +122,150 @@ Copyright (c) 1986, 1988, 1990-1991, 1999, 2021 by Venue & Xerox Corporation.
(ADDTOVAR FONTDEFS
[HUGE (FONTPROFILE (DEFAULTFONT 1 (MODERN 24)
NIL
(TERMINAL 8))
(TERMINAL 8)
(POSTSCRIPT (TERMINAL 8)))
(BOLDFONT 2 (MODERN 24 BRR)
NIL
(MODERN 8 BRR))
(MODERN 8 BRR)
(POSTSCRIPT (MODERN 8 BRR)))
(LITTLEFONT 3 (MODERN 18 MRR)
NIL
(MODERN 8 MIR))
(MODERN 8 MIR)
(POSTSCRIPT (MODERN 8 MIR)))
(BIGFONT 4 (MODERN 36 BRR)
NIL
(MODERN 10 BRR))
(MODERN 10 BRR)
(POSTSCRIPT (MODERN 10 BRR)))
(TEXTFONT 5 (CLASSIC 24)
NIL
(CLASSIC 10))
(CLASSIC 10)
(POSTSCRIPT (CLASSIC 10)))
(TEXTBOLDFONT 7 (CLASSIC 24 BRR)
NIL
(CLASSIC 10 BRR]
(CLASSIC 10 BRR)
(POSTSCRIPT (CLASSIC 10 BRR]
[BIG (FONTPROFILE (DEFAULTFONT 1 (MODERN 18)
NIL
(TERMINAL 8))
(TERMINAL 8)
(POSTSCRIPT (TERMINAL 8)))
(TEXTFONT 5 (CLASSIC 18)
NIL
(CLASSIC 10))
(CLASSIC 10)
(POSTSCRIPT (CLASSIC 10)))
(BOLDFONT 2 (MODERN 18 BRR)
NIL
(MODERN 8 BRR))
(MODERN 8 BRR)
(POSTSCRIPT (MODERN 8 BRR)))
(LITTLEFONT 3 (MODERN 12 MRR)
NIL
(MODERN 8 MIR))
(MODERN 8 MIR)
(POSTSCRIPT (MODERN 8 MIR)))
(BIGFONT 4 (MODERN 24 BRR)
NIL
(MODERN 10 BRR))
(MODERN 10 BRR)
(POSTSCRIPT (MODERN 10 BRR)))
(TEXTBOLDFONT 7 (CLASSIC 18 BRR)
NIL
(CLASSIC 10 BRR]
(CLASSIC 10 BRR)
(POSTSCRIPT (CLASSIC 10 BRR]
[MEDIUM (FONTPROFILE (DEFAULTFONT 1 (MODERN 14)
NIL
(TERMINAL 8))
(TERMINAL 8)
(TERMINAL 8)
(POSTSCRIPT (TERMINAL 8)))
(BOLDFONT 2 (MODERN 14 BRR)
NIL
(MODERN 8 BRR))
(MODERN 8 BRR)
(POSTSCRIPT (MODERN 8 BRR)))
(LITTLEFONT 3 (MODERN 10)
NIL
(MODERN 8 MIR))
(MODERN 8 MIR)
(POSTSCRIPT (MODERN 8 MIR)))
(BIGFONT 4 (MODERN 18)
NIL
(MODERN 10 BRR))
(MODERN 10 BRR)
(POSTSCRIPT (MODERN 10 BRR)))
(TEXTFONT 5 (CLASSIC 14)
NIL
(CLASSIC 10))
(CLASSIC 10)
(POSTSCRIPT (CLASSIC 10)))
(TEXTBOLDFONT 7 (CLASSIC 14 BRR)
NIL
(CLASSIC 10 BRR]
(CLASSIC 10 BRR)
(POSTSCRIPT (CLASSIC 10 BRR]
[STANDARD (FONTCHANGEFLG . ALL)
(FILELINELENGTH . 102)
(FONTPROFILE (DEFAULTFONT 1 (GACHA 10)
(GACHA 8)
(TERMINAL 8))
(TERMINAL 8)
(POSTSCRIPT (TERMINAL 8)))
(ITALICFONT 1 (HELVETICA 10 MIR)
(GACHA 8 MIR)
(MODERN 8 MIR))
(MODERN 8 MIR)
(POSTSCRIPT (MODERN 8 MIR)))
(BOLDFONT 2 (HELVETICA 10 BRR)
(HELVETICA 8 BRR)
(MODERN 8 BRR))
(MODERN 8 BRR)
(POSTSCRIPT (MODERN 8 BRR)))
(LITTLEFONT 3 (HELVETICA 8)
(HELVETICA 6 MIR)
(MODERN 8 MIR))
(MODERN 8 MIR)
(POSTSCRIPT (MODERN 8 MIR)))
(TINYFONT 6 (GACHA 8)
(GACHA 6)
(TERMINAL 6))
(TERMINAL 6)
(POSTSCRIPT (TERMINAL 6)))
(BIGFONT 4 (HELVETICA 12 BRR)
NIL
(MODERN 10 BRR))
(MENUFONT 5 (HELVETICA 10))
(MODERN 10 BRR)
(POSTSCRIPT (MODERN 10 BRR)))
(MENUFONT 5 (HELVETICA 10)
(HELVETICA 10)
(HELVETICA 10)
(POSTSCRIPT (HELVETICA 10)))
(COMMENTFONT 6 (HELVETICA 10)
(HELVETICA 8)
(MODERN 8))
(MODERN 8)
(POSTSCRIPT (MODERN 8)))
(TEXTFONT 7 (TIMESROMAN 10)
NIL
(CLASSIC 10]
(TIMESROMAN 10)
(CLASSIC 10)
(POSTSCRIPT (CLASSIC 10]
[BIGGER (FONTPROFILE (DEFAULTFONT 1 (GACHA 12)
NIL
(TERMINAL 8))
(TERMINAL 8)
(TERMINAL 8)
(POSTSCRIPT (TERMINAL 8)))
(ITALICFONT 1 (HELVETICA 12 MIR)
(GACHA 8 MIR)
(MODERN 8 MIR))
(MODERN 8 MIR)
(POSTSCRIPT (MODERN 8 MIR)))
(BOLDFONT 2 (HELVETICA 12 BRR)
(HELVETICA 8 BRR)
(MODERN 8 BRR))
(MODERN 8 BRR)
(POSTSCRIPT (MODERN 8 BRR)))
(LITTLEFONT 3 (HELVETICA 10)
(HELVETICA 6 MIR)
(MODERN 8 MIR))
(MODERN 8 MIR)
(POSTSCRIPT (MODERN 8 MIR)))
(TINYFONT 6 (GACHA 10)
(GACHA 6)
(TERMINAL 6))
(TERMINAL 6)
(POSTSCRIPT (TERMINAL 6)))
(BIGFONT 4 (HELVETICA 14 BRR)
NIL
(MODERN 10 BRR))
(MENUFONT 5 (HELVETICA 12))
(MODERN 10 BRR)
(MODERN 10 BRR)
(POSTSCRIPT (MODERN 10 BRR)))
(MENUFONT 5 (HELVETICA 12)
(HELVETICA 12)
(HELVETICA 12)
(POSTSCRIPT (HELVETICA 12)))
(COMMENTFONT 6 (HELVETICA 12)
(HELVETICA 8)
(MODERN 8))
(MODERN 8)
(POSTSCRIPT (MODERN 8)))
(TEXTFONT 7 (TIMESROMAN 12)
NIL
(CLASSIC 10]
(TIMESROMAN 12)
(CLASSIC 10)
(POSTSCRIPT (CLASSIC 10]
[NS (FONTCHANGEFLG . ALL)
(FILELINELENGTH . 102)
(COMMENTLINELENGTH 116 . 126)
@@ -230,23 +274,32 @@ Copyright (c) 1986, 1988, 1990-1991, 1999, 2021 by Venue & Xerox Corporation.
(FONTESCAPECHAR . %)
(FONTPROFILE (DEFAULTFONT 1 (TERMINAL 10)
(TERMINAL 8)
(TERMINAL 8))
(TERMINAL 8)
(POSTSCRIPT (TERMINAL 8)))
(ITALICFONT 1 (MODERN 10 BIR)
(MODERN 8 BIR)
(MODERN 8 BIR))
(MODERN 8 BIR)
(POSTSCRIPT (MODERN 8 BIR)))
(BOLDFONT 2 (MODERN 10 BRR)
(MODERN 8 BRR)
(MODERN 8 BRR))
(MODERN 8 BRR)
(POSTSCRIPT (MODERN 8 BRR)))
(LITTLEFONT 3 (MODERN 8)
(MODERN 6 MIR)
(MODERN 8 MIR))
(MODERN 8 MIR)
(POSTSCRIPT (MODERN 8 MIR)))
(BIGFONT 4 (MODERN 12 BRR)
(MODERN 10 BRR)
(MODERN 10 BRR))
(MENUFONT 5 (MODERN 10))
(MODERN 10 BRR)
(POSTSCRIPT (MODERN 10 BRR)))
(MENUFONT 5 (MODERN 10)
(MODERN 10)
(MODERN 10)
(POSTSCRIPT (MODERN 10)))
(COMMENTFONT 6 (MODERN 8)
(MODERN 6 MIR)
(MODERN 8 MIR]
(MODERN 8 MIR)
(POSTSCRIPT (MODERN 8 MIR]
[BIGGERNS (FONTCHANGEFLG . ALL)
(FILELINELENGTH . 102)
(COMMENTLINELENGTH 116 . 126)
@@ -255,23 +308,70 @@ Copyright (c) 1986, 1988, 1990-1991, 1999, 2021 by Venue & Xerox Corporation.
(FONTESCAPECHAR . %)
(FONTPROFILE (DEFAULTFONT 1 (TERMINAL 12)
(TERMINAL 8)
(TERMINAL 8))
(TERMINAL 8)
(POSTSCRIPT (TERMINAL 8)))
(ITALICFONT 1 (MODERN 12 BIR)
(MODERN 8 BIR)
(MODERN 8 BIR))
(MODERN 8 BIR)
(POSTSCRIPT (MODERN 8 BIR)))
(BOLDFONT 2 (MODERN 12 BRR)
(MODERN 8 BRR)
(MODERN 8 BRR))
(MODERN 8 BRR)
(POSTSCRIPT (MODERN 8 BRR)))
(LITTLEFONT 3 (MODERN 10)
(MODERN 6 MIR)
(MODERN 8 MIR))
(MODERN 8 MIR)
(POSTSCRIPT (MODERN 8 MIR)))
(BIGFONT 4 (MODERN 14 BRR)
(MODERN 10 BRR)
(MODERN 10 BRR))
(MENUFONT 5 (MODERN 12))
(MODERN 10 BRR)
(POSTSCRIPT (MODERN 10 BRR)))
(MENUFONT 5 (MODERN 12)
(MODERN 12)
(MODERN 12)
(POSTSCRIPT (MODERN 12)))
(COMMENTFONT 6 (MODERN 10)
(MODERN 8 MIR)
(MODERN 10 MIR])
(MODERN 10 MIR)
(POSTSCRIPT (MODERN 10 MIR]
[LARGER (FONTCHANGEFLG . ALL)
(FILELINELENGTH . 102)
(FONTPROFILE (DEFAULTFONT 1 (GACHA 12)
(GACHA 8)
(TERMINAL 8)
(POSTSCRIPT (TERMINAL 8)))
(ITALICFONT 1 (HELVETICA 14 MIR)
(GACHA 8 MIR)
(MODERN 8 MIR)
(POSTSCRIPT (MODERN 8 MIR)))
(BOLDFONT 2 (HELVETICA 14 BRR)
(HELVETICA 8 BRR)
(MODERN 8 BRR)
(POSTSCRIPT (MODERN 8 BRR)))
(LITTLEFONT 3 (HELVETICA 12)
(HELVETICA 6 MIR)
(MODERN 8 MIR)
(POSTSCRIPT (MODERN 8 MIR)))
(TINYFONT 6 (GACHA 10)
(GACHA 6)
(TERMINAL 6)
(POSTSCRIPT (TERMINAL 6)))
(BIGFONT 4 (HELVETICA 16 BRR)
(HELVETICA 12 BRR)
(MODERN 10 BRR)
(POSTSCRIPT (MODERN 10 BRR)))
(MENUFONT 5 (HELVETICA 12)
(HELVETICA 12)
(HELVETICA 12)
(POSTSCRIPT (HELVETICA 12)))
(COMMENTFONT 6 (HELVETICA 10)
(HELVETICA 8)
(MODERN 8)
(POSTSCRIPT (MODERN 8)))
(TEXTFONT 7 (TIMESROMAN 12)
(TIMESROMAN 10)
(CLASSIC 10)
(POSTSCRIPT (CLASSIC 10])
(ADDTOVAR CACHEDMENUS BreakMenu WindowMenu BackgroundMenu IconWindowMenu)
@@ -332,7 +432,7 @@ Copyright (c) 1986, 1988, 1990-1991, 1999, 2021 by Venue & Xerox Corporation.
(TTYINBOLDFONT (CONS DEFAULTFONT BOLDFONT))
(VALUEFONT DEFAULTFONT)
(* ;
 " for printing out values returned in Exec")
 " for printing out values returned in Exec")
(* ;; "")
@@ -599,8 +699,7 @@ Copyright (c) 1986, 1988, 1990-1991, 1999, 2021 by Venue & Xerox Corporation.
(SETSEPR '(1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26)
1 FILERDTBL)
(PUTPROPS FONTPROFILE COPYRIGHT ("Venue & Xerox Corporation" 1986 1988 1990 1991 1999 2021))
(DECLARE%: DONTCOPY
(FILEMAP (NIL (16323 27907 (FONTSET 16333 . 22674) (FONTPROFILE 22676 . 25025) (FONTPROFILE.ADDDEVICE
25027 . 27905)) (28143 30042 (FONTMAPARRAY 28153 . 30040)))))
(FILEMAP (NIL (21780 33364 (FONTSET 21790 . 28131) (FONTPROFILE 28133 . 30482) (FONTPROFILE.ADDDEVICE
30484 . 33362)) (33600 35499 (FONTMAPARRAY 33610 . 35497)))))
STOP

Binary file not shown.

View File

@@ -1,10 +1,10 @@
(DEFINE-FILE-INFO PACKAGE "INTERLISP" READTABLE "INTERLISP" BASE 10)
(FILECREATED "28-Sep-2022 19:54:40" {DSK}<home>larry>medley>sources>IDLER.;10 47564
(FILECREATED " 4-Oct-2022 16:42:36" {DSK}<home>larry>medley>sources>IDLER.;2 47709
:CHANGES-TO (FNS IDLE.RANDOM)
:CHANGES-TO (FNS \IDLE.OUT)
:PREVIOUS-DATE "22-Sep-2022 16:50:17" {DSK}<home>larry>medley>sources>IDLER.;1)
:PREVIOUS-DATE "28-Sep-2022 19:54:40" {DSK}<home>larry>medley>sources>IDLER.;1)
(* ; "
@@ -435,13 +435,15 @@ Copyright (c) 1985-1990, 1992, 2022 by Venue & Xerox Corporation.
(T "."])
(\IDLE.OUT
[LAMBDA NIL (* bvm%: "16-Sep-85 18:34")
(AND (NOT \IDLING)
(LET [(TIMEOUT (LISTGET IDLE.PROFILE 'TIMEOUT]
(AND (SMALLP TIMEOUT)
(GREATERP TIMEOUT 0)
(\SECONDSCLOCKGREATERP \LASTUSERACTION (TIMES TIMEOUT 60))
(IDLE T])
[LAMBDA NIL (* ; "Edited 4-Oct-2022 16:41 by lmm")
(* bvm%: "16-Sep-85 18:34")
(CL:WHEN (NOT \IDLING)
(NOTIFY.EVENT \IDLING.OVER)
(LET [(TIMEOUT (LISTGET IDLE.PROFILE 'TIMEOUT]
(AND (SMALLP TIMEOUT)
(GREATERP TIMEOUT 0)
(\SECONDSCLOCKGREATERP \LASTUSERACTION (TIMES TIMEOUT 60))
(IDLE T))))])
(\IDLE.EXIT?
[LAMBDA NIL (* ; "Edited 22-Nov-88 15:25 by drc:")
@@ -910,11 +912,11 @@ Copyright (c) 1985-1990, 1992, 2022 by Venue & Xerox Corporation.
)
(PUTPROPS IDLER COPYRIGHT ("Venue & Xerox Corporation" 1985 1986 1987 1988 1989 1990 1992 2022))
(DECLARE%: DONTCOPY
(FILEMAP (NIL (7318 37338 (IDLE 7328 . 7776) (IDLE.SET.OPTION 7778 . 11077) (IDLE.SHOW.OPTIONS 11079
. 11643) (IDLE.SHOW.OPTION 11645 . 13169) (\IDLER 13171 . 22573) (\IDLE.WAIT 22575 . 22678) (
\OK.TO.IDLE? 22680 . 22858) (\IDLE.TIME 22860 . 23642) (\IDLE.OUT 23644 . 24017) (\IDLE.EXIT? 24019 .
28005) (\IDLE.PROMPT.WATCHER 28007 . 28653) (\IDLE.EXIT.ABORT 28655 . 28923) (\IDLE.PROMPTING.WINDOW
28925 . 29660) (\IDLE.IS.PREVIOUS 29662 . 31521) (\IDLE.ISMEMBER 31523 . 34126) (\IDLE.AUTHENTICATE
34128 . 36248) (\IDLERKEYACTION 36250 . 37336)) (42593 47107 (IDLE.BOUNCING.BOX 42603 . 44066) (
IDLE.BITMAP 44068 . 46171) (IDLE.RANDOM 46173 . 47105)))))
(FILEMAP (NIL (7315 37483 (IDLE 7325 . 7773) (IDLE.SET.OPTION 7775 . 11074) (IDLE.SHOW.OPTIONS 11076
. 11640) (IDLE.SHOW.OPTION 11642 . 13166) (\IDLER 13168 . 22570) (\IDLE.WAIT 22572 . 22675) (
\OK.TO.IDLE? 22677 . 22855) (\IDLE.TIME 22857 . 23639) (\IDLE.OUT 23641 . 24162) (\IDLE.EXIT? 24164 .
28150) (\IDLE.PROMPT.WATCHER 28152 . 28798) (\IDLE.EXIT.ABORT 28800 . 29068) (\IDLE.PROMPTING.WINDOW
29070 . 29805) (\IDLE.IS.PREVIOUS 29807 . 31666) (\IDLE.ISMEMBER 31668 . 34271) (\IDLE.AUTHENTICATE
34273 . 36393) (\IDLERKEYACTION 36395 . 37481)) (42738 47252 (IDLE.BOUNCING.BOX 42748 . 44211) (
IDLE.BITMAP 44213 . 46316) (IDLE.RANDOM 46318 . 47250)))))
STOP

Binary file not shown.

56
sources/LOADUP-APPS Normal file
View File

@@ -0,0 +1,56 @@
(DEFINE-FILE-INFO PACKAGE "INTERLISP" READTABLE "INTERLISP" BASE 10)
(FILECREATED "17-Jan-2023 20:34:02" {DSK}<home>frank>il>medley>gmedley>sources>LOADUP-APPS.;3 2095
:CHANGES-TO (FNS Apps.RemoveBackgroundMenuItem)
:PREVIOUS-DATE "17-Jan-2023 20:29:39" {DSK}<home>frank>il>medley>gmedley>sources>LOADUP-APPS.;2
)
(PRETTYCOMPRINT LOADUP-APPSCOMS)
(RPAQQ LOADUP-APPSCOMS ((GLOBALVARS *ALL-BUTTONS* BackgroundMenuCommands BackgroundMenu)
(FNS Apps.LOADUP Apps.RemoveBackgroundMenuItem)))
(DECLARE%: DOEVAL@COMPILE DONTCOPY
(GLOBALVARS *ALL-BUTTONS* BackgroundMenuCommands BackgroundMenu)
)
(DEFINEQ
(Apps.LOADUP
[LAMBDA NIL (* ; "Edited 12-Nov-2022 14:03 by FGH")
(PROGN
(* ;; " Delete button(s) that are created when lispusers/BUTTONS is loaded")
(for B in *ALL-BUTTONS* do (DELETE-BUTTON B))
(* ;; " Remove the BUTTONS BackgroundMenu item")
(Apps.RemoveBackgroundMenuItem "Button Control")
(* ;; " Remove the NoteCards Background Menu Item")
(Apps.RemoveBackgroundMenuItem 'NoteCards)
(* ;; " Remove the CLOS Background Menu Item")
(Apps.RemoveBackgroundMenuItem 'BrowseClass)
(RPLACA [CAR (LIST '(A B C]
NIL])
(Apps.RemoveBackgroundMenuItem
[LAMBDA (ItemStringOrAtom)
(DECLARE (GLOBALVARS Apps.SBG)) (* ; "Edited 17-Jan-2023 20:33 by FGH")
(* ; "Edited 12-Nov-2022 14:07 by FGH")
(LET (SAVEX)
(SETQ BackgroundMenuCommands (REMOVE (SETQ SAVEX (SASSOC ItemStringOrAtom
BackgroundMenuCommands))
BackgroundMenuCommands))
(SETQ BackgroundMenu NIL)
(SETQ Apps.SBG (APPEND (LIST SAVEX)
Apps.SBG])
)
(DECLARE%: DONTCOPY
(FILEMAP (NIL (647 2072 (Apps.LOADUP 657 . 1400) (Apps.RemoveBackgroundMenuItem 1402 . 2070)))))
STOP

1
sources/LOADUP-APPS.CM Normal file
View File

@@ -0,0 +1 @@
"

BIN
sources/LOADUP-APPS.LCOM Normal file

Binary file not shown.

View File

@@ -1,11 +1,11 @@
(DEFINE-FILE-INFO PACKAGE "INTERLISP" READTABLE "INTERLISP" BASE 10)
(FILECREATED "12-Aug-2022 12:30:09" {DSK}<home>larry>medley>sources>LOADUP-FULL.;2 4535
(FILECREATED "18-Jan-2023 16:23:36" {DSK}<home>frank>il>medley>gmedley>sources>LOADUP-FULL.;2 4636
:CHANGES-TO (FNS LOADUP-FULL)
(VARS LOADUP-FULLCOMS)
:PREVIOUS-DATE "14-Jul-2022 12:33:11" {DSK}<home>larry>medley>sources>LOADUP-FULL.;1)
:PREVIOUS-DATE "12-Aug-2022 12:30:09" {DSK}<home>frank>il>medley>gmedley>sources>LOADUP-FULL.;1
)
(PRETTYCOMPRINT LOADUP-FULLCOMS)
@@ -39,7 +39,8 @@
(PRINTOUT T "FULL fonts loaded" T])
(LOADUP-FULL
[LAMBDA NIL (* ; "Edited 12-Aug-2022 11:17 by lmm")
[LAMBDA NIL (* ; "Edited 18-Jan-2023 16:22 by FGH")
(* ; "Edited 12-Aug-2022 11:17 by lmm")
(* ; "Edited 14-Jul-2022 12:32 by rmk")
(* ; "Edited 12-Jul-2022 21:57 by rmk")
(* ; "Edited 7-Mar-2022 21:06 by larry")
@@ -72,7 +73,7 @@
(LOADUP '(CHAT PRESS INTERPRESS TEDIT HRULE TEDIT-CHAT READNUMBER EDITBITMAP FILEBROWSER
THINFILES GRAPHER SPY WHERE-IS COPYFILES MSANALYZE MSPARSE MASTERSCOPE UNIXPRINT
ISO8859IO HELPSYS DINFO CLIPBOARD MODERNIZE WHEELSCROLL PRETTYFILEINDEX WHO-LINE
UNIXCOMM UNIXCHAT UNIXYCD))
UNIXCOMM UNIXCHAT UNIXYCD UNIXUTILS))
(COND
((WINDOWP *WHO-LINE*)
(CLOSEW *WHO-LINE*)))
@@ -87,5 +88,5 @@
(FIXMETA)
(DECLARE%: DONTCOPY
(FILEMAP (NIL (485 4497 (LOADFULLFONTS 495 . 1936) (LOADUP-FULL 1938 . 4247) (FIXMETA 4249 . 4495)))))
(FILEMAP (NIL (467 4598 (LOADFULLFONTS 477 . 1918) (LOADUP-FULL 1920 . 4348) (FIXMETA 4350 . 4596)))))
STOP

Binary file not shown.

File diff suppressed because one or more lines are too long

Some files were not shown because too many files have changed in this diff Show More