| 3 |
* io |
* io |
| 4 |
* - basic terminal-based user input / output features |
* - basic terminal-based user input / output features |
| 5 |
* |
* |
| 6 |
* Copyright (C) 2004-2025 Leaflet <leaflet@leafok.com> |
* Copyright (C) 2004-2026 Leaflet <leaflet@leafok.com> |
| 7 |
*/ |
*/ |
| 8 |
|
|
| 9 |
#ifndef _IO_H_ |
#ifndef _IO_H_ |
| 17 |
CR = '\r', |
CR = '\r', |
| 18 |
LF = '\n', |
LF = '\n', |
| 19 |
BACKSPACE = '\b', |
BACKSPACE = '\b', |
| 20 |
BELL = '\b', |
BELL = '\7', |
| 21 |
KEY_TAB = 9, |
KEY_TAB = '\t', |
| 22 |
KEY_ESC = 27, |
KEY_ESC = '\033', |
| 23 |
KEY_SPACE = '\040', |
KEY_SPACE = '\040', |
| 24 |
|
|
| 25 |
// Expand key |
// Expand key |
| 93 |
DOECHO = 1, |
DOECHO = 1, |
| 94 |
}; |
}; |
| 95 |
|
|
| 96 |
#define BBS_DEFAULT_CHARSET "UTF-8" |
enum io_iconv_t |
| 97 |
|
{ |
| 98 |
|
CHARSET_MAX_LEN = 20, |
| 99 |
|
}; |
| 100 |
|
|
| 101 |
|
extern const char BBS_default_charset[CHARSET_MAX_LEN + 1]; |
| 102 |
|
extern char stdio_charset[CHARSET_MAX_LEN + 1]; |
| 103 |
|
|
| 104 |
extern char stdio_charset[20]; |
extern int io_init(void); |
| 105 |
|
extern void io_cleanup(void); |
| 106 |
|
|
| 107 |
extern int prints(const char *format, ...); |
extern int prints(const char *format, ...); |
| 108 |
extern int outc(char c); |
extern int outc(char c); |