1 #include <exec/types.h>
2 #include <proto/exec.h>
8 int main(int argc
, char **argv
) {
18 Printf("in normal (cooked) mode\n");
19 Printf("type something: ");
22 FGets(out
, something
, 64);
23 *(strchr(something
, '\n')) = '\0';
25 Printf("you typed: %s\n", something
);
29 Printf("in raw mode\n");
30 Printf("type something: ");
37 Read(in
, &(something
[i
]), 1);
38 if (something
[i
] == 0x0d) {
42 if (! isprint(something
[i
]))
47 Printf("\nyou typed: %s\n", something
);
49 /* TODO: Switch to cooked mode */
51 Printf("in cooked mode with no echoing\n");
52 Printf("type something: ");
55 FGets(out
, something
, 64);
56 *(strchr(something
, '\n')) = '\0';
58 Printf("you typed: %s\n", something
);
62 Printf("restored normal (cooked) mode\n");