2 Copyright © 1995-2014, The AROS Development Team. All rights reserved.
6 #include <exec/types.h>
7 #include <proto/exec.h>
13 int main(int argc
, char **argv
) {
23 Printf("in normal (cooked) mode\n");
24 Printf("type something: ");
27 FGets(out
, something
, 64);
28 *(strchr(something
, '\n')) = '\0';
30 Printf("you typed: %s\n", something
);
34 Printf("in raw mode\n");
35 Printf("type something: ");
41 WaitForChar(in
, 1000000000);
42 Read(in
, &(something
[i
]), 1);
43 if (something
[i
] == 0x0d) {
47 if (! isprint(something
[i
]))
52 Printf("\nyou typed: %s\n", something
);
54 /* TODO: Switch to cooked mode */
56 Printf("in cooked mode with no echoing\n");
57 Printf("type something: ");
60 FGets(out
, something
, 64);
61 *(strchr(something
, '\n')) = '\0';
63 Printf("you typed: %s\n", something
);
67 Printf("restored normal (cooked) mode\n");