advanced console printing

Hi all,

i'm writing a program and i would like to change predefined lines in the
printed text in the terminal, without changing the other text...

For example:
1
2
3
4
5
6
7
8
9
| Connected to 192.168.9.1                           |
|                                                    |
|                                                    |
|                                                    |
|                                                    |
| TEXT                                               |
| Status message                                     |
|                                                    |
+----------------------------------------------------+

Given this picture, i would like to change "TEXT" & "Status message", without changing the position of "Connected to ...".

Is the only way to do this messing with printf("\b"), or are there other
possibilities?

For example, how is the progress bar in ETA printed in the program 'wget' ?

Thanks in advance!

Sam
Hi Sam,
I'm not sure that I understood you right. Do you want to change your own console output after you put it out? Or do you want to change a string (at position TEXT and Status message) and put out the string after?

Google for NCurses. You've probably already got it installed if you are on Unix. You'll need to sudo apt-get ncurses-dev or somesuch on Linux.

Good luck!
Topic archived. No new replies allowed.