Removed support for Ultrix. It is lacking support for POSIX regexps.
This commit is contained in:
parent
a41eb3da04
commit
8b334402ae
6
RELEASE
6
RELEASE
|
@ -26,6 +26,7 @@ New in this release
|
|||
Separate documentation of the library directories search facility
|
||||
New module CONFIGURE
|
||||
Argument processing more robust
|
||||
Ultrix is no longer supported
|
||||
Bug fixes
|
||||
New in 0.6.5
|
||||
New in 0.6.4
|
||||
|
@ -111,7 +112,6 @@ Unix platforms. We currently have scsh implementations for:
|
|||
OpenBSD
|
||||
Solaris
|
||||
SunOS
|
||||
Ultrix
|
||||
Win32
|
||||
Darwin/Mac OS X
|
||||
GNU Hurd
|
||||
|
@ -202,6 +202,10 @@ We manage the project using SourceForge:
|
|||
Any number of whitespaces may now occur between the arguments to
|
||||
the VM.
|
||||
|
||||
** Ultrix is no longer supported
|
||||
The Ultrix platform is lacking support for POSIX regular
|
||||
expressions and is therefore no longer supported.
|
||||
|
||||
** Bug fixes
|
||||
Ensure that the exit value is 1 if scsh exits due to an error
|
||||
Load the package scheme-with-scsh before dumping images to get
|
||||
|
|
|
@ -231,10 +231,7 @@ AC_INIT(c/scheme48vm.c)
|
|||
|
||||
## DEC Ultrix
|
||||
mips-dec-ultrix* )
|
||||
dir=ultrix
|
||||
if test ${CC} = cc; then
|
||||
LDFLAGS=-N
|
||||
fi
|
||||
AC_MSG_ERROR("Ultrix is not supported.")
|
||||
;;
|
||||
|
||||
## HP 9000 series 700 and 800, running HP/UX
|
||||
|
|
|
@ -1,12 +0,0 @@
|
|||
;;; Flags that control buffering policy.
|
||||
;;; Copyright (c) 1993 by Olin Shivers. See file COPYING.
|
||||
|
||||
;;; These are for the SET-PORT-BUFFERING procedure, essentially a Scheme
|
||||
;;; analog of the setbuf(3S) stdio call. We use the actual stdio values.
|
||||
;;; These constants are not likely to change from stdio lib to stdio lib,
|
||||
;;; but you need to check when you do a port.
|
||||
|
||||
(define-enum-constants bufpol
|
||||
(block 0) ; _IOFBF
|
||||
(line #o200) ; _IOLBF
|
||||
(none 4)) ; _IONBF
|
|
@ -1,135 +0,0 @@
|
|||
;;; Errno constant definitions.
|
||||
;;; Copyright (c) 1993 by Olin Shivers. See file COPYING.
|
||||
;;; Copyright (c) 1994 by Brian D. Carlstrom.
|
||||
|
||||
;;; These are the correct values for Ultrix.
|
||||
|
||||
(define errno/2big 7) ; 2big is not a legit Scheme symbol. Lose, lose.
|
||||
|
||||
(define-enum-constants errno
|
||||
;; POSIX:
|
||||
(perm 1) ; Operation not permitted
|
||||
(noent 2) ; No such file or directory
|
||||
(srch 3) ; No such process
|
||||
(intr 4) ; Interrupted function call
|
||||
(io 5) ; Input/output error
|
||||
(nxio 6) ; No such device or address
|
||||
; (2big 7) ; Arg list too long
|
||||
(noexec 8) ; Exec format error
|
||||
(badf 9) ; Bad file descriptor
|
||||
(child 10) ; No child processes
|
||||
(again 11) ; Resource temporarily unavailable
|
||||
(nomem 12) ; Not enough space
|
||||
(acces 13) ; Permission denied
|
||||
(fault 14) ; Bad address
|
||||
(notblk 15) ; Block device required
|
||||
(busy 16) ; Resource busy
|
||||
(exist 17) ; File exists
|
||||
(xdev 18) ; Improper link
|
||||
(nodev 19) ; No such device
|
||||
(notdir 20) ; Not a directory
|
||||
(isdir 21) ; Is a directory
|
||||
(inval 22) ; Invalid argument
|
||||
(nfile 23) ; Too many open files in system
|
||||
(mfile 24) ; Too many open files
|
||||
(notty 25) ; Inappropriate I/O control operation
|
||||
(xtbsy 26) ; Text file busy
|
||||
(fbig 27) ; File too large
|
||||
(nospc 28) ; No space left on device
|
||||
(spipe 29) ; Invalid seek
|
||||
(rofs 30) ; Read-only file system
|
||||
(mlink 31) ; Too many links
|
||||
(pipe 32) ; Broken pipe
|
||||
|
||||
;; POSIX:
|
||||
;; math software
|
||||
(dom 33) ; Domain error
|
||||
(range 34) ; Result too large
|
||||
|
||||
;; non-blocking and interrupt i/o
|
||||
(wouldblock 35) ; Operation would block
|
||||
(inprogress 36) ; Operation now in progress
|
||||
(already 37) ; Operation already in progress
|
||||
|
||||
;; ipc/network software
|
||||
|
||||
;; argument errors
|
||||
(notsock 38) ; Socket operation on non-socket
|
||||
(destaddrreq 39) ; Destination address required
|
||||
(msgsize 40) ; Message too long
|
||||
(prototype 41) ; Protocol wrong type for socket
|
||||
(noprotoopt 42) ; Protocol not available
|
||||
(protonosupport 43) ; Protocol not supported
|
||||
(socktnosupport 44) ; Socket type not supported
|
||||
(opnotsupp 45) ; Operation not supported on socket
|
||||
(pfnosupport 46) ; Protocol family not supported
|
||||
(afnosupport 47) ; Address family not supported by protocol family
|
||||
(addrinuse 48) ; Address already in use
|
||||
(addrnotavail 49) ; Can't assign requested address
|
||||
|
||||
;; operational errors
|
||||
(netdown 50) ; Network is down
|
||||
(netunreach 51) ; Network is unreachable
|
||||
(netreset 52) ; Network dropped connection on reset
|
||||
(connaborted 53) ; Software caused connection abort
|
||||
(connreset 54) ; Connection reset by peer
|
||||
(nobufs 55) ; No buffer space available
|
||||
(isconn 56) ; Socket is already connected
|
||||
(notconn 57) ; Socket is not connected
|
||||
(shutdown 58) ; Can't send after socket shutdown
|
||||
(toomanyrefs 59) ; Too many references: can't splice
|
||||
(timedout 60) ; Connection timed out
|
||||
(connrefused 61) ; Connection refused
|
||||
|
||||
(loop 62) ; Too many levels of symbolic links
|
||||
|
||||
;; POSIX:
|
||||
(nametoolong 63) ; File name too long
|
||||
|
||||
;; should be rearranged
|
||||
(hostdown 64) ; Host is down
|
||||
(hostunreach 65) ; No route to host
|
||||
|
||||
;; POSIX:
|
||||
(notempty 66) ; Directory not empty
|
||||
|
||||
;; quotas & mush
|
||||
(proclim 67) ; Too many processes
|
||||
(users 68) ; Too many users
|
||||
(dquot 69) ; Disc quota exceeded
|
||||
|
||||
;; Network File System
|
||||
(stale 70) ; Stale NFS file handle
|
||||
(remote 71) ; Too many levels of remote in path
|
||||
|
||||
;; ipc
|
||||
(nomsg 72) ; No message of desired type
|
||||
(idrm 73) ; Identifier removed
|
||||
|
||||
;; alignment
|
||||
(align 74) ; alignment error
|
||||
|
||||
;; SystemV Record Locking
|
||||
(deadlk 35) ; Resource deadlock avoided
|
||||
|
||||
;; POSIX
|
||||
(nolck 75) ; No locks available
|
||||
(nosys 76) ; function not implemented
|
||||
|
||||
;; * DUP (Diagnostic/Utilities Protocol) related error numbers.
|
||||
|
||||
(active 77 ) ; device is active.
|
||||
(noactive 78 ) ; device is not active.
|
||||
(noresources 79 ) ; no resources available.
|
||||
(nosystem 80 ) ; no system block found.
|
||||
(nodust 81 ) ; getdust failed
|
||||
(dupnoconn 82 ) ; msdup could not connect to device.
|
||||
(dupnodisconn 83 ) ; msdup could not disconnect.
|
||||
(dupnotcntd 84 ) ; server is not connected.
|
||||
(dupnotidle 85 ) ; server is not idle.
|
||||
(dupnotwait 86 ) ; server is not waiting for input.
|
||||
(dupnotrun 87 ) ; server is not running program.
|
||||
(dupbadopcode 88 ) ; op code not valid.
|
||||
(dupintransit 89 ) ; an state transition event in progress.
|
||||
(duptoomanycpus 90 ) ; only single cpu systems supported.
|
||||
)
|
|
@ -1,52 +0,0 @@
|
|||
;;; Flags for open(2) and fcntl(2).
|
||||
;;; Copyright (c) 1993 by Olin Shivers. See file COPYING.
|
||||
;;; Copyright (c) 1994 by Brian D. Carlstrom.
|
||||
|
||||
(define-enum-constants open
|
||||
(read #o000)
|
||||
(write #o001)
|
||||
(read+write #o002)
|
||||
(append #o00010)
|
||||
(create #o01000)
|
||||
(exclusive #o04000)
|
||||
(no-control-tty #o20000000)
|
||||
(non-blocking #o4000000)
|
||||
(truncate #o2000)
|
||||
;;; Not POSIX.
|
||||
(no-delay #o0004)
|
||||
(sync #o100000)
|
||||
; (blkinuse #o10000)
|
||||
; (blkandset (bitwise-ior #o10000 #o20000))
|
||||
(termio #o10000000)
|
||||
)
|
||||
|
||||
(define open/access-mask
|
||||
(bitwise-ior open/read
|
||||
(bitwise-ior open/write open/read+write)))
|
||||
|
||||
;;; fcntl() commands
|
||||
|
||||
(define-enum-constants fcntl
|
||||
(dup-fdes 0) ; F_DUPFD
|
||||
(get-fdes-flags 1) ; F_GETFD
|
||||
(set-fdes-flags 2) ; F_SETFD
|
||||
(get-status-flags 3) ; F_GETFL
|
||||
(set-status-flags 4) ; F_SETFL
|
||||
(get-record-lock 7) ; F_GETLK
|
||||
(set-record-lock-no-block 8) ; F_SETLK
|
||||
(set-record-lock 9)) ; F_SETLKW
|
||||
|
||||
;;; fcntl fdes-flags (F_GETFD)
|
||||
|
||||
(define fdflags/close-on-exec 1)
|
||||
|
||||
;;; fcntl status-flags (F_GETFL)
|
||||
;;; Mostly, these are OPEN/... flags, like OPEN/APPEND.
|
||||
;;; (define fdstatus/... ...)
|
||||
|
||||
;;; fcntl lock values.
|
||||
|
||||
(define-enum-constants lock
|
||||
(read 1) ; F_RDLCK
|
||||
(write 2) ; F_WRLCK
|
||||
(release 3)) ; F_UNLCK
|
|
@ -1,3 +0,0 @@
|
|||
/* OS-dependent support for what is supposed to be the standard ANSI C Library.
|
||||
** Copyright (c) 1996 by Brian D. Carlstrom.
|
||||
*/
|
|
@ -1,121 +0,0 @@
|
|||
;;; Magic Numbers for Networking
|
||||
;;; Copyright (c) 1994 by Brian D. Carlstrom. See file COPYING.
|
||||
|
||||
;;; magic numbers not from header file
|
||||
;;; but from man page
|
||||
;;; why can't unix make up its mind
|
||||
(define shutdown/receives 0)
|
||||
(define shutdown/sends 1)
|
||||
(define shutdown/sends+receives 2)
|
||||
|
||||
;;;-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
|
||||
;;; BELOW THIS POINT ARE BITS FROM:
|
||||
;;; <sys/socket.h>
|
||||
;;; <sys/un.h>
|
||||
;;; <netinet/in.h>
|
||||
;;; <netinet/tcp.h>
|
||||
;;; <netdb.h>
|
||||
;;;-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
|
||||
|
||||
;;; ADDRESS FAMILIES -- <sys/socket.h>
|
||||
(define address-family/unspecified 0) ; unspecified
|
||||
(define address-family/unix 1) ; local to host (pipes, portals)
|
||||
(define address-family/internet 2) ; internetwork: UDP, TCP, etc.
|
||||
|
||||
;;; SOCKET TYPES -- <sys/socket.h>
|
||||
(define socket-type/stream 1) ; stream socket
|
||||
(define socket-type/datagram 2) ; datagram socket
|
||||
(define socket-type/raw 3) ; raw-protocol interface
|
||||
;;(define socket-type/rdm 4) ; reliably-delivered message
|
||||
;;(define socket-type/seqpacket 5) ; sequenced packet stream
|
||||
|
||||
;;; PROTOCOL FAMILIES -- <sys/socket.h>
|
||||
(define protocol-family/unspecified 0) ; unspecified
|
||||
(define protocol-family/unix 1) ; local to host (pipes, portals)
|
||||
(define protocol-family/internet 2) ; internetwork: UDP, TCP, etc.
|
||||
|
||||
;;; Well know addresses -- <netinet/in.h>
|
||||
(define internet-address/any #x00000000)
|
||||
(define internet-address/loopback #x7f000001)
|
||||
(define internet-address/broadcast #xffffffff) ; must be masked
|
||||
|
||||
;;; errors from host lookup -- <netdb.h>
|
||||
(define herror/host-not-found 1) ;Authoritative Answer Host not found
|
||||
(define herror/try-again 2) ;Non-Authoritive Host not found, or SERVERFAIL
|
||||
(define herror/no-recovery 3) ;Non recoverable errors, FORMERR, REFUSED, NOTIMP
|
||||
(define herror/no-data 4) ;Valid name, no data record of requested type
|
||||
(define herror/no-address herror/no-data) ;no address, look for MX record
|
||||
|
||||
;;; flags for send/recv -- <sys/socket.h>
|
||||
(define message/out-of-band 1) ; process out-of-band data
|
||||
(define message/peek 2) ; peek at incoming message
|
||||
(define message/dont-route 4) ; send without using routing tables
|
||||
|
||||
;;; protocol level for socket options -- <sys/socket.h>
|
||||
(define level/socket #xffff) ; SOL_SOCKET: options for socket level
|
||||
|
||||
;;; socket options -- <sys/socket.h>
|
||||
(define socket/debug #x0001) ; turn on debugging info recording
|
||||
(define socket/accept-connect #x0002) ; socket has had listen()
|
||||
(define socket/reuse-address #x0004) ; allow local address reuse
|
||||
(define socket/keep-alive #x0008) ; keep connections alive
|
||||
(define socket/dont-route #x0010) ; just use interface addresses
|
||||
(define socket/broadcast #x0020) ; permit sending of broadcast msgs
|
||||
(define socket/use-loop-back #x0040) ; bypass hardware when possible
|
||||
(define socket/linger #x0080) ; linger on close if data present
|
||||
(define socket/oob-inline #x0100) ; leave received OOB data in line
|
||||
;(define socket/use-privileged #x4000) ; allocate from privileged port area
|
||||
;(define socket/cant-signal #x8000) ; prevent SIGPIPE on SS_CANTSENDMORE
|
||||
(define socket/send-buffer #x1001) ; send buffer size
|
||||
(define socket/receive-buffer #x1002) ; receive buffer size
|
||||
(define socket/send-low-water #x1003) ; send low-water mark
|
||||
(define socket/receive-low-water #x1004) ; receive low-water mark
|
||||
(define socket/send-timeout #x1005) ; send timeout
|
||||
(define socket/receive-timeout #x1006) ; receive timeout
|
||||
(define socket/error #x1007) ; get error status and clear
|
||||
(define socket/type #x1008) ; get socket type
|
||||
|
||||
;;; ip options -- <netinet/in.h>
|
||||
(define ip/options 1) ; set/get IP per-packet options
|
||||
;(define ip/time-to-live 2) ; set/get IP time-to-live value
|
||||
|
||||
;;; tcp options -- <netinet/tcp.h>
|
||||
(define tcp/no-delay #x01) ; don't delay send to coalesce packets
|
||||
(define tcp/max-segment #x02) ; set maximum segment size
|
||||
|
||||
;;; -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
|
||||
;;; OPTION SETS FOR SOCKET-OPTION AND SET-SOCKET-OPTION
|
||||
|
||||
;;; Boolean Options
|
||||
(define options/boolean
|
||||
(list socket/debug
|
||||
socket/accept-connect
|
||||
socket/reuse-address
|
||||
socket/keep-alive
|
||||
socket/dont-route
|
||||
socket/broadcast
|
||||
socket/use-loop-back
|
||||
socket/oob-inline
|
||||
; socket/use-privileged
|
||||
; socket/cant-signal
|
||||
tcp/no-delay))
|
||||
|
||||
;;; Integer Options
|
||||
(define options/value
|
||||
(list socket/send-buffer
|
||||
socket/receive-buffer
|
||||
socket/send-low-water
|
||||
socket/receive-low-water
|
||||
socket/error
|
||||
socket/type
|
||||
; ip/time-to-live
|
||||
tcp/max-segment))
|
||||
|
||||
;;; #f or Positive Integer
|
||||
(define options/linger
|
||||
(list socket/linger))
|
||||
|
||||
;;; Real Number
|
||||
(define options/timeout
|
||||
(list socket/send-timeout
|
||||
socket/receive-timeout))
|
|
@ -1,129 +0,0 @@
|
|||
;;; Interfaces and packages for the machine specific parts of scsh for Ultrix.
|
||||
;;; Copyright (c) 1994 by Olin Shivers. See file COPYING.
|
||||
;;; Copyright (c) 1994 by Brian D. Carlstrom.
|
||||
|
||||
(define-interface ultrix-fdflags-extras-interface
|
||||
(export open/no-delay
|
||||
open/sync
|
||||
; open/bklinuse
|
||||
; open/bklandset
|
||||
open/termio
|
||||
))
|
||||
|
||||
(define-interface ultrix-errno-extras-interface
|
||||
(export errno/addrinuse
|
||||
errno/addrnotavail
|
||||
errno/afnosupport
|
||||
errno/align
|
||||
errno/already
|
||||
errno/connaborted
|
||||
errno/connrefused
|
||||
errno/connreset
|
||||
errno/destaddrreq
|
||||
errno/dquot
|
||||
errno/hostdown
|
||||
errno/hostunreach
|
||||
errno/idrm
|
||||
errno/inprogress
|
||||
errno/isconn
|
||||
errno/loop
|
||||
errno/msgsize
|
||||
errno/netdown
|
||||
errno/netreset
|
||||
errno/netunreach
|
||||
errno/nobufs
|
||||
errno/nomsg
|
||||
errno/noprotoopt
|
||||
errno/notblk
|
||||
errno/notconn
|
||||
errno/notsock
|
||||
errno/opnotsupp
|
||||
errno/pfnosupport
|
||||
errno/proclim
|
||||
errno/protonosupport
|
||||
errno/prototype
|
||||
errno/remote
|
||||
errno/shutdown
|
||||
errno/socktnosupport
|
||||
errno/stale
|
||||
errno/timedout
|
||||
errno/toomanyrefs
|
||||
errno/users
|
||||
errno/wouldblock
|
||||
errno/xtbsy
|
||||
errno/active
|
||||
errno/noactive
|
||||
errno/noresources
|
||||
errno/nosystem
|
||||
errno/nodust
|
||||
errno/dupnoconn
|
||||
errno/dupnodisconn
|
||||
errno/dupnotcntd
|
||||
errno/dupnotidle
|
||||
errno/dupnotwait
|
||||
errno/dupnotrun
|
||||
errno/dupbadopcode
|
||||
errno/dupintransit
|
||||
errno/duptoomanycpus
|
||||
))
|
||||
|
||||
(define-interface ultrix-signals-extras-interface
|
||||
(export signal/cld
|
||||
signal/iot
|
||||
signal/trap
|
||||
signal/emt
|
||||
signal/io
|
||||
signal/urg
|
||||
signal/xcpu
|
||||
signal/xfsz
|
||||
signal/vtalrm
|
||||
signal/prof
|
||||
signal/winch
|
||||
signal/lost
|
||||
))
|
||||
|
||||
(define-interface ultrix-network-extras-interface
|
||||
(export socket/debug
|
||||
socket/accept-connect
|
||||
socket/reuse-address
|
||||
socket/keep-alive
|
||||
socket/dont-route
|
||||
socket/broadcast
|
||||
socket/use-loop-back
|
||||
socket/linger
|
||||
socket/oob-inline
|
||||
; socket/use-privileged
|
||||
; socket/cant-signal
|
||||
socket/send-buffer
|
||||
socket/receive-buffer
|
||||
socket/send-low-water
|
||||
socket/receive-low-water
|
||||
socket/send-timeout
|
||||
socket/receive-timeout
|
||||
socket/error
|
||||
socket/type
|
||||
ip/options
|
||||
; ip/time-to-live
|
||||
tcp/no-delay
|
||||
tcp/max-segment))
|
||||
|
||||
(define-interface ultrix-extras-interface
|
||||
(compound-interface ultrix-errno-extras-interface
|
||||
ultrix-fdflags-extras-interface
|
||||
ultrix-network-extras-interface
|
||||
ultrix-signals-extras-interface))
|
||||
|
||||
(define-interface ultrix-defs-interface
|
||||
(compound-interface ultrix-extras-interface
|
||||
sockets-network-interface
|
||||
posix-errno-interface
|
||||
posix-fdflags-interface
|
||||
posix-signals-interface
|
||||
signals-internals-interface))
|
||||
|
||||
(define-structure ultrix-defs ultrix-defs-interface
|
||||
(open scheme bitwise defenum-package)
|
||||
(files fdflags errno signals netconst))
|
||||
|
||||
(define-interface os-extras-interface ultrix-extras-interface)
|
||||
(define os-dependent ultrix-defs)
|
|
@ -1,50 +0,0 @@
|
|||
;;; Signal constant definitions for Ultrix
|
||||
;;; Copyright (c) 1994 by Olin Shivers. See file COPYING.
|
||||
;;; Copyright (c) 1994 by Brian D. Carlstrom.
|
||||
|
||||
;;POSIX only defined here.
|
||||
|
||||
(define-enum-constants signal
|
||||
;; POSIX
|
||||
(hup 1) ; hangup
|
||||
(int 2) ; interrupt
|
||||
(quit 3) ; quit
|
||||
(ill 4) ; illegal instruction (not reset when caught)
|
||||
(trap 5) ; trace trap (not reset when caught)
|
||||
(iot 6) ; IOT instruction
|
||||
(abrt 6) ; compat
|
||||
(emt 7) ; EMT instruction
|
||||
(fpe 8) ; floating point exception
|
||||
(kill 9) ; kill (cannot be caught or ignored)
|
||||
;; Ultrix
|
||||
(bus 10)
|
||||
;; POSIX
|
||||
(segv 11) ; segmentation violation
|
||||
(sys 12) ; bad argument to system call
|
||||
(pipe 13) ; write on a pipe with no one to read it
|
||||
(alrm 14) ; alarm clock
|
||||
(term 15) ; software termination signal from kill
|
||||
(urg 16) ; urgent condition on IO channel
|
||||
(stop 17) ; sendable stop signal not from tty
|
||||
(tstp 18) ; stop signal from tty
|
||||
(cont 19) ; continue a stopped process
|
||||
(chld 20) ; to parent on child stop or exit
|
||||
(cld 20) ; compat
|
||||
(ttin 21) ; to readers pgrp upon background tty read
|
||||
(ttou 22) ; like TTIN for output if (tp->t_local<OSTOP)
|
||||
(io 23) ; input/output possible signal
|
||||
(xcpu 24) ; exceeded cpu time limit
|
||||
(xfsz 25) ; exceeded file size limit
|
||||
(vtalrm 26) ; virtual time alarm
|
||||
(prof 27) ; profiling time alarm
|
||||
(winch 28) ; window size changes
|
||||
(lost 29) ; sys-v rec lock: notify user upon server crash
|
||||
|
||||
;; User defined
|
||||
(usr1 30) ; user defined signal 1
|
||||
(usr2 31) ; user defined signal 2
|
||||
)
|
||||
|
||||
(define signals-ignored-by-default
|
||||
(list signal/cont signal/chld
|
||||
signal/urg signal/io signal/winch))
|
|
@ -1,8 +0,0 @@
|
|||
;;; OS-dependent time stuff
|
||||
;;; Copyright (c) 1995 by Olin Shivers. See file COPYING.
|
||||
|
||||
;;; This suffices for BSD systems with the gettimeofday()
|
||||
;;; microsecond-resolution timer.
|
||||
|
||||
(define (ticks/sec) 1000000) ; usec
|
||||
|
|
@ -1,39 +0,0 @@
|
|||
/* OS-dependent support for fine-grained timer.
|
||||
** Copyright (c) 1995 by Olin Shivers.
|
||||
**
|
||||
** We return the current time in seconds and sub-second "ticks" where the
|
||||
** number of ticks/second is OS dependent (and is defined in time_dep.scm).
|
||||
** This definition works on any BSD Unix with the gettimeofday()
|
||||
** microsecond-resolution timer.
|
||||
*/
|
||||
|
||||
#include <errno.h>
|
||||
#include <sys/time.h>
|
||||
#include "scheme48.h"
|
||||
#include "../time1.h"
|
||||
|
||||
s48_value time_plus_ticks()
|
||||
{
|
||||
struct timeval t;
|
||||
struct timezone tz;
|
||||
s48_value sch_tv_sec = S48_UNSPECIFIC;
|
||||
s48_value sch_tv_usec = S48_UNSPECIFIC;
|
||||
s48_value sch_listval = S48_UNSPECIFIC;
|
||||
s48_value sch_retval = S48_UNSPECIFIC;
|
||||
S48_DECLARE_GC_PROTECT(3);
|
||||
|
||||
S48_GC_PROTECT_3(sch_tv_sec, sch_tv_usec, sch_listval);
|
||||
|
||||
if( gettimeofday(&t, &tz) ) s48_raise_os_error (errno);
|
||||
|
||||
|
||||
sch_tv_sec = s48_enter_integer(t.tv_sec);
|
||||
sch_tv_usec = s48_enter_integer(t.tv_usec);
|
||||
sch_listval = s48_cons (sch_tv_usec, S48_NULL);
|
||||
sch_retval = s48_cons (sch_tv_sec, sch_listval);
|
||||
|
||||
S48_GC_UNPROTECT();
|
||||
|
||||
return sch_retval;
|
||||
|
||||
}
|
|
@ -1,216 +0,0 @@
|
|||
;;; Constant definitions for tty control code (POSIX termios).
|
||||
;;; Copyright (c) 1995 by Brian Carlstrom. See file COPYING.
|
||||
;;; Largely rehacked by Olin.
|
||||
|
||||
;;; These constants are for Ultrix 4.2
|
||||
;;; and are taken from /usr/include/sys/termio.h
|
||||
;;; and /usr/include/sys/termios.h
|
||||
;;; and /usr/include/sys/ttydev.h
|
||||
|
||||
;;; Non-standard (POSIX, SVR4, 4.3+BSD) things:
|
||||
;;; - Some of the baud rates.
|
||||
|
||||
|
||||
;;; Special Control Characters
|
||||
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
||||
;;; Indices into the c_cc[] character array.
|
||||
|
||||
;;; Name Subscript Enabled by
|
||||
;;; ---- --------- ----------
|
||||
;;; POSIX
|
||||
(define ttychar/eof 4) ; ^d icanon
|
||||
(define ttychar/eol 5) ; icanon
|
||||
(define ttychar/delete-char 2) ; ^? icanon
|
||||
(define ttychar/delete-line 3) ; ^u icanon
|
||||
(define ttychar/interrupt 0) ; ^c isig
|
||||
(define ttychar/quit 1) ; ^\ isig
|
||||
(define ttychar/suspend 10) ; ^z isig
|
||||
(define ttychar/start 12) ; ^q ixon, ixoff
|
||||
(define ttychar/stop 11) ; ^s ixon, ixoff
|
||||
(define ttychar/min 8) ; !icanon ; Not exported
|
||||
(define ttychar/time 9) ; !icanon ; Not exported
|
||||
|
||||
;;; SVR4 & 4.3+BSD
|
||||
(define ttychar/delete-word 16) ; ^w icanon
|
||||
(define ttychar/reprint 14) ; ^r icanon
|
||||
(define ttychar/literal-next 17) ; ^v iexten
|
||||
(define ttychar/discard #f) ; ^o iexten
|
||||
(define ttychar/delayed-suspend 13) ; ^y isig
|
||||
(define ttychar/eol2 6) ; icanon
|
||||
|
||||
;;; 4.3+BSD
|
||||
(define ttychar/status #f) ; ^t icanon
|
||||
|
||||
;;; Length of control-char string -- *Not Exported*
|
||||
(define num-ttychars 19)
|
||||
|
||||
;;; Magic "disable feature" tty character
|
||||
(define disable-tty-char (ascii->char #x00)) ; _POSIX_VDISABLE
|
||||
|
||||
;;; Flags controllling input processing
|
||||
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
||||
|
||||
;;; POSIX
|
||||
(define ttyin/ignore-break #o00001) ; ignbrk
|
||||
(define ttyin/interrupt-on-break #o00002) ; brkint
|
||||
(define ttyin/ignore-bad-parity-chars #o00004) ; ignpar
|
||||
(define ttyin/mark-parity-errors #o00010) ; parmrk
|
||||
(define ttyin/check-parity #o00020) ; inpck
|
||||
(define ttyin/7bits #o00040) ; istrip
|
||||
(define ttyin/nl->cr #o00100) ; inlcr
|
||||
(define ttyin/ignore-cr #o00200) ; igncr
|
||||
(define ttyin/cr->nl #o00400) ; icrnl
|
||||
(define ttyin/output-flow-ctl #o02000) ; ixon
|
||||
(define ttyin/input-flow-ctl #o10000) ; ixoff
|
||||
|
||||
;;; SVR4 & 4.3+BSD
|
||||
(define ttyin/xon-any #o4000) ; ixany: Any char restarts after stop
|
||||
(define ttyin/beep-on-overflow #f) ; imaxbel: queue full => ring bell
|
||||
|
||||
;;; SVR4
|
||||
(define ttyin/lowercase #o1000) ; iuclc: Map upper-case to lower case
|
||||
|
||||
|
||||
;;; Flags controlling output processing
|
||||
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
||||
|
||||
;;; POSIX
|
||||
(define ttyout/enable #o000001) ; opost: enable output processing
|
||||
|
||||
;;; SVR4 & 4.3+BSD
|
||||
(define ttyout/nl->crnl #o000004) ; onlcr: map nl to cr-nl
|
||||
|
||||
;;; 4.3+BSD
|
||||
(define ttyout/discard-eot #f) ; onoeot
|
||||
(define ttyout/expand-tabs #f) ; oxtabs (NOT xtabs)
|
||||
|
||||
;;; SVR4
|
||||
(define ttyout/cr->nl #o000010) ; ocrnl
|
||||
(define ttyout/fill-w/del #o000200) ; ofdel
|
||||
(define ttyout/delay-w/fill-char #o000100) ; ofill
|
||||
(define ttyout/uppercase #o000002) ; olcuc
|
||||
(define ttyout/nl-does-cr #o000040) ; onlret
|
||||
(define ttyout/no-col0-cr #o000020) ; onocr
|
||||
|
||||
;;; Newline delay
|
||||
(define ttyout/nl-delay #o000400) ; mask (nldly)
|
||||
(define ttyout/nl-delay0 #o000000)
|
||||
(define ttyout/nl-delay1 #o000400) ; tty 37
|
||||
|
||||
;;; Horizontal-tab delay
|
||||
(define ttyout/tab-delay #o006000) ; mask (tabdly)
|
||||
(define ttyout/tab-delay0 #o000000)
|
||||
(define ttyout/tab-delay1 #o000000) ; tty 37
|
||||
(define ttyout/tab-delay2 #o000000)
|
||||
(define ttyout/tab-delayx #o006000) ; Expand tabs (xtabs, tab3)
|
||||
|
||||
;;; Carriage-return delay
|
||||
(define ttyout/cr-delay #o030000) ; mask (crdly)
|
||||
(define ttyout/cr-delay0 #o000000)
|
||||
(define ttyout/cr-delay1 #o010000) ; tn 300
|
||||
(define ttyout/cr-delay2 #o020000) ; tty 37
|
||||
(define ttyout/cr-delay3 #o030000) ; concept 100
|
||||
|
||||
;;; Vertical tab delay
|
||||
(define ttyout/vtab-delay #o001000) ; mask (vtdly)
|
||||
(define ttyout/vtab-delay0 #o000000)
|
||||
(define ttyout/vtab-delay1 #o001000) ; tty 37
|
||||
|
||||
;;; Backspace delay
|
||||
(define ttyout/bs-delay #o020000) ; mask (bsdly)
|
||||
(define ttyout/bs-delay0 #o000000)
|
||||
(define ttyout/bs-delay1 #o020000)
|
||||
|
||||
;;; Form-feed delay
|
||||
(define ttyout/ff-delay #o100000) ; mask (ffdly)
|
||||
(define ttyout/ff-delay0 #o000000)
|
||||
(define ttyout/ff-delay1 #o100000)
|
||||
|
||||
(define ttyout/all-delay
|
||||
(bitwise-ior (bitwise-ior (bitwise-ior ttyout/nl-delay ttyout/tab-delay)
|
||||
(bitwise-ior ttyout/cr-delay ttyout/vtab-delay))
|
||||
(bitwise-ior ttyout/bs-delay ttyout/ff-delay)))
|
||||
|
||||
|
||||
;;; Control flags - hacking the serial-line.
|
||||
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
||||
|
||||
;;; POSIX
|
||||
(define ttyc/char-size #o00060) ; csize: character size mask
|
||||
(define ttyc/char-size5 #o00000) ; 5 bits (cs5)
|
||||
(define ttyc/char-size6 #o00020) ; 6 bits (cs6)
|
||||
(define ttyc/char-size7 #o00040) ; 7 bits (cs7)
|
||||
(define ttyc/char-size8 #o00060) ; 8 bits (cs8)
|
||||
(define ttyc/2-stop-bits #o00100) ; cstopb: Send 2 stop bits.
|
||||
(define ttyc/enable-read #o00200) ; cread: Enable receiver.
|
||||
(define ttyc/enable-parity #o00400) ; parenb
|
||||
(define ttyc/odd-parity #o01000) ; parodd
|
||||
(define ttyc/hup-on-close #o02000) ; hupcl: Hang up on last close.
|
||||
(define ttyc/no-modem-sync #o04000) ; clocal: Ignore modem lines.
|
||||
|
||||
;;; 4.3+BSD
|
||||
(define ttyc/ignore-flags #f) ; cignore: ignore control flags
|
||||
(define ttyc/CTS-output-flow-ctl #f) ; ccts_oflow: CTS flow control of output
|
||||
(define ttyc/RTS-input-flow-ctl #f) ; crts_iflow: RTS flow control of input
|
||||
(define ttyc/carrier-flow-ctl #f) ; mdmbuf
|
||||
|
||||
;;; Local flags -- hacking the tty driver / user interface.
|
||||
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
||||
|
||||
;;; POSIX
|
||||
(define ttyl/visual-delete #o020) ; echoe: Visually erase chars
|
||||
(define ttyl/echo-delete-line #o040) ; echok: Echo nl after line kill
|
||||
(define ttyl/echo #o010) ; echo: Enable echoing
|
||||
(define ttyl/echo-nl #o100) ; echonl: Echo nl even if echo is off
|
||||
(define ttyl/canonical #o002) ; icanon: Canonicalize input
|
||||
(define ttyl/enable-signals #o001) ; isig: Enable ^c, ^z signalling
|
||||
(define ttyl/extended #o400) ; iexten: Enable extensions
|
||||
(define ttyl/ttou-signal #f) ; tostop: SIGTTOU on background output
|
||||
(define ttyl/no-flush-on-interrupt #o200) ; noflsh
|
||||
|
||||
;;; SVR4 & 4.3+BSD
|
||||
(define ttyl/visual-delete-line #f) ; echoke: visually erase a line-kill
|
||||
(define ttyl/hardcopy-delete #f) ; echoprt: visual erase for hardcopy
|
||||
(define ttyl/echo-ctl #f) ; echoctl: echo control chars as "^X"
|
||||
(define ttyl/flush-output #f) ; flusho: output is being flushed
|
||||
(define ttyl/reprint-unread-chars #f) ; pendin: retype pending input
|
||||
|
||||
;;; 4.3+BSD
|
||||
(define ttyl/alt-delete-word #f) ; altwerase
|
||||
(define ttyl/no-kernel-status #f) ; nokerninfo: no kernel status on ^T
|
||||
|
||||
;;; SVR4
|
||||
(define ttyl/case-map #o4) ; xcase: canonical upper/lower presentation
|
||||
|
||||
;;; Vector of (speed . code) pairs.
|
||||
|
||||
(define baud-rates '#((0 . 0) (1 . 50) (2 . 75)
|
||||
(3 . 110) (4 . 134) (5 . 150)
|
||||
(6 . 200) (7 . 300) (8 . 600)
|
||||
(9 . 1200) (10 . 1800) (11 . 2400)
|
||||
(12 . 4800) (13 . 9600) (14 . exta)
|
||||
(15 . extb)))
|
||||
|
||||
;;; tcflush() constants
|
||||
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
||||
|
||||
(define %flush-tty/input 0) ; TCIFLUSH
|
||||
(define %flush-tty/output 1) ; TCOFLUSH
|
||||
(define %flush-tty/both 2) ; TCIOFLUSH
|
||||
|
||||
|
||||
;;; tcflow() constants
|
||||
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
||||
|
||||
(define %tcflow/start-out 1) ; TCOON
|
||||
(define %tcflow/stop-out 0) ; TCOOFF
|
||||
(define %tcflow/start-in 3) ; TCION
|
||||
(define %tcflow/stop-in 2) ; TCIOFF
|
||||
|
||||
|
||||
;;; tcsetattr() constants
|
||||
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
||||
|
||||
(define %set-tty-info/now 0) ; TCSANOW Make change immediately.
|
||||
(define %set-tty-info/drain 1) ; TCSADRAIN Drain output, then change.
|
||||
(define %set-tty-info/flush 2) ; TCSAFLUSH Drain output, flush input.
|
|
@ -1,40 +0,0 @@
|
|||
;;; Scsh routines for analysing exit codes returned by WAIT.
|
||||
;;; Copyright (c) 1994 by Olin Shivers. See file COPYING.
|
||||
;;;
|
||||
;;; To port these to a new OS, consult /usr/include/sys/wait.h,
|
||||
;;; and check the WIFEXITED, WEXITSTATUS, WIFSTOPPED, WSTOPSIG,
|
||||
;;; WIFSIGNALED, and WTERMSIG macros for the magic fields they use.
|
||||
;;; These definitions are for Ultrix.
|
||||
;;;
|
||||
;;; I could have done a portable version by making C calls for this,
|
||||
;;; but it's such overkill.
|
||||
|
||||
|
||||
;;; If process terminated normally, return the exit code, otw #f.
|
||||
|
||||
(define (status:exit-val status)
|
||||
(and (not (= (bitwise-and #xFF status) #x7F))
|
||||
(zero? (bitwise-and #x7F status))
|
||||
(bitwise-and #xFF (arithmetic-shift status -8))))
|
||||
|
||||
|
||||
;;; If the process was suspended, return the suspending signal, otw #f.
|
||||
|
||||
(define (status:stop-sig status)
|
||||
(and (= #x7F (bitwise-and status #xFF))
|
||||
(bitwise-and #xFF (arithmetic-shift status -8))))
|
||||
|
||||
|
||||
;;; If the process terminated abnormally,
|
||||
;;; return the terminating signal, otw #f.
|
||||
|
||||
(define (status:term-sig status)
|
||||
(let ((termsig (bitwise-and status #x7F)))
|
||||
(and (not (zero? termsig)) ; Didn't exit.
|
||||
(not (= #x7F (bitwise-and status #xFF))) ; Not suspended.
|
||||
termsig)))
|
||||
|
||||
|
||||
;;; Flags.
|
||||
(define wait/poll 1) ; Don't hang if nothing to wait for.
|
||||
(define wait/stopped-children 2) ; Report on suspended subprocs, too.
|
Loading…
Reference in New Issue