The ncurses FAQ's section on readline (linked below) seems out of date,
or at least a little unclear. Using gnu readline's "alternate
interface" (also linked below), it's relatively trivial to combine
ncurses with gnu readline.
http://invisible-island.net/ncurses/ncurses.faq.html#readline_library
http://tiswww.case.edu/php/chet/readline/readline.html#SEC41
The basic idea is to use call rl_callback_read_char() when input from
the user is available (determined with select, or similar), then print
'rl_line_buffer' as you would any other string in ncurses, and
optionally set A_REVERSE on the position indicated by rl_point. (or
just reposition the cursor I guess, either works...)
This is a quick and dirty example that I threw together, and seems to
work fine: (just search rl_callback_read_char to find the relevant
section).
http://github.com/jgreco/agora/blob/develop/main.c