Xref: utzoo comp.sys.amiga.programmer:353 comp.sys.amiga.tech:17813 Path: utzoo!attcan!uunet!zaphod.mps.ohio-state.edu!rpi!uwm.edu!rutgers!cbmvax!andy From: andy@cbmvax.commodore.com (Andy Finkel) Newsgroups: comp.sys.amiga.programmer,comp.sys.amiga.tech Subject: Re: Another try. What's wrong with this open? Message-ID: <17494@cbmvax.commodore.com> Date: 13 Jan 91 03:20:51 GMT References: Reply-To: andy@cbmvax.commodore.com (Andy Finkel) Organization: Commodore, West Chester, PA Lines: 46 In article marko@sinanju.UUCP (Mark Moore) writes: >Forgot to change some things when I pulled the example out of >my application. Sorry. > >Why won't this Open work. MODE_OLDFILE works, but then WaitForChar >doesn't work with the resulting FileHandle. > >Please send mail. I don't get these groups on my home machine. > >------------------------------------------------------------------------------ > >#include >#include > >extern struct FileHandle *Open(); > >main() >{ > > struct FileHandle *fd; > > if (fd = Open("SER:", MODE_READWRITE)) > Close(fd); > else > printf("Failed! As usual.\n "); > >} IF you're doing single character I/O you need to use the AUX: handler, rather than the SER: handler. AUX: supports WaitForChar(). You may have to mount it before using, depending on your startup-sequence. >| Mark Moore | "Well, what about Captain Zero?" | andy -- andy finkel {uunet|rutgers|amiga}!cbmvax!andy Commodore-Amiga, Inc. "God was able to create the world in only seven days because there was no installed base to consider." Any expressed opinions are mine; but feel free to share. I disclaim all responsibilities, all shapes, all sizes, all colors.