From 9c634694d8b980f3a3c50d54dc174ca913204145 Mon Sep 17 00:00:00 2001 From: wens Date: Sun, 1 Mar 2009 12:49:18 +0000 Subject: Add mvprints (like ncurses mvprintw) git-svn-id: http://opensvn.csie.org/pttbbs/trunk/pttbbs@4444 63ad8ddf-47c3-0310-b6dd-a9e9d9715204 --- mbbsd/visio.c | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) (limited to 'mbbsd') diff --git a/mbbsd/visio.c b/mbbsd/visio.c index 20f711a6..bbc29ee8 100644 --- a/mbbsd/visio.c +++ b/mbbsd/visio.c @@ -158,6 +158,22 @@ prints(const char *fmt,...) outs(buff); } +/** + * 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 */ -- cgit v1.2.3