Parent Directory
|
Revision Log
|
Patch
| Revision 1.6 by sysadm, Sat Oct 23 18:41:41 2004 UTC | Revision 1.7 by sysadm, Tue Nov 30 07:10:32 2004 UTC | |
|---|---|---|
| # | Line 78 press_any_key () | Line 78 press_any_key () |
| 78 | return igetch (); | return igetch (); |
| 79 | } | } |
| 80 | ||
| 81 | void | |
| 82 | set_input_echo(int echo) | |
| 83 | { | |
| 84 | char temp[256]; | |
| 85 | ||
| 86 | if (echo) | |
| 87 | { | |
| 88 | outc ('\x83'); // ASCII code 131 | |
| 89 | iflush (); | |
| 90 | } | |
| 91 | else | |
| 92 | { | |
| 93 | // outc ('\x85'); // ASCII code 133 | |
| 94 | prints ("\xff\xfb\x01\xff\xfb\x03"); | |
| 95 | iflush (); | |
| 96 | igetch (); | |
| 97 | igetch (); | |
| 98 | } | |
| 99 | } | |
| 100 | ||
| 101 | int | int |
| 102 | str_input (char *buffer, int buffer_length, int echo_mode) | str_input (char *buffer, int buffer_length, int echo_mode) |
| 103 | { | { |
| # | Line 88 str_input (char *buffer, int buffer_leng | Line 108 str_input (char *buffer, int buffer_leng |
| 108 | ||
| 109 | while (c = igetch ()) | while (c = igetch ()) |
| 110 | { | { |
| 111 | if (c == CR || c == LF) | if (c == CR) |
| 112 | break; | break; |
| 113 | if (c == LF) | |
| 114 | continue; | |
| 115 | if (c == BACKSPACE) | if (c == BACKSPACE) |
| 116 | { | { |
| 117 | if (offset > 0) | if (offset > 0) |
|
||||||||
| webmaster@leafok.com | ViewVC Help |
| Powered by ViewVC 1.3.0-beta1 |