Re: WinHugs beta

Neil Mitchell <[email protected]>
Newsgroups gmane.comp.lang.haskell.cvs.hugs
Message-ID <[email protected]>
Hi,

Ok, my bad - it was working on windows console all along but with the
line buffering which confused me. This patch implements echoing the
character for WinHugs. It doesn't buffer lines, but its probably
enough for now.

Thanks

Neil

On 10/7/05, Ross Paterson <[email protected]> wrote:
> On Thu, Oct 06, 2005 at 07:26:21PM +0100, Neil Mitchell wrote:
> > > Under Unix, echoing is left to the OS.  The usual OS setting is to echo
> > > by characters.  I thought plain hugs running in a Windows console window
> > > did this too, but haven't checked.
> > It doesn't.
>
> How odd.  I just tried plain hugs (both a mingw-compiled version and the
> VC-compiled one you sent me) from the explorer in NT4 and it worked as
> I'd hoped it would:
>
>         Hugs> getLine >>= print
>         hello
>         "hello"
>
> i.e. it echoed each character as I typed it, and I was able to correct
> the input with backspace before hitting return.  Same for interact.
>
> _______________________________________________
> Cvs-hugs mailing list
> [email protected]
> http://www.haskell.org/mailman/listinfo/cvs-hugs
>

_______________________________________________
Cvs-hugs mailing list
[email protected]
http://www.haskell.org/mailman/listinfo/cvs-hugs
interact_echo.patch (application/octet-stream, 490 B)
Index: src/winhugs/IORemap.c
===================================================================
RCS file: /cvs/hugs98/src/winhugs/IORemap.c,v
retrieving revision 1.4
diff -u -r1.4 IORemap.c
--- src/winhugs/IORemap.c	4 Oct 2005 15:26:38 -0000	1.4
+++ src/winhugs/IORemap.c	7 Oct 2005 12:48:09 -0000
@@ -147,6 +147,7 @@
 	    ExitContents();
 	LeaveCriticalSection(&Mutex);
 
+	WinHugsPutC(stdout, Res);
 	return Res; // no support for interact
     } else
 	return fgetc(f);
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.