Commit 65070d9f authored by Erick Gallesio's avatar Erick Gallesio

Added SRFI-59

parent e371c640
......@@ -18,7 +18,7 @@
;; USA.
;; Author: Erick Gallesio [eg@unice.fr]
;; Creation date: 26-Nov-2000 18:19 (eg)
;; Last file update: 9-Dec-2007 21:33 (eg)
;; Last file update: 13-Dec-2007 12:42 (eg)
;;
;; ======================================================================
......@@ -444,6 +444,16 @@ figure ,(ref :figure "Feature identifiers") in a
(tr (tdl "conditions") (tdl "srfi-34, srfi-35, srfi-36"))
(tr (tdl "hash-tables") (tdl "srfi-69"))))))
;; ----------------------------------------------------------------------
;; SRFI 59 -- Vicinity
;; ----------------------------------------------------------------------
(srfi-section 59
(p [,(quick-link-srfi 59) is fully supported. To use SRFI-59,
you need to insert the following expression])
(fontified-code [(require "srfi-59")])
(p [in your code or uses the ,(code "cond-expand") special form.]))
;; ----------------------------------------------------------------------
;; SRFI 60 -- Integers as Bits
;; ----------------------------------------------------------------------
......
......@@ -21,7 +21,7 @@
;;;;
;;;; Author: Erick Gallesio [eg@essi.fr]
;;;; Creation date: 18-Aug-2004 12:43 (eg)
;;;; Last file update: 9-Dec-2007 21:34 (eg)
;;;; Last file update: 13-Dec-2007 12:40 (eg)
;;;;
(define srfi-address "http://srfi.schemers.org/srfi-~A/srfi-~A.html")
......@@ -57,6 +57,7 @@
(45 . "Optional positional and named parameters")
(48 . "Intermediate Format Strings")
(55 . "Require-extension")
(59 . "Vicinity")
(60 . "Integers as bits")
(62 . "S-expression comments")
(66 . "Octet Vectors")
......
......@@ -2,7 +2,7 @@
#
# Author: Erick Gallesio [eg@unice.fr]
# Creation date: 11-Apr-2000 10:30 (eg)
# Last file update: 9-Dec-2007 21:31 (eg)
# Last file update: 13-Dec-2007 12:37 (eg)
SUBDIRS = Match.d SILex.d Lalr.d ScmPkg.d @LURCDIR@
......@@ -68,6 +68,7 @@ scheme_SRCS = STklos.init \
srfi-36.stk \
srfi-45.stk \
srfi-48.stk \
srfi-59.stk \
srfi-60.stk \
srfi-66.stk \
srfi-69.stk \
......@@ -106,6 +107,7 @@ scheme_OBJS = compfile.ostk \
srfi-36.ostk \
srfi-45.ostk \
srfi-48.ostk \
srfi-59.ostk \
srfi-60.ostk \
srfi-66.ostk \
srfi-69.ostk \
......
......@@ -18,7 +18,7 @@
#
# Author: Erick Gallesio [eg@unice.fr]
# Creation date: 11-Apr-2000 10:30 (eg)
# Last file update: 9-Dec-2007 21:31 (eg)
# Last file update: 13-Dec-2007 12:37 (eg)
VPATH = @srcdir@
pkgdatadir = $(datadir)/@PACKAGE@
......@@ -260,6 +260,7 @@ scheme_SRCS = STklos.init \
srfi-36.stk \
srfi-45.stk \
srfi-48.stk \
srfi-59.stk \
srfi-60.stk \
srfi-66.stk \
srfi-69.stk \
......@@ -298,6 +299,7 @@ scheme_OBJS = compfile.ostk \
srfi-36.ostk \
srfi-45.ostk \
srfi-48.ostk \
srfi-59.ostk \
srfi-60.ostk \
srfi-66.ostk \
srfi-69.ostk \
......
......@@ -4,7 +4,7 @@
;;;
;;; This code is in the public domain.
;;;
;;; Last file update: 6-Dec-2007 12:53 (eg)
;;; Last file update: 13-Dec-2007 12:38 (eg)
;;;
......@@ -84,12 +84,8 @@
(define vicinity:suffix?
(let ((suffi
(case (software-type)
((amiga) '(#\: #\/))
((macos thinkc) '(#\:))
((ms-dos windows atarist os/2) '(#\\ #\/))
((nosve) '(#\: #\.))
((unix coherent plan9) '(#\/))
((vms) '(#\: #\]))
(else
(slib:warn "require.scm" 'unknown 'software-type (software-type))
"/"))))
......@@ -101,29 +97,23 @@
((vicinity:suffix? (string-ref pathname i))
(substring pathname 0 (+ i 1)))
(else (loop (- i 1))))))
(define (program-vicinity)
(if *load-pathname*
(pathname->vicinity *load-pathname*)
(slib:error 'program-vicinity " called; use slib:load to load")))
(let ((cur (current-loading-file)))
(and cur
(pathname->vicinity cur))))
;@
(define sub-vicinity
(case (software-type)
((vms) (lambda
(vic name)
(let ((l (string-length vic)))
(if (or (zero? (string-length vic))
(not (char=? #\] (string-ref vic (- l 1)))))
(string-append vic "[" name "]")
(string-append (substring vic 0 (- l 1))
"." name "]")))))
(else (let ((*vicinity-suffix*
(case (software-type)
((nosve) ".")
((macos thinkc) ":")
((ms-dos windows atarist os/2) "\\")
((unix coherent plan9 amiga) "/"))))
(lambda (vic name)
(string-append vic name *vicinity-suffix*))))))
(let ((*vicinity-suffix*
(case (software-type)
((nosve) ".")
((macos thinkc) ":")
((ms-dos windows atarist os/2) "\\")
((unix coherent plan9 amiga) "/"))))
(lambda (vic name)
(string-append vic name *vicinity-suffix*))))
;@
(define (make-vicinity <pathname>) <pathname>)
;@
......@@ -140,6 +130,7 @@
thunk
(lambda () (exchange old)))))))
;;@ SLIB:FEATURES is a list of symbols naming the (SLIB) features
;;; initially supported by this implementation.
(define slib:features
......@@ -217,6 +208,13 @@
))
;;; All the functions of srfi-59 are now defined. The following
;;; provide ensures that the file "srfi-59" will be not loaded
(provide "srfi-59")
;;@ (OUTPUT-PORT-WIDTH <port>)
(define (output-port-width . arg) 79)
......@@ -421,6 +419,7 @@
(define program-arguments argv)
(define current-time current-seconds)
;;;
;;; Retain original require/provide before loading "require.scm"
;;;
......@@ -463,3 +462,4 @@
(lambda (item)
((if (symbol? item) slib:provided? stklos:provided?) item))))
(provide "STklos.init")
......@@ -21,7 +21,7 @@
;;;;
;;;; Author: Erick Gallesio [eg@unice.fr]
;;;; Creation date: 30-Aug-1999 16:26 (eg)
;;;; Last file update: 9-Dec-2007 21:29 (eg)
;;;; Last file update: 13-Dec-2007 12:26 (eg)
;;;;
(define-module SRFI-0
......@@ -94,7 +94,7 @@
;; srfi-56 ; ....... withdrawn
;; srfi-57 ; Records
;; srfi-58 ; Array Notation
;; srfi-59 ; Vicinity
(srfi-59 "srfi-59") ; Vicinity
(srfi-60 "srfi-60") ; Integers as Bits
;; srfi-61 ; A more general cond clause
srfi-62 ; S-expression comments
......
This diff is collapsed.
This diff is collapsed.
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment