diff options
author | Marius Bakke <mbakke@fastmail.com> | 2019-06-20 23:38:56 +0200 |
---|---|---|
committer | Marius Bakke <mbakke@fastmail.com> | 2019-06-20 23:38:56 +0200 |
commit | 6cb1ef9ea28ee14b3bb5442e8af1f54c27802f09 (patch) | |
tree | c2c35f733d250f86eb052d174fcb1c24a54fea79 /guix/utils.scm | |
parent | 20e4ee1e3b7044d9f64de02c6237b00e5a57da35 (diff) | |
parent | 010689e7067df1288af29176f4a8639de816b1ef (diff) | |
download | guix-patches-6cb1ef9ea28ee14b3bb5442e8af1f54c27802f09.tar guix-patches-6cb1ef9ea28ee14b3bb5442e8af1f54c27802f09.tar.gz |
Merge branch 'staging' into core-updates
Diffstat (limited to 'guix/utils.scm')
-rw-r--r-- | guix/utils.scm | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/guix/utils.scm b/guix/utils.scm index 709cdf9353..f480c3291f 100644 --- a/guix/utils.scm +++ b/guix/utils.scm @@ -718,7 +718,7 @@ environment variable name like \"XDG_CONFIG_HOME\"; SUFFIX is a suffix like (define (canonical-newline-port port) "Return an input port that wraps PORT such that all newlines consist - of a single carriage return." + of a single linefeed." (define (get-position) (if (port-has-port-position? port) (port-position port) #f)) (define (set-position! position) @@ -730,11 +730,11 @@ environment variable name like \"XDG_CONFIG_HOME\"; SUFFIX is a suffix like (let loop ((count 0) (byte (get-u8 port))) (cond ((eof-object? byte) count) + ;; XXX: consume all CRs even if not followed by LF. + ((eqv? byte (char->integer #\return)) (loop count (get-u8 port))) ((= count (- n 1)) (bytevector-u8-set! bv (+ start count) byte) n) - ;; XXX: consume all LFs even if not followed by CR. - ((eqv? byte (char->integer #\return)) (loop count (get-u8 port))) (else (bytevector-u8-set! bv (+ start count) byte) (loop (+ count 1) (get-u8 port)))))) |