mirror of
https://github.com/ApfelTeeSaft/reactos.git
synced 2026-09-02 12:23:31 +00:00
[CMD]
* Reduce the scope of some variables. svn path=/trunk/; revision=54136
This commit is contained in:
@@ -206,8 +206,6 @@ RemoveAssociation(LPTSTR extension)
|
||||
INT CommandAssoc (LPTSTR param)
|
||||
{
|
||||
|
||||
LPTSTR lpEqualSign = NULL;
|
||||
|
||||
/* print help */
|
||||
if (!_tcsncmp (param, _T("/?"), 2))
|
||||
{
|
||||
@@ -221,7 +219,7 @@ INT CommandAssoc (LPTSTR param)
|
||||
PrintAllAssociations();
|
||||
else
|
||||
{
|
||||
lpEqualSign = _tcschr(param, _T('='));
|
||||
LPTSTR lpEqualSign = _tcschr(param, _T('='));
|
||||
if(lpEqualSign != NULL)
|
||||
{
|
||||
LPTSTR fileType = lpEqualSign + 1;
|
||||
|
||||
@@ -1260,13 +1260,11 @@ QsortFiles(LPWIN32_FIND_DATA ptrArray[], /* [IN/OUT] The array with file info po
|
||||
LPDIRSWITCHFLAGS lpFlags) /* [IN] The flags that we will use to sort */
|
||||
{
|
||||
LPWIN32_FIND_DATA lpTemp; /* A temporary pointer */
|
||||
int First, Last, Temp;
|
||||
BOOL Way;
|
||||
|
||||
if (i < j)
|
||||
{
|
||||
First = i;
|
||||
Last = j;
|
||||
int First = i, Last = j, Temp;
|
||||
Way = TRUE;
|
||||
while (i != j)
|
||||
{
|
||||
|
||||
@@ -209,7 +209,6 @@ BOOL ShowCompletionMatches (LPTSTR str, INT charcount)
|
||||
TCHAR path[MAX_PATH];
|
||||
TCHAR fname[MAX_PATH];
|
||||
TCHAR directory[MAX_PATH];
|
||||
UINT longestfname = 0;
|
||||
SHORT screenwidth;
|
||||
|
||||
/* expand current file name */
|
||||
@@ -277,6 +276,7 @@ BOOL ShowCompletionMatches (LPTSTR str, INT charcount)
|
||||
hFile = FindFirstFile (path, &file);
|
||||
if (hFile != INVALID_HANDLE_VALUE)
|
||||
{
|
||||
UINT longestfname = 0;
|
||||
/* Get the size of longest filename first. */
|
||||
do
|
||||
{
|
||||
|
||||
@@ -48,7 +48,6 @@ INT cmd_start (LPTSTR Rest)
|
||||
TCHAR szFullCmdLine [CMDLINE_LENGTH];
|
||||
PROCESS_INFORMATION prci;
|
||||
STARTUPINFO stui;
|
||||
INT i = 0;
|
||||
#ifdef UNICODE
|
||||
DWORD dwCreationFlags = CREATE_NEW_CONSOLE | CREATE_UNICODE_ENVIRONMENT;
|
||||
#else
|
||||
@@ -213,7 +212,7 @@ INT cmd_start (LPTSTR Rest)
|
||||
/* Parsing the command that gets called by start, and it's parameters */
|
||||
{
|
||||
BOOL bInside = FALSE;
|
||||
|
||||
INT i;
|
||||
/* find the end of the command and put the arguments in param */
|
||||
for (i = 0; Rest[i]; i++)
|
||||
{
|
||||
|
||||
@@ -28,8 +28,6 @@
|
||||
VOID ShortVersion (VOID)
|
||||
{
|
||||
OSVERSIONINFO VersionInfo;
|
||||
unsigned RosVersionLen;
|
||||
LPTSTR RosVersion;
|
||||
|
||||
ConOutResPrintf(STRING_CMD_SHELLINFO, _T(KERNEL_RELEASE_STR), _T(KERNEL_VERSION_BUILD_STR));
|
||||
VersionInfo.dwOSVersionInfoSize = sizeof(OSVERSIONINFO);
|
||||
@@ -37,6 +35,9 @@ VOID ShortVersion (VOID)
|
||||
memset(VersionInfo.szCSDVersion, 0, sizeof(VersionInfo.szCSDVersion));
|
||||
if (GetVersionEx(&VersionInfo))
|
||||
{
|
||||
LPTSTR RosVersion;
|
||||
unsigned RosVersionLen;
|
||||
|
||||
RosVersion = VersionInfo.szCSDVersion + _tcslen(VersionInfo.szCSDVersion) + 1;
|
||||
RosVersionLen = sizeof(VersionInfo.szCSDVersion) / sizeof(VersionInfo.szCSDVersion[0]) -
|
||||
(RosVersion - VersionInfo.szCSDVersion);
|
||||
|
||||
Reference in New Issue
Block a user