ソースを参照

- added doxygen @file header

- wdeleteln function implemented
tags/v0.9.3
Dan Lynch 18年前
コミット
79a9aced26
1個のファイルの変更40行の追加0行の削除
  1. 40
    0
      src/hci/mucurses/clear.c

+ 40
- 0
src/hci/mucurses/clear.c ファイルの表示

2
 #include "core.h"
2
 #include "core.h"
3
 #include "cursor.h"
3
 #include "cursor.h"
4
 
4
 
5
+/** @file
6
+ *
7
+ * MuCurses clearing functions
8
+ *
9
+ */
10
+
5
 /**
11
 /**
6
  * Clear a window to the bottom from current cursor position
12
  * Clear a window to the bottom from current cursor position
7
  *
13
  *
38
 	return OK;
44
 	return OK;
39
 }
45
 }
40
 
46
 
47
+/**
48
+ * Delete character under the cursor in a window
49
+ *
50
+ * @v *win	subject window
51
+ * @ret rc	return status code
52
+ */
53
+int wdelch ( WINDOW *win ) {
54
+	struct cursor_pos pos;
55
+
56
+	_store_curs_pos( win, &pos );
57
+	_wputch( win, (unsigned)' ', NOWRAP );
58
+	_restore_curs_pos( win, &pos );
59
+
60
+	return OK;
61
+}
62
+
63
+/**
64
+ * Delete line under a window's cursor
65
+ *
66
+ * @v *win	subject window
67
+ * @ret rc	return status code
68
+ */
69
+int wdeleteln ( WINDOW *win ) {
70
+	struct cursor_pos pos;
71
+
72
+	_store_curs_pos( win, &pos );
73
+	/* let's just set the cursor to the beginning of the line and
74
+	   let wclrtoeol do the work :) */
75
+	wmove( win, win->curs_y, 0 );
76
+	wclrtoeol( win );
77
+	_restore_curs_pos( win, &pos );
78
+	return OK;
79
+}
80
+
41
 /**
81
 /**
42
  * Completely clear a window
82
  * Completely clear a window
43
  *
83
  *

読み込み中…
キャンセル
保存