summaryrefslogtreecommitdiff
path: root/lib/libcurses/base/lib_printw.c
diff options
context:
space:
mode:
Diffstat (limited to 'lib/libcurses/base/lib_printw.c')
-rw-r--r--lib/libcurses/base/lib_printw.c101
1 files changed, 54 insertions, 47 deletions
diff --git a/lib/libcurses/base/lib_printw.c b/lib/libcurses/base/lib_printw.c
index 0b1380ce5df..3a567584b0e 100644
--- a/lib/libcurses/base/lib_printw.c
+++ b/lib/libcurses/base/lib_printw.c
@@ -1,7 +1,7 @@
-/* $OpenBSD: lib_printw.c,v 1.1 1999/01/18 19:09:56 millert Exp $ */
+/* $OpenBSD: lib_printw.c,v 1.2 2001/01/22 18:01:42 millert Exp $ */
/****************************************************************************
- * 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 *
@@ -41,72 +41,79 @@
#include <curses.priv.h>
-MODULE_ID("$From: lib_printw.c,v 1.7 1998/04/11 22:53:44 tom Exp $")
+MODULE_ID("$From: 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;
}