From 04cc754e4d91e2172fb6e5576f6951df1fcdf218 Mon Sep 17 00:00:00 2001 From: Brandon Turner Date: Mon, 31 Oct 2005 00:10:32 +0000 Subject: [PATCH] Removed some code to make dir behave the same way as MS CMD. bug reported by irc::mikedep333 svn path=/trunk/; revision=18905 --- reactos/subsys/system/cmd/dir.c | 29 ++--------------------------- 1 file changed, 2 insertions(+), 27 deletions(-) diff --git a/reactos/subsys/system/cmd/dir.c b/reactos/subsys/system/cmd/dir.c index a33314669bd..44088ada77d 100644 --- a/reactos/subsys/system/cmd/dir.c +++ b/reactos/subsys/system/cmd/dir.c @@ -240,7 +240,7 @@ DirReadParam(LPTSTR Line, /* [IN] The line with the parameters & switches */ BOOL bPNegative; /* Negative switch parameter */ BOOL bIntoQuotes; /* A flag showing if we are in quotes (") */ LPTSTR ptrLast; /* A pointer to the last character of param */ - UINT t = 0; + /* Initialize variables; */ @@ -261,31 +261,6 @@ DirReadParam(LPTSTR Line, /* [IN] The line with the parameters & switches */ lpFlags->stTimeField.bParSetted = TRUE; - /* Add correct handling of *. */ - for(t=0;t<_tcslen(Line);t++) - { - static INT count=0; - - if ((count==0) && (Line[t]==_T('*'))) - count++; - - else if ((count==1) && (Line[t]==_T('.'))) - count++; - - else if ((count==2) && (Line[t]==_T('*'))) - count++; - - else if (!_istspace(Line[t])) - { - if (count==2) - lpFlags->bWideListColSort = ! bNegative; - count=-1; - } - } - - - - /* Main Loop (see README_DIR.txt) */ /* scan the command line char per char, and we process its char */ while (*Line) @@ -1980,7 +1955,7 @@ INT CommandDir(LPTSTR first, LPTSTR rest) stFlags.stOrderBy.bUnSet = FALSE; nErrorLevel = 0; - + /* read the parameters from the DIRCMD environment variable */ if (GetEnvironmentVariable (_T("DIRCMD"), dircmd, 256)) if (!DirReadParam(dircmd, ¶m, &stFlags))