Fix a old bug in dir it did only accpet lower letters as param
change from ansi _toupper to tchar _totupper
it is now both uncide and ansi compatible
Modified: trunk/reactos/subsys/system/cmd/dir.c
_____
Modified: trunk/reactos/subsys/system/cmd/dir.c
--- trunk/reactos/subsys/system/cmd/dir.c 2005-05-07 18:20:23 UTC
(rev 15087)
+++ trunk/reactos/subsys/system/cmd/dir.c 2005-05-07 20:02:50 UTC
(rev 15088)
@@ -262,7 +262,7 @@
{
/* we save current character as it is and its upper case
*/
cCurChar = *Line;
- cCurUChar = _toupper(*Line);
+ cCurUChar = _totupper(*Line);
/* 1st section (see README_DIR.txt) */
/* When a switch is expecting */
Add *. to dir but it does not working in ros but in windows fine
some bug in ros
Modified: trunk/reactos/subsys/system/cmd/dir.c
_____
Modified: trunk/reactos/subsys/system/cmd/dir.c
--- trunk/reactos/subsys/system/cmd/dir.c 2005-05-07 17:44:54 UTC
(rev 15084)
+++ trunk/reactos/subsys/system/cmd/dir.c 2005-05-07 17:48:25 UTC
(rev 15085)
@@ -567,14 +567,21 @@
if (!file)
return;
+
/* if no file spec, change to "*.*" */
if (*file == _T('\0'))
- {
- _tcscpy (file, _T("*.*"));
+ {
+ _tcscpy (file, _T("*.*"));
return;
}
+ // add support for *.
+ if ((file[0] == _T('*')) && (file[1] == _T('.') ))
+ {
+ return;
+ }
+
/* if starts with . add * in front */
if (*file == _T('.'))
{
@@ -585,15 +592,18 @@
/* if no . add .* */
if (!_tcschr (file, _T('.')))
{
- _tcscat (file, _T(".*"));
+ _tcscat (file, _T(".*"));
return;
}
+
+
/* if last character is '.' add '*' */
len = _tcslen (file);
if (file[len - 1] == _T('.'))
{
_tcscat (file, _T("*"));
+ ConOutPrintf(L"file3 : %s\n",file);
return;
}
}