Path: utzoo!utdoe!generic!pnet91!ericmcg From: ericmcg@pnet91.cts.com (Eric Mcgillicuddy) Newsgroups: comp.sys.apple2 Subject: Re: ...HyperC... Message-ID: <878@generic.UUCP> Date: 23 Jun 91 14:30:02 GMT Sender: root@generic.UUCP Organization: People-Net [pnet91], Etobicoke, ON Lines: 58 >can somebody explain the following HyperC arguments to me: >getl, getc, getf, getFP, get curs, getkey, kbdread, keypress, clrkb, >setcursexe? I know most may seem obvious, but they don't function > > * Origin: Europa BBS (301) 718-4690 HST/DS 14.4k (1:109/438) INT getl (file, buffer, maxlen) FILE *file; TEXT *buffer; INT maxlen; reads maxlen-2 bytes into a buffer. NULL is considered EOF, even if maxlen not reached. '\n' also terminates input. VOID getFPos(file, fpos) FILE *file; FPOS *fpos; record current fileposition in the global FPOS structure. It is defined along with FILE type structures in std.h. INT getc(file) FILE *file; read a single byte from a file. error = -1. UWORD getcurs() returns an unsigned 16-bit word containing the current cursor location. High byte holds row, low byte holds column. CHAR getkey(clearbuf) BOOL clearbuf; returns the next key pressed. it will wait until one is pressed. It clears the high bit, so keypresses in range 0 - 127. clearbuf indicates type ahead be discarded when true. INT kbdRead(buffer, maxchars) TEXT *buffer; INT maxchars; reads maxchar-2 into buffer. it returns a NULL terminated Pascal string, first oops... the last character in the buffer is NULL, but it returns the number of characters typed in. It accepts a variety control codes to edit the line, including ctrl-@ to abort the program. Output is not echoed to the screen. (see also conRead) BOOL keypress() True when key is pressed. Used when you don't care what key. VOID setcurs(curpos) UWORD curpos set current cursor location. curpos is of the same format as in getcurs. I would not bet on internal bounds checking, so make sure the cursor is on the scree before making the call. I could not find "getf". Hope this helps. UUCP: bkj386!pnet91!ericmcg INET: ericmcg@pnet91.cts.com