unofficial mirror of bug-guile@gnu.org 
 help / color / mirror / Atom feed
* bug#20302: peek-char messes up file position on binary string ports
@ 2015-04-11 11:48 David Kastrup
  2015-04-17  5:29 ` Mark H Weaver
       [not found] ` <handler.20302.B.142875290514957.ack@debbugs.gnu.org>
  0 siblings, 2 replies; 5+ messages in thread
From: David Kastrup @ 2015-04-11 11:48 UTC (permalink / raw)
  To: 20302

[-- Attachment #1: Type: text/plain, Size: 42 bytes --]


Any idea how to work around _this_ one?


[-- Attachment #2: gaga.scm --]
[-- Type: text/plain, Size: 260 bytes --]

(use-modules (rnrs bytevectors) (rnrs io ports))
(let ((port (open-bytevector-input-port
	     (string->utf8 "Blablabla\nBlablabla\n"))))
  (seek port 13 SEEK_SET)
  (format #t "~c ~d\n" (peek-char port)
	  (ftell port)))
;; Outputs b 3 but should output b 13

[-- Attachment #3: Type: text/plain, Size: 95 bytes --]


This is using
guile (GNU Guile) 2.0.11
Packaged by Debian (2.0.11-deb+1-1)

-- 
David Kastrup

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2015-11-04 21:12 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-04-11 11:48 bug#20302: peek-char messes up file position on binary string ports David Kastrup
2015-04-17  5:29 ` Mark H Weaver
2015-09-06 11:55   ` Mark H Weaver
2015-11-04 21:12     ` Mark H Weaver
     [not found] ` <handler.20302.B.142875290514957.ack@debbugs.gnu.org>
2015-08-31  9:09   ` bug#20302: Acknowledgement (peek-char messes up file position on binary string ports) David Kastrup

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).