Version française
Home     About     Download     Resources     Contact us    
Browse thread
*s ignored on windows gui
[ Home ] [ Index: by date | by threads ]
[ Search: ]

[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
Date: -- (:)
From: Christopher A. Watford <christopher.watford@g...>
Subject: Re: [Caml-list] *s ignored on windows gui
Ok let me explain why I trim these.

What happens when some luser forgets to terminate a comment, a string,
etc, the damn redirected shell process puts out either ' *' at the
front of a line, or just extra spaces. The actual variables etc aren't
being trimmed, just the output.

I'll try and work around having to trim those with some more
intelligent checks for user input failures.

Thanks for pointing out that bug! Keep them coming!

Chris

On Tue, 26 Oct 2004 21:38:02 +0000, Tiago Dionizio <tngd81@gmail.com> wrote:
> I didn't try with 3.07, only started working with OCaml recently.
> 
> Although this is a very rough attempt on locating the problem, this
> might have something to do with it:
> 
> on file win32caml/ocaml.c around the line 1319 here is what i found:
> 
> ...
> case WM_TIMERTICK:
>                /** Modified by Chris Watford 21 Sept 2003 **/
>                        hwndChild = (HWND) GetWindowLong(hwnd, DWL_USER);
> 
>                        if (ReadToLineBuffer())
>                        {
>                                int errMsg = 0;
>                                char *p, *l = lineBuffer;
> 
>                                // Ok we read something. Display the
> trimmed version
>                                while(((*l) == ' ') || ((*l) == '\t')
> || ((*l) == '\n') || ((*l) == '\r') || ((*l) == '*'))
>                                        l++;
> ...
> 
> I have no idea why it trims empty spaces and the *'s. There may be a
> good reason for this to happen.. but i did get very confused when this
> happened to me the first time.
> 
> Tiago
> 
> 
> 
> 
> On Tue, 26 Oct 2004 09:06:01 -0700, David Brown <caml-list@davidb.org> wrote:
> > On Tue, Oct 26, 2004 at 05:49:20PM +0200, Alex Baretta wrote:
> >
> > > ># print_string "**e";;
> > > >e- : unit = ()
> > >
> > > Try flushing stdout.
> >
> > I don't think it will help, since the 'e' is getting printed, just not the
> > '*'s before it.  I don't see anything in the source that looks like it
> > would cause this problem, but there might be something subtle.  Did it
> > happen with 3.07?  The windows code changed quite a bit between.
> >
> > Dave
> >
> 
> _______________________________________________
> Caml-list mailing list. Subscription management:
> http://yquem.inria.fr/cgi-bin/mailman/listinfo/caml-list
> Archives: http://caml.inria.fr
> Beginner's list: http://groups.yahoo.com/group/ocaml_beginners
> Bug reports: http://caml.inria.fr/bin/caml-bugs
> 


-- 
Christopher A. Watford
christopher.watford@gmail.com
http://dorm.tunkeymicket.com