Hey,
I am writing a console program in c to manipulate a disk that will have my own filesystem installed, I want to be able to divide the console into 3 sections, 1 for disk information another for command line and another for command line output. The program will be like a mini shell.
How can I take control of the console in this way from within a standard console program?
Cheers.
Console in Linux
Re:Console in Linux
If you refer to plain vanilla Standard C, not at all. C is line-oriented, and does know nothing about a terminal window.
Under Unix systems, the ncurses library provides functions to handle terminal apps like you described. Don't know about Windows.
Under Unix systems, the ncurses library provides functions to handle terminal apps like you described. Don't know about Windows.
Every good solution is obvious once you've found it.
Re:Console in Linux
Hey,
It doesn't have to be plain c, I am happy to use libraries. Is there no system calls that would allow me to do this? I know that in windows you can get direct access to the console buffers using the API, I just thought it would be similar for linux.
Anyway, thanks for the info I will check out the ncurses library.
Cheers.
It doesn't have to be plain c, I am happy to use libraries. Is there no system calls that would allow me to do this? I know that in windows you can get direct access to the console buffers using the API, I just thought it would be similar for linux.
Anyway, thanks for the info I will check out the ncurses library.
Cheers.
Re:Console in Linux
I would use GLK, that means you can compile it as console app or XTerm app (or win32 glk app.....)..
create 3 windows, set one active, print to it, get input etc.
(glk was designed for interactive fiction, so its great for splitting windows, and doing user input etc)..
glkterm (console linux glk) uses ncurses.
glk is cool.
create 3 windows, set one active, print to it, get input etc.
(glk was designed for interactive fiction, so its great for splitting windows, and doing user input etc)..
glkterm (console linux glk) uses ncurses.
glk is cool.
-- Stu --
- Pype.Clicker
- Member
- Posts: 5964
- Joined: Wed Oct 18, 2006 2:31 am
- Location: In a galaxy, far, far away
- Contact:
Re:Console in Linux
ANSI escape code could help too ... but i second that libncurses is what's usually used for those cases ...