<html>
<head>
<style>
.hmmessage P
{
margin:0px;
padding:0px
}
body.hmmessage
{
FONT-SIZE: 10pt;
FONT-FAMILY:Tahoma
}
</style>
</head>
<body class='hmmessage'> > I have both console and gui programs built using 4.1 that do pull stuff out of the environment.<BR><BR>
I assume you weren't using RTArgs?<BR>
 <BR>
Everything good, move along?<BR>
 <BR>
(Not "everything", there are still m3tests failures..though I guess -- maybe also try them with 3.6, 4.1, 5.1...)<BR>
 <BR>
 - Jay<BR><BR>
<BLOCKQUOTE>
<HR id=EC_stopSpelling>
Date: Sat, 10 May 2008 05:46:16 -0400<BR>From: rcoleburn@scires.com<BR>To: m3devel@elegosoft.com<BR>Subject: Re: [M3devel] NT386 environment variables (new NT386 snapshots)<BR><BR>
<META content="Microsoft SafeHTML" name=Generator>
<DIV>Jay:</DIV>
<DIV> </DIV>
<DIV>Ok, I've added the sleep.</DIV>
<DIV>Here are the new results using my newly rebuilt cm3 and my old v4.1:</DIV>
<DIV> </DIV>
<DIV>v4.1:  pgm.exe @M3novm abc def ghi</DIV>
<DIV>
<DIV>v5.7:  pgm.exe abc def ghi</DIV>
<DIV> </DIV></DIV>
<DIV>1.  cm3 4.1, VS 2005, GUI mode, popup with runtime error crash message</DIV>
<DIV> </DIV>
<DIV>2.  cm3 4.1, VS 2005, console mode, no popup, output shows "def¿5;"</DIV>
<DIV> </DIV>
<DIV>3.  cm3 d5.7.0, VS 2008, GUI mode, popup with output shows "def=ExitCode=00000000"</DIV>
<DIV> </DIV>
<DIV>4.  cm3 d5.7.0, VS 2008, console mode, no popup with output shows "def=ExitCode=00000000"</DIV>
<DIV> </DIV>
<DIV>Regards,</DIV>
<DIV>Randy<BR><BR>>>> Jay <jayk123@hotmail.com> 5/10/2008 5:04 AM >>><BR>Randy,<BR>You can make the popup stick around, put in WinBase.Sleep(10000), or run under a debugger.<BR>Since 5.7 is crashing, I assume you don't have the fix I very recently commited? Or the last point.<BR>I assume if 5.7 doesn't crash, you are satisfied.<BR> <BR>I forgot to tell you -- make sure you pass a few command line options to the program, like<BR> <BR>NT386\pgm.exe abc def ghi.<BR> <BR> - Jay<BR><BR></DIV>
<BLOCKQUOTE>
<HR id=EC_EC_stopSpelling>
Date: Sat, 10 May 2008 04:46:54 -0400<BR>From: rcoleburn@scires.com<BR>To: jayk123@hotmail.com<BR>Subject: RE: [M3devel] NT386 environment variables (new NT386 snapshots)<BR><BR>
<DIV>Jay:</DIV>
<DIV> </DIV>
<DIV>Here are my results using the program you supplied:</DIV>
<DIV> </DIV>
<DIV>1.  cm3 v4.1, VS 2005, GUI mode, get a pop-up dos window, but program crashes</DIV>
<DIV> </DIV>
<DIV>2.  cm3 v4.1, VS 2005, console mode, program crashes</DIV>
<DIV> </DIV>
<DIV>3.  cm3 v.d5.7.0, VS 2008 GUI mode, get a pop-up window but it disappears too fast to see any contents</DIV>
<DIV> </DIV>
<DIV>4.  cm3 v.d5.7.0, VS 2008 console mode, program crashes</DIV>
<DIV> </DIV>
<DIV>Regards,</DIV>
<DIV>Randy<BR><BR>>>> Jay <jayk123@hotmail.com> 5/9/2008 3:44 AM >>><BR> > these problems (pixmaps, buildstandalone, environ vars, serial i/o, etc...<BR> <BR> Ok, here is the story with environment variables.<BR><BR>I tested 3.6 and current, gui and console.<BR><BR>This is the program:<BR><BR>C:\dev2\j\m3\3>type src\m3makefile<BR><BR>import ("m3core")<BR>import ("libm3")<BR>m3_option ("-gui")     twiddle this line in and out with a comment<BR>implementation ("Main")<BR>program ("pgm")<BR> <BR>C:\dev2\j\m3\3>type src\Main.m3<BR>MODULE Main;<BR>IMPORT IO;<BR>IMPORT RTArgs;<BR> <BR>BEGIN<BR>(* IO.Put just crashes in 3.6 gui apps *)<BR>  IO.Put(RTArgs.GetArg(2));<BR>  IO.Put(RTArgs.GetEnv(2));<BR> <BR>(* use this for gui apps *)<BR>  EVAL RTArgs.GetArg(2);<BR>  EVAL RTArgs.GetEnv(2);<BR>END Main.<BR><BR>In 3.6 console apps, RTArgs.GetEnv returns garbage. That makes sense from the code.<BR>In current console apps, GetEnv works.<BR>In current gui apps, GetEnv access violates, or returns an invalid pointer.<BR>  This also makes sense from the code.<BR><BR>Randy, does this actually work for you?<BR>I'd be quite surprised.<BR>I haven't tried 4.1 yet, just 3.6 and current.<BR><BR>I will apply an easy fix.<BR><BR> - Jay<BR><BR></DIV>
<BLOCKQUOTE>
<HR id=EC_EC_EC_stopSpelling>
Date: Thu, 8 May 2008 16:17:37 -0400<BR>From: rcoleburn@scires.com<BR>To: m3devel@elegosoft.com<BR>Subject: Re: [M3devel] new NT386 snapshots<BR><BR>
<DIV>Jay:</DIV>
<DIV> </DIV>
<DIV>I have both console and gui programs built using 4.1 that do pull stuff out of the environment.  I've not noticed any problems with either mode.</DIV>
<DIV> </DIV>
<DIV>From my perspective, the old 4.1 seems more reliable than the current system in a number of respects.  I have a new project with a hard deadline that I would like to use the new cm3 system for, but until these problems (pixmaps, buildstandalone, environ vars, serial i/o, etc.) can be resolved, I'm going to keep using 4.1 for my production work.</DIV>
<DIV> </DIV>
<DIV>Regards,</DIV>
<DIV>Randy<BR><BR>>>> Jay <jayk123@hotmail.com> 5/8/2008 2:46 PM >>><BR><A href="http://modula3.elegosoft.com/cm3/uploaded-archives/" target=_blank>http://modula3.elegosoft.com/cm3/uploaded-archives/</A><BR> <BR><A href="http://modula3.elegosoft.com/cm3/uploaded-archives/cm3-std-WIN32-NT386-d5.7.0.zip" target=_blank>http://modula3.elegosoft.com/cm3/uploaded-archives/cm3-std-WIN32-NT386-d5.7.0.zip</A><BR><A href="http://modula3.elegosoft.com/cm3/uploaded-archives/cm3-min-WIN32-NT386-d5.7.0.zip" target=_blank>http://modula3.elegosoft.com/cm3/uploaded-archives/cm3-min-WIN32-NT386-d5.7.0.zip</A><BR><A href="http://modula3.elegosoft.com/cm3/uploaded-archives/cm3-std-WIN32-NT386-d5.7.0-symbols.zip" target=_blank>http://modula3.elegosoft.com/cm3/uploaded-archives/cm3-std-WIN32-NT386-d5.7.0-symbols.zip</A><BR> <BR>These should have:<BR>  latest quake extensions <BR>  set relation fixes <BR>  other set fixes revealed through dynamic linking of one regression test <BR>  hypothetical ability to cross-build to AMD64_LINUX, AMD64_DARWIN  <BR>  one jmpbuf size for all NT386 configurations (NT386, NT386GNU, NT386MINGNU) <BR> <BR>Built with Visual C++ 9.0 Express, so you'll want:<BR><A href="http://www.microsoft.com/downloads/details.aspx?familyid=9B2DA534-3E03-4391-8A4D-074B9F2BC1BF&displaylang=en" target=_blank>http://www.microsoft.com/downloads/details.aspx?familyid=9B2DA534-3E03-4391-8A4D-074B9F2BC1BF&displaylang=en</A><BR> <BR> <BR>Still more work to do though, e.g. assertion failures in unit tests, pixmap..<BR> <BR>Fuller disclosure:<BR>Something is leaking memory on my system such that "everything" starts "failing" and I have to reboot.<BR>This isn't Modula-3 related.<BR>Hopefully these files aren't damaged as a result.<BR>Must be some buggy driver or something..<BR> <BR>Aside:<BR> The environment variable thingy has been bugging me a long time and I finally looked deeper at it.<BR>It appears broken in CM3 4.x. I didn't check 3.x yet.<BR>I'm still mulling a fix, and haven't run a repro of the break, but it's not a big deal either way.<BR>Basically console apps use main that takes char** and gui apps use WinMain that doesn't get environment variables but the generated code calls GetEvironmentStrings() which returns null separated strings.<BR>Must be that hardly anyone uses environment variables in Modula-3 on Win32 for this to have lingered so long, at least gui apps.<BR> <BR> - Jay<BR></DIV></BLOCKQUOTE></BLOCKQUOTE></BLOCKQUOTE></body>
</html>