Path: utzoo!utgpu!news-server.csri.toronto.edu!rutgers!apple!usc!zaphod.mps.ohio-state.edu!uakari.primate.wisc.edu!aplcen!haven!mimsy!mojo!russotto From: russotto@eng.umd.edu (Matthew T. Russotto) Newsgroups: comp.sys.mac.programmer Subject: Re: How do you get the NewLine mode to work? Keywords: Newline,Filemanager,PBread Message-ID: <1990Nov10.193723.19603@eng.umd.edu> Date: 10 Nov 90 19:37:23 GMT References: <18094@unix.SRI.COM> Sender: news@eng.umd.edu (The News System) Organization: College of Engineering, Maryversity of Uniland, College Park Lines: 24 In article <18094@unix.SRI.COM> mxmora@sri-unix.sri.com (Matt Mora) writes: >I'm trying to get the newline mode to work with PBread >but I am having no luck. in IM it states: > >"Note: Advanced programmers: Bit 7 of ioPosmode is the newline flag; >it's set if read operations should terminate at a newline character. The >ASCII code of the newline character is specified in the high-order byte of >ioPosMode. If the newline flag is set, the data will be read, one byte at a >time unitl the newline character is encountered, ioReqCount bytes have been >read, or the end-of-file is reached." > >This is what I tried : > >posmode := $0D00; {set the highorder byte to CR } I think you also need to add FSFromStart. > BitSet(@PosMode, 0); {set bit 7 } Nope. This sets the wrong bit. This sets bit 15, not 7. Try PosMode := bor(PosMode, $0080); if you have 'bor'. (BitSet is inefficient). If you don't, BitSet(@PosMode, 8); ought to do it. -- Matthew T. Russotto russotto@eng.umd.edu russotto@wam.umd.edu Tax the rich, and feed the poor -- until there are, rich no more.