mirror of
https://github.com/reactos/reactos.git
synced 2024-12-28 18:15:11 +00:00
[CMD] Simplify GetRootPath() and mark its InPath parameter pointer to const string.
This commit is contained in:
parent
f43ee81573
commit
47d7de4b7b
2 changed files with 9 additions and 7 deletions
|
@ -269,7 +269,12 @@ INT CommandMemory (LPTSTR);
|
|||
INT cmd_mklink(LPTSTR);
|
||||
|
||||
/* Prototypes for MISC.C */
|
||||
INT GetRootPath(TCHAR *InPath,TCHAR *OutPath,INT size);
|
||||
INT
|
||||
GetRootPath(
|
||||
IN LPCTSTR InPath,
|
||||
OUT LPTSTR OutPath,
|
||||
IN INT size);
|
||||
|
||||
BOOL SetRootPath(TCHAR *oldpath,TCHAR *InPath);
|
||||
TCHAR cgetchar (VOID);
|
||||
BOOL CheckCtrlBreak (INT);
|
||||
|
|
|
@ -150,7 +150,7 @@
|
|||
*/
|
||||
INT
|
||||
GetRootPath(
|
||||
IN LPTSTR InPath,
|
||||
IN LPCTSTR InPath,
|
||||
OUT LPTSTR OutPath,
|
||||
IN INT size)
|
||||
{
|
||||
|
@ -162,14 +162,11 @@ GetRootPath(
|
|||
{
|
||||
t = (InPath[0] - _T('0')) + 28;
|
||||
}
|
||||
|
||||
if ((InPath[0] >= _T('a')) && (InPath[0] <= _T('z')))
|
||||
else if ((InPath[0] >= _T('a')) && (InPath[0] <= _T('z')))
|
||||
{
|
||||
t = (InPath[0] - _T('a')) + 1;
|
||||
InPath[0] = t + _T('A') - 1;
|
||||
}
|
||||
|
||||
if ((InPath[0] >= _T('A')) && (InPath[0] <= _T('Z')))
|
||||
else if ((InPath[0] >= _T('A')) && (InPath[0] <= _T('Z')))
|
||||
{
|
||||
t = (InPath[0] - _T('A')) + 1;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue