home *** CD-ROM | disk | FTP | other *** search
- Newsgroups: comp.sys.mac.programmer
- Path: sparky!uunet!haven.umd.edu!ni.umd.edu!zben-mac-ii.umd.edu!user
- From: zben@ni.umd.edu (Charles B. Cranston)
- Subject: Re: updating window text / getting text lines from buffer
- Message-ID: <zben-280892150237@zben-mac-ii.umd.edu>
- Followup-To: comp.sys.mac.programmer
- Sender: usenet@ni.umd.edu (USENET News System)
- Nntp-Posting-Host: zben-mac-ii.umd.edu
- Organization: UM Home for the Terminally Analytical
- References: <86967@netnews.upenn.edu> <1992Aug25.232449.12720@kronos.arc.nasa.gov>
- Date: Fri, 28 Aug 1992 19:08:26 GMT
- Lines: 28
-
- In article <1992Aug25.232449.12720@kronos.arc.nasa.gov>,
- joshr@kronos.arc.nasa.gov (Joshua Rabinowitz-Summer-91) wrote:
-
- > ... there is a method of reading from
- > a file documented somewhere in IM for getting the filemanager to
- > parse files into lines delimited by any desired char ('\n' in this case)
-
- > If anyone has written a code snippet that does this, pls. inform me
- > as to how this is done. Posting here is okay, but mailing me a code snippet
- > would be godly.
-
- var
- junk: Integer;
- Buff: Packed Array[0..255] of SignedByte;
- PBRec: ParamBlockRec;
- begin
- PBRec.ioRefNum := theFile;
- PBRec.ioBuffer := @Buff;
- PBRec.ioPosMode := $0D80; <<----80 is read till EOL bit, 0D is CR!
- PBRec.ioPosOffset := 0;
- PBRec.ioReqCount := 256;
- junk := PBReadASync(@PBRec);
- UseText(PBRec.ioActCount,@Buff);
-
- Yipe, I figured this out so long ago I was still doing Pascal...
- Bear skins and stone knives...
-
- zben@ni.umd.edu -KA3ZDF
-