From: Chris Hanson Date: Wed, 2 Aug 2006 18:18:12 +0000 (+0000) Subject: Fix various compiler warnings. X-Git-Tag: 20090517-FFI~961 X-Git-Url: https://birchwood-abbey.net/git?a=commitdiff_plain;h=ecdbe6f5a480e881b83732bc42deb06a84d1a2d1;p=mit-scheme.git Fix various compiler warnings. --- diff --git a/v7/src/runtime/http-client.scm b/v7/src/runtime/http-client.scm index ba5428bde..267cfa299 100644 --- a/v7/src/runtime/http-client.scm +++ b/v7/src/runtime/http-client.scm @@ -1,6 +1,6 @@ #| -*-Scheme-*- -$Id: http-client.scm,v 14.1 2006/08/02 16:27:09 riastradh Exp $ +$Id: http-client.scm,v 14.2 2006/08/02 18:18:10 cph Exp $ Copyright 2006 Taylor R. Campbell @@ -332,7 +332,7 @@ USA. (let* ((string (string-allocate length)) (octets (read-substring! string 0 length input-port))) (if (fix:< octets length) - (string-prefix string octets) + (string-head string octets) string))) ;;;; RFC 822 Header Fields @@ -344,16 +344,19 @@ USA. (define (rfc822:header-field? obj) (and (pair? obj) (symbol? (car obj)) - (let* ((name (symbol-name (car obj))) - (length (string-length name))) - (and (> length 0) - (rfc822:header-field-name? name 0 length))) + (let ((name (symbol-name (car obj)))) + (rfc822:header-field-name? name 0 (string-length name))) (pair? (cdr obj)) (string? (cadr obj)) (null? (cddr obj)))) (define-guarantee rfc822:header-field "RFC 822 header field") +(define (rfc822:header-field-name? string start end) + (and (fix:< start end) + (not (substring-find-next-char-in-set + string start end rfc822:char-set:not-header-constituents)))) + (define (rfc822:make-header-field name value) (list name value)) (define (rfc822:header-field-name header) (car header)) (define (rfc822:header-field-value header) (cadr header)) @@ -386,7 +389,7 @@ USA. (define (rfc822:header-fields->string header-fields) (call-with-output-string - (lambda () + (lambda (port) (rfc822:write-header-fields header-fields port)))) (define (rfc822:write-header-field header-field port) @@ -468,6 +471,9 @@ USA. (char-set-difference (ascii-range->char-set 33 127) (char-set #\:))) +(define rfc822:char-set:not-header-constituents + (char-set-invert rfc822:char-set:header-constituents)) + (define rfc822:matcher:header-field-line-content (*matcher (* (not-char #\newline)))) diff --git a/v7/src/runtime/runtime.pkg b/v7/src/runtime/runtime.pkg index 06b6d5602..f6f5c79ee 100644 --- a/v7/src/runtime/runtime.pkg +++ b/v7/src/runtime/runtime.pkg @@ -1,6 +1,6 @@ #| -*-Scheme-*- -$Id: runtime.pkg,v 14.590 2006/08/02 16:27:09 riastradh Exp $ +$Id: runtime.pkg,v 14.591 2006/08/02 18:18:12 cph Exp $ Copyright 1988,1989,1990,1991,1992,1993 Massachusetts Institute of Technology Copyright 1994,1995,1996,1997,1998,1999 Massachusetts Institute of Technology @@ -5048,10 +5048,10 @@ USA. http-response/first-header-field http-response/all-header-fields http-response/header-fields - http-response/http-version http-response/reason http-response/status-code http-response/status-type + http-response/version http-version http-version? http-version=?