Author: tretiakov
Date: Fri Feb 23 23:05:39 2007
New Revision: 25896
URL:
http://svn.reactos.org/svn/reactos?rev=25896&view=rev
Log:
Andrey Janzen (virus126):
- Fix warning when using FEATURE_UNIX_FILENAME_COMPLETION.
- Make unix-style completion work correctly.
- Make %time% return milliseconds/10.
Modified:
trunk/reactos/base/shell/cmd/cmd.c
trunk/reactos/base/shell/cmd/cmdinput.c
trunk/reactos/base/shell/cmd/filecomp.c
Modified: trunk/reactos/base/shell/cmd/cmd.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/shell/cmd/cmd.c?rev=2…
==============================================================================
--- trunk/reactos/base/shell/cmd/cmd.c (original)
+++ trunk/reactos/base/shell/cmd/cmd.c Fri Feb 23 23:05:39 2007
@@ -1172,7 +1172,7 @@
GetSystemTime(&t);
_sntprintf ( ret, retlen, _T("%02d%c%02d%c%02d%c%02d"),
t.wHour, cTimeSeparator, t.wMinute, cTimeSeparator,
- t.wSecond, cDecimalSeparator, t.wMilliseconds );
+ t.wSecond, cDecimalSeparator, t.wMilliseconds / 10);
return ret;
}
/* %DATE% */
Modified: trunk/reactos/base/shell/cmd/cmdinput.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/shell/cmd/cmdinput.c?…
==============================================================================
--- trunk/reactos/base/shell/cmd/cmdinput.c (original)
+++ trunk/reactos/base/shell/cmd/cmdinput.c Fri Feb 23 23:05:39 2007
@@ -139,8 +139,10 @@
TCHAR ch;
BOOL bContinue=FALSE;/*is TRUE the second case will not be executed*/
BOOL bReturn = FALSE;
- TCHAR szPath[MAX_PATH];
BOOL bCharInput;
+ #ifdef FEATURE_4NT_FILENAME_COMPLETION
+ TCHAR szPath[MAX_PATH];
+ #endif
/* get screen size */
GetScreenSize (&maxx, &maxy);
Modified: trunk/reactos/base/shell/cmd/filecomp.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/shell/cmd/filecomp.c?…
==============================================================================
--- trunk/reactos/base/shell/cmd/filecomp.c (original)
+++ trunk/reactos/base/shell/cmd/filecomp.c Fri Feb 23 23:05:39 2007
@@ -43,7 +43,7 @@
LPCOMMAND cmds_ptr;
/* expand current file name */
- count = charcount - 1;
+ count = charcount - 1;
if (count < 0)
count = 0;
@@ -89,6 +89,7 @@
_tcscpy (path, directory);
while (curplace >= 0 && directory[curplace] != _T('\\') &&
+ directory[curplace] != _T('/') &&
directory[curplace] != _T(':'))
{
directory[curplace] = 0;
@@ -205,7 +206,7 @@
BOOL found_dot = FALSE;
INT curplace = 0;
INT start;
- UINT count;
+ INT count;
TCHAR path[MAX_PATH];
TCHAR fname[MAX_PATH];
TCHAR directory[MAX_PATH];
@@ -361,6 +362,7 @@
TCHAR * szSearch;
TCHAR * szSearch1;
TCHAR * szSearch2;
+ TCHAR * szSearch3;
/* number of quotes in the string */
INT nQuotes = 0;
/* used in for loops */
@@ -394,9 +396,12 @@
_tcscpy(szSuffix,szSearch);
/* Find the one closest to end */
szSearch1 = _tcsrchr(str, _T('\"'));
- szSearch2 = _tcsrchr(str, _T('\\'));
+ szSearch2 = _tcsrchr(str, _T('\\'));
+ szSearch3 = _tcsrchr(str, _T('.'));
if(szSearch2 != NULL && _tcslen(szSearch1) > _tcslen(szSearch2))
szSearch = szSearch2;
+ else if(szSearch3 != NULL && _tcslen(szSearch1) > _tcslen(szSearch3))
+ szSearch = szSearch3;
else
szSearch = szSearch1;
/* Move one char past */
@@ -436,9 +441,12 @@
/* Find the closest to the end space or \ */
_tcscpy(str,strIN);
szSearch1 = _tcsrchr(str, _T(' '));
- szSearch2 = _tcsrchr(str, _T('\\'));
+ szSearch2 = _tcsrchr(str, _T('\\'));
+ szSearch3 = _tcsrchr(str, _T('/'));
if(szSearch2 != NULL && _tcslen(szSearch1) > _tcslen(szSearch2))
szSearch = szSearch2;
+ else if(szSearch3 != NULL && _tcslen(szSearch1) > _tcslen(szSearch3))
+ szSearch = szSearch3;
else
szSearch = szSearch1;
szSearch++;