Re: PATCH: MinGW readline -- revised

Daniel Jacobowitz
2005-07-25T15:01:38Z

On Mon, Jul 25, 2005 at 07:55:27AM -0700, Mark Mitchell wrote:
> Christopher Faylor wrote:
> >On Sun, Jul 24, 2005 at 08:41:09PM -0400, Daniel Jacobowitz wrote:
> >
> >>On Sun, Jul 24, 2005 at 08:39:30PM -0400, Christopher Faylor wrote:
> >>
> >>>+ #ifdef __MINGW32__
> >>>+ /* On Windows, use a special routine to read a single character
> >>>+ from the console. (Otherwise, no characters are available
> >>>+ until the user hits the return key.) */
> >>>+ if (isatty (fileno (stream)))
> >>>+ return getch ();
> >>>+ #endif
> >>
> >>>This doesn't look right. Shouldn't there be an ifdef there? It's a
> >>>minor point but it looks like this would potentially produce dead code.
> >>
> >>I'm not quite sure what you mean - but if you're talking about the code
> >>after the return statement, it looks like something's gone wrong with
> >>the indendation in this bit. Getch is only for consoles.
> >
> >
> >I forgot that getch was only for consoles. Somewhow I thought it could be
> >used for any stdin. Silly me. Windows.
>
> So, is the patch OK?

Yes, the readline and win32-termcap parts are OK.

--
Daniel Jacobowitz