<p>Questions arising from general review and familiarization with minheadless...</p>
<p><a href="https://github.com/OpenSmalltalk/opensmalltalk-vm/blob/1d97d79/platforms/minheadless/windows/sqWin32Common.c">platforms/minheadless/windows/sqWin32Common.c</a> defines functions...</p>
<pre><code>fromSqueakInto()
fromSqueak()
fromSqueak2()
sqWin32PrintLastError()
</code></pre>
<p>The first three don't seem to be used from Windows...</p>
<pre><code>$ grep -RIn fromSqueak * | grep -v sqWin32Common.c
platforms/Mac OS/plugins/SecurityPlugin/sqMacSecurity.c:21:#define fromSqueak(string,length) string
platforms/Mac OS/plugins/SecurityPlugin/sqMacSecurity.c:72:  return isAccessiblePathName(fromSqueak(pathString, pathStringLength));
platforms/Mac OS/plugins/SecurityPlugin/sqMacSecurity.c:78:  return isAccessiblePathName(fromSqueak(pathString, pathStringLength));
platforms/Mac OS/plugins/SecurityPlugin/sqMacSecurity.c:84:  return isAccessiblePathName(fromSqueak(pathString, pathStringLength));
platforms/Mac OS/plugins/SecurityPlugin/sqMacSecurity.c:91:  return isAccessibleFileName(fromSqueak(pathString, pathStringLength));
platforms/Mac OS/plugins/SecurityPlugin/sqMacSecurity.c:100:  return isAccessibleFileName(fromSqueak(pathString, pathStringLength));
platforms/Mac OS/plugins/SecurityPlugin/sqMacSecurity.c:106:  return isAccessibleFileName(fromSqueak(pathString, pathStringLength));
platforms/minheadless/windows/sqWin32.h:32:TCHAR *fromSqueak(const char *sqPtr, int sqSize);
platforms/minheadless/windows/sqWin32.h:33:TCHAR *fromSqueak2(const char *sqPtr, int sqSize);
platforms/unix/plugins/SecurityPlugin/sqUnixSecurity.c:24:static char* fromSqueak(char* string, int len)
platforms/unix/plugins/SecurityPlugin/sqUnixSecurity.c:76:  return isAccessiblePathName(fromSqueak(pathString, pathStringLength));
platforms/unix/plugins/SecurityPlugin/sqUnixSecurity.c:84:  return isAccessiblePathName(fromSqueak(pathString, pathStringLength));
platforms/unix/plugins/SecurityPlugin/sqUnixSecurity.c:92:  return isAccessiblePathName(fromSqueak(pathString, pathStringLength));
platforms/unix/plugins/SecurityPlugin/sqUnixSecurity.c:103:  return isAccessibleFileName(fromSqueak(pathString, pathStringLength));
platforms/unix/plugins/SecurityPlugin/sqUnixSecurity.c:118:  return isAccessibleFileName(fromSqueak(pathString, pathStringLength));
platforms/unix/plugins/SecurityPlugin/sqUnixSecurity.c:125:  return isAccessibleFileName(fromSqueak(pathString, pathStringLength));
</code></pre>
<p>So what are the pros/cons of the other two definitions? Can these be consolidated to a higher-commonality?  Is there a security benefit to defining the function statically local just to that file.</p>
<pre><code>#define fromSqueak(string,length) string
</code></pre>
<pre><code>static char* fromSqueak(char* string, int len)
{
  static char buf[MAXPATHLEN];
  strncpy(buf, string, len);
  buf[len] = '\0';
  return buf;
}
</code></pre>
<p>For the last, what is the benefit versus printLastError(TEXT())...</p>
<pre><code>$ grep -RIn sqWin32PrintLastError * | grep -v sqWin32Common.c
platforms/minheadless/windows/sqWin32.h:30:void sqWin32PrintLastError(const char *message);
platforms/minheadless/windows/sqWin32Alloc.c:192:               sqWin32PrintLastError("VirtualProtect(x,y,PAGE_EXECUTE_READWRITE)");
platforms/minheadless/windows/sqWin32Alloc.c:204:               sqWin32PrintLastError("VirtualProtect(x,y,PAGE_EXECUTE_READWRITE)");
platforms/minheadless/windows/sqWin32SpurAlloc.c:210:           sqWin32PrintLastError("VirtualProtect(x,y,PAGE_EXECUTE_READWRITE)");
platforms/minheadless/windows/sqWin32SpurAlloc.c:224:           sqWin32PrintLastError("VirtualProtect(x,y,PAGE_EXECUTE_READWRITE)");
</code></pre>
<p><a class="user-mention" data-hovercard-type="user" data-hovercard-url="/hovercards?user_id=728098" data-octo-click="hovercard-link-click" data-octo-dimensions="link_type:self" href="https://github.com/nicolas-cellier-aka-nice">@nicolas-cellier-aka-nice</a> some of the above seems related to your recent comments on the mail list</p>

<p style="font-size:small;-webkit-text-size-adjust:none;color:#666;">—<br />You are receiving this because you are subscribed to this thread.<br />Reply to this email directly, <a href="https://github.com/OpenSmalltalk/opensmalltalk-vm/issues/345">view it on GitHub</a>, or <a href="https://github.com/notifications/unsubscribe-auth/AhLyW13jj6AwZSF5tzpO4BJIxXZL5dWkks5vACP0gaJpZM4ZvDM2">mute the thread</a>.<img src="https://github.com/notifications/beacon/AhLyW1RXQTkh3tfvWa24WLCBe7PwddIeks5vACP0gaJpZM4ZvDM2.gif" height="1" width="1" alt="" /></p>
<script type="application/json" data-scope="inboxmarkup">{"api_version":"1.0","publisher":{"api_key":"05dde50f1d1a384dd78767c55493e4bb","name":"GitHub"},"entity":{"external_key":"github/OpenSmalltalk/opensmalltalk-vm","title":"OpenSmalltalk/opensmalltalk-vm","subtitle":"GitHub repository","main_image_url":"https://github.githubassets.com/images/email/message_cards/header.png","avatar_image_url":"https://github.githubassets.com/images/email/message_cards/avatar.png","action":{"name":"Open in GitHub","url":"https://github.com/OpenSmalltalk/opensmalltalk-vm"}},"updates":{"snippets":[{"icon":"DESCRIPTION","message":"minheadless sqWin32Common.c (#345)"}],"action":{"name":"View Issue","url":"https://github.com/OpenSmalltalk/opensmalltalk-vm/issues/345"}}}</script>
<script type="application/ld+json">[
{
"@context": "http://schema.org",
"@type": "EmailMessage",
"potentialAction": {
"@type": "ViewAction",
"target": "https://github.com/OpenSmalltalk/opensmalltalk-vm/issues/345",
"url": "https://github.com/OpenSmalltalk/opensmalltalk-vm/issues/345",
"name": "View Issue"
},
"description": "View this Issue on GitHub",
"publisher": {
"@type": "Organization",
"name": "GitHub",
"url": "https://github.com"
}
}
]</script>