summaryrefslogtreecommitdiff
path: root/apps/system/vi
diff options
context:
space:
mode:
authorGregory Nutt <gnutt@nuttx.org>2014-02-01 16:30:38 -0600
committerGregory Nutt <gnutt@nuttx.org>2014-02-01 16:30:38 -0600
commit311157a36a1d3a2f4018f336a83d749bb2c2469e (patch)
treea6874bb035d9bb6d337fff1bb5be98614592a205 /apps/system/vi
parentbe0594847952421fec3d413785d51785f5a8dce7 (diff)
downloadnuttx-311157a36a1d3a2f4018f336a83d749bb2c2469e.tar.gz
nuttx-311157a36a1d3a2f4018f336a83d749bb2c2469e.tar.bz2
nuttx-311157a36a1d3a2f4018f336a83d749bb2c2469e.zip
VI: cosmetic updates to comments
Diffstat (limited to 'apps/system/vi')
-rw-r--r--apps/system/vi/Makefile3
-rw-r--r--apps/system/vi/vi.c16
2 files changed, 9 insertions, 10 deletions
diff --git a/apps/system/vi/Makefile b/apps/system/vi/Makefile
index bbf275bb5..8ece2628e 100644
--- a/apps/system/vi/Makefile
+++ b/apps/system/vi/Makefile
@@ -41,8 +41,7 @@ ifeq ($(WINTOOL),y)
INCDIROPT = -w
endif
-# Hello Application
-# TODO: appname can be automatically extracted from the directory name
+# VI-Workalike Editor
CONFIG_SYSTEM_VI_STACKSIZE ?= 2048
CONFIG_SYSTEM_VI_PRIORITY ?= 100
diff --git a/apps/system/vi/vi.c b/apps/system/vi/vi.c
index eb23564fb..821e68b44 100644
--- a/apps/system/vi/vi.c
+++ b/apps/system/vi/vi.c
@@ -304,9 +304,7 @@ static char vi_getch(FAR struct vi_s *vi);
#if 0 /* Not used */
static void vi_blinkon(FAR struct vi_s *vi);
#endif
-static void vi_attriboff(FAR struct vi_s *vi);
static void vi_boldon(FAR struct vi_s *vi);
-static void vi_attriboff(FAR struct vi_s *vi);
static void vi_reverseon(FAR struct vi_s *vi);
static void vi_attriboff(FAR struct vi_s *vi);
static void vi_cursoron(FAR struct vi_s *vi);
@@ -825,7 +823,7 @@ static void vi_error(FAR struct vi_s *vi, FAR const char *fmt, ...)
vi_setcursor(vi, cursor.row, cursor.column);
/* Remember that there is an error message on the last line of the display.
- * When the dispaly is refreshed, the last line will not be altered until
+ * When the display is refreshed, the last line will not be altered until
* the error is cleared.
*/
@@ -946,7 +944,7 @@ static off_t vi_nextline(FAR struct vi_s *vi, off_t pos)
*
* Description:
* Reallocate the in-memory file memory by (at least) 'increment' and make
- * space for new text of size 'increment' at the current cursor position.
+ * space for new text of size 'increment' at the specified cursor position.
*
****************************************************************************/
@@ -1809,7 +1807,7 @@ static off_t vi_cursorleft(FAR struct vi_s *vi, off_t curpos, int ncolumns)
vivdbg("curpos=%ld ncolumns=%d\n", curpos, ncolumns);
- /* Loop decrementing the cursor position for each repitition count. Break
+ /* Loop decrementing the cursor position for each repetition count. Break
* out early if we hit either the beginning of the text buffer, or the end
* of the previous line.
*/
@@ -1837,7 +1835,7 @@ static off_t vi_cursorright(FAR struct vi_s *vi, off_t curpos, int ncolumns)
vivdbg("curpos=%ld ncolumns=%d\n", curpos, ncolumns);
- /* Loop incrementing the cursor position for each repitition count. Break
+ /* Loop incrementing the cursor position for each repetition count. Break
* out early if we hit either the end of the text buffer, or the end of the line.
*/
@@ -2071,7 +2069,9 @@ static void vi_paste(FAR struct vi_s *vi)
* Name: vi_gotoline
*
* Description:
- *
+ * Position the the cursor at the line specified by vi->value. If
+ * vi->value is zero, then the cursor is position at the end of the text
+ * buffer.
*
****************************************************************************/
@@ -2390,7 +2390,7 @@ static void vi_cmd_mode(FAR struct vi_s *vi)
}
break;
- /* Uimplemented and invalid commands */
+ /* Unimplemented and invalid commands */
case KEY_CMDMODE_REDRAW: /* Redraws the screen */
case KEY_CMDMODE_REDRAW2: /* Redraws the screen, removing deleted lines */