Do you have a question? Post it now! No Registration Necessary
Subject
- Posted on
need to clear the current line output
- 06-02-2006

Re: need to clear the current line output
On 2 Jun 2006 16:00:38 -0700, snipped-for-privacy@gmail.com staggered into the Black
Sun and said:

New to programming, eh? libncurses finds what TERM is set to, then
looks up the "clear current line" escape sequence for that TERM using
terminfo, then outputs that sequence. Since you say this is an embedded
app, you already know what TERM is and what the escape sequences are for
that TERM. You just have to fprintf() (putc(), write(), whatever...)
the right sequence. "man console_codes" for the standard sequences that
work on TERM=linux (almost all of those work on TERM=xterm as well,
IIRC) and you want to search for "erase". HTH,
--
Matt G|There is no Darkness in Eternity/But only Light too dim for us to see
Brainbench MVP for Linux Admin / mail: TRAP + SPAN don't belong
Matt G|There is no Darkness in Eternity/But only Light too dim for us to see
Brainbench MVP for Linux Admin / mail: TRAP + SPAN don't belong
We've slightly trimmed the long signature. Click to see the full one.

Re: need to clear the current line output

If it's embedded, there presumably can be no question about what
control sequences are needed to do the job.
The vast majority of terminals support the ANSI codes, in which
clear to end of line is ESC [ K.
--
Chris F.A. Johnson, author <http://cfaj.freeshell.org
Shell Scripting Recipes: A Problem-Solution Approach (2005, Apress)
Chris F.A. Johnson, author <http://cfaj.freeshell.org
Shell Scripting Recipes: A Problem-Solution Approach (2005, Apress)
We've slightly trimmed the long signature. Click to see the full one.
Site Timeline
- » Re : Endeavour File manager
- — Next thread in » Embedded Linux
-
- » cf ide drive?
- — Previous thread in » Embedded Linux
-
- » Crosscompiling for ARM: reloc type R_ARM_ABS32 is not supported for PIC - ...
- — Newest thread in » Embedded Linux
-
- » Broadband filter matching design
- — The site's Newest Thread. Posted in » Electronics Design
-
- » Re: OT: The Deep State defined
- — The site's Last Updated Thread. Posted in » Electronics Design
-