home *** CD-ROM | disk | FTP | other *** search
- Path: sparky!uunet!noc.near.net!hri.com!spool.mu.edu!yale.edu!ira.uka.de!smurf.sub.org!ppcnet!sks!stesch
- From: stesch@sks.ppc.sub.org (Stefan Scholl)
- Newsgroups: comp.sys.amiga.programmer
- Subject: Re: Console RAW mode.
- Message-ID: <VfL9s*VT0@sks.ppc.sub.org>
- Date: 19 Dec 92 13:34:33 GMT
- References: <1992Dec17.051157.23971@serval.net.wsu.edu>
- Organization: _private_ site
- Lines: 78
- Content-Type: text/plain; charset=ISO-8859-1
- Content-Transfer-Encoding: 8bit
- MIME-Version: 1.0
- X-Newsreader: Arn V1.00
-
-
- Just test this:
- -------------------------------------------
- #include <proto/dos.h>
- #include <stdio.h>
-
-
- void main(void)
- {
- long c;
-
- SetMode(Input(), 1);
- while((c = FGetC(Input())) != 24)
- {
- FPutC(Output(),c);
- Flush(Output());
- }
- SetMode(Input(), 0);
- }
-
- -------------------------------------------
- NAME
- SetMode - Set the current behavior of a handler (V36)
-
- SYNOPSIS
- success = SetMode(fh, mode)
- D0 D1 D2
-
- BOOL SetMode(BPTR, LONG)
-
- FUNCTION
- SetMode() sends an ACTION_SCREEN_MODE packet to the handler in
- question, normally for changing a CON: handler to raw mode or
- vice-versa. For CON:, use 1 to go to RAW: mode, 0 for CON: mode.
-
- INPUTS
- fh - filehandle
- mode - The new mode you want
-
- RESULT
- success - Boolean
-
- SEE ALSO
- -------------------------------------------
-
-
-
-
- Or use SAS/C's9 getch
- -------------------------------------------
- getch()-Get a character from stdin immediately
-
- Synopsis
-
- #include <stdio.h>
-
- c = getch(void);
-
- int c; /* return character or code */
-
- Portability
-
- SAS/C
-
- Returns
-
- If successful, the next input character is returned. Otherwise, the
- function returns EOF, which is defined in <stdio.h>. In the event of
- an EOF return, error information can be found in errno and _OSERR.
- -------------------------------------------
-
-
- _____________
- 9 SAS/C 6.x
-
- --
- ////Stefan Scholl////stesch@sks.ppc.sub.org////\ ////ISO-8859-1:dv|DV\_////\
- \\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\/ \\\\\\\\\\\\\\\\\\\\\\\\\\/
-