<html>
<head>
<style><!--
.hmmessage P
{
margin:0px;
padding:0px
}
body.hmmessage
{
font-size: 10pt;
font-family:Tahoma
}
--></style>
</head>
<body class='hmmessage'>
envp is used at least by posix/RTArgs so will stay.<br>I'll investigate further: ie. if it is used on Windows, test it and make it work, else maybe make it null.<br>Still probably remove instance if it isn't used, I don't think it has a portable use.<br> One could compare it to null to deduce Win32 vs. Posix but there is already Compiler.ThisOS or somesuch.<br><br> - Jay<br><br><hr id="stopSpelling">From: jay.krell@cornell.edu<br>To: m3devel@elegosoft.com<br>Subject: RTLinker.envp, instance removal?<br>Date: Mon, 23 Aug 2010 11:17:17 +0000<br><br>
<meta http-equiv="Content-Type" content="text/html; charset=unicode">
<meta name="Generator" content="Microsoft SafeHTML">
<style>
.ExternalClass .ecxhmmessage P
{padding:0px;}
.ExternalClass body.ecxhmmessage
{font-size:10pt;font-family:Tahoma;}
</style>
RTLinker exposes:<br> envp<br> instance<br><br><br>envp is not entirely useless, but is redundant with Cstdlib.getenv,<br>which is exposed through libm3/Env.<br><br><br>RTLinker.envp appears somewhat broken on Windows, despite appearances<br>that I tried to fix it. In particular, broken for gui apps.<br> (btw, gui apps and console apps are far more the same than<br> people realize; this whole business where Modula-3's main<br> varies for each of them is unnecessary; the actual<br> entry point for any Win32 console or gui app takes no parameters;<br> the parameters the C runtime passes to main or WinMain<br> are created by it based on stuff such as GetCommandLine,<br> GetStartupInfo, etc.)<br> <br> <br>instance is pretty much useless.<br>Anyone that needs it can get it via GetModuleHandle(NULL);<br><br>I suppose RTLinker.instance is more portable, as it'll reliably<br>be null on posix -- ie: the #ifdef is built into startup/m3core,<br>instead of the user's app.<br>(on the other hand, there's probably nothing portable<br>you can do with instance, given that it is useless on Posix)<br><br>Anyway, on the general premise that less is more and things<br>deemed buggy, of little value, and unused, are best just<br>removed instead of fixed or improved, I propose removing<br>both of these. Once I verify they are unused.<br><br><br>?<br><br><br> - Jay<br><br><br><br><br> </body>
</html>