Karl Marks Karl Marks - 4 years ago 82
C Question

Updating table formatting in C language

I am using C language. I want to display a table. I know how to display a normal table using

. However I have many records (more than several thousand), and I want to keep two things on screen all the time and have the middle portion of record keeps updating...

Suppose here is a table:

No.| Name | Some Data | Comments
001 xyz 234 abc
002 uvw 5862 abc
003 lmn 8993 abc
Some result analysis goes here:

Now lets assume there are thousand of entries in this table, and in less than a second this table is updating, eventually what will happen? I will loose the header and footer of table like: No, Name , Some data and comments, and in footer result analysis..

What I want is to keep updating the entries but have the header and footer of the table remain. How can I implement this! Any idea?

Answer Source

Are you using a Unix/Linux system? If yes, probably you have ncurses library (man 3). It is a library to manipulate character interface.
You are able to create 'windows' (screen sections) and update only this parts (to remain the header and footer).

Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download