Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!swrinde!mips!apple!well!oster From: oster@well.sf.ca.us (David Phillip Oster) Newsgroups: comp.sys.mac.programmer Subject: Re: How do you get the NewLine mode to work? Keywords: Newline,Filemanager,PBread Message-ID: <21636@well.sf.ca.us> Date: 13 Nov 90 10:35:16 GMT References: <18094@unix.SRI.COM> <1990Nov10.193723.19603@eng.umd.edu> Organization: Whole Earth 'Lectronic Link, Sausalito, CA Lines: 19 In article <1990Nov10.193723.19603@eng.umd.edu> russotto@eng.umd.edu (Matthew T. Russotto) writes: >In article <18094@unix.SRI.COM> mxmora@sri-unix.sri.com (Matt Mora) writes: >>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 the easy way: posmode := $0D80; {set the highorder byte to CR } { and the newLine flag all in one go } Note: One of the blinding stupidities of the Macintosh is that newLine mode is NOT implemented by the serial driver, so you can't get the operating system to directly simulate unix line mode i/o (yes you can do it, but it isn't built-in.) -- -- David Phillip Oster - Note new signature. Old one has gone Bye Bye. -- oster@well.sf.ca.us = {backbone}!well!oster