summaryrefslogtreecommitdiffstats
path: root/src/hci/mucurses/print.c
diff options
context:
space:
mode:
authorDan Lynch2006-06-21 12:31:20 +0200
committerDan Lynch2006-06-21 12:31:20 +0200
commit172a568af5ecc63e3acee8f4a0960818a596ddc6 (patch)
tree2d996afe2d410c9fd47f89cc3c356f9cf88d434a /src/hci/mucurses/print.c
parentadded doxygen @file header (diff)
downloadipxe-172a568af5ecc63e3acee8f4a0960818a596ddc6.tar.gz
ipxe-172a568af5ecc63e3acee8f4a0960818a596ddc6.tar.xz
ipxe-172a568af5ecc63e3acee8f4a0960818a596ddc6.zip
- added doxygen @file header
- some more minor functionality implemented
Diffstat (limited to 'src/hci/mucurses/print.c')
-rw-r--r--src/hci/mucurses/print.c34
1 files changed, 33 insertions, 1 deletions
diff --git a/src/hci/mucurses/print.c b/src/hci/mucurses/print.c
index c5b70282..c41c34d0 100644
--- a/src/hci/mucurses/print.c
+++ b/src/hci/mucurses/print.c
@@ -3,7 +3,39 @@
#include <stddef.h>
#include "core.h"
-static printw_context {
+/** @file
+ *
+ * MuCurses printing functions
+ *
+ */
+
+/**
+ * Add a single-byte character and rendition to a window and advance
+ * the cursor
+ *
+ * @v *win window to be rendered in
+ * @v ch character to be added at cursor
+ * @ret rc return status code
+ */
+int waddch ( WINDOW *win, const chtype ch ) {
+ _wputch( win, ch, WRAP );
+ return OK;
+}
+
+/**
+ * Add string of single-byte characters to a window
+ *
+ * @v *win window to be rendered in
+ * @v *str standard c-style string
+ * @v n max number of chars from string to render
+ * @ret rc return status code
+ */
+int waddnstr ( WINDOW *win, const char *str, int n ) {
+ _wputstr( win, str, WRAP, n );
+ return OK;
+}
+
+struct printw_context {
struct printf_context ctx;
WINDOW *win;
};