On 12/30/2013 03:11 AM, Kevin Ingwersen wrote: > 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? As far as I know, there is nothing else but curses/ncurses that can do that. One possible approach is to parse terminfo's terminal specifications yourself. You have the choice of parsing the compiled binary files or the source files. However, if you succeed with the parsing, it is IMO non-trivial to actually utilize the information that you get; you will need interpreter of the terminal handling "instructions" as well. IOW, I have tried once the same as you are trying now but I have given up, when I was confronted with the size of the task. That said, by all means, try for yourself, maybe you are a lot more tenacious than I was. > > 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, ....) -- VZ