diff options
author | wens <wens@63ad8ddf-47c3-0310-b6dd-a9e9d9715204> | 2009-03-01 20:49:18 +0800 |
---|---|---|
committer | wens <wens@63ad8ddf-47c3-0310-b6dd-a9e9d9715204> | 2009-03-01 20:49:18 +0800 |
commit | 9c634694d8b980f3a3c50d54dc174ca913204145 (patch) | |
tree | fffd0d79b31388e1c8e05260a3cf962c1b4a9534 /mbbsd/visio.c | |
parent | 321e5d90f18d32ca1517572a376b042aa1939e78 (diff) | |
download | pttbbs-9c634694d8b980f3a3c50d54dc174ca913204145.tar pttbbs-9c634694d8b980f3a3c50d54dc174ca913204145.tar.gz pttbbs-9c634694d8b980f3a3c50d54dc174ca913204145.tar.bz2 pttbbs-9c634694d8b980f3a3c50d54dc174ca913204145.tar.lz pttbbs-9c634694d8b980f3a3c50d54dc174ca913204145.tar.xz pttbbs-9c634694d8b980f3a3c50d54dc174ca913204145.tar.zst pttbbs-9c634694d8b980f3a3c50d54dc174ca913204145.zip |
Add mvprints (like ncurses mvprintw)
git-svn-id: http://opensvn.csie.org/pttbbs/trunk/pttbbs@4444 63ad8ddf-47c3-0310-b6dd-a9e9d9715204
Diffstat (limited to 'mbbsd/visio.c')
-rw-r--r-- | mbbsd/visio.c | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/mbbsd/visio.c b/mbbsd/visio.c index 20f711a6..bbc29ee8 100644 --- a/mbbsd/visio.c +++ b/mbbsd/visio.c @@ -159,6 +159,22 @@ prints(const char *fmt,...) } /** + * mvprints(int y, int x, fmt, ...): 使用 mvouts 輸出並格式化字串。 + */ +void +mvprints(int y, int x, const char *fmt, ...) +{ + va_list args; + char buff[VBUFLEN]; + + va_start(args, fmt); + vsnprintf(buff, sizeof(buff), fmt, args); + va_end(args); + + mvouts(x, y, buff); +} + +/** * mvouts(y, x, str): = mvaddstr */ void |