title: Using GNU Readline; how can I add ncurses in the same program?
body: <p>The title is a bit more specific than my actual goal:</p>
  
  <p>I have a command-line program which uses GNU Readline, primarily for command history (i.e. retrieving previous commands using up-arrow) and some other niceties.  Right now the program's output appears interspersed with the user's input, which sometimes is OK but the output is asynchronous (it comes via a network connection in response to the input commands), and that gets annoying sometimes (e.g. if lines are output when the user is typing new input).</p>
  
  <p>I'd like to add a feature to this program: a separate "window" for the output.  I thought about using ncurses for this.  But it appears from the <a href="http://invisible-island.net/ncurses/ncurses.faq.html#readline_library" rel="noreferrer">ncurses FAQ</a> that the two libraries are not easy to use together.</p>
  
  <p>I might consider using <a href="http://www.thrysoee.dk/editline/" rel="noreferrer">Editline</a> or <a href="http://www.astro.caltech.edu/~mcs/tecla/" rel="noreferrer">tecla</a> instead of Readline, but it's not clear to me if either of those will solve my problem.  I'd also consider using something other than ncurses, including a library which provides both kinds of functionality (text-mode windows and command history), but I don't know what might be best.</p>
  
  <p>Oh, and support for colored text might get bonus points.  I suspect I may be able to do that with Readline, so maybe it's a separate concern, but if a solution to my problem also makes it easy to add a bit of color to the output, so much the better.</p>
  
  <p>I'm using Ubuntu Hardy (Linux 2.6).</p>