[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Displaying system call output properly in ncurses?

From: Thomas Dickey
Subject: Re: Displaying system call output properly in ncurses?
Date: Fri, 27 Aug 2004 16:25:53 -0400 (EDT)

On Fri, 27 Aug 2004, Peter Pieda wrote:

> Hello,
> I want to execute a system call, for example 'system("ls -l")' and have
> the output displayed properly within ncurses. Right now when I do
> the system call,  each line of output is not left aligned.

ncurses (SVR4 curses generally) sets the terminal to raw mode (all the
time) and simulates the various modes in the library (to eliminate
various technical problems of switching modes).  You'll have to reset
the terminal mode to the shell.

        man resetty

shows some relevant functions.  (I don't use those much in applications,
since really portable code has to deal with things like HPUX curses).
But they do work for ncurses...

Thomas E. Dickey

reply via email to

[Prev in Thread] Current Thread [Next in Thread]