help-ncurses
[Top][All Lists]
Advanced

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

Re: formatting '\n' of execve'ed programs


From: Thomas Cort
Subject: Re: formatting '\n' of execve'ed programs
Date: Fri, 23 Jan 2004 23:20:56 -0500
User-agent: Mutt/1.5.4i

Hi All,

I feel really stupid. I looked around for a few hours and finally found 
the answer to my problem: def_prog_mode(), def_shell_mode(), 
reset_prog_mode(), and reset_shell_mode()

An explaination for the interested and for the list archives....

def_shell_mode() saves the terminal information for the shell. Run it 
before you initscr().

before the execve call def_shell_mode() to save the ncurses information 
and call reset_shell_mode() to bring back the original terminal settings.

when you want ncurses back use reset_prog_mode()

-Tom

On Fri, Jan 23, 2004 at 10:42:17PM -0500, Thomas Cort wrote:
> Hi All,
> 
> I'm writing a command shell for an assignment and I decided to use 
> ncurses because of the colors, the ease of setting up raw keyboard 
> mode (used for tab completion of filenames), and because I wanted to try 
> something new ;)
> 
> One problem I've run into is that when I fork and use execve to run a 
> command the output from that command is not formatted correctly. The next 
> line starts directly below the last. 
> 
> example:
> foo
>    bar
> 
> should be:
> foo
> bar
> 
> Is there any way around this? Can someone point me to a man page, 
> give me the name of a function or a website with a way to solve my 
> problem?
> 
> Thanks!
> Thomas
> 
> 
> _______________________________________________
> Help-ncurses mailing list
> address@hidden
> http://mail.gnu.org/mailman/listinfo/help-ncurses




reply via email to

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