On Sat, Mar 27, 2010 at 11:00 AM, Gene Cumm <gene.cumm at gmail.com>
wrote:> Well, I decided to get ROSH back out and try to get it functioning in
> Syslinux-4. ?As has been my habit, I first recompiled the Linux binary
> and tried it out. ?In the beginning of ROSH, it calls
> console_ansi_std(). ?When I was working on this in the past, using
> this function ensured both the Linux and the Syslinux/COM32 binaries
> function similarly.
>
> When using fgets() to get an input string in the Linux binary, I
> noticed that hitting the "Enter" key had no results and therefore
ROSH
> did not proceed with processing a command.
>
> Right now, I'm working on programming a testing application to test
> the input capabilities and see if I can fumble around with
> console_ansi_std() to see if I can get it to work.
>
> Has anyone else noticed anything similar? ?Has anyone had any success
> using fgets() and console_ansi_std() in Linux with libutil in
> Syslinux-4?
>
> --
> -Gene
>
More information from environment Kubuntu 8.04 x64 from Konsole and a
normal virtual terminal.
Experimenting with console_ansi_std(), console_ansi_raw() and none, it
looks like commenting out the following gets a more expected result
when using console_ansi_raw():
com32/libutil/ansiraw.c:75: tio.c_iflag |= IGNCR;
and while using console_ansi_std() commenting out the following seems to help:
com32/libutil/ansiline.c:74: tio.c_iflag &= ~ICRNL;
com32/libutil/ansiline.c:75: tio.c_iflag |= IGNCR;
Comparing ansiline.c/ansiraw.c to the version that I was using
previously, I also noticed the following line removed:
fputs("\033[0m\033[20h", stdout);
Reading the ECMA-48, it seems that the removal at least of using <ESC>
[20h and <ESC> [20l are proper as their use has been deprecated for at
least 18 years. It appears that the removal of this statement, at
least within ansiraw.c, introduced the issues I'm noticing. I still
need to experiment more with ansiline.c to determine the best fix.
While experimenting, I also found some differing behavior in the
Backspace key in Syslinux/COM32+libutil versus Linux/libutil.
KEY_BACKSPACE is returned by get_key() in Syslinux/COM32 by hitting
the Backspace key or a Linux virtual console with Ctrl-Backspace.
KEY_DEL is returned in Syslinux/COM32 by Ctrl-Backspace or in Linux
with Backspace (virtual terminal or Konsole).
-Gene