From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from concorde.inria.fr (concorde.inria.fr [192.93.2.39]) by yquem.inria.fr (Postfix) with ESMTP id 492D1BC40 for ; Wed, 27 Oct 2004 05:12:05 +0200 (CEST) Received: from pauillac.inria.fr (pauillac.inria.fr [128.93.11.35]) by concorde.inria.fr (8.13.0/8.13.0) with ESMTP id i9R3C4p0003481 for ; Wed, 27 Oct 2004 05:12:05 +0200 Received: from nez-perce.inria.fr (nez-perce.inria.fr [192.93.2.78]) by pauillac.inria.fr (8.7.6/8.7.3) with ESMTP id FAA28797 for ; Wed, 27 Oct 2004 05:12:04 +0200 (MET DST) Received: from wproxy.gmail.com (wproxy.gmail.com [64.233.184.198]) by nez-perce.inria.fr (8.13.0/8.13.0) with ESMTP id i9R3C3m4017812 for ; Wed, 27 Oct 2004 05:12:04 +0200 Received: by wproxy.gmail.com with SMTP id 68so263393wri for ; Tue, 26 Oct 2004 20:12:03 -0700 (PDT) DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=beta; d=gmail.com; h=received:message-id:date:from:reply-to:to:subject:cc:in-reply-to:mime-version:content-type:content-transfer-encoding:references; b=nuz6eCHut85GRhup85xjWUYj/OHK4ClAtEkcMPdyE5NxZ41K3gAU02SAl81wUM8nz4ZgRLAGTzsVvdZ9ynZTrl1l+JRFfPmplkoTYXcCYYPQcdjajPRln9pxpNFv79FuFpjG0GZ1soZ90JcgprWkRVkt1EZAouMLXrc0AlW3ZqE= Received: by 10.38.150.32 with SMTP id x32mr903803rnd; Tue, 26 Oct 2004 20:12:03 -0700 (PDT) Received: by 10.38.66.46 with HTTP; Tue, 26 Oct 2004 20:12:03 -0700 (PDT) Message-ID: <8008871f04102620127e11b050@mail.gmail.com> Date: Tue, 26 Oct 2004 23:12:03 -0400 From: "Christopher A. Watford" Reply-To: "Christopher A. Watford" To: Caml Mailing List Subject: Re: [Caml-list] *s ignored on windows gui Cc: Tiago Dionizio In-Reply-To: <8008871f041026192114469d5d@mail.gmail.com> Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit References: <417E7200.20902@baretta.com> <20041026160601.GA19671@old.davidb.org> <8008871f0410261730ef46a39@mail.gmail.com> <8008871f041026192114469d5d@mail.gmail.com> X-Miltered: at concorde with ID 417F1204.002 by Joe's j-chkmail (http://j-chkmail.ensmp.fr)! X-Miltered: at nez-perce with ID 417F1203.000 by Joe's j-chkmail (http://j-chkmail.ensmp.fr)! X-Spam: no; 0.00; caml-list:01 char:01 cvs:01 wrote:01 char:01 wrote:01 terminate:01 redirected:01 bug:01 ocaml:01 ocaml:01 hwnd:01 hwnd:01 errmsg:01 caml-list:01 X-Spam-Checker-Version: SpamAssassin 3.0.0 (2004-09-13) on yquem.inria.fr X-Spam-Status: No, score=0.0 required=5.0 tests=RCVD_BY_IP autolearn=disabled version=3.0.0 X-Spam-Level: # print_char '*';; *- : unit = () # print_string " 3 spaces";; _-_3 spaces- : unit = () # I turned the spaces in the last example into an alternating pattern so you could see nothing got trimmed! I'll get this code into CVS. As always, if you want the bleeding edge of OCamlWinPlus, I suggest you check out (that is my actual VS.Net project directory): http://projects.tunkeymicket.com/OCamlWinPlus/Release/ If you'd like the more stable side of the bleeding edge (stable directory on my webserver that only takes polished copies): http://dorm.tunkeymicket.com/OCamlWinPlus/Release/ Hope that helps! Chris On Tue, 26 Oct 2004 22:21:56 -0400, Christopher A. Watford wrote: > Here is some output from my recently applied changes: > > # print_string "**e";; > **e- : unit = () > # print_char '*';; > *- : unit = () > # print_char '\t';; > - : unit = () > # > > print_char '*';; > *- : unit = () > # > > Note the crappy leading space if you use lots of lines.... I'm not > sure how I should go about checking for things like that. The old code > removed all whilespace leading the output (and those *'s, hehe sorry). > > Is the desired functionality leaving the output intact? If so the > above looks like this: > > # print_string "**e";; > **e- : unit = () > # print_char '*';; > *- : unit = () > # print_char '\t';; > - : unit = () > # > > print_char '*';; > *- : unit = () > # > > With only a bunch of leading white space when you use more than 1 > line. Should I have it detect and remove 1 space for each extra line? > The reality of what goes on is accurately shown below: > > # > > print_char '*';; > *- : unit = () > # > > Note I used no indentation between lines, and no indentation appeared > in my output. I think it would require a bit of extra work, but I > might could finagle keeping track of indentation for removal in the > output. > > > > On Tue, 26 Oct 2004 20:30:28 -0400, Christopher A. Watford > wrote: > > 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 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 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 > > > > -- > Christopher A. Watford > christopher.watford@gmail.com > http://dorm.tunkeymicket.com > -- Christopher A. Watford christopher.watford@gmail.com http://dorm.tunkeymicket.com