Quellcode durchsuchen

- added doxygen @file header

- some more minor functionality implemented
tags/v0.9.3
Dan Lynch vor 18 Jahren
Ursprung
Commit
172a568af5
1 geänderte Dateien mit 33 neuen und 1 gelöschten Zeilen
  1. 33
    1
      src/hci/mucurses/print.c

+ 33
- 1
src/hci/mucurses/print.c Datei anzeigen

@@ -3,7 +3,39 @@
3 3
 #include <stddef.h>
4 4
 #include "core.h"
5 5
 
6
-static printw_context {
6
+/** @file
7
+ *
8
+ * MuCurses printing functions
9
+ *
10
+ */
11
+
12
+/**
13
+ * Add a single-byte character and rendition to a window and advance
14
+ * the cursor
15
+ *
16
+ * @v *win	window to be rendered in
17
+ * @v ch	character to be added at cursor
18
+ * @ret rc	return status code
19
+ */
20
+int waddch ( WINDOW *win, const chtype ch ) {
21
+	_wputch( win, ch, WRAP );
22
+	return OK;
23
+}
24
+
25
+/**
26
+ * Add string of single-byte characters to a window
27
+ *
28
+ * @v *win	window to be rendered in
29
+ * @v *str	standard c-style string
30
+ * @v n		max number of chars from string to render
31
+ * @ret rc	return status code
32
+ */
33
+int waddnstr ( WINDOW *win, const char *str, int n ) {
34
+	_wputstr( win, str, WRAP, n );
35
+	return OK;
36
+}
37
+
38
+struct printw_context {
7 39
 	struct printf_context ctx;
8 40
 	WINDOW *win;
9 41
 };

Laden…
Abbrechen
Speichern