1
Fork 0
mirror of https://git.savannah.gnu.org/git/guile.git synced 2025-05-20 11:40:18 +02:00

Merge remote-tracking branch 'origin/stable-2.0'

This commit is contained in:
Mark H Weaver 2013-08-23 22:36:02 -04:00
commit 453acfacf4
5 changed files with 21 additions and 25 deletions

View file

@ -1932,7 +1932,7 @@ exact integer object. If no characters can be read before an end of
file, the end-of-file object is returned.
@end deffn
@deffn {Scheme Procedure} get-string-all textual-input-port count
@deffn {Scheme Procedure} get-string-all textual-input-port
Reads from @var{textual-input-port} until an end of file, decoding
characters in the same manner as @code{get-string-n} and
@code{get-string-n!}.

View file

@ -2599,6 +2599,8 @@ written into the port is returned."
(define (module-add! m v var)
(if (not (variable? var))
(error "Bad variable to module-add!" var))
(if (not (symbol? v))
(error "Bad symbol to module-add!" v))
(module-obarray-set! (module-obarray m) v var)
(module-modified m))
@ -3750,7 +3752,7 @@ but it fails to load."
(syntax-rules ()
((_ (name . args) . body)
(begin
(define name (lambda args . body))
(define (name . args) . body)
(export name)))
((_ name val)
(begin

View file

@ -1,4 +1,4 @@
;;; Copyright (C) 2010 Free Software Foundation, Inc.
;;; Copyright (C) 2010, 2013 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
@ -21,32 +21,25 @@
(define-syntax cdefine
(syntax-rules ()
((_ ((head . tail) . rest) body body* ...)
(cdefine (head . tail)
(lambda rest body body* ...)))
((_ (head . rest) body body* ...)
(define head
(cdefine head
(lambda rest body body* ...)))
((_ . rest)
(define . rest))))
((_ name val)
(define name val))))
(define-syntax cdefine*
(syntax-rules ()
((_ ((head . tail) . rest) body body* ...)
(cdefine* (head . tail)
(lambda* rest body body* ...)))
((_ (head . rest) body body* ...)
(define* head
(cdefine* head
(lambda* rest body body* ...)))
((_ . rest)
(define* . rest))))
((_ name val)
(define* name val))))
(define-syntax define-public
(syntax-rules ()
((_ (name . args) . body)
(begin
(cdefine (name . args) . body)
(export name)))
((_ (head . rest) body body* ...)
(define-public head
(lambda rest body body* ...)))
((_ name val)
(begin
(define name val)

View file

@ -1137,16 +1137,13 @@ three values: the method, the URI, and the version."
(display host-port port)))))
(let ((path (uri-path uri))
(query (uri-query uri)))
(if (not (string-null? path))
(if (string-null? path)
(display "/" port)
(display path port))
(if query
(begin
(display "?" port)
(display query port)))
(if (and (string-null? path)
(not query))
;; Make sure we display something.
(display "/" port)))
(display query port))))
(display #\space port)
(write-http-version version port)
(display "\r\n" port))

View file

@ -173,6 +173,10 @@
(build-uri 'http
#:path "/pub/WWW/TheProject.html")
(1 . 1))
(pass-if-write-request-line "GET /?foo HTTP/1.1"
GET
(build-uri 'http #:query "foo")
(1 . 1))
(pass-if-write-request-line "HEAD /etc/hosts?foo=bar HTTP/1.1"
HEAD
(build-uri 'http