mirror of
https://git.savannah.gnu.org/git/guile.git
synced 2025-06-10 22:10:21 +02:00
Merge remote-tracking branch 'origin/stable-2.0'
Moved scm_i_struct_hash from struct.c to hash.c and made it static. The port's alist is now a field of 'scm_t_port'. Conflicts: libguile/arrays.c libguile/hash.c libguile/ports.c libguile/print.h libguile/read.c
This commit is contained in:
commit
fa980bcc0f
53 changed files with 1677 additions and 531 deletions
|
@ -3137,8 +3137,11 @@ module '(ice-9 q) '(make-q q-length))}."
|
|||
(lambda (option)
|
||||
(apply (lambda (name value documentation)
|
||||
(display name)
|
||||
(if (< (string-length (symbol->string name)) 8)
|
||||
(display #\tab))
|
||||
(let ((len (string-length (symbol->string name))))
|
||||
(when (< len 16)
|
||||
(display #\tab)
|
||||
(when (< len 8)
|
||||
(display #\tab))))
|
||||
(display #\tab)
|
||||
(display value)
|
||||
(display #\tab)
|
||||
|
@ -3509,7 +3512,9 @@ module '(ice-9 q) '(make-q q-length))}."
|
|||
(define-syntax define-public
|
||||
(syntax-rules ()
|
||||
((_ (name . args) . body)
|
||||
(define-public name (lambda args . body)))
|
||||
(begin
|
||||
(define name (lambda args . body))
|
||||
(export name)))
|
||||
((_ name val)
|
||||
(begin
|
||||
(define name val)
|
||||
|
@ -3899,7 +3904,7 @@ module '(ice-9 q) '(make-q q-length))}."
|
|||
;;;
|
||||
;;; Currently, the following feature identifiers are supported:
|
||||
;;;
|
||||
;;; guile r5rs srfi-0 srfi-4 srfi-6 srfi-13 srfi-14 srfi-55 srfi-61
|
||||
;;; guile r5rs srfi-0 srfi-4 srfi-6 srfi-13 srfi-14 srfi-55 srfi-61 srfi-105
|
||||
;;;
|
||||
;;; Remember to update the features list when adding more SRFIs.
|
||||
;;;
|
||||
|
@ -3919,6 +3924,7 @@ module '(ice-9 q) '(make-q q-length))}."
|
|||
srfi-39 ;; parameterize
|
||||
srfi-55 ;; require-extension
|
||||
srfi-61 ;; general cond clause
|
||||
srfi-105 ;; curly infix expressions
|
||||
))
|
||||
|
||||
;; This table maps module public interfaces to the list of features.
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
;;; Parsing Guile's command-line
|
||||
|
||||
;;; Copyright (C) 1994-1998, 2000-2011 Free Software Foundation, Inc.
|
||||
;;; Copyright (C) 1994-1998, 2000-2011, 2012 Free Software Foundation, Inc.
|
||||
|
||||
;;;; This library is free software; you can redistribute it and/or
|
||||
;;;; modify it under the terms of the GNU Lesser General Public
|
||||
|
@ -325,7 +325,7 @@ If FILE begins with `-' the -s switch is mandatory.
|
|||
|
||||
((string=? arg "--listen") ; start a repl server
|
||||
(parse args
|
||||
(cons '(@@ (system repl server) (spawn-server)) out)))
|
||||
(cons '((@@ (system repl server) spawn-server)) out)))
|
||||
|
||||
((string-prefix? "--listen=" arg) ; start a repl server
|
||||
(parse
|
||||
|
@ -336,14 +336,12 @@ If FILE begins with `-' the -s switch is mandatory.
|
|||
((string->number where) ; --listen=PORT
|
||||
=> (lambda (port)
|
||||
(if (and (integer? port) (exact? port) (>= port 0))
|
||||
`(@@ (system repl server)
|
||||
(spawn-server
|
||||
(make-tcp-server-socket #:port ,port)))
|
||||
`((@@ (system repl server) spawn-server)
|
||||
((@@ (system repl server) make-tcp-server-socket) #:port ,port))
|
||||
(error "invalid port for --listen"))))
|
||||
((string-prefix? "/" where) ; --listen=/PATH/TO/SOCKET
|
||||
`(@@ (system repl server)
|
||||
(spawn-server
|
||||
(make-unix-domain-server-socket #:path ,where))))
|
||||
`((@@ (system repl server) spawn-server)
|
||||
((@@ (system repl server) make-unix-domain-server-socket) #:path ,where)))
|
||||
(else
|
||||
(error "unknown argument to --listen"))))
|
||||
out)))
|
||||
|
|
|
@ -16,7 +16,8 @@
|
|||
|
||||
(define-module (ice-9 curried-definitions)
|
||||
#:replace ((cdefine . define)
|
||||
(cdefine* . define*)))
|
||||
(cdefine* . define*)
|
||||
define-public))
|
||||
|
||||
(define-syntax cdefine
|
||||
(syntax-rules ()
|
||||
|
@ -39,3 +40,14 @@
|
|||
(lambda* rest body body* ...)))
|
||||
((_ . rest)
|
||||
(define* . rest))))
|
||||
|
||||
(define-syntax define-public
|
||||
(syntax-rules ()
|
||||
((_ (name . args) . body)
|
||||
(begin
|
||||
(cdefine (name . args) . body)
|
||||
(export name)))
|
||||
((_ name val)
|
||||
(begin
|
||||
(define name val)
|
||||
(export name)))))
|
||||
|
|
|
@ -427,15 +427,15 @@
|
|||
(case modifier
|
||||
((at)
|
||||
(format:out-str
|
||||
(with-output-to-string
|
||||
(lambda ()
|
||||
(truncated-print (next-arg)
|
||||
(call-with-output-string
|
||||
(lambda (p)
|
||||
(truncated-print (next-arg) p
|
||||
#:width width)))))
|
||||
((colon-at)
|
||||
(format:out-str
|
||||
(with-output-to-string
|
||||
(lambda ()
|
||||
(truncated-print (next-arg)
|
||||
(call-with-output-string
|
||||
(lambda (p)
|
||||
(truncated-print (next-arg) p
|
||||
#:width
|
||||
(max (- width
|
||||
output-col)
|
||||
|
@ -779,7 +779,7 @@
|
|||
(define (format:obj->str obj slashify)
|
||||
(let ((res (if slashify
|
||||
(object->string obj)
|
||||
(with-output-to-string (lambda () (display obj))))))
|
||||
(call-with-output-string (lambda (p) (display obj p))))))
|
||||
(if (and format:read-proof (string-prefix? "#<" res))
|
||||
(object->string res)
|
||||
res)))
|
||||
|
|
|
@ -172,8 +172,9 @@
|
|||
(let loop ((start 0)
|
||||
(value init)
|
||||
(abuts #f)) ; True if start abuts a previous match.
|
||||
(define bol (if (zero? start) 0 regexp/notbol))
|
||||
(let ((m (if (> start (string-length string)) #f
|
||||
(regexp-exec regexp string start flags))))
|
||||
(regexp-exec regexp string start (logior flags bol)))))
|
||||
(cond
|
||||
((not m) value)
|
||||
((and (= (match:start m) (match:end m)) abuts)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue