This is the mail archive of the
ecos-discuss@sources.redhat.com
mailing list for the eCos project.
Re: Clear Screen
- From: Grant Edwards <grante at visi dot com>
- To: ecos-discuss at ecos dot sourceware dot org
- Date: Thu, 14 Apr 2005 10:55:49 -0500
- Subject: [ECOS] Re: Clear Screen
- References: <425E8B28.1000607@ituniv.se>
In gmane.os.ecos.general, you wrote:
> I wan't to know if it's possible to clear the screen or update a
> specific line with eCos?
Depends on what screen you're using.
> I have an application that writes data on the screen with
> printf() and I want to clear this data and write new. Is there
> a clear screen function or something like it?
Assuming you're using an ANSI terminal, writing such functions
is pretty simple:
void clearScreen(void)
{
printf("\033[2J")
}
void clearToEOL(void)
{
printf("\033[K")
}
void moveCursor(int row, int col)
{
printf("\033[%d;%dH",row, col)
}
and so on.
--
Grant Edwards grante Yow! Here I am in 53
at B.C. and all I want is a
visi.com dill pickle!!
--
Before posting, please read the FAQ: http://ecos.sourceware.org/fom/ecos
and search the list archive: http://ecos.sourceware.org/ml/ecos-discuss