summaryrefslogtreecommitdiff
path: root/apps/interpreters/bas
diff options
context:
space:
mode:
authorGregory Nutt <gnutt@nuttx.org>2014-11-11 09:07:16 -0600
committerGregory Nutt <gnutt@nuttx.org>2014-11-11 09:07:16 -0600
commiteaedb099b2a38a2c8e13bb8fb8c29648949ee7eb (patch)
treefe18f1908875c2ef454a1f334779908cfe530666 /apps/interpreters/bas
parent45b72713183a75e89be18ac93a7b7d1d4fa6803c (diff)
downloadnuttx-eaedb099b2a38a2c8e13bb8fb8c29648949ee7eb.tar.gz
nuttx-eaedb099b2a38a2c8e13bb8fb8c29648949ee7eb.tar.bz2
nuttx-eaedb099b2a38a2c8e13bb8fb8c29648949ee7eb.zip
BAS: Home cursor after clearing screen
Diffstat (limited to 'apps/interpreters/bas')
-rw-r--r--apps/interpreters/bas/fs.c1
-rw-r--r--apps/interpreters/bas/vt100.c4
-rw-r--r--apps/interpreters/bas/vt100.h2
3 files changed, 3 insertions, 4 deletions
diff --git a/apps/interpreters/bas/fs.c b/apps/interpreters/bas/fs.c
index 79834bf10..5712b6d07 100644
--- a/apps/interpreters/bas/fs.c
+++ b/apps/interpreters/bas/fs.c
@@ -399,6 +399,7 @@ static int cls(int chn)
{
#ifdef CONFIG_INTERPREPTER_BAS_VT100
vt100_clrscreen(chn);
+ vt100_cursorhome(chn);
return 0;
#else
FS_errmsg = _("Clear screen operation not implemented");
diff --git a/apps/interpreters/bas/vt100.c b/apps/interpreters/bas/vt100.c
index 592db95ec..ec151e2d9 100644
--- a/apps/interpreters/bas/vt100.c
+++ b/apps/interpreters/bas/vt100.c
@@ -59,7 +59,9 @@
#if 0 /* Not used */
static const char g_cursoron[] = VT100_CURSORON;
static const char g_cursoroff[] = VT100_CURSOROFF;
+#endif
static const char g_cursorhome[] = VT100_CURSORHOME;
+#if 0 /* Not used */
static const char g_erasetoeol[] = VT100_CLEAREOL;
#endif
static const char g_clrscreen[] = VT100_CLEARSCREEN;
@@ -213,14 +215,12 @@ void vt100_cursoroff(int chn)
*
****************************************************************************/
-#if 0 /* Not used */
void vt100_cursorhome(int chn)
{
/* Send the VT100 CURSORHOME command */
vt100_write(chn, g_cursorhome, sizeof(g_cursorhome));
}
-#endif
/****************************************************************************
* Name: vt100_setcursor
diff --git a/apps/interpreters/bas/vt100.h b/apps/interpreters/bas/vt100.h
index 32dbb683f..563b96b14 100644
--- a/apps/interpreters/bas/vt100.h
+++ b/apps/interpreters/bas/vt100.h
@@ -148,9 +148,7 @@ void vt100_cursoroff(int chn);
*
****************************************************************************/
-#if 0 /* Not used */
void vt100_cursorhome(int chn);
-#endif
/****************************************************************************
* Name: vt100_setcursor