🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.lang.lisp.x
Article #246

probable bug in xscheme

#246
From: Mikael Pettersson
Date: Mon, 28 Jan 1991 09:19
19 lines
1299 bytes
There appears to be a bug in xsetfposition() (xlfun2.c).
Suppose the input file contains the characters #\5, #\Space
and #\; . Suppose we've done a (read) from the file, reading
5. Then #\Space will have been read and then pushed back
again by xlungetc(). Now let's rewind the port by doing
a (set-file-position! <the-port> 0 0). Then the next character
read from the port will still be that #\Space instead of the
#\5. Definitely un-cool :-(

The fix is to insert a line:

	setsavech(fptr, '\0');

just before the line in xsetfposition() that calls fseek().

/Mike
--
Mikael Pettersson, Dept of Comp & Info Sci, University of Linkoping, Sweden
email: mpe@ida.liu.se or ...!{mcsun,munnari,uunet,unido,...}!sunic!liuida!mpe
Technical Details
Message-ID: <1991Jan28.091929.15518@ida.liu.se>
Path: arc1-ca.pugleaf.net!utzoo!utgpu!news-server.csri.toronto.edu!bonnie.concordia.ca!nstn.ns.ca!news.cs.indiana.edu!samsung!usc!zaphod.mps.ohio-state.edu!think.com!mintaka!bloom-beacon!eru!hagbard!sunic!liuida!mikpe

Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!utzoo!utgpu!news-server.csri.toronto.edu!bonnie.concordia.ca!nstn.ns.ca!news.cs.indiana.edu!samsung!usc!zaphod.mps.ohio-state.edu!think.com!mintaka!bloom-beacon!eru!hagbard!sunic!liuida!mikpe
From: mikpe@IDA.LiU.SE (Mikael Pettersson)
Newsgroups: comp.lang.lisp.x
Subject: probable bug in xscheme
Summary: xsetfposition() interacts with xlgetc() and xlungetc()
Message-ID: <1991Jan28.091929.15518@ida.liu.se>
Date: 28 Jan 91 09:19:29 GMT
Sender: news@ida.liu.se (News Subsystem)
Organization: CIS Dept, Univ of Linkoping, Sweden
Lines: 19