[syslinux] COM32: console_ansi_raw() and later segfaults

Gene Cumm gene.cumm at gmail.com
Mon Dec 8 19:39:01 PST 2008


For the read-only shell that I'm working on, I'm running into a slight
snag.  I'm trying to build a paging command (emulating the function of
more).  It seems get_key() is probably the best function to use for
obtaining just a single key sequence.  On my first run, I tried to
call console_ansi_raw(), then get_key() then console_ansi_std() to
change it back to a more normal mode.  When I then attempt to use
fgets() (in Linux, not syslinux/com32), it segfaults.

I then decided to try just tweaking the two local flag bits, ICANON
and ECHO and it works fine for Linux but now I'm going to have to
write alternate code for the COM32 build, probably by writing a pair
of functions to change modes.

The question is what should I be doing in order to be more compatible
with both Linux and COM32?  Are my initial thoughts completely in the
wrong direction?

-- 
"No one ever says, 'I can't read that ASCII E-mail you sent me.'"




More information about the Syslinux mailing list