From aab6155ba862889f35ea284451a5b0c27983b712 Mon Sep 17 00:00:00 2001 From: frese Date: Thu, 15 Jul 2004 17:34:52 +0000 Subject: [PATCH] Initial version, based on Olin's tarball. --- pkg-def.scm | 12 ------------ scheme/tty-utils.scm | 46 -------------------------------------------- 2 files changed, 58 deletions(-) delete mode 100644 pkg-def.scm delete mode 100644 scheme/tty-utils.scm diff --git a/pkg-def.scm b/pkg-def.scm deleted file mode 100644 index 7452873..0000000 --- a/pkg-def.scm +++ /dev/null @@ -1,12 +0,0 @@ -(define-package "expect" (0 1) - ((install-lib-version (1 1))) - - (install-file "COPYING" 'doc) - (install-file "README" 'doc) - (install-directory-contents "doc" 'doc) - - (write-to-load-script - `((config) - (load ,(absolute-file-name "packages.scm" - (get-directory 'scheme #f))))) - (install-directory-contents "scheme" 'scheme)) diff --git a/scheme/tty-utils.scm b/scheme/tty-utils.scm deleted file mode 100644 index 180a1d9..0000000 --- a/scheme/tty-utils.scm +++ /dev/null @@ -1,46 +0,0 @@ -;;; Some scsh utilities to mung the tty. -;;; Designed and implemented by David Fisher and Olin Shivers. -;;; Copyright (C) 1998 by the Scheme Underground. - -;;; (modify-tty proc [tty-fd/port/fname]) -;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; -;;; Get the tty's current tty-info record. Apply PROC to the record; -;;; set the tty's mode to the result tty-info record returned by PROC. -;;; Return the original, unmodified tty-info record. - -;;; RAW RAW-INITIALIZE ECHO-ON ECHO-OFF CANONICAL -;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; -;;; These are tty-info -> tty-info functions. They can be used as the PROC -;;; parameter to MODIFY-TTY. - -(define (modify-tty proc . maybe-tty) - (let* ((tty (:optional maybe-tty (current-input-port))) - (info0 (tty-info tty))) - (set-tty-info/now tty (proc (copy-tty-info info0))) - info0)) - -;;; Make a proc that frobs the :local-flags field of a tty-info record. -(define (local-flags-modifier modifier) - (lambda (ti) - (modify-tty-info:local-flags ti modifier) - ti)) - -(define echo-off - (let ((no-echo (bitwise-not ttyl/echo))) - (local-flags-modifier (lambda (lf) (bitwise-and lf no-echo))))) - -(define echo-on - (local-flags-modifier (lambda (lf) (bitwise-ior lf ttyl/echo)))) - -(define raw - (let ((no-canon (bitwise-not ttyl/canonical))) - (local-flags-modifier (lambda (lf) (bitwise-and lf no-canon))))) - -(define (raw-initialize tty-info) - ;; min and time can't be set until the terminal is in raw mode. Really. - (set-tty-info:min tty-info 0) - (set-tty-info:time tty-info 0) - tty-info) - -(define canonical - (local-flags-modifier (lambda (lf) (bitwise-ior lf ttyl/canonical))))