This is the mail archive of the
gcc-help@gcc.gnu.org
mailing list for the GCC project.
Re: Looking for an ANSI Control Character header
- From: Kevin Ingwersen <ingwie2000 at googlemail dot com>
- To: Tim Prince <n8tm at aol dot com>
- Cc: gcc-help at gcc dot gnu dot org
- Date: Mon, 30 Dec 2013 03:11:36 +0100
- Subject: Re: Looking for an ANSI Control Character header
- Authentication-results: sourceware.org; auth=none
- References: <79046CCA-0EA7-4A8D-8B00-70F18887443D at googlemail dot com> <52C0BE45 dot 6030907 at aol dot com> <8487D432-2245-4CE1-BBBB-B372EF5C7802 at googlemail dot com>
Termcap looks interesting, but I can not find anything about the control characters I would like to use.
I am trying to find a library that’d give me the right escape sequence - or a function - to do certain things. Such as
- Deleting everything from the left/right of the curser
- Erasing a whole line, setting the cursor to the beginning of the line
- Starting / ending a color sequence
i know that ncurses can do the color part, but I couldn’t find any way to make it print soemthing like "\x1b[1K“ for me. I know, that on some terminals, the \x expects an octal value rather than a hexadecimal value. (i.e. \x033 vs. \x1b). So the library I am looking for just needs to give me the right sequence to use o.o
Do you know any?
Am Mo. Dez. 30 2013 01:28:53 schrieb Tim Prince:
>
> On 12/29/2013 04:58 PM, Kevin Ingwersen wrote:
>> due to different terminals, and the fact that Win32 doesnt perfectly support ANSI control characters, I wanted to ask if there is somewhere a way one can archive this.
>>
> Do you mean termcap?
> http://www.gnu.org/software/termutils/manual/termcap-1.3/html_mono/termcap.html
>
> "win32" is far too vague a heading. How about using one of the current widely used Windows ports of termcap or ncurses (cygwin, MinGW, ....)