Parent Directory
|
Revision Log
|
Patch
| Revision 1.21 by sysadm, Mon Apr 28 03:31:00 2025 UTC | Revision 1.24 by sysadm, Wed Apr 30 09:18:20 2025 UTC | |
|---|---|---|
| # | Line 17 | Line 17 |
| 17 | ||
| 18 | #include "bbs.h" | #include "bbs.h" |
| 19 | #include "common.h" | #include "common.h" |
| 20 | #include "log.h" | |
| 21 | #include "io.h" | #include "io.h" |
| 22 | #include "screen.h" | |
| 23 | #include <string.h> | |
| 24 | #include <ctype.h> | |
| 25 | #include <sys/types.h> | #include <sys/types.h> |
| 26 | #include <sys/stat.h> | #include <sys/stat.h> |
| 27 | #include <unistd.h> | #include <unistd.h> |
| # | Line 66 void clrtobot(int line_begin) | Line 70 void clrtobot(int line_begin) |
| 70 | ||
| 71 | void clearscr() | void clearscr() |
| 72 | { | { |
| 73 | prints("\33[2J"); | prints("\033[2J"); |
| 74 | moveto(0, 0); | moveto(0, 0); |
| 75 | iflush(); | iflush(); |
| 76 | } | } |
| # | Line 99 void set_input_echo(int echo) | Line 103 void set_input_echo(int echo) |
| 103 | } | } |
| 104 | } | } |
| 105 | ||
| 106 | int _str_input(char *buffer, int buffer_length, int echo_mode) | static int _str_input(char *buffer, int buffer_length, int echo_mode) |
| 107 | { | { |
| 108 | char buf[256], ch; | char buf[256], ch; |
| 109 | int c, offset = 0, len, loop = 1, i, hz = 0; | int c, offset = 0, len, loop = 1, i, hz = 0; |
| # | Line 112 int _str_input(char *buffer, int buffer_ | Line 116 int _str_input(char *buffer, int buffer_ |
| 116 | while (c = igetch_t(60)) | while (c = igetch_t(60)) |
| 117 | { | { |
| 118 | if (c == KEY_NULL || c == KEY_TIMEOUT || c == CR) | if (c == KEY_NULL || c == KEY_TIMEOUT || c == CR) |
| 119 | { | |
| 120 | break; | break; |
| 121 | } | |
| 122 | if (c == LF) | if (c == LF) |
| 123 | { | |
| 124 | continue; | continue; |
| 125 | } | |
| 126 | if (c == BACKSPACE) | if (c == BACKSPACE) |
| 127 | { | { |
| 128 | if (offset > 0) | if (offset > 0) |
|
||||||||
| webmaster@leafok.com | ViewVC Help |
| Powered by ViewVC 1.3.0-beta1 |