changes to make cmd compile (not link)

svn path=/trunk/; revision=326
This commit is contained in:
Eric Kohl 1999-03-21 21:32:45 +00:00
parent b172b0df42
commit 108fcceee2
101 changed files with 2576 additions and 1819 deletions

View file

@ -26,10 +26,11 @@
* 24-Jan-1999 (Eric Kohl <ekohl@abo.rhein-zeitung.de>)
* Fixed Win32 environment handling.
* Unicode and redirection safe!
*
* 25-Feb-1999 (Eric Kohl <ekohl@abo.rhein-zeitung.de>)
* Fixed little bug.
*/
#define WIN32_LEAN_AND_MEAN
#include "config.h"
#ifdef INCLUDE_CMD_SET
@ -42,7 +43,7 @@
#include "cmd.h"
/* size of environment variable buffer */
/* initial size of environment variable buffer */
#define ENV_BUFFER_SIZE 1024
@ -81,7 +82,7 @@ INT cmd_set (LPTSTR cmd, LPTSTR param)
lpOutput += (len + 1);
}
}
FreeEnvironmentStrings (lpEnv);
FreeEnvironmentStrings (lpEnv);
}
return 0;
@ -112,7 +113,7 @@ INT cmd_set (LPTSTR cmd, LPTSTR param)
else if (dwBuffer > ENV_BUFFER_SIZE)
{
pszBuffer = (LPTSTR)realloc (pszBuffer, dwBuffer * sizeof (TCHAR));
GetEnvironmentVariable (param, pszBuffer, ENV_BUFFER_SIZE);
GetEnvironmentVariable (param, pszBuffer, dwBuffer * sizeof (TCHAR));
}
ConOutPrintf ("%s\n", pszBuffer);