Index: uspace/app/bdsh/input.c
===================================================================
--- uspace/app/bdsh/input.c	(revision 7e0cb787bdbc14fe27e406d6eadd2c5ce285156a)
+++ uspace/app/bdsh/input.c	(revision ed372da20ce2fc304d6e55122d47f5426cd62a85)
@@ -51,18 +51,30 @@
 #define HISTORY_LEN 10
 
+/** Text input field. */
 typedef struct {
+	/** Buffer holding text currently being edited */
 	wchar_t buffer[INPUT_MAX];
+	/** Screen coordinates of the top-left corner of the text field */
 	int col0, row0;
+	/** Screen dimensions */
 	int con_cols, con_rows;
+	/** Number of characters in @c buffer */
 	int nc;
+	/** Caret position within buffer */
 	int pos;
+	/** Selection mark position within buffer */
 	int sel_start;
 
+	/** History (dynamically allocated strings) */
 	char *history[1 + HISTORY_LEN];
+	/** Number of entries in @c history, not counting [0] */
 	int hnum;
+	/** Current position in history */
 	int hpos;
+	/** Exit flag */
 	bool done;
 } tinput_t;
 
+/** Seek direction */
 typedef enum {
 	seek_backward = -1,
@@ -196,5 +208,5 @@
 	width = ti->col0 + ti->nc;
 	rows = (width / ti->con_cols) + 1;
- 
+
 	/* Update row0 if the screen scrolled. */
 	if (ti->row0 + rows > ti->con_rows)
@@ -240,5 +252,5 @@
 		return;
 	}
-  
+
 	if (ti->pos == 0)
 		return;
@@ -461,4 +473,8 @@
 }
 
+/** Initialize text input field.
+ *
+ * Must be called before using the field. It clears the history.
+ */
 static void tinput_init(tinput_t *ti)
 {
@@ -468,4 +484,5 @@
 }
 
+/** Read in one line of input. */
 static char *tinput_read(tinput_t *ti)
 {
@@ -634,5 +651,4 @@
 }
 
-
 void get_input(cliuser_t *usr)
 {
