mirror of
https://github.com/reactos/reactos.git
synced 2025-08-06 08:13:01 +00:00
fixed uninitialized variable warning and indentation
svn path=/trunk/; revision=17099
This commit is contained in:
parent
514aa4a565
commit
4d98b5f8f7
1 changed files with 33 additions and 32 deletions
|
@ -555,48 +555,49 @@ VOID CompleteFilename (LPTSTR strIN, BOOL bNext, LPTSTR strOut, INT cusor)
|
||||||
/* Look to see if they hit tab again, if so cut off the diff length */
|
/* Look to see if they hit tab again, if so cut off the diff length */
|
||||||
if(_tcscmp(str,LastReturned) || !_tcslen(str))
|
if(_tcscmp(str,LastReturned) || !_tcslen(str))
|
||||||
{
|
{
|
||||||
/* We need to know how many chars we added from the start */
|
/* We need to know how many chars we added from the start */
|
||||||
StartLength = _tcslen(str);
|
StartLength = _tcslen(str);
|
||||||
|
|
||||||
/* no string, we need all files in that directory */
|
/* no string, we need all files in that directory */
|
||||||
if(!StartLength)
|
if(!StartLength)
|
||||||
{
|
|
||||||
_tcscat(str,_T("*"));
|
|
||||||
}
|
|
||||||
|
|
||||||
/* Zero it out first */
|
|
||||||
szBaseWord[0] = _T('\0');
|
|
||||||
szPrefix[0] = _T('\0');
|
|
||||||
|
|
||||||
/*What comes out of this needs to be:
|
|
||||||
szBaseWord = path no quotes to the object
|
|
||||||
szPrefix = what leads up to the filename
|
|
||||||
no quote at the END of the full name */
|
|
||||||
FindPrefixAndSuffix(str,szPrefix,szBaseWord);
|
|
||||||
/* Strip quotes */
|
|
||||||
for(i = 0; i < _tcslen(szBaseWord); i++)
|
|
||||||
{
|
|
||||||
if(!_tcsncmp(&szBaseWord[i], _T("\""),1))
|
|
||||||
{
|
{
|
||||||
for(ii = i; ii < (_tcslen(szBaseWord)); ii++)
|
_tcscat(str,_T("*"));
|
||||||
szBaseWord[ii] = szBaseWord[ii + 1];
|
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
/* clear it out */
|
/* Zero it out first */
|
||||||
memset(szSearchPath, 0, sizeof(szSearchPath));
|
szBaseWord[0] = _T('\0');
|
||||||
|
szPrefix[0] = _T('\0');
|
||||||
|
|
||||||
/* Start the search for all the files */
|
/*What comes out of this needs to be:
|
||||||
GetFullPathName(szBaseWord, MAX_PATH, szSearchPath, NULL);
|
szBaseWord = path no quotes to the object
|
||||||
if(StartLength > 0)
|
szPrefix = what leads up to the filename
|
||||||
_tcscat(szSearchPath,_T("*"));
|
no quote at the END of the full name */
|
||||||
_tcscpy(LastSearch,szSearchPath);
|
FindPrefixAndSuffix(str,szPrefix,szBaseWord);
|
||||||
_tcscpy(LastPrefix,szPrefix);
|
/* Strip quotes */
|
||||||
|
for(i = 0; i < _tcslen(szBaseWord); i++)
|
||||||
|
{
|
||||||
|
if(!_tcsncmp(&szBaseWord[i], _T("\""),1))
|
||||||
|
{
|
||||||
|
for(ii = i; ii < (_tcslen(szBaseWord)); ii++)
|
||||||
|
szBaseWord[ii] = szBaseWord[ii + 1];
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/* clear it out */
|
||||||
|
memset(szSearchPath, 0, sizeof(szSearchPath));
|
||||||
|
|
||||||
|
/* Start the search for all the files */
|
||||||
|
GetFullPathName(szBaseWord, MAX_PATH, szSearchPath, NULL);
|
||||||
|
if(StartLength > 0)
|
||||||
|
_tcscat(szSearchPath,_T("*"));
|
||||||
|
_tcscpy(LastSearch,szSearchPath);
|
||||||
|
_tcscpy(LastPrefix,szPrefix);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
_tcscpy(szSearchPath, LastSearch);
|
_tcscpy(szSearchPath, LastSearch);
|
||||||
_tcscpy(szPrefix, LastPrefix);
|
_tcscpy(szPrefix, LastPrefix);
|
||||||
|
StartLength = 0;
|
||||||
}
|
}
|
||||||
/* search for the files it might be */
|
/* search for the files it might be */
|
||||||
hFile = FindFirstFile (szSearchPath, &file);
|
hFile = FindFirstFile (szSearchPath, &file);
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue