Chet Ramey left as an exercise for the reader: > Are you calling rl_prep_terminal directly, or letting readline call it for > you? If you call it before readline can initialize, or are calling it > without calling rl_initialize, all bets are off.
Ahhh, that's almost certainly it, then. I'm not calling rl_initialize() because I'm using readline in conjunction with another character graphics library. This had once worked, but if it's not supported behavior, I might need change how I do things. With that said, my program does appear to work once I set rl_outstream by hand before calling rl_prep_terminal(). Given the stdin special-case in rl_prep_terminal(), would this be so out of place there? Is there other functionality I'm almost certainly missing with this scheme? Essentially, my program is calling setupterm() through a wrapper library before setting up its libreadline input loop, placing input into cbreak mode, and then running the input loop. -- nick black -=- https://www.nick-black.com to make an apple pie from scratch, you need first invent a universe.
signature.asc
Description: PGP signature
