fix encoding scanning for non-seekable ports
authorAndy Wingo <wingo@pobox.com>
Thu, 3 Mar 2011 11:46:49 +0000 (12:46 +0100)
committerAndy Wingo <wingo@pobox.com>
Thu, 3 Mar 2011 11:57:46 +0000 (12:57 +0100)
commitd900843c72ee1f34d79527deb38787e581592cf5
treec2aae2aa08a015f615b3f2fab54a488ceb7d533b
parent8d795c83d463e893cdac16733fd42bef809c0d79
fix encoding scanning for non-seekable ports

* libguile/read.c (scm_i_scan_for_encoding): If possible, just use the
  read buffer for the encoding scan, and avoid seeking.  Fixes
  `(open-input-file "/dev/urandom")', because /dev/urandom can't be
  seeked backwards.
libguile/read.c