aboutsummaryrefslogtreecommitdiff
path: root/contrib/ncurses/ncurses/base/lib_printw.c
diff options
context:
space:
mode:
Diffstat (limited to 'contrib/ncurses/ncurses/base/lib_printw.c')
-rw-r--r--contrib/ncurses/ncurses/base/lib_printw.c99
1 files changed, 53 insertions, 46 deletions
diff --git a/contrib/ncurses/ncurses/base/lib_printw.c b/contrib/ncurses/ncurses/base/lib_printw.c
index 8d28f288d3c1..f6b7036fe367 100644
--- a/contrib/ncurses/ncurses/base/lib_printw.c
+++ b/contrib/ncurses/ncurses/base/lib_printw.c
@@ -1,5 +1,5 @@
/****************************************************************************
- * Copyright (c) 1998 Free Software Foundation, Inc. *
+ * Copyright (c) 1998,2000 Free Software Foundation, Inc. *
* *
* Permission is hereby granted, free of charge, to any person obtaining a *
* copy of this software and associated documentation files (the *
@@ -39,72 +39,79 @@
#include <curses.priv.h>
-MODULE_ID("$Id: lib_printw.c,v 1.7 1998/04/11 22:53:44 tom Exp $")
+MODULE_ID("$Id: lib_printw.c,v 1.9 2000/12/10 02:43:27 tom Exp $")
-int printw(NCURSES_CONST char *fmt, ...)
+NCURSES_EXPORT(int)
+printw(NCURSES_CONST char *fmt,...)
{
- va_list argp;
- int code;
+ va_list argp;
+ int code;
- T(("printw(%s,...) called", _nc_visbuf(fmt)));
+ T(("printw(%s,...) called", _nc_visbuf(fmt)));
- va_start(argp, fmt);
- code = vwprintw(stdscr, fmt, argp);
- va_end(argp);
+ va_start(argp, fmt);
+ code = vwprintw(stdscr, fmt, argp);
+ va_end(argp);
- return code;
+ return code;
}
-int wprintw(WINDOW *win, NCURSES_CONST char *fmt, ...)
+NCURSES_EXPORT(int)
+wprintw(WINDOW *win, NCURSES_CONST char *fmt,...)
{
- va_list argp;
- int code;
+ va_list argp;
+ int code;
- T(("wprintw(%p,%s,...) called", win, _nc_visbuf(fmt)));
+ T(("wprintw(%p,%s,...) called", win, _nc_visbuf(fmt)));
- va_start(argp, fmt);
- code = vwprintw(win, fmt, argp);
- va_end(argp);
+ va_start(argp, fmt);
+ code = vwprintw(win, fmt, argp);
+ va_end(argp);
- return code;
+ return code;
}
-int mvprintw(int y, int x, NCURSES_CONST char *fmt, ...)
+NCURSES_EXPORT(int)
+mvprintw(int y, int x, NCURSES_CONST char *fmt,...)
{
- va_list argp;
- int code = move(y, x);
-
- if (code != ERR) {
- va_start(argp, fmt);
- code = vwprintw(stdscr, fmt, argp);
- va_end(argp);
- }
- return code;
+ va_list argp;
+ int code = move(y, x);
+
+ if (code != ERR) {
+ va_start(argp, fmt);
+ code = vwprintw(stdscr, fmt, argp);
+ va_end(argp);
+ }
+ return code;
}
-int mvwprintw(WINDOW *win, int y, int x, NCURSES_CONST char *fmt, ...)
+NCURSES_EXPORT(int)
+mvwprintw
+(WINDOW *win, int y, int x, NCURSES_CONST char *fmt,...)
{
- va_list argp;
- int code = wmove(win, y, x);
-
- if (code != ERR) {
- va_start(argp, fmt);
- code = vwprintw(win, fmt, argp);
- va_end(argp);
- }
- return code;
+ va_list argp;
+ int code = wmove(win, y, x);
+
+ if (code != ERR) {
+ va_start(argp, fmt);
+ code = vwprintw(win, fmt, argp);
+ va_end(argp);
+ }
+ return code;
}
-int vwprintw(WINDOW *win, NCURSES_CONST char *fmt, va_list argp)
+NCURSES_EXPORT(int)
+vwprintw
+(WINDOW *win, NCURSES_CONST char *fmt, va_list argp)
{
- char *buf = _nc_printf_string(fmt, argp);
- int code = ERR;
+ char *buf = _nc_printf_string(fmt, argp);
+ int code = ERR;
- if (buf != 0) {
- code = waddstr(win, buf);
+ if (buf != 0) {
+ code = waddstr(win, buf);
#if USE_SAFE_SPRINTF
- free(buf);
+ free(buf);
#endif
- }
- return code;
+ }
+ return code;
}