diff options
author | piaip <piaip@63ad8ddf-47c3-0310-b6dd-a9e9d9715204> | 2008-01-04 20:30:07 +0800 |
---|---|---|
committer | piaip <piaip@63ad8ddf-47c3-0310-b6dd-a9e9d9715204> | 2008-01-04 20:30:07 +0800 |
commit | ced1701cea3dabd64bf51f9ba3a24bc41ce81626 (patch) | |
tree | 1cba8616d74cf1445bb6787f1cbba48ecef0941b /mbbsd/screen.c | |
parent | 0fcc819f8baceb9b3866be806cca51f22586a1ad (diff) | |
download | pttbbs-ced1701cea3dabd64bf51f9ba3a24bc41ce81626.tar pttbbs-ced1701cea3dabd64bf51f9ba3a24bc41ce81626.tar.gz pttbbs-ced1701cea3dabd64bf51f9ba3a24bc41ce81626.tar.bz2 pttbbs-ced1701cea3dabd64bf51f9ba3a24bc41ce81626.tar.lz pttbbs-ced1701cea3dabd64bf51f9ba3a24bc41ce81626.tar.xz pttbbs-ced1701cea3dabd64bf51f9ba3a24bc41ce81626.tar.zst pttbbs-ced1701cea3dabd64bf51f9ba3a24bc41ce81626.zip |
- pfterm/screen: add more ncurses like API (add*)
git-svn-id: http://opensvn.csie.org/pttbbs/trunk/pttbbs@3785 63ad8ddf-47c3-0310-b6dd-a9e9d9715204
Diffstat (limited to 'mbbsd/screen.c')
-rw-r--r-- | mbbsd/screen.c | 35 |
1 files changed, 35 insertions, 0 deletions
diff --git a/mbbsd/screen.c b/mbbsd/screen.c index 3de85631..88696f8a 100644 --- a/mbbsd/screen.c +++ b/mbbsd/screen.c @@ -449,6 +449,16 @@ outs(const char *str) } void +outns(const char *str, int n) +{ + if (!str) + return; + while (*str && n-- > 0) { + outc(*str++); + } +} + +void outstr(const char *str) { // XXX TODO cannot prepare DBCS-ready environment? @@ -457,6 +467,31 @@ outstr(const char *str) } void +addch(unsigned char c) +{ + outc(c); +} + +void +addstr(const char *s) +{ + outs(s); +} + +void +addnstr(const char *s, int n) +{ + outns(s, n); +} + +void +addstring(const char *s) +{ + outs(s); +} + + +void scroll(void) { scrollcnt++; |